diff --git a/.config/lingua.dic b/.config/lingua.dic index c314215a9f3f71ad355690e58d6f5421b49afb04..53187cec35d5e8c10019c261322cb2276f419cbe 100644 --- a/.config/lingua.dic +++ b/.config/lingua.dic @@ -67,7 +67,6 @@ MessageNonce MessageNonces MessagePayload MetricsParams -Millau/MS OldHeader OutboundMessages PoA @@ -75,8 +74,6 @@ PoV/MS Pre RLP RPC/MS -Rialto/MS -RialtoParachain/MS Relayer/MS Runtime1 Runtime2 @@ -164,7 +161,6 @@ malus max_value merkle/MS metadata -millau misbehavior/SM misbehaviors multivalidator/SM diff --git a/.github/workflows/gitspiegel-trigger.yml b/.github/workflows/gitspiegel-trigger.yml new file mode 100644 index 0000000000000000000000000000000000000000..dce3aaf2feca59b26283c1a600440483eabfb892 --- /dev/null +++ b/.github/workflows/gitspiegel-trigger.yml @@ -0,0 +1,22 @@ +name: gitspiegel sync + +# This workflow doesn't do anything, it's only use is to trigger "workflow_run" +# webhook, that'll be consumed by gitspiegel +# This way, gitspiegel won't do mirroring, unless this workflow runs, +# and running the workflow is protected by GitHub + +on: + pull_request: + types: + - opened + - synchronize + - unlocked + - ready_for_review + - reopened + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - name: Do nothing + run: echo "let's go" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 032ebbcff9fdbd379572341cdc1ea547c7e799db..1e5e596b54069e7c8a7e8cee9834709bbfc226fd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,8 +33,17 @@ default: paths: - artifacts/ +.kubernetes-build: &kubernetes-build + tags: + - kubernetes-parity-build + .docker-env: &docker-env image: "${CI_IMAGE}" + before_script: + - rustup show + - cargo --version + - rustup +nightly show + - cargo +nightly --version tags: - linux-docker @@ -105,18 +114,14 @@ spellcheck: <<: *docker-env <<: *test-refs script: - - cargo spellcheck check --cfg=.config/spellcheck.toml --checkers hunspell -m 1 $(find . -type f -name '*.rs' ! -path "./target/*" ! -path "./bin/millau/runtime/src/weights/*" ! -name 'codegen_runtime.rs' ! -name 'weights.rs') + - 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') check: stage: test <<: *docker-env <<: *test-refs script: &check-script - - SKIP_WASM_BUILD=1 time cargo check --locked --verbose --workspace - # Check Rialto benchmarks runtime - - SKIP_WASM_BUILD=1 time cargo check -p rialto-runtime --locked --features runtime-benchmarks --verbose - # Check Millau benchmarks runtime - - SKIP_WASM_BUILD=1 time cargo check -p millau-runtime --locked --features runtime-benchmarks --verbose + - SKIP_WASM_BUILD=1 time cargo check --locked --verbose --workspace --features runtime-benchmarks check-nightly: stage: test @@ -175,19 +180,6 @@ deny-licenses: - echo "___Complete logs can be found in the artifacts___" - cargo deny check licenses 2> licenses.log -benchmarks-test: - stage: test - <<: *docker-env - <<: *nightly-test - script: - - time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet --chain=dev --steps=2 --repeat=1 --pallet=pallet_bridge_messages --extrinsic=* --wasm-execution=Compiled --heap-pages=4096 - - time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet --chain=dev --steps=2 --repeat=1 --pallet=pallet_bridge_grandpa --extrinsic=* --wasm-execution=Compiled --heap-pages=4096 - - time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet --chain=dev --steps=2 --repeat=1 --pallet=pallet_bridge_parachains --extrinsic=* --wasm-execution=Compiled --heap-pages=4096 - - time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet --chain=dev --steps=2 --repeat=1 --pallet=pallet_bridge_relayers --extrinsic=* --wasm-execution=Compiled --heap-pages=4096 - - time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet --chain=dev --steps=2 --repeat=1 --pallet=pallet_xcm_bridge_hub_router --extrinsic=* --wasm-execution=Compiled --heap-pages=4096 - # we may live with failing benchmarks, it is just a signal for us - allow_failure: true - check-rustdoc: stage: test <<: *docker-env @@ -196,7 +188,7 @@ check-rustdoc: SKIP_WASM_BUILD: 1 RUSTDOCFLAGS: "-Dwarnings" script: - - time cargo +nightly doc --workspace --verbose --no-deps --all-features --exclude relay-rialto-parachain-client + - time cargo +nightly doc --workspace --verbose --no-deps --all-features partial-repo-pallets-build-test: stage: test @@ -229,16 +221,6 @@ build: after_script: # Prepare artifacts - mkdir -p ./artifacts - - strip ./target/release/rialto-bridge-node - - mv -v ./target/release/rialto-bridge-node ./artifacts/ - - strip ./target/release/rialto-bridge-node-execute-worker - - mv -v ./target/release/rialto-bridge-node-execute-worker ./artifacts/ - - strip ./target/release/rialto-bridge-node-prepare-worker - - mv -v ./target/release/rialto-bridge-node-prepare-worker ./artifacts/ - - strip ./target/release/rialto-parachain-collator - - mv -v ./target/release/rialto-parachain-collator ./artifacts/ - - strip ./target/release/millau-bridge-node - - mv -v ./target/release/millau-bridge-node ./artifacts/ - strip ./target/release/substrate-relay - mv -v ./target/release/substrate-relay ./artifacts/ - mv -v ./deployments/local-scripts/bridge-entrypoint.sh ./artifacts/ @@ -257,7 +239,7 @@ build-nightly: # check that images can be built .build-image: &build-image - <<: *docker-env + <<: *kubernetes-build image: $BUILDAH_IMAGE <<: *test-only-refs variables: &build-image-variables @@ -286,18 +268,6 @@ build-nightly: --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 @@ -312,7 +282,7 @@ bridges-common-relay-build-docker: # build and publish images .build-push-image: &build-push-image - <<: *docker-env + <<: *kubernetes-build image: $BUILDAH_IMAGE <<: *publish-refs variables: &image-variables @@ -364,18 +334,6 @@ bridges-common-relay-build-docker: after_script: - env REGISTRY_AUTH_FILE= buildah logout --all -rialto-bridge-node: - stage: publish - <<: *build-push-image - -rialto-parachain-collator: - stage: publish - <<: *build-push-image - -millau-bridge-node: - stage: publish - <<: *build-push-image - substrate-relay: stage: publish <<: *build-push-image @@ -391,6 +349,7 @@ bridges-common-relay: # Publish Docker images description to hub.docker.com .publish-docker-image-description: + <<: *kubernetes-build stage: publish-docker-description image: paritytech/dockerhub-description variables: @@ -404,23 +363,6 @@ bridges-common-relay: script: - export DOCKERHUB_REPOSITORY="paritytech/${CI_JOB_NAME:10}" - cd / && sh entrypoint.sh - tags: - - linux-docker - -dockerhub-rialto-bridge-node: - extends: .publish-docker-image-description - variables: - SHORT_DESCRIPTION: "rialto-bridge-node" - -dockerhub-rialto-parachain-collator: - extends: .publish-docker-image-description - variables: - SHORT_DESCRIPTION: "rialto-parachain-collator" - -dockerhub-millau-bridge-node: - extends: .publish-docker-image-description - variables: - SHORT_DESCRIPTION: "millau-bridge-node" dockerhub-substrate-relay: extends: .publish-docker-image-description @@ -436,7 +378,7 @@ dockerhub-bridges-common-relay: deploy-bridges-common-relay-testnet: <<: *deploy-refs - <<: *docker-env + <<: *kubernetes-build needs: - job: bridges-common-relay stage: deploy diff --git a/Cargo.lock b/Cargo.lock index 7d89e924a9130f949ec24838f04626017a2235b0..55e9ef8014222e04df69fefede6249af03f41d8c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,16 +18,16 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli", + "gimli 0.27.3", ] [[package]] name = "addr2line" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli", + "gimli 0.28.1", ] [[package]] @@ -36,25 +36,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "aead" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" -dependencies = [ - "generic-array 0.14.7", -] - -[[package]] -name = "aead" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" -dependencies = [ - "generic-array 0.14.7", - "rand_core 0.6.4", -] - [[package]] name = "aead" version = "0.5.2" @@ -65,29 +46,6 @@ dependencies = [ "generic-array 0.14.7", ] -[[package]] -name = "aes" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" -dependencies = [ - "aes-soft", - "aesni", - "cipher 0.2.5", -] - -[[package]] -name = "aes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" -dependencies = [ - "cfg-if 1.0.0", - "cipher 0.3.0", - "cpufeatures", - "opaque-debug 0.3.0", -] - [[package]] name = "aes" version = "0.8.3" @@ -101,80 +59,47 @@ dependencies = [ [[package]] name = "aes-gcm" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" -dependencies = [ - "aead 0.4.3", - "aes 0.7.5", - "cipher 0.3.0", - "ctr 0.8.0", - "ghash 0.4.4", - "subtle 2.4.1", -] - -[[package]] -name = "aes-gcm" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ - "aead 0.5.2", - "aes 0.8.3", + "aead", + "aes", "cipher 0.4.4", - "ctr 0.9.2", - "ghash 0.5.0", - "subtle 2.4.1", -] - -[[package]] -name = "aes-soft" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" -dependencies = [ - "cipher 0.2.5", - "opaque-debug 0.3.0", -] - -[[package]] -name = "aesni" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" -dependencies = [ - "cipher 0.2.5", - "opaque-debug 0.3.0", + "ctr", + "ghash", + "subtle 2.5.0", ] [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.12", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" dependencies = [ "cfg-if 1.0.0", - "getrandom 0.2.10", + "getrandom 0.2.12", "once_cell", "version_check", + "zerocopy", ] [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -185,12 +110,6 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" -[[package]] -name = "always-assert" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4436e0292ab1bb631b42973c61205e704475fe8126af845c8d923c0996328127" - [[package]] name = "android-tzdata" version = "0.1.1" @@ -217,9 +136,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" dependencies = [ "anstyle", "anstyle-parse", @@ -231,43 +150,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" [[package]] name = "approx" @@ -280,29 +199,40 @@ dependencies = [ [[package]] name = "aquamarine" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df752953c49ce90719c7bf1fc587bc8227aed04732ea0c0f85e5397d7fdbd1a1" +checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" dependencies = [ "include_dir", - "itertools 0.10.5", + "itertools", "proc-macro-error", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] -name = "arbitrary" -version = "1.3.0" +name = "ark-bls12-377" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d098ff73c1ca148721f37baad5ea6a465a13f9573aba8641fbbbae8164a54e" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] [[package]] -name = "arc-swap" -version = "1.6.0" +name = "ark-bls12-377-ext" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +checksum = "20c7021f180a0cbea0380eba97c2af3c57074cdaffe0eef7e840e1c9f2841e55" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-models-ext", + "ark-std", +] [[package]] name = "ark-bls12-381" @@ -316,6 +246,45 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-bls12-381-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1dc4b3d08f19e8ec06e949712f95b8361e43f1391d94f65e4234df03480631c" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-bw6-761" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e0605daf0cc5aa2034b78d008aaf159f56901d92a52ee4f6ecdfdac4f426700" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-bw6-761-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccee5fba47266f460067588ee1bf070a9c760bf2050c1c509982c5719aadb4f2" +dependencies = [ + "ark-bw6-761", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ec" version = "0.4.2" @@ -328,11 +297,37 @@ dependencies = [ "ark-std", "derivative", "hashbrown 0.13.2", - "itertools 0.10.5", + "itertools", "num-traits", + "rayon", "zeroize", ] +[[package]] +name = "ark-ed-on-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b10d901b9ac4b38f9c32beacedfadcdd64e46f8d7f8e88c1ae1060022cf6f6c6" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ed-on-bls12-377-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524a4fb7540df2e1a8c2e67a83ba1d1e6c3947f4f9342cc2359fc2e789ad731d" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ed-on-bls12-381-bandersnatch" version = "0.4.0" @@ -345,6 +340,19 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d15185f1acb49a07ff8cbe5f11a1adc5a93b19e211e325d826ae98e98e124346" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ff" version = "0.4.2" @@ -357,7 +365,7 @@ dependencies = [ "ark-std", "derivative", "digest 0.10.7", - "itertools 0.10.5", + "itertools", "num-bigint", "num-traits", "paste", @@ -371,7 +379,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" dependencies = [ - "quote 1.0.33", + "quote 1.0.35", "syn 1.0.109", ] @@ -383,11 +391,24 @@ checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ "num-bigint", "num-traits", - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.78", + "quote 1.0.35", "syn 1.0.109", ] +[[package]] +name = "ark-models-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e9eab5d4b5ff2f228b763d38442adc9b084b0a465409b059fac5c2308835ec2" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", +] + [[package]] name = "ark-poly" version = "0.4.2" @@ -403,9 +424,9 @@ dependencies = [ [[package]] name = "ark-scale" -version = "0.0.11" +version = "0.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51bd73bb6ddb72630987d37fa963e99196896c0d0ea81b7c894567e74a2f83af" +checksum = "5f69c00b3b529be29528a6f2fd5fa7b1790f8bed81b9cdca17e326538545a179" dependencies = [ "ark-ec", "ark-ff", @@ -418,7 +439,7 @@ dependencies = [ [[package]] name = "ark-secret-scalar" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=4b09416#4b09416fd23383ec436ddac127d58c7b7cd392c6" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-ec", "ark-ff", @@ -426,7 +447,7 @@ dependencies = [ "ark-std", "ark-transcript", "digest 0.10.7", - "rand_core 0.6.4", + "getrandom_or_panic", "zeroize", ] @@ -448,8 +469,8 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.78", + "quote 1.0.35", "syn 1.0.109", ] @@ -460,13 +481,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", - "rand 0.8.5", + "rand", + "rayon", ] [[package]] name = "ark-transcript" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=4b09416#4b09416fd23383ec436ddac127d58c7b7cd392c6" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-ff", "ark-serialize", @@ -484,9 +506,9 @@ checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" [[package]] name = "array-bytes" -version = "6.1.0" +version = "6.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b1c5a481ec30a5abd8dfbd94ab5cf1bb4e9a66be7f1b3b322f2f1170c200fd" +checksum = "6f840fb7195bcfc5e17ea40c26e5ce6d5b9ce5d584466e17703209657e459ae0" [[package]] name = "arrayref" @@ -515,48 +537,20 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" -[[package]] -name = "asn1-rs" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ff05a702273012438132f449575dbc804e27b2f3cbe3069aa237d26c98fa33" -dependencies = [ - "asn1-rs-derive 0.1.0", - "asn1-rs-impl", - "displaydoc", - "nom", - "num-traits", - "rusticata-macros", - "thiserror", - "time 0.3.30", -] - [[package]] name = "asn1-rs" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" dependencies = [ - "asn1-rs-derive 0.4.0", + "asn1-rs-derive", "asn1-rs-impl", "displaydoc", "nom", "num-traits", "rusticata-macros", "thiserror", - "time 0.3.30", -] - -[[package]] -name = "asn1-rs-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8b7511298d5b7784b40b092d9e9dcd3a627a5707e4b5e507931ab0d44eeebf" -dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", - "synstructure", + "time", ] [[package]] @@ -565,8 +559,8 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.78", + "quote 1.0.35", "syn 1.0.109", "synstructure", ] @@ -577,24 +571,18 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.78", + "quote 1.0.35", "syn 1.0.109", ] -[[package]] -name = "assert_matches" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" - [[package]] name = "async-attributes" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" dependencies = [ - "quote 1.0.33", + "quote 1.0.35", "syn 1.0.109", ] @@ -605,21 +593,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", - "event-listener", + "event-listener 2.5.3", + "futures-core", +] + +[[package]] +name = "async-channel" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c" +dependencies = [ + "concurrent-queue", + "event-listener 4.0.3", + "event-listener-strategy", "futures-core", + "pin-project-lite 0.2.13", ] [[package]] name = "async-executor" -version = "1.5.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" +checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" dependencies = [ - "async-lock", + "async-lock 3.3.0", "async-task", "concurrent-queue", - "fastrand 1.9.0", - "futures-lite", + "fastrand 2.0.1", + "futures-lite 2.2.0", "slab", ] @@ -629,24 +630,24 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" dependencies = [ - "async-lock", + "async-lock 2.8.0", "autocfg", "blocking", - "futures-lite", + "futures-lite 1.13.0", ] [[package]] name = "async-global-executor" -version = "2.3.1" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" +checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ - "async-channel", + "async-channel 2.1.1", "async-executor", - "async-io", - "async-lock", + "async-io 2.3.0", + "async-lock 3.3.0", "blocking", - "futures-lite", + "futures-lite 2.2.0", "once_cell", ] @@ -656,56 +657,102 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ - "async-lock", + "async-lock 2.8.0", "autocfg", "cfg-if 1.0.0", "concurrent-queue", - "futures-lite", + "futures-lite 1.13.0", "log", "parking", - "polling", - "rustix 0.37.23", + "polling 2.8.0", + "rustix 0.37.27", "slab", - "socket2 0.4.9", + "socket2 0.4.10", "waker-fn", ] +[[package]] +name = "async-io" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb41eb19024a91746eba0773aa5e16036045bbf45733766661099e182ea6a744" +dependencies = [ + "async-lock 3.3.0", + "cfg-if 1.0.0", + "concurrent-queue", + "futures-io", + "futures-lite 2.2.0", + "parking", + "polling 3.3.2", + "rustix 0.38.30", + "slab", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-lock" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +dependencies = [ + "event-listener 2.5.3", +] + [[package]] name = "async-lock" -version = "2.7.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" +checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ - "event-listener", + "event-listener 4.0.3", + "event-listener-strategy", + "pin-project-lite 0.2.13", ] [[package]] name = "async-net" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4051e67316bc7eff608fe723df5d32ed639946adcd69e07df41fd42a7b411f1f" +checksum = "0434b1ed18ce1cf5769b8ac540e33f01fa9471058b5e89da9e06f3c882a8c12f" dependencies = [ - "async-io", - "autocfg", + "async-io 1.13.0", "blocking", - "futures-lite", + "futures-lite 1.13.0", ] [[package]] name = "async-process" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a9d28b1d97e08915212e2e45310d47854eafa69600756fc735fb788f75199c9" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" dependencies = [ - "async-io", - "async-lock", - "autocfg", + "async-io 1.13.0", + "async-lock 2.8.0", + "async-signal", "blocking", "cfg-if 1.0.0", - "event-listener", - "futures-lite", - "rustix 0.37.23", - "signal-hook", + "event-listener 3.1.0", + "futures-lite 1.13.0", + "rustix 0.38.30", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-signal" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +dependencies = [ + "async-io 2.3.0", + "async-lock 2.8.0", + "atomic-waker", + "cfg-if 1.0.0", + "futures-core", + "futures-io", + "rustix 0.38.30", + "signal-hook-registry", + "slab", "windows-sys 0.48.0", ] @@ -716,21 +763,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" dependencies = [ "async-attributes", - "async-channel", + "async-channel 1.9.0", "async-global-executor", - "async-io", - "async-lock", + "async-io 1.13.0", + "async-lock 2.8.0", "crossbeam-utils", "futures-channel", "futures-core", "futures-io", - "futures-lite", + "futures-lite 1.13.0", "gloo-timers", "kv-log-macro", "log", "memchr", "once_cell", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "pin-utils", "slab", "wasm-bindgen-futures", @@ -738,32 +785,32 @@ dependencies = [ [[package]] name = "async-task" -version = "4.4.0" +version = "4.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" +checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] name = "asynchronous-codec" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06a0daa378f5fd10634e44b0a29b2a87b890657658e072a30d6f26e57ddee182" +checksum = "4057f2c32adbb2fc158e22fb38433c8e9bbf76b75a4732c7c0cbaf695fb65568" dependencies = [ "bytes", "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", ] [[package]] @@ -772,17 +819,11 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" -[[package]] -name = "atomic-take" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8ab6b55fe97976e46f91ddbed8d147d966475dc29b2032757ba47e02376fbc3" - [[package]] name = "atomic-waker" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "atty" @@ -807,30 +848,30 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.12", "instant", - "rand 0.8.5", + "rand", ] [[package]] name = "backtrace" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "addr2line 0.20.0", + "addr2line 0.21.0", "cc", "cfg-if 1.0.0", "libc", "miniz_oxide", - "object 0.31.1", + "object 0.32.2", "rustc-demangle", ] [[package]] name = "bandersnatch_vrfs" -version = "0.0.1" -source = "git+https://github.com/w3f/ring-vrf?rev=4b09416#4b09416fd23383ec436ddac127d58c7b7cd392c6" +version = "0.0.4" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-bls12-381", "ark-ec", @@ -841,10 +882,12 @@ dependencies = [ "dleq_vrf", "fflonk", "merlin 3.0.0", - "rand_chacha 0.3.1", + "rand_chacha", "rand_core 0.6.4", "ring 0.1.0", - "sha2 0.10.7", + "sha2 0.10.8", + "sp-ark-bls12-381", + "sp-ark-ed-on-bls12-381-bandersnatch", "zeroize", ] @@ -856,15 +899,9 @@ checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" [[package]] name = "base16ct" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base58" @@ -880,9 +917,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64ct" @@ -902,7 +939,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "hash-db", "log", @@ -917,27 +954,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bindgen" -version = "0.65.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" -dependencies = [ - "bitflags 1.3.2", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "peeking_take_while", - "prettyplease 0.2.10", - "proc-macro2 1.0.69", - "quote 1.0.33", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.38", -] - [[package]] name = "bip39" version = "2.0.0" @@ -945,6 +961,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ "bitcoin_hashes", + "rand", + "rand_core 0.6.4", + "serde", + "unicode-normalization", ] [[package]] @@ -961,9 +981,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "bitvec" @@ -973,6 +993,7 @@ checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ "funty", "radium", + "serde", "tap", "wyz", ] @@ -1010,38 +1031,13 @@ dependencies = [ [[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.4", - "constant_time_eq 0.2.6", -] - -[[package]] -name = "blake2s_simd" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6637f448b9e61dfadbdcbae9a885fadee1f3eaffb1f8d3c1965d3ade8bdfd44f" -dependencies = [ - "arrayref", - "arrayvec 0.7.4", - "constant_time_eq 0.2.6", -] - -[[package]] -name = "blake3" -version = "1.4.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", "arrayvec 0.7.4", - "cc", - "cfg-if 1.0.0", "constant_time_eq 0.3.0", - "digest 0.10.7", ] [[package]] @@ -1050,7 +1046,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ - "block-padding 0.1.5", + "block-padding", "byte-tools", "byteorder", "generic-array 0.12.4", @@ -1074,16 +1070,6 @@ dependencies = [ "generic-array 0.14.7", ] -[[package]] -name = "block-modes" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" -dependencies = [ - "block-padding 0.2.1", - "cipher 0.2.5", -] - [[package]] name = "block-padding" version = "0.1.5" @@ -1093,32 +1079,27 @@ dependencies = [ "byte-tools", ] -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - [[package]] name = "blocking" -version = "1.3.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" +checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" dependencies = [ - "async-channel", - "async-lock", + "async-channel 2.1.1", + "async-lock 3.3.0", "async-task", - "atomic-waker", - "fastrand 1.9.0", - "futures-lite", - "log", + "fastrand 2.0.1", + "futures-io", + "futures-lite 2.2.0", + "piper", + "tracing", ] [[package]] name = "bounded-collections" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b05133427c07c4776906f673ccf36c21b102c9829c641a5b56bd151d44fd6" +checksum = "ca548b6163b872067dc5eb82fd130c56881435e30367d2073594a3d9744120dd" dependencies = [ "log", "parity-scale-codec", @@ -1126,30 +1107,21 @@ dependencies = [ "serde", ] -[[package]] -name = "bounded-vec" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68534a48cbf63a4b1323c433cf21238c9ec23711e0df13b08c33e5c2082663ce" -dependencies = [ - "thiserror", -] - [[package]] name = "bp-asset-hub-rococo" version = "0.1.0" dependencies = [ - "bp-xcm-bridge-hub-router 0.1.0", + "bp-xcm-bridge-hub-router", "frame-support", "parity-scale-codec", "scale-info", ] [[package]] -name = "bp-asset-hub-wococo" +name = "bp-asset-hub-westend" version = "0.1.0" dependencies = [ - "bp-xcm-bridge-hub-router 0.1.0", + "bp-xcm-bridge-hub-router", "frame-support", "parity-scale-codec", "scale-info", @@ -1226,7 +1198,7 @@ dependencies = [ ] [[package]] -name = "bp-bridge-hub-wococo" +name = "bp-bridge-hub-westend" version = "0.1.0" dependencies = [ "bp-bridge-hub-cumulus", @@ -1288,31 +1260,6 @@ dependencies = [ "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] -[[package]] -name = "bp-millau" -version = "0.1.0" -dependencies = [ - "bp-beefy", - "bp-header-chain", - "bp-messages", - "bp-runtime", - "fixed-hash 0.8.0 (git+https://github.com/paritytech/parity-common?branch=master)", - "frame-support", - "frame-system", - "hash256-std-hasher", - "impl-codec", - "impl-serde", - "parity-util-mem", - "scale-info", - "serde", - "sp-api", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-trie", -] - [[package]] name = "bp-parachains" version = "0.1.0" @@ -1397,37 +1344,6 @@ dependencies = [ "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] -[[package]] -name = "bp-rialto" -version = "0.1.0" -dependencies = [ - "bp-header-chain", - "bp-messages", - "bp-runtime", - "frame-support", - "frame-system", - "sp-api", - "sp-core", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "bp-rialto-parachain" -version = "0.1.0" -dependencies = [ - "bp-bridge-hub-cumulus", - "bp-messages", - "bp-polkadot-core", - "bp-runtime", - "frame-support", - "frame-system", - "sp-api", - "sp-core", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - [[package]] name = "bp-rococo" version = "0.1.0" @@ -1496,20 +1412,6 @@ dependencies = [ "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] -[[package]] -name = "bp-wococo" -version = "0.1.0" -dependencies = [ - "bp-header-chain", - "bp-polkadot-core", - "bp-rococo", - "bp-runtime", - "frame-support", - "sp-api", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - [[package]] name = "bp-xcm-bridge-hub" version = "0.1.0" @@ -1534,17 +1436,6 @@ dependencies = [ "sp-core", ] -[[package]] -name = "bp-xcm-bridge-hub-router" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-runtime", -] - [[package]] name = "bridge-runtime-common" version = "0.1.0" @@ -1598,28 +1489,19 @@ dependencies = [ [[package]] name = "bstr" -version = "1.6.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" +checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" dependencies = [ "memchr", "serde", ] -[[package]] -name = "build-helper" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdce191bf3fa4995ce948c8c83b4640a1745457a149e73c6db75b4ffe36aad5f" -dependencies = [ - "semver 0.6.0", -] - [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byte-slice-cast" @@ -1635,32 +1517,21 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "ed2490600f404f2b94c167e31d3ed1d5f3c225a0f3b80230053b3e0b7b962bd9" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" - -[[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" -dependencies = [ - "cc", - "libc", - "pkg-config", -] +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "c2-chacha" @@ -1672,38 +1543,6 @@ dependencies = [ "ppv-lite86", ] -[[package]] -name = "camino" -version = "1.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-platform" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfa25e60aea747ec7e1124f238816749faa93759c6ff5b31f1ccdda137f4479" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.15.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" -dependencies = [ - "camino", - "cargo-platform", - "semver 1.0.18", - "serde", - "serde_json", - "thiserror", -] - [[package]] name = "castaway" version = "0.1.2" @@ -1712,38 +1551,19 @@ checksum = "a2698f953def977c68f935bb0dfa959375ad4638570e969e2f1e9f433cbf1af6" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", -] - -[[package]] -name = "ccm" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aca1a8fbc20b50ac9673ff014abfb2b5f4085ee1a850d408f14a159c5853ac7" -dependencies = [ - "aead 0.3.2", - "cipher 0.2.5", - "subtle 2.4.1", -] - -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", + "libc", ] [[package]] name = "cfg-expr" -version = "0.15.5" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3" +checksum = "6100bc57b6209840798d95cb2775684849d332f7bd788db2a8c8caf7ef82a41a" dependencies = [ "smallvec", ] @@ -1760,12 +1580,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - [[package]] name = "chacha" version = "0.3.0" @@ -1776,18 +1590,6 @@ dependencies = [ "keystream", ] -[[package]] -name = "chacha20" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6" -dependencies = [ - "cfg-if 1.0.0", - "cipher 0.3.0", - "cpufeatures", - "zeroize", -] - [[package]] name = "chacha20" version = "0.9.1" @@ -1801,43 +1603,29 @@ dependencies = [ [[package]] name = "chacha20poly1305" -version = "0.9.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18446b09be63d457bbec447509e85f662f32952b035ce892290396bc0b0cff5" +checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ - "aead 0.4.3", - "chacha20 0.8.2", - "cipher 0.3.0", - "poly1305 0.7.2", + "aead", + "chacha20", + "cipher 0.4.4", + "poly1305", "zeroize", ] [[package]] name = "chrono" -version = "0.4.28" +version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ed24df0632f708f5f6d8082675bef2596f7084dee3dd55f632290bf35bfe0f" +checksum = "41daef31d7a747c5c847246f36de49ced6f7403b4cdabc807a97b5cc184cda7a" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", - "time 0.1.45", "wasm-bindgen", - "windows-targets 0.48.1", -] - -[[package]] -name = "cid" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9b68e3193982cd54187d71afdb2a271ad4cf8af157858e9cb911b91321de143" -dependencies = [ - "core2", - "multibase", - "multihash", - "serde", - "unsigned-varint", + "windows-targets 0.52.0", ] [[package]] @@ -1849,15 +1637,6 @@ dependencies = [ "generic-array 0.14.7", ] -[[package]] -name = "cipher" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" -dependencies = [ - "generic-array 0.14.7", -] - [[package]] name = "cipher" version = "0.4.4" @@ -1866,6 +1645,7 @@ checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common", "inout", + "zeroize", ] [[package]] @@ -1886,17 +1666,6 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "clang-sys" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" -dependencies = [ - "glob", - "libc", - "libloading", -] - [[package]] name = "clap" version = "2.34.0" @@ -1913,97 +1682,25 @@ dependencies = [ ] [[package]] -name = "clap" -version = "4.4.7" +name = "colorchoice" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + +[[package]] +name = "common" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof#b273d33f9981e2bb3375ab45faeb537f7ee35224" dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim 0.10.0", -] - -[[package]] -name = "clap_derive" -version = "4.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" -dependencies = [ - "heck 0.4.1", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", -] - -[[package]] -name = "clap_lex" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" - -[[package]] -name = "coarsetime" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a90d114103adbc625300f346d4d09dfb4ab1c4a8df6868435dd903392ecf4354" -dependencies = [ - "libc", - "once_cell", - "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - -[[package]] -name = "comfy-table" -version = "7.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab77dbd8adecaf3f0db40581631b995f312a8a5ae3aa9993188bb8f23d83a5b" -dependencies = [ - "strum 0.24.1", - "strum_macros 0.24.3", - "unicode-width", -] - -[[package]] -name = "common" -version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof#edd1e90b847e560bf60fc2e8712235ccfa11a9a9" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", - "fflonk", - "merlin 3.0.0", - "rand_chacha 0.3.1", + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "fflonk", + "getrandom_or_panic", + "merlin 3.0.0", + "rand_chacha", ] [[package]] @@ -2014,51 +1711,36 @@ checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ "crossbeam-utils", ] -[[package]] -name = "console" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "unicode-width", - "windows-sys 0.45.0", -] - [[package]] name = "const-oid" -version = "0.9.4" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "795bc6e66a8e340f075fcf6227e417a2dc976b92b91f3cdc778bb858778b6747" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "const-random" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368a7a772ead6ce7e1de82bfb04c485f3db8ec744f72925af5735e29a22cc18e" +checksum = "5aaf16c9c2c612020bcfd042e170f6e32de9b9d75adb5277cdbbd2e2c8c8299a" dependencies = [ "const-random-macro", - "proc-macro-hack", ] [[package]] name = "const-random-macro" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d7d6ab3c3a2282db210df5f02c4dab6e0a7057af0fb7ebd4070f30fe05c0ddb" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.12", "once_cell", - "proc-macro-hack", "tiny-keccak", ] @@ -2070,15 +1752,15 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "constant_time_eq" -version = "0.2.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] -name = "constant_time_eq" -version = "0.3.0" +name = "constcat" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "cd7e35aee659887cbfb97aaf227ac12cad1a9d7c71e55ff3376839ed4e282d08" [[package]] name = "convert_case" @@ -2088,9 +1770,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -2098,9 +1780,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core2" @@ -2120,21 +1802,11 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "cpu-time" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e393a7668fe1fad3075085b86c781883000b4ede868f43627b34a87c8b7ded" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "cpufeatures" -version = "0.2.9" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -2160,7 +1832,7 @@ dependencies = [ "cranelift-codegen-shared", "cranelift-entity", "cranelift-isle", - "gimli", + "gimli 0.27.3", "hashbrown 0.13.2", "log", "regalloc2", @@ -2230,28 +1902,13 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "itertools 0.10.5", + "itertools", "log", "smallvec", "wasmparser", "wasmtime-types", ] -[[package]] -name = "crc" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" -dependencies = [ - "crc-catalog", -] - -[[package]] -name = "crc-catalog" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" - [[package]] name = "crc32fast" version = "1.3.2" @@ -2261,58 +1918,39 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils", -] - [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if 1.0.0", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.15" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if 1.0.0", "crossbeam-utils", - "memoffset 0.9.0", - "scopeguard", ] [[package]] name = "crossbeam-queue" -version = "0.3.8" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "cfg-if 1.0.0", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if 1.0.0", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crunchy" @@ -2322,25 +1960,13 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" -dependencies = [ - "generic-array 0.14.7", - "rand_core 0.6.4", - "subtle 2.4.1", - "zeroize", -] - -[[package]] -name = "crypto-bigint" -version = "0.5.2" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] @@ -2372,26 +1998,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ "generic-array 0.14.7", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] name = "crypto-mac" -version = "0.11.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e" dependencies = [ "generic-array 0.14.7", - "subtle 2.4.1", -] - -[[package]] -name = "ctr" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" -dependencies = [ - "cipher 0.3.0", + "subtle 2.5.0", ] [[package]] @@ -2404,10322 +2021,5453 @@ dependencies = [ ] [[package]] -name = "cumulus-client-cli" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "curl" +version = "0.4.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "509bd11746c7ac09ebd19f0b17782eae80aadee26237658a6b4808afb5c11a22" dependencies = [ - "clap 4.4.7", - "parity-scale-codec", - "sc-chain-spec", - "sc-cli", - "sc-client-api", - "sc-service", - "sp-core", - "sp-runtime", - "url", + "curl-sys", + "libc", + "openssl-probe", + "openssl-sys", + "schannel", + "socket2 0.4.10", + "winapi", ] [[package]] -name = "cumulus-client-collator" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "curl-sys" +version = "0.4.70+curl-8.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c0333d8849afe78a4c8102a429a446bfdd055832af071945520e835ae2d841e" dependencies = [ - "cumulus-client-consensus-common", - "cumulus-client-network", - "cumulus-primitives-core", - "futures", - "parity-scale-codec", - "parking_lot 0.12.1", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-overseer", - "polkadot-primitives", - "sc-client-api", - "sp-api", - "sp-consensus", - "sp-core", - "sp-runtime", - "tracing", + "cc", + "libc", + "libnghttp2-sys", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", + "windows-sys 0.48.0", ] [[package]] -name = "cumulus-client-consensus-aura" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "curve25519-dalek" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" dependencies = [ - "async-trait", - "cumulus-client-collator", - "cumulus-client-consensus-common", - "cumulus-client-consensus-proposer", - "cumulus-primitives-aura", - "cumulus-primitives-core", - "cumulus-primitives-parachain-inherent", - "cumulus-relay-chain-interface", - "futures", - "parity-scale-codec", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-overseer", - "polkadot-primitives", - "sc-client-api", - "sc-consensus", - "sc-consensus-aura", - "sc-consensus-babe", - "sc-consensus-slots", - "sc-telemetry", - "schnellru", - "sp-api", - "sp-application-crypto", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-consensus-aura", - "sp-core", - "sp-inherents", - "sp-keystore", - "sp-runtime", - "sp-state-machine", - "sp-timestamp", - "substrate-prometheus-endpoint", - "tracing", + "byteorder", + "digest 0.8.1", + "rand_core 0.5.1", + "subtle 2.5.0", + "zeroize", ] [[package]] -name = "cumulus-client-consensus-common" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "curve25519-dalek" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ - "async-trait", - "cumulus-client-pov-recovery", - "cumulus-primitives-core", - "cumulus-relay-chain-interface", - "dyn-clone", - "futures", - "log", - "parity-scale-codec", - "polkadot-primitives", - "sc-client-api", - "sc-consensus", - "sc-consensus-babe", - "schnellru", - "sp-blockchain", - "sp-consensus", - "sp-consensus-slots", - "sp-core", - "sp-runtime", - "sp-timestamp", - "sp-trie", - "substrate-prometheus-endpoint", - "tracing", + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle 2.5.0", + "zeroize", ] [[package]] -name = "cumulus-client-consensus-proposer" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "curve25519-dalek" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ - "anyhow", - "async-trait", - "cumulus-primitives-parachain-inherent", - "sp-consensus", - "sp-inherents", - "sp-runtime", - "sp-state-machine", - "thiserror", + "cfg-if 1.0.0", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "platforms", + "rustc_version", + "subtle 2.5.0", + "zeroize", ] [[package]] -name = "cumulus-client-network" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ - "async-trait", - "cumulus-relay-chain-interface", - "futures", - "futures-timer", - "parity-scale-codec", - "parking_lot 0.12.1", - "polkadot-node-primitives", - "polkadot-parachain-primitives", - "polkadot-primitives", - "sc-client-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-runtime", - "sp-state-machine", - "tracing", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] -name = "cumulus-client-pov-recovery" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "curve25519-dalek-ng" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" dependencies = [ - "async-trait", - "cumulus-primitives-core", - "cumulus-relay-chain-interface", - "futures", - "futures-timer", - "parity-scale-codec", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-overseer", - "polkadot-primitives", - "rand 0.8.5", - "sc-client-api", - "sc-consensus", - "sp-consensus", - "sp-maybe-compressed-blob", - "sp-runtime", - "tracing", + "byteorder", + "digest 0.9.0", + "rand_core 0.6.4", + "subtle-ng", + "zeroize", ] [[package]] -name = "cumulus-client-service" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "cumulus-client-cli", - "cumulus-client-collator", - "cumulus-client-consensus-common", - "cumulus-client-network", - "cumulus-client-pov-recovery", - "cumulus-primitives-core", - "cumulus-relay-chain-inprocess-interface", - "cumulus-relay-chain-interface", - "cumulus-relay-chain-minimal-node", - "futures", - "polkadot-primitives", - "sc-client-api", - "sc-consensus", - "sc-network", - "sc-network-sync", - "sc-network-transactions", - "sc-rpc", - "sc-service", - "sc-sysinfo", - "sc-telemetry", - "sc-transaction-pool", - "sc-utils", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-runtime", - "sp-transaction-pool", +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", ] [[package]] -name = "cumulus-pallet-aura-ext" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "darling" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ - "cumulus-pallet-parachain-system", - "frame-support", - "frame-system", - "pallet-aura", - "pallet-timestamp", - "parity-scale-codec", - "scale-info", - "sp-application-crypto", - "sp-consensus-aura", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "darling_core 0.20.3", + "darling_macro 0.20.3", ] [[package]] -name = "cumulus-pallet-dmp-queue" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" dependencies = [ - "cumulus-primitives-core", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "staging-xcm", + "fnv", + "ident_case", + "proc-macro2 1.0.78", + "quote 1.0.35", + "strsim 0.10.0", + "syn 1.0.109", ] [[package]] -name = "cumulus-pallet-parachain-system" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "darling_core" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" dependencies = [ - "bytes", - "cumulus-pallet-parachain-system-proc-macro", - "cumulus-primitives-core", - "cumulus-primitives-parachain-inherent", - "environmental", - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "polkadot-parachain-primitives", - "scale-info", - "sp-core", - "sp-externalities", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-state-machine", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-trie", - "sp-version", - "staging-xcm", - "trie-db", + "fnv", + "ident_case", + "proc-macro2 1.0.78", + "quote 1.0.35", + "strsim 0.10.0", + "syn 2.0.48", ] [[package]] -name = "cumulus-pallet-parachain-system-proc-macro" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ - "proc-macro-crate", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "darling_core 0.14.4", + "quote 1.0.35", + "syn 1.0.109", ] [[package]] -name = "cumulus-pallet-xcm" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "darling_macro" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ - "cumulus-primitives-core", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "staging-xcm", + "darling_core 0.20.3", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] -name = "cumulus-pallet-xcmp-queue" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "data-encoding" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" + +[[package]] +name = "data-encoding-macro" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20c01c06f5f429efdf2bae21eb67c28b3df3cf85b7dd2d8ef09c0838dac5d33e" dependencies = [ - "bp-xcm-bridge-hub-router 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "cumulus-primitives-core", - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "polkadot-runtime-common", - "rand_chacha 0.3.1", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "staging-xcm", - "staging-xcm-executor", + "data-encoding", + "data-encoding-macro-internal", ] [[package]] -name = "cumulus-primitives-aura" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "data-encoding-macro-internal" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0047d07f2c89b17dd631c80450d69841a6b5d7fb17278cbc43d7e4cfcf2576f3" dependencies = [ - "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-primitives", - "sp-api", - "sp-consensus-aura", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "data-encoding", + "syn 1.0.109", ] [[package]] -name = "cumulus-primitives-core" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "der" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ - "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-primitives", - "scale-info", - "sp-api", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-trie", - "staging-xcm", + "const-oid", + "zeroize", ] [[package]] -name = "cumulus-primitives-parachain-inherent" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "der-parser" +version = "8.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" dependencies = [ - "async-trait", - "cumulus-primitives-core", - "cumulus-relay-chain-interface", - "cumulus-test-relay-sproof-builder", - "parity-scale-codec", - "sc-client-api", - "scale-info", - "sp-api", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-state-machine", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-storage", - "sp-trie", - "tracing", + "asn1-rs", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", ] [[package]] -name = "cumulus-primitives-timestamp" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ - "cumulus-primitives-core", - "futures", - "parity-scale-codec", - "sp-inherents", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-timestamp", + "powerfmt", ] [[package]] -name = "cumulus-relay-chain-inprocess-interface" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "async-trait", - "cumulus-primitives-core", - "cumulus-relay-chain-interface", - "futures", - "futures-timer", - "polkadot-cli", - "polkadot-service", - "sc-cli", - "sc-client-api", - "sc-sysinfo", - "sc-telemetry", - "sc-tracing", - "sp-api", - "sp-consensus", - "sp-core", - "sp-runtime", - "sp-state-machine", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 1.0.109", ] [[package]] -name = "cumulus-relay-chain-interface" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "derive-syn-parse" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd" dependencies = [ - "async-trait", - "cumulus-primitives-core", - "futures", - "jsonrpsee-core 0.16.2", - "parity-scale-codec", - "polkadot-overseer", - "sc-client-api", - "sp-api", - "sp-blockchain", - "sp-state-machine", - "thiserror", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 1.0.109", ] [[package]] -name = "cumulus-relay-chain-minimal-node" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "array-bytes 6.1.0", - "async-trait", - "cumulus-primitives-core", - "cumulus-relay-chain-interface", - "cumulus-relay-chain-rpc-interface", - "futures", - "polkadot-availability-recovery", - "polkadot-collator-protocol", - "polkadot-core-primitives", - "polkadot-network-bridge", - "polkadot-node-collation-generation", - "polkadot-node-core-runtime-api", - "polkadot-node-network-protocol", - "polkadot-node-subsystem-util", - "polkadot-overseer", - "polkadot-primitives", - "sc-authority-discovery", - "sc-network", - "sc-network-common", - "sc-service", - "sc-tracing", - "sc-utils", - "schnellru", - "sp-api", - "sp-consensus", - "sp-consensus-babe", - "sp-runtime", - "tracing", -] - -[[package]] -name = "cumulus-relay-chain-rpc-interface" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "async-trait", - "cumulus-primitives-core", - "cumulus-relay-chain-interface", - "either", - "futures", - "futures-timer", - "jsonrpsee 0.16.2", - "parity-scale-codec", - "pin-project", - "polkadot-overseer", - "rand 0.8.5", - "sc-client-api", - "sc-rpc-api", - "sc-service", - "schnellru", - "serde", - "serde_json", - "smoldot 0.11.0", - "smoldot-light 0.9.0", - "sp-api", - "sp-authority-discovery", - "sp-consensus-babe", - "sp-core", - "sp-runtime", - "sp-state-machine", - "sp-storage", - "thiserror", - "tokio", - "tokio-util", - "tracing", - "url", + "convert_case", + "proc-macro2 1.0.78", + "quote 1.0.35", + "rustc_version", + "syn 1.0.109", ] [[package]] -name = "cumulus-test-relay-sproof-builder" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "cumulus-primitives-core", - "parity-scale-codec", - "polkadot-primitives", - "sp-runtime", - "sp-state-machine", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-trie", -] +name = "difflib" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" [[package]] -name = "curl" -version = "0.4.44" +name = "digest" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "509bd11746c7ac09ebd19f0b17782eae80aadee26237658a6b4808afb5c11a22" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" dependencies = [ - "curl-sys", - "libc", - "openssl-probe", - "openssl-sys", - "schannel", - "socket2 0.4.9", - "winapi", + "generic-array 0.12.4", ] [[package]] -name = "curl-sys" -version = "0.4.63+curl-8.1.2" +name = "digest" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeb0fef7046022a1e2ad67a004978f0e3cacb9e3123dc62ce768f92197b771dc" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "cc", - "libc", - "libnghttp2-sys", - "libz-sys", - "openssl-sys", - "pkg-config", - "vcpkg", - "winapi", + "generic-array 0.14.7", ] [[package]] -name = "curve25519-dalek" -version = "2.1.3" +name = "digest" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "byteorder", - "digest 0.8.1", - "rand_core 0.5.1", - "subtle 2.4.1", - "zeroize", + "block-buffer 0.10.4", + "const-oid", + "crypto-common", + "subtle 2.5.0", ] [[package]] -name = "curve25519-dalek" -version = "3.2.0" +name = "directories-next" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle 2.4.1", - "zeroize", + "cfg-if 1.0.0", + "dirs-sys-next", ] [[package]] -name = "curve25519-dalek" -version = "4.0.0" +name = "dirs-sys-next" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f711ade317dd348950a9910f81c5947e3d8907ebd2b83f76203ff1807e6a2bc2" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "curve25519-dalek-derive", - "digest 0.10.7", - "fiat-crypto", - "platforms", - "rustc_version", - "subtle 2.4.1", - "zeroize", + "libc", + "redox_users", + "winapi", ] [[package]] -name = "curve25519-dalek-derive" -version = "0.1.0" +name = "displaydoc" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] -name = "curve25519-dalek-ng" -version = "4.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" +name = "dleq_vrf" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.6.4", - "subtle-ng", + "ark-ec", + "ark-ff", + "ark-scale", + "ark-secret-scalar", + "ark-serialize", + "ark-std", + "ark-transcript", + "arrayvec 0.7.4", "zeroize", ] [[package]] -name = "cxx" -version = "1.0.101" +name = "docify" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5032837c1384de3708043de9d4e97bb91290faca6c16529a28aa340592a78166" +checksum = "7cc4fd38aaa9fb98ac70794c82a00360d1e165a87fbf96a8a91f9dfc602aaee2" dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", + "docify_macros", ] [[package]] -name = "cxx-build" -version = "1.0.101" +name = "docify_macros" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51368b3d0dbf356e10fcbfd455a038503a105ee556f7ee79b6bb8c53a7247456" +checksum = "63fa215f3a0d40fb2a221b3aa90d8e1fbb8379785a990cb60d62ac71ebdc6460" dependencies = [ - "cc", - "codespan-reporting", + "common-path", + "derive-syn-parse", "once_cell", - "proc-macro2 1.0.69", - "quote 1.0.33", - "scratch", - "syn 2.0.38", + "proc-macro2 1.0.78", + "quote 1.0.35", + "regex", + "syn 2.0.48", + "termcolor", + "toml 0.8.8", + "walkdir", ] [[package]] -name = "cxxbridge-flags" -version = "1.0.101" +name = "downcast" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d9062157072e4aafc8e56ceaf8325ce850c5ae37578c852a0d4de2cecdded13" +checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] -name = "cxxbridge-macro" -version = "1.0.101" +name = "downcast-rs" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf01e8a540f5a4e0f284595834f81cf88572f244b768f051724537afa99a2545" -dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", -] +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] -name = "darling" -version = "0.14.4" +name = "dtoa" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" -dependencies = [ - "darling_core 0.14.4", - "darling_macro 0.14.4", -] +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" [[package]] -name = "darling" -version = "0.20.3" +name = "dyn-clonable" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +checksum = "4e9232f0e607a262ceb9bd5141a3dfb3e4db6994b31989bbfd845878cba59fd4" dependencies = [ - "darling_core 0.20.3", - "darling_macro 0.20.3", + "dyn-clonable-impl", + "dyn-clone", ] [[package]] -name = "darling_core" -version = "0.14.4" +name = "dyn-clonable-impl" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" dependencies = [ - "fnv", - "ident_case", - "proc-macro2 1.0.69", - "quote 1.0.33", - "strsim 0.10.0", + "proc-macro2 1.0.78", + "quote 1.0.35", "syn 1.0.109", ] [[package]] -name = "darling_core" -version = "0.20.3" +name = "dyn-clone" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2 1.0.69", - "quote 1.0.33", - "strsim 0.10.0", - "syn 2.0.38", -] +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] -name = "darling_macro" -version = "0.14.4" +name = "ecdsa" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ - "darling_core 0.14.4", - "quote 1.0.33", - "syn 1.0.109", + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki", ] [[package]] -name = "darling_macro" -version = "0.20.3" +name = "ed25519" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ - "darling_core 0.20.3", - "quote 1.0.33", - "syn 2.0.38", + "pkcs8", + "signature", ] [[package]] -name = "data-encoding" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" - -[[package]] -name = "data-encoding-macro" -version = "0.1.13" +name = "ed25519-dalek" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c904b33cc60130e1aeea4956ab803d08a3f4a0ca82d64ed757afac3891f2bb99" +checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" dependencies = [ - "data-encoding", - "data-encoding-macro-internal", + "curve25519-dalek 4.1.1", + "ed25519", + "rand_core 0.6.4", + "serde", + "sha2 0.10.8", + "subtle 2.5.0", + "zeroize", ] [[package]] -name = "data-encoding-macro-internal" -version = "0.1.11" +name = "ed25519-zebra" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fdf3fce3ce863539ec1d7fd1b6dcc3c645663376b43ed376bbf887733e4f772" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ - "data-encoding", - "syn 1.0.109", + "curve25519-dalek 3.2.0", + "hashbrown 0.12.3", + "hex", + "rand_core 0.6.4", + "sha2 0.9.9", + "zeroize", ] [[package]] -name = "der" -version = "0.6.1" +name = "either" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" -dependencies = [ - "const-oid", - "pem-rfc7468", - "zeroize", -] +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] -name = "der" -version = "0.7.7" +name = "elliptic-curve" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ed52955ce76b1554f509074bb357d3fb8ac9b51288a65a3fd480d1dfba946" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ - "const-oid", + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array 0.14.7", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle 2.5.0", "zeroize", ] [[package]] -name = "der-parser" -version = "7.0.0" +name = "encoding_rs" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe398ac75057914d7d07307bf67dc7f3f574a26783b4fc7805a20ffa9f506e82" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ - "asn1-rs 0.3.1", - "displaydoc", - "nom", - "num-bigint", - "num-traits", - "rusticata-macros", + "cfg-if 1.0.0", ] [[package]] -name = "der-parser" -version = "8.2.0" +name = "enum-as-inner" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" dependencies = [ - "asn1-rs 0.5.2", - "displaydoc", - "nom", - "num-bigint", - "num-traits", - "rusticata-macros", + "heck 0.4.1", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 1.0.109", ] [[package]] -name = "deranged" -version = "0.3.9" +name = "env_filter" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" dependencies = [ - "powerfmt", + "log", + "regex", ] [[package]] -name = "derivative" -version = "2.2.0" +name = "env_logger" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", + "humantime", + "is-terminal", + "log", + "regex", + "termcolor", ] [[package]] -name = "derive-syn-parse" -version = "0.1.5" +name = "env_logger" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd" +checksum = "05e7cf40684ae96ade6232ed84582f40ce0a66efcd43a5117aef610534f8e0b8" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", + "anstream", + "anstyle", + "env_filter", + "humantime", + "log", ] [[package]] -name = "derive_builder" -version = "0.11.2" +name = "environmental" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" + +[[package]] +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "equivocation-detector" +version = "0.1.0" dependencies = [ - "derive_builder_macro", + "async-std", + "async-trait", + "bp-header-chain", + "finality-relay", + "frame-support", + "futures", + "log", + "num-traits", + "relay-utils", ] [[package]] -name = "derive_builder_core" -version = "0.11.2" +name = "errno" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "darling 0.14.4", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", + "libc", + "windows-sys 0.52.0", ] [[package]] -name = "derive_builder_macro" -version = "0.11.2" +name = "ethbloom" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ - "derive_builder_core", - "syn 1.0.109", + "crunchy", + "fixed-hash", + "impl-rlp", + "impl-serde", + "tiny-keccak", ] [[package]] -name = "derive_more" -version = "0.99.17" +name = "ethereum-types" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ - "convert_case", - "proc-macro2 1.0.69", - "quote 1.0.33", - "rustc_version", - "syn 1.0.109", + "ethbloom", + "fixed-hash", + "impl-rlp", + "impl-serde", + "primitive-types", + "uint", ] [[package]] -name = "difflib" -version = "0.4.0" +name = "event-listener" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] -name = "digest" -version = "0.8.1" +name = "event-listener" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" dependencies = [ - "generic-array 0.12.4", + "concurrent-queue", + "parking", + "pin-project-lite 0.2.13", ] [[package]] -name = "digest" -version = "0.9.0" +name = "event-listener" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" dependencies = [ - "generic-array 0.14.7", + "concurrent-queue", + "parking", + "pin-project-lite 0.2.13", ] [[package]] -name = "digest" -version = "0.10.7" +name = "event-listener-strategy" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" dependencies = [ - "block-buffer 0.10.4", - "const-oid", - "crypto-common", - "subtle 2.4.1", + "event-listener 4.0.3", + "pin-project-lite 0.2.13", ] [[package]] -name = "directories" -version = "5.0.1" +name = "expander" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" +checksum = "5f86a749cf851891866c10515ef6c299b5c69661465e9c3bbe7e07a2b77fb0f7" dependencies = [ - "dirs-sys", + "blake2 0.10.6", + "fs-err", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] -name = "directories-next" -version = "2.0.0" +name = "fake-simd" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" -dependencies = [ - "cfg-if 1.0.0", - "dirs-sys-next", -] +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" [[package]] -name = "dirs-sys" -version = "0.4.1" +name = "fallible-iterator" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] -name = "dirs-sys-next" -version = "0.1.2" +name = "fastrand" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ - "libc", - "redox_users", - "winapi", + "instant", ] [[package]] -name = "displaydoc" -version = "0.2.4" +name = "fastrand" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "rand_core 0.6.4", + "subtle 2.5.0", ] [[package]] -name = "dleq_vrf" -version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=4b09416#4b09416fd23383ec436ddac127d58c7b7cd392c6" +name = "fflonk" +version = "0.1.0" +source = "git+https://github.com/w3f/fflonk#1e854f35e9a65d08b11a86291405cdc95baa0a35" dependencies = [ "ark-ec", "ark-ff", - "ark-scale", - "ark-secret-scalar", + "ark-poly", "ark-serialize", "ark-std", - "ark-transcript", - "arrayvec 0.7.4", - "rand_core 0.6.4", - "zeroize", + "merlin 3.0.0", ] [[package]] -name = "docify" -version = "0.2.4" +name = "fiat-crypto" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" + +[[package]] +name = "file-per-thread-logger" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ee528c501ddd15d5181997e9518e59024844eac44fd1e40cb20ddb2a8562fa" +checksum = "84f2e425d9790201ba4af4630191feac6dcc98765b118d4d18e91d23c2353866" dependencies = [ - "docify_macros", + "env_logger 0.10.2", + "log", ] [[package]] -name = "docify_macros" -version = "0.2.4" +name = "finality-grandpa" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca01728ab2679c464242eca99f94e2ce0514b52ac9ad950e2ed03fca991231c" +checksum = "36530797b9bf31cd4ff126dcfee8170f86b00cfdcea3269d73133cc0415945c3" dependencies = [ - "common-path", - "derive-syn-parse", - "once_cell", - "proc-macro2 1.0.69", - "quote 1.0.33", - "regex", - "syn 2.0.38", - "termcolor", - "toml 0.7.6", - "walkdir", + "either", + "futures", + "futures-timer", + "log", + "num-traits", + "parity-scale-codec", + "parking_lot 0.12.1", + "scale-info", ] [[package]] -name = "downcast" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" +name = "finality-relay" +version = "0.1.0" +dependencies = [ + "async-std", + "async-trait", + "backoff", + "bp-header-chain", + "futures", + "log", + "num-traits", + "parking_lot 0.12.1", + "relay-utils", +] [[package]] -name = "downcast-rs" -version = "1.2.0" +name = "fixed-hash" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand", + "rustc-hex", + "static_assertions", +] [[package]] -name = "dtoa" -version = "1.0.9" +name = "fixedbitset" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] -name = "dyn-clonable" -version = "0.9.0" +name = "flate2" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9232f0e607a262ceb9bd5141a3dfb3e4db6994b31989bbfd845878cba59fd4" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ - "dyn-clonable-impl", - "dyn-clone", + "crc32fast", + "libz-sys", + "miniz_oxide", ] [[package]] -name = "dyn-clonable-impl" +name = "float-cmp" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", + "num-traits", ] [[package]] -name = "dyn-clone" -version = "1.0.12" +name = "fnv" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] -name = "ecdsa" -version = "0.14.8" +name = "form_urlencoded" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ - "der 0.6.1", - "elliptic-curve 0.12.3", - "rfc6979 0.3.1", - "signature 1.6.4", + "percent-encoding", ] [[package]] -name = "ecdsa" -version = "0.16.7" +name = "fragile" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" +checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" + +[[package]] +name = "frame-benchmarking" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "der 0.7.7", - "digest 0.10.7", - "elliptic-curve 0.13.5", - "rfc6979 0.4.0", - "signature 2.1.0", - "spki 0.7.2", + "frame-support", + "frame-support-procedural", + "frame-system", + "linregress", + "log", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-runtime", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "static_assertions", ] [[package]] -name = "ed25519" -version = "2.2.2" +name = "frame-metadata" +version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" +checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" dependencies = [ - "pkcs8 0.10.2", - "signature 2.1.0", + "cfg-if 1.0.0", + "parity-scale-codec", + "scale-info", ] [[package]] -name = "ed25519-dalek" -version = "2.0.0" +name = "frame-metadata" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" +checksum = "87cf1549fba25a6fcac22785b61698317d958e96cac72a59102ea45b9ae64692" dependencies = [ - "curve25519-dalek 4.0.0", - "ed25519", - "rand_core 0.6.4", + "cfg-if 1.0.0", + "parity-scale-codec", + "scale-info", "serde", - "sha2 0.10.7", - "zeroize", ] [[package]] -name = "ed25519-zebra" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" +name = "frame-support" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "curve25519-dalek 3.2.0", - "hashbrown 0.12.3", - "hex", - "rand_core 0.6.4", - "sha2 0.9.9", - "zeroize", + "aquamarine", + "array-bytes 6.2.2", + "bitflags 1.3.2", + "docify", + "environmental", + "frame-metadata 16.0.0", + "frame-support-procedural", + "impl-trait-for-tuples", + "k256", + "log", + "macro_magic", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "serde_json", + "smallvec", + "sp-api", + "sp-arithmetic", + "sp-core", + "sp-core-hashing-proc-macro", + "sp-debug-derive 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-metadata-ir", + "sp-runtime", + "sp-staking", + "sp-state-machine", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-tracing 10.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-weights", + "static_assertions", + "tt-call", ] [[package]] -name = "ed25519-zebra" -version = "4.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e83e509bcd060ca4b54b72bde5bb306cb2088cb01e14797ebae90a24f70f5f7" +name = "frame-support-procedural" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "curve25519-dalek 4.0.0", - "ed25519", - "hashbrown 0.14.0", - "hex", - "rand_core 0.6.4", - "sha2 0.10.7", - "zeroize", + "Inflector", + "cfg-expr", + "derive-syn-parse", + "expander", + "frame-support-procedural-tools", + "itertools", + "macro_magic", + "proc-macro-warning", + "proc-macro2 1.0.78", + "quote 1.0.35", + "sp-core-hashing 9.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "syn 2.0.48", ] [[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "elliptic-curve" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" +name = "frame-support-procedural-tools" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "base16ct 0.1.1", - "crypto-bigint 0.4.9", - "der 0.6.1", - "digest 0.10.7", - "ff 0.12.1", - "generic-array 0.14.7", - "group 0.12.1", - "hkdf", - "pem-rfc7468", - "pkcs8 0.9.0", - "rand_core 0.6.4", - "sec1 0.3.0", - "subtle 2.4.1", - "zeroize", + "frame-support-procedural-tools-derive", + "proc-macro-crate 3.1.0", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] -name = "elliptic-curve" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" +name = "frame-support-procedural-tools-derive" +version = "3.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "base16ct 0.2.0", - "crypto-bigint 0.5.2", - "digest 0.10.7", - "ff 0.13.0", - "generic-array 0.14.7", - "group 0.13.0", - "pkcs8 0.10.2", - "rand_core 0.6.4", - "sec1 0.7.3", - "subtle 2.4.1", - "zeroize", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - -[[package]] -name = "encoding_rs" -version = "0.8.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +name = "frame-system" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "cfg-if 1.0.0", + "docify", + "frame-support", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-version", + "sp-weights", ] [[package]] -name = "enum-as-inner" -version = "0.5.1" +name = "fs-err" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" +checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" dependencies = [ - "heck 0.4.1", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", + "autocfg", ] [[package]] -name = "enumflags2" -version = "0.7.7" +name = "funty" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" -dependencies = [ - "enumflags2_derive", -] +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] -name = "enumflags2_derive" -version = "0.7.7" +name = "futures" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", ] [[package]] -name = "enumn" -version = "0.1.12" +name = "futures-channel" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "futures-core", + "futures-sink", ] [[package]] -name = "env_logger" -version = "0.10.0" +name = "futures-core" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" -dependencies = [ - "humantime", - "is-terminal", - "log", - "regex", - "termcolor", -] +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] -name = "environmental" -version = "1.1.4" +name = "futures-executor" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", + "num_cpus", +] [[package]] -name = "equivalent" -version = "1.0.1" +name = "futures-io" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] -name = "equivocation-detector" -version = "0.1.0" +name = "futures-lite" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ - "async-std", - "async-trait", - "bp-header-chain", - "finality-relay", - "frame-support", - "futures", - "log", - "num-traits", - "relay-utils", + "fastrand 1.9.0", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite 0.2.13", + "waker-fn", ] [[package]] -name = "errno" -version = "0.3.1" +name = "futures-lite" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", + "fastrand 2.0.1", + "futures-core", + "futures-io", + "parking", + "pin-project-lite 0.2.13", ] [[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "futures-macro" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ - "cc", - "libc", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] -name = "ethbloom" -version = "0.13.0" +name = "futures-rustls" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" +checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" dependencies = [ - "crunchy", - "fixed-hash 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "impl-rlp", - "impl-serde", - "tiny-keccak", + "futures-io", + "rustls 0.20.9", + "webpki", ] [[package]] -name = "ethereum-types" -version = "0.14.1" +name = "futures-sink" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" -dependencies = [ - "ethbloom", - "fixed-hash 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "impl-rlp", - "impl-serde", - "primitive-types", - "uint", -] +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] -name = "event-listener" -version = "2.5.3" +name = "futures-task" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] -name = "exit-future" -version = "0.2.0" +name = "futures-timer" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" + +[[package]] +name = "futures-util" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ - "futures", + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite 0.2.13", + "pin-utils", + "slab", ] [[package]] -name = "expander" -version = "0.0.4" +name = "fxhash" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a718c0675c555c5f976fff4ea9e2c150fa06cefa201cadef87cfbf9324075881" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" dependencies = [ - "blake3", - "fs-err", - "proc-macro2 1.0.69", - "quote 1.0.33", + "byteorder", ] [[package]] -name = "expander" -version = "2.0.0" +name = "generic-array" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f86a749cf851891866c10515ef6c299b5c69661465e9c3bbe7e07a2b77fb0f7" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" dependencies = [ - "blake2 0.10.6", - "fs-err", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "typenum", ] [[package]] -name = "fake-simd" -version = "0.1.2" +name = "generic-array" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] [[package]] -name = "fallible-iterator" -version = "0.2.0" +name = "getrandom" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] [[package]] -name = "fastrand" -version = "1.9.0" +name = "getrandom" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ - "instant", + "cfg-if 1.0.0", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] -name = "fastrand" -version = "2.0.0" +name = "getrandom_or_panic" +version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" +dependencies = [ + "rand", + "rand_core 0.6.4", +] [[package]] -name = "fatality" -version = "0.0.6" +name = "ghash" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ad875162843b0d046276327afe0136e9ed3a23d5a754210fb6f1f33610d39ab" +checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" dependencies = [ - "fatality-proc-macro", - "thiserror", + "opaque-debug 0.3.0", + "polyval", ] [[package]] -name = "fatality-proc-macro" -version = "0.0.6" +name = "gimli" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5aa1e3ae159e592ad222dc90c5acbad632b527779ba88486abe92782ab268bd" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" dependencies = [ - "expander 0.0.4", + "fallible-iterator", "indexmap 1.9.3", - "proc-macro-crate", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", - "thiserror", + "stable_deref_trait", ] [[package]] -name = "fdlimit" -version = "0.2.1" +name = "gimli" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c4c9e43643f5a3be4ca5b67d26b98031ff9db6806c3440ae32e02e3ceac3f1b" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "globset" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" dependencies = [ - "libc", + "aho-corasick", + "bstr", + "log", + "regex-automata 0.4.4", + "regex-syntax 0.8.2", ] [[package]] -name = "ff" -version = "0.12.1" +name = "gloo-timers" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" dependencies = [ - "rand_core 0.6.4", - "subtle 2.4.1", + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", ] [[package]] -name = "ff" +name = "group" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ + "ff", "rand_core 0.6.4", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] -name = "fflonk" -version = "0.1.0" -source = "git+https://github.com/w3f/fflonk#26a5045b24e169cffc1f9328ca83d71061145c40" +name = "h2" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ - "ark-ec", - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", - "merlin 3.0.0", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 2.2.2", + "slab", + "tokio", + "tokio-util", + "tracing", ] [[package]] -name = "fiat-crypto" -version = "0.1.20" +name = "hash-db" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +checksum = "8e7d7786361d7425ae2fe4f9e407eb0efaa0840f5212d109cc018c40c35c6ab4" [[package]] -name = "file-per-thread-logger" -version = "0.1.6" +name = "hash256-std-hasher" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84f2e425d9790201ba4af4630191feac6dcc98765b118d4d18e91d23c2353866" +checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" dependencies = [ - "env_logger", - "log", + "crunchy", ] [[package]] -name = "filetime" -version = "0.2.21" +name = "hashbrown" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "cfg-if 1.0.0", - "libc", - "redox_syscall 0.2.16", - "windows-sys 0.48.0", + "ahash 0.7.7", ] [[package]] -name = "finality-grandpa" -version = "0.16.2" +name = "hashbrown" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36530797b9bf31cd4ff126dcfee8170f86b00cfdcea3269d73133cc0415945c3" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "either", - "futures", - "futures-timer", - "log", - "num-traits", - "parity-scale-codec", - "parking_lot 0.12.1", - "scale-info", + "ahash 0.8.7", ] [[package]] -name = "finality-relay" -version = "0.1.0" +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "async-std", - "async-trait", - "backoff", - "bp-header-chain", - "futures", - "log", - "num-traits", - "parking_lot 0.12.1", - "relay-utils", + "ahash 0.8.7", + "allocator-api2", + "serde", ] [[package]] -name = "fixed-hash" -version = "0.8.0" +name = "hashlink" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "byteorder", - "rand 0.8.5", - "rustc-hex", - "static_assertions", + "hashbrown 0.14.3", ] [[package]] -name = "fixed-hash" -version = "0.8.0" -source = "git+https://github.com/paritytech/parity-common?branch=master#b4e1516a95c7e7c0bde66d03dbea6f388e7c5fec" +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" dependencies = [ - "byteorder", - "rand 0.8.5", - "rustc-hex", - "static_assertions", + "unicode-segmentation", ] [[package]] -name = "fixedbitset" -version = "0.4.2" +name = "heck" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] -name = "flate2" -version = "1.0.26" +name = "hermit-abi" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ - "crc32fast", - "libz-sys", - "miniz_oxide", + "libc", ] [[package]] -name = "float-cmp" -version = "0.9.0" +name = "hermit-abi" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" -dependencies = [ - "num-traits", -] +checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" [[package]] -name = "fnv" -version = "1.0.7" +name = "hex" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] -name = "fork-tree" -version = "3.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "parity-scale-codec", -] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] -name = "form_urlencoded" -version = "1.2.0" +name = "hkdf" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ - "percent-encoding", + "hmac 0.12.1", ] [[package]] -name = "fragile" -version = "2.0.0" +name = "hmac" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac 0.8.0", + "digest 0.9.0", +] [[package]] -name = "frame-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "hmac" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" dependencies = [ - "frame-support", - "frame-support-procedural", - "frame-system", - "linregress", - "log", - "parity-scale-codec", - "paste", - "scale-info", - "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", - "sp-runtime-interface", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-storage", - "static_assertions", + "crypto-mac 0.11.0", + "digest 0.9.0", ] [[package]] -name = "frame-benchmarking-cli" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "Inflector", - "array-bytes 6.1.0", - "chrono", - "clap 4.4.7", - "comfy-table", - "frame-benchmarking", - "frame-support", - "frame-system", - "gethostname", - "handlebars", - "itertools 0.10.5", - "lazy_static", - "linked-hash-map", - "log", - "parity-scale-codec", - "rand 0.8.5", - "rand_pcg", - "sc-block-builder", - "sc-cli", - "sc-client-api", - "sc-client-db", - "sc-executor", - "sc-service", - "sc-sysinfo", - "serde", - "serde_json", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-database", - "sp-externalities", - "sp-inherents", - "sp-io", - "sp-keystore", - "sp-runtime", - "sp-state-machine", - "sp-storage", - "sp-trie", - "sp-wasm-interface", - "thiserror", - "thousands", + "digest 0.10.7", ] [[package]] -name = "frame-election-provider-solution-type" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ - "proc-macro-crate", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "digest 0.9.0", + "generic-array 0.14.7", + "hmac 0.8.1", ] [[package]] -name = "frame-election-provider-support" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "frame-election-provider-solution-type", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-arithmetic", - "sp-core", - "sp-npos-elections", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "windows-sys 0.52.0", ] [[package]] -name = "frame-executive" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "hostname" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" dependencies = [ - "frame-support", - "frame-system", - "frame-try-runtime", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-tracing", + "libc", + "match_cfg", + "winapi", ] [[package]] -name = "frame-metadata" -version = "15.1.0" +name = "http" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ - "cfg-if 1.0.0", - "parity-scale-codec", - "scale-info", + "bytes", + "fnv", + "itoa", ] [[package]] -name = "frame-metadata" -version = "16.0.0" +name = "http-body" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cf1549fba25a6fcac22785b61698317d958e96cac72a59102ea45b9ae64692" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ - "cfg-if 1.0.0", - "parity-scale-codec", - "scale-info", - "serde", + "bytes", + "http", + "pin-project-lite 0.2.13", ] [[package]] -name = "frame-remote-externalities" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hyper" +version = "0.14.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ - "futures", - "indicatif", - "jsonrpsee 0.16.2", - "log", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-state-machine", - "spinners", - "substrate-rpc-client", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite 0.2.13", + "socket2 0.5.5", "tokio", - "tokio-retry", + "tower-service", + "tracing", + "want", ] [[package]] -name = "frame-support" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ - "aquamarine", - "bitflags 1.3.2", - "docify", - "environmental", - "frame-metadata 16.0.0", - "frame-support-procedural", - "impl-trait-for-tuples", - "k256", + "futures-util", + "http", + "hyper", "log", - "macro_magic", - "parity-scale-codec", - "paste", - "scale-info", - "serde", - "serde_json", - "smallvec", - "sp-api", - "sp-arithmetic", - "sp-core", - "sp-core-hashing-proc-macro", - "sp-debug-derive", - "sp-genesis-builder", - "sp-inherents", - "sp-io", - "sp-metadata-ir", - "sp-runtime", - "sp-staking", - "sp-state-machine", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-tracing", - "sp-weights", - "static_assertions", - "tt-call", + "rustls 0.21.10", + "rustls-native-certs", + "tokio", + "tokio-rustls", ] [[package]] -name = "frame-support-procedural" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "iana-time-zone" +version = "0.1.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" dependencies = [ - "Inflector", - "cfg-expr", - "derive-syn-parse", - "expander 2.0.0", - "frame-support-procedural-tools", - "itertools 0.10.5", - "macro_magic", - "proc-macro-warning", - "proc-macro2 1.0.69", - "quote 1.0.33", - "sp-core-hashing 9.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "syn 2.0.38", + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core 0.52.0", ] [[package]] -name = "frame-support-procedural-tools" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "frame-support-procedural-tools-derive", - "proc-macro-crate", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "cc", ] [[package]] -name = "frame-support-procedural-tools-derive" -version = "3.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "matches", + "unicode-bidi", + "unicode-normalization", ] [[package]] -name = "frame-system" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ - "cfg-if 1.0.0", - "frame-support", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-version", - "sp-weights", + "unicode-bidi", + "unicode-normalization", ] [[package]] -name = "frame-system-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "if-addrs" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cabb0019d51a643781ff15c9c8a3e5dedc365c47211270f4e8f82812fedd8f0a" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "libc", + "windows-sys 0.48.0", ] [[package]] -name = "frame-system-rpc-runtime-api" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "if-watch" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" dependencies = [ - "parity-scale-codec", - "sp-api", + "async-io 2.3.0", + "core-foundation", + "fnv", + "futures", + "if-addrs", + "ipnet", + "log", + "rtnetlink", + "system-configuration", + "tokio", + "windows 0.51.1", ] [[package]] -name = "frame-try-runtime" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "frame-support", "parity-scale-codec", - "sp-api", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] [[package]] -name = "fs-err" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541" - -[[package]] -name = "fs2" -version = "0.4.3" +name = "impl-rlp" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" dependencies = [ - "libc", - "winapi", + "rlp", ] [[package]] -name = "fs4" -version = "0.6.6" +name = "impl-serde" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" dependencies = [ - "rustix 0.38.21", - "windows-sys 0.48.0", + "serde", ] [[package]] -name = "funty" -version = "2.0.0" +name = "impl-trait-for-tuples" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 1.0.109", +] [[package]] -name = "futures" -version = "0.3.29" +name = "include_dir" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", + "include_dir_macros", ] [[package]] -name = "futures-channel" -version = "0.3.29" +name = "include_dir_macros" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" dependencies = [ - "futures-core", - "futures-sink", + "proc-macro2 1.0.78", + "quote 1.0.35", ] [[package]] -name = "futures-core" -version = "0.3.29" +name = "indexmap" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] [[package]] -name = "futures-executor" -version = "0.3.29" +name = "indexmap" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" dependencies = [ - "futures-core", - "futures-task", - "futures-util", - "num_cpus", + "equivalent", + "hashbrown 0.14.3", ] [[package]] -name = "futures-io" -version = "0.3.29" +name = "indexmap-nostd" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" [[package]] -name = "futures-lite" -version = "1.13.0" +name = "inout" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite 0.2.12", - "waker-fn", + "generic-array 0.14.7", ] [[package]] -name = "futures-macro" -version = "0.3.29" +name = "instant" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "cfg-if 1.0.0", ] [[package]] -name = "futures-rustls" -version = "0.22.2" +name = "integer-sqrt" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" +checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770" dependencies = [ - "futures-io", - "rustls 0.20.8", - "webpki 0.22.2", + "num-traits", ] [[package]] -name = "futures-sink" -version = "0.3.29" +name = "intx" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "f6f38a50a899dc47a6d0ed5508e7f601a2e34c3a85303514b5d137f3c10a0c75" [[package]] -name = "futures-task" -version = "0.3.29" +name = "io-lifetimes" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +dependencies = [ + "hermit-abi 0.3.4", + "libc", + "windows-sys 0.48.0", +] [[package]] -name = "futures-timer" -version = "3.0.2" +name = "ip_network" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +checksum = "aa2f047c0a98b2f299aa5d6d7088443570faae494e9ae1305e48be000c9e0eb1" [[package]] -name = "futures-util" -version = "0.3.29" +name = "ipconfig" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite 0.2.12", - "pin-utils", - "slab", + "socket2 0.5.5", + "widestring", + "windows-sys 0.48.0", + "winreg", ] [[package]] -name = "fxhash" -version = "0.2.1" +name = "ipnet" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] -name = "generic-array" -version = "0.12.4" +name = "is-terminal" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" dependencies = [ - "typenum", + "hermit-abi 0.3.4", + "rustix 0.38.30", + "windows-sys 0.52.0", ] [[package]] -name = "generic-array" -version = "0.14.7" +name = "isahc" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +checksum = "334e04b4d781f436dc315cb1e7515bd96826426345d498149e4bde36b67f8ee9" dependencies = [ - "typenum", - "version_check", - "zeroize", + "async-channel 1.9.0", + "castaway", + "crossbeam-utils", + "curl", + "curl-sys", + "encoding_rs", + "event-listener 2.5.3", + "futures-lite 1.13.0", + "http", + "log", + "mime", + "once_cell", + "polling 2.8.0", + "slab", + "sluice", + "tracing", + "tracing-futures", + "url", + "waker-fn", ] [[package]] -name = "gethostname" -version = "0.2.3" +name = "itertools" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ - "libc", - "winapi", + "either", ] [[package]] -name = "getrandom" -version = "0.1.16" +name = "itoa" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] -name = "getrandom" -version = "0.2.10" +name = "jobserver" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" dependencies = [ - "cfg-if 1.0.0", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] -name = "ghash" -version = "0.4.4" +name = "js-sys" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" +checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" dependencies = [ - "opaque-debug 0.3.0", - "polyval 0.5.3", + "wasm-bindgen", ] [[package]] -name = "ghash" -version = "0.5.0" +name = "jsonpath_lib" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +checksum = "eaa63191d68230cccb81c5aa23abd53ed64d83337cacbb25a7b8c7979523774f" dependencies = [ - "opaque-debug 0.3.0", - "polyval 0.6.1", + "log", + "serde", + "serde_json", ] [[package]] -name = "gimli" -version = "0.27.3" +name = "jsonrpsee" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" dependencies = [ - "fallible-iterator", - "indexmap 1.9.3", - "stable_deref_trait", + "jsonrpsee-core 0.16.3", + "jsonrpsee-proc-macros 0.16.3", + "jsonrpsee-server", + "jsonrpsee-types 0.16.3", + "tracing", ] [[package]] -name = "glob" -version = "0.3.1" +name = "jsonrpsee" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "8b971ce0f6cd1521ede485afc564b95b2c8e7079b9da41d4273bd9b55140a55d" +dependencies = [ + "jsonrpsee-core 0.17.1", + "jsonrpsee-proc-macros 0.17.1", + "jsonrpsee-types 0.17.1", + "jsonrpsee-ws-client", + "tracing", +] [[package]] -name = "globset" -version = "0.4.11" +name = "jsonrpsee" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1391ab1f92ffcc08911957149833e682aa3fe252b9f45f966d2ef972274c97df" +checksum = "affdc52f7596ccb2d7645231fc6163bb314630c989b64998f3699a28b4d5d4dc" dependencies = [ - "aho-corasick", - "bstr", - "fnv", - "log", - "regex", + "jsonrpsee-client-transport 0.20.3", + "jsonrpsee-core 0.20.3", + "jsonrpsee-http-client", + "jsonrpsee-types 0.20.3", ] [[package]] -name = "gloo-timers" -version = "0.2.6" +name = "jsonrpsee-client-transport" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +checksum = "7ca00d975eda834826b04ad57d4e690c67439bb51b02eb0f8b7e4c30fcef8ab9" dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", + "futures-util", + "http", + "jsonrpsee-core 0.17.1", + "pin-project", + "rustls-native-certs", + "soketto", + "thiserror", + "tokio", + "tokio-rustls", + "tokio-util", + "tracing", ] [[package]] -name = "group" -version = "0.12.1" +name = "jsonrpsee-client-transport" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +checksum = "b5b005c793122d03217da09af68ba9383363caa950b90d3436106df8cabce935" dependencies = [ - "ff 0.12.1", - "rand_core 0.6.4", - "subtle 2.4.1", + "futures-util", + "http", + "jsonrpsee-core 0.20.3", + "pin-project", + "rustls-native-certs", + "soketto", + "thiserror", + "tokio", + "tokio-rustls", + "tokio-util", + "tracing", + "url", ] [[package]] -name = "group" -version = "0.13.0" +name = "jsonrpsee-core" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" dependencies = [ - "ff 0.13.0", - "rand_core 0.6.4", - "subtle 2.4.1", + "anyhow", + "arrayvec 0.7.4", + "async-trait", + "beef", + "futures-channel", + "futures-util", + "globset", + "hyper", + "jsonrpsee-types 0.16.3", + "parking_lot 0.12.1", + "rand", + "rustc-hash", + "serde", + "serde_json", + "soketto", + "thiserror", + "tokio", + "tracing", ] [[package]] -name = "h2" -version = "0.3.20" +name = "jsonrpsee-core" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "b83cca7a5a7899eed8b2935d5f755c8c4052ad66ab5b328bd34ac2b3ffd3515f" dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", + "anyhow", + "async-lock 2.8.0", + "async-trait", + "beef", + "futures-timer", "futures-util", - "http", - "indexmap 1.9.3", - "slab", + "jsonrpsee-types 0.17.1", + "rustc-hash", + "serde", + "serde_json", + "thiserror", "tokio", - "tokio-util", + "tokio-stream", "tracing", ] [[package]] -name = "handlebars" -version = "4.3.7" +name = "jsonrpsee-core" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d" +checksum = "da2327ba8df2fdbd5e897e2b5ed25ce7f299d345b9736b6828814c3dbd1fd47b" dependencies = [ - "log", - "pest", - "pest_derive", + "anyhow", + "async-lock 2.8.0", + "async-trait", + "beef", + "futures-timer", + "futures-util", + "hyper", + "jsonrpsee-types 0.20.3", + "rustc-hash", "serde", "serde_json", "thiserror", + "tokio", + "tracing", ] [[package]] -name = "hash-db" -version = "0.16.0" +name = "jsonrpsee-http-client" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e7d7786361d7425ae2fe4f9e407eb0efaa0840f5212d109cc018c40c35c6ab4" +checksum = "5f80c17f62c7653ce767e3d7288b793dfec920f97067ceb189ebdd3570f2bc20" +dependencies = [ + "async-trait", + "hyper", + "hyper-rustls", + "jsonrpsee-core 0.20.3", + "jsonrpsee-types 0.20.3", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "tracing", + "url", +] [[package]] -name = "hash256-std-hasher" -version = "0.15.2" +name = "jsonrpsee-proc-macros" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" +checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" dependencies = [ - "crunchy", + "heck 0.4.1", + "proc-macro-crate 1.1.3", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 1.0.109", ] [[package]] -name = "hashbrown" -version = "0.12.3" +name = "jsonrpsee-proc-macros" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "d814a21d9a819f8de1a41b819a263ffd68e4bb5f043d936db1c49b54684bde0a" dependencies = [ - "ahash 0.7.6", + "heck 0.4.1", + "proc-macro-crate 1.1.3", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 1.0.109", ] [[package]] -name = "hashbrown" -version = "0.13.2" +name = "jsonrpsee-server" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +checksum = "cf4d945a6008c9b03db3354fb3c83ee02d2faa9f2e755ec1dfb69c3551b8f4ba" dependencies = [ - "ahash 0.8.3", + "futures-channel", + "futures-util", + "http", + "hyper", + "jsonrpsee-core 0.16.3", + "jsonrpsee-types 0.16.3", + "serde", + "serde_json", + "soketto", + "tokio", + "tokio-stream", + "tokio-util", + "tower", + "tracing", ] [[package]] -name = "hashbrown" -version = "0.14.0" +name = "jsonrpsee-types" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "245ba8e5aa633dd1c1e4fae72bce06e71f42d34c14a2767c6b4d173b57bee5e5" dependencies = [ - "ahash 0.8.3", - "allocator-api2", + "anyhow", + "beef", "serde", + "serde_json", + "thiserror", + "tracing", ] [[package]] -name = "hashlink" -version = "0.8.4" +name = "jsonrpsee-types" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +checksum = "dd301ccc3e08718393432d1961539d78c4580dcca86014dfe6769c308b2c08b2" dependencies = [ - "hashbrown 0.14.0", + "anyhow", + "beef", + "serde", + "serde_json", + "thiserror", + "tracing", ] [[package]] -name = "heck" -version = "0.3.3" +name = "jsonrpsee-types" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +checksum = "5be0be325642e850ed0bdff426674d2e66b2b7117c9be23a7caef68a2902b7d9" dependencies = [ - "unicode-segmentation", + "anyhow", + "beef", + "serde", + "serde_json", + "thiserror", + "tracing", ] [[package]] -name = "heck" -version = "0.4.1" +name = "jsonrpsee-ws-client" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "89a69852133d549b07cb37ff2d0ec540eae0d20abb75ae923f5d39bc7536d987" +dependencies = [ + "http", + "jsonrpsee-client-transport 0.17.1", + "jsonrpsee-core 0.17.1", + "jsonrpsee-types 0.17.1", +] [[package]] -name = "hermit-abi" -version = "0.1.19" +name = "k256" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ - "libc", + "cfg-if 1.0.0", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2 0.10.8", ] [[package]] -name = "hermit-abi" -version = "0.3.2" +name = "keccak" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] [[package]] -name = "hex" -version = "0.4.3" +name = "keystream" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" [[package]] -name = "hex-literal" -version = "0.4.1" +name = "kv-log-macro" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" +checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" +dependencies = [ + "log", +] [[package]] -name = "hkdf" -version = "0.12.3" +name = "kvdb" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +checksum = "e7d770dcb02bf6835887c3a979b5107a04ff4bbde97a5f0928d27404a155add9" dependencies = [ - "hmac 0.12.1", + "smallvec", ] [[package]] -name = "hmac" -version = "0.8.1" +name = "lazy_static" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" -dependencies = [ - "crypto-mac 0.8.0", - "digest 0.9.0", -] +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] -name = "hmac" -version = "0.11.0" +name = "libc" +version = "0.2.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" -dependencies = [ - "crypto-mac 0.11.1", - "digest 0.9.0", -] +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" [[package]] -name = "hmac" -version = "0.12.1" +name = "libm" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.7", -] +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] -name = "hmac-drbg" -version = "0.3.0" +name = "libnghttp2-sys" +version = "0.1.9+1.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +checksum = "b57e858af2798e167e709b9d969325b6d8e9d50232fcbc494d7d54f976854a64" dependencies = [ - "digest 0.9.0", - "generic-array 0.14.7", - "hmac 0.8.1", + "cc", + "libc", ] [[package]] -name = "honggfuzz" -version = "0.5.55" +name = "libp2p" +version = "0.51.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "848e9c511092e0daa0a35a63e8e6e475a3e8f870741448b9f6028d69b142f18e" +checksum = "f35eae38201a993ece6bdc823292d6abd1bffed1c4d0f4a3517d2bd8e1d917fe" dependencies = [ - "arbitrary", - "lazy_static", - "memmap2", - "rustc_version", + "bytes", + "futures", + "futures-timer", + "getrandom 0.2.12", + "instant", + "libp2p-allow-block-list", + "libp2p-connection-limits", + "libp2p-core", + "libp2p-dns", + "libp2p-identify", + "libp2p-identity", + "libp2p-kad", + "libp2p-mdns", + "libp2p-metrics", + "libp2p-noise", + "libp2p-ping", + "libp2p-quic", + "libp2p-request-response", + "libp2p-swarm", + "libp2p-tcp", + "libp2p-wasm-ext", + "libp2p-websocket", + "libp2p-yamux", + "multiaddr", + "pin-project", ] [[package]] -name = "hostname" -version = "0.3.1" +name = "libp2p-allow-block-list" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" +checksum = "510daa05efbc25184458db837f6f9a5143888f1caa742426d92e1833ddd38a50" dependencies = [ - "libc", - "match_cfg", - "winapi", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "void", ] [[package]] -name = "http" -version = "0.2.9" +name = "libp2p-connection-limits" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "4caa33f1d26ed664c4fe2cca81a08c8e07d4c1c04f2f4ac7655c2dd85467fda0" dependencies = [ - "bytes", - "fnv", - "itoa", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "void", ] [[package]] -name = "http-body" -version = "0.4.5" +name = "libp2p-core" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "3c1df63c0b582aa434fb09b2d86897fa2b419ffeccf934b36f87fcedc8e835c2" dependencies = [ - "bytes", - "http", - "pin-project-lite 0.2.12", + "either", + "fnv", + "futures", + "futures-timer", + "instant", + "libp2p-identity", + "log", + "multiaddr", + "multihash", + "multistream-select", + "once_cell", + "parking_lot 0.12.1", + "pin-project", + "quick-protobuf", + "rand", + "rw-stream-sink", + "smallvec", + "thiserror", + "unsigned-varint", + "void", ] [[package]] -name = "http-range-header" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" - -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.2" +name = "libp2p-dns" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554" +dependencies = [ + "futures", + "libp2p-core", + "log", + "parking_lot 0.12.1", + "smallvec", + "trust-dns-resolver", +] [[package]] -name = "humantime" -version = "2.1.0" +name = "libp2p-identify" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +checksum = "5455f472243e63b9c497ff320ded0314254a9eb751799a39c283c6f20b793f3c" +dependencies = [ + "asynchronous-codec", + "either", + "futures", + "futures-timer", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "log", + "lru 0.10.1", + "quick-protobuf", + "quick-protobuf-codec", + "smallvec", + "thiserror", + "void", +] [[package]] -name = "hyper" -version = "0.14.27" +name = "libp2p-identity" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite 0.2.12", - "socket2 0.4.9", - "tokio", - "tower-service", - "tracing", - "want", + "bs58 0.4.0", + "ed25519-dalek", + "log", + "multiaddr", + "multihash", + "quick-protobuf", + "rand", + "sha2 0.10.8", + "thiserror", + "zeroize", ] [[package]] -name = "hyper-rustls" -version = "0.23.2" +name = "libp2p-kad" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" +checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff" dependencies = [ - "http", - "hyper", + "arrayvec 0.7.4", + "asynchronous-codec", + "bytes", + "either", + "fnv", + "futures", + "futures-timer", + "instant", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", "log", - "rustls 0.20.8", - "rustls-native-certs", - "tokio", - "tokio-rustls 0.23.4", - "webpki-roots", + "quick-protobuf", + "rand", + "sha2 0.10.8", + "smallvec", + "thiserror", + "uint", + "unsigned-varint", + "void", ] [[package]] -name = "hyper-rustls" -version = "0.24.1" +name = "libp2p-mdns" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +checksum = "19983e1f949f979a928f2c603de1cf180cc0dc23e4ac93a62651ccb18341460b" dependencies = [ - "futures-util", - "http", - "hyper", + "data-encoding", + "futures", + "if-watch", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", "log", - "rustls 0.21.5", - "rustls-native-certs", + "rand", + "smallvec", + "socket2 0.4.10", "tokio", - "tokio-rustls 0.24.1", + "trust-dns-proto", + "void", ] [[package]] -name = "iana-time-zone" -version = "0.1.57" +name = "libp2p-metrics" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "a42ec91e227d7d0dafa4ce88b333cdf5f277253873ab087555c92798db2ddd46" dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows 0.48.0", + "libp2p-core", + "libp2p-identify", + "libp2p-kad", + "libp2p-ping", + "libp2p-swarm", + "prometheus-client", ] [[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" +name = "libp2p-noise" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +checksum = "9c3673da89d29936bc6435bafc638e2f184180d554ce844db65915113f86ec5e" dependencies = [ - "cc", + "bytes", + "curve25519-dalek 3.2.0", + "futures", + "libp2p-core", + "libp2p-identity", + "log", + "once_cell", + "quick-protobuf", + "rand", + "sha2 0.10.8", + "snow", + "static_assertions", + "thiserror", + "x25519-dalek 1.1.1", + "zeroize", ] [[package]] -name = "ident_case" -version = "1.0.1" +name = "libp2p-ping" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "3e57759c19c28a73ef1eb3585ca410cefb72c1a709fcf6de1612a378e4219202" dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", + "either", + "futures", + "futures-timer", + "instant", + "libp2p-core", + "libp2p-swarm", + "log", + "rand", + "void", ] [[package]] -name = "idna" -version = "0.4.0" +name = "libp2p-quic" +version = "0.7.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "c6b26abd81cd2398382a1edfe739b539775be8a90fa6914f39b2ab49571ec735" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "bytes", + "futures", + "futures-timer", + "if-watch", + "libp2p-core", + "libp2p-identity", + "libp2p-tls", + "log", + "parking_lot 0.12.1", + "quinn-proto", + "rand", + "rustls 0.20.9", + "thiserror", + "tokio", ] [[package]] -name = "if-addrs" -version = "0.7.0" +name = "libp2p-request-response" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc0fa01ffc752e9dbc72818cdb072cd028b86be5e09dd04c5a643704fe101a9" +checksum = "7ffdb374267d42dc5ed5bc53f6e601d4a64ac5964779c6e40bb9e4f14c1e30d5" dependencies = [ - "libc", - "winapi", + "async-trait", + "futures", + "instant", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "rand", + "smallvec", ] [[package]] -name = "if-watch" -version = "3.0.1" +name = "libp2p-swarm" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9465340214b296cd17a0009acdb890d6160010b8adf8f78a00d0d7ab270f79f" +checksum = "903b3d592d7694e56204d211f29d31bc004be99386644ba8731fc3e3ef27b296" dependencies = [ - "async-io", - "core-foundation", + "either", "fnv", "futures", - "if-addrs", - "ipnet", + "futures-timer", + "instant", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm-derive", "log", - "rtnetlink", - "system-configuration", + "rand", + "smallvec", "tokio", - "windows 0.34.0", + "void", ] [[package]] -name = "impl-codec" -version = "0.6.0" +name = "libp2p-swarm-derive" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +checksum = "0fba456131824ab6acd4c7bf61e9c0f0a3014b5fc9868ccb8e10d344594cdc4f" dependencies = [ - "parity-scale-codec", + "heck 0.4.1", + "quote 1.0.35", + "syn 1.0.109", ] [[package]] -name = "impl-rlp" -version = "0.3.0" +name = "libp2p-tcp" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +checksum = "33d33698596d7722d85d3ab0c86c2c322254fce1241e91208e3679b4eb3026cf" dependencies = [ - "rlp", + "futures", + "futures-timer", + "if-watch", + "libc", + "libp2p-core", + "log", + "socket2 0.4.10", + "tokio", ] [[package]] -name = "impl-serde" -version = "0.4.0" +name = "libp2p-tls" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" dependencies = [ - "serde", + "futures", + "futures-rustls", + "libp2p-core", + "libp2p-identity", + "rcgen", + "ring 0.16.20", + "rustls 0.20.9", + "thiserror", + "webpki", + "x509-parser", + "yasna", ] [[package]] -name = "impl-trait-for-tuples" -version = "0.2.2" +name = "libp2p-wasm-ext" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +checksum = "77dff9d32353a5887adb86c8afc1de1a94d9e8c3bc6df8b2201d7cdf5c848f43" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", + "futures", + "js-sys", + "libp2p-core", + "parity-send-wrapper", + "wasm-bindgen", + "wasm-bindgen-futures", ] [[package]] -name = "include_dir" -version = "0.7.3" +name = "libp2p-websocket" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +checksum = "111273f7b3d3510524c752e8b7a5314b7f7a1fee7e68161c01a7d72cbb06db9f" dependencies = [ - "include_dir_macros", + "either", + "futures", + "futures-rustls", + "libp2p-core", + "log", + "parking_lot 0.12.1", + "quicksink", + "rw-stream-sink", + "soketto", + "url", + "webpki-roots", ] [[package]] -name = "include_dir_macros" -version = "0.7.3" +name = "libp2p-yamux" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" +checksum = "4dcd21d950662700a385d4c6d68e2f5f54d778e97068cdd718522222ef513bda" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", + "futures", + "libp2p-core", + "log", + "thiserror", + "yamux", ] [[package]] -name = "indexmap" -version = "1.9.3" +name = "libredox" +version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", + "bitflags 2.4.2", + "libc", + "redox_syscall 0.4.1", ] [[package]] -name = "indexmap" -version = "2.0.0" +name = "libsecp256k1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" dependencies = [ - "equivalent", - "hashbrown 0.14.0", + "arrayref", + "base64 0.13.1", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand", + "serde", + "sha2 0.9.9", + "typenum", ] [[package]] -name = "indexmap-nostd" -version = "0.4.0" +name = "libsecp256k1-core" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" +checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle 2.5.0", +] [[package]] -name = "indicatif" -version = "0.17.5" +name = "libsecp256k1-gen-ecmult" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff8cc23a7393a397ed1d7f56e6365cba772aba9f9912ab968b03043c395d057" +checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" dependencies = [ - "console", - "instant", - "number_prefix", - "portable-atomic", - "unicode-width", + "libsecp256k1-core", ] [[package]] -name = "inout" -version = "0.1.3" +name = "libsecp256k1-gen-genmult" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" dependencies = [ - "generic-array 0.14.7", + "libsecp256k1-core", ] [[package]] -name = "instant" -version = "0.1.12" +name = "libz-sys" +version = "1.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "295c17e837573c8c821dbaeb3cceb3d745ad082f7572191409e69cbc1b3fd050" dependencies = [ - "cfg-if 1.0.0", + "cc", + "libc", + "pkg-config", + "vcpkg", ] [[package]] -name = "integer-encoding" -version = "3.0.4" +name = "linked-hash-map" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] -name = "integer-sqrt" -version = "0.1.5" +name = "linked_hash_set" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770" +checksum = "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588" dependencies = [ - "num-traits", + "linked-hash-map", ] [[package]] -name = "interceptor" -version = "0.8.2" +name = "linregress" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e8a11ae2da61704edada656798b61c94b35ecac2c58eb955156987d5e6be90b" +checksum = "4de04dcecc58d366391f9920245b85ffa684558a5ef6e7736e754347c3aea9c2" dependencies = [ - "async-trait", - "bytes", - "log", - "rand 0.8.5", - "rtcp", - "rtp", - "thiserror", - "tokio", - "waitgroup", - "webrtc-srtp", - "webrtc-util", + "nalgebra", ] [[package]] -name = "intx" -version = "0.1.0" +name = "linux-raw-sys" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f38a50a899dc47a6d0ed5508e7f601a2e34c3a85303514b5d137f3c10a0c75" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] -name = "io-lifetimes" -version = "1.0.11" +name = "linux-raw-sys" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.2", - "libc", - "windows-sys 0.48.0", -] +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] -name = "ip_network" -version = "0.4.1" +name = "linux-raw-sys" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2f047c0a98b2f299aa5d6d7088443570faae494e9ae1305e48be000c9e0eb1" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] -name = "ipconfig" -version = "0.3.2" +name = "lioness" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" +checksum = "4ae926706ba42c425c9457121178330d75e273df2e82e28b758faf3de3a9acb9" dependencies = [ - "socket2 0.5.3", - "widestring", - "windows-sys 0.48.0", - "winreg", + "arrayref", + "blake2 0.8.1", + "chacha", + "keystream", ] [[package]] -name = "ipnet" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" - -[[package]] -name = "is-terminal" -version = "0.4.9" +name = "lock_api" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ - "hermit-abi 0.3.2", - "rustix 0.38.21", - "windows-sys 0.48.0", + "autocfg", + "scopeguard", ] [[package]] -name = "is_executable" -version = "1.0.1" +name = "log" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa9acdc6d67b75e626ad644734e8bc6df893d9cd2a834129065d3dd6158ea9c8" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" dependencies = [ - "winapi", + "value-bag", ] [[package]] -name = "isahc" -version = "1.7.2" +name = "lru" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "334e04b4d781f436dc315cb1e7515bd96826426345d498149e4bde36b67f8ee9" +checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" dependencies = [ - "async-channel", - "castaway", - "crossbeam-utils", - "curl", - "curl-sys", - "encoding_rs", - "event-listener", - "futures-lite", - "http", - "log", - "mime", - "once_cell", - "polling", - "slab", - "sluice", - "tracing", - "tracing-futures", - "url", - "waker-fn", + "hashbrown 0.12.3", ] [[package]] -name = "itertools" -version = "0.10.5" +name = "lru" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" dependencies = [ - "either", + "hashbrown 0.13.2", ] [[package]] -name = "itertools" -version = "0.11.0" +name = "lru-cache" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" dependencies = [ - "either", + "linked-hash-map", ] [[package]] -name = "itoa" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" - -[[package]] -name = "jobserver" -version = "0.1.26" +name = "mach" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" dependencies = [ "libc", ] [[package]] -name = "js-sys" -version = "0.3.64" +name = "macro_magic" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "e03844fc635e92f3a0067e25fa4bf3e3dbf3f2927bf3aa01bb7bc8f1c428949d" dependencies = [ - "wasm-bindgen", + "macro_magic_core", + "macro_magic_macros", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] -name = "jsonpath_lib" -version = "0.3.0" +name = "macro_magic_core" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaa63191d68230cccb81c5aa23abd53ed64d83337cacbb25a7b8c7979523774f" +checksum = "468155613a44cfd825f1fb0ffa532b018253920d404e6fca1e8d43155198a46d" dependencies = [ - "log", - "serde", - "serde_json", + "const-random", + "derive-syn-parse", + "macro_magic_core_macros", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] -name = "jsonrpsee" -version = "0.16.2" +name = "macro_magic_core_macros" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d291e3a5818a2384645fd9756362e6d89cf0541b0b916fa7702ea4a9833608e" +checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" dependencies = [ - "jsonrpsee-core 0.16.2", - "jsonrpsee-http-client 0.16.2", - "jsonrpsee-proc-macros 0.16.2", - "jsonrpsee-server", - "jsonrpsee-types 0.16.2", - "jsonrpsee-ws-client 0.16.2", - "tracing", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] -name = "jsonrpsee" -version = "0.17.1" +name = "macro_magic_macros" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b971ce0f6cd1521ede485afc564b95b2c8e7079b9da41d4273bd9b55140a55d" +checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" dependencies = [ - "jsonrpsee-core 0.17.1", - "jsonrpsee-proc-macros 0.17.1", - "jsonrpsee-types 0.17.1", - "jsonrpsee-ws-client 0.17.1", - "tracing", + "macro_magic_core", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] -name = "jsonrpsee" -version = "0.20.1" +name = "match_cfg" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ad9b31183a8bcbe843e32ca8554ad2936633548d95a7bb6a8e14c767dea6b05" -dependencies = [ - "jsonrpsee-client-transport 0.20.1", - "jsonrpsee-core 0.20.1", - "jsonrpsee-http-client 0.20.1", - "jsonrpsee-types 0.20.1", -] +checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" [[package]] -name = "jsonrpsee-client-transport" -version = "0.16.2" +name = "matchers" +version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965de52763f2004bc91ac5bcec504192440f0b568a5d621c59d9dbd6f886c3fb" +checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" dependencies = [ - "futures-util", - "http", - "jsonrpsee-core 0.16.2", - "jsonrpsee-types 0.16.2", - "pin-project", - "rustls-native-certs", - "soketto", - "thiserror", - "tokio", - "tokio-rustls 0.23.4", - "tokio-util", - "tracing", - "webpki-roots", + "regex-automata 0.1.10", ] [[package]] -name = "jsonrpsee-client-transport" -version = "0.17.1" +name = "matches" +version = "0.1.10" 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.1", - "tokio-util", - "tracing", -] +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] -name = "jsonrpsee-client-transport" -version = "0.20.1" +name = "matrixmultiply" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97f2743cad51cc86b0dbfe316309eeb87a9d96a3d7f4dd7a99767c4b5f065335" +checksum = "7574c1cf36da4798ab73da5b215bbf444f50718207754cb522201d78d1cd0ff2" dependencies = [ - "futures-util", - "http", - "jsonrpsee-core 0.20.1", - "pin-project", - "rustls-native-certs", - "soketto", - "thiserror", - "tokio", - "tokio-rustls 0.24.1", - "tokio-util", - "tracing", - "url", + "autocfg", + "rawpointer", ] [[package]] -name = "jsonrpsee-core" -version = "0.16.2" +name = "memchr" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e70b4439a751a5de7dd5ed55eacff78ebf4ffe0fc009cb1ebb11417f5b536b" -dependencies = [ - "anyhow", - "arrayvec 0.7.4", - "async-lock", - "async-trait", - "beef", - "futures-channel", - "futures-timer", - "futures-util", - "globset", - "hyper", - "jsonrpsee-types 0.16.2", - "parking_lot 0.12.1", - "rand 0.8.5", - "rustc-hash", - "serde", - "serde_json", - "soketto", - "thiserror", - "tokio", - "tracing", -] +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] -name = "jsonrpsee-core" -version = "0.17.1" +name = "memfd" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b83cca7a5a7899eed8b2935d5f755c8c4052ad66ab5b328bd34ac2b3ffd3515f" +checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" 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", + "rustix 0.38.30", ] [[package]] -name = "jsonrpsee-core" -version = "0.20.1" +name = "memmap2" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35dc957af59ce98373bcdde0c1698060ca6c2d2e9ae357b459c7158b6df33330" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" dependencies = [ - "anyhow", - "async-lock", - "async-trait", - "beef", - "futures-timer", - "futures-util", - "hyper", - "jsonrpsee-types 0.20.1", - "rustc-hash", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", + "libc", ] [[package]] -name = "jsonrpsee-http-client" -version = "0.16.2" +name = "memoffset" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc345b0a43c6bc49b947ebeb936e886a419ee3d894421790c969cc56040542ad" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" dependencies = [ - "async-trait", - "hyper", - "hyper-rustls 0.23.2", - "jsonrpsee-core 0.16.2", - "jsonrpsee-types 0.16.2", - "rustc-hash", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", + "autocfg", ] [[package]] -name = "jsonrpsee-http-client" -version = "0.20.1" +name = "memory-db" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd865d0072764cb937b0110a92b5f53e995f7101cb346beca03d93a2dea79de" +checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" dependencies = [ - "async-trait", - "hyper", - "hyper-rustls 0.24.1", - "jsonrpsee-core 0.20.1", - "jsonrpsee-types 0.20.1", - "serde", - "serde_json", - "thiserror", - "tokio", - "tower", - "tracing", - "url", + "hash-db", ] [[package]] -name = "jsonrpsee-proc-macros" -version = "0.16.2" +name = "merlin" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baa6da1e4199c10d7b1d0a6e5e8bd8e55f351163b6f4b3cbb044672a69bd4c1c" +checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" dependencies = [ - "heck 0.4.1", - "proc-macro-crate", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", + "byteorder", + "keccak", + "rand_core 0.5.1", + "zeroize", ] [[package]] -name = "jsonrpsee-proc-macros" -version = "0.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d814a21d9a819f8de1a41b819a263ffd68e4bb5f043d936db1c49b54684bde0a" +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" dependencies = [ - "heck 0.4.1", - "proc-macro-crate", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", ] [[package]] -name = "jsonrpsee-server" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb69dad85df79527c019659a992498d03f8495390496da2f07e6c24c2b356fc" +name = "messages-relay" +version = "0.1.0" dependencies = [ - "futures-channel", - "futures-util", - "http", - "hyper", - "jsonrpsee-core 0.16.2", - "jsonrpsee-types 0.16.2", - "serde", - "serde_json", - "soketto", - "tokio", - "tokio-stream", - "tokio-util", - "tower", - "tracing", + "async-std", + "async-trait", + "bp-messages", + "env_logger 0.11.1", + "finality-relay", + "futures", + "hex", + "log", + "num-traits", + "parking_lot 0.12.1", + "relay-utils", + "sp-arithmetic", ] [[package]] -name = "jsonrpsee-types" -version = "0.16.2" +name = "mime" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bd522fe1ce3702fd94812965d7bb7a3364b1c9aba743944c5a00529aae80f8c" -dependencies = [ - "anyhow", - "beef", - "serde", - "serde_json", - "thiserror", - "tracing", -] +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] -name = "jsonrpsee-types" -version = "0.17.1" +name = "minimal-lexical" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd301ccc3e08718393432d1961539d78c4580dcca86014dfe6769c308b2c08b2" -dependencies = [ - "anyhow", - "beef", - "serde", - "serde_json", - "thiserror", - "tracing", -] +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] -name = "jsonrpsee-types" -version = "0.20.1" +name = "miniz_oxide" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa9e25aec855b2a7d3ed90fded6c41e8c3fb72b63f071e1be3f0004eba19b625" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ - "anyhow", - "beef", - "serde", - "serde_json", - "thiserror", - "tracing", + "adler", ] [[package]] -name = "jsonrpsee-ws-client" -version = "0.16.2" +name = "mio" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b83daeecfc6517cfe210df24e570fb06213533dfb990318fae781f4c7119dd9" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ - "http", - "jsonrpsee-client-transport 0.16.2", - "jsonrpsee-core 0.16.2", - "jsonrpsee-types 0.16.2", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", ] [[package]] -name = "jsonrpsee-ws-client" -version = "0.17.1" +name = "mixnet" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89a69852133d549b07cb37ff2d0ec540eae0d20abb75ae923f5d39bc7536d987" +checksum = "daa3eb39495d8e2e2947a1d862852c90cc6a4a8845f8b41c8829cb9fcc047f4a" dependencies = [ - "http", - "jsonrpsee-client-transport 0.17.1", - "jsonrpsee-core 0.17.1", - "jsonrpsee-types 0.17.1", + "arrayref", + "arrayvec 0.7.4", + "bitflags 1.3.2", + "blake2 0.10.6", + "c2-chacha", + "curve25519-dalek 4.1.1", + "either", + "hashlink", + "lioness", + "log", + "parking_lot 0.12.1", + "rand", + "rand_chacha", + "rand_distr", + "subtle 2.5.0", + "thiserror", + "zeroize", ] [[package]] -name = "k256" -version = "0.13.1" +name = "mockall" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" +checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" dependencies = [ "cfg-if 1.0.0", - "ecdsa 0.16.7", - "elliptic-curve 0.13.5", - "once_cell", - "sha2 0.10.7", + "downcast", + "fragile", + "lazy_static", + "mockall_derive", + "predicates", + "predicates-tree", ] [[package]] -name = "keccak" -version = "0.1.4" +name = "mockall_derive" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" dependencies = [ - "cpufeatures", + "cfg-if 1.0.0", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 1.0.109", ] [[package]] -name = "keystream" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" - -[[package]] -name = "kv-log-macro" -version = "1.0.7" +name = "multiaddr" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" +checksum = "2b36f567c7099511fa8612bbbb52dda2419ce0bdbacf31714e3a5ffdb766d3bd" dependencies = [ + "arrayref", + "byteorder", + "data-encoding", "log", + "multibase", + "multihash", + "percent-encoding", + "serde", + "static_assertions", + "unsigned-varint", + "url", ] [[package]] -name = "kvdb" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d770dcb02bf6835887c3a979b5107a04ff4bbde97a5f0928d27404a155add9" -dependencies = [ - "smallvec", -] - -[[package]] -name = "kvdb-memorydb" -version = "0.13.0" +name = "multibase" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7a85fe66f9ff9cd74e169fdd2c94c6e1e74c412c99a73b4df3200b5d3760b2" +checksum = "9b3539ec3c1f04ac9748a260728e855f261b4977f5c3406612c884564f329404" dependencies = [ - "kvdb", - "parking_lot 0.12.1", + "base-x", + "data-encoding", + "data-encoding-macro", ] [[package]] -name = "kvdb-rocksdb" -version = "0.19.0" +name = "multihash" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b644c70b92285f66bfc2032922a79000ea30af7bc2ab31902992a5dcb9b434f6" +checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" dependencies = [ - "kvdb", - "num_cpus", - "parking_lot 0.12.1", - "regex", - "rocksdb", - "smallvec", + "core2", + "multihash-derive", + "unsigned-varint", ] [[package]] -name = "landlock" -version = "0.3.0" +name = "multihash-derive" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1530c5b973eeed4ac216af7e24baf5737645a6272e361f1fb95710678b67d9cc" +checksum = "1d6d4752e6230d8ef7adf7bd5d8c4b1f6561c1014c5ba9a37445ccefe18aa1db" dependencies = [ - "enumflags2", - "libc", - "thiserror", + "proc-macro-crate 1.1.3", + "proc-macro-error", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 1.0.109", + "synstructure", ] [[package]] -name = "lazy_static" -version = "1.4.0" +name = "multimap" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] -name = "lazycell" -version = "1.3.0" +name = "multistream-select" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" +checksum = "c8552ab875c1313b97b8d20cb857b9fd63e2d1d6a0a1b53ce9821e575405f27a" +dependencies = [ + "bytes", + "futures", + "log", + "pin-project", + "smallvec", + "unsigned-varint", +] [[package]] -name = "libc" -version = "0.2.149" +name = "nalgebra" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" +dependencies = [ + "approx", + "matrixmultiply", + "nalgebra-macros", + "num-complex", + "num-rational", + "num-traits", + "simba", + "typenum", +] [[package]] -name = "libloading" -version = "0.7.4" +name = "nalgebra-macros" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" dependencies = [ - "cfg-if 1.0.0", - "winapi", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 1.0.109", ] [[package]] -name = "libm" -version = "0.2.7" +name = "netlink-packet-core" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +checksum = "345b8ab5bd4e71a2986663e88c56856699d060e78e152e6e9d7966fcd5491297" +dependencies = [ + "anyhow", + "byteorder", + "libc", + "netlink-packet-utils", +] [[package]] -name = "libnghttp2-sys" -version = "0.1.7+1.45.0" +name = "netlink-packet-route" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ed28aba195b38d5ff02b9170cbff627e336a20925e43b4945390401c5dc93f" +checksum = "d9ea4302b9759a7a88242299225ea3688e63c85ea136371bb6cf94fd674efaab" dependencies = [ - "cc", + "anyhow", + "bitflags 1.3.2", + "byteorder", "libc", + "netlink-packet-core", + "netlink-packet-utils", ] [[package]] -name = "libp2p" -version = "0.51.3" +name = "netlink-packet-utils" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f210d259724eae82005b5c48078619b7745edb7b76de370b03f8ba59ea103097" +checksum = "0ede8a08c71ad5a95cdd0e4e52facd37190977039a4704eb82a283f713747d34" dependencies = [ - "bytes", - "futures", - "futures-timer", - "getrandom 0.2.10", - "instant", - "libp2p-allow-block-list", - "libp2p-connection-limits", - "libp2p-core", - "libp2p-dns", - "libp2p-identify", - "libp2p-identity", - "libp2p-kad", - "libp2p-mdns", - "libp2p-metrics", - "libp2p-noise", - "libp2p-ping", - "libp2p-quic", - "libp2p-request-response", - "libp2p-swarm", - "libp2p-tcp", - "libp2p-wasm-ext", - "libp2p-webrtc", - "libp2p-websocket", - "libp2p-yamux", - "multiaddr", - "pin-project", + "anyhow", + "byteorder", + "paste", + "thiserror", ] [[package]] -name = "libp2p-allow-block-list" -version = "0.1.1" +name = "netlink-proto" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510daa05efbc25184458db837f6f9a5143888f1caa742426d92e1833ddd38a50" +checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6" dependencies = [ - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", - "void", + "bytes", + "futures", + "log", + "netlink-packet-core", + "netlink-sys", + "thiserror", + "tokio", ] [[package]] -name = "libp2p-connection-limits" -version = "0.1.0" +name = "netlink-sys" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4caa33f1d26ed664c4fe2cca81a08c8e07d4c1c04f2f4ac7655c2dd85467fda0" +checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" dependencies = [ - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", - "void", + "bytes", + "futures", + "libc", + "log", + "tokio", ] [[package]] -name = "libp2p-core" -version = "0.39.2" +name = "nix" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c1df63c0b582aa434fb09b2d86897fa2b419ffeccf934b36f87fcedc8e835c2" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ - "either", - "fnv", - "futures", - "futures-timer", - "instant", - "libp2p-identity", - "log", - "multiaddr", - "multihash", - "multistream-select", - "once_cell", - "parking_lot 0.12.1", - "pin-project", - "quick-protobuf", - "rand 0.8.5", - "rw-stream-sink", - "smallvec", - "thiserror", - "unsigned-varint", - "void", + "bitflags 1.3.2", + "cfg-if 1.0.0", + "libc", ] [[package]] -name = "libp2p-dns" -version = "0.39.0" +name = "no-std-net" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554" -dependencies = [ - "futures", - "libp2p-core", - "log", - "parking_lot 0.12.1", - "smallvec", - "trust-dns-resolver", -] +checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" [[package]] -name = "libp2p-identify" -version = "0.42.2" +name = "nodrop" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5455f472243e63b9c497ff320ded0314254a9eb751799a39c283c6f20b793f3c" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ - "asynchronous-codec", - "either", - "futures", - "futures-timer", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", - "log", - "lru 0.10.1", - "quick-protobuf", - "quick-protobuf-codec", - "smallvec", - "thiserror", - "void", + "memchr", + "minimal-lexical", ] [[package]] -name = "libp2p-identity" -version = "0.1.3" +name = "normalize-line-endings" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" +checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" + +[[package]] +name = "ntapi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" dependencies = [ - "bs58 0.4.0", - "ed25519-dalek", - "log", - "multiaddr", - "multihash", - "quick-protobuf", - "rand 0.8.5", - "sha2 0.10.7", - "thiserror", - "zeroize", + "winapi", ] [[package]] -name = "libp2p-kad" -version = "0.43.3" +name = "num-bigint" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ - "arrayvec 0.7.4", - "asynchronous-codec", - "bytes", - "either", - "fnv", - "futures", - "futures-timer", - "instant", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", - "log", - "quick-protobuf", - "rand 0.8.5", - "sha2 0.10.7", - "smallvec", - "thiserror", - "uint", - "unsigned-varint", - "void", + "autocfg", + "num-integer", + "num-traits", ] [[package]] -name = "libp2p-mdns" -version = "0.43.1" +name = "num-complex" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19983e1f949f979a928f2c603de1cf180cc0dc23e4ac93a62651ccb18341460b" +checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" dependencies = [ - "data-encoding", - "futures", - "if-watch", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", - "log", - "rand 0.8.5", - "smallvec", - "socket2 0.4.9", - "tokio", - "trust-dns-proto", - "void", + "num-traits", ] [[package]] -name = "libp2p-metrics" -version = "0.12.0" +name = "num-conv" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a42ec91e227d7d0dafa4ce88b333cdf5f277253873ab087555c92798db2ddd46" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-format" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" dependencies = [ - "libp2p-core", - "libp2p-identify", - "libp2p-kad", - "libp2p-ping", - "libp2p-swarm", - "prometheus-client", + "arrayvec 0.7.4", + "itoa", ] [[package]] -name = "libp2p-noise" -version = "0.42.2" +name = "num-integer" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3673da89d29936bc6435bafc638e2f184180d554ce844db65915113f86ec5e" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ - "bytes", - "curve25519-dalek 3.2.0", - "futures", - "libp2p-core", - "libp2p-identity", - "log", - "once_cell", - "quick-protobuf", - "rand 0.8.5", - "sha2 0.10.7", - "snow", - "static_assertions", - "thiserror", - "x25519-dalek 1.1.1", - "zeroize", + "autocfg", + "num-traits", ] [[package]] -name = "libp2p-ping" -version = "0.42.0" +name = "num-rational" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e57759c19c28a73ef1eb3585ca410cefb72c1a709fcf6de1612a378e4219202" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ - "either", - "futures", - "futures-timer", - "instant", - "libp2p-core", - "libp2p-swarm", - "log", - "rand 0.8.5", - "void", + "autocfg", + "num-bigint", + "num-integer", + "num-traits", ] [[package]] -name = "libp2p-quic" -version = "0.7.0-alpha.3" +name = "num-traits" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6b26abd81cd2398382a1edfe739b539775be8a90fa6914f39b2ab49571ec735" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ - "bytes", - "futures", - "futures-timer", - "if-watch", - "libp2p-core", - "libp2p-identity", - "libp2p-tls", - "log", - "parking_lot 0.12.1", - "quinn-proto", - "rand 0.8.5", - "rustls 0.20.8", - "thiserror", - "tokio", + "autocfg", + "libm", ] [[package]] -name = "libp2p-request-response" -version = "0.24.1" +name = "num_cpus" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffdb374267d42dc5ed5bc53f6e601d4a64ac5964779c6e40bb9e4f14c1e30d5" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "async-trait", - "futures", - "instant", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", - "rand 0.8.5", - "smallvec", + "hermit-abi 0.3.4", + "libc", ] [[package]] -name = "libp2p-swarm" -version = "0.42.2" +name = "num_threads" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "903b3d592d7694e56204d211f29d31bc004be99386644ba8731fc3e3ef27b296" +checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" dependencies = [ - "either", - "fnv", - "futures", - "futures-timer", - "instant", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm-derive", - "log", - "rand 0.8.5", - "smallvec", - "tokio", - "void", + "libc", ] [[package]] -name = "libp2p-swarm-derive" -version = "0.32.0" +name = "object" +version = "0.30.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fba456131824ab6acd4c7bf61e9c0f0a3014b5fc9868ccb8e10d344594cdc4f" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" dependencies = [ - "heck 0.4.1", - "quote 1.0.33", - "syn 1.0.109", + "crc32fast", + "hashbrown 0.13.2", + "indexmap 1.9.3", + "memchr", ] [[package]] -name = "libp2p-tcp" -version = "0.39.0" +name = "object" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d33698596d7722d85d3ab0c86c2c322254fce1241e91208e3679b4eb3026cf" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ - "futures", - "futures-timer", - "if-watch", - "libc", - "libp2p-core", - "log", - "socket2 0.4.9", - "tokio", + "memchr", ] [[package]] -name = "libp2p-tls" -version = "0.1.0" +name = "oid-registry" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" +checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" dependencies = [ - "futures", - "futures-rustls", - "libp2p-core", - "libp2p-identity", - "rcgen 0.10.0", - "ring 0.16.20", - "rustls 0.20.8", - "thiserror", - "webpki 0.22.2", - "x509-parser 0.14.0", - "yasna", + "asn1-rs", ] [[package]] -name = "libp2p-wasm-ext" -version = "0.39.0" +name = "once_cell" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77dff9d32353a5887adb86c8afc1de1a94d9e8c3bc6df8b2201d7cdf5c848f43" -dependencies = [ - "futures", - "js-sys", - "libp2p-core", - "parity-send-wrapper", - "wasm-bindgen", - "wasm-bindgen-futures", -] +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] -name = "libp2p-webrtc" -version = "0.4.0-alpha.4" +name = "opaque-debug" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dba48592edbc2f60b4bc7c10d65445b0c3964c07df26fdf493b6880d33be36f8" -dependencies = [ - "async-trait", - "asynchronous-codec", - "bytes", - "futures", - "futures-timer", - "hex", - "if-watch", - "libp2p-core", - "libp2p-identity", - "libp2p-noise", - "log", - "multihash", - "quick-protobuf", - "quick-protobuf-codec", - "rand 0.8.5", - "rcgen 0.9.3", - "serde", - "stun", - "thiserror", - "tinytemplate", - "tokio", - "tokio-util", - "webrtc", -] +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] -name = "libp2p-websocket" -version = "0.41.0" +name = "opaque-debug" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "111273f7b3d3510524c752e8b7a5314b7f7a1fee7e68161c01a7d72cbb06db9f" -dependencies = [ - "either", - "futures", - "futures-rustls", - "libp2p-core", - "log", - "parking_lot 0.12.1", - "quicksink", - "rw-stream-sink", - "soketto", - "url", - "webpki-roots", -] +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] -name = "libp2p-yamux" -version = "0.43.1" +name = "openssl-probe" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd21d950662700a385d4c6d68e2f5f54d778e97068cdd718522222ef513bda" -dependencies = [ - "futures", - "libp2p-core", - "log", - "thiserror", - "yamux", -] +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] -name = "librocksdb-sys" -version = "0.11.0+8.1.1" +name = "openssl-sys" +version = "0.9.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" +checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" dependencies = [ - "bindgen", - "bzip2-sys", "cc", - "glob", "libc", - "libz-sys", - "tikv-jemalloc-sys", -] - -[[package]] -name = "libsecp256k1" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" -dependencies = [ - "arrayref", - "base64 0.13.1", - "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", - "rand 0.8.5", - "serde", - "sha2 0.9.9", - "typenum", + "pkg-config", + "vcpkg", ] [[package]] -name = "libsecp256k1-core" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" +name = "pallet-authorship" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "crunchy", - "digest 0.9.0", - "subtle 2.4.1", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] [[package]] -name = "libsecp256k1-gen-ecmult" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" +name = "pallet-balances" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "libsecp256k1-core", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] [[package]] -name = "libsecp256k1-gen-genmult" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" +name = "pallet-beefy" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "libsecp256k1-core", + "frame-support", + "frame-system", + "log", + "pallet-authorship", + "pallet-session", + "parity-scale-codec", + "scale-info", + "serde", + "sp-consensus-beefy", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] [[package]] -name = "libz-sys" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db" +name = "pallet-beefy-mmr" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", + "array-bytes 6.2.2", + "binary-merkle-tree", + "frame-support", + "frame-system", + "log", + "pallet-beefy", + "pallet-mmr", + "pallet-session", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-consensus-beefy", + "sp-core", + "sp-io", + "sp-runtime", + "sp-state-machine", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] [[package]] -name = "link-cplusplus" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d240c6f7e1ba3a28b0249f774e6a9dd0175054b52dfbb61b16eb8505c3785c9" +name = "pallet-bridge-beefy" +version = "0.1.0" dependencies = [ - "cc", -] - -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - -[[package]] -name = "linked_hash_set" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588" -dependencies = [ - "linked-hash-map", -] - -[[package]] -name = "linregress" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4de0b5f52a9f84544d268f5fabb71b38962d6aa3c6600b8bcd27d44ccf9c9c45" -dependencies = [ - "nalgebra", -] - -[[package]] -name = "linux-raw-sys" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" - -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[package]] -name = "linux-raw-sys" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" - -[[package]] -name = "lioness" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae926706ba42c425c9457121178330d75e273df2e82e28b758faf3de3a9acb9" -dependencies = [ - "arrayref", - "blake2 0.8.1", - "chacha", - "keystream", -] - -[[package]] -name = "lock_api" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -dependencies = [ - "value-bag", -] - -[[package]] -name = "lru" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" -dependencies = [ - "hashbrown 0.12.3", -] - -[[package]] -name = "lru" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" -dependencies = [ - "hashbrown 0.13.2", -] - -[[package]] -name = "lru" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eedb2bdbad7e0634f83989bf596f497b070130daaa398ab22d84c39e266deec5" - -[[package]] -name = "lru-cache" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" -dependencies = [ - "linked-hash-map", -] - -[[package]] -name = "lz4" -version = "1.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" -dependencies = [ - "libc", - "lz4-sys", -] - -[[package]] -name = "lz4-sys" -version = "1.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "mach" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" -dependencies = [ - "libc", -] - -[[package]] -name = "macro_magic" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e03844fc635e92f3a0067e25fa4bf3e3dbf3f2927bf3aa01bb7bc8f1c428949d" -dependencies = [ - "macro_magic_core", - "macro_magic_macros", - "quote 1.0.33", - "syn 2.0.38", -] - -[[package]] -name = "macro_magic_core" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "468155613a44cfd825f1fb0ffa532b018253920d404e6fca1e8d43155198a46d" -dependencies = [ - "const-random", - "derive-syn-parse", - "macro_magic_core_macros", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", -] - -[[package]] -name = "macro_magic_core_macros" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" -dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", -] - -[[package]] -name = "macro_magic_macros" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" -dependencies = [ - "macro_magic_core", - "quote 1.0.33", - "syn 2.0.38", -] - -[[package]] -name = "maplit" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" - -[[package]] -name = "match_cfg" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" - -[[package]] -name = "matchers" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" -dependencies = [ - "regex-automata 0.1.10", -] - -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - -[[package]] -name = "matrixmultiply" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090126dc04f95dc0d1c1c91f61bdd474b3930ca064c1edc8a849da2c6cbe1e77" -dependencies = [ - "autocfg", - "rawpointer", -] - -[[package]] -name = "md-5" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "memfd" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" -dependencies = [ - "rustix 0.37.23", -] - -[[package]] -name = "memmap2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" -dependencies = [ - "libc", -] - -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - -[[package]] -name = "memoffset" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" -dependencies = [ - "autocfg", -] - -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] - -[[package]] -name = "memory-db" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" -dependencies = [ - "hash-db", -] - -[[package]] -name = "merlin" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" -dependencies = [ - "byteorder", - "keccak", - "rand_core 0.5.1", - "zeroize", -] - -[[package]] -name = "merlin" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" -dependencies = [ - "byteorder", - "keccak", - "rand_core 0.6.4", - "zeroize", -] - -[[package]] -name = "messages-relay" -version = "0.1.0" -dependencies = [ - "async-std", - "async-trait", - "bp-messages", - "env_logger", - "finality-relay", - "futures", - "hex", - "log", - "num-traits", - "parking_lot 0.12.1", - "relay-utils", - "sp-arithmetic", -] - -[[package]] -name = "mick-jaeger" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69672161530e8aeca1d1400fbf3f1a1747ff60ea604265a4e906c2442df20532" -dependencies = [ - "futures", - "rand 0.8.5", - "thrift", -] - -[[package]] -name = "millau-bridge-node" -version = "0.1.0" -dependencies = [ - "bp-messages", - "bridge-runtime-common", - "clap 4.4.7", - "frame-benchmarking", - "frame-benchmarking-cli", - "futures", - "jsonrpsee 0.16.2", - "millau-runtime", - "mmr-rpc", - "node-inspect", - "pallet-transaction-payment-rpc", - "sc-basic-authorship", - "sc-cli", - "sc-client-api", - "sc-consensus", - "sc-consensus-aura", - "sc-consensus-beefy", - "sc-consensus-beefy-rpc", - "sc-consensus-grandpa", - "sc-consensus-grandpa-rpc", - "sc-executor", - "sc-keystore", - "sc-network", - "sc-network-common", - "sc-offchain", - "sc-rpc", - "sc-service", - "sc-telemetry", - "sc-transaction-pool", - "sc-transaction-pool-api", - "serde_json", - "sp-consensus-aura", - "sp-consensus-beefy", - "sp-consensus-grandpa", - "sp-core", - "sp-runtime", - "sp-timestamp", - "staging-xcm", - "substrate-build-script-utils", - "substrate-frame-rpc-system", -] - -[[package]] -name = "millau-runtime" -version = "0.1.0" -dependencies = [ - "bp-header-chain", - "bp-messages", - "bp-millau", - "bp-parachains", - "bp-polkadot-core", - "bp-relayers", - "bp-rialto", - "bp-rialto-parachain", - "bp-runtime", - "bp-westend", - "bp-xcm-bridge-hub", - "bridge-runtime-common", - "env_logger", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-rpc-runtime-api", - "hex-literal", - "pallet-aura", - "pallet-authorship", - "pallet-balances", - "pallet-beefy", - "pallet-beefy-mmr", - "pallet-bridge-grandpa", - "pallet-bridge-messages", - "pallet-bridge-parachains", - "pallet-bridge-relayers", - "pallet-grandpa", - "pallet-mmr", - "pallet-offences", - "pallet-session", - "pallet-shift-session-manager", - "pallet-sudo", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-utility", - "pallet-xcm", - "pallet-xcm-bridge-hub", - "pallet-xcm-bridge-hub-router", - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-block-builder", - "sp-consensus-aura", - "sp-consensus-beefy", - "sp-core", - "sp-inherents", - "sp-io", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-transaction-pool", - "sp-version", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "static_assertions", - "substrate-wasm-builder", -] - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" -dependencies = [ - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", -] - -[[package]] -name = "mixnet" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa3eb39495d8e2e2947a1d862852c90cc6a4a8845f8b41c8829cb9fcc047f4a" -dependencies = [ - "arrayref", - "arrayvec 0.7.4", - "bitflags 1.3.2", - "blake2 0.10.6", - "c2-chacha", - "curve25519-dalek 4.0.0", - "either", - "hashlink", - "lioness", - "log", - "parking_lot 0.12.1", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rand_distr", - "subtle 2.4.1", - "thiserror", - "zeroize", -] - -[[package]] -name = "mmr-gadget" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "futures", - "log", - "parity-scale-codec", - "sc-client-api", - "sc-offchain", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-consensus-beefy", - "sp-core", - "sp-mmr-primitives", - "sp-runtime", -] - -[[package]] -name = "mmr-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "anyhow", - "jsonrpsee 0.16.2", - "parity-scale-codec", - "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-mmr-primitives", - "sp-runtime", -] - -[[package]] -name = "mockall" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" -dependencies = [ - "cfg-if 1.0.0", - "downcast", - "fragile", - "lazy_static", - "mockall_derive", - "predicates", - "predicates-tree", -] - -[[package]] -name = "mockall_derive" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" -dependencies = [ - "cfg-if 1.0.0", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", -] - -[[package]] -name = "multiaddr" -version = "0.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b36f567c7099511fa8612bbbb52dda2419ce0bdbacf31714e3a5ffdb766d3bd" -dependencies = [ - "arrayref", - "byteorder", - "data-encoding", - "log", - "multibase", - "multihash", - "percent-encoding", - "serde", - "static_assertions", - "unsigned-varint", - "url", -] - -[[package]] -name = "multibase" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b3539ec3c1f04ac9748a260728e855f261b4977f5c3406612c884564f329404" -dependencies = [ - "base-x", - "data-encoding", - "data-encoding-macro", -] - -[[package]] -name = "multihash" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" -dependencies = [ - "blake2b_simd", - "blake2s_simd", - "blake3", - "core2", - "digest 0.10.7", - "multihash-derive", - "sha2 0.10.7", - "sha3", - "unsigned-varint", -] - -[[package]] -name = "multihash-derive" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc076939022111618a5026d3be019fd8b366e76314538ff9a1b59ffbcbf98bcd" -dependencies = [ - "proc-macro-crate", - "proc-macro-error", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", - "synstructure", -] - -[[package]] -name = "multimap" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" - -[[package]] -name = "multistream-select" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8552ab875c1313b97b8d20cb857b9fd63e2d1d6a0a1b53ce9821e575405f27a" -dependencies = [ - "bytes", - "futures", - "log", - "pin-project", - "smallvec", - "unsigned-varint", -] - -[[package]] -name = "nalgebra" -version = "0.32.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" -dependencies = [ - "approx", - "matrixmultiply", - "nalgebra-macros", - "num-complex", - "num-rational", - "num-traits", - "simba", - "typenum", -] - -[[package]] -name = "nalgebra-macros" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" -dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", -] - -[[package]] -name = "names" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d66043b25d4a6cccb23619d10c19c25304b355a7dccd4a8e11423dd2382146" -dependencies = [ - "rand 0.8.5", -] - -[[package]] -name = "nanorand" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" - -[[package]] -name = "netlink-packet-core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345b8ab5bd4e71a2986663e88c56856699d060e78e152e6e9d7966fcd5491297" -dependencies = [ - "anyhow", - "byteorder", - "libc", - "netlink-packet-utils", -] - -[[package]] -name = "netlink-packet-route" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9ea4302b9759a7a88242299225ea3688e63c85ea136371bb6cf94fd674efaab" -dependencies = [ - "anyhow", - "bitflags 1.3.2", - "byteorder", - "libc", - "netlink-packet-core", - "netlink-packet-utils", -] - -[[package]] -name = "netlink-packet-utils" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ede8a08c71ad5a95cdd0e4e52facd37190977039a4704eb82a283f713747d34" -dependencies = [ - "anyhow", - "byteorder", - "paste", - "thiserror", -] - -[[package]] -name = "netlink-proto" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6" -dependencies = [ - "bytes", - "futures", - "log", - "netlink-packet-core", - "netlink-sys", - "thiserror", - "tokio", -] - -[[package]] -name = "netlink-sys" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" -dependencies = [ - "bytes", - "futures", - "libc", - "log", - "tokio", -] - -[[package]] -name = "nix" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" -dependencies = [ - "bitflags 1.3.2", - "cfg-if 1.0.0", - "libc", - "memoffset 0.6.5", -] - -[[package]] -name = "no-std-net" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" - -[[package]] -name = "node-inspect" -version = "0.9.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "clap 4.4.7", - "parity-scale-codec", - "sc-cli", - "sc-client-api", - "sc-service", - "sp-blockchain", - "sp-core", - "sp-runtime", - "thiserror", -] - -[[package]] -name = "nodrop" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" - -[[package]] -name = "nohash-hasher" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "normalize-line-endings" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" - -[[package]] -name = "ntapi" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" -dependencies = [ - "winapi", -] - -[[package]] -name = "num-bigint" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-format" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" -dependencies = [ - "arrayvec 0.7.4", - "itoa", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" -dependencies = [ - "autocfg", - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.2", - "libc", -] - -[[package]] -name = "num_threads" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" -dependencies = [ - "libc", -] - -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - -[[package]] -name = "object" -version = "0.30.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" -dependencies = [ - "crc32fast", - "hashbrown 0.13.2", - "indexmap 1.9.3", - "memchr", -] - -[[package]] -name = "object" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" -dependencies = [ - "memchr", -] - -[[package]] -name = "oid-registry" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38e20717fa0541f39bd146692035c37bedfa532b3e5071b35761082407546b2a" -dependencies = [ - "asn1-rs 0.3.1", -] - -[[package]] -name = "oid-registry" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" -dependencies = [ - "asn1-rs 0.5.2", -] - -[[package]] -name = "once_cell" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[package]] -name = "opaque-debug" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - -[[package]] -name = "orchestra" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46d78e1deb2a8d54fc1f063a544130db4da31dfe4d5d3b493186424910222a76" -dependencies = [ - "async-trait", - "dyn-clonable", - "futures", - "futures-timer", - "orchestra-proc-macro", - "pin-project", - "prioritized-metered-channel", - "thiserror", - "tracing", -] - -[[package]] -name = "orchestra-proc-macro" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d035b1f968d91a826f2e34a9d6d02cb2af5aa7ca39ebd27922d850ab4b2dd2c6" -dependencies = [ - "expander 2.0.0", - "indexmap 2.0.0", - "itertools 0.11.0", - "petgraph", - "proc-macro-crate", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", -] - -[[package]] -name = "ordered-float" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3305af35278dd29f46fcdd139e0b1fbfae2153f0e5928b39b035542dd31e37b7" -dependencies = [ - "num-traits", -] - -[[package]] -name = "p256" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" -dependencies = [ - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.7", -] - -[[package]] -name = "p384" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" -dependencies = [ - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.7", -] - -[[package]] -name = "pallet-asset-rate" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-aura" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-support", - "frame-system", - "log", - "pallet-timestamp", - "parity-scale-codec", - "scale-info", - "sp-application-crypto", - "sp-consensus-aura", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-authority-discovery" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-support", - "frame-system", - "pallet-session", - "parity-scale-codec", - "scale-info", - "sp-application-crypto", - "sp-authority-discovery", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-authorship" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-babe" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "pallet-authorship", - "pallet-session", - "pallet-timestamp", - "parity-scale-codec", - "scale-info", - "sp-application-crypto", - "sp-consensus-babe", - "sp-core", - "sp-io", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-bags-list" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "aquamarine", - "docify", - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", - "log", - "pallet-balances", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-tracing", -] - -[[package]] -name = "pallet-balances" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-beefy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-support", - "frame-system", - "log", - "pallet-authorship", - "pallet-session", - "parity-scale-codec", - "scale-info", - "serde", - "sp-consensus-beefy", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-beefy-mmr" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "array-bytes 6.1.0", - "binary-merkle-tree", - "frame-support", - "frame-system", - "log", - "pallet-beefy", - "pallet-mmr", - "pallet-session", - "parity-scale-codec", - "scale-info", - "serde", - "sp-api", - "sp-consensus-beefy", - "sp-core", - "sp-io", - "sp-runtime", - "sp-state-machine", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-bounties" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "pallet-treasury", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-bridge-beefy" -version = "0.1.0" -dependencies = [ - "bp-beefy", - "bp-runtime", - "bp-test-utils", - "ckb-merkle-mountain-range 0.3.2", - "frame-support", - "frame-system", - "log", - "pallet-beefy-mmr", - "pallet-mmr", - "parity-scale-codec", - "rand 0.8.5", - "scale-info", - "serde", - "sp-consensus-beefy", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-bridge-grandpa" -version = "0.1.0" -dependencies = [ - "bp-header-chain", - "bp-runtime", - "bp-test-utils", - "finality-grandpa", - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-consensus-grandpa", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-trie", -] - -[[package]] -name = "pallet-bridge-messages" -version = "0.1.0" -dependencies = [ - "bp-header-chain", - "bp-messages", - "bp-runtime", - "bp-test-utils", - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "num-traits", - "pallet-balances", - "pallet-bridge-grandpa", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-trie", -] - -[[package]] -name = "pallet-bridge-parachains" -version = "0.1.0" -dependencies = [ - "bp-header-chain", - "bp-parachains", - "bp-polkadot-core", - "bp-runtime", - "bp-test-utils", - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "pallet-bridge-grandpa", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-trie", -] - -[[package]] -name = "pallet-bridge-relayers" -version = "0.1.0" -dependencies = [ - "bp-header-chain", - "bp-messages", - "bp-parachains", - "bp-polkadot-core", - "bp-relayers", - "bp-runtime", - "bp-test-utils", - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "pallet-balances", - "pallet-bridge-grandpa", - "pallet-bridge-messages", - "pallet-bridge-parachains", - "pallet-transaction-payment", - "pallet-utility", - "parity-scale-codec", - "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-child-bounties" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "pallet-bounties", - "pallet-treasury", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-collective" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-conviction-voting" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "assert_matches", - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "serde", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-democracy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-election-provider-multi-phase" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", - "log", - "pallet-election-provider-support-benchmarking", - "parity-scale-codec", - "rand 0.8.5", - "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-npos-elections", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "strum 0.24.1", -] - -[[package]] -name = "pallet-election-provider-support-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-election-provider-support", - "frame-system", - "parity-scale-codec", - "sp-npos-elections", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-elections-phragmen" -version = "5.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-npos-elections", - "sp-runtime", - "sp-staking", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-fast-unstake" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "docify", - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-grandpa" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "pallet-authorship", - "pallet-session", - "parity-scale-codec", - "scale-info", - "sp-application-crypto", - "sp-consensus-grandpa", - "sp-core", - "sp-io", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-identity" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "enumflags2", - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-im-online" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "pallet-authorship", - "parity-scale-codec", - "scale-info", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-indices" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-keyring", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-membership" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-message-queue" -version = "7.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-weights", -] - -[[package]] -name = "pallet-mmr" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-mmr-primitives", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-multisig" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-nis" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-arithmetic", - "sp-core", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-nomination-pools" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-support", - "frame-system", - "log", - "pallet-balances", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-tracing", -] - -[[package]] -name = "pallet-nomination-pools-benchmarking" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", - "pallet-bags-list", - "pallet-nomination-pools", - "pallet-staking", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-runtime-interface", - "sp-staking", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-nomination-pools-runtime-api" -version = "1.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "pallet-nomination-pools", - "parity-scale-codec", - "sp-api", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-offences" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-support", - "frame-system", - "log", - "pallet-balances", - "parity-scale-codec", - "scale-info", - "serde", - "sp-runtime", - "sp-staking", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-offences-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", - "log", - "pallet-babe", - "pallet-balances", - "pallet-grandpa", - "pallet-im-online", - "pallet-offences", - "pallet-session", - "pallet-staking", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-staking", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-preimage" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-proxy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-ranked-collective" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-recovery" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-referenda" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "assert_matches", - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-arithmetic", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-scheduler" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "docify", - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-weights", -] - -[[package]] -name = "pallet-session" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "log", - "pallet-timestamp", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-state-machine", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-trie", -] - -[[package]] -name = "pallet-session-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "pallet-session", - "pallet-staking", - "parity-scale-codec", - "rand 0.8.5", - "sp-runtime", - "sp-session", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-shift-session-manager" -version = "0.1.0" -dependencies = [ - "frame-support", - "frame-system", - "pallet-session", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-state-machine", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-society" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "rand_chacha 0.2.2", - "scale-info", - "sp-arithmetic", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-staking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", - "log", - "pallet-authorship", - "pallet-session", - "parity-scale-codec", - "rand_chacha 0.2.2", - "scale-info", - "serde", - "sp-application-crypto", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-staking-reward-curve" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "proc-macro-crate", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", -] - -[[package]] -name = "pallet-staking-reward-fn" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "log", - "sp-arithmetic", -] - -[[package]] -name = "pallet-staking-runtime-api" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "parity-scale-codec", - "sp-api", -] - -[[package]] -name = "pallet-state-trie-migration" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-sudo" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "docify", - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-timestamp" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "docify", - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-storage", - "sp-timestamp", -] - -[[package]] -name = "pallet-tips" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "pallet-treasury", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-transaction-payment" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-transaction-payment-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "jsonrpsee 0.16.2", - "pallet-transaction-payment-rpc-runtime-api", - "parity-scale-codec", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-rpc", - "sp-runtime", - "sp-weights", -] - -[[package]] -name = "pallet-transaction-payment-rpc-runtime-api" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "pallet-transaction-payment", - "parity-scale-codec", - "sp-api", - "sp-runtime", - "sp-weights", -] - -[[package]] -name = "pallet-treasury" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "docify", - "frame-benchmarking", - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "pallet-balances", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-utility" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-vesting" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-whitelist" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "pallet-xcm" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "bounded-collections", - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "staging-xcm", - "staging-xcm-executor", -] - -[[package]] -name = "pallet-xcm-benchmarks" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", -] - -[[package]] -name = "pallet-xcm-bridge-hub" -version = "0.1.0" -dependencies = [ - "bp-messages", - "bp-runtime", - "bp-xcm-bridge-hub", - "frame-support", - "frame-system", - "log", - "pallet-balances", - "pallet-bridge-messages", - "parity-scale-codec", - "polkadot-parachain-primitives", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", -] - -[[package]] -name = "pallet-xcm-bridge-hub-router" -version = "0.1.0" -dependencies = [ - "bp-xcm-bridge-hub", - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "staging-xcm", - "staging-xcm-builder", -] - -[[package]] -name = "parachain-info" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "cumulus-primitives-core", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "parachains-relay" -version = "0.1.0" -dependencies = [ - "async-std", - "async-trait", - "bp-polkadot-core", - "futures", - "log", - "parity-scale-codec", - "relay-substrate-client", - "relay-utils", - "sp-core", -] - -[[package]] -name = "parity-db" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dab3ac198341b2f0fec6e7f8a6eeed07a41201d98a124260611598c142e76df" -dependencies = [ - "blake2 0.10.6", - "crc32fast", - "fs2", - "hex", - "libc", - "log", - "lz4", - "memmap2", - "parking_lot 0.12.1", - "rand 0.8.5", - "siphasher", - "snap", -] - -[[package]] -name = "parity-scale-codec" -version = "3.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8e946cc0cc711189c0b0249fb8b599cbeeab9784d83c415719368bb8d4ac64" -dependencies = [ - "arrayvec 0.7.4", - "bitvec", - "byte-slice-cast", - "bytes", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", -] - -[[package]] -name = "parity-scale-codec-derive" -version = "3.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a296c3079b5fefbc499e1de58dc26c09b1b9a5952d26694ee89f04a43ebbb3e" -dependencies = [ - "proc-macro-crate", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", -] - -[[package]] -name = "parity-send-wrapper" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" - -[[package]] -name = "parity-util-mem" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d32c34f4f5ca7f9196001c0aba5a1f9a5a12382c8944b8b0f90233282d1e8f8" -dependencies = [ - "cfg-if 1.0.0", - "ethereum-types", - "hashbrown 0.12.3", - "impl-trait-for-tuples", - "lru 0.8.1", - "parity-util-mem-derive", - "parking_lot 0.12.1", - "primitive-types", - "smallvec", - "winapi", -] - -[[package]] -name = "parity-util-mem-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" -dependencies = [ - "proc-macro2 1.0.69", - "syn 1.0.109", - "synstructure", -] - -[[package]] -name = "parity-wasm" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" - -[[package]] -name = "parking" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core 0.9.8", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if 1.0.0", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "redox_syscall 0.3.5", - "smallvec", - "windows-targets 0.48.1", -] - -[[package]] -name = "partial_sort" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156" - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "pbkdf2" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" -dependencies = [ - "crypto-mac 0.11.1", -] - -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "pbkdf2" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - -[[package]] -name = "pem" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" -dependencies = [ - "base64 0.13.1", -] - -[[package]] -name = "pem-rfc7468" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d159833a9105500e0398934e205e0773f0b27529557134ecfc51c27646adac" -dependencies = [ - "base64ct", -] - -[[package]] -name = "percent-encoding" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" - -[[package]] -name = "pest" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d2d1d55045829d65aad9d389139882ad623b33b904e7c9f1b10c5b8927298e5" -dependencies = [ - "thiserror", - "ucd-trie", -] - -[[package]] -name = "pest_derive" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f94bca7e7a599d89dea5dfa309e217e7906c3c007fb9c3299c40b10d6a315d3" -dependencies = [ - "pest", - "pest_generator", -] - -[[package]] -name = "pest_generator" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d490fe7e8556575ff6911e45567ab95e71617f43781e5c05490dc8d75c965c" -dependencies = [ - "pest", - "pest_meta", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", -] - -[[package]] -name = "pest_meta" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2674c66ebb4b4d9036012091b537aae5878970d6999f81a265034d85b136b341" -dependencies = [ - "once_cell", - "pest", - "sha2 0.10.7", -] - -[[package]] -name = "petgraph" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" -dependencies = [ - "fixedbitset", - "indexmap 1.9.3", -] - -[[package]] -name = "pin-project" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" -dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", -] - -[[package]] -name = "pin-project-lite" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" - -[[package]] -name = "pin-project-lite" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkcs8" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" -dependencies = [ - "der 0.6.1", - "spki 0.6.0", -] - -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der 0.7.7", - "spki 0.7.2", -] - -[[package]] -name = "pkg-config" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" - -[[package]] -name = "platforms" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" - -[[package]] -name = "polkadot-approval-distribution" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "futures", - "futures-timer", - "polkadot-node-jaeger", - "polkadot-node-metrics", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "rand 0.8.5", - "tracing-gum", -] - -[[package]] -name = "polkadot-availability-bitfield-distribution" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "always-assert", - "futures", - "futures-timer", - "polkadot-node-network-protocol", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "rand 0.8.5", - "tracing-gum", -] - -[[package]] -name = "polkadot-availability-distribution" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "derive_more", - "fatality", - "futures", - "parity-scale-codec", - "polkadot-erasure-coding", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "rand 0.8.5", - "schnellru", - "sp-core", - "sp-keystore", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-availability-recovery" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "async-trait", - "fatality", - "futures", - "parity-scale-codec", - "polkadot-erasure-coding", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "rand 0.8.5", - "sc-network", - "schnellru", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-cli" -version = "1.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "clap 4.4.7", - "frame-benchmarking-cli", - "futures", - "log", - "polkadot-node-metrics", - "polkadot-node-primitives", - "polkadot-service", - "sc-cli", - "sc-executor", - "sc-service", - "sc-storage-monitor", - "sc-sysinfo", - "sc-tracing", - "sp-core", - "sp-io", - "sp-keyring", - "sp-maybe-compressed-blob", - "substrate-build-script-utils", - "thiserror", - "try-runtime-cli", -] - -[[package]] -name = "polkadot-collator-protocol" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "bitvec", - "fatality", - "futures", - "futures-timer", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "sp-core", - "sp-keystore", - "sp-runtime", - "thiserror", - "tokio-util", - "tracing-gum", -] - -[[package]] -name = "polkadot-core-primitives" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "polkadot-dispute-distribution" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "derive_more", - "fatality", - "futures", - "futures-timer", - "indexmap 1.9.3", - "parity-scale-codec", - "polkadot-erasure-coding", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "sc-network", - "schnellru", - "sp-application-crypto", - "sp-keystore", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-erasure-coding" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "parity-scale-codec", - "polkadot-node-primitives", - "polkadot-primitives", - "reed-solomon-novelpoly", - "sp-core", - "sp-trie", - "thiserror", -] - -[[package]] -name = "polkadot-gossip-support" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "futures", - "futures-timer", - "polkadot-node-network-protocol", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "rand 0.8.5", - "rand_chacha 0.3.1", - "sc-network", - "sc-network-common", - "sp-application-crypto", - "sp-core", - "sp-keystore", - "tracing-gum", -] - -[[package]] -name = "polkadot-network-bridge" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "always-assert", - "async-trait", - "bytes", - "fatality", - "futures", - "parity-scale-codec", - "parking_lot 0.12.1", - "polkadot-node-metrics", - "polkadot-node-network-protocol", - "polkadot-node-subsystem", - "polkadot-overseer", - "polkadot-primitives", - "sc-network", - "sp-consensus", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-collation-generation" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "futures", - "parity-scale-codec", - "polkadot-erasure-coding", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "sp-core", - "sp-maybe-compressed-blob", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-approval-voting" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "bitvec", - "derive_more", - "futures", - "futures-timer", - "kvdb", - "merlin 2.0.1", - "parity-scale-codec", - "polkadot-node-jaeger", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-overseer", - "polkadot-primitives", - "sc-keystore", - "schnellru", - "schnorrkel 0.9.1", - "sp-application-crypto", - "sp-consensus", - "sp-consensus-slots", - "sp-runtime", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-av-store" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "bitvec", - "futures", - "futures-timer", - "kvdb", - "parity-scale-codec", - "polkadot-erasure-coding", - "polkadot-node-jaeger", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-overseer", - "polkadot-primitives", - "sp-consensus", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-backing" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "bitvec", - "fatality", - "futures", - "polkadot-erasure-coding", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "polkadot-statement-table", - "sp-keystore", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-bitfield-signing" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "futures", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "sp-keystore", - "thiserror", - "tracing-gum", - "wasm-timer", -] - -[[package]] -name = "polkadot-node-core-candidate-validation" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "async-trait", - "futures", - "futures-timer", - "parity-scale-codec", - "polkadot-node-core-pvf", - "polkadot-node-metrics", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-overseer", - "polkadot-parachain-primitives", - "polkadot-primitives", - "sp-maybe-compressed-blob", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-chain-api" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "futures", - "polkadot-node-metrics", - "polkadot-node-subsystem", - "polkadot-primitives", - "sc-client-api", - "sc-consensus-babe", - "sp-blockchain", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-chain-selection" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "futures", - "futures-timer", - "kvdb", - "parity-scale-codec", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-dispute-coordinator" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "fatality", - "futures", - "kvdb", - "parity-scale-codec", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "sc-keystore", - "schnellru", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-parachains-inherent" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "async-trait", - "futures", - "futures-timer", - "polkadot-node-subsystem", - "polkadot-overseer", - "polkadot-primitives", - "sp-blockchain", - "sp-inherents", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-prospective-parachains" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "bitvec", - "fatality", - "futures", - "parity-scale-codec", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-provisioner" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "bitvec", - "fatality", - "futures", - "futures-timer", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-pvf" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "always-assert", - "cfg-if 1.0.0", - "futures", - "futures-timer", - "libc", - "parity-scale-codec", - "pin-project", - "polkadot-core-primitives", - "polkadot-node-core-pvf-common", - "polkadot-node-metrics", - "polkadot-node-primitives", - "polkadot-parachain-primitives", - "polkadot-primitives", - "rand 0.8.5", - "slotmap", - "sp-core", - "sp-maybe-compressed-blob", - "sp-wasm-interface", - "substrate-build-script-utils", - "tempfile", - "tokio", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-pvf-checker" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "futures", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-overseer", - "polkadot-primitives", - "sp-keystore", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-pvf-common" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "cfg-if 1.0.0", - "cpu-time", - "futures", - "landlock", - "libc", - "parity-scale-codec", - "polkadot-parachain-primitives", - "polkadot-primitives", - "sc-executor", - "sc-executor-common", - "sc-executor-wasmtime", - "sp-core", - "sp-externalities", - "sp-io", - "sp-tracing", - "tokio", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-pvf-execute-worker" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "cpu-time", - "futures", - "parity-scale-codec", - "polkadot-node-core-pvf-common", - "polkadot-parachain-primitives", - "polkadot-primitives", - "rayon", - "sp-core", - "sp-maybe-compressed-blob", - "sp-tracing", - "tokio", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-pvf-prepare-worker" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "cfg-if 1.0.0", - "futures", - "libc", - "parity-scale-codec", - "polkadot-node-core-pvf-common", - "polkadot-parachain-primitives", - "polkadot-primitives", - "rayon", - "sc-executor", - "sc-executor-common", - "sc-executor-wasmtime", - "sp-io", - "sp-maybe-compressed-blob", - "sp-tracing", - "tikv-jemalloc-ctl", - "tokio", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-runtime-api" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "futures", - "polkadot-node-metrics", - "polkadot-node-subsystem", - "polkadot-node-subsystem-types", - "polkadot-primitives", - "schnellru", - "sp-consensus-babe", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-jaeger" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "lazy_static", - "log", - "mick-jaeger", - "parity-scale-codec", - "parking_lot 0.12.1", - "polkadot-node-primitives", - "polkadot-primitives", - "sc-network", - "sp-core", - "thiserror", - "tokio", -] - -[[package]] -name = "polkadot-node-metrics" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "bs58 0.5.0", - "futures", - "futures-timer", - "log", - "parity-scale-codec", - "polkadot-primitives", - "prioritized-metered-channel", - "sc-cli", - "sc-service", - "sc-tracing", - "substrate-prometheus-endpoint", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-network-protocol" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "async-channel", - "async-trait", - "bitvec", - "derive_more", - "fatality", - "futures", - "hex", - "parity-scale-codec", - "polkadot-node-jaeger", - "polkadot-node-primitives", - "polkadot-primitives", - "rand 0.8.5", - "sc-authority-discovery", - "sc-network", - "strum 0.24.1", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-primitives" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "bounded-vec", - "futures", - "parity-scale-codec", - "polkadot-parachain-primitives", - "polkadot-primitives", - "schnorrkel 0.9.1", - "serde", - "sp-application-crypto", - "sp-consensus-babe", - "sp-core", - "sp-keystore", - "sp-maybe-compressed-blob", - "sp-runtime", - "thiserror", - "zstd 0.12.4", -] - -[[package]] -name = "polkadot-node-subsystem" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "polkadot-node-jaeger", - "polkadot-node-subsystem-types", - "polkadot-overseer", -] - -[[package]] -name = "polkadot-node-subsystem-types" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "async-trait", - "derive_more", - "futures", - "orchestra", - "polkadot-node-jaeger", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-primitives", - "polkadot-statement-table", - "sc-client-api", - "sc-network", - "sc-transaction-pool-api", - "smallvec", - "sp-api", - "sp-authority-discovery", - "sp-consensus-babe", - "substrate-prometheus-endpoint", - "thiserror", -] - -[[package]] -name = "polkadot-node-subsystem-util" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "async-trait", - "derive_more", - "fatality", - "futures", - "futures-channel", - "itertools 0.10.5", - "kvdb", - "parity-db", - "parity-scale-codec", - "parking_lot 0.11.2", - "pin-project", - "polkadot-node-jaeger", - "polkadot-node-metrics", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-types", - "polkadot-overseer", - "polkadot-primitives", - "prioritized-metered-channel", - "rand 0.8.5", - "sc-client-api", - "schnellru", - "sp-application-crypto", - "sp-core", - "sp-keystore", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-overseer" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "async-trait", - "futures", - "futures-timer", - "orchestra", - "parking_lot 0.12.1", - "polkadot-node-metrics", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem-types", - "polkadot-primitives", - "sc-client-api", - "schnellru", - "sp-api", - "sp-core", - "tikv-jemalloc-ctl", - "tracing-gum", -] - -[[package]] -name = "polkadot-parachain-primitives" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "bounded-collections", - "derive_more", - "frame-support", - "parity-scale-codec", - "polkadot-core-primitives", - "scale-info", - "serde", - "sp-core", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "polkadot-primitives" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "bitvec", - "hex-literal", - "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "scale-info", - "serde", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-authority-discovery", - "sp-consensus-slots", - "sp-core", - "sp-inherents", - "sp-io", - "sp-keystore", - "sp-runtime", - "sp-staking", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "polkadot-rpc" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "jsonrpsee 0.16.2", - "mmr-rpc", - "pallet-transaction-payment-rpc", - "polkadot-primitives", - "sc-chain-spec", - "sc-client-api", - "sc-consensus-babe", - "sc-consensus-babe-rpc", - "sc-consensus-beefy", - "sc-consensus-beefy-rpc", - "sc-consensus-epochs", - "sc-consensus-grandpa", - "sc-consensus-grandpa-rpc", - "sc-rpc", - "sc-sync-state-rpc", - "sc-transaction-pool-api", - "sp-api", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-keystore", - "sp-runtime", - "substrate-frame-rpc-system", - "substrate-state-trie-migration-rpc", -] - -[[package]] -name = "polkadot-runtime-common" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "bitvec", - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "libsecp256k1", - "log", - "pallet-asset-rate", - "pallet-authorship", - "pallet-babe", - "pallet-balances", - "pallet-election-provider-multi-phase", - "pallet-fast-unstake", - "pallet-session", - "pallet-staking", - "pallet-staking-reward-fn", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-treasury", - "pallet-vesting", - "parity-scale-codec", - "polkadot-primitives", - "polkadot-runtime-parachains", - "rustc-hex", - "scale-info", - "serde", - "serde_derive", - "slot-range-helper", - "sp-api", - "sp-core", - "sp-inherents", - "sp-io", - "sp-npos-elections", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "staging-xcm", - "staging-xcm-builder", - "static_assertions", -] - -[[package]] -name = "polkadot-runtime-metrics" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "bs58 0.5.0", - "frame-benchmarking", - "parity-scale-codec", - "polkadot-primitives", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-tracing", -] - -[[package]] -name = "polkadot-runtime-parachains" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "bitflags 1.3.2", - "bitvec", - "derive_more", - "frame-benchmarking", - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "log", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", - "pallet-balances", - "pallet-message-queue", - "pallet-session", - "pallet-staking", - "pallet-timestamp", - "pallet-vesting", - "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-primitives", - "polkadot-runtime-metrics", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rustc-hex", - "scale-info", - "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-inherents", - "sp-io", - "sp-keystore", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "staging-xcm", - "staging-xcm-executor", - "static_assertions", -] - -[[package]] -name = "polkadot-service" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "async-trait", - "frame-benchmarking", - "frame-benchmarking-cli", - "frame-support", - "frame-system", - "frame-system-rpc-runtime-api", - "futures", - "hex-literal", - "is_executable", - "kvdb", - "kvdb-rocksdb", - "log", - "mmr-gadget", - "pallet-babe", - "pallet-im-online", - "pallet-staking", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "parity-db", - "parity-scale-codec", - "polkadot-approval-distribution", - "polkadot-availability-bitfield-distribution", - "polkadot-availability-distribution", - "polkadot-availability-recovery", - "polkadot-collator-protocol", - "polkadot-core-primitives", - "polkadot-dispute-distribution", - "polkadot-gossip-support", - "polkadot-network-bridge", - "polkadot-node-collation-generation", - "polkadot-node-core-approval-voting", - "polkadot-node-core-av-store", - "polkadot-node-core-backing", - "polkadot-node-core-bitfield-signing", - "polkadot-node-core-candidate-validation", - "polkadot-node-core-chain-api", - "polkadot-node-core-chain-selection", - "polkadot-node-core-dispute-coordinator", - "polkadot-node-core-parachains-inherent", - "polkadot-node-core-prospective-parachains", - "polkadot-node-core-provisioner", - "polkadot-node-core-pvf", - "polkadot-node-core-pvf-checker", - "polkadot-node-core-runtime-api", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-types", - "polkadot-node-subsystem-util", - "polkadot-overseer", - "polkadot-parachain-primitives", - "polkadot-primitives", - "polkadot-rpc", - "polkadot-runtime-parachains", - "polkadot-statement-distribution", - "rococo-runtime", - "sc-authority-discovery", - "sc-basic-authorship", - "sc-block-builder", - "sc-chain-spec", - "sc-client-api", - "sc-client-db", - "sc-consensus", - "sc-consensus-babe", - "sc-consensus-beefy", - "sc-consensus-grandpa", - "sc-consensus-slots", - "sc-executor", - "sc-keystore", - "sc-network", - "sc-network-common", - "sc-network-sync", - "sc-offchain", - "sc-service", - "sc-sync-state-rpc", - "sc-sysinfo", - "sc-telemetry", - "sc-transaction-pool", - "sc-transaction-pool-api", - "schnellru", - "serde", - "serde_json", - "sp-api", - "sp-authority-discovery", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-consensus-grandpa", - "sp-core", - "sp-inherents", - "sp-io", - "sp-keyring", - "sp-keystore", - "sp-mmr-primitives", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-state-machine", - "sp-storage", - "sp-timestamp", - "sp-transaction-pool", - "sp-version", - "sp-weights", - "substrate-prometheus-endpoint", - "thiserror", - "tracing-gum", - "westend-runtime", -] - -[[package]] -name = "polkadot-statement-distribution" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "arrayvec 0.7.4", - "bitvec", - "fatality", - "futures", - "futures-timer", - "indexmap 1.9.3", - "parity-scale-codec", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-types", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "sp-keystore", - "sp-staking", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-statement-table" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "parity-scale-codec", - "polkadot-primitives", - "sp-core", -] - -[[package]] -name = "polling" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if 1.0.0", - "concurrent-queue", - "libc", - "log", - "pin-project-lite 0.2.12", - "windows-sys 0.48.0", -] - -[[package]] -name = "poly1305" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" -dependencies = [ - "cpufeatures", - "opaque-debug 0.3.0", - "universal-hash 0.4.1", -] - -[[package]] -name = "poly1305" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" -dependencies = [ - "cpufeatures", - "opaque-debug 0.3.0", - "universal-hash 0.5.1", -] - -[[package]] -name = "polyval" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "opaque-debug 0.3.0", - "universal-hash 0.4.1", -] - -[[package]] -name = "polyval" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "opaque-debug 0.3.0", - "universal-hash 0.5.1", -] - -[[package]] -name = "portable-atomic" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc55135a600d700580e406b4de0d59cb9ad25e344a3a091a97ded2622ec4ec6" - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "predicates" -version = "2.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" -dependencies = [ - "difflib", - "float-cmp", - "itertools 0.10.5", - "normalize-line-endings", - "predicates-core", - "regex", -] - -[[package]] -name = "predicates-core" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" - -[[package]] -name = "predicates-tree" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" -dependencies = [ - "predicates-core", - "termtree", -] - -[[package]] -name = "prettyplease" -version = "0.1.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" -dependencies = [ - "proc-macro2 1.0.69", - "syn 1.0.109", -] - -[[package]] -name = "prettyplease" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92139198957b410250d43fad93e630d956499a625c527eda65175c8680f83387" -dependencies = [ - "proc-macro2 1.0.69", - "syn 2.0.38", -] - -[[package]] -name = "primitive-types" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" -dependencies = [ - "fixed-hash 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "impl-codec", - "impl-rlp", - "impl-serde", + "bp-beefy", + "bp-runtime", + "bp-test-utils", + "ckb-merkle-mountain-range 0.3.2", + "frame-support", + "frame-system", + "log", + "pallet-beefy-mmr", + "pallet-mmr", + "parity-scale-codec", + "rand", "scale-info", - "uint", -] - -[[package]] -name = "prioritized-metered-channel" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e99f0c89bd88f393aab44a4ab949351f7bc7e7e1179d11ecbfe50cbe4c47e342" -dependencies = [ - "coarsetime", - "crossbeam-queue", - "derive_more", - "futures", - "futures-timer", - "nanorand", - "thiserror", - "tracing", -] - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "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 1.0.69", - "quote 1.0.33", - "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 1.0.69", - "quote 1.0.33", - "version_check", -] - -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - -[[package]] -name = "proc-macro-warning" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b698b0b09d40e9b7c1a47b132d66a8b54bcd20583d9b6d06e4535e383b4405c" -dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", -] - -[[package]] -name = "proc-macro2" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -dependencies = [ - "unicode-xid 0.1.0", -] - -[[package]] -name = "proc-macro2" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "prometheus" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" -dependencies = [ - "cfg-if 1.0.0", - "fnv", - "lazy_static", - "memchr", - "parking_lot 0.12.1", - "thiserror", -] - -[[package]] -name = "prometheus-client" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6fa99d535dd930d1249e6c79cb3c2915f9172a540fe2b02a4c8f9ca954721e" -dependencies = [ - "dtoa", - "itoa", - "parking_lot 0.12.1", - "prometheus-client-derive-encode", -] - -[[package]] -name = "prometheus-client-derive-encode" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b6a5217beb0ad503ee7fa752d451c905113d70721b937126158f3106a48cc1" -dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", -] - -[[package]] -name = "prost" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" -dependencies = [ - "bytes", - "prost-derive", + "serde", + "sp-consensus-beefy", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] [[package]] -name = "prost-build" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" +name = "pallet-bridge-grandpa" +version = "0.1.0" dependencies = [ - "bytes", - "heck 0.4.1", - "itertools 0.10.5", - "lazy_static", + "bp-header-chain", + "bp-runtime", + "bp-test-utils", + "finality-grandpa", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "multimap", - "petgraph", - "prettyplease 0.1.25", - "prost", - "prost-types", - "regex", - "syn 1.0.109", - "tempfile", - "which", + "parity-scale-codec", + "scale-info", + "sp-consensus-grandpa", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-trie", ] [[package]] -name = "prost-derive" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +name = "pallet-bridge-messages" +version = "0.1.0" dependencies = [ - "anyhow", - "itertools 0.10.5", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", + "bp-header-chain", + "bp-messages", + "bp-runtime", + "bp-test-utils", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "num-traits", + "pallet-balances", + "pallet-bridge-grandpa", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-trie", ] [[package]] -name = "prost-types" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +name = "pallet-bridge-parachains" +version = "0.1.0" dependencies = [ - "prost", + "bp-header-chain", + "bp-parachains", + "bp-polkadot-core", + "bp-runtime", + "bp-test-utils", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-bridge-grandpa", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-trie", ] [[package]] -name = "psm" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +name = "pallet-bridge-relayers" +version = "0.1.0" dependencies = [ - "cc", + "bp-header-chain", + "bp-messages", + "bp-parachains", + "bp-polkadot-core", + "bp-relayers", + "bp-runtime", + "bp-test-utils", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-balances", + "pallet-bridge-grandpa", + "pallet-bridge-messages", + "pallet-bridge-parachains", + "pallet-transaction-payment", + "pallet-utility", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-io", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] [[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quick-protobuf" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f" +name = "pallet-grandpa" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "byteorder", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-authorship", + "pallet-session", + "parity-scale-codec", + "scale-info", + "sp-application-crypto", + "sp-consensus-grandpa", + "sp-core", + "sp-io", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] [[package]] -name = "quick-protobuf-codec" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1693116345026436eb2f10b677806169c1a1260c1c60eaaffe3fb5a29ae23d8b" +name = "pallet-mmr" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "asynchronous-codec", - "bytes", - "quick-protobuf", - "thiserror", - "unsigned-varint", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-mmr-primitives", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] [[package]] -name = "quick_cache" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f69f8d22fa3f34f3083d9a4375c038732c7a7e964de1beb81c544da92dfc40b8" +name = "pallet-session" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "ahash 0.8.3", - "equivalent", - "hashbrown 0.14.0", - "parking_lot 0.12.1", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "log", + "pallet-timestamp", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-state-machine", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-trie", ] [[package]] -name = "quicksink" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77de3c815e5a160b1539c6592796801df2043ae35e123b46d73380cfa57af858" +name = "pallet-timestamp" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "futures-core", - "futures-sink", - "pin-project-lite 0.1.12", + "docify", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-timestamp", ] [[package]] -name = "quinn-proto" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c10f662eee9c94ddd7135043e544f3c82fa839a1e7b865911331961b53186c" +name = "pallet-transaction-payment" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "bytes", - "rand 0.8.5", - "ring 0.16.20", - "rustc-hash", - "rustls 0.20.8", - "slab", - "thiserror", - "tinyvec", - "tracing", - "webpki 0.22.2", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] [[package]] -name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +name = "pallet-transaction-payment-rpc-runtime-api" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "proc-macro2 0.4.30", + "pallet-transaction-payment", + "parity-scale-codec", + "sp-api", + "sp-runtime", + "sp-weights", ] [[package]] -name = "quote" -version = "1.0.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +name = "pallet-utility" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "proc-macro2 1.0.69", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] [[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +name = "pallet-xcm-bridge-hub" +version = "0.1.0" dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", + "bp-messages", + "bp-runtime", + "bp-xcm-bridge-hub", + "frame-support", + "frame-system", + "log", + "pallet-balances", + "pallet-bridge-messages", + "parity-scale-codec", + "polkadot-parachain-primitives", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +name = "pallet-xcm-bridge-hub-router" +version = "0.1.0" dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", + "bp-xcm-bridge-hub", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "staging-xcm", + "staging-xcm-builder", ] [[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +name = "parachains-relay" +version = "0.1.0" dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", + "async-std", + "async-trait", + "bp-polkadot-core", + "futures", + "log", + "parity-scale-codec", + "relay-substrate-client", + "relay-utils", + "sp-core", ] [[package]] -name = "rand_chacha" -version = "0.3.1" +name = "parity-scale-codec" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", + "arrayvec 0.7.4", + "bitvec", + "byte-slice-cast", + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", ] [[package]] -name = "rand_core" -version = "0.5.1" +name = "parity-scale-codec-derive" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "getrandom 0.1.16", + "proc-macro-crate 2.0.0", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 1.0.109", ] [[package]] -name = "rand_core" -version = "0.6.4" +name = "parity-send-wrapper" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.10", -] +checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" [[package]] -name = "rand_distr" -version = "0.4.3" +name = "parity-util-mem" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" +checksum = "0d32c34f4f5ca7f9196001c0aba5a1f9a5a12382c8944b8b0f90233282d1e8f8" dependencies = [ - "num-traits", - "rand 0.8.5", + "cfg-if 1.0.0", + "ethereum-types", + "hashbrown 0.12.3", + "impl-trait-for-tuples", + "lru 0.8.1", + "parity-util-mem-derive", + "parking_lot 0.12.1", + "primitive-types", + "smallvec", + "winapi", ] [[package]] -name = "rand_hc" -version = "0.2.0" +name = "parity-util-mem-derive" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" dependencies = [ - "rand_core 0.5.1", + "proc-macro2 1.0.78", + "syn 1.0.109", + "synstructure", ] [[package]] -name = "rand_pcg" -version = "0.3.1" +name = "parity-wasm" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" -dependencies = [ - "rand_core 0.6.4", -] +checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] -name = "rawpointer" -version = "0.2.1" +name = "parking" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] -name = "rayon" -version = "1.7.0" +name = "parking_lot" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ - "either", - "rayon-core", + "instant", + "lock_api", + "parking_lot_core 0.8.6", ] [[package]] -name = "rayon-core" -version = "1.11.0" +name = "parking_lot" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-utils", - "num_cpus", + "lock_api", + "parking_lot_core 0.9.9", ] [[package]] -name = "rbtag" -version = "0.3.0" +name = "parking_lot_core" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c64936fcc0b811890a9d90020f3df5cec9c604efde88af7db6a35d365132a3" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" dependencies = [ - "rbtag_derive", + "cfg-if 1.0.0", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "winapi", ] [[package]] -name = "rbtag_derive" -version = "0.3.0" +name = "parking_lot_core" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b75511b710ccca8adbb211e04763bd8c78fed585b0ec188a20ed9b0dd95567c4" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", + "cfg-if 1.0.0", + "libc", + "redox_syscall 0.4.1", + "smallvec", + "windows-targets 0.48.5", ] [[package]] -name = "rcgen" -version = "0.9.3" +name = "partial_sort" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" -dependencies = [ - "pem", - "ring 0.16.20", - "time 0.3.30", - "x509-parser 0.13.2", - "yasna", -] +checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156" [[package]] -name = "rcgen" -version = "0.10.0" +name = "paste" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" -dependencies = [ - "pem", - "ring 0.16.20", - "time 0.3.30", - "yasna", -] +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] -name = "redox_syscall" -version = "0.2.16" +name = "pbkdf2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" dependencies = [ - "bitflags 1.3.2", + "crypto-mac 0.11.0", ] [[package]] -name = "redox_syscall" -version = "0.3.5" +name = "pbkdf2" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ - "bitflags 1.3.2", + "digest 0.10.7", ] [[package]] -name = "redox_syscall" -version = "0.4.1" +name = "pem" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" dependencies = [ - "bitflags 1.3.2", + "base64 0.13.1", ] [[package]] -name = "redox_users" -version = "0.4.3" +name = "percent-encoding" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" -dependencies = [ - "getrandom 0.2.10", - "redox_syscall 0.2.16", - "thiserror", -] +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] -name = "reed-solomon-novelpoly" -version = "1.0.0" +name = "petgraph" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bd8f48b2066e9f69ab192797d66da804d1935bf22763204ed3675740cb0f221" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ - "derive_more", - "fs-err", - "itertools 0.10.5", - "static_init 0.5.2", - "thiserror", + "fixedbitset", + "indexmap 2.2.2", ] [[package]] -name = "ref-cast" -version = "1.0.18" +name = "pin-project" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1641819477c319ef452a075ac34a4be92eb9ba09f6841f62d594d50fdcf0bf6b" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ - "ref-cast-impl", + "pin-project-internal", ] [[package]] -name = "ref-cast-impl" -version = "1.0.18" +name = "pin-project-internal" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68bf53dad9b6086826722cdc99140793afd9f62faa14a1ad07eb4f955e7a7216" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] -name = "regalloc2" -version = "0.6.1" +name = "pin-project-lite" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80535183cae11b149d618fbd3c37e38d7cda589d82d7769e196ca9a9042d7621" -dependencies = [ - "fxhash", - "log", - "slice-group-by", - "smallvec", -] +checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] -name = "regex" -version = "1.9.1" +name = "pin-project-lite" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.3.3", - "regex-syntax 0.7.4", -] +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] -name = "regex-automata" -version = "0.1.10" +name = "pin-utils" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] -name = "regex-automata" -version = "0.3.3" +name = "piper" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" +checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.7.4", + "atomic-waker", + "fastrand 2.0.1", + "futures-io", ] [[package]] -name = "regex-syntax" -version = "0.6.29" +name = "pkcs8" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] [[package]] -name = "regex-syntax" -version = "0.7.4" +name = "pkg-config" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" - -[[package]] -name = "relay-bridge-hub-kusama-client" -version = "0.1.0" -dependencies = [ - "bp-bridge-hub-kusama", - "bp-bridge-hub-polkadot", - "bp-header-chain", - "bp-messages", - "bp-parachains", - "bp-polkadot", - "parity-scale-codec", - "relay-substrate-client", - "scale-info", - "sp-core", - "sp-runtime", -] +checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" [[package]] -name = "relay-bridge-hub-polkadot-client" -version = "0.1.0" -dependencies = [ - "bp-bridge-hub-kusama", - "bp-bridge-hub-polkadot", - "bp-header-chain", - "bp-kusama", - "bp-messages", - "bp-parachains", - "bp-polkadot-bulletin", - "bp-polkadot-core", - "bp-runtime", - "parity-scale-codec", - "relay-substrate-client", - "scale-info", - "sp-consensus-grandpa", - "sp-core", - "sp-runtime", -] +name = "platforms" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" [[package]] -name = "relay-bridge-hub-rococo-client" -version = "0.1.0" -dependencies = [ - "bp-bridge-hub-rococo", - "bp-bridge-hub-wococo", - "bp-header-chain", - "bp-messages", - "bp-parachains", - "bp-polkadot-core", - "bp-wococo", - "bridge-runtime-common", +name = "polkadot-core-primitives" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" +dependencies = [ "parity-scale-codec", - "relay-substrate-client", "scale-info", "sp-core", "sp-runtime", - "sp-weights", - "subxt", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] [[package]] -name = "relay-bridge-hub-wococo-client" -version = "0.1.0" +name = "polkadot-parachain-primitives" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "bp-bridge-hub-rococo", - "bp-bridge-hub-wococo", - "bp-header-chain", - "bp-parachains", - "bp-polkadot-core", - "bp-rococo", - "bridge-runtime-common", + "bounded-collections", + "derive_more", "parity-scale-codec", - "relay-bridge-hub-rococo-client", - "relay-substrate-client", + "polkadot-core-primitives", "scale-info", - "sp-consensus-grandpa", + "serde", "sp-core", "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-weights", - "subxt", ] [[package]] -name = "relay-kusama-client" -version = "0.1.0" +name = "polkadot-primitives" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "bp-kusama", - "bp-polkadot-core", + "bitvec", + "hex-literal", "parity-scale-codec", - "relay-substrate-client", - "relay-utils", + "polkadot-core-primitives", + "polkadot-parachain-primitives", "scale-info", - "sp-consensus-grandpa", + "serde", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-authority-discovery", + "sp-consensus-slots", "sp-core", + "sp-inherents", + "sp-io", + "sp-keystore", "sp-runtime", - "sp-session", - "sp-weights", - "subxt", + "sp-staking", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] [[package]] -name = "relay-millau-client" -version = "0.1.0" +name = "polling" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ - "bp-millau", - "frame-support", - "frame-system", - "millau-runtime", - "pallet-transaction-payment", - "parity-scale-codec", - "relay-substrate-client", - "relay-utils", - "sp-core", - "sp-runtime", - "sp-session", + "autocfg", + "bitflags 1.3.2", + "cfg-if 1.0.0", + "concurrent-queue", + "libc", + "log", + "pin-project-lite 0.2.13", + "windows-sys 0.48.0", ] [[package]] -name = "relay-polkadot-bulletin-client" -version = "0.1.0" +name = "polling" +version = "3.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "545c980a3880efd47b2e262f6a4bb6daad6555cf3367aa9c4e52895f69537a41" dependencies = [ - "bp-header-chain", - "bp-messages", - "bp-polkadot-bulletin", - "bp-polkadot-core", - "parity-scale-codec", - "relay-substrate-client", - "relay-utils", - "scale-info", - "sp-consensus-grandpa", - "sp-core", - "sp-runtime", - "sp-session", - "sp-weights", - "subxt", + "cfg-if 1.0.0", + "concurrent-queue", + "pin-project-lite 0.2.13", + "rustix 0.38.30", + "tracing", + "windows-sys 0.52.0", ] [[package]] -name = "relay-polkadot-client" -version = "0.1.0" +name = "poly1305" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" dependencies = [ - "bp-polkadot", - "bp-polkadot-core", - "parity-scale-codec", - "relay-substrate-client", - "relay-utils", - "scale-info", - "sp-consensus-grandpa", - "sp-core", - "sp-runtime", - "sp-session", - "sp-weights", - "subxt", + "cpufeatures", + "opaque-debug 0.3.0", + "universal-hash", ] [[package]] -name = "relay-rialto-client" -version = "0.1.0" +name = "polyval" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" dependencies = [ - "bp-rialto", - "frame-support", - "frame-system", - "pallet-transaction-payment", - "parity-scale-codec", - "relay-substrate-client", - "relay-utils", - "rialto-runtime", - "sp-core", - "sp-runtime", - "sp-session", + "cfg-if 1.0.0", + "cpufeatures", + "opaque-debug 0.3.0", + "universal-hash", ] [[package]] -name = "relay-rialto-parachain-client" -version = "0.1.0" +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "predicates" +version = "2.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" dependencies = [ - "bp-bridge-hub-cumulus", - "bp-header-chain", - "bp-messages", - "bp-millau", - "bp-polkadot-core", - "bp-rialto-parachain", - "bridge-runtime-common", - "parity-scale-codec", - "relay-substrate-client", - "scale-info", - "sp-core", - "sp-runtime", - "sp-weights", - "subxt", + "difflib", + "float-cmp", + "itertools", + "normalize-line-endings", + "predicates-core", + "regex", ] [[package]] -name = "relay-rococo-client" -version = "0.1.0" +name = "predicates-core" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" + +[[package]] +name = "predicates-tree" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" dependencies = [ - "bp-polkadot-core", - "bp-rococo", - "parity-scale-codec", - "relay-substrate-client", - "relay-utils", - "scale-info", - "sp-consensus-grandpa", - "sp-core", - "sp-runtime", - "sp-session", - "sp-weights", - "subxt", + "predicates-core", + "termtree", ] [[package]] -name = "relay-substrate-client" -version = "0.1.0" +name = "prettyplease" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" dependencies = [ - "async-std", - "async-trait", - "bp-header-chain", - "bp-messages", - "bp-polkadot-core", - "bp-runtime", - "finality-relay", - "frame-support", - "frame-system", - "futures", - "jsonrpsee 0.17.1", - "log", - "num-traits", - "pallet-balances", - "pallet-bridge-messages", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-utility", - "parity-scale-codec", - "quick_cache", - "rand 0.8.5", - "relay-utils", - "sc-chain-spec", - "sc-rpc-api", - "sc-transaction-pool-api", + "proc-macro2 1.0.78", + "syn 1.0.109", +] + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", "scale-info", - "sp-consensus-grandpa", - "sp-core", - "sp-rpc", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-trie", - "sp-version", - "staging-xcm", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" +dependencies = [ "thiserror", - "tokio", + "toml 0.5.11", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +dependencies = [ + "toml_edit 0.20.7", ] [[package]] -name = "relay-utils" -version = "0.1.0" +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "ansi_term", - "anyhow", - "async-std", - "async-trait", - "backoff", - "bp-runtime", - "env_logger", - "futures", - "isahc", - "jsonpath_lib", - "log", - "num-traits", - "serde_json", - "sp-runtime", - "substrate-prometheus-endpoint", - "sysinfo", - "thiserror", - "time 0.3.30", - "tokio", + "toml_edit 0.21.0", ] [[package]] -name = "relay-westend-client" -version = "0.1.0" +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ - "bp-westend", - "relay-substrate-client", - "relay-utils", - "sp-core", - "sp-session", + "proc-macro-error-attr", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 1.0.109", + "version_check", ] [[package]] -name = "relay-wococo-client" -version = "0.1.0" +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "bp-polkadot-core", - "bp-wococo", - "parity-scale-codec", - "relay-rococo-client", - "relay-substrate-client", - "relay-utils", - "sp-core", - "sp-runtime", - "sp-session", + "proc-macro2 1.0.78", + "quote 1.0.35", + "version_check", ] [[package]] -name = "resolv-conf" -version = "0.7.0" +name = "proc-macro-warning" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" +checksum = "834da187cfe638ae8abb0203f0b33e5ccdb02a28e7199f2f47b3e2754f50edca" dependencies = [ - "hostname", - "quick-error", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] -name = "rfc6979" -version = "0.3.1" +name = "proc-macro2" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" dependencies = [ - "crypto-bigint 0.4.9", - "hmac 0.12.1", - "zeroize", + "unicode-xid 0.1.0", ] [[package]] -name = "rfc6979" -version = "0.4.0" +name = "proc-macro2" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ - "hmac 0.12.1", - "subtle 2.4.1", + "unicode-ident", ] [[package]] -name = "rialto-bridge-node" -version = "0.1.0" +name = "prometheus" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" dependencies = [ - "bp-messages", - "bridge-runtime-common", - "clap 4.4.7", - "frame-benchmarking", - "frame-benchmarking-cli", - "frame-support", - "node-inspect", - "polkadot-node-core-pvf", - "polkadot-node-core-pvf-common", - "polkadot-node-core-pvf-execute-worker", - "polkadot-node-core-pvf-prepare-worker", - "polkadot-primitives", - "polkadot-runtime-parachains", - "polkadot-service", - "rialto-runtime", - "sc-cli", - "sc-executor", - "sc-service", - "serde_json", - "sp-authority-discovery", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-consensus-grandpa", - "sp-core", - "sp-runtime", - "staging-xcm", - "substrate-build-script-utils", + "cfg-if 1.0.0", + "fnv", + "lazy_static", + "memchr", + "parking_lot 0.12.1", + "thiserror", ] [[package]] -name = "rialto-parachain-collator" -version = "0.1.0" +name = "prometheus-client" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6fa99d535dd930d1249e6c79cb3c2915f9172a540fe2b02a4c8f9ca954721e" dependencies = [ - "bp-messages", - "bridge-runtime-common", - "clap 4.4.7", - "cumulus-client-cli", - "cumulus-client-consensus-aura", - "cumulus-client-consensus-common", - "cumulus-client-network", - "cumulus-client-service", - "cumulus-primitives-core", - "cumulus-primitives-parachain-inherent", - "cumulus-relay-chain-interface", - "frame-benchmarking", - "frame-benchmarking-cli", - "jsonrpsee 0.16.2", - "log", - "pallet-transaction-payment-rpc", - "parity-scale-codec", - "polkadot-cli", - "polkadot-primitives", - "polkadot-service", - "rialto-parachain-runtime", - "sc-basic-authorship", - "sc-chain-spec", - "sc-cli", - "sc-client-api", - "sc-consensus", - "sc-executor", - "sc-network", - "sc-network-sync", - "sc-rpc", - "sc-rpc-api", - "sc-service", - "sc-telemetry", - "sc-tracing", - "sc-transaction-pool", - "serde", - "sp-api", - "sp-block-builder", - "sp-consensus-aura", - "sp-core", - "sp-keystore", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-timestamp", - "sp-transaction-pool", - "staging-xcm", - "substrate-build-script-utils", - "substrate-frame-rpc-system", - "substrate-prometheus-endpoint", + "dtoa", + "itoa", + "parking_lot 0.12.1", + "prometheus-client-derive-encode", ] [[package]] -name = "rialto-parachain-runtime" -version = "0.1.0" +name = "prometheus-client-derive-encode" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ - "bp-header-chain", - "bp-messages", - "bp-millau", - "bp-polkadot-core", - "bp-relayers", - "bp-rialto-parachain", - "bp-runtime", - "bp-xcm-bridge-hub", - "bridge-runtime-common", - "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", - "cumulus-pallet-xcm", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "cumulus-primitives-timestamp", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "hex-literal", - "pallet-aura", - "pallet-balances", - "pallet-bridge-grandpa", - "pallet-bridge-messages", - "pallet-bridge-relayers", - "pallet-sudo", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-xcm", - "pallet-xcm-bridge-hub", - "parachain-info", - "parity-scale-codec", - "polkadot-parachain-primitives", - "scale-info", - "sp-api", - "sp-block-builder", - "sp-consensus-aura", - "sp-core", - "sp-inherents", - "sp-io", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-transaction-pool", - "sp-version", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "static_assertions", - "substrate-wasm-builder", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] -name = "rialto-runtime" -version = "0.1.0" +name = "prost" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ - "bp-header-chain", - "bp-messages", - "bp-millau", - "bp-relayers", - "bp-rialto", - "bp-runtime", - "bp-xcm-bridge-hub", - "bridge-runtime-common", - "env_logger", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-rpc-runtime-api", - "hex-literal", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", - "pallet-balances", - "pallet-beefy", - "pallet-beefy-mmr", - "pallet-bridge-beefy", - "pallet-bridge-grandpa", - "pallet-bridge-messages", - "pallet-bridge-relayers", - "pallet-grandpa", - "pallet-message-queue", - "pallet-mmr", - "pallet-offences", - "pallet-session", - "pallet-shift-session-manager", - "pallet-sudo", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-xcm", - "pallet-xcm-bridge-hub", - "parity-scale-codec", - "polkadot-primitives", - "polkadot-runtime-common", - "polkadot-runtime-parachains", - "scale-info", - "sp-api", - "sp-authority-discovery", - "sp-block-builder", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-core", - "sp-inherents", - "sp-io", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-transaction-pool", - "sp-version", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "static_assertions", - "substrate-wasm-builder", + "bytes", + "prost-derive", ] [[package]] -name = "ring" -version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof#edd1e90b847e560bf60fc2e8712235ccfa11a9a9" +name = "prost-build" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ - "ark-ec", - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", - "blake2 0.10.6", - "common", - "fflonk", - "merlin 3.0.0", + "bytes", + "heck 0.4.1", + "itertools", + "lazy_static", + "log", + "multimap", + "petgraph", + "prettyplease", + "prost", + "prost-types", + "regex", + "syn 1.0.109", + "tempfile", + "which", +] + +[[package]] +name = "prost-derive" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 1.0.109", +] + +[[package]] +name = "prost-types" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +dependencies = [ + "prost", ] [[package]] -name = "ring" -version = "0.16.20" +name = "psm" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" dependencies = [ "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted", - "web-sys", - "winapi", ] [[package]] -name = "rlp" -version = "0.5.2" +name = "quick-error" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" -dependencies = [ - "bytes", - "rustc-hex", -] +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] -name = "rocksdb" -version = "0.21.0" +name = "quick-protobuf" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" +checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f" dependencies = [ - "libc", - "librocksdb-sys", + "byteorder", ] [[package]] -name = "rococo-runtime" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "quick-protobuf-codec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1693116345026436eb2f10b677806169c1a1260c1c60eaaffe3fb5a29ae23d8b" dependencies = [ - "binary-merkle-tree", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", - "hex-literal", - "log", - "pallet-asset-rate", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", - "pallet-balances", - "pallet-beefy", - "pallet-beefy-mmr", - "pallet-bounties", - "pallet-child-bounties", - "pallet-collective", - "pallet-conviction-voting", - "pallet-democracy", - "pallet-elections-phragmen", - "pallet-grandpa", - "pallet-identity", - "pallet-im-online", - "pallet-indices", - "pallet-membership", - "pallet-message-queue", - "pallet-mmr", - "pallet-multisig", - "pallet-nis", - "pallet-offences", - "pallet-preimage", - "pallet-proxy", - "pallet-ranked-collective", - "pallet-recovery", - "pallet-referenda", - "pallet-scheduler", - "pallet-session", - "pallet-society", - "pallet-staking", - "pallet-state-trie-migration", - "pallet-sudo", - "pallet-timestamp", - "pallet-tips", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", - "pallet-vesting", - "pallet-whitelist", - "pallet-xcm", - "pallet-xcm-benchmarks", - "parity-scale-codec", - "polkadot-parachain-primitives", - "polkadot-primitives", - "polkadot-runtime-common", - "polkadot-runtime-parachains", - "rococo-runtime-constants", - "scale-info", - "serde", - "serde_derive", - "smallvec", - "sp-api", - "sp-arithmetic", - "sp-authority-discovery", - "sp-block-builder", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-io", - "sp-mmr-primitives", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "static_assertions", - "substrate-wasm-builder", + "asynchronous-codec", + "bytes", + "quick-protobuf", + "thiserror", + "unsigned-varint", ] [[package]] -name = "rococo-runtime-constants" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "quick_cache" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c20af3800cee5134b79a3bd4a3d4b583c16ccfa5f53338f46400851a5b3819" dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", - "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", + "ahash 0.8.7", + "equivalent", + "hashbrown 0.14.3", + "parking_lot 0.12.1", ] [[package]] -name = "rpassword" -version = "7.2.0" +name = "quicksink" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6678cf63ab3491898c0d021b493c94c9b221d91295294a2a5746eacbe5928322" +checksum = "77de3c815e5a160b1539c6592796801df2043ae35e123b46d73380cfa57af858" dependencies = [ - "libc", - "rtoolbox", - "winapi", + "futures-core", + "futures-sink", + "pin-project-lite 0.1.12", ] [[package]] -name = "rtcp" -version = "0.7.2" +name = "quinn-proto" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1919efd6d4a6a85d13388f9487549bb8e359f17198cc03ffd72f79b553873691" +checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" dependencies = [ "bytes", + "rand", + "ring 0.16.20", + "rustc-hash", + "rustls 0.20.9", + "slab", "thiserror", - "webrtc-util", + "tinyvec", + "tracing", + "webpki", ] [[package]] -name = "rtnetlink" -version = "0.10.1" +name = "quote" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" +checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" dependencies = [ - "futures", - "log", - "netlink-packet-route", - "netlink-proto", - "nix", - "thiserror", - "tokio", + "proc-macro2 0.4.30", ] [[package]] -name = "rtoolbox" -version = "0.0.1" +name = "quote" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034e22c514f5c0cb8a10ff341b9b048b5ceb21591f31c8f44c43b960f9b3524a" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ - "libc", - "winapi", + "proc-macro2 1.0.78", ] [[package]] -name = "rtp" -version = "0.6.8" +name = "radium" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a095411ff00eed7b12e4c6a118ba984d113e1079582570d56a5ee723f11f80" -dependencies = [ - "async-trait", - "bytes", - "rand 0.8.5", - "serde", - "thiserror", - "webrtc-util", -] +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" [[package]] -name = "rustc-demangle" -version = "0.1.23" +name = "rand" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core 0.6.4", +] [[package]] -name = "rustc-hash" -version = "1.1.0" +name = "rand_chacha" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] [[package]] -name = "rustc-hex" -version = "2.1.0" +name = "rand_core" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] [[package]] -name = "rustc_version" -version = "0.4.0" +name = "rand_core" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "semver 1.0.18", + "getrandom 0.2.12", ] [[package]] -name = "rusticata-macros" -version = "4.1.0" +name = "rand_distr" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" dependencies = [ - "nom", + "num-traits", + "rand", ] [[package]] -name = "rustix" -version = "0.36.16" +name = "rawpointer" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6da3636faa25820d8648e0e31c5d519bbb01f72fdf57131f0f5f7da5fed36eab" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.1.4", - "windows-sys 0.45.0", -] +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] -name = "rustix" -version = "0.37.23" +name = "rayon" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" +checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", + "either", + "rayon-core", ] [[package]] -name = "rustix" -version = "0.38.21" +name = "rayon-core" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ - "bitflags 2.4.1", - "errno", - "libc", - "linux-raw-sys 0.4.10", - "windows-sys 0.48.0", + "crossbeam-deque", + "crossbeam-utils", ] [[package]] -name = "rustls" -version = "0.19.1" +name = "rbtag" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +checksum = "72c64936fcc0b811890a9d90020f3df5cec9c604efde88af7db6a35d365132a3" dependencies = [ - "base64 0.13.1", - "log", - "ring 0.16.20", - "sct 0.6.1", - "webpki 0.21.4", + "rbtag_derive", ] [[package]] -name = "rustls" -version = "0.20.8" +name = "rbtag_derive" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "b75511b710ccca8adbb211e04763bd8c78fed585b0ec188a20ed9b0dd95567c4" dependencies = [ - "log", - "ring 0.16.20", - "sct 0.7.0", - "webpki 0.22.2", + "proc-macro2 0.4.30", + "quote 0.6.13", + "syn 0.15.44", ] [[package]] -name = "rustls" -version = "0.21.5" +name = "rcgen" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79ea77c539259495ce8ca47f53e66ae0330a8819f67e23ac96ca02f50e7b7d36" +checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ - "log", + "pem", "ring 0.16.20", - "rustls-webpki", - "sct 0.7.0", + "time", + "yasna", ] [[package]] -name = "rustls-native-certs" -version = "0.6.3" +name = "redox_syscall" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "openssl-probe", - "rustls-pemfile", - "schannel", - "security-framework", + "bitflags 1.3.2", ] [[package]] -name = "rustls-pemfile" -version = "1.0.3" +name = "redox_syscall" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ - "base64 0.21.2", + "bitflags 1.3.2", ] [[package]] -name = "rustls-webpki" -version = "0.101.4" +name = "redox_users" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "ring 0.16.20", - "untrusted", + "getrandom 0.2.12", + "libredox", + "thiserror", ] [[package]] -name = "rustversion" -version = "1.0.14" +name = "ref-cast" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "c4846d4c50d1721b1a3bef8af76924eef20d5e723647333798c1b519b3a9473f" +dependencies = [ + "ref-cast-impl", +] [[package]] -name = "ruzstd" -version = "0.4.0" +name = "ref-cast-impl" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3ffab8f9715a0d455df4bbb9d21e91135aab3cd3ca187af0cd0c3c3f868fdc" +checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" dependencies = [ - "byteorder", - "thiserror-core", - "twox-hash", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] -name = "rw-stream-sink" -version = "0.3.0" +name = "regalloc2" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26338f5e09bb721b85b135ea05af7767c90b52f6de4f087d4f4a3a9d64e7dc04" +checksum = "80535183cae11b149d618fbd3c37e38d7cda589d82d7769e196ca9a9042d7621" dependencies = [ - "futures", - "pin-project", - "static_assertions", + "fxhash", + "log", + "slice-group-by", + "smallvec", ] [[package]] -name = "ryu" -version = "1.0.15" +name = "regex" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.4", + "regex-syntax 0.8.2", +] [[package]] -name = "safe_arch" -version = "0.7.1" +name = "regex-automata" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" dependencies = [ - "bytemuck", + "regex-syntax 0.6.29", ] [[package]] -name = "same-file" -version = "1.0.6" +name = "regex-automata" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +checksum = "3b7fa1134405e2ec9353fd416b17f8dacd46c473d7d3fd1cf202706a14eb792a" dependencies = [ - "winapi-util", + "aho-corasick", + "memchr", + "regex-syntax 0.8.2", ] [[package]] -name = "sc-allocator" -version = "4.1.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "log", - "sp-core", - "sp-wasm-interface", - "thiserror", -] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] -name = "sc-authority-discovery" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "relay-bridge-hub-kusama-client" +version = "0.1.0" dependencies = [ - "async-trait", - "futures", - "futures-timer", - "ip_network", - "libp2p", - "log", - "multihash", + "bp-bridge-hub-kusama", + "bp-bridge-hub-polkadot", + "bp-header-chain", + "bp-messages", + "bp-parachains", + "bp-polkadot", "parity-scale-codec", - "prost", - "prost-build", - "rand 0.8.5", - "sc-client-api", - "sc-network", - "sp-api", - "sp-authority-discovery", - "sp-blockchain", + "relay-substrate-client", + "scale-info", "sp-core", - "sp-keystore", "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", ] [[package]] -name = "sc-basic-authorship" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "relay-bridge-hub-polkadot-client" +version = "0.1.0" dependencies = [ - "futures", - "futures-timer", - "log", + "bp-bridge-hub-kusama", + "bp-bridge-hub-polkadot", + "bp-header-chain", + "bp-kusama", + "bp-messages", + "bp-parachains", + "bp-polkadot-bulletin", + "bp-polkadot-core", + "bp-runtime", "parity-scale-codec", - "sc-block-builder", - "sc-client-api", - "sc-proposer-metrics", - "sc-telemetry", - "sc-transaction-pool-api", - "sp-api", - "sp-blockchain", - "sp-consensus", + "relay-substrate-client", + "scale-info", + "sp-consensus-grandpa", "sp-core", - "sp-inherents", "sp-runtime", - "substrate-prometheus-endpoint", ] [[package]] -name = "sc-block-builder" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "relay-bridge-hub-rococo-client" +version = "0.1.0" dependencies = [ + "bp-bridge-hub-rococo", + "bp-header-chain", + "bp-messages", + "bp-parachains", + "bp-polkadot-core", + "bp-runtime", + "bridge-runtime-common", "parity-scale-codec", - "sc-client-api", - "sp-api", - "sp-block-builder", - "sp-blockchain", + "relay-substrate-client", + "scale-info", "sp-core", - "sp-inherents", "sp-runtime", + "sp-weights", + "subxt", ] [[package]] -name = "sc-chain-spec" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "relay-bridge-hub-westend-client" +version = "0.1.0" dependencies = [ - "memmap2", - "sc-chain-spec-derive", - "sc-client-api", - "sc-executor", - "sc-network", - "sc-telemetry", - "serde", - "serde_json", - "sp-blockchain", + "bp-bridge-hub-rococo", + "bp-bridge-hub-westend", + "bp-header-chain", + "bp-messages", + "bp-parachains", + "bp-polkadot-core", + "bp-rococo", + "bp-runtime", + "bridge-runtime-common", + "parity-scale-codec", + "relay-substrate-client", + "scale-info", + "sp-consensus-grandpa", "sp-core", "sp-runtime", - "sp-state-machine", + "sp-weights", + "subxt", ] [[package]] -name = "sc-chain-spec-derive" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "relay-kusama-client" +version = "0.1.0" dependencies = [ - "proc-macro-crate", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "bp-kusama", + "bp-polkadot-core", + "parity-scale-codec", + "relay-substrate-client", + "relay-utils", + "scale-info", + "sp-consensus-grandpa", + "sp-core", + "sp-runtime", + "sp-session", + "sp-weights", + "subxt", ] [[package]] -name = "sc-cli" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "relay-polkadot-bulletin-client" +version = "0.1.0" dependencies = [ - "array-bytes 6.1.0", - "chrono", - "clap 4.4.7", - "fdlimit", - "futures", - "libp2p-identity", - "log", - "names", + "bp-header-chain", + "bp-messages", + "bp-polkadot-bulletin", + "bp-polkadot-core", "parity-scale-codec", - "rand 0.8.5", - "regex", - "rpassword", - "sc-client-api", - "sc-client-db", - "sc-keystore", - "sc-mixnet", - "sc-network", - "sc-service", - "sc-telemetry", - "sc-tracing", - "sc-utils", - "serde", - "serde_json", - "sp-blockchain", + "relay-substrate-client", + "relay-utils", + "scale-info", + "sp-consensus-grandpa", "sp-core", - "sp-keyring", - "sp-keystore", - "sp-panic-handler", "sp-runtime", - "sp-version", - "thiserror", - "tiny-bip39", - "tokio", + "sp-session", + "sp-weights", + "subxt", ] [[package]] -name = "sc-client-api" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "relay-polkadot-client" +version = "0.1.0" dependencies = [ - "fnv", - "futures", - "log", + "bp-polkadot", + "bp-polkadot-core", "parity-scale-codec", - "parking_lot 0.12.1", - "sc-executor", - "sc-transaction-pool-api", - "sc-utils", - "sp-api", - "sp-blockchain", - "sp-consensus", + "relay-substrate-client", + "relay-utils", + "scale-info", + "sp-consensus-grandpa", "sp-core", - "sp-database", - "sp-externalities", "sp-runtime", - "sp-state-machine", - "sp-statement-store", - "sp-storage", - "sp-trie", - "substrate-prometheus-endpoint", + "sp-session", + "sp-weights", + "subxt", ] [[package]] -name = "sc-client-db" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "relay-rococo-client" +version = "0.1.0" dependencies = [ - "hash-db", - "kvdb", - "kvdb-memorydb", - "kvdb-rocksdb", - "linked-hash-map", - "log", - "parity-db", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-client-api", - "sc-state-db", - "schnellru", - "sp-arithmetic", - "sp-blockchain", + "bp-polkadot-core", + "bp-rococo", + "parity-scale-codec", + "relay-substrate-client", + "relay-utils", + "scale-info", + "sp-consensus-grandpa", "sp-core", - "sp-database", "sp-runtime", - "sp-state-machine", - "sp-trie", + "sp-session", + "sp-weights", + "subxt", ] [[package]] -name = "sc-consensus" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "relay-substrate-client" +version = "0.1.0" dependencies = [ + "async-std", "async-trait", + "bp-header-chain", + "bp-messages", + "bp-polkadot-core", + "bp-runtime", + "finality-relay", + "frame-support", + "frame-system", "futures", - "futures-timer", - "libp2p-identity", + "jsonrpsee 0.17.1", "log", - "mockall", - "parking_lot 0.12.1", - "sc-client-api", - "sc-utils", - "serde", - "sp-api", - "sp-blockchain", - "sp-consensus", + "num-traits", + "pallet-balances", + "pallet-bridge-messages", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-utility", + "parity-scale-codec", + "quick_cache", + "rand", + "relay-utils", + "sc-chain-spec", + "sc-rpc-api", + "sc-transaction-pool-api", + "scale-info", + "sp-consensus-grandpa", "sp-core", + "sp-rpc", "sp-runtime", - "sp-state-machine", - "substrate-prometheus-endpoint", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-trie", + "sp-version", + "staging-xcm", "thiserror", + "tokio", ] [[package]] -name = "sc-consensus-aura" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "relay-utils" +version = "0.1.0" dependencies = [ + "ansi_term", + "anyhow", + "async-std", "async-trait", + "backoff", + "bp-runtime", + "env_logger 0.11.1", "futures", + "isahc", + "jsonpath_lib", "log", - "parity-scale-codec", - "sc-block-builder", - "sc-client-api", - "sc-consensus", - "sc-consensus-slots", - "sc-telemetry", - "sp-api", - "sp-application-crypto", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-consensus-aura", - "sp-consensus-slots", - "sp-core", - "sp-inherents", - "sp-keystore", + "num-traits", + "serde_json", "sp-runtime", "substrate-prometheus-endpoint", + "sysinfo", "thiserror", + "time", + "tokio", ] [[package]] -name = "sc-consensus-babe" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "relay-westend-client" +version = "0.1.0" dependencies = [ - "async-trait", - "fork-tree", - "futures", - "log", - "num-bigint", - "num-rational", - "num-traits", + "bp-polkadot-core", + "bp-runtime", + "bp-westend", "parity-scale-codec", - "parking_lot 0.12.1", - "sc-client-api", - "sc-consensus", - "sc-consensus-epochs", - "sc-consensus-slots", - "sc-telemetry", - "sc-transaction-pool-api", - "sp-api", - "sp-application-crypto", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-consensus-slots", + "relay-substrate-client", + "relay-utils", + "scale-info", + "sp-consensus-grandpa", "sp-core", - "sp-inherents", - "sp-keystore", "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", + "sp-session", + "sp-weights", + "subxt", ] [[package]] -name = "sc-consensus-babe-rpc" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "resolv-conf" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" dependencies = [ - "futures", - "jsonrpsee 0.16.2", - "sc-consensus-babe", - "sc-consensus-epochs", - "sc-rpc-api", - "serde", - "sp-api", - "sp-application-crypto", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-core", - "sp-keystore", - "sp-runtime", - "thiserror", + "hostname", + "quick-error", ] [[package]] -name = "sc-consensus-beefy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ - "array-bytes 6.1.0", - "async-channel", - "async-trait", - "fnv", - "futures", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-client-api", - "sc-consensus", - "sc-network", - "sc-network-gossip", - "sc-network-sync", - "sc-utils", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-blockchain", - "sp-consensus", - "sp-consensus-beefy", - "sp-core", - "sp-keystore", - "sp-mmr-primitives", - "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", - "wasm-timer", + "hmac 0.12.1", + "subtle 2.5.0", ] [[package]] -name = "sc-consensus-beefy-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "ring" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof#b273d33f9981e2bb3375ab45faeb537f7ee35224" dependencies = [ - "futures", - "jsonrpsee 0.16.2", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-consensus-beefy", - "sc-rpc", - "serde", - "sp-consensus-beefy", - "sp-core", - "sp-runtime", - "thiserror", + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "blake2 0.10.6", + "common", + "fflonk", + "merlin 3.0.0", ] [[package]] -name = "sc-consensus-epochs" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" dependencies = [ - "fork-tree", - "parity-scale-codec", - "sc-client-api", - "sc-consensus", - "sp-blockchain", - "sp-runtime", + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted 0.7.1", + "web-sys", + "winapi", ] [[package]] -name = "sc-consensus-grandpa" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "ring" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +dependencies = [ + "cc", + "getrandom 0.2.12", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rustc-hex", +] + +[[package]] +name = "rtnetlink" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" dependencies = [ - "ahash 0.8.3", - "array-bytes 6.1.0", - "async-trait", - "dyn-clone", - "finality-grandpa", - "fork-tree", "futures", - "futures-timer", "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "rand 0.8.5", - "sc-block-builder", - "sc-chain-spec", - "sc-client-api", - "sc-consensus", - "sc-network", - "sc-network-common", - "sc-network-gossip", - "sc-telemetry", - "sc-transaction-pool-api", - "sc-utils", - "serde_json", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-blockchain", - "sp-consensus", - "sp-consensus-grandpa", - "sp-core", - "sp-keystore", - "sp-runtime", - "substrate-prometheus-endpoint", + "netlink-packet-route", + "netlink-proto", + "nix", "thiserror", + "tokio", ] [[package]] -name = "sc-consensus-grandpa-rpc" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "finality-grandpa", - "futures", - "jsonrpsee 0.16.2", - "log", - "parity-scale-codec", - "sc-client-api", - "sc-consensus-grandpa", - "sc-rpc", - "serde", - "sp-blockchain", - "sp-core", - "sp-runtime", - "thiserror", + "semver", ] [[package]] -name = "sc-consensus-slots" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" dependencies = [ - "async-trait", - "futures", - "futures-timer", - "log", - "parity-scale-codec", - "sc-client-api", - "sc-consensus", - "sc-telemetry", - "sp-arithmetic", - "sp-blockchain", - "sp-consensus", - "sp-consensus-slots", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-state-machine", + "nom", ] [[package]] -name = "sc-executor" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "rustix" +version = "0.36.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "305efbd14fde4139eb501df5f136994bb520b033fa9fbdce287507dc23b8c7ed" dependencies = [ - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-executor-common", - "sc-executor-wasmtime", - "schnellru", - "sp-api", - "sp-core", - "sp-externalities", - "sp-io", - "sp-panic-handler", - "sp-runtime-interface", - "sp-trie", - "sp-version", - "sp-wasm-interface", - "tracing", + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.1.4", + "windows-sys 0.45.0", ] [[package]] -name = "sc-executor-common" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "rustix" +version = "0.37.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" dependencies = [ - "sc-allocator", - "sp-maybe-compressed-blob", - "sp-wasm-interface", - "thiserror", - "wasm-instrument", + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", ] [[package]] -name = "sc-executor-wasmtime" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "rustix" +version = "0.38.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" dependencies = [ - "anyhow", - "cfg-if 1.0.0", + "bitflags 2.4.2", + "errno", "libc", + "linux-raw-sys 0.4.13", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" +dependencies = [ "log", - "rustix 0.36.16", - "sc-allocator", - "sc-executor-common", - "sp-runtime-interface", - "sp-wasm-interface", - "wasmtime", + "ring 0.16.20", + "sct", + "webpki", ] [[package]] -name = "sc-informant" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ - "ansi_term", - "futures", - "futures-timer", "log", - "sc-client-api", - "sc-network", - "sc-network-common", - "sp-blockchain", - "sp-runtime", + "ring 0.17.7", + "rustls-webpki", + "sct", ] [[package]] -name = "sc-keystore" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ - "array-bytes 6.1.0", - "parking_lot 0.12.1", - "serde_json", - "sp-application-crypto", - "sp-core", - "sp-keystore", - "thiserror", + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", ] [[package]] -name = "sc-mixnet" -version = "0.1.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "array-bytes 4.2.0", - "arrayvec 0.7.4", - "blake2 0.10.6", - "futures", - "futures-timer", - "libp2p-identity", - "log", - "mixnet", - "multiaddr", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-client-api", - "sc-network", - "sc-transaction-pool-api", - "sp-api", - "sp-consensus", - "sp-core", - "sp-keystore", - "sp-mixnet", - "sp-runtime", - "thiserror", + "base64 0.21.7", ] [[package]] -name = "sc-network" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "array-bytes 6.1.0", - "async-channel", - "async-trait", - "asynchronous-codec", - "bytes", - "either", - "fnv", - "futures", - "futures-timer", - "ip_network", - "libp2p", - "linked_hash_set", - "log", - "mockall", - "parity-scale-codec", - "parking_lot 0.12.1", - "partial_sort", - "pin-project", - "rand 0.8.5", - "sc-client-api", - "sc-network-common", - "sc-utils", - "serde", - "serde_json", - "smallvec", - "sp-arithmetic", - "sp-blockchain", - "sp-core", - "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", - "unsigned-varint", - "wasm-timer", - "zeroize", + "ring 0.17.7", + "untrusted 0.9.0", ] [[package]] -name = "sc-network-bitswap" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + +[[package]] +name = "ruzstd" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3ffab8f9715a0d455df4bbb9d21e91135aab3cd3ca187af0cd0c3c3f868fdc" dependencies = [ - "async-channel", - "cid", - "futures", - "libp2p-identity", - "log", - "prost", - "prost-build", - "sc-client-api", - "sc-network", - "sp-blockchain", - "sp-runtime", - "thiserror", - "unsigned-varint", + "byteorder", + "thiserror-core", + "twox-hash", ] [[package]] -name = "sc-network-common" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "rw-stream-sink" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26338f5e09bb721b85b135ea05af7767c90b52f6de4f087d4f4a3a9d64e7dc04" dependencies = [ - "async-trait", - "bitflags 1.3.2", "futures", - "libp2p-identity", - "parity-scale-codec", - "prost-build", - "sc-consensus", - "sp-consensus", - "sp-consensus-grandpa", - "sp-runtime", + "pin-project", + "static_assertions", ] [[package]] -name = "sc-network-gossip" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "ryu" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" + +[[package]] +name = "safe_arch" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" dependencies = [ - "ahash 0.8.3", - "futures", - "futures-timer", - "libp2p", - "log", - "sc-network", - "sc-network-common", - "schnellru", - "sp-runtime", - "substrate-prometheus-endpoint", - "tracing", + "bytemuck", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", ] [[package]] -name = "sc-network-light" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "sc-allocator" +version = "4.1.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "array-bytes 6.1.0", - "async-channel", - "futures", - "libp2p-identity", "log", - "parity-scale-codec", - "prost", - "prost-build", - "sc-client-api", - "sc-network", - "sp-blockchain", "sp-core", - "sp-runtime", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "thiserror", ] [[package]] -name = "sc-network-sync" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "sc-chain-spec" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "array-bytes 6.1.0", - "async-channel", - "async-trait", - "fork-tree", - "futures", - "futures-timer", - "libp2p", + "array-bytes 6.2.2", + "docify", "log", - "mockall", + "memmap2", "parity-scale-codec", - "prost", - "prost-build", + "sc-chain-spec-derive", "sc-client-api", - "sc-consensus", + "sc-executor", "sc-network", - "sc-network-common", - "sc-utils", - "schnellru", - "smallvec", - "sp-arithmetic", + "sc-telemetry", + "serde", + "serde_json", "sp-blockchain", - "sp-consensus", - "sp-consensus-grandpa", "sp-core", + "sp-genesis-builder", + "sp-io", "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", - "tokio-stream", + "sp-state-machine", ] [[package]] -name = "sc-network-transactions" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "sc-chain-spec-derive" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "array-bytes 6.1.0", - "futures", - "libp2p", - "log", - "parity-scale-codec", - "sc-network", - "sc-network-common", - "sc-utils", - "sp-consensus", - "sp-runtime", - "substrate-prometheus-endpoint", + "proc-macro-crate 3.1.0", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] -name = "sc-offchain" +name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "array-bytes 6.1.0", - "bytes", "fnv", "futures", - "futures-timer", - "hyper", - "hyper-rustls 0.24.1", - "libp2p", "log", - "num_cpus", - "once_cell", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", - "sc-client-api", - "sc-network", - "sc-network-common", + "sc-executor", "sc-transaction-pool-api", "sc-utils", "sp-api", + "sp-blockchain", + "sp-consensus", "sp-core", - "sp-externalities", - "sp-keystore", - "sp-offchain", + "sp-database", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-runtime", - "threadpool", - "tracing", -] - -[[package]] -name = "sc-proposer-metrics" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "log", + "sp-state-machine", + "sp-statement-store", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-trie", "substrate-prometheus-endpoint", ] [[package]] -name = "sc-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "sc-consensus" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ + "async-trait", "futures", - "jsonrpsee 0.16.2", + "futures-timer", + "libp2p-identity", "log", - "parity-scale-codec", + "mockall", "parking_lot 0.12.1", - "sc-block-builder", - "sc-chain-spec", "sc-client-api", - "sc-mixnet", - "sc-rpc-api", - "sc-tracing", - "sc-transaction-pool-api", "sc-utils", - "serde_json", + "serde", "sp-api", "sp-blockchain", + "sp-consensus", "sp-core", - "sp-keystore", - "sp-offchain", - "sp-rpc", "sp-runtime", - "sp-session", - "sp-statement-store", - "sp-version", - "tokio", + "sp-state-machine", + "substrate-prometheus-endpoint", + "thiserror", ] [[package]] -name = "sc-rpc-api" +name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "jsonrpsee 0.16.2", "parity-scale-codec", - "sc-chain-spec", - "sc-mixnet", - "sc-transaction-pool-api", - "scale-info", - "serde", - "serde_json", + "parking_lot 0.12.1", + "sc-executor-common", + "sc-executor-wasmtime", + "schnellru", + "sp-api", "sp-core", - "sp-rpc", - "sp-runtime", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-io", + "sp-panic-handler", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-trie", "sp-version", - "thiserror", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "tracing", ] [[package]] -name = "sc-rpc-server" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "sc-executor-common" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "http", - "jsonrpsee 0.16.2", - "log", - "serde_json", - "substrate-prometheus-endpoint", - "tokio", - "tower", - "tower-http", + "sc-allocator", + "sp-maybe-compressed-blob", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "thiserror", + "wasm-instrument", ] [[package]] -name = "sc-rpc-spec-v2" +name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "array-bytes 6.1.0", - "futures", - "futures-util", - "hex", - "jsonrpsee 0.16.2", + "anyhow", + "cfg-if 1.0.0", + "libc", "log", - "parity-scale-codec", "parking_lot 0.12.1", - "sc-chain-spec", - "sc-client-api", - "sc-transaction-pool-api", - "sc-utils", - "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-runtime", - "sp-version", - "thiserror", - "tokio", - "tokio-stream", + "rustix 0.36.17", + "sc-allocator", + "sc-executor-common", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "wasmtime", ] [[package]] -name = "sc-service" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "sc-mixnet" +version = "0.1.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "async-trait", - "directories", - "exit-future", + "array-bytes 4.2.0", + "arrayvec 0.7.4", + "blake2 0.10.6", + "bytes", "futures", "futures-timer", - "jsonrpsee 0.16.2", + "libp2p-identity", "log", + "mixnet", + "multiaddr", "parity-scale-codec", "parking_lot 0.12.1", - "pin-project", - "rand 0.8.5", - "sc-block-builder", - "sc-chain-spec", "sc-client-api", - "sc-client-db", - "sc-consensus", - "sc-executor", - "sc-informant", - "sc-keystore", "sc-network", - "sc-network-bitswap", - "sc-network-common", - "sc-network-light", - "sc-network-sync", - "sc-network-transactions", - "sc-rpc", - "sc-rpc-server", - "sc-rpc-spec-v2", - "sc-sysinfo", - "sc-telemetry", - "sc-tracing", - "sc-transaction-pool", "sc-transaction-pool-api", - "sc-utils", - "serde", - "serde_json", "sp-api", - "sp-blockchain", "sp-consensus", "sp-core", - "sp-externalities", "sp-keystore", + "sp-mixnet", "sp-runtime", - "sp-session", - "sp-state-machine", - "sp-storage", - "sp-transaction-pool", - "sp-transaction-storage-proof", - "sp-trie", - "sp-version", - "static_init 1.0.3", - "substrate-prometheus-endpoint", - "tempfile", "thiserror", - "tokio", - "tracing", - "tracing-futures", ] [[package]] -name = "sc-state-db" +name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ + "array-bytes 6.2.2", + "async-channel 1.9.0", + "async-trait", + "asynchronous-codec", + "bytes", + "either", + "fnv", + "futures", + "futures-timer", + "ip_network", + "libp2p", + "linked_hash_set", "log", + "mockall", "parity-scale-codec", "parking_lot 0.12.1", - "sp-core", -] - -[[package]] -name = "sc-storage-monitor" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "clap 4.4.7", - "fs4", - "log", - "sc-client-db", - "sp-core", - "thiserror", - "tokio", -] - -[[package]] -name = "sc-sync-state-rpc" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "jsonrpsee 0.16.2", - "parity-scale-codec", - "sc-chain-spec", + "partial_sort", + "pin-project", + "rand", "sc-client-api", - "sc-consensus-babe", - "sc-consensus-epochs", - "sc-consensus-grandpa", + "sc-network-common", + "sc-utils", "serde", "serde_json", + "smallvec", + "sp-arithmetic", "sp-blockchain", + "sp-core", "sp-runtime", + "substrate-prometheus-endpoint", "thiserror", + "tokio", + "tokio-stream", + "unsigned-varint", + "wasm-timer", + "zeroize", ] [[package]] -name = "sc-sysinfo" -version = "6.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "futures", - "libc", - "log", - "rand 0.8.5", - "rand_pcg", - "regex", - "sc-telemetry", - "serde", - "serde_json", - "sp-core", - "sp-io", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "sc-telemetry" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "sc-network-common" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "chrono", + "async-trait", + "bitflags 1.3.2", "futures", - "libp2p", - "log", - "parking_lot 0.12.1", - "pin-project", - "rand 0.8.5", - "sc-utils", - "serde", - "serde_json", - "thiserror", - "wasm-timer", + "libp2p-identity", + "parity-scale-codec", + "prost-build", + "sc-consensus", + "sp-consensus", + "sp-consensus-grandpa", + "sp-runtime", ] [[package]] -name = "sc-tracing" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "sc-rpc-api" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "ansi_term", - "atty", - "chrono", - "lazy_static", - "libc", - "log", - "parking_lot 0.12.1", - "regex", - "rustc-hash", - "sc-client-api", - "sc-tracing-proc-macro", + "jsonrpsee 0.16.3", + "parity-scale-codec", + "sc-chain-spec", + "sc-mixnet", + "sc-transaction-pool-api", + "scale-info", "serde", - "sp-api", - "sp-blockchain", + "serde_json", "sp-core", "sp-rpc", "sp-runtime", - "sp-tracing", + "sp-version", "thiserror", - "tracing", - "tracing-log", - "tracing-subscriber", -] - -[[package]] -name = "sc-tracing-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "proc-macro-crate", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", ] [[package]] -name = "sc-transaction-pool" +name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "async-trait", + "chrono", "futures", - "futures-timer", - "linked-hash-map", + "libp2p", "log", - "parity-scale-codec", "parking_lot 0.12.1", - "sc-client-api", - "sc-transaction-pool-api", + "pin-project", + "rand", "sc-utils", "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-runtime", - "sp-tracing", - "sp-transaction-pool", - "substrate-prometheus-endpoint", + "serde_json", "thiserror", + "wasm-timer", ] [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "async-trait", "futures", @@ -12735,9 +7483,9 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "async-channel", + "async-channel 1.9.0", "futures", "futures-timer", "lazy_static", @@ -12780,9 +7528,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27873eb6005868f8cc72dcfe109fae664cf51223d35387bc2f28be4c28d94c47" dependencies = [ "darling 0.14.4", - "proc-macro-crate", - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro-crate 1.1.3", + "proc-macro2 1.0.78", + "quote 1.0.35", "syn 1.0.109", ] @@ -12808,9 +7556,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "995491f110efdc6bea96d6a746140e32bfceb4ea47510750a5467295a4707a25" dependencies = [ "darling 0.14.4", - "proc-macro-crate", - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro-crate 1.1.3", + "proc-macro2 1.0.78", + "quote 1.0.35", "syn 1.0.109", ] @@ -12834,9 +7582,9 @@ version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ - "proc-macro-crate", - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro-crate 1.1.3", + "proc-macro2 1.0.78", + "quote 1.0.35", "syn 1.0.109", ] @@ -12862,11 +7610,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -12875,7 +7623,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.7", "cfg-if 1.0.0", "hashbrown 0.13.2", ] @@ -12889,12 +7637,10 @@ dependencies = [ "arrayref", "arrayvec 0.5.2", "curve25519-dalek 2.1.3", - "getrandom 0.1.16", "merlin 2.0.1", - "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] @@ -12915,61 +7661,38 @@ dependencies = [ ] [[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "scratch" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152" - -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring 0.16.20", - "untrusted", -] - -[[package]] -name = "sct" -version = "0.7.0" +name = "schnorrkel" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" dependencies = [ - "ring 0.16.20", - "untrusted", + "aead", + "arrayref", + "arrayvec 0.7.4", + "curve25519-dalek 4.1.1", + "getrandom_or_panic", + "merlin 3.0.0", + "rand_core 0.6.4", + "serde_bytes", + "sha2 0.10.8", + "subtle 2.5.0", + "zeroize", ] [[package]] -name = "sdp" -version = "0.5.3" +name = "scopeguard" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d22a5ef407871893fd72b4562ee15e4742269b173959db4b8df6f538c414e13" -dependencies = [ - "rand 0.8.5", - "substring", - "thiserror", - "url", -] +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] -name = "sec1" -version = "0.3.0" +name = "sct" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "base16ct 0.1.1", - "der 0.6.1", - "generic-array 0.14.7", - "pkcs8 0.9.0", - "subtle 2.4.1", - "zeroize", + "ring 0.17.7", + "untrusted 0.9.0", ] [[package]] @@ -12978,28 +7701,28 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ - "base16ct 0.2.0", - "der 0.7.7", + "base16ct", + "der", "generic-array 0.14.7", - "pkcs8 0.10.2", - "subtle 2.4.1", + "pkcs8", + "subtle 2.5.0", "zeroize", ] [[package]] name = "secp256k1" -version = "0.24.3" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" +checksum = "3f622567e3b4b38154fb8190bcf6b160d7a4301d70595a49195b48c116007a27" dependencies = [ "secp256k1-sys", ] [[package]] name = "secp256k1-sys" -version = "0.6.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" +checksum = "e5d1746aae42c19d583c3c1a8c646bfad910498e2051c551a7f2e3c0c9fbb7eb" dependencies = [ "cc", ] @@ -13015,9 +7738,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -13028,9 +7751,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -13038,55 +7761,46 @@ dependencies = [ [[package]] name = "semver" -version = "0.6.0" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" -dependencies = [ - "semver-parser", -] +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" [[package]] -name = "semver" -version = "1.0.18" +name = "serde" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ - "serde", + "serde_derive", ] [[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - -[[package]] -name = "serde" -version = "1.0.190" +name = "serde_bytes" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" +checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" dependencies = [ - "serde_derive", + "serde", ] [[package]] name = "serde_derive" -version = "1.0.190" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] name = "serde_json" -version = "1.0.107" +version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.2.2", "itoa", "ryu", "serde", @@ -13094,9 +7808,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] @@ -13114,17 +7828,6 @@ dependencies = [ "opaque-debug 0.3.0", ] -[[package]] -name = "sha1" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.10.7", -] - [[package]] name = "sha2" version = "0.8.2" @@ -13152,9 +7855,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -13173,19 +7876,13 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] -[[package]] -name = "shlex" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" - [[package]] name = "signal-hook" version = "0.3.17" @@ -13202,8 +7899,8 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4aa94397e2023af5b7cff5b8d4785e935cfb77f0e4aab0cae3b26258ace556" dependencies = [ - "async-io", - "futures-lite", + "async-io 1.13.0", + "futures-lite 1.13.0", "libc", "signal-hook", ] @@ -13219,19 +7916,9 @@ dependencies = [ [[package]] name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" -dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", -] - -[[package]] -name = "signature" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", "rand_core 0.6.4", @@ -13250,17 +7937,22 @@ dependencies = [ "wide", ] +[[package]] +name = "simple-mermaid" +version = "0.1.0" +source = "git+https://github.com/kianenigma/simple-mermaid.git?rev=e48b187bcfd5cc75111acd9d241f1bd36604344b#e48b187bcfd5cc75111acd9d241f1bd36604344b" + [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] @@ -13271,43 +7963,22 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" -[[package]] -name = "slot-range-helper" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "enumn", - "parity-scale-codec", - "paste", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "slotmap" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" -dependencies = [ - "version_check", -] - [[package]] name = "sluice" version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d7400c0eff44aa2fcb5e31a5f24ba9716ed90138769e4977a2ba6014ae63eb5" dependencies = [ - "async-channel", + "async-channel 1.9.0", "futures-core", "futures-io", ] [[package]] name = "smallvec" -version = "1.11.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "smol" @@ -13315,15 +7986,15 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1" dependencies = [ - "async-channel", + "async-channel 1.9.0", "async-executor", "async-fs", - "async-io", - "async-lock", + "async-io 1.13.0", + "async-lock 2.8.0", "async-net", "async-process", "blocking", - "futures-lite", + "futures-lite 1.13.0", ] [[package]] @@ -13333,24 +8004,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1cce5e2881b30bad7ef89f383a816ad0b22c45915911f28499026de4a76d20ee" dependencies = [ "arrayvec 0.7.4", - "async-lock", + "async-lock 2.8.0", "atomic", - "base64 0.21.2", + "base64 0.21.7", "bip39", "blake2-rfc", "bs58 0.5.0", "crossbeam-queue", "derive_more", - "ed25519-zebra 3.1.0", + "ed25519-zebra", "either", - "event-listener", + "event-listener 2.5.3", "fnv", "futures-channel", "futures-util", - "hashbrown 0.14.0", + "hashbrown 0.14.3", "hex", "hmac 0.12.1", - "itertools 0.10.5", + "itertools", "libsecp256k1", "merlin 3.0.0", "no-std-net", @@ -13360,13 +8031,13 @@ dependencies = [ "num-traits", "pbkdf2 0.12.2", "pin-project", - "rand 0.8.5", - "rand_chacha 0.3.1", + "rand", + "rand_chacha", "ruzstd", "schnorrkel 0.10.2", "serde", "serde_json", - "sha2 0.10.7", + "sha2 0.10.8", "siphasher", "slab", "smallvec", @@ -13375,61 +8046,7 @@ dependencies = [ "soketto", "tiny-keccak", "twox-hash", - "wasmi 0.30.0", -] - -[[package]] -name = "smoldot" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0bb30cf57b7b5f6109ce17c3164445e2d6f270af2cb48f6e4d31c2967c9a9f5" -dependencies = [ - "arrayvec 0.7.4", - "async-lock", - "atomic-take", - "base64 0.21.2", - "bip39", - "blake2-rfc", - "bs58 0.5.0", - "chacha20 0.9.1", - "crossbeam-queue", - "derive_more", - "ed25519-zebra 4.0.2", - "either", - "event-listener", - "fnv", - "futures-lite", - "futures-util", - "hashbrown 0.14.0", - "hex", - "hmac 0.12.1", - "itertools 0.11.0", - "libsecp256k1", - "merlin 3.0.0", - "no-std-net", - "nom", - "num-bigint", - "num-rational", - "num-traits", - "pbkdf2 0.12.2", - "pin-project", - "poly1305 0.8.0", - "rand 0.8.5", - "rand_chacha 0.3.1", - "ruzstd", - "schnorrkel 0.10.2", - "serde", - "serde_json", - "sha2 0.10.7", - "sha3", - "siphasher", - "slab", - "smallvec", - "soketto", - "twox-hash", - "wasmi 0.31.0", - "x25519-dalek 2.0.0", - "zeroize", + "wasmi", ] [[package]] @@ -13438,93 +8055,51 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b2f7b4687b83ff244ef6137735ed5716ad37dcdf3ee16c4eb1a32fb9808fa47" dependencies = [ - "async-lock", + "async-lock 2.8.0", "blake2-rfc", "derive_more", "either", - "event-listener", + "event-listener 2.5.3", "fnv", "futures-channel", "futures-util", - "hashbrown 0.14.0", + "hashbrown 0.14.3", "hex", - "itertools 0.10.5", + "itertools", "log", "lru 0.10.1", "parking_lot 0.12.1", - "rand 0.8.5", - "serde", - "serde_json", - "siphasher", - "slab", - "smol", - "smoldot 0.8.0", -] - -[[package]] -name = "smoldot-light" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "256b5bad1d6b49045e95fe87492ce73d5af81545d8b4d8318a872d2007024c33" -dependencies = [ - "async-channel", - "async-lock", - "base64 0.21.2", - "blake2-rfc", - "derive_more", - "either", - "event-listener", - "fnv", - "futures-channel", - "futures-lite", - "futures-util", - "hashbrown 0.14.0", - "hex", - "itertools 0.11.0", - "log", - "lru 0.11.0", - "no-std-net", - "parking_lot 0.12.1", - "pin-project", - "rand 0.8.5", - "rand_chacha 0.3.1", + "rand", "serde", "serde_json", "siphasher", - "slab", - "smol", - "smoldot 0.11.0", - "zeroize", -] - -[[package]] -name = "snap" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" + "slab", + "smol", + "smoldot", +] [[package]] name = "snow" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9d1425eb528a21de2755c75af4c9b5d57f50a0d4c3b7f1828a4cd03f8ba155" +checksum = "2e87c18a6608909007e75a60e04d03eda77b601c94de1c74d9a9dc2c04ab789a" dependencies = [ - "aes-gcm 0.9.4", + "aes-gcm", "blake2 0.10.6", "chacha20poly1305", - "curve25519-dalek 4.0.0", + "curve25519-dalek 4.1.1", "rand_core 0.6.4", - "ring 0.16.20", + "ring 0.17.7", "rustc_version", - "sha2 0.10.7", - "subtle 2.4.1", + "sha2 0.10.8", + "subtle 2.5.0", ] [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", @@ -13532,9 +8107,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.3" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", "windows-sys 0.48.0", @@ -13553,14 +8128,14 @@ dependencies = [ "http", "httparse", "log", - "rand 0.8.5", + "rand", "sha-1", ] [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "hash-db", "log", @@ -13568,7 +8143,7 @@ dependencies = [ "scale-info", "sp-api-proc-macro", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-metadata-ir", "sp-runtime", "sp-state-machine", @@ -13581,21 +8156,21 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "Inflector", "blake2 0.10.6", - "expander 2.0.0", - "proc-macro-crate", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "expander", + "proc-macro-crate 3.1.0", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] name = "sp-application-crypto" version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "parity-scale-codec", "scale-info", @@ -13608,7 +8183,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "integer-sqrt", "num-traits", @@ -13620,25 +8195,32 @@ dependencies = [ ] [[package]] -name = "sp-authority-discovery" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "sp-ark-bls12-381" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-application-crypto", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "ark-bls12-381-ext", + "sp-crypto-ec-utils", +] + +[[package]] +name = "sp-ark-ed-on-bls12-381-bandersnatch" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" +dependencies = [ + "ark-ed-on-bls12-381-bandersnatch-ext", + "sp-crypto-ec-utils", ] [[package]] -name = "sp-block-builder" +name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ + "parity-scale-codec", + "scale-info", "sp-api", - "sp-inherents", + "sp-application-crypto", "sp-runtime", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] @@ -13646,7 +8228,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "futures", "log", @@ -13664,7 +8246,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "async-trait", "futures", @@ -13676,46 +8258,10 @@ dependencies = [ "thiserror", ] -[[package]] -name = "sp-consensus-aura" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "async-trait", - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-application-crypto", - "sp-consensus-slots", - "sp-inherents", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-timestamp", -] - -[[package]] -name = "sp-consensus-babe" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "async-trait", - "parity-scale-codec", - "scale-info", - "serde", - "sp-api", - "sp-application-crypto", - "sp-consensus-slots", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-timestamp", -] - [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "lazy_static", "parity-scale-codec", @@ -13734,7 +8280,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "finality-grandpa", "log", @@ -13752,7 +8298,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "parity-scale-codec", "scale-info", @@ -13764,46 +8310,46 @@ dependencies = [ [[package]] name = "sp-core" version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "array-bytes 6.1.0", + "array-bytes 6.2.2", "bandersnatch_vrfs", + "bip39", "bitflags 1.3.2", "blake2 0.10.6", "bounded-collections", "bs58 0.5.0", "dyn-clonable", - "ed25519-zebra 3.1.0", + "ed25519-zebra", "futures", "hash-db", "hash256-std-hasher", "impl-serde", - "lazy_static", + "itertools", "libsecp256k1", "log", - "merlin 2.0.1", + "merlin 3.0.0", "parity-scale-codec", "parking_lot 0.12.1", "paste", "primitive-types", - "rand 0.8.5", - "regex", + "rand", "scale-info", - "schnorrkel 0.9.1", + "schnorrkel 0.11.4", "secp256k1", "secrecy", "serde", "sp-core-hashing 9.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-debug-derive", - "sp-externalities", - "sp-runtime-interface", + "sp-debug-derive 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-storage", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "ss58-registry", "substrate-bip39", "thiserror", - "tiny-bip39", "tracing", + "w3f-bls", "zeroize", ] @@ -13816,7 +8362,7 @@ dependencies = [ "blake2b_simd", "byteorder", "digest 0.10.7", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", "sp-std 8.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "twox-hash", @@ -13825,12 +8371,12 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "9.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "blake2b_simd", "byteorder", "digest 0.10.7", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", "twox-hash", ] @@ -13838,17 +8384,38 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "9.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "quote 1.0.33", + "quote 1.0.35", "sp-core-hashing 9.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "syn 2.0.38", + "syn 2.0.48", +] + +[[package]] +name = "sp-crypto-ec-utils" +version = "0.4.1" +source = "git+https://github.com/paritytech/polkadot-sdk#dcc76525d98a097be152293eee3389f6af5c4404" +dependencies = [ + "ark-bls12-377", + "ark-bls12-377-ext", + "ark-bls12-381", + "ark-bls12-381-ext", + "ark-bw6-761", + "ark-bw6-761-ext", + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ed-on-bls12-377-ext", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ed-on-bls12-381-bandersnatch-ext", + "ark-scale", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", ] [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -13857,28 +8424,49 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" +dependencies = [ + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", +] + +[[package]] +name = "sp-debug-derive" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] name = "sp-externalities" version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "environmental", "parity-scale-codec", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-storage", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", +] + +[[package]] +name = "sp-externalities" +version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk#dcc76525d98a097be152293eee3389f6af5c4404" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk)", ] [[package]] name = "sp-genesis-builder" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "serde_json", "sp-api", @@ -13889,7 +8477,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -13903,7 +8491,7 @@ dependencies = [ [[package]] name = "sp-io" version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "bytes", "ed25519-dalek", @@ -13913,12 +8501,12 @@ dependencies = [ "rustversion", "secp256k1", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-keystore", - "sp-runtime-interface", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-state-machine", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-tracing", + "sp-tracing 10.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-trie", "tracing", "tracing-core", @@ -13927,9 +8515,8 @@ dependencies = [ [[package]] name = "sp-keyring" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "lazy_static", "sp-core", "sp-runtime", "strum 0.24.1", @@ -13938,19 +8525,19 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.27.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "thiserror", ] [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "thiserror", "zstd 0.12.4", @@ -13959,7 +8546,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "frame-metadata 16.0.0", "parity-scale-codec", @@ -13970,7 +8557,7 @@ dependencies = [ [[package]] name = "sp-mixnet" version = "0.1.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "parity-scale-codec", "scale-info", @@ -13982,7 +8569,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "ckb-merkle-mountain-range 0.5.2", "log", @@ -13991,40 +8578,16 @@ dependencies = [ "serde", "sp-api", "sp-core", - "sp-debug-derive", + "sp-debug-derive 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-runtime", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "thiserror", ] -[[package]] -name = "sp-npos-elections" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "sp-arithmetic", - "sp-core", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - -[[package]] -name = "sp-offchain" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "sp-api", - "sp-core", - "sp-runtime", -] - [[package]] name = "sp-panic-handler" version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "backtrace", "lazy_static", @@ -14034,7 +8597,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "rustc-hash", "serde", @@ -14044,17 +8607,19 @@ dependencies = [ [[package]] name = "sp-runtime" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ + "docify", "either", "hash256-std-hasher", "impl-trait-for-tuples", "log", "parity-scale-codec", "paste", - "rand 0.8.5", + "rand", "scale-info", "serde", + "simple-mermaid", "sp-application-crypto", "sp-arithmetic", "sp-core", @@ -14066,37 +8631,69 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities", - "sp-runtime-interface-proc-macro", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-runtime-interface-proc-macro 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-storage", - "sp-tracing", - "sp-wasm-interface", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-tracing 10.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#dcc76525d98a097be152293eee3389f6af5c4404" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-runtime-interface-proc-macro 11.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-tracing 10.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "static_assertions", ] [[package]] name = "sp-runtime-interface-proc-macro" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" +dependencies = [ + "Inflector", + "expander", + "proc-macro-crate 3.1.0", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "Inflector", - "proc-macro-crate", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "expander", + "proc-macro-crate 3.1.0", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "parity-scale-codec", "scale-info", @@ -14111,7 +8708,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -14125,16 +8722,16 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.28.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "hash-db", "log", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "smallvec", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-panic-handler", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-trie", @@ -14146,22 +8743,22 @@ dependencies = [ [[package]] name = "sp-statement-store" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "aes-gcm 0.10.2", - "curve25519-dalek 4.0.0", + "aes-gcm", + "curve25519-dalek 4.1.1", "ed25519-dalek", "hkdf", "parity-scale-codec", - "rand 0.8.5", + "rand", "scale-info", - "sha2 0.10.7", + "sha2 0.10.8", "sp-api", "sp-application-crypto", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-runtime", - "sp-runtime-interface", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "thiserror", "x25519-dalek 2.0.0", @@ -14176,25 +8773,43 @@ checksum = "53458e3c57df53698b3401ec0934bea8e8cfce034816873c0b0abbd83d7bac0d" [[package]] name = "sp-std" version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" + +[[package]] +name = "sp-std" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#dcc76525d98a097be152293eee3389f6af5c4404" [[package]] name = "sp-storage" version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "impl-serde", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive", + "sp-debug-derive 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] +[[package]] +name = "sp-storage" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#dcc76525d98a097be152293eee3389f6af5c4404" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", +] + [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "async-trait", "parity-scale-codec", @@ -14207,7 +8822,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "parity-scale-codec", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", @@ -14217,45 +8832,34 @@ dependencies = [ ] [[package]] -name = "sp-transaction-pool" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "sp-api", - "sp-runtime", -] - -[[package]] -name = "sp-transaction-storage-proof" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "sp-tracing" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "async-trait", "parity-scale-codec", - "scale-info", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-trie", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "tracing", + "tracing-core", + "tracing-subscriber", ] [[package]] name = "sp-trie" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.7", "hash-db", - "hashbrown 0.13.2", "lazy_static", "memory-db", "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", + "rand", "scale-info", "schnellru", "sp-core", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "thiserror", "tracing", @@ -14266,7 +8870,7 @@ dependencies = [ [[package]] name = "sp-version" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "impl-serde", "parity-scale-codec", @@ -14283,18 +8887,18 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "parity-scale-codec", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] name = "sp-wasm-interface" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -14304,18 +8908,31 @@ dependencies = [ "wasmtime", ] +[[package]] +name = "sp-wasm-interface" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#dcc76525d98a097be152293eee3389f6af5c4404" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "wasmtime", +] + [[package]] name = "sp-weights" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ + "bounded-collections", "parity-scale-codec", "scale-info", "serde", "smallvec", "sp-arithmetic", - "sp-core", - "sp-debug-derive", + "sp-debug-derive 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] @@ -14331,47 +8948,26 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -[[package]] -name = "spinners" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08615eea740067d9899969bc2891c68a19c315cb1f66640af9a9ecb91b13bcab" -dependencies = [ - "lazy_static", - "maplit", - "strum 0.24.1", -] - -[[package]] -name = "spki" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" -dependencies = [ - "base64ct", - "der 0.6.1", -] - [[package]] name = "spki" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", - "der 0.7.7", + "der", ] [[package]] name = "ss58-registry" -version = "1.41.0" +version = "1.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfc443bad666016e012538782d9e3006213a7db43e9fb1dda91657dc06a6fa08" +checksum = "b1114ee5900b8569bbc8b1a014a942f937b752af4b44f4607430b5f86cedaac0" dependencies = [ "Inflector", "num-format", - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.78", + "quote 1.0.35", "serde", "serde_json", "unicode-xid 0.2.4", @@ -14386,8 +8982,9 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staging-xcm" version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ + "array-bytes 6.2.2", "bounded-collections", "derivative", "environmental", @@ -14403,7 +9000,7 @@ dependencies = [ [[package]] name = "staging-xcm-builder" version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "frame-support", "frame-system", @@ -14425,7 +9022,7 @@ dependencies = [ [[package]] name = "staging-xcm-executor" version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "environmental", "frame-benchmarking", @@ -14433,6 +9030,7 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec", + "scale-info", "sp-arithmetic", "sp-core", "sp-io", @@ -14448,74 +9046,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "static_init" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11b73400442027c4adedda20a9f9b7945234a5bd8d5f7e86da22bd5d0622369c" -dependencies = [ - "cfg_aliases", - "libc", - "parking_lot 0.11.2", - "static_init_macro 0.5.0", -] - -[[package]] -name = "static_init" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a2a1c578e98c1c16fc3b8ec1328f7659a500737d7a0c6d625e73e830ff9c1f6" -dependencies = [ - "bitflags 1.3.2", - "cfg_aliases", - "libc", - "parking_lot 0.11.2", - "parking_lot_core 0.8.6", - "static_init_macro 1.0.2", - "winapi", -] - -[[package]] -name = "static_init_macro" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2261c91034a1edc3fc4d1b80e89d82714faede0515c14a75da10cb941546bbf" -dependencies = [ - "cfg_aliases", - "memchr", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", -] - -[[package]] -name = "static_init_macro" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a2595fc3aa78f2d0e45dd425b22282dd863273761cc77780914b2cf3003acf" -dependencies = [ - "cfg_aliases", - "memchr", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", -] - -[[package]] -name = "storage-proof-fuzzer" -version = "0.1.0" -dependencies = [ - "bp-runtime", - "env_logger", - "honggfuzz", - "log", - "sp-core", - "sp-runtime", - "sp-state-machine", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-trie", -] - [[package]] name = "strsim" version = "0.8.0" @@ -14534,7 +9064,7 @@ version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" dependencies = [ - "clap 2.34.0", + "clap", "lazy_static", "structopt-derive", ] @@ -14547,8 +9077,8 @@ checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ "heck 0.3.3", "proc-macro-error", - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.78", + "quote 1.0.35", "syn 1.0.109", ] @@ -14563,11 +9093,11 @@ dependencies = [ [[package]] name = "strum" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +checksum = "723b93e8addf9aa965ebe2d11da6d7540fa2283fcea14b3371ff055f7ba13f5f" dependencies = [ - "strum_macros 0.25.2", + "strum_macros 0.26.1", ] [[package]] @@ -14577,49 +9107,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ "heck 0.4.1", - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.78", + "quote 1.0.35", "rustversion", "syn 1.0.109", ] [[package]] name = "strum_macros" -version = "0.25.2" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" +checksum = "7a3417fc93d76740d974a01654a09777cb500428cc874ca9f45edfe0c4d4cd18" dependencies = [ "heck 0.4.1", - "proc-macro2 1.0.69", - "quote 1.0.33", - "rustversion", - "syn 2.0.38", -] - -[[package]] -name = "stun" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7e94b1ec00bad60e6410e058b52f1c66de3dc5fe4d62d09b3e52bb7d3b73e25" -dependencies = [ - "base64 0.13.1", - "crc", - "lazy_static", - "md-5", - "rand 0.8.5", - "ring 0.16.20", - "subtle 2.4.1", - "thiserror", - "tokio", - "url", - "webrtc-util", + "proc-macro2 1.0.78", + "quote 1.0.35", + "rustversion", + "syn 2.0.48", ] [[package]] name = "substrate-bip39" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" +checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", @@ -14628,34 +9139,10 @@ dependencies = [ "zeroize", ] -[[package]] -name = "substrate-build-script-utils" -version = "3.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" - -[[package]] -name = "substrate-frame-rpc-system" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "frame-system-rpc-runtime-api", - "futures", - "jsonrpsee 0.16.2", - "log", - "parity-scale-codec", - "sc-rpc-api", - "sc-transaction-pool-api", - "sp-api", - "sp-block-builder", - "sp-blockchain", - "sp-core", - "sp-runtime", -] - [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "hyper", "log", @@ -14671,24 +9158,25 @@ dependencies = [ "anyhow", "async-std", "async-trait", + "bp-bridge-hub-polkadot", + "bp-bridge-hub-rococo", "bp-header-chain", "bp-messages", - "bp-millau", "bp-parachains", + "bp-polkadot", "bp-polkadot-bulletin", "bp-polkadot-core", - "bp-rialto", - "bp-rialto-parachain", + "bp-rococo", "bp-runtime", "bp-test-utils", "bridge-runtime-common", + "env_logger 0.11.1", "finality-grandpa", "frame-support", "futures", "hex", "hex-literal", "log", - "millau-runtime", "num-format", "num-traits", "pallet-bridge-messages", @@ -14696,38 +9184,26 @@ dependencies = [ "pallet-xcm-bridge-hub", "parachains-relay", "parity-scale-codec", - "polkadot-parachain-primitives", - "polkadot-primitives", - "polkadot-runtime-common", - "polkadot-runtime-parachains", "rbtag", "relay-bridge-hub-kusama-client", "relay-bridge-hub-polkadot-client", "relay-bridge-hub-rococo-client", - "relay-bridge-hub-wococo-client", + "relay-bridge-hub-westend-client", "relay-kusama-client", - "relay-millau-client", "relay-polkadot-bulletin-client", "relay-polkadot-client", - "relay-rialto-client", - "relay-rialto-parachain-client", "relay-rococo-client", "relay-substrate-client", "relay-utils", "relay-westend-client", - "relay-wococo-client", - "rialto-parachain-runtime", - "rialto-runtime", "rustc-hex", "signal-hook", "signal-hook-async-std", "sp-core", "sp-keyring", "sp-runtime", - "staging-xcm", - "staging-xcm-executor", "structopt", - "strum 0.25.0", + "strum 0.26.1", "substrate-relay-helper", "tempfile", ] @@ -14744,11 +9220,8 @@ dependencies = [ "bp-parachains", "bp-polkadot-core", "bp-relayers", - "bp-rialto", - "bp-rialto-parachain", "bp-rococo", "bp-runtime", - "bp-wococo", "bridge-runtime-common", "equivocation-detector", "finality-grandpa", @@ -14768,75 +9241,17 @@ dependencies = [ "pallet-transaction-payment", "parachains-relay", "parity-scale-codec", - "relay-rialto-client", + "relay-bridge-hub-rococo-client", + "relay-bridge-hub-westend-client", "relay-rococo-client", "relay-substrate-client", "relay-utils", - "relay-wococo-client", - "rialto-runtime", "sp-consensus-grandpa", "sp-core", "sp-runtime", "thiserror", ] -[[package]] -name = "substrate-rpc-client" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "async-trait", - "jsonrpsee 0.16.2", - "log", - "sc-rpc-api", - "serde", - "sp-runtime", -] - -[[package]] -name = "substrate-state-trie-migration-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "jsonrpsee 0.16.2", - "parity-scale-codec", - "sc-client-api", - "sc-rpc-api", - "serde", - "sp-core", - "sp-runtime", - "sp-state-machine", - "sp-trie", - "trie-db", -] - -[[package]] -name = "substrate-wasm-builder" -version = "5.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "ansi_term", - "build-helper", - "cargo_metadata", - "filetime", - "parity-wasm", - "sp-maybe-compressed-blob", - "strum 0.24.1", - "tempfile", - "toml 0.7.6", - "walkdir", - "wasm-opt", -] - -[[package]] -name = "substring" -version = "1.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ee6433ecef213b2e72f587ef64a2f5943e7cd16fbd82dbe8bc07486c534c86" -dependencies = [ - "autocfg", -] - [[package]] name = "subtle" version = "1.0.0" @@ -14845,9 +9260,9 @@ checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" [[package]] name = "subtle" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "subtle-ng" @@ -14870,7 +9285,7 @@ dependencies = [ "futures", "hex", "impl-serde", - "jsonrpsee 0.20.1", + "jsonrpsee 0.20.3", "parity-scale-codec", "primitive-types", "scale-bits", @@ -14897,13 +9312,13 @@ dependencies = [ "frame-metadata 16.0.0", "heck 0.4.1", "hex", - "jsonrpsee 0.20.1", + "jsonrpsee 0.20.3", "parity-scale-codec", - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.78", + "quote 1.0.35", "scale-info", "subxt-metadata", - "syn 2.0.38", + "syn 2.0.48", "thiserror", "tokio", ] @@ -14918,7 +9333,7 @@ dependencies = [ "futures-util", "serde", "serde_json", - "smoldot-light 0.6.0", + "smoldot-light", "thiserror", "tokio", "tokio-stream", @@ -14934,7 +9349,7 @@ dependencies = [ "darling 0.20.3", "proc-macro-error", "subxt-codegen", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -14967,19 +9382,19 @@ version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.78", + "quote 1.0.35", "unicode-ident", ] [[package]] name = "syn" -version = "2.0.38" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.78", + "quote 1.0.35", "unicode-ident", ] @@ -14989,17 +9404,17 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", + "proc-macro2 1.0.78", + "quote 1.0.35", "syn 1.0.109", "unicode-xid 0.2.4", ] [[package]] name = "sysinfo" -version = "0.29.10" +version = "0.30.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a18d114d420ada3a891e6bc8e96a2023402203296a47cdd65083377dad18ba5" +checksum = "1fb4f3438c8f6389c864e61221cbc97e9bca98b4daf39a5beb7bea660f528bb2" dependencies = [ "cfg-if 1.0.0", "core-foundation-sys", @@ -15007,7 +9422,7 @@ dependencies = [ "ntapi", "once_cell", "rayon", - "winapi", + "windows 0.52.0", ] [[package]] @@ -15039,28 +9454,28 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.10" +version = "0.12.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2faeef5759ab89935255b1a4cd98e0baf99d1085e37d36599c625dac49ae8e" +checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" [[package]] name = "tempfile" -version = "3.8.1" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" dependencies = [ "cfg-if 1.0.0", - "fastrand 2.0.0", + "fastrand 2.0.1", "redox_syscall 0.4.1", - "rustix 0.38.21", - "windows-sys 0.48.0", + "rustix 0.38.30", + "windows-sys 0.52.0", ] [[package]] name = "termcolor" -version = "1.2.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] @@ -15082,50 +9497,44 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-core" -version = "1.0.38" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d97345f6437bb2004cd58819d8a9ef8e36cdd7661c2abc4bbde0a7c40d9f497" +checksum = "c001ee18b7e5e3f62cbf58c7fe220119e68d902bb7443179c0c8aef30090e999" dependencies = [ "thiserror-core-impl", ] [[package]] name = "thiserror-core-impl" -version = "1.0.38" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10ac1c5050e43014d16b2f94d0d2ce79e65ffdd8b38d8048f9c8f6a8a6da62ac" +checksum = "e4c60d69f36615a077cc7663b9cb8e42275722d23e58a7fa3d2c7f2915d09d04" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 1.0.109", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] -[[package]] -name = "thousands" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820" - [[package]] name = "thread_local" version = "1.1.7" @@ -15136,69 +9545,16 @@ dependencies = [ "once_cell", ] -[[package]] -name = "threadpool" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" -dependencies = [ - "num_cpus", -] - -[[package]] -name = "thrift" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b82ca8f46f95b3ce96081fe3dd89160fdea970c254bb72925255d1b62aae692e" -dependencies = [ - "byteorder", - "integer-encoding", - "log", - "ordered-float", - "threadpool", -] - -[[package]] -name = "tikv-jemalloc-ctl" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e37706572f4b151dff7a0146e040804e9c26fe3a3118591112f05cf12a4216c1" -dependencies = [ - "libc", - "paste", - "tikv-jemalloc-sys", -] - -[[package]] -name = "tikv-jemalloc-sys" -version = "0.5.3+5.3.0-patched" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a678df20055b43e57ef8cddde41cdfda9a3c1a060b67f4c5836dfb1d78543ba8" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - [[package]] name = "time" -version = "0.3.30" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", "itoa", "libc", + "num-conv", "num_threads", "powerfmt", "serde", @@ -15214,32 +9570,14 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" dependencies = [ + "num-conv", "time-core", ] -[[package]] -name = "tiny-bip39" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861" -dependencies = [ - "anyhow", - "hmac 0.12.1", - "once_cell", - "pbkdf2 0.11.0", - "rand 0.8.5", - "rustc-hash", - "sha2 0.10.7", - "thiserror", - "unicode-normalization", - "wasm-bindgen", - "zeroize", -] - [[package]] name = "tiny-keccak" version = "2.0.2" @@ -15249,16 +9587,6 @@ dependencies = [ "crunchy", ] -[[package]] -name = "tinytemplate" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" -dependencies = [ - "serde", - "serde_json", -] - [[package]] name = "tinyvec" version = "1.6.0" @@ -15276,9 +9604,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.33.0" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" dependencies = [ "backtrace", "bytes", @@ -15286,44 +9614,21 @@ dependencies = [ "mio", "num_cpus", "parking_lot 0.12.1", - "pin-project-lite 0.2.12", - "signal-hook-registry", - "socket2 0.5.3", + "pin-project-lite 0.2.13", + "socket2 0.5.5", "tokio-macros", "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" -dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", -] - -[[package]] -name = "tokio-retry" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" -dependencies = [ - "pin-project", - "rand 0.8.5", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.23.4" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ - "rustls 0.20.8", - "tokio", - "webpki 0.22.2", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] @@ -15332,7 +9637,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.5", + "rustls 0.21.10", "tokio", ] @@ -15343,22 +9648,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "tokio", - "tokio-util", ] [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", "futures-io", "futures-sink", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "tokio", "tracing", ] @@ -15374,32 +9678,43 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" +checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.21.0", ] [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.14" +version = "0.20.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +dependencies = [ + "indexmap 2.2.2", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.2.2", "serde", "serde_spanned", "toml_datetime", @@ -15415,30 +9730,12 @@ dependencies = [ "futures-core", "futures-util", "pin-project", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "tower-layer", "tower-service", "tracing", ] -[[package]] -name = "tower-http" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ac8060a61f8758a61562f6fb53ba3cbe1ca906f001df2e53cccddcdbee91e7c" -dependencies = [ - "bitflags 2.4.1", - "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "http-range-header", - "pin-project-lite 0.2.12", - "tower-layer", - "tower-service", -] - [[package]] name = "tower-layer" version = "0.3.2" @@ -15453,33 +9750,32 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if 1.0.0", "log", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "tracing-attributes", "tracing-core", ] [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -15495,38 +9791,14 @@ dependencies = [ "tracing", ] -[[package]] -name = "tracing-gum" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "coarsetime", - "polkadot-node-jaeger", - "polkadot-primitives", - "tracing", - "tracing-gum-proc-macro", -] - -[[package]] -name = "tracing-gum-proc-macro" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "expander 2.0.0", - "proc-macro-crate", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", -] - [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] @@ -15550,7 +9822,6 @@ dependencies = [ "chrono", "lazy_static", "matchers", - "parking_lot 0.11.2", "regex", "serde", "serde_json", @@ -15601,9 +9872,9 @@ dependencies = [ "idna 0.2.3", "ipnet", "lazy_static", - "rand 0.8.5", + "rand", "smallvec", - "socket2 0.4.9", + "socket2 0.4.10", "thiserror", "tinyvec", "tokio", @@ -15633,44 +9904,9 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" - -[[package]] -name = "try-runtime-cli" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" -dependencies = [ - "async-trait", - "clap 4.4.7", - "frame-remote-externalities", - "hex", - "log", - "parity-scale-codec", - "sc-cli", - "sc-executor", - "serde", - "serde_json", - "sp-api", - "sp-consensus-aura", - "sp-consensus-babe", - "sp-core", - "sp-debug-derive", - "sp-externalities", - "sp-inherents", - "sp-io", - "sp-keystore", - "sp-rpc", - "sp-runtime", - "sp-state-machine", - "sp-timestamp", - "sp-transaction-storage-proof", - "sp-version", - "sp-weights", - "substrate-rpc-client", - "zstd 0.12.4", -] +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tt-call" @@ -15678,25 +9914,6 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4f195fd851901624eee5a58c4bb2b4f06399148fcd0ed336e6f1cb60a9881df" -[[package]] -name = "turn" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4712ee30d123ec7ae26d1e1b218395a16c87cdbaf4b3925d170d684af62ea5e8" -dependencies = [ - "async-trait", - "base64 0.13.1", - "futures", - "log", - "md-5", - "rand 0.8.5", - "ring 0.16.20", - "stun", - "thiserror", - "tokio", - "webrtc-util", -] - [[package]] name = "twox-hash" version = "1.6.3" @@ -15705,21 +9922,15 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if 1.0.0", "digest 0.10.7", - "rand 0.8.5", + "rand", "static_assertions", ] [[package]] name = "typenum" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" - -[[package]] -name = "ucd-trie" -version = "0.1.6" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "uint" @@ -15735,15 +9946,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -15762,9 +9973,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -15778,16 +9989,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" -[[package]] -name = "universal-hash" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" -dependencies = [ - "generic-array 0.14.7", - "subtle 2.4.1", -] - [[package]] name = "universal-hash" version = "0.5.1" @@ -15795,14 +9996,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] name = "unsigned-varint" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86a8dc7f45e4c1b0d30e43038c38f274e77af056aa5f74b93c2cf9eb3c1c836" +checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" dependencies = [ "asynchronous-codec", "bytes", @@ -15816,14 +10017,20 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna 0.5.0", "percent-encoding", ] @@ -15833,15 +10040,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" -[[package]] -name = "uuid" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" -dependencies = [ - "getrandom 0.2.10", -] - [[package]] name = "valuable" version = "0.1.0" @@ -15850,9 +10048,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" -version = "1.4.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d92ccd67fb88503048c01b59152a04effd0782d035a83a6d256ce6085f08f4a3" +checksum = "7cdbaf5e132e593e9fc1de6a15bbec912395b11fb9719e061cf64f804524c503" [[package]] name = "vcpkg" @@ -15879,25 +10077,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] -name = "waitgroup" -version = "0.1.2" +name = "w3f-bls" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1f50000a783467e6c0200f9d10642f4bc424e39efc1b770203e88b488f79292" +checksum = "7335e4c132c28cc43caef6adb339789e599e39adbe78da0c4d547fad48cbc331" dependencies = [ - "atomic-waker", + "ark-bls12-377", + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-serialize-derive", + "arrayref", + "constcat", + "digest 0.10.7", + "rand", + "rand_chacha", + "rand_core 0.6.4", + "sha2 0.10.8", + "sha3", + "thiserror", + "zeroize", ] [[package]] name = "waker-fn" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -15918,12 +10131,6 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -15932,9 +10139,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -15942,24 +10149,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -15969,32 +10176,32 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" dependencies = [ - "quote 1.0.33", + "quote 1.0.35", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" [[package]] name = "wasm-instrument" @@ -16005,46 +10212,6 @@ dependencies = [ "parity-wasm", ] -[[package]] -name = "wasm-opt" -version = "0.114.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d005a95f934878a1fb446a816d51c3601a0120ff929005ba3bab3c749cfd1c7" -dependencies = [ - "anyhow", - "libc", - "strum 0.24.1", - "strum_macros 0.24.3", - "tempfile", - "thiserror", - "wasm-opt-cxx-sys", - "wasm-opt-sys", -] - -[[package]] -name = "wasm-opt-cxx-sys" -version = "0.114.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d04e240598162810fad3b2e96fa0dec6dba1eb65a03f3bd99a9248ab8b56caa" -dependencies = [ - "anyhow", - "cxx", - "cxx-build", - "wasm-opt-sys", -] - -[[package]] -name = "wasm-opt-sys" -version = "0.114.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2efd2aaca519d64098c4faefc8b7433a97ed511caf4c9e516384eb6aef1ff4f9" -dependencies = [ - "anyhow", - "cc", - "cxx", - "cxx-build", -] - [[package]] name = "wasm-timer" version = "0.2.5" @@ -16070,28 +10237,15 @@ dependencies = [ "smallvec", "spin 0.9.8", "wasmi_arena", - "wasmi_core 0.12.0", - "wasmparser-nostd", -] - -[[package]] -name = "wasmi" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f341edb80021141d4ae6468cbeefc50798716a347d4085c3811900049ea8945" -dependencies = [ - "smallvec", - "spin 0.9.8", - "wasmi_arena", - "wasmi_core 0.13.0", + "wasmi_core", "wasmparser-nostd", ] [[package]] name = "wasmi_arena" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "401c1f35e413fac1846d4843745589d9ec678977ab35a384db8ae7830525d468" +checksum = "104a7f73be44570cac297b3035d76b169d6599637631cf37a1703326a0727073" [[package]] name = "wasmi_core" @@ -16105,18 +10259,6 @@ dependencies = [ "paste", ] -[[package]] -name = "wasmi_core" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf1a7db34bff95b85c261002720c00c3a6168256dcb93041d3fa2054d19856a" -dependencies = [ - "downcast-rs", - "libm", - "num-traits", - "paste", -] - [[package]] name = "wasmparser" version = "0.102.0" @@ -16180,14 +10322,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" dependencies = [ "anyhow", - "base64 0.21.2", + "base64 0.21.7", "bincode", "directories-next", "file-per-thread-logger", "log", - "rustix 0.36.16", + "rustix 0.36.17", "serde", - "sha2 0.10.7", + "sha2 0.10.8", "toml 0.5.11", "windows-sys 0.45.0", "zstd 0.11.2+zstd.1.5.2", @@ -16205,7 +10347,7 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli", + "gimli 0.27.3", "log", "object 0.30.4", "target-lexicon", @@ -16220,500 +10362,163 @@ name = "wasmtime-cranelift-shared" version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd041e382ef5aea1b9fc78442394f1a4f6d676ce457e7076ca4cb3f397882f8b" -dependencies = [ - "anyhow", - "cranelift-codegen", - "cranelift-native", - "gimli", - "object 0.30.4", - "target-lexicon", - "wasmtime-environ", -] - -[[package]] -name = "wasmtime-environ" -version = "8.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" -dependencies = [ - "anyhow", - "cranelift-entity", - "gimli", - "indexmap 1.9.3", - "log", - "object 0.30.4", - "serde", - "target-lexicon", - "thiserror", - "wasmparser", - "wasmtime-types", -] - -[[package]] -name = "wasmtime-jit" -version = "8.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de48df552cfca1c9b750002d3e07b45772dd033b0b206d5c0968496abf31244" -dependencies = [ - "addr2line 0.19.0", - "anyhow", - "bincode", - "cfg-if 1.0.0", - "cpp_demangle", - "gimli", - "log", - "object 0.30.4", - "rustc-demangle", - "serde", - "target-lexicon", - "wasmtime-environ", - "wasmtime-jit-debug", - "wasmtime-jit-icache-coherence", - "wasmtime-runtime", - "windows-sys 0.45.0", -] - -[[package]] -name = "wasmtime-jit-debug" -version = "8.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846" -dependencies = [ - "object 0.30.4", - "once_cell", - "rustix 0.36.16", -] - -[[package]] -name = "wasmtime-jit-icache-coherence" -version = "8.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aecae978b13f7f67efb23bd827373ace4578f2137ec110bbf6a4a7cde4121bbd" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "windows-sys 0.45.0", -] - -[[package]] -name = "wasmtime-runtime" -version = "8.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658cf6f325232b6760e202e5255d823da5e348fdea827eff0a2a22319000b441" -dependencies = [ - "anyhow", - "cc", - "cfg-if 1.0.0", - "indexmap 1.9.3", - "libc", - "log", - "mach", - "memfd", - "memoffset 0.8.0", - "paste", - "rand 0.8.5", - "rustix 0.36.16", - "wasmtime-asm-macros", - "wasmtime-environ", - "wasmtime-jit-debug", - "windows-sys 0.45.0", -] - -[[package]] -name = "wasmtime-types" -version = "8.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f" -dependencies = [ - "cranelift-entity", - "serde", - "thiserror", - "wasmparser", -] - -[[package]] -name = "web-sys" -version = "0.3.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring 0.16.20", - "untrusted", -] - -[[package]] -name = "webpki" -version = "0.22.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ecc0cd7cac091bf682ec5efa18b1cff79d617b84181f38b3951dbe135f607f" -dependencies = [ - "ring 0.16.20", - "untrusted", -] - -[[package]] -name = "webpki-roots" -version = "0.22.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki 0.22.2", -] - -[[package]] -name = "webrtc" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3bc9049bdb2cea52f5fd4f6f728184225bdb867ed0dc2410eab6df5bdd67bb" -dependencies = [ - "arc-swap", - "async-trait", - "bytes", - "hex", - "interceptor", - "lazy_static", - "log", - "rand 0.8.5", - "rcgen 0.9.3", - "regex", - "ring 0.16.20", - "rtcp", - "rtp", - "rustls 0.19.1", - "sdp", - "serde", - "serde_json", - "sha2 0.10.7", - "stun", - "thiserror", - "time 0.3.30", - "tokio", - "turn", - "url", - "waitgroup", - "webrtc-data", - "webrtc-dtls", - "webrtc-ice", - "webrtc-mdns", - "webrtc-media", - "webrtc-sctp", - "webrtc-srtp", - "webrtc-util", -] - -[[package]] -name = "webrtc-data" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef36a4d12baa6e842582fe9ec16a57184ba35e1a09308307b67d43ec8883100" -dependencies = [ - "bytes", - "derive_builder", - "log", - "thiserror", - "tokio", - "webrtc-sctp", - "webrtc-util", +dependencies = [ + "anyhow", + "cranelift-codegen", + "cranelift-native", + "gimli 0.27.3", + "object 0.30.4", + "target-lexicon", + "wasmtime-environ", ] [[package]] -name = "webrtc-dtls" -version = "0.7.1" +name = "wasmtime-environ" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942be5bd85f072c3128396f6e5a9bfb93ca8c1939ded735d177b7bcba9a13d05" +checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" dependencies = [ - "aes 0.6.0", - "aes-gcm 0.10.2", - "async-trait", - "bincode", - "block-modes", - "byteorder", - "ccm", - "curve25519-dalek 3.2.0", - "der-parser 8.2.0", - "elliptic-curve 0.12.3", - "hkdf", - "hmac 0.12.1", + "anyhow", + "cranelift-entity", + "gimli 0.27.3", + "indexmap 1.9.3", "log", - "oid-registry 0.6.1", - "p256", - "p384", - "rand 0.8.5", - "rand_core 0.6.4", - "rcgen 0.9.3", - "ring 0.16.20", - "rustls 0.19.1", - "sec1 0.3.0", + "object 0.30.4", "serde", - "sha1", - "sha2 0.10.7", - "signature 1.6.4", - "subtle 2.4.1", + "target-lexicon", "thiserror", - "tokio", - "webpki 0.21.4", - "webrtc-util", - "x25519-dalek 2.0.0", - "x509-parser 0.13.2", + "wasmparser", + "wasmtime-types", ] [[package]] -name = "webrtc-ice" -version = "0.9.1" +name = "wasmtime-jit" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465a03cc11e9a7d7b4f9f99870558fe37a102b65b93f8045392fef7c67b39e80" +checksum = "0de48df552cfca1c9b750002d3e07b45772dd033b0b206d5c0968496abf31244" dependencies = [ - "arc-swap", - "async-trait", - "crc", + "addr2line 0.19.0", + "anyhow", + "bincode", + "cfg-if 1.0.0", + "cpp_demangle", + "gimli 0.27.3", "log", - "rand 0.8.5", + "object 0.30.4", + "rustc-demangle", "serde", - "serde_json", - "stun", - "thiserror", - "tokio", - "turn", - "url", - "uuid", - "waitgroup", - "webrtc-mdns", - "webrtc-util", + "target-lexicon", + "wasmtime-environ", + "wasmtime-jit-debug", + "wasmtime-jit-icache-coherence", + "wasmtime-runtime", + "windows-sys 0.45.0", ] [[package]] -name = "webrtc-mdns" -version = "0.5.2" +name = "wasmtime-jit-debug" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f08dfd7a6e3987e255c4dbe710dde5d94d0f0574f8a21afa95d171376c143106" +checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846" dependencies = [ - "log", - "socket2 0.4.9", - "thiserror", - "tokio", - "webrtc-util", + "object 0.30.4", + "once_cell", + "rustix 0.36.17", ] [[package]] -name = "webrtc-media" -version = "0.5.1" +name = "wasmtime-jit-icache-coherence" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f72e1650a8ae006017d1a5280efb49e2610c19ccc3c0905b03b648aee9554991" +checksum = "aecae978b13f7f67efb23bd827373ace4578f2137ec110bbf6a4a7cde4121bbd" dependencies = [ - "byteorder", - "bytes", - "rand 0.8.5", - "rtp", - "thiserror", + "cfg-if 1.0.0", + "libc", + "windows-sys 0.45.0", ] [[package]] -name = "webrtc-sctp" -version = "0.7.0" +name = "wasmtime-runtime" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d47adcd9427eb3ede33d5a7f3424038f63c965491beafcc20bc650a2f6679c0" +checksum = "658cf6f325232b6760e202e5255d823da5e348fdea827eff0a2a22319000b441" dependencies = [ - "arc-swap", - "async-trait", - "bytes", - "crc", + "anyhow", + "cc", + "cfg-if 1.0.0", + "indexmap 1.9.3", + "libc", "log", - "rand 0.8.5", - "thiserror", - "tokio", - "webrtc-util", + "mach", + "memfd", + "memoffset", + "paste", + "rand", + "rustix 0.36.17", + "wasmtime-asm-macros", + "wasmtime-environ", + "wasmtime-jit-debug", + "windows-sys 0.45.0", ] [[package]] -name = "webrtc-srtp" -version = "0.9.1" +name = "wasmtime-types" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6183edc4c1c6c0175f8812eefdce84dfa0aea9c3ece71c2bf6ddd3c964de3da5" +checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f" dependencies = [ - "aead 0.4.3", - "aes 0.7.5", - "aes-gcm 0.9.4", - "async-trait", - "byteorder", - "bytes", - "ctr 0.8.0", - "hmac 0.11.0", - "log", - "rtcp", - "rtp", - "sha-1", - "subtle 2.4.1", + "cranelift-entity", + "serde", "thiserror", - "tokio", - "webrtc-util", + "wasmparser", ] [[package]] -name = "webrtc-util" -version = "0.7.0" +name = "web-sys" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f1db1727772c05cf7a2cfece52c3aca8045ca1e176cd517d323489aa3c6d87" +checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" dependencies = [ - "async-trait", - "bitflags 1.3.2", - "bytes", - "cc", - "ipnet", - "lazy_static", - "libc", - "log", - "nix", - "rand 0.8.5", - "thiserror", - "tokio", - "winapi", + "js-sys", + "wasm-bindgen", ] [[package]] -name = "westend-runtime" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "webpki" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "binary-merkle-tree", - "bitvec", - "frame-benchmarking", - "frame-election-provider-support", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", - "hex-literal", - "log", - "pallet-asset-rate", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", - "pallet-bags-list", - "pallet-balances", - "pallet-beefy", - "pallet-beefy-mmr", - "pallet-collective", - "pallet-conviction-voting", - "pallet-democracy", - "pallet-election-provider-multi-phase", - "pallet-election-provider-support-benchmarking", - "pallet-elections-phragmen", - "pallet-fast-unstake", - "pallet-grandpa", - "pallet-identity", - "pallet-im-online", - "pallet-indices", - "pallet-membership", - "pallet-message-queue", - "pallet-mmr", - "pallet-multisig", - "pallet-nomination-pools", - "pallet-nomination-pools-benchmarking", - "pallet-nomination-pools-runtime-api", - "pallet-offences", - "pallet-offences-benchmarking", - "pallet-preimage", - "pallet-proxy", - "pallet-recovery", - "pallet-referenda", - "pallet-scheduler", - "pallet-session", - "pallet-session-benchmarking", - "pallet-society", - "pallet-staking", - "pallet-staking-reward-curve", - "pallet-staking-runtime-api", - "pallet-state-trie-migration", - "pallet-sudo", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", - "pallet-vesting", - "pallet-whitelist", - "pallet-xcm", - "pallet-xcm-benchmarks", - "parity-scale-codec", - "polkadot-parachain-primitives", - "polkadot-primitives", - "polkadot-runtime-common", - "polkadot-runtime-parachains", - "rustc-hex", - "scale-info", - "serde", - "serde_derive", - "smallvec", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-authority-discovery", - "sp-block-builder", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-io", - "sp-mmr-primitives", - "sp-npos-elections", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", - "westend-runtime-constants", + "ring 0.17.7", + "untrusted 0.9.0", ] [[package]] -name = "westend-runtime-constants" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +name = "webpki-roots" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", - "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", + "webpki", ] [[package]] name = "which" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ "either", - "libc", + "home", "once_cell", + "rustix 0.38.30", ] [[package]] name = "wide" -version = "0.7.11" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa469ffa65ef7e0ba0f164183697b89b854253fd31aeb92358b7b6155177d62f" +checksum = "b31891d644eba1789fb6715f27fbc322e4bdf2ecdc412ede1993246159271613" dependencies = [ "bytemuck", "safe_arch", @@ -16743,9 +10548,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -16758,24 +10563,40 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.34.0" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45296b64204227616fdbf2614cefa4c236b98ee64dfaaaa435207ed99fe7829f" +checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows_aarch64_msvc 0.34.0", - "windows_i686_gnu 0.34.0", - "windows_i686_msvc 0.34.0", - "windows_x86_64_gnu 0.34.0", - "windows_x86_64_msvc 0.34.0", + "windows-core 0.51.1", + "windows-targets 0.48.5", ] [[package]] name = "windows" -version = "0.48.0" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +dependencies = [ + "windows-core 0.52.0", + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-core" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.52.0", ] [[package]] @@ -16793,7 +10614,16 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", ] [[package]] @@ -16813,17 +10643,32 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" 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", + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", ] [[package]] @@ -16834,15 +10679,15 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] -name = "windows_aarch64_msvc" -version = "0.34.0" +name = "windows_aarch64_gnullvm" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" [[package]] name = "windows_aarch64_msvc" @@ -16852,15 +10697,15 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] -name = "windows_i686_gnu" -version = "0.34.0" +name = "windows_aarch64_msvc" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" [[package]] name = "windows_i686_gnu" @@ -16870,15 +10715,15 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] -name = "windows_i686_msvc" -version = "0.34.0" +name = "windows_i686_gnu" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" [[package]] name = "windows_i686_msvc" @@ -16888,15 +10733,15 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] -name = "windows_x86_64_gnu" -version = "0.34.0" +name = "windows_i686_msvc" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" [[package]] name = "windows_x86_64_gnu" @@ -16906,9 +10751,15 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" [[package]] name = "windows_x86_64_gnullvm" @@ -16918,15 +10769,15 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] -name = "windows_x86_64_msvc" -version = "0.34.0" +name = "windows_x86_64_gnullvm" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" [[package]] name = "windows_x86_64_msvc" @@ -16936,15 +10787,21 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.0" +version = "0.5.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fac9742fd1ad1bd9643b991319f72dd031016d44b77039a26977eb667141e7" +checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" dependencies = [ "memchr", ] @@ -16985,58 +10842,39 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ - "curve25519-dalek 4.0.0", + "curve25519-dalek 4.1.1", "rand_core 0.6.4", "serde", "zeroize", ] -[[package]] -name = "x509-parser" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb9bace5b5589ffead1afb76e43e34cff39cd0f3ce7e170ae0c29e53b88eb1c" -dependencies = [ - "asn1-rs 0.3.1", - "base64 0.13.1", - "data-encoding", - "der-parser 7.0.0", - "lazy_static", - "nom", - "oid-registry 0.4.0", - "ring 0.16.20", - "rusticata-macros", - "thiserror", - "time 0.3.30", -] - [[package]] name = "x509-parser" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs", "base64 0.13.1", "data-encoding", - "der-parser 8.2.0", + "der-parser", "lazy_static", "nom", - "oid-registry 0.6.1", + "oid-registry", "rusticata-macros", "thiserror", - "time 0.3.30", + "time", ] [[package]] name = "xcm-procedural" version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#dcc76525d98a097be152293eee3389f6af5c4404" dependencies = [ "Inflector", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] @@ -17049,7 +10887,7 @@ dependencies = [ "log", "nohash-hasher", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "static_assertions", ] @@ -17065,14 +10903,34 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.30", + "time", +] + +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] name = "zeroize" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" dependencies = [ "zeroize_derive", ] @@ -17083,9 +10941,9 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "proc-macro2 1.0.78", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] @@ -17103,7 +10961,7 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" dependencies = [ - "zstd-safe 6.0.5+zstd.1.5.4", + "zstd-safe 6.0.6", ] [[package]] @@ -17118,9 +10976,9 @@ dependencies = [ [[package]] name = "zstd-safe" -version = "6.0.5+zstd.1.5.4" +version = "6.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56d9e60b4b1758206c238a10165fbcae3ca37b01744e394c463463f6529d23b" +checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" dependencies = [ "libc", "zstd-sys", @@ -17128,11 +10986,10 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.8+zstd.1.5.5" +version = "2.0.9+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" dependencies = [ "cc", - "libc", "pkg-config", ] diff --git a/Cargo.toml b/Cargo.toml index 0d49599004005071d6a2dccfcb853f59ec7b8fd9..d320ce56094060d3b99ca524fce473eeda2b1afc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,39 +8,27 @@ license = "GPL-3.0-only" resolver = "2" members = [ - "bin/millau/node", - "bin/millau/runtime", - "bin/rialto/node", - "bin/rialto/runtime", - "bin/rialto-parachain/node", - "bin/rialto-parachain/runtime", "bin/runtime-common", - "fuzz/storage-proof", "modules/beefy", "modules/grandpa", "modules/messages", "modules/parachains", "modules/relayers", - "modules/shift-session-manager", "modules/xcm-bridge-hub", "modules/xcm-bridge-hub-router", "primitives/beefy", "primitives/chain-asset-hub-rococo", - "primitives/chain-asset-hub-wococo", + "primitives/chain-asset-hub-westend", "primitives/chain-bridge-hub-cumulus", "primitives/chain-bridge-hub-kusama", "primitives/chain-bridge-hub-polkadot", "primitives/chain-bridge-hub-rococo", - "primitives/chain-bridge-hub-wococo", + "primitives/chain-bridge-hub-westend", "primitives/chain-kusama", - "primitives/chain-millau", "primitives/chain-polkadot", "primitives/chain-polkadot-bulletin", - "primitives/chain-rialto", - "primitives/chain-rialto-parachain", "primitives/chain-rococo", "primitives/chain-westend", - "primitives/chain-wococo", "primitives/header-chain", "primitives/messages", "primitives/parachains", @@ -49,21 +37,18 @@ members = [ "primitives/runtime", "primitives/test-utils", "primitives/xcm-bridge-hub", + "primitives/xcm-bridge-hub-router", "relays/bin-substrate", "relays/client-bridge-hub-kusama", "relays/client-bridge-hub-polkadot", "relays/client-bridge-hub-rococo", - "relays/client-bridge-hub-wococo", + "relays/client-bridge-hub-westend", "relays/client-kusama", - "relays/client-millau", "relays/client-polkadot", "relays/client-polkadot-bulletin", - "relays/client-rialto", - "relays/client-rialto-parachain", "relays/client-rococo", "relays/client-substrate", "relays/client-westend", - "relays/client-wococo", "relays/equivocation", "relays/finality", "relays/lib-substrate-relay", @@ -71,3 +56,34 @@ members = [ "relays/parachains", "relays/utils", ] + +# Setup clippy lints as `polkadot-sdk`, +# but let's better be strict here and disable what `polkadot-sdk` allows :) + +[workspace.lints.rust] +# suspicious_double_ref_op = { level = "allow", priority = 2 } + +[workspace.lints.clippy] +all = { level = "allow", priority = 0 } +correctness = { level = "deny", priority = 1 } +#if-same-then-else = { level = "allow", priority = 2 } +complexity = { level = "deny", priority = 1 } +#zero-prefixed-literal = { level = "allow", priority = 2 } # 00_1000_000 +#type_complexity = { level = "allow", priority = 2 } # raison d'etre +#nonminimal-bool = { level = "allow", priority = 2 } # maybe +#borrowed-box = { level = "allow", priority = 2 } # Reasonable to fix this one +#too-many-arguments = { level = "allow", priority = 2 } # (Turning this on would lead to) +#unnecessary_cast = { level = "allow", priority = 2 } # Types may change +#identity-op = { level = "allow", priority = 2 } # One case where we do 0 + +#useless_conversion = { level = "allow", priority = 2 } # Types may change +#unit_arg = { level = "allow", priority = 2 } # styalistic. +#option-map-unit-fn = { level = "allow", priority = 2 } # styalistic +#bind_instead_of_map = { level = "allow", priority = 2 } # styalistic +#erasing_op = { level = "allow", priority = 2 } # E.g. 0 * DOLLARS +#eq_op = { level = "allow", priority = 2 } # In tests we test equality. +#while_immutable_condition = { level = "allow", priority = 2 } # false positives +#needless_option_as_deref = { level = "allow", priority = 2 } # false positives +#derivable_impls = { level = "allow", priority = 2 } # false positives +#stable_sort_primitive = { level = "allow", priority = 2 } # prefer stable sort +#extra-unused-type-parameters = { level = "allow", priority = 2 } # stylistic +#default_constructed_unit_structs = { level = "allow", priority = 2 } # stylistic \ No newline at end of file diff --git a/README.md b/README.md index 87d0cfcfb6bb617b993a5472500a1e39ca1b52dc..d30eba609011e5ef5c09613e779f691e15bdf160 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,18 @@ This is a collection of components for building bridges. These components include Substrate pallets for syncing headers, passing arbitrary messages, as well as libraries for building relayers to provide cross-chain communication capabilities. -Three bridge nodes are also available. The nodes can be used to run test networks which bridge other Substrate chains. +This codebase is used to build bridges between Substrate-based chains. Such chains are built using +[Substrate framework](https://docs.substrate.io/) and are sharing some common features. Those features include: + +- ability to plugin our pallets there (see https://docs.substrate.io/reference/frame-pallets/); + +- using GRANDPA or parachain finality for their blocks (BEEFY finality support is planned). + +There are other bridges in the Dotsama ecosystem. Including, but not limited to: + +- Snowfork bridge with Ethereum: https://github.com/Snowfork/snowbridge; + +- Interlay bridge with Bitcoin: https://github.com/interlay/interbtc. 🚧 The bridges are currently under construction - a hardhat is recommended beyond this point 🚧 @@ -15,8 +26,6 @@ Three bridge nodes are also available. The nodes can be used to run test network - [High-Level Architecture](#high-level-architecture) - [Project Layout](#project-layout) - [Running the Bridge](#running-the-bridge) -- [How to send a message](#how-to-send-a-message) -- [Community](#community) ## Installation @@ -68,7 +77,7 @@ For example, consider the case below where we want to bridge two Substrate based ``` +---------------+ +---------------+ | | | | -| Rialto | | Millau | +| Rococo | | Westend | | | | | +-------+-------+ +-------+-------+ ^ ^ @@ -79,9 +88,9 @@ For example, consider the case below where we want to bridge two Substrate based +---------------+ ``` -The Millau chain must be able to accept Rialto headers and verify their integrity. It does this by using a runtime +The Rococo chain must be able to accept Westend headers and verify their integrity. It does this by using a runtime module designed to track GRANDPA finality. Since two blockchains can't interact directly they need an external service, -called a relayer, to communicate. The relayer will subscribe to new Rialto headers via RPC and submit them to the Millau +called a relayer, to communicate. The relayer will subscribe to new Rococo headers via RPC and submit them to the Westend chain for verification. Take a look at [Bridge High Level Documentation](./docs/high-level-overview.md) for more in-depth description of the @@ -89,169 +98,29 @@ bridge interaction. ## Project Layout -Here's an overview of how the project is laid out. The main bits are the `bin`, which is the actual "blockchain", the -`modules` which are used to build the blockchain's logic (a.k.a the runtime) and the `relays` which are used to pass -messages between chains. - -``` -├── bin // Node and Runtime for the various Substrate chains -│ └── ... -├── deployments // Useful tools for deploying test networks -│ └── ... -├── modules // Substrate Runtime Modules (a.k.a Pallets) -│ ├── beefy // On-Chain BEEFY Light Client (in progress) -│ ├── grandpa // On-Chain GRANDPA Light Client -│ ├── messages // Cross Chain Message Passing -│ ├── parachains // On-Chain Parachains Light Client -│ ├── relayers // Relayer rewards registry -│ └── ... -├── primitives // Code shared between modules, runtimes, and relays +Here's an overview of how the project is laid out. The main bits are `modules` which are used to build the blockchain's +logic (a.k.a the runtime) and the `relays` which are used to pass messages between chains. + +``` +├── bin // Substrate Runtime Modules (a.k.a Pallets) +│ ├── runtime-common // Helpers for plugging-in our pallets into runtime +├── modules // Substrate Runtime Modules (a.k.a Pallets) +│ ├── beefy // On-Chain BEEFY Light Client (in progress) +│ ├── grandpa // On-Chain GRANDPA Light Client +│ ├── messages // Cross Chain Message Passing +│ ├── parachains // On-Chain Parachains Light Client +│ ├── relayers // Relayer Rewards Registry +│ ├── xcm-bridge-hub // Multiple Dynamic Bridges Support +│ ├── xcm-bridge-hub-router // XCM Router that may be used to Connect to XCM Bridge Hub +├── primitives // Code shared between modules, runtimes, and relays │ └── ... -├── relays // Application for sending finality proofs and messages between chains +├── relays // Application for sending finality proofs and messages between chains │ └── ... -└── scripts // Useful development and maintenance scripts +└── scripts // Useful development and maintenance scripts ``` ## Running the Bridge -To run the Bridge you need to be able to connect the bridge relay node to the RPC interface of nodes on each side of the -bridge (source and target chain). - -There are 2 ways to run the bridge, described below: - -- building & running from source: with this option, you'll be able to run the bridge between two standalone chains that -are running GRANDPA finality gadget to achieve finality; - -- running a Docker Compose setup: this is a recommended option, where you'll see bridges with parachains, complex relays -and more. - -### Using the Source - -First you'll need to build the bridge nodes and relay. This can be done as follows: - -```bash -# In `parity-bridges-common` folder -cargo build -p rialto-bridge-node -cargo build -p millau-bridge-node -cargo build -p substrate-relay -``` - -### Running a Dev network - -We will launch a dev network to demonstrate how to relay a message between two Substrate based chains (named Rialto and -Millau). - -To do this we will need two nodes, two relayers which will relay headers, and two relayers which will relay messages. - -#### Running from local scripts - -To run a simple dev network you can use the scripts located in the [`deployments/local-scripts` -folder](./deployments/local-scripts). - -First, we must run the two Substrate nodes. - -```bash -# In `parity-bridges-common` folder -./deployments/local-scripts/run-rialto-node.sh -./deployments/local-scripts/run-millau-node.sh -``` - -After the nodes are up we can run the header relayers. - -```bash -./deployments/local-scripts/relay-millau-to-rialto.sh -./deployments/local-scripts/relay-rialto-to-millau.sh -``` - -At this point you should see the relayer submitting headers from the Millau Substrate chain to the Rialto Substrate -chain. - -``` -# Header Relayer Logs -[Millau_to_Rialto_Sync] [date] DEBUG bridge Going to submit finality proof of Millau header #147 to Rialto -[...] [date] INFO bridge Synced 147 of 147 headers -[...] [date] DEBUG bridge Going to submit finality proof of Millau header #148 to Rialto -[...] [date] INFO bridge Synced 148 of 149 headers -``` - -Finally, we can run the message relayers. - -```bash -./deployments/local-scripts/relay-messages-millau-to-rialto.sh -./deployments/local-scripts/relay-messages-rialto-to-millau.sh -``` - -You will also see the message lane relayers listening for new messages. - -``` -# Message Relayer Logs -[Millau_to_Rialto_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7] [date] DEBUG bridge Asking Millau::ReceivingConfirmationsDelivery about best message nonces -[...] [date] INFO bridge Synced Some(2) of Some(3) nonces in Millau::MessagesDelivery -> Rialto::MessagesDelivery race -[...] [date] DEBUG bridge Asking Millau::MessagesDelivery about message nonces -[...] [date] DEBUG bridge Received best nonces from Millau::ReceivingConfirmationsDelivery: TargetClientNonces { - latest_nonce: 0, nonces_data: () } -[...] [date] DEBUG bridge Asking Millau::ReceivingConfirmationsDelivery about finalized message nonces -[...] [date] DEBUG bridge Received finalized nonces from Millau::ReceivingConfirmationsDelivery: TargetClientNonces { - latest_nonce: 0, nonces_data: () } -[...] [date] DEBUG bridge Received nonces from Millau::MessagesDelivery: SourceClientNonces { new_nonces: {}, confirmed_nonce: Some(0) } -[...] [date] DEBUG bridge Asking Millau node about its state -[...] [date] DEBUG bridge Received state from Millau node: ClientState { best_self: HeaderId(1593, 0xacac***), best_finalized_self: - HeaderId(1590, 0x0be81d...), best_finalized_peer_at_best_self: HeaderId(0, 0xdcdd89...) } -``` - -To send a message see the ["How to send a message" section](#how-to-send-a-message). - -### How to send a message - -In this section we'll show you how to quickly send a bridge message. The message is just an encoded XCM `Trap(43)` -message. - -```bash -# In `parity-bridges-common` folder -./scripts/send-message-from-millau-rialto.sh -``` - -After sending a message you will see the following logs showing a message was successfully sent: - -``` -INFO bridge Sending message to Rialto. Size: 11. -TRACE bridge Sent transaction to Millau node: 0x5e68... -``` - -And at the Rialto node logs you'll something like this: - -``` -... runtime::bridge-messages: Received messages: total=1, valid=1. Weight used: Weight(ref_time: 1215065371, proof_size: - 48559)/Weight(ref_time: 1215065371, proof_size: 54703). -``` - -It means that the message has been delivered and dispatched. Message may be dispatched with an error, though - the goal -of our test bridge is to ensure that messages are successfully delivered and all involved components are working. - -## Full Network Docker Compose Setup - -For a more sophisticated deployment which includes bidirectional header sync, message passing, monitoring dashboards, -etc. see the [Deployments README](./deployments/README.md). - -You should note that you can find images for all the bridge components published on [Docker -Hub](https://hub.docker.com/u/paritytech). - -To run a Rialto node for example, you can use the following command: - -```bash -docker run -p 30333:30333 -p 9933:9933 -p 9944:9944 \ - -it paritytech/rialto-bridge-node --dev --tmp \ - --rpc-cors=all --unsafe-rpc-external -``` - -## Community - -Main hangout for the community is [Element](https://element.io/) (formerly Riot). Element is a chat server like, for -example, Discord. Most discussions around Polkadot and Substrate happen in various Element "rooms" (channels). So, -joining Element might be a good idea, anyway. - -If you are interested in information exchange and development of Polkadot related bridges please feel free to join the -[Polkadot Bridges](https://app.element.io/#/room/#bridges:web3.foundation) Element channel. - -The [Substrate Technical](https://app.element.io/#/room/#substrate-technical:matrix.org) Element channel is most suited -for discussions regarding Substrate itself. +Apart from live Rococo <> Westend bridge, you may spin up local networks and test see how it works locally. More +details may be found in +[this document](https://github.com/paritytech/polkadot-sdk/tree/master//cumulus/parachains/runtimes/bridge-hubs/README.md). diff --git a/bin/millau/node/Cargo.toml b/bin/millau/node/Cargo.toml deleted file mode 100644 index 3396a43c905ac2c73f2f26eabf2a7a3857cc836d..0000000000000000000000000000000000000000 --- a/bin/millau/node/Cargo.toml +++ /dev/null @@ -1,67 +0,0 @@ -[package] -name = "millau-bridge-node" -description = "Substrate node compatible with Millau runtime" -version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2021" -build = "build.rs" -repository = "https://github.com/paritytech/parity-bridges-common/" -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" - -[dependencies] -clap = { version = "4.4.7", features = ["derive"] } -futures = "0.3.29" -jsonrpsee = { version = "0.16.2", features = ["server"] } -serde_json = "1.0.107" - -# Bridge dependencies - -bp-messages = { path = "../../../primitives/messages" } -bridge-runtime-common = { path = "../../runtime-common" } -millau-runtime = { path = "../runtime" } - -# Substrate Dependencies - -sc-consensus-beefy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-consensus-beefy-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-consensus-beefy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -node-inspect = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -mmr-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master"} -sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-consensus-grandpa-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-network-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } - -# Polkadot Dependencies - -xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } - -[build-dependencies] -substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } - -[features] -default = [] -runtime-benchmarks = [ "millau-runtime/runtime-benchmarks" ] diff --git a/bin/millau/node/build.rs b/bin/millau/node/build.rs deleted file mode 100644 index d9b50049e2628dd7ab31b5c02065132956f207b1..0000000000000000000000000000000000000000 --- a/bin/millau/node/build.rs +++ /dev/null @@ -1,23 +0,0 @@ -// 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 . - -use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed}; - -fn main() { - generate_cargo_keys(); - - rerun_if_git_head_changed(); -} diff --git a/bin/millau/node/src/chain_spec.rs b/bin/millau/node/src/chain_spec.rs deleted file mode 100644 index 7813f4aa582bf6a14d53477fa24344b11000e85c..0000000000000000000000000000000000000000 --- a/bin/millau/node/src/chain_spec.rs +++ /dev/null @@ -1,257 +0,0 @@ -// 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 . - -use millau_runtime::{ - AccountId, AuraConfig, BalancesConfig, BeefyConfig, BridgeRialtoMessagesConfig, - BridgeRialtoParachainMessagesConfig, BridgeWestendGrandpaConfig, GrandpaConfig, - RuntimeGenesisConfig, SessionConfig, SessionKeys, Signature, SudoConfig, SystemConfig, - XcmRialtoBridgeHubConfig, XcmRialtoParachainBridgeHubConfig, WASM_BINARY, -}; -use sp_consensus_aura::sr25519::AuthorityId as AuraId; -use sp_consensus_beefy::ecdsa_crypto::AuthorityId as BeefyId; -use sp_consensus_grandpa::AuthorityId as GrandpaId; -use sp_core::{sr25519, Pair, Public}; -use sp_runtime::traits::{IdentifyAccount, Verify}; - -/// "Names" of the authorities accounts at local testnet. -const LOCAL_AUTHORITIES_ACCOUNTS: [&str; 5] = ["Alice", "Bob", "Charlie", "Dave", "Eve"]; -/// "Names" of the authorities accounts at development testnet. -const DEV_AUTHORITIES_ACCOUNTS: [&str; 1] = [LOCAL_AUTHORITIES_ACCOUNTS[0]]; -/// "Names" of all possible authorities accounts. -const ALL_AUTHORITIES_ACCOUNTS: [&str; 5] = LOCAL_AUTHORITIES_ACCOUNTS; -/// "Name" of the `sudo` account. -const SUDO_ACCOUNT: &str = "Sudo"; -/// "Name" of the account, which owns the with-Westend GRANDPA pallet. -const WESTEND_GRANDPA_PALLET_OWNER: &str = "Westend.GrandpaOwner"; -/// "Name" of the account, which owns the with-Rialto messages pallet. -const RIALTO_MESSAGES_PALLET_OWNER: &str = "Rialto.MessagesOwner"; -/// "Name" of the account, which owns the with-RialtoParachain messages pallet. -const RIALTO_PARACHAIN_MESSAGES_PALLET_OWNER: &str = "RialtoParachain.MessagesOwner"; - -/// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type. -pub type ChainSpec = sc_service::GenericChainSpec; - -/// The chain specification option. This is expected to come in from the CLI and -/// is little more than one of a number of alternatives which can easily be converted -/// from a string (`--chain=...`) into a `ChainSpec`. -#[derive(Clone, Debug)] -pub enum Alternative { - /// Whatever the current runtime is, with just Alice as an auth. - Development, - /// Whatever the current runtime is, with simple Alice/Bob/Charlie/Dave/Eve auths. - LocalTestnet, -} - -/// Helper function to generate a crypto pair from seed -pub fn get_from_seed(seed: &str) -> ::Public { - TPublic::Pair::from_string(&format!("//{seed}"), None) - .expect("static values are valid; qed") - .public() -} - -type AccountPublic = ::Signer; - -/// Helper function to generate an account ID from seed -pub fn get_account_id_from_seed(seed: &str) -> AccountId -where - AccountPublic: From<::Public>, -{ - AccountPublic::from(get_from_seed::(seed)).into_account() -} - -/// Helper function to generate an authority key for Aura -pub fn get_authority_keys_from_seed(s: &str) -> (AccountId, AuraId, BeefyId, GrandpaId) { - ( - get_account_id_from_seed::(s), - get_from_seed::(s), - get_from_seed::(s), - get_from_seed::(s), - ) -} - -impl Alternative { - /// Get an actual chain config from one of the alternatives. - pub(crate) fn load(self) -> ChainSpec { - let properties = Some( - serde_json::json!({ - "tokenDecimals": 9, - "tokenSymbol": "MLAU" - }) - .as_object() - .expect("Map given; qed") - .clone(), - ); - match self { - Alternative::Development => ChainSpec::from_genesis( - "Millau Development", - "millau_dev", - sc_service::ChainType::Development, - || { - testnet_genesis( - DEV_AUTHORITIES_ACCOUNTS - .into_iter() - .map(get_authority_keys_from_seed) - .collect(), - get_account_id_from_seed::(SUDO_ACCOUNT), - endowed_accounts(), - true, - ) - }, - vec![], - None, - None, - None, - properties, - None, - ), - Alternative::LocalTestnet => ChainSpec::from_genesis( - "Millau Local", - "millau_local", - sc_service::ChainType::Local, - || { - testnet_genesis( - LOCAL_AUTHORITIES_ACCOUNTS - .into_iter() - .map(get_authority_keys_from_seed) - .collect(), - get_account_id_from_seed::(SUDO_ACCOUNT), - endowed_accounts(), - true, - ) - }, - vec![], - None, - None, - None, - properties, - None, - ), - } - } -} - -/// We're using the same set of endowed accounts on all Millau chains (dev/local) to make -/// sure that all accounts, required for bridge to be functional (e.g. relayers fund account, -/// accounts used by relayers in our test deployments, accounts used for demonstration -/// purposes), are all available on these chains. -fn endowed_accounts() -> Vec { - let all_authorities = ALL_AUTHORITIES_ACCOUNTS.iter().flat_map(|x| { - [ - get_account_id_from_seed::(x), - get_account_id_from_seed::(&format!("{x}//stash")), - ] - }); - vec![ - // Sudo account - get_account_id_from_seed::(SUDO_ACCOUNT), - // Regular (unused) accounts - get_account_id_from_seed::("Ferdie"), - get_account_id_from_seed::("Ferdie//stash"), - // Accounts, used by Westend<>Millau bridge - get_account_id_from_seed::(WESTEND_GRANDPA_PALLET_OWNER), - get_account_id_from_seed::("Westend.HeadersRelay1"), - get_account_id_from_seed::("Westend.HeadersRelay2"), - get_account_id_from_seed::("Westend.AssetHubWestendHeaders1"), - get_account_id_from_seed::("Westend.AssetHubWestendHeaders2"), - // Accounts, used by Rialto<>Millau bridge - get_account_id_from_seed::(RIALTO_MESSAGES_PALLET_OWNER), - get_account_id_from_seed::("Rialto.HeadersAndMessagesRelay"), - get_account_id_from_seed::("Rialto.OutboundMessagesRelay.Lane00000001"), - get_account_id_from_seed::("Rialto.InboundMessagesRelay.Lane00000001"), - get_account_id_from_seed::("Rialto.MessagesSender"), - // Accounts, used by RialtoParachain<>Millau bridge - get_account_id_from_seed::(RIALTO_PARACHAIN_MESSAGES_PALLET_OWNER), - get_account_id_from_seed::("RialtoParachain.HeadersAndMessagesRelay1"), - get_account_id_from_seed::("RialtoParachain.HeadersAndMessagesRelay2"), - get_account_id_from_seed::("RialtoParachain.RialtoHeadersRelay1"), - get_account_id_from_seed::("RialtoParachain.RialtoHeadersRelay2"), - get_account_id_from_seed::("RialtoParachain.MessagesSender"), - ] - .into_iter() - .chain(all_authorities) - .collect() -} - -fn session_keys(aura: AuraId, beefy: BeefyId, grandpa: GrandpaId) -> SessionKeys { - SessionKeys { aura, beefy, grandpa } -} - -fn testnet_genesis( - initial_authorities: Vec<(AccountId, AuraId, BeefyId, GrandpaId)>, - root_key: AccountId, - endowed_accounts: Vec, - _enable_println: bool, -) -> RuntimeGenesisConfig { - RuntimeGenesisConfig { - system: SystemConfig { - code: WASM_BINARY.expect("Millau development WASM not available").to_vec(), - ..Default::default() - }, - balances: BalancesConfig { - balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 50)).collect(), - }, - aura: AuraConfig { authorities: Vec::new() }, - beefy: BeefyConfig::default(), - grandpa: GrandpaConfig { authorities: Vec::new(), ..Default::default() }, - sudo: SudoConfig { key: Some(root_key) }, - session: SessionConfig { - keys: initial_authorities - .iter() - .map(|x| { - (x.0.clone(), x.0.clone(), session_keys(x.1.clone(), x.2.clone(), x.3.clone())) - }) - .collect::>(), - }, - bridge_westend_grandpa: BridgeWestendGrandpaConfig { - // for our deployments to avoid multiple same-nonces transactions: - // //Alice is already used to initialize Rialto<->Millau bridge - // => let's use //Westend.GrandpaOwner to initialize Westend->Millau bridge - owner: Some(get_account_id_from_seed::(WESTEND_GRANDPA_PALLET_OWNER)), - ..Default::default() - }, - bridge_rialto_messages: BridgeRialtoMessagesConfig { - owner: Some(get_account_id_from_seed::(RIALTO_MESSAGES_PALLET_OWNER)), - opened_lanes: vec![millau_runtime::rialto_messages::Bridge::get().lane_id()], - ..Default::default() - }, - bridge_rialto_parachain_messages: BridgeRialtoParachainMessagesConfig { - owner: Some(get_account_id_from_seed::( - RIALTO_PARACHAIN_MESSAGES_PALLET_OWNER, - )), - opened_lanes: vec![millau_runtime::rialto_parachain_messages::Bridge::get().lane_id()], - ..Default::default() - }, - xcm_pallet: Default::default(), - xcm_rialto_bridge_hub: XcmRialtoBridgeHubConfig { - opened_bridges: vec![( - xcm::latest::Junctions::Here.into(), - xcm::latest::InteriorMultiLocation::from( - millau_runtime::xcm_config::RialtoNetwork::get(), - ), - )], - ..Default::default() - }, - xcm_rialto_parachain_bridge_hub: XcmRialtoParachainBridgeHubConfig { - opened_bridges: vec![( - xcm::latest::Junctions::Here.into(), - xcm::latest::InteriorMultiLocation::from( - millau_runtime::xcm_config::RialtoParachainNetwork::get(), - ), - )], - ..Default::default() - }, - } -} diff --git a/bin/millau/node/src/cli.rs b/bin/millau/node/src/cli.rs deleted file mode 100644 index 12499b5718d6d8afd2586e4e04546f90da5d3953..0000000000000000000000000000000000000000 --- a/bin/millau/node/src/cli.rs +++ /dev/null @@ -1,73 +0,0 @@ -// 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 . - -use clap::Parser; -use sc_cli::RunCmd; - -#[derive(Debug, Parser)] -pub struct Cli { - #[structopt(subcommand)] - pub subcommand: Option, - - #[structopt(flatten)] - pub run: RunCmd, -} - -/// Possible subcommands of the main binary. -#[derive(Debug, Parser)] -#[allow(clippy::large_enum_variant)] -pub enum Subcommand { - /// Key management CLI utilities - #[clap(subcommand)] - Key(sc_cli::KeySubcommand), - - /// Verify a signature for a message, provided on `STDIN`, with a given (public or secret) key. - Verify(sc_cli::VerifyCmd), - - /// Generate a seed that provides a vanity address. - Vanity(sc_cli::VanityCmd), - - /// Sign a message, with a given (secret) key. - Sign(sc_cli::SignCmd), - - /// Build a chain specification. - BuildSpec(sc_cli::BuildSpecCmd), - - /// Validate blocks. - CheckBlock(sc_cli::CheckBlockCmd), - - /// Export blocks. - ExportBlocks(sc_cli::ExportBlocksCmd), - - /// Export the state of a given block into a chain spec. - ExportState(sc_cli::ExportStateCmd), - - /// Import blocks. - ImportBlocks(sc_cli::ImportBlocksCmd), - - /// Remove the whole chain. - PurgeChain(sc_cli::PurgeChainCmd), - - /// Revert the chain to a previous state. - Revert(sc_cli::RevertCmd), - - /// Inspect blocks or extrinsics. - Inspect(node_inspect::cli::InspectCmd), - - /// Benchmark runtime pallets. - #[clap(subcommand)] - Benchmark(frame_benchmarking_cli::BenchmarkCmd), -} diff --git a/bin/millau/node/src/command.rs b/bin/millau/node/src/command.rs deleted file mode 100644 index 745b393786e1db3ef8f3557e1ca4eb04e97db60d..0000000000000000000000000000000000000000 --- a/bin/millau/node/src/command.rs +++ /dev/null @@ -1,154 +0,0 @@ -// 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 . - -use crate::{ - cli::{Cli, Subcommand}, - service, - service::new_partial, -}; -use frame_benchmarking_cli::BenchmarkCmd; -use millau_runtime::{Block, RuntimeApi}; -use sc_cli::SubstrateCli; -use sc_service::PartialComponents; - -impl SubstrateCli for Cli { - fn impl_name() -> String { - "Millau Bridge Node".into() - } - - fn impl_version() -> String { - env!("CARGO_PKG_VERSION").into() - } - - fn description() -> String { - "Millau Bridge Node".into() - } - - fn author() -> String { - "Parity Technologies".into() - } - - fn support_url() -> String { - "https://github.com/paritytech/parity-bridges-common/".into() - } - - fn copyright_start_year() -> i32 { - 2019 - } - - fn executable_name() -> String { - "millau-bridge-node".into() - } - - fn load_spec(&self, id: &str) -> Result, String> { - Ok(Box::new( - match id { - "" | "dev" => crate::chain_spec::Alternative::Development, - "local" => crate::chain_spec::Alternative::LocalTestnet, - _ => return Err(format!("Unsupported chain specification: {id}")), - } - .load(), - )) - } -} - -/// Parse and run command line arguments -pub fn run() -> sc_cli::Result<()> { - let cli = Cli::from_args(); - // make sure to set correct crypto version. - sp_core::crypto::set_default_ss58_version(sp_core::crypto::Ss58AddressFormat::custom( - millau_runtime::SS58Prefix::get() as u16, - )); - - match &cli.subcommand { - Some(Subcommand::Benchmark(cmd)) => { - let runner = cli.create_runner(cmd)?; - match cmd { - BenchmarkCmd::Pallet(cmd) => - if cfg!(feature = "runtime-benchmarks") { - runner.sync_run(|config| cmd.run::(config)) - } else { - println!( - "Benchmarking wasn't enabled when building the node. \ - You can enable it with `--features runtime-benchmarks`." - ); - Ok(()) - }, - _ => Err("Unsupported benchmarking subcommand".into()), - } - }, - Some(Subcommand::Key(cmd)) => cmd.run(&cli), - Some(Subcommand::Sign(cmd)) => cmd.run(), - Some(Subcommand::Verify(cmd)) => cmd.run(), - Some(Subcommand::Vanity(cmd)) => cmd.run(), - Some(Subcommand::BuildSpec(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.sync_run(|config| cmd.run(config.chain_spec, config.network)) - }, - Some(Subcommand::CheckBlock(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.async_run(|config| { - let PartialComponents { client, task_manager, import_queue, .. } = - new_partial(&config)?; - Ok((cmd.run(client, import_queue), task_manager)) - }) - }, - Some(Subcommand::ExportBlocks(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.async_run(|config| { - let PartialComponents { client, task_manager, .. } = new_partial(&config)?; - Ok((cmd.run(client, config.database), task_manager)) - }) - }, - Some(Subcommand::ExportState(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.async_run(|config| { - let PartialComponents { client, task_manager, .. } = new_partial(&config)?; - Ok((cmd.run(client, config.chain_spec), task_manager)) - }) - }, - Some(Subcommand::ImportBlocks(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.async_run(|config| { - let PartialComponents { client, task_manager, import_queue, .. } = - new_partial(&config)?; - Ok((cmd.run(client, import_queue), task_manager)) - }) - }, - Some(Subcommand::PurgeChain(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.sync_run(|config| cmd.run(config.database)) - }, - Some(Subcommand::Revert(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.async_run(|config| { - let PartialComponents { client, task_manager, backend, .. } = new_partial(&config)?; - Ok((cmd.run(client, backend, None), task_manager)) - }) - }, - Some(Subcommand::Inspect(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner - .sync_run(|config| cmd.run::(config)) - }, - None => { - let runner = cli.create_runner(&cli.run)?; - runner.run_node_until_exit(|config| async move { - service::new_full(config).map_err(sc_cli::Error::Service) - }) - }, - } -} diff --git a/bin/millau/node/src/lib.rs b/bin/millau/node/src/lib.rs deleted file mode 100644 index 382d1c2d7fb1cbd9de67748296227e65a96b80a8..0000000000000000000000000000000000000000 --- a/bin/millau/node/src/lib.rs +++ /dev/null @@ -1,32 +0,0 @@ -// 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 . - -//! Substrate Node Template CLI library. -#![warn(missing_docs)] - -mod chain_spec; -#[macro_use] -mod service; -mod cli; -mod command; - -/// Node run result. -pub type Result = sc_cli::Result<()>; - -/// Run node. -pub fn run() -> Result { - command::run() -} diff --git a/bin/millau/node/src/main.rs b/bin/millau/node/src/main.rs deleted file mode 100644 index cf6dd9f733a16a496352d59e0281dc02fb1db275..0000000000000000000000000000000000000000 --- a/bin/millau/node/src/main.rs +++ /dev/null @@ -1,30 +0,0 @@ -// 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 . - -//! Millau bridge node. - -#![warn(missing_docs)] - -mod chain_spec; -#[macro_use] -mod service; -mod cli; -mod command; - -/// Run the Millau Node -fn main() -> sc_cli::Result<()> { - command::run() -} diff --git a/bin/millau/node/src/service.rs b/bin/millau/node/src/service.rs deleted file mode 100644 index cb57dd118cc7117ddeb180605183ca59b15bfd8e..0000000000000000000000000000000000000000 --- a/bin/millau/node/src/service.rs +++ /dev/null @@ -1,479 +0,0 @@ -// 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 . - -//! Service and ServiceFactory implementation. Specialized wrapper over substrate service. - -use jsonrpsee::RpcModule; -use millau_runtime::{self, opaque::Block, RuntimeApi}; -use sc_client_api::{Backend, BlockBackend}; -use sc_consensus_aura::{CompatibilityMode, ImportQueueParams, SlotProportion, StartAuraParams}; -use sc_consensus_grandpa::SharedVoterState; -pub use sc_executor::NativeElseWasmExecutor; -use sc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY}; -use sc_service::{error::Error as ServiceError, Configuration, TaskManager}; -use sc_telemetry::{Telemetry, TelemetryWorker}; -use sc_transaction_pool_api::OffchainTransactionPoolFactory; -use sp_consensus_aura::sr25519::AuthorityPair as AuraPair; -use std::{sync::Arc, time::Duration}; - -// Our native executor instance. -pub struct ExecutorDispatch; - -impl sc_executor::NativeExecutionDispatch for ExecutorDispatch { - /// Only enable the benchmarking host functions when we actually want to benchmark. - #[cfg(feature = "runtime-benchmarks")] - type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; - /// Otherwise we only use the default Substrate host functions. - #[cfg(not(feature = "runtime-benchmarks"))] - type ExtendHostFunctions = (); - - fn dispatch(method: &str, data: &[u8]) -> Option> { - millau_runtime::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - millau_runtime::native_version() - } -} - -type FullClient = - sc_service::TFullClient>; -type FullBackend = sc_service::TFullBackend; -type FullSelectChain = sc_consensus::LongestChain; - -#[allow(clippy::type_complexity)] -pub fn new_partial( - config: &Configuration, -) -> Result< - sc_service::PartialComponents< - FullClient, - FullBackend, - FullSelectChain, - sc_consensus::DefaultImportQueue, - sc_transaction_pool::FullPool, - ( - sc_consensus_grandpa::GrandpaBlockImport< - FullBackend, - Block, - FullClient, - FullSelectChain, - >, - sc_consensus_grandpa::LinkHalf, - sc_consensus_beefy::BeefyVoterLinks, - sc_consensus_beefy::BeefyRPCLinks, - Option, - ), - >, - ServiceError, -> { - let telemetry = config - .telemetry_endpoints - .clone() - .filter(|x| !x.is_empty()) - .map(|endpoints| -> Result<_, sc_telemetry::Error> { - let worker = TelemetryWorker::new(16)?; - let telemetry = worker.handle().new_telemetry(endpoints); - Ok((worker, telemetry)) - }) - .transpose()?; - - let heap_pages = config - .default_heap_pages - .map_or(DEFAULT_HEAP_ALLOC_STRATEGY, |h| HeapAllocStrategy::Static { extra_pages: h as _ }); - let executor = NativeElseWasmExecutor::::new_with_wasm_executor( - WasmExecutor::builder() - .with_execution_method(config.wasm_method) - .with_onchain_heap_alloc_strategy(heap_pages) - .with_offchain_heap_alloc_strategy(heap_pages) - .with_max_runtime_instances(config.max_runtime_instances) - .with_runtime_cache_size(config.runtime_cache_size) - .build(), - ); - - let (client, backend, keystore_container, task_manager) = - sc_service::new_full_parts::( - config, - telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()), - executor, - )?; - let client = Arc::new(client); - - let telemetry = telemetry.map(|(worker, telemetry)| { - task_manager.spawn_handle().spawn("telemetry", None, worker.run()); - telemetry - }); - - let select_chain = sc_consensus::LongestChain::new(backend.clone()); - - let transaction_pool = sc_transaction_pool::BasicPool::new_full( - config.transaction_pool.clone(), - config.role.is_authority().into(), - config.prometheus_registry(), - task_manager.spawn_essential_handle(), - client.clone(), - ); - - let (grandpa_block_import, grandpa_link) = sc_consensus_grandpa::block_import( - client.clone(), - 512, - &client, - select_chain.clone(), - telemetry.as_ref().map(|x| x.handle()), - )?; - - let (beefy_block_import, beefy_voter_links, beefy_rpc_links) = - sc_consensus_beefy::beefy_block_import_and_links( - grandpa_block_import.clone(), - backend.clone(), - client.clone(), - config.prometheus_registry().cloned(), - ); - - let slot_duration = sc_consensus_aura::slot_duration(&*client)?; - - let import_queue = - sc_consensus_aura::import_queue::(ImportQueueParams { - block_import: beefy_block_import, - justification_import: Some(Box::new(grandpa_block_import.clone())), - client: client.clone(), - create_inherent_data_providers: move |_, ()| async move { - let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *timestamp, - slot_duration, - ); - - Ok((slot, timestamp)) - }, - spawner: &task_manager.spawn_essential_handle(), - registry: config.prometheus_registry(), - check_for_equivocation: Default::default(), - telemetry: telemetry.as_ref().map(|x| x.handle()), - compatibility_mode: CompatibilityMode::None, - })?; - - Ok(sc_service::PartialComponents { - client, - backend, - task_manager, - import_queue, - keystore_container, - select_chain, - transaction_pool, - other: (grandpa_block_import, grandpa_link, beefy_voter_links, beefy_rpc_links, telemetry), - }) -} - -/// Builds a new service for a full client. -pub fn new_full(config: Configuration) -> Result { - use sc_service::WarpSyncParams; - - let sc_service::PartialComponents { - client, - backend, - mut task_manager, - import_queue, - keystore_container, - select_chain, - transaction_pool, - other: (block_import, grandpa_link, beefy_voter_links, beefy_rpc_links, mut telemetry), - } = new_partial(&config)?; - - let genesis_hash = client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"); - - let mut net_config = sc_network::config::FullNetworkConfiguration::new(&config.network); - - // Note: GrandPa is pushed before the Polkadot-specific protocols. This doesn't change - // anything in terms of behaviour, but makes the logs more consistent with the other - // Substrate nodes. - let grandpa_protocol_name = sc_consensus_grandpa::protocol_standard_name( - &client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"), - &config.chain_spec, - ); - net_config.add_notification_protocol(sc_consensus_grandpa::grandpa_peers_set_config( - grandpa_protocol_name.clone(), - )); - - let beefy_gossip_proto_name = - sc_consensus_beefy::gossip_protocol_name(genesis_hash, config.chain_spec.fork_id()); - // `beefy_on_demand_justifications_handler` is given to `beefy-gadget` task to be run, - // while `beefy_req_resp_cfg` is added to `config.network.request_response_protocols`. - let (beefy_on_demand_justifications_handler, beefy_req_resp_cfg) = - sc_consensus_beefy::communication::request_response::BeefyJustifsRequestHandler::new( - genesis_hash, - config.chain_spec.fork_id(), - client.clone(), - config.prometheus_registry().cloned(), - ); - net_config.add_notification_protocol( - sc_consensus_beefy::communication::beefy_peers_set_config(beefy_gossip_proto_name.clone()), - ); - net_config.add_request_response_protocol(beefy_req_resp_cfg); - - let role = config.role.clone(); - let warp_sync = Arc::new(sc_consensus_grandpa::warp_proof::NetworkProvider::new( - backend.clone(), - grandpa_link.shared_authority_set().clone(), - Vec::default(), - )); - - let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = - sc_service::build_network(sc_service::BuildNetworkParams { - config: &config, - net_config, - client: client.clone(), - transaction_pool: transaction_pool.clone(), - spawn_handle: task_manager.spawn_handle(), - import_queue, - block_announce_validator_builder: None, - warp_sync_params: Some(WarpSyncParams::WithProvider(warp_sync)), - block_relay: None, - })?; - - if config.offchain_worker.enabled { - use futures::FutureExt; - - task_manager.spawn_handle().spawn( - "offchain-workers-runner", - "offchain-work", - sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions { - runtime_api_provider: client.clone(), - keystore: Some(keystore_container.keystore()), - offchain_db: backend.offchain_storage(), - transaction_pool: Some(OffchainTransactionPoolFactory::new( - transaction_pool.clone(), - )), - network_provider: network.clone(), - is_validator: role.is_authority(), - enable_http_requests: false, - custom_extensions: move |_| vec![], - }) - .run(client.clone(), task_manager.spawn_handle()) - .boxed(), - ); - } - - let force_authoring = config.force_authoring; - let backoff_authoring_blocks: Option<()> = None; - let name = config.network.node_name.clone(); - let enable_grandpa = !config.disable_grandpa; - let prometheus_registry = config.prometheus_registry().cloned(); - let shared_voter_state = SharedVoterState::empty(); - - let rpc_extensions_builder = { - use sc_consensus_grandpa::FinalityProofProvider as GrandpaFinalityProofProvider; - - use mmr_rpc::{Mmr, MmrApiServer}; - use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; - use sc_consensus_beefy_rpc::{Beefy, BeefyApiServer}; - use sc_consensus_grandpa_rpc::{Grandpa, GrandpaApiServer}; - use sc_rpc::DenyUnsafe; - use substrate_frame_rpc_system::{System, SystemApiServer}; - - let backend = backend.clone(); - let client = client.clone(); - let pool = transaction_pool.clone(); - - let justification_stream = grandpa_link.justification_stream(); - let shared_authority_set = grandpa_link.shared_authority_set().clone(); - let shared_voter_state = shared_voter_state.clone(); - - let finality_proof_provider = GrandpaFinalityProofProvider::new_for_service( - backend.clone(), - Some(shared_authority_set.clone()), - ); - - Box::new(move |_, subscription_executor: sc_rpc::SubscriptionTaskExecutor| { - let mut io = RpcModule::new(()); - let map_err = |e| sc_service::Error::Other(format!("{e}")); - io.merge(System::new(client.clone(), pool.clone(), DenyUnsafe::No).into_rpc()) - .map_err(map_err)?; - io.merge(TransactionPayment::new(client.clone()).into_rpc()).map_err(map_err)?; - io.merge( - Grandpa::new( - subscription_executor.clone(), - shared_authority_set.clone(), - shared_voter_state.clone(), - justification_stream.clone(), - finality_proof_provider.clone(), - ) - .into_rpc(), - ) - .map_err(map_err)?; - io.merge( - Beefy::::new( - beefy_rpc_links.from_voter_justif_stream.clone(), - beefy_rpc_links.from_voter_best_beefy_stream.clone(), - subscription_executor, - ) - .map_err(|e| sc_service::Error::Other(format!("{e}")))? - .into_rpc(), - ) - .map_err(map_err)?; - io.merge( - Mmr::new( - client.clone(), - backend - .offchain_storage() - .ok_or("Backend doesn't provide the required offchain storage")?, - ) - .into_rpc(), - ) - .map_err(map_err)?; - Ok(io) - }) - }; - - let _rpc_handlers = sc_service::spawn_tasks(sc_service::SpawnTasksParams { - network: network.clone(), - client: client.clone(), - keystore: keystore_container.keystore(), - task_manager: &mut task_manager, - transaction_pool: transaction_pool.clone(), - sync_service: sync_service.clone(), - rpc_builder: rpc_extensions_builder, - backend: backend.clone(), - system_rpc_tx, - config, - tx_handler_controller, - telemetry: telemetry.as_mut(), - })?; - - if role.is_authority() { - let proposer_factory = sc_basic_authorship::ProposerFactory::new( - task_manager.spawn_handle(), - client.clone(), - transaction_pool.clone(), - prometheus_registry.as_ref(), - telemetry.as_ref().map(|x| x.handle()), - ); - - let slot_duration = sc_consensus_aura::slot_duration(&*client)?; - - let aura = sc_consensus_aura::start_aura::( - StartAuraParams { - slot_duration, - client: client.clone(), - select_chain, - block_import, - proposer_factory, - create_inherent_data_providers: move |_, ()| async move { - let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *timestamp, - slot_duration, - ); - - Ok((slot, timestamp)) - }, - force_authoring, - backoff_authoring_blocks, - keystore: keystore_container.keystore(), - sync_oracle: sync_service.clone(), - justification_sync_link: sync_service.clone(), - block_proposal_slot_portion: SlotProportion::new(2f32 / 3f32), - max_block_proposal_slot_portion: None, - telemetry: telemetry.as_ref().map(|x| x.handle()), - compatibility_mode: CompatibilityMode::None, - }, - )?; - - // the AURA authoring task is considered essential, i.e. if it - // fails we take down the service with it. - task_manager - .spawn_essential_handle() - .spawn_blocking("aura", Some("block-authoring"), aura); - } - - // if the node isn't actively participating in consensus then it doesn't - // need a keystore, regardless of which protocol we use below. - let keystore = if role.is_authority() { Some(keystore_container.keystore()) } else { None }; - - let justifications_protocol_name = beefy_on_demand_justifications_handler.protocol_name(); - let payload_provider = sp_consensus_beefy::mmr::MmrRootProvider::new(client.clone()); - let beefy_params = sc_consensus_beefy::BeefyParams { - client: client.clone(), - backend, - payload_provider, - runtime: client, - key_store: keystore.clone(), - network_params: sc_consensus_beefy::BeefyNetworkParams { - network: network.clone(), - sync: sync_service.clone(), - gossip_protocol_name: beefy_gossip_proto_name, - justifications_protocol_name, - _phantom: core::marker::PhantomData::, - }, - min_block_delta: 2, - prometheus_registry: prometheus_registry.clone(), - links: beefy_voter_links, - on_demand_justifications_handler: beefy_on_demand_justifications_handler, - }; - - // Start the BEEFY bridge gadget. - task_manager.spawn_essential_handle().spawn_blocking( - "beefy-gadget", - None, - sc_consensus_beefy::start_beefy_gadget::<_, _, _, _, _, _, _>(beefy_params), - ); - - let grandpa_config = sc_consensus_grandpa::Config { - // FIXME #1578 make this available through chainspec - gossip_duration: Duration::from_millis(333), - justification_generation_period: 512, - name: Some(name), - observer_enabled: false, - keystore, - local_role: role, - telemetry: telemetry.as_ref().map(|x| x.handle()), - protocol_name: grandpa_protocol_name, - }; - - if enable_grandpa { - // start the full GRANDPA voter - // NOTE: non-authorities could run the GRANDPA observer protocol, but at - // this point the full voter should provide better guarantees of block - // and vote data availability than the observer. The observer has not - // been tested extensively yet and having most nodes in a network run it - // could lead to finality stalls. - let grandpa_config = sc_consensus_grandpa::GrandpaParams { - config: grandpa_config, - link: grandpa_link, - network, - sync: sync_service, - voting_rule: sc_consensus_grandpa::VotingRulesBuilder::default().build(), - prometheus_registry, - shared_voter_state, - telemetry: telemetry.as_ref().map(|x| x.handle()), - offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(transaction_pool), - }; - - // the GRANDPA voter task is considered infallible, i.e. - // if it fails we take down the service with it. - task_manager.spawn_essential_handle().spawn_blocking( - "grandpa-voter", - None, - sc_consensus_grandpa::run_grandpa_voter(grandpa_config)?, - ); - } - - network_starter.start_network(); - Ok(task_manager) -} diff --git a/bin/millau/runtime/Cargo.toml b/bin/millau/runtime/Cargo.toml deleted file mode 100644 index c0ffa4d2870bae6a29616d5849595645c2b3de0d..0000000000000000000000000000000000000000 --- a/bin/millau/runtime/Cargo.toml +++ /dev/null @@ -1,159 +0,0 @@ -[package] -name = "millau-runtime" -version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2021" -repository = "https://github.com/paritytech/parity-bridges-common/" -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" - -[dependencies] -hex-literal = "0.4" -codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } - -# Bridge dependencies - -bp-header-chain = { path = "../../../primitives/header-chain", default-features = false } -bp-messages = { path = "../../../primitives/messages", default-features = false } -bp-millau = { path = "../../../primitives/chain-millau", default-features = false } -bp-parachains = { path = "../../../primitives/parachains", default-features = false } -bp-polkadot-core = { path = "../../../primitives/polkadot-core", default-features = false } -bp-relayers = { path = "../../../primitives/relayers", default-features = false } -bp-rialto = { path = "../../../primitives/chain-rialto", default-features = false } -bp-rialto-parachain = { path = "../../../primitives/chain-rialto-parachain", default-features = false } -bp-runtime = { path = "../../../primitives/runtime", default-features = false } -bp-westend = { path = "../../../primitives/chain-westend", default-features = false } -bp-xcm-bridge-hub = { path = "../../../primitives/xcm-bridge-hub", default-features = false } -bridge-runtime-common = { path = "../../runtime-common", default-features = false } -pallet-bridge-grandpa = { path = "../../../modules/grandpa", default-features = false } -pallet-bridge-messages = { path = "../../../modules/messages", default-features = false } -pallet-bridge-parachains = { path = "../../../modules/parachains", default-features = false } -pallet-bridge-relayers = { path = "../../../modules/relayers", default-features = false } -pallet-shift-session-manager = { path = "../../../modules/shift-session-manager", default-features = false } -pallet-xcm-bridge-hub = { path = "../../../modules/xcm-bridge-hub", default-features = false } -pallet-xcm-bridge-hub-router = { path = "../../../modules/xcm-bridge-hub-router", default-features = false } - -# Substrate Dependencies - -sp-consensus-beefy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false, optional = true } -frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-beefy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-beefy-mmr = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-mmr = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-offences = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false, features = ["historical"]} -pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } - -# Polkadot Dependencies -pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } - -[dev-dependencies] -bridge-runtime-common = { path = "../../runtime-common", features = ["integrity-test", "std"] } -env_logger = "0.10" -pallet-bridge-relayers = { path = "../../../modules/relayers", features = ["integrity-test", "std"] } -static_assertions = "1.1" - -[build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } - -[features] -default = [ "std" ] -std = [ - "bp-messages/std", - "bp-millau/std", - "bp-parachains/std", - "bp-polkadot-core/std", - "bp-relayers/std", - "bp-rialto-parachain/std", - "bp-rialto/std", - "bp-runtime/std", - "bp-westend/std", - "bp-xcm-bridge-hub/std", - "bridge-runtime-common/std", - "codec/std", - "frame-executive/std", - "frame-support/std", - "frame-system-rpc-runtime-api/std", - "frame-system/std", - "pallet-aura/std", - "pallet-authorship/std", - "pallet-balances/std", - "pallet-beefy-mmr/std", - "pallet-beefy/std", - "pallet-bridge-grandpa/std", - "pallet-bridge-messages/std", - "pallet-bridge-parachains/std", - "pallet-bridge-relayers/std", - "pallet-grandpa/std", - "pallet-mmr/std", - "pallet-offences/std", - "pallet-session/std", - "pallet-shift-session-manager/std", - "pallet-sudo/std", - "pallet-timestamp/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-utility/std", - "pallet-xcm-bridge-hub-router/std", - "pallet-xcm-bridge-hub/std", - "pallet-xcm/std", - "scale-info/std", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-aura/std", - "sp-consensus-beefy/std", - "sp-core/std", - "sp-inherents/std", - "sp-io/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", - "xcm-builder/std", - "xcm-executor/std", - "xcm/std", -] -runtime-benchmarks = [ - "bridge-runtime-common/runtime-benchmarks", - "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "pallet-bridge-grandpa/runtime-benchmarks", - "pallet-bridge-messages/runtime-benchmarks", - "pallet-bridge-parachains/runtime-benchmarks", - "pallet-bridge-relayers/runtime-benchmarks", - "pallet-xcm-bridge-hub-router/runtime-benchmarks", - "pallet-xcm-bridge-hub/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", -] diff --git a/bin/millau/runtime/build.rs b/bin/millau/runtime/build.rs deleted file mode 100644 index 25e220e46fc3b76bbf5474247378d1033f7cb5aa..0000000000000000000000000000000000000000 --- a/bin/millau/runtime/build.rs +++ /dev/null @@ -1,26 +0,0 @@ -// 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 . - -use substrate_wasm_builder::WasmBuilder; - -fn main() { - WasmBuilder::new() - .with_current_project() - .import_memory() - .export_heap_base() - .disable_runtime_version_section_check() - .build() -} diff --git a/bin/millau/runtime/src/lib.rs b/bin/millau/runtime/src/lib.rs deleted file mode 100644 index 31262b0328bde8be81996fdf72cabcbf6d49d0e9..0000000000000000000000000000000000000000 --- a/bin/millau/runtime/src/lib.rs +++ /dev/null @@ -1,1306 +0,0 @@ -// 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 . - -//! The Millau runtime. This can be compiled with `#[no_std]`, ready for Wasm. - -#![cfg_attr(not(feature = "std"), no_std)] -// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. -#![recursion_limit = "256"] -// Runtime-generated enums -#![allow(clippy::large_enum_variant)] -// From construct_runtime macro -#![allow(clippy::from_over_into)] - -// Make the WASM binary available. -#[cfg(feature = "std")] -include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); - -pub mod rialto_messages; -pub mod rialto_parachain_messages; -pub mod weights; -pub mod xcm_config; - -use bp_parachains::SingleParaStoredHeaderDataBuilder; -#[cfg(feature = "runtime-benchmarks")] -use bp_relayers::{RewardsAccountOwner, RewardsAccountParams}; -use bp_runtime::HeaderId; -use pallet_grandpa::{ - fg_primitives, AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList, -}; -use pallet_transaction_payment::{FeeDetails, Multiplier, RuntimeDispatchInfo}; -use sp_api::impl_runtime_apis; -use sp_consensus_aura::sr25519::AuthorityId as AuraId; -use sp_consensus_beefy::{ecdsa_crypto::AuthorityId as BeefyId, mmr::MmrLeafVersion, ValidatorSet}; -use sp_core::{ConstBool, ConstU128, OpaqueMetadata}; -use sp_runtime::{ - create_runtime_str, generic, impl_opaque_keys, - traits::{Block as BlockT, IdentityLookup, Keccak256, NumberFor, OpaqueKeys}, - transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, FixedPointNumber, KeyTypeId, Perquintill, -}; -use sp_std::prelude::*; -#[cfg(feature = "std")] -use sp_version::NativeVersion; -use sp_version::RuntimeVersion; -use xcm_builder::{NetworkExportTable, NetworkExportTableItem}; - -// to be able to use Millau runtime in `bridge-runtime-common` tests -pub use bridge_runtime_common; - -// A few exports that help ease life for downstream crates. -pub use frame_support::{ - construct_runtime, - dispatch::DispatchClass, - parameter_types, - traits::{ - ConstU32, ConstU64, ConstU8, Currency, ExistenceRequirement, Imbalance, KeyOwnerProofSystem, - }, - weights::{ - constants::WEIGHT_REF_TIME_PER_SECOND, ConstantMultiplier, IdentityFee, RuntimeDbWeight, - Weight, - }, - StorageValue, -}; - -pub use frame_system::Call as SystemCall; -pub use pallet_balances::Call as BalancesCall; -pub use pallet_bridge_grandpa::Call as BridgeGrandpaCall; -pub use pallet_bridge_messages::Call as MessagesCall; -pub use pallet_bridge_parachains::Call as BridgeParachainsCall; -pub use pallet_sudo::Call as SudoCall; -pub use pallet_timestamp::Call as TimestampCall; -pub use pallet_xcm::Call as XcmCall; - -use bridge_runtime_common::generate_bridge_reject_obsolete_headers_and_messages; - -#[cfg(any(feature = "std", test))] -pub use sp_runtime::BuildStorage; -pub use sp_runtime::{Perbill, Permill}; - -/// An index to a block. -pub type BlockNumber = bp_millau::BlockNumber; - -/// Alias to 512-bit hash when used in the context of a transaction signature on the chain. -pub type Signature = bp_millau::Signature; - -/// Some way of identifying an account on the chain. We intentionally make it equivalent -/// to the public key of our transaction signing scheme. -pub type AccountId = bp_millau::AccountId; - -/// The type for looking up accounts. We don't expect more than 4 billion of them, but you -/// never know... -pub type AccountIndex = u32; - -/// Balance of an account. -pub type Balance = bp_millau::Balance; - -/// Nonce of a transaction in the chain. -pub type Nonce = bp_millau::Nonce; - -/// A hash of some data used by the chain. -pub type Hash = bp_millau::Hash; - -/// Hashing algorithm used by the chain. -pub type Hashing = bp_millau::Hasher; - -/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know -/// the specifics of the runtime. They can then be made to be agnostic over specific formats -/// of data like extrinsics, allowing for them to continue syncing the network through upgrades -/// to even the core data structures. -pub mod opaque { - use super::*; - - pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic; - - /// Opaque block header type. - pub type Header = generic::Header; - /// Opaque block type. - pub type Block = generic::Block; - /// Opaque block identifier type. - pub type BlockId = generic::BlockId; -} - -impl_opaque_keys! { - pub struct SessionKeys { - pub aura: Aura, - pub beefy: Beefy, - pub grandpa: Grandpa, - } -} - -/// This runtime version. -#[sp_version::runtime_version] -pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("millau-runtime"), - impl_name: create_runtime_str!("millau-runtime"), - authoring_version: 1, - spec_version: 1, - impl_version: 1, - apis: RUNTIME_API_VERSIONS, - transaction_version: 1, - state_version: 0, -}; - -/// The version information used to identify this runtime when compiled natively. -#[cfg(feature = "std")] -pub fn native_version() -> NativeVersion { - NativeVersion { runtime_version: VERSION, can_author_with: Default::default() } -} - -parameter_types! { - pub const BlockHashCount: BlockNumber = 250; - pub const Version: RuntimeVersion = VERSION; - pub const DbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 60_000_000, // ~0.06 ms = ~60 µs - write: 200_000_000, // ~0.2 ms = 200 µs - }; - pub const SS58Prefix: u8 = 60; -} - -impl frame_system::Config for Runtime { - /// The basic call filter to use in dispatchable. - type BaseCallFilter = frame_support::traits::Everything; - /// The identifier used to distinguish between accounts. - type AccountId = AccountId; - /// The aggregated dispatch type that is available for extrinsics. - type RuntimeCall = RuntimeCall; - /// The lookup mechanism to get account ID from whatever is passed in dispatchers. - type Lookup = IdentityLookup; - /// The index type for storing how many extrinsics an account has signed. - type Nonce = Nonce; - /// The type for hashing blocks and tries. - type Hash = Hash; - /// The hashing algorithm used. - type Hashing = Hashing; - /// The header type. - type Block = Block; - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; - /// The ubiquitous origin type. - type RuntimeOrigin = RuntimeOrigin; - /// Maximum number of block number to block hash mappings to keep (oldest pruned first). - type BlockHashCount = BlockHashCount; - /// Version of the runtime. - type Version = Version; - /// Provides information about the pallet setup in the runtime. - type PalletInfo = PalletInfo; - /// What to do if a new account is created. - type OnNewAccount = (); - /// What to do if an account is fully reaped from the system. - type OnKilledAccount = (); - /// The data to be stored in an account. - type AccountData = pallet_balances::AccountData; - // TODO: update me (https://github.com/paritytech/parity-bridges-common/issues/78) - /// Weight information for the extrinsics of this pallet. - type SystemWeightInfo = (); - /// Block and extrinsics weights: base values and limits. - type BlockWeights = bp_millau::BlockWeights; - /// The maximum length of a block (in bytes). - type BlockLength = bp_millau::BlockLength; - /// The weight of database operations that the runtime can invoke. - type DbWeight = DbWeight; - /// The designated SS58 prefix of this chain. - type SS58Prefix = SS58Prefix; - /// The set code logic, just the default since we're not a parachain. - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; -} - -impl pallet_aura::Config for Runtime { - type AuthorityId = AuraId; - type MaxAuthorities = ConstU32<10>; - type DisabledValidators = (); - type AllowMultipleBlocksPerSlot = ConstBool; -} - -impl pallet_beefy::Config for Runtime { - type BeefyId = BeefyId; - type MaxAuthorities = ConstU32<10>; - type MaxSetIdSessionEntries = ConstU64<0>; - type OnNewValidatorSet = MmrLeaf; - type WeightInfo = (); - type KeyOwnerProof = sp_core::Void; - type EquivocationReportSystem = (); - type MaxNominators = ConstU32<256>; -} - -impl pallet_grandpa::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - // TODO: update me (https://github.com/paritytech/parity-bridges-common/issues/78) - type WeightInfo = (); - type MaxAuthorities = ConstU32<10>; - type MaxSetIdSessionEntries = ConstU64<0>; - type KeyOwnerProof = >::Proof; - type EquivocationReportSystem = - pallet_grandpa::EquivocationReportSystem; - type MaxNominators = ConstU32<256>; -} - -/// MMR helper types. -mod mmr { - use super::Runtime; - pub use pallet_mmr::primitives::*; - - pub type Leaf = <::LeafData as LeafDataProvider>::LeafData; - pub type Hashing = ::Hashing; - pub type Hash = ::Output; -} - -impl pallet_mmr::Config for Runtime { - const INDEXING_PREFIX: &'static [u8] = b"mmr"; - type Hashing = Keccak256; - type OnNewRoot = pallet_beefy_mmr::DepositBeefyDigest; - type WeightInfo = (); - type LeafData = pallet_beefy_mmr::Pallet; -} - -parameter_types! { - /// Version of the produced MMR leaf. - /// - /// The version consists of two parts; - /// - `major` (3 bits) - /// - `minor` (5 bits) - /// - /// `major` should be updated only if decoding the previous MMR Leaf format from the payload - /// is not possible (i.e. backward incompatible change). - /// `minor` should be updated if fields are added to the previous MMR Leaf, which given SCALE - /// encoding does not prevent old leafs from being decoded. - /// - /// Hence we expect `major` to be changed really rarely (think never). - /// See [`MmrLeafVersion`] type documentation for more details. - pub LeafVersion: MmrLeafVersion = MmrLeafVersion::new(0, 0); -} - -pub struct BeefyDummyDataProvider; - -impl sp_consensus_beefy::mmr::BeefyDataProvider<()> for BeefyDummyDataProvider { - fn extra_data() {} -} - -impl pallet_beefy_mmr::Config for Runtime { - type LeafVersion = LeafVersion; - type BeefyAuthorityToMerkleLeaf = pallet_beefy_mmr::BeefyEcdsaToEthereum; - type LeafExtra = (); - type BeefyDataProvider = BeefyDummyDataProvider; -} - -parameter_types! { - pub const MinimumPeriod: u64 = bp_millau::SLOT_DURATION / 2; -} - -impl pallet_timestamp::Config for Runtime { - /// A timestamp: milliseconds since the UNIX epoch. - type Moment = u64; - type OnTimestampSet = Aura; - type MinimumPeriod = MinimumPeriod; - // TODO: update me (https://github.com/paritytech/parity-bridges-common/issues/78) - type WeightInfo = (); -} - -parameter_types! { - pub const ExistentialDeposit: bp_millau::Balance = 500; -} - -impl pallet_balances::Config for Runtime { - /// The type for recording an account's balance. - type Balance = Balance; - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - // TODO: update me (https://github.com/paritytech/parity-bridges-common/issues/78) - type WeightInfo = (); - // For weight estimation, we assume that the most locks on an individual account will be 50. - // This number may need to be adjusted in the future if this assumption no longer holds true. - type MaxLocks = ConstU32<50>; - type MaxReserves = ConstU32<50>; - type ReserveIdentifier = [u8; 8]; - type RuntimeHoldReason = RuntimeHoldReason; - type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; - type MaxFreezes = ConstU32<0>; -} - -parameter_types! { - pub const TransactionBaseFee: Balance = 0; - pub const TransactionByteFee: Balance = 1; - // values for following parameters are copied from polkadot repo, but it is fine - // not to sync them - we're not going to make Rialto a full copy of one of Polkadot-like chains - pub const TargetBlockFullness: Perquintill = Perquintill::from_percent(25); - pub AdjustmentVariable: Multiplier = Multiplier::saturating_from_rational(3, 100_000); - pub MinimumMultiplier: Multiplier = Multiplier::saturating_from_rational(1, 1_000_000u128); - pub MaximumMultiplier: Multiplier = sp_runtime::traits::Bounded::max_value(); -} - -impl pallet_transaction_payment::Config for Runtime { - type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; - type OperationalFeeMultiplier = ConstU8<5>; - type WeightToFee = bp_millau::WeightToFee; - type LengthToFee = ConstantMultiplier; - type FeeMultiplierUpdate = pallet_transaction_payment::TargetedFeeAdjustment< - Runtime, - TargetBlockFullness, - AdjustmentVariable, - MinimumMultiplier, - MaximumMultiplier, - >; - type RuntimeEvent = RuntimeEvent; -} - -impl pallet_sudo::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type WeightInfo = pallet_sudo::weights::SubstrateWeight; -} - -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"; - pub ReportLongevity: u64 = Period::get() * 10; -} - -impl pallet_session::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type ValidatorId = ::AccountId; - type ValidatorIdOf = (); - type ShouldEndSession = pallet_session::PeriodicSessions; - type NextSessionRotation = pallet_session::PeriodicSessions; - type SessionManager = pallet_shift_session_manager::Pallet; - type SessionHandler = ::KeyTypeIdProviders; - type Keys = SessionKeys; - // TODO: update me (https://github.com/paritytech/parity-bridges-common/issues/78) - type WeightInfo = (); -} - -impl frame_system::offchain::SendTransactionTypes for Runtime -where - RuntimeCall: From, -{ - type Extrinsic = UncheckedExtrinsic; - type OverarchingCall = RuntimeCall; -} - -impl pallet_authorship::Config for Runtime { - type FindAuthor = pallet_session::FindAccountFromAuthorIndex; - type EventHandler = (); -} - -pub struct FullIdentificationOf; -impl sp_runtime::traits::Convert> for FullIdentificationOf { - fn convert(_: AccountId) -> Option<()> { - Some(()) - } -} - -impl pallet_session::historical::Config for Runtime { - type FullIdentification = (); - type FullIdentificationOf = FullIdentificationOf; -} - -impl pallet_offences::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type IdentificationTuple = pallet_session::historical::IdentificationTuple; - type OnOffenceHandler = (); -} - -impl pallet_bridge_relayers::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Reward = Balance; - type PaymentProcedure = - bp_relayers::PayRewardFromAccount, AccountId>; - type StakeAndSlash = pallet_bridge_relayers::StakeAndSlashNamed< - AccountId, - BlockNumber, - Balances, - RelayerStakeReserveId, - ConstU64<1_000>, - ConstU64<1_000>, - ConstU64<8>, - >; - type MaxLanesPerRelayer = ConstU32<16>; - type MaxActiveRelayersPerLane = ConstU32<16>; - type MaxNextRelayersPerLane = ConstU32<1_024>; - type InitialElectionLength = ConstU64<16>; - type SlotLength = ConstU64<16>; - type EpochLength = ConstU64<1_024>; - type PriorityBoostPerMessage = PriorityBoostPerMessage; - type PriorityBoostForActiveLaneRelayer = ConstU64<0>; - type WeightInfo = (); -} - -pub type RialtoGrandpaInstance = (); -impl pallet_bridge_grandpa::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type BridgedChain = bp_rialto::Rialto; - type MaxFreeMandatoryHeadersPerBlock = ConstU32<4>; - type HeadersToKeep = ConstU32<{ bp_rialto::DAYS }>; - type WeightInfo = pallet_bridge_grandpa::weights::BridgeWeight; -} - -pub type WestendGrandpaInstance = pallet_bridge_grandpa::Instance1; -impl pallet_bridge_grandpa::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type BridgedChain = bp_westend::Westend; - type MaxFreeMandatoryHeadersPerBlock = ConstU32<4>; - type HeadersToKeep = ConstU32<{ bp_westend::DAYS }>; - type WeightInfo = pallet_bridge_grandpa::weights::BridgeWeight; -} - -impl pallet_shift_session_manager::Config for Runtime {} - -parameter_types! { - pub const MaxMessagesToPruneAtOnce: bp_messages::MessageNonce = 8; - pub const RootAccountForPayments: Option = None; -} - -/// Instance of the messages pallet used to relay messages to/from Rialto chain. -pub type WithRialtoMessagesInstance = (); - -impl pallet_bridge_messages::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = weights::RialtoMessagesWeightInfo; - - type ThisChain = bp_millau::Millau; - type BridgedChain = bp_rialto::Rialto; - type BridgedHeaderChain = BridgeRialtoGrandpa; - - type OutboundPayload = bp_xcm_bridge_hub::XcmAsPlainPayload; - type InboundPayload = bp_xcm_bridge_hub::XcmAsPlainPayload; - - type DeliveryPayments = (); - type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter< - Runtime, - WithRialtoMessagesInstance, - frame_support::traits::ConstU64<0>, - frame_support::traits::ConstU64<100_000>, - >; - type OnMessagesDelivered = XcmRialtoBridgeHub; - - type MessageDispatch = XcmRialtoBridgeHub; -} - -/// Instance of the messages pallet used to relay messages to/from RialtoParachain chain. -pub type WithRialtoParachainMessagesInstance = pallet_bridge_messages::Instance1; - -impl pallet_bridge_messages::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = weights::RialtoParachainMessagesWeightInfo; - - type ThisChain = bp_millau::Millau; - type BridgedChain = bp_rialto_parachain::RialtoParachain; - type BridgedHeaderChain = pallet_bridge_parachains::ParachainHeaders< - Runtime, - WithRialtoParachainsInstance, - bp_rialto_parachain::RialtoParachain, - >; - - type OutboundPayload = bp_xcm_bridge_hub::XcmAsPlainPayload; - type InboundPayload = bp_xcm_bridge_hub::XcmAsPlainPayload; - - type DeliveryPayments = (); - type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter< - Runtime, - WithRialtoParachainMessagesInstance, - frame_support::traits::ConstU64<0>, - frame_support::traits::ConstU64<100_000>, - >; - type OnMessagesDelivered = XcmRialtoParachainBridgeHub; - - type MessageDispatch = XcmRialtoParachainBridgeHub; -} - -parameter_types! { - pub const RialtoParasPalletName: &'static str = bp_rialto::PARAS_PALLET_NAME; - pub const WestendParasPalletName: &'static str = bp_westend::PARAS_PALLET_NAME; - pub const MaxRialtoParaHeadDataSize: u32 = bp_rialto::MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE; - pub const MaxWestendParaHeadDataSize: u32 = bp_westend::MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE; -} - -/// Instance of the with-Rialto parachains pallet. -pub type WithRialtoParachainsInstance = (); - -impl pallet_bridge_parachains::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = pallet_bridge_parachains::weights::BridgeWeight; - type BridgesGrandpaPalletInstance = RialtoGrandpaInstance; - type ParasPalletName = RialtoParasPalletName; - type ParaStoredHeaderDataBuilder = - SingleParaStoredHeaderDataBuilder; - type HeadsToKeep = ConstU32<1024>; - type MaxParaHeadDataSize = MaxRialtoParaHeadDataSize; -} - -/// Instance of the with-Westend parachains pallet. -pub type WithWestendParachainsInstance = pallet_bridge_parachains::Instance1; - -impl pallet_bridge_parachains::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = pallet_bridge_parachains::weights::BridgeWeight; - type BridgesGrandpaPalletInstance = WestendGrandpaInstance; - type ParasPalletName = WestendParasPalletName; - type ParaStoredHeaderDataBuilder = - SingleParaStoredHeaderDataBuilder; - type HeadsToKeep = ConstU32<1024>; - type MaxParaHeadDataSize = MaxWestendParaHeadDataSize; -} - -impl pallet_utility::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type PalletsOrigin = OriginCaller; - type WeightInfo = (); -} - -// this config is totally incorrect - the pallet is not actually used at this runtime. We need -// it only to be able to run benchmarks and make required traits (and default weights for tests). - -parameter_types! { - pub BridgeTable: Vec - = vec![ - NetworkExportTableItem::new( - xcm_config::RialtoNetwork::get(), - None, - xcm_config::TokenLocation::get(), - Some((xcm_config::TokenAssetId::get(), 1_000_000_000_u128).into()) - ) - ]; -} - -impl pallet_xcm_bridge_hub_router::Config for Runtime { - type WeightInfo = (); - - type UniversalLocation = xcm_config::UniversalLocation; - type SiblingBridgeHubLocation = xcm_config::TokenLocation; - type BridgedNetworkId = xcm_config::RialtoNetwork; - type Bridges = NetworkExportTable; - - type ToBridgeHubSender = xcm_config::XcmRouter; - type LocalXcmChannelManager = xcm_config::EmulatedSiblingXcmpChannel; - - type ByteFee = ConstU128<1_000>; - type FeeAsset = xcm_config::TokenAssetId; -} - -/// Instance of the XCM bridge hub pallet used to relay messages to/from Rialto chain. -pub type WithRialtoXcmBridgeHubInstance = (); - -impl pallet_xcm_bridge_hub::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - - type UniversalLocation = xcm_config::UniversalLocation; - type BridgedNetworkId = xcm_config::RialtoNetwork; - type BridgeMessagesPalletInstance = WithRialtoMessagesInstance; - - type OpenBridgeOrigin = frame_support::traits::NeverEnsureOrigin; - type BridgeOriginAccountIdConverter = xcm_config::SovereignAccountOf; - - type BridgeReserve = ConstU64<1_000_000_000>; - type NativeCurrency = Balances; - - type LocalXcmChannelManager = (); - type BlobDispatcher = xcm_config::OnMillauBlobDispatcher; - type MessageExportPrice = (); -} - -/// Instance of the XCM bridge hub pallet used to relay messages to/from RialtoParachain chain. -pub type WithRialtoParachainXcmBridgeHubInstance = pallet_xcm_bridge_hub::Instance1; - -impl pallet_xcm_bridge_hub::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - - type UniversalLocation = xcm_config::UniversalLocation; - type BridgedNetworkId = xcm_config::RialtoParachainNetwork; - type BridgeMessagesPalletInstance = WithRialtoParachainMessagesInstance; - - type OpenBridgeOrigin = frame_support::traits::NeverEnsureOrigin; - type BridgeOriginAccountIdConverter = xcm_config::SovereignAccountOf; - - type BridgeReserve = ConstU64<1_000_000_000>; - type NativeCurrency = Balances; - - type LocalXcmChannelManager = (); - type BlobDispatcher = xcm_config::OnMillauBlobDispatcher; - type MessageExportPrice = (); -} - -construct_runtime!( - pub enum Runtime { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Sudo: pallet_sudo::{Pallet, Call, Config, Storage, Event}, - Utility: pallet_utility, - - // Must be before session. - Aura: pallet_aura::{Pallet, Config}, - - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event}, - - // Consensus support. - Authorship: pallet_authorship::{Pallet, Storage}, - Offences: pallet_offences::{Pallet, Storage, Event}, - Historical: pallet_session::historical::{Pallet}, - - Session: pallet_session::{Pallet, Call, Storage, Event, Config}, - Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event}, - ShiftSessionManager: pallet_shift_session_manager::{Pallet}, - - // BEEFY Bridges support. - Beefy: pallet_beefy::{Pallet, Storage, Config}, - Mmr: pallet_mmr::{Pallet, Storage}, - MmrLeaf: pallet_beefy_mmr::{Pallet, Storage}, - - // Rialto bridge modules. - BridgeRelayers: pallet_bridge_relayers::{Pallet, Call, Storage, Event}, - BridgeRialtoGrandpa: pallet_bridge_grandpa::{Pallet, Call, Storage, Event}, - BridgeRialtoMessages: pallet_bridge_messages::{Pallet, Call, Storage, Event, Config}, - XcmRialtoBridgeHub: pallet_xcm_bridge_hub::{Pallet, Call, Storage, Event, Config}, - - // Westend bridge modules. - BridgeWestendGrandpa: pallet_bridge_grandpa::::{Pallet, Call, Config, Storage, Event}, - BridgeWestendParachains: pallet_bridge_parachains::::{Pallet, Call, Storage, Event}, - - // RialtoParachain bridge modules. - BridgeRialtoParachains: pallet_bridge_parachains::{Pallet, Call, Storage, Event}, - BridgeRialtoParachainMessages: pallet_bridge_messages::::{Pallet, Call, Storage, Event, Config}, - XcmRialtoParachainBridgeHub: pallet_xcm_bridge_hub::::{Pallet, Call, Storage, Event, Config}, - - // Pallet for sending XCM. - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, - - // Pallets that are not actually used here (yet?), but we need to run benchmarks on it. - XcmBridgeHubRouter: pallet_xcm_bridge_hub_router::{Pallet, Storage} = 200, - } -); - -generate_bridge_reject_obsolete_headers_and_messages! { - RuntimeCall, AccountId, - // Grandpa - BridgeRialtoGrandpa, BridgeWestendGrandpa, - // Parachains - BridgeRialtoParachains, - //Messages - BridgeRialtoMessages, BridgeRialtoParachainMessages -} - -bp_runtime::generate_static_str_provider!(BridgeRefundRialtoPara2000Msgs); -/// Signed extension that refunds relayers that are delivering messages from the Rialto parachain. -pub type PriorityBoostPerMessage = ConstU64<51_049_853>; -pub type BridgeRefundRialtoParachainMessages = - pallet_bridge_relayers::extension::BridgeRelayersSignedExtension< - Runtime, - pallet_bridge_relayers::extension::WithParachainExtensionConfig< - StrBridgeRefundRialtoPara2000Msgs, - Runtime, - bp_relayers::RuntimeWithUtilityPallet, - WithRialtoParachainsInstance, - WithRialtoParachainMessagesInstance, - >, - >; - -/// The address format for describing accounts. -pub type Address = AccountId; -/// Block header type as expected by this runtime. -pub type Header = generic::Header; -/// Block type as expected by this runtime. -pub type Block = generic::Block; -/// A Block signed with a Justification -pub type SignedBlock = generic::SignedBlock; -/// BlockId type as expected by this runtime. -pub type BlockId = generic::BlockId; -/// The SignedExtension to the basic transaction logic. -pub type SignedExtra = ( - frame_system::CheckNonZeroSender, - frame_system::CheckSpecVersion, - frame_system::CheckTxVersion, - frame_system::CheckGenesis, - frame_system::CheckEra, - frame_system::CheckNonce, - frame_system::CheckWeight, - pallet_transaction_payment::ChargeTransactionPayment, - BridgeRejectObsoleteHeadersAndMessages, - BridgeRefundRialtoParachainMessages, -); -/// The payload being signed in transactions. -pub type SignedPayload = generic::SignedPayload; -/// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = - generic::UncheckedExtrinsic; -/// Extrinsic type that has already been checked. -pub type CheckedExtrinsic = generic::CheckedExtrinsic; -/// Executive: handles dispatch to the various modules. -pub type Executive = frame_executive::Executive< - Runtime, - Block, - frame_system::ChainContext, - Runtime, - AllPalletsWithSystem, ->; - -#[cfg(feature = "runtime-benchmarks")] -mod benches { - frame_benchmarking::define_benchmarks!( - [pallet_bridge_messages, MessagesBench::] - [pallet_bridge_messages, MessagesBench::] - [pallet_bridge_grandpa, BridgeRialtoGrandpa] - [pallet_bridge_parachains, ParachainsBench::] - [pallet_bridge_relayers, RelayersBench::] - [pallet_xcm_bridge_hub_router, XcmBridgeHubRouterBench::] - ); -} - -impl_runtime_apis! { - impl sp_api::Core for Runtime { - fn version() -> RuntimeVersion { - VERSION - } - - fn execute_block(block: Block) { - Executive::execute_block(block); - } - - fn initialize_block(header: &::Header) { - Executive::initialize_block(header) - } - } - - impl sp_api::Metadata for Runtime { - fn metadata() -> OpaqueMetadata { - OpaqueMetadata::new(Runtime::metadata().into()) - } - - fn metadata_at_version(version: u32) -> Option { - Runtime::metadata_at_version(version) - } - - fn metadata_versions() -> sp_std::vec::Vec { - Runtime::metadata_versions() - } - } - - impl sp_block_builder::BlockBuilder for Runtime { - fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { - Executive::apply_extrinsic(extrinsic) - } - - fn finalize_block() -> ::Header { - Executive::finalize_block() - } - - fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<::Extrinsic> { - data.create_extrinsics() - } - - fn check_inherents( - block: Block, - data: sp_inherents::InherentData, - ) -> sp_inherents::CheckInherentsResult { - data.check_extrinsics(&block) - } - } - - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { - fn account_nonce(account: AccountId) -> Nonce { - System::account_nonce(account) - } - } - - impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { - fn validate_transaction( - source: TransactionSource, - tx: ::Extrinsic, - block_hash: ::Hash, - ) -> TransactionValidity { - Executive::validate_transaction(source, tx, block_hash) - } - } - - impl sp_offchain::OffchainWorkerApi for Runtime { - fn offchain_worker(header: &::Header) { - Executive::offchain_worker(header) - } - } - - impl sp_consensus_aura::AuraApi for Runtime { - fn slot_duration() -> sp_consensus_aura::SlotDuration { - sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration()) - } - - fn authorities() -> Vec { - Aura::authorities().to_vec() - } - } - - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi< - Block, - Balance, - > for Runtime { - fn query_info(uxt: ::Extrinsic, len: u32) -> RuntimeDispatchInfo { - TransactionPayment::query_info(uxt, len) - } - fn query_fee_details(uxt: ::Extrinsic, len: u32) -> FeeDetails { - TransactionPayment::query_fee_details(uxt, len) - } - fn query_weight_to_fee(weight: Weight) -> Balance { - TransactionPayment::weight_to_fee(weight) - } - fn query_length_to_fee(length: u32) -> Balance { - TransactionPayment::length_to_fee(length) - } - } - - impl sp_session::SessionKeys for Runtime { - fn generate_session_keys(seed: Option>) -> Vec { - SessionKeys::generate(seed) - } - - fn decode_session_keys( - encoded: Vec, - ) -> Option, sp_core::crypto::KeyTypeId)>> { - SessionKeys::decode_into_raw_public_keys(&encoded) - } - } - - impl sp_consensus_beefy::BeefyApi for Runtime { - fn beefy_genesis() -> Option { - Beefy::genesis_block() - } - - fn validator_set() -> Option> { - Beefy::validator_set() - } - - fn submit_report_equivocation_unsigned_extrinsic( - _equivocation_proof: sp_consensus_beefy::EquivocationProof< - NumberFor, - sp_consensus_beefy::ecdsa_crypto::AuthorityId, - sp_consensus_beefy::ecdsa_crypto::Signature - >, - _key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof, - ) -> Option<()> { None } - - fn generate_key_ownership_proof( - _set_id: sp_consensus_beefy::ValidatorSetId, - _authority_id: sp_consensus_beefy::ecdsa_crypto::AuthorityId, - ) -> Option { None } - } - - impl pallet_mmr::primitives::MmrApi< - Block, - mmr::Hash, - BlockNumber, - > for Runtime { - fn mmr_root() -> Result { - Ok(Mmr::mmr_root()) - } - - fn mmr_leaf_count() -> Result { - Ok(Mmr::mmr_leaves()) - } - - fn generate_proof( - block_numbers: Vec, - best_known_block_number: Option, - ) -> Result<(Vec, mmr::Proof), mmr::Error> { - Mmr::generate_proof(block_numbers, best_known_block_number).map( - |(leaves, proof)| { - ( - leaves - .into_iter() - .map(|leaf| mmr::EncodableOpaqueLeaf::from_leaf(&leaf)) - .collect(), - proof, - ) - }, - ) - } - - fn verify_proof(leaves: Vec, proof: mmr::Proof) - -> Result<(), mmr::Error> - { - let leaves = leaves.into_iter().map(|leaf| - leaf.into_opaque_leaf() - .try_decode() - .ok_or(mmr::Error::Verify)).collect::, mmr::Error>>()?; - Mmr::verify_leaves(leaves, proof) - } - - fn verify_proof_stateless( - root: mmr::Hash, - leaves: Vec, - proof: mmr::Proof - ) -> Result<(), mmr::Error> { - let nodes = leaves.into_iter().map(|leaf|mmr::DataOrHash::Data(leaf.into_opaque_leaf())).collect(); - pallet_mmr::verify_leaves_proof::(root, nodes, proof) - } - } - - impl fg_primitives::GrandpaApi for Runtime { - fn current_set_id() -> fg_primitives::SetId { - Grandpa::current_set_id() - } - - fn grandpa_authorities() -> GrandpaAuthorityList { - Grandpa::grandpa_authorities() - } - - fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: fg_primitives::EquivocationProof< - ::Hash, - NumberFor, - >, - key_owner_proof: fg_primitives::OpaqueKeyOwnershipProof, - ) -> Option<()> { - let key_owner_proof = key_owner_proof.decode()?; - - Grandpa::submit_unsigned_equivocation_report( - equivocation_proof, - key_owner_proof, - ) - } - - fn generate_key_ownership_proof( - _set_id: fg_primitives::SetId, - _authority_id: GrandpaId, - ) -> Option { - // NOTE: this is the only implementation possible since we've - // defined our key owner proof type as a bottom type (i.e. a type - // with no values). - None - } - } - - impl bp_rialto::RialtoFinalityApi for Runtime { - fn best_finalized() -> Option> { - BridgeRialtoGrandpa::best_finalized() - } - - fn synced_headers_grandpa_info( - ) -> Vec> { - BridgeRialtoGrandpa::synced_headers_grandpa_info() - } - } - - impl bp_westend::WestendFinalityApi for Runtime { - fn best_finalized() -> Option> { - BridgeWestendGrandpa::best_finalized() - } - - fn synced_headers_grandpa_info( - ) -> Vec> { - BridgeWestendGrandpa::synced_headers_grandpa_info() - } - } - - impl bp_westend::AssetHubWestendFinalityApi for Runtime { - fn best_finalized() -> Option> { - pallet_bridge_parachains::Pallet::< - Runtime, - WithWestendParachainsInstance, - >::best_parachain_head_id::().unwrap_or(None) - } - } - - impl bp_rialto_parachain::RialtoParachainFinalityApi for Runtime { - fn best_finalized() -> Option> { - pallet_bridge_parachains::Pallet::< - Runtime, - WithRialtoParachainsInstance, - >::best_parachain_head_id::().unwrap_or(None) - } - } - - impl bp_rialto::ToRialtoOutboundLaneApi for Runtime { - fn message_details( - lane: bp_messages::LaneId, - begin: bp_messages::MessageNonce, - end: bp_messages::MessageNonce, - ) -> Vec { - bridge_runtime_common::messages_api::outbound_message_details::< - Runtime, - WithRialtoMessagesInstance, - >(lane, begin, end) - } - } - - impl bp_rialto::FromRialtoInboundLaneApi for Runtime { - fn message_details( - lane: bp_messages::LaneId, - messages: Vec<(bp_messages::MessagePayload, bp_messages::OutboundMessageDetails)>, - ) -> Vec { - bridge_runtime_common::messages_api::inbound_message_details::< - Runtime, - WithRialtoMessagesInstance, - >(lane, messages) - } - } - - impl bp_rialto_parachain::ToRialtoParachainOutboundLaneApi for Runtime { - fn message_details( - lane: bp_messages::LaneId, - begin: bp_messages::MessageNonce, - end: bp_messages::MessageNonce, - ) -> Vec { - bridge_runtime_common::messages_api::outbound_message_details::< - Runtime, - WithRialtoParachainMessagesInstance, - >(lane, begin, end) - } - } - - impl bp_rialto_parachain::FromRialtoParachainInboundLaneApi for Runtime { - fn message_details( - lane: bp_messages::LaneId, - messages: Vec<(bp_messages::MessagePayload, bp_messages::OutboundMessageDetails)>, - ) -> Vec { - bridge_runtime_common::messages_api::inbound_message_details::< - Runtime, - WithRialtoParachainMessagesInstance, - >(lane, messages) - } - } - - #[cfg(feature = "runtime-benchmarks")] - impl frame_benchmarking::Benchmark for Runtime { - fn benchmark_metadata(extra: bool) -> ( - Vec, - Vec, - ) { - use frame_benchmarking::{Benchmarking, BenchmarkList}; - use frame_support::traits::StorageInfoTrait; - - use pallet_bridge_messages::benchmarking::Pallet as MessagesBench; - use pallet_bridge_parachains::benchmarking::Pallet as ParachainsBench; - use pallet_bridge_relayers::benchmarking::Pallet as RelayersBench; - use pallet_xcm_bridge_hub_router::benchmarking::Pallet as XcmBridgeHubRouterBench; - - let mut list = Vec::::new(); - list_benchmarks!(list, extra); - - let storage_info = AllPalletsWithSystem::storage_info(); - return (list, storage_info) - } - - fn dispatch_benchmark( - config: frame_benchmarking::BenchmarkConfig, - ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch}; - use frame_support::traits::TrackedStorageKey; - - let whitelist: Vec = vec![ - // Block Number - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), - // Execution Phase - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(), - // Event Count - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(), - // System Events - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(), - // Caller 0 Account - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da946c154ffd9992e395af90b5b13cc6f295c77033fce8a9045824a6690bbf99c6db269502f0a8d1d2a008542d5690a0749").to_vec().into(), - ]; - - use bp_messages::{ - source_chain::FromBridgedChainMessagesDeliveryProof, - target_chain::FromBridgedChainMessagesProof, - LaneId, - }; - use bp_runtime::Chain; - use bridge_runtime_common::messages_benchmarking::{ - generate_xcm_builder_bridge_message_sample, - prepare_message_delivery_proof_from_grandpa_chain, - prepare_message_delivery_proof_from_parachain, - prepare_message_proof_from_grandpa_chain, - prepare_message_proof_from_parachain, - }; - use pallet_bridge_messages::benchmarking::{ - Pallet as MessagesBench, - Config as MessagesConfig, - MessageDeliveryProofParams, - MessageProofParams, - }; - use pallet_bridge_parachains::benchmarking::{ - Pallet as ParachainsBench, - Config as ParachainsConfig, - }; - use pallet_bridge_relayers::benchmarking::{ - Pallet as RelayersBench, - Config as RelayersConfig, - }; - use pallet_xcm_bridge_hub_router::benchmarking::{ - Pallet as XcmBridgeHubRouterBench, - Config as XcmBridgeHubRouterConfig, - }; - - impl MessagesConfig for Runtime { - fn bench_lane_id() -> LaneId { - rialto_parachain_messages::Lane::get() - } - - fn prepare_message_proof( - params: MessageProofParams, - ) -> (FromBridgedChainMessagesProof, Weight) { - prepare_message_proof_from_parachain::< - Runtime, - WithRialtoParachainsInstance, - WithRialtoParachainMessagesInstance, - >(params, generate_xcm_builder_bridge_message_sample(xcm::v3::Junctions::Here)) - } - - fn prepare_message_delivery_proof( - params: MessageDeliveryProofParams, - ) -> FromBridgedChainMessagesDeliveryProof { - prepare_message_delivery_proof_from_parachain::< - Runtime, - WithRialtoParachainsInstance, - WithRialtoParachainMessagesInstance, - >(params) - } - - fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool { - let lane = >::bench_lane_id(); - let bridged_chain_id = bp_rialto_parachain::RialtoParachain::ID; - pallet_bridge_relayers::Pallet::::relayer_reward( - relayer, - RewardsAccountParams::new(lane, bridged_chain_id, RewardsAccountOwner::BridgedChain) - ).is_some() - } - } - - impl MessagesConfig for Runtime { - fn bench_lane_id() -> LaneId { - rialto_messages::Lane::get() - } - - fn prepare_message_proof( - params: MessageProofParams, - ) -> (FromBridgedChainMessagesProof, Weight) { - prepare_message_proof_from_grandpa_chain::< - Runtime, - RialtoGrandpaInstance, - WithRialtoMessagesInstance, - >(params, generate_xcm_builder_bridge_message_sample(xcm::v3::Junctions::Here)) - } - - fn prepare_message_delivery_proof( - params: MessageDeliveryProofParams, - ) -> FromBridgedChainMessagesDeliveryProof { - prepare_message_delivery_proof_from_grandpa_chain::< - Runtime, - RialtoGrandpaInstance, - WithRialtoMessagesInstance, - >(params) - } - - fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool { - let lane = >::bench_lane_id(); - let bridged_chain_id = bp_rialto::Rialto::ID; - pallet_bridge_relayers::Pallet::::relayer_reward( - relayer, - RewardsAccountParams::new(lane, bridged_chain_id, RewardsAccountOwner::BridgedChain) - ).is_some() - } - } - - impl ParachainsConfig for Runtime { - fn parachains() -> Vec { - use bp_runtime::Parachain; - vec![bp_polkadot_core::parachains::ParaId(bp_rialto_parachain::RialtoParachain::PARACHAIN_ID)] - } - - fn prepare_parachain_heads_proof( - parachains: &[bp_polkadot_core::parachains::ParaId], - parachain_head_size: u32, - proof_params: bp_runtime::UnverifiedStorageProofParams, - ) -> ( - bp_parachains::RelayBlockNumber, - bp_parachains::RelayBlockHash, - bp_polkadot_core::parachains::ParaHeadsProof, - Vec<(bp_polkadot_core::parachains::ParaId, bp_polkadot_core::parachains::ParaHash)>, - ) { - bridge_runtime_common::parachains_benchmarking::prepare_parachain_heads_proof::< - Runtime, - WithRialtoParachainsInstance, - >( - parachains, - parachain_head_size, - proof_params, - ) - } - } - - impl RelayersConfig for Runtime { - fn prepare_rewards_account( - account_params: RewardsAccountParams, - reward: Balance, - ) { - let rewards_account = bp_relayers::PayRewardFromAccount::< - Balances, - AccountId - >::rewards_account(account_params); - Self::deposit_account(rewards_account, reward); - } - - fn deposit_account(account: AccountId, balance: Balance) { - use frame_support::traits::fungible::Mutate; - Balances::mint_into(&account, balance.saturating_add(ExistentialDeposit::get())).unwrap(); - } - } - - impl XcmBridgeHubRouterConfig<()> for Runtime { - fn make_congested() { - xcm_config::EmulatedSiblingXcmpChannel::make_congested() - } - } - - let mut batches = Vec::::new(); - let params = (&config, &whitelist); - - add_benchmarks!(params, batches); - - Ok(batches) - } - } -} - -#[cfg(test)] -mod tests { - use super::*; - use bp_runtime::Chain; - - #[test] - fn runtime_version() { - assert_eq!(VERSION.state_version, bp_millau::Millau::STATE_VERSION as u8); - } - - #[test] - fn call_size() { - const BRIDGES_PALLETS_MAX_CALL_SIZE: usize = 200; - assert!( - core::mem::size_of::>() <= - BRIDGES_PALLETS_MAX_CALL_SIZE - ); - assert!( - core::mem::size_of::>() <= - BRIDGES_PALLETS_MAX_CALL_SIZE - ); - const MAX_CALL_SIZE: usize = 230; // value from polkadot-runtime tests - assert!(core::mem::size_of::() <= MAX_CALL_SIZE); - } -} diff --git a/bin/millau/runtime/src/rialto_messages.rs b/bin/millau/runtime/src/rialto_messages.rs deleted file mode 100644 index e5a3f8aef15069a3cde44a619b6582afa770d345..0000000000000000000000000000000000000000 --- a/bin/millau/runtime/src/rialto_messages.rs +++ /dev/null @@ -1,106 +0,0 @@ -// 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 . - -//! Everything required to serve Millau <-> Rialto messages. - -use crate::Runtime; - -use bp_messages::LaneId; -use bp_xcm_bridge_hub::BridgeId; -use frame_support::{parameter_types, weights::Weight}; -use pallet_bridge_relayers::WeightInfoExt as _; -use xcm::prelude::*; - -parameter_types! { - /// Bridge identifier that is used to bridge with Rialto. - pub Bridge: BridgeId = BridgeId::new( - &InteriorMultiLocation::from(crate::xcm_config::ThisNetwork::get()).into(), - &InteriorMultiLocation::from(crate::xcm_config::RialtoNetwork::get()).into(), - ); - /// Lane identifier, used by with-Rialto bridge. - pub Lane: LaneId = Bridge::get().lane_id(); -} - -impl pallet_bridge_messages::WeightInfoExt for crate::weights::RialtoMessagesWeightInfo { - fn expected_extra_storage_proof_size() -> u32 { - bp_rialto::EXTRA_STORAGE_PROOF_SIZE - } - - fn receive_messages_proof_overhead_from_runtime() -> Weight { - pallet_bridge_relayers::weights::BridgeWeight::::receive_messages_proof_overhead_from_runtime() - } - - fn receive_messages_delivery_proof_overhead_from_runtime() -> Weight { - pallet_bridge_relayers::weights::BridgeWeight::::receive_messages_delivery_proof_overhead_from_runtime() - } -} - -#[cfg(test)] -mod tests { - use super::*; - use crate::{RialtoGrandpaInstance, Runtime, WithRialtoMessagesInstance}; - - use bridge_runtime_common::{ - assert_complete_bridge_types, - integrity::{ - assert_complete_with_relay_chain_bridge_constants, check_message_lane_weights, - AssertChainConstants, AssertCompleteBridgeConstants, - }, - }; - - #[test] - fn ensure_millau_message_lane_weights_are_correct() { - check_message_lane_weights::( - bp_rialto::EXTRA_STORAGE_PROOF_SIZE, - bp_millau::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX, - bp_millau::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX, - false, - ); - } - - #[test] - fn ensure_bridge_integrity() { - assert_complete_bridge_types!( - runtime: Runtime, - with_bridged_chain_grandpa_instance: RialtoGrandpaInstance, - with_bridged_chain_messages_instance: WithRialtoMessagesInstance, - this_chain: bp_millau::Millau, - bridged_chain: bp_rialto::Rialto, - ); - - assert_complete_with_relay_chain_bridge_constants::< - Runtime, - RialtoGrandpaInstance, - WithRialtoMessagesInstance, - >(AssertCompleteBridgeConstants { - this_chain_constants: AssertChainConstants { - block_length: bp_millau::BlockLength::get(), - block_weights: bp_millau::BlockWeights::get(), - }, - }); - } - - #[test] - fn rialto_millau_bridge_identifier_did_not_changed() { - // there's nothing criminal if it is changed, but then thou need to fix it across - // all deployments scripts, alerts and so on - assert_eq!( - *Bridge::get().lane_id().as_ref(), - hex_literal::hex!("efed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7") - .into(), - ); - } -} diff --git a/bin/millau/runtime/src/rialto_parachain_messages.rs b/bin/millau/runtime/src/rialto_parachain_messages.rs deleted file mode 100644 index 011d62b59f2b447c4fdf00c70dc8936f7412e84d..0000000000000000000000000000000000000000 --- a/bin/millau/runtime/src/rialto_parachain_messages.rs +++ /dev/null @@ -1,118 +0,0 @@ -// 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 . - -//! Everything required to serve Millau <-> RialtoParachain messages. - -use crate::Runtime; - -use bp_messages::LaneId; -use bp_xcm_bridge_hub::BridgeId; -use frame_support::{parameter_types, weights::Weight}; -use pallet_bridge_relayers::WeightInfoExt as _; -use xcm::prelude::*; - -parameter_types! { - /// Bridge identifier that is used to bridge with RialtoParachain. - pub Bridge: BridgeId = BridgeId::new( - &InteriorMultiLocation::from(crate::xcm_config::ThisNetwork::get()).into(), - &InteriorMultiLocation::from(crate::xcm_config::RialtoParachainNetwork::get()).into(), - ); - /// Lane identifier, used by with-RialtoParachain bridge. - pub Lane: LaneId = Bridge::get().lane_id(); -} - -impl pallet_bridge_messages::WeightInfoExt - for crate::weights::RialtoParachainMessagesWeightInfo -{ - fn expected_extra_storage_proof_size() -> u32 { - bp_rialto_parachain::EXTRA_STORAGE_PROOF_SIZE - } - - fn receive_messages_proof_overhead_from_runtime() -> Weight { - pallet_bridge_relayers::weights::BridgeWeight::::receive_messages_proof_overhead_from_runtime() - } - - fn receive_messages_delivery_proof_overhead_from_runtime() -> Weight { - pallet_bridge_relayers::weights::BridgeWeight::::receive_messages_delivery_proof_overhead_from_runtime() - } -} - -#[cfg(test)] -mod tests { - use super::*; - use crate::{ - PriorityBoostPerMessage, RialtoGrandpaInstance, Runtime, - WithRialtoParachainMessagesInstance, - }; - - use bridge_runtime_common::{ - assert_complete_bridge_types, - integrity::{ - assert_complete_with_parachain_bridge_constants, check_message_lane_weights, - AssertChainConstants, AssertCompleteBridgeConstants, - }, - }; - - #[test] - fn ensure_millau_message_lane_weights_are_correct() { - check_message_lane_weights::( - bp_rialto_parachain::EXTRA_STORAGE_PROOF_SIZE, - bp_millau::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX, - bp_millau::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX, - true, - ); - } - - #[test] - fn ensure_bridge_integrity() { - assert_complete_bridge_types!( - runtime: Runtime, - with_bridged_chain_grandpa_instance: RialtoGrandpaInstance, - with_bridged_chain_messages_instance: WithRialtoParachainMessagesInstance, - this_chain: bp_millau::Millau, - bridged_chain: bp_rialto_parachain::RialtoParachain, - ); - - assert_complete_with_parachain_bridge_constants::< - Runtime, - RialtoGrandpaInstance, - WithRialtoParachainMessagesInstance, - bp_rialto::Rialto, - >(AssertCompleteBridgeConstants { - this_chain_constants: AssertChainConstants { - block_length: bp_millau::BlockLength::get(), - block_weights: bp_millau::BlockWeights::get(), - }, - }); - - pallet_bridge_relayers::extension::ensure_priority_boost_is_sane::< - Runtime, - WithRialtoParachainMessagesInstance, - PriorityBoostPerMessage, - >(1_000_000); - } - - #[test] - fn rialto_parachain_millau_bridge_identifier_did_not_changed() { - // there's nothing criminal if it is changed, but then thou need to fix it across - // all deployments scripts, alerts and so on - assert_eq!( - *Bridge::get().lane_id().as_ref(), - hex_literal::hex!("ee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c") - .into(), - ); - } -} diff --git a/bin/millau/runtime/src/weights/mod.rs b/bin/millau/runtime/src/weights/mod.rs deleted file mode 100644 index 801ff9b3c8f68249ccd1d40345ac03de82256750..0000000000000000000000000000000000000000 --- a/bin/millau/runtime/src/weights/mod.rs +++ /dev/null @@ -1,21 +0,0 @@ -// 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 . - -mod pallet_bridge_messages_messages_bench_runtime_with_rialto_messages_instance; -mod pallet_bridge_messages_messages_bench_runtime_with_rialto_parachain_messages_instance; - -pub use pallet_bridge_messages_messages_bench_runtime_with_rialto_messages_instance::WeightInfo as RialtoMessagesWeightInfo; -pub use pallet_bridge_messages_messages_bench_runtime_with_rialto_parachain_messages_instance::WeightInfo as RialtoParachainMessagesWeightInfo; diff --git a/bin/millau/runtime/src/weights/pallet_bridge_messages_messages_bench_runtime_with_rialto_messages_instance.rs b/bin/millau/runtime/src/weights/pallet_bridge_messages_messages_bench_runtime_with_rialto_messages_instance.rs deleted file mode 100644 index 36d2a04aa073869ea061150aa62d06ef4ade5dc1..0000000000000000000000000000000000000000 --- a/bin/millau/runtime/src/weights/pallet_bridge_messages_messages_bench_runtime_with_rialto_messages_instance.rs +++ /dev/null @@ -1,187 +0,0 @@ - -//! Autogenerated weights for `pallet_bridge_messages` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `serban-ROG-Zephyrus`, CPU: `12th Gen Intel(R) Core(TM) i7-12700H` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 - -// Executed Command: -// target/release/millau-bridge-node -// benchmark -// pallet -// --chain=dev -// --steps=50 -// --repeat=20 -// --pallet=pallet_bridge_messages -// --extrinsic=* -// --execution=wasm -// --wasm-execution=Compiled -// --heap-pages=4096 -// --output=./bin/millau/runtime/src/weights/ - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_bridge_messages`. -pub struct WeightInfo(PhantomData); -impl pallet_bridge_messages::WeightInfo for WeightInfo { - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), added: 2048, mode: MaxEncodedLen) - /// Storage: BridgeRialtoMessages InboundLanes (r:1 w:1) - /// Proof: BridgeRialtoMessages InboundLanes (max_values: None, max_size: Some(49208), added: 51683, mode: MaxEncodedLen) - fn receive_single_message_proof() -> Weight { - // Proof Size summary in bytes: - // Measured: `653` - // Estimated: `52673` - // Minimum execution time: 38_773_000 picoseconds. - Weight::from_parts(41_333_000, 0) - .saturating_add(Weight::from_parts(0, 52673)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), added: 2048, mode: MaxEncodedLen) - /// Storage: BridgeRialtoMessages InboundLanes (r:1 w:1) - /// Proof: BridgeRialtoMessages InboundLanes (max_values: None, max_size: Some(49208), added: 51683, mode: MaxEncodedLen) - /// The range of component `n` is `[1, 1004]`. - /// The range of component `n` is `[1, 1004]`. - fn receive_n_messages_proof(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `653` - // Estimated: `52673` - // Minimum execution time: 39_551_000 picoseconds. - Weight::from_parts(22_769_841, 0) - .saturating_add(Weight::from_parts(0, 52673)) - // Standard Error: 3_937 - .saturating_add(Weight::from_parts(7_704_895, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), added: 2048, mode: MaxEncodedLen) - /// Storage: BridgeRialtoMessages InboundLanes (r:1 w:1) - /// Proof: BridgeRialtoMessages InboundLanes (max_values: None, max_size: Some(49208), added: 51683, mode: MaxEncodedLen) - fn receive_single_message_proof_with_outbound_lane_state() -> Weight { - // Proof Size summary in bytes: - // Measured: `653` - // Estimated: `52673` - // Minimum execution time: 45_162_000 picoseconds. - Weight::from_parts(48_043_000, 0) - .saturating_add(Weight::from_parts(0, 52673)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), added: 2048, mode: MaxEncodedLen) - /// Storage: BridgeRialtoMessages InboundLanes (r:1 w:1) - /// Proof: BridgeRialtoMessages InboundLanes (max_values: None, max_size: Some(49208), added: 51683, mode: MaxEncodedLen) - /// The range of component `n` is `[1, 16384]`. - /// The range of component `n` is `[1, 16384]`. - fn receive_single_n_bytes_message_proof(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `653` - // Estimated: `52673` - // Minimum execution time: 38_769_000 picoseconds. - Weight::from_parts(41_442_733, 0) - .saturating_add(Weight::from_parts(0, 52673)) - // Standard Error: 5 - .saturating_add(Weight::from_parts(1_163, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), added: 2048, mode: MaxEncodedLen) - /// Storage: BridgeRialtoMessages OutboundLanes (r:1 w:1) - /// Proof: BridgeRialtoMessages OutboundLanes (max_values: None, max_size: Some(73), added: 2548, mode: MaxEncodedLen) - /// Storage: BridgeRelayers RelayerRewards (r:1 w:1) - /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen) - /// Storage: BridgeRialtoMessages OutboundMessages (r:0 w:1) - /// Proof: BridgeRialtoMessages OutboundMessages (max_values: None, max_size: Some(65596), added: 68071, mode: MaxEncodedLen) - fn receive_delivery_proof_for_single_message() -> Weight { - // Proof Size summary in bytes: - // Measured: `701` - // Estimated: `3558` - // Minimum execution time: 37_325_000 picoseconds. - Weight::from_parts(38_593_000, 0) - .saturating_add(Weight::from_parts(0, 3558)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), added: 2048, mode: MaxEncodedLen) - /// Storage: BridgeRialtoMessages OutboundLanes (r:1 w:1) - /// Proof: BridgeRialtoMessages OutboundLanes (max_values: None, max_size: Some(73), added: 2548, mode: MaxEncodedLen) - /// Storage: BridgeRelayers RelayerRewards (r:1 w:1) - /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen) - /// Storage: BridgeRialtoMessages OutboundMessages (r:0 w:2) - /// Proof: BridgeRialtoMessages OutboundMessages (max_values: None, max_size: Some(65596), added: 68071, mode: MaxEncodedLen) - fn receive_delivery_proof_for_two_messages_by_single_relayer() -> Weight { - // Proof Size summary in bytes: - // Measured: `701` - // Estimated: `3558` - // Minimum execution time: 38_624_000 picoseconds. - Weight::from_parts(39_981_000, 0) - .saturating_add(Weight::from_parts(0, 3558)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), added: 2048, mode: MaxEncodedLen) - /// Storage: BridgeRialtoMessages OutboundLanes (r:1 w:1) - /// Proof: BridgeRialtoMessages OutboundLanes (max_values: None, max_size: Some(73), added: 2548, mode: MaxEncodedLen) - /// Storage: BridgeRelayers RelayerRewards (r:2 w:2) - /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen) - /// Storage: BridgeRialtoMessages OutboundMessages (r:0 w:2) - /// Proof: BridgeRialtoMessages OutboundMessages (max_values: None, max_size: Some(65596), added: 68071, mode: MaxEncodedLen) - fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight { - // Proof Size summary in bytes: - // Measured: `701` - // Estimated: `6126` - // Minimum execution time: 41_596_000 picoseconds. - Weight::from_parts(43_115_000, 0) - .saturating_add(Weight::from_parts(0, 6126)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(5)) - } - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), added: 2048, mode: MaxEncodedLen) - /// Storage: BridgeRialtoMessages InboundLanes (r:1 w:1) - /// Proof: BridgeRialtoMessages InboundLanes (max_values: None, max_size: Some(49208), added: 51683, mode: MaxEncodedLen) - /// The range of component `n` is `[1, 16384]`. - /// The range of component `n` is `[1, 16384]`. - fn receive_single_n_bytes_message_proof_with_dispatch(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `653` - // Estimated: `52673` - // Minimum execution time: 38_958_000 picoseconds. - Weight::from_parts(40_005_000, 0) - .saturating_add(Weight::from_parts(0, 52673)) - // Standard Error: 626 - .saturating_add(Weight::from_parts(375_467, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) - } -} diff --git a/bin/millau/runtime/src/weights/pallet_bridge_messages_messages_bench_runtime_with_rialto_parachain_messages_instance.rs b/bin/millau/runtime/src/weights/pallet_bridge_messages_messages_bench_runtime_with_rialto_parachain_messages_instance.rs deleted file mode 100644 index 36ff57864df88a35aec587fa3b145a6e9eb736ae..0000000000000000000000000000000000000000 --- a/bin/millau/runtime/src/weights/pallet_bridge_messages_messages_bench_runtime_with_rialto_parachain_messages_instance.rs +++ /dev/null @@ -1,187 +0,0 @@ - -//! Autogenerated weights for `pallet_bridge_messages` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `serban-ROG-Zephyrus`, CPU: `12th Gen Intel(R) Core(TM) i7-12700H` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 - -// Executed Command: -// target/release/millau-bridge-node -// benchmark -// pallet -// --chain=dev -// --steps=50 -// --repeat=20 -// --pallet=pallet_bridge_messages -// --extrinsic=* -// --execution=wasm -// --wasm-execution=Compiled -// --heap-pages=4096 -// --output=./bin/millau/runtime/src/weights/ - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_bridge_messages`. -pub struct WeightInfo(PhantomData); -impl pallet_bridge_messages::WeightInfo for WeightInfo { - /// Storage: BridgeRialtoParachainMessages PalletOperatingMode (r:1 w:0) - /// Proof: BridgeRialtoParachainMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: BridgeRialtoParachains ImportedParaHeads (r:1 w:0) - /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(1024), max_size: Some(196), added: 1681, mode: MaxEncodedLen) - /// Storage: BridgeRialtoParachainMessages InboundLanes (r:1 w:1) - /// Proof: BridgeRialtoParachainMessages InboundLanes (max_values: None, max_size: Some(49208), added: 51683, mode: MaxEncodedLen) - fn receive_single_message_proof() -> Weight { - // Proof Size summary in bytes: - // Measured: `591` - // Estimated: `52673` - // Minimum execution time: 37_274_000 picoseconds. - Weight::from_parts(39_048_000, 0) - .saturating_add(Weight::from_parts(0, 52673)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: BridgeRialtoParachainMessages PalletOperatingMode (r:1 w:0) - /// Proof: BridgeRialtoParachainMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: BridgeRialtoParachains ImportedParaHeads (r:1 w:0) - /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(1024), max_size: Some(196), added: 1681, mode: MaxEncodedLen) - /// Storage: BridgeRialtoParachainMessages InboundLanes (r:1 w:1) - /// Proof: BridgeRialtoParachainMessages InboundLanes (max_values: None, max_size: Some(49208), added: 51683, mode: MaxEncodedLen) - /// The range of component `n` is `[1, 1004]`. - /// The range of component `n` is `[1, 1004]`. - fn receive_n_messages_proof(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `591` - // Estimated: `52673` - // Minimum execution time: 37_925_000 picoseconds. - Weight::from_parts(13_450_415, 0) - .saturating_add(Weight::from_parts(0, 52673)) - // Standard Error: 4_144 - .saturating_add(Weight::from_parts(7_651_809, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: BridgeRialtoParachainMessages PalletOperatingMode (r:1 w:0) - /// Proof: BridgeRialtoParachainMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: BridgeRialtoParachains ImportedParaHeads (r:1 w:0) - /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(1024), max_size: Some(196), added: 1681, mode: MaxEncodedLen) - /// Storage: BridgeRialtoParachainMessages InboundLanes (r:1 w:1) - /// Proof: BridgeRialtoParachainMessages InboundLanes (max_values: None, max_size: Some(49208), added: 51683, mode: MaxEncodedLen) - fn receive_single_message_proof_with_outbound_lane_state() -> Weight { - // Proof Size summary in bytes: - // Measured: `591` - // Estimated: `52673` - // Minimum execution time: 44_058_000 picoseconds. - Weight::from_parts(45_790_000, 0) - .saturating_add(Weight::from_parts(0, 52673)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: BridgeRialtoParachainMessages PalletOperatingMode (r:1 w:0) - /// Proof: BridgeRialtoParachainMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: BridgeRialtoParachains ImportedParaHeads (r:1 w:0) - /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(1024), max_size: Some(196), added: 1681, mode: MaxEncodedLen) - /// Storage: BridgeRialtoParachainMessages InboundLanes (r:1 w:1) - /// Proof: BridgeRialtoParachainMessages InboundLanes (max_values: None, max_size: Some(49208), added: 51683, mode: MaxEncodedLen) - /// The range of component `n` is `[1, 16384]`. - /// The range of component `n` is `[1, 16384]`. - fn receive_single_n_bytes_message_proof(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `591` - // Estimated: `52673` - // Minimum execution time: 37_691_000 picoseconds. - Weight::from_parts(39_329_502, 0) - .saturating_add(Weight::from_parts(0, 52673)) - // Standard Error: 5 - .saturating_add(Weight::from_parts(1_257, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: BridgeRialtoParachainMessages PalletOperatingMode (r:1 w:0) - /// Proof: BridgeRialtoParachainMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: BridgeRialtoParachains ImportedParaHeads (r:1 w:0) - /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(1024), max_size: Some(196), added: 1681, mode: MaxEncodedLen) - /// Storage: BridgeRialtoParachainMessages OutboundLanes (r:1 w:1) - /// Proof: BridgeRialtoParachainMessages OutboundLanes (max_values: None, max_size: Some(73), added: 2548, mode: MaxEncodedLen) - /// Storage: BridgeRelayers RelayerRewards (r:1 w:1) - /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen) - /// Storage: BridgeRialtoParachainMessages OutboundMessages (r:0 w:1) - /// Proof: BridgeRialtoParachainMessages OutboundMessages (max_values: None, max_size: Some(65596), added: 68071, mode: MaxEncodedLen) - fn receive_delivery_proof_for_single_message() -> Weight { - // Proof Size summary in bytes: - // Measured: `639` - // Estimated: `3558` - // Minimum execution time: 36_280_000 picoseconds. - Weight::from_parts(37_280_000, 0) - .saturating_add(Weight::from_parts(0, 3558)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: BridgeRialtoParachainMessages PalletOperatingMode (r:1 w:0) - /// Proof: BridgeRialtoParachainMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: BridgeRialtoParachains ImportedParaHeads (r:1 w:0) - /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(1024), max_size: Some(196), added: 1681, mode: MaxEncodedLen) - /// Storage: BridgeRialtoParachainMessages OutboundLanes (r:1 w:1) - /// Proof: BridgeRialtoParachainMessages OutboundLanes (max_values: None, max_size: Some(73), added: 2548, mode: MaxEncodedLen) - /// Storage: BridgeRelayers RelayerRewards (r:1 w:1) - /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen) - /// Storage: BridgeRialtoParachainMessages OutboundMessages (r:0 w:2) - /// Proof: BridgeRialtoParachainMessages OutboundMessages (max_values: None, max_size: Some(65596), added: 68071, mode: MaxEncodedLen) - fn receive_delivery_proof_for_two_messages_by_single_relayer() -> Weight { - // Proof Size summary in bytes: - // Measured: `639` - // Estimated: `3558` - // Minimum execution time: 37_174_000 picoseconds. - Weight::from_parts(38_716_000, 0) - .saturating_add(Weight::from_parts(0, 3558)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: BridgeRialtoParachainMessages PalletOperatingMode (r:1 w:0) - /// Proof: BridgeRialtoParachainMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: BridgeRialtoParachains ImportedParaHeads (r:1 w:0) - /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(1024), max_size: Some(196), added: 1681, mode: MaxEncodedLen) - /// Storage: BridgeRialtoParachainMessages OutboundLanes (r:1 w:1) - /// Proof: BridgeRialtoParachainMessages OutboundLanes (max_values: None, max_size: Some(73), added: 2548, mode: MaxEncodedLen) - /// Storage: BridgeRelayers RelayerRewards (r:2 w:2) - /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen) - /// Storage: BridgeRialtoParachainMessages OutboundMessages (r:0 w:2) - /// Proof: BridgeRialtoParachainMessages OutboundMessages (max_values: None, max_size: Some(65596), added: 68071, mode: MaxEncodedLen) - fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight { - // Proof Size summary in bytes: - // Measured: `639` - // Estimated: `6126` - // Minimum execution time: 40_051_000 picoseconds. - Weight::from_parts(41_741_000, 0) - .saturating_add(Weight::from_parts(0, 6126)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(5)) - } - /// Storage: BridgeRialtoParachainMessages PalletOperatingMode (r:1 w:0) - /// Proof: BridgeRialtoParachainMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: BridgeRialtoParachains ImportedParaHeads (r:1 w:0) - /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(1024), max_size: Some(196), added: 1681, mode: MaxEncodedLen) - /// Storage: BridgeRialtoParachainMessages InboundLanes (r:1 w:1) - /// Proof: BridgeRialtoParachainMessages InboundLanes (max_values: None, max_size: Some(49208), added: 51683, mode: MaxEncodedLen) - /// The range of component `n` is `[1, 16384]`. - /// The range of component `n` is `[1, 16384]`. - fn receive_single_n_bytes_message_proof_with_dispatch(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `591` - // Estimated: `52673` - // Minimum execution time: 37_809_000 picoseconds. - Weight::from_parts(38_603_000, 0) - .saturating_add(Weight::from_parts(0, 52673)) - // Standard Error: 628 - .saturating_add(Weight::from_parts(374_648, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) - } -} diff --git a/bin/millau/runtime/src/xcm_config.rs b/bin/millau/runtime/src/xcm_config.rs deleted file mode 100644 index 021f55aa6eb4fb1fa2d068b3ad94ce7d197803fd..0000000000000000000000000000000000000000 --- a/bin/millau/runtime/src/xcm_config.rs +++ /dev/null @@ -1,443 +0,0 @@ -// 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 . - -//! XCM configurations for the Millau runtime. - -use super::{ - AccountId, AllPalletsWithSystem, Balances, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, - XcmPallet, -}; -use bp_millau::{Millau, WeightToFee}; -use bp_xcm_bridge_hub::{Bridge, BridgeId}; -use bridge_runtime_common::CustomNetworkId; -use frame_support::{ - parameter_types, - traits::{ConstU32, Everything, Nothing}, - weights::Weight, -}; -use frame_system::EnsureRoot; -use xcm::latest::prelude::*; -use xcm_builder::{ - Account32Hash, AccountId32Aliases, CurrencyAdapter as XcmCurrencyAdapter, IsConcrete, - MintLocation, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, - TakeWeightCredit, UsingComponents, -}; -use xcm_executor::traits::ExportXcm; - -parameter_types! { - /// The location of the `MLAU` token, from the context of this chain. Since this token is native to this - /// chain, we make it synonymous with it and thus it is the `Here` location, which means "equivalent to - /// the context". - pub const TokenLocation: MultiLocation = Here.into_location(); - /// Token asset identifier. - pub TokenAssetId: AssetId = TokenLocation::get().into(); - /// The Millau network ID. - pub const ThisNetwork: NetworkId = CustomNetworkId::Millau.as_network_id(); - /// The Rialto network ID. - pub const RialtoNetwork: NetworkId = CustomNetworkId::Rialto.as_network_id(); - /// The RialtoParachain network ID. - pub const RialtoParachainNetwork: NetworkId = CustomNetworkId::RialtoParachain.as_network_id(); - - /// Our XCM location ancestry - i.e. our location within the Consensus Universe. - /// - /// Since Kusama is a top-level relay-chain with its own consensus, it's just our network ID. - pub UniversalLocation: InteriorMultiLocation = ThisNetwork::get().into(); - /// The check account, which holds any native assets that have been teleported out and not back in (yet). - pub CheckAccount: (AccountId, MintLocation) = (XcmPallet::check_account(), MintLocation::Local); -} - -/// The canonical means of converting a `MultiLocation` into an `AccountId`, used when we want to -/// determine the sovereign account controlled by a location. -pub type SovereignAccountOf = ( - // We can directly alias an `AccountId32` into a local account. - AccountId32Aliases, - // Dummy stuff for our tests. - Account32Hash, -); - -/// Our asset transactor. This is what allows us to interest with the runtime facilities from the -/// point of view of XCM-only concepts like `MultiLocation` and `MultiAsset`. -/// -/// Ours is only aware of the Balances pallet, which is mapped to `TokenLocation`. -pub type LocalAssetTransactor = XcmCurrencyAdapter< - // Use this currency: - Balances, - // Use this currency when it is a fungible asset matching the given location or name: - IsConcrete, - // We can convert the MultiLocations with our converter above: - SovereignAccountOf, - // Our chain's account ID type (we can't get away without mentioning it explicitly): - AccountId, - // We track our teleports in/out to keep total issuance correct. - CheckAccount, ->; - -/// The means that we convert the XCM message origin location into a local dispatch origin. -type LocalOriginConverter = ( - // A `Signed` origin of the sovereign account that the original location controls. - SovereignSignedViaLocation, - // The AccountId32 location type can be expressed natively as a `Signed` origin. - SignedAccountId32AsNative, -); - -parameter_types! { - /// The amount of weight an XCM operation takes. This is a safe overestimate. - pub const BaseXcmWeight: Weight = Weight::from_parts(1_000_000_000, 64 * 1024); - /// Maximum number of instructions in a single XCM fragment. A sanity check against weight - /// calculations getting too crazy. - pub const MaxInstructions: u32 = 100; -} - -/// The XCM router. We are not sending messages to sibling/parent/child chains here. -pub type XcmRouter = (); - -/// The barriers one of which must be passed for an XCM message to be executed. -pub type Barrier = ( - // Weight that is paid for may be consumed. - TakeWeightCredit, -); - -/// Dispatches received XCM messages from other chain. -pub type OnMillauBlobDispatcher = xcm_builder::BridgeBlobDispatcher< - crate::xcm_config::XcmRouter, - crate::xcm_config::UniversalLocation, - (), ->; - -/// XCM weigher type. -pub type XcmWeigher = xcm_builder::FixedWeightBounds; - -pub struct XcmConfig; -impl xcm_executor::Config for XcmConfig { - type RuntimeCall = RuntimeCall; - type XcmSender = (); - type AssetTransactor = LocalAssetTransactor; - type OriginConverter = LocalOriginConverter; - type IsReserve = (); - type IsTeleporter = (); - type UniversalLocation = UniversalLocation; - type Barrier = Barrier; - type Weigher = XcmWeigher; - // The weight trader piggybacks on the existing transaction-fee conversion logic. - type Trader = UsingComponents; - type ResponseHandler = XcmPallet; - type AssetTrap = XcmPallet; - type AssetLocker = (); - type AssetExchanger = (); - type AssetClaims = XcmPallet; - type SubscriptionService = XcmPallet; - type PalletInstancesInfo = AllPalletsWithSystem; - type MaxAssetsIntoHolding = ConstU32<64>; - type FeeManager = (); - type MessageExporter = ToRialtoOrRialtoParachainSwitchExporter; - type UniversalAliases = Nothing; - type CallDispatcher = RuntimeCall; - type SafeCallFilter = Everything; - type Aliasers = Nothing; -} - -/// Type to convert an `Origin` type value into a `MultiLocation` value which represents an interior -/// location of this chain. -pub type LocalOriginToLocation = ( - // Usual Signed origin to be used in XCM as a corresponding AccountId32 - SignedToAccountId32, -); - -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = None; -} - -impl pallet_xcm::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - // We don't allow any messages to be sent via the transaction yet. This is basically safe to - // enable, (safe the possibility of someone spamming the parachain if they're willing to pay - // the DOT to send from the Relay-chain). But it's useless until we bring in XCM v3 which will - // make `DescendOrigin` a bit more useful. - type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; - type XcmRouter = (); - // Anyone can execute XCM messages locally. - type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; - type XcmExecuteFilter = Everything; - type XcmExecutor = xcm_executor::XcmExecutor; - // Anyone is able to use teleportation regardless of who they are and what they want to - // teleport. - type XcmTeleportFilter = Everything; - // Anyone is able to use reserve transfers regardless of who they are and what they want to - // transfer. - type XcmReserveTransferFilter = Everything; - type Weigher = XcmWeigher; - type UniversalLocation = UniversalLocation; - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; - type Currency = Balances; - type CurrencyMatcher = (); - type TrustedLockers = (); - type SovereignAccountOf = SovereignAccountOf; - type MaxLockers = frame_support::traits::ConstU32<8>; - type WeightInfo = pallet_xcm::TestWeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; - type AdminOrigin = EnsureRoot; - type MaxRemoteLockConsumers = ConstU32<0>; - type RemoteLockConsumerIdentifier = (); -} - -pub struct ToRialtoOrRialtoParachainSwitchExporter; - -impl ExportXcm for ToRialtoOrRialtoParachainSwitchExporter { - type Ticket = (NetworkId, (BridgeId, Bridge, sp_std::prelude::Vec, XcmHash)); - - fn validate( - network: NetworkId, - channel: u32, - universal_source: &mut Option, - destination: &mut Option, - message: &mut Option>, - ) -> SendResult { - if network == RialtoNetwork::get() { - crate::XcmRialtoBridgeHub::validate( - network, - channel, - universal_source, - destination, - message, - ) - .map(|result| ((RialtoNetwork::get(), result.0), result.1)) - } else if network == RialtoParachainNetwork::get() { - crate::XcmRialtoParachainBridgeHub::validate( - network, - channel, - universal_source, - destination, - message, - ) - .map(|result| ((RialtoParachainNetwork::get(), result.0), result.1)) - } else { - Err(SendError::Unroutable) - } - } - - fn deliver(ticket: Self::Ticket) -> Result { - let (network, ticket) = ticket; - if network == RialtoNetwork::get() { - crate::XcmRialtoBridgeHub::deliver(ticket) - } else if network == RialtoParachainNetwork::get() { - crate::XcmRialtoParachainBridgeHub::deliver(ticket) - } else { - Err(SendError::Unroutable) - } - } -} - -/// Emulating XCMP channel with sibling chain. We don't have required infra here, at Millau, -/// so we have to provide at least something to be able to run benchmarks. -pub struct EmulatedSiblingXcmpChannel; - -impl EmulatedSiblingXcmpChannel { - /// Start emulating congested channel. - pub fn make_congested() { - frame_support::storage::unhashed::put(b"EmulatedSiblingXcmpChannel.Congested", &true); - } -} - -impl bp_xcm_bridge_hub::LocalXcmChannelManager for EmulatedSiblingXcmpChannel { - type Error = (); - - fn is_congested(_with: &MultiLocation) -> bool { - frame_support::storage::unhashed::get_or_default(b"EmulatedSiblingXcmpChannel.Congested") - } - - fn suspend_bridge(_with: &MultiLocation, _bridge_id: BridgeId) -> Result<(), Self::Error> { - Ok(()) - } - - fn resume_bridge(_with: &MultiLocation, _bridge_id: BridgeId) -> Result<(), Self::Error> { - Ok(()) - } -} - -#[cfg(test)] -mod tests { - use super::*; - use crate::{ - WithRialtoMessagesInstance, WithRialtoParachainMessagesInstance, - WithRialtoParachainXcmBridgeHubInstance, WithRialtoXcmBridgeHubInstance, - XcmRialtoBridgeHub, XcmRialtoParachainBridgeHub, - }; - use bp_messages::{ - target_chain::{DispatchMessage, DispatchMessageData, MessageDispatch}, - LaneId, MessageKey, OutboundLaneData, - }; - use bp_xcm_bridge_hub::BridgeState; - use codec::Encode; - use pallet_bridge_messages::OutboundLanes; - use pallet_xcm_bridge_hub::Bridges; - use sp_runtime::BuildStorage; - use xcm_executor::XcmExecutor; - - fn new_test_ext() -> sp_io::TestExternalities { - sp_io::TestExternalities::new( - frame_system::GenesisConfig::::default().build_storage().unwrap(), - ) - } - - fn prepare_outbound_xcm_message(destination: NetworkId) -> Xcm { - vec![ExportMessage { - network: destination, - destination: destination.into(), - xcm: vec![Instruction::Trap(42)].into(), - }] - .into() - } - - #[test] - fn xcm_messages_to_rialto_are_sent_using_bridge_exporter() { - new_test_ext().execute_with(|| { - // ensure that the there are no messages queued - let bridge_id = crate::rialto_messages::Bridge::get(); - let lane_id = bridge_id.lane_id(); - Bridges::::insert( - bridge_id, - Bridge { - bridge_origin_relative_location: Box::new(MultiLocation::new(0, Here).into()), - state: BridgeState::Opened, - bridge_owner_account: [0u8; 32].into(), - reserve: 0, - }, - ); - OutboundLanes::::insert( - lane_id, - OutboundLaneData::opened(), - ); - assert_eq!( - OutboundLanes::::get(lane_id) - .unwrap() - .latest_generated_nonce, - 0, - ); - - // export message instruction "sends" message to Rialto - XcmExecutor::::execute_xcm_in_credit( - Here, - prepare_outbound_xcm_message(RialtoNetwork::get()), - Default::default(), - Weight::MAX, - Weight::MAX, - ) - .ensure_complete() - .expect("runtime configuration must be correct"); - - // ensure that the message has been queued - assert_eq!( - OutboundLanes::::get(lane_id) - .unwrap() - .latest_generated_nonce, - 1, - ); - }) - } - - #[test] - fn xcm_messages_to_rialto_parachain_are_sent_using_bridge_exporter() { - new_test_ext().execute_with(|| { - // ensure that the there are no messages queued - let bridge_id = crate::rialto_parachain_messages::Bridge::get(); - let lane_id = bridge_id.lane_id(); - Bridges::::insert( - bridge_id, - Bridge { - bridge_origin_relative_location: Box::new(MultiLocation::new(0, Here).into()), - state: BridgeState::Opened, - bridge_owner_account: [0u8; 32].into(), - reserve: 0, - }, - ); - OutboundLanes::::insert( - lane_id, - OutboundLaneData::opened(), - ); - assert_eq!( - OutboundLanes::::get(lane_id) - .unwrap() - .latest_generated_nonce, - 0, - ); - - // export message instruction "sends" message to Rialto - XcmExecutor::::execute_xcm_in_credit( - Here, - prepare_outbound_xcm_message(RialtoParachainNetwork::get()), - Default::default(), - Weight::MAX, - Weight::MAX, - ) - .ensure_complete() - .expect("runtime configuration must be correct"); - - // ensure that the message has been queued - assert_eq!( - OutboundLanes::::get(lane_id) - .unwrap() - .latest_generated_nonce, - 1, - ); - }) - } - - fn prepare_inbound_bridge_message(lane_id: LaneId) -> DispatchMessage> { - let xcm = xcm::VersionedXcm::::V3(vec![Instruction::Trap(42)].into()); - let location = - xcm::VersionedInteriorMultiLocation::V3(X1(GlobalConsensus(ThisNetwork::get()))); - // this is the `BridgeMessage` from polkadot xcm builder, but it has no constructor - // or public fields, so just tuple - let bridge_message = (location, xcm).encode(); - DispatchMessage { - key: MessageKey { lane_id, nonce: 1 }, - data: DispatchMessageData { payload: Ok(bridge_message) }, - } - } - - #[test] - fn xcm_messages_from_rialto_are_dispatched() { - let incoming_message = - prepare_inbound_bridge_message(crate::rialto_messages::Bridge::get().lane_id()); - - // we care only about handing message to the XCM dispatcher, so we don't care about its - // actual dispatch - let dispatch_result = XcmRialtoBridgeHub::dispatch(incoming_message); - assert!(matches!( - dispatch_result.dispatch_level_result, - pallet_xcm_bridge_hub::XcmBlobMessageDispatchResult::NotDispatched(_), - )); - } - - #[test] - fn xcm_messages_from_rialto_parachain_are_dispatched() { - let incoming_message = - prepare_inbound_bridge_message(crate::rialto_parachain_messages::Lane::get()); - - // we care only about handing message to the XCM dispatcher, so we don't care about its - // actual dispatch - let dispatch_result = XcmRialtoParachainBridgeHub::dispatch(incoming_message); - assert!(matches!( - dispatch_result.dispatch_level_result, - pallet_xcm_bridge_hub::XcmBlobMessageDispatchResult::NotDispatched(_), - )); - } -} diff --git a/bin/rialto-parachain/node/Cargo.toml b/bin/rialto-parachain/node/Cargo.toml deleted file mode 100644 index 86f92392fcf5f3c6e6ec1a1cea773324a67a8ace..0000000000000000000000000000000000000000 --- a/bin/rialto-parachain/node/Cargo.toml +++ /dev/null @@ -1,85 +0,0 @@ -[package] -name = "rialto-parachain-collator" -version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2021" -repository = "https://github.com/paritytech/parity-bridges-common/" -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" - -[build-dependencies] -substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } - -[[bin]] -name = 'rialto-parachain-collator' - -[features] -default = [] -runtime-benchmarks = [ 'rialto-parachain-runtime/runtime-benchmarks' ] - -[dependencies] -clap = { version = "4.4.7", features = ["derive"] } -log = '0.4.20' -codec = { package = 'parity-scale-codec', version = '3.1.5' } -serde = { version = '1.0', features = ['derive'] } - -# RPC related Dependencies -jsonrpsee = { version = "0.16.2", features = ["server"] } - -# Local Dependencies - -bp-messages = { path = "../../../primitives/messages" } -bridge-runtime-common = { path = "../../runtime-common" } -rialto-parachain-runtime = { path = '../runtime' } - -# Substrate Dependencies -frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } - -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } - -substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } - -## Substrate Client Dependencies -sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master"} -sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } - -## Substrate Primitive Dependencies -sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } - -# Cumulus dependencies -cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -cumulus-client-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } - -# Polkadot dependencies -polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -polkadot-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } diff --git a/bin/rialto-parachain/node/build.rs b/bin/rialto-parachain/node/build.rs deleted file mode 100644 index 8ba8a31e9a79fdf45e93c7efb49470e207f90049..0000000000000000000000000000000000000000 --- a/bin/rialto-parachain/node/build.rs +++ /dev/null @@ -1,22 +0,0 @@ -// 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 . - -use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed}; - -fn main() { - generate_cargo_keys(); - rerun_if_git_head_changed(); -} diff --git a/bin/rialto-parachain/node/src/chain_spec.rs b/bin/rialto-parachain/node/src/chain_spec.rs deleted file mode 100644 index 2b0c76ad81e8d1df8eb9bb1ca96e01682ef77d74..0000000000000000000000000000000000000000 --- a/bin/rialto-parachain/node/src/chain_spec.rs +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright 2020-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 . - -use cumulus_primitives_core::ParaId; -use rialto_parachain_runtime::{ - AccountId, AuraId, BridgeMillauMessagesConfig, Signature, XcmMillauBridgeHubConfig, -}; -use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup}; -use sc_service::ChainType; -use serde::{Deserialize, Serialize}; -use sp_core::{sr25519, Pair, Public}; -use sp_runtime::traits::{IdentifyAccount, Verify}; - -/// "Names" of the authorities accounts at local testnet. -const LOCAL_AUTHORITIES_ACCOUNTS: [&str; 2] = ["Alice", "Bob"]; -/// "Names" of the authorities accounts at development testnet. -const DEV_AUTHORITIES_ACCOUNTS: [&str; 2] = LOCAL_AUTHORITIES_ACCOUNTS; -/// "Names" of all possible authorities accounts. -const ALL_AUTHORITIES_ACCOUNTS: [&str; 2] = LOCAL_AUTHORITIES_ACCOUNTS; -/// "Name" of the `sudo` account. -const SUDO_ACCOUNT: &str = "Sudo"; -/// "Name" of the account, which owns the with-Millau messages pallet. -const MILLAU_MESSAGES_PALLET_OWNER: &str = "Millau.MessagesOwner"; - -/// Specialized `ChainSpec` for the normal parachain runtime. -pub type ChainSpec = - sc_service::GenericChainSpec; - -/// Helper function to generate a crypto pair from seed -pub fn get_from_seed(seed: &str) -> ::Public { - TPublic::Pair::from_string(&format!("//{seed}"), None) - .expect("static values are valid; qed") - .public() -} - -/// The extensions for the [`ChainSpec`]. -#[derive( - Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension, -)] -#[serde(deny_unknown_fields)] -pub struct Extensions { - /// The relay chain of the Parachain. - pub relay_chain: String, - /// The id of the Parachain. - pub para_id: u32, -} - -impl Extensions { - /// Try to get the extension from the given `ChainSpec`. - pub fn try_get(chain_spec: &dyn sc_service::ChainSpec) -> Option<&Self> { - sc_chain_spec::get_extension(chain_spec.extensions()) - } -} - -type AccountPublic = ::Signer; - -/// Helper function to generate an account ID from seed -pub fn get_account_id_from_seed(seed: &str) -> AccountId -where - AccountPublic: From<::Public>, -{ - AccountPublic::from(get_from_seed::(seed)).into_account() -} - -/// We're using the same set of endowed accounts on all RialtoParachain chains (dev/local) to make -/// sure that all accounts, required for bridge to be functional (e.g. relayers fund account, -/// accounts used by relayers in our test deployments, accounts used for demonstration -/// purposes), are all available on these chains. -fn endowed_accounts() -> Vec { - let all_authorities = ALL_AUTHORITIES_ACCOUNTS.iter().flat_map(|x| { - [ - get_account_id_from_seed::(x), - get_account_id_from_seed::(&format!("{x}//stash")), - ] - }); - vec![ - // Sudo account - get_account_id_from_seed::(SUDO_ACCOUNT), - // Regular (unused) accounts - get_account_id_from_seed::("Charlie"), - get_account_id_from_seed::("Dave"), - get_account_id_from_seed::("Eve"), - get_account_id_from_seed::("Ferdie"), - get_account_id_from_seed::("Charlie//stash"), - get_account_id_from_seed::("Dave//stash"), - get_account_id_from_seed::("Eve//stash"), - get_account_id_from_seed::("Ferdie//stash"), - // Accounts, used by RialtoParachain<>Millau bridge - get_account_id_from_seed::(MILLAU_MESSAGES_PALLET_OWNER), - get_account_id_from_seed::("Millau.HeadersAndMessagesRelay1"), - get_account_id_from_seed::("Millau.HeadersAndMessagesRelay2"), - get_account_id_from_seed::("Millau.MessagesSender"), - ] - .into_iter() - .chain(all_authorities) - .collect() -} - -pub fn development_config(id: ParaId) -> ChainSpec { - // Give your base currency a unit name and decimal places - let mut properties = sc_chain_spec::Properties::new(); - properties.insert("tokenSymbol".into(), "UNIT".into()); - properties.insert("tokenDecimals".into(), 12.into()); - - ChainSpec::from_genesis( - // Name - "Development", - // ID - "dev", - ChainType::Local, - move || { - testnet_genesis( - get_account_id_from_seed::(SUDO_ACCOUNT), - DEV_AUTHORITIES_ACCOUNTS.into_iter().map(get_from_seed::).collect(), - endowed_accounts(), - id, - ) - }, - vec![], - None, - None, - None, - None, - Extensions { - relay_chain: "rococo-local".into(), // You MUST set this to the correct network! - para_id: id.into(), - }, - ) -} - -pub fn local_testnet_config(id: ParaId) -> ChainSpec { - // Give your base currency a unit name and decimal places - let mut properties = sc_chain_spec::Properties::new(); - properties.insert("tokenSymbol".into(), "UNIT".into()); - properties.insert("tokenDecimals".into(), 12.into()); - - ChainSpec::from_genesis( - // Name - "Local Testnet", - // ID - "local_testnet", - ChainType::Local, - move || { - testnet_genesis( - get_account_id_from_seed::(SUDO_ACCOUNT), - LOCAL_AUTHORITIES_ACCOUNTS.into_iter().map(get_from_seed::).collect(), - endowed_accounts(), - id, - ) - }, - Vec::new(), - None, - None, - None, - None, - Extensions { - relay_chain: "rococo-local".into(), // You MUST set this to the correct network! - para_id: id.into(), - }, - ) -} - -fn testnet_genesis( - root_key: AccountId, - initial_authorities: Vec, - endowed_accounts: Vec, - id: ParaId, -) -> rialto_parachain_runtime::RuntimeGenesisConfig { - rialto_parachain_runtime::RuntimeGenesisConfig { - system: rialto_parachain_runtime::SystemConfig { - code: rialto_parachain_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, - balances: rialto_parachain_runtime::BalancesConfig { - balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(), - }, - sudo: rialto_parachain_runtime::SudoConfig { key: Some(root_key) }, - parachain_info: rialto_parachain_runtime::ParachainInfoConfig { - parachain_id: id, - ..Default::default() - }, - aura: rialto_parachain_runtime::AuraConfig { authorities: initial_authorities }, - aura_ext: Default::default(), - bridge_millau_messages: BridgeMillauMessagesConfig { - owner: Some(get_account_id_from_seed::(MILLAU_MESSAGES_PALLET_OWNER)), - opened_lanes: vec![rialto_parachain_runtime::millau_messages::Bridge::get().lane_id()], - ..Default::default() - }, - xcm_millau_bridge_hub: XcmMillauBridgeHubConfig { - opened_bridges: vec![( - xcm::latest::Junctions::Here.into(), - xcm::latest::InteriorMultiLocation::from( - rialto_parachain_runtime::MillauNetwork::get(), - ), - )], - ..Default::default() - }, - } -} diff --git a/bin/rialto-parachain/node/src/cli.rs b/bin/rialto-parachain/node/src/cli.rs deleted file mode 100644 index c8c457752d600f3d25116b5e8e5e7b20006d6c24..0000000000000000000000000000000000000000 --- a/bin/rialto-parachain/node/src/cli.rs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright 2020-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 . - -#![allow(clippy::large_enum_variant)] - -use crate::chain_spec; -use clap::Parser; -use cumulus_client_cli::{ExportGenesisStateCommand, ExportGenesisWasmCommand}; -use std::path::PathBuf; - -/// Sub-commands supported by the collator. -#[derive(Debug, Parser)] -pub enum Subcommand { - /// Export the genesis state of the parachain. - #[clap(name = "export-genesis-state")] - ExportGenesisState(ExportGenesisStateCommand), - - /// Export the genesis wasm of the parachain. - #[clap(name = "export-genesis-wasm")] - ExportGenesisWasm(ExportGenesisWasmCommand), - - /// Build a chain specification. - BuildSpec(sc_cli::BuildSpecCmd), - - /// Validate blocks. - CheckBlock(sc_cli::CheckBlockCmd), - - /// Export blocks. - ExportBlocks(sc_cli::ExportBlocksCmd), - - /// Export the state of a given block into a chain spec. - ExportState(sc_cli::ExportStateCmd), - - /// Import blocks. - ImportBlocks(sc_cli::ImportBlocksCmd), - - /// Remove the whole chain. - PurgeChain(cumulus_client_cli::PurgeChainCmd), - - /// Revert the chain to a previous state. - Revert(sc_cli::RevertCmd), - - /// The custom benchmark subcommand benchmarking runtime pallets. - #[clap(subcommand)] - Benchmark(frame_benchmarking_cli::BenchmarkCmd), -} - -#[derive(Debug, Parser)] -#[clap( - propagate_version = true, - args_conflicts_with_subcommands = true, - subcommand_negates_reqs = true -)] -pub struct Cli { - #[clap(subcommand)] - pub subcommand: Option, - - #[clap(long)] - pub parachain_id: Option, - - #[clap(flatten)] - pub run: cumulus_client_cli::RunCmd, - - /// Relaychain arguments - #[clap(raw = true)] - pub relaychain_args: Vec, -} - -#[derive(Debug)] -pub struct RelayChainCli { - /// The actual relay chain CLI object. - pub base: polkadot_cli::RunCmd, - - /// Optional chain id that should be passed to the relay chain. - pub chain_id: Option, - - /// The base path that should be used by the relay chain. - pub base_path: Option, -} - -impl RelayChainCli { - /// Parse the relay chain CLI parameters using the para chain `Configuration`. - pub fn new<'a>( - para_config: &sc_service::Configuration, - relay_chain_args: impl Iterator, - ) -> Self { - let extension = chain_spec::Extensions::try_get(&*para_config.chain_spec); - let chain_id = extension.map(|e| e.relay_chain.clone()); - let base_path = para_config.base_path.path().join("rialto-bridge-node"); - Self { - base_path: Some(base_path), - chain_id, - base: polkadot_cli::RunCmd::parse_from(relay_chain_args), - } - } -} diff --git a/bin/rialto-parachain/node/src/command.rs b/bin/rialto-parachain/node/src/command.rs deleted file mode 100644 index 50c1857f1c9c84e36d0e7bd56ef4390745186e0d..0000000000000000000000000000000000000000 --- a/bin/rialto-parachain/node/src/command.rs +++ /dev/null @@ -1,372 +0,0 @@ -// Copyright 2020-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 . - -use crate::{ - chain_spec, - cli::{Cli, RelayChainCli, Subcommand}, - service::new_partial, -}; -use cumulus_primitives_core::ParaId; -use frame_benchmarking_cli::BenchmarkCmd; -use log::info; -use rialto_parachain_runtime::{Block, RuntimeApi}; -use sc_cli::{ - ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams, - NetworkParams, Result, SharedParams, SubstrateCli, -}; -use sc_service::config::{BasePath, PrometheusConfig}; -use std::net::SocketAddr; - -fn load_spec( - id: &str, - para_id: ParaId, -) -> std::result::Result, String> { - Ok(match id { - "dev" => Box::new(chain_spec::development_config(para_id)), - "" | "local" => Box::new(chain_spec::local_testnet_config(para_id)), - path => Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?), - }) -} - -impl SubstrateCli for Cli { - fn impl_name() -> String { - "Parachain Collator Template".into() - } - - fn impl_version() -> String { - env!("SUBSTRATE_CLI_IMPL_VERSION").into() - } - - fn description() -> String { - format!( - "Parachain Collator Template\n\nThe command-line arguments provided first will be \ - passed to the parachain node, while the arguments provided after -- will be passed \ - to the relaychain node.\n\n\ - {} [parachain-args] -- [relaychain-args]", - Self::executable_name() - ) - } - - fn author() -> String { - env!("CARGO_PKG_AUTHORS").into() - } - - fn support_url() -> String { - "https://github.com/substrate-developer-hub/substrate-parachain-template/issues/new".into() - } - - fn copyright_start_year() -> i32 { - 2017 - } - - fn load_spec(&self, id: &str) -> std::result::Result, String> { - load_spec(id, self.parachain_id.unwrap_or(2000).into()) - } -} - -impl SubstrateCli for RelayChainCli { - fn impl_name() -> String { - "Parachain Collator Template".into() - } - - fn impl_version() -> String { - env!("SUBSTRATE_CLI_IMPL_VERSION").into() - } - - fn description() -> String { - "Parachain Collator Template\n\nThe command-line arguments provided first will be \ - passed to the parachain node, while the arguments provided after -- will be passed \ - to the relaychain node.\n\n\ - parachain-collator [parachain-args] -- [relaychain-args]" - .into() - } - - fn author() -> String { - env!("CARGO_PKG_AUTHORS").into() - } - - fn support_url() -> String { - "https://github.com/substrate-developer-hub/substrate-parachain-template/issues/new".into() - } - - fn copyright_start_year() -> i32 { - 2017 - } - - fn load_spec(&self, id: &str) -> std::result::Result, String> { - polkadot_cli::Cli::from_iter([RelayChainCli::executable_name()].iter()).load_spec(id) - } -} - -macro_rules! construct_async_run { - (|$components:ident, $cli:ident, $cmd:ident, $config:ident| $( $code:tt )* ) => {{ - let runner = $cli.create_runner($cmd)?; - runner.async_run(|$config| { - let $components = new_partial::< - RuntimeApi, - _ - >( - &$config, - crate::service::parachain_build_import_queue, - )?; - let task_manager = $components.task_manager; - { $( $code )* }.map(|v| (v, task_manager)) - }) - }} -} - -/// Parse command line arguments into service configuration. -pub fn run() -> Result<()> { - let cli = Cli::from_args(); - sp_core::crypto::set_default_ss58_version(sp_core::crypto::Ss58AddressFormat::custom( - rialto_parachain_runtime::SS58Prefix::get() as u16, - )); - - match &cli.subcommand { - Some(Subcommand::BuildSpec(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.sync_run(|config| cmd.run(config.chain_spec, config.network)) - }, - Some(Subcommand::CheckBlock(cmd)) => { - construct_async_run!(|components, cli, cmd, config| { - Ok(cmd.run(components.client, components.import_queue)) - }) - }, - Some(Subcommand::ExportBlocks(cmd)) => { - construct_async_run!(|components, cli, cmd, config| Ok( - cmd.run(components.client, config.database) - )) - }, - Some(Subcommand::ExportState(cmd)) => { - construct_async_run!(|components, cli, cmd, config| Ok( - cmd.run(components.client, config.chain_spec) - )) - }, - Some(Subcommand::ImportBlocks(cmd)) => { - construct_async_run!(|components, cli, cmd, config| { - Ok(cmd.run(components.client, components.import_queue)) - }) - }, - Some(Subcommand::PurgeChain(cmd)) => { - let runner = cli.create_runner(cmd)?; - - runner.sync_run(|config| { - let polkadot_cli = RelayChainCli::new( - &config, - [RelayChainCli::executable_name()].iter().chain(cli.relaychain_args.iter()), - ); - - let polkadot_config = SubstrateCli::create_configuration( - &polkadot_cli, - &polkadot_cli, - config.tokio_handle.clone(), - ) - .map_err(|err| format!("Relay chain argument error: {err}"))?; - - cmd.run(config, polkadot_config) - }) - }, - Some(Subcommand::Revert(cmd)) => { - construct_async_run!(|components, cli, cmd, config| Ok(cmd.run( - components.client, - components.backend, - None - ))) - }, - Some(Subcommand::ExportGenesisState(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.sync_run(|config| { - let partials = new_partial::( - &config, - crate::service::parachain_build_import_queue, - )?; - - cmd.run(&*config.chain_spec, &*partials.client) - }) - }, - Some(Subcommand::ExportGenesisWasm(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.sync_run(|_config| { - let spec = cli.load_spec(&cmd.shared_params.chain.clone().unwrap_or_default())?; - cmd.run(&*spec) - }) - }, - Some(Subcommand::Benchmark(cmd)) => { - let runner = cli.create_runner(cmd)?; - match cmd { - BenchmarkCmd::Pallet(cmd) => - if cfg!(feature = "runtime-benchmarks") { - runner.sync_run(|config| cmd.run::(config)) - } else { - println!( - "Benchmarking wasn't enabled when building the node. \ - You can enable it with `--features runtime-benchmarks`." - ); - Ok(()) - }, - _ => Err("Unsupported benchmarking subcommand".into()), - } - }, - None => { - let runner = cli.create_runner(&cli.run.normalize())?; - let collator_options = cli.run.collator_options(); - - runner.run_node_until_exit(|config| async move { - let para_id = - chain_spec::Extensions::try_get(&*config.chain_spec).map(|e| e.para_id); - - let polkadot_cli = RelayChainCli::new( - &config, - [RelayChainCli::executable_name()].iter().chain(cli.relaychain_args.iter()), - ); - - let id = ParaId::from(cli.parachain_id.or(para_id).expect("Missing ParaId")); - - let polkadot_config = SubstrateCli::create_configuration( - &polkadot_cli, - &polkadot_cli, - config.tokio_handle.clone(), - ) - .map_err(|err| format!("Relay chain argument error: {err}"))?; - - info!("Parachain id: {:?}", id); - info!("Is collating: {}", if config.role.is_authority() { "yes" } else { "no" }); - - crate::service::start_node(config, polkadot_config, collator_options, id) - .await - .map(|r| r.0) - .map_err(Into::into) - }) - }, - } -} - -impl DefaultConfigurationValues for RelayChainCli { - fn p2p_listen_port() -> u16 { - 30334 - } - - fn rpc_listen_port() -> u16 { - 9945 - } - - fn prometheus_listen_port() -> u16 { - 9616 - } -} - -impl CliConfiguration for RelayChainCli { - fn shared_params(&self) -> &SharedParams { - self.base.base.shared_params() - } - - fn import_params(&self) -> Option<&ImportParams> { - self.base.base.import_params() - } - - fn network_params(&self) -> Option<&NetworkParams> { - self.base.base.network_params() - } - - fn keystore_params(&self) -> Option<&KeystoreParams> { - self.base.base.keystore_params() - } - - fn base_path(&self) -> Result> { - Ok(self - .shared_params() - .base_path()? - .or_else(|| self.base_path.clone().map(Into::into))) - } - - fn rpc_addr(&self, default_listen_port: u16) -> Result> { - self.base.base.rpc_addr(default_listen_port) - } - - fn prometheus_config( - &self, - default_listen_port: u16, - chain_spec: &Box, - ) -> Result> { - self.base.base.prometheus_config(default_listen_port, chain_spec) - } - - fn init( - &self, - _support_url: &String, - _impl_version: &String, - _logger_hook: F, - _config: &sc_service::Configuration, - ) -> Result<()> - where - F: FnOnce(&mut sc_cli::LoggerBuilder, &sc_service::Configuration), - { - unreachable!("PolkadotCli is never initialized; qed"); - } - - fn chain_id(&self, is_dev: bool) -> Result { - let chain_id = self.base.base.chain_id(is_dev)?; - - Ok(if chain_id.is_empty() { self.chain_id.clone().unwrap_or_default() } else { chain_id }) - } - - fn role(&self, is_dev: bool) -> Result { - self.base.base.role(is_dev) - } - - fn transaction_pool(&self, is_dev: bool) -> Result { - self.base.base.transaction_pool(is_dev) - } - - fn rpc_methods(&self) -> Result { - self.base.base.rpc_methods() - } - - fn rpc_max_connections(&self) -> Result { - self.base.base.rpc_max_connections() - } - - fn rpc_cors(&self, is_dev: bool) -> Result>> { - self.base.base.rpc_cors(is_dev) - } - - fn default_heap_pages(&self) -> Result> { - self.base.base.default_heap_pages() - } - - fn force_authoring(&self) -> Result { - self.base.base.force_authoring() - } - - fn disable_grandpa(&self) -> Result { - self.base.base.disable_grandpa() - } - - fn max_runtime_instances(&self) -> Result> { - self.base.base.max_runtime_instances() - } - - fn announce_block(&self) -> Result { - self.base.base.announce_block() - } - - fn telemetry_endpoints( - &self, - chain_spec: &Box, - ) -> Result> { - self.base.base.telemetry_endpoints(chain_spec) - } -} diff --git a/bin/rialto-parachain/node/src/lib.rs b/bin/rialto-parachain/node/src/lib.rs deleted file mode 100644 index 5dd2a8af861b1d1bb7d52f7680ee39963bec3a78..0000000000000000000000000000000000000000 --- a/bin/rialto-parachain/node/src/lib.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2020-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 . - -pub mod chain_spec; -#[allow(deprecated)] -pub mod service; diff --git a/bin/rialto-parachain/node/src/main.rs b/bin/rialto-parachain/node/src/main.rs deleted file mode 100644 index ca93efa067cc94f19a4d22d512280a4437f39b9a..0000000000000000000000000000000000000000 --- a/bin/rialto-parachain/node/src/main.rs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2020-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 . - -//! Substrate Parachain Node Template CLI - -#![warn(missing_docs)] - -mod chain_spec; -#[macro_use] -#[allow(deprecated)] -mod service; -mod cli; -mod command; - -fn main() -> sc_cli::Result<()> { - command::run() -} diff --git a/bin/rialto-parachain/node/src/service.rs b/bin/rialto-parachain/node/src/service.rs deleted file mode 100644 index 86c5a7615901c22357560a96f5b9a052ceb919cf..0000000000000000000000000000000000000000 --- a/bin/rialto-parachain/node/src/service.rs +++ /dev/null @@ -1,505 +0,0 @@ -// Copyright 2020-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 . - -//! Rialto parachain node service. -//! -//! The code is mostly copy of `polkadot-parachains/src/service.rs` file from Cumulus -//! repository with some parts removed. We have added two RPC extensions to the original -//! service: `pallet_transaction_payment_rpc::TransactionPaymentApi` and -//! `substrate_frame_rpc_system::SystemApi`. - -// std -use std::{sync::Arc, time::Duration}; - -// Local Runtime Types -use rialto_parachain_runtime::RuntimeApi; - -// Cumulus Imports -use cumulus_client_cli::CollatorOptions; -use cumulus_client_consensus_aura::{AuraConsensus, BuildAuraConsensusParams, SlotProportion}; -use cumulus_client_consensus_common::{ - ParachainBlockImport as TParachainBlockImport, ParachainConsensus, -}; -use cumulus_client_network::RequireSecondedInBlockAnnounce; -use cumulus_client_service::{ - prepare_node_config, start_collator, start_full_node, StartCollatorParams, StartFullNodeParams, -}; -use cumulus_primitives_core::ParaId; -use cumulus_relay_chain_interface::RelayChainInterface; -use sc_consensus::ImportQueue; -// Substrate Imports -use sc_executor::{ - HeapAllocStrategy, NativeElseWasmExecutor, NativeExecutionDispatch, WasmExecutor, - DEFAULT_HEAP_ALLOC_STRATEGY, -}; -use sc_network::{config::FullNetworkConfiguration, NetworkBlock}; -use sc_network_sync::SyncingService; -use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager}; -use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle}; -use sp_api::ConstructRuntimeApi; -use sp_keystore::KeystorePtr; -use sp_runtime::traits::BlakeTwo256; -use substrate_prometheus_endpoint::Registry; - -// Runtime type overrides -type BlockNumber = u32; -type Header = sp_runtime::generic::Header; -pub type Block = sp_runtime::generic::Block; - -type ParachainClient = - TFullClient>; -type ParachainBackend = TFullBackend; -type ParachainBlockImport = - TParachainBlockImport>, ParachainBackend>; - -pub type ParachainRuntimeExecutor = ExecutorDispatch; - -// Our native executor instance. -pub struct ExecutorDispatch; - -impl NativeExecutionDispatch for ExecutorDispatch { - type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; - - fn dispatch(method: &str, data: &[u8]) -> Option> { - rialto_parachain_runtime::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - rialto_parachain_runtime::native_version() - } -} - -/// Starts a `ServiceBuilder` for a full service. -/// -/// Use this macro if you don't actually need the full service, but just the builder in order to -/// be able to perform chain operations. -#[allow(clippy::type_complexity)] -pub fn new_partial( - config: &Configuration, - build_import_queue: BIQ, -) -> Result< - PartialComponents< - ParachainClient, - ParachainBackend, - (), - sc_consensus::DefaultImportQueue, - sc_transaction_pool::FullPool>, - (ParachainBlockImport, Option, Option), - >, - sc_service::Error, -> -where - RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, - RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue - + sp_api::Metadata - + sp_session::SessionKeys - + sp_api::ApiExt - + sp_offchain::OffchainWorkerApi - + sp_block_builder::BlockBuilder, - sc_client_api::StateBackendFor: sp_api::StateBackend, - BIQ: FnOnce( - Arc>, - ParachainBlockImport, - &Configuration, - Option, - &TaskManager, - ) -> Result, sc_service::Error>, -{ - let telemetry = config - .telemetry_endpoints - .clone() - .filter(|x| !x.is_empty()) - .map(|endpoints| -> Result<_, sc_telemetry::Error> { - let worker = TelemetryWorker::new(16)?; - let telemetry = worker.handle().new_telemetry(endpoints); - Ok((worker, telemetry)) - }) - .transpose()?; - - let heap_pages = config - .default_heap_pages - .map_or(DEFAULT_HEAP_ALLOC_STRATEGY, |h| HeapAllocStrategy::Static { extra_pages: h as _ }); - let executor = - sc_executor::NativeElseWasmExecutor::::new_with_wasm_executor( - WasmExecutor::builder() - .with_execution_method(config.wasm_method) - .with_onchain_heap_alloc_strategy(heap_pages) - .with_offchain_heap_alloc_strategy(heap_pages) - .with_max_runtime_instances(config.max_runtime_instances) - .with_runtime_cache_size(config.runtime_cache_size) - .build(), - ); - - let (client, backend, keystore_container, task_manager) = - sc_service::new_full_parts::( - config, - telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()), - executor, - )?; - let client = Arc::new(client); - - let telemetry_worker_handle = telemetry.as_ref().map(|(worker, _)| worker.handle()); - - let telemetry = telemetry.map(|(worker, telemetry)| { - task_manager.spawn_handle().spawn("telemetry", None, worker.run()); - telemetry - }); - - let transaction_pool = sc_transaction_pool::BasicPool::new_full( - config.transaction_pool.clone(), - config.role.is_authority().into(), - config.prometheus_registry(), - task_manager.spawn_essential_handle(), - client.clone(), - ); - - let block_import = ParachainBlockImport::new(client.clone(), backend.clone()); - - let import_queue = build_import_queue( - client.clone(), - block_import.clone(), - config, - telemetry.as_ref().map(|telemetry| telemetry.handle()), - &task_manager, - )?; - - let params = PartialComponents { - backend, - client, - import_queue, - keystore_container, - task_manager, - transaction_pool, - select_chain: (), - other: (block_import, telemetry, telemetry_worker_handle), - }; - - Ok(params) -} - -/// Start a node with the given parachain `Configuration` and relay chain `Configuration`. -/// -/// This is the actual implementation that is abstract over the executor and the runtime api. -#[sc_tracing::logging::prefix_logs_with("Parachain")] -async fn start_node_impl( - parachain_config: Configuration, - polkadot_config: Configuration, - collator_options: CollatorOptions, - id: ParaId, - rpc_ext_builder: RB, - build_import_queue: BIQ, - build_consensus: BIC, -) -> sc_service::error::Result<(TaskManager, Arc>)> -where - RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, - RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue - + sp_api::Metadata - + sp_session::SessionKeys - + sp_api::ApiExt - + sp_offchain::OffchainWorkerApi - + sp_block_builder::BlockBuilder - + cumulus_primitives_core::CollectCollationInfo, - sc_client_api::StateBackendFor: sp_api::StateBackend, - RB: Fn( - sc_rpc_api::DenyUnsafe, - Arc>, - Arc>>, - ) -> Result, sc_service::Error> - + Send - + Clone - + 'static, - BIQ: FnOnce( - Arc>, - ParachainBlockImport, - &Configuration, - Option, - &TaskManager, - ) -> Result, sc_service::Error>, - BIC: FnOnce( - Arc>, - ParachainBlockImport, - Option<&Registry>, - Option, - &TaskManager, - Arc, - Arc>>, - Arc>, - KeystorePtr, - bool, - ) -> Result>, sc_service::Error>, -{ - let parachain_config = prepare_node_config(parachain_config); - - let params = new_partial::(¶chain_config, build_import_queue)?; - let (block_import, mut telemetry, telemetry_worker_handle) = params.other; - - let mut task_manager = params.task_manager; - let (relay_chain_interface, collator_key) = - cumulus_client_service::build_relay_chain_interface( - polkadot_config, - ¶chain_config, - telemetry_worker_handle, - &mut task_manager, - collator_options, - None, - ) - .await - .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?; - - let client = params.client.clone(); - let backend = params.backend.clone(); - let block_announce_validator = - RequireSecondedInBlockAnnounce::new(relay_chain_interface.clone(), id); - - let force_authoring = parachain_config.force_authoring; - let validator = parachain_config.role.is_authority(); - let prometheus_registry = parachain_config.prometheus_registry().cloned(); - let transaction_pool = params.transaction_pool.clone(); - let import_queue_service = params.import_queue.service(); - let net_config = FullNetworkConfiguration::new(¶chain_config.network); - - let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) = - sc_service::build_network(sc_service::BuildNetworkParams { - config: ¶chain_config, - net_config, - client: client.clone(), - transaction_pool: transaction_pool.clone(), - spawn_handle: task_manager.spawn_handle(), - import_queue: params.import_queue, - block_announce_validator_builder: Some(Box::new(|_| { - Box::new(block_announce_validator) - })), - warp_sync_params: None, - block_relay: None, - })?; - - let rpc_client = client.clone(); - let rpc_transaction_pool = transaction_pool.clone(); - let rpc_extensions_builder = Box::new(move |deny_unsafe, _| { - rpc_ext_builder(deny_unsafe, rpc_client.clone(), rpc_transaction_pool.clone()) - }); - - sc_service::spawn_tasks(sc_service::SpawnTasksParams { - rpc_builder: rpc_extensions_builder.clone(), - client: client.clone(), - transaction_pool: transaction_pool.clone(), - task_manager: &mut task_manager, - config: parachain_config, - keystore: params.keystore_container.keystore(), - backend: backend.clone(), - network: network.clone(), - sync_service: sync_service.clone(), - system_rpc_tx, - tx_handler_controller, - telemetry: telemetry.as_mut(), - })?; - - let announce_block = { - let sync_service = sync_service.clone(); - Arc::new(move |hash, data| sync_service.announce_block(hash, data)) - }; - - let relay_chain_slot_duration = Duration::from_secs(6); - - let overseer_handle = relay_chain_interface - .overseer_handle() - .map_err(|e| sc_service::Error::Application(Box::new(e)))?; - - if validator { - let parachain_consensus = build_consensus( - client.clone(), - block_import, - prometheus_registry.as_ref(), - telemetry.as_ref().map(|t| t.handle()), - &task_manager, - relay_chain_interface.clone(), - transaction_pool, - sync_service.clone(), - params.keystore_container.keystore(), - force_authoring, - )?; - - let spawner = task_manager.spawn_handle(); - - let params = StartCollatorParams { - para_id: id, - block_status: client.clone(), - announce_block, - client: client.clone(), - task_manager: &mut task_manager, - relay_chain_interface, - spawner, - parachain_consensus, - import_queue: import_queue_service, - collator_key: collator_key.expect("Command line arguments do not allow this. qed"), - relay_chain_slot_duration, - recovery_handle: Box::new(overseer_handle), - sync_service, - }; - - start_collator(params).await?; - } else { - let params = StartFullNodeParams { - client: client.clone(), - announce_block, - task_manager: &mut task_manager, - para_id: id, - relay_chain_interface, - relay_chain_slot_duration, - import_queue: import_queue_service, - recovery_handle: Box::new(overseer_handle), - sync_service, - }; - - start_full_node(params)?; - } - - start_network.start_network(); - - Ok((task_manager, client)) -} - -/// Build the import queue for the the parachain runtime. -#[allow(clippy::type_complexity)] -pub fn parachain_build_import_queue( - client: Arc>, - block_import: ParachainBlockImport, - config: &Configuration, - telemetry: Option, - task_manager: &TaskManager, -) -> Result, sc_service::Error> { - let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; - - cumulus_client_consensus_aura::import_queue::< - sp_consensus_aura::sr25519::AuthorityPair, - _, - _, - _, - _, - _, - >(cumulus_client_consensus_aura::ImportQueueParams { - block_import, - client, - create_inherent_data_providers: move |_, _| async move { - let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *timestamp, - slot_duration, - ); - - Ok((slot, timestamp)) - }, - registry: config.prometheus_registry(), - spawner: &task_manager.spawn_essential_handle(), - telemetry, - }) - .map_err(Into::into) -} - -/// Start a normal parachain node. -pub async fn start_node( - parachain_config: Configuration, - polkadot_config: Configuration, - collator_options: CollatorOptions, - id: ParaId, -) -> sc_service::error::Result<(TaskManager, Arc>)> { - start_node_impl::( - parachain_config, - polkadot_config, - collator_options, - id, - |_deny_unsafe, client, pool| { - use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; - use sc_rpc::DenyUnsafe; - use substrate_frame_rpc_system::{System, SystemApiServer}; - - let mut io = jsonrpsee::RpcModule::new(()); - let map_err = |e| sc_service::Error::Other(format!("{e}")); - io.merge(System::new(client.clone(), pool, DenyUnsafe::No).into_rpc()) - .map_err(map_err)?; - io.merge(TransactionPayment::new(client).into_rpc()).map_err(map_err)?; - Ok(io) - }, - parachain_build_import_queue, - |client, - block_import, - prometheus_registry, - telemetry, - task_manager, - relay_chain_interface, - transaction_pool, - sync_oracle, - keystore, - force_authoring| { - let client2 = client.clone(); - let block_import2 = block_import; - let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; - - let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( - task_manager.spawn_handle(), - client, - transaction_pool, - prometheus_registry, - telemetry.clone(), - ); - - Ok(AuraConsensus::build::( - BuildAuraConsensusParams { - proposer_factory, - create_inherent_data_providers: move |_, (relay_parent, validation_data)| { - let relay_chain_interface = relay_chain_interface.clone(); - async move { - let parachain_inherent = - cumulus_primitives_parachain_inherent::ParachainInherentData::create_at( - relay_parent, - &relay_chain_interface, - &validation_data, - id, - ).await; - let time = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *time, - slot_duration, - ); - - let parachain_inherent = parachain_inherent.ok_or_else(|| { - Box::::from( - "Failed to create parachain inherent", - ) - })?; - Ok((slot, time, parachain_inherent)) - } - }, - block_import: block_import2, - para_client: client2, - backoff_authoring_blocks: Option::<()>::None, - sync_oracle, - keystore, - force_authoring, - slot_duration, - // We got around 1000ms for proposing - block_proposal_slot_portion: SlotProportion::new(1f32 / 12f32), - telemetry, - max_block_proposal_slot_portion: None, - }, - )) - }, - ) - .await -} diff --git a/bin/rialto-parachain/runtime/Cargo.toml b/bin/rialto-parachain/runtime/Cargo.toml deleted file mode 100644 index 5730dfb1f234716be57e476139ca96d3f81dc78d..0000000000000000000000000000000000000000 --- a/bin/rialto-parachain/runtime/Cargo.toml +++ /dev/null @@ -1,150 +0,0 @@ -[package] -name = "rialto-parachain-runtime" -version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2021" -repository = "https://github.com/paritytech/parity-bridges-common/" -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" - -[build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } - -[dependencies] -codec = { package = 'parity-scale-codec', version = '3.1.5', default-features = false, features = ['derive']} -hex-literal = "0.4" -scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } - -# Bridge depedencies - -bp-header-chain = { path = "../../../primitives/header-chain", default-features = false } -bp-messages = { path = "../../../primitives/messages", default-features = false } -bp-millau = { path = "../../../primitives/chain-millau", default-features = false } -bp-polkadot-core = { path = "../../../primitives/polkadot-core", default-features = false } -bp-relayers = { path = "../../../primitives/relayers", default-features = false } -bp-runtime = { path = "../../../primitives/runtime", default-features = false } -bp-rialto-parachain = { path = "../../../primitives/chain-rialto-parachain", default-features = false } -bp-xcm-bridge-hub = { path = "../../../primitives/xcm-bridge-hub", default-features = false } -bridge-runtime-common = { path = "../../runtime-common", default-features = false } -pallet-bridge-grandpa = { path = "../../../modules/grandpa", default-features = false } -pallet-bridge-messages = { path = "../../../modules/messages", default-features = false } -pallet-bridge-relayers = { path = "../../../modules/relayers", default-features = false } -pallet-xcm-bridge-hub = { path = "../../../modules/xcm-bridge-hub", default-features = false } - -# Substrate Dependencies -## Substrate Primitive Dependencies -sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } - -## Substrate FRAME Dependencies -frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false, optional = true } -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false, optional = true } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } - -## Substrate Pallet Dependencies -pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } - -# Cumulus Dependencies -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -parachain-info = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } - -# Polkadot Dependencies -polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } - -[dev-dependencies] -bridge-runtime-common = { path = "../../runtime-common", features = ["integrity-test"] } -static_assertions = "1.1" - -[features] -default = [ 'std' ] -runtime-benchmarks = [ - 'bridge-runtime-common/runtime-benchmarks', - 'frame-benchmarking', - 'frame-support/runtime-benchmarks', - 'frame-system-benchmarking/runtime-benchmarks', - 'frame-system/runtime-benchmarks', - 'pallet-balances/runtime-benchmarks', - 'pallet-bridge-grandpa/runtime-benchmarks', - 'pallet-bridge-messages/runtime-benchmarks', - 'pallet-bridge-relayers/runtime-benchmarks', - 'pallet-timestamp/runtime-benchmarks', - 'pallet-xcm/runtime-benchmarks', - 'sp-runtime/runtime-benchmarks', - 'xcm-builder/runtime-benchmarks', -] -std = [ - "bp-messages/std", - "bp-millau/std", - "bp-relayers/std", - "bp-rialto-parachain/std", - "bp-runtime/std", - "bp-xcm-bridge-hub/std", - "bridge-runtime-common/std", - "codec/std", - "cumulus-pallet-aura-ext/std", - "cumulus-pallet-parachain-system/std", - "cumulus-pallet-xcm/std", - "cumulus-pallet-xcmp-queue/std", - "cumulus-primitives-core/std", - "cumulus-primitives-timestamp/std", - "frame-executive/std", - "frame-support/std", - "frame-system-rpc-runtime-api/std", - "frame-system/std", - "pallet-aura/std", - "pallet-balances/std", - "pallet-bridge-grandpa/std", - "pallet-bridge-messages/std", - "pallet-bridge-relayers/std", - "pallet-sudo/std", - "pallet-timestamp/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-xcm-bridge-hub/std", - "pallet-xcm/std", - "parachain-info/std", - "polkadot-parachain-primitives/std", - "scale-info/std", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-aura/std", - "sp-core/std", - "sp-inherents/std", - "sp-io/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", - "xcm-builder/std", - "xcm-executor/std", - "xcm/std", -] diff --git a/bin/rialto-parachain/runtime/build.rs b/bin/rialto-parachain/runtime/build.rs deleted file mode 100644 index 692e270bbbae381bf8c485d5f2312396a8f75b1e..0000000000000000000000000000000000000000 --- a/bin/rialto-parachain/runtime/build.rs +++ /dev/null @@ -1,26 +0,0 @@ -// 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 . - -use substrate_wasm_builder::WasmBuilder; - -fn main() { - WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() - .disable_runtime_version_section_check() - .build() -} diff --git a/bin/rialto-parachain/runtime/src/lib.rs b/bin/rialto-parachain/runtime/src/lib.rs deleted file mode 100644 index 3161baf560b00d9f81914315ff364df96797d4f5..0000000000000000000000000000000000000000 --- a/bin/rialto-parachain/runtime/src/lib.rs +++ /dev/null @@ -1,1025 +0,0 @@ -// 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 . - -//! The Rialto parachain runtime. This can be compiled with `#[no_std]`, ready for Wasm. -//! -//! Originally a copy of runtime from . - -#![cfg_attr(not(feature = "std"), no_std)] -// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. -#![recursion_limit = "256"] - -// Make the WASM binary available. -#[cfg(feature = "std")] -include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); - -use bridge_runtime_common::generate_bridge_reject_obsolete_headers_and_messages; -use codec::{Decode, Encode}; -use cumulus_pallet_parachain_system::AnyRelayNumber; -use scale_info::TypeInfo; -use sp_api::impl_runtime_apis; -use sp_core::{crypto::KeyTypeId, ConstBool, OpaqueMetadata}; -use sp_runtime::{ - create_runtime_str, generic, impl_opaque_keys, - traits::{ - AccountIdLookup, Block as BlockT, ConstU128, ConstU64, DispatchInfoOf, SignedExtension, - }, - transaction_validity::{TransactionSource, TransactionValidity, TransactionValidityError}, - ApplyExtrinsicResult, -}; - -use sp_std::prelude::*; -#[cfg(feature = "std")] -use sp_version::NativeVersion; -use sp_version::RuntimeVersion; - -// A few exports that help ease life for downstream crates. -use bp_runtime::HeaderId; -pub use frame_support::{ - construct_runtime, - dispatch::DispatchClass, - match_types, parameter_types, - traits::{ConstU32, Everything, IsInVec, Nothing, Randomness}, - weights::{ - constants::{ - BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND, - }, - IdentityFee, Weight, - }, - StorageValue, -}; -pub use frame_system::{Call as SystemCall, EnsureRoot}; -pub use pallet_balances::Call as BalancesCall; -pub use pallet_sudo::Call as SudoCall; -pub use pallet_timestamp::Call as TimestampCall; -pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; -#[cfg(any(feature = "std", test))] -pub use sp_runtime::BuildStorage; -pub use sp_runtime::{MultiAddress, Perbill, Permill}; - -pub use bp_rialto_parachain::{ - AccountId, Balance, BlockLength, BlockNumber, BlockWeights, Hash, Hasher as Hashing, Header, - Nonce, Signature, MAXIMUM_BLOCK_WEIGHT, -}; - -pub use pallet_bridge_grandpa::Call as BridgeGrandpaCall; -pub use pallet_bridge_messages::Call as MessagesCall; -pub use pallet_xcm::Call as XcmCall; - -// Polkadot & XCM imports -use bridge_runtime_common::CustomNetworkId; -use pallet_xcm::XcmPassthrough; -use polkadot_parachain_primitives::primitives::Sibling; -use xcm::latest::prelude::*; -use xcm_builder::{ - Account32Hash, AccountId32Aliases, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, - IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, -}; -use xcm_executor::{Config, XcmExecutor}; - -pub mod millau_messages; - -// generate signed extension that rejects obsolete bridge transactions -generate_bridge_reject_obsolete_headers_and_messages! { - RuntimeCall, AccountId, - // Grandpa - BridgeMillauGrandpa, - // Messages - BridgeMillauMessages -} - -/// Dummy signed extension that does nothing. -/// -/// We're using it to have the same set of signed extensions on all parachains with bridge pallets -/// deployed (bridge hubs and rialto parachain). -#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)] -pub struct DummyBridgeRefundMillauMessages; - -impl SignedExtension for DummyBridgeRefundMillauMessages { - const IDENTIFIER: &'static str = "DummyBridgeRefundMillauMessages"; - type AccountId = AccountId; - type Call = RuntimeCall; - type AdditionalSigned = (); - type Pre = (); - - fn additional_signed(&self) -> Result { - Ok(()) - } - - fn pre_dispatch( - self, - _who: &Self::AccountId, - _call: &Self::Call, - _info: &DispatchInfoOf, - _len: usize, - ) -> Result { - Ok(()) - } -} - -/// The address format for describing accounts. -pub type Address = MultiAddress; -/// Block type as expected by this runtime. -pub type Block = generic::Block; -/// A Block signed with a Justification -pub type SignedBlock = generic::SignedBlock; -/// BlockId type as expected by this runtime. -pub type BlockId = generic::BlockId; -/// The SignedExtension to the basic transaction logic. -pub type SignedExtra = ( - frame_system::CheckNonZeroSender, - frame_system::CheckSpecVersion, - frame_system::CheckTxVersion, - frame_system::CheckGenesis, - frame_system::CheckEra, - frame_system::CheckNonce, - frame_system::CheckWeight, - pallet_transaction_payment::ChargeTransactionPayment, - BridgeRejectObsoleteHeadersAndMessages, - DummyBridgeRefundMillauMessages, -); -/// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = - generic::UncheckedExtrinsic; -/// Extrinsic type that has already been checked. -pub type CheckedExtrinsic = generic::CheckedExtrinsic; -/// Executive: handles dispatch to the various modules. -pub type Executive = frame_executive::Executive< - Runtime, - Block, - frame_system::ChainContext, - Runtime, - AllPalletsWithSystem, ->; - -impl_opaque_keys! { - pub struct SessionKeys { - pub aura: Aura, - } -} - -/// This runtime version. -#[sp_version::runtime_version] -pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("template-parachain"), - impl_name: create_runtime_str!("template-parachain"), - authoring_version: 1, - spec_version: 1, - impl_version: 0, - apis: RUNTIME_API_VERSIONS, - transaction_version: 1, - state_version: 0, -}; - -/// This determines the average expected block time that we are targeting. -/// Blocks will be produced at a minimum duration defined by `SLOT_DURATION`. -/// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked -/// up by `pallet_aura` to implement `fn slot_duration()`. -/// -/// Change this to adjust the block time. -pub const MILLISECS_PER_BLOCK: u64 = 12000; - -pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; - -pub const EPOCH_DURATION_IN_BLOCKS: u32 = 10 * MINUTES; - -// Time is measured by number of blocks. -pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); -pub const HOURS: BlockNumber = MINUTES * 60; -pub const DAYS: BlockNumber = HOURS * 24; - -// Unit = the base number of indivisible units for balances -pub const UNIT: Balance = 1_000_000_000_000; -pub const MILLIUNIT: Balance = 1_000_000_000; -pub const MICROUNIT: Balance = 1_000_000; - -// 1 in 4 blocks (on average, not counting collisions) will be primary babe blocks. -pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4); - -/// The version information used to identify this runtime when compiled natively. -#[cfg(feature = "std")] -pub fn native_version() -> NativeVersion { - NativeVersion { runtime_version: VERSION, can_author_with: Default::default() } -} - -parameter_types! { - pub const BlockHashCount: BlockNumber = 250; - pub const Version: RuntimeVersion = VERSION; - pub const SS58Prefix: u8 = 48; -} - -// Configure FRAME pallets to include in runtime. - -impl frame_system::Config for Runtime { - /// The identifier used to distinguish between accounts. - type AccountId = AccountId; - /// The aggregated dispatch type that is available for extrinsics. - type RuntimeCall = RuntimeCall; - /// The lookup mechanism to get account ID from whatever is passed in dispatchers. - type Lookup = AccountIdLookup; - /// The index type for storing how many extrinsics an account has signed. - type Nonce = Nonce; - /// The type for hashing blocks and tries. - type Hash = Hash; - /// The hashing algorithm used. - type Hashing = Hashing; - /// The header type. - type Block = Block; - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; - /// The ubiquitous origin type. - type RuntimeOrigin = RuntimeOrigin; - /// Maximum number of block number to block hash mappings to keep (oldest pruned first). - type BlockHashCount = BlockHashCount; - /// Runtime version. - type Version = Version; - /// Converts a module to an index of this module in the runtime. - type PalletInfo = PalletInfo; - type AccountData = pallet_balances::AccountData; - /// What to do if a new account is created. - type OnNewAccount = (); - /// What to do if an account is fully reaped from the system. - type OnKilledAccount = (); - /// The weight of database operations that the runtime can invoke. - type DbWeight = (); - /// The basic call filter to use in dispatchable. - type BaseCallFilter = Everything; - /// Weight information for the extrinsics of this pallet. - type SystemWeightInfo = (); - /// Block & extrinsics weights: base values and limits. - type BlockWeights = BlockWeights; - /// The maximum length of a block (in bytes). - type BlockLength = BlockLength; - /// This is used as an identifier of the chain. 42 is the generic substrate prefix. - type SS58Prefix = SS58Prefix; - /// The action to take on a Runtime Upgrade - type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; - type MaxConsumers = frame_support::traits::ConstU32<16>; -} - -parameter_types! { - pub const MinimumPeriod: u64 = SLOT_DURATION / 2; -} - -impl pallet_timestamp::Config for Runtime { - /// A timestamp: milliseconds since the Unix epoch. - type Moment = u64; - type OnTimestampSet = (); - type MinimumPeriod = MinimumPeriod; - type WeightInfo = (); -} - -parameter_types! { - pub const ExistentialDeposit: u128 = MILLIUNIT; - pub const TransferFee: u128 = MILLIUNIT; - pub const CreationFee: u128 = MILLIUNIT; - pub const TransactionByteFee: u128 = MICROUNIT; - pub const OperationalFeeMultiplier: u8 = 5; -} - -impl pallet_balances::Config for Runtime { - /// The type for recording an account's balance. - type Balance = Balance; - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - type WeightInfo = pallet_balances::weights::SubstrateWeight; - type MaxLocks = ConstU32<50>; - type MaxReserves = ConstU32<50>; - type ReserveIdentifier = [u8; 8]; - type RuntimeHoldReason = RuntimeHoldReason; - type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; - type MaxFreezes = ConstU32<0>; -} - -impl pallet_transaction_payment::Config for Runtime { - type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; - type OperationalFeeMultiplier = OperationalFeeMultiplier; - type WeightToFee = IdentityFee; - type LengthToFee = IdentityFee; - type FeeMultiplierUpdate = (); - type RuntimeEvent = RuntimeEvent; -} - -impl pallet_sudo::Config for Runtime { - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type WeightInfo = pallet_sudo::weights::SubstrateWeight; -} - -parameter_types! { - pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); -} - -impl cumulus_pallet_parachain_system::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type OnSystemEvent = (); - type SelfParaId = parachain_info::Pallet; - type OutboundXcmpMessageSource = XcmpQueue; - type DmpMessageHandler = DmpQueue; - type ReservedDmpWeight = ReservedDmpWeight; - type XcmpMessageHandler = XcmpQueue; - type ReservedXcmpWeight = ReservedXcmpWeight; - type CheckAssociatedRelayNumber = AnyRelayNumber; -} - -impl parachain_info::Config for Runtime {} - -impl cumulus_pallet_aura_ext::Config for Runtime {} - -parameter_types! { - pub const RelayLocation: MultiLocation = MultiLocation::parent(); - pub const RelayNetwork: NetworkId = CustomNetworkId::Rialto.as_network_id(); - pub RelayOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub UniversalLocation: InteriorMultiLocation = ThisNetwork::get().into(); - /// The Millau network ID. - pub const MillauNetwork: NetworkId = CustomNetworkId::Millau.as_network_id(); - /// The RialtoParachain network ID. - pub const ThisNetwork: NetworkId = CustomNetworkId::RialtoParachain.as_network_id(); -} - -/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used -/// when determining ownership of accounts for asset transacting and when attempting to use XCM -/// `Transact` in order to determine the dispatch Origin. -pub type LocationToAccountId = ( - // The parent (Relay-chain) origin converts to the default `AccountId`. - ParentIsPreset, - // Sibling parachain origins convert to AccountId via the `ParaId::into`. - SiblingParachainConvertsVia, - // Straight up local `AccountId32` origins just alias directly to `AccountId`. - AccountId32Aliases, - // Dummy stuff for our tests. - Account32Hash, -); - -/// Means for transacting assets on this chain. -pub type LocalAssetTransactor = CurrencyAdapter< - // Use this currency: - Balances, - // Use this currency when it is a fungible asset matching the given location or name: - IsConcrete, - // Do a simple punn to convert an AccountId32 MultiLocation into a native chain account ID: - LocationToAccountId, - // Our chain's account ID type (we can't get away without mentioning it explicitly): - AccountId, - // We don't track any teleports. - (), ->; - -/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, -/// ready for dispatching a transaction with XCM `Transact`. There is an `OriginKind` which can -/// biases the kind of local `Origin` it will become. -pub type XcmOriginToTransactDispatchOrigin = ( - // Sovereign account converter; this attempts to derive an `AccountId` from the origin location - // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for - // foreign chains who want to have a local sovereign account on this chain which they control. - SovereignSignedViaLocation, - // Native converter for Relay-chain (Parent) location; will convert to a `Relay` origin when - // recognised. - RelayChainAsNative, - // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when - // recognised. - SiblingParachainAsNative, - // Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a - // transaction from the Root origin. - ParentAsSuperuser, - // Native signed account converter; this just converts an `AccountId32` origin into a normal - // `Origin::Signed` origin of the same 32-byte value. - SignedAccountId32AsNative, - // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. - XcmPassthrough, -); - -// TODO: until https://github.com/paritytech/parity-bridges-common/issues/1417 is fixed (in either way), -// the following constant must match the similar constant in the Millau runtime. - -parameter_types! { - /// The amount of weight an XCM operation takes. We don't care much about those values as we're on testnet. - pub const UnitWeightCost: Weight = Weight::from_parts(1_000_000, 1024); - // One UNIT buys 1 second of weight. - pub const WeightPrice: (MultiLocation, u128) = (MultiLocation::parent(), UNIT); - pub const MaxInstructions: u32 = 100; - pub const MaxAuthorities: u32 = 100_000; - pub MaxAssetsIntoHolding: u32 = 64; -} - -match_types! { - pub type ParentOrParentsUnitPlurality: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Unit, .. }) } - }; -} - -pub type Barrier = TakeWeightCredit; - -/// Dispatches received XCM messages from other chain. -pub type OnRialtoParachainBlobDispatcher = - xcm_builder::BridgeBlobDispatcher; - -/// XCM weigher type. -pub type XcmWeigher = FixedWeightBounds; - -pub struct XcmConfig; -impl Config for XcmConfig { - type RuntimeCall = RuntimeCall; - type XcmSender = (); - type AssetTransactor = LocalAssetTransactor; - type OriginConverter = XcmOriginToTransactDispatchOrigin; - type IsReserve = NativeAsset; - type IsTeleporter = NativeAsset; // <- should be enough to allow teleportation of UNIT - type UniversalLocation = UniversalLocation; - type Barrier = Barrier; - type Weigher = XcmWeigher; - type Trader = UsingComponents, RelayLocation, AccountId, Balances, ()>; - type ResponseHandler = PolkadotXcm; - type AssetTrap = PolkadotXcm; - type AssetClaims = PolkadotXcm; - type SubscriptionService = PolkadotXcm; - type PalletInstancesInfo = (); - type MaxAssetsIntoHolding = MaxAssetsIntoHolding; - type AssetLocker = (); - type AssetExchanger = (); - type FeeManager = (); - type MessageExporter = XcmMillauBridgeHub; - type UniversalAliases = Nothing; - type CallDispatcher = RuntimeCall; - type SafeCallFilter = Everything; - type Aliasers = Nothing; -} - -/// No local origins on this chain are allowed to dispatch XCM sends/executions. -pub type LocalOriginToLocation = SignedToAccountId32; - -/// The XCM router. We are not sending messages to sibling/parent/child chains here. -pub type XcmRouter = (); - -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = None; -} - -impl pallet_xcm::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type SendXcmOrigin = EnsureXcmOrigin; - type XcmRouter = XcmRouter; - type ExecuteXcmOrigin = EnsureXcmOrigin; - type XcmExecuteFilter = Everything; - type XcmExecutor = XcmExecutor; - type XcmTeleportFilter = Everything; - type XcmReserveTransferFilter = Everything; - type Weigher = XcmWeigher; - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; - type Currency = Balances; - type CurrencyMatcher = (); - type TrustedLockers = (); - type SovereignAccountOf = (); - type MaxLockers = frame_support::traits::ConstU32<8>; - type UniversalLocation = UniversalLocation; - type WeightInfo = pallet_xcm::TestWeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; - type AdminOrigin = frame_system::EnsureRoot; - type MaxRemoteLockConsumers = ConstU32<0>; - type RemoteLockConsumerIdentifier = (); -} - -impl cumulus_pallet_xcm::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; -} - -impl cumulus_pallet_xcmp_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ChannelInfo = ParachainSystem; - type VersionWrapper = (); - type ExecuteOverweightOrigin = EnsureRoot; - type ControllerOrigin = EnsureRoot; - type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; - type WeightInfo = (); - type PriceForSiblingDelivery = (); -} - -impl cumulus_pallet_dmp_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ExecuteOverweightOrigin = frame_system::EnsureRoot; -} - -impl pallet_aura::Config for Runtime { - type AuthorityId = AuraId; - type DisabledValidators = (); - type MaxAuthorities = MaxAuthorities; - type AllowMultipleBlocksPerSlot = ConstBool; -} - -impl pallet_bridge_relayers::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Reward = Balance; - type PaymentProcedure = - bp_relayers::PayRewardFromAccount, AccountId>; - type StakeAndSlash = (); - type MaxLanesPerRelayer = ConstU32<16>; - type MaxActiveRelayersPerLane = ConstU32<16>; - type MaxNextRelayersPerLane = ConstU32<1_024>; - type InitialElectionLength = ConstU32<16>; - type SlotLength = ConstU32<16>; - type EpochLength = ConstU32<1_024>; - type PriorityBoostPerMessage = ConstU64<0>; - type PriorityBoostForActiveLaneRelayer = ConstU64<0>; - type WeightInfo = (); -} - -pub type MillauGrandpaInstance = (); -impl pallet_bridge_grandpa::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type BridgedChain = bp_millau::Millau; - type MaxFreeMandatoryHeadersPerBlock = ConstU32<4>; - type HeadersToKeep = ConstU32<{ bp_millau::DAYS as u32 }>; - type WeightInfo = pallet_bridge_grandpa::weights::BridgeWeight; -} - -parameter_types! { - pub const MaxMessagesToPruneAtOnce: bp_messages::MessageNonce = 8; - pub const RootAccountForPayments: Option = None; -} - -/// Instance of the messages pallet used to relay messages to/from Millau chain. -pub type WithMillauMessagesInstance = (); - -impl pallet_bridge_messages::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = pallet_bridge_messages::weights::BridgeWeight; - - type ThisChain = bp_rialto_parachain::RialtoParachain; - type BridgedChain = bp_millau::Millau; - type BridgedHeaderChain = BridgeMillauGrandpa; - - type OutboundPayload = bp_xcm_bridge_hub::XcmAsPlainPayload; - type InboundPayload = bp_xcm_bridge_hub::XcmAsPlainPayload; - - type DeliveryPayments = (); - type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter< - Runtime, - WithMillauMessagesInstance, - frame_support::traits::ConstU128<0>, - frame_support::traits::ConstU128<100_000>, - >; - type OnMessagesDelivered = XcmMillauBridgeHub; - - type MessageDispatch = XcmMillauBridgeHub; -} - -/// Instance of the XCM bridge hub pallet used to relay messages to/from Millau chain. -pub type WithMillauXcmBridgeHubInstance = (); - -impl pallet_xcm_bridge_hub::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - - type UniversalLocation = UniversalLocation; - type BridgedNetworkId = MillauNetwork; - type BridgeMessagesPalletInstance = WithMillauMessagesInstance; - - type OpenBridgeOrigin = frame_support::traits::NeverEnsureOrigin; - type BridgeOriginAccountIdConverter = LocationToAccountId; - - type BridgeReserve = ConstU128<1_000_000_000>; - type NativeCurrency = Balances; - - type LocalXcmChannelManager = (); - type BlobDispatcher = OnRialtoParachainBlobDispatcher; - type MessageExportPrice = (); -} - -// Create the runtime by composing the FRAME pallets that were previously configured. -construct_runtime!( - pub enum Runtime { - System: frame_system::{Pallet, Call, Storage, Config, Event}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - Sudo: pallet_sudo::{Pallet, Call, Storage, Config, Event}, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event}, - - ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Storage, Inherent, Event} = 20, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 21, - - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 30, - - Aura: pallet_aura::{Pallet, Config}, - AuraExt: cumulus_pallet_aura_ext::{Pallet, Config}, - - // XCM helpers. - XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 50, - PolkadotXcm: pallet_xcm::{Pallet, Call, Event, Origin} = 51, - CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event, Origin} = 52, - DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 53, - - // Millau bridge modules. - BridgeRelayers: pallet_bridge_relayers::{Pallet, Call, Storage, Event}, - BridgeMillauGrandpa: pallet_bridge_grandpa::{Pallet, Call, Storage, Event}, - BridgeMillauMessages: pallet_bridge_messages::{Pallet, Call, Storage, Event, Config}, - XcmMillauBridgeHub: pallet_xcm_bridge_hub::{Pallet, Call, Storage, Event, Config}, - } -); - -impl_runtime_apis! { - impl sp_api::Core for Runtime { - fn version() -> RuntimeVersion { - VERSION - } - - fn execute_block(block: Block) { - Executive::execute_block(block) - } - - fn initialize_block(header: &::Header) { - Executive::initialize_block(header) - } - } - - impl sp_api::Metadata for Runtime { - fn metadata() -> OpaqueMetadata { - OpaqueMetadata::new(Runtime::metadata().into()) - } - - fn metadata_at_version(version: u32) -> Option { - Runtime::metadata_at_version(version) - } - - fn metadata_versions() -> sp_std::vec::Vec { - Runtime::metadata_versions() - } - } - - impl sp_block_builder::BlockBuilder for Runtime { - fn apply_extrinsic( - extrinsic: ::Extrinsic, - ) -> ApplyExtrinsicResult { - Executive::apply_extrinsic(extrinsic) - } - - fn finalize_block() -> ::Header { - Executive::finalize_block() - } - - fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<::Extrinsic> { - data.create_extrinsics() - } - - fn check_inherents( - block: Block, - data: sp_inherents::InherentData, - ) -> sp_inherents::CheckInherentsResult { - data.check_extrinsics(&block) - } - } - - impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { - fn validate_transaction( - source: TransactionSource, - tx: ::Extrinsic, - block_hash: ::Hash, - ) -> TransactionValidity { - Executive::validate_transaction(source, tx, block_hash) - } - } - - impl sp_offchain::OffchainWorkerApi for Runtime { - fn offchain_worker(header: &::Header) { - Executive::offchain_worker(header) - } - } - - impl sp_session::SessionKeys for Runtime { - fn decode_session_keys( - encoded: Vec, - ) -> Option, KeyTypeId)>> { - SessionKeys::decode_into_raw_public_keys(&encoded) - } - - fn generate_session_keys(seed: Option>) -> Vec { - SessionKeys::generate(seed) - } - } - - impl sp_consensus_aura::AuraApi for Runtime { - fn slot_duration() -> sp_consensus_aura::SlotDuration { - sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration()) - } - - fn authorities() -> Vec { - Aura::authorities().to_vec() - } - } - - impl cumulus_primitives_core::CollectCollationInfo for Runtime { - fn collect_collation_info(header: &::Header) -> cumulus_primitives_core::CollationInfo { - ParachainSystem::collect_collation_info(header) - } - } - - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { - fn account_nonce(account: AccountId) -> Nonce { - System::account_nonce(account) - } - } - - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi for Runtime { - fn query_info( - uxt: ::Extrinsic, - len: u32, - ) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo { - TransactionPayment::query_info(uxt, len) - } - fn query_fee_details( - uxt: ::Extrinsic, - len: u32, - ) -> pallet_transaction_payment::FeeDetails { - TransactionPayment::query_fee_details(uxt, len) - } - fn query_weight_to_fee(weight: Weight) -> Balance { - TransactionPayment::weight_to_fee(weight) - } - fn query_length_to_fee(length: u32) -> Balance { - TransactionPayment::length_to_fee(length) - } - } - - impl bp_millau::MillauFinalityApi for Runtime { - fn best_finalized() -> Option> { - BridgeMillauGrandpa::best_finalized() - } - - fn synced_headers_grandpa_info( - ) -> Vec> { - BridgeMillauGrandpa::synced_headers_grandpa_info() - } - } - - impl bp_millau::ToMillauOutboundLaneApi for Runtime { - fn message_details( - lane: bp_messages::LaneId, - begin: bp_messages::MessageNonce, - end: bp_messages::MessageNonce, - ) -> Vec { - bridge_runtime_common::messages_api::outbound_message_details::< - Runtime, - WithMillauMessagesInstance, - >(lane, begin, end) - } - } - - impl bp_millau::FromMillauInboundLaneApi for Runtime { - fn message_details( - lane: bp_messages::LaneId, - messages: Vec<(bp_messages::MessagePayload, bp_messages::OutboundMessageDetails)>, - ) -> Vec { - bridge_runtime_common::messages_api::inbound_message_details::< - Runtime, - WithMillauMessagesInstance, - >(lane, messages) - } - } - - #[cfg(feature = "runtime-benchmarks")] - impl frame_benchmarking::Benchmark for Runtime { - fn benchmark_metadata(_extra: bool) -> ( - Vec, - Vec, - ) { - todo!("TODO: fix or remove") - } - - fn dispatch_benchmark( - config: frame_benchmarking::BenchmarkConfig - ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark}; - use frame_support::traits::TrackedStorageKey; - - use frame_system_benchmarking::Pallet as SystemBench; - impl frame_system_benchmarking::Config for Runtime {} - - let whitelist: Vec = vec![ - // Block Number - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), - // Total Issuance - hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(), - // Execution Phase - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(), - // Event Count - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(), - // System Events - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(), - ]; - - let mut batches = Vec::::new(); - let params = (&config, &whitelist); - - add_benchmark!(params, batches, frame_system, SystemBench::); - add_benchmark!(params, batches, pallet_balances, Balances); - add_benchmark!(params, batches, pallet_timestamp, Timestamp); - - Ok(batches) - } - } -} - -struct CheckInherents; - -impl cumulus_pallet_parachain_system::CheckInherents for CheckInherents { - fn check_inherents( - block: &Block, - relay_state_proof: &cumulus_pallet_parachain_system::RelayChainStateProof, - ) -> sp_inherents::CheckInherentsResult { - let relay_chain_slot = relay_state_proof - .read_slot() - .expect("Could not read the relay chain slot from the proof"); - - let inherent_data = - cumulus_primitives_timestamp::InherentDataProvider::from_relay_chain_slot_and_duration( - relay_chain_slot, - sp_std::time::Duration::from_secs(6), - ) - .create_inherent_data() - .expect("Could not create the timestamp inherent data"); - - inherent_data.check_extrinsics(block) - } -} - -cumulus_pallet_parachain_system::register_validate_block!( - Runtime = Runtime, - BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::, - CheckInherents = CheckInherents, -); - -#[cfg(test)] -mod tests { - use super::*; - use bp_messages::{ - target_chain::{DispatchMessage, DispatchMessageData, MessageDispatch}, - MessageKey, OutboundLaneData, - }; - use bp_runtime::Chain; - use bp_xcm_bridge_hub::{Bridge, BridgeState}; - use codec::Encode; - use pallet_bridge_messages::OutboundLanes; - use pallet_xcm_bridge_hub::Bridges; - use sp_runtime::{generic::Era, traits::Zero}; - use xcm_executor::XcmExecutor; - - fn new_test_ext() -> sp_io::TestExternalities { - sp_io::TestExternalities::new( - frame_system::GenesisConfig::::default().build_storage().unwrap(), - ) - } - - fn prepare_outbound_xcm_message(destination: NetworkId) -> Xcm { - vec![ExportMessage { - network: destination, - destination: destination.into(), - xcm: vec![Instruction::Trap(42)].into(), - }] - .into() - } - - #[test] - fn runtime_version() { - assert_eq!( - VERSION.state_version, - bp_rialto_parachain::RialtoParachain::STATE_VERSION as u8 - ); - } - - #[test] - fn xcm_messages_to_millau_are_sent_using_bridge_exporter() { - new_test_ext().execute_with(|| { - // ensure that the there are no messages queued - let bridge_id = crate::millau_messages::Bridge::get(); - let lane_id = bridge_id.lane_id(); - Bridges::::insert( - bridge_id, - Bridge { - bridge_origin_relative_location: Box::new(MultiLocation::new(0, Here).into()), - state: BridgeState::Opened, - bridge_owner_account: [0u8; 32].into(), - reserve: 0, - }, - ); - OutboundLanes::::insert( - lane_id, - OutboundLaneData::opened(), - ); - assert_eq!( - OutboundLanes::::get(lane_id) - .unwrap() - .latest_generated_nonce, - 0, - ); - - // export message instruction "sends" message to Rialto - XcmExecutor::::execute_xcm_in_credit( - Here, - prepare_outbound_xcm_message(MillauNetwork::get()), - Default::default(), - Weight::MAX, - Weight::MAX, - ) - .ensure_complete() - .expect("runtime configuration must be correct"); - - // ensure that the message has been queued - assert_eq!( - OutboundLanes::::get(lane_id) - .unwrap() - .latest_generated_nonce, - 1, - ); - }) - } - - fn prepare_inbound_bridge_message() -> DispatchMessage> { - let xcm = xcm::VersionedXcm::::V3(vec![Instruction::Trap(42)].into()); - let location = - xcm::VersionedInteriorMultiLocation::V3(X1(GlobalConsensus(ThisNetwork::get()))); - // this is the `BridgeMessage` from polkadot xcm builder, but it has no constructor - // or public fields, so just tuple - let xcm_lane = crate::millau_messages::Bridge::get().lane_id(); - let bridge_message = (location, xcm).encode(); - DispatchMessage { - key: MessageKey { lane_id: xcm_lane, nonce: 1 }, - data: DispatchMessageData { payload: Ok(bridge_message) }, - } - } - - #[test] - fn xcm_messages_from_millau_are_dispatched() { - new_test_ext().execute_with(|| { - let incoming_message = prepare_inbound_bridge_message(); - - // we care only about handing message to the XCM dispatcher, so we don't care about its - // actual dispatch - let dispatch_result = XcmMillauBridgeHub::dispatch(incoming_message); - assert!(matches!( - dispatch_result.dispatch_level_result, - pallet_xcm_bridge_hub::XcmBlobMessageDispatchResult::NotDispatched(_), - )); - }); - } - - #[test] - fn ensure_signed_extension_definition_is_correct() { - use bp_polkadot_core::SuffixedCommonSignedExtensionExt; - - sp_io::TestExternalities::default().execute_with(|| { - frame_system::BlockHash::::insert(BlockNumber::zero(), Hash::default()); - let payload: SignedExtra = ( - frame_system::CheckNonZeroSender::new(), - frame_system::CheckSpecVersion::new(), - frame_system::CheckTxVersion::new(), - frame_system::CheckGenesis::new(), - frame_system::CheckEra::from(Era::Immortal), - frame_system::CheckNonce::from(10), - frame_system::CheckWeight::new(), - pallet_transaction_payment::ChargeTransactionPayment::from(10), - BridgeRejectObsoleteHeadersAndMessages, - DummyBridgeRefundMillauMessages, - ); - let indirect_payload = bp_rialto_parachain::SignedExtension::from_params( - VERSION.spec_version, - VERSION.transaction_version, - bp_runtime::TransactionEra::Immortal, - System::block_hash(BlockNumber::zero()), - 10, - 10, - (((), ()), ((), ())), - ); - assert_eq!(payload.encode(), indirect_payload.encode()); - assert_eq!( - payload.additional_signed().unwrap().encode(), - indirect_payload.additional_signed().unwrap().encode() - ) - }); - } -} diff --git a/bin/rialto-parachain/runtime/src/millau_messages.rs b/bin/rialto-parachain/runtime/src/millau_messages.rs deleted file mode 100644 index cd9bdab5cc2277c51753e6178d1c1ff008e7b912..0000000000000000000000000000000000000000 --- a/bin/rialto-parachain/runtime/src/millau_messages.rs +++ /dev/null @@ -1,89 +0,0 @@ -// 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 . - -//! Everything required to serve Millau <-> RialtoParachain messages. - -use bp_xcm_bridge_hub::BridgeId; -use frame_support::parameter_types; -use xcm::prelude::*; - -parameter_types! { - /// Bridge identifier that is used to bridge with Millau. - pub Bridge: BridgeId = BridgeId::new( - &InteriorMultiLocation::from(crate::ThisNetwork::get()).into(), - &InteriorMultiLocation::from(crate::MillauNetwork::get()).into(), - ); -} - -#[cfg(test)] -mod tests { - use super::*; - use crate::{MillauGrandpaInstance, Runtime, WithMillauMessagesInstance}; - use bridge_runtime_common::{ - assert_complete_bridge_types, - integrity::{ - assert_complete_with_relay_chain_bridge_constants, check_message_lane_weights, - AssertChainConstants, AssertCompleteBridgeConstants, - }, - }; - - #[test] - fn ensure_millau_message_lane_weights_are_correct() { - check_message_lane_weights::< - bp_rialto_parachain::RialtoParachain, - Runtime, - WithMillauMessagesInstance, - >( - bp_millau::EXTRA_STORAGE_PROOF_SIZE, - bp_rialto_parachain::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX, - bp_rialto_parachain::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX, - false, - ); - } - - #[test] - fn ensure_bridge_integrity() { - assert_complete_bridge_types!( - runtime: Runtime, - with_bridged_chain_grandpa_instance: MillauGrandpaInstance, - with_bridged_chain_messages_instance: WithMillauMessagesInstance, - this_chain: bp_rialto_parachain::RialtoParachain, - bridged_chain: bp_millau::Millau, - ); - - assert_complete_with_relay_chain_bridge_constants::< - Runtime, - MillauGrandpaInstance, - WithMillauMessagesInstance, - >(AssertCompleteBridgeConstants { - this_chain_constants: AssertChainConstants { - block_length: bp_rialto_parachain::BlockLength::get(), - block_weights: bp_rialto_parachain::BlockWeights::get(), - }, - }); - } - - #[test] - fn rialto_parachain_millau_bridge_identifier_did_not_changed() { - // there's nothing criminal if it is changed, but then thou need to fix it across - // all deployments scripts, alerts and so on - assert_eq!( - *Bridge::get().lane_id().as_ref(), - hex_literal::hex!("ee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c") - .into(), - ); - } -} diff --git a/bin/rialto/node/Cargo.toml b/bin/rialto/node/Cargo.toml deleted file mode 100644 index 451c190804bf2dcf229c9a80a6b86291edd90958..0000000000000000000000000000000000000000 --- a/bin/rialto/node/Cargo.toml +++ /dev/null @@ -1,64 +0,0 @@ -[[bin]] -name = "rialto-bridge-node-execute-worker" -path = "src/workers/execute-worker.rs" - -[[bin]] -name = "rialto-bridge-node-prepare-worker" -path = "src/workers/prepare-worker.rs" - -[package] -name = "rialto-bridge-node" -description = "Substrate node compatible with Rialto runtime" -version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2021" -build = "build.rs" -repository = "https://github.com/paritytech/parity-bridges-common/" -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" - -[dependencies] -clap = { version = "4.4.7", features = ["derive"] } -serde_json = "1.0.107" - -# Bridge dependencies - -bp-messages = { path = "../../../primitives/messages" } -bridge-runtime-common = { path = "../../runtime-common" } -rialto-runtime = { path = "../runtime" } - -# Substrate Dependencies - -sp-consensus-beefy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -node-inspect = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master"} -sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } - -# Polkadot Dependencies -polkadot-node-core-pvf = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -polkadot-node-core-pvf-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -polkadot-node-core-pvf-execute-worker = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -polkadot-node-core-pvf-prepare-worker = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -polkadot-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false, features = [ "full-node" ] } -xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } - -[build-dependencies] -substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } - -[features] -default = [] -runtime-benchmarks = [ - "polkadot-service/runtime-benchmarks", - "rialto-runtime/runtime-benchmarks", -] diff --git a/bin/rialto/node/build.rs b/bin/rialto/node/build.rs deleted file mode 100644 index d9b50049e2628dd7ab31b5c02065132956f207b1..0000000000000000000000000000000000000000 --- a/bin/rialto/node/build.rs +++ /dev/null @@ -1,23 +0,0 @@ -// 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 . - -use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed}; - -fn main() { - generate_cargo_keys(); - - rerun_if_git_head_changed(); -} diff --git a/bin/rialto/node/src/chain_spec.rs b/bin/rialto/node/src/chain_spec.rs deleted file mode 100644 index 303138f44bc36a374a25eb3e220be345f7f52029..0000000000000000000000000000000000000000 --- a/bin/rialto/node/src/chain_spec.rs +++ /dev/null @@ -1,292 +0,0 @@ -// 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 . - -use polkadot_primitives::v6::{AssignmentId, ValidatorId}; -use rialto_runtime::{ - AccountId, BabeConfig, BalancesConfig, BeefyConfig, BridgeMillauMessagesConfig, - ConfigurationConfig, GrandpaConfig, RuntimeGenesisConfig, SessionConfig, SessionKeys, - Signature, SudoConfig, SystemConfig, XcmMillauBridgeHubConfig, WASM_BINARY, -}; -use serde_json::json; -use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; -use sp_consensus_babe::AuthorityId as BabeId; -use sp_consensus_beefy::ecdsa_crypto::AuthorityId as BeefyId; -use sp_consensus_grandpa::AuthorityId as GrandpaId; -use sp_core::{sr25519, Pair, Public}; -use sp_runtime::traits::{IdentifyAccount, Verify}; - -/// "Names" of the authorities accounts at local testnet. -const LOCAL_AUTHORITIES_ACCOUNTS: [&str; 5] = ["Alice", "Bob", "Charlie", "Dave", "Eve"]; -/// "Names" of the authorities accounts at development testnet. -const DEV_AUTHORITIES_ACCOUNTS: [&str; 1] = [LOCAL_AUTHORITIES_ACCOUNTS[0]]; -/// "Names" of all possible authorities accounts. -const ALL_AUTHORITIES_ACCOUNTS: [&str; 5] = LOCAL_AUTHORITIES_ACCOUNTS; -/// "Name" of the `sudo` account. -const SUDO_ACCOUNT: &str = "Sudo"; -/// "Name" of the account, which owns the with-Millau messages pallet. -const MILLAU_MESSAGES_PALLET_OWNER: &str = "Millau.MessagesOwner"; - -/// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type. -pub type ChainSpec = - sc_service::GenericChainSpec; - -/// The chain specification option. This is expected to come in from the CLI and -/// is little more than one of a number of alternatives which can easily be converted -/// from a string (`--chain=...`) into a `ChainSpec`. -#[derive(Clone, Debug)] -pub enum Alternative { - /// Whatever the current runtime is, with just Alice as an auth. - Development, - /// Whatever the current runtime is, with simple Alice/Bob/Charlie/Dave/Eve auths. - LocalTestnet, -} - -/// Helper function to generate a crypto pair from seed -pub fn get_from_seed(seed: &str) -> ::Public { - TPublic::Pair::from_string(&format!("//{seed}"), None) - .expect("static values are valid; qed") - .public() -} - -type AccountPublic = ::Signer; - -/// Helper function to generate an account ID from seed -pub fn get_account_id_from_seed(seed: &str) -> AccountId -where - AccountPublic: From<::Public>, -{ - AccountPublic::from(get_from_seed::(seed)).into_account() -} - -/// Helper function to generate authority keys. -pub fn get_authority_keys_from_seed( - s: &str, -) -> (AccountId, BabeId, BeefyId, GrandpaId, ValidatorId, AssignmentId, AuthorityDiscoveryId) { - ( - get_account_id_from_seed::(s), - get_from_seed::(s), - get_from_seed::(s), - get_from_seed::(s), - get_from_seed::(s), - get_from_seed::(s), - get_from_seed::(s), - ) -} - -impl Alternative { - /// Get an actual chain config from one of the alternatives. - pub(crate) fn load(self) -> ChainSpec { - let properties = Some( - json!({ - "tokenDecimals": 9, - "tokenSymbol": "RLT" - }) - .as_object() - .expect("Map given; qed") - .clone(), - ); - match self { - Alternative::Development => ChainSpec::from_genesis( - "Rialto Development", - "rialto_dev", - sc_service::ChainType::Development, - || { - testnet_genesis( - DEV_AUTHORITIES_ACCOUNTS - .into_iter() - .map(get_authority_keys_from_seed) - .collect(), - get_account_id_from_seed::(SUDO_ACCOUNT), - endowed_accounts(), - true, - ) - }, - vec![], - None, - None, - None, - properties, - Default::default(), - ), - Alternative::LocalTestnet => ChainSpec::from_genesis( - "Rialto Local", - "rialto_local", - sc_service::ChainType::Local, - || { - testnet_genesis( - LOCAL_AUTHORITIES_ACCOUNTS - .into_iter() - .map(get_authority_keys_from_seed) - .collect(), - get_account_id_from_seed::(SUDO_ACCOUNT), - endowed_accounts(), - true, - ) - }, - vec![], - None, - None, - None, - properties, - Default::default(), - ), - } - } -} - -/// We're using the same set of endowed accounts on all Millau chains (dev/local) to make -/// sure that all accounts, required for bridge to be functional (e.g. relayers fund account, -/// accounts used by relayers in our test deployments, accounts used for demonstration -/// purposes), are all available on these chains. -fn endowed_accounts() -> Vec { - let all_authorities = ALL_AUTHORITIES_ACCOUNTS.iter().flat_map(|x| { - [ - get_account_id_from_seed::(x), - get_account_id_from_seed::(&format!("{x}//stash")), - ] - }); - vec![ - // Sudo account - get_account_id_from_seed::(SUDO_ACCOUNT), - // Regular (unused) accounts - get_account_id_from_seed::("Ferdie"), - get_account_id_from_seed::("Ferdie//stash"), - // Accounts, used by Rialto<>Millau bridge - get_account_id_from_seed::(MILLAU_MESSAGES_PALLET_OWNER), - get_account_id_from_seed::("Millau.HeadersAndMessagesRelay"), - get_account_id_from_seed::("Millau.OutboundMessagesRelay.Lane00000001"), - get_account_id_from_seed::("Millau.InboundMessagesRelay.Lane00000001"), - get_account_id_from_seed::("Millau.MessagesSender"), - ] - .into_iter() - .chain(all_authorities) - .collect() -} - -fn session_keys( - babe: BabeId, - beefy: BeefyId, - grandpa: GrandpaId, - para_validator: ValidatorId, - para_assignment: AssignmentId, - authority_discovery: AuthorityDiscoveryId, -) -> SessionKeys { - SessionKeys { babe, beefy, grandpa, para_validator, para_assignment, authority_discovery } -} - -fn testnet_genesis( - initial_authorities: Vec<( - AccountId, - BabeId, - BeefyId, - GrandpaId, - ValidatorId, - AssignmentId, - AuthorityDiscoveryId, - )>, - root_key: AccountId, - endowed_accounts: Vec, - _enable_println: bool, -) -> RuntimeGenesisConfig { - RuntimeGenesisConfig { - system: SystemConfig { - code: WASM_BINARY.expect("Rialto development WASM not available").to_vec(), - ..Default::default() - }, - balances: BalancesConfig { - balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 50)).collect(), - }, - babe: BabeConfig { - authorities: Vec::new(), - epoch_config: Some(rialto_runtime::BABE_GENESIS_EPOCH_CONFIG), - ..Default::default() - }, - beefy: BeefyConfig::default(), - grandpa: GrandpaConfig { authorities: Vec::new(), ..Default::default() }, - sudo: SudoConfig { key: Some(root_key) }, - session: SessionConfig { - keys: initial_authorities - .iter() - .map(|x| { - ( - x.0.clone(), - x.0.clone(), - session_keys( - x.1.clone(), - x.2.clone(), - x.3.clone(), - x.4.clone(), - x.5.clone(), - x.6.clone(), - ), - ) - }) - .collect::>(), - }, - authority_discovery: Default::default(), - hrmp: Default::default(), - // this configuration is exact copy of configuration from Polkadot repo - // (see /node/service/src/chain_spec.rs:default_parachains_host_configuration) - configuration: ConfigurationConfig { - config: polkadot_runtime_parachains::configuration::HostConfiguration { - validation_upgrade_cooldown: 2u32, - validation_upgrade_delay: 2, - code_retention_period: 1200, - max_code_size: polkadot_primitives::v6::MAX_CODE_SIZE, - max_pov_size: polkadot_primitives::v6::MAX_POV_SIZE, - max_head_data_size: 32 * 1024, - group_rotation_frequency: 20, - max_upward_queue_count: 8, - max_upward_queue_size: 1024 * 1024, - max_downward_message_size: 1024 * 1024, - max_upward_message_size: 50 * 1024, - max_upward_message_num_per_candidate: 5, - hrmp_sender_deposit: 0, - hrmp_recipient_deposit: 0, - hrmp_channel_max_capacity: 8, - hrmp_channel_max_total_size: 8 * 1024, - hrmp_max_parachain_inbound_channels: 4, - hrmp_channel_max_message_size: 1024 * 1024, - hrmp_max_parachain_outbound_channels: 4, - hrmp_max_message_num_per_candidate: 5, - dispute_period: 6, - no_show_slots: 2, - n_delay_tranches: 25, - needed_approvals: 2, - relay_vrf_modulo_samples: 2, - zeroth_delay_tranche_width: 0, - minimum_validation_upgrade_delay: 5, - ..Default::default() - }, - }, - paras: Default::default(), - bridge_millau_messages: BridgeMillauMessagesConfig { - owner: Some(get_account_id_from_seed::(MILLAU_MESSAGES_PALLET_OWNER)), - opened_lanes: vec![rialto_runtime::millau_messages::Bridge::get().lane_id()], - ..Default::default() - }, - xcm_pallet: Default::default(), - xcm_millau_bridge_hub: XcmMillauBridgeHubConfig { - opened_bridges: vec![( - xcm::latest::Junctions::Here.into(), - xcm::latest::InteriorMultiLocation::from( - rialto_runtime::xcm_config::MillauNetwork::get(), - ), - )], - ..Default::default() - }, - } -} diff --git a/bin/rialto/node/src/cli.rs b/bin/rialto/node/src/cli.rs deleted file mode 100644 index 521f2268bdc5ede32c14a838d7b54abaf7194d51..0000000000000000000000000000000000000000 --- a/bin/rialto/node/src/cli.rs +++ /dev/null @@ -1,84 +0,0 @@ -// 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 . - -use clap::Parser; -use sc_cli::RunCmd; - -#[derive(Debug, Parser)] -pub struct Cli { - #[structopt(subcommand)] - pub subcommand: Option, - - #[structopt(flatten)] - pub run: RunCmd, -} - -/// Possible subcommands of the main binary. -#[derive(Debug, Parser)] -#[allow(clippy::large_enum_variant)] -pub enum Subcommand { - /// Key management CLI utilities - #[clap(subcommand)] - Key(sc_cli::KeySubcommand), - - /// Verify a signature for a message, provided on `STDIN`, with a given (public or secret) key. - Verify(sc_cli::VerifyCmd), - - /// Generate a seed that provides a vanity address. - Vanity(sc_cli::VanityCmd), - - /// Sign a message, with a given (secret) key. - Sign(sc_cli::SignCmd), - - /// Build a chain specification. - BuildSpec(sc_cli::BuildSpecCmd), - - /// Validate blocks. - CheckBlock(sc_cli::CheckBlockCmd), - - /// Export blocks. - ExportBlocks(sc_cli::ExportBlocksCmd), - - /// Export the state of a given block into a chain spec. - ExportState(sc_cli::ExportStateCmd), - - /// Import blocks. - ImportBlocks(sc_cli::ImportBlocksCmd), - - /// Remove the whole chain. - PurgeChain(sc_cli::PurgeChainCmd), - - /// Revert the chain to a previous state. - Revert(sc_cli::RevertCmd), - - /// Inspect blocks or extrinsics. - Inspect(node_inspect::cli::InspectCmd), - - /// Benchmark runtime pallets. - #[command(subcommand)] - Benchmark(frame_benchmarking_cli::BenchmarkCmd), -} - -/// Validation worker command. -#[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 deleted file mode 100644 index 397f8a3e24e9b1a669c3515c0f23ab6ccd4a7547..0000000000000000000000000000000000000000 --- a/bin/rialto/node/src/command.rs +++ /dev/null @@ -1,193 +0,0 @@ -// 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 . - -use crate::cli::{Cli, Subcommand}; -use frame_benchmarking_cli::BenchmarkCmd; -use rialto_runtime::{Block, RuntimeApi}; -use sc_cli::SubstrateCli; - -impl SubstrateCli for Cli { - fn impl_name() -> String { - "Rialto Bridge Node".into() - } - - fn impl_version() -> String { - env!("CARGO_PKG_VERSION").into() - } - - fn description() -> String { - "Rialto Bridge Node".into() - } - - fn author() -> String { - "Parity Technologies".into() - } - - fn support_url() -> String { - "https://github.com/paritytech/parity-bridges-common/".into() - } - - fn copyright_start_year() -> i32 { - 2019 - } - - fn executable_name() -> String { - "rialto-bridge-node".into() - } - - fn load_spec(&self, id: &str) -> Result, String> { - Ok(Box::new( - match id { - "" | "dev" => crate::chain_spec::Alternative::Development, - "local" => crate::chain_spec::Alternative::LocalTestnet, - _ => return Err(format!("Unsupported chain specification: {id}")), - } - .load(), - )) - } -} - -// Rialto native executor instance. -pub struct ExecutorDispatch; - -impl sc_executor::NativeExecutionDispatch for ExecutorDispatch { - type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; - - fn dispatch(method: &str, data: &[u8]) -> Option> { - rialto_runtime::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - rialto_runtime::native_version() - } -} - -/// Parse and run command line arguments -pub fn run() -> sc_cli::Result<()> { - let cli = Cli::from_args(); - sp_core::crypto::set_default_ss58_version(sp_core::crypto::Ss58AddressFormat::custom( - rialto_runtime::SS58Prefix::get() as u16, - )); - - match &cli.subcommand { - Some(Subcommand::Benchmark(cmd)) => { - let runner = cli.create_runner(cmd)?; - match cmd { - BenchmarkCmd::Pallet(cmd) => - if cfg!(feature = "runtime-benchmarks") { - runner.sync_run(|config| cmd.run::(config)) - } else { - println!( - "Benchmarking wasn't enabled when building the node. \ - You can enable it with `--features runtime-benchmarks`." - ); - Ok(()) - }, - _ => Err("Unsupported benchmarking subcommand".into()), - } - }, - Some(Subcommand::Key(cmd)) => cmd.run(&cli), - Some(Subcommand::Sign(cmd)) => cmd.run(), - Some(Subcommand::Verify(cmd)) => cmd.run(), - Some(Subcommand::Vanity(cmd)) => cmd.run(), - Some(Subcommand::BuildSpec(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.sync_run(|config| cmd.run(config.chain_spec, config.network)) - }, - Some(Subcommand::CheckBlock(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.async_run(|mut config| { - let (client, _, import_queue, task_manager) = - polkadot_service::new_chain_ops(&mut config, None).map_err(service_error)?; - Ok((cmd.run(client, import_queue), task_manager)) - }) - }, - Some(Subcommand::ExportBlocks(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.async_run(|mut config| { - let (client, _, _, task_manager) = - polkadot_service::new_chain_ops(&mut config, None).map_err(service_error)?; - Ok((cmd.run(client, config.database), task_manager)) - }) - }, - Some(Subcommand::ExportState(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.async_run(|mut config| { - let (client, _, _, task_manager) = - polkadot_service::new_chain_ops(&mut config, None).map_err(service_error)?; - Ok((cmd.run(client, config.chain_spec), task_manager)) - }) - }, - Some(Subcommand::ImportBlocks(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.async_run(|mut config| { - let (client, _, import_queue, task_manager) = - polkadot_service::new_chain_ops(&mut config, None).map_err(service_error)?; - Ok((cmd.run(client, import_queue), task_manager)) - }) - }, - Some(Subcommand::PurgeChain(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.sync_run(|config| cmd.run(config.database)) - }, - Some(Subcommand::Revert(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.async_run(|mut config| { - let (client, backend, _, task_manager) = - polkadot_service::new_chain_ops(&mut config, None).map_err(service_error)?; - Ok((cmd.run(client, backend, None), task_manager)) - }) - }, - Some(Subcommand::Inspect(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.sync_run(|config| cmd.run::(config)) - }, - None => { - let runner = cli.create_runner(&cli.run)?; - - runner.run_node_until_exit(|config| async move { - polkadot_service::new_full( - config, - polkadot_service::NewFullParams { - is_parachain_node: polkadot_service::IsParachainNode::No, - grandpa_pause: None, - enable_beefy: true, - jaeger_agent: None, - telemetry_worker_handle: None, - node_version: None, - workers_path: None, - workers_names: Some(( - "rialto-bridge-node-prepare-worker".to_string(), - "rialto-bridge-node-execute-worker".to_string(), - )), - overseer_gen: polkadot_service::overseer::RealOverseerGen, - overseer_message_channel_capacity_override: None, - malus_finality_delay: None, - hwbench: None, - }, - ) - .map(|full| full.task_manager) - .map_err(service_error) - }) - }, - } -} - -// We don't want to change 'service.rs' too much to ease future updates => it'll keep using -// its own error enum like original polkadot service does. -fn service_error(err: polkadot_service::Error) -> sc_cli::Error { - sc_cli::Error::Application(Box::new(err)) -} diff --git a/bin/rialto/node/src/main.rs b/bin/rialto/node/src/main.rs deleted file mode 100644 index 6dea84a309b262c3a557aa9df5298cb5f09718e2..0000000000000000000000000000000000000000 --- a/bin/rialto/node/src/main.rs +++ /dev/null @@ -1,28 +0,0 @@ -// 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 . - -//! Rialto bridge node. - -#![warn(missing_docs)] - -mod chain_spec; -mod cli; -mod command; - -/// Run the Rialto Node -fn main() -> sc_cli::Result<()> { - command::run() -} diff --git a/bin/rialto/node/src/workers/execute-worker.rs b/bin/rialto/node/src/workers/execute-worker.rs deleted file mode 100644 index 72cab799d753e814beae0a337e30b7c21269f08d..0000000000000000000000000000000000000000 --- a/bin/rialto/node/src/workers/execute-worker.rs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot 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. - -// Polkadot 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 Polkadot. If not, see . - -//! Execute worker. - -polkadot_node_core_pvf_common::decl_worker_main!( - "execute-worker", - polkadot_node_core_pvf_execute_worker::worker_entrypoint, - env!("SUBSTRATE_CLI_IMPL_VERSION") -); diff --git a/bin/rialto/node/src/workers/prepare-worker.rs b/bin/rialto/node/src/workers/prepare-worker.rs deleted file mode 100644 index 695f66cc7b7d3cae5c35a36af9570ce3911ed432..0000000000000000000000000000000000000000 --- a/bin/rialto/node/src/workers/prepare-worker.rs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot 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. - -// Polkadot 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 Polkadot. If not, see . - -//! Prepare worker. - -polkadot_node_core_pvf_common::decl_worker_main!( - "prepare-worker", - polkadot_node_core_pvf_prepare_worker::worker_entrypoint, - env!("SUBSTRATE_CLI_IMPL_VERSION") -); diff --git a/bin/rialto/runtime/Cargo.toml b/bin/rialto/runtime/Cargo.toml deleted file mode 100644 index 848b0267a5bc2b3078e8e655bc5dcb9924c18465..0000000000000000000000000000000000000000 --- a/bin/rialto/runtime/Cargo.toml +++ /dev/null @@ -1,158 +0,0 @@ -[package] -name = "rialto-runtime" -version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2021" -repository = "https://github.com/paritytech/parity-bridges-common/" -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" - -[dependencies] -codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } - -# Bridge dependencies - -bp-header-chain = { path = "../../../primitives/header-chain", default-features = false } -bp-messages = { path = "../../../primitives/messages", default-features = false } -bp-millau = { path = "../../../primitives/chain-millau", default-features = false } -bp-relayers = { path = "../../../primitives/relayers", default-features = false } -bp-rialto = { path = "../../../primitives/chain-rialto", default-features = false } -bp-runtime = { path = "../../../primitives/runtime", default-features = false } -bp-xcm-bridge-hub = { path = "../../../primitives/xcm-bridge-hub", default-features = false } -bridge-runtime-common = { path = "../../runtime-common", default-features = false } -pallet-bridge-beefy = { path = "../../../modules/beefy", default-features = false } -pallet-bridge-grandpa = { path = "../../../modules/grandpa", default-features = false } -pallet-bridge-messages = { path = "../../../modules/messages", default-features = false } -pallet-bridge-relayers = { path = "../../../modules/relayers", default-features = false } -pallet-shift-session-manager = { path = "../../../modules/shift-session-manager", default-features = false } -pallet-xcm-bridge-hub = { path = "../../../modules/xcm-bridge-hub", default-features = false } - -# Substrate Dependencies - -sp-consensus-beefy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false, optional = true } -frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false, optional = true } -frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-babe = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-beefy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-beefy-mmr = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-mmr = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-offences = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false, features = ["historical"]} -pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } - -# Polkadot (parachain) Dependencies -pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } - -[dev-dependencies] -bridge-runtime-common = { path = "../../runtime-common", features = ["integrity-test"] } -env_logger = "0.10" -hex-literal = "0.4" -static_assertions = "1.1" - -[build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } - -[features] -default = [ "std" ] -std = [ - "bp-messages/std", - "bp-millau/std", - "bp-relayers/std", - "bp-rialto/std", - "bp-runtime/std", - "bp-xcm-bridge-hub/std", - "bridge-runtime-common/std", - "codec/std", - "frame-benchmarking/std", - "frame-executive/std", - "frame-support/std", - "frame-system-rpc-runtime-api/std", - "frame-system/std", - "pallet-authority-discovery/std", - "pallet-authorship/std", - "pallet-babe/std", - "pallet-balances/std", - "pallet-beefy-mmr/std", - "pallet-beefy/std", - "pallet-bridge-beefy/std", - "pallet-bridge-grandpa/std", - "pallet-bridge-messages/std", - "pallet-bridge-relayers/std", - "pallet-grandpa/std", - "pallet-message-queue/std", - "pallet-mmr/std", - "pallet-offences/std", - "pallet-session/std", - "pallet-shift-session-manager/std", - "pallet-sudo/std", - "pallet-timestamp/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-xcm-bridge-hub/std", - "pallet-xcm/std", - "polkadot-primitives/std", - "polkadot-runtime-common/std", - "polkadot-runtime-parachains/std", - "scale-info/std", - "sp-api/std", - "sp-authority-discovery/std", - "sp-block-builder/std", - "sp-consensus-babe/std", - "sp-consensus-beefy/std", - "sp-core/std", - "sp-inherents/std", - "sp-io/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", - "xcm-builder/std", - "xcm-executor/std", - "xcm/std", -] -runtime-benchmarks = [ - "bridge-runtime-common/runtime-benchmarks", - "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "pallet-bridge-grandpa/runtime-benchmarks", - "pallet-bridge-messages/runtime-benchmarks", - "pallet-bridge-relayers/runtime-benchmarks", - "pallet-message-queue/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", - "polkadot-runtime-common/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", -] diff --git a/bin/rialto/runtime/build.rs b/bin/rialto/runtime/build.rs deleted file mode 100644 index 25e220e46fc3b76bbf5474247378d1033f7cb5aa..0000000000000000000000000000000000000000 --- a/bin/rialto/runtime/build.rs +++ /dev/null @@ -1,26 +0,0 @@ -// 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 . - -use substrate_wasm_builder::WasmBuilder; - -fn main() { - WasmBuilder::new() - .with_current_project() - .import_memory() - .export_heap_base() - .disable_runtime_version_section_check() - .build() -} diff --git a/bin/rialto/runtime/src/lib.rs b/bin/rialto/runtime/src/lib.rs deleted file mode 100644 index fc24ed5fba5ab559fb7fd401d45c56a9fb737ede..0000000000000000000000000000000000000000 --- a/bin/rialto/runtime/src/lib.rs +++ /dev/null @@ -1,1099 +0,0 @@ -// 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 . - -//! The Rialto runtime. This can be compiled with `#[no_std]`, ready for Wasm. - -#![cfg_attr(not(feature = "std"), no_std)] -// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. -#![recursion_limit = "256"] -// Runtime-generated enums -#![allow(clippy::large_enum_variant)] -// From construct_runtime macro -#![allow(clippy::from_over_into)] - -// Make the WASM binary available. -#[cfg(feature = "std")] -include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); - -pub mod millau_messages; -pub mod parachains; -pub mod xcm_config; - -use bp_runtime::HeaderId; -use pallet_grandpa::{ - fg_primitives, AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList, -}; -use pallet_transaction_payment::{FeeDetails, Multiplier, RuntimeDispatchInfo}; -use polkadot_primitives::Id as ParaId; -use polkadot_runtime_parachains::runtime_api_impl::{ - v7 as parachains_runtime_api_impl, vstaging as parachains_staging_runtime_api_impl, -}; -use sp_api::impl_runtime_apis; -use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; -use sp_consensus_beefy::{ecdsa_crypto::AuthorityId as BeefyId, mmr::MmrLeafVersion, ValidatorSet}; -use sp_core::OpaqueMetadata; -use sp_runtime::{ - create_runtime_str, generic, impl_opaque_keys, - traits::{AccountIdLookup, Block as BlockT, ConstU128, Keccak256, NumberFor, OpaqueKeys}, - transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, FixedPointNumber, KeyTypeId, Perquintill, -}; -use sp_std::{collections::btree_map::BTreeMap, prelude::*}; -#[cfg(feature = "std")] -use sp_version::NativeVersion; -use sp_version::RuntimeVersion; - -// A few exports that help ease life for downstream crates. -pub use frame_support::{ - construct_runtime, - dispatch::DispatchClass, - parameter_types, - traits::{ - ConstU32, ConstU64, ConstU8, Currency, ExistenceRequirement, Imbalance, KeyOwnerProofSystem, - }, - weights::{constants::WEIGHT_REF_TIME_PER_SECOND, IdentityFee, RuntimeDbWeight, Weight}, - StorageValue, -}; - -pub use frame_system::Call as SystemCall; -pub use pallet_balances::Call as BalancesCall; -pub use pallet_bridge_beefy::Call as BridgeBeefyCall; -pub use pallet_bridge_grandpa::Call as BridgeGrandpaCall; -pub use pallet_bridge_messages::Call as MessagesCall; -pub use pallet_sudo::Call as SudoCall; -pub use pallet_timestamp::Call as TimestampCall; -pub use pallet_xcm::Call as XcmCall; - -#[cfg(any(feature = "std", test))] -pub use sp_runtime::BuildStorage; -pub use sp_runtime::{Perbill, Permill}; - -/// An index to a block. -pub type BlockNumber = bp_rialto::BlockNumber; - -/// Alias to 512-bit hash when used in the context of a transaction signature on the chain. -pub type Signature = bp_rialto::Signature; - -/// Some way of identifying an account on the chain. We intentionally make it equivalent -/// to the public key of our transaction signing scheme. -pub type AccountId = bp_rialto::AccountId; - -/// The type for looking up accounts. We don't expect more than 4 billion of them, but you -/// never know... -pub type AccountIndex = u32; - -/// Balance of an account. -pub type Balance = bp_rialto::Balance; - -/// Nonce of a transaction in the chain. -pub type Nonce = bp_rialto::Nonce; - -/// A hash of some data used by the chain. -pub type Hash = bp_rialto::Hash; - -/// Hashing algorithm used by the chain. -pub type Hashing = bp_rialto::Hasher; - -/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know -/// the specifics of the runtime. They can then be made to be agnostic over specific formats -/// of data like extrinsics, allowing for them to continue syncing the network through upgrades -/// to even the core data structures. -pub mod opaque { - use super::*; - - pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic; - - /// Opaque block header type. - pub type Header = generic::Header; - /// Opaque block type. - pub type Block = generic::Block; - /// Opaque block identifier type. - pub type BlockId = generic::BlockId; -} - -impl_opaque_keys! { - pub struct SessionKeys { - pub babe: Babe, - pub grandpa: Grandpa, - pub beefy: Beefy, - pub para_validator: Initializer, - pub para_assignment: SessionInfo, - pub authority_discovery: AuthorityDiscovery, - } -} - -/// This runtime version. -#[sp_version::runtime_version] -pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("rialto-runtime"), - impl_name: create_runtime_str!("rialto-runtime"), - authoring_version: 1, - spec_version: 1, - impl_version: 1, - apis: RUNTIME_API_VERSIONS, - transaction_version: 1, - state_version: 1, -}; - -/// The version information used to identify this runtime when compiled natively. -#[cfg(feature = "std")] -pub fn native_version() -> NativeVersion { - NativeVersion { runtime_version: VERSION, can_author_with: Default::default() } -} - -parameter_types! { - pub const BlockHashCount: BlockNumber = 250; - pub const Version: RuntimeVersion = VERSION; - pub const DbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 60_000_000, // ~0.06 ms = ~60 µs - write: 200_000_000, // ~0.2 ms = 200 µs - }; - pub const SS58Prefix: u8 = 48; -} - -impl frame_system::Config for Runtime { - /// The basic call filter to use in dispatchable. - type BaseCallFilter = frame_support::traits::Everything; - /// The identifier used to distinguish between accounts. - type AccountId = AccountId; - /// The aggregated dispatch type that is available for extrinsics. - type RuntimeCall = RuntimeCall; - /// The lookup mechanism to get account ID from whatever is passed in dispatchers. - type Lookup = AccountIdLookup; - /// The index type for storing how many extrinsics an account has signed. - type Nonce = Nonce; - /// The type for hashing blocks and tries. - type Hash = Hash; - /// The hashing algorithm used. - type Hashing = Hashing; - /// The header type. - type Block = Block; - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; - /// The ubiquitous origin type. - type RuntimeOrigin = RuntimeOrigin; - /// Maximum number of block number to block hash mappings to keep (oldest pruned first). - type BlockHashCount = BlockHashCount; - /// Version of the runtime. - type Version = Version; - /// Provides information about the pallet setup in the runtime. - type PalletInfo = PalletInfo; - /// What to do if a new account is created. - type OnNewAccount = (); - /// What to do if an account is fully reaped from the system. - type OnKilledAccount = (); - /// The data to be stored in an account. - type AccountData = pallet_balances::AccountData; - // TODO: update me (https://github.com/paritytech/parity-bridges-common/issues/78) - /// Weight information for the extrinsics of this pallet. - type SystemWeightInfo = (); - /// Block and extrinsics weights: base values and limits. - type BlockWeights = bp_rialto::BlockWeights; - /// The maximum length of a block (in bytes). - type BlockLength = bp_rialto::BlockLength; - /// The weight of database operations that the runtime can invoke. - type DbWeight = DbWeight; - /// The designated SS58 prefix of this chain. - type SS58Prefix = SS58Prefix; - /// The set code logic, just the default since we're not a parachain. - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; -} - -/// The BABE epoch configuration at genesis. -pub const BABE_GENESIS_EPOCH_CONFIG: sp_consensus_babe::BabeEpochConfiguration = - sp_consensus_babe::BabeEpochConfiguration { - c: bp_rialto::time_units::PRIMARY_PROBABILITY, - allowed_slots: sp_consensus_babe::AllowedSlots::PrimaryAndSecondaryVRFSlots, - }; - -parameter_types! { - pub const EpochDuration: u64 = bp_rialto::EPOCH_DURATION_IN_SLOTS as u64; - pub const ExpectedBlockTime: bp_rialto::Moment = bp_rialto::time_units::MILLISECS_PER_BLOCK; - pub ReportLongevity: u64 = EpochDuration::get() * 10; -} - -impl pallet_babe::Config for Runtime { - type EpochDuration = EpochDuration; - type ExpectedBlockTime = ExpectedBlockTime; - // session module is the trigger - type EpochChangeTrigger = pallet_babe::ExternalTrigger; - - type DisabledValidators = (); - - type WeightInfo = (); - - type MaxAuthorities = ConstU32<10>; - - // equivocation related configuration - we don't expect any equivocations in our testnets - type KeyOwnerProof = sp_core::Void; - type EquivocationReportSystem = (); - - type MaxNominators = ConstU32<256>; -} - -impl pallet_beefy::Config for Runtime { - type BeefyId = BeefyId; - type MaxAuthorities = ConstU32<10>; - type MaxSetIdSessionEntries = ConstU64<0>; - type OnNewValidatorSet = MmrLeaf; - type WeightInfo = (); - type KeyOwnerProof = sp_core::Void; - type EquivocationReportSystem = (); - type MaxNominators = ConstU32<256>; -} - -impl pallet_grandpa::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - // TODO: update me (https://github.com/paritytech/parity-bridges-common/issues/78) - type WeightInfo = (); - type MaxAuthorities = ConstU32<10>; - type MaxSetIdSessionEntries = ConstU64<0>; - type KeyOwnerProof = >::Proof; - type EquivocationReportSystem = - pallet_grandpa::EquivocationReportSystem; - type MaxNominators = ConstU32<256>; -} - -impl pallet_mmr::Config for Runtime { - const INDEXING_PREFIX: &'static [u8] = b"mmr"; - type Hashing = Keccak256; - type LeafData = pallet_beefy_mmr::Pallet; - type OnNewRoot = pallet_beefy_mmr::DepositBeefyDigest; - type WeightInfo = (); -} - -parameter_types! { - /// Version of the produced MMR leaf. - /// - /// The version consists of two parts; - /// - `major` (3 bits) - /// - `minor` (5 bits) - /// - /// `major` should be updated only if decoding the previous MMR Leaf format from the payload - /// is not possible (i.e. backward incompatible change). - /// `minor` should be updated if fields are added to the previous MMR Leaf, which given SCALE - /// encoding does not prevent old leafs from being decoded. - /// - /// Hence we expect `major` to be changed really rarely (think never). - /// See [`MmrLeafVersion`] type documentation for more details. - pub LeafVersion: MmrLeafVersion = MmrLeafVersion::new(0, 0); -} - -pub struct BeefyDummyDataProvider; - -impl sp_consensus_beefy::mmr::BeefyDataProvider<()> for BeefyDummyDataProvider { - fn extra_data() {} -} - -impl pallet_beefy_mmr::Config for Runtime { - type LeafVersion = LeafVersion; - type BeefyAuthorityToMerkleLeaf = pallet_beefy_mmr::BeefyEcdsaToEthereum; - type LeafExtra = (); - type BeefyDataProvider = BeefyDummyDataProvider; -} - -parameter_types! { - pub const MinimumPeriod: u64 = bp_rialto::SLOT_DURATION / 2; -} - -impl pallet_timestamp::Config for Runtime { - /// A timestamp: milliseconds since the UNIX epoch. - type Moment = bp_rialto::Moment; - type OnTimestampSet = Babe; - type MinimumPeriod = MinimumPeriod; - // TODO: update me (https://github.com/paritytech/parity-bridges-common/issues/78) - type WeightInfo = (); -} - -parameter_types! { - pub const ExistentialDeposit: bp_rialto::Balance = 500; -} - -impl pallet_balances::Config for Runtime { - /// The type for recording an account's balance. - type Balance = Balance; - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - // TODO: update me (https://github.com/paritytech/parity-bridges-common/issues/78) - type WeightInfo = (); - // For weight estimation, we assume that the most locks on an individual account will be 50. - // This number may need to be adjusted in the future if this assumption no longer holds true. - type MaxLocks = ConstU32<50>; - type MaxReserves = ConstU32<50>; - type ReserveIdentifier = [u8; 8]; - type RuntimeHoldReason = RuntimeHoldReason; - type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; - type MaxFreezes = ConstU32<0>; -} - -parameter_types! { - pub const TransactionBaseFee: Balance = 0; - pub const TransactionByteFee: Balance = 1; - // values for following parameters are copied from polkadot repo, but it is fine - // not to sync them - we're not going to make Rialto a full copy of one of Polkadot-like chains - pub const TargetBlockFullness: Perquintill = Perquintill::from_percent(25); - pub AdjustmentVariable: Multiplier = Multiplier::saturating_from_rational(3, 100_000); - pub MinimumMultiplier: Multiplier = Multiplier::saturating_from_rational(1, 1_000_000u128); - pub MaximumMultiplier: Multiplier = sp_runtime::traits::Bounded::max_value(); -} - -impl pallet_transaction_payment::Config for Runtime { - type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; - type OperationalFeeMultiplier = ConstU8<5>; - type WeightToFee = bp_rialto::WeightToFee; - type LengthToFee = bp_rialto::WeightToFee; - type FeeMultiplierUpdate = pallet_transaction_payment::TargetedFeeAdjustment< - Runtime, - TargetBlockFullness, - AdjustmentVariable, - MinimumMultiplier, - MaximumMultiplier, - >; - type RuntimeEvent = RuntimeEvent; -} - -impl pallet_sudo::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type WeightInfo = pallet_sudo::weights::SubstrateWeight; -} - -impl pallet_session::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type ValidatorId = ::AccountId; - type ValidatorIdOf = (); - type ShouldEndSession = Babe; - type NextSessionRotation = Babe; - type SessionManager = pallet_shift_session_manager::Pallet; - type SessionHandler = ::KeyTypeIdProviders; - type Keys = SessionKeys; - // TODO: update me (https://github.com/paritytech/parity-bridges-common/issues/78) - type WeightInfo = (); -} - -impl pallet_authorship::Config for Runtime { - type FindAuthor = pallet_session::FindAccountFromAuthorIndex; - type EventHandler = (); -} - -pub struct FullIdentificationOf; -impl sp_runtime::traits::Convert> for FullIdentificationOf { - fn convert(_: AccountId) -> Option<()> { - Some(()) - } -} - -impl pallet_session::historical::Config for Runtime { - type FullIdentification = (); - type FullIdentificationOf = FullIdentificationOf; -} - -impl pallet_offences::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type IdentificationTuple = pallet_session::historical::IdentificationTuple; - type OnOffenceHandler = (); -} - -impl pallet_authority_discovery::Config for Runtime { - type MaxAuthorities = ConstU32<10>; -} - -impl pallet_bridge_relayers::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Reward = Balance; - type PaymentProcedure = - bp_relayers::PayRewardFromAccount, AccountId>; - type StakeAndSlash = (); - type MaxLanesPerRelayer = ConstU32<16>; - type MaxActiveRelayersPerLane = ConstU32<16>; - type MaxNextRelayersPerLane = ConstU32<1_024>; - type InitialElectionLength = ConstU32<16>; - type SlotLength = ConstU32<16>; - type EpochLength = ConstU32<1_024>; - type PriorityBoostPerMessage = ConstU64<0>; - type PriorityBoostForActiveLaneRelayer = ConstU64<0>; - type WeightInfo = (); -} - -pub type MillauGrandpaInstance = (); -impl pallet_bridge_grandpa::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type BridgedChain = bp_millau::Millau; - type MaxFreeMandatoryHeadersPerBlock = ConstU32<4>; - type HeadersToKeep = ConstU32<{ bp_millau::DAYS as u32 }>; - type WeightInfo = pallet_bridge_grandpa::weights::BridgeWeight; -} - -impl pallet_shift_session_manager::Config for Runtime {} - -parameter_types! { - pub const MaxMessagesToPruneAtOnce: bp_messages::MessageNonce = 8; - pub const RootAccountForPayments: Option = None; -} - -/// Instance of the messages pallet used to relay messages to/from Millau chain. -pub type WithMillauMessagesInstance = (); - -impl pallet_bridge_messages::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = pallet_bridge_messages::weights::BridgeWeight; - - type ThisChain = bp_rialto::Rialto; - type BridgedChain = bp_millau::Millau; - type BridgedHeaderChain = BridgeMillauGrandpa; - - type OutboundPayload = bp_xcm_bridge_hub::XcmAsPlainPayload; - type InboundPayload = bp_xcm_bridge_hub::XcmAsPlainPayload; - - type DeliveryPayments = (); - type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter< - Runtime, - WithMillauMessagesInstance, - frame_support::traits::ConstU128<0>, - frame_support::traits::ConstU128<100_000>, - >; - type OnMessagesDelivered = XcmMillauBridgeHub; - - type MessageDispatch = XcmMillauBridgeHub; -} - -pub type MillauBeefyInstance = (); -impl pallet_bridge_beefy::Config for Runtime { - type MaxRequests = frame_support::traits::ConstU32<16>; - type CommitmentsToKeep = frame_support::traits::ConstU32<8>; - type BridgedChain = bp_millau::Millau; -} - -/// Instance of the XCM bridge hub pallet used to relay messages to/from Millau chain. -pub type WithMillauXcmBridgeHubInstance = (); - -impl pallet_xcm_bridge_hub::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - - type UniversalLocation = xcm_config::UniversalLocation; - type BridgedNetworkId = xcm_config::MillauNetwork; - type BridgeMessagesPalletInstance = WithMillauMessagesInstance; - - type OpenBridgeOrigin = frame_support::traits::NeverEnsureOrigin; - type BridgeOriginAccountIdConverter = xcm_config::SovereignAccountOf; - - type BridgeReserve = ConstU128<1_000_000_000>; - type NativeCurrency = Balances; - - type LocalXcmChannelManager = (); - type BlobDispatcher = xcm_config::OnRialtoBlobDispatcher; - type MessageExportPrice = (); -} - -construct_runtime!( - pub enum Runtime { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Sudo: pallet_sudo::{Pallet, Call, Config, Storage, Event}, - - // Must be before session. - Babe: pallet_babe::{Pallet, Call, Storage, Config, ValidateUnsigned}, - - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event}, - - // Consensus support. - // Authorship must be before session in order to note author in the correct session and era - // for im-online. - Authorship: pallet_authorship::{Pallet, Storage}, - Offences: pallet_offences::{Pallet, Storage, Event}, - Historical: pallet_session::historical::{Pallet}, - - AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config}, - Session: pallet_session::{Pallet, Call, Storage, Event, Config}, - Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event}, - ShiftSessionManager: pallet_shift_session_manager::{Pallet}, - - // BEEFY Bridges support. - Beefy: pallet_beefy::{Pallet, Storage, Config}, - Mmr: pallet_mmr::{Pallet, Storage}, - MmrLeaf: pallet_beefy_mmr::{Pallet, Storage}, - - // Millau bridge modules. - BridgeRelayers: pallet_bridge_relayers::{Pallet, Call, Storage, Event}, - BridgeMillauGrandpa: pallet_bridge_grandpa::{Pallet, Call, Storage, Event}, - BridgeMillauMessages: pallet_bridge_messages::{Pallet, Call, Storage, Event, Config}, - XcmMillauBridgeHub: pallet_xcm_bridge_hub::{Pallet, Call, Storage, Event, Config}, - - // Millau bridge modules (BEEFY based). - BridgeMillauBeefy: pallet_bridge_beefy::{Pallet, Call, Storage}, - - // Parachain modules. - ParachainsOrigin: polkadot_runtime_parachains::origin::{Pallet, Origin}, - Configuration: polkadot_runtime_parachains::configuration::{Pallet, Call, Storage, Config}, - Shared: polkadot_runtime_parachains::shared::{Pallet, Call, Storage}, - ParaInclusion: polkadot_runtime_parachains::inclusion::{Pallet, Call, Storage, Event}, - ParasInherent: polkadot_runtime_parachains::paras_inherent::{Pallet, Call, Storage, Inherent}, - Scheduler: polkadot_runtime_parachains::scheduler::{Pallet, Storage}, - Paras: polkadot_runtime_parachains::paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned}, - Initializer: polkadot_runtime_parachains::initializer::{Pallet, Call, Storage}, - Dmp: polkadot_runtime_parachains::dmp::{Pallet, Storage}, - Hrmp: polkadot_runtime_parachains::hrmp::{Pallet, Call, Storage, Event, Config}, - SessionInfo: polkadot_runtime_parachains::session_info::{Pallet, Storage}, - ParaSessionInfo: polkadot_runtime_parachains::session_info::{Pallet, Storage}, - ParasDisputes: polkadot_runtime_parachains::disputes::{Pallet, Call, Storage, Event}, - ParasSlashing: polkadot_runtime_parachains::disputes::slashing::{Pallet, Call, Storage, ValidateUnsigned}, - ParaAssignmentProvider: polkadot_runtime_parachains::assigner_parachains::{Pallet}, - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event}, - - // Parachain Onboarding Pallets - Registrar: polkadot_runtime_common::paras_registrar::{Pallet, Call, Storage, Event}, - Slots: polkadot_runtime_common::slots::{Pallet, Call, Storage, Event}, - ParasSudoWrapper: polkadot_runtime_common::paras_sudo_wrapper::{Pallet, Call}, - - // Pallet for sending XCM. - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, - } -); - -/// The address format for describing accounts. -pub type Address = sp_runtime::MultiAddress; -/// Block header type as expected by this runtime. -pub type Header = generic::Header; -/// Block type as expected by this runtime. -pub type Block = generic::Block; -/// A Block signed with a Justification -pub type SignedBlock = generic::SignedBlock; -/// BlockId type as expected by this runtime. -pub type BlockId = generic::BlockId; -/// The SignedExtension to the basic transaction logic. -pub type SignedExtra = ( - frame_system::CheckNonZeroSender, - frame_system::CheckSpecVersion, - frame_system::CheckTxVersion, - frame_system::CheckGenesis, - frame_system::CheckEra, - frame_system::CheckNonce, - frame_system::CheckWeight, - pallet_transaction_payment::ChargeTransactionPayment, -); -/// The payload being signed in transactions. -pub type SignedPayload = generic::SignedPayload; -/// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = - generic::UncheckedExtrinsic; -/// Extrinsic type that has already been checked. -pub type CheckedExtrinsic = generic::CheckedExtrinsic; -/// Executive: handles dispatch to the various modules. -pub type Executive = frame_executive::Executive< - Runtime, - Block, - frame_system::ChainContext, - Runtime, - AllPalletsWithSystem, ->; - -/// MMR helper types. -mod mmr { - use super::Runtime; - pub use pallet_mmr::primitives::*; - - pub type Leaf = <::LeafData as LeafDataProvider>::LeafData; - pub type Hashing = ::Hashing; - pub type Hash = ::Output; -} - -impl_runtime_apis! { - impl sp_api::Core for Runtime { - fn version() -> RuntimeVersion { - VERSION - } - - fn execute_block(block: Block) { - Executive::execute_block(block); - } - - fn initialize_block(header: &::Header) { - Executive::initialize_block(header) - } - } - - impl sp_api::Metadata for Runtime { - fn metadata() -> OpaqueMetadata { - OpaqueMetadata::new(Runtime::metadata().into()) - } - - fn metadata_at_version(version: u32) -> Option { - Runtime::metadata_at_version(version) - } - - fn metadata_versions() -> sp_std::vec::Vec { - Runtime::metadata_versions() - } - } - - impl sp_block_builder::BlockBuilder for Runtime { - fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { - Executive::apply_extrinsic(extrinsic) - } - - fn finalize_block() -> ::Header { - Executive::finalize_block() - } - - fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<::Extrinsic> { - data.create_extrinsics() - } - - fn check_inherents( - block: Block, - data: sp_inherents::InherentData, - ) -> sp_inherents::CheckInherentsResult { - data.check_extrinsics(&block) - } - } - - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { - fn account_nonce(account: AccountId) -> Nonce { - System::account_nonce(account) - } - } - - impl sp_consensus_beefy::BeefyApi for Runtime { - fn beefy_genesis() -> Option { - Beefy::genesis_block() - } - - fn validator_set() -> Option> { - Beefy::validator_set() - } - - fn submit_report_equivocation_unsigned_extrinsic( - _equivocation_proof: sp_consensus_beefy::EquivocationProof< - NumberFor, - sp_consensus_beefy::ecdsa_crypto::AuthorityId, - sp_consensus_beefy::ecdsa_crypto::Signature - >, - _key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof, - ) -> Option<()> { None } - - fn generate_key_ownership_proof( - _set_id: sp_consensus_beefy::ValidatorSetId, - _authority_id: sp_consensus_beefy::ecdsa_crypto::AuthorityId, - ) -> Option { None } - } - - impl pallet_mmr::primitives::MmrApi< - Block, - mmr::Hash, - BlockNumber, - > for Runtime { - fn mmr_root() -> Result { - Ok(Mmr::mmr_root()) - } - - fn mmr_leaf_count() -> Result { - Ok(Mmr::mmr_leaves()) - } - - fn generate_proof( - block_numbers: Vec, - best_known_block_number: Option, - ) -> Result<(Vec, mmr::Proof), mmr::Error> { - Mmr::generate_proof(block_numbers, best_known_block_number).map( - |(leaves, proof)| { - ( - leaves - .into_iter() - .map(|leaf| mmr::EncodableOpaqueLeaf::from_leaf(&leaf)) - .collect(), - proof, - ) - }, - ) - } - - fn verify_proof(leaves: Vec, proof: mmr::Proof) - -> Result<(), mmr::Error> - { - let leaves = leaves.into_iter().map(|leaf| - leaf.into_opaque_leaf() - .try_decode() - .ok_or(mmr::Error::Verify)).collect::, mmr::Error>>()?; - Mmr::verify_leaves(leaves, proof) - } - - fn verify_proof_stateless( - root: mmr::Hash, - leaves: Vec, - proof: mmr::Proof - ) -> Result<(), mmr::Error> { - let nodes = leaves.into_iter().map(|leaf|mmr::DataOrHash::Data(leaf.into_opaque_leaf())).collect(); - pallet_mmr::verify_leaves_proof::(root, nodes, proof) - } - } - - impl bp_millau::MillauFinalityApi for Runtime { - fn best_finalized() -> Option> { - BridgeMillauGrandpa::best_finalized() - } - - fn synced_headers_grandpa_info( - ) -> Vec> { - BridgeMillauGrandpa::synced_headers_grandpa_info() - } - } - - impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { - fn validate_transaction( - source: TransactionSource, - tx: ::Extrinsic, - block_hash: ::Hash, - ) -> TransactionValidity { - Executive::validate_transaction(source, tx, block_hash) - } - } - - impl sp_offchain::OffchainWorkerApi for Runtime { - fn offchain_worker(header: &::Header) { - Executive::offchain_worker(header) - } - } - - impl sp_consensus_babe::BabeApi for Runtime { - fn configuration() -> sp_consensus_babe::BabeConfiguration { - // The choice of `c` parameter (where `1 - c` represents the - // probability of a slot being empty), is done in accordance to the - // slot duration and expected target block time, for safely - // resisting network delays of maximum two seconds. - // - sp_consensus_babe::BabeConfiguration { - slot_duration: Babe::slot_duration(), - epoch_length: EpochDuration::get(), - c: BABE_GENESIS_EPOCH_CONFIG.c, - authorities: Babe::authorities().to_vec(), - randomness: Babe::randomness(), - allowed_slots: BABE_GENESIS_EPOCH_CONFIG.allowed_slots, - } - } - - fn current_epoch_start() -> sp_consensus_babe::Slot { - Babe::current_epoch_start() - } - - fn current_epoch() -> sp_consensus_babe::Epoch { - Babe::current_epoch() - } - - fn next_epoch() -> sp_consensus_babe::Epoch { - Babe::next_epoch() - } - - fn generate_key_ownership_proof( - _slot: sp_consensus_babe::Slot, - _authority_id: sp_consensus_babe::AuthorityId, - ) -> Option { - None - } - - fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: sp_consensus_babe::EquivocationProof<::Header>, - key_owner_proof: sp_consensus_babe::OpaqueKeyOwnershipProof, - ) -> Option<()> { - let key_owner_proof = key_owner_proof.decode()?; - - Babe::submit_unsigned_equivocation_report( - equivocation_proof, - key_owner_proof, - ) - } - } - - #[api_version(8)] - impl polkadot_primitives::runtime_api::ParachainHost for Runtime { - fn validators() -> Vec { - parachains_runtime_api_impl::validators::() - } - - fn validator_groups() -> (Vec>, polkadot_primitives::GroupRotationInfo) { - parachains_runtime_api_impl::validator_groups::() - } - - fn availability_cores() -> Vec> { - parachains_runtime_api_impl::availability_cores::() - } - - fn persisted_validation_data(para_id: ParaId, assumption: polkadot_primitives::OccupiedCoreAssumption) - -> Option> { - parachains_runtime_api_impl::persisted_validation_data::(para_id, assumption) - } - - fn assumed_validation_data( - para_id: ParaId, - expected_persisted_validation_data_hash: Hash, - ) -> Option<(polkadot_primitives::PersistedValidationData, polkadot_primitives::ValidationCodeHash)> { - parachains_runtime_api_impl::assumed_validation_data::( - para_id, - expected_persisted_validation_data_hash, - ) - } - - fn check_validation_outputs( - para_id: ParaId, - outputs: polkadot_primitives::CandidateCommitments, - ) -> bool { - parachains_runtime_api_impl::check_validation_outputs::(para_id, outputs) - } - - fn session_index_for_child() -> polkadot_primitives::SessionIndex { - parachains_runtime_api_impl::session_index_for_child::() - } - - fn validation_code(para_id: ParaId, assumption: polkadot_primitives::OccupiedCoreAssumption) - -> Option { - parachains_runtime_api_impl::validation_code::(para_id, assumption) - } - - fn candidate_pending_availability(para_id: ParaId) -> Option> { - parachains_runtime_api_impl::candidate_pending_availability::(para_id) - } - - fn candidate_events() -> Vec> { - parachains_runtime_api_impl::candidate_events::(|ev| { - match ev { - RuntimeEvent::ParaInclusion(ev) => { - Some(ev) - } - _ => None, - } - }) - } - - fn session_info(index: polkadot_primitives::SessionIndex) -> Option { - parachains_runtime_api_impl::session_info::(index) - } - - fn session_executor_params(session_index: polkadot_primitives::SessionIndex) -> Option { - parachains_runtime_api_impl::session_executor_params::(session_index) - } - - fn dmq_contents(recipient: ParaId) -> Vec> { - parachains_runtime_api_impl::dmq_contents::(recipient) - } - - fn inbound_hrmp_channels_contents( - recipient: ParaId - ) -> BTreeMap>> { - parachains_runtime_api_impl::inbound_hrmp_channels_contents::(recipient) - } - - fn validation_code_by_hash(hash: polkadot_primitives::ValidationCodeHash) -> Option { - parachains_runtime_api_impl::validation_code_by_hash::(hash) - } - - fn on_chain_votes() -> Option> { - parachains_runtime_api_impl::on_chain_votes::() - } - - fn submit_pvf_check_statement( - stmt: polkadot_primitives::PvfCheckStatement, - signature: polkadot_primitives::ValidatorSignature - ) { - parachains_runtime_api_impl::submit_pvf_check_statement::(stmt, signature) - } - - fn pvfs_require_precheck() -> Vec { - parachains_runtime_api_impl::pvfs_require_precheck::() - } - - fn validation_code_hash(para_id: ParaId, assumption: polkadot_primitives::OccupiedCoreAssumption) - -> Option - { - parachains_runtime_api_impl::validation_code_hash::(para_id, assumption) - } - - fn disputes() -> Vec<(polkadot_primitives::SessionIndex, polkadot_primitives::CandidateHash, polkadot_primitives::DisputeState)> { - parachains_runtime_api_impl::get_session_disputes::() - } - - fn unapplied_slashes( - ) -> Vec<(polkadot_primitives::SessionIndex, polkadot_primitives::CandidateHash, polkadot_primitives::slashing::PendingSlashes)> { - parachains_runtime_api_impl::unapplied_slashes::() - } - - fn key_ownership_proof( - validator_id: polkadot_primitives::ValidatorId, - ) -> Option { - use codec::Encode; - - Historical::prove((polkadot_primitives::PARACHAIN_KEY_TYPE_ID, validator_id)) - .map(|p| p.encode()) - .map(polkadot_primitives::slashing::OpaqueKeyOwnershipProof::new) - } - - fn submit_report_dispute_lost( - dispute_proof: polkadot_primitives::slashing::DisputeProof, - key_ownership_proof: polkadot_primitives::slashing::OpaqueKeyOwnershipProof, - ) -> Option<()> { - parachains_runtime_api_impl::submit_unsigned_slashing_report::( - dispute_proof, - key_ownership_proof, - ) - } - - fn minimum_backing_votes() -> u32 { - parachains_runtime_api_impl::minimum_backing_votes::() - } - - fn para_backing_state(para_id: ParaId) -> Option { - parachains_runtime_api_impl::backing_state::(para_id) - } - - fn async_backing_params() -> polkadot_primitives::AsyncBackingParams { - parachains_runtime_api_impl::async_backing_params::() - } - - fn disabled_validators() -> Vec { - parachains_staging_runtime_api_impl::disabled_validators::() - } - - } - - impl sp_authority_discovery::AuthorityDiscoveryApi for Runtime { - fn authorities() -> Vec { - parachains_runtime_api_impl::relevant_authority_ids::() - } - } - - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi< - Block, - Balance, - > for Runtime { - fn query_info(uxt: ::Extrinsic, len: u32) -> RuntimeDispatchInfo { - TransactionPayment::query_info(uxt, len) - } - fn query_fee_details(uxt: ::Extrinsic, len: u32) -> FeeDetails { - TransactionPayment::query_fee_details(uxt, len) - } - fn query_weight_to_fee(weight: Weight) -> Balance { - TransactionPayment::weight_to_fee(weight) - } - fn query_length_to_fee(length: u32) -> Balance { - TransactionPayment::length_to_fee(length) - } - } - - impl sp_session::SessionKeys for Runtime { - fn generate_session_keys(seed: Option>) -> Vec { - SessionKeys::generate(seed) - } - - fn decode_session_keys( - encoded: Vec, - ) -> Option, sp_core::crypto::KeyTypeId)>> { - SessionKeys::decode_into_raw_public_keys(&encoded) - } - } - - impl fg_primitives::GrandpaApi for Runtime { - fn current_set_id() -> fg_primitives::SetId { - Grandpa::current_set_id() - } - - fn grandpa_authorities() -> GrandpaAuthorityList { - Grandpa::grandpa_authorities() - } - - fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: fg_primitives::EquivocationProof< - ::Hash, - NumberFor, - >, - key_owner_proof: fg_primitives::OpaqueKeyOwnershipProof, - ) -> Option<()> { - let key_owner_proof = key_owner_proof.decode()?; - - Grandpa::submit_unsigned_equivocation_report( - equivocation_proof, - key_owner_proof, - ) - } - - fn generate_key_ownership_proof( - _set_id: fg_primitives::SetId, - _authority_id: GrandpaId, - ) -> Option { - // NOTE: this is the only implementation possible since we've - // defined our key owner proof type as a bottom type (i.e. a type - // with no values). - None - } - } - - impl bp_millau::ToMillauOutboundLaneApi for Runtime { - fn message_details( - lane: bp_messages::LaneId, - begin: bp_messages::MessageNonce, - end: bp_messages::MessageNonce, - ) -> Vec { - bridge_runtime_common::messages_api::outbound_message_details::< - Runtime, - WithMillauMessagesInstance, - >(lane, begin, end) - } - } - - impl bp_millau::FromMillauInboundLaneApi for Runtime { - fn message_details( - lane: bp_messages::LaneId, - messages: Vec<(bp_messages::MessagePayload, bp_messages::OutboundMessageDetails)>, - ) -> Vec { - bridge_runtime_common::messages_api::inbound_message_details::< - Runtime, - WithMillauMessagesInstance, - >(lane, messages) - } - } -} - -#[cfg(test)] -mod tests { - use super::*; - use bp_runtime::Chain; - - #[test] - fn runtime_version() { - assert_eq!(VERSION.state_version, bp_rialto::Rialto::STATE_VERSION as u8); - } - - #[test] - fn call_size() { - const BRIDGES_PALLETS_MAX_CALL_SIZE: usize = 200; - assert!( - core::mem::size_of::>() <= - BRIDGES_PALLETS_MAX_CALL_SIZE - ); - assert!( - core::mem::size_of::>() <= - BRIDGES_PALLETS_MAX_CALL_SIZE - ); - // Largest inner Call is `pallet_session::Call` with a size of 224 bytes. This size is a - // result of large `SessionKeys` struct. - // Total size of Rialto runtime Call is 232. - const MAX_CALL_SIZE: usize = 232; - assert!(core::mem::size_of::() <= MAX_CALL_SIZE); - } -} diff --git a/bin/rialto/runtime/src/millau_messages.rs b/bin/rialto/runtime/src/millau_messages.rs deleted file mode 100644 index a1c3164d68e24b0127ecec9a610030c56fdacbbf..0000000000000000000000000000000000000000 --- a/bin/rialto/runtime/src/millau_messages.rs +++ /dev/null @@ -1,85 +0,0 @@ -// 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 . - -//! Everything required to serve Millau <-> Rialto messages. - -use bp_xcm_bridge_hub::BridgeId; -use frame_support::parameter_types; -use xcm::prelude::*; - -parameter_types! { - /// Bridge identifier that is used to bridge with Millau. - pub Bridge: BridgeId = BridgeId::new( - &InteriorMultiLocation::from(crate::xcm_config::ThisNetwork::get()).into(), - &InteriorMultiLocation::from(crate::xcm_config::MillauNetwork::get()).into(), - ); -} - -#[cfg(test)] -mod tests { - use super::*; - use crate::{MillauGrandpaInstance, Runtime, WithMillauMessagesInstance}; - use bridge_runtime_common::{ - assert_complete_bridge_types, - integrity::{ - assert_complete_with_relay_chain_bridge_constants, check_message_lane_weights, - AssertChainConstants, AssertCompleteBridgeConstants, - }, - }; - - #[test] - fn ensure_millau_message_lane_weights_are_correct() { - check_message_lane_weights::( - bp_millau::EXTRA_STORAGE_PROOF_SIZE, - bp_rialto::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX, - bp_rialto::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX, - false, - ); - } - - #[test] - fn ensure_bridge_integrity() { - assert_complete_bridge_types!( - runtime: Runtime, - with_bridged_chain_grandpa_instance: MillauGrandpaInstance, - with_bridged_chain_messages_instance: WithMillauMessagesInstance, - this_chain: bp_rialto::Rialto, - bridged_chain: bp_millau::Millau, - ); - - assert_complete_with_relay_chain_bridge_constants::< - Runtime, - MillauGrandpaInstance, - WithMillauMessagesInstance, - >(AssertCompleteBridgeConstants { - this_chain_constants: AssertChainConstants { - block_length: bp_rialto::BlockLength::get(), - block_weights: bp_rialto::BlockWeights::get(), - }, - }); - } - - #[test] - fn rialto_millau_bridge_identifier_did_not_changed() { - // there's nothing criminal if it is changed, but then thou need to fix it across - // all deployments scripts, alerts and so on - assert_eq!( - *Bridge::get().lane_id().as_ref(), - hex_literal::hex!("efed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7") - .into(), - ); - } -} diff --git a/bin/rialto/runtime/src/parachains.rs b/bin/rialto/runtime/src/parachains.rs deleted file mode 100644 index 6cf089aa0fc7fd0d0b94eda13c58cb4d511f15ac..0000000000000000000000000000000000000000 --- a/bin/rialto/runtime/src/parachains.rs +++ /dev/null @@ -1,274 +0,0 @@ -// 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 . - -//! Parachains support in Rialto runtime. - -use crate::{ - xcm_config, AccountId, Babe, Balance, Balances, BlockNumber, ParaAssignmentProvider, Registrar, - Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, ShiftSessionManager, Slots, - UncheckedExtrinsic, -}; - -use frame_support::{ - parameter_types, - traits::{KeyOwnerProofSystem, ProcessMessage, ProcessMessageError}, - weights::{Weight, WeightMeter}, -}; -use frame_system::EnsureRoot; -use polkadot_primitives::v6::{ValidatorId, ValidatorIndex}; -use polkadot_runtime_common::{paras_registrar, paras_sudo_wrapper, slots}; -use polkadot_runtime_parachains::{ - configuration as parachains_configuration, disputes as parachains_disputes, - disputes::slashing as parachains_slashing, - dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, - inclusion::{AggregateMessageOrigin, UmpQueueId}, - initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, - paras_inherent as parachains_paras_inherent, scheduler as parachains_scheduler, - session_info as parachains_session_info, shared as parachains_shared, -}; -use sp_core::crypto::KeyTypeId; -use sp_runtime::transaction_validity::TransactionPriority; -use xcm::latest::Junction; - -impl frame_system::offchain::SendTransactionTypes for Runtime -where - RuntimeCall: From, -{ - type Extrinsic = UncheckedExtrinsic; - type OverarchingCall = RuntimeCall; -} - -/// Special `RewardValidators` that does nothing ;) -pub struct RewardValidators; -impl polkadot_runtime_parachains::inclusion::RewardValidators for RewardValidators { - fn reward_backing(_: impl IntoIterator) {} - fn reward_bitfields(_: impl IntoIterator) {} -} - -// all required parachain modules from `polkadot-runtime-parachains` crate - -impl parachains_configuration::Config for Runtime { - type WeightInfo = parachains_configuration::TestWeightInfo; -} - -impl parachains_dmp::Config for Runtime {} - -impl parachains_hrmp::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type ChannelManager = EnsureRoot; - type Currency = Balances; - type WeightInfo = parachains_hrmp::TestWeightInfo; -} - -impl parachains_inclusion::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RewardValidators = RewardValidators; - type DisputesHandler = (); - type MessageQueue = crate::MessageQueue; - type WeightInfo = (); -} - -impl parachains_initializer::Config for Runtime { - type Randomness = pallet_babe::RandomnessFromOneEpochAgo; - type ForceOrigin = EnsureRoot; - type WeightInfo = (); -} - -impl parachains_disputes::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RewardValidators = (); - type SlashingHandler = (); - type WeightInfo = parachains_disputes::TestWeightInfo; -} - -impl parachains_slashing::Config for Runtime { - type KeyOwnerProofSystem = (); - type KeyOwnerProof = - >::Proof; - type KeyOwnerIdentification = >::IdentificationTuple; - type HandleReports = (); - type WeightInfo = parachains_slashing::TestWeightInfo; - type BenchmarkingConfig = parachains_slashing::BenchConfig<200>; -} - -impl parachains_origin::Config for Runtime {} - -parameter_types! { - pub const ParasUnsignedPriority: TransactionPriority = TransactionPriority::max_value(); -} - -impl parachains_paras::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = ParasWeightInfo; - type UnsignedPriority = ParasUnsignedPriority; - type QueueFootprinter = crate::ParaInclusion; - type NextSessionRotation = Babe; - type OnNewHead = (); -} - -/// Test weight for the `Paras` pallet. -/// -/// We can't use `parachains_paras::TestWeightInfo` anymore, because it returns `Weight::MAX` -/// where we need some real-world weights. We'll use zero weights here, though to avoid -/// adding benchmarks to Rialto runtime. -pub struct ParasWeightInfo; - -impl parachains_paras::WeightInfo for ParasWeightInfo { - fn force_set_current_code(_c: u32) -> Weight { - Weight::zero() - } - fn force_set_current_head(_s: u32) -> Weight { - Weight::zero() - } - - fn force_set_most_recent_context() -> Weight { - Weight::zero() - } - - fn force_schedule_code_upgrade(_c: u32) -> Weight { - Weight::zero() - } - fn force_note_new_head(_s: u32) -> Weight { - Weight::zero() - } - fn force_queue_action() -> Weight { - Weight::zero() - } - fn add_trusted_validation_code(_c: u32) -> Weight { - Weight::zero() - } - fn poke_unused_validation_code() -> Weight { - Weight::zero() - } - fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight { - Weight::zero() - } - fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight { - Weight::zero() - } - fn include_pvf_check_statement_finalize_onboarding_accept() -> Weight { - Weight::zero() - } - fn include_pvf_check_statement_finalize_onboarding_reject() -> Weight { - Weight::zero() - } - fn include_pvf_check_statement() -> Weight { - Weight::zero() - } -} - -impl parachains_paras_inherent::Config for Runtime { - type WeightInfo = parachains_paras_inherent::TestWeightInfo; -} - -impl polkadot_runtime_parachains::assigner_parachains::Config for Runtime {} - -impl parachains_scheduler::Config for Runtime { - type AssignmentProvider = ParaAssignmentProvider; -} - -impl parachains_session_info::Config for Runtime { - type ValidatorSet = ShiftSessionManager; -} - -impl parachains_shared::Config for Runtime {} - -parameter_types! { - /// Amount of weight that can be spent per block to service messages. - /// - /// # WARNING - /// - /// This is not a good value for para-chains since the `Scheduler` - /// already uses up to 80 percent block weight. - pub MessageQueueServiceWeight: Weight = crate::Perbill::from_percent(20) * bp_rialto::BlockWeights::get().max_block; - pub const MessageQueueHeapSize: u32 = 32 * 1024; - pub const MessageQueueMaxStale: u32 = 96; -} - -/// Message processor to handle any messages that were enqueued into the `MessageQueue` pallet. -pub struct MessageProcessor; -impl ProcessMessage for MessageProcessor { - type Origin = AggregateMessageOrigin; - - fn process_message( - message: &[u8], - origin: Self::Origin, - meter: &mut WeightMeter, - id: &mut [u8; 32], - ) -> Result { - let para = match origin { - AggregateMessageOrigin::Ump(UmpQueueId::Para(para)) => para, - }; - xcm_builder::ProcessXcmMessage::< - Junction, - xcm_executor::XcmExecutor, - RuntimeCall, - >::process_message(message, Junction::Parachain(para.into()), meter, id) - } -} - -impl pallet_message_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Size = u32; - type HeapSize = MessageQueueHeapSize; - type MaxStale = MessageQueueMaxStale; - type ServiceWeight = MessageQueueServiceWeight; - #[cfg(not(feature = "runtime-benchmarks"))] - type MessageProcessor = MessageProcessor; - #[cfg(feature = "runtime-benchmarks")] - type MessageProcessor = - pallet_message_queue::mock_helpers::NoopMessageProcessor; - type QueueChangeHandler = crate::ParaInclusion; - type WeightInfo = (); - type QueuePausedQuery = (); -} - -// required onboarding pallets. We're not going to use auctions or crowdloans, so they're missing - -parameter_types! { - pub const ParaDeposit: Balance = 0; - pub const DataDepositPerByte: Balance = 0; -} - -impl paras_registrar::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type Currency = Balances; - type OnSwap = Slots; - type ParaDeposit = ParaDeposit; - type DataDepositPerByte = DataDepositPerByte; - type WeightInfo = paras_registrar::TestWeightInfo; -} - -parameter_types! { - pub const LeasePeriod: BlockNumber = 10 * bp_rialto::MINUTES; -} - -impl slots::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type Registrar = Registrar; - type LeasePeriod = LeasePeriod; - type WeightInfo = slots::TestWeightInfo; - type LeaseOffset = (); - type ForceOrigin = EnsureRoot; -} - -impl paras_sudo_wrapper::Config for Runtime {} diff --git a/bin/rialto/runtime/src/xcm_config.rs b/bin/rialto/runtime/src/xcm_config.rs deleted file mode 100644 index 7b13ab84d48ec1afea998afefe5684a337d6d91a..0000000000000000000000000000000000000000 --- a/bin/rialto/runtime/src/xcm_config.rs +++ /dev/null @@ -1,298 +0,0 @@ -// 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 . - -//! XCM configurations for the Rialto runtime. - -use super::{ - AccountId, AllPalletsWithSystem, Balances, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, - XcmPallet, -}; -use bp_rialto::WeightToFee; -use bridge_runtime_common::CustomNetworkId; -use frame_support::{ - parameter_types, - traits::{ConstU32, Everything, Nothing}, - weights::Weight, -}; -use frame_system::EnsureRoot; -use xcm::latest::prelude::*; -use xcm_builder::{ - Account32Hash, AccountId32Aliases, CurrencyAdapter as XcmCurrencyAdapter, IsConcrete, - MintLocation, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, - TakeWeightCredit, UsingComponents, -}; - -parameter_types! { - /// The location of the `MLAU` token, from the context of this chain. Since this token is native to this - /// chain, we make it synonymous with it and thus it is the `Here` location, which means "equivalent to - /// the context". - pub const TokenLocation: MultiLocation = Here.into_location(); - /// The Rialto network ID. - pub const ThisNetwork: NetworkId = CustomNetworkId::Rialto.as_network_id(); - /// The Millau network ID. - pub const MillauNetwork: NetworkId = CustomNetworkId::Millau.as_network_id(); - - /// Our XCM location ancestry - i.e. our location within the Consensus Universe. - /// - /// Since Polkadot is a top-level relay-chain with its own consensus, it's just our network ID. - pub UniversalLocation: InteriorMultiLocation = ThisNetwork::get().into(); - /// The check account, which holds any native assets that have been teleported out and not back in (yet). - pub CheckAccount: (AccountId, MintLocation) = (XcmPallet::check_account(), MintLocation::Local); -} - -/// The canonical means of converting a `MultiLocation` into an `AccountId`, used when we want to -/// determine the sovereign account controlled by a location. -pub type SovereignAccountOf = ( - // We can directly alias an `AccountId32` into a local account. - AccountId32Aliases, - // Dummy stuff for our tests. - Account32Hash, -); - -/// Our asset transactor. This is what allows us to interest with the runtime facilities from the -/// point of view of XCM-only concepts like `MultiLocation` and `MultiAsset`. -/// -/// Ours is only aware of the Balances pallet, which is mapped to `TokenLocation`. -pub type LocalAssetTransactor = XcmCurrencyAdapter< - // Use this currency: - Balances, - // Use this currency when it is a fungible asset matching the given location or name: - IsConcrete, - // We can convert the MultiLocations with our converter above: - SovereignAccountOf, - // Our chain's account ID type (we can't get away without mentioning it explicitly): - AccountId, - // We track our teleports in/out to keep total issuance correct. - CheckAccount, ->; - -/// The means that we convert the XCM message origin location into a local dispatch origin. -type LocalOriginConverter = ( - // A `Signed` origin of the sovereign account that the original location controls. - SovereignSignedViaLocation, - // The AccountId32 location type can be expressed natively as a `Signed` origin. - SignedAccountId32AsNative, -); - -parameter_types! { - /// The amount of weight an XCM operation takes. This is a safe overestimate. - pub const BaseXcmWeight: Weight = Weight::from_parts(1_000_000_000, 64 * 1024); - /// Maximum number of instructions in a single XCM fragment. A sanity check against weight - /// calculations getting too crazy. - pub const MaxInstructions: u32 = 100; -} - -/// The XCM router. We are not sending messages to sibling/parent/child chains here. -pub type XcmRouter = (); - -/// The barriers one of which must be passed for an XCM message to be executed. -pub type Barrier = ( - // Weight that is paid for may be consumed. - TakeWeightCredit, -); - -/// Dispatches received XCM messages from other chain. -pub type OnRialtoBlobDispatcher = xcm_builder::BridgeBlobDispatcher< - crate::xcm_config::XcmRouter, - crate::xcm_config::UniversalLocation, - (), ->; - -/// Incoming XCM weigher type. -pub type XcmWeigher = xcm_builder::FixedWeightBounds; - -pub struct XcmConfig; -impl xcm_executor::Config for XcmConfig { - type RuntimeCall = RuntimeCall; - type XcmSender = (); - type AssetTransactor = LocalAssetTransactor; - type OriginConverter = LocalOriginConverter; - type IsReserve = (); - type IsTeleporter = (); - type UniversalLocation = UniversalLocation; - type Barrier = Barrier; - type Weigher = XcmWeigher; - // The weight trader piggybacks on the existing transaction-fee conversion logic. - type Trader = UsingComponents; - type ResponseHandler = XcmPallet; - type AssetTrap = XcmPallet; - type AssetLocker = (); - type AssetExchanger = (); - type AssetClaims = XcmPallet; - type SubscriptionService = XcmPallet; - type PalletInstancesInfo = AllPalletsWithSystem; - type MaxAssetsIntoHolding = ConstU32<64>; - type FeeManager = (); - type MessageExporter = crate::XcmMillauBridgeHub; - type UniversalAliases = Nothing; - type CallDispatcher = RuntimeCall; - type SafeCallFilter = Everything; - type Aliasers = Nothing; -} - -/// Type to convert an `Origin` type value into a `MultiLocation` value which represents an interior -/// location of this chain. -pub type LocalOriginToLocation = ( - // Usual Signed origin to be used in XCM as a corresponding AccountId32 - SignedToAccountId32, -); - -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = None; -} - -impl pallet_xcm::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - // We don't allow any messages to be sent via the transaction yet. This is basically safe to - // enable, (safe the possibility of someone spamming the parachain if they're willing to pay - // the DOT to send from the Relay-chain). But it's useless until we bring in XCM v3 which will - // make `DescendOrigin` a bit more useful. - type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; - type XcmRouter = XcmRouter; - // Anyone can execute XCM messages locally. - type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; - type XcmExecuteFilter = Everything; - type XcmExecutor = xcm_executor::XcmExecutor; - // Anyone is able to use teleportation regardless of who they are and what they want to - // teleport. - type XcmTeleportFilter = Everything; - // Anyone is able to use reserve transfers regardless of who they are and what they want to - // transfer. - type XcmReserveTransferFilter = Everything; - type Weigher = XcmWeigher; - type UniversalLocation = UniversalLocation; - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; - type Currency = Balances; - type CurrencyMatcher = (); - type TrustedLockers = (); - type SovereignAccountOf = SovereignAccountOf; - type MaxLockers = frame_support::traits::ConstU32<8>; - type WeightInfo = pallet_xcm::TestWeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; - type AdminOrigin = EnsureRoot; - type MaxRemoteLockConsumers = ConstU32<0>; - type RemoteLockConsumerIdentifier = (); -} - -#[cfg(test)] -mod tests { - use super::*; - use crate::{WithMillauMessagesInstance, WithMillauXcmBridgeHubInstance, XcmMillauBridgeHub}; - use bp_messages::{ - target_chain::{DispatchMessage, DispatchMessageData, MessageDispatch}, - MessageKey, OutboundLaneData, - }; - use bp_xcm_bridge_hub::{Bridge, BridgeState}; - use codec::Encode; - use pallet_bridge_messages::OutboundLanes; - use pallet_xcm_bridge_hub::Bridges; - use sp_runtime::BuildStorage; - use xcm_executor::XcmExecutor; - - fn new_test_ext() -> sp_io::TestExternalities { - sp_io::TestExternalities::new( - frame_system::GenesisConfig::::default().build_storage().unwrap(), - ) - } - - fn prepare_outbound_xcm_message(destination: NetworkId) -> Xcm { - vec![ExportMessage { - network: destination, - destination: destination.into(), - xcm: vec![Instruction::Trap(42)].into(), - }] - .into() - } - - #[test] - fn xcm_messages_to_millau_are_sent_using_bridge_exporter() { - new_test_ext().execute_with(|| { - // ensure that the there are no messages queued - let bridge_id = crate::millau_messages::Bridge::get(); - let lane_id = bridge_id.lane_id(); - Bridges::::insert( - bridge_id, - Bridge { - bridge_origin_relative_location: Box::new(MultiLocation::new(0, Here).into()), - state: BridgeState::Opened, - bridge_owner_account: [0u8; 32].into(), - reserve: 0, - }, - ); - OutboundLanes::::insert( - lane_id, - OutboundLaneData::opened(), - ); - assert_eq!( - OutboundLanes::::get(lane_id) - .unwrap() - .latest_generated_nonce, - 0, - ); - - // export message instruction "sends" message to Rialto - XcmExecutor::::execute_xcm_in_credit( - Here, - prepare_outbound_xcm_message(MillauNetwork::get()), - Default::default(), - Weight::MAX, - Weight::MAX, - ) - .ensure_complete() - .expect("runtime configuration must be correct"); - - // ensure that the message has been queued - assert_eq!( - OutboundLanes::::get(lane_id) - .unwrap() - .latest_generated_nonce, - 1, - ); - }) - } - - fn prepare_inbound_bridge_message() -> DispatchMessage> { - let xcm = xcm::VersionedXcm::::V3(vec![Instruction::Trap(42)].into()); - let location = - xcm::VersionedInteriorMultiLocation::V3(X1(GlobalConsensus(ThisNetwork::get()))); - // this is the `BridgeMessage` from polkadot xcm builder, but it has no constructor - // or public fields, so just tuple - let bridge_message = (location, xcm).encode(); - let lane_id = crate::millau_messages::Bridge::get().lane_id(); - DispatchMessage { - key: MessageKey { lane_id, nonce: 1 }, - data: DispatchMessageData { payload: Ok(bridge_message) }, - } - } - - #[test] - fn xcm_messages_from_millau_are_dispatched() { - let incoming_message = prepare_inbound_bridge_message(); - - // we care only about handing message to the XCM dispatcher, so we don't care about its - // actual dispatch - let dispatch_result = XcmMillauBridgeHub::dispatch(incoming_message); - assert!(matches!( - dispatch_result.dispatch_level_result, - pallet_xcm_bridge_hub::XcmBlobMessageDispatchResult::NotDispatched(_), - )); - } -} diff --git a/bin/runtime-common/Cargo.toml b/bin/runtime-common/Cargo.toml index 6f43713af0e8bd95cb20a559833b33f33eaf49e0..2e4b4fbf94c4bc5f308d3a78350dd6b74d73da4f 100644 --- a/bin/runtime-common/Cargo.toml +++ b/bin/runtime-common/Cargo.toml @@ -7,6 +7,9 @@ edition.workspace = true repository.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } hash-db = { version = "0.16.0", default-features = false } @@ -51,7 +54,7 @@ pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = pallet-bridge-messages = { path = "../../modules/messages", features = ["std", "test-helpers"] } [features] -default = [ "std" ] +default = ["std"] std = [ "bp-header-chain/std", "bp-messages/std", @@ -94,4 +97,4 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", ] -integrity-test = [ "static_assertions" ] +integrity-test = ["static_assertions"] diff --git a/bin/runtime-common/src/lib.rs b/bin/runtime-common/src/lib.rs index 5723b20e8800e1d5d7b1f66cf51d5173b40cdb48..daa5606d66ad3eac9dcc0390f0bae7aa07fc23c3 100644 --- a/bin/runtime-common/src/lib.rs +++ b/bin/runtime-common/src/lib.rs @@ -23,7 +23,6 @@ use pallet_bridge_grandpa::CallSubType as GrandpaCallSubType; use pallet_bridge_messages::CallSubType as MessagesCallSubType; use pallet_bridge_parachains::CallSubType as ParachainsCallSubtype; use sp_runtime::transaction_validity::TransactionValidity; -use xcm::v3::NetworkId; pub mod messages_api; pub mod messages_benchmarking; @@ -83,8 +82,8 @@ where /// ```nocompile /// generate_bridge_reject_obsolete_headers_and_messages!{ /// Call, AccountId -/// BridgeRialtoGrandpa, BridgeWestendGrandpa, -/// BridgeRialtoParachains +/// BridgeRococoGrandpa, BridgeRococoMessages, +/// BridgeRococoParachains /// } /// ``` /// @@ -138,47 +137,6 @@ macro_rules! generate_bridge_reject_obsolete_headers_and_messages { }; } -/// A mapping over `NetworkId`. -/// Since `NetworkId` doesn't include `Millau`, `Rialto` and `RialtoParachain`, we create some -/// synthetic associations between these chains and `NetworkId` chains. -pub enum CustomNetworkId { - /// The Millau network ID, associated with Kusama. - Millau, - /// The Rialto network ID, associated with Polkadot. - Rialto, - /// The RialtoParachain network ID, associated with Westend. - RialtoParachain, -} - -impl TryFrom for CustomNetworkId { - type Error = (); - - fn try_from(chain: bp_runtime::ChainId) -> Result { - // TODO: this code needs to be removed or fixed (use constants) in the - // https://github.com/paritytech/parity-bridges-common/issues/2068 - if chain == *b"mlau" { - Ok(Self::Millau) - } else if chain == *b"rlto" { - Ok(Self::Rialto) - } else if chain == *b"rlpa" { - Ok(Self::RialtoParachain) - } else { - Err(()) - } - } -} - -impl CustomNetworkId { - /// Converts self to XCM' network id. - pub const fn as_network_id(&self) -> NetworkId { - match *self { - CustomNetworkId::Millau => NetworkId::Kusama, - CustomNetworkId::Rialto => NetworkId::Polkadot, - CustomNetworkId::RialtoParachain => NetworkId::Westend, - } - } -} - #[cfg(test)] mod tests { use crate::BridgeRuntimeFilterCall; diff --git a/bin/runtime-common/src/messages_benchmarking.rs b/bin/runtime-common/src/messages_benchmarking.rs index 95c8dc86ac31ccc4b96f7f29c36e1cc311a0b404..79068bf3cc18e3754d48f4fcb0b993d8b895e601 100644 --- a/bin/runtime-common/src/messages_benchmarking.rs +++ b/bin/runtime-common/src/messages_benchmarking.rs @@ -37,7 +37,7 @@ use pallet_bridge_messages::{ }; use sp_runtime::traits::{Header, Zero}; use sp_std::prelude::*; -use xcm::v3::prelude::*; +use xcm::latest::prelude::*; /// Prepare inbound bridge message according to given message proof parameters. fn prepare_inbound_message( @@ -273,19 +273,19 @@ where /// Returns callback which generates `BridgeMessage` from Polkadot XCM builder based on /// `expected_message_size` for benchmark. pub fn generate_xcm_builder_bridge_message_sample( - destination: InteriorMultiLocation, + destination: InteriorLocation, ) -> impl Fn(usize) -> MessagePayload { move |expected_message_size| -> MessagePayload { // For XCM bridge hubs, it is the message that // will be pushed further to some XCM queue (XCMP/UMP) - let location = xcm::VersionedInteriorMultiLocation::V3(destination); + let location = xcm::VersionedInteriorLocation::V4(destination.clone()); let location_encoded_size = location.encoded_size(); // we don't need to be super-precise with `expected_size` here let xcm_size = expected_message_size.saturating_sub(location_encoded_size); let xcm_data_size = xcm_size.saturating_sub( // minus empty instruction size - xcm::v3::Instruction::<()>::ExpectPallet { + Instruction::<()>::ExpectPallet { index: 0, name: vec![], module_name: vec![], @@ -301,8 +301,8 @@ pub fn generate_xcm_builder_bridge_message_sample( expected_message_size, location_encoded_size, xcm_size, xcm_data_size, ); - let xcm = xcm::VersionedXcm::<()>::V3( - vec![xcm::v3::Instruction::<()>::ExpectPallet { + let xcm = xcm::VersionedXcm::<()>::V4( + vec![Instruction::<()>::ExpectPallet { index: 0, name: vec![42; xcm_data_size], module_name: vec![], diff --git a/deployments/README.md b/deployments/README.md deleted file mode 100644 index 9747ed519fc29cb27a8e707f9696ce4387ae9eb0..0000000000000000000000000000000000000000 --- a/deployments/README.md +++ /dev/null @@ -1,270 +0,0 @@ -# Bridge Deployments - -## Requirements - -Make sure to install `docker` and `docker-compose` to be able to run and test bridge deployments. If -for whatever reason you can't or don't want to use Docker, you can find some scripts for running the -bridge [here](./local-scripts/). - -## Networks - -One of the building blocks we use for our deployments are _networks_. A network is a collection of -homogenous blockchain nodes. We have Docker Compose files for each network that we want to bridge. -Each of the compose files found in the `./networks` folder is able to independently spin up a -network like so: - -```bash -docker-compose -f ./networks/rialto.yml up -``` - -After running this command we would have a network of several nodes producing blocks. - -## Bridges - -A _bridge_ is a way for several _networks_ to connect to one another. Bridge deployments have their -own Docker Compose files which can be found in the `./bridges` folder. These Compose files typically -contain bridge relayers, which are services external to blockchain nodes, and other components such -as testing infrastructure, or user interfaces. - -Unlike the network Compose files, these *cannot* be deployed on their own. They must be combined -with different networks. - -In general, we can deploy the bridge using `docker-compose up` in the following way: - -```bash -docker-compose -f .yml \ - -f .yml \ - -f .yml \ - -f .yml up -``` - -If you want to see how the Compose commands are actually run, check out the source code of the -[`./run.sh`](./run.sh). - -One thing worth noting is that we have a _monitoring_ Compose file. This adds support for Prometheus -and Grafana. We cover these in more details in the [Monitoring](#monitoring) section. At the moment -the monitoring Compose file is _not_ optional, and must be included for bridge deployments. - -### Running and Updating Deployments - -We currently support three bridge deployments -1. Rialto Substrate to Millau Substrate -2. Rialto Parachain Substrate to Millau Substrate -2. Westend Substrate to Millau Substrate (only finality bridge) - -These bridges can be deployed using our [`./run.sh`](./run.sh) script. - -The first argument it takes is the name of the bridge you want to run. Right now we only support three -bridges: `rialto-millau`, `rialto-parachain-millau` and `westend-millau`. - -```bash -./run.sh rialto-millau -``` - -If you add a second `update` argument to the script it will pull the latest images from Docker Hub -and restart the deployment. - -```bash -./run.sh rialto-millau update -``` - -You can also bring down a deployment using the script with the `stop` argument. - -```bash -./run.sh rialto-millau stop -``` - -### Adding Deployments - -We need two main things when adding a new deployment. First, the new network which we want to -bridge. A compose file for the network should be added in the `/networks/` folder. Secondly we'll -need a new bridge Compose file in `./bridges/`. This should configure the bridge relayer nodes -correctly for the two networks, and add any additional components needed for the deployment. If you -want you can also add support in the `./run.sh` script for the new deployment. While recommended it's -not strictly required. - -## General Notes - -Rialto authorities are named: `Alice`, `Bob`, `Charlie`, `Dave`, `Eve`. -Millau authorities are named: `Alice`, `Bob`, `Charlie`, `Dave`, `Eve`. -RialtoParachain authorities are named: `Alice`, `Bob`. - -`Sudo` is a sudo account on all chains. - -Both authorities and following accounts have enough funds (for test purposes) on corresponding Substrate chains: - -- on Rialto: `Ferdie`. -- on Millau: `Ferdie`. -- on RialtoParachain: `Charlie`, `Dave`, `Eve`, `Ferdie`. - -Names of accounts on Substrate (Rialto and Millau) chains may be prefixed with `//` and used as -seeds for the `sr25519` keys. This seed may also be used in the signer argument in Substrate relays. -Example: - -```bash -./substrate-relay relay-headers rialto-to-millau \ - --source-host rialto-node-alice \ - --source-port 9944 \ - --target-host millau-node-alice \ - --target-port 9944 \ - --source-signer //Ferdie \ - --prometheus-host=0.0.0.0 -``` - -Some accounts are used by bridge components. Using these accounts to sign other transactions -is not recommended, because this may lead to nonces conflict. - -Following accounts are used when `rialto-millau` bridge is running: - -- Millau's `Rialto.HeadersAndMessagesRelay1` signs complex headers+messages relay transactions on Millau chain; -- Rialto's `Millau.HeadersAndMessagesRelay1` signs complex headers+messages relay transactions on Rialto chain; -- Millau's `Rialto.MessagesSender` signs Millau transactions which contain messages for Rialto; -- Rialto's `Millau.MessagesSender` signs Rialto transactions which contain messages for Millau; -- Millau's `Rialto.OutboundMessagesRelay.Lane00000001` signs relay transactions with message delivery confirmations (lane 00000001) from Rialto to Millau; -- Rialto's `Millau.InboundMessagesRelay.Lane00000001` signs relay transactions with messages (lane 00000001) from Millau to Rialto; -- Millau's `Millau.OutboundMessagesRelay.Lane00000001` signs relay transactions with messages (lane 00000001) from Rialto to Millau; -- Rialto's `Rialto.InboundMessagesRelay.Lane00000001` signs relay transactions with message delivery confirmations (lane 00000001) from Millau to Rialto; -- Millau's `Rialto.MessagesOwner` signs relay transactions with updated Rialto -> Millau conversion rate; -- Rialto's `Millau.MessagesOwner` signs relay transactions with updated Millau -> Rialto conversion rate. - -Following accounts are used when `westend-millau` bridge is running: - -- Millau's `Westend.GrandpaOwner` is signing with-Westend GRANDPA pallet initialization transaction. -- Millau's `Westend.HeadersRelay1` and `Westend.HeadersRelay2` are signing transactions with new Westend headers. -- Millau's `Westend.AssetHubWestendHeaders1` and `Westend.AssetHubWestendHeaders2` is signing transactions with new Westming headers. - -Following accounts are used when `rialto-parachain-millau` bridge is running: - -- RialtoParachain's `Millau.MessagesSender` signs RialtoParachain transactions which contain messages for Millau; -- Millau's `RialtoParachain.MessagesSender` signs Millau transactions which contain messages for RialtoParachain; -- Millau's `RialtoParachain.HeadersAndMessagesRelay` signs complex headers+parachains+messages relay transactions on Millau chain; -- RialtoParachain's `Millau.HeadersAndMessagesRelay` signs complex headers+messages relay transactions on RialtoParachain chain. - -### Docker Usage - -When the network is running you can query logs from individual nodes using: - -```bash -docker logs rialto_millau-node-charlie_1 -f -``` - -You may use the [dump-logs.sh](../scripts/dump-logs.sh) to dump logs of most of running containers. - -To kill all leftover containers and start the network from scratch next time: -```bash -docker ps -a --format "{{.ID}}" | xargs docker rm # This removes all containers! -``` - -### Docker Compose Usage - -If you're not familiar with how to use `docker-compose` here are some useful commands you'll need -when interacting with the bridge deployments: - -```bash -docker-compose pull # Get the latest images from the Docker Hub -docker-compose build # This is going to build images -docker-compose up # Start all the nodes -docker-compose up -d # Start the nodes in detached mode. -docker-compose down # Stop the network. -``` - -Note that you'll also need to add the appropriate `-f` arguments that were mentioned in the -[Bridges](#bridges) section. You can read more about using multiple Compose files -[here](https://docs.docker.com/compose/extends/#multiple-compose-files). One thing worth noting is -that the _order_ the compose files are specified in matters. A different order will result in a -different configuration. - -You can sanity check the final config like so: - -```bash -docker-compose -f docker-compose.yml -f docker-compose.override.yml config > docker-compose.merged.yml -``` - -## Docker and Git Deployment - -It is also possible to avoid using images from the Docker Hub and instead build -containers from Git. There are two ways to build the images this way. - -### Git Repo - -If you have cloned the bridges repo you can build local Docker images by running the following -command at the top level of the repo: - -```bash -docker build . -t local/ --build-arg=PROJECT= -``` - -This will build a local image of a particular component with a tag of -`local/`. This tag can be used in Docker Compose files. - -You can configure the build using Docker -[build arguments](https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables---build-arg). -Here are the arguments currently supported: - - `PROJECT`: Project to build withing bridges repo. Can be one of: - - `rialto-bridge-node` - - `millau-bridge-node` - - `rialto-parachain-collator` - - `substrate-relay` - -You may use the [build-containers.sh](../scripts/build-containers.sh) script to build all available -containers. - -### GitHub Actions - -We have a nightly job which runs and publishes Docker images for the different nodes and relayers to -the [ParityTech Docker Hub](https://hub.docker.com/u/paritytech) organization. These images are used -for our ephemeral (temporary) test networks. Additionally, any time a tag in the form of `v*` is -pushed to GitHub the publishing job is run. This will build all the components (nodes, relayers) and -publish them. - -With images built using either method, all you have to do to use them in a deployment is change the -`image` field in the existing Docker Compose files to point to the tag of the image you want to use. - -### Monitoring - -[Prometheus](https://prometheus.io/) is used by the bridge relay to monitor information such as system -resource use, and block data (e.g the best blocks it knows about). In order to visualize this data -a [Grafana](https://grafana.com/) dashboard can be used. - -As part of the Rialto `docker-compose` setup we spin up a Prometheus server and Grafana dashboard. The -Prometheus server connects to the Prometheus data endpoint exposed by the bridge relay. The Grafana -dashboard uses the Prometheus server as its data source. - -The default port for the bridge relay's Prometheus data is `9616`. The host and port can be -configured though the `--prometheus-host` and `--prometheus-port` flags. The Prometheus server's -dashboard can be accessed at `http://localhost:9090`. The Grafana dashboard can be accessed at -`http://localhost:3000`. Note that the default log-in credentials for Grafana are `admin:admin`. - -### Environment Variables - -Here is an example `.env` file which is used for production deployments and network updates. For -security reasons it is not kept as part of version control. When deploying a network this -file should be correctly populated and kept in the appropriate [`bridges`](`./bridges`) deployment -folder. - -The `UI_SUBSTRATE_PROVIDER` variable lets you define the url of the Substrate node that the user -interface will connect to. `UI_ETHEREUM_PROVIDER` is used only as a guidance for users to connect -Metamask to the right Ethereum network. `UI_EXPECTED_ETHEREUM_NETWORK_ID` is used by -the user interface as a fail safe to prevent users from connecting their Metamask extension to an -unexpected network. - -```bash -GRAFANA_ADMIN_PASS=admin_pass -GRAFANA_SERVER_ROOT_URL=%(protocol)s://%(domain)s:%(http_port)s/ -GRAFANA_SERVER_DOMAIN=server.domain.io -MATRIX_ACCESS_TOKEN="access-token" -WITH_PROXY=1 # Optional -UI_SUBSTRATE_PROVIDER=ws://localhost:9944 -UI_ETHEREUM_PROVIDER=http://localhost:8545 -UI_EXPECTED_ETHEREUM_NETWORK_ID=105 -``` - -### UI - -Use [wss://wss.rialto.brucke.link](https://polkadot.js.org/apps/) as a custom endpoint for -[https://polkadot.js.org/apps/](https://polkadot.js.org/apps/). - -## Scripts - -There are some bash scripts in `scripts` folder that allow testing `Relay` -without running the entire network within docker. Use if needed for development. diff --git a/deployments/bridges/common/generate_messages.sh b/deployments/bridges/common/generate_messages.sh deleted file mode 100755 index 0987ff8987e71a60c94741e21fd96f4fdd289972..0000000000000000000000000000000000000000 --- a/deployments/bridges/common/generate_messages.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash - -# Script for generating messages from a source chain to a target chain. -# Prerequisites: mounting the common folder in the docker container (Adding the following volume entry): -# - ./bridges/common:/common -# It can be used by executing `source /common/generate_messages.sh` in a different script, -# after setting the following variables: -# SOURCE_CHAIN -# TARGET_CHAIN -# MAX_SUBMIT_DELAY_S -# SEND_MESSAGE - the command that is executed to send a message -# SECONDARY_EXTRA_ARGS - optional, for example "--use-xcm-pallet" -# EXTRA_ARGS - for example "--use-xcm-pallet" -# REGULAR_PAYLOAD -# MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE - -SECONDARY_EXTRA_ARGS=${SECONDARY_EXTRA_ARGS:-""} - -trap "echo Exiting... TERM; exit $?" TERM - -# Sleep a bit between messages -rand_sleep() { - SUBMIT_DELAY_S=`shuf -i 0-$MAX_SUBMIT_DELAY_S -n 1` - echo "Sleeping $SUBMIT_DELAY_S seconds..." - sleep $SUBMIT_DELAY_S & wait $! - NOW=`date "+%Y-%m-%d %H:%M:%S"` - echo "Woke up at $NOW" -} - -# start sending large messages immediately -LARGE_MESSAGES_TIME=0 -# start sending message packs in a hour -BUNCH_OF_MESSAGES_TIME=3600 - -while true -do - rand_sleep - - # send regular message - echo "Sending Message from $SOURCE_CHAIN to $TARGET_CHAIN" - $SEND_MESSAGE $EXTRA_ARGS raw $REGULAR_PAYLOAD - - # every other hour we're sending 3 large (size, weight, size+weight) messages - if [ $SECONDS -ge $LARGE_MESSAGES_TIME ]; then - LARGE_MESSAGES_TIME=$((SECONDS + 7200)) - - rand_sleep - echo "Sending Maximal Size Message from $SOURCE_CHAIN to $TARGET_CHAIN" - $SEND_MESSAGE \ - sized max - fi - - # every other hour we're sending a bunch of small messages - if [ $SECONDS -ge $BUNCH_OF_MESSAGES_TIME ]; then - BUNCH_OF_MESSAGES_TIME=$((SECONDS + 7200)) - - for i in $(seq 0 $MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE); - do - $SEND_MESSAGE \ - $EXTRA_ARGS \ - raw $REGULAR_PAYLOAD - done - - fi -done diff --git a/deployments/bridges/rialto-millau/dashboard/grafana/relay-millau-to-rialto-messages-dashboard.json b/deployments/bridges/rialto-millau/dashboard/grafana/relay-millau-to-rialto-messages-dashboard.json deleted file mode 100644 index 44ec8454b32ef17c637706f7461394f1a83719ef..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-millau/dashboard/grafana/relay-millau-to-rialto-messages-dashboard.json +++ /dev/null @@ -1,1153 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "links": [], - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 0 - }, - "hiddenSeries": false, - "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "Millau_to_Rialto_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_best_target_block_number", - "instant": false, - "interval": "", - "legendFormat": "At Rialto", - "refId": "A" - }, - { - "expr": "Millau_to_Rialto_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_best_target_at_source_block_number", - "instant": false, - "interval": "", - "legendFormat": "At Millau", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Best finalized Rialto headers", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 0 - }, - "hiddenSeries": false, - "id": 4, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "Millau_to_Rialto_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_best_source_block_number", - "interval": "", - "legendFormat": "At Millau", - "refId": "A" - }, - { - "expr": "Millau_to_Rialto_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_best_source_at_target_block_number", - "interval": "", - "legendFormat": "At Rialto", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Best finalized Millau headers", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 1 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "max" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "20m", - "frequency": "1m", - "handler": 1, - "name": "Millau -> Rialto messages are not detected by relay", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 11, - "w": 12, - "x": 0, - "y": 9 - }, - "hiddenSeries": false, - "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "label_replace(label_replace(Millau_to_Rialto_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=~\"source_latest_generated|target_latest_received\"}, \"type\", \"Latest message sent from Rialto\", \"type\", \"source_latest_generated\"), \"type\", \"Latest Rialto message received by Millau\", \"type\", \"target_latest_received\")", - "interval": "", - "legendFormat": "{{type}}", - "refId": "A" - }, - { - "expr": "increase(Millau_to_Rialto_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"source_latest_generated\"}[10m]) OR on() vector(0)", - "hide": true, - "interval": "", - "legendFormat": "Messages generated in last 5 minutes (Millau -> Rialto)", - "refId": "B" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "lt", - "value": 1, - "yaxis": "left" - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Delivery race", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 11, - "w": 12, - "x": 12, - "y": 9 - }, - "hiddenSeries": false, - "id": 8, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "label_replace(label_replace(Millau_to_Rialto_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=~\"source_latest_confirmed|target_latest_received\"}, \"type\", \"Latest message confirmed by Rialto to Millau\", \"type\", \"source_latest_confirmed\"), \"type\", \"Latest Rialto message received by Millau\", \"type\", \"target_latest_received\")", - "interval": "", - "legendFormat": "{{type}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Confirmations race", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 1 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B", - "1m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "sum" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "7m", - "frequency": "1m", - "handler": 1, - "name": "Messages from Millau to Rialto are not being delivered", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 8, - "x": 0, - "y": 20 - }, - "hiddenSeries": false, - "id": 10, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "scalar(max_over_time(Millau_to_Rialto_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"source_latest_generated\"}[2m])) - scalar(max_over_time(Millau_to_Rialto_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"target_latest_received\"}[2m]))", - "format": "time_series", - "instant": false, - "interval": "", - "legendFormat": "Undelivered messages at Rialto", - "refId": "A" - }, - { - "expr": "increase(Millau_to_Rialto_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"target_latest_received\"}[5m]) OR on() vector(0)", - "interval": "", - "legendFormat": "Millau Messages delivered to Rialto in last 5m", - "refId": "B" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "lt", - "value": 1, - "yaxis": "left" - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Delivery race lags", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 50 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "min" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "20m", - "frequency": "1m", - "handler": 1, - "name": "Too many unconfirmed messages (Millau -> Rialto)", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 8, - "x": 8, - "y": 20 - }, - "hiddenSeries": false, - "id": 12, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "scalar(max_over_time(Millau_to_Rialto_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(Millau_to_Rialto_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))", - "interval": "", - "legendFormat": "Unconfirmed messages at Millau", - "refId": "A" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 10, - "yaxis": "left" - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Confirmations race lags", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 10 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "min" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "20m", - "frequency": "1m", - "handler": 1, - "name": "Rewards are not being confirmed (Millau -> Rialto messages)", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 8, - "x": 16, - "y": 20 - }, - "hiddenSeries": false, - "id": 14, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "scalar(max_over_time(Millau_to_Rialto_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"source_latest_confirmed\"}[2m])) - scalar(max_over_time(Millau_to_Rialto_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"target_latest_confirmed\"}[2m]))", - "interval": "", - "legendFormat": "Unconfirmed rewards at Rialto", - "refId": "A" - }, - { - "expr": "(scalar(max_over_time(Millau_to_Rialto_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(Millau_to_Rialto_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(Millau_to_Rialto_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"target_latest_received\"}[2m]) > bool min_over_time(Millau_to_Rialto_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"target_latest_received\"}[2m]))", - "interval": "", - "legendFormat": "Unconfirmed rewards at Millau->Rialto (zero if messages are not being delivered to Rialto)", - "refId": "B" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 10, - "yaxis": "left" - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Reward lags", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 0, - "y": 38 - }, - "id": 16, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "7.1.3", - "targets": [ - { - "expr": "avg_over_time(process_cpu_usage_percentage{instance='relay-millau-rialto:9616'}[1m])", - "instant": true, - "interval": "", - "legendFormat": "1 CPU = 100", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Relay process CPU usage (1 CPU = 100)", - "type": "gauge" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 8, - "x": 8, - "y": 38 - }, - "hiddenSeries": false, - "id": 18, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "system_average_load{instance='relay-millau-rialto:9616'}", - "interval": "", - "legendFormat": "Average system load in last {{over}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "System load average", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 38 - }, - "hiddenSeries": false, - "id": 20, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "process_memory_usage_bytes{instance='relay-millau-rialto:9616'} / 1024 / 1024", - "interval": "", - "legendFormat": "Process memory, MB", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Memory used by relay process", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "5s", - "schemaVersion": 26, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "", - "title": "Millau to Rialto Message Sync Dashboard", - "uid": "relay-millau-to-rialto-messages", - "version": 1 -} diff --git a/deployments/bridges/rialto-millau/dashboard/grafana/relay-rialto-to-millau-messages-dashboard.json b/deployments/bridges/rialto-millau/dashboard/grafana/relay-rialto-to-millau-messages-dashboard.json deleted file mode 100644 index 1dec1b688c98784d566db94d8757115a6558ef21..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-millau/dashboard/grafana/relay-rialto-to-millau-messages-dashboard.json +++ /dev/null @@ -1,1145 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "id": 4, - "links": [], - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 0 - }, - "hiddenSeries": false, - "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "Rialto_to_Millau_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_best_target_block_number", - "instant": false, - "interval": "", - "legendFormat": "At Millau", - "refId": "A" - }, - { - "expr": "Rialto_to_Millau_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_best_target_at_source_block_number", - "instant": false, - "interval": "", - "legendFormat": "At Rialto", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Best finalized Millau headers", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 0 - }, - "hiddenSeries": false, - "id": 4, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "Rialto_to_Millau_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_best_source_block_number", - "interval": "", - "legendFormat": "At Rialto", - "refId": "A" - }, - { - "expr": "Rialto_to_Millau_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_best_source_at_target_block_number", - "interval": "", - "legendFormat": "At Millau", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Best finalized Rialto headers", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 1 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "max" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "20m", - "frequency": "1m", - "handler": 1, - "name": "Rialto -> Millau messages are not detected by relay", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 11, - "w": 12, - "x": 0, - "y": 9 - }, - "hiddenSeries": false, - "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "label_replace(label_replace(Rialto_to_Millau_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=~\"source_latest_generated|target_latest_received\"}, \"type\", \"Latest message sent from Millau\", \"type\", \"source_latest_generated\"), \"type\", \"Latest message received by Rialto\", \"type\", \"target_latest_received\")", - "interval": "", - "legendFormat": "{{type}}", - "refId": "A" - }, - { - "expr": "increase(Rialto_to_Millau_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"source_latest_generated\"}[10m]) OR on() vector(0)", - "hide": true, - "interval": "", - "legendFormat": "Messages generated in last 5 minutes (Rialto -> Millau)", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Delivery race", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 11, - "w": 12, - "x": 12, - "y": 9 - }, - "hiddenSeries": false, - "id": 8, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "label_replace(label_replace(Rialto_to_Millau_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=~\"source_latest_confirmed|target_latest_received\"}, \"type\", \"Latest message confirmed by Millau to Rialto\", \"type\", \"source_latest_confirmed\"), \"type\", \"Latest message received by Rialto\", \"type\", \"target_latest_received\")", - "interval": "", - "legendFormat": "{{type}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Confirmations race", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 1 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B", - "1m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "sum" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "7m", - "frequency": "1m", - "handler": 1, - "name": "Messages from Rialto to Millau are not being delivered", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 8, - "x": 0, - "y": 20 - }, - "hiddenSeries": false, - "id": 10, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "scalar(max_over_time(Rialto_to_Millau_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"source_latest_generated\"}[2m])) - scalar(max_over_time(Rialto_to_Millau_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"target_latest_received\"}[2m]))", - "format": "time_series", - "instant": false, - "interval": "", - "legendFormat": "Undelivered messages at Millau", - "refId": "A" - }, - { - "expr": "increase(Rialto_to_Millau_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"target_latest_received\"}[5m]) OR on() vector(0)", - "interval": "", - "legendFormat": "Rialto Messages delivered to Millau in last 5m", - "refId": "B" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "lt", - "value": 1, - "yaxis": "left" - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Delivery race lags", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 50 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "min" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "20m", - "frequency": "1m", - "handler": 1, - "name": "Too many unconfirmed messages (Rialto -> Millau)", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 8, - "x": 8, - "y": 20 - }, - "hiddenSeries": false, - "id": 12, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "scalar(max_over_time(Rialto_to_Millau_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(Rialto_to_Millau_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))", - "interval": "", - "legendFormat": "Unconfirmed messages at Rialto", - "refId": "A" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 10, - "yaxis": "left" - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Confirmations race lags", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 10 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "min" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "20m", - "frequency": "1m", - "handler": 1, - "name": "Rewards are not being confirmed (Rialto -> Millau messages)", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 8, - "x": 16, - "y": 20 - }, - "hiddenSeries": false, - "id": 14, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "scalar(max_over_time(Rialto_to_Millau_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"source_latest_confirmed\"}[2m])) - scalar(max_over_time(Rialto_to_Millau_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"target_latest_confirmed\"}[2m]))", - "interval": "", - "legendFormat": "Unconfirmed rewards at Millau", - "refId": "A" - }, - { - "expr": "(scalar(max_over_time(Rialto_to_Millau_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(Rialto_to_Millau_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(Rialto_to_Millau_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"target_latest_received\"}[2m]) > bool min_over_time(Rialto_to_Millau_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_lane_state_nonces{type=\"target_latest_received\"}[2m]))", - "interval": "", - "legendFormat": "Unconfirmed rewards at Millau (zero if messages are not being delivered to Millau)", - "refId": "B" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 10, - "yaxis": "left" - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Reward lags", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 0, - "y": 38 - }, - "id": 16, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "7.1.3", - "targets": [ - { - "expr": "avg_over_time(process_cpu_usage_percentage{instance='relay-millau-rialto:9616'}[1m])", - "instant": true, - "interval": "", - "legendFormat": "1 CPU = 100", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Relay process CPU usage (1 CPU = 100)", - "type": "gauge" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 8, - "x": 8, - "y": 38 - }, - "hiddenSeries": false, - "id": 18, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "system_average_load{instance='relay-millau-rialto:9616'}", - "interval": "", - "legendFormat": "Average system load in last {{over}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "System load average", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 38 - }, - "hiddenSeries": false, - "id": 20, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "process_memory_usage_bytes{instance='relay-millau-rialto:9616'} / 1024 / 1024", - "interval": "", - "legendFormat": "Process memory, MB", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Memory used by relay process", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "5s", - "schemaVersion": 26, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "", - "title": "Rialto to Millau Message Sync Dashboard", - "uid": "relay-rialto-to-millau-messages", - "version": 2 -} diff --git a/deployments/bridges/rialto-millau/dashboard/grafana/rialto-millau-maintenance-dashboard.json b/deployments/bridges/rialto-millau/dashboard/grafana/rialto-millau-maintenance-dashboard.json deleted file mode 100644 index 3ce23db469924a972b0e6787eeacef84f486d544..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-millau/dashboard/grafana/rialto-millau-maintenance-dashboard.json +++ /dev/null @@ -1,635 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- 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, - "gnetId": null, - "graphTooltip": 0, - "links": [], - "liveNow": false, - "panels": [ - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 1000 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" - }, - { - "evaluator": { - "params": [ - 1000 - ], - "type": "lt" - }, - "operator": { - "type": "or" - }, - "query": { - "params": [ - "B", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "5m", - "frequency": "1m", - "handler": 1, - "name": "At-Rialto relay balances are too low", - "noDataState": "ok", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 0 - }, - "hiddenSeries": false, - "id": 8, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.2.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "at_Rialto_relay_MillauHeaders_balance", - "interval": "", - "legendFormat": "With-Millau headers relay account balance", - "refId": "A" - }, - { - "expr": "at_Rialto_relay_MillauMessages_balance", - "interval": "", - "legendFormat": "With-Millau messages relay account balance", - "refId": "B" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "lt", - "value": 1000, - "visible": true - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Rialto relay balances", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 1000 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" - }, - { - "evaluator": { - "params": [ - 1000 - ], - "type": "lt" - }, - "operator": { - "type": "or" - }, - "query": { - "params": [ - "B", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "5m", - "frequency": "1m", - "handler": 1, - "name": "At-Millau relay balances are too low", - "noDataState": "ok", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 0 - }, - "hiddenSeries": false, - "id": 9, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.2.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "at_Millau_relay_RialtoHeaders_balance{instance=\"relay-millau-rialto:9616\"}", - "interval": "", - "legendFormat": "With-Rialto headers relay account balance", - "refId": "A" - }, - { - "expr": "at_Millau_relay_RialtoMessages_balance", - "interval": "", - "legendFormat": "With-Rialto messages relay account balance", - "refId": "B" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "lt", - "value": 1000, - "visible": true - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Millau relay balances", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 0 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "max" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "5m", - "frequency": "1m", - "handler": 1, - "name": "Whether with-Rialto-grandpa-pallet and Rialto itself are on different forks alert", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 8 - }, - "hiddenSeries": false, - "id": 11, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.2.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "Rialto_to_Millau_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_is_source_and_source_at_target_using_different_forks OR on() vector(0)", - "interval": "", - "legendFormat": "On different forks?", - "refId": "A" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 0, - "visible": true - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Whether with-Rialto-grandpa-pallet and Rialto itself are on different forks", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 0 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "max" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "5m", - "frequency": "1m", - "handler": 1, - "name": "Whether with-Rialto-grandpa-pallet and Rialto itself are on different forks alert", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 8 - }, - "hiddenSeries": false, - "id": 12, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.2.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "Millau_to_Rialto_MessageLane_0xefed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7_is_source_and_source_at_target_using_different_forks OR on() vector(0)", - "interval": "", - "legendFormat": "On different forks?", - "refId": "A" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 0, - "visible": true - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Whether with-Millau-grandpa-pallet and Millau itself are on different forks", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "10s", - "schemaVersion": 32, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-15m", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Rialto+Millau maintenance dashboard", - "uid": "7AuyrjlMz", - "version": 1 -} diff --git a/deployments/bridges/rialto-millau/dashboard/prometheus/targets.yml b/deployments/bridges/rialto-millau/dashboard/prometheus/targets.yml deleted file mode 100644 index dab53624b61435757ba2a99bc711e280fa9cd054..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-millau/dashboard/prometheus/targets.yml +++ /dev/null @@ -1,4 +0,0 @@ -- targets: - - relay-millau-rialto:9616 - - detect-millau-to-rialto-equivocations:9616 - - detect-rialto-to-millau-equivocations:9616 diff --git a/deployments/bridges/rialto-millau/docker-compose.yml b/deployments/bridges/rialto-millau/docker-compose.yml deleted file mode 100644 index 17225f60db24da749be88438d55b0503af4fee79..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-millau/docker-compose.yml +++ /dev/null @@ -1,109 +0,0 @@ -# Exposed ports: 10000-10005 - -version: '3.5' -services: - # We provide overrides for these particular nodes since they are public facing - # nodes which we use to connect from things like Polkadot JS Apps. - rialto-node-charlie: - environment: - VIRTUAL_HOST: wss.rialto.brucke.link - VIRTUAL_PORT: 9944 - LETSENCRYPT_HOST: wss.rialto.brucke.link - LETSENCRYPT_EMAIL: admin@parity.io - - millau-node-charlie: - environment: - VIRTUAL_HOST: wss.millau.brucke.link - VIRTUAL_PORT: 9944 - LETSENCRYPT_HOST: wss.millau.brucke.link - LETSENCRYPT_EMAIL: admin@parity.io - - relay-millau-rialto: &sub-bridge-relay - image: ${SUBSTRATE_RELAY_IMAGE:-paritytech/substrate-relay} - entrypoint: /entrypoints/relay-millau-rialto-entrypoint.sh - volumes: - - ./bridges/common:/common - - ./bridges/rialto-millau/entrypoints:/entrypoints - environment: - RUST_LOG: rpc=trace,bridge=trace - GLOBAL_DEPLOYMENTS: $GLOBAL_DEPLOYMENTS - ports: - - "10000:9616" - depends_on: &all-nodes - - millau-node-alice - - millau-node-bob - - millau-node-charlie - - millau-node-dave - - millau-node-eve - - rialto-node-alice - - rialto-node-bob - - rialto-node-charlie - - rialto-node-dave - - rialto-node-eve - - rialto-node-ferdie - - relay-messages-millau-to-rialto-generator: - <<: *sub-bridge-relay - environment: - RUST_LOG: bridge=trace - entrypoint: /entrypoints/relay-messages-to-rialto-generator-entrypoint.sh - ports: - - "10001:9616" - depends_on: - - relay-millau-rialto - - relay-messages-millau-to-rialto-resubmitter: - <<: *sub-bridge-relay - environment: - RUST_LOG: bridge=trace - entrypoint: /entrypoints/relay-messages-to-rialto-resubmitter-entrypoint.sh - ports: - - "10002:9616" - depends_on: - - relay-messages-millau-to-rialto-generator - - relay-messages-rialto-to-millau-generator: - <<: *sub-bridge-relay - environment: - RUST_LOG: bridge=trace - entrypoint: /entrypoints/relay-messages-to-millau-generator-entrypoint.sh - ports: - - "10003:9616" - depends_on: - - relay-millau-rialto - - detect-millau-to-rialto-equivocations: - <<: *sub-bridge-relay - environment: - RUST_LOG: bridge=trace - entrypoint: /entrypoints/detect-millau-to-rialto-equivocations-entrypoint.sh - ports: - - "10004:9616" - depends_on: - - relay-millau-rialto - - detect-rialto-to-millau-equivocations: - <<: *sub-bridge-relay - environment: - RUST_LOG: bridge=trace - entrypoint: /entrypoints/detect-rialto-to-millau-equivocations-entrypoint.sh - ports: - - "10005:9616" - depends_on: - - relay-millau-rialto - - # Note: These are being overridden from the top level `monitoring` compose file. - grafana-dashboard: - environment: - VIRTUAL_HOST: grafana.millau.brucke.link,grafana.rialto.brucke.link - VIRTUAL_PORT: 3000 - LETSENCRYPT_HOST: grafana.millau.brucke.link,grafana.rialto.brucke.link - LETSENCRYPT_EMAIL: admin@parity.io - volumes: - - ./bridges/rialto-millau/dashboard/grafana:/etc/grafana/dashboards/rialto-millau:ro - - ./networks/dashboard/grafana/beefy-dashboard.json:/etc/grafana/dashboards/beefy.json - - prometheus-metrics: - volumes: - - ./bridges/rialto-millau/dashboard/prometheus/targets.yml:/etc/prometheus/targets-rialto-millau.yml - depends_on: *all-nodes diff --git a/deployments/bridges/rialto-millau/entrypoints/detect-millau-to-rialto-equivocations-entrypoint.sh b/deployments/bridges/rialto-millau/entrypoints/detect-millau-to-rialto-equivocations-entrypoint.sh deleted file mode 100755 index 71498fc0295a64bfb0a9d2988f19277ded8b2bbe..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-millau/entrypoints/detect-millau-to-rialto-equivocations-entrypoint.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -eu - -sleep 15 - -exec /home/user/substrate-relay detect-equivocations millau-to-rialto \ - --source-host millau-node-alice \ - --source-port 9944 \ - --source-signer //Rialto.HeadersAndMessagesRelay \ - --source-transactions-mortality=64 \ - --target-host rialto-node-alice \ - --target-port 9944 \ - --prometheus-host=0.0.0.0 diff --git a/deployments/bridges/rialto-millau/entrypoints/detect-rialto-to-millau-equivocations-entrypoint.sh b/deployments/bridges/rialto-millau/entrypoints/detect-rialto-to-millau-equivocations-entrypoint.sh deleted file mode 100755 index 158a99c0af95054cd3d9e09f2b3747cfa6ca59dc..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-millau/entrypoints/detect-rialto-to-millau-equivocations-entrypoint.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -eu - -sleep 15 - -exec /home/user/substrate-relay detect-equivocations rialto-to-millau \ - --source-host rialto-node-alice \ - --source-port 9944 \ - --source-signer //Millau.HeadersAndMessagesRelay \ - --source-transactions-mortality=64 \ - --target-host millau-node-alice \ - --target-port 9944 \ - --prometheus-host=0.0.0.0 diff --git a/deployments/bridges/rialto-millau/entrypoints/relay-messages-to-millau-generator-entrypoint.sh b/deployments/bridges/rialto-millau/entrypoints/relay-messages-to-millau-generator-entrypoint.sh deleted file mode 100755 index a36538ea5155d035be95c9a57e12360871461451..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-millau/entrypoints/relay-messages-to-millau-generator-entrypoint.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# THIS SCRIPT IS NOT INTENDED FOR USE IN PRODUCTION ENVIRONMENT -# -# This scripts periodically calls the Substrate relay binary to generate messages. These messages -# are sent from the Rialto network to the Millau network. - -set -eu - -# Max delay before submitting transactions (s) -MAX_SUBMIT_DELAY_S=${MSG_EXCHANGE_GEN_MAX_SUBMIT_DELAY_S:-30} -MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE=1024 - -SHARED_CMD="/home/user/substrate-relay send-message rialto-to-millau" -SHARED_HOST="--source-host rialto-node-bob --source-port 9944" -SOURCE_SIGNER="--source-signer //Millau.MessagesSender" - -SEND_MESSAGE="$SHARED_CMD $SHARED_HOST $SOURCE_SIGNER" - -SOURCE_CHAIN="Rialto" -TARGET_CHAIN="Millau" -EXTRA_ARGS="" -# It is the encoded `xcm::VersionedXcm::V3(prepare_outbound_xcm_message(MillauNetwork::get())` -# from the `xcm_messages_to_millau_are_sent_using_bridge_exporter` test in the `rialto-runtime` -REGULAR_PAYLOAD="030426030109030419a8" - -source /common/generate_messages.sh diff --git a/deployments/bridges/rialto-millau/entrypoints/relay-messages-to-rialto-generator-entrypoint.sh b/deployments/bridges/rialto-millau/entrypoints/relay-messages-to-rialto-generator-entrypoint.sh deleted file mode 100755 index dacb5615229cc7011138f3c47d86f060826a6b53..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-millau/entrypoints/relay-messages-to-rialto-generator-entrypoint.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# THIS SCRIPT IS NOT INTENDED FOR USE IN PRODUCTION ENVIRONMENT -# -# This scripts periodically calls the Substrate relay binary to generate messages. These messages -# are sent from the Millau network to the Rialto network. - -set -eu - -# Max delay before submitting transactions (s) -MAX_SUBMIT_DELAY_S=${MSG_EXCHANGE_GEN_MAX_SUBMIT_DELAY_S:-30} -MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE=128 - -SHARED_CMD=" /home/user/substrate-relay send-message millau-to-rialto" -SHARED_HOST="--source-host millau-node-bob --source-port 9944" -SOURCE_SIGNER="--source-signer //Rialto.MessagesSender" - -SEND_MESSAGE="$SHARED_CMD $SHARED_HOST $SOURCE_SIGNER" - -SOURCE_CHAIN="Millau" -TARGET_CHAIN="Rialto" -EXTRA_ARGS="" -# It is the encoded `xcm::VersionedXcm::V3(prepare_outbound_xcm_message(RialtoNetwork::get())` -# from the `xcm_messages_to_rialto_are_sent_using_bridge_exporter` test in the `millau-runtime` -REGULAR_PAYLOAD="030426020109020419a8" - -source /common/generate_messages.sh diff --git a/deployments/bridges/rialto-millau/entrypoints/relay-messages-to-rialto-resubmitter-entrypoint.sh b/deployments/bridges/rialto-millau/entrypoints/relay-messages-to-rialto-resubmitter-entrypoint.sh deleted file mode 100755 index bd9bf800ad48b05b76695ee4ec1636d2ddd98b7a..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-millau/entrypoints/relay-messages-to-rialto-resubmitter-entrypoint.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -set -xeu - -sleep 15 - -# //Rialto.MessagesSender is signing Millau -> Rialto message-send transactions, which are causing problems. -# -# When large message is being sent from Millau to Rialto AND other transactions are -# blocking it from being mined, we'll see something like this in logs: -# -# Millau transaction priority with tip=0: 17800827994. Target priority: -# 526186677695 -# -# So since fee multiplier in Millau is `1` and `WeightToFee` is `IdentityFee`, then -# we need tip around `526186677695 - 17800827994 = 508_385_849_701`. Let's round it -# up to `1_000_000_000_000`. - -/home/user/substrate-relay resubmit-transactions millau \ - --target-host millau-node-alice \ - --target-port 9944 \ - --target-signer //Rialto.MessagesSender \ - --stalled-blocks 5 \ - --tip-limit 1000000000000 \ - --tip-step 1000000000 \ - make-it-best-transaction diff --git a/deployments/bridges/rialto-millau/entrypoints/relay-millau-rialto-entrypoint.sh b/deployments/bridges/rialto-millau/entrypoints/relay-millau-rialto-entrypoint.sh deleted file mode 100755 index 5816884c12c0c4189b40303434898a2f1bff18d2..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-millau/entrypoints/relay-millau-rialto-entrypoint.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -set -xeu - -sleep 15 - -# see `rialto_millau_bridge_identifier_did_not_changed` test in `millau-runtime` crate for -# details on how this lane is computed -MESSAGE_LANE="efed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7" - -/home/user/substrate-relay init-bridge millau-to-rialto \ - --source-host millau-node-alice \ - --source-port 9944 \ - --target-host rialto-node-alice \ - --target-port 9944 \ - --target-signer //Sudo - -/home/user/substrate-relay init-bridge rialto-to-millau \ - --source-host rialto-node-alice \ - --source-port 9944 \ - --target-host millau-node-alice \ - --target-port 9944 \ - --target-signer //Sudo - -# Give chain a little bit of time to process initialization transaction -sleep 6 - -RIALTO_NODE_CONNECTION_PARAMS=$([ -z ${GLOBAL_DEPLOYMENTS} ] && \ - echo "--rialto-host rialto-node-alice --rialto-port 9944" \ - || \ - echo "--rialto-host wss.rialto.brucke.link --rialto-port 443 --rialto-secure" ) - -/home/user/substrate-relay relay-headers-and-messages millau-rialto \ - --millau-host millau-node-alice \ - --millau-port 9944 \ - --millau-signer //Rialto.HeadersAndMessagesRelay \ - --millau-transactions-mortality=64 \ - $RIALTO_NODE_CONNECTION_PARAMS \ - --rialto-signer //Millau.HeadersAndMessagesRelay \ - --rialto-transactions-mortality=64 \ - --lane=$MESSAGE_LANE \ - --prometheus-host=0.0.0.0 diff --git a/deployments/bridges/rialto-parachain-millau/dashboard/grafana/relay-millau-to-rialto-parachain-messages-dashboard.json b/deployments/bridges/rialto-parachain-millau/dashboard/grafana/relay-millau-to-rialto-parachain-messages-dashboard.json deleted file mode 100644 index 80bb7917c09401d6654d152c7eefb20be3078c7a..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-parachain-millau/dashboard/grafana/relay-millau-to-rialto-parachain-messages-dashboard.json +++ /dev/null @@ -1,910 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "links": [], - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 0 - }, - "hiddenSeries": false, - "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "Millau_to_RialtoParachain_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_best_target_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}", - "instant": false, - "interval": "", - "legendFormat": "At RialtoParachain", - "refId": "A" - }, - { - "expr": "Millau_to_RialtoParachain_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_best_target_at_source_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}", - "instant": false, - "interval": "", - "legendFormat": "At Millau", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Best finalized RialtoParachain headers", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 0 - }, - "hiddenSeries": false, - "id": 4, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "Millau_to_RialtoParachain_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_best_source_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}", - "interval": "", - "legendFormat": "At Millau", - "refId": "A" - }, - { - "expr": "Millau_to_RialtoParachain_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_best_source_at_target_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}", - "interval": "", - "legendFormat": "At RialtoParachain", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Best finalized Millau headers", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 1 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "max" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "20m", - "frequency": "1m", - "handler": 1, - "name": "Millau -> RialtoParachain messages are not detected by relay", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 11, - "w": 12, - "x": 0, - "y": 9 - }, - "hiddenSeries": false, - "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "label_replace(label_replace(Millau_to_RialtoParachain_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=~\"source_latest_generated|target_latest_received\"}, \"type\", \"Latest message sent from RialtoParachain\", \"type\", \"source_latest_generated\"), \"type\", \"Latest RialtoParachain message received by Millau\", \"type\", \"target_latest_received\")", - "interval": "", - "legendFormat": "{{type}}", - "refId": "A" - }, - { - "expr": "increase(Millau_to_RialtoParachain_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_generated\"}[10m]) OR on() vector(0)", - "hide": true, - "interval": "", - "legendFormat": "Messages generated in last 5 minutes (Millau -> RialtoParachain)", - "refId": "B" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "lt", - "value": 1, - "yaxis": "left" - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Delivery race", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 11, - "w": 12, - "x": 12, - "y": 9 - }, - "hiddenSeries": false, - "id": 8, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "label_replace(label_replace(Millau_to_RialtoParachain_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=~\"source_latest_confirmed|target_latest_received\"}, \"type\", \"Latest message confirmed by RialtoParachain to Millau\", \"type\", \"source_latest_confirmed\"), \"type\", \"Latest RialtoParachain message received by Millau\", \"type\", \"target_latest_received\")", - "interval": "", - "legendFormat": "{{type}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Confirmations race", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 1 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B", - "1m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "sum" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "7m", - "frequency": "1m", - "handler": 1, - "name": "Messages from Millau to RialtoParachain are not being delivered", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 8, - "x": 0, - "y": 20 - }, - "hiddenSeries": false, - "id": 10, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_generated\"}[2m])) - scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]))", - "format": "time_series", - "instant": false, - "interval": "", - "legendFormat": "Undelivered messages at RialtoParachain", - "refId": "A" - }, - { - "expr": "increase(Millau_to_RialtoParachain_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[5m]) OR on() vector(0)", - "interval": "", - "legendFormat": "Millau Messages delivered to RialtoParachain in last 5m", - "refId": "B" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "lt", - "value": 1 - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Delivery race lags", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 50 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "min" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "20m", - "frequency": "1m", - "handler": 1, - "name": "Too many unconfirmed messages (Millau -> RialtoParachain)", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 8, - "x": 8, - "y": 20 - }, - "hiddenSeries": false, - "id": 12, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))", - "interval": "", - "legendFormat": "Unconfirmed messages at Millau", - "refId": "A" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 10 - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Confirmations race lags", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 10 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "min" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "20m", - "frequency": "1m", - "handler": 1, - "name": "Rewards are not being confirmed (Millau -> RialtoParachain messages)", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 8, - "x": 16, - "y": 20 - }, - "hiddenSeries": false, - "id": 14, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_confirmed\"}[2m])) - scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_confirmed\"}[2m]))", - "interval": "", - "legendFormat": "Unconfirmed rewards at RialtoParachain", - "refId": "A" - }, - { - "expr": "(scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(Millau_to_RialtoParachain_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(Millau_to_RialtoParachain_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]) > bool min_over_time(Millau_to_RialtoParachain_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]))", - "interval": "", - "legendFormat": "Unconfirmed rewards at Millau->RaltoParachain (zero if messages are not being delivered to RialtoParachain)", - "refId": "B" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 10, - "yaxis": "left" - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Reward lags", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "5s", - "schemaVersion": 26, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "", - "title": "Millau to RialtoParachain Message Sync Dashboard", - "uid": "C61e-797z", - "version": 1 -} diff --git a/deployments/bridges/rialto-parachain-millau/dashboard/grafana/relay-rialto-parachain-to-millau-messages-dashboard.json b/deployments/bridges/rialto-parachain-millau/dashboard/grafana/relay-rialto-parachain-to-millau-messages-dashboard.json deleted file mode 100644 index 9d252b17f5eefc443963f92305e4bba1dd7122d2..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-parachain-millau/dashboard/grafana/relay-rialto-parachain-to-millau-messages-dashboard.json +++ /dev/null @@ -1,908 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "links": [], - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 0 - }, - "hiddenSeries": false, - "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "RialtoParachain_to_Millau_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_best_target_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}", - "instant": false, - "interval": "", - "legendFormat": "At Millau", - "refId": "A" - }, - { - "expr": "RialtoParachain_to_Millau_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_best_target_at_source_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}", - "instant": false, - "interval": "", - "legendFormat": "At RialtoParachain", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Best finalized Millau headers", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 0 - }, - "hiddenSeries": false, - "id": 4, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "RialtoParachain_to_Millau_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_best_source_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}", - "interval": "", - "legendFormat": "At RialtoParachain", - "refId": "A" - }, - { - "expr": "RialtoParachain_to_Millau_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_best_source_at_target_block_number{instance=\"relay-millau-rialto-parachain-1:9616\"}", - "interval": "", - "legendFormat": "At Millau", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Best finalized RialtoParachain headers", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 1 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "max" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "20m", - "frequency": "1m", - "handler": 1, - "name": "RialtoParachain -> Millau messages are not detected by relay", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 11, - "w": 12, - "x": 0, - "y": 9 - }, - "hiddenSeries": false, - "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "label_replace(label_replace(RialtoParachain_to_Millau_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=~\"source_latest_generated|target_latest_received\"}, \"type\", \"Latest message sent from Millau\", \"type\", \"source_latest_generated\"), \"type\", \"Latest Millau message received by RialtoParachain\", \"type\", \"target_latest_received\")", - "interval": "", - "legendFormat": "{{type}}", - "refId": "A" - }, - { - "expr": "increase(RialtoParachain_to_Millau_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_generated\"}[10m]) OR on() vector(0)", - "hide": true, - "interval": "", - "legendFormat": "Messages generated in last 5 minutes (RialtoParachain -> Millau)", - "refId": "B" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "lt", - "value": 1 - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Delivery race", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 11, - "w": 12, - "x": 12, - "y": 9 - }, - "hiddenSeries": false, - "id": 8, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "label_replace(label_replace(RialtoParachain_to_Millau_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=~\"source_latest_confirmed|target_latest_received\"}, \"type\", \"Latest message confirmed by Millau to RialtoParachain\", \"type\", \"source_latest_confirmed\"), \"type\", \"Latest Millau message received by RialtoParachain\", \"type\", \"target_latest_received\")", - "interval": "", - "legendFormat": "{{type}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Confirmations race", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 1 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B", - "1m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "sum" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "7m", - "frequency": "1m", - "handler": 1, - "name": "Messages from RialtoParachain to Millau are not being delivered", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 8, - "x": 0, - "y": 20 - }, - "hiddenSeries": false, - "id": 10, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_generated\"}[2m])) - scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]))", - "format": "time_series", - "instant": false, - "interval": "", - "legendFormat": "Undelivered messages at Millau", - "refId": "A" - }, - { - "expr": "increase(RialtoParachain_to_Millau_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[5m]) OR on() vector(0)", - "interval": "", - "legendFormat": "RialtoParachain Messages delivered to Millau in last 5m", - "refId": "B" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "lt", - "value": 1 - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Delivery race lags", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 50 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "min" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "20m", - "frequency": "1m", - "handler": 1, - "name": "Too many unconfirmed messages (RialtoParachain -> Millau)", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 8, - "x": 8, - "y": 20 - }, - "hiddenSeries": false, - "id": 12, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))", - "interval": "", - "legendFormat": "Unconfirmed messages at RialtoParachain", - "refId": "A" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 10 - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Confirmations race lags", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 10 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "min" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "20m", - "frequency": "1m", - "handler": 1, - "name": "Rewards are not being confirmed (RialtoParachain -> Millau messages)", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 8, - "x": 16, - "y": 20 - }, - "hiddenSeries": false, - "id": 14, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_confirmed\"}[2m])) - scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_confirmed\"}[2m]))", - "interval": "", - "legendFormat": "Unconfirmed rewards at Millau", - "refId": "A" - }, - { - "expr": "(scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(RialtoParachain_to_Millau_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(RialtoParachain_to_Millau_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]) > bool min_over_time(RialtoParachain_to_Millau_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_lane_state_nonces{instance=\"relay-millau-rialto-parachain-1:9616\",type=\"target_latest_received\"}[2m]))", - "interval": "", - "legendFormat": "Unconfirmed rewards at Millau (zero if messages are not being delivered to Millau)", - "refId": "B" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 10 - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Reward lags", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "5s", - "schemaVersion": 26, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "", - "title": "RialtoParachain to Millau Message Sync Dashboard", - "uid": "-l61a7r7k", - "version": 1 -} diff --git a/deployments/bridges/rialto-parachain-millau/dashboard/grafana/rialto-parachain-millau-maintenance-dashboard.json b/deployments/bridges/rialto-parachain-millau/dashboard/grafana/rialto-parachain-millau-maintenance-dashboard.json deleted file mode 100644 index cfdeacfa7bfce85f3d79ac1d49a01ec2ac3a36c8..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-parachain-millau/dashboard/grafana/rialto-parachain-millau-maintenance-dashboard.json +++ /dev/null @@ -1,627 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- 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, - "gnetId": null, - "graphTooltip": 0, - "links": [], - "liveNow": false, - "panels": [ - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 1000 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "5m", - "frequency": "1m", - "handler": 1, - "name": "At-Rialto relay balances are too low", - "noDataState": "ok", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 0 - }, - "hiddenSeries": false, - "id": 10, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.2.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "at_RialtoParachain_relay_MillauMessages_balance{instance=\"relay-millau-rialto-parachain-1:9616\"}", - "instant": false, - "interval": "", - "legendFormat": "With-Millau relay account balance", - "refId": "A" - }, - { - "exemplar": true, - "expr": "at_RialtoParachain_relay_MillauMessages_reward_for_msgs_from_Millau_on_lane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c{instance=\"relay-millau-rialto-parachain-1:9616\"} + at_RialtoParachain_relay_MillauMessages_reward_for_msgs_to_Millau_on_lane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c{instance=\"relay-millau-rialto-parachain-1:9616\"}", - "hide": false, - "instant": false, - "interval": "", - "legendFormat": "With-Millau relay account reward", - "refId": "B" - }, - { - "exemplar": true, - "expr": "at_RialtoParachain_relay_MillauMessages_balance{instance=\"relay-millau-rialto-parachain-1:9616\"} + at_RialtoParachain_relay_MillauMessages_reward_for_msgs_from_Millau_on_lane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c{instance=\"relay-millau-rialto-parachain-1:9616\"} + at_RialtoParachain_relay_MillauMessages_reward_for_msgs_to_Millau_on_lane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c{instance=\"relay-millau-rialto-parachain-1:9616\"}", - "hide": false, - "interval": "", - "legendFormat": "With-Millau relay account total balance (balance + reward)", - "refId": "C" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "lt", - "value": 1000, - "visible": true - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "RialtoParachain relay balances", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 1000 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "5m", - "frequency": "1m", - "handler": 1, - "name": "At-Millau relay balances are too low", - "noDataState": "ok", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 0 - }, - "hiddenSeries": false, - "id": 12, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.2.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "at_Millau_relay_RialtoParachainMessages_balance{instance=\"relay-millau-rialto-parachain-1:9616\"}", - "interval": "", - "legendFormat": "With-Rialto relay account balance", - "refId": "A" - }, - { - "exemplar": true, - "expr": "at_Millau_relay_RialtoParachainMessages_reward_for_msgs_from_RialtoParachain_on_lane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c{instance=\"relay-millau-rialto-parachain-1:9616\"} + at_Millau_relay_RialtoParachainMessages_reward_for_msgs_to_RialtoParachain_on_lane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c{instance=\"relay-millau-rialto-parachain-1:9616\"}", - "hide": false, - "interval": "", - "legendFormat": "With-Rialto relay account reward", - "refId": "B" - }, - { - "exemplar": true, - "expr": "at_Millau_relay_RialtoParachainMessages_balance{instance=\"relay-millau-rialto-parachain-1:9616\"} + at_Millau_relay_RialtoParachainMessages_reward_for_msgs_from_RialtoParachain_on_lane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c{instance=\"relay-millau-rialto-parachain-1:9616\"} + at_Millau_relay_RialtoParachainMessages_reward_for_msgs_to_RialtoParachain_on_lane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c{instance=\"relay-millau-rialto-parachain-1:9616\"}", - "hide": false, - "interval": "", - "legendFormat": "With-Rialto relay account total balance (balance + reward)", - "refId": "C" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "lt", - "value": 1000, - "visible": true - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Millau relay balances", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 0 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "max" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "5m", - "frequency": "1m", - "handler": 1, - "name": "Whether with-RialtoParachain-parachains-pallet and Rialto itself are on different forks alert", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 8 - }, - "hiddenSeries": false, - "id": 14, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.2.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "RialtoParachain_to_Millau_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_is_source_and_source_at_target_using_different_forks{instance=\"relay-millau-rialto-parachain-1:9616\"} OR on() vector(0)", - "instant": false, - "interval": "", - "legendFormat": "On different forks?", - "refId": "A" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 0, - "visible": true - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Whether with-RialtoParachain-parachains-pallet and RialtoParachain itself are on different forks", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 0 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "max" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "5m", - "frequency": "1m", - "handler": 1, - "name": "Whether with-Millau-grandpa-pallet and Millau itself are on different forks", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 8 - }, - "hiddenSeries": false, - "id": 16, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.2.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "Millau_to_RialtoParachain_MessageLane_0xee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c_is_source_and_source_at_target_using_different_forks{instance=\"relay-millau-rialto-parachain-1:9616\"} OR on() vector(0)", - "interval": "", - "legendFormat": "On different forks?", - "refId": "A" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 0, - "visible": true - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Whether with-Millau-grandpa-pallet and Millau itself are on different forks", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "5s", - "schemaVersion": 32, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-15m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "", - "title": "RialtoParachain+Millau maintenance dashboard", - "uid": "WALc3ajnk", - "version": 1 -} diff --git a/deployments/bridges/rialto-parachain-millau/dashboard/prometheus/targets.yml b/deployments/bridges/rialto-parachain-millau/dashboard/prometheus/targets.yml deleted file mode 100644 index 9dd79afe6911db96485f46f9b87cab152192239e..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-parachain-millau/dashboard/prometheus/targets.yml +++ /dev/null @@ -1,5 +0,0 @@ -- targets: - - relay-millau-rialto-parachain-1:9616 - - relay-millau-rialto-parachain-2:9616 - - detect-millau-to-rialto-parachain-equivocations:9616 - - detect-rialto-to-millau-equivocations:9616 diff --git a/deployments/bridges/rialto-parachain-millau/docker-compose.yml b/deployments/bridges/rialto-parachain-millau/docker-compose.yml deleted file mode 100644 index 0efa05c2ab5232aab0748943fd23ece1883db84f..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-parachain-millau/docker-compose.yml +++ /dev/null @@ -1,110 +0,0 @@ -# Exposed ports: 10100-10106 - -version: '3.5' -services: - # We provide overrides for these particular nodes since they are public facing - # nodes which we use to connect from things like Polkadot JS Apps. - rialto-parachain-collator-charlie: - environment: - VIRTUAL_HOST: wss.rialto-parachain.brucke.link - VIRTUAL_PORT: 9944 - LETSENCRYPT_HOST: wss.rialto-parachain.brucke.link - LETSENCRYPT_EMAIL: admin@parity.io - - millau-node-charlie: - environment: - VIRTUAL_HOST: wss.millau.brucke.link - VIRTUAL_PORT: 9944 - LETSENCRYPT_HOST: wss.millau.brucke.link - LETSENCRYPT_EMAIL: admin@parity.io - - relay-millau-rialto-parachain-1: &sub-bridge-relay - image: ${SUBSTRATE_RELAY_IMAGE:-paritytech/substrate-relay} - entrypoint: /entrypoints/relay-millau-rialto-parachain-entrypoint.sh - volumes: - - ./bridges/common:/common - - ./bridges/rialto-parachain-millau/entrypoints:/entrypoints - environment: - RUST_LOG: rpc=trace,bridge=trace - ports: - - "10100:9616" - depends_on: &all-nodes - - millau-node-alice - - millau-node-bob - - millau-node-charlie - - millau-node-dave - - millau-node-eve - - rialto-parachain-collator-alice - - rialto-parachain-collator-bob - - rialto-parachain-collator-charlie - - relay-millau-rialto-parachain-2: - <<: *sub-bridge-relay - environment: - RUST_LOG: rpc=trace,bridge=trace - EXT_MILLAU_RELAY_ACCOUNT: //RialtoParachain.HeadersAndMessagesRelay2 - EXT_MILLAU_RELAY_ACCOUNT_HEADERS_OVERRIDE: //RialtoParachain.RialtoHeadersRelay2 - EXT_RIALTO_PARACHAIN_RELAY_ACCOUNT: //Millau.HeadersAndMessagesRelay2 - ports: - - "10101:9616" - relay-messages-millau-to-rialto-parachain-generator: - <<: *sub-bridge-relay - ports: - - "10102:9616" - entrypoint: /entrypoints/relay-messages-to-rialto-parachain-generator-entrypoint.sh - depends_on: - - relay-millau-rialto-parachain-1 - - relay-messages-rialto-parachain-to-millau-generator: - <<: *sub-bridge-relay - entrypoint: /entrypoints/relay-messages-to-millau-generator-entrypoint.sh - ports: - - "10103:9616" - depends_on: - - relay-millau-rialto-parachain-1 - - relay-messages-millau-to-rialto-parachain-resubmitter: - <<: *sub-bridge-relay - environment: - RUST_LOG: bridge=trace - entrypoint: /entrypoints/relay-messages-to-rialto-parachain-resubmitter-entrypoint.sh - ports: - - "10104:9616" - depends_on: - - relay-messages-millau-to-rialto-parachain-generator - - detect-millau-to-rialto-parachain-equivocations: - <<: *sub-bridge-relay - environment: - RUST_LOG: bridge=trace - entrypoint: /entrypoints/detect-millau-to-rialto-parachain-equivocations-entrypoint.sh - ports: - - "10105:9616" - depends_on: - - relay-millau-rialto-parachain-1 - - detect-rialto-to-millau-equivocations: - <<: *sub-bridge-relay - environment: - RUST_LOG: bridge=trace - entrypoint: /entrypoints/detect-rialto-to-millau-equivocations-entrypoint.sh - ports: - - "10106:9616" - depends_on: - - relay-millau-rialto-parachain-1 - - # Note: These are being overridden from the top level `monitoring` compose file. - grafana-dashboard: - environment: - VIRTUAL_HOST: grafana.millau.brucke.link,grafana.rialto.brucke.link - VIRTUAL_PORT: 3000 - LETSENCRYPT_HOST: grafana.millau.brucke.link,grafana.rialto.brucke.link - LETSENCRYPT_EMAIL: admin@parity.io - volumes: - - ./bridges/rialto-parachain-millau/dashboard/grafana:/etc/grafana/dashboards/rialto-parachain-millau:ro - - ./networks/dashboard/grafana/beefy-dashboard.json:/etc/grafana/dashboards/beefy.json - - prometheus-metrics: - volumes: - - ./bridges/rialto-parachain-millau/dashboard/prometheus/targets.yml:/etc/prometheus/targets-rialto-parachain-millau.yml - depends_on: *all-nodes diff --git a/deployments/bridges/rialto-parachain-millau/entrypoints/detect-millau-to-rialto-parachain-equivocations-entrypoint.sh b/deployments/bridges/rialto-parachain-millau/entrypoints/detect-millau-to-rialto-parachain-equivocations-entrypoint.sh deleted file mode 100755 index 366e4222a8c1956ff26090d83f4b85c1bbe08297..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-parachain-millau/entrypoints/detect-millau-to-rialto-parachain-equivocations-entrypoint.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -eu - -sleep 15 - -exec /home/user/substrate-relay detect-equivocations millau-to-rialto-parachain \ - --source-host millau-node-alice \ - --source-port 9944 \ - --source-signer //RialtoParachain.HeadersAndMessagesRelay1 \ - --source-transactions-mortality=64 \ - --target-host rialto-parachain-collator-charlie \ - --target-port 9944 \ - --prometheus-host=0.0.0.0 diff --git a/deployments/bridges/rialto-parachain-millau/entrypoints/detect-rialto-to-millau-equivocations-entrypoint.sh b/deployments/bridges/rialto-parachain-millau/entrypoints/detect-rialto-to-millau-equivocations-entrypoint.sh deleted file mode 100755 index 158a99c0af95054cd3d9e09f2b3747cfa6ca59dc..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-parachain-millau/entrypoints/detect-rialto-to-millau-equivocations-entrypoint.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -eu - -sleep 15 - -exec /home/user/substrate-relay detect-equivocations rialto-to-millau \ - --source-host rialto-node-alice \ - --source-port 9944 \ - --source-signer //Millau.HeadersAndMessagesRelay \ - --source-transactions-mortality=64 \ - --target-host millau-node-alice \ - --target-port 9944 \ - --prometheus-host=0.0.0.0 diff --git a/deployments/bridges/rialto-parachain-millau/entrypoints/relay-messages-to-millau-generator-entrypoint.sh b/deployments/bridges/rialto-parachain-millau/entrypoints/relay-messages-to-millau-generator-entrypoint.sh deleted file mode 100755 index 80208dc752bae4aef9b899488d2b45a9577a762f..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-parachain-millau/entrypoints/relay-messages-to-millau-generator-entrypoint.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# THIS SCRIPT IS NOT INTENDED FOR USE IN PRODUCTION ENVIRONMENT -# -# This scripts periodically calls the Substrate relay binary to generate messages. These messages -# are sent from the Rialto network to the Millau network. - -set -eu - -# Max delay before submitting transactions (s) -MAX_SUBMIT_DELAY_S=${MSG_EXCHANGE_GEN_MAX_SUBMIT_DELAY_S:-30} -MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE=1024 - -SHARED_CMD="/home/user/substrate-relay send-message rialto-parachain-to-millau" -SHARED_HOST="--source-host rialto-parachain-collator-bob --source-port 9944" -SOURCE_SIGNER="--source-signer //Millau.MessagesSender" - -SEND_MESSAGE="$SHARED_CMD $SHARED_HOST $SOURCE_SIGNER" - -SOURCE_CHAIN="RialtoParachain" -TARGET_CHAIN="Millau" -EXTRA_ARGS="" -# It is the encoded `xcm::VersionedXcm::V3(prepare_outbound_xcm_message(MillauNetwork::get())` -# from the `xcm_messages_to_millau_are_sent_using_bridge_exporter` test in the `rialto-parachain-runtime` -REGULAR_PAYLOAD="030426030109030419a8" - -source /common/generate_messages.sh diff --git a/deployments/bridges/rialto-parachain-millau/entrypoints/relay-messages-to-rialto-parachain-generator-entrypoint.sh b/deployments/bridges/rialto-parachain-millau/entrypoints/relay-messages-to-rialto-parachain-generator-entrypoint.sh deleted file mode 100755 index dbf14ef18bcddd73e7cdaf5ecd1d7010b8541ab7..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-parachain-millau/entrypoints/relay-messages-to-rialto-parachain-generator-entrypoint.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# THIS SCRIPT IS NOT INTENDED FOR USE IN PRODUCTION ENVIRONMENT -# -# This scripts periodically calls the Substrate relay binary to generate messages. These messages -# are sent from the Millau network to the Rialto network. - -set -eu - -# Max delay before submitting transactions (s) -MAX_SUBMIT_DELAY_S=${MSG_EXCHANGE_GEN_MAX_SUBMIT_DELAY_S:-30} -MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE=1024 - -SHARED_CMD=" /home/user/substrate-relay send-message millau-to-rialto-parachain" -SHARED_HOST="--source-host millau-node-bob --source-port 9944" -SOURCE_SIGNER="--source-signer //RialtoParachain.MessagesSender" - -SEND_MESSAGE="$SHARED_CMD $SHARED_HOST $SOURCE_SIGNER" - -SOURCE_CHAIN="Millau" -TARGET_CHAIN="RialtoParachain" -EXTRA_ARGS="" -# It is the encoded `xcm::VersionedXcm::V3(prepare_outbound_xcm_message(RialtoParachainNetwork::get())` -# from the `xcm_messages_to_rialto_parachain_are_sent_using_bridge_exporter` test in the `millau-runtime` -REGULAR_PAYLOAD="030426040109040419a8" - -source /common/generate_messages.sh diff --git a/deployments/bridges/rialto-parachain-millau/entrypoints/relay-messages-to-rialto-parachain-resubmitter-entrypoint.sh b/deployments/bridges/rialto-parachain-millau/entrypoints/relay-messages-to-rialto-parachain-resubmitter-entrypoint.sh deleted file mode 100755 index 4653ae396c6d47fcdfb7f312adfba53d724ef4f4..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-parachain-millau/entrypoints/relay-messages-to-rialto-parachain-resubmitter-entrypoint.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -set -xeu - -sleep 15 - -# //RialtoParachain.MessagesSender is signing Millau -> RialtoParachain message-send transactions, which are causing problems. -# -# When large message is being sent from Millau to RialtoParachain AND other transactions are -# blocking it from being mined, we'll see something like this in logs: -# -# Millau transaction priority with tip=0: 17800827994. Target priority: -# 526186677695 -# -# So since fee multiplier in Millau is `1` and `WeightToFee` is `IdentityFee`, then -# we need tip around `526186677695 - 17800827994 = 508_385_849_701`. Let's round it -# up to `1_000_000_000_000`. - -exec /home/user/substrate-relay resubmit-transactions millau \ - --target-host millau-node-alice \ - --target-port 9944 \ - --target-signer //RialtoParachain.MessagesSender \ - --stalled-blocks 7 \ - --tip-limit 1000000000000 \ - --tip-step 1000000000 \ - make-it-best-transaction diff --git a/deployments/bridges/rialto-parachain-millau/entrypoints/relay-millau-rialto-parachain-entrypoint.sh b/deployments/bridges/rialto-parachain-millau/entrypoints/relay-millau-rialto-parachain-entrypoint.sh deleted file mode 100755 index 613e99d1b3ff0cd32349f2e07d70e215adf79b6f..0000000000000000000000000000000000000000 --- a/deployments/bridges/rialto-parachain-millau/entrypoints/relay-millau-rialto-parachain-entrypoint.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -set -xeu - -sleep 15 - -MILLAU_RELAY_ACCOUNT=${EXT_MILLAU_RELAY_ACCOUNT:-//RialtoParachain.HeadersAndMessagesRelay1} -MILLAU_RELAY_ACCOUNT_HEADERS_OVERRIDE=${EXT_MILLAU_RELAY_ACCOUNT_HEADERS_OVERRIDE:-//RialtoParachain.RialtoHeadersRelay1} -RIALTO_PARACHAIN_RELAY_ACCOUNT=${EXT_RIALTO_PARACHAIN_RELAY_ACCOUNT:-//Millau.HeadersAndMessagesRelay1} - -# see `rialto_parachain_millau_bridge_identifier_did_not_changed` test in `millau-runtime` crate for -# details on how this lane is computed -MESSAGE_LANE="ee7158d2a51c3c43853ced550cc25bd00eb2662b231b1ddbb92e495ec882969c" - -/home/user/substrate-relay init-bridge millau-to-rialto-parachain \ - --source-host millau-node-alice \ - --source-port 9944 \ - --target-host rialto-parachain-collator-alice \ - --target-port 9944 \ - --target-signer //Sudo - -/home/user/substrate-relay init-bridge rialto-to-millau \ - --source-host rialto-node-alice \ - --source-port 9944 \ - --target-host millau-node-alice \ - --target-port 9944 \ - --target-signer //Sudo - -# Give chain a little bit of time to process initialization transaction -sleep 6 - -exec /home/user/substrate-relay relay-headers-and-messages millau-rialto-parachain \ - --millau-host millau-node-alice \ - --millau-port 9944 \ - --millau-signer $MILLAU_RELAY_ACCOUNT \ - --millau-transactions-mortality=64 \ - --rialto-parachain-host rialto-parachain-collator-charlie \ - --rialto-parachain-port 9944 \ - --rialto-parachain-signer $RIALTO_PARACHAIN_RELAY_ACCOUNT \ - --rialto-parachain-transactions-mortality=64 \ - --rialto-host rialto-node-alice \ - --rialto-port 9944 \ - --lane=$MESSAGE_LANE \ - --prometheus-host=0.0.0.0 diff --git a/deployments/bridges/rococo-westend/README.md b/deployments/bridges/rococo-westend/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c7b28853223c322e128eda4cd10d00becec6cd11 --- /dev/null +++ b/deployments/bridges/rococo-westend/README.md @@ -0,0 +1,22 @@ +# Rococo Bridge Hub <> Westend Bridge Hub deployments + +This folder contains some information and useful stuff from our other test deployment - between Rococo and Westend +bridge hubs. The bridge overview and other helpful information can be found in +[this readme](https://github.com/paritytech/polkadot-sdk/tree/master/cumulus/parachains/runtimes/bridge-hubs). + +## Grafana Alerts and Dashboards + +JSON model for Grafana alerts and dashobards that we use, may be found in the [dasboard/grafana](./dashboard/grafana/) +folder. + +**Dashboards:** +- rococo-westend-maintenance-dashboard.json +- relay-rococo-to-westend-messages-dashboard.json +- relay-westend-to-rococo-messages-dashboard.json + +(exported JSON directly from https://grafana.teleport.parity.io/dashboards/f/eblDiw17z/Bridges) + +**Alerts:** +- bridge-rococo-westend-alerts.json https://grafana.teleport.parity.io/api/ruler/grafana/api/v1/rules/Bridges/Bridge%20Rococo%20%3C%3E%20Westend + +_Note: All json files are formatted with `jq . file.json`._ diff --git a/deployments/bridges/rococo-westend/dashboard/grafana/bridge-rococo-westend-alerts.json b/deployments/bridges/rococo-westend/dashboard/grafana/bridge-rococo-westend-alerts.json new file mode 100644 index 0000000000000000000000000000000000000000..2dfa9316e2499b8f0016890f68eb8d104c7050c1 --- /dev/null +++ b/deployments/bridges/rococo-westend/dashboard/grafana/bridge-rococo-westend-alerts.json @@ -0,0 +1,1974 @@ +{ + "name": "Bridge Rococo <> Westend", + "interval": "1m", + "rules": [ + { + "expr": "", + "for": "10m", + "labels": { + "matrix_room": "XyVkmRJgIkjcvIBPsP" + }, + "annotations": { + "__dashboardUid__": "tkgc6_bnk", + "__panelId__": "12", + "summary": "Messages from RococoBridgeHub to WestendBridgeHub (00000002) are either not delivered, or are delivered with lags" + }, + "grafana_alert": { + "id": 51, + "orgId": 1, + "title": "RococoBridgeHub -> WestendBridgeHub delivery lags (00000002)", + "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_BridgeHubWestend_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"} > on () BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}))) or vector(1)) + on () increase(BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[10m]) * on () ((vector(1) and ((BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"} > on () BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}))) or vector(0))", + "instant": false, + "interval": "", + "intervalMs": 30000, + "legendFormat": "Undelivered messages", + "maxDataPoints": 43200, + "range": true, + "refId": "A" + } + }, + { + "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" + } + } + ], + "updated": "2023-12-08T06:04:42Z", + "intervalSeconds": 60, + "version": 130, + "uid": "r41otJp4k", + "namespace_uid": "eblDiw17z", + "namespace_id": 140, + "rule_group": "Bridge Rococo <> Westend", + "no_data_state": "OK", + "exec_err_state": "OK", + "is_paused": false + } + }, + { + "expr": "", + "for": "10m", + "labels": { + "matrix_room": "XyVkmRJgIkjcvIBPsP" + }, + "annotations": { + "__dashboardUid__": "zqjpgXxnk", + "__panelId__": "14", + "summary": "Messages from WestendBridgeHub to RococoBridgeHub (00000002) are either not delivered, or are delivered with lags" + }, + "grafana_alert": { + "id": 55, + "orgId": 1, + "title": "WestendBridgeHub -> RococoBridgeHub delivery lags (00000002)", + "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 ((BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"} > on () BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}))) or vector(1)) + on () increase(BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[10m]) * on () ((vector(1) and ((BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"} > on () BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}))) or vector(0))", + "instant": false, + "interval": "", + "intervalMs": 30000, + "legendFormat": "Undelivered messages", + "maxDataPoints": 43200, + "range": true, + "refId": "A" + } + }, + { + "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" + } + } + ], + "updated": "2023-12-08T06:04:42Z", + "intervalSeconds": 60, + "version": 128, + "uid": "wqmPtJpVz", + "namespace_uid": "eblDiw17z", + "namespace_id": 140, + "rule_group": "Bridge Rococo <> Westend", + "no_data_state": "OK", + "exec_err_state": "OK", + "is_paused": false + } + }, + { + "expr": "", + "for": "10m", + "labels": { + "matrix_room": "XyVkmRJgIkjcvIBPsP" + }, + "annotations": { + "__dashboardUid__": "tkgc6_bnk", + "__panelId__": "14", + "summary": "Messages from RococoBridgeHub to WestendBridgeHub (00000002) are either not confirmed, or are confirmed with lags" + }, + "grafana_alert": { + "id": 56, + "orgId": 1, + "title": "RococoBridgeHub -> WestendBridgeHub confirmation lags (00000002)", + "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_WestendBridgeHub_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(RococoBridgeHub_to_WestendBridgeHub_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))", + "instant": false, + "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" + } + } + ], + "updated": "2023-12-08T06:04:42Z", + "intervalSeconds": 60, + "version": 124, + "uid": "z4h3pJtVz", + "namespace_uid": "eblDiw17z", + "namespace_id": 140, + "rule_group": "Bridge Rococo <> Westend", + "no_data_state": "OK", + "exec_err_state": "OK", + "is_paused": false + } + }, + { + "expr": "", + "for": "10m", + "labels": { + "matrix_room": "XyVkmRJgIkjcvIBPsP" + }, + "annotations": { + "__dashboardUid__": "zqjpgXxnk", + "__panelId__": "16", + "summary": "Messages from WestendBridgeHub to RococoBridgeHub (00000002) are either not confirmed, or are confirmed with lags" + }, + "grafana_alert": { + "id": 57, + "orgId": 1, + "title": "WestendBridgeHub -> RococoBridgeHub confirmation lags (00000002)", + "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(BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))", + "instant": false, + "interval": "", + "intervalMs": 30000, + "legendFormat": "Unconfirmed messages", + "maxDataPoints": 43200, + "range": true, + "refId": "A" + } + }, + { + "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" + } + } + ], + "updated": "2023-12-08T06:04:42Z", + "intervalSeconds": 60, + "version": 123, + "uid": "Kj_z21t4k", + "namespace_uid": "eblDiw17z", + "namespace_id": 140, + "rule_group": "Bridge Rococo <> Westend", + "no_data_state": "OK", + "exec_err_state": "OK", + "is_paused": false + } + }, + { + "expr": "", + "for": "10m", + "labels": { + "matrix_room": "XyVkmRJgIkjcvIBPsP" + }, + "annotations": { + "__dashboardUid__": "zqjpgXxnk", + "__panelId__": "18", + "summary": "Rewards for messages from WestendBridgeHub to RococoBridgeHub (00000002) are either not confirmed, or are confirmed with lags" + }, + "grafana_alert": { + "id": 58, + "orgId": 1, + "title": "WestendBridgeHub -> RococoBridgeHub reward lags (00000002)", + "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(BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))", + "instant": false, + "interval": "", + "intervalMs": 30000, + "legendFormat": "Unconfirmed rewards", + "maxDataPoints": 43200, + "range": true, + "refId": "A" + } + }, + { + "refId": "C", + "queryType": "", + "relativeTimeRange": { + "from": 300, + "to": 0 + }, + "datasourceUid": "-100", + "model": { + "conditions": [ + { + "evaluator": { + "params": [ + 10 + ], + "type": "gt" + }, + "operator": { + "type": "when" + }, + "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" + } + } + ], + "updated": "2023-12-08T06:04:42Z", + "intervalSeconds": 60, + "version": 118, + "uid": "hw_a21pVk", + "namespace_uid": "eblDiw17z", + "namespace_id": 140, + "rule_group": "Bridge Rococo <> Westend", + "no_data_state": "OK", + "exec_err_state": "OK", + "is_paused": false + } + }, + { + "expr": "", + "for": "10m", + "labels": { + "matrix_room": "XyVkmRJgIkjcvIBPsP" + }, + "annotations": { + "__dashboardUid__": "tkgc6_bnk", + "__panelId__": "15", + "summary": "Rewards for messages from RococoBridgeHub to WestendBridgeHub (00000002) are either not confirmed, or are confirmed with lags" + }, + "grafana_alert": { + "id": 59, + "orgId": 1, + "title": "RococoBridgeHub -> WestendBridgeHub reward lags (00000002)", + "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_BridgeHubWestend_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))", + "instant": false, + "interval": "", + "intervalMs": 30000, + "legendFormat": "Unconfirmed rewards", + "maxDataPoints": 43200, + "range": true, + "refId": "A" + } + }, + { + "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" + } + } + ], + "updated": "2023-12-08T06:04:42Z", + "intervalSeconds": 60, + "version": 117, + "uid": "daN62Jt4z", + "namespace_uid": "eblDiw17z", + "namespace_id": 140, + "rule_group": "Bridge Rococo <> Westend", + "no_data_state": "OK", + "exec_err_state": "OK", + "is_paused": false + } + }, + { + "expr": "", + "for": "10m", + "labels": { + "matrix_room": "XyVkmRJgIkjcvIBPsP" + }, + "annotations": { + "__dashboardUid__": "UFsgbJtVz", + "__panelId__": "2", + "summary": "Best BridgeHubRococo header at BridgeHubWestend (00000002) doesn't match the same header at BridgeHubRococo" + }, + "grafana_alert": { + "id": 60, + "orgId": 1, + "title": "BridgeHubRococo header mismatch (00000002)", + "condition": "B", + "data": [ + { + "refId": "A", + "queryType": "", + "relativeTimeRange": { + "from": 21600, + "to": 0 + }, + "datasourceUid": "PC96415006F908B67", + "model": { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_is_source_and_source_at_target_using_different_forks{domain=\"parity-testnet\"}", + "instant": false, + "interval": "", + "intervalMs": 30000, + "legendFormat": "Best BridgeHubRococo header at BridgeHubWestend 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" + } + } + ], + "updated": "2023-12-08T06:04:42Z", + "intervalSeconds": 60, + "version": 114, + "uid": "BzBDb1pVz", + "namespace_uid": "eblDiw17z", + "namespace_id": 140, + "rule_group": "Bridge Rococo <> Westend", + "no_data_state": "OK", + "exec_err_state": "OK", + "is_paused": false + } + }, + { + "expr": "", + "for": "10m", + "labels": { + "matrix_room": "XyVkmRJgIkjcvIBPsP" + }, + "annotations": { + "__dashboardUid__": "UFsgbJtVz", + "__panelId__": "3", + "summary": "Best BridgeHubWestend header at BridgeHubRococo (00000002) doesn't match the same header at BridgeHubWestend" + }, + "grafana_alert": { + "id": 61, + "orgId": 1, + "title": "BridgeHubWestend header mismatch (00000002)", + "condition": "B", + "data": [ + { + "refId": "A", + "queryType": "", + "relativeTimeRange": { + "from": 21600, + "to": 0 + }, + "datasourceUid": "PC96415006F908B67", + "model": { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_is_source_and_source_at_target_using_different_forks{domain=\"parity-testnet\"}", + "instant": false, + "interval": "", + "intervalMs": 30000, + "legendFormat": "Best BridgeHubRococo header at BridgeHubWestend 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" + } + } + ], + "updated": "2023-12-08T06:04:42Z", + "intervalSeconds": 60, + "version": 113, + "uid": "1W6lb1p4z", + "namespace_uid": "eblDiw17z", + "namespace_id": 140, + "rule_group": "Bridge Rococo <> Westend", + "no_data_state": "OK", + "exec_err_state": "OK", + "is_paused": false + } + }, + { + "expr": "", + "for": "10m", + "labels": { + "matrix_room": "XyVkmRJgIkjcvIBPsP" + }, + "annotations": { + "__dashboardUid__": "UFsgbJtVz", + "__panelId__": "5", + "summary": "With-WestendBridgeHub messages relay balance at RococoBridgeHub (00000002) is too low" + }, + "grafana_alert": { + "id": 62, + "orgId": 1, + "title": "With-WestendBridgeHub messages relay balance at RococoBridgeHub (00000002) 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_BridgeHubWestendMessages_balance{domain=\"parity-testnet\"}[1h])", + "instant": false, + "interval": "", + "intervalMs": 30000, + "legendFormat": "Messages Relay Balance", + "maxDataPoints": 43200, + "range": true, + "refId": "A" + } + }, + { + "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" + } + } + ], + "updated": "2023-12-08T06:04:42Z", + "intervalSeconds": 60, + "version": 112, + "uid": "Y5Dm-1tVz", + "namespace_uid": "eblDiw17z", + "namespace_id": 140, + "rule_group": "Bridge Rococo <> Westend", + "no_data_state": "OK", + "exec_err_state": "OK", + "is_paused": false + } + }, + { + "expr": "", + "for": "10m", + "labels": { + "matrix_room": "XyVkmRJgIkjcvIBPsP" + }, + "annotations": { + "__dashboardUid__": "UFsgbJtVz", + "__panelId__": "6", + "summary": "With-RococoBridgeHub messages relay balance at WestendBridgeHub (00000002) is too low" + }, + "grafana_alert": { + "id": 63, + "orgId": 1, + "title": "With-RococoBridgeHub messages relay balance at WestendBridgeHub (00000002) 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_BridgeHubWestend_relay_BridgeHubRococoMessages_balance{domain=\"parity-testnet\"}[1h])", + "instant": false, + "interval": "", + "intervalMs": 30000, + "legendFormat": "Messages Relay Balance", + "maxDataPoints": 43200, + "range": true, + "refId": "A" + } + }, + { + "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" + } + } + ], + "updated": "2023-12-08T06:04:42Z", + "intervalSeconds": 60, + "version": 111, + "uid": "yUl4a1tVz", + "namespace_uid": "eblDiw17z", + "namespace_id": 140, + "rule_group": "Bridge Rococo <> Westend", + "no_data_state": "OK", + "exec_err_state": "OK", + "is_paused": false + } + }, + { + "expr": "", + "for": "5m", + "labels": { + "matrix_room": "XyVkmRJgIkjcvIBPsP" + }, + "annotations": { + "__dashboardUid__": "tkgc6_bnk", + "__panelId__": "6", + "summary": "Less than 500 Rococo headers have been synced to WestendBridgeHub in last 120 minutes. Relay is not running?" + }, + "grafana_alert": { + "id": 65, + "orgId": 1, + "title": "Rococo -> WestendBridgeHub finality sync lags (00000002)", + "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_BridgeHubWestend_Sync_best_source_at_target_block_number{domain=\"parity-testnet\"}[120m]))", + "instant": false, + "interval": "", + "intervalMs": 30000, + "legendFormat": "At Rococo", + "maxDataPoints": 43200, + "range": true, + "refId": "A" + } + }, + { + "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" + } + } + ], + "updated": "2023-12-08T06:04:42Z", + "intervalSeconds": 60, + "version": 80, + "uid": "R6GKwNA4z", + "namespace_uid": "eblDiw17z", + "namespace_id": 140, + "rule_group": "Bridge Rococo <> Westend", + "no_data_state": "OK", + "exec_err_state": "OK", + "is_paused": false + } + }, + { + "expr": "", + "for": "5m", + "labels": { + "matrix_room": "XyVkmRJgIkjcvIBPsP" + }, + "annotations": { + "__dashboardUid__": "zqjpgXxnk", + "__panelId__": "2", + "summary": "Less than 500 Westend headers have been synced to RococoBridgeHub in last 390 minutes. Relay is not running?" + }, + "grafana_alert": { + "id": 66, + "orgId": 1, + "title": "Westend -> RococoBridgeHub finality sync lags (00000002)", + "condition": "D", + "data": [ + { + "refId": "A", + "queryType": "", + "relativeTimeRange": { + "from": 21600, + "to": 0 + }, + "datasourceUid": "PC96415006F908B67", + "model": { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "max(increase(Westend_to_BridgeHubRococo_Sync_best_source_at_target_block_number{domain=\"parity-testnet\"}[390m]))", + "instant": false, + "interval": "", + "intervalMs": 30000, + "legendFormat": "At Westend", + "maxDataPoints": 43200, + "range": true, + "refId": "A" + } + }, + { + "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" + } + } + ], + "updated": "2023-12-08T06:04:42Z", + "intervalSeconds": 60, + "version": 78, + "uid": "rAM1QHAVk", + "namespace_uid": "eblDiw17z", + "namespace_id": 140, + "rule_group": "Bridge Rococo <> Westend", + "no_data_state": "OK", + "exec_err_state": "OK", + "is_paused": false + } + }, + { + "expr": "", + "for": "0s", + "labels": { + "matrix_room": "XyVkmRJgIkjcvIBPsP" + }, + "annotations": { + "__dashboardUid__": "UFsgbJtVz", + "__panelId__": "11", + "summary": "The RococoBridgeHub <> WestendBridgeHub relay (00000002) 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 <> WestendBridgeHub relay (00000002)", + "condition": "B", + "data": [ + { + "refId": "B", + "queryType": "instant", + "relativeTimeRange": { + "from": 600, + "to": 0 + }, + "datasourceUid": "P3572579027B246FE", + "model": { + "datasource": { + "type": "loki", + "uid": "P3572579027B246FE" + }, + "editorMode": "code", + "expr": "count_over_time({container=\"bridges-common-relay\"} |= `Aborting relay` [1m])", + "hide": false, + "intervalMs": 1000, + "legendFormat": "Aborts per minute", + "maxDataPoints": 43200, + "queryType": "instant", + "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" + } + } + ], + "updated": "2023-12-08T06:04:42Z", + "intervalSeconds": 60, + "version": 77, + "uid": "TwWPeN04z", + "namespace_uid": "eblDiw17z", + "namespace_id": 140, + "rule_group": "Bridge Rococo <> Westend", + "no_data_state": "OK", + "exec_err_state": "OK", + "is_paused": false + } + }, + { + "expr": "", + "for": "10m", + "labels": { + "matrix_room": "XyVkmRJgIkjcvIBPsP" + }, + "annotations": { + "__dashboardUid__": "UFsgbJtVz", + "__panelId__": "12", + "summary": "Best Rococo header at BridgeHubWestend (00000002) 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_BridgeHubWestend_Sync_is_source_and_source_at_target_using_different_forks{domain=\"parity-testnet\"}", + "instant": false, + "interval": "", + "intervalMs": 30000, + "legendFormat": "Best BridgeHubRococo header at BridgeHubWestend 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" + } + }, + { + "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" + } + } + ], + "updated": "2023-12-08T06:04:42Z", + "intervalSeconds": 60, + "version": 72, + "uid": "08-5gv04k", + "namespace_uid": "eblDiw17z", + "namespace_id": 140, + "rule_group": "Bridge Rococo <> Westend", + "no_data_state": "OK", + "exec_err_state": "OK", + "is_paused": false + } + }, + { + "expr": "", + "for": "10m", + "labels": { + "matrix_room": "XyVkmRJgIkjcvIBPsP" + }, + "annotations": { + "__dashboardUid__": "UFsgbJtVz", + "__panelId__": "13", + "summary": "Best Westend header at BridgeHubRococo (00000002) doesn't match the same header at Westend" + }, + "grafana_alert": { + "id": 70, + "orgId": 1, + "title": "Westend headers mismatch", + "condition": "C", + "data": [ + { + "refId": "A", + "queryType": "", + "relativeTimeRange": { + "from": 21600, + "to": 0 + }, + "datasourceUid": "PC96415006F908B67", + "model": { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "Westend_to_BridgeHubRococo_Sync_is_source_and_source_at_target_using_different_forks{domain=\"parity-testnet\"}", + "instant": false, + "interval": "", + "intervalMs": 30000, + "legendFormat": "Best BridgeHubRococo header at BridgeHubWestend 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" + } + }, + { + "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" + } + } + ], + "updated": "2023-12-08T06:04:42Z", + "intervalSeconds": 60, + "version": 71, + "uid": "Esj2gD0Vk", + "namespace_uid": "eblDiw17z", + "namespace_id": 140, + "rule_group": "Bridge Rococo <> Westend", + "no_data_state": "OK", + "exec_err_state": "OK", + "is_paused": false + } + }, + { + "expr": "", + "for": "5m", + "labels": { + "matrix_room": "XyVkmRJgIkjcvIBPsP" + }, + "annotations": { + "__dashboardUid__": "tkgc6_bnk", + "__panelId__": "9", + "summary": "Test messages from RococoBridgeHub to WestendBridgeHub are not generated. Our cronjob has died?" + }, + "grafana_alert": { + "id": 73, + "orgId": 1, + "title": "Test messages from RococoBridgeHub to WestendBridgeHub 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": "max by(container) (increase(BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\", type=~\"source_latest_generated\"}[24h]))", + "hide": true, + "instant": false, + "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" + } + }, + { + "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" + } + } + ], + "updated": "2023-12-08T06:04:42Z", + "intervalSeconds": 60, + "version": 43, + "uid": "ry1K5SB4k", + "namespace_uid": "eblDiw17z", + "namespace_id": 140, + "rule_group": "Bridge Rococo <> Westend", + "no_data_state": "OK", + "exec_err_state": "OK", + "is_paused": false + } + }, + { + "expr": "", + "for": "5m", + "labels": { + "matrix_room": "XyVkmRJgIkjcvIBPsP" + }, + "annotations": { + "__dashboardUid__": "UFsgbJtVz", + "__panelId__": "16", + "summary": "RococoBridgeHub <> WestendBridgeHub relay (00000002) node is down" + }, + "grafana_alert": { + "id": 74, + "orgId": 1, + "title": "RococoBridgeHub <> WestendBridgeHub relay (00000002) 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" + } + }, + { + "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" + } + } + ], + "updated": "2023-12-08T06:04:42Z", + "intervalSeconds": 60, + "version": 41, + "uid": "9YAdEUB4z", + "namespace_uid": "eblDiw17z", + "namespace_id": 140, + "rule_group": "Bridge Rococo <> Westend", + "no_data_state": "OK", + "exec_err_state": "OK", + "is_paused": false + } + } + ] +} diff --git a/deployments/bridges/rococo-wococo/dashboard/grafana/relay-rococo-to-wococo-messages-dashboard.json b/deployments/bridges/rococo-westend/dashboard/grafana/relay-rococo-to-westend-messages-dashboard.json similarity index 82% rename from deployments/bridges/rococo-wococo/dashboard/grafana/relay-rococo-to-wococo-messages-dashboard.json rename to deployments/bridges/rococo-westend/dashboard/grafana/relay-rococo-to-westend-messages-dashboard.json index cf0fa1bff790217392d6c83da70bc52b7783257d..4ba0737923a0efe58f6796f4b49f7a4f854a04b3 100644 --- a/deployments/bridges/rococo-wococo/dashboard/grafana/relay-rococo-to-wococo-messages-dashboard.json +++ b/deployments/bridges/rococo-westend/dashboard/grafana/relay-rococo-to-westend-messages-dashboard.json @@ -111,7 +111,7 @@ "uid": "PC96415006F908B67" }, "editorMode": "code", - "expr": "Rococo_to_BridgeHubWococo_Sync_best_source_block_number{domain=\"parity-testnet\"}", + "expr": "Rococo_to_BridgeHubWestend_Sync_best_source_block_number{domain=\"parity-testnet\"}", "legendFormat": "At Rococo", "range": true, "refId": "A" @@ -122,9 +122,9 @@ "uid": "PC96415006F908B67" }, "editorMode": "code", - "expr": "Rococo_to_BridgeHubWococo_Sync_best_source_at_target_block_number{domain=\"parity-testnet\"}", + "expr": "Rococo_to_BridgeHubWestend_Sync_best_source_at_target_block_number{domain=\"parity-testnet\"}", "hide": false, - "legendFormat": "At BridgeHubWococo", + "legendFormat": "At BridgeHubWestend", "range": true, "refId": "B" } @@ -215,8 +215,8 @@ "uid": "PC96415006F908B67" }, "editorMode": "code", - "expr": "Wococo_to_BridgeHubRococo_Sync_best_source_block_number{domain=\"parity-testnet\"}", - "legendFormat": "At Wococo", + "expr": "Westend_to_BridgeHubRococo_Sync_best_source_block_number{domain=\"parity-testnet\"}", + "legendFormat": "At Westend", "range": true, "refId": "A" }, @@ -226,14 +226,14 @@ "uid": "PC96415006F908B67" }, "editorMode": "code", - "expr": "Wococo_to_BridgeHubRococo_Sync_best_source_at_target_block_number{domain=\"parity-testnet\"}", + "expr": "Westend_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", + "title": "Best finalized Westend headers", "type": "timeseries" }, { @@ -320,7 +320,7 @@ }, "editorMode": "code", "exemplar": true, - "expr": "BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_best_source_block_number{domain=\"parity-testnet\"}", + "expr": "BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_best_source_block_number{domain=\"parity-testnet\"}", "interval": "", "legendFormat": "At RococoBridgeHub", "range": true, @@ -332,9 +332,9 @@ "uid": "PC96415006F908B67" }, "editorMode": "code", - "expr": "BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_best_source_at_target_block_number{domain=\"parity-testnet\"}", + "expr": "BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_best_source_at_target_block_number{domain=\"parity-testnet\"}", "hide": false, - "legendFormat": "At WococoBridgeHub", + "legendFormat": "At WestendBridgeHub", "range": true, "refId": "B" } @@ -426,9 +426,9 @@ }, "editorMode": "code", "exemplar": true, - "expr": "BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_best_target_block_number{domain=\"parity-testnet\"}", + "expr": "BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_best_target_block_number{domain=\"parity-testnet\"}", "interval": "", - "legendFormat": "At WococoBridgeHub", + "legendFormat": "At WestendBridgeHub", "range": true, "refId": "A" }, @@ -438,14 +438,14 @@ "uid": "PC96415006F908B67" }, "editorMode": "code", - "expr": "BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_best_target_at_source_block_number{domain=\"parity-testnet\"}", + "expr": "BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_best_target_at_source_block_number{domain=\"parity-testnet\"}", "hide": false, "legendFormat": "At RococoBridgeHub", "range": true, "refId": "B" } ], - "title": "Best finalized WococoBridgeHub headers", + "title": "Best finalized WestendBridgeHub headers", "type": "timeseries" }, { @@ -531,7 +531,7 @@ "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\")", + "expr": "label_replace(label_replace(BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_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 BridgeHubWestend\", \"type\", \"target_latest_received\")", "legendFormat": "{{type}}", "range": true, "refId": "A" @@ -542,14 +542,14 @@ "uid": "PC96415006F908B67" }, "editorMode": "code", - "expr": "increase(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\", type=~\"source_latest_generated\"}[24h])", + "expr": "increase(BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_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)", + "title": "Delivery race (00000002)", "type": "timeseries" }, { @@ -635,13 +635,13 @@ "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\")", + "expr": "label_replace(label_replace(BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=~\"source_latest_confirmed|target_latest_received\"}, \"type\", \"Latest delivery confirmation from BridgeHubWestend to BridgeHubRococo\", \"type\", \"source_latest_confirmed\"), \"type\", \"Latest BridgeHubRococo message received by BridgeHubWestend\", \"type\", \"target_latest_received\")", "legendFormat": "{{type}}", "range": true, "refId": "A" } ], - "title": "Confirmations race (00000001)", + "title": "Confirmations race (00000002)", "type": "timeseries" }, { @@ -727,7 +727,7 @@ "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))", + "expr": "scalar(max_over_time(BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0))", "legendFormat": "Undelivered messages", "range": true, "refId": "A" @@ -738,14 +738,14 @@ "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))", + "expr": "((vector(0) and ((BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"} > on () BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}))) or vector(1)) + on () increase(BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[10m]) * on () ((vector(1) and ((BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"} > on () BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_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)", + "title": "Delivery race lags (00000002)", "type": "timeseries" }, { @@ -831,13 +831,13 @@ "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))", + "expr": "scalar(max_over_time(RococoBridgeHub_to_WestendBridgeHub_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(RococoBridgeHub_to_WestendBridgeHub_MessageLane_00000002_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)", + "title": "Confirmations race lags (00000002)", "type": "timeseries" }, { @@ -923,7 +923,7 @@ "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))", + "expr": "scalar(max_over_time(BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))", "legendFormat": "Unconfirmed rewards", "range": true, "refId": "A" @@ -934,19 +934,19 @@ "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))", + "expr": "(scalar(max_over_time(BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0) > bool min_over_time(BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_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)", + "title": "Reward lags (00000002)", "type": "timeseries" } ], "refresh": "5s", - "schemaVersion": 37, + "schemaVersion": 38, "style": "dark", "tags": [], "templating": { @@ -958,8 +958,8 @@ }, "timepicker": {}, "timezone": "", - "title": "BridgeHubRococo to BridgeHubWococo (00000001)", + "title": "BridgeHubRococo to BridgeHubWestend (00000002)", "uid": "tkgc6_bnk", - "version": 44, + "version": 45, "weekStart": "" -} +} \ No newline at end of file diff --git a/deployments/bridges/rococo-wococo/dashboard/grafana/relay-wococo-to-rococo-messages-dashboard.json b/deployments/bridges/rococo-westend/dashboard/grafana/relay-westend-to-rococo-messages-dashboard.json similarity index 80% rename from deployments/bridges/rococo-wococo/dashboard/grafana/relay-wococo-to-rococo-messages-dashboard.json rename to deployments/bridges/rococo-westend/dashboard/grafana/relay-westend-to-rococo-messages-dashboard.json index 15967adcb349f8fdcdfbd903edf940ac030938f1..aa246d3827c083856dc16de51f87a2aeb92e92f5 100644 --- a/deployments/bridges/rococo-wococo/dashboard/grafana/relay-wococo-to-rococo-messages-dashboard.json +++ b/deployments/bridges/rococo-westend/dashboard/grafana/relay-westend-to-rococo-messages-dashboard.json @@ -111,8 +111,8 @@ "uid": "PC96415006F908B67" }, "editorMode": "code", - "expr": "Wococo_to_BridgeHubRococo_Sync_best_source_block_number{domain=\"parity-testnet\"}", - "legendFormat": "At Wococo", + "expr": "Westend_to_BridgeHubRococo_Sync_best_source_block_number{domain=\"parity-testnet\"}", + "legendFormat": "At Westend", "range": true, "refId": "A" }, @@ -122,14 +122,14 @@ "uid": "PC96415006F908B67" }, "editorMode": "code", - "expr": "Wococo_to_BridgeHubRococo_Sync_best_source_at_target_block_number{domain=\"parity-testnet\"}", + "expr": "Westend_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", + "title": "Best finalized Westend headers", "type": "timeseries" }, { @@ -215,7 +215,7 @@ "uid": "PC96415006F908B67" }, "editorMode": "code", - "expr": "Rococo_to_BridgeHubWococo_Sync_best_source_block_number{domain=\"parity-testnet\"}", + "expr": "Rococo_to_BridgeHubWestend_Sync_best_source_block_number{domain=\"parity-testnet\"}", "legendFormat": "At Rococo", "range": true, "refId": "A" @@ -226,9 +226,9 @@ "uid": "PC96415006F908B67" }, "editorMode": "code", - "expr": "Rococo_to_BridgeHubWococo_Sync_best_source_at_target_block_number{domain=\"parity-testnet\"}", + "expr": "Rococo_to_BridgeHubWestend_Sync_best_source_at_target_block_number{domain=\"parity-testnet\"}", "hide": false, - "legendFormat": "At WococoBridgeHub", + "legendFormat": "At WestendBridgeHub", "range": true, "refId": "B" } @@ -320,9 +320,9 @@ }, "editorMode": "code", "exemplar": true, - "expr": "BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_best_source_block_number{domain=\"parity-testnet\"}", + "expr": "BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_best_source_block_number{domain=\"parity-testnet\"}", "interval": "", - "legendFormat": "At WococoBridgeHub", + "legendFormat": "At WestendBridgeHub", "range": true, "refId": "A" }, @@ -332,14 +332,14 @@ "uid": "PC96415006F908B67" }, "editorMode": "code", - "expr": "BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_best_source_at_target_block_number{domain=\"parity-testnet\"}", + "expr": "BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_best_source_at_target_block_number{domain=\"parity-testnet\"}", "hide": false, "legendFormat": "At RococoBridgeHub", "range": true, "refId": "B" } ], - "title": "Best finalized WococoBridgeHub headers", + "title": "Best finalized WestendBridgeHub headers", "type": "timeseries" }, { @@ -426,7 +426,7 @@ }, "editorMode": "code", "exemplar": true, - "expr": "BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_best_target_block_number{domain=\"parity-testnet\"}", + "expr": "BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_best_target_block_number{domain=\"parity-testnet\"}", "interval": "", "legendFormat": "At RococoBridgeHub", "range": true, @@ -438,9 +438,9 @@ "uid": "PC96415006F908B67" }, "editorMode": "code", - "expr": "BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_best_target_at_source_block_number{domain=\"parity-testnet\"}", + "expr": "BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_best_target_at_source_block_number{domain=\"parity-testnet\"}", "hide": false, - "legendFormat": "At WococoBridgeHub", + "legendFormat": "At WestendBridgeHub", "range": true, "refId": "B" } @@ -531,13 +531,13 @@ "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\")", + "expr": "label_replace(label_replace(BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=~\"source_latest_generated|target_latest_received\"}, \"type\", \"Latest message sent from BridgeHubWestend\", \"type\", \"source_latest_generated\"), \"type\", \"Latest BridgeHubWestend message received by BridgeHubRococo\", \"type\", \"target_latest_received\")", "legendFormat": "{{type}}", "range": true, "refId": "A" } ], - "title": "Delivery race (00000001)", + "title": "Delivery race (00000002)", "type": "timeseries" }, { @@ -623,13 +623,13 @@ "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\")", + "expr": "label_replace(label_replace(BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=~\"source_latest_confirmed|target_latest_received\"}, \"type\", \"Latest delivery confirmation from BridgeHubRococo to BridgeHubWestend\", \"type\", \"source_latest_confirmed\"), \"type\", \"Latest BridgeHubWestend message received by BridgeHubRococo\", \"type\", \"target_latest_received\")", "legendFormat": "{{type}}", "range": true, "refId": "A" } ], - "title": "Confirmations race (00000001)", + "title": "Confirmations race (00000002)", "type": "timeseries" }, { @@ -715,7 +715,7 @@ "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))", + "expr": "scalar(max_over_time(BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0))", "legendFormat": "Undelivered messages", "range": true, "refId": "A" @@ -726,14 +726,14 @@ "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))", + "expr": "((vector(0) and ((BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"} > on () BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}))) or vector(1)) + on () increase(BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[10m]) * on () ((vector(1) and ((BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"} > on () BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_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)", + "title": "Delivery race lags (00000002)", "type": "timeseries" }, { @@ -819,13 +819,13 @@ "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))", + "expr": "scalar(max_over_time(BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_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)", + "title": "Confirmations race lags (00000002)", "type": "timeseries" }, { @@ -911,7 +911,7 @@ "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))", + "expr": "scalar(max_over_time(BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))", "legendFormat": "Unconfirmed rewards", "range": true, "refId": "A" @@ -922,32 +922,32 @@ "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))", + "expr": "(scalar(max_over_time(BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0) > bool min_over_time(BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_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)", + "title": "Reward lags (00000002)", "type": "timeseries" } ], "refresh": "5s", - "schemaVersion": 37, + "schemaVersion": 38, "style": "dark", "tags": [], "templating": { "list": [] }, "time": { - "from": "now-5m", + "from": "now-6h", "to": "now" }, "timepicker": {}, "timezone": "", - "title": "BridgeHubWococo to BridgeHubRococo (00000001)", + "title": "BridgeHubWestend to BridgeHubRococo (00000002)", "uid": "zqjpgXxnk", - "version": 32, + "version": 35, "weekStart": "" -} +} \ No newline at end of file diff --git a/deployments/bridges/rococo-wococo/dashboard/grafana/rococo-wococo-maintenance-dashboard.json b/deployments/bridges/rococo-westend/dashboard/grafana/rococo-westend-maintenance-dashboard.json similarity index 92% rename from deployments/bridges/rococo-wococo/dashboard/grafana/rococo-wococo-maintenance-dashboard.json rename to deployments/bridges/rococo-westend/dashboard/grafana/rococo-westend-maintenance-dashboard.json index 6158c3e73a9e27447c87dc82d2a2f4ef5ef7da7b..c9eae23f0114a9c0866309b5d34f2b3ea8b3613c 100644 --- a/deployments/bridges/rococo-wococo/dashboard/grafana/rococo-wococo-maintenance-dashboard.json +++ b/deployments/bridges/rococo-westend/dashboard/grafana/rococo-westend-maintenance-dashboard.json @@ -77,7 +77,7 @@ "text": {}, "textMode": "name" }, - "pluginVersion": "9.3.1", + "pluginVersion": "10.0.2", "targets": [ { "datasource": { @@ -145,7 +145,7 @@ "text": {}, "textMode": "name" }, - "pluginVersion": "9.3.1", + "pluginVersion": "10.0.2", "targets": [ { "datasource": { @@ -228,7 +228,7 @@ }, "textMode": "auto" }, - "pluginVersion": "9.3.1", + "pluginVersion": "10.0.2", "targets": [ { "datasource": { @@ -517,8 +517,8 @@ "uid": "PC96415006F908B67" }, "editorMode": "code", - "expr": "Rococo_to_BridgeHubWococo_Sync_is_source_and_source_at_target_using_different_forks{domain=\"parity-testnet\"}", - "legendFormat": "Best BridgeHubRococo header at BridgeHubWococo doesn't match the same header of BridgeHubRococo", + "expr": "Rococo_to_BridgeHubWestend_Sync_is_source_and_source_at_target_using_different_forks{domain=\"parity-testnet\"}", + "legendFormat": "Best BridgeHubRococo header at BridgeHubWestend doesn't match the same header of BridgeHubRococo", "range": true, "refId": "A" } @@ -609,13 +609,13 @@ "uid": "PC96415006F908B67" }, "editorMode": "code", - "expr": "Wococo_to_BridgeHubRococo_Sync_is_source_and_source_at_target_using_different_forks{domain=\"parity-testnet\"}", - "legendFormat": "Best BridgeHubRococo header at BridgeHubWococo doesn't match the same header of BridgeHubRococo", + "expr": "Westend_to_BridgeHubRococo_Sync_is_source_and_source_at_target_using_different_forks{domain=\"parity-testnet\"}", + "legendFormat": "Best BridgeHubRococo header at BridgeHubWestend doesn't match the same header of BridgeHubRococo", "range": true, "refId": "A" } ], - "title": "Wococo headers mismatch", + "title": "Westend headers mismatch", "type": "timeseries" }, { @@ -701,8 +701,8 @@ "uid": "PC96415006F908B67" }, "editorMode": "code", - "expr": "BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_is_source_and_source_at_target_using_different_forks{domain=\"parity-testnet\"}", - "legendFormat": "Best BridgeHubRococo header at BridgeHubWococo doesn't match the same header of BridgeHubRococo", + "expr": "BridgeHubRococo_to_BridgeHubWestend_MessageLane_00000002_is_source_and_source_at_target_using_different_forks{domain=\"parity-testnet\"}", + "legendFormat": "Best BridgeHubRococo header at BridgeHubWestend doesn't match the same header of BridgeHubRococo", "range": true, "refId": "A" } @@ -793,13 +793,13 @@ "uid": "PC96415006F908B67" }, "editorMode": "code", - "expr": "BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_is_source_and_source_at_target_using_different_forks{domain=\"parity-testnet\"}", - "legendFormat": "Best BridgeHubRococo header at BridgeHubWococo doesn't match the same header of BridgeHubRococo", + "expr": "BridgeHubWestend_to_BridgeHubRococo_MessageLane_00000002_is_source_and_source_at_target_using_different_forks{domain=\"parity-testnet\"}", + "legendFormat": "Best BridgeHubRococo header at BridgeHubWestend doesn't match the same header of BridgeHubRococo", "range": true, "refId": "A" } ], - "title": "BridgeHubWococo headers mismatch", + "title": "BridgeHubWestend headers mismatch", "type": "timeseries" }, { @@ -847,8 +847,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -885,7 +884,7 @@ "uid": "PC96415006F908B67" }, "editorMode": "code", - "expr": "at_BridgeHubRococo_relay_BridgeHubWococoMessages_balance{domain=\"parity-testnet\"}", + "expr": "at_BridgeHubRococo_relay_BridgeHubWestendMessages_balance{domain=\"parity-testnet\"}", "legendFormat": "Messages Relay Balance", "range": true, "refId": "A" @@ -896,7 +895,7 @@ "uid": "PC96415006F908B67" }, "editorMode": "code", - "expr": "at_BridgeHubRococo_relay_WococoHeaders_reward_for_msgs_to_BridgeHubWococo_on_lane_00000001{domain=\"parity-testnet\"} + at_BridgeHubRococo_relay_BridgeHubWococoMessages_reward_for_msgs_to_BridgeHubWococo_on_lane_00000001{domain=\"parity-testnet\"}", + "expr": "at_BridgeHubRococo_relay_WestendHeaders_reward_for_msgs_to_BridgeHubWestend_on_lane_00000002{domain=\"parity-testnet\"} + at_BridgeHubRococo_relay_BridgeHubWestendMessages_reward_for_msgs_to_BridgeHubWestend_on_lane_00000002{domain=\"parity-testnet\"}", "hide": false, "legendFormat": "Pending reward", "range": true, @@ -951,8 +950,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -989,7 +987,7 @@ "uid": "PC96415006F908B67" }, "editorMode": "code", - "expr": "at_BridgeHubWococo_relay_BridgeHubRococoMessages_balance{domain=\"parity-testnet\"}", + "expr": "at_BridgeHubWestend_relay_BridgeHubRococoMessages_balance{domain=\"parity-testnet\"}", "legendFormat": "Messages Relay Balance", "range": true, "refId": "A" @@ -1000,32 +998,32 @@ "uid": "PC96415006F908B67" }, "editorMode": "code", - "expr": "at_BridgeHubRococo_relay_BridgeHubWococoMessages_reward_for_msgs_from_BridgeHubWococo_on_lane_00000001{domain=\"parity-testnet\"} + at_BridgeHubRococo_relay_BridgeHubWococoMessages_reward_for_msgs_to_BridgeHubWococo_on_lane_00000001{domain=\"parity-testnet\"}", + "expr": "at_BridgeHubRococo_relay_BridgeHubWestendMessages_reward_for_msgs_from_BridgeHubWestend_on_lane_00000002{domain=\"parity-testnet\"} + at_BridgeHubRococo_relay_BridgeHubWestendMessages_reward_for_msgs_to_BridgeHubWestend_on_lane_00000002{domain=\"parity-testnet\"}", "hide": false, "legendFormat": "Pending reward", "range": true, "refId": "B" } ], - "title": "Relay balances at WococoBridgeHub", + "title": "Relay balances at WestendBridgeHub", "type": "timeseries" } ], "refresh": "5s", - "schemaVersion": 37, + "schemaVersion": 38, "style": "dark", "tags": [], "templating": { "list": [] }, "time": { - "from": "now-15m", + "from": "now-6h", "to": "now" }, "timepicker": {}, "timezone": "", - "title": "BridgeHubRococo <> BridgeHubWococo maintenance (00000001)", + "title": "BridgeHubRococo <> BridgeHubWestend maintenance (00000002)", "uid": "UFsgbJtVz", - "version": 26, + "version": 27, "weekStart": "" -} +} \ No newline at end of file diff --git a/deployments/bridges/rococo-wococo/README.md b/deployments/bridges/rococo-wococo/README.md deleted file mode 100644 index 1c2985a3357751c825bfdb601dcf3d40d27d0016..0000000000000000000000000000000000000000 --- a/deployments/bridges/rococo-wococo/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Rococo Bridge Hub <> Wococo Bridge Hub deployments - -This folder contains some information and useful stuff from our other test deployment - between Rococo and Wococo -bridge hubs. The bridge overview and other helpful information can be found in -[this readme](https://github.com/paritytech/cumulus/tree/bridge-hub-rococo-wococo/parachains/runtimes/bridge-hubs). - -## Grafana Alerts and Dashboards - -JSON model for Grafana alerts and dashobards that we use, may be found in the [dasboard/grafana](./dashboard/grafana/) -folder. diff --git a/deployments/bridges/rococo-wococo/dashboard/grafana/bridges-alerts.json b/deployments/bridges/rococo-wococo/dashboard/grafana/bridges-alerts.json deleted file mode 100644 index 51cea87cac98c4543672a49631c05eef264c58e4..0000000000000000000000000000000000000000 --- a/deployments/bridges/rococo-wococo/dashboard/grafana/bridges-alerts.json +++ /dev/null @@ -1,2255 +0,0 @@ -{ - "Bridges":[ - { - "name":"BEEFY Lagging Sessions", - "interval":"20m", - "rules":[ - { - "expr":"", - "for":"20m", - "labels":{ - "matrix_room":"!lMunCqbBqxEqfRuUDF:parity.io" - }, - "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" - } - }, - { - "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" - } - } - ], - "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" - } - } - ] - }, - { - "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 -\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" - } - }, - { - "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" - } - } - ], - "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" - } - }, - { - "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 -\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" - } - }, - { - "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" - } - } - ], - "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" - } - }, - { - "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 -\u003e 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" - } - }, - { - "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" - } - } - ], - "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" - } - }, - { - "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 -\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" - } - }, - { - "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" - } - } - ], - "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" - } - }, - { - "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 -\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" - } - }, - { - "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" - } - } - ], - "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" - } - }, - { - "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 -\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" - } - }, - { - "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" - } - } - ], - "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" - } - }, - { - "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" - } - }, - { - "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" - } - } - ], - "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" - } - }, - { - "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" - } - }, - { - "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" - } - } - ], - "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" - } - }, - { - "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" - } - }, - { - "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" - } - } - ], - "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" - } - }, - { - "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" - } - }, - { - "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" - } - } - ], - "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" - } - }, - { - "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 -\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" - } - }, - { - "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" - } - } - ], - "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" - } - }, - { - "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 -\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" - } - }, - { - "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" - } - } - ], - "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" - } - }, - { - "expr":"", - "for":"0s", - "labels":{ - "matrix_room":"XyVkmRJgIkjcvIBPsP" - }, - "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" - }, - "grafana_alert":{ - "id":67, - "orgId":1, - "title":"Version guard has aborted RococoBridgeHub \u003c\u003e 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" - } - }, - { - "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" - } - } - ], - "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" - } - }, - { - "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" - } - }, - { - "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" - } - } - ], - "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" - } - }, - { - "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" - } - }, - { - "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" - } - } - ], - "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" - }, - "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" - } - }, - { - "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" - } - } - ], - "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" - } - }, - { - "expr":"", - "for":"5m", - "labels":{ - "matrix_room":"XyVkmRJgIkjcvIBPsP" - }, - "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" - } - }, - { - "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" - } - } - ], - "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" - }, - "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" - } - }, - { - "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" - } - } - ], - "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" - } - } - ] - } - ] - } - \ No newline at end of file diff --git a/deployments/bridges/rococo/README.md b/deployments/bridges/rococo/README.md new file mode 100644 index 0000000000000000000000000000000000000000..ee4ab77301f37c147d0bba7cddb46cfe052b6e3e --- /dev/null +++ b/deployments/bridges/rococo/README.md @@ -0,0 +1,16 @@ +# Rococo deployments + +This folder contains some information and useful stuff from our other test deployment on Rococo. + +## Grafana Alerts and Dashboards + +JSON model for Grafana alerts and dashobards that we use, may be found in the [dasboard/grafana](./dashboard/grafana/) +folder. + +**Dashboards:** +- rococo-beefy-dashboard.json (exported JSON directly from https://grafana.teleport.parity.io/dashboards/f/eblDiw17z/Bridges) + +**Alerts:** +- rococo-beefy-alerts.json https://grafana.teleport.parity.io/api/ruler/grafana/api/v1/rules/Bridges/Rococo%20BEEFY + +_Note: All json files are formatted with `jq . file.json`._ \ No newline at end of file diff --git a/deployments/bridges/rococo/dashboard/grafana/rococo-beefy-alerts.json b/deployments/bridges/rococo/dashboard/grafana/rococo-beefy-alerts.json new file mode 100644 index 0000000000000000000000000000000000000000..c684584b0f8709fe33cdac0cdc48b2b15888672c --- /dev/null +++ b/deployments/bridges/rococo/dashboard/grafana/rococo-beefy-alerts.json @@ -0,0 +1,190 @@ +{ + "name": "Rococo BEEFY", + "interval": "20m", + "rules": [ + { + "expr": "", + "for": "20m", + "labels": { + "matrix_room": "lMunCqbBqxEqfRuUDF" + }, + "annotations": { + "__dashboardUid__": "3sEDRyl7z", + "__panelId__": "6", + "summary": "Some Rococo BEEFY validators experienced lagging sessions" + }, + "grafana_alert": { + "id": 42, + "orgId": 1, + "title": "Rococo 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" + } + }, + { + "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" + } + } + ], + "updated": "2023-11-21T08:44:25Z", + "intervalSeconds": 1200, + "version": 14, + "uid": "eYY8ks_7z", + "namespace_uid": "eblDiw17z", + "namespace_id": 140, + "rule_group": "Rococo BEEFY", + "no_data_state": "NoData", + "exec_err_state": "Alerting", + "is_paused": false + } + }, + { + "expr": "", + "for": "1h", + "labels": { + "matrix_room": "lMunCqbBqxEqfRuUDF" + }, + "annotations": { + "__dashboardUid__": "3sEDRyl7z", + "__panelId__": "2", + "summary": "Rococo BEEFY best blocks have not advanced for at least 60 mins" + }, + "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.*(validator|rpc).*\"}[1h])", + "hide": false, + "intervalMs": 1000, + "maxDataPoints": 43200, + "range": true, + "refId": "A" + } + }, + { + "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" + } + } + ], + "updated": "2023-11-21T08:44:25Z", + "intervalSeconds": 1200, + "version": 15, + "uid": "CBuugs_7k", + "namespace_uid": "eblDiw17z", + "namespace_id": 140, + "rule_group": "Rococo BEEFY", + "no_data_state": "Alerting", + "exec_err_state": "Alerting", + "is_paused": false + } + } + ] +} diff --git a/deployments/bridges/rococo/dashboard/grafana/rococo-beefy-dashboard.json b/deployments/bridges/rococo/dashboard/grafana/rococo-beefy-dashboard.json new file mode 100644 index 0000000000000000000000000000000000000000..006b2f0621c9db5ccc7a80cc0c9e8c668d7bbc92 --- /dev/null +++ b/deployments/bridges/rococo/dashboard/grafana/rococo-beefy-dashboard.json @@ -0,0 +1,330 @@ +{ + "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": 189, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "description": "", + "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": "stepAfter", + "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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "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", + "exemplar": true, + "expr": "substrate_beefy_best_block{chain=\"rococo_v2_2\", node=~\"rococo.*(validator|rpc).*\"}", + "hide": false, + "interval": "", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Rococo Beefy Best block", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 1, + "drawStyle": "bars", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "stepAfter", + "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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "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" + }, + "exemplar": true, + "expr": "substrate_beefy_lagging_sessions{chain=\"rococo_v2_2\", node=~\"rococo.*(validator|3-rpc).*\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Rococo BEEFY Lagging Sessions", + "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": "stepAfter", + "lineWidth": 3, + "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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 9 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "exemplar": true, + "expr": "substrate_beefy_validator_set_id{chain=\"rococo_v2_2\", node=~\"rococo.*(validator|3-rpc).*\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Rococo BEEFY Validator Set ID", + "type": "timeseries" + } + ], + "refresh": "", + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Rococo BEEFY", + "uid": "3sEDRyl7z", + "version": 16, + "weekStart": "" +} diff --git a/deployments/bridges/westend-millau/dashboard/grafana/relay-westend-to-millau-headers-dashboard.json b/deployments/bridges/westend-millau/dashboard/grafana/relay-westend-to-millau-headers-dashboard.json deleted file mode 100644 index 8f740d2ba5e4c6331b816d4ceeba1354c7da8141..0000000000000000000000000000000000000000 --- a/deployments/bridges/westend-millau/dashboard/grafana/relay-westend-to-millau-headers-dashboard.json +++ /dev/null @@ -1,781 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "links": [], - "panels": [ - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 32 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "min" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "60m", - "frequency": "5m", - "handler": 1, - "message": "", - "name": "Synced Header Difference is Over 32 (Westend to Millau)", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "description": "Shows how many headers behind the target chain is from the source chain.", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 0 - }, - "hiddenSeries": false, - "id": 14, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "max(Westend_to_Millau_Sync_best_source_block_number) - max(Westend_to_Millau_Sync_best_source_at_target_block_number)", - "format": "table", - "instant": false, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 5 - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Difference Between Source and Target Headers", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 32 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "2m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "min" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "60m", - "frequency": "5m", - "handler": 1, - "name": "No New Headers (Westend to Millau)", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "description": "How many headers has the relay synced from the source node in the last 2 mins?", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 0 - }, - "hiddenSeries": false, - "id": 16, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "max_over_time(Westend_to_Millau_Sync_best_source_block_number[10m])-min_over_time(Westend_to_Millau_Sync_best_source_block_number[10m])", - "interval": "", - "legendFormat": "Number of new Headers on Westend (Last 10 Mins)", - "refId": "A" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "lt", - "value": 5 - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Headers Synced on Millau (Last 2 Mins)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": { - "align": null - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 2, - "interval": "5s", - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "7.1.3", - "targets": [ - { - "expr": "Westend_to_Millau_Sync_best_source_block_number", - "format": "time_series", - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "Best Known Westend Header at Westend", - "refId": "A" - }, - { - "expr": "Westend_to_Millau_Sync_best_source_at_target_block_number", - "format": "time_series", - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "Best Known Westend Header at Millau", - "refId": "B" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Best Blocks according to Relay", - "type": "stat" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "description": "", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 6, - "x": 12, - "y": 8 - }, - "hiddenSeries": false, - "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "system_average_load{instance='relay-headers-westend-to-millau-1:9616'}", - "interval": "", - "legendFormat": "Average system load in last {{over}}", - "refId": "A" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": null - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Average System Load", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 18, - "y": 8 - }, - "id": 12, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "7.1.3", - "targets": [ - { - "expr": "avg_over_time(process_cpu_usage_percentage{instance='relay-headers-westend-to-millau-1:9616'}[1m])", - "instant": true, - "interval": "", - "legendFormat": "1 CPU = 100", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Relay Process CPU Usage ", - "type": "gauge" - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 0 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "max" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "5m", - "frequency": "1m", - "handler": 1, - "name": "Whether with-Westend-grandpa-pallet and Westend itself are on different forks alert", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 10, - "w": 12, - "x": 0, - "y": 14 - }, - "hiddenSeries": false, - "id": 18, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "Westend_to_Millau_Sync_is_source_and_source_at_target_using_different_forks", - "interval": "", - "legendFormat": "On different forks?", - "refId": "A" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 0 - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Whether with-Westend-grandpa-pallet and Westend itself are on different forks", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "description": "", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 16 - }, - "hiddenSeries": false, - "id": 10, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "process_memory_usage_bytes{instance='relay-headers-westend-to-millau-1:9616'} / 1024 / 1024", - "interval": "", - "legendFormat": "Process memory, MB", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Memory Usage for Relay Process", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "5s", - "schemaVersion": 26, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "", - "title": "Westend to Millau Header Sync Dashboard", - "uid": "relay-westend-to-millau-headers", - "version": 1 -} diff --git a/deployments/bridges/westend-millau/dashboard/grafana/relay-westend-to-millau-parachains-dashboard.json b/deployments/bridges/westend-millau/dashboard/grafana/relay-westend-to-millau-parachains-dashboard.json deleted file mode 100644 index 1ab05d6d8273f21f82ca281c5ae44943397d86b2..0000000000000000000000000000000000000000 --- a/deployments/bridges/westend-millau/dashboard/grafana/relay-westend-to-millau-parachains-dashboard.json +++ /dev/null @@ -1,200 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "id": 9, - "links": [], - "panels": [ - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 32 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "C", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "min" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "5m", - "frequency": "1m", - "handler": 1, - "name": "Too many AssetHubWestend headers are missing at Millau", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 0 - }, - "hiddenSeries": false, - "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "Westend_to_Millau_Parachains_1000_best_parachain_block_number_at_source", - "interval": "", - "legendFormat": "At Westend", - "refId": "A" - }, - { - "expr": "Westend_to_Millau_Parachains_1000_best_parachain_block_number_at_target", - "interval": "", - "legendFormat": "At Millau", - "refId": "B" - }, - { - "expr": "Westend_to_Millau_Parachains_1000_best_parachain_block_number_at_source - Westend_to_Millau_Parachains_1000_best_parachain_block_number_at_target", - "hide": true, - "interval": "", - "legendFormat": "Missing AssetHubWestend headers at Millau", - "refId": "C" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 32 - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "AssetHubWestend headers", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "5s", - "schemaVersion": 26, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "", - "title": "Westend parachains at Millau", - "uid": "vUMhOlq7k", - "version": 1 - } - \ No newline at end of file diff --git a/deployments/bridges/westend-millau/dashboard/prometheus/targets.yml b/deployments/bridges/westend-millau/dashboard/prometheus/targets.yml deleted file mode 100644 index aed2d49458251711b9c36557501de03e412a099c..0000000000000000000000000000000000000000 --- a/deployments/bridges/westend-millau/dashboard/prometheus/targets.yml +++ /dev/null @@ -1,3 +0,0 @@ -- targets: - - relay-headers-westend-to-millau-1:9616 - - relay-parachains-westend-to-millau-1:9616 \ No newline at end of file diff --git a/deployments/bridges/westend-millau/docker-compose.yml b/deployments/bridges/westend-millau/docker-compose.yml deleted file mode 100644 index f339c61f694692d41247037e6345c9e87512e9a7..0000000000000000000000000000000000000000 --- a/deployments/bridges/westend-millau/docker-compose.yml +++ /dev/null @@ -1,72 +0,0 @@ -# Exposed ports: 10200-10203 - -version: '3.5' -services: - relay-headers-westend-to-millau-1: - image: ${SUBSTRATE_RELAY_IMAGE:-paritytech/substrate-relay} - entrypoint: /entrypoints/relay-headers-westend-to-millau-entrypoint.sh - volumes: - - ./bridges/westend-millau/entrypoints:/entrypoints - environment: - RUST_LOG: rpc=trace,bridge=trace - ports: - - "10200:9616" - depends_on: - - millau-node-alice - - relay-headers-westend-to-millau-2: - image: ${SUBSTRATE_RELAY_IMAGE:-paritytech/substrate-relay} - entrypoint: /entrypoints/relay-headers-westend-to-millau-entrypoint.sh - volumes: - - ./bridges/westend-millau/entrypoints:/entrypoints - environment: - RUST_LOG: rpc=trace,bridge=trace - EXT_RELAY_ACCOUNT: //Westend.HeadersRelay2 - ports: - - "10201:9616" - depends_on: - - millau-node-alice - - relay-parachains-westend-to-millau-1: - image: ${SUBSTRATE_RELAY_IMAGE:-paritytech/substrate-relay} - entrypoint: /entrypoints/relay-parachains-westend-to-millau-entrypoint.sh - volumes: - - ./bridges/westend-millau/entrypoints:/entrypoints - environment: - RUST_LOG: rpc=trace,bridge=trace - ports: - - "10202:9616" - depends_on: - - millau-node-alice - - relay-parachains-westend-to-millau-2: - image: ${SUBSTRATE_RELAY_IMAGE:-paritytech/substrate-relay} - entrypoint: /entrypoints/relay-parachains-westend-to-millau-entrypoint.sh - volumes: - - ./bridges/westend-millau/entrypoints:/entrypoints - environment: - RUST_LOG: rpc=trace,bridge=trace - EXT_RELAY_ACCOUNT: //Westend.AssetHubWestendHeaders2 - ports: - - "10203:9616" - depends_on: - - millau-node-alice - - # Note: These are being overridden from the top level `monitoring` compose file. - grafana-dashboard: - environment: - VIRTUAL_HOST: grafana.millau.brucke.link,grafana.rialto.brucke.link - VIRTUAL_PORT: 3000 - LETSENCRYPT_HOST: grafana.millau.brucke.link,grafana.rialto.brucke.link - LETSENCRYPT_EMAIL: admin@parity.io - volumes: - - ./bridges/westend-millau/dashboard/grafana:/etc/grafana/dashboards/westend-millau:ro - - prometheus-metrics: - volumes: - - ./bridges/westend-millau/dashboard/prometheus/targets.yml:/etc/prometheus/targets-westend-millau.yml - depends_on: - - relay-headers-westend-to-millau-1 - - relay-headers-westend-to-millau-2 - - relay-parachains-westend-to-millau-1 - - relay-parachains-westend-to-millau-2 diff --git a/deployments/bridges/westend-millau/entrypoints/relay-headers-westend-to-millau-entrypoint.sh b/deployments/bridges/westend-millau/entrypoints/relay-headers-westend-to-millau-entrypoint.sh deleted file mode 100755 index 8548e9f5a41cc459b90a8b1365e99eebf053bda1..0000000000000000000000000000000000000000 --- a/deployments/bridges/westend-millau/entrypoints/relay-headers-westend-to-millau-entrypoint.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -set -xeu - -sleep 15 - -RELAY_ACCOUNT=${EXT_RELAY_ACCOUNT:-//Westend.HeadersRelay1} - -/home/user/substrate-relay init-bridge westend-to-millau \ - --source-host westend-rpc.polkadot.io \ - --source-port 443 \ - --source-secure \ - --target-host millau-node-alice \ - --target-port 9944 \ - --target-signer //Westend.GrandpaOwner - -# Give chain a little bit of time to process initialization transaction -sleep 6 -/home/user/substrate-relay relay-headers westend-to-millau \ - --source-host westend-rpc.polkadot.io \ - --source-port 443 \ - --source-secure \ - --target-host millau-node-alice \ - --target-port 9944 \ - --target-signer $RELAY_ACCOUNT \ - --target-transactions-mortality=4\ - --prometheus-host=0.0.0.0 diff --git a/deployments/bridges/westend-millau/entrypoints/relay-parachains-westend-to-millau-entrypoint.sh b/deployments/bridges/westend-millau/entrypoints/relay-parachains-westend-to-millau-entrypoint.sh deleted file mode 100755 index 4a2c11d9af1f37b975b752785e5c6ff8f8408591..0000000000000000000000000000000000000000 --- a/deployments/bridges/westend-millau/entrypoints/relay-parachains-westend-to-millau-entrypoint.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -set -xeu - -sleep 15 - -RELAY_ACCOUNT=${EXT_RELAY_ACCOUNT:-//Westend.AssetHubWestendHeaders1} - -/home/user/substrate-relay relay-parachains westend-to-millau \ - --source-host westend-rpc.polkadot.io \ - --source-port 443 \ - --source-secure \ - --target-host millau-node-alice \ - --target-port 9944 \ - --target-signer $RELAY_ACCOUNT \ - --target-transactions-mortality=4\ - --prometheus-host=0.0.0.0 diff --git a/deployments/local-scripts/bridge-entrypoint.sh b/deployments/local-scripts/bridge-entrypoint.sh index 5c1b6e90ec27f50529a2d39c5447f6b7fe17e6e0..da099222bac20346f657efff3eee0acc36f3f9db 100755 --- a/deployments/local-scripts/bridge-entrypoint.sh +++ b/deployments/local-scripts/bridge-entrypoint.sh @@ -3,5 +3,5 @@ set -xeu # This will allow us to run whichever binary the user wanted # with arguments passed through `docker run` -# e.g `docker run -it rialto-bridge-node-dev --dev --tmp` +# e.g `docker run -it substrate-relay --dev --tmp` /home/user/$PROJECT $@ diff --git a/deployments/local-scripts/relay-messages-millau-to-rialto.sh b/deployments/local-scripts/relay-messages-millau-to-rialto.sh deleted file mode 100755 index eca1052a7f0b9f28f86859ae007c85c3b3a3d82d..0000000000000000000000000000000000000000 --- a/deployments/local-scripts/relay-messages-millau-to-rialto.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# A script for relaying Millau messages to the Rialto chain. -# -# Will not work unless both the Rialto and Millau are running (see `run-rialto-node.sh` -# and `run-millau-node.sh). -set -xeu - -MILLAU_PORT="${MILLAU_PORT:-9945}" -RIALTO_PORT="${RIALTO_PORT:-9944}" - -RUST_LOG=bridge=debug \ -./target/debug/substrate-relay relay-messages millau-to-rialto \ - --lane "efed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7" \ - --source-host localhost \ - --source-port $MILLAU_PORT \ - --source-signer //Bob \ - --target-host localhost \ - --target-port $RIALTO_PORT \ - --target-signer //Bob \ - --prometheus-host=0.0.0.0 diff --git a/deployments/local-scripts/relay-messages-rialto-to-millau.sh b/deployments/local-scripts/relay-messages-rialto-to-millau.sh deleted file mode 100755 index 455fffa242bcaefdebdd40a5cbfd11cb4cea2b9b..0000000000000000000000000000000000000000 --- a/deployments/local-scripts/relay-messages-rialto-to-millau.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# A script for relaying Rialto messages to the Millau chain. -# -# Will not work unless both the Rialto and Millau are running (see `run-rialto-node.sh` -# and `run-millau-node.sh). -set -xeu - -MILLAU_PORT="${MILLAU_PORT:-9945}" -RIALTO_PORT="${RIALTO_PORT:-9944}" - -RUST_LOG=bridge=debug \ -./target/debug/substrate-relay relay-messages rialto-to-millau \ - --lane "efed785b626e94da3969257012f506524bcec78867420e26ff8c55ddcdb0f7b7" \ - --source-host localhost \ - --source-port $RIALTO_PORT \ - --source-signer //Bob \ - --target-host localhost \ - --target-port $MILLAU_PORT \ - --target-signer //Bob \ - --prometheus-host=0.0.0.0 diff --git a/deployments/local-scripts/relay-millau-to-rialto.sh b/deployments/local-scripts/relay-millau-to-rialto.sh deleted file mode 100755 index 4758173f72f72882b9f2be84f0650ce46caa6b8c..0000000000000000000000000000000000000000 --- a/deployments/local-scripts/relay-millau-to-rialto.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# A script for relaying Millau headers to the Rialto chain. -# -# Will not work unless both the Rialto and Millau are running (see `run-rialto-node.sh` -# and `run-millau-node.sh). - -MILLAU_PORT="${MILLAU_PORT:-9945}" -RIALTO_PORT="${RIALTO_PORT:-9944}" - -RUST_LOG=bridge=debug \ -./target/debug/substrate-relay init-bridge millau-to-rialto \ - --source-host localhost \ - --source-port $MILLAU_PORT \ - --target-host localhost \ - --target-port $RIALTO_PORT \ - --target-signer //Sudo \ - --source-version-mode Bundle \ - --target-version-mode Bundle - -sleep 5 -RUST_LOG=bridge=debug \ -./target/debug/substrate-relay relay-headers millau-to-rialto \ - --source-host localhost \ - --source-port $MILLAU_PORT \ - --target-host localhost \ - --target-port $RIALTO_PORT \ - --target-signer //Alice \ - --prometheus-host=0.0.0.0 diff --git a/deployments/local-scripts/relay-rialto-to-millau.sh b/deployments/local-scripts/relay-rialto-to-millau.sh deleted file mode 100755 index 5fd2784021452ce0226a847601ee58e3ee8e6fae..0000000000000000000000000000000000000000 --- a/deployments/local-scripts/relay-rialto-to-millau.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# A script for relaying Rialto headers to the Millau chain. -# -# Will not work unless both the Rialto and Millau are running (see `run-rialto-node.sh` -# and `run-millau-node.sh). - -MILLAU_PORT="${MILLAU_PORT:-9945}" -RIALTO_PORT="${RIALTO_PORT:-9944}" - -RUST_LOG=bridge=debug \ -./target/debug/substrate-relay init-bridge rialto-to-millau \ - --target-host localhost \ - --target-port $MILLAU_PORT \ - --source-host localhost \ - --source-port $RIALTO_PORT \ - --target-signer //Sudo \ - -sleep 5 -RUST_LOG=bridge=debug \ -./target/debug/substrate-relay relay-headers rialto-to-millau \ - --target-host localhost \ - --target-port $MILLAU_PORT \ - --source-host localhost \ - --source-port $RIALTO_PORT \ - --target-signer //Alice \ - --prometheus-host=0.0.0.0 diff --git a/deployments/local-scripts/run-millau-node.sh b/deployments/local-scripts/run-millau-node.sh deleted file mode 100755 index 5dfae0ad5664591785c19ec7c292e20f50ed372d..0000000000000000000000000000000000000000 --- a/deployments/local-scripts/run-millau-node.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -# Run a development instance of the Millau Substrate bridge node. -# To override the default port just export MILLAU_PORT=9945 - -MILLAU_PORT="${MILLAU_PORT:-9945}" - -RUST_LOG=runtime=trace \ -./target/debug/millau-bridge-node --dev --tmp \ - --rpc-cors=all --unsafe-rpc-external \ - --port 33044 --rpc-port $MILLAU_PORT \ diff --git a/deployments/local-scripts/run-rialto-node.sh b/deployments/local-scripts/run-rialto-node.sh deleted file mode 100755 index d57ce9477fda0c83ab504d7b456f085b6afd46c4..0000000000000000000000000000000000000000 --- a/deployments/local-scripts/run-rialto-node.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -# Run a development instance of the Rialto Substrate bridge node. -# To override the default port just export RIALTO_PORT=9944 - -RIALTO_PORT="${RIALTO_PORT:-9944}" - -RUST_LOG=runtime=trace \ - ./target/debug/rialto-bridge-node --dev --tmp \ - --rpc-cors=all --unsafe-rpc-external \ - --port 33033 --rpc-port $RIALTO_PORT \ diff --git a/deployments/local-scripts/run-westend-node.sh b/deployments/local-scripts/run-westend-node.sh deleted file mode 100755 index 30f7c413af30186394d4b5343477e8f6f21d5372..0000000000000000000000000000000000000000 --- a/deployments/local-scripts/run-westend-node.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -# Run a development instance of the Westend Substrate bridge node. -# To override the default port just export WESTEND_PORT=9945 -# -# Note: This script will not work out of the box with the bridges -# repo since it relies on a Polkadot binary. - -WESTEND_PORT="${WESTEND_PORT:-9944}" - -RUST_LOG=runtime=trace,runtime::bridge=trace \ -./target/debug/polkadot --chain=westend-dev --alice --tmp \ - --rpc-cors=all --unsafe-rpc-external \ - --port 33033 --rpc-port $WESTEND_PORT \ diff --git a/deployments/monitoring/GrafanaMatrix.Dockerfile b/deployments/monitoring/GrafanaMatrix.Dockerfile deleted file mode 100644 index be1c80d405912fe214fdd5425f4a557984833b59..0000000000000000000000000000000000000000 --- a/deployments/monitoring/GrafanaMatrix.Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM ruby:alpine3.13 - -RUN apk add --no-cache git - -ENV APP_HOME /app -ENV RACK_ENV production -RUN mkdir $APP_HOME -WORKDIR $APP_HOME - -RUN git clone https://github.com/ananace/ruby-grafana-matrix.git $APP_HOME -RUN bundle install --without development - -RUN mkdir /config && touch /config/config.yml && ln -s /config/config.yml ./config.yml - -CMD ["bundle", "exec", "rackup", "-p4567"] diff --git a/deployments/monitoring/disabled.yml b/deployments/monitoring/disabled.yml deleted file mode 100644 index a0b4ed3aad0392afc89159c892f2a045728cfcf9..0000000000000000000000000000000000000000 --- a/deployments/monitoring/disabled.yml +++ /dev/null @@ -1,15 +0,0 @@ -# A disabled version of monitoring. -# -# We replace each service with a no-op container. We can't simply not include this file, -# cause the bridge-specific compose files might have overrides. -version: '3.5' -services: - prometheus-metrics: - image: alpine - - grafana-dashboard: - image: alpine - - grafana-matrix-notifier: - image: alpine - diff --git a/deployments/monitoring/docker-compose.yml b/deployments/monitoring/docker-compose.yml deleted file mode 100644 index 4f7d958da4a86650fc04f5c4ed9a7b4a8b36f061..0000000000000000000000000000000000000000 --- a/deployments/monitoring/docker-compose.yml +++ /dev/null @@ -1,36 +0,0 @@ -version: '3.5' -services: - prometheus-metrics: - image: prom/prometheus:v2.38.0 - volumes: - - ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml - ports: - - "9090:9090" - - grafana-dashboard: - image: grafana/grafana:8.2.6 - environment: - GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PASS:-admin} - GF_SERVER_ROOT_URL: ${GRAFANA_SERVER_ROOT_URL} - GF_SERVER_DOMAIN: ${GRAFANA_SERVER_DOMAIN} - volumes: - - ./monitoring/grafana/provisioning/:/etc/grafana/provisioning/:ro - - ./monitoring/grafana/dashboards/:/etc/grafana/dashboards/common:ro - ports: - - "3000:3000" - depends_on: - - prometheus-metrics - # SIGTERM won't work because of our custom entrypoint. Should be ok to use SIGKILL. - stop_signal: SIGKILL - entrypoint: sh -c "${NO_GRAFANA_STARTUP_DELAY:-echo 'sleeping for 10m' && sleep 600} && /run.sh" - - grafana-matrix-notifier: - build: - context: . - dockerfile: ./monitoring/GrafanaMatrix.Dockerfile - volumes: - - ./monitoring/grafana-matrix:/config - ports: - - "4567:4567" - depends_on: - - grafana-dashboard diff --git a/deployments/monitoring/grafana-matrix/config.yml b/deployments/monitoring/grafana-matrix/config.yml deleted file mode 100644 index 662d7aa14d70a044dce70dc8eff7854999754428..0000000000000000000000000000000000000000 --- a/deployments/monitoring/grafana-matrix/config.yml +++ /dev/null @@ -1,47 +0,0 @@ ---- -# Webhook server configuration -# Or use the launch options `-o '::' -p 4567` - -# Set up your HS connections -matrix: -- name: 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", - # "password":"dummy-password"}' - # "https://my-matrix-server/_matrix/client/r0/login" - # Fill that access token in here - access_token: "" - #device_id: # Optional - -# The default message type for messages, should be either m.text or m.notice, -# defaults to m.text -msgtype: m.text - -# Set up notification ingress rules -rules: -- name: bridge # Name of the rule - 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: - image: true # Attach image to the notification? - embed_image: true # Upload and embed the image into the message? - #templates: - # Templates to use when rendering the notification, available placeholders: - # %TEMPLATES% - lib/grafana_matrix/templates - # $ - Environment variables - #html: "%TEMPLATES%/html.erb" # Path to HTML template - #plain: "%TEMPLATES%/plain.erb" # Path to plaintext template - #auth: - #user: example - #pass: any HTTP encodable string -#- name: other-hq -# room: "#hq:private.matrix.org -# matrix: matrix-priv - -# To use the webhook, you need to configure it into Grafana as: -# -# Url: http://:/hook?rule= -# Http Method: POST diff --git a/deployments/monitoring/grafana/dashboards/nodes.json b/deployments/monitoring/grafana/dashboards/nodes.json deleted file mode 100644 index db14c3cf1fa3c0e8c8cce8ab0339bb8267430d47..0000000000000000000000000000000000000000 --- a/deployments/monitoring/grafana/dashboards/nodes.json +++ /dev/null @@ -1,200 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "Running nodes", - "editable": true, - "fiscalYearStartMonth": 0, - "gnetId": null, - "graphTooltip": 0, - "links": [], - "liveNow": false, - "panels": [ - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 1 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "15m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "min" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "3m", - "frequency": "1m", - "handler": 1, - "name": "Nodes are not running", - "noDataState": "alerting", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "description": "", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 0 - }, - "hiddenSeries": false, - "id": 2, - "interval": null, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "maxDataPoints": null, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.2.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "up", - "format": "time_series", - "instant": false, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "lt", - "value": 1, - "visible": true - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Running nodes", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:111", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:112", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "", - "schemaVersion": 32, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "", - "title": "Running nodes", - "uid": "DHl-xSW4z", - "version": 1 -} diff --git a/deployments/monitoring/grafana/provisioning/dashboards/grafana-dashboard.yaml b/deployments/monitoring/grafana/provisioning/dashboards/grafana-dashboard.yaml deleted file mode 100644 index d14ed2637d53ab47191bb6b301c08d622744d3cd..0000000000000000000000000000000000000000 --- a/deployments/monitoring/grafana/provisioning/dashboards/grafana-dashboard.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- name: 'default' - orgId: 1 - folder: '' - type: file - options: - path: '/etc/grafana/dashboards' \ No newline at end of file diff --git a/deployments/monitoring/grafana/provisioning/datasources/grafana-datasource.yaml b/deployments/monitoring/grafana/provisioning/datasources/grafana-datasource.yaml deleted file mode 100644 index b85cf06e2bd53a1b9b69f51a64c80b3ba5454611..0000000000000000000000000000000000000000 --- a/deployments/monitoring/grafana/provisioning/datasources/grafana-datasource.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# list of datasources to insert/update depending -# whats available in the database -datasources: - # name of the datasource. Required -- name: Prometheus - # datasource type. Required - type: prometheus - # access mode. direct or proxy. Required - access: proxy - # org id. will default to orgId 1 if not specified - orgId: 1 - # url - url: http://prometheus-metrics:9090 - # mark as default datasource. Max one per org - isDefault: true - version: 1 diff --git a/deployments/monitoring/grafana/provisioning/notifiers/grafana-notifier.yaml b/deployments/monitoring/grafana/provisioning/notifiers/grafana-notifier.yaml deleted file mode 100644 index 4eb6ea3863e976a436cb2884f54fb9bba5c80e50..0000000000000000000000000000000000000000 --- a/deployments/monitoring/grafana/provisioning/notifiers/grafana-notifier.yaml +++ /dev/null @@ -1,15 +0,0 @@ -notifiers: - - name: Matrix - type: webhook - uid: notifier1 - is_default: true - send_reminder: true - frequency: 1h - disable_resolve_message: false - settings: - url: http://grafana-matrix-notifier:4567/hook?rule=bridge - http_method: POST - -delete_notifiers: - - name: Matrix - uid: notifier1 diff --git a/deployments/monitoring/prometheus/prometheus.yml b/deployments/monitoring/prometheus/prometheus.yml deleted file mode 100644 index 7092bd27314023610676ee7b38a2da567e952b8c..0000000000000000000000000000000000000000 --- a/deployments/monitoring/prometheus/prometheus.yml +++ /dev/null @@ -1,7 +0,0 @@ -global: - scrape_interval: 15s -scrape_configs: - - job_name: dummy - file_sd_configs: - - files: - - /etc/prometheus/targets-*.yml diff --git a/deployments/networks/dashboard/grafana/beefy-dashboard.json b/deployments/networks/dashboard/grafana/beefy-dashboard.json deleted file mode 100644 index 5cd74861a840612703b05326e5a457ecb3cf56eb..0000000000000000000000000000000000000000 --- a/deployments/networks/dashboard/grafana/beefy-dashboard.json +++ /dev/null @@ -1,1505 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- 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, - "gnetId": null, - "graphTooltip": 0, - "id": 5, - "links": [], - "liveNow": false, - "panels": [ - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 1 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "C", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "max" - }, - "type": "query" - }, - { - "evaluator": { - "params": [ - 1 - ], - "type": "lt" - }, - "operator": { - "type": "or" - }, - "query": { - "params": [ - "D", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "max" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "5m", - "frequency": "1m", - "handler": 1, - "name": "Beefy best blocks not advancing", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 14, - "w": 12, - "x": 0, - "y": 0 - }, - "hiddenSeries": false, - "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.2.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "substrate_beefy_best_block{chain=\"rialto_local\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - }, - { - "exemplar": true, - "expr": "substrate_beefy_best_block{chain=\"millau_local\"}", - "hide": false, - "interval": "", - "legendFormat": "", - "refId": "B" - }, - { - "exemplar": true, - "expr": "increase(substrate_beefy_best_block{chain=\"millau_local\"}[5m])", - "hide": true, - "interval": "", - "legendFormat": "Millau Best Beefy blocks count in last 5 minutes", - "refId": "C" - }, - { - "exemplar": true, - "expr": "increase(substrate_beefy_best_block{chain=\"rialto_local\"}[5m])", - "hide": true, - "interval": "", - "legendFormat": "Rialto Best Beefy blocks count in last 5 minutes", - "refId": "D" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "lt", - "value": 1, - "visible": true - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Beefy Best block", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 0 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "max" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "5m", - "frequency": "1m", - "handler": 1, - "name": "Beefy Lagging Sessions alert", - "noDataState": "no_data", - "notifications": [] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 14, - "w": 6, - "x": 12, - "y": 0 - }, - "hiddenSeries": false, - "id": 8, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.2.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "substrate_beefy_lagging_sessions{chain=\"rialto_local\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - }, - { - "exemplar": true, - "expr": "substrate_beefy_lagging_sessions{chain=\"millau_local\"}", - "interval": "", - "legendFormat": "", - "refId": "B" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 0, - "visible": true - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Beefy Lagging Sessions", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 0 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "10m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "max" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "10m", - "frequency": "5m", - "handler": 1, - "name": "Equivocation votes detected alert", - "noDataState": "no_data", - "notifications": [] - }, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "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 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 14 - }, - "id": 10, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "substrate_beefy_equivocation_votes", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "op": "gt", - "value": 0, - "visible": true - } - ], - "title": "Equivocation votes detected", - "type": "timeseries" - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 0 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "10m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "max" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "10m", - "frequency": "5m", - "handler": 1, - "name": "Invalid votes received alert", - "noDataState": "no_data", - "notifications": [] - }, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "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 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 6, - "y": 14 - }, - "id": 12, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "substrate_beefy_invalid_votes", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "op": "gt", - "value": 0, - "visible": true - } - ], - "title": "Invalid votes received", - "type": "timeseries" - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 0 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "10m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "max" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "10m", - "frequency": "5m", - "handler": 1, - "name": "Dropped Buffered Justifications alert", - "noDataState": "no_data", - "notifications": [] - }, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "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 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 12, - "y": 14 - }, - "id": 18, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "substrate_beefy_buffered_justifications_dropped", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "op": "gt", - "value": 0, - "visible": true - } - ], - "title": "Dropped Buffered Justifications", - "type": "timeseries" - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 0 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "10m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "max" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "10m", - "frequency": "5m", - "handler": 1, - "name": "OnDemand Justifications Engine alert", - "noDataState": "no_data", - "notifications": [] - }, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "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 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 21 - }, - "id": 26, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "substrate_beefy_on_demand_justification_invalid_proof", - "interval": "", - "legendFormat": "", - "refId": "A" - }, - { - "exemplar": true, - "expr": "substrate_beefy_on_demand_justification_good_proof", - "hide": false, - "interval": "", - "legendFormat": "", - "refId": "B" - }, - { - "exemplar": true, - "expr": "substrate_beefy_on_demand_justification_peer_error", - "hide": false, - "interval": "", - "legendFormat": "", - "refId": "C" - }, - { - "exemplar": true, - "expr": "beefy_on_demand_justification_peer_refused", - "hide": false, - "interval": "", - "legendFormat": "", - "refId": "D" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "op": "gt", - "value": 0, - "visible": true - } - ], - "title": "OnDemand Justifications Engine", - "type": "timeseries" - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 0 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B", - "10m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "max" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "10m", - "frequency": "5m", - "handler": 1, - "name": "Incoming OnDemand Justifications alert", - "noDataState": "no_data", - "notifications": [] - }, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "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 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 6, - "y": 21 - }, - "id": 24, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "substrate_beefy_successful_justification_responses", - "interval": "", - "legendFormat": "", - "refId": "A" - }, - { - "exemplar": true, - "expr": "substrate_beefy_failed_justification_responses", - "hide": false, - "interval": "", - "legendFormat": "", - "refId": "B" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "op": "gt", - "value": 0, - "visible": true - } - ], - "title": "Incoming OnDemand Justifications", - "type": "timeseries" - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 0 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B", - "10m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "max" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "10m", - "frequency": "5m", - "handler": 1, - "name": "Block-import Justifications alert", - "noDataState": "no_data", - "notifications": [] - }, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "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 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 12, - "y": 21 - }, - "id": 22, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "substrate_beefy_good_justification_imports", - "interval": "", - "legendFormat": "", - "refId": "A" - }, - { - "exemplar": true, - "expr": "substrate_beefy_bad_justification_imports", - "hide": false, - "interval": "", - "legendFormat": "", - "refId": "B" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "op": "gt", - "value": 0, - "visible": true - } - ], - "title": "Block-import Justifications", - "type": "timeseries" - }, - { - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "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 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 13, - "w": 6, - "x": 0, - "y": 28 - }, - "id": 16, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "substrate_beefy_buffered_justifications", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Buffered Justifications", - "type": "timeseries" - }, - { - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "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 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 13, - "w": 6, - "x": 6, - "y": 28 - }, - "id": 20, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "substrate_beefy_imported_justifications", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Imported Justifications", - "type": "timeseries" - }, - { - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "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 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 13, - "w": 6, - "x": 12, - "y": 28 - }, - "id": 14, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "substrate_beefy_stale_votes", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Stale votes received", - "type": "timeseries" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 13, - "w": 18, - "x": 0, - "y": 41 - }, - "hiddenSeries": false, - "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.2.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "substrate_beefy_votes_sent{chain=\"rialto_local\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - }, - { - "exemplar": true, - "expr": "substrate_beefy_votes_sent{chain=\"millau_local\"}", - "interval": "", - "legendFormat": "", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Beefy Votes Sent", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "5s", - "schemaVersion": 32, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-30m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "", - "title": "Beefy", - "uid": "j6cRDRh7z", - "version": 1 -} diff --git a/deployments/networks/dashboard/prometheus/millau-targets.yml b/deployments/networks/dashboard/prometheus/millau-targets.yml deleted file mode 100644 index 5890c8fb3fdf225559bb52afbd6f4dff21e11566..0000000000000000000000000000000000000000 --- a/deployments/networks/dashboard/prometheus/millau-targets.yml +++ /dev/null @@ -1,6 +0,0 @@ -- targets: - - millau-node-alice:9615 - - millau-node-bob:9615 - - millau-node-charlie:9615 - - millau-node-dave:9615 - - millau-node-eve:9615 diff --git a/deployments/networks/dashboard/prometheus/rialto-targets.yml b/deployments/networks/dashboard/prometheus/rialto-targets.yml deleted file mode 100644 index 7ec194f99d7ab7aa0f6f2c547a7bc2e9df68f2fc..0000000000000000000000000000000000000000 --- a/deployments/networks/dashboard/prometheus/rialto-targets.yml +++ /dev/null @@ -1,7 +0,0 @@ -- targets: - - rialto-node-alice:9615 - - rialto-node-bob:9615 - - rialto-node-charlie:9615 - - rialto-node-dave:9615 - - rialto-node-eve:9615 - - rialto-node-ferdie:9615 diff --git a/deployments/networks/entrypoints/rialto-chainspec-exporter-entrypoint.sh b/deployments/networks/entrypoints/rialto-chainspec-exporter-entrypoint.sh deleted file mode 100755 index eac2a80de87bd10002398eba2c42cd25df049b86..0000000000000000000000000000000000000000 --- a/deployments/networks/entrypoints/rialto-chainspec-exporter-entrypoint.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -set -xeu - -trap "echo Exiting... TERM; exit $?" TERM - -/home/user/rialto-bridge-node build-spec \ - --chain local \ - --raw \ - --disable-default-bootnode \ - > /rialto-share/rialto-relaychain-spec-raw.json - -# we're using local driver + tmpfs for shared `/rialto-share` volume, which is populated -# by the container running this script. If this script ends, the volume will be detached -# and our chain spec will be lost when it'll go online again. Hence the never-ending -# script which keeps volume online until container is stopped. -tail -f /dev/null & wait $! diff --git a/deployments/networks/entrypoints/rialto-parachain-registrar-entrypoint.sh b/deployments/networks/entrypoints/rialto-parachain-registrar-entrypoint.sh deleted file mode 100755 index 1c33dd0084160508997481c230acc31a8a5ea82a..0000000000000000000000000000000000000000 --- a/deployments/networks/entrypoints/rialto-parachain-registrar-entrypoint.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -set -xeu - -sleep 15 - -exec /home/user/substrate-relay register-parachain rialto-parachain \ - --parachain-host rialto-parachain-collator-alice \ - --parachain-port 9944 \ - --relaychain-host rialto-node-alice \ - --relaychain-port 9944 \ - --relaychain-signer //Sudo diff --git a/deployments/networks/millau.yml b/deployments/networks/millau.yml deleted file mode 100644 index 2c0eea23a2873db2437d2ab8de30679342e98974..0000000000000000000000000000000000000000 --- a/deployments/networks/millau.yml +++ /dev/null @@ -1,103 +0,0 @@ -# Compose file for quickly spinning up a local instance of the Millau Substrate network. -# -# Note that the Millau network is only used for testing, so the configuration settings you see here -# are *not* recommended for a production environment. -# -# For example, do *not* keep your `node-key` in version control, and unless you're _really_ sure you -# want to provide public access to your nodes do *not* publicly expose RPC methods. -version: '3.5' -services: - millau-node-alice: &millau-bridge-node - image: ${MILLAU_BRIDGE_NODE_IMAGE:-paritytech/millau-bridge-node} - entrypoint: - - /home/user/millau-bridge-node - - --chain=local - - --bootnodes=/dns4/millau-node-bob/tcp/30333/p2p/12D3KooWM5LFR5ne4yTQ4sBSXJ75M4bDo2MAhAW2GhL3i8fe5aRb - - --alice - - --node-key=0f900c89f4e626f4a217302ab8c7d213737d00627115f318ad6fb169717ac8e0 - - --rpc-cors=all - - --enable-offchain-indexing=true - - --unsafe-rpc-external - - --prometheus-external - environment: - RUST_LOG: runtime=trace,rpc=debug,txpool=trace,runtime::bridge=trace,sc_basic_authorship=trace,beefy=trace,xcm=trace - ports: - - "19933:9933" - - "19944:9944" - - "19615:9615" - - millau-node-bob: - <<: *millau-bridge-node - entrypoint: - - /home/user/millau-bridge-node - - --chain=local - - --bootnodes=/dns4/millau-node-alice/tcp/30333/p2p/12D3KooWFqiV73ipQ1jpfVmCfLqBCp8G9PLH3zPkY9EhmdrSGA4H - - --bob - - --node-key=db383639ff2905d79f8e936fd5dc4416ef46b514b2f83823ec3c42753d7557bb - - --rpc-cors=all - - --enable-offchain-indexing=true - - --unsafe-rpc-external - - --prometheus-external - ports: - - "20033:9933" - - "20044:9944" - - "20015:9615" - - millau-node-charlie: - <<: *millau-bridge-node - entrypoint: - - /home/user/millau-bridge-node - - --chain=local - - --bootnodes=/dns4/millau-node-alice/tcp/30333/p2p/12D3KooWFqiV73ipQ1jpfVmCfLqBCp8G9PLH3zPkY9EhmdrSGA4H - - --charlie - - --rpc-cors=all - - --enable-offchain-indexing=true - - --unsafe-rpc-external - - --prometheus-external - ports: - - "20133:9933" - - "20144:9944" - - "20115:9615" - - millau-node-dave: - <<: *millau-bridge-node - entrypoint: - - /home/user/millau-bridge-node - - --chain=local - - --bootnodes=/dns4/millau-node-alice/tcp/30333/p2p/12D3KooWFqiV73ipQ1jpfVmCfLqBCp8G9PLH3zPkY9EhmdrSGA4H - - --dave - - --rpc-cors=all - - --enable-offchain-indexing=true - - --unsafe-rpc-external - - --prometheus-external - ports: - - "20233:9933" - - "20244:9944" - - "20215:9615" - - millau-node-eve: - <<: *millau-bridge-node - entrypoint: - - /home/user/millau-bridge-node - - --chain=local - - --bootnodes=/dns4/millau-node-alice/tcp/30333/p2p/12D3KooWFqiV73ipQ1jpfVmCfLqBCp8G9PLH3zPkY9EhmdrSGA4H - - --eve - - --rpc-cors=all - - --enable-offchain-indexing=true - - --unsafe-rpc-external - - --prometheus-external - ports: - - "20333:9933" - - "20344:9944" - - "20315:9615" - - # Note: These are being overridden from the top level `monitoring` compose file. - prometheus-metrics: - volumes: - - ./networks/dashboard/prometheus/millau-targets.yml:/etc/prometheus/targets-millau-nodes.yml - depends_on: - - millau-node-alice - - millau-node-bob - - millau-node-charlie - - millau-node-dave - - millau-node-eve diff --git a/deployments/networks/rialto-parachain.yml b/deployments/networks/rialto-parachain.yml deleted file mode 100644 index 22b603b2044c430f0e1e25378030ec0b5fe21acc..0000000000000000000000000000000000000000 --- a/deployments/networks/rialto-parachain.yml +++ /dev/null @@ -1,93 +0,0 @@ -# Compose file for quickly spinning up a local instance of the Rialto Parachain network. -# -# Since Rialto Parachain is unusable without Rialto, this file depends on some Rialto -# network nodes. -version: '3.5' -services: - rialto-parachain-collator-alice: &rialto-parachain-collator - image: ${RIALTO_PARACHAIN_COLLATOR_IMAGE:-paritytech/rialto-parachain-collator} - entrypoint: > - /home/user/rialto-parachain-collator - --alice - --node-key=80cf382988364291a7968ae7825c01f68c50d679796a8983237d07fe0ccf363b - --collator - --force-authoring - --parachain-id 2000 - --rpc-port 9944 - --rpc-cors=all - --unsafe-rpc-external - --bootnodes - /dns/rialto-parachain-collator-bob/tcp/30333/p2p/12D3KooWEEkzPUdahNXAtzJpkmornEZXHhyyPbTvDkJK383LFvdR - -- - --execution wasm - --chain /rialto-share/rialto-relaychain-spec-raw.json - --rpc-port 9945 - --bootnodes - /dns/rialto-node-alice/tcp/30333/p2p/12D3KooWMF6JvV319a7kJn5pqkKbhR3fcM2cvK5vCbYZHeQhYzFE - volumes: - - rialto-share:/rialto-share:z - environment: - RUST_LOG: runtime=trace,rpc=trace,txpool=trace,parachain=trace,parity_ws=trace,sc_basic_authorship=trace,xcm=trace - depends_on: - - rialto-chainspec-exporter - ports: - - "20444:9944" - - rialto-parachain-collator-bob: - <<: *rialto-parachain-collator - entrypoint: > - /home/user/rialto-parachain-collator - --bob - --node-key=90cf382988364291a7968ae7825c01f68c50d679796a8983237d07fe0ccf363b - --collator - --force-authoring - --parachain-id 2000 - --rpc-port 9944 - --rpc-cors=all - --unsafe-rpc-external - --bootnodes - /dns/rialto-parachain-collator-alice/tcp/30333/p2p/12D3KooWPoJr9Z2PyrFvTYCtto4iorLH11GKBwebJAyqAaFQxow5 - -- - --execution wasm - --chain /rialto-share/rialto-relaychain-spec-raw.json - --rpc-port 9945 - --bootnodes - /dns/rialto-node-alice/tcp/30333/p2p/12D3KooWMF6JvV319a7kJn5pqkKbhR3fcM2cvK5vCbYZHeQhYzFE - ports: - - "20544:9944" - - rialto-parachain-collator-charlie: - <<: *rialto-parachain-collator - entrypoint: > - /home/user/rialto-parachain-collator - --charlie - --node-key=42cf382988364291a7968ae7825c01f68c50d679796a8983237d07fe0ccf363b - --collator - --force-authoring - --parachain-id 2000 - --rpc-port 9944 - --rpc-cors=all - --unsafe-rpc-external - --bootnodes - /dns/rialto-parachain-collator-alice/tcp/30333/p2p/12D3KooWPoJr9Z2PyrFvTYCtto4iorLH11GKBwebJAyqAaFQxow5 - -- - --execution wasm - --chain /rialto-share/rialto-relaychain-spec-raw.json - --rpc-port 9945 - --bootnodes - /dns/rialto-node-alice/tcp/30333/p2p/12D3KooWMF6JvV319a7kJn5pqkKbhR3fcM2cvK5vCbYZHeQhYzFE - ports: - - "20644:9944" - - rialto-parachain-registrar: - image: ${SUBSTRATE_RELAY_IMAGE:-paritytech/substrate-relay} - entrypoint: /entrypoints/rialto-parachain-registrar-entrypoint.sh - volumes: - - ./networks/entrypoints:/entrypoints - - rialto-share:/rialto-share:z - environment: - RUST_LOG: bridge=trace - depends_on: - - rialto-node-alice - - rialto-parachain-collator-alice - diff --git a/deployments/networks/rialto.yml b/deployments/networks/rialto.yml deleted file mode 100644 index 3fb949af2b607ba20ff86ede5128c9ff9ba046b7..0000000000000000000000000000000000000000 --- a/deployments/networks/rialto.yml +++ /dev/null @@ -1,137 +0,0 @@ -# Compose file for quickly spinning up a local instance of the Rialto Substrate network. -# -# Note that the Rialto network is only used for testing, so the configuration settings you see here -# are *not* recommended for a production environment. -# -# For example, do *not* keep your `node-key` in version control, and unless you're _really_ sure you -# want to provide public access to your nodes do *not* publicly expose RPC methods. -version: '3.5' -services: - rialto-node-alice: &rialto-bridge-node - image: ${RIALTO_BRIDGE_NODE_IMAGE:-paritytech/rialto-bridge-node} - entrypoint: - - /home/user/rialto-bridge-node - - --chain=local - - --bootnodes=/dns4/rialto-node-bob/tcp/30333/p2p/12D3KooWSEpHJj29HEzgPFcRYVc5X3sEuP3KgiUoqJNCet51NiMX - - --alice - - --node-key=79cf382988364291a7968ae7825c01f68c50d679796a8983237d07fe0ccf363b - - --rpc-cors=all - - --enable-offchain-indexing=true - - --unsafe-rpc-external - - --prometheus-external - environment: - RUST_LOG: runtime=trace,rpc=debug,txpool=trace,runtime::bridge=trace,beefy=trace,xcm=trace - ports: - - "9933:9933" - - "9944:9944" - - "9915:9615" - - rialto-node-bob: - <<: *rialto-bridge-node - entrypoint: - - /home/user/rialto-bridge-node - - --chain=local - - --bootnodes=/dns4/rialto-node-alice/tcp/30333/p2p/12D3KooWMF6JvV319a7kJn5pqkKbhR3fcM2cvK5vCbYZHeQhYzFE - - --bob - - --node-key=4f9d0146dd9b7b3bf5a8089e3880023d1df92057f89e96e07bb4d8c2ead75bbd - - --rpc-cors=all - - --enable-offchain-indexing=true - - --unsafe-rpc-external - - --prometheus-external - ports: - - "10033:9933" - - "10044:9944" - - "10015:9615" - - rialto-node-charlie: - <<: *rialto-bridge-node - entrypoint: - - /home/user/rialto-bridge-node - - --chain=local - - --bootnodes=/dns4/rialto-node-alice/tcp/30333/p2p/12D3KooWMF6JvV319a7kJn5pqkKbhR3fcM2cvK5vCbYZHeQhYzFE - - --charlie - - --rpc-cors=all - - --enable-offchain-indexing=true - - --unsafe-rpc-external - - --prometheus-external - ports: - - "10133:9933" - - "10144:9944" - - "10115:9615" - - rialto-node-dave: - <<: *rialto-bridge-node - entrypoint: - - /home/user/rialto-bridge-node - - --chain=local - - --bootnodes=/dns4/rialto-node-alice/tcp/30333/p2p/12D3KooWMF6JvV319a7kJn5pqkKbhR3fcM2cvK5vCbYZHeQhYzFE - - --dave - - --rpc-cors=all - - --enable-offchain-indexing=true - - --unsafe-rpc-external - - --prometheus-external - ports: - - "10233:9933" - - "10244:9944" - - "10215:9615" - - rialto-node-eve: - <<: *rialto-bridge-node - entrypoint: - - /home/user/rialto-bridge-node - - --chain=local - - --bootnodes=/dns4/rialto-node-alice/tcp/30333/p2p/12D3KooWMF6JvV319a7kJn5pqkKbhR3fcM2cvK5vCbYZHeQhYzFE - - --eve - - --rpc-cors=all - - --enable-offchain-indexing=true - - --unsafe-rpc-external - - --prometheus-external - ports: - - "10333:9933" - - "10344:9944" - - "10315:9615" - - rialto-node-ferdie: - <<: *rialto-bridge-node - entrypoint: - - /home/user/rialto-bridge-node - - --chain=local - - --bootnodes=/dns4/rialto-node-alice/tcp/30333/p2p/12D3KooWMF6JvV319a7kJn5pqkKbhR3fcM2cvK5vCbYZHeQhYzFE - - --ferdie - - --rpc-cors=all - - --enable-offchain-indexing=true - - --unsafe-rpc-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 - volumes: - - ./networks/entrypoints:/entrypoints - - rialto-share:/rialto-share:z - - # Note: These are being overridden from the top level `monitoring` compose file. - prometheus-metrics: - volumes: - - ./networks/dashboard/prometheus/rialto-targets.yml:/etc/prometheus/targets-rialto-nodes.yml - depends_on: - - rialto-node-alice - - rialto-node-bob - - 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 -# in-memory volumes, which are dropped when containers are stopped. -volumes: - rialto-share: - driver: local - driver_opts: - type: "tmpfs" - device: "tmpfs" diff --git a/deployments/reverse-proxy/README.md b/deployments/reverse-proxy/README.md deleted file mode 100644 index ded81f80a1b3c7a11ea287132f4e6107d442542e..0000000000000000000000000000000000000000 --- a/deployments/reverse-proxy/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# nginx-proxy - -This is a nginx reverse proxy configuration with Let's encrypt companion. -Main purpose is to be able to use `https://polkadot.js.org/apps` to connect to -a running network. - -## How to? - -In current directory: -```bash -docker-compose up -d -``` - -Then start `rialto` network with the same command (one folder up). `nginx` should -pick up new containers being created and automatically create a proxy setup for `Charlie`. diff --git a/deployments/reverse-proxy/docker-compose.yml b/deployments/reverse-proxy/docker-compose.yml deleted file mode 100644 index ee49e96afddc5e232911a7c9b740594c4ec6874a..0000000000000000000000000000000000000000 --- a/deployments/reverse-proxy/docker-compose.yml +++ /dev/null @@ -1,45 +0,0 @@ -version: '2' -services: - nginx-proxy: - image: jwilder/nginx-proxy - container_name: nginx-proxy - networks: - - nginx-proxy - - deployments_default - ports: - - "80:80" - - "443:443" - volumes: - - conf:/etc/nginx/conf.d - - vhost:/etc/nginx/vhost.d - - html:/usr/share/nginx/html - - dhparam:/etc/nginx/dhparam - - certs:/etc/nginx/certs:ro - - /var/run/docker.sock:/tmp/docker.sock:ro - - acme:/etc/acme.sh - - letsencrypt: - image: jrcs/letsencrypt-nginx-proxy-companion - container_name: nginx-proxy-le - networks: - - nginx-proxy - volumes_from: - - nginx-proxy - volumes: - - certs:/etc/nginx/certs:rw - - /var/run/docker.sock:/var/run/docker.sock:ro - - acme:/etc/acme.sh - -volumes: - conf: - vhost: - html: - dhparam: - certs: - acme: - -networks: - nginx-proxy: - driver: bridge - deployments_default: - external: true diff --git a/deployments/run.sh b/deployments/run.sh deleted file mode 100755 index a2a1900c1f03183bdeadfe5f46751613879618c7..0000000000000000000000000000000000000000 --- a/deployments/run.sh +++ /dev/null @@ -1,217 +0,0 @@ -#!/bin/bash - -# Script used for running and updating bridge deployments. -# -# To deploy a network you can run this script with the name of the bridge (or multiple bridges) you want to run. -# -# `./run.sh westend-millau rialto-millau` -# -# To update a deployment to use the latest images available from the Docker Hub add the `update` -# argument after the bridge name. -# -# `./run.sh rialto-millau update` -# -# Once you've stopped having fun with your deployment you can take it down with: -# -# `./run.sh rialto-millau stop` -# -# Stopping the bridge will also bring down all networks that it uses. So if you have started multiple bridges -# that are using the same network (like Millau in rialto-millau and westend-millau bridges), then stopping one -# of these bridges will cause the other bridge to break. - -set -xeu - -# Since the Compose commands are using relative paths we need to `cd` into the `deployments` folder. -cd "$( dirname "${BASH_SOURCE[0]}" )" - -function show_help () { - set +x - echo " " - echo Error: $1 - echo " " - echo "Usage:" - echo " ./run.sh rialto-millau [stop|update] Run Rialto <> Millau Networks & Bridge" - echo " ./run.sh rialto-parachain-millau [stop|update] Run RialtoParachain <> Millau Networks & Bridge" - echo " ./run.sh westend-millau [stop|update] Run Westend -> Millau Networks & Bridge" - echo " ./run.sh everything|all [stop|update] Run all available Networks & Bridges" - echo " " - echo "Options:" - echo " --no-monitoring Disable monitoring" - echo " --no-ui Disable UI" - echo " --local Use prebuilt local images when starting relay and nodes" - echo " --local-substrate-relay Use prebuilt local/substrate-realy image when starting relay" - echo " --local-rialto Use prebuilt local/rialto-bridge-node image when starting nodes" - echo " --local-rialto-parachain Use prebuilt local/rialto-parachain-collator image when starting nodes" - echo " --local-millau Use prebuilt local/millau-bridge-node image when starting nodes" - echo " --no-grafana-startup-delay Start Grafana without any delay (you may see some false alerts during startup)" - echo " " - echo "You can start multiple bridges at once by passing several bridge names:" - echo " ./run.sh rialto-millau rialto-parachain-millau westend-millau [stop|update]" - exit 1 -} - -RIALTO=' -f ./networks/rialto.yml' -RIALTO_PARACHAIN=' -f ./networks/rialto-parachain.yml' -MILLAU=' -f ./networks/millau.yml' - -RIALTO_MILLAU='rialto-millau' -RIALTO_PARACHAIN_MILLAU='rialto-parachain-millau' -WESTEND_MILLAU='westend-millau' - -MONITORING=' -f ./monitoring/docker-compose.yml' -UI=' -f ./ui/docker-compose.yml' - -BRIDGES=() -NETWORKS='' -SUB_COMMAND='start' -for i in "$@" -do - case $i in - --no-monitoring) - MONITORING=" -f ./monitoring/disabled.yml" - shift - continue - ;; - --no-ui) - UI="" - shift - continue - ;; - --local) - export SUBSTRATE_RELAY_IMAGE=local/substrate-relay - export RIALTO_BRIDGE_NODE_IMAGE=local/rialto-bridge-node - export RIALTO_PARACHAIN_COLLATOR_IMAGE=local/rialto-parachain-collator - export MILLAU_BRIDGE_NODE_IMAGE=local/millau-bridge-node - export IMMEDIATE_ - shift - continue - ;; - --local-substrate-relay) - export SUBSTRATE_RELAY_IMAGE=local/substrate-relay - shift - continue - ;; - --local-rialto) - export RIALTO_BRIDGE_NODE_IMAGE=local/rialto-bridge-node - shift - continue - ;; - --local-rialto-parachain) - export RIALTO_PARACHAIN_COLLATOR_IMAGE=local/rialto-parachain-collator - shift - continue - ;; - --local-millau) - export MILLAU_BRIDGE_NODE_IMAGE=local/millau-bridge-node - shift - continue - ;; - --no-grafana-startup-delay) - export NO_GRAFANA_STARTUP_DELAY="echo 'No Grafana startup delay'" - shift - continue - ;; - everything|all) - BRIDGES=(${RIALTO_MILLAU:-} ${RIALTO_PARACHAIN_MILLAU:-} ${WESTEND_MILLAU:-}) - NETWORKS="${RIALTO:-} ${RIALTO_PARACHAIN:-} ${MILLAU:-}" - unset RIALTO RIALTO_PARACHAIN MILLAU RIALTO_MILLAU RIALTO_PARACHAIN_MILLAU WESTEND_MILLAU - shift - ;; - rialto-millau) - BRIDGES+=(${RIALTO_MILLAU:-}) - NETWORKS+="${RIALTO:-} ${MILLAU:-}" - unset RIALTO MILLAU RIALTO_MILLAU - shift - ;; - rialto-parachain-millau) - BRIDGES+=(${RIALTO_PARACHAIN_MILLAU:-}) - NETWORKS+="${RIALTO:-} ${RIALTO_PARACHAIN:-} ${MILLAU:-}" - unset RIALTO RIALTO_PARACHAIN MILLAU RIALTO_PARACHAIN_MILLAU - shift - ;; - westend-millau) - BRIDGES+=(${WESTEND_MILLAU:-}) - NETWORKS+=${MILLAU:-} - unset MILLAU WESTEND_MILLAU - shift - ;; - start|stop|update) - SUB_COMMAND=$i - shift - ;; - *) - show_help "Unknown option: $i" - ;; - esac -done - -if [ ${#BRIDGES[@]} -eq 0 ]; then - show_help "Missing bridge name." -fi - -COMPOSE_FILES=$NETWORKS$MONITORING$UI - -# Compose looks for .env files in the the current directory by default, we don't want that -COMPOSE_ARGS="--project-directory ." -# Path to env file that we want to use. Compose only accepts single `--env-file` argument, -# so we'll be using the last .env file we'll found. -COMPOSE_ENV_FILE='' - -for BRIDGE in "${BRIDGES[@]}" -do - BRIDGE_PATH="./bridges/$BRIDGE" - BRIDGE=" -f $BRIDGE_PATH/docker-compose.yml" - COMPOSE_FILES=$BRIDGE$COMPOSE_FILES - - # Remember .env file to use in docker-compose call - if [[ -f "$BRIDGE_PATH/.env" ]]; then - COMPOSE_ENV_FILE=" --env-file $BRIDGE_PATH/.env" - fi - - # Read and source variables from .env file so we can use them here - grep -e MATRIX_ACCESS_TOKEN -e WITH_PROXY $BRIDGE_PATH/.env > .env2 && . ./.env2 && rm .env2 - if [ ! -z ${MATRIX_ACCESS_TOKEN+x} ]; then - sed -i "s/access_token.*/access_token: \"$MATRIX_ACCESS_TOKEN\"/" ./monitoring/grafana-matrix/config.yml - fi -done - -# Final COMPOSE_ARGS -COMPOSE_ARGS="$COMPOSE_ARGS $COMPOSE_ENV_FILE" - -# Check the sub-command, perhaps we just mean to stop the network instead of starting it. -if [ "$SUB_COMMAND" == "stop" ]; then - - if [ ! -z ${WITH_PROXY+x} ]; then - cd ./reverse-proxy - docker-compose down - cd - - fi - - docker-compose $COMPOSE_ARGS $COMPOSE_FILES down - - exit 0 -fi - -# See if we want to update the docker images before starting the network. -if [ "$SUB_COMMAND" == "update" ]; then - - # Stop the proxy cause otherwise the network can't be stopped - if [ ! -z ${WITH_PROXY+x} ]; then - cd ./reverse-proxy - docker-compose down - cd - - fi - - - docker-compose $COMPOSE_ARGS $COMPOSE_FILES pull - docker-compose $COMPOSE_ARGS $COMPOSE_FILES down - docker-compose $COMPOSE_ARGS $COMPOSE_FILES build -fi - -docker-compose $COMPOSE_ARGS $COMPOSE_FILES up -d - -# Start the proxy if needed -if [ ! -z ${WITH_PROXY+x} ]; then - cd ./reverse-proxy - docker-compose up -d -fi diff --git a/deployments/types-millau.json b/deployments/types-millau.json deleted file mode 100644 index 45b2de1b8878689e0fc45bf9dd7d427dce04b9f7..0000000000000000000000000000000000000000 --- a/deployments/types-millau.json +++ /dev/null @@ -1,190 +0,0 @@ -{ - "--1": "Millau Types", - "MillauAddress": "AccountId", - "MillauLookupSource": "AccountId", - "MillauBalance": "u64", - "MillauBlockHash": "H512", - "MillauBlockNumber": "u64", - "MillauHeader": { - "parent_Hash": "MillauBlockHash", - "number": "Compact", - "state_root": "MillauBlockHash", - "extrinsics_root": "MillauBlockHash", - "digest": "MillauDigest" - }, - "MillauDigest": { - "logs": "Vec" - }, - "MillauDigestItem": { - "_enum": { - "Other": "Vec", - "AuthoritiesChange": "Vec", - "ChangesTrieRoot": "MillauBlockHash", - "SealV0": "SealV0", - "Consensus": "Consensus", - "Seal": "Seal", - "PreRuntime": "PreRuntime" - } - }, - "--2": "Rialto Types", - "RialtoAddress": "MultiAddress", - "RialtoLookupSource": "MultiAddress", - "RialtoBalance": "u128", - "RialtoBlockHash": "H256", - "RialtoBlockNumber": "u32", - "RialtoHeader": { - "parent_Hash": "RialtoBlockHash", - "number": "Compact", - "state_root": "RialtoBlockHash", - "extrinsics_root": "RialtoBlockHash", - "digest": "RialtoDigest" - }, - "RialtoDigest": { - "logs": "Vec" - }, - "RialtoDigestItem": { - "_enum": { - "Other": "Vec", - "AuthoritiesChange": "Vec", - "ChangesTrieRoot": "RialtoBlockHash", - "SealV0": "SealV0", - "Consensus": "Consensus", - "Seal": "Seal", - "PreRuntime": "PreRuntime" - } - }, - "--3": "Common types", - "AccountSigner": "MultiSigner", - "SpecVersion": "u32", - "RelayerId": "AccountId", - "SourceAccountId": "AccountId", - "ImportedHeader": { - "header": "BridgedHeader", - "requires_justification": "bool", - "is_finalized": "bool", - "signal_hash": "Option" - }, - "AuthoritySet": { - "authorities": "AuthorityList", - "set_id": "SetId" - }, - "Id": "[u8; 4]", - "ChainId": "Id", - "LaneId": "Id", - "MessageNonce": "u64", - "BridgeMessageId": "(Id, u64)", - "MessageKey": { - "lane_id": "LaneId", - "nonce:": "MessageNonce" - }, - "InboundLaneData": { - "relayers": "Vec", - "last_confirmed_nonce": "MessageNonce" - }, - "UnrewardedRelayer": { - "relayer": "RelayerId", - "messages": "DeliveredMessages" - }, - "DeliveredMessages": { - "begin": "MessageNonce", - "end": "MessageNonce" - }, - "OutboundLaneData": { - "oldest_unpruned_nonce": "MessageNonce", - "latest_received_nonce": "MessageNonce", - "latest_generated_nonce": "MessageNonce" - }, - "MessageData": { - "payload": "MessagePayload", - "fee": "Fee" - }, - "MessagePayload": "Vec", - "BridgedOpaqueCall": "Vec", - "OutboundMessageFee": "Fee", - "OutboundPayload": { - "spec_version": "SpecVersion", - "weight": "Weight", - "origin": "CallOrigin", - "dispatch_fee_payment": "DispatchFeePayment", - "call": "BridgedOpaqueCall" - }, - "CallOrigin": { - "_enum": { - "SourceRoot": "()", - "TargetAccount": "(SourceAccountId, MultiSigner, MultiSignature)", - "SourceAccount": "SourceAccountId" - } - }, - "DispatchFeePayment": { - "_enum": { - "AtSourceChain": "()", - "AtTargetChain": "()" - } - }, - "MultiSigner": { - "_enum": { - "Ed25519": "H256", - "Sr25519": "H256", - "Ecdsa": "[u8;33]" - } - }, - "MessagesProofOf": { - "bridged_header_hash": "BridgedBlockHash", - "storage_proof": "Vec", - "lane": "LaneId", - "nonces_start": "MessageNonce", - "nonces_end": "MessageNonce" - }, - "StorageProofItem": "Vec", - "MessagesDeliveryProofOf": { - "bridged_header_hash": "BridgedBlockHash", - "storage_proof": "Vec", - "lane": "LaneId" - }, - "UnrewardedRelayersState": { - "unrewarded_relayer_entries": "MessageNonce", - "messages_in_oldest_entry": "MessageNonce", - "total_messages": "MessageNonce" - }, - "AncestryProof": "()", - "MessageFeeData": { - "lane_id": "LaneId", - "payload": "OutboundPayload" - }, - "Precommit": { - "target_hash": "BridgedBlockHash", - "target_number": "BridgedBlockNumber" - }, - "AuthoritySignature": "[u8;64]", - "AuthorityId": "[u8;32]", - "SignedPrecommit": { - "precommit": "Precommit", - "signature": "AuthoritySignature", - "id": "AuthorityId" - }, - "Commit": { - "target_hash": "BridgedBlockHash", - "target_number": "BridgedBlockNumber", - "precommits": "Vec" - }, - "GrandpaJustification": { - "round": "u64", - "commit": "Commit", - "votes_ancestries": "Vec" - }, - "Address": "MillauAddress", - "LookupSource": "MillauLookupSource", - "Fee": "MillauBalance", - "Balance": "MillauBalance", - "Hash": "MillauBlockHash", - "BlockHash": "MillauBlockHash", - "BlockNumber": "MillauBlockNumber", - "BridgedBlockHash": "RialtoBlockHash", - "BridgedBlockNumber": "RialtoBlockNumber", - "BridgedHeader": "RialtoHeader", - "Parameter": { - "_enum": { - "MillauToRialtoConversionRate": "u128" - } - } -} diff --git a/deployments/types-rialto.json b/deployments/types-rialto.json deleted file mode 100644 index 01060984ef16d65d97c6e5ff6d8f717525cd59c6..0000000000000000000000000000000000000000 --- a/deployments/types-rialto.json +++ /dev/null @@ -1,190 +0,0 @@ -{ - "--1": "Millau Types", - "MillauAddress": "AccountId", - "MillauLookupSource": "AccountId", - "MillauBalance": "u64", - "MillauBlockHash": "H512", - "MillauBlockNumber": "u64", - "MillauHeader": { - "parent_Hash": "MillauBlockHash", - "number": "Compact", - "state_root": "MillauBlockHash", - "extrinsics_root": "MillauBlockHash", - "digest": "MillauDigest" - }, - "MillauDigest": { - "logs": "Vec" - }, - "MillauDigestItem": { - "_enum": { - "Other": "Vec", - "AuthoritiesChange": "Vec", - "ChangesTrieRoot": "MillauBlockHash", - "SealV0": "SealV0", - "Consensus": "Consensus", - "Seal": "Seal", - "PreRuntime": "PreRuntime" - } - }, - "--2": "Rialto Types", - "RialtoAddress": "MultiAddress", - "RialtoLookupSource": "MultiAddress", - "RialtoBalance": "u128", - "RialtoBlockHash": "H256", - "RialtoBlockNumber": "u32", - "RialtoHeader": { - "parent_Hash": "RialtoBlockHash", - "number": "Compact", - "state_root": "RialtoBlockHash", - "extrinsics_root": "RialtoBlockHash", - "digest": "RialtoDigest" - }, - "RialtoDigest": { - "logs": "Vec" - }, - "RialtoDigestItem": { - "_enum": { - "Other": "Vec", - "AuthoritiesChange": "Vec", - "ChangesTrieRoot": "RialtoBlockHash", - "SealV0": "SealV0", - "Consensus": "Consensus", - "Seal": "Seal", - "PreRuntime": "PreRuntime" - } - }, - "--3": "Common types", - "AccountSigner": "MultiSigner", - "SpecVersion": "u32", - "RelayerId": "AccountId", - "SourceAccountId": "AccountId", - "ImportedHeader": { - "header": "BridgedHeader", - "requires_justification": "bool", - "is_finalized": "bool", - "signal_hash": "Option" - }, - "AuthoritySet": { - "authorities": "AuthorityList", - "set_id": "SetId" - }, - "Id": "[u8; 4]", - "ChainId": "Id", - "LaneId": "Id", - "MessageNonce": "u64", - "BridgeMessageId": "(Id, u64)", - "MessageKey": { - "lane_id": "LaneId", - "nonce:": "MessageNonce" - }, - "InboundLaneData": { - "relayers": "Vec", - "last_confirmed_nonce": "MessageNonce" - }, - "UnrewardedRelayer": { - "relayer": "RelayerId", - "messages": "DeliveredMessages" - }, - "DeliveredMessages": { - "begin": "MessageNonce", - "end": "MessageNonce" - }, - "OutboundLaneData": { - "oldest_unpruned_nonce": "MessageNonce", - "latest_received_nonce": "MessageNonce", - "latest_generated_nonce": "MessageNonce" - }, - "MessageData": { - "payload": "MessagePayload", - "fee": "Fee" - }, - "MessagePayload": "Vec", - "BridgedOpaqueCall": "Vec", - "OutboundMessageFee": "Fee", - "OutboundPayload": { - "spec_version": "SpecVersion", - "weight": "Weight", - "origin": "CallOrigin", - "dispatch_fee_payment": "DispatchFeePayment", - "call": "BridgedOpaqueCall" - }, - "CallOrigin": { - "_enum": { - "SourceRoot": "()", - "TargetAccount": "(SourceAccountId, MultiSigner, MultiSignature)", - "SourceAccount": "SourceAccountId" - } - }, - "DispatchFeePayment": { - "_enum": { - "AtSourceChain": "()", - "AtTargetChain": "()" - } - }, - "MultiSigner": { - "_enum": { - "Ed25519": "H256", - "Sr25519": "H256", - "Ecdsa": "[u8;33]" - } - }, - "MessagesProofOf": { - "bridged_header_hash": "BridgedBlockHash", - "storage_proof": "Vec", - "lane": "LaneId", - "nonces_start": "MessageNonce", - "nonces_end": "MessageNonce" - }, - "StorageProofItem": "Vec", - "MessagesDeliveryProofOf": { - "bridged_header_hash": "BridgedBlockHash", - "storage_proof": "Vec", - "lane": "LaneId" - }, - "UnrewardedRelayersState": { - "unrewarded_relayer_entries": "MessageNonce", - "messages_in_oldest_entry": "MessageNonce", - "total_messages": "MessageNonce" - }, - "AncestryProof": "()", - "MessageFeeData": { - "lane_id": "LaneId", - "payload": "OutboundPayload" - }, - "Precommit": { - "target_hash": "BridgedBlockHash", - "target_number": "BridgedBlockNumber" - }, - "AuthoritySignature": "[u8;64]", - "AuthorityId": "[u8;32]", - "SignedPrecommit": { - "precommit": "Precommit", - "signature": "AuthoritySignature", - "id": "AuthorityId" - }, - "Commit": { - "target_hash": "BridgedBlockHash", - "target_number": "BridgedBlockNumber", - "precommits": "Vec" - }, - "GrandpaJustification": { - "round": "u64", - "commit": "Commit", - "votes_ancestries": "Vec" - }, - "Address": "RialtoAddress", - "LookupSource": "RialtoLookupSource", - "Fee": "RialtoBalance", - "Balance": "RialtoBalance", - "BlockHash": "RialtoBlockHash", - "BlockNumber": "RialtoBlockNumber", - "BridgedBlockHash": "MillauBlockHash", - "BridgedBlockNumber": "MillauBlockNumber", - "BridgedHeader": "MillauHeader", - "Parameter": { - "_enum": { - "RialtoToMillauConversionRate": "u128" - } - }, - "ValidationCodeHash": "H256" -} diff --git a/deployments/types/build.sh b/deployments/types/build.sh deleted file mode 100755 index be96459a6daaabe0c9f1f652481339555f736f22..0000000000000000000000000000000000000000 --- a/deployments/types/build.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -# The script generates JSON type definition files in `./deployment` directory to be used for -# JS clients. -# -# It works by creating definitions for each side of the different bridge pairs we support -# (Rialto<>Millau at the moment). -# -# To avoid duplication each bridge pair has a JSON file with common definitions, as well as a -# general JSON file with common definitions regardless of the bridge pair. These files are then -# merged with chain-specific type definitions. - -set -eux - -# Make sure we are in the right dir. -cd $(dirname $(realpath $0)) - -# Create types for our supported bridge pairs (Rialto<>Millau) -jq -s '.[0] * .[1] * .[2]' rialto-millau.json common.json rialto.json > ../types-rialto.json -jq -s '.[0] * .[1] * .[2]' rialto-millau.json common.json millau.json > ../types-millau.json diff --git a/deployments/types/common.json b/deployments/types/common.json deleted file mode 100644 index 93359e3d57aaac55eae9bab910c430b3752e79b2..0000000000000000000000000000000000000000 --- a/deployments/types/common.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "--3": "Common types", - "AccountSigner": "MultiSigner", - "SpecVersion": "u32", - "RelayerId": "AccountId", - "SourceAccountId": "AccountId", - "ImportedHeader": { - "header": "BridgedHeader", - "requires_justification": "bool", - "is_finalized": "bool", - "signal_hash": "Option" - }, - "AuthoritySet": { - "authorities": "AuthorityList", - "set_id": "SetId" - }, - "Id": "[u8; 4]", - "ChainId": "Id", - "LaneId": "Id", - "MessageNonce": "u64", - "BridgeMessageId": "(Id, u64)", - "MessageKey": { - "lane_id": "LaneId", - "nonce:": "MessageNonce" - }, - "InboundLaneData": { - "relayers": "Vec", - "last_confirmed_nonce": "MessageNonce" - }, - "UnrewardedRelayer": { - "relayer": "RelayerId", - "messages": "DeliveredMessages" - }, - "DeliveredMessages": { - "begin": "MessageNonce", - "end": "MessageNonce" - }, - "OutboundLaneData": { - "oldest_unpruned_nonce": "MessageNonce", - "latest_received_nonce": "MessageNonce", - "latest_generated_nonce": "MessageNonce" - - }, - "MessageData": { - "payload": "MessagePayload", - "fee": "Fee" - }, - "MessagePayload": "Vec", - "BridgedOpaqueCall": "Vec", - "OutboundMessageFee": "Fee", - "OutboundPayload": { - "spec_version": "SpecVersion", - "weight": "Weight", - "origin": "CallOrigin", - "dispatch_fee_payment": "DispatchFeePayment", - "call": "BridgedOpaqueCall" - }, - "CallOrigin": { - "_enum": { - "SourceRoot": "()", - "TargetAccount": "(SourceAccountId, MultiSigner, MultiSignature)", - "SourceAccount": "SourceAccountId" - } - }, - "DispatchFeePayment": { - "_enum": { - "AtSourceChain": "()", - "AtTargetChain": "()" - } - }, - "MultiSigner": { - "_enum": { - "Ed25519": "H256", - "Sr25519": "H256", - "Ecdsa": "[u8;33]" - } - }, - "MessagesProofOf": { - "bridged_header_hash": "BridgedBlockHash", - "storage_proof": "Vec", - "lane": "LaneId", - "nonces_start": "MessageNonce", - "nonces_end": "MessageNonce" - }, - "StorageProofItem": "Vec", - "MessagesDeliveryProofOf": { - "bridged_header_hash": "BridgedBlockHash", - "storage_proof": "Vec", - "lane": "LaneId" - }, - "UnrewardedRelayersState": { - "unrewarded_relayer_entries": "MessageNonce", - "messages_in_oldest_entry": "MessageNonce", - "total_messages": "MessageNonce" - }, - "AncestryProof": "()", - "MessageFeeData": { - "lane_id": "LaneId", - "payload": "OutboundPayload" - }, - "Precommit": { - "target_hash": "BridgedBlockHash", - "target_number": "BridgedBlockNumber" - }, - "AuthoritySignature": "[u8;64]", - "AuthorityId": "[u8;32]", - "SignedPrecommit": { - "precommit": "Precommit", - "signature": "AuthoritySignature", - "id": "AuthorityId" - }, - "Commit": { - "target_hash": "BridgedBlockHash", - "target_number": "BridgedBlockNumber", - "precommits": "Vec" - }, - "GrandpaJustification": { - "round": "u64", - "commit": "Commit", - "votes_ancestries": "Vec" - } -} diff --git a/deployments/types/millau.json b/deployments/types/millau.json deleted file mode 100644 index 589d5619df453162c3d61c03824b5796244da6d6..0000000000000000000000000000000000000000 --- a/deployments/types/millau.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "Address": "MillauAddress", - "LookupSource": "MillauLookupSource", - "Fee": "MillauBalance", - "Balance": "MillauBalance", - "Hash": "MillauBlockHash", - "BlockHash": "MillauBlockHash", - "BlockNumber": "MillauBlockNumber", - "BridgedBlockHash": "RialtoBlockHash", - "BridgedBlockNumber": "RialtoBlockNumber", - "BridgedHeader": "RialtoHeader", - "Parameter": { - "_enum": { - "MillauToRialtoConversionRate": "u128" - } - } -} diff --git a/deployments/types/rialto-millau.json b/deployments/types/rialto-millau.json deleted file mode 100644 index 971cf666d479e9cb0e6d3f4dd85f4e47d1ae5a13..0000000000000000000000000000000000000000 --- a/deployments/types/rialto-millau.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "--1": "Millau Types", - "MillauAddress": "AccountId", - "MillauLookupSource": "AccountId", - "MillauBalance": "u64", - "MillauBlockHash": "H512", - "MillauBlockNumber": "u64", - "MillauHeader": { - "parent_Hash": "MillauBlockHash", - "number": "Compact", - "state_root": "MillauBlockHash", - "extrinsics_root": "MillauBlockHash", - "digest": "MillauDigest" - }, - "MillauDigest": { - "logs": "Vec" - }, - "MillauDigestItem": { - "_enum": { - "Other": "Vec", - "AuthoritiesChange": "Vec", - "ChangesTrieRoot": "MillauBlockHash", - "SealV0": "SealV0", - "Consensus": "Consensus", - "Seal": "Seal", - "PreRuntime": "PreRuntime" - } - }, - "--2": "Rialto Types", - "RialtoAddress": "MultiAddress", - "RialtoLookupSource": "MultiAddress", - "RialtoBalance": "u128", - "RialtoBlockHash": "H256", - "RialtoBlockNumber": "u32", - "RialtoHeader": { - "parent_Hash": "RialtoBlockHash", - "number": "Compact", - "state_root": "RialtoBlockHash", - "extrinsics_root": "RialtoBlockHash", - "digest": "RialtoDigest" - }, - "RialtoDigest": { - "logs": "Vec" - }, - "RialtoDigestItem": { - "_enum": { - "Other": "Vec", - "AuthoritiesChange": "Vec", - "ChangesTrieRoot": "RialtoBlockHash", - "SealV0": "SealV0", - "Consensus": "Consensus", - "Seal": "Seal", - "PreRuntime": "PreRuntime" - } - } -} diff --git a/deployments/types/rialto.json b/deployments/types/rialto.json deleted file mode 100644 index 77c30b7cc2d7b052bbc635e900a583a8aa6dc55c..0000000000000000000000000000000000000000 --- a/deployments/types/rialto.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "Address": "RialtoAddress", - "LookupSource": "RialtoLookupSource", - "Fee": "RialtoBalance", - "Balance": "RialtoBalance", - "BlockHash": "RialtoBlockHash", - "BlockNumber": "RialtoBlockNumber", - "BridgedBlockHash": "MillauBlockHash", - "BridgedBlockNumber": "MillauBlockNumber", - "BridgedHeader": "MillauHeader", - "Parameter": { - "_enum": { - "RialtoToMillauConversionRate": "u128" - } - }, - "ValidationCodeHash": "H256" -} diff --git a/deployments/ui/README.md b/deployments/ui/README.md deleted file mode 100644 index ad946fc699bf89cc05d675267013fc77ff4db36a..0000000000000000000000000000000000000000 --- a/deployments/ui/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# bridges-ui - -This is a Bridges UI docker configuration file. The source of the Bridges UI code -can be found in [the repository](https://github.com/paritytech/parity-bridges-ui). -The CI should create and publish a docker image that is used by this configuration -file, so that the code is always using the latest version. -The UI is configured to point to local Rialto and Millau nodes to retrieve the require -data. - -This image can be used together with `nginx-proxy` to expose the UI externally. See -`VIRTUAL_*` and `LETSENCRYPT_*` environment variables. - -After start the UI is available at `http://localhost:8080` - -## How to? - -In current directory: -```bash -docker-compose up -d -``` - -Then start `rialto` & `millau` networks with the same command (one folder up) or -run the full setup by using `../run.sh` script. diff --git a/deployments/ui/docker-compose.yml b/deployments/ui/docker-compose.yml deleted file mode 100644 index 2d400609c4428a97a067c96b26889cc5090508e9..0000000000000000000000000000000000000000 --- a/deployments/ui/docker-compose.yml +++ /dev/null @@ -1,14 +0,0 @@ -version: '3.5' -services: - bridges-ui: - image: paritytech/parity-bridges-ui - environment: - VIRTUAL_HOST: ui.brucke.link - VIRTUAL_PORT: 80 - LETSENCRYPT_HOST: ui.brucke.link - LETSENCRYPT_EMAIL: admin@parity.io - CHAIN_1_SUBSTRATE_PROVIDER: ${UI_CHAIN_1:-ws://localhost:9944} - CHAIN_2_SUBSTRATE_PROVIDER: ${UI_CHAIN_2:-ws://localhost:19944} - stop_signal: SIGKILL - ports: - - "8080:80" diff --git a/docs/dockerhub-millau-bridge-node.README.md b/docs/dockerhub-millau-bridge-node.README.md deleted file mode 100644 index 481ad46b7c6f29ceb9a69b9c02e6977dede87909..0000000000000000000000000000000000000000 --- a/docs/dockerhub-millau-bridge-node.README.md +++ /dev/null @@ -1 +0,0 @@ -# millau-bridge-node diff --git a/docs/dockerhub-rialto-bridge-node.README.md b/docs/dockerhub-rialto-bridge-node.README.md deleted file mode 100644 index 2393e6f812954dffe892bed85aebb1e3d5df770d..0000000000000000000000000000000000000000 --- a/docs/dockerhub-rialto-bridge-node.README.md +++ /dev/null @@ -1 +0,0 @@ -# rialto-bridge-node diff --git a/docs/dockerhub-rialto-parachain-collator.README.md b/docs/dockerhub-rialto-parachain-collator.README.md deleted file mode 100644 index a09f6b1561b06987c8eb6478fafc0dc8802fed19..0000000000000000000000000000000000000000 --- a/docs/dockerhub-rialto-parachain-collator.README.md +++ /dev/null @@ -1 +0,0 @@ -# rialto-parachain-collator diff --git a/docs/high-level-overview.md b/docs/high-level-overview.md index 42efc8100bd080763c22ea3e4e813f3c3c87db37..d6d6fb3f0996dd15d4fc2987deacf79e4ecd4e5f 100644 --- a/docs/high-level-overview.md +++ b/docs/high-level-overview.md @@ -1,7 +1,7 @@ # High-Level Bridge Documentation This document gives a brief, abstract description of main components that may be found in this repository. If you want -to see how we're using them to build Rococo <> Wococo (Kusama <> Polkadot) bridge, please refer to the [Polkadot <> +to see how we're using them to build Rococo <> Westend (Kusama <> Polkadot) bridge, please refer to the [Polkadot <> Kusama Bridge](./polkadot-kusama-bridge-overview.md). ## Purpose diff --git a/fuzz/storage-proof/Cargo.lock b/fuzz/storage-proof/Cargo.lock deleted file mode 100644 index 6eba720c4937e246081123e15ee3b84bf196574c..0000000000000000000000000000000000000000 --- a/fuzz/storage-proof/Cargo.lock +++ /dev/null @@ -1,2796 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] - -[[package]] -name = "addr2line" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "ahash" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" -dependencies = [ - "getrandom 0.2.7", - "once_cell", - "version_check", -] - -[[package]] -name = "aho-corasick" -version = "0.7.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" -dependencies = [ - "memchr", -] - -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - -[[package]] -name = "anyhow" -version = "1.0.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afddf7f520a80dbf76e6f50a35bca42a2331ef227a28b3b6dc5c2e2338d114b1" - -[[package]] -name = "arbitrary" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c38b6b6b79f671c25e1a3e785b7b82d7562ffc9cd3efdc98627e5668a2472490" - -[[package]] -name = "arrayref" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" - -[[package]] -name = "arrayvec" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" -dependencies = [ - "nodrop", -] - -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - -[[package]] -name = "arrayvec" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" - -[[package]] -name = "async-trait" -version = "0.1.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "backtrace" -version = "0.3.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - -[[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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitvec" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1489fcb93a5bb47da0462ca93ad252ad6af2145cce58d10d46a83931ba9f016b" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - -[[package]] -name = "blake2" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9cf849ee05b2ee5fba5e36f97ff8ec2533916700fc0758d40d92136a42f3388" -dependencies = [ - "digest 0.10.3", -] - -[[package]] -name = "blake2-rfc" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" -dependencies = [ - "arrayvec 0.4.12", - "constant_time_eq", -] - -[[package]] -name = "block-buffer" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array 0.12.4", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array 0.14.4", -] - -[[package]] -name = "block-buffer" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" -dependencies = [ - "generic-array 0.14.4", -] - -[[package]] -name = "block-padding" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -dependencies = [ - "byte-tools", -] - -[[package]] -name = "bp-runtime" -version = "0.1.0" -dependencies = [ - "frame-support", - "frame-system", - "hash-db", - "impl-trait-for-tuples", - "num-traits", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-trie", - "trie-db 0.24.0", -] - -[[package]] -name = "bumpalo" -version = "3.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" - -[[package]] -name = "byte-slice-cast" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87c5fdd0166095e1d463fc6cc01aa8ce547ad77a4e84d42eb6762b084e28067e" - -[[package]] -name = "byte-tools" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" - -[[package]] -name = "byteorder" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" - -[[package]] -name = "cc" -version = "1.0.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" -dependencies = [ - "libc", - "num-integer", - "num-traits", - "winapi", -] - -[[package]] -name = "const-oid" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" - -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - -[[package]] -name = "cpufeatures" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" -dependencies = [ - "libc", -] - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-bigint" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" -dependencies = [ - "generic-array 0.14.4", - "rand_core 0.6.1", - "subtle", - "zeroize", -] - -[[package]] -name = "crypto-common" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ccfd8c0ee4cce11e45b3fd6f9d5e69e0cc62912aa6a0cb1bf4617b0eba5a12f" -dependencies = [ - "generic-array 0.14.4", - "typenum", -] - -[[package]] -name = "crypto-mac" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" -dependencies = [ - "generic-array 0.14.4", - "subtle", -] - -[[package]] -name = "crypto-mac" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" -dependencies = [ - "generic-array 0.14.4", - "subtle", -] - -[[package]] -name = "curve25519-dalek" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "434e1720189a637d44fe464f4df1e6eb900b4835255b14354497c78af37d9bb8" -dependencies = [ - "byteorder", - "digest 0.8.1", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - -[[package]] -name = "curve25519-dalek" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f627126b946c25a4638eec0ea634fc52506dea98db118aae985118ce7c3d723f" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - -[[package]] -name = "der" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" -dependencies = [ - "const-oid", -] - -[[package]] -name = "derive_more" -version = "0.99.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "digest" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -dependencies = [ - "generic-array 0.12.4", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array 0.14.4", -] - -[[package]] -name = "digest" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" -dependencies = [ - "block-buffer 0.10.2", - "crypto-common", - "subtle", -] - -[[package]] -name = "downcast-rs" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" - -[[package]] -name = "dyn-clonable" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9232f0e607a262ceb9bd5141a3dfb3e4db6994b31989bbfd845878cba59fd4" -dependencies = [ - "dyn-clonable-impl", - "dyn-clone", -] - -[[package]] -name = "dyn-clonable-impl" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "dyn-clone" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" - -[[package]] -name = "ecdsa" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" -dependencies = [ - "der", - "elliptic-curve", - "rfc6979", - "signature", -] - -[[package]] -name = "ed25519" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c66a534cbb46ab4ea03477eae19d5c22c01da8258030280b7bd9d8433fb6ef" -dependencies = [ - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek 3.0.2", - "ed25519", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "zeroize", -] - -[[package]] -name = "either" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" - -[[package]] -name = "elliptic-curve" -version = "0.11.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" -dependencies = [ - "base16ct", - "crypto-bigint", - "der", - "ff", - "generic-array 0.14.4", - "group", - "rand_core 0.6.1", - "sec1", - "subtle", - "zeroize", -] - -[[package]] -name = "env_logger" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" -dependencies = [ - "humantime", - "is-terminal", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "environmental" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" - -[[package]] -name = "errno" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" -dependencies = [ - "errno-dragonfly", - "libc", - "winapi", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "fake-simd" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" - -[[package]] -name = "ff" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "131655483be284720a17d74ff97592b8e76576dc25563148601df2d7c9080924" -dependencies = [ - "rand_core 0.6.1", - "subtle", -] - -[[package]] -name = "fixed-hash" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" -dependencies = [ - "byteorder", - "rand 0.8.2", - "rustc-hex", - "static_assertions", -] - -[[package]] -name = "frame-metadata" -version = "15.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6bb8542ef006ef0de09a5c4420787d79823c0ed7924225822362fd2bf2ff2d" -dependencies = [ - "cfg-if", - "parity-scale-codec", - "scale-info", - "serde", -] - -[[package]] -name = "frame-support" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "bitflags", - "frame-metadata", - "frame-support-procedural", - "impl-trait-for-tuples", - "k256", - "log", - "once_cell", - "parity-scale-codec", - "paste", - "scale-info", - "serde", - "smallvec", - "sp-arithmetic", - "sp-core", - "sp-core-hashing-proc-macro", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-state-machine", - "sp-std", - "sp-tracing", - "tt-call", -] - -[[package]] -name = "frame-support-procedural" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "Inflector", - "frame-support-procedural-tools", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "frame-support-procedural-tools" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "frame-support-procedural-tools-derive", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "frame-support-procedural-tools-derive" -version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "frame-system" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "frame-support", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-version", -] - -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - -[[package]] -name = "futures" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" - -[[package]] -name = "futures-executor" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", - "num_cpus", -] - -[[package]] -name = "futures-io" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" - -[[package]] -name = "futures-macro" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "futures-sink" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" - -[[package]] -name = "futures-task" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" - -[[package]] -name = "futures-util" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" -dependencies = [ - "typenum", -] - -[[package]] -name = "generic-array" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "getrandom" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", -] - -[[package]] -name = "gimli" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" - -[[package]] -name = "group" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" -dependencies = [ - "ff", - "rand_core 0.6.1", - "subtle", -] - -[[package]] -name = "hash-db" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" - -[[package]] -name = "hash256-std-hasher" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" -dependencies = [ - "crunchy", -] - -[[package]] -name = "hashbrown" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "607c8a29735385251a339424dd462993c0fed8fa09d378f259377df08c126022" -dependencies = [ - "ahash", -] - -[[package]] -name = "hermit-abi" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hex" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" - -[[package]] -name = "hmac" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" -dependencies = [ - "crypto-mac 0.8.0", - "digest 0.9.0", -] - -[[package]] -name = "hmac" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" -dependencies = [ - "crypto-mac 0.11.1", - "digest 0.9.0", -] - -[[package]] -name = "hmac-drbg" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" -dependencies = [ - "digest 0.9.0", - "generic-array 0.14.4", - "hmac 0.8.1", -] - -[[package]] -name = "honggfuzz" -version = "0.5.54" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bea09577d948a98a5f59b7c891e274c4fb35ad52f67782b3d0cb53b9c05301f1" -dependencies = [ - "arbitrary", - "lazy_static", - "memmap", -] - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "impl-codec" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" -dependencies = [ - "parity-scale-codec", -] - -[[package]] -name = "impl-serde" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b47ca4d2b6931707a55fce5cf66aff80e2178c8b63bbb4ecb5695cbc870ddf6f" -dependencies = [ - "serde", -] - -[[package]] -name = "impl-trait-for-tuples" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "integer-sqrt" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770" -dependencies = [ - "num-traits", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e" -dependencies = [ - "libc", - "windows-sys 0.42.0", -] - -[[package]] -name = "is-terminal" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189" -dependencies = [ - "hermit-abi 0.2.6", - "io-lifetimes", - "rustix", - "windows-sys 0.42.0", -] - -[[package]] -name = "itoa" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" - -[[package]] -name = "itoa" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" - -[[package]] -name = "js-sys" -version = "0.3.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fac17f7123a73ca62df411b1bf727ccc805daa070338fda671c86dac1bdc27" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "k256" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" -dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "sec1", -] - -[[package]] -name = "keccak" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - -[[package]] -name = "libsecp256k1" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0452aac8bab02242429380e9b2f94ea20cea2b37e2c1777a1358799bbe97f37" -dependencies = [ - "arrayref", - "base64", - "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", - "rand 0.8.2", - "serde", - "sha2 0.9.9", - "typenum", -] - -[[package]] -name = "libsecp256k1-core" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" -dependencies = [ - "crunchy", - "digest 0.9.0", - "subtle", -] - -[[package]] -name = "libsecp256k1-gen-ecmult" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" -dependencies = [ - "libsecp256k1-core", -] - -[[package]] -name = "libsecp256k1-gen-genmult" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" -dependencies = [ - "libsecp256k1-core", -] - -[[package]] -name = "linux-raw-sys" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" - -[[package]] -name = "lock_api" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "matchers" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" -dependencies = [ - "regex-automata", -] - -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "memmap" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "memory-db" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6566c70c1016f525ced45d7b7f97730a2bafb037c788211d0c186ef5b2189f0a" -dependencies = [ - "hash-db", - "hashbrown", - "parity-util-mem", -] - -[[package]] -name = "memory_units" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" - -[[package]] -name = "merlin" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" -dependencies = [ - "byteorder", - "keccak", - "rand_core 0.5.1", - "zeroize", -] - -[[package]] -name = "miniz_oxide" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" -dependencies = [ - "adler", -] - -[[package]] -name = "nodrop" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" - -[[package]] -name = "num-bigint" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-format" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bafe4179722c2894288ee77a9f044f02811c86af699344c498b0840c698a2465" -dependencies = [ - "arrayvec 0.4.12", - "itoa 0.4.7", -] - -[[package]] -name = "num-integer" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" -dependencies = [ - "autocfg", - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" -dependencies = [ - "hermit-abi 0.1.18", - "libc", -] - -[[package]] -name = "object" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" - -[[package]] -name = "opaque-debug" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "parity-scale-codec" -version = "3.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ab01d0f889e957861bc65888d5ccbe82c158d0270136ba46820d43837cdf72" -dependencies = [ - "arrayvec 0.7.2", - "bitvec", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", -] - -[[package]] -name = "parity-scale-codec-derive" -version = "3.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b26a931f824dd4eca30b3e43bb4f31cd5f0d3a403c5f5ff27106b805bfde7b" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "parity-util-mem" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c32561d248d352148124f036cac253a644685a21dc9fea383eb4907d7bd35a8f" -dependencies = [ - "cfg-if", - "hashbrown", - "impl-trait-for-tuples", - "parity-util-mem-derive", - "parking_lot", - "primitive-types", - "winapi", -] - -[[package]] -name = "parity-util-mem-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" -dependencies = [ - "proc-macro2", - "syn", - "synstructure", -] - -[[package]] -name = "parity-wasm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-sys 0.36.1", -] - -[[package]] -name = "paste" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc" - -[[package]] -name = "pbkdf2" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" -dependencies = [ - "crypto-mac 0.8.0", -] - -[[package]] -name = "pbkdf2" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" -dependencies = [ - "crypto-mac 0.11.1", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439697af366c49a6d0a010c56a0d97685bc140ce0d377b13a2ea2aa42d64a827" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "ppv-lite86" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" - -[[package]] -name = "primitive-types" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" -dependencies = [ - "fixed-hash", - "impl-codec", - "impl-serde", - "scale-info", - "uint", -] - -[[package]] -name = "proc-macro-crate" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" -dependencies = [ - "thiserror", - "toml", -] - -[[package]] -name = "proc-macro2" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc 0.2.0", - "rand_pcg", -] - -[[package]] -name = "rand" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18519b42a40024d661e1714153e9ad0c3de27cd495760ceb09710920f1098b1e" -dependencies = [ - "libc", - "rand_chacha 0.3.0", - "rand_core 0.6.1", - "rand_hc 0.3.1", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.1", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c026d7df8b298d90ccbbc5190bd04d85e159eaf5576caeacf8741da93ccbd2e5" -dependencies = [ - "getrandom 0.2.7", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_hc" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" -dependencies = [ - "rand_core 0.6.1", -] - -[[package]] -name = "rand_pcg" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "redox_syscall" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" -dependencies = [ - "bitflags", -] - -[[package]] -name = "ref-cast" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300f2a835d808734ee295d45007adacb9ebb29dd3ae2424acfa17930cae541da" -dependencies = [ - "ref-cast-impl", -] - -[[package]] -name = "ref-cast-impl" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c38e3aecd2b21cb3959637b883bb3714bc7e43f0268b9a29d3743ee3e55cdd2" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "regex" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4" -dependencies = [ - "byteorder", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.6.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" - -[[package]] -name = "rfc6979" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" -dependencies = [ - "crypto-bigint", - "hmac 0.11.0", - "zeroize", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc-hex" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" - -[[package]] -name = "rustix" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fdebc4b395b7fbb9ab11e462e20ed9051e7b16e42d24042c776eca0ac81b03" -dependencies = [ - "bitflags", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys", - "windows-sys 0.42.0", -] - -[[package]] -name = "ryu" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" - -[[package]] -name = "scale-info" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c46be926081c9f4dd5dd9b6f1d3e3229f2360bc6502dd8836f84a93b7c75e99a" -dependencies = [ - "bitvec", - "cfg-if", - "derive_more", - "parity-scale-codec", - "scale-info-derive", - "serde", -] - -[[package]] -name = "scale-info-derive" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e334bb10a245e28e5fd755cabcafd96cfcd167c99ae63a46924ca8d8703a3c" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "schnorrkel" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "curve25519-dalek 2.1.2", - "getrandom 0.1.16", - "merlin", - "rand 0.7.3", - "rand_core 0.5.1", - "sha2 0.8.2", - "subtle", - "zeroize", -] - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "sec1" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" -dependencies = [ - "der", - "generic-array 0.14.4", - "subtle", - "zeroize", -] - -[[package]] -name = "secp256k1" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c42e6f1735c5f00f51e43e28d6634141f2bcad10931b2609ddd74a86d751260" -dependencies = [ - "secp256k1-sys", -] - -[[package]] -name = "secp256k1-sys" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957da2573cde917463ece3570eab4a0b3f19de6f1646cde62e6fd3868f566036" -dependencies = [ - "cc", -] - -[[package]] -name = "secrecy" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" -dependencies = [ - "zeroize", -] - -[[package]] -name = "serde" -version = "1.0.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0171ebb889e45aa68b44aee0859b3eede84c6f5f5c228e6f140c0b2a0a46cad6" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1d3230c1de7932af58ad8ffbe1d784bd55efd5a9d84ac24f69c72d83543dfb" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82c2c1fdcd807d1098552c5b9a36e425e42e9fbd7c6a37a8425f390f781f7fa7" -dependencies = [ - "itoa 1.0.2", - "ryu", - "serde", -] - -[[package]] -name = "sha2" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" -dependencies = [ - "block-buffer 0.7.3", - "digest 0.8.1", - "fake-simd", - "opaque-debug 0.2.3", -] - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug 0.3.0", -] - -[[package]] -name = "sha2" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.3", -] - -[[package]] -name = "sha3" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881bf8156c87b6301fc5ca6b27f11eeb2761224c7081e69b409d5a1951a70c86" -dependencies = [ - "digest 0.10.3", - "keccak", -] - -[[package]] -name = "sharded-slab" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79c719719ee05df97490f80a45acfc99e5a30ce98a1e4fb67aee422745ae14e3" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "signature" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" -dependencies = [ - "digest 0.9.0", - "rand_core 0.6.1", -] - -[[package]] -name = "slab" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" - -[[package]] -name = "smallvec" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" - -[[package]] -name = "sp-application-crypto" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-std", -] - -[[package]] -name = "sp-arithmetic" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "integer-sqrt", - "num-traits", - "parity-scale-codec", - "scale-info", - "serde", - "sp-debug-derive", - "sp-std", - "static_assertions", -] - -[[package]] -name = "sp-core" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "base58", - "bitflags", - "blake2-rfc", - "byteorder", - "dyn-clonable", - "ed25519-dalek", - "futures", - "hash-db", - "hash256-std-hasher", - "hex", - "impl-serde", - "lazy_static", - "libsecp256k1", - "log", - "merlin", - "num-traits", - "parity-scale-codec", - "parity-util-mem", - "parking_lot", - "primitive-types", - "rand 0.7.3", - "regex", - "scale-info", - "schnorrkel", - "secp256k1", - "secrecy", - "serde", - "sp-core-hashing", - "sp-debug-derive", - "sp-externalities", - "sp-runtime-interface", - "sp-std", - "sp-storage", - "ss58-registry", - "substrate-bip39", - "thiserror", - "tiny-bip39", - "wasmi", - "zeroize", -] - -[[package]] -name = "sp-core-hashing" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "blake2", - "byteorder", - "digest 0.10.3", - "sha2 0.10.2", - "sha3", - "sp-std", - "twox-hash", -] - -[[package]] -name = "sp-core-hashing-proc-macro" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "proc-macro2", - "quote", - "sp-core-hashing", - "syn", -] - -[[package]] -name = "sp-debug-derive" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "sp-externalities" -version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "environmental", - "parity-scale-codec", - "sp-std", - "sp-storage", -] - -[[package]] -name = "sp-inherents" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "async-trait", - "impl-trait-for-tuples", - "parity-scale-codec", - "sp-core", - "sp-runtime", - "sp-std", - "thiserror", -] - -[[package]] -name = "sp-io" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "futures", - "hash-db", - "libsecp256k1", - "log", - "parity-scale-codec", - "parking_lot", - "secp256k1", - "sp-core", - "sp-externalities", - "sp-keystore", - "sp-runtime-interface", - "sp-state-machine", - "sp-std", - "sp-tracing", - "sp-trie", - "sp-wasm-interface", - "tracing", - "tracing-core", -] - -[[package]] -name = "sp-keystore" -version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "async-trait", - "futures", - "merlin", - "parity-scale-codec", - "parking_lot", - "schnorrkel", - "sp-core", - "sp-externalities", - "thiserror", -] - -[[package]] -name = "sp-panic-handler" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "backtrace", - "lazy_static", - "regex", -] - -[[package]] -name = "sp-runtime" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "either", - "hash256-std-hasher", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "parity-util-mem", - "paste", - "rand 0.7.3", - "scale-info", - "serde", - "sp-application-crypto", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-std", -] - -[[package]] -name = "sp-runtime-interface" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "impl-trait-for-tuples", - "parity-scale-codec", - "primitive-types", - "sp-externalities", - "sp-runtime-interface-proc-macro", - "sp-std", - "sp-storage", - "sp-tracing", - "sp-wasm-interface", - "static_assertions", -] - -[[package]] -name = "sp-runtime-interface-proc-macro" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "Inflector", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "sp-staking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "sp-state-machine" -version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "hash-db", - "log", - "num-traits", - "parity-scale-codec", - "parking_lot", - "rand 0.7.3", - "smallvec", - "sp-core", - "sp-externalities", - "sp-panic-handler", - "sp-std", - "sp-trie", - "thiserror", - "tracing", - "trie-root", -] - -[[package]] -name = "sp-std" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" - -[[package]] -name = "sp-storage" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "impl-serde", - "parity-scale-codec", - "ref-cast", - "serde", - "sp-debug-derive", - "sp-std", -] - -[[package]] -name = "sp-tracing" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "parity-scale-codec", - "sp-std", - "tracing", - "tracing-core", - "tracing-subscriber", -] - -[[package]] -name = "sp-trie" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "hash-db", - "memory-db", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-std", - "thiserror", - "trie-db 0.23.1", - "trie-root", -] - -[[package]] -name = "sp-version" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "impl-serde", - "parity-scale-codec", - "parity-wasm", - "scale-info", - "serde", - "sp-core-hashing-proc-macro", - "sp-runtime", - "sp-std", - "sp-version-proc-macro", - "thiserror", -] - -[[package]] -name = "sp-version-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "parity-scale-codec", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "sp-wasm-interface" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" -dependencies = [ - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "sp-std", - "wasmi", -] - -[[package]] -name = "ss58-registry" -version = "1.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ef98aedad3dc52e10995e7ed15f1279e11d4da35795f5dac7305742d0feb66" -dependencies = [ - "Inflector", - "num-format", - "proc-macro2", - "quote", - "serde", - "serde_json", - "unicode-xid", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "storage-proof-fuzzer" -version = "0.1.0" -dependencies = [ - "bp-runtime", - "env_logger", - "honggfuzz", - "log", - "sp-core", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-trie", -] - -[[package]] -name = "substrate-bip39" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" -dependencies = [ - "hmac 0.11.0", - "pbkdf2 0.8.0", - "schnorrkel", - "sha2 0.9.9", - "zeroize", -] - -[[package]] -name = "subtle" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" - -[[package]] -name = "syn" -version = "1.0.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "synstructure" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "unicode-xid", -] - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "termcolor" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "thiserror" -version = "1.0.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "thread_local" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" -dependencies = [ - "once_cell", -] - -[[package]] -name = "tiny-bip39" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" -dependencies = [ - "anyhow", - "hmac 0.8.1", - "once_cell", - "pbkdf2 0.4.0", - "rand 0.7.3", - "rustc-hash", - "sha2 0.9.9", - "thiserror", - "unicode-normalization", - "wasm-bindgen", - "zeroize", -] - -[[package]] -name = "tinyvec" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf8dbc19eb42fba10e8feaaec282fb50e2c14b2726d6301dbfeed0f73306a6f" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" - -[[package]] -name = "toml" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" -dependencies = [ - "serde", -] - -[[package]] -name = "tracing" -version = "0.1.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" -dependencies = [ - "cfg-if", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tracing-core" -version = "0.1.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b7358be39f2f274f322d2aaed611acc57f382e8eb1e5b48cb9ae30933495ce7" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" -dependencies = [ - "lazy_static", - "log", - "tracing-core", -] - -[[package]] -name = "tracing-serde" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb65ea441fbb84f9f6748fd496cf7f63ec9af5bca94dd86456978d055e8eb28b" -dependencies = [ - "serde", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" -dependencies = [ - "ansi_term", - "chrono", - "lazy_static", - "matchers", - "regex", - "serde", - "serde_json", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", - "tracing-serde", -] - -[[package]] -name = "trie-db" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32d034c0d3db64b43c31de38e945f15b40cd4ca6d2dcfc26d4798ce8de4ab83" -dependencies = [ - "hash-db", - "hashbrown", - "log", - "rustc-hex", - "smallvec", -] - -[[package]] -name = "trie-db" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908" -dependencies = [ - "hash-db", - "hashbrown", - "log", - "rustc-hex", - "smallvec", -] - -[[package]] -name = "trie-root" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a36c5ca3911ed3c9a5416ee6c679042064b93fc637ded67e25f92e68d783891" -dependencies = [ - "hash-db", -] - -[[package]] -name = "tt-call" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e66dcbec4290c69dd03c57e76c2469ea5c7ce109c6dd4351c13055cf71ea055" - -[[package]] -name = "twox-hash" -version = "1.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" -dependencies = [ - "cfg-if", - "digest 0.10.3", - "rand 0.8.2", - "static_assertions", -] - -[[package]] -name = "typenum" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" - -[[package]] -name = "uint" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11fe9a9348741cf134085ad57c249508345fe16411b3d7fb4ff2da2f1d6382e" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] - -[[package]] -name = "unicode-ident" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c" - -[[package]] -name = "unicode-normalization" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13e63ab62dbe32aeee58d1c5408d35c36c392bba5d9d3142287219721afe606" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-xid" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "version_check" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c53b543413a17a202f4be280a7e5c62a1c69345f5de525ee64f8cfdbc954994" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5491a68ab4500fa6b4d726bd67408630c3dbe9c4fe7bda16d5c82a1fd8c7340a" -dependencies = [ - "bumpalo", - "lazy_static", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c441e177922bc58f1e12c022624b6216378e5febc2f0533e41ba443d505b80aa" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d94ac45fcf608c1f45ef53e748d35660f168490c10b23704c7779ab8f5c3048" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a89911bd99e5f3659ec4acf9c4d93b0a90fe4a2a11f15328472058edc5261be" - -[[package]] -name = "wasmi" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca00c5147c319a8ec91ec1a0edbec31e566ce2c9cc93b3f9bb86a9efd0eb795d" -dependencies = [ - "downcast-rs", - "libc", - "memory_units", - "num-rational", - "num-traits", - "parity-wasm", - "wasmi-validation", -] - -[[package]] -name = "wasmi-validation" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "165343ecd6c018fc09ebcae280752702c9a2ef3e6f8d02f1cfcbdb53ef6d7937" -dependencies = [ - "parity-wasm", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" -dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", -] - -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.1", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" - -[[package]] -name = "windows_i686_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" - -[[package]] -name = "windows_i686_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" - -[[package]] -name = "wyz" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b31594f29d27036c383b53b59ed3476874d518f0efb151b27a4c275141390e" -dependencies = [ - "tap", -] - -[[package]] -name = "zeroize" -version = "1.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20b578acffd8516a6c3f2a1bdefc1ec37e547bb4e0fb8b6b01a4cafc886b4442" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] diff --git a/fuzz/storage-proof/Cargo.toml b/fuzz/storage-proof/Cargo.toml deleted file mode 100644 index b0d6bdfba500f0fab0e728f47ca0e4df3517f552..0000000000000000000000000000000000000000 --- a/fuzz/storage-proof/Cargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -[package] -name = "storage-proof-fuzzer" -version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2021" -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -honggfuzz = "0.5.54" -log = "0.4.20" -env_logger = "0.10.0" - -# Bridge Dependencies - -bp-runtime = { path = "../../primitives/runtime", features = ["test-helpers"] } - -# Substrate Dependencies - -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-trie = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } diff --git a/fuzz/storage-proof/README.md b/fuzz/storage-proof/README.md deleted file mode 100644 index 1eeec7562a9614bebe9738701e0929852c94ac5c..0000000000000000000000000000000000000000 --- a/fuzz/storage-proof/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# Storage Proof Fuzzer - -## How to run? - -Install dependencies: -``` -$ sudo apt install build-essential binutils-dev libunwind-dev -``` -or on nix: -``` -$ nix-shell -p honggfuzz -``` - -Install `cargo hfuzz` plugin: -``` -$ cargo install honggfuzz -``` - -Run: -``` -$ cargo hfuzz run storage-proof-fuzzer -``` - -Use `HFUZZ_RUN_ARGS` to customize execution: -``` -# 1 second of timeout -# use 12 fuzzing thread -# be verbose -# stop after 1000000 fuzzing iteration -# exit upon crash -HFUZZ_RUN_ARGS="-t 1 -n 12 -v -N 1000000 --exit_upon_crash" cargo hfuzz run example -``` - -More details in the [official documentation](https://docs.rs/honggfuzz/0.5.52/honggfuzz/#about-honggfuzz). diff --git a/fuzz/storage-proof/src/main.rs b/fuzz/storage-proof/src/main.rs deleted file mode 100644 index f884f7b4434b56fefe0a4bc1356b6e7b02174097..0000000000000000000000000000000000000000 --- a/fuzz/storage-proof/src/main.rs +++ /dev/null @@ -1,71 +0,0 @@ -// 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 . - -//! Storage Proof Checker fuzzer. - -#![warn(missing_docs)] - -use honggfuzz::fuzz; -// Logic for checking Substrate storage proofs. - -use bp_runtime::UnverifiedStorageProof; -use sp_core::{storage::StateVersion, Blake2Hasher}; -use sp_std::vec::Vec; -use std::collections::HashMap; - -fn transform_into_unique( - input_vec: Vec<(Vec, Option>)>, -) -> Vec<(Vec, Option>)> { - let mut output_hashmap = HashMap::new(); - let mut output_vec = Vec::new(); - for key_value_pair in input_vec { - output_hashmap.insert(key_value_pair.0, key_value_pair.1); //Only 1 value per key - } - for (key, val) in output_hashmap.iter() { - output_vec.push((key.clone(), val.clone())); - } - output_vec -} - -fn run_fuzzer() { - fuzz!(|input_vec: Vec<(Vec, Option>)>| { - if input_vec.is_empty() { - return - } - let unique_input_vec = transform_into_unique(input_vec); - let (root, storage_proof) = UnverifiedStorageProof::try_from_entries::( - StateVersion::default(), - &unique_input_vec, - ) - .expect("UnverifiedStorageProof::try_from_entries() shouldn't fail"); - let mut storage = storage_proof - .verify::(StateVersion::V1, &root) - .expect("UnverifiedStorageProof::verify() shouldn't fail"); - - for key_value_pair in &unique_input_vec { - log::info!("Reading value for pair {:?}", key_value_pair); - assert_eq!(storage.get(&key_value_pair.0), Ok(&key_value_pair.1)); - } - }) -} - -fn main() { - env_logger::init(); - - loop { - run_fuzzer(); - } -} diff --git a/local.Dockerfile.dockerignore b/local.Dockerfile.dockerignore index 068e4c39b66199118b85e52c3addf779df484460..2b771e7ef6346db5079d1cbfbb78297f235a5666 100644 --- a/local.Dockerfile.dockerignore +++ b/local.Dockerfile.dockerignore @@ -1,6 +1,3 @@ # This file only works for `local.Dockerfile` when docker buildkit is used (see ./scripts/build-containers.sh for details) * -!target/release/millau-bridge-node -!target/release/rialto-bridge-node* -!target/release/rialto-parachain-collator !target/release/substrate-relay diff --git a/modules/beefy/Cargo.toml b/modules/beefy/Cargo.toml index 97fb6c7237e48371e9ae77f9f37baa9ee175b844..9e9a23c2fff7bbc98d86bf6ba454822c1c39ebc8 100644 --- a/modules/beefy/Cargo.toml +++ b/modules/beefy/Cargo.toml @@ -6,8 +6,11 @@ authors = ["Parity Technologies "] edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } +codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } log = { version = "0.4.20", default-features = false } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } serde = { version = "1.0", optional = true } diff --git a/modules/beefy/src/mock.rs b/modules/beefy/src/mock.rs index 3c1c31cb5cac0fc115f2780a3fb9f1746362ffc1..173a48dba62cea5d968dfc30f1e18fbb6a5b2c40 100644 --- a/modules/beefy/src/mock.rs +++ b/modules/beefy/src/mock.rs @@ -24,12 +24,12 @@ use crate::{ use bp_beefy::{BeefyValidatorSignatureOf, ChainWithBeefy, Commitment, MmrDataOrHash}; use bp_runtime::{BasicOperatingMode, Chain, ChainId}; use codec::Encode; -use frame_support::{construct_runtime, parameter_types, traits::ConstU64, weights::Weight}; +use frame_support::{construct_runtime, derive_impl, weights::Weight}; use sp_core::{sr25519::Signature, Pair}; use sp_runtime::{ testing::{Header, H256}, - traits::{BlakeTwo256, Hash, IdentityLookup}, - Perbill, StateVersion, + traits::{BlakeTwo256, Hash}, + StateVersion, }; pub use sp_consensus_beefy::ecdsa_crypto::{AuthorityId as BeefyId, Pair as BeefyPair}; @@ -67,36 +67,9 @@ construct_runtime! { } } -parameter_types! { - pub const MaximumBlockWeight: Weight = Weight::from_parts(1024, 0); - pub const MaximumBlockLength: u32 = 2 * 1024; - pub const AvailableBlockRatio: Perbill = Perbill::one(); -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for TestRuntime { - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; type Block = Block; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = TestAccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = (); - type BlockHashCount = ConstU64<250>; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = (); - type OnNewAccount = (); - type OnKilledAccount = (); - type BaseCallFilter = frame_support::traits::Everything; - type SystemWeightInfo = (); - type DbWeight = (); - type BlockWeights = (); - type BlockLength = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; } impl beefy::Config for TestRuntime { @@ -195,7 +168,7 @@ pub fn validator_ids(index: u32, count: u32) -> Vec { validator_pairs(index, count).into_iter().map(|pair| pair.public()).collect() } -pub fn authority_set_info(id: u64, validators: &Vec) -> TestBridgedAuthoritySetInfo { +pub fn authority_set_info(id: u64, validators: &[BeefyId]) -> TestBridgedAuthoritySetInfo { let merkle_root = get_authorities_mmr_root::(validators.iter()); TestBridgedAuthoritySetInfo { id, len: validators.len() as u32, keyset_commitment: merkle_root } diff --git a/modules/grandpa/Cargo.toml b/modules/grandpa/Cargo.toml index 6569fe9c400b7938b3ba3ec71fd66de21f3977a9..e7e8c5c6fe747d6a255f16ecdf8ca76f7080c923 100644 --- a/modules/grandpa/Cargo.toml +++ b/modules/grandpa/Cargo.toml @@ -6,6 +6,9 @@ authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] @@ -37,7 +40,7 @@ sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } [features] -default = [ "std" ] +default = ["std"] std = [ "bp-header-chain/std", "bp-runtime/std", diff --git a/modules/grandpa/src/benchmarking.rs b/modules/grandpa/src/benchmarking.rs index 438769941f0f049be6ef5e42c487ff6afa7bf391..bf8cbddfcdf5e44bd2e94fb86eda06881d020999 100644 --- a/modules/grandpa/src/benchmarking.rs +++ b/modules/grandpa/src/benchmarking.rs @@ -47,7 +47,7 @@ use bp_test_utils::{ accounts, make_justification_for_header, JustificationGeneratorParams, TEST_GRANDPA_ROUND, TEST_GRANDPA_SET_ID, }; -use frame_benchmarking::{benchmarks_instance_pallet, whitelisted_caller}; +use frame_benchmarking::v2::*; use frame_system::RawOrigin; use sp_consensus_grandpa::AuthorityId; use sp_runtime::traits::{One, Zero}; @@ -116,16 +116,21 @@ fn prepare_benchmark_data, I: 'static>( (header, justification) } -benchmarks_instance_pallet! { - // This is the "gold standard" benchmark for this extrinsic, and it's what should be used to - // annotate the weight in the pallet. - submit_finality_proof { - let p in 1 .. precommits_range_end::(); - let v in MAX_VOTE_ANCESTRIES_RANGE_BEGIN..MAX_VOTE_ANCESTRIES_RANGE_END; +#[instance_benchmarks] +mod benchmarks { + use super::*; + + #[benchmark] + fn submit_finality_proof( + p: Linear<1, { precommits_range_end::() }>, + v: Linear, + ) -> Result<(), BenchmarkError> { let caller: T::AccountId = whitelisted_caller(); let (header, justification) = prepare_benchmark_data::(p, v); - }: submit_finality_proof(RawOrigin::Signed(caller), Box::new(header), justification) - verify { + + #[extrinsic_call] + _(RawOrigin::Signed(caller), Box::new(header), justification); + let genesis_header: BridgedHeader = bp_test_utils::test_header(Zero::zero()); let header: BridgedHeader = bp_test_utils::test_header(One::one()); let expected_hash = header.hash(); @@ -136,7 +141,9 @@ benchmarks_instance_pallet! { // check that the header#0 has been pruned assert!(!>::contains_key(genesis_header.hash())); + + Ok(()) } - impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::TestRuntime) + impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::TestRuntime); } diff --git a/modules/grandpa/src/call_ext.rs b/modules/grandpa/src/call_ext.rs index e33fb0c8245157ff51ff07671c8ea15a8046a31a..cc7339489bc8399cddff71ca0485cdf5944e4652 100644 --- a/modules/grandpa/src/call_ext.rs +++ b/modules/grandpa/src/call_ext.rs @@ -16,7 +16,8 @@ use crate::{weights::WeightInfo, BridgedBlockNumber, BridgedHeader, Config, Error, Pallet}; use bp_header_chain::{ - justification::GrandpaJustification, ChainWithGrandpa, SubmitFinalityProofInfo, + justification::GrandpaJustification, max_expected_submit_finality_proof_arguments_size, + ChainWithGrandpa, GrandpaConsensusLogReader, SubmitFinalityProofInfo, }; use bp_runtime::{BlockNumberOf, OwnedBridgeModule}; use codec::Encode; @@ -145,28 +146,28 @@ pub(crate) fn submit_finality_proof_info_from_args, I: 'static>( Weight::zero() }; + // check if the `finality_target` is a mandatory header. If so, we are ready to refund larger + // size + let is_mandatory_finality_target = + GrandpaConsensusLogReader::>::find_scheduled_change( + finality_target.digest(), + ) + .is_some(); + // we can estimate extra call size easily, without any additional significant overhead let actual_call_size: u32 = finality_target .encoded_size() .saturating_add(justification.encoded_size()) .saturated_into(); - let max_expected_call_size = max_expected_call_size::(required_precommits); + let max_expected_call_size = max_expected_submit_finality_proof_arguments_size::( + is_mandatory_finality_target, + required_precommits, + ); let extra_size = actual_call_size.saturating_sub(max_expected_call_size); SubmitFinalityProofInfo { block_number, extra_weight, extra_size } } -/// Returns maximal expected size of `submit_finality_proof` call arguments. -fn max_expected_call_size, I: 'static>(required_precommits: u32) -> u32 { - let max_expected_justification_size = - GrandpaJustification::>::max_reasonable_size::( - required_precommits, - ); - - // call arguments are header and justification - T::BridgedChain::MAX_HEADER_SIZE.saturating_add(max_expected_justification_size) -} - #[cfg(test)] mod tests { use crate::{ diff --git a/modules/grandpa/src/mock.rs b/modules/grandpa/src/mock.rs index 7d94898c304035df9e152f655605522c7d24bfd6..866e5f95a7c05dc945e1d7dd6a0bf38473a52ed1 100644 --- a/modules/grandpa/src/mock.rs +++ b/modules/grandpa/src/mock.rs @@ -20,16 +20,10 @@ use bp_header_chain::ChainWithGrandpa; use bp_runtime::{Chain, ChainId}; use frame_support::{ - construct_runtime, parameter_types, - traits::{ConstU32, ConstU64, Hooks}, - weights::Weight, + construct_runtime, derive_impl, parameter_types, traits::Hooks, weights::Weight, }; use sp_core::sr25519::Signature; -use sp_runtime::{ - testing::H256, - traits::{BlakeTwo256, IdentityLookup}, - Perbill, StateVersion, -}; +use sp_runtime::StateVersion; pub type AccountId = u64; pub type TestHeader = sp_runtime::testing::Header; @@ -49,43 +43,14 @@ construct_runtime! { } } -parameter_types! { - pub const MaximumBlockWeight: Weight = Weight::from_parts(1024, 0); - pub const MaximumBlockLength: u32 = 2 * 1024; - pub const AvailableBlockRatio: Perbill = Perbill::one(); -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for TestRuntime { - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = AccountId; - type Lookup = IdentityLookup; type Block = Block; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = ConstU64<250>; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = (); - type OnNewAccount = (); - type OnKilledAccount = (); - type BaseCallFilter = frame_support::traits::Everything; - type SystemWeightInfo = (); - type DbWeight = (); - type BlockWeights = (); - type BlockLength = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = ConstU32<16>; } parameter_types! { pub const MaxFreeMandatoryHeadersPerBlock: u32 = 2; pub const HeadersToKeep: u32 = 5; - pub const SessionLength: u64 = 5; - pub const NumValidators: u32 = 5; } impl grandpa::Config for TestRuntime { @@ -126,8 +91,8 @@ impl ChainWithGrandpa for TestBridgedChain { const WITH_CHAIN_GRANDPA_PALLET_NAME: &'static str = ""; const MAX_AUTHORITIES_COUNT: u32 = MAX_BRIDGED_AUTHORITIES; const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = 8; - const MAX_HEADER_SIZE: u32 = 256; - const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = 64; + const MAX_MANDATORY_HEADER_SIZE: u32 = 256; + const AVERAGE_HEADER_SIZE: u32 = 64; } /// Return test externalities to use in tests. diff --git a/modules/grandpa/src/weights.rs b/modules/grandpa/src/weights.rs index 89ed70d13ac3359f23fa6b756d3a8e07ff8b7092..a75e7b5a8e4ada8ce880a040492c904d8035642c 100644 --- a/modules/grandpa/src/weights.rs +++ b/modules/grandpa/src/weights.rs @@ -23,7 +23,7 @@ //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/millau-bridge-node +// target/release/unknown-bridge-node // benchmark // pallet // --chain=dev @@ -58,39 +58,39 @@ pub trait WeightInfo { /// Those weights are test only and must never be used in production. pub struct BridgeWeight(PhantomData); impl WeightInfo for BridgeWeight { - /// Storage: BridgeRialtoGrandpa PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownGrandpa PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa PalletOperatingMode (max_values: Some(1), max_size: Some(1), + /// Proof: BridgeUnknownGrandpa PalletOperatingMode (max_values: Some(1), max_size: Some(1), /// added: 496, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa RequestCount (r:1 w:1) + /// Storage: BridgeUnknownGrandpa RequestCount (r:1 w:1) /// - /// Proof: BridgeRialtoGrandpa RequestCount (max_values: Some(1), max_size: Some(4), added: 499, - /// mode: MaxEncodedLen) + /// Proof: BridgeUnknownGrandpa RequestCount (max_values: Some(1), max_size: Some(4), added: + /// 499, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa BestFinalized (r:1 w:1) + /// Storage: BridgeUnknownGrandpa BestFinalized (r:1 w:1) /// - /// Proof: BridgeRialtoGrandpa BestFinalized (max_values: Some(1), max_size: Some(36), added: + /// Proof: BridgeUnknownGrandpa BestFinalized (max_values: Some(1), max_size: Some(36), added: /// 531, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa CurrentAuthoritySet (r:1 w:0) + /// Storage: BridgeUnknownGrandpa CurrentAuthoritySet (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa CurrentAuthoritySet (max_values: Some(1), max_size: Some(209), + /// Proof: BridgeUnknownGrandpa CurrentAuthoritySet (max_values: Some(1), max_size: Some(209), /// added: 704, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHashesPointer (r:1 w:1) + /// Storage: BridgeUnknownGrandpa ImportedHashesPointer (r:1 w:1) /// - /// Proof: BridgeRialtoGrandpa ImportedHashesPointer (max_values: Some(1), max_size: Some(4), + /// Proof: BridgeUnknownGrandpa ImportedHashesPointer (max_values: Some(1), max_size: Some(4), /// added: 499, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHashes (r:1 w:1) + /// Storage: BridgeUnknownGrandpa ImportedHashes (r:1 w:1) /// - /// Proof: BridgeRialtoGrandpa ImportedHashes (max_values: Some(14400), max_size: Some(36), + /// Proof: BridgeUnknownGrandpa ImportedHashes (max_values: Some(14400), max_size: Some(36), /// added: 2016, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:0 w:2) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:0 w:2) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// /// The range of component `p` is `[1, 4]`. @@ -113,39 +113,39 @@ impl WeightInfo for BridgeWeight { // For backwards compatibility and tests impl WeightInfo for () { - /// Storage: BridgeRialtoGrandpa PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownGrandpa PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa PalletOperatingMode (max_values: Some(1), max_size: Some(1), + /// Proof: BridgeUnknownGrandpa PalletOperatingMode (max_values: Some(1), max_size: Some(1), /// added: 496, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa RequestCount (r:1 w:1) + /// Storage: BridgeUnknownGrandpa RequestCount (r:1 w:1) /// - /// Proof: BridgeRialtoGrandpa RequestCount (max_values: Some(1), max_size: Some(4), added: 499, - /// mode: MaxEncodedLen) + /// Proof: BridgeUnknownGrandpa RequestCount (max_values: Some(1), max_size: Some(4), added: + /// 499, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa BestFinalized (r:1 w:1) + /// Storage: BridgeUnknownGrandpa BestFinalized (r:1 w:1) /// - /// Proof: BridgeRialtoGrandpa BestFinalized (max_values: Some(1), max_size: Some(36), added: + /// Proof: BridgeUnknownGrandpa BestFinalized (max_values: Some(1), max_size: Some(36), added: /// 531, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa CurrentAuthoritySet (r:1 w:0) + /// Storage: BridgeUnknownGrandpa CurrentAuthoritySet (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa CurrentAuthoritySet (max_values: Some(1), max_size: Some(209), + /// Proof: BridgeUnknownGrandpa CurrentAuthoritySet (max_values: Some(1), max_size: Some(209), /// added: 704, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHashesPointer (r:1 w:1) + /// Storage: BridgeUnknownGrandpa ImportedHashesPointer (r:1 w:1) /// - /// Proof: BridgeRialtoGrandpa ImportedHashesPointer (max_values: Some(1), max_size: Some(4), + /// Proof: BridgeUnknownGrandpa ImportedHashesPointer (max_values: Some(1), max_size: Some(4), /// added: 499, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHashes (r:1 w:1) + /// Storage: BridgeUnknownGrandpa ImportedHashes (r:1 w:1) /// - /// Proof: BridgeRialtoGrandpa ImportedHashes (max_values: Some(14400), max_size: Some(36), + /// Proof: BridgeUnknownGrandpa ImportedHashes (max_values: Some(14400), max_size: Some(36), /// added: 2016, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:0 w:2) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:0 w:2) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// /// The range of component `p` is `[1, 4]`. diff --git a/modules/messages/Cargo.toml b/modules/messages/Cargo.toml index e03326b3b0bbc8539d3db8734a48e3b3fd969a5c..6bea719c7e741083b9156c8dc7e88cde4b5a551c 100644 --- a/modules/messages/Cargo.toml +++ b/modules/messages/Cargo.toml @@ -6,6 +6,9 @@ authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } log = { version = "0.4.20", default-features = false } @@ -23,7 +26,6 @@ bp-runtime = { path = "../../primitives/runtime", default-features = false } frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false, optional = true } frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } sp-trie = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false, optional = true } @@ -37,7 +39,7 @@ sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" sp-trie = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } [features] -default = [ "std" ] +default = ["std"] std = [ "bp-header-chain/std", "bp-messages/std", @@ -49,7 +51,6 @@ std = [ "log/std", "num-traits/std", "scale-info/std", - "sp-core/std", "sp-runtime/std", "sp-std/std", "sp-trie/std", diff --git a/modules/messages/src/benchmarking.rs b/modules/messages/src/benchmarking.rs index aead7d60323d3015c2d20a2896a67976f881d0bd..4914b6a21f609a333caadb4d7f67d96f44ab89cd 100644 --- a/modules/messages/src/benchmarking.rs +++ b/modules/messages/src/benchmarking.rs @@ -34,7 +34,7 @@ use codec::Decode; use frame_benchmarking::{account, v2::*}; use frame_support::weights::Weight; use frame_system::RawOrigin; -use sp_runtime::traits::TrailingZeroInput; +use sp_runtime::{traits::TrailingZeroInput, BoundedVec}; use sp_std::{ops::RangeInclusive, prelude::*}; const SEED: u32 = 0; @@ -121,7 +121,7 @@ fn send_regular_message, I: 'static>() { ); let mut outbound_lane = active_outbound_lane::(T::bench_lane_id()).unwrap(); - outbound_lane.send_message(vec![]).expect("We craft valid messages"); + outbound_lane.send_message(BoundedVec::try_from(vec![]).expect("We craft valid messages")); } fn receive_messages, I: 'static>(nonce: MessageNonce) { diff --git a/modules/messages/src/lanes_manager.rs b/modules/messages/src/lanes_manager.rs index a112b93d2d9aa7aa7cf4803977edf079b0667282..eb455676d9fa12576dde4fa2fc0448d17e216e29 100644 --- a/modules/messages/src/lanes_manager.rs +++ b/modules/messages/src/lanes_manager.rs @@ -22,7 +22,7 @@ use crate::{ use bp_messages::{ target_chain::MessageDispatch, ChainWithMessages, InboundLaneData, LaneId, LaneState, - MessageKey, MessageNonce, MessagePayload, OutboundLaneData, VerificationError, + MessageKey, MessageNonce, OutboundLaneData, }; use bp_runtime::AccountIdOf; use codec::{Decode, Encode, MaxEncodedLen}; @@ -230,6 +230,7 @@ impl, I: 'static> InboundLaneStorage for RuntimeInboundLaneStorage< } /// Runtime outbound lane storage. +#[derive(Debug, PartialEq, Eq)] pub struct RuntimeOutboundLaneStorage { pub(crate) lane_id: LaneId, pub(crate) cached_data: OutboundLaneData, @@ -250,6 +251,8 @@ impl, I: 'static> RuntimeOutboundLaneStorage { } impl, I: 'static> OutboundLaneStorage for RuntimeOutboundLaneStorage { + type StoredMessagePayload = StoredMessagePayload; + fn id(&self) -> LaneId { self.lane_id } @@ -264,22 +267,15 @@ impl, I: 'static> OutboundLaneStorage for RuntimeOutboundLaneStorag } #[cfg(test)] - fn message(&self, nonce: &MessageNonce) -> Option { + fn message(&self, nonce: &MessageNonce) -> Option { OutboundMessages::::get(MessageKey { lane_id: self.lane_id, nonce: *nonce }) - .map(Into::into) } - fn save_message( - &mut self, - nonce: MessageNonce, - message_payload: MessagePayload, - ) -> Result<(), VerificationError> { + fn save_message(&mut self, nonce: MessageNonce, message_payload: Self::StoredMessagePayload) { OutboundMessages::::insert( MessageKey { lane_id: self.lane_id, nonce }, - StoredMessagePayload::::try_from(message_payload) - .map_err(|_| VerificationError::MessageTooLarge)?, + message_payload, ); - Ok(()) } fn remove_message(&mut self, nonce: &MessageNonce) { diff --git a/modules/messages/src/lib.rs b/modules/messages/src/lib.rs index eabb3f5d78767cb14d78d772dc49900d0a7179cb..eb1b173c2f2f537be6c9c3bd11a9be44a9b75558 100644 --- a/modules/messages/src/lib.rs +++ b/modules/messages/src/lib.rs @@ -467,6 +467,7 @@ pub mod pallet { } #[pallet::error] + #[derive(PartialEq, Eq)] pub enum Error { /// Pallet is not in Normal operating mode. NotOperatingNormally, @@ -590,67 +591,71 @@ pub mod pallet { } } +/// Structure, containing a validated message payload and all the info required +/// to send it on the bridge. +#[derive(Debug, PartialEq, Eq)] +pub struct SendMessageArgs, I: 'static> { + lane_id: LaneId, + lane: OutboundLane>, + payload: StoredMessagePayload, +} + impl bp_messages::source_chain::MessagesBridge for Pallet where T: Config, I: 'static, { - type Error = sp_runtime::DispatchErrorWithPostInfo; - - fn send_message( - lane: LaneId, - message: T::OutboundPayload, - ) -> Result { - crate::send_message::(lane, message) + type Error = Error; + type SendMessageArgs = SendMessageArgs; + + fn validate_message( + lane_id: LaneId, + message: &T::OutboundPayload, + ) -> Result, Self::Error> { + // IMPORTANT: any error that is returned here is fatal for the bridge, because + // this code is executed at the bridge hub and message sender actually lives + // at some sibling parachain. So we are failing **after** the message has been + // sent and we can't report it back to sender (unless error report mechanism is + // embedded into message and its dispatcher). + + // apart from maximal message size check (see below), we should also check the message + // dispatch weight here. But we assume that the bridged chain will just push the message + // to some queue (XCMP, UMP, DMP), so the weight is constant and fits the block. + + // we can't accept any messages if the pallet is halted + ensure_normal_operating_mode::()?; + + let lane = active_outbound_lane::(lane_id)?; + + Ok(SendMessageArgs { + lane_id, + lane, + payload: StoredMessagePayload::::try_from(message.encode()).map_err(|_| { + Error::::MessageRejectedByPallet(VerificationError::MessageTooLarge) + })?, + }) } -} -/// Function that actually sends message. -fn send_message, I: 'static>( - lane_id: LaneId, - payload: T::OutboundPayload, -) -> sp_std::result::Result< - SendMessageArtifacts, - sp_runtime::DispatchErrorWithPostInfo, -> { - // IMPORTANT: any error that is returned here is fatal for the bridge, because - // this code is executed at the bridge hub and message sender actually lives - // at some sibling parachain. So we are failing **after** the message has been - // sent and we can't report it back to sender (unless error report mechanism is - // embedded into message and its dispatcher). - - // apart from maximal message size check (see below), we should also check the message - // dispatch weight here. But we assume that the bridged chain will just push the message - // to some queue (XCMP, UMP, DMP), so the weight is constant and fits the block. - - // we can't accept any messages if the pallet is halted - ensure_normal_operating_mode::()?; - - // finally, save message in outbound storage and emit event - let mut lane = active_outbound_lane::(lane_id)?; - let encoded_payload = payload.encode(); - let encoded_payload_len = encoded_payload.len(); - - // the message size is checked by the `send_message` method, so we don't need to repeat - // it here - let nonce = lane - .send_message(encoded_payload) - .map_err(Error::::MessageRejectedByPallet)?; - - // return number of messages in the queue to let sender know about its state - let enqueued_messages = lane.queued_messages().saturating_len(); - - log::trace!( - target: LOG_TARGET, - "Accepted message {} to lane {:?}. Message size: {:?}", - nonce, - lane_id, - encoded_payload_len, - ); - - Pallet::::deposit_event(Event::MessageAccepted { lane_id, nonce }); - - Ok(SendMessageArtifacts { nonce, enqueued_messages }) + fn send_message(mut args: SendMessageArgs) -> SendMessageArtifacts { + // save message in outbound storage and emit event + let message_len = args.payload.len(); + let nonce = args.lane.send_message(args.payload); + + // return number of messages in the queue to let sender know about its state + let enqueued_messages = args.lane.queued_messages().saturating_len(); + + log::trace!( + target: LOG_TARGET, + "Accepted message {} to lane {:?}. Message size: {:?}", + nonce, + args.lane_id, + message_len, + ); + + Pallet::::deposit_event(Event::MessageAccepted { lane_id: args.lane_id, nonce }); + + SendMessageArtifacts { nonce, enqueued_messages } + } } /// Ensure that the pallet is in normal operational mode. diff --git a/modules/messages/src/outbound_lane.rs b/modules/messages/src/outbound_lane.rs index 0456e375b101ed98c9aafff418789d0a6c2217ce..ff81bcad170ff8e381501fdbccf82e6a881c08ef 100644 --- a/modules/messages/src/outbound_lane.rs +++ b/modules/messages/src/outbound_lane.rs @@ -19,8 +19,7 @@ use crate::{Config, LOG_TARGET}; use bp_messages::{ - ChainWithMessages, LaneId, LaneState, MessageNonce, MessagePayload, OutboundLaneData, - UnrewardedRelayer, VerificationError, + ChainWithMessages, LaneId, LaneState, MessageNonce, OutboundLaneData, UnrewardedRelayer, }; use bp_runtime::RangeInclusiveExt; use codec::{Decode, Encode}; @@ -31,6 +30,9 @@ use sp_std::{collections::vec_deque::VecDeque, marker::PhantomData, ops::RangeIn /// Outbound lane storage. pub trait OutboundLaneStorage { + /// The form under which the message payload is kept in storage. + type StoredMessagePayload; + /// Lane id. fn id(&self) -> LaneId; /// Get lane data from the storage. @@ -39,13 +41,9 @@ pub trait OutboundLaneStorage { fn set_data(&mut self, data: OutboundLaneData); /// Returns saved outbound message payload. #[cfg(test)] - fn message(&self, nonce: &MessageNonce) -> Option; + fn message(&self, nonce: &MessageNonce) -> Option; /// Save outbound message in the storage. - fn save_message( - &mut self, - nonce: MessageNonce, - message_payload: MessagePayload, - ) -> Result<(), VerificationError>; + fn save_message(&mut self, nonce: MessageNonce, message_payload: Self::StoredMessagePayload); /// Remove outbound message from the storage. fn remove_message(&mut self, nonce: &MessageNonce); /// Purge lane data from the storage. @@ -81,6 +79,7 @@ pub enum ReceivalConfirmationError { } /// Outbound messages lane. +#[derive(Debug, PartialEq, Eq)] pub struct OutboundLane { storage: S, } @@ -118,18 +117,15 @@ impl OutboundLane { /// Send message over lane. /// /// Returns new message nonce. - pub fn send_message( - &mut self, - message_payload: MessagePayload, - ) -> Result { + pub fn send_message(&mut self, message_payload: S::StoredMessagePayload) -> MessageNonce { let mut data = self.storage.data(); let nonce = data.latest_generated_nonce + 1; data.latest_generated_nonce = nonce; - self.storage.save_message(nonce, message_payload)?; + self.storage.save_message(nonce, message_payload); self.storage.set_data(data); - Ok(nonce) + nonce } /// Confirm messages delivery. @@ -227,7 +223,6 @@ fn ensure_unrewarded_relayers_are_correct( mod tests { use super::*; use crate::{active_outbound_lane, tests::mock::*}; - use frame_support::assert_ok; use sp_std::ops::RangeInclusive; fn unrewarded_relayers( @@ -244,9 +239,9 @@ mod tests { ) -> Result>, ReceivalConfirmationError> { run_test(|| { let mut lane = active_outbound_lane::(test_lane_id()).unwrap(); - assert_ok!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD))); - assert_ok!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD))); - assert_ok!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD))); + lane.send_message(outbound_message_data(REGULAR_PAYLOAD)); + lane.send_message(outbound_message_data(REGULAR_PAYLOAD)); + lane.send_message(outbound_message_data(REGULAR_PAYLOAD)); assert_eq!(lane.storage.data().latest_generated_nonce, 3); assert_eq!(lane.storage.data().latest_received_nonce, 0); let result = lane.confirm_delivery(3, latest_received_nonce, relayers); @@ -261,7 +256,7 @@ mod tests { run_test(|| { let mut lane = active_outbound_lane::(test_lane_id()).unwrap(); assert_eq!(lane.storage.data().latest_generated_nonce, 0); - assert_eq!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD)), Ok(1)); + assert_eq!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD)), 1); assert!(lane.storage.message(&1).is_some()); assert_eq!(lane.storage.data().latest_generated_nonce, 1); }); @@ -271,9 +266,9 @@ mod tests { fn confirm_delivery_works() { run_test(|| { let mut lane = active_outbound_lane::(test_lane_id()).unwrap(); - assert_eq!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD)), Ok(1)); - assert_eq!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD)), Ok(2)); - assert_eq!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD)), Ok(3)); + assert_eq!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD)), 1); + assert_eq!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD)), 2); + assert_eq!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD)), 3); assert_eq!(lane.storage.data().latest_generated_nonce, 3); assert_eq!(lane.storage.data().latest_received_nonce, 0); assert_eq!(lane.storage.data().oldest_unpruned_nonce, 1); @@ -288,9 +283,9 @@ mod tests { fn confirm_partial_delivery_works() { run_test(|| { let mut lane = active_outbound_lane::(test_lane_id()).unwrap(); - assert_eq!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD)), Ok(1)); - assert_eq!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD)), Ok(2)); - assert_eq!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD)), Ok(3)); + assert_eq!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD)), 1); + assert_eq!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD)), 2); + assert_eq!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD)), 3); assert_eq!(lane.storage.data().latest_generated_nonce, 3); assert_eq!(lane.storage.data().latest_received_nonce, 0); assert_eq!(lane.storage.data().oldest_unpruned_nonce, 1); @@ -311,9 +306,9 @@ mod tests { fn confirm_delivery_rejects_nonce_lesser_than_latest_received() { run_test(|| { let mut lane = active_outbound_lane::(test_lane_id()).unwrap(); - assert_ok!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD))); - assert_ok!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD))); - assert_ok!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD))); + lane.send_message(outbound_message_data(REGULAR_PAYLOAD)); + lane.send_message(outbound_message_data(REGULAR_PAYLOAD)); + lane.send_message(outbound_message_data(REGULAR_PAYLOAD)); assert_eq!(lane.storage.data().latest_generated_nonce, 3); assert_eq!(lane.storage.data().latest_received_nonce, 0); assert_eq!(lane.storage.data().oldest_unpruned_nonce, 1); @@ -388,9 +383,9 @@ mod tests { fn confirm_delivery_detects_when_more_than_expected_messages_are_confirmed() { run_test(|| { let mut lane = active_outbound_lane::(test_lane_id()).unwrap(); - assert_ok!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD))); - assert_ok!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD))); - assert_ok!(lane.send_message(outbound_message_data(REGULAR_PAYLOAD))); + lane.send_message(outbound_message_data(REGULAR_PAYLOAD)); + lane.send_message(outbound_message_data(REGULAR_PAYLOAD)); + lane.send_message(outbound_message_data(REGULAR_PAYLOAD)); assert_eq!( lane.confirm_delivery(0, 3, &unrewarded_relayers(1..=3)), Err(ReceivalConfirmationError::TryingToConfirmMoreMessagesThanExpected), diff --git a/modules/messages/src/tests/mock.rs b/modules/messages/src/tests/mock.rs index 1392039656d9298d5d73063bb5879b7b5366b0e8..3ce7d31ab516a1f41bc063cb067be44fc85dddbd 100644 --- a/modules/messages/src/tests/mock.rs +++ b/modules/messages/src/tests/mock.rs @@ -22,7 +22,7 @@ use crate::{ encode_all_messages, encode_lane_data, prepare_message_delivery_storage_proof, prepare_messages_storage_proof, }, - Config, + Config, StoredMessagePayload, }; use bp_header_chain::{ChainWithGrandpa, StoredHeaderData}; @@ -34,7 +34,7 @@ use bp_messages::{ MessageDispatch, }, ChainWithMessages, DeliveredMessages, InboundLaneData, LaneId, LaneState, Message, MessageKey, - MessageNonce, MessagePayload, OutboundLaneData, RelayerRewardAtSource, UnrewardedRelayer, + MessageNonce, OutboundLaneData, RelayerRewardAtSource, UnrewardedRelayer, UnrewardedRelayersState, }; use bp_runtime::{ @@ -42,16 +42,14 @@ use bp_runtime::{ }; use codec::{Decode, Encode}; use frame_support::{ - parameter_types, - traits::ConstU64, + derive_impl, weights::{constants::RocksDbWeight, Weight}, }; use scale_info::TypeInfo; -use sp_core::H256; use sp_runtime::{ - testing::Header as SubstrateHeader, - traits::{BlakeTwo256, ConstU32, IdentityLookup}, - BuildStorage, Perbill, StateVersion, + testing::{Header as SubstrateHeader, H256}, + traits::{BlakeTwo256, ConstU32}, + BuildStorage, StateVersion, }; use std::{collections::VecDeque, ops::RangeInclusive}; @@ -136,8 +134,8 @@ impl ChainWithGrandpa for BridgedChain { const WITH_CHAIN_GRANDPA_PALLET_NAME: &'static str = "WithBridgedChainBridgeGrandpa"; const MAX_AUTHORITIES_COUNT: u32 = 16; const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = 4; - const MAX_HEADER_SIZE: u32 = 4096; - const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = 4096; + const AVERAGE_HEADER_SIZE: u32 = 4096; + const MAX_MANDATORY_HEADER_SIZE: u32 = 8192; } impl ChainWithMessages for BridgedChain { @@ -161,55 +159,19 @@ frame_support::construct_runtime! { } } -parameter_types! { - pub const BlockHashCount: u64 = 250; - pub const MaximumBlockWeight: Weight = Weight::from_parts(1024, 0); - pub const MaximumBlockLength: u32 = 2 * 1024; - pub const AvailableBlockRatio: Perbill = Perbill::one(); -} - pub type DbWeight = RocksDbWeight; +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for TestRuntime { - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = AccountId; - type Lookup = IdentityLookup; type Block = Block; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = ConstU64<250>; - type Version = (); - type PalletInfo = PalletInfo; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type BaseCallFilter = frame_support::traits::Everything; - type SystemWeightInfo = (); - type BlockWeights = (); - type BlockLength = (); type DbWeight = DbWeight; - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for TestRuntime { - type MaxLocks = (); - type Balance = Balance; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ConstU64<1>; - type AccountStore = frame_system::Pallet; - type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type RuntimeHoldReason = RuntimeHoldReason; - type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; - type MaxFreezes = ConstU32<0>; + type ReserveIdentifier = [u8; 8]; + type AccountStore = System; } impl pallet_bridge_grandpa::Config for TestRuntime { @@ -446,8 +408,8 @@ pub fn message(nonce: MessageNonce, payload: TestPayload) -> Message { } /// Return valid outbound message data, constructed from given payload. -pub fn outbound_message_data(payload: TestPayload) -> MessagePayload { - payload.encode() +pub fn outbound_message_data(payload: TestPayload) -> StoredMessagePayload { + StoredMessagePayload::::try_from(payload.encode()).expect("payload too large") } /// Return valid inbound (dispatch) message data, constructed from given payload. diff --git a/modules/messages/src/tests/pallet_tests.rs b/modules/messages/src/tests/pallet_tests.rs index da81b9380faa866584b2c3210163968f937cdb3a..d53c37423a2639a4f5f91fd819bdfc2f29f596f8 100644 --- a/modules/messages/src/tests/pallet_tests.rs +++ b/modules/messages/src/tests/pallet_tests.rs @@ -18,14 +18,13 @@ use crate::{ active_outbound_lane, lanes_manager::RuntimeInboundLaneStorage, - outbound_lane::ReceivalConfirmationError, send_message, tests::mock::*, - weights_ext::WeightInfoExt, Call, Config, Error, Event, InboundLanes, LanesManagerError, - OutboundLanes, OutboundMessages, Pallet, PalletOperatingMode, PalletOwner, - StoredInboundLaneData, + outbound_lane::ReceivalConfirmationError, tests::mock::*, weights_ext::WeightInfoExt, Call, + Config, Error, Event, InboundLanes, LanesManagerError, OutboundLanes, OutboundMessages, Pallet, + PalletOperatingMode, PalletOwner, StoredInboundLaneData, }; use bp_messages::{ - source_chain::FromBridgedChainMessagesDeliveryProof, + source_chain::{FromBridgedChainMessagesDeliveryProof, MessagesBridge}, target_chain::{FromBridgedChainMessagesProof, MessageDispatch}, BridgeMessagesCall, ChainWithMessages, DeliveredMessages, InboundLaneData, InboundMessageDetails, LaneId, LaneState, MessageKey, MessageNonce, MessagesOperatingMode, @@ -49,7 +48,7 @@ fn get_ready_for_events() { System::::reset_events(); } -fn send_regular_message() { +fn send_regular_message(lane_id: LaneId) { get_ready_for_events(); let message_nonce = active_outbound_lane::(test_lane_id()) @@ -57,18 +56,16 @@ fn send_regular_message() { .data() .latest_generated_nonce + 1; - send_message::(test_lane_id(), REGULAR_PAYLOAD) - .expect("send_message has failed"); + let valid_message = Pallet::::validate_message(lane_id, ®ULAR_PAYLOAD) + .expect("validate_message has failed"); + Pallet::::send_message(valid_message); // check event with assigned nonce assert_eq!( System::::events(), vec![EventRecord { phase: Phase::Initialization, - event: TestEvent::Messages(Event::MessageAccepted { - lane_id: test_lane_id(), - nonce: message_nonce - }), + event: TestEvent::Messages(Event::MessageAccepted { lane_id, nonce: message_nonce }), topics: vec![], }], ); @@ -118,14 +115,14 @@ fn receive_messages_delivery_proof() { fn pallet_rejects_transactions_if_halted() { run_test(|| { // send message first to be able to check that delivery_proof fails later - send_regular_message(); + send_regular_message(test_lane_id()); PalletOperatingMode::::put(MessagesOperatingMode::Basic( BasicOperatingMode::Halted, )); assert_noop!( - send_message::(test_lane_id(), REGULAR_PAYLOAD,), + Pallet::::validate_message(test_lane_id(), ®ULAR_PAYLOAD), Error::::NotOperatingNormally, ); @@ -169,14 +166,14 @@ fn pallet_rejects_transactions_if_halted() { fn pallet_rejects_new_messages_in_rejecting_outbound_messages_operating_mode() { run_test(|| { // send message first to be able to check that delivery_proof fails later - send_regular_message(); + send_regular_message(test_lane_id()); PalletOperatingMode::::put( MessagesOperatingMode::RejectingOutboundMessages, ); assert_noop!( - send_message::(test_lane_id(), REGULAR_PAYLOAD,), + Pallet::::validate_message(test_lane_id(), ®ULAR_PAYLOAD,), Error::::NotOperatingNormally, ); @@ -211,7 +208,7 @@ fn pallet_rejects_new_messages_in_rejecting_outbound_messages_operating_mode() { #[test] fn send_message_works() { run_test(|| { - send_regular_message(); + send_regular_message(test_lane_id()); }); } @@ -226,7 +223,7 @@ fn send_message_rejects_too_large_message() { .extra .extend_from_slice(&vec![0u8; max_outbound_payload_size as usize]); assert_noop!( - send_message::(test_lane_id(), message_payload.clone(),), + Pallet::::validate_message(test_lane_id(), &message_payload.clone(),), Error::::MessageRejectedByPallet(VerificationError::MessageTooLarge), ); @@ -235,7 +232,10 @@ fn send_message_rejects_too_large_message() { message_payload.extra.pop(); } assert_eq!(message_payload.encoded_size() as u32, max_outbound_payload_size); - assert_ok!(send_message::(test_lane_id(), message_payload,),); + let send_message_args = + Pallet::::validate_message(test_lane_id(), &message_payload) + .expect("validate_message has failed"); + Pallet::::send_message(send_message_args); }) } @@ -476,7 +476,7 @@ fn receive_messages_proof_rejects_proof_with_too_many_messages() { #[test] fn receive_messages_delivery_proof_works() { run_test(|| { - send_regular_message(); + send_regular_message(test_lane_id()); receive_messages_delivery_proof(); assert_eq!( @@ -491,7 +491,7 @@ fn receive_messages_delivery_proof_works() { #[test] fn receive_messages_delivery_proof_works_on_closed_outbound_lanes() { run_test(|| { - send_regular_message(); + send_regular_message(test_lane_id()); active_outbound_lane::(test_lane_id()) .unwrap() .set_state(LaneState::Closed); @@ -509,8 +509,8 @@ fn receive_messages_delivery_proof_works_on_closed_outbound_lanes() { #[test] fn receive_messages_delivery_proof_rewards_relayers() { run_test(|| { - assert_ok!(send_message::(test_lane_id(), REGULAR_PAYLOAD,)); - assert_ok!(send_message::(test_lane_id(), REGULAR_PAYLOAD,)); + send_regular_message(test_lane_id()); + send_regular_message(test_lane_id()); // this reports delivery of message 1 => reward is paid to TEST_RELAYER_A let single_message_delivery_proof = prepare_messages_delivery_proof( @@ -921,7 +921,7 @@ fn receive_messages_delivery_proof_rejects_proof_if_trying_to_confirm_more_messa { run_test(|| { // send message first to be able to check that delivery_proof fails later - send_regular_message(); + send_regular_message(test_lane_id()); // 1) InboundLaneData declares that the `last_confirmed_nonce` is 1; // 2) InboundLaneData has no entries => `InboundLaneData::last_delivered_nonce()` returns @@ -1109,12 +1109,12 @@ fn inbound_storage_extra_proof_size_bytes_works() { fn send_messages_fails_if_outbound_lane_is_not_opened() { run_test(|| { assert_noop!( - send_message::(unknown_lane_id(), REGULAR_PAYLOAD), + Pallet::::validate_message(unknown_lane_id(), ®ULAR_PAYLOAD), Error::::LanesManager(LanesManagerError::UnknownOutboundLane), ); assert_noop!( - send_message::(closed_lane_id(), REGULAR_PAYLOAD), + Pallet::::validate_message(closed_lane_id(), ®ULAR_PAYLOAD), Error::::LanesManager(LanesManagerError::ClosedOutboundLane), ); }); diff --git a/modules/messages/src/weights.rs b/modules/messages/src/weights.rs index 4375ea63420d49870da1705ae4a58d901a916433..c16e4b89504249dcb4b124b92fc923826cbcf467 100644 --- a/modules/messages/src/weights.rs +++ b/modules/messages/src/weights.rs @@ -23,7 +23,7 @@ //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/millau-bridge-node +// target/release/unknown-bridge-node // benchmark // pallet // --chain=dev @@ -65,19 +65,19 @@ pub trait WeightInfo { /// Those weights are test only and must never be used in production. pub struct BridgeWeight(PhantomData); impl WeightInfo for BridgeWeight { - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownMessages PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), + /// Proof: BridgeUnknownMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), /// added: 497, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages InboundLanes (r:1 w:1) + /// Storage: BridgeUnknownMessages InboundLanes (r:1 w:1) /// - /// Proof: BridgeRialtoMessages InboundLanes (max_values: None, max_size: Some(49208), added: + /// Proof: BridgeUnknownMessages InboundLanes (max_values: None, max_size: Some(49208), added: /// 51683, mode: MaxEncodedLen) fn receive_single_message_proof() -> Weight { // Proof Size summary in bytes: @@ -88,19 +88,19 @@ impl WeightInfo for BridgeWeight { .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownMessages PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), + /// Proof: BridgeUnknownMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), /// added: 497, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages InboundLanes (r:1 w:1) + /// Storage: BridgeUnknownMessages InboundLanes (r:1 w:1) /// - /// Proof: BridgeRialtoMessages InboundLanes (max_values: None, max_size: Some(49208), added: + /// Proof: BridgeUnknownMessages InboundLanes (max_values: None, max_size: Some(49208), added: /// 51683, mode: MaxEncodedLen) /// /// The range of component `n` is `[1, 1004]`. @@ -117,19 +117,19 @@ impl WeightInfo for BridgeWeight { .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownMessages PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), + /// Proof: BridgeUnknownMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), /// added: 497, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages InboundLanes (r:1 w:1) + /// Storage: BridgeUnknownMessages InboundLanes (r:1 w:1) /// - /// Proof: BridgeRialtoMessages InboundLanes (max_values: None, max_size: Some(49208), added: + /// Proof: BridgeUnknownMessages InboundLanes (max_values: None, max_size: Some(49208), added: /// 51683, mode: MaxEncodedLen) fn receive_single_message_proof_with_outbound_lane_state() -> Weight { // Proof Size summary in bytes: @@ -140,19 +140,19 @@ impl WeightInfo for BridgeWeight { .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownMessages PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), + /// Proof: BridgeUnknownMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), /// added: 497, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages InboundLanes (r:1 w:1) + /// Storage: BridgeUnknownMessages InboundLanes (r:1 w:1) /// - /// Proof: BridgeRialtoMessages InboundLanes (max_values: None, max_size: Some(49208), added: + /// Proof: BridgeUnknownMessages InboundLanes (max_values: None, max_size: Some(49208), added: /// 51683, mode: MaxEncodedLen) /// /// The range of component `n` is `[1, 16384]`. @@ -169,19 +169,19 @@ impl WeightInfo for BridgeWeight { .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownMessages PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), + /// Proof: BridgeUnknownMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), /// added: 497, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages OutboundLanes (r:1 w:1) + /// Storage: BridgeUnknownMessages OutboundLanes (r:1 w:1) /// - /// Proof: BridgeRialtoMessages OutboundLanes (max_values: None, max_size: Some(73), added: + /// Proof: BridgeUnknownMessages OutboundLanes (max_values: None, max_size: Some(73), added: /// 2548, mode: MaxEncodedLen) /// /// Storage: BridgeRelayers RelayerRewards (r:1 w:1) @@ -189,9 +189,9 @@ impl WeightInfo for BridgeWeight { /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(93), added: 2568, /// mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages OutboundMessages (r:0 w:1) + /// Storage: BridgeUnknownMessages OutboundMessages (r:0 w:1) /// - /// Proof: BridgeRialtoMessages OutboundMessages (max_values: None, max_size: Some(65596), + /// Proof: BridgeUnknownMessages OutboundMessages (max_values: None, max_size: Some(65596), /// added: 68071, mode: MaxEncodedLen) fn receive_delivery_proof_for_single_message() -> Weight { // Proof Size summary in bytes: @@ -202,19 +202,19 @@ impl WeightInfo for BridgeWeight { .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownMessages PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), + /// Proof: BridgeUnknownMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), /// added: 497, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages OutboundLanes (r:1 w:1) + /// Storage: BridgeUnknownMessages OutboundLanes (r:1 w:1) /// - /// Proof: BridgeRialtoMessages OutboundLanes (max_values: None, max_size: Some(73), added: + /// Proof: BridgeUnknownMessages OutboundLanes (max_values: None, max_size: Some(73), added: /// 2548, mode: MaxEncodedLen) /// /// Storage: BridgeRelayers RelayerRewards (r:1 w:1) @@ -222,9 +222,9 @@ impl WeightInfo for BridgeWeight { /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(93), added: 2568, /// mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages OutboundMessages (r:0 w:2) + /// Storage: BridgeUnknownMessages OutboundMessages (r:0 w:2) /// - /// Proof: BridgeRialtoMessages OutboundMessages (max_values: None, max_size: Some(65596), + /// Proof: BridgeUnknownMessages OutboundMessages (max_values: None, max_size: Some(65596), /// added: 68071, mode: MaxEncodedLen) fn receive_delivery_proof_for_two_messages_by_single_relayer() -> Weight { // Proof Size summary in bytes: @@ -235,19 +235,19 @@ impl WeightInfo for BridgeWeight { .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownMessages PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), + /// Proof: BridgeUnknownMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), /// added: 497, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages OutboundLanes (r:1 w:1) + /// Storage: BridgeUnknownMessages OutboundLanes (r:1 w:1) /// - /// Proof: BridgeRialtoMessages OutboundLanes (max_values: None, max_size: Some(73), added: + /// Proof: BridgeUnknownMessages OutboundLanes (max_values: None, max_size: Some(73), added: /// 2548, mode: MaxEncodedLen) /// /// Storage: BridgeRelayers RelayerRewards (r:2 w:2) @@ -255,9 +255,9 @@ impl WeightInfo for BridgeWeight { /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(93), added: 2568, /// mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages OutboundMessages (r:0 w:2) + /// Storage: BridgeUnknownMessages OutboundMessages (r:0 w:2) /// - /// Proof: BridgeRialtoMessages OutboundMessages (max_values: None, max_size: Some(65596), + /// Proof: BridgeUnknownMessages OutboundMessages (max_values: None, max_size: Some(65596), /// added: 68071, mode: MaxEncodedLen) fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight { // Proof Size summary in bytes: @@ -268,19 +268,19 @@ impl WeightInfo for BridgeWeight { .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownMessages PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), + /// Proof: BridgeUnknownMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), /// added: 497, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages InboundLanes (r:1 w:1) + /// Storage: BridgeUnknownMessages InboundLanes (r:1 w:1) /// - /// Proof: BridgeRialtoMessages InboundLanes (max_values: None, max_size: Some(49208), added: + /// Proof: BridgeUnknownMessages InboundLanes (max_values: None, max_size: Some(49208), added: /// 51683, mode: MaxEncodedLen) /// /// The range of component `n` is `[1, 16384]`. @@ -301,19 +301,19 @@ impl WeightInfo for BridgeWeight { // For backwards compatibility and tests impl WeightInfo for () { - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownMessages PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), + /// Proof: BridgeUnknownMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), /// added: 497, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages InboundLanes (r:1 w:1) + /// Storage: BridgeUnknownMessages InboundLanes (r:1 w:1) /// - /// Proof: BridgeRialtoMessages InboundLanes (max_values: None, max_size: Some(49208), added: + /// Proof: BridgeUnknownMessages InboundLanes (max_values: None, max_size: Some(49208), added: /// 51683, mode: MaxEncodedLen) fn receive_single_message_proof() -> Weight { // Proof Size summary in bytes: @@ -324,19 +324,19 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownMessages PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), + /// Proof: BridgeUnknownMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), /// added: 497, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages InboundLanes (r:1 w:1) + /// Storage: BridgeUnknownMessages InboundLanes (r:1 w:1) /// - /// Proof: BridgeRialtoMessages InboundLanes (max_values: None, max_size: Some(49208), added: + /// Proof: BridgeUnknownMessages InboundLanes (max_values: None, max_size: Some(49208), added: /// 51683, mode: MaxEncodedLen) /// /// The range of component `n` is `[1, 1004]`. @@ -353,19 +353,19 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownMessages PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), + /// Proof: BridgeUnknownMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), /// added: 497, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages InboundLanes (r:1 w:1) + /// Storage: BridgeUnknownMessages InboundLanes (r:1 w:1) /// - /// Proof: BridgeRialtoMessages InboundLanes (max_values: None, max_size: Some(49208), added: + /// Proof: BridgeUnknownMessages InboundLanes (max_values: None, max_size: Some(49208), added: /// 51683, mode: MaxEncodedLen) fn receive_single_message_proof_with_outbound_lane_state() -> Weight { // Proof Size summary in bytes: @@ -376,19 +376,19 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownMessages PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), + /// Proof: BridgeUnknownMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), /// added: 497, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages InboundLanes (r:1 w:1) + /// Storage: BridgeUnknownMessages InboundLanes (r:1 w:1) /// - /// Proof: BridgeRialtoMessages InboundLanes (max_values: None, max_size: Some(49208), added: + /// Proof: BridgeUnknownMessages InboundLanes (max_values: None, max_size: Some(49208), added: /// 51683, mode: MaxEncodedLen) /// /// The range of component `n` is `[1, 16384]`. @@ -405,19 +405,19 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownMessages PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), + /// Proof: BridgeUnknownMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), /// added: 497, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages OutboundLanes (r:1 w:1) + /// Storage: BridgeUnknownMessages OutboundLanes (r:1 w:1) /// - /// Proof: BridgeRialtoMessages OutboundLanes (max_values: None, max_size: Some(73), added: + /// Proof: BridgeUnknownMessages OutboundLanes (max_values: None, max_size: Some(73), added: /// 2548, mode: MaxEncodedLen) /// /// Storage: BridgeRelayers RelayerRewards (r:1 w:1) @@ -425,9 +425,9 @@ impl WeightInfo for () { /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(93), added: 2568, /// mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages OutboundMessages (r:0 w:1) + /// Storage: BridgeUnknownMessages OutboundMessages (r:0 w:1) /// - /// Proof: BridgeRialtoMessages OutboundMessages (max_values: None, max_size: Some(65596), + /// Proof: BridgeUnknownMessages OutboundMessages (max_values: None, max_size: Some(65596), /// added: 68071, mode: MaxEncodedLen) fn receive_delivery_proof_for_single_message() -> Weight { // Proof Size summary in bytes: @@ -438,19 +438,19 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownMessages PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), + /// Proof: BridgeUnknownMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), /// added: 497, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages OutboundLanes (r:1 w:1) + /// Storage: BridgeUnknownMessages OutboundLanes (r:1 w:1) /// - /// Proof: BridgeRialtoMessages OutboundLanes (max_values: None, max_size: Some(73), added: + /// Proof: BridgeUnknownMessages OutboundLanes (max_values: None, max_size: Some(73), added: /// 2548, mode: MaxEncodedLen) /// /// Storage: BridgeRelayers RelayerRewards (r:1 w:1) @@ -458,9 +458,9 @@ impl WeightInfo for () { /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(93), added: 2568, /// mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages OutboundMessages (r:0 w:2) + /// Storage: BridgeUnknownMessages OutboundMessages (r:0 w:2) /// - /// Proof: BridgeRialtoMessages OutboundMessages (max_values: None, max_size: Some(65596), + /// Proof: BridgeUnknownMessages OutboundMessages (max_values: None, max_size: Some(65596), /// added: 68071, mode: MaxEncodedLen) fn receive_delivery_proof_for_two_messages_by_single_relayer() -> Weight { // Proof Size summary in bytes: @@ -471,19 +471,19 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownMessages PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), + /// Proof: BridgeUnknownMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), /// added: 497, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages OutboundLanes (r:1 w:1) + /// Storage: BridgeUnknownMessages OutboundLanes (r:1 w:1) /// - /// Proof: BridgeRialtoMessages OutboundLanes (max_values: None, max_size: Some(73), added: + /// Proof: BridgeUnknownMessages OutboundLanes (max_values: None, max_size: Some(73), added: /// 2548, mode: MaxEncodedLen) /// /// Storage: BridgeRelayers RelayerRewards (r:2 w:2) @@ -491,9 +491,9 @@ impl WeightInfo for () { /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(93), added: 2568, /// mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages OutboundMessages (r:0 w:2) + /// Storage: BridgeUnknownMessages OutboundMessages (r:0 w:2) /// - /// Proof: BridgeRialtoMessages OutboundMessages (max_values: None, max_size: Some(65596), + /// Proof: BridgeUnknownMessages OutboundMessages (max_values: None, max_size: Some(65596), /// added: 68071, mode: MaxEncodedLen) fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight { // Proof Size summary in bytes: @@ -504,19 +504,19 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } - /// Storage: BridgeRialtoMessages PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownMessages PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), + /// Proof: BridgeUnknownMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), /// added: 497, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoMessages InboundLanes (r:1 w:1) + /// Storage: BridgeUnknownMessages InboundLanes (r:1 w:1) /// - /// Proof: BridgeRialtoMessages InboundLanes (max_values: None, max_size: Some(49208), added: + /// Proof: BridgeUnknownMessages InboundLanes (max_values: None, max_size: Some(49208), added: /// 51683, mode: MaxEncodedLen) /// /// The range of component `n` is `[1, 16384]`. diff --git a/modules/messages/src/weights_ext.rs b/modules/messages/src/weights_ext.rs index c3cddf3f57a83376b3f02dffa4a349710c809774..7711e212efb06da0421f57b01ab4d1eef8b48f16 100644 --- a/modules/messages/src/weights_ext.rs +++ b/modules/messages/src/weights_ext.rs @@ -53,7 +53,8 @@ pub fn ensure_weights_are_correct() { // W::receive_messages_delivery_proof_messages_overhead(1).ref_time() may be zero because: // there's no code that iterates over confirmed messages in confirmation transaction assert_eq!(W::receive_messages_delivery_proof_messages_overhead(1).proof_size(), 0); - assert_ne!(W::receive_messages_delivery_proof_relayers_overhead(1).ref_time(), 0); + // W::receive_messages_delivery_proof_relayers_overhead(1).ref_time() may be zero because: + // runtime **can** choose not to pay any rewards to relayers // W::receive_messages_delivery_proof_relayers_overhead(1).proof_size() is an exception // it may or may not cause additional db reads, so proof size may vary assert_ne!(W::storage_proof_size_overhead(1).ref_time(), 0); diff --git a/modules/parachains/Cargo.toml b/modules/parachains/Cargo.toml index b9d5c0e6d33e900eb9c54a57d884a97a5a3e7647..239f5262c8bb24066dcf1694cde28a0614c245fb 100644 --- a/modules/parachains/Cargo.toml +++ b/modules/parachains/Cargo.toml @@ -6,6 +6,9 @@ authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } log = { version = "0.4.20", default-features = false } @@ -35,7 +38,7 @@ sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } [features] -default = [ "std" ] +default = ["std"] std = [ "bp-header-chain/std", "bp-parachains/std", diff --git a/modules/parachains/src/benchmarking.rs b/modules/parachains/src/benchmarking.rs index 92ece6d688cbea3bed2e5d489163f2416bef9bbc..bb24d6c0044a01cb18c8fe63656964667bf892c6 100644 --- a/modules/parachains/src/benchmarking.rs +++ b/modules/parachains/src/benchmarking.rs @@ -23,7 +23,7 @@ use crate::{ use bp_polkadot_core::parachains::{ParaHash, ParaHeadsProof, ParaId}; use bp_runtime::UnverifiedStorageProofParams; -use frame_benchmarking::{account, benchmarks_instance_pallet}; +use frame_benchmarking::v2::*; use frame_system::RawOrigin; use sp_std::prelude::*; @@ -42,21 +42,23 @@ pub trait Config: crate::Config { ) -> (RelayBlockNumber, RelayBlockHash, ParaHeadsProof, Vec<(ParaId, ParaHash)>); } -benchmarks_instance_pallet! { - where_clause { - where - >::BridgedChain: - bp_runtime::Chain< - BlockNumber = RelayBlockNumber, - Hash = RelayBlockHash, - Hasher = RelayBlockHasher, - >, - } - - // Benchmark `submit_parachain_heads` extrinsic with different number of parachains. - submit_parachain_heads_with_n_parachains { - let p in 1..(T::parachains().len() + 1) as u32; +#[instance_benchmarks( + where + >::BridgedChain: + bp_runtime::Chain< + BlockNumber = RelayBlockNumber, + Hash = RelayBlockHash, + Hasher = RelayBlockHasher, + >, +)] +mod benchmarks { + use super::*; + /// Benchmark `submit_parachain_heads` extrinsic with different number of parachains. + #[benchmark] + fn submit_parachain_heads_with_n_parachains( + p: Linear<1, { (T::parachains().len() + 1) as u32 }>, + ) { let sender = account("sender", 0, 0); let mut parachains = T::parachains(); let _ = if p <= parachains.len() as u32 { @@ -65,52 +67,78 @@ benchmarks_instance_pallet! { Default::default() }; log::trace!(target: crate::LOG_TARGET, "=== {:?}", parachains.len()); - let (relay_block_number, relay_block_hash, parachain_heads_proof, parachains_heads) = T::prepare_parachain_heads_proof( - ¶chains, - DEFAULT_PARACHAIN_HEAD_SIZE, - UnverifiedStorageProofParams::default(), - ); + let (relay_block_number, relay_block_hash, parachain_heads_proof, parachains_heads) = + T::prepare_parachain_heads_proof( + ¶chains, + DEFAULT_PARACHAIN_HEAD_SIZE, + UnverifiedStorageProofParams::default(), + ); let at_relay_block = (relay_block_number, relay_block_hash); - }: submit_parachain_heads(RawOrigin::Signed(sender), at_relay_block, parachains_heads, parachain_heads_proof) - verify { + + #[extrinsic_call] + submit_parachain_heads( + RawOrigin::Signed(sender), + at_relay_block, + parachains_heads, + parachain_heads_proof, + ); + for parachain in parachains { assert!(crate::Pallet::::best_parachain_head(parachain).is_some()); } } - // Benchmark `submit_parachain_heads` extrinsic with 1kb proof size. - submit_parachain_heads_with_1kb_proof { + /// Benchmark `submit_parachain_heads` extrinsic with `1kb` proof size. + #[benchmark] + fn submit_parachain_heads_with_1kb_proof() { let sender = account("sender", 0, 0); let parachains = vec![T::parachains()[0]]; - let (relay_block_number, relay_block_hash, parachain_heads_proof, parachains_heads) = T::prepare_parachain_heads_proof( - ¶chains, - DEFAULT_PARACHAIN_HEAD_SIZE, - UnverifiedStorageProofParams::from_db_size(1024), - ); + let (relay_block_number, relay_block_hash, parachain_heads_proof, parachains_heads) = + T::prepare_parachain_heads_proof( + ¶chains, + DEFAULT_PARACHAIN_HEAD_SIZE, + UnverifiedStorageProofParams::from_db_size(1024), + ); let at_relay_block = (relay_block_number, relay_block_hash); - }: submit_parachain_heads(RawOrigin::Signed(sender), at_relay_block, parachains_heads, parachain_heads_proof) - verify { + + #[extrinsic_call] + submit_parachain_heads( + RawOrigin::Signed(sender), + at_relay_block, + parachains_heads, + parachain_heads_proof, + ); + for parachain in parachains { assert!(crate::Pallet::::best_parachain_head(parachain).is_some()); } } - // Benchmark `submit_parachain_heads` extrinsic with 16kb proof size. - submit_parachain_heads_with_16kb_proof { + /// Benchmark `submit_parachain_heads` extrinsic with `16kb` proof size. + #[benchmark] + fn submit_parachain_heads_with_16kb_proof() { let sender = account("sender", 0, 0); let parachains = vec![T::parachains()[0]]; - let (relay_block_number, relay_block_hash, parachain_heads_proof, parachains_heads) = T::prepare_parachain_heads_proof( - ¶chains, - DEFAULT_PARACHAIN_HEAD_SIZE, - UnverifiedStorageProofParams::from_db_size(16 * 1024), - ); + let (relay_block_number, relay_block_hash, parachain_heads_proof, parachains_heads) = + T::prepare_parachain_heads_proof( + ¶chains, + DEFAULT_PARACHAIN_HEAD_SIZE, + UnverifiedStorageProofParams::from_db_size(16 * 1024), + ); let at_relay_block = (relay_block_number, relay_block_hash); - }: submit_parachain_heads(RawOrigin::Signed(sender), at_relay_block, parachains_heads, parachain_heads_proof) - verify { + + #[extrinsic_call] + submit_parachain_heads( + RawOrigin::Signed(sender), + at_relay_block, + parachains_heads, + parachain_heads_proof, + ); + for parachain in parachains { assert!(crate::Pallet::::best_parachain_head(parachain).is_some()); } } - impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::TestRuntime) + impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::TestRuntime); } diff --git a/modules/parachains/src/lib.rs b/modules/parachains/src/lib.rs index bd1351d732980c3fd9dfa9b214175018c2ba61fd..428b59619e71ad31ff24cf6a0cd0ec41f8018148 100644 --- a/modules/parachains/src/lib.rs +++ b/modules/parachains/src/lib.rs @@ -1490,7 +1490,7 @@ pub(crate) mod tests { ); // then if someone is pretending to provide updated head#10 of parachain#1 at relay - // block#30, and actualy provides it + // block#30, and actually provides it // // => we'll update value proceed(30, state_root_10_at_30); diff --git a/modules/parachains/src/mock.rs b/modules/parachains/src/mock.rs index 933826bcbfc7c56e06b6f0e2b2443c7eb66cf917..866f68cfd8db9e6580b7f35620a49ac325664392 100644 --- a/modules/parachains/src/mock.rs +++ b/modules/parachains/src/mock.rs @@ -17,17 +17,18 @@ use bp_header_chain::ChainWithGrandpa; use bp_polkadot_core::parachains::ParaId; use bp_runtime::{Chain, ChainId, Parachain}; -use frame_support::{construct_runtime, parameter_types, traits::ConstU32, weights::Weight}; +use frame_support::{ + construct_runtime, derive_impl, parameter_types, traits::ConstU32, weights::Weight, +}; use sp_runtime::{ testing::H256, - traits::{BlakeTwo256, Header as HeaderT, IdentityLookup}, - MultiSignature, Perbill, StateVersion, + traits::{BlakeTwo256, Header as HeaderT}, + MultiSignature, StateVersion, }; use crate as pallet_bridge_parachains; pub type AccountId = u64; -pub type TestNumber = u64; pub type RelayBlockHeader = sp_runtime::generic::Header; @@ -168,42 +169,12 @@ construct_runtime! { } } -parameter_types! { - pub const BlockHashCount: TestNumber = 250; - pub const MaximumBlockWeight: Weight = Weight::from_parts(1024, 0); - pub const MaximumBlockLength: u32 = 2 * 1024; - pub const AvailableBlockRatio: Perbill = Perbill::one(); -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for TestRuntime { - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; type Block = Block; - type Hash = H256; - type Hashing = RegularParachainHasher; - type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = (); - type OnNewAccount = (); - type OnKilledAccount = (); - type BaseCallFilter = frame_support::traits::Everything; - type SystemWeightInfo = (); - type DbWeight = (); - type BlockWeights = (); - type BlockLength = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = ConstU32<16>; } parameter_types! { - pub const SessionLength: u64 = 5; - pub const NumValidators: u32 = 5; pub const HeadersToKeep: u32 = 5; } @@ -301,8 +272,8 @@ impl ChainWithGrandpa for TestBridgedChain { const WITH_CHAIN_GRANDPA_PALLET_NAME: &'static str = ""; const MAX_AUTHORITIES_COUNT: u32 = 16; const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = 8; - const MAX_HEADER_SIZE: u32 = 256; - const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = 64; + const MAX_MANDATORY_HEADER_SIZE: u32 = 256; + const AVERAGE_HEADER_SIZE: u32 = 64; } #[derive(Debug)] @@ -336,8 +307,8 @@ impl ChainWithGrandpa for OtherBridgedChain { const WITH_CHAIN_GRANDPA_PALLET_NAME: &'static str = ""; const MAX_AUTHORITIES_COUNT: u32 = 16; const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = 8; - const MAX_HEADER_SIZE: u32 = 256; - const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = 64; + const MAX_MANDATORY_HEADER_SIZE: u32 = 256; + const AVERAGE_HEADER_SIZE: u32 = 64; } /// Return test externalities to use in tests. diff --git a/modules/parachains/src/weights.rs b/modules/parachains/src/weights.rs index 868cce45016e3178a6d8d69a35b6668991cd7f8f..1f92b7ff763c3f572efef1acf141a9eba0d3eb0e 100644 --- a/modules/parachains/src/weights.rs +++ b/modules/parachains/src/weights.rs @@ -23,7 +23,7 @@ //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/millau-bridge-node +// target/release/unknown-bridge-node // benchmark // pallet // --chain=dev @@ -60,29 +60,29 @@ pub trait WeightInfo { /// Those weights are test only and must never be used in production. pub struct BridgeWeight(PhantomData); impl WeightInfo for BridgeWeight { - /// Storage: BridgeRialtoParachains PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownParachains PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoParachains PalletOperatingMode (max_values: Some(1), max_size: Some(1), + /// Proof: BridgeUnknownParachains PalletOperatingMode (max_values: Some(1), max_size: Some(1), /// added: 496, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoParachains ParasInfo (r:1 w:1) + /// Storage: BridgeUnknownParachains ParasInfo (r:1 w:1) /// - /// Proof: BridgeRialtoParachains ParasInfo (max_values: Some(1), max_size: Some(60), added: + /// Proof: BridgeUnknownParachains ParasInfo (max_values: Some(1), max_size: Some(60), added: /// 555, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoParachains ImportedParaHashes (r:1 w:1) + /// Storage: BridgeUnknownParachains ImportedParaHashes (r:1 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHashes (max_values: Some(1024), max_size: + /// Proof: BridgeUnknownParachains ImportedParaHashes (max_values: Some(1024), max_size: /// Some(64), added: 1549, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoParachains ImportedParaHeads (r:0 w:1) + /// Storage: BridgeUnknownParachains ImportedParaHeads (r:0 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(1024), max_size: + /// Proof: BridgeUnknownParachains ImportedParaHeads (max_values: Some(1024), max_size: /// Some(196), added: 1681, mode: MaxEncodedLen) /// /// The range of component `p` is `[1, 2]`. @@ -95,29 +95,29 @@ impl WeightInfo for BridgeWeight { .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: BridgeRialtoParachains PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownParachains PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoParachains PalletOperatingMode (max_values: Some(1), max_size: Some(1), + /// Proof: BridgeUnknownParachains PalletOperatingMode (max_values: Some(1), max_size: Some(1), /// added: 496, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoParachains ParasInfo (r:1 w:1) + /// Storage: BridgeUnknownParachains ParasInfo (r:1 w:1) /// - /// Proof: BridgeRialtoParachains ParasInfo (max_values: Some(1), max_size: Some(60), added: + /// Proof: BridgeUnknownParachains ParasInfo (max_values: Some(1), max_size: Some(60), added: /// 555, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoParachains ImportedParaHashes (r:1 w:1) + /// Storage: BridgeUnknownParachains ImportedParaHashes (r:1 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHashes (max_values: Some(1024), max_size: + /// Proof: BridgeUnknownParachains ImportedParaHashes (max_values: Some(1024), max_size: /// Some(64), added: 1549, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoParachains ImportedParaHeads (r:0 w:1) + /// Storage: BridgeUnknownParachains ImportedParaHeads (r:0 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(1024), max_size: + /// Proof: BridgeUnknownParachains ImportedParaHeads (max_values: Some(1024), max_size: /// Some(196), added: 1681, mode: MaxEncodedLen) fn submit_parachain_heads_with_1kb_proof() -> Weight { // Proof Size summary in bytes: @@ -128,29 +128,29 @@ impl WeightInfo for BridgeWeight { .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: BridgeRialtoParachains PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownParachains PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoParachains PalletOperatingMode (max_values: Some(1), max_size: Some(1), + /// Proof: BridgeUnknownParachains PalletOperatingMode (max_values: Some(1), max_size: Some(1), /// added: 496, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoParachains ParasInfo (r:1 w:1) + /// Storage: BridgeUnknownParachains ParasInfo (r:1 w:1) /// - /// Proof: BridgeRialtoParachains ParasInfo (max_values: Some(1), max_size: Some(60), added: + /// Proof: BridgeUnknownParachains ParasInfo (max_values: Some(1), max_size: Some(60), added: /// 555, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoParachains ImportedParaHashes (r:1 w:1) + /// Storage: BridgeUnknownParachains ImportedParaHashes (r:1 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHashes (max_values: Some(1024), max_size: + /// Proof: BridgeUnknownParachains ImportedParaHashes (max_values: Some(1024), max_size: /// Some(64), added: 1549, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoParachains ImportedParaHeads (r:0 w:1) + /// Storage: BridgeUnknownParachains ImportedParaHeads (r:0 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(1024), max_size: + /// Proof: BridgeUnknownParachains ImportedParaHeads (max_values: Some(1024), max_size: /// Some(196), added: 1681, mode: MaxEncodedLen) fn submit_parachain_heads_with_16kb_proof() -> Weight { // Proof Size summary in bytes: @@ -165,29 +165,29 @@ impl WeightInfo for BridgeWeight { // For backwards compatibility and tests impl WeightInfo for () { - /// Storage: BridgeRialtoParachains PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownParachains PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoParachains PalletOperatingMode (max_values: Some(1), max_size: Some(1), + /// Proof: BridgeUnknownParachains PalletOperatingMode (max_values: Some(1), max_size: Some(1), /// added: 496, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoParachains ParasInfo (r:1 w:1) + /// Storage: BridgeUnknownParachains ParasInfo (r:1 w:1) /// - /// Proof: BridgeRialtoParachains ParasInfo (max_values: Some(1), max_size: Some(60), added: + /// Proof: BridgeUnknownParachains ParasInfo (max_values: Some(1), max_size: Some(60), added: /// 555, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoParachains ImportedParaHashes (r:1 w:1) + /// Storage: BridgeUnknownParachains ImportedParaHashes (r:1 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHashes (max_values: Some(1024), max_size: + /// Proof: BridgeUnknownParachains ImportedParaHashes (max_values: Some(1024), max_size: /// Some(64), added: 1549, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoParachains ImportedParaHeads (r:0 w:1) + /// Storage: BridgeUnknownParachains ImportedParaHeads (r:0 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(1024), max_size: + /// Proof: BridgeUnknownParachains ImportedParaHeads (max_values: Some(1024), max_size: /// Some(196), added: 1681, mode: MaxEncodedLen) /// /// The range of component `p` is `[1, 2]`. @@ -200,29 +200,29 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: BridgeRialtoParachains PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownParachains PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoParachains PalletOperatingMode (max_values: Some(1), max_size: Some(1), + /// Proof: BridgeUnknownParachains PalletOperatingMode (max_values: Some(1), max_size: Some(1), /// added: 496, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoParachains ParasInfo (r:1 w:1) + /// Storage: BridgeUnknownParachains ParasInfo (r:1 w:1) /// - /// Proof: BridgeRialtoParachains ParasInfo (max_values: Some(1), max_size: Some(60), added: + /// Proof: BridgeUnknownParachains ParasInfo (max_values: Some(1), max_size: Some(60), added: /// 555, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoParachains ImportedParaHashes (r:1 w:1) + /// Storage: BridgeUnknownParachains ImportedParaHashes (r:1 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHashes (max_values: Some(1024), max_size: + /// Proof: BridgeUnknownParachains ImportedParaHashes (max_values: Some(1024), max_size: /// Some(64), added: 1549, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoParachains ImportedParaHeads (r:0 w:1) + /// Storage: BridgeUnknownParachains ImportedParaHeads (r:0 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(1024), max_size: + /// Proof: BridgeUnknownParachains ImportedParaHeads (max_values: Some(1024), max_size: /// Some(196), added: 1681, mode: MaxEncodedLen) fn submit_parachain_heads_with_1kb_proof() -> Weight { // Proof Size summary in bytes: @@ -233,29 +233,29 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: BridgeRialtoParachains PalletOperatingMode (r:1 w:0) + /// Storage: BridgeUnknownParachains PalletOperatingMode (r:1 w:0) /// - /// Proof: BridgeRialtoParachains PalletOperatingMode (max_values: Some(1), max_size: Some(1), + /// Proof: BridgeUnknownParachains PalletOperatingMode (max_values: Some(1), max_size: Some(1), /// added: 496, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoGrandpa ImportedHeaders (r:1 w:0) + /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0) /// - /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), + /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoParachains ParasInfo (r:1 w:1) + /// Storage: BridgeUnknownParachains ParasInfo (r:1 w:1) /// - /// Proof: BridgeRialtoParachains ParasInfo (max_values: Some(1), max_size: Some(60), added: + /// Proof: BridgeUnknownParachains ParasInfo (max_values: Some(1), max_size: Some(60), added: /// 555, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoParachains ImportedParaHashes (r:1 w:1) + /// Storage: BridgeUnknownParachains ImportedParaHashes (r:1 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHashes (max_values: Some(1024), max_size: + /// Proof: BridgeUnknownParachains ImportedParaHashes (max_values: Some(1024), max_size: /// Some(64), added: 1549, mode: MaxEncodedLen) /// - /// Storage: BridgeRialtoParachains ImportedParaHeads (r:0 w:1) + /// Storage: BridgeUnknownParachains ImportedParaHeads (r:0 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(1024), max_size: + /// Proof: BridgeUnknownParachains ImportedParaHeads (max_values: Some(1024), max_size: /// Some(196), added: 1681, mode: MaxEncodedLen) fn submit_parachain_heads_with_16kb_proof() -> Weight { // Proof Size summary in bytes: diff --git a/modules/parachains/src/weights_ext.rs b/modules/parachains/src/weights_ext.rs index 13bc9ad2bbce0f26d5946cf8198e689597e5f968..393086a85690fcc2846c1708bc788e1d67a61d66 100644 --- a/modules/parachains/src/weights_ext.rs +++ b/modules/parachains/src/weights_ext.rs @@ -31,7 +31,7 @@ use frame_support::weights::{RuntimeDbWeight, Weight}; pub const DEFAULT_PARACHAIN_HEAD_SIZE: u32 = 384; /// Number of extra bytes (excluding size of storage value itself) of storage proof, built at -/// the Rialto chain. +/// some generic chain. pub const EXTRA_STORAGE_PROOF_SIZE: u32 = 1024; /// Extended weight info. diff --git a/modules/relayers/Cargo.toml b/modules/relayers/Cargo.toml index 6078ed2fc4f3b95cce1e02c234d3df39b377bd67..40767072b858457af975e701f1e5b9242d3339f5 100644 --- a/modules/relayers/Cargo.toml +++ b/modules/relayers/Cargo.toml @@ -6,6 +6,9 @@ authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } log = { version = "0.4.20", default-features = false } @@ -37,11 +40,10 @@ bp-polkadot-core = { path = "../../primitives/polkadot-core" } bp-test-utils = { path = "../../primitives/test-utils" } pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } [features] -default = [ "std" ] +default = ["std"] std = [ "bp-header-chain/std", "bp-messages/std", diff --git a/modules/relayers/src/benchmarking.rs b/modules/relayers/src/benchmarking.rs index 00fb59d50f65c33c7483dc6c325a25ebd93be20b..7d946f497d787f29d416d43dcd34489cc65d66be 100644 --- a/modules/relayers/src/benchmarking.rs +++ b/modules/relayers/src/benchmarking.rs @@ -22,7 +22,7 @@ use crate::*; use bp_messages::LaneId; use bp_relayers::RewardsAccountOwner; -use frame_benchmarking::{account, benchmarks, whitelisted_caller}; +use frame_benchmarking::v2::*; use frame_support::traits::Get; use frame_system::{pallet_prelude::BlockNumberFor, RawOrigin}; use sp_runtime::traits::One; @@ -83,9 +83,13 @@ fn register_relayer( ); } -benchmarks! { - // Benchmark `claim_rewards` call. - claim_rewards { +#[benchmarks] +mod benchmarks { + use super::*; + + /// Benchmark `claim_rewards` call. + #[benchmark] + fn claim_rewards() { let lane = LaneId::new(1, 2); let account_params = RewardsAccountParams::new(lane, *b"test", RewardsAccountOwner::ThisChain); @@ -94,43 +98,53 @@ benchmarks! { T::prepare_rewards_account(account_params, reward); RelayerRewards::::insert(&relayer, account_params, reward); - }: _(RawOrigin::Signed(relayer), account_params) - verify { + + #[extrinsic_call] + _(RawOrigin::Signed(relayer), account_params); + // we can't check anything here, because `PaymentProcedure` is responsible for // payment logic, so we assume that if call has succeeded, the procedure has // also completed successfully } - // Benchmark `increase_stake` call. - increase_stake { + /// Benchmark `increase_stake` call. + #[benchmark] + fn increase_stake() { let relayer: T::AccountId = whitelisted_caller(); let stake = crate::Pallet::::base_stake(); T::deposit_account(relayer.clone(), stake); - }: _(RawOrigin::Signed(relayer.clone()), stake) - verify { + + #[extrinsic_call] + _(RawOrigin::Signed(relayer.clone()), stake); + assert_eq!( crate::Pallet::::registered_relayer(&relayer).map(|reg| reg.current_stake()), Some(stake), ); } - // Benchmark `decrease_stake` call. - decrease_stake { + /// Benchmark `decrease_stake` call. + #[benchmark] + fn decrease_stake() { let relayer: T::AccountId = whitelisted_caller(); let base_stake = crate::Pallet::::base_stake(); let stake = base_stake.saturating_add(100u32.into()); T::deposit_account(relayer.clone(), stake); - crate::Pallet::::increase_stake(RawOrigin::Signed(relayer.clone()).into(), stake).unwrap(); - }: _(RawOrigin::Signed(relayer.clone()), 100u32.into()) - verify { + crate::Pallet::::increase_stake(RawOrigin::Signed(relayer.clone()).into(), stake) + .unwrap(); + + #[extrinsic_call] + _(RawOrigin::Signed(relayer.clone()), 100u32.into()); + assert_eq!( crate::Pallet::::registered_relayer(&relayer).map(|reg| reg.current_stake()), Some(base_stake), ); } - // Benchmark `register` call. - register { + /// Benchmark `register` call. + #[benchmark] + fn register() { let relayer: T::AccountId = whitelisted_caller(); let base_stake = crate::Pallet::::base_stake(); let valid_till = frame_system::Pallet::::block_number() @@ -139,56 +153,69 @@ benchmarks! { .saturating_add(One::one()); T::deposit_account(relayer.clone(), base_stake); - crate::Pallet::::increase_stake(RawOrigin::Signed(relayer.clone()).into(), base_stake).unwrap(); - }: _(RawOrigin::Signed(relayer.clone()), valid_till) - verify { + crate::Pallet::::increase_stake(RawOrigin::Signed(relayer.clone()).into(), base_stake) + .unwrap(); + + #[extrinsic_call] + _(RawOrigin::Signed(relayer.clone()), valid_till); + assert!(crate::Pallet::::is_registration_active(&relayer)); } - // Benchmark `deregister` call. - deregister { + /// Benchmark `deregister` call. + #[benchmark] + fn deregister() { let relayer: T::AccountId = whitelisted_caller(); register_relayer::(&relayer, 0, 0); frame_system::Pallet::::set_block_number(valid_till::().saturating_add(One::one())); - }: _(RawOrigin::Signed(relayer.clone())) - verify { + + #[extrinsic_call] + _(RawOrigin::Signed(relayer.clone())); + assert!(!crate::Pallet::::is_registration_active(&relayer)); } - // Benchmark `register_at_lane` call. The worst case for this call is when: - // - // - relayer has `T::MaxLanesPerRelayer::get() - 1` lane registrations; - // - // - there are no other relayers registered at that lane yet; - register_at_lane { + /// Benchmark `register_at_lane` call. The worst case for this call is when: + /// + /// - relayer has `T::MaxLanesPerRelayer::get() - 1` lane registrations; + /// + /// - there are no other relayers registered at that lane yet; + #[benchmark] + fn register_at_lane() { let relayer: T::AccountId = whitelisted_caller(); let max_lanes_per_relayer = T::MaxLanesPerRelayer::get(); register_relayer::(&relayer, max_lanes_per_relayer - 1, 0); - }: _(RawOrigin::Signed(relayer.clone()), lane_id(max_lanes_per_relayer), 0) - verify { + + #[extrinsic_call] + _(RawOrigin::Signed(relayer.clone()), lane_id(max_lanes_per_relayer), 0); + assert_eq!( crate::Pallet::::registered_relayer(&relayer).map(|reg| reg.lanes().len() as u32), Some(max_lanes_per_relayer), ); } - // Benchmark `deregister_at_lane` call. The worst case for this call is when relayer is not in - // the active relayers set. - deregister_at_lane { + /// Benchmark `deregister_at_lane` call. The worst case for this call is when relayer is not in + /// the active relayers set. + #[benchmark] + fn deregister_at_lane() { let relayer: T::AccountId = whitelisted_caller(); let max_lanes_per_relayer = T::MaxLanesPerRelayer::get(); register_relayer::(&relayer, max_lanes_per_relayer, 0); - }: _(RawOrigin::Signed(relayer.clone()), lane_id(0)) - verify { + + #[extrinsic_call] + _(RawOrigin::Signed(relayer.clone()), lane_id(0)); + assert_eq!( crate::Pallet::::registered_relayer(&relayer).map(|reg| reg.lanes().len() as u32), Some(max_lanes_per_relayer - 1), ); } - // Benchmark `advance_lane_epoch` call. The worst case for this call is when active set is completely - // replaced with a next set. - advance_lane_epoch { + // Benchmark `advance_lane_epoch` call. The worst case for this call is when active set is + // completely replaced with a next set. + #[benchmark] + fn advance_lane_epoch() { let current_block_number = frame_system::Pallet::::block_number(); // prepare active relayers set with max possible relayers count @@ -196,10 +223,12 @@ benchmarks! { let active_relayers = (0..max_active_relayers_per_lane) .map(|i| account("relayer", i, 0)) .collect::>(); - let mut active_relayers_set = ActiveLaneRelayersSet::<_, BlockNumberFor, T::MaxActiveRelayersPerLane>::default(); - let mut next_relayers_set = NextLaneRelayersSet::<_, BlockNumberFor, T::MaxNextRelayersPerLane>::empty( - current_block_number, - ); + let mut active_relayers_set = + ActiveLaneRelayersSet::<_, BlockNumberFor, T::MaxActiveRelayersPerLane>::default(); + let mut next_relayers_set = + NextLaneRelayersSet::<_, BlockNumberFor, T::MaxNextRelayersPerLane>::empty( + current_block_number, + ); for active_relayer in &active_relayers { register_relayer::(active_relayer, 1, 1); assert!(next_relayers_set.try_insert(active_relayer.clone(), 0)); @@ -220,8 +249,10 @@ benchmarks! { frame_system::Pallet::::set_block_number( NextLaneRelayers::::get(lane_id(0)).unwrap().may_enact_at(), ); - }: _(RawOrigin::Signed(whitelisted_caller()), lane_id(0)) - verify { + + #[extrinsic_call] + _(RawOrigin::Signed(whitelisted_caller()), lane_id(0)); + // active relayers are replaced with next relayers assert_eq!( crate::Pallet::::active_lane_relayers(&lane_id(0)) @@ -233,16 +264,21 @@ benchmarks! { ); // all (previous) active relayers have no lane registration - active_relayers.into_iter().all(|r| crate::Pallet::::registered_relayer(&r).unwrap().lanes().len() == 0); + active_relayers + .into_iter() + .all(|r| crate::Pallet::::registered_relayer(&r).unwrap().lanes().len() == 0); // all (previous) next relayers have no lane registration - next_relayers.into_iter().all(|r| crate::Pallet::::registered_relayer(&r).unwrap().lanes().len() == 1); + next_relayers + .into_iter() + .all(|r| crate::Pallet::::registered_relayer(&r).unwrap().lanes().len() == 1); } - // Benchmark `slash_and_deregister` method of the pallet. We are adding this weight to - // the weight of message delivery call if `RefundBridgedParachainMessages` signed extension - // is deployed at runtime level. - slash_and_deregister { + /// Benchmark `slash_and_deregister` method of the pallet. We are adding this weight to + /// the weight of message delivery call if `RefundBridgedParachainMessages` signed extension + /// is deployed at runtime level. + #[benchmark] + fn slash_and_deregister() { // prepare and register relayer account let relayer: T::AccountId = whitelisted_caller(); let max_lanes_per_relayer = T::MaxLanesPerRelayer::get(); @@ -260,42 +296,48 @@ benchmarks! { // create slash destination account let lane = LaneId::new(1, 2); - let slash_destination = RewardsAccountParams::new(lane, *b"test", RewardsAccountOwner::ThisChain); + let slash_destination = + RewardsAccountParams::new(lane, *b"test", RewardsAccountOwner::ThisChain); T::prepare_rewards_account(slash_destination.clone(), Zero::zero()); - }: { - crate::Pallet::::slash_and_deregister(&relayer, slash_destination) - } - verify { + + #[block] + { + crate::Pallet::::slash_and_deregister(&relayer, slash_destination) + } + assert!(!crate::Pallet::::is_registration_active(&relayer)); for i in 0..max_lanes_per_relayer { - assert!( - crate::Pallet::::active_lane_relayers(lane_id(i)) - .relayer(&relayer) - .is_none(), - ); - assert!( - crate::Pallet::::next_lane_relayers(lane_id(i)) - .unwrap_or_else(|| NextLaneRelayersSet::empty(Zero::zero())) - .relayer(&relayer) - .is_none(), - ); + assert!(crate::Pallet::::active_lane_relayers(lane_id(i)) + .relayer(&relayer) + .is_none(),); + assert!(crate::Pallet::::next_lane_relayers(lane_id(i)) + .unwrap_or_else(|| NextLaneRelayersSet::empty(Zero::zero())) + .relayer(&relayer) + .is_none(),); } } // Benchmark `register_relayer_reward` method of the pallet. We are adding this weight to // the weight of message delivery call if `RefundBridgedParachainMessages` signed extension // is deployed at runtime level. - register_relayer_reward { + #[benchmark] + fn register_relayer_reward() { let lane = LaneId::new(1, 2); let relayer: T::AccountId = whitelisted_caller(); let account_params = RewardsAccountParams::new(lane, *b"test", RewardsAccountOwner::ThisChain); - }: { - crate::Pallet::::register_relayer_reward(account_params.clone(), &relayer, One::one()); - } - verify { + + #[block] + { + crate::Pallet::::register_relayer_reward( + account_params.clone(), + &relayer, + One::one(), + ); + } + assert_eq!(RelayerRewards::::get(relayer, &account_params), Some(One::one())); } - impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::TestRuntime) + impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::TestRuntime); } diff --git a/modules/relayers/src/extension/priority.rs b/modules/relayers/src/extension/priority.rs index ec545ab25c47a0fa264d17afa4e066c0934d5b3a..39bfd415312e1634befdc47d8f5360ab183e1487 100644 --- a/modules/relayers/src/extension/priority.rs +++ b/modules/relayers/src/extension/priority.rs @@ -34,6 +34,7 @@ use sp_runtime::{ }; // reexport everything from `integrity_tests` module +#[allow(unused_imports)] pub use integrity_tests::*; /// Compute total priority boost for message delivery transaction. diff --git a/modules/relayers/src/mock.rs b/modules/relayers/src/mock.rs index 3ab27c062404aae31a2b53782d7da99089c16806..4d930663d7de2ca559d61726e09fbfdaa81d2090 100644 --- a/modules/relayers/src/mock.rs +++ b/modules/relayers/src/mock.rs @@ -30,14 +30,14 @@ use bp_relayers::{ use bp_runtime::{messages::MessageDispatchResult, Chain, ChainId, Parachain}; use codec::Encode; use frame_support::{ - parameter_types, + derive_impl, parameter_types, traits::fungible::Mutate, weights::{ConstantMultiplier, IdentityFee, RuntimeDbWeight, Weight}, }; use pallet_transaction_payment::Multiplier; -use sp_core::{ConstU64, ConstU8, H256}; use sp_runtime::{ - traits::{BlakeTwo256, ConstU32, IdentityLookup}, + testing::H256, + traits::{BlakeTwo256, ConstU32, ConstU64, ConstU8}, transaction_validity::TransactionPriority, BuildStorage, FixedPointNumber, Perquintill, StateVersion, }; @@ -146,8 +146,8 @@ impl ChainWithGrandpa for BridgedUnderlyingChain { const WITH_CHAIN_GRANDPA_PALLET_NAME: &'static str = ""; const MAX_AUTHORITIES_COUNT: u32 = 16; const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = 8; - const MAX_HEADER_SIZE: u32 = 256; - const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = 64; + const AVERAGE_HEADER_SIZE: u32 = 64; + const MAX_MANDATORY_HEADER_SIZE: u32 = 128; } impl ChainWithMessages for BridgedUnderlyingChain { @@ -207,30 +207,12 @@ parameter_types! { pub PriorityBoostForActiveLaneRelayer: TransactionPriority = 4; } +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for TestRuntime { - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; type Block = ThisChainBlock; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = ThisChainAccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = frame_support::traits::ConstU32<250>; - type Version = (); - type PalletInfo = PalletInfo; + type BlockHashCount = ConstU32<256>; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type BaseCallFilter = frame_support::traits::Everything; - type SystemWeightInfo = (); - type BlockWeights = (); - type BlockLength = (); type DbWeight = DbWeight; - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; } impl pallet_utility::Config for TestRuntime { @@ -240,20 +222,10 @@ impl pallet_utility::Config for TestRuntime { type WeightInfo = (); } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for TestRuntime { - type MaxLocks = (); - type Balance = ThisChainBalance; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = frame_system::Pallet; - type WeightInfo = (); - type MaxReserves = ConstU32<1>; type ReserveIdentifier = [u8; 8]; - type RuntimeHoldReason = RuntimeHoldReason; - type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; - type MaxFreezes = ConstU32<0>; + type AccountStore = System; } impl pallet_transaction_payment::Config for TestRuntime { diff --git a/modules/relayers/src/weights.rs b/modules/relayers/src/weights.rs index b3ed8ff0ebfdae172eb0b44e43eaf0a86a0f4ba6..082c113d1e2fc58719e4f11349408e8979e2a2ae 100644 --- a/modules/relayers/src/weights.rs +++ b/modules/relayers/src/weights.rs @@ -23,7 +23,7 @@ //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/millau-bridge-node +// target/release/rip-bridge-node // benchmark // pallet // --chain=dev diff --git a/modules/shift-session-manager/Cargo.toml b/modules/shift-session-manager/Cargo.toml deleted file mode 100644 index e70dd6ace16e47431640cb8cae2d1be66997b12c..0000000000000000000000000000000000000000 --- a/modules/shift-session-manager/Cargo.toml +++ /dev/null @@ -1,38 +0,0 @@ -[package] -name = "pallet-shift-session-manager" -description = "A Substrate Runtime module that selects 2/3 of initial validators for every session" -version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2021" -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" - -[dependencies] -codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } -scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } - -# Substrate Dependencies - -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-staking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } - -[dev-dependencies] -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } - -[features] -default = [ "std" ] -std = [ - "codec/std", - "frame-support/std", - "frame-system/std", - "pallet-session/std", - "scale-info/std", - "sp-staking/std", - "sp-std/std", -] -try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime" ] diff --git a/modules/shift-session-manager/README.md b/modules/shift-session-manager/README.md deleted file mode 100644 index 8dfbfd416e3cc6bc205f940bb660b012cb2f1a51..0000000000000000000000000000000000000000 --- a/modules/shift-session-manager/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Shift Session Manager Pallet - -**THIS PALLET IS NOT INTENDED TO BE USED IN PRODUCTION** - -The pallet does not provide any calls or runtime storage entries. It only provides implementation of the -`pallet_session::SessionManager`. This implementation, starting from session `3` selects two thirds of initial -validators and changes the set on every session. We are using it at our testnets ([Rialto](../../bin/rialto/) and -[Millau](../../bin/millau/)) to be sure that the set changes every session. On well-known production chains -(like Kusama and Polkadot) the alternative is the set of [nPoS](https://research.web3.foundation/en/latest/polkadot/NPoS/index.html) -pallets, which selects validators, based on their nominations. diff --git a/modules/shift-session-manager/src/lib.rs b/modules/shift-session-manager/src/lib.rs deleted file mode 100644 index 9135f964068f46a6dbb3819832ea079d745facfa..0000000000000000000000000000000000000000 --- a/modules/shift-session-manager/src/lib.rs +++ /dev/null @@ -1,260 +0,0 @@ -// 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 . - -//! Substrate session manager that selects 2/3 validators from initial set, -//! starting from session 2. - -#![warn(missing_docs)] -#![cfg_attr(not(feature = "std"), no_std)] - -use frame_support::traits::{ValidatorSet, ValidatorSetWithIdentification}; -use sp_std::prelude::*; - -pub use pallet::*; - -#[frame_support::pallet] -pub mod pallet { - use super::*; - use frame_support::pallet_prelude::*; - use frame_system::pallet_prelude::*; - - #[pallet::config] - #[pallet::disable_frame_system_supertrait_check] - pub trait Config: pallet_session::Config {} - - #[pallet::pallet] - #[pallet::without_storage_info] - pub struct Pallet(PhantomData); - - #[pallet::hooks] - impl Hooks> for Pallet {} - - #[pallet::call] - impl Pallet {} - - /// Validators of first two sessions. - #[pallet::storage] - pub(super) type InitialValidators = StorageValue<_, Vec>; -} - -impl ValidatorSet for Pallet { - type ValidatorId = T::ValidatorId; - type ValidatorIdOf = T::ValidatorIdOf; - - fn session_index() -> sp_staking::SessionIndex { - pallet_session::Pallet::::current_index() - } - - fn validators() -> Vec { - pallet_session::Pallet::::validators() - } -} - -impl ValidatorSetWithIdentification for Pallet { - type Identification = (); - type IdentificationOf = (); -} - -impl pallet_session::SessionManager for Pallet { - fn end_session(_: sp_staking::SessionIndex) {} - fn start_session(_: sp_staking::SessionIndex) {} - fn new_session(session_index: sp_staking::SessionIndex) -> Option> { - // we don't want to add even more fields to genesis config => just return None - if session_index == 0 || session_index == 1 { - return None - } - - // the idea that on first call (i.e. when session 1 ends) we're reading current - // set of validators from session module (they are initial validators) and save - // in our 'local storage'. - // then for every session we select (deterministically) 2/3 of these initial - // validators to serve validators of new session - let available_validators = InitialValidators::::get().unwrap_or_else(|| { - let validators = >::validators(); - InitialValidators::::put(validators.clone()); - validators - }); - - Some(Self::select_validators(session_index, &available_validators)) - } -} - -impl Pallet { - /// Select validators for session. - fn select_validators( - session_index: sp_staking::SessionIndex, - available_validators: &[T::ValidatorId], - ) -> Vec { - let available_validators_count = available_validators.len(); - let count = sp_std::cmp::max(1, 2 * available_validators_count / 3); - let offset = session_index as usize % available_validators_count; - let end = offset + count; - let session_validators = match end.overflowing_sub(available_validators_count) { - (wrapped_end, false) if wrapped_end != 0 => available_validators[offset..] - .iter() - .chain(available_validators[..wrapped_end].iter()) - .cloned() - .collect(), - _ => available_validators[offset..end].to_vec(), - }; - - session_validators - } -} - -#[cfg(test)] -mod tests { - // From construct_runtime macro - #![allow(clippy::from_over_into)] - - use super::*; - use frame_support::{ - parameter_types, - sp_runtime::{ - testing::UintAuthorityId, - traits::{BlakeTwo256, ConvertInto, IdentityLookup}, - BuildStorage, Perbill, RuntimeAppPublic, - }, - weights::Weight, - }; - use sp_core::H256; - use sp_io::TestExternalities; - use sp_state_machine::BasicExternalities; - - type AccountId = u64; - - type Block = frame_system::mocking::MockBlock; - - frame_support::construct_runtime! { - pub enum TestRuntime { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Session: pallet_session::{Pallet}, - } - } - - parameter_types! { - pub const MaximumBlockWeight: Weight = Weight::from_parts(1024, 0); - pub const MaximumBlockLength: u32 = 2 * 1024; - pub const AvailableBlockRatio: Perbill = Perbill::one(); - } - - impl frame_system::Config for TestRuntime { - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = AccountId; - type Lookup = IdentityLookup; - type Block = Block; - type RuntimeEvent = (); - type BlockHashCount = frame_support::traits::ConstU64<250>; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = (); - type OnNewAccount = (); - type OnKilledAccount = (); - type BaseCallFilter = frame_support::traits::Everything; - type SystemWeightInfo = (); - type BlockWeights = (); - type BlockLength = (); - type DbWeight = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; - } - - parameter_types! { - pub const Period: u64 = 1; - pub const Offset: u64 = 0; - } - - impl pallet_session::Config for TestRuntime { - type RuntimeEvent = (); - type ValidatorId = ::AccountId; - type ValidatorIdOf = ConvertInto; - type ShouldEndSession = pallet_session::PeriodicSessions; - type NextSessionRotation = pallet_session::PeriodicSessions; - type SessionManager = (); - type SessionHandler = TestSessionHandler; - type Keys = UintAuthorityId; - type WeightInfo = (); - } - - impl Config for TestRuntime {} - - pub struct TestSessionHandler; - impl pallet_session::SessionHandler for TestSessionHandler { - const KEY_TYPE_IDS: &'static [sp_runtime::KeyTypeId] = &[UintAuthorityId::ID]; - - fn on_genesis_session(_validators: &[(AccountId, Ks)]) { - } - - fn on_new_session( - _: bool, - _: &[(AccountId, Ks)], - _: &[(AccountId, Ks)], - ) { - } - - fn on_disabled(_: u32) {} - } - - fn new_test_ext() -> TestExternalities { - let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); - - let keys = vec![ - (1, 1, UintAuthorityId(1)), - (2, 2, UintAuthorityId(2)), - (3, 3, UintAuthorityId(3)), - (4, 4, UintAuthorityId(4)), - (5, 5, UintAuthorityId(5)), - ]; - - BasicExternalities::execute_with_storage(&mut t, || { - for (ref k, ..) in &keys { - frame_system::Pallet::::inc_providers(k); - } - }); - - pallet_session::GenesisConfig:: { keys } - .assimilate_storage(&mut t) - .unwrap(); - TestExternalities::new(t) - } - - #[test] - fn shift_session_manager_works() { - new_test_ext().execute_with(|| { - let all_accs = vec![1, 2, 3, 4, 5]; - - // at least 1 validator is selected - assert_eq!(Pallet::::select_validators(0, &[1]), vec![1],); - - // at session#0, shift is also 0 - assert_eq!(Pallet::::select_validators(0, &all_accs), vec![1, 2, 3],); - - // at session#1, shift is also 1 - assert_eq!(Pallet::::select_validators(1, &all_accs), vec![2, 3, 4],); - - // at session#3, we're wrapping - assert_eq!(Pallet::::select_validators(3, &all_accs), vec![4, 5, 1],); - - // at session#5, we're starting from the beginning again - assert_eq!(Pallet::::select_validators(5, &all_accs), vec![1, 2, 3],); - }); - } -} diff --git a/modules/xcm-bridge-hub-router/Cargo.toml b/modules/xcm-bridge-hub-router/Cargo.toml index db0aa639a0309d3a24619dcbcb7f40801b1386bb..39c2887d368a5b21f2e738982e0533b16be5a6af 100644 --- a/modules/xcm-bridge-hub-router/Cargo.toml +++ b/modules/xcm-bridge-hub-router/Cargo.toml @@ -6,6 +6,9 @@ authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } log = { version = "0.4.20", default-features = false } @@ -34,7 +37,7 @@ sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } [features] -default = [ "std" ] +default = ["std"] std = [ "bp-xcm-bridge-hub/std", "codec/std", diff --git a/modules/xcm-bridge-hub-router/src/benchmarking.rs b/modules/xcm-bridge-hub-router/src/benchmarking.rs index 79e15df5ca859d21426e2a250201de6fab4a07d5..9abbf3219feb21f04c9d126bc059f029e734be5b 100644 --- a/modules/xcm-bridge-hub-router/src/benchmarking.rs +++ b/modules/xcm-bridge-hub-router/src/benchmarking.rs @@ -20,7 +20,7 @@ use crate::{DeliveryFeeFactor, MINIMAL_DELIVERY_FEE_FACTOR}; -use frame_benchmarking::benchmarks_instance_pallet; +use frame_benchmarking::v2::*; use frame_support::traits::Hooks; use sp_runtime::traits::Zero; @@ -33,17 +33,32 @@ pub trait Config: crate::Config { fn make_congested(); } -benchmarks_instance_pallet! { - on_initialize_when_non_congested { +#[instance_benchmarks] +mod benchmarks { + use super::*; + + /// Benchmark `on_initialize` when the bridge is not congested. + #[benchmark] + fn on_initialize_when_non_congested() { DeliveryFeeFactor::::put(MINIMAL_DELIVERY_FEE_FACTOR + MINIMAL_DELIVERY_FEE_FACTOR); - }: { - crate::Pallet::::on_initialize(Zero::zero()) + + #[block] + { + crate::Pallet::::on_initialize(Zero::zero()); + } } - on_initialize_when_congested { + /// Benchmark `on_initialize` when the bridge is congested. + #[benchmark] + fn on_initialize_when_congested() { DeliveryFeeFactor::::put(MINIMAL_DELIVERY_FEE_FACTOR + MINIMAL_DELIVERY_FEE_FACTOR); T::make_congested(); - }: { - crate::Pallet::::on_initialize(Zero::zero()) + + #[block] + { + crate::Pallet::::on_initialize(Zero::zero()); + } } + + impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::TestRuntime); } diff --git a/modules/xcm-bridge-hub-router/src/lib.rs b/modules/xcm-bridge-hub-router/src/lib.rs index b24a365005a1137e2c01020dff9e719c2fac7ebf..7571300b65b6f2bf629e71901f81579a5e942061 100644 --- a/modules/xcm-bridge-hub-router/src/lib.rs +++ b/modules/xcm-bridge-hub-router/src/lib.rs @@ -76,13 +76,16 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { + /// The overarching event type. + type RuntimeEvent: From> + + IsType<::RuntimeEvent>; /// Benchmarks results from runtime we're plugged into. type WeightInfo: WeightInfo; /// Universal location of this runtime. - type UniversalLocation: Get; + type UniversalLocation: Get; /// Relative location of the sibling bridge hub. - type SiblingBridgeHubLocation: Get; + type SiblingBridgeHubLocation: Get; /// The bridged network that this config is for if specified. /// Also used for filtering `Bridges` by `BridgedNetworkId`. /// If not specified, allows all networks pass through. @@ -91,6 +94,8 @@ pub mod pallet { /// **possible fee**. Allows to externalize better control over allowed **bridged /// networks/locations**. type Bridges: ExporterFor; + /// Checks the XCM version for the destination. + type DestinationVersion: GetVersion; /// Actual message sender (`HRMP` or `DMP`) to the sibling bridge hub location. type ToBridgeHubSender: SendXcm; @@ -129,6 +134,9 @@ pub mod pallet { previous_factor, delivery_fee_factor, ); + Self::deposit_event(Event::DeliveryFeeFactorDecreased { + new_value: delivery_fee_factor, + }); DeliveryFeeFactor::::put(delivery_fee_factor); T::WeightInfo::on_initialize_when_non_congested() @@ -197,10 +205,26 @@ pub mod pallet { previous_factor, f, ); + Self::deposit_event(Event::DeliveryFeeFactorIncreased { new_value: *f }); *f }); } } + + #[pallet::event] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event, I: 'static = ()> { + /// Delivery fee factor has been decreased. + DeliveryFeeFactorDecreased { + /// New value of the `DeliveryFeeFactor`. + new_value: FixedU128, + }, + /// Delivery fee factor has been increased. + DeliveryFeeFactorIncreased { + /// New value of the `DeliveryFeeFactor`. + new_value: FixedU128, + }, + } } /// We'll be using `SovereignPaidRemoteExporter` to send remote messages over the sibling/child @@ -216,9 +240,9 @@ type ViaBridgeHubExporter = SovereignPaidRemoteExporter< impl, I: 'static> ExporterFor for Pallet { fn exporter_for( network: &NetworkId, - remote_location: &InteriorMultiLocation, + remote_location: &InteriorLocation, message: &Xcm<()>, - ) -> Option<(MultiLocation, Option)> { + ) -> Option<(Location, Option)> { // ensure that the message is sent to the expected bridged network (if specified). if *network != T::BridgedNetworkId::get() { log::trace!( @@ -261,7 +285,7 @@ impl, I: 'static> ExporterFor for Pallet { // take `base_fee` from `T::Brides`, but it has to be the same `T::FeeAsset` let base_fee = match maybe_payment { Some(payment) => match payment { - MultiAsset { fun: Fungible(amount), id } if id.eq(&T::FeeAsset::get()) => amount, + Asset { fun: Fungible(amount), id } if id.eq(&T::FeeAsset::get()) => amount, invalid_asset => { log::error!( target: LOG_TARGET, @@ -309,15 +333,16 @@ impl, I: 'static> SendXcm for Pallet { type Ticket = (u32, ::Ticket); fn validate( - dest: &mut Option, + dest: &mut Option, xcm: &mut Option>, ) -> SendResult { - // we won't have an access to `dest` and `xcm` in the `delvier` method, so precompute + // `dest` and `xcm` are required here + let dest_ref = dest.as_ref().ok_or(SendError::MissingArgument)?; + let xcm_ref = xcm.as_ref().ok_or(SendError::MissingArgument)?; + + // we won't have an access to `dest` and `xcm` in the `deliver` method, so precompute // everything required here - let message_size = xcm - .as_ref() - .map(|xcm| xcm.encoded_size() as _) - .ok_or(SendError::MissingArgument)?; + let message_size = xcm_ref.encoded_size() as _; // bridge doesn't support oversized/overweight messages now. So it is better to drop such // messages here than at the bridge hub. Let's check the message size. @@ -325,10 +350,22 @@ impl, I: 'static> SendXcm for Pallet { return Err(SendError::ExceedsMaxMessageSize) } + // We need to ensure that the known `dest`'s XCM version can comprehend the current `xcm` + // program. This may seem like an additional, unnecessary check, but it is not. A similar + // check is probably performed by the `ViaBridgeHubExporter`, which attempts to send a + // versioned message to the sibling bridge hub. However, the local bridge hub may have a + // higher XCM version than the remote `dest`. Once again, it is better to discard such + // messages here than at the bridge hub (e.g., to avoid losing funds). + let destination_version = T::DestinationVersion::get_version_for(dest_ref) + .ok_or(SendError::DestinationUnsupported)?; + let _ = VersionedXcm::from(xcm_ref.clone()) + .into_version(destination_version) + .map_err(|()| SendError::DestinationUnsupported)?; + // just use exporter to validate destination and insert instructions to pay message fee // at the sibling/child bridge hub // - // the cost will include both cost of: (1) to-sibling bridg hub delivery (returned by + // the cost will include both cost of: (1) to-sibling bridge hub delivery (returned by // the `Config::ToBridgeHubSender`) and (2) to-bridged bridge hub delivery (returned by // `Self::exporter_for`) ViaBridgeHubExporter::::validate(dest, xcm) @@ -354,6 +391,7 @@ mod tests { use mock::*; use frame_support::traits::Hooks; + use frame_system::{EventRecord, Phase}; use sp_runtime::traits::One; #[test] @@ -373,13 +411,16 @@ mod tests { let old_delivery_fee_factor = XcmBridgeHubRouter::delivery_fee_factor(); XcmBridgeHubRouter::on_initialize(One::one()); assert_eq!(XcmBridgeHubRouter::delivery_fee_factor(), old_delivery_fee_factor); + + assert_eq!(System::events(), vec![]); }) } #[test] fn fee_factor_is_decreased_from_on_initialize_when_queue_is_uncongested() { run_test(|| { - DeliveryFeeFactor::::put(FixedU128::from_rational(125, 100)); + let initial_fee_factor = FixedU128::from_rational(125, 100); + DeliveryFeeFactor::::put(initial_fee_factor); // it shold eventually decreased to one while XcmBridgeHubRouter::delivery_fee_factor() > MINIMAL_DELIVERY_FEE_FACTOR { @@ -389,6 +430,19 @@ mod tests { // verify that it doesn't decreases anymore XcmBridgeHubRouter::on_initialize(One::one()); assert_eq!(XcmBridgeHubRouter::delivery_fee_factor(), MINIMAL_DELIVERY_FEE_FACTOR); + + // check emitted event + let first_system_event = System::events().first().cloned(); + assert_eq!( + first_system_event, + Some(EventRecord { + phase: Phase::Initialization, + event: RuntimeEvent::XcmBridgeHubRouter(Event::DeliveryFeeFactorDecreased { + new_value: initial_fee_factor / EXPONENTIAL_FEE_BASE, + }), + topics: vec![], + }) + ); }) } @@ -397,7 +451,7 @@ mod tests { run_test(|| { assert_eq!( send_xcm::( - MultiLocation::new(2, X2(GlobalConsensus(Rococo), Parachain(1000))), + Location::new(2, [GlobalConsensus(Rococo), Parachain(1000)]), vec![].into(), ), Err(SendError::NotApplicable), @@ -410,7 +464,7 @@ mod tests { run_test(|| { assert_eq!( send_xcm::( - MultiLocation::new(2, X2(GlobalConsensus(Rococo), Parachain(1000))), + Location::new(2, [GlobalConsensus(Rococo), Parachain(1000)]), vec![ClearOrigin; HARD_MESSAGE_SIZE_LIMIT as usize].into(), ), Err(SendError::ExceedsMaxMessageSize), @@ -418,17 +472,30 @@ mod tests { }); } + #[test] + fn destination_unsupported_if_wrap_version_fails() { + run_test(|| { + assert_eq!( + send_xcm::( + UnknownXcmVersionLocation::get(), + vec![ClearOrigin].into(), + ), + Err(SendError::DestinationUnsupported), + ); + }); + } + #[test] fn returns_proper_delivery_price() { run_test(|| { - let dest = MultiLocation::new(2, X1(GlobalConsensus(BridgedNetworkId::get()))); + let dest = Location::new(2, [GlobalConsensus(BridgedNetworkId::get())]); let xcm: Xcm<()> = vec![ClearOrigin].into(); let msg_size = xcm.encoded_size(); // initially the base fee is used: `BASE_FEE + BYTE_FEE * msg_size + HRMP_FEE` let expected_fee = BASE_FEE + BYTE_FEE * (msg_size as u128) + HRMP_FEE; assert_eq!( - XcmBridgeHubRouter::validate(&mut Some(dest), &mut Some(xcm.clone())) + XcmBridgeHubRouter::validate(&mut Some(dest.clone()), &mut Some(xcm.clone())) .unwrap() .1 .get(0), @@ -457,10 +524,7 @@ mod tests { let old_delivery_fee_factor = XcmBridgeHubRouter::delivery_fee_factor(); assert_eq!( send_xcm::( - MultiLocation::new( - 2, - X2(GlobalConsensus(BridgedNetworkId::get()), Parachain(1000)) - ), + Location::new(2, [GlobalConsensus(BridgedNetworkId::get()), Parachain(1000)]), vec![ClearOrigin].into(), ) .map(drop), @@ -469,6 +533,8 @@ mod tests { assert!(TestToBridgeHubSender::is_message_sent()); assert_eq!(old_delivery_fee_factor, XcmBridgeHubRouter::delivery_fee_factor()); + + assert_eq!(System::events(), vec![]); }); } @@ -480,10 +546,7 @@ mod tests { let old_delivery_fee_factor = XcmBridgeHubRouter::delivery_fee_factor(); assert_eq!( send_xcm::( - MultiLocation::new( - 2, - X2(GlobalConsensus(BridgedNetworkId::get()), Parachain(1000)) - ), + Location::new(2, [GlobalConsensus(BridgedNetworkId::get()), Parachain(1000)]), vec![ClearOrigin].into(), ) .map(drop), @@ -492,6 +555,19 @@ mod tests { assert!(TestToBridgeHubSender::is_message_sent()); assert!(old_delivery_fee_factor < XcmBridgeHubRouter::delivery_fee_factor()); + + // check emitted event + let first_system_event = System::events().first().cloned(); + assert!(matches!( + first_system_event, + Some(EventRecord { + phase: Phase::Initialization, + event: RuntimeEvent::XcmBridgeHubRouter( + Event::DeliveryFeeFactorIncreased { .. } + ), + .. + }) + )); }); } } diff --git a/modules/xcm-bridge-hub-router/src/mock.rs b/modules/xcm-bridge-hub-router/src/mock.rs index fdd14e0d6bcfa2695f2ca0cd176d76e5dc651b31..8dacd6ebd6d78bc9544f9490b5b882571c731fb8 100644 --- a/modules/xcm-bridge-hub-router/src/mock.rs +++ b/modules/xcm-bridge-hub-router/src/mock.rs @@ -19,16 +19,14 @@ use crate as pallet_xcm_bridge_hub_router; use bp_xcm_bridge_hub::{BridgeId, LocalXcmChannelManager}; -use frame_support::{construct_runtime, parameter_types}; -use sp_core::H256; -use sp_runtime::{ - traits::{BlakeTwo256, ConstU128, IdentityLookup}, - BuildStorage, +use frame_support::{ + construct_runtime, derive_impl, parameter_types, + traits::{Contains, Equals}, }; +use sp_runtime::{traits::ConstU128, BuildStorage}; use xcm::prelude::*; use xcm_builder::{NetworkExportTable, NetworkExportTableItem}; -pub type AccountId = u64; type Block = frame_system::mocking::MockBlock; /// HRMP fee. @@ -42,16 +40,16 @@ construct_runtime! { pub enum TestRuntime { System: frame_system::{Pallet, Call, Config, Storage, Event}, - XcmBridgeHubRouter: pallet_xcm_bridge_hub_router::{Pallet, Storage}, + XcmBridgeHubRouter: pallet_xcm_bridge_hub_router::{Pallet, Storage, Event}, } } parameter_types! { pub ThisNetworkId: NetworkId = Polkadot; pub BridgedNetworkId: NetworkId = Kusama; - pub UniversalLocation: InteriorMultiLocation = X2(GlobalConsensus(ThisNetworkId::get()), Parachain(1000)); - pub SiblingBridgeHubLocation: MultiLocation = ParentThen(X1(Parachain(1002))).into(); - pub BridgeFeeAsset: AssetId = MultiLocation::parent().into(); + pub UniversalLocation: InteriorLocation = [GlobalConsensus(ThisNetworkId::get()), Parachain(1000)].into(); + pub SiblingBridgeHubLocation: Location = ParentThen([Parachain(1002)].into()).into(); + pub BridgeFeeAsset: AssetId = Location::parent().into(); pub BridgeTable: Vec = vec![ NetworkExportTableItem::new( @@ -61,41 +59,24 @@ parameter_types! { Some((BridgeFeeAsset::get(), BASE_FEE).into()) ) ]; + pub UnknownXcmVersionLocation: Location = Location::new(2, [GlobalConsensus(BridgedNetworkId::get()), Parachain(9999)]); } +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for TestRuntime { - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; type Block = Block; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = frame_support::traits::ConstU64<250>; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = (); - type OnNewAccount = (); - type OnKilledAccount = (); - type BaseCallFilter = frame_support::traits::Everything; - type SystemWeightInfo = (); - type BlockWeights = (); - type BlockLength = (); - type DbWeight = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; } impl pallet_xcm_bridge_hub_router::Config<()> for TestRuntime { + type RuntimeEvent = RuntimeEvent; type WeightInfo = (); type UniversalLocation = UniversalLocation; type SiblingBridgeHubLocation = SiblingBridgeHubLocation; type BridgedNetworkId = BridgedNetworkId; type Bridges = NetworkExportTable; + type DestinationVersion = + LatestOrNoneForLocationVersionChecker>; type ToBridgeHubSender = TestToBridgeHubSender; type LocalXcmChannelManager = TestLocalXcmChannelManager; @@ -104,6 +85,25 @@ impl pallet_xcm_bridge_hub_router::Config<()> for TestRuntime { type FeeAsset = BridgeFeeAsset; } +#[cfg(feature = "runtime-benchmarks")] +impl pallet_xcm_bridge_hub_router::benchmarking::Config<()> for TestRuntime { + fn make_congested() { + TestLocalXcmChannelManager::make_congested(); + } +} + +pub struct LatestOrNoneForLocationVersionChecker(sp_std::marker::PhantomData); +impl> GetVersion + for LatestOrNoneForLocationVersionChecker +{ + fn get_version_for(dest: &Location) -> Option { + if LocationValue::contains(dest) { + return None + } + Some(XCM_VERSION) + } +} + pub struct TestToBridgeHubSender; impl TestToBridgeHubSender { @@ -116,7 +116,7 @@ impl SendXcm for TestToBridgeHubSender { type Ticket = (); fn validate( - _destination: &mut Option, + _destination: &mut Option, _message: &mut Option>, ) -> SendResult { Ok(((), (BridgeFeeAsset::get(), HRMP_FEE).into())) @@ -139,15 +139,15 @@ impl TestLocalXcmChannelManager { impl LocalXcmChannelManager for TestLocalXcmChannelManager { type Error = (); - fn is_congested(_with: &MultiLocation) -> bool { + fn is_congested(_with: &Location) -> bool { frame_support::storage::unhashed::get_or_default(b"TestLocalXcmChannelManager.Congested") } - fn suspend_bridge(_with: &MultiLocation, _bridge: BridgeId) -> Result<(), Self::Error> { + fn suspend_bridge(_with: &Location, _bridge: BridgeId) -> Result<(), Self::Error> { Ok(()) } - fn resume_bridge(_with: &MultiLocation, _bridge: BridgeId) -> Result<(), Self::Error> { + fn resume_bridge(_with: &Location, _bridge: BridgeId) -> Result<(), Self::Error> { Ok(()) } } @@ -160,5 +160,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(|| { + System::set_block_number(1); + System::reset_events(); + + test() + }) } diff --git a/modules/xcm-bridge-hub-router/src/weights.rs b/modules/xcm-bridge-hub-router/src/weights.rs index 7abfef6e0be57359cb69b6eb0d9d5296a9650427..e0b439072992c747457555e571ca8240d84cbf4d 100644 --- a/modules/xcm-bridge-hub-router/src/weights.rs +++ b/modules/xcm-bridge-hub-router/src/weights.rs @@ -23,7 +23,7 @@ //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/millau-bridge-node +// target/release/rip-bridge-node // benchmark // pallet // --chain=dev diff --git a/modules/xcm-bridge-hub/Cargo.toml b/modules/xcm-bridge-hub/Cargo.toml index 8d167df94b80999527f9222178ed18bb09f431ff..9eab39178f62af431b5037e6bfe565274118fd63 100644 --- a/modules/xcm-bridge-hub/Cargo.toml +++ b/modules/xcm-bridge-hub/Cargo.toml @@ -2,9 +2,11 @@ name = "pallet-xcm-bridge-hub" description = "Module that adds dynamic bridges/lanes support to XCM infrastucture at the bridge hub." version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2021" -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +authors.workspace = true +edition.workspace = true + +[lints] +workspace = true [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } diff --git a/modules/xcm-bridge-hub/src/dispatcher.rs b/modules/xcm-bridge-hub/src/dispatcher.rs index c67a29fd2dfa16dcbd667e697534fcc7150877fc..f88a825e41bb0022a05eb71eaa1db69ec26b15ab 100644 --- a/modules/xcm-bridge-hub/src/dispatcher.rs +++ b/modules/xcm-bridge-hub/src/dispatcher.rs @@ -63,7 +63,7 @@ where let bridge_id = BridgeId::from_lane_id(lane); Pallet::::bridge(bridge_id) .and_then(|bridge| bridge.bridge_origin_relative_location.try_as().cloned().ok()) - .map(|recipient: MultiLocation| !T::LocalXcmChannelManager::is_congested(&recipient)) + .map(|recipient: Location| !T::LocalXcmChannelManager::is_congested(&recipient)) .unwrap_or(false) } @@ -134,7 +134,7 @@ mod tests { Bridges::::insert( bridge_id(), Bridge { - bridge_origin_relative_location: Box::new(MultiLocation::new(0, Here).into()), + bridge_origin_relative_location: Box::new(Location::new(0, Here).into()), state: BridgeState::Opened, bridge_owner_account: [0u8; 32].into(), reserve: 0, diff --git a/modules/xcm-bridge-hub/src/exporter.rs b/modules/xcm-bridge-hub/src/exporter.rs index 31982da8c53037dfac10ffe6330a23868cddc5c0..025291587766d0c852e8bb87f073fd59bacb124b 100644 --- a/modules/xcm-bridge-hub/src/exporter.rs +++ b/modules/xcm-bridge-hub/src/exporter.rs @@ -45,7 +45,8 @@ const OUTBOUND_LANE_UNCONGESTED_THRESHOLD: MessageNonce = 1_024; /// An easy way to access `HaulBlobExporter`. pub type PalletAsHaulBlobExporter = HaulBlobExporter< DummyHaulBlob, - >::BridgedNetworkId, + >::BridgedNetwork, + >::DestinationVersion, >::MessageExportPrice, >; /// An easy way to access associated messages pallet. @@ -53,20 +54,22 @@ type MessagesPallet = BridgeMessagesPallet>::BridgeMess impl, I: 'static> ExportXcm for Pallet where - T: BridgeMessagesConfig< - >::BridgeMessagesPalletInstance, - OutboundPayload = XcmAsPlainPayload, - >, + T: BridgeMessagesConfig, { - type Ticket = (BridgeId, BridgeOf, XcmAsPlainPayload, XcmHash); + type Ticket = ( + BridgeId, + BridgeOf, + as MessagesBridge>::SendMessageArgs, + XcmHash, + ); fn validate( network: NetworkId, channel: u32, - universal_source: &mut Option, - destination: &mut Option, + universal_source: &mut Option, + destination: &mut Option, message: &mut Option>, - ) -> Result<(Self::Ticket, MultiAssets), SendError> { + ) -> Result<(Self::Ticket, Assets), SendError> { // `HaulBlobExporter` may consume the `universal_source` and `destination` arguments, so // let's save them before let bridge_origin_universal_location = @@ -74,6 +77,18 @@ where let bridge_destination_universal_location = destination.clone().take().ok_or(SendError::MissingArgument)?; + // prepare the origin relative location + let bridge_origin_relative_location = + bridge_origin_universal_location.relative_to(&T::UniversalLocation::get()); + + // then we are able to compute the lane id used to send messages + let locations = Self::bridge_locations( + Box::new(bridge_origin_relative_location), + Box::new(bridge_destination_universal_location.into()), + ) + .map_err(|_| SendError::NotApplicable)?; + let bridge = Self::bridge(locations.bridge_id).ok_or(SendError::NotApplicable)?; + // check if we are able to route the message. We use existing `HaulBlobExporter` for that. // It will make all required changes and will encode message properly, so that the // `DispatchBlob` at the bridged bridge hub will be able to decode it @@ -85,50 +100,37 @@ where message, )?; - // prepare the origin relative location - let bridge_origin_relative_location = - bridge_origin_universal_location.relative_to(&T::UniversalLocation::get()); - - // then we are able to compute the lane id used to send messages - let locations = Self::bridge_locations( - Box::new(bridge_origin_relative_location), - Box::new(bridge_destination_universal_location.into()), - ) - .map_err(|_| SendError::Unroutable)?; - let bridge = Self::bridge(locations.bridge_id).ok_or(SendError::Unroutable)?; - - Ok(((locations.bridge_id, bridge, blob, id), price)) + let bridge_message = + MessagesPallet::::validate_message(locations.bridge_id.lane_id(), &blob) + .map_err(|e| { + log::debug!( + target: LOG_TARGET, + "XCM message {:?} cannot be exported because of bridge error {:?} on bridge {:?}", + id, + e, + locations.bridge_id, + ); + SendError::Transport("BridgeValidateError") + })?; + + Ok(((locations.bridge_id, bridge, bridge_message, id), price)) } fn deliver( - (bridge_id, bridge, blob, id): (BridgeId, BridgeOf, XcmAsPlainPayload, XcmHash), + (bridge_id, bridge, bridge_message, id): Self::Ticket, ) -> Result { - let send_result = MessagesPallet::::send_message(bridge_id.lane_id(), blob); + let artifacts = MessagesPallet::::send_message(bridge_message); - match send_result { - Ok(artifacts) => { - log::info!( - target: LOG_TARGET, - "XCM message {:?} has been enqueued at bridge {:?} with nonce {}", - id, - bridge_id, - artifacts.nonce, - ); + log::info!( + target: LOG_TARGET, + "XCM message {:?} has been enqueued at bridge {:?} with nonce {}", + id, + bridge_id, + artifacts.nonce, + ); - // maybe we need switch to congested state - Self::on_bridge_message_enqueued(bridge_id, bridge, artifacts.enqueued_messages); - }, - Err(error) => { - log::debug!( - target: LOG_TARGET, - "XCM message {:?} has been dropped because of bridge error {:?} on bridge {:?}", - id, - error, - bridge_id, - ); - return Err(SendError::Transport("BridgeSendError")) - }, - } + // maybe we need switch to congested state + Self::on_bridge_message_enqueued(bridge_id, bridge, artifacts.enqueued_messages); Ok(id) } @@ -299,12 +301,12 @@ mod tests { use bp_xcm_bridge_hub::{Bridge, BridgeState}; use xcm_executor::traits::export_xcm; - fn universal_source() -> InteriorMultiLocation { - X2(GlobalConsensus(RelayNetwork::get()), Parachain(SIBLING_ASSET_HUB_ID)) + fn universal_source() -> InteriorLocation { + [GlobalConsensus(RelayNetwork::get()), Parachain(SIBLING_ASSET_HUB_ID)].into() } - fn universal_destination() -> InteriorMultiLocation { - X2(GlobalConsensus(BridgedRelayNetwork::get()), Parachain(BRIDGED_ASSET_HUB_ID)) + fn universal_destination() -> InteriorLocation { + [GlobalConsensus(BridgedRelayNetwork::get()), Parachain(BRIDGED_ASSET_HUB_ID)].into() } fn open_lane_and_send_regular_message() -> BridgeId { @@ -327,7 +329,7 @@ mod tests { locations.bridge_id, Bridge { bridge_origin_relative_location: Box::new( - MultiLocation::new(1, Parachain(SIBLING_ASSET_HUB_ID)).into(), + Location::new(1, Parachain(SIBLING_ASSET_HUB_ID)).into(), ), state: BridgeState::Opened, bridge_owner_account: [0u8; 32].into(), @@ -486,6 +488,8 @@ mod tests { run_test(|| { let expected_bridge_id = BridgeId::new(&universal_source().into(), &universal_destination().into()); + let lanes_manager = LanesManagerOf::::new(); + assert!(lanes_manager.create_outbound_lane(expected_bridge_id.lane_id()).is_ok()); Bridges::::insert( expected_bridge_id, Bridge { diff --git a/modules/xcm-bridge-hub/src/lib.rs b/modules/xcm-bridge-hub/src/lib.rs index 892b157e4fcf32ed782d41b23c55c96730bf4a4f..b79db3bc68f44cd63652f109dfb95715713e0319 100644 --- a/modules/xcm-bridge-hub/src/lib.rs +++ b/modules/xcm-bridge-hub/src/lib.rs @@ -84,7 +84,7 @@ pub const LOG_TARGET: &str = "runtime::bridge-xcm"; pub mod pallet { use super::*; use frame_support::pallet_prelude::*; - use frame_system::pallet_prelude::*; + use frame_system::pallet_prelude::{BlockNumberFor, OriginFor}; #[pallet::config] #[pallet::disable_frame_system_supertrait_check] @@ -96,13 +96,13 @@ pub mod pallet { + IsType<::RuntimeEvent>; /// Runtime's universal location. - type UniversalLocation: Get; + type UniversalLocation: Get; // TODO: https://github.com/paritytech/parity-bridges-common/issues/1666 remove `ChainId` and // replace it with the `NetworkId` - then we'll be able to use // `T as pallet_bridge_messages::Config::BridgedChain::NetworkId` - /// Bridged network id. + /// Bridged network as relative location of bridged `GlobalConsensus`. #[pallet::constant] - type BridgedNetworkId: Get; + type BridgedNetwork: Get; /// Associated messages pallet instance that bridges us with the /// `BridgedNetworkId` consensus. type BridgeMessagesPalletInstance: 'static; @@ -114,7 +114,7 @@ pub mod pallet { // `Origin` and get matching `MultiLocation`??? type OpenBridgeOrigin: EnsureOrigin< ::RuntimeOrigin, - Success = MultiLocation, + Success = Location, >; /// A converter between a multi-location and a sovereign account. type BridgeOriginAccountIdConverter: ConvertLocation; @@ -131,7 +131,9 @@ pub mod pallet { /// XCM-level dispatcher for inbound bridge messages. type BlobDispatcher: DispatchBlob; /// Price of single message export to the bridged consensus (`Self::BridgedNetworkId`). - type MessageExportPrice: Get; + type MessageExportPrice: Get; + /// Checks the XCM version for the destination. + type DestinationVersion: GetVersion; } /// An alias for the bridge metadata. @@ -158,7 +160,7 @@ pub mod pallet { /// /// The caller must be within the `T::OpenBridgeOrigin` filter (presumably: a sibling /// parachain or a parent relay chain). The `bridge_destination_universal_location` must be - /// a destination within the consensus of the `T::BridgedNetworkId` network. + /// a destination within the consensus of the `T::BridgedNetwork` network. /// /// The `BridgeReserve` amount is reserved on the caller account. This reserve /// is unreserved after bridge is closed. @@ -169,7 +171,7 @@ pub mod pallet { #[pallet::weight(Weight::zero())] // TODO: https://github.com/paritytech/parity-bridges-common/issues/1760 - weights pub fn open_bridge( origin: OriginFor, - bridge_destination_universal_location: Box, + bridge_destination_universal_location: Box, ) -> DispatchResult { // check and compute required bridge locations let locations = @@ -190,7 +192,7 @@ pub mod pallet { None => { *bridge = Some(BridgeOf:: { bridge_origin_relative_location: Box::new( - locations.bridge_origin_relative_location.into(), + locations.bridge_origin_relative_location.clone().into(), ), state: BridgeState::Opened, bridge_owner_account, @@ -249,7 +251,7 @@ pub mod pallet { #[pallet::weight(Weight::zero())] // TODO: https://github.com/paritytech/parity-bridges-common/issues/1760 - weights pub fn close_bridge( origin: OriginFor, - bridge_destination_universal_location: Box, + bridge_destination_universal_location: Box, may_prune_messages: MessageNonce, ) -> DispatchResult { // compute required bridge locations @@ -354,13 +356,32 @@ pub mod pallet { } } + #[pallet::hooks] + impl, I: 'static> Hooks> for Pallet { + fn integrity_test() { + assert!( + Self::bridged_network_id().is_some(), + "Configured `T::BridgedNetwork`: {:?} does not contain `GlobalConsensus` junction with `NetworkId`", + T::BridgedNetwork::get() + ) + } + } + impl, I: 'static> Pallet { + /// Returns some `NetworkId` if contains `GlobalConsensus` junction. + fn bridged_network_id() -> Option { + match T::BridgedNetwork::get().take_first_interior() { + Some(GlobalConsensus(network)) => Some(network), + _ => None, + } + } + /// Return bridge endpoint locations and dedicated lane identifier. This method converts /// runtime `origin` argument to relative `MultiLocation` using the `T::OpenBridgeOrigin` /// converter. pub fn bridge_locations_from_origin( origin: OriginFor, - bridge_destination_universal_location: Box, + bridge_destination_universal_location: Box, ) -> Result, sp_runtime::DispatchError> { Self::bridge_locations( Box::new(T::OpenBridgeOrigin::ensure_origin(origin)?), @@ -370,8 +391,8 @@ pub mod pallet { /// Return bridge endpoint locations and dedicated lane identifier. pub fn bridge_locations( - bridge_origin_relative_location: Box, - bridge_destination_universal_location: Box, + bridge_origin_relative_location: Box, + bridge_destination_universal_location: Box, ) -> Result, sp_runtime::DispatchError> { bridge_locations( Box::new(T::UniversalLocation::get()), @@ -381,7 +402,7 @@ pub mod pallet { .try_into() .map_err(|_| Error::::UnsupportedXcmVersion)?, ), - T::BridgedNetworkId::get(), + Self::bridged_network_id().ok_or_else(|| Error::::InvalidBridgedNetwork)?, ) .map_err(|e| Error::::BridgeLocations(e).into()) } @@ -401,7 +422,7 @@ pub mod pallet { /// Keep in mind that we are **NOT** reserving any amount for the bridges, opened at /// genesis. We are **NOT** opening lanes, used by this bridge. It all must be done using /// other pallets genesis configuration or some other means. - pub opened_bridges: Vec<(MultiLocation, InteriorMultiLocation)>, + pub opened_bridges: Vec<(Location, InteriorLocation)>, /// Dummy marker. pub phantom: sp_std::marker::PhantomData<(T, I)>, } @@ -413,11 +434,11 @@ pub mod pallet { { fn build(&self) { for (bridge_origin_relative_location, bridge_destination_universal_location) in - &self.opened_bridges + self.opened_bridges.iter().cloned() { let locations = Pallet::::bridge_locations( - Box::new(*bridge_origin_relative_location), - Box::new((*bridge_destination_universal_location).into()), + Box::new(bridge_origin_relative_location), + Box::new(bridge_destination_universal_location.into()), ) .expect("Invalid genesis configuration"); let bridge_owner_account = T::BridgeOriginAccountIdConverter::convert_location( @@ -446,9 +467,9 @@ pub mod pallet { /// The bridge between two locations has been opened. BridgeOpened { /// Universal location of local bridge endpoint. - local_endpoint: Box, + local_endpoint: Box, /// Universal location of remote bridge endpoint. - remote_endpoint: Box, + remote_endpoint: Box, /// Bridge identifier. bridge_id: BridgeId, }, @@ -491,6 +512,8 @@ pub mod pallet { FailedToReserveBridgeReserve, /// The version of XCM location argument is unsupported. UnsupportedXcmVersion, + /// Invalid `T::BridgedNetwork` configuration - missing `GlobalConsensus` junction. + InvalidBridgedNetwork, } } @@ -502,6 +525,7 @@ mod tests { use bp_messages::LaneId; use frame_support::{assert_noop, assert_ok, traits::fungible::Mutate}; use frame_system::{EventRecord, Phase}; + use sp_runtime::BoundedVec; fn fund_origin_sovereign_account(locations: &BridgeLocations, balance: Balance) -> AccountId { let bridge_owner_account = @@ -513,7 +537,7 @@ mod tests { fn mock_open_bridge_from_with( origin: RuntimeOrigin, - with: InteriorMultiLocation, + with: InteriorLocation, ) -> (BridgeOf, BridgeLocations) { let reserve = BridgeReserve::get(); let locations = @@ -524,7 +548,7 @@ mod tests { let bridge = Bridge { bridge_origin_relative_location: Box::new( - locations.bridge_origin_relative_location.into(), + locations.bridge_origin_relative_location.clone().into(), ), state: BridgeState::Opened, bridge_owner_account, @@ -550,8 +574,7 @@ mod tests { lanes_manager .active_outbound_lane(lane) .unwrap() - .send_message(vec![42]) - .unwrap(); + .send_message(BoundedVec::try_from(vec![42]).expect("payload too large")); } #[test] @@ -599,7 +622,7 @@ mod tests { XcmOverBridge::open_bridge( OpenBridgeOrigin::parent_relay_chain_origin(), Box::new( - X2(GlobalConsensus(RelayNetwork::get()), Parachain(BRIDGED_ASSET_HUB_ID)) + [GlobalConsensus(RelayNetwork::get()), Parachain(BRIDGED_ASSET_HUB_ID)] .into() ), ), @@ -615,10 +638,10 @@ mod tests { XcmOverBridge::open_bridge( OpenBridgeOrigin::parent_relay_chain_origin(), Box::new( - X2( + [ GlobalConsensus(NonBridgedRelayNetwork::get()), Parachain(BRIDGED_ASSET_HUB_ID) - ) + ] .into() ), ), @@ -778,7 +801,7 @@ mod tests { // now open the bridge assert_ok!(XcmOverBridge::open_bridge( origin, - Box::new(locations.bridge_destination_universal_location.into()), + Box::new(locations.bridge_destination_universal_location.clone().into()), )); // ensure that everything has been set up in the runtime storage @@ -927,7 +950,7 @@ mod tests { // now call the `close_bridge`, which will only partially prune messages assert_ok!(XcmOverBridge::close_bridge( origin.clone(), - Box::new(locations.bridge_destination_universal_location.into()), + Box::new(locations.bridge_destination_universal_location.clone().into()), 16, ),); @@ -978,7 +1001,7 @@ mod tests { // now call the `close_bridge` again, which will only partially prune messages assert_ok!(XcmOverBridge::close_bridge( origin.clone(), - Box::new(locations.bridge_destination_universal_location.into()), + Box::new(locations.bridge_destination_universal_location.clone().into()), 8, ),); diff --git a/modules/xcm-bridge-hub/src/mock.rs b/modules/xcm-bridge-hub/src/mock.rs index fc624903bcdce457b705b3c9c727f06c033be9ef..93346cb6b58ac8cd674f7bfd0c83a9402acd5753 100644 --- a/modules/xcm-bridge-hub/src/mock.rs +++ b/modules/xcm-bridge-hub/src/mock.rs @@ -26,7 +26,7 @@ use bp_runtime::{messages::MessageDispatchResult, Chain, ChainId}; use bp_xcm_bridge_hub::{BridgeId, LocalXcmChannelManager}; use codec::Encode; use frame_support::{ - parameter_types, + derive_impl, parameter_types, traits::{EnsureOrigin, OriginTrait}, weights::RuntimeDbWeight, }; @@ -34,7 +34,7 @@ use polkadot_parachain_primitives::primitives::Sibling; use sp_core::H256; use sp_runtime::{ testing::Header as SubstrateHeader, - traits::{BlakeTwo256, ConstU32, IdentityLookup}, + traits::{BlakeTwo256, IdentityLookup}, AccountId32, BuildStorage, StateVersion, }; use xcm::prelude::*; @@ -63,46 +63,17 @@ parameter_types! { pub const ExistentialDeposit: Balance = 1; } +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for TestRuntime { - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type Block = Block; - type Hash = H256; - type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = frame_support::traits::ConstU64<250>; - type Version = (); - type PalletInfo = PalletInfo; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type BaseCallFilter = frame_support::traits::Everything; - type SystemWeightInfo = (); - type BlockWeights = (); - type BlockLength = (); - type DbWeight = DbWeight; - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type Block = Block; + type Lookup = IdentityLookup; } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for TestRuntime { - type MaxLocks = (); - type Balance = Balance; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = frame_system::Pallet; - type WeightInfo = (); - type MaxReserves = ConstU32<1>; - type ReserveIdentifier = [u8; 8]; - type RuntimeHoldReason = RuntimeHoldReason; - type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; - type MaxFreezes = ConstU32<0>; + type AccountStore = System; } impl pallet_bridge_messages::Config for TestRuntime { @@ -167,12 +138,13 @@ impl pallet_bridge_messages::WeightInfoExt for TestMessagesWeights { parameter_types! { pub const RelayNetwork: NetworkId = NetworkId::Kusama; pub const BridgedRelayNetwork: NetworkId = NetworkId::Polkadot; + pub BridgedRelayNetworkLocation: Location = (Parent, GlobalConsensus(BridgedRelayNetwork::get())).into(); pub const NonBridgedRelayNetwork: NetworkId = NetworkId::Rococo; pub const BridgeReserve: Balance = 100_000; - pub UniversalLocation: InteriorMultiLocation = X2( + pub UniversalLocation: InteriorLocation = [ GlobalConsensus(RelayNetwork::get()), Parachain(THIS_BRIDGE_HUB_ID), - ); + ].into(); pub const Penalty: Balance = 1_000; } @@ -217,33 +189,34 @@ impl OpenBridgeOrigin { } impl EnsureOrigin for OpenBridgeOrigin { - type Success = MultiLocation; + type Success = Location; fn try_origin(o: RuntimeOrigin) -> Result { let signer = o.clone().into_signer(); if signer == Self::parent_relay_chain_origin().into_signer() { - return Ok(MultiLocation { parents: 1, interior: Here }) + return Ok(Location { parents: 1, interior: Here }) } else if signer == Self::parent_relay_chain_universal_origin().into_signer() { - return Ok(MultiLocation { + return Ok(Location { parents: 2, - interior: X1(GlobalConsensus(RelayNetwork::get())), + interior: [GlobalConsensus(RelayNetwork::get())].into(), }) } else if signer == Self::sibling_parachain_universal_origin().into_signer() { - return Ok(MultiLocation { + return Ok(Location { parents: 2, - interior: X2(GlobalConsensus(RelayNetwork::get()), Parachain(SIBLING_ASSET_HUB_ID)), + interior: [GlobalConsensus(RelayNetwork::get()), Parachain(SIBLING_ASSET_HUB_ID)] + .into(), }) } else if signer == Self::origin_without_sovereign_account().into_signer() { - return Ok(MultiLocation { + return Ok(Location { parents: 1, - interior: X2(Parachain(SIBLING_ASSET_HUB_ID), OnlyChild), + interior: [Parachain(SIBLING_ASSET_HUB_ID), OnlyChild].into(), }) } let mut sibling_account = [0u8; 32]; sibling_account[..4].copy_from_slice(&SIBLING_ASSET_HUB_ID.encode()[..4]); if signer == Some(sibling_account.into()) { - return Ok(MultiLocation { parents: 1, interior: X1(Parachain(SIBLING_ASSET_HUB_ID)) }) + return Ok(Location { parents: 1, interior: [Parachain(SIBLING_ASSET_HUB_ID)].into() }) } Err(o) @@ -259,7 +232,7 @@ impl pallet_xcm_bridge_hub::Config for TestRuntime { type RuntimeEvent = RuntimeEvent; type UniversalLocation = UniversalLocation; - type BridgedNetworkId = BridgedRelayNetwork; + type BridgedNetwork = BridgedRelayNetworkLocation; type BridgeMessagesPalletInstance = (); type OpenBridgeOrigin = OpenBridgeOrigin; @@ -271,6 +244,7 @@ impl pallet_xcm_bridge_hub::Config for TestRuntime { type LocalXcmChannelManager = TestLocalXcmChannelManager; type BlobDispatcher = TestBlobDispatcher; type MessageExportPrice = (); + type DestinationVersion = AlwaysLatest; } pub struct TestLocalXcmChannelManager; @@ -292,16 +266,16 @@ impl TestLocalXcmChannelManager { impl LocalXcmChannelManager for TestLocalXcmChannelManager { type Error = (); - fn is_congested(_with: &MultiLocation) -> bool { + fn is_congested(_with: &Location) -> bool { frame_support::storage::unhashed::get_or_default(b"TestLocalXcmChannelManager.Congested") } - fn suspend_bridge(_local_origin: &MultiLocation, _bridge: BridgeId) -> Result<(), Self::Error> { + fn suspend_bridge(_local_origin: &Location, _bridge: BridgeId) -> Result<(), Self::Error> { frame_support::storage::unhashed::put(b"TestLocalXcmChannelManager.Suspended", &true); Ok(()) } - fn resume_bridge(_local_origin: &MultiLocation, _bridge: BridgeId) -> Result<(), Self::Error> { + fn resume_bridge(_local_origin: &Location, _bridge: BridgeId) -> Result<(), Self::Error> { frame_support::storage::unhashed::put(b"TestLocalXcmChannelManager.Resumed", &true); Ok(()) } @@ -415,8 +389,8 @@ impl MessageDispatch for TestMessageDispatch { } /// Location of bridged asset hub. -pub fn bridged_asset_hub_location() -> InteriorMultiLocation { - X2(GlobalConsensus(BridgedRelayNetwork::get()), Parachain(BRIDGED_ASSET_HUB_ID)) +pub fn bridged_asset_hub_location() -> InteriorLocation { + [GlobalConsensus(BridgedRelayNetwork::get()), Parachain(BRIDGED_ASSET_HUB_ID)].into() } /// Run pallet test. diff --git a/primitives/beefy/Cargo.toml b/primitives/beefy/Cargo.toml index ee1ea6fcf6d0016cd37aa3b42598fa8ac6fbe28a..1417e53b91bdb1b592ea4f5b6d4ec9c3c6421fc2 100644 --- a/primitives/beefy/Cargo.toml +++ b/primitives/beefy/Cargo.toml @@ -6,8 +6,11 @@ authors = ["Parity Technologies "] edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "bit-vec"] } +codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "bit-vec"] } scale-info = { version = "2.10.0", default-features = false, features = ["bit-vec", "derive", "serde"] } serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] } diff --git a/primitives/chain-asset-hub-rococo/Cargo.toml b/primitives/chain-asset-hub-rococo/Cargo.toml index de9cd8b0d8060db2f35705cbb44c5e2ae4002e97..c4da8ee0eafcd98050bd3cec793fe3684d614061 100644 --- a/primitives/chain-asset-hub-rococo/Cargo.toml +++ b/primitives/chain-asset-hub-rococo/Cargo.toml @@ -6,6 +6,9 @@ authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } @@ -17,7 +20,7 @@ frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = " bp-xcm-bridge-hub-router = { path = "../xcm-bridge-hub-router", default-features = false } [features] -default = [ "std" ] +default = ["std"] std = [ "bp-xcm-bridge-hub-router/std", "codec/std", diff --git a/primitives/chain-asset-hub-rococo/src/lib.rs b/primitives/chain-asset-hub-rococo/src/lib.rs index f1ea1e9c88c9ad5285d9c4561e372956638e4111..de2e9ae856d1f8756f0a2a6b9cae3da3e265e76e 100644 --- a/primitives/chain-asset-hub-rococo/src/lib.rs +++ b/primitives/chain-asset-hub-rococo/src/lib.rs @@ -34,18 +34,14 @@ pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall; #[allow(clippy::large_enum_variant)] #[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)] pub enum Call { - /// `ToWococoXcmRouter` bridge pallet. - #[codec(index = 43)] - ToWococoXcmRouter(XcmBridgeHubRouterCall), + /// `ToWestendXcmRouter` bridge pallet. + #[codec(index = 45)] + ToWestendXcmRouter(XcmBridgeHubRouterCall), } frame_support::parameter_types! { /// Some sane weight to execute `xcm::Transact(pallet-xcm-bridge-hub-router::Call::report_bridge_status)`. pub const XcmBridgeHubRouterTransactCallMaxWeight: frame_support::weights::Weight = frame_support::weights::Weight::from_parts(200_000_000, 6144); - - /// Base delivery fee to `BridgeHubRococo`. - /// (initially was calculated by test `BridgeHubRococo::can_calculate_weight_for_paid_export_message_with_reserve_transfer`) - pub const BridgeHubRococoBaseFeeInRocs: u128 = 1214739988; } /// Identifier of AssetHubRococo in the Rococo relay chain. diff --git a/primitives/chain-asset-hub-wococo/Cargo.toml b/primitives/chain-asset-hub-westend/Cargo.toml similarity index 83% rename from primitives/chain-asset-hub-wococo/Cargo.toml rename to primitives/chain-asset-hub-westend/Cargo.toml index d56205c3a125784d9874ac9108f268ac2cc19d2b..a148cf31ca7784065283f58277a0ca2084c4648b 100644 --- a/primitives/chain-asset-hub-wococo/Cargo.toml +++ b/primitives/chain-asset-hub-westend/Cargo.toml @@ -1,11 +1,14 @@ [package] -name = "bp-asset-hub-wococo" -description = "Primitives of AssetHubWococo parachain runtime." +name = "bp-asset-hub-westend" +description = "Primitives of AssetHubWestend parachain runtime." version = "0.1.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } @@ -17,7 +20,7 @@ frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = " bp-xcm-bridge-hub-router = { path = "../xcm-bridge-hub-router", default-features = false } [features] -default = [ "std" ] +default = ["std"] std = [ "bp-xcm-bridge-hub-router/std", "codec/std", diff --git a/primitives/chain-asset-hub-wococo/src/lib.rs b/primitives/chain-asset-hub-westend/src/lib.rs similarity index 74% rename from primitives/chain-asset-hub-wococo/src/lib.rs rename to primitives/chain-asset-hub-westend/src/lib.rs index 5ce66054d64aa8b0f2503c4be19895937cf7ac0e..9de1c88098942cdf7bd0684462a95ac3de412490 100644 --- a/primitives/chain-asset-hub-wococo/src/lib.rs +++ b/primitives/chain-asset-hub-westend/src/lib.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Parity Bridges Common. If not, see . -//! Module with configuration which reflects AssetHubWococo runtime setup. +//! Module with configuration which reflects AssetHubWestend runtime setup. #![cfg_attr(not(feature = "std"), no_std)] @@ -23,30 +23,26 @@ use scale_info::TypeInfo; pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall; -/// `AssetHubWococo` Runtime `Call` enum. +/// `AssetHubWestend` Runtime `Call` enum. /// -/// The enum represents a subset of possible `Call`s we can send to `AssetHubWococo` chain. +/// The enum represents a subset of possible `Call`s we can send to `AssetHubWestend` chain. /// Ideally this code would be auto-generated from metadata, because we want to /// avoid depending directly on the ENTIRE runtime just to get the encoding of `Dispatchable`s. /// /// All entries here (like pretty much in the entire file) must be kept in sync with -/// `AssetHubWococo` `construct_runtime`, so that we maintain SCALE-compatibility. +/// `AssetHubWestend` `construct_runtime`, so that we maintain SCALE-compatibility. #[allow(clippy::large_enum_variant)] #[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)] pub enum Call { /// `ToRococoXcmRouter` bridge pallet. - #[codec(index = 44)] + #[codec(index = 34)] ToRococoXcmRouter(XcmBridgeHubRouterCall), } frame_support::parameter_types! { /// Some sane weight to execute `xcm::Transact(pallet-xcm-bridge-hub-router::Call::report_bridge_status)`. pub const XcmBridgeHubRouterTransactCallMaxWeight: frame_support::weights::Weight = frame_support::weights::Weight::from_parts(200_000_000, 6144); - - /// Base delivery fee to `BridgeHubWococo`. - /// (initially was calculated by test `BridgeHubWococo::can_calculate_weight_for_paid_export_message_with_reserve_transfer`) - pub const BridgeHubWococoBaseFeeInWocs: u128 = 1214739988; } -/// Identifier of AssetHubWococo in the Wococo relay chain. -pub const ASSET_HUB_WOCOCO_PARACHAIN_ID: u32 = 1000; +/// Identifier of AssetHubWestend in the Westend relay chain. +pub const ASSET_HUB_WESTEND_PARACHAIN_ID: u32 = 1000; diff --git a/primitives/chain-bridge-hub-cumulus/Cargo.toml b/primitives/chain-bridge-hub-cumulus/Cargo.toml index 5d1fcf0fe1b0ee3fd28760f5415542233352777a..08f561b4f5cbf77d2fe10adf87839ce1a89b1923 100644 --- a/primitives/chain-bridge-hub-cumulus/Cargo.toml +++ b/primitives/chain-bridge-hub-cumulus/Cargo.toml @@ -1,11 +1,14 @@ [package] name = "bp-bridge-hub-cumulus" -description = "Primitives of BridgeHubRococo parachain runtime." +description = "Primitives for BridgeHub parachain runtimes." version = "0.1.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] # Bridge Dependencies @@ -24,7 +27,7 @@ sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "master" } [features] -default = [ "std" ] +default = ["std"] std = [ "bp-messages/std", "bp-polkadot-core/std", diff --git a/primitives/chain-bridge-hub-kusama/Cargo.toml b/primitives/chain-bridge-hub-kusama/Cargo.toml index d9fc32524c0837577beb138bd088112e0d2ed748..4e1b3a6334c8e5baab97d883c844a469c3514927 100644 --- a/primitives/chain-bridge-hub-kusama/Cargo.toml +++ b/primitives/chain-bridge-hub-kusama/Cargo.toml @@ -1,11 +1,14 @@ [package] name = "bp-bridge-hub-kusama" -description = "Primitives of BridgeHubRococo parachain runtime." +description = "Primitives of BridgeHubKusama parachain runtime." version = "0.1.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] # Bridge Dependencies @@ -21,7 +24,7 @@ sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "mas sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } [features] -default = [ "std" ] +default = ["std"] std = [ "bp-bridge-hub-cumulus/std", "bp-messages/std", diff --git a/primitives/chain-bridge-hub-polkadot/Cargo.toml b/primitives/chain-bridge-hub-polkadot/Cargo.toml index 5e3516136c82365b3587430507afc4834c7169dc..2f53cca46a8af7e7cc2b1775b2729a386db093e3 100644 --- a/primitives/chain-bridge-hub-polkadot/Cargo.toml +++ b/primitives/chain-bridge-hub-polkadot/Cargo.toml @@ -1,11 +1,14 @@ [package] name = "bp-bridge-hub-polkadot" -description = "Primitives of BridgeHubWococo parachain runtime." +description = "Primitives of BridgeHubPolkadot parachain runtime." version = "0.1.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] # Bridge Dependencies @@ -22,7 +25,7 @@ sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "mas sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } [features] -default = [ "std" ] +default = ["std"] std = [ "bp-bridge-hub-cumulus/std", "bp-messages/std", diff --git a/primitives/chain-bridge-hub-rococo/Cargo.toml b/primitives/chain-bridge-hub-rococo/Cargo.toml index 9dfedc850c8f32a69243624c8fe2a8527ab11db0..e4bbc1a08987e205eb0d7556fba3de7895749c01 100644 --- a/primitives/chain-bridge-hub-rococo/Cargo.toml +++ b/primitives/chain-bridge-hub-rococo/Cargo.toml @@ -6,6 +6,9 @@ authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] # Bridge Dependencies @@ -21,7 +24,7 @@ sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "mas sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } [features] -default = [ "std" ] +default = ["std"] std = [ "bp-bridge-hub-cumulus/std", "bp-messages/std", diff --git a/primitives/chain-bridge-hub-rococo/src/lib.rs b/primitives/chain-bridge-hub-rococo/src/lib.rs index f52e371e67738764f006442f828570b9487f1362..c001f35d7fe97ee138dee4780e96d1a97de93dc1 100644 --- a/primitives/chain-bridge-hub-rococo/src/lib.rs +++ b/primitives/chain-bridge-hub-rococo/src/lib.rs @@ -89,8 +89,25 @@ pub const WITH_BRIDGE_HUB_ROCOCO_MESSAGES_PALLET_NAME: &str = "BridgeRococoMessa /// chains. pub const WITH_BRIDGE_HUB_ROCOCO_RELAYERS_PALLET_NAME: &str = "BridgeRelayers"; -/// Pallet index of `BridgeWococoMessages: pallet_bridge_messages::`. -pub const WITH_BRIDGE_WOCOCO_MESSAGES_PALLET_INDEX: u8 = 46; +/// Pallet index of `BridgeWestendMessages: pallet_bridge_messages::`. +pub const WITH_BRIDGE_ROCOCO_TO_WESTEND_MESSAGES_PALLET_INDEX: u8 = 51; +/// Pallet index of `BridgePolkadotBulletinMessages: pallet_bridge_messages::`. +pub const WITH_BRIDGE_ROCOCO_TO_BULLETIN_MESSAGES_PALLET_INDEX: u8 = 61; decl_bridge_finality_runtime_apis!(bridge_hub_rococo); decl_bridge_messages_runtime_apis!(bridge_hub_rococo); + +frame_support::parameter_types! { + /// The XCM fee that is paid for executing XCM program (with `ExportMessage` instruction) at the Rococo + /// BridgeHub. + /// (initially was calculated by test `BridgeHubRococo::can_calculate_weight_for_paid_export_message_with_reserve_transfer` + `33%`) + pub const BridgeHubRococoBaseXcmFeeInRocs: u128 = 1_640_102_205; + + /// Transaction fee that is paid at the Rococo BridgeHub for delivering single inbound message. + /// (initially was calculated by test `BridgeHubRococo::can_calculate_fee_for_complex_message_delivery_transaction` + `33%`) + pub const BridgeHubRococoBaseDeliveryFeeInRocs: u128 = 5_651_581_649; + + /// Transaction fee that is paid at the Rococo BridgeHub for delivering single outbound message confirmation. + /// (initially was calculated by test `BridgeHubRococo::can_calculate_fee_for_complex_message_confirmation_transaction` + `33%`) + pub const BridgeHubRococoBaseConfirmationFeeInRocs: u128 = 4_045_736_577; +} diff --git a/primitives/chain-bridge-hub-wococo/Cargo.toml b/primitives/chain-bridge-hub-westend/Cargo.toml similarity index 88% rename from primitives/chain-bridge-hub-wococo/Cargo.toml rename to primitives/chain-bridge-hub-westend/Cargo.toml index 28536dce1f7caa24db810fc07db2bbd1f758a1e9..333e49883f8bcd19fce1b54b61d94ff3c9ee77b5 100644 --- a/primitives/chain-bridge-hub-wococo/Cargo.toml +++ b/primitives/chain-bridge-hub-westend/Cargo.toml @@ -1,11 +1,14 @@ [package] -name = "bp-bridge-hub-wococo" -description = "Primitives of BridgeHubWococo parachain runtime." +name = "bp-bridge-hub-westend" +description = "Primitives of BridgeHubWestend parachain runtime." version = "0.1.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] # Bridge Dependencies @@ -22,7 +25,7 @@ sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "mas sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } [features] -default = [ "std" ] +default = ["std"] std = [ "bp-bridge-hub-cumulus/std", "bp-messages/std", diff --git a/primitives/chain-bridge-hub-westend/src/lib.rs b/primitives/chain-bridge-hub-westend/src/lib.rs new file mode 100644 index 0000000000000000000000000000000000000000..29f336b6a8b0c42c1a6fdf327d66511088bb9f0f --- /dev/null +++ b/primitives/chain-bridge-hub-westend/src/lib.rs @@ -0,0 +1,103 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Parity Bridges Common. + +// Parity Bridges Common is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity Bridges Common is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity Bridges Common. If not, see . + +//! Module with configuration which reflects BridgeHubWestend runtime setup +//! (AccountId, Headers, Hashes...) + +#![cfg_attr(not(feature = "std"), no_std)] + +pub use bp_bridge_hub_cumulus::*; +use bp_messages::*; +use bp_runtime::{ + decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Parachain, +}; +use frame_support::dispatch::DispatchClass; +use sp_runtime::{RuntimeDebug, StateVersion}; + +/// BridgeHubWestend parachain. +#[derive(RuntimeDebug)] +pub struct BridgeHubWestend; + +impl Chain for BridgeHubWestend { + const ID: ChainId = *b"bhwd"; + + type BlockNumber = BlockNumber; + type Hash = Hash; + type Hasher = Hasher; + type Header = Header; + + type AccountId = AccountId; + type Balance = Balance; + type Nonce = Nonce; + type Signature = Signature; + const STATE_VERSION: StateVersion = StateVersion::V1; + + fn max_extrinsic_size() -> u32 { + *BlockLength::get().max.get(DispatchClass::Normal) + } + + fn max_extrinsic_weight() -> Weight { + BlockWeights::get() + .get(DispatchClass::Normal) + .max_extrinsic + .unwrap_or(Weight::MAX) + } +} + +impl Parachain for BridgeHubWestend { + const PARACHAIN_ID: u32 = BRIDGE_HUB_WESTEND_PARACHAIN_ID; +} + +impl ChainWithMessages for BridgeHubWestend { + const WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str = + WITH_BRIDGE_HUB_WESTEND_MESSAGES_PALLET_NAME; + + const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = + MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX; + const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = + MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; +} + +/// Identifier of BridgeHubWestend in the Westend relay chain. +pub const BRIDGE_HUB_WESTEND_PARACHAIN_ID: u32 = 1002; + +/// Name of the With-BridgeHubWestend messages pallet instance that is deployed at bridged chains. +pub const WITH_BRIDGE_HUB_WESTEND_MESSAGES_PALLET_NAME: &str = "BridgeWestendMessages"; + +/// Name of the With-BridgeHubWestend bridge-relayers pallet instance that is deployed at bridged +/// chains. +pub const WITH_BRIDGE_HUB_WESTEND_RELAYERS_PALLET_NAME: &str = "BridgeRelayers"; + +/// Pallet index of `BridgeRococoMessages: pallet_bridge_messages::`. +pub const WITH_BRIDGE_WESTEND_TO_ROCOCO_MESSAGES_PALLET_INDEX: u8 = 44; + +decl_bridge_finality_runtime_apis!(bridge_hub_westend); +decl_bridge_messages_runtime_apis!(bridge_hub_westend); + +frame_support::parameter_types! { + /// The XCM fee that is paid for executing XCM program (with `ExportMessage` instruction) at the Westend + /// BridgeHub. + /// (initially was calculated by test `BridgeHubWestend::can_calculate_weight_for_paid_export_message_with_reserve_transfer` + `33%`) + pub const BridgeHubWestendBaseXcmFeeInWnds: u128 = 492_077_333_333; + + /// Transaction fee that is paid at the Westend BridgeHub for delivering single inbound message. + /// (initially was calculated by test `BridgeHubWestend::can_calculate_fee_for_complex_message_delivery_transaction` + `33%`) + pub const BridgeHubWestendBaseDeliveryFeeInWnds: u128 = 1_695_489_961_344; + + /// Transaction fee that is paid at the Westend BridgeHub for delivering single outbound message confirmation. + /// (initially was calculated by test `BridgeHubWestend::can_calculate_fee_for_complex_message_confirmation_transaction` + `33%`) + pub const BridgeHubWestendBaseConfirmationFeeInWnds: u128 = 1_618_309_961_344; +} diff --git a/primitives/chain-bridge-hub-wococo/src/lib.rs b/primitives/chain-bridge-hub-wococo/src/lib.rs deleted file mode 100644 index 301c7f3defe13b5b5a559be7be90732bf59e4b71..0000000000000000000000000000000000000000 --- a/primitives/chain-bridge-hub-wococo/src/lib.rs +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Parity Bridges Common. - -// Parity Bridges Common is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity Bridges Common is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity Bridges Common. If not, see . - -//! Module with configuration which reflects BridgeHubWococo runtime setup -//! (AccountId, Headers, Hashes...) - -#![warn(missing_docs)] -#![cfg_attr(not(feature = "std"), no_std)] - -pub use bp_bridge_hub_cumulus::*; -use bp_messages::*; -use bp_runtime::{ - decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Parachain, -}; -use frame_support::dispatch::DispatchClass; -use sp_runtime::{RuntimeDebug, StateVersion}; - -/// BridgeHubWococo parachain. -#[derive(RuntimeDebug)] -pub struct BridgeHubWococo; - -impl Chain for BridgeHubWococo { - const ID: ChainId = *b"bhwo"; - - type BlockNumber = BlockNumber; - type Hash = Hash; - type Hasher = Hasher; - type Header = Header; - - type AccountId = AccountId; - type Balance = Balance; - type Nonce = Nonce; - type Signature = Signature; - - const STATE_VERSION: StateVersion = StateVersion::V1; - - fn max_extrinsic_size() -> u32 { - *BlockLength::get().max.get(DispatchClass::Normal) - } - - fn max_extrinsic_weight() -> Weight { - BlockWeights::get() - .get(DispatchClass::Normal) - .max_extrinsic - .unwrap_or(Weight::MAX) - } -} - -impl Parachain for BridgeHubWococo { - const PARACHAIN_ID: u32 = BRIDGE_HUB_WOCOCO_PARACHAIN_ID; -} - -impl ChainWithMessages for BridgeHubWococo { - const WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str = - WITH_BRIDGE_HUB_WOCOCO_MESSAGES_PALLET_NAME; - - const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = - MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX; - const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = - MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; -} - -/// Identifier of BridgeHubWococo in the Wococo relay chain. -pub const BRIDGE_HUB_WOCOCO_PARACHAIN_ID: u32 = 1014; - -/// Name of the With-BridgeHubWococo messages pallet instance that is deployed at bridged chains. -pub const WITH_BRIDGE_HUB_WOCOCO_MESSAGES_PALLET_NAME: &str = "BridgeWococoMessages"; - -/// Name of the With-BridgeHubWococo bridge-relayers pallet instance that is deployed at bridged -/// chains. -pub const WITH_BRIDGE_HUB_WOCOCO_RELAYERS_PALLET_NAME: &str = "BridgeRelayers"; - -/// Pallet index of `BridgeRococoMessages: pallet_bridge_messages::`. -pub const WITH_BRIDGE_ROCOCO_MESSAGES_PALLET_INDEX: u8 = 45; - -decl_bridge_finality_runtime_apis!(bridge_hub_wococo); -decl_bridge_messages_runtime_apis!(bridge_hub_wococo); diff --git a/primitives/chain-kusama/Cargo.toml b/primitives/chain-kusama/Cargo.toml index 43e98e698f608e4261c87f29bb8e3b732d7ff3f5..ec5c59e91c090eccd6dcd7e80dfbed98a10b92fa 100644 --- a/primitives/chain-kusama/Cargo.toml +++ b/primitives/chain-kusama/Cargo.toml @@ -6,6 +6,9 @@ authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] # Bridge Dependencies @@ -22,7 +25,7 @@ sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "mas sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } [features] -default = [ "std" ] +default = ["std"] std = [ "bp-header-chain/std", "bp-polkadot-core/std", diff --git a/primitives/chain-kusama/src/lib.rs b/primitives/chain-kusama/src/lib.rs index 3ed9772e9f464a81d3b639ac1e4c80500e240896..2e9085634d0b01fa3617ae6d309f3e05b66272b1 100644 --- a/primitives/chain-kusama/src/lib.rs +++ b/primitives/chain-kusama/src/lib.rs @@ -58,8 +58,8 @@ impl ChainWithGrandpa for Kusama { const MAX_AUTHORITIES_COUNT: u32 = MAX_AUTHORITIES_COUNT; const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY; - const MAX_HEADER_SIZE: u32 = MAX_HEADER_SIZE; - const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = AVERAGE_HEADER_SIZE_IN_JUSTIFICATION; + const MAX_MANDATORY_HEADER_SIZE: u32 = MAX_MANDATORY_HEADER_SIZE; + const AVERAGE_HEADER_SIZE: u32 = AVERAGE_HEADER_SIZE; } // The SignedExtension used by Kusama. diff --git a/primitives/chain-millau/Cargo.toml b/primitives/chain-millau/Cargo.toml deleted file mode 100644 index a2081cd7702237d09d6a9d5f30c2ca208fcdb023..0000000000000000000000000000000000000000 --- a/primitives/chain-millau/Cargo.toml +++ /dev/null @@ -1,62 +0,0 @@ -[package] -name = "bp-millau" -description = "Primitives of Millau runtime." -version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2021" -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" - -[dependencies] - -# TODO: Consume `fixed-hash` from crates.io when the following fix is published: -# https://github.com/paritytech/parity-common/commit/d3a9327124a66e52ca1114bb8640c02c18c134b8 -# Expected in a version > 0.8.0 -fixed-hash = { git = "https://github.com/paritytech/parity-common", branch = "master", default-features = false } -hash256-std-hasher = { version = "0.15.2", default-features = false } -impl-codec = { version = "0.6", default-features = false } -impl-serde = { version = "0.4.0", default-features = false } -parity-util-mem = { version = "0.12.0", default-features = false, features = ["primitive-types"] } -scale-info = { version = "2.10.0", default-features = false, features = ["derive", "serde"] } -serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] } - -# Bridge Dependencies - -bp-beefy = { path = "../beefy", default-features = false } -bp-header-chain = { path = "../header-chain", default-features = false } -bp-messages = { path = "../messages", default-features = false } -bp-runtime = { path = "../runtime", default-features = false } - -# Substrate Based Dependencies - -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-trie = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } - -[features] -default = [ "std" ] -std = [ - "bp-beefy/std", - "bp-header-chain/std", - "bp-messages/std", - "bp-runtime/std", - "fixed-hash/std", - "frame-support/std", - "frame-system/std", - "hash256-std-hasher/std", - "impl-codec/std", - "impl-serde/std", - "parity-util-mem/std", - "scale-info/std", - "serde/std", - "sp-api/std", - "sp-core/std", - "sp-io/std", - "sp-runtime/std", - "sp-std/std", - "sp-trie/std", -] diff --git a/primitives/chain-millau/src/lib.rs b/primitives/chain-millau/src/lib.rs deleted file mode 100644 index a1fff93f61acd92ec387c82eab4c3226979cd31e..0000000000000000000000000000000000000000 --- a/primitives/chain-millau/src/lib.rs +++ /dev/null @@ -1,265 +0,0 @@ -// 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 . - -//! Primitives of the Millau chain. - -#![warn(missing_docs)] -#![cfg_attr(not(feature = "std"), no_std)] - -mod millau_hash; - -use bp_beefy::ChainWithBeefy; -use bp_header_chain::ChainWithGrandpa; -use bp_messages::{ChainWithMessages, MessageNonce}; -use bp_runtime::{decl_bridge_finality_runtime_apis, decl_bridge_runtime_apis, Chain, ChainId}; -use frame_support::{ - dispatch::DispatchClass, - weights::{constants::WEIGHT_REF_TIME_PER_SECOND, IdentityFee, Weight}, -}; -use frame_system::limits; -use scale_info::TypeInfo; -use sp_core::{storage::StateVersion, Hasher as HasherT}; -use sp_runtime::{ - traits::{IdentifyAccount, Verify}, - MultiSignature, MultiSigner, Perbill, RuntimeDebug, -}; -use sp_std::prelude::*; -use sp_trie::{LayoutV0, LayoutV1, TrieConfiguration}; - -use serde::{Deserialize, Serialize}; -use sp_runtime::traits::Keccak256; - -pub use millau_hash::MillauHash; - -/// Number of extra bytes (excluding size of storage value itself) of storage proof, built at -/// Millau chain. This mostly depends on number of entries (and their density) in the storage trie. -/// Some reserve is reserved to account future chain growth. -pub const EXTRA_STORAGE_PROOF_SIZE: u32 = 1024; - -/// Number of bytes, included in the signed Millau transaction apart from the encoded call itself. -/// -/// Can be computed by subtracting encoded call size from raw transaction size. -pub const TX_EXTRA_BYTES: u32 = 103; - -/// Maximum weight of single Millau block. -/// -/// This represents 0.5 seconds of compute assuming a target block time of six seconds. -/// -/// Max PoV size is set to max value, since it isn't important for relay/standalone chains. -pub const MAXIMUM_BLOCK_WEIGHT: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_div(2), u64::MAX); - -/// Represents the portion of a block that will be used by Normal extrinsics. -pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); - -/// Maximal number of unrewarded relayer entries in Millau confirmation transaction. -pub const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = 128; - -/// Maximal number of unconfirmed messages in Millau confirmation transaction. -pub const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = 128; - -/// The target length of a session (how often authorities change) on Millau measured in of number of -/// blocks. -/// -/// Note that since this is a target sessions may change before/after this time depending on network -/// conditions. -pub const SESSION_LENGTH: BlockNumber = 5 * time_units::MINUTES; - -/// Maximal number of GRANDPA authorities at Millau. -pub const MAX_AUTHORITIES_COUNT: u32 = 5; - -/// Reasonable number of headers in the `votes_ancestries` on Millau chain. -/// -/// See [`bp-header-chain::ChainWithGrandpa`] for more details. -pub const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = 8; - -/// Approximate average header size in `votes_ancestries` field of justification on Millau chain. -/// -/// See [`bp-header-chain::ChainWithGrandpa`] for more details. -pub const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = 256; - -/// Approximate maximal header size on Millau chain. -/// -/// We expect maximal header to have digest item with the new authorities set for every consensus -/// engine (GRANDPA, Babe, BEEFY, ...) - so we multiply it by 3. And also -/// `AVERAGE_HEADER_SIZE_IN_JUSTIFICATION` bytes for other stuff. -/// -/// See [`bp-header-chain::ChainWithGrandpa`] for more details. -pub const MAX_HEADER_SIZE: u32 = MAX_AUTHORITIES_COUNT - .saturating_mul(3) - .saturating_add(AVERAGE_HEADER_SIZE_IN_JUSTIFICATION); - -/// Re-export `time_units` to make usage easier. -pub use time_units::*; - -/// Human readable time units defined in terms of number of blocks. -pub mod time_units { - use super::BlockNumber; - - /// Milliseconds between Millau chain blocks. - pub const MILLISECS_PER_BLOCK: u64 = 6000; - /// Slot duration in Millau chain consensus algorithms. - pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; - - /// A minute, expressed in Millau chain blocks. - pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); - /// A hour, expressed in Millau chain blocks. - pub const HOURS: BlockNumber = MINUTES * 60; - /// A day, expressed in Millau chain blocks. - pub const DAYS: BlockNumber = HOURS * 24; -} - -/// Block number type used in Millau. -pub type BlockNumber = u64; - -/// Hash type used in Millau. -pub type Hash = ::Out; - -/// Type of object that can produce hashes on Millau. -pub type Hasher = BlakeTwoAndKeccak256; - -/// The header type used by Millau. -pub type Header = sp_runtime::generic::Header; - -/// Alias to 512-bit hash when used in the context of a transaction signature on the chain. -pub type Signature = MultiSignature; - -/// Some way of identifying an account on the chain. We intentionally make it equivalent -/// to the public key of our transaction signing scheme. -pub type AccountId = <::Signer as IdentifyAccount>::AccountId; - -/// Public key of the chain account that may be used to verify signatures. -pub type AccountSigner = MultiSigner; - -/// Balance of an account. -pub type Balance = u64; - -/// Nonce of a transaction in the chain. -pub type Nonce = u32; - -/// Weight-to-Fee type used by Millau. -pub type WeightToFee = IdentityFee; - -/// Millau chain. -#[derive(RuntimeDebug)] -pub struct Millau; - -impl Chain for Millau { - const ID: ChainId = *b"mlau"; - - type BlockNumber = BlockNumber; - type Hash = Hash; - type Hasher = Hasher; - type Header = Header; - - type AccountId = AccountId; - type Balance = Balance; - type Nonce = Nonce; - type Signature = Signature; - - const STATE_VERSION: StateVersion = StateVersion::V0; - - fn max_extrinsic_size() -> u32 { - *BlockLength::get().max.get(DispatchClass::Normal) - } - - fn max_extrinsic_weight() -> Weight { - BlockWeights::get() - .get(DispatchClass::Normal) - .max_extrinsic - .unwrap_or(Weight::MAX) - } -} - -impl ChainWithGrandpa for Millau { - const WITH_CHAIN_GRANDPA_PALLET_NAME: &'static str = WITH_MILLAU_GRANDPA_PALLET_NAME; - const MAX_AUTHORITIES_COUNT: u32 = MAX_AUTHORITIES_COUNT; - const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = - REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY; - const MAX_HEADER_SIZE: u32 = MAX_HEADER_SIZE; - const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = AVERAGE_HEADER_SIZE_IN_JUSTIFICATION; -} - -impl ChainWithBeefy for Millau { - type CommitmentHasher = Keccak256; - type MmrHashing = Keccak256; - type MmrHash = ::Output; - type BeefyMmrLeafExtra = (); - type AuthorityId = bp_beefy::EcdsaValidatorId; - type AuthorityIdToMerkleLeaf = bp_beefy::BeefyEcdsaToEthereum; -} - -impl ChainWithMessages for Millau { - const WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str = WITH_MILLAU_MESSAGES_PALLET_NAME; - - const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = - MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX; - const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = - MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; -} - -/// Millau Hasher (Blake2-256 ++ Keccak-256) implementation. -#[derive(PartialEq, Eq, Clone, Copy, RuntimeDebug, TypeInfo, Serialize, Deserialize)] -pub struct BlakeTwoAndKeccak256; - -impl sp_core::Hasher for BlakeTwoAndKeccak256 { - type Out = MillauHash; - type StdHasher = hash256_std_hasher::Hash256StdHasher; - const LENGTH: usize = 64; - - fn hash(s: &[u8]) -> Self::Out { - let mut combined_hash = MillauHash::default(); - combined_hash.as_mut()[..32].copy_from_slice(&sp_io::hashing::blake2_256(s)); - combined_hash.as_mut()[32..].copy_from_slice(&sp_io::hashing::keccak_256(s)); - combined_hash - } -} - -impl sp_runtime::traits::Hash for BlakeTwoAndKeccak256 { - type Output = MillauHash; - - fn trie_root(input: Vec<(Vec, Vec)>, state_version: StateVersion) -> Self::Output { - match state_version { - StateVersion::V0 => LayoutV0::::trie_root(input), - StateVersion::V1 => LayoutV1::::trie_root(input), - } - } - - fn ordered_trie_root(input: Vec>, state_version: StateVersion) -> Self::Output { - match state_version { - StateVersion::V0 => LayoutV0::::ordered_trie_root(input), - StateVersion::V1 => LayoutV1::::ordered_trie_root(input), - } - } -} - -frame_support::parameter_types! { - /// Size limit of the Millau blocks. - pub BlockLength: limits::BlockLength = - limits::BlockLength::max_with_normal_ratio(2 * 1024 * 1024, NORMAL_DISPATCH_RATIO); - /// Weight limit of the Millau blocks. - pub BlockWeights: limits::BlockWeights = - limits::BlockWeights::with_sensible_defaults(MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO); -} - -/// Name of the With-Millau GRANDPA pallet instance that is deployed at bridged chains. -pub const WITH_MILLAU_GRANDPA_PALLET_NAME: &str = "BridgeMillauGrandpa"; -/// Name of the With-Millau messages pallet instance that is deployed at bridged chains. -pub const WITH_MILLAU_MESSAGES_PALLET_NAME: &str = "BridgeMillauMessages"; -/// Name of the transaction payment pallet at the Millau runtime. -pub const TRANSACTION_PAYMENT_PALLET_NAME: &str = "TransactionPayment"; - -decl_bridge_runtime_apis!(millau, grandpa); diff --git a/primitives/chain-millau/src/millau_hash.rs b/primitives/chain-millau/src/millau_hash.rs deleted file mode 100644 index 8851c319dd451f903a213ce503b7e7f1b42d3962..0000000000000000000000000000000000000000 --- a/primitives/chain-millau/src/millau_hash.rs +++ /dev/null @@ -1,56 +0,0 @@ -// 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 . - -use parity_util_mem::MallocSizeOf; -use scale_info::TypeInfo; -use sp_runtime::traits::CheckEqual; - -// `sp_core::H512` can't be used, because it doesn't implement `CheckEqual`, which is required -// by `frame_system::Config::Hash`. - -fixed_hash::construct_fixed_hash! { - /// Hash type used in Millau chain. - #[derive(MallocSizeOf, TypeInfo)] - pub struct MillauHash(64); -} - -impl_serde::impl_fixed_hash_serde!(MillauHash, 64); -impl_codec::impl_fixed_hash_codec!(MillauHash, 64); - -impl CheckEqual for MillauHash { - #[cfg(feature = "std")] - fn check_equal(&self, other: &Self) { - use sp_core::hexdisplay::HexDisplay; - if self != other { - println!( - "Hash: given={}, expected={}", - HexDisplay::from(self.as_fixed_bytes()), - HexDisplay::from(other.as_fixed_bytes()), - ); - } - } - - #[cfg(not(feature = "std"))] - fn check_equal(&self, other: &Self) { - use frame_support::Printable; - - if self != other { - "Hash not equal".print(); - self.as_bytes().print(); - other.as_bytes().print(); - } - } -} diff --git a/primitives/chain-polkadot-bulletin/Cargo.toml b/primitives/chain-polkadot-bulletin/Cargo.toml index 597145d683c2e1006f273bcbf579cb38c32e3294..3fe83b8cae7f691e3767f1bef94275304b361961 100644 --- a/primitives/chain-polkadot-bulletin/Cargo.toml +++ b/primitives/chain-polkadot-bulletin/Cargo.toml @@ -2,10 +2,13 @@ name = "bp-polkadot-bulletin" description = "Primitives of Polkadot Bulletin chain runtime." version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2021" +authors.workspace = true +edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } @@ -26,7 +29,7 @@ sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "mas sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } [features] -default = [ "std" ] +default = ["std"] std = [ "bp-header-chain/std", "bp-messages/std", @@ -35,6 +38,7 @@ std = [ "codec/std", "frame-support/std", "frame-system/std", + "scale-info/std", "sp-api/std", "sp-runtime/std", "sp-std/std", diff --git a/primitives/chain-polkadot-bulletin/src/lib.rs b/primitives/chain-polkadot-bulletin/src/lib.rs index 0d7bceabfaa707dc06c2e3c939a909c2d48217af..e283490056f8e55d393565b31fd81813e33b587f 100644 --- a/primitives/chain-polkadot-bulletin/src/lib.rs +++ b/primitives/chain-polkadot-bulletin/src/lib.rs @@ -44,8 +44,8 @@ use sp_runtime::{ // This chain reuses most of Polkadot primitives. pub use bp_polkadot_core::{ AccountAddress, AccountId, Balance, Block, BlockNumber, Hash, Hasher, Header, Nonce, Signature, - SignedBlock, UncheckedExtrinsic, AVERAGE_HEADER_SIZE_IN_JUSTIFICATION, - EXTRA_STORAGE_PROOF_SIZE, MAX_HEADER_SIZE, REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY, + SignedBlock, UncheckedExtrinsic, AVERAGE_HEADER_SIZE, EXTRA_STORAGE_PROOF_SIZE, + MAX_MANDATORY_HEADER_SIZE, REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY, }; /// Maximal number of GRANDPA authorities at Polkadot Bulletin chain. @@ -213,8 +213,8 @@ impl ChainWithGrandpa for PolkadotBulletin { const MAX_AUTHORITIES_COUNT: u32 = MAX_AUTHORITIES_COUNT; const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY; - const MAX_HEADER_SIZE: u32 = MAX_HEADER_SIZE; - const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = AVERAGE_HEADER_SIZE_IN_JUSTIFICATION; + const MAX_MANDATORY_HEADER_SIZE: u32 = MAX_MANDATORY_HEADER_SIZE; + const AVERAGE_HEADER_SIZE: u32 = AVERAGE_HEADER_SIZE; } impl ChainWithMessages for PolkadotBulletin { diff --git a/primitives/chain-polkadot/Cargo.toml b/primitives/chain-polkadot/Cargo.toml index 9e5cb41b780c0930c28c94cfc336918563e41266..ac7775bc339c49cc79a047167162ee1e5962654c 100644 --- a/primitives/chain-polkadot/Cargo.toml +++ b/primitives/chain-polkadot/Cargo.toml @@ -6,6 +6,9 @@ authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] # Bridge Dependencies @@ -22,7 +25,7 @@ sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "mas sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } [features] -default = [ "std" ] +default = ["std"] std = [ "bp-header-chain/std", "bp-polkadot-core/std", diff --git a/primitives/chain-polkadot/src/lib.rs b/primitives/chain-polkadot/src/lib.rs index 9087246fae8c08560292c62aaad8cc57328e2154..93783e153d4502228ee8de10ad0ce604f2963854 100644 --- a/primitives/chain-polkadot/src/lib.rs +++ b/primitives/chain-polkadot/src/lib.rs @@ -60,8 +60,8 @@ impl ChainWithGrandpa for Polkadot { const MAX_AUTHORITIES_COUNT: u32 = MAX_AUTHORITIES_COUNT; const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY; - const MAX_HEADER_SIZE: u32 = MAX_HEADER_SIZE; - const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = AVERAGE_HEADER_SIZE_IN_JUSTIFICATION; + const MAX_MANDATORY_HEADER_SIZE: u32 = MAX_MANDATORY_HEADER_SIZE; + const AVERAGE_HEADER_SIZE: u32 = AVERAGE_HEADER_SIZE; } /// The SignedExtension used by Polkadot. diff --git a/primitives/chain-rialto-parachain/Cargo.toml b/primitives/chain-rialto-parachain/Cargo.toml deleted file mode 100644 index 0122c508e2b92c026d8f336abbd1af5afcf83d41..0000000000000000000000000000000000000000 --- a/primitives/chain-rialto-parachain/Cargo.toml +++ /dev/null @@ -1,39 +0,0 @@ -[package] -name = "bp-rialto-parachain" -description = "Primitives of Rialto parachain runtime." -version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2021" -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" - -[dependencies] - -# Bridge Dependencies - -bp-bridge-hub-cumulus = { path = "../chain-bridge-hub-cumulus", default-features = false } -bp-messages = { path = "../messages", default-features = false } -bp-polkadot-core = { path = "../polkadot-core", default-features = false } -bp-runtime = { path = "../runtime", default-features = false } - -# Substrate Based Dependencies - -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } - -[features] -default = [ "std" ] -std = [ - "bp-bridge-hub-cumulus/std", - "bp-messages/std", - "bp-runtime/std", - "frame-support/std", - "frame-system/std", - "sp-api/std", - "sp-core/std", - "sp-runtime/std", - "sp-std/std", -] diff --git a/primitives/chain-rialto-parachain/src/lib.rs b/primitives/chain-rialto-parachain/src/lib.rs deleted file mode 100644 index a1ede213e8ccb0624617ace1ccd9199b1a5703a4..0000000000000000000000000000000000000000 --- a/primitives/chain-rialto-parachain/src/lib.rs +++ /dev/null @@ -1,164 +0,0 @@ -// 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 . - -//! Primitives of the Rialto parachain. - -#![warn(missing_docs)] -#![cfg_attr(not(feature = "std"), no_std)] - -use bp_messages::{ChainWithMessages, MessageNonce}; -use bp_runtime::{decl_bridge_runtime_apis, Chain, ChainId, Parachain}; -use frame_support::{ - dispatch::DispatchClass, - weights::{constants::WEIGHT_REF_TIME_PER_SECOND, IdentityFee, Weight}, -}; -use frame_system::limits; -use sp_core::Hasher as HasherT; -use sp_runtime::{ - traits::{BlakeTwo256, IdentifyAccount, Verify}, - MultiSignature, MultiSigner, Perbill, RuntimeDebug, StateVersion, -}; - -/// Identifier of RialtoParachain in the Rialto relay chain. -/// -/// This identifier is not something that is declared either by Rialto or RialtoParachain. This -/// is an identifier of registration. So in theory it may be changed. But since bridge is going -/// to be deployed after parachain registration AND since parachain de-registration is highly -/// likely impossible, it is fine to declare this constant here. -pub const RIALTO_PARACHAIN_ID: u32 = 2000; - -/// Number of extra bytes (excluding size of storage value itself) of storage proof, built at -/// RialtoParachain chain. This mostly depends on number of entries (and their density) in the -/// storage trie. Some reserve is reserved to account future chain growth. -pub const EXTRA_STORAGE_PROOF_SIZE: u32 = 1024; - -/// Can be computed by subtracting encoded call size from raw transaction size. -pub const TX_EXTRA_BYTES: u32 = 104; - -/// Maximal weight of single RialtoParachain block. -/// -/// This represents two seconds of compute assuming a target block time of six seconds. -/// -/// Max PoV size is set to `5Mb` as all Cumulus-based parachains do. -pub const MAXIMUM_BLOCK_WEIGHT: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), 5 * 1024 * 1024); - -/// Represents the portion of a block that will be used by Normal extrinsics. -pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); - -/// Maximal number of unrewarded relayer entries in Rialto confirmation transaction. -pub const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = 1024; - -/// Maximal number of unconfirmed messages in Rialto confirmation transaction. -pub const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = 1024; - -/// Block number type used in Rialto. -pub type BlockNumber = u32; - -/// Hash type used in Rialto. -pub type Hash = ::Out; - -/// The type of object that can produce hashes on Rialto. -pub type Hasher = BlakeTwo256; - -/// The header type used by Rialto. -pub type Header = sp_runtime::generic::Header; - -/// Alias to 512-bit hash when used in the context of a transaction signature on the chain. -pub type Signature = MultiSignature; - -/// Some way of identifying an account on the chain. We intentionally make it equivalent -/// to the public key of our transaction signing scheme. -pub type AccountId = <::Signer as IdentifyAccount>::AccountId; - -/// Public key of the chain account that may be used to verify signatures. -pub type AccountSigner = MultiSigner; - -/// Balance of an account. -pub type Balance = u128; - -/// An instant or duration in time. -pub type Moment = u64; - -/// Nonce of a transaction in the parachain. -pub type Nonce = u32; - -/// Weight-to-Fee type used by Rialto parachain. -pub type WeightToFee = IdentityFee; - -/// Rialto parachain. -#[derive(RuntimeDebug)] -pub struct RialtoParachain; - -impl Chain for RialtoParachain { - const ID: ChainId = *b"rlpa"; - - type BlockNumber = BlockNumber; - type Hash = Hash; - type Hasher = Hasher; - type Header = Header; - - type AccountId = AccountId; - type Balance = Balance; - type Nonce = Nonce; - type Signature = Signature; - - const STATE_VERSION: StateVersion = StateVersion::V0; - - fn max_extrinsic_size() -> u32 { - *BlockLength::get().max.get(DispatchClass::Normal) - } - - fn max_extrinsic_weight() -> Weight { - BlockWeights::get() - .get(DispatchClass::Normal) - .max_extrinsic - .unwrap_or(Weight::MAX) - } -} - -impl Parachain for RialtoParachain { - const PARACHAIN_ID: u32 = RIALTO_PARACHAIN_ID; -} - -impl ChainWithMessages for RialtoParachain { - const WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str = - WITH_RIALTO_PARACHAIN_MESSAGES_PALLET_NAME; - const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = - MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX; - const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = - MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; -} - -// Technically this is incorrect, because rialto-parachain isn't a bridge hub, but we're -// trying to keep it close to the bridge hubs code (at least in this aspect). -pub use bp_bridge_hub_cumulus::SignedExtension; - -frame_support::parameter_types! { - /// Size limit of the Rialto parachain blocks. - pub BlockLength: limits::BlockLength = - limits::BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); - /// Weight limit of the Rialto parachain blocks. - pub BlockWeights: limits::BlockWeights = - limits::BlockWeights::with_sensible_defaults(MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO); -} - -/// Name of the With-Rialto-Parachain messages pallet instance that is deployed at bridged chains. -pub const WITH_RIALTO_PARACHAIN_MESSAGES_PALLET_NAME: &str = "BridgeRialtoParachainMessages"; -/// Name of the transaction payment pallet at the Rialto parachain runtime. -pub const TRANSACTION_PAYMENT_PALLET_NAME: &str = "TransactionPayment"; - -decl_bridge_runtime_apis!(rialto_parachain); diff --git a/primitives/chain-rialto/Cargo.toml b/primitives/chain-rialto/Cargo.toml deleted file mode 100644 index 083abbd545840f02d97b67503bbf99e2221a9288..0000000000000000000000000000000000000000 --- a/primitives/chain-rialto/Cargo.toml +++ /dev/null @@ -1,38 +0,0 @@ -[package] -name = "bp-rialto" -description = "Primitives of Rialto runtime." -version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2021" -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" - -[dependencies] - -# Bridge Dependencies - -bp-header-chain = { path = "../header-chain", default-features = false } -bp-messages = { path = "../messages", default-features = false } -bp-runtime = { path = "../runtime", default-features = false } - -# Substrate Based Dependencies - -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } - -[features] -default = [ "std" ] -std = [ - "bp-header-chain/std", - "bp-messages/std", - "bp-runtime/std", - "frame-support/std", - "frame-system/std", - "sp-api/std", - "sp-core/std", - "sp-runtime/std", - "sp-std/std", -] diff --git a/primitives/chain-rialto/src/lib.rs b/primitives/chain-rialto/src/lib.rs deleted file mode 100644 index 263a71eb74c84f12e1705955881868959068c368..0000000000000000000000000000000000000000 --- a/primitives/chain-rialto/src/lib.rs +++ /dev/null @@ -1,231 +0,0 @@ -// 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 . - -//! Primitives of the Rialto chain. - -#![warn(missing_docs)] -#![cfg_attr(not(feature = "std"), no_std)] - -use bp_header_chain::ChainWithGrandpa; -use bp_messages::{ChainWithMessages, MessageNonce}; -use bp_runtime::{decl_bridge_finality_runtime_apis, decl_bridge_runtime_apis, Chain, ChainId}; -use frame_support::{ - dispatch::DispatchClass, - weights::{constants::WEIGHT_REF_TIME_PER_SECOND, IdentityFee, Weight}, -}; -use frame_system::limits; -use sp_core::Hasher as HasherT; -use sp_runtime::{ - traits::{BlakeTwo256, IdentifyAccount, Verify}, - MultiSignature, MultiSigner, Perbill, RuntimeDebug, StateVersion, -}; - -/// Number of extra bytes (excluding size of storage value itself) of storage proof, built at -/// Rialto chain. This mostly depends on number of entries (and their density) in the storage trie. -/// Some reserve is reserved to account future chain growth. -pub const EXTRA_STORAGE_PROOF_SIZE: u32 = 1024; - -/// Number of bytes, included in the signed Rialto transaction apart from the encoded call itself. -/// -/// Can be computed by subtracting encoded call size from raw transaction size. -pub const TX_EXTRA_BYTES: u32 = 104; - -/// Maximal weight of single Rialto block. -/// -/// This represents two seconds of compute assuming a target block time of six seconds. -/// -/// Max PoV size is set to max value, since it isn't important for relay/standalone chains. -pub const MAXIMUM_BLOCK_WEIGHT: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), u64::MAX); - -/// Represents the portion of a block that will be used by Normal extrinsics. -pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); - -/// Maximal number of unrewarded relayer entries in Rialto confirmation transaction. -pub const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = 1024; - -/// Maximal number of unconfirmed messages in Rialto confirmation transaction. -pub const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = 1024; - -/// The target length of a session (how often authorities change) on Rialto measured in of number of -/// blocks. -/// -/// Note that since this is a target sessions may change before/after this time depending on network -/// conditions. -pub const SESSION_LENGTH: BlockNumber = 4; - -/// Maximal number of GRANDPA authorities at Rialto. -pub const MAX_AUTHORITIES_COUNT: u32 = 5; - -/// Reasonable number of headers in the `votes_ancestries` on Rialto chain. -/// -/// See [`bp-header-chain::ChainWithGrandpa`] for more details. -pub const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = 8; - -/// Approximate average header size in `votes_ancestries` field of justification on Rialto chain. -/// -/// See [`bp-header-chain::ChainWithGrandpa`] for more details. -pub const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = 256; - -/// Approximate maximal header size on Rialto chain. -/// -/// We expect maximal header to have digest item with the new authorities set for every consensus -/// engine (GRANDPA, Babe, BEEFY, ...) - so we multiply it by 3. And also -/// `AVERAGE_HEADER_SIZE_IN_JUSTIFICATION` bytes for other stuff. -/// -/// See [`bp-header-chain::ChainWithGrandpa`] for more details. -pub const MAX_HEADER_SIZE: u32 = MAX_AUTHORITIES_COUNT - .saturating_mul(3) - .saturating_add(AVERAGE_HEADER_SIZE_IN_JUSTIFICATION); - -/// Maximal size of encoded `bp_parachains::ParaStoredHeaderData` structure among all Rialto -/// parachains. -/// -/// It includes the block number and state root, so it shall be near 40 bytes, but let's have some -/// reserve. -pub const MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE: u32 = 128; - -/// Re-export `time_units` to make usage easier. -pub use time_units::*; - -/// Human readable time units defined in terms of number of blocks. -pub mod time_units { - use super::{BlockNumber, SESSION_LENGTH}; - - /// Milliseconds between Rialto chain blocks. - pub const MILLISECS_PER_BLOCK: u64 = 6000; - /// Slot duration in Rialto chain consensus algorithms. - pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; - - /// A minute, expressed in Rialto chain blocks. - pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); - /// A hour, expressed in Rialto chain blocks. - pub const HOURS: BlockNumber = MINUTES * 60; - /// A day, expressed in Rialto chain blocks. - pub const DAYS: BlockNumber = HOURS * 24; - - /// BABE epoch duration at Rialto. - pub const EPOCH_DURATION_IN_SLOTS: BlockNumber = SESSION_LENGTH; - - /// 1 in 4 blocks (on average, not counting collisions) will be primary babe blocks. - pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4); -} - -/// Block number type used in Rialto. -pub type BlockNumber = u32; - -/// Hash type used in Rialto. -pub type Hash = ::Out; - -/// The type of object that can produce hashes on Rialto. -pub type Hasher = BlakeTwo256; - -/// The header type used by Rialto. -pub type Header = sp_runtime::generic::Header; - -/// Alias to 512-bit hash when used in the context of a transaction signature on the chain. -pub type Signature = MultiSignature; - -/// Some way of identifying an account on the chain. We intentionally make it equivalent -/// to the public key of our transaction signing scheme. -pub type AccountId = <::Signer as IdentifyAccount>::AccountId; - -/// Public key of the chain account that may be used to verify signatures. -pub type AccountSigner = MultiSigner; - -/// Balance of an account. -pub type Balance = u128; - -/// An instant or duration in time. -pub type Moment = u64; - -/// Nonce of a transaction in the chain. -pub type Nonce = u32; - -/// Weight-to-Fee type used by Rialto. -pub type WeightToFee = IdentityFee; - -/// Rialto chain. -#[derive(RuntimeDebug)] -pub struct Rialto; - -impl Chain for Rialto { - const ID: ChainId = *b"rlto"; - - type BlockNumber = BlockNumber; - type Hash = Hash; - type Hasher = Hasher; - type Header = Header; - - type AccountId = AccountId; - type Balance = Balance; - type Nonce = Nonce; - type Signature = Signature; - - const STATE_VERSION: StateVersion = StateVersion::V1; - - fn max_extrinsic_size() -> u32 { - *BlockLength::get().max.get(DispatchClass::Normal) - } - - fn max_extrinsic_weight() -> Weight { - BlockWeights::get() - .get(DispatchClass::Normal) - .max_extrinsic - .unwrap_or(Weight::MAX) - } -} - -impl ChainWithGrandpa for Rialto { - const WITH_CHAIN_GRANDPA_PALLET_NAME: &'static str = WITH_RIALTO_GRANDPA_PALLET_NAME; - const MAX_AUTHORITIES_COUNT: u32 = MAX_AUTHORITIES_COUNT; - const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = - REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY; - const MAX_HEADER_SIZE: u32 = MAX_HEADER_SIZE; - const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = AVERAGE_HEADER_SIZE_IN_JUSTIFICATION; -} - -impl ChainWithMessages for Rialto { - const WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str = WITH_RIALTO_MESSAGES_PALLET_NAME; - const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = - MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX; - const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = - MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; -} - -frame_support::parameter_types! { - /// Size limit of the Rialto blocks. - pub BlockLength: limits::BlockLength = - limits::BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); - /// Weight limit of the Rialto blocks. - pub BlockWeights: limits::BlockWeights = - limits::BlockWeights::with_sensible_defaults(MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO); -} - -/// Name of the With-Rialto GRANDPA pallet instance that is deployed at bridged chains. -pub const WITH_RIALTO_GRANDPA_PALLET_NAME: &str = "BridgeRialtoGrandpa"; -/// Name of the With-Rialto messages pallet instance that is deployed at bridged chains. -pub const WITH_RIALTO_MESSAGES_PALLET_NAME: &str = "BridgeRialtoMessages"; -/// Name of the With-Rialto parachains bridge pallet instance that is deployed at bridged chains. -pub const WITH_RIALTO_BRIDGE_PARAS_PALLET_NAME: &str = "BridgeRialtoParachains"; - -/// Name of the parachain registrar pallet in the Rialto runtime. -pub const PARAS_REGISTRAR_PALLET_NAME: &str = "Registrar"; - -/// Name of the parachains pallet in the Rialto runtime. -pub const PARAS_PALLET_NAME: &str = "Paras"; - -decl_bridge_runtime_apis!(rialto, grandpa); diff --git a/primitives/chain-rococo/Cargo.toml b/primitives/chain-rococo/Cargo.toml index 39bbc9eceb6840988269ca02992c79bc80775eb1..986db5e1e952cf542ab0b382286e09a1c83e829c 100644 --- a/primitives/chain-rococo/Cargo.toml +++ b/primitives/chain-rococo/Cargo.toml @@ -6,6 +6,9 @@ authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] # Bridge Dependencies @@ -16,13 +19,13 @@ bp-runtime = { path = "../runtime", default-features = false } # Substrate Based Dependencies +frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } [features] -default = [ "std" ] +default = ["std"] std = [ "bp-header-chain/std", "bp-polkadot-core/std", diff --git a/primitives/chain-rococo/src/lib.rs b/primitives/chain-rococo/src/lib.rs index fe0ba92ec641265f0f3eac1ffb98977fe93e96ed..32436a221df664c1bb27763a53eb900c866f037b 100644 --- a/primitives/chain-rococo/src/lib.rs +++ b/primitives/chain-rococo/src/lib.rs @@ -58,8 +58,8 @@ impl ChainWithGrandpa for Rococo { const MAX_AUTHORITIES_COUNT: u32 = MAX_AUTHORITIES_COUNT; const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY; - const MAX_HEADER_SIZE: u32 = MAX_HEADER_SIZE; - const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = AVERAGE_HEADER_SIZE_IN_JUSTIFICATION; + const MAX_MANDATORY_HEADER_SIZE: u32 = MAX_MANDATORY_HEADER_SIZE; + const AVERAGE_HEADER_SIZE: u32 = AVERAGE_HEADER_SIZE; } // The SignedExtension used by Rococo. diff --git a/primitives/chain-westend/Cargo.toml b/primitives/chain-westend/Cargo.toml index 94fa859918c358c9519e38594b15e48586a99c35..aa44ac2e47a471ae03cd6ca4e066691eb7028564 100644 --- a/primitives/chain-westend/Cargo.toml +++ b/primitives/chain-westend/Cargo.toml @@ -2,10 +2,13 @@ name = "bp-westend" description = "Primitives of Westend runtime." version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2021" +authors.workspace = true +edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] # Bridge Dependencies @@ -22,7 +25,7 @@ sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "mas sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } [features] -default = [ "std" ] +default = ["std"] std = [ "bp-header-chain/std", "bp-polkadot-core/std", diff --git a/primitives/chain-westend/src/lib.rs b/primitives/chain-westend/src/lib.rs index 689256181c92b5aeda072305db111668880511c7..0b0018851210e61763d2f8992fc67d04609fb28c 100644 --- a/primitives/chain-westend/src/lib.rs +++ b/primitives/chain-westend/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2019-2021 Parity Technologies (UK) Ltd. +// Copyright (C) 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 @@ -23,7 +23,7 @@ pub use bp_polkadot_core::*; use sp_runtime::StateVersion; use bp_header_chain::ChainWithGrandpa; -use bp_runtime::{decl_bridge_finality_runtime_apis, Chain, ChainId, Parachain}; +use bp_runtime::{decl_bridge_finality_runtime_apis, Chain, ChainId}; use frame_support::weights::Weight; /// Westend Chain @@ -58,61 +58,24 @@ impl ChainWithGrandpa for Westend { const MAX_AUTHORITIES_COUNT: u32 = MAX_AUTHORITIES_COUNT; const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY; - const MAX_HEADER_SIZE: u32 = MAX_HEADER_SIZE; - const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = AVERAGE_HEADER_SIZE_IN_JUSTIFICATION; + const MAX_MANDATORY_HEADER_SIZE: u32 = MAX_MANDATORY_HEADER_SIZE; + const AVERAGE_HEADER_SIZE: u32 = AVERAGE_HEADER_SIZE; } -/// `AssetHubWestend` parachain definition -#[derive(Debug, Clone, Copy)] -pub struct AssetHubWestend; +// The SignedExtension used by Westend. +pub use bp_polkadot_core::CommonSignedExtension as SignedExtension; -// AssetHubWestend seems to use the same configuration as all Polkadot-like chains, so we'll use -// Westend primitives here. -impl Chain for AssetHubWestend { - const ID: ChainId = *b"ahwe"; - - type BlockNumber = BlockNumber; - type Hash = Hash; - type Hasher = Hasher; - type Header = Header; - - type AccountId = AccountId; - type Balance = Balance; - type Nonce = Nonce; - type Signature = Signature; - - const STATE_VERSION: StateVersion = StateVersion::V0; - - fn max_extrinsic_size() -> u32 { - Westend::max_extrinsic_size() - } - - fn max_extrinsic_weight() -> Weight { - Westend::max_extrinsic_weight() - } -} - -impl Parachain for AssetHubWestend { - const PARACHAIN_ID: u32 = ASSET_HUB_WESTEND_PARACHAIN_ID; -} - -/// Name of the parachains pallet at the Westend runtime. +/// Name of the parachains pallet in the Rococo runtime. pub const PARAS_PALLET_NAME: &str = "Paras"; /// Name of the With-Westend GRANDPA pallet instance that is deployed at bridged chains. pub const WITH_WESTEND_GRANDPA_PALLET_NAME: &str = "BridgeWestendGrandpa"; -/// Name of the With-Westend parachains bridge pallet instance that is deployed at bridged chains. -pub const WITH_WESTEND_BRIDGE_PARAS_PALLET_NAME: &str = "BridgeWestendParachains"; -/// Maximal SCALE-encoded size of parachains headers that are stored at Westend `Paras` pallet. +/// Maximal size of encoded `bp_parachains::ParaStoredHeaderData` structure among all Westend +/// parachains. /// /// It includes the block number and state root, so it shall be near 40 bytes, but let's have some /// reserve. pub const MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE: u32 = 128; -/// Identifier of `AssetHubWestend` parachain at the Westend relay chain. -pub const ASSET_HUB_WESTEND_PARACHAIN_ID: u32 = 1000; - decl_bridge_finality_runtime_apis!(westend, grandpa); - -decl_bridge_finality_runtime_apis!(AssetHubWestend); diff --git a/primitives/chain-wococo/Cargo.toml b/primitives/chain-wococo/Cargo.toml deleted file mode 100644 index 5937b87769c34d6109485ea0dc03091888de7aa4..0000000000000000000000000000000000000000 --- a/primitives/chain-wococo/Cargo.toml +++ /dev/null @@ -1,35 +0,0 @@ -[package] -name = "bp-wococo" -description = "Primitives of Wococo runtime." -version = "0.1.0" -authors.workspace = true -edition.workspace = true -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" - -[dependencies] - -# Bridge Dependencies - -bp-header-chain = { path = "../header-chain", default-features = false } -bp-polkadot-core = { path = "../polkadot-core", default-features = false } -bp-runtime = { path = "../runtime", default-features = false } -bp-rococo = { path = "../chain-rococo", default-features = false } - -# Substrate Based Dependencies - -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } - -[features] -default = [ "std" ] -std = [ - "bp-header-chain/std", - "bp-polkadot-core/std", - "bp-rococo/std", - "bp-runtime/std", - "frame-support/std", - "sp-api/std", - "sp-std/std", -] diff --git a/primitives/chain-wococo/src/lib.rs b/primitives/chain-wococo/src/lib.rs deleted file mode 100644 index c709736100ae59de4b9acd6c3e17ea0d2d051006..0000000000000000000000000000000000000000 --- a/primitives/chain-wococo/src/lib.rs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (C) 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 . - -//! Primitives of the Rococo chain. - -#![warn(missing_docs)] -#![cfg_attr(not(feature = "std"), no_std)] - -pub use bp_polkadot_core::*; -pub use bp_rococo::{ - MAX_AUTHORITIES_COUNT, MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE, PARAS_PALLET_NAME, -}; - -use bp_header_chain::ChainWithGrandpa; -use bp_runtime::{decl_bridge_finality_runtime_apis, Chain, ChainId}; -use frame_support::weights::Weight; -use sp_runtime::StateVersion; - -/// Wococo Chain -pub struct Wococo; - -impl Chain for Wococo { - const ID: ChainId = *b"woco"; - - type BlockNumber = BlockNumber; - type Hash = Hash; - type Hasher = Hasher; - type Header = Header; - - type AccountId = AccountId; - type Balance = Balance; - type Nonce = Nonce; - type Signature = Signature; - - const STATE_VERSION: StateVersion = StateVersion::V1; - - fn max_extrinsic_size() -> u32 { - max_extrinsic_size() - } - - fn max_extrinsic_weight() -> Weight { - max_extrinsic_weight() - } -} - -impl ChainWithGrandpa for Wococo { - const WITH_CHAIN_GRANDPA_PALLET_NAME: &'static str = WITH_WOCOCO_GRANDPA_PALLET_NAME; - const MAX_AUTHORITIES_COUNT: u32 = MAX_AUTHORITIES_COUNT; - const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = - REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY; - const MAX_HEADER_SIZE: u32 = MAX_HEADER_SIZE; - const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = AVERAGE_HEADER_SIZE_IN_JUSTIFICATION; -} - -// The SignedExtension used by Wococo. -pub use bp_rococo::CommonSignedExtension as SignedExtension; - -/// Name of the With-Wococo GRANDPA pallet instance that is deployed at bridged chains. -pub const WITH_WOCOCO_GRANDPA_PALLET_NAME: &str = "BridgeWococoGrandpa"; - -decl_bridge_finality_runtime_apis!(wococo, grandpa); diff --git a/primitives/header-chain/Cargo.toml b/primitives/header-chain/Cargo.toml index a46498a7dbfb2b7e3f09b2354b34bbb7db4fd36e..5c3d98071ebaffb40371e7e77cd19d60deb23e2f 100644 --- a/primitives/header-chain/Cargo.toml +++ b/primitives/header-chain/Cargo.toml @@ -6,6 +6,9 @@ authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } finality-grandpa = { version = "0.16.2", default-features = false } @@ -30,7 +33,7 @@ hex = "0.4" hex-literal = "0.4" [features] -default = [ "std" ] +default = ["std"] std = [ "bp-runtime/std", "codec/std", diff --git a/primitives/header-chain/src/justification/mod.rs b/primitives/header-chain/src/justification/mod.rs index 72a5f68918d9703babe1e9c263f9148c57df4340..b32d8bdb5f1d8ce05722c938a083d7f582139835 100644 --- a/primitives/header-chain/src/justification/mod.rs +++ b/primitives/header-chain/src/justification/mod.rs @@ -82,8 +82,8 @@ impl GrandpaJustification { .saturating_add(BlockNumberOf::::max_encoded_len().saturated_into()) .saturating_add(HashOf::::max_encoded_len().saturated_into()); - let max_expected_votes_ancestries_size = C::REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY - .saturating_mul(C::AVERAGE_HEADER_SIZE_IN_JUSTIFICATION); + let max_expected_votes_ancestries_size = + C::REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY.saturating_mul(C::AVERAGE_HEADER_SIZE); // justification is round number (u64=8b), a signed GRANDPA commit and the // `votes_ancestries` vector diff --git a/primitives/header-chain/src/lib.rs b/primitives/header-chain/src/lib.rs index 434e7d995dcfde3db928fc3e9025702ff744f552..d3d372718fb530d3f74113a4309c3b6712e38b6b 100644 --- a/primitives/header-chain/src/lib.rs +++ b/primitives/header-chain/src/lib.rs @@ -24,8 +24,8 @@ use crate::justification::{ GrandpaJustification, JustificationVerificationContext, JustificationVerificationError, }; use bp_runtime::{ - BasicOperatingMode, Chain, HashOf, HasherOf, StorageProofError, UnderlyingChainProvider, - UnverifiedStorageProof, VerifiedStorageProof, + BasicOperatingMode, Chain, HashOf, HasherOf, HeaderOf, StorageProofError, + UnderlyingChainProvider, UnverifiedStorageProof, VerifiedStorageProof, }; use codec::{Codec, Decode, Encode, EncodeLike, MaxEncodedLen}; use core::{clone::Clone, cmp::Eq, default::Default, fmt::Debug}; @@ -270,23 +270,28 @@ pub trait ChainWithGrandpa: Chain { /// to submitter. const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32; - /// Maximal size of the chain header. The header may be the header that enacts new GRANDPA - /// authorities set (so it has large digest inside). + /// Maximal size of the mandatory chain header. Mandatory header is the header that enacts new + /// GRANDPA authorities set (so it has large digest inside). /// /// This isn't a strict limit. The relay may submit larger headers and the pallet will accept /// the call. The limit is only used to compute maximal refund amount and doing calls which /// exceed the limit, may be costly to submitter. - const MAX_HEADER_SIZE: u32; + const MAX_MANDATORY_HEADER_SIZE: u32; - /// Average size of the chain header from justification ancestry. We don't expect to see there - /// headers that change GRANDPA authorities set (GRANDPA will probably be able to finalize at - /// least one additional header per session on non test chains), so this is average size of - /// headers that aren't changing the set. + /// Average size of the chain header. We don't expect to see there headers that change GRANDPA + /// authorities set (GRANDPA will probably be able to finalize at least one additional header + /// per session on non test chains), so this is average size of headers that aren't changing the + /// set. /// - /// This isn't a strict limit. The relay may submit justifications with larger headers in its - /// ancestry and the pallet will accept the call. The limit is only used to compute maximal - /// refund amount and doing calls which exceed the limit, may be costly to submitter. - const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32; + /// This isn't a strict limit. The relay may submit justifications with larger headers and the + /// pallet will accept the call. However, if the total size of all `submit_finality_proof` + /// arguments exceeds the maximal size, computed using this average size, relayer will only get + /// partial refund. + /// + /// We expect some headers on production chains that are above this size. But they are rare and + /// if rellayer cares about its profitability, we expect it'll select other headers for + /// submission. + const AVERAGE_HEADER_SIZE: u32; } impl ChainWithGrandpa for T @@ -299,7 +304,70 @@ where const MAX_AUTHORITIES_COUNT: u32 = ::MAX_AUTHORITIES_COUNT; const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = ::REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY; - const MAX_HEADER_SIZE: u32 = ::MAX_HEADER_SIZE; - const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = - ::AVERAGE_HEADER_SIZE_IN_JUSTIFICATION; + const MAX_MANDATORY_HEADER_SIZE: u32 = + ::MAX_MANDATORY_HEADER_SIZE; + const AVERAGE_HEADER_SIZE: u32 = ::AVERAGE_HEADER_SIZE; +} + +/// Returns maximal expected size of `submit_finality_proof` call arguments. +pub fn max_expected_submit_finality_proof_arguments_size( + is_mandatory_finality_target: bool, + precommits: u32, +) -> u32 { + let max_expected_justification_size = + GrandpaJustification::>::max_reasonable_size::(precommits); + + // call arguments are header and justification + let max_expected_finality_target_size = if is_mandatory_finality_target { + C::MAX_MANDATORY_HEADER_SIZE + } else { + C::AVERAGE_HEADER_SIZE + }; + max_expected_finality_target_size.saturating_add(max_expected_justification_size) +} + +#[cfg(test)] +mod tests { + use super::*; + use bp_runtime::ChainId; + use frame_support::weights::Weight; + use sp_runtime::{testing::H256, traits::BlakeTwo256, MultiSignature, StateVersion}; + + struct TestChain; + + impl Chain for TestChain { + const ID: ChainId = *b"test"; + const STATE_VERSION: StateVersion = StateVersion::V1; + type BlockNumber = u32; + type Hash = H256; + type Hasher = BlakeTwo256; + type Header = sp_runtime::generic::Header; + type AccountId = u64; + type Balance = u64; + type Nonce = u64; + type Signature = MultiSignature; + + fn max_extrinsic_size() -> u32 { + 0 + } + fn max_extrinsic_weight() -> Weight { + Weight::zero() + } + } + + impl ChainWithGrandpa for TestChain { + const WITH_CHAIN_GRANDPA_PALLET_NAME: &'static str = "Test"; + const MAX_AUTHORITIES_COUNT: u32 = 128; + const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = 2; + const MAX_MANDATORY_HEADER_SIZE: u32 = 100_000; + const AVERAGE_HEADER_SIZE: u32 = 1_024; + } + + #[test] + fn max_expected_submit_finality_proof_arguments_size_respects_mandatory_argument() { + assert!( + max_expected_submit_finality_proof_arguments_size::(true, 100) > + max_expected_submit_finality_proof_arguments_size::(false, 100), + ); + } } diff --git a/primitives/messages/Cargo.toml b/primitives/messages/Cargo.toml index a1c7145a0e950aa23ea812d58a1408a1e43d3bea..92df85696b154119ca43c510bd2290107330813e 100644 --- a/primitives/messages/Cargo.toml +++ b/primitives/messages/Cargo.toml @@ -6,8 +6,11 @@ authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] -codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "bit-vec"] } +codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["bit-vec", "derive"] } scale-info = { version = "2.10.0", default-features = false, features = ["bit-vec", "derive", "serde"] } serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] } @@ -29,7 +32,7 @@ hex = "0.4" hex-literal = "0.4" [features] -default = [ "std" ] +default = ["std"] std = [ "bp-header-chain/std", "bp-runtime/std", diff --git a/primitives/messages/src/source_chain.rs b/primitives/messages/src/source_chain.rs index 183277ee0147acf93fd7696a04c0f872b2d92497..45192308db75e44b1c159ee325d778f2d52b3574 100644 --- a/primitives/messages/src/source_chain.rs +++ b/primitives/messages/src/source_chain.rs @@ -118,22 +118,22 @@ pub trait MessagesBridge { /// Error type. type Error: Debug; - /// Send message over the bridge. + /// Intermediary structure returned by `validate_message()`. /// - /// Returns unique message nonce or error if send has failed. - fn send_message(lane: LaneId, message: Payload) -> Result; -} - -/// Bridge that does nothing when message is being sent. -#[derive(Eq, RuntimeDebug, PartialEq)] -pub struct NoopMessagesBridge; + /// It can than be passed to `send_message()` in order to actually send the message + /// on the bridge. + type SendMessageArgs; -impl MessagesBridge for NoopMessagesBridge { - type Error = &'static str; + /// Check if the message can be sent over the bridge. + fn validate_message( + lane: LaneId, + message: &Payload, + ) -> Result; - fn send_message(_lane: LaneId, _message: Payload) -> Result { - Ok(SendMessageArtifacts { nonce: 0, enqueued_messages: 0 }) - } + /// Send message over the bridge. + /// + /// Returns unique message nonce or error if send has failed. + fn send_message(message: Self::SendMessageArgs) -> SendMessageArtifacts; } /// Structure that may be used in place `MessageDeliveryAndDispatchPayment` on chains, diff --git a/primitives/parachains/Cargo.toml b/primitives/parachains/Cargo.toml index 95ce8d50f70c17cd1d54d76816c054281a7353b3..524b95e3b6fe689e7d037065a0cc78664736cf60 100644 --- a/primitives/parachains/Cargo.toml +++ b/primitives/parachains/Cargo.toml @@ -6,6 +6,9 @@ authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } impl-trait-for-tuples = "0.2" @@ -25,7 +28,7 @@ sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "mas sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } [features] -default = [ "std" ] +default = ["std"] std = [ "bp-header-chain/std", "bp-polkadot-core/std", diff --git a/primitives/polkadot-core/Cargo.toml b/primitives/polkadot-core/Cargo.toml index 513b46098c621f084b884a166be9ebde79475c52..7b8b92b62fc7d4c9a949e1c5f888cf5cd11b6489 100644 --- a/primitives/polkadot-core/Cargo.toml +++ b/primitives/polkadot-core/Cargo.toml @@ -6,6 +6,9 @@ authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } parity-util-mem = { version = "0.12.0", optional = true } @@ -29,7 +32,7 @@ sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" hex = "0.4" [features] -default = [ "std" ] +default = ["std"] std = [ "bp-messages/std", "bp-runtime/std", diff --git a/primitives/polkadot-core/src/lib.rs b/primitives/polkadot-core/src/lib.rs index 4fec1e3660dadd08162e43440afbb0d3ccd90135..6f0360e5db965dc50d1f8a782c64078b9509317a 100644 --- a/primitives/polkadot-core/src/lib.rs +++ b/primitives/polkadot-core/src/lib.rs @@ -67,30 +67,28 @@ pub const MAX_AUTHORITIES_COUNT: u32 = 1_256; /// /// See [`bp-header-chain::ChainWithGrandpa`] for more details. /// -/// This value comes from recent (February, 2023) Kusama and Polkadot headers. There are no +/// This value comes from recent (December, 2023) Kusama and Polkadot headers. There are no /// justifications with any additional headers in votes ancestry, so reasonable headers may /// be set to zero. But we assume that there may be small GRANDPA lags, so we're leaving some /// reserve here. pub const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = 2; -/// Approximate average header size in `votes_ancestries` field of justification on Polkadot-like +/// Average header size in `votes_ancestries` field of justification on Polkadot-like /// chains. /// /// See [`bp-header-chain::ChainWithGrandpa`] for more details. /// -/// This value comes from recent (February, 2023) Kusama headers. Average is `336` there, but some -/// non-mandatory headers has size `40kb` (they contain the BABE epoch descriptor with all -/// authorities - just like our mandatory header). Since we assume `2` headers in justification -/// votes ancestry, let's set average header to `40kb / 2`. -pub const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = 20 * 1024; +/// This value comes from recent (December, 2023) Kusama headers. Most of headers are `327` bytes +/// there, but let's have some reserve and make it 1024. +pub const AVERAGE_HEADER_SIZE: u32 = 1024; /// Approximate maximal header size on Polkadot-like chains. /// /// See [`bp-header-chain::ChainWithGrandpa`] for more details. /// -/// This value comes from recent (February, 2023) Kusama headers. Maximal header is a mandatory -/// header. In its SCALE-encoded form it is `80348` bytes. Let's have some reserve here. -pub const MAX_HEADER_SIZE: u32 = 90_000; +/// This value comes from recent (December, 2023) Kusama headers. Maximal header is a mandatory +/// header. In its SCALE-encoded form it is `113407` bytes. Let's have some reserve here. +pub const MAX_MANDATORY_HEADER_SIZE: u32 = 120 * 1024; /// Number of extra bytes (excluding size of storage value itself) of storage proof, built at /// Polkadot-like chain. This mostly depends on number of entries in the storage trie. diff --git a/primitives/relayers/Cargo.toml b/primitives/relayers/Cargo.toml index ae0a7a1b0f38119a3596877d2da1b8150045a4d2..df912d67c7f7afe75c4ec8044ffc04ff346da513 100644 --- a/primitives/relayers/Cargo.toml +++ b/primitives/relayers/Cargo.toml @@ -6,8 +6,11 @@ authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] -codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "bit-vec"] } +codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["bit-vec", "derive"] } scale-info = { version = "2.10.0", default-features = false, features = ["bit-vec", "derive"] } # Bridge Dependencies @@ -31,7 +34,7 @@ hex = "0.4" hex-literal = "0.4" [features] -default = [ "std" ] +default = ["std"] std = [ "bp-header-chain/std", "bp-messages/std", diff --git a/primitives/relayers/src/lib.rs b/primitives/relayers/src/lib.rs index c479ea6616e4dd47c061dbd4fda810f71b6cb0ef..4ad7461f96c5797ba1ab500eeffc04168071a179 100644 --- a/primitives/relayers/src/lib.rs +++ b/primitives/relayers/src/lib.rs @@ -133,7 +133,7 @@ where impl PaymentProcedure for PayRewardFromAccount where T: frame_support::traits::fungible::Mutate, - Relayer: Decode + Encode, + Relayer: Decode + Encode + Eq, { type Error = sp_runtime::DispatchError; diff --git a/primitives/runtime/Cargo.toml b/primitives/runtime/Cargo.toml index b56cda96d9d84b2a89513e8ee8800170529988ed..8503ce8e085bd8713218ee180f7df563a71fcc07 100644 --- a/primitives/runtime/Cargo.toml +++ b/primitives/runtime/Cargo.toml @@ -6,6 +6,9 @@ authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } hash-db = { version = "0.16.0", default-features = false } @@ -31,7 +34,7 @@ trie-db = { version = "0.28.0", default-features = false } hex-literal = "0.4" [features] -default = [ "std" ] +default = ["std"] std = [ "codec/std", "frame-support/std", diff --git a/primitives/runtime/src/chain.rs b/primitives/runtime/src/chain.rs index dc1eeb4f6935651fdda30c90320a7b7cd2abb00e..2482d1946cb553140dfe24908d754a1554ab45f0 100644 --- a/primitives/runtime/src/chain.rs +++ b/primitives/runtime/src/chain.rs @@ -15,7 +15,7 @@ // along with Parity Bridges Common. If not, see . use crate::{ChainId, HeaderIdProvider}; -use codec::{Decode, Encode, MaxEncodedLen}; +use codec::{Codec, Decode, Encode, MaxEncodedLen}; use frame_support::{weights::Weight, Parameter}; use num_traits::{AsPrimitive, Bounded, CheckedSub, Saturating, SaturatingAdd, Zero}; use sp_runtime::{ @@ -39,7 +39,7 @@ pub enum EncodedOrDecodedCall { Decoded(ChainCall), } -impl EncodedOrDecodedCall { +impl EncodedOrDecodedCall { /// Returns decoded call. pub fn to_decoded(&self) -> Result { match self { @@ -57,6 +57,14 @@ impl EncodedOrDecodedCall { Self::Decoded(decoded_call) => Ok(decoded_call), } } + + /// Converts self to encoded call. + pub fn into_encoded(self) -> Vec { + match self { + Self::Encoded(encoded_call) => encoded_call, + Self::Decoded(decoded_call) => decoded_call.encode(), + } + } } impl From for EncodedOrDecodedCall { @@ -198,7 +206,7 @@ pub trait Chain: Send + Sync + 'static { } /// A trait that provides the type of the underlying chain. -pub trait UnderlyingChainProvider { +pub trait UnderlyingChainProvider: Send + Sync + 'static { /// Underlying chain type. type Chain: Chain; } @@ -291,7 +299,7 @@ pub type TransactionEraOf = crate::TransactionEra, HashOf /// - constants that are stringified names of runtime API methods: /// - `BEST_FINALIZED__HEADER_METHOD` /// - `_ACCEPTED__FINALITY_PROOFS_METHOD` -/// The name of the chain has to be specified in snake case (e.g. `rialto_parachain`). +/// The name of the chain has to be specified in snake case (e.g. `bridge_hub_polkadot`). #[macro_export] macro_rules! decl_bridge_finality_runtime_apis { ($chain: ident $(, $consensus: ident => $justification_type: ty)?) => { @@ -343,7 +351,7 @@ macro_rules! decl_bridge_finality_runtime_apis { /// - `FromInboundLaneApi` /// - constants that are stringified names of runtime API methods: /// - `FROM__MESSAGE_DETAILS_METHOD`, -/// The name of the chain has to be specified in snake case (e.g. `rialto_parachain`). +/// The name of the chain has to be specified in snake case (e.g. `bridge_hub_polkadot`). #[macro_export] macro_rules! decl_bridge_messages_runtime_apis { ($chain: ident) => { @@ -401,7 +409,7 @@ macro_rules! decl_bridge_messages_runtime_apis { /// Convenience macro that declares bridge finality runtime apis, bridge messages runtime apis /// and related constants for a chain. -/// The name of the chain has to be specified in snake case (e.g. `rialto_parachain`). +/// The name of the chain has to be specified in snake case (e.g. `bridge_hub_polkadot`). #[macro_export] macro_rules! decl_bridge_runtime_apis { ($chain: ident $(, $consensus: ident)?) => { diff --git a/primitives/runtime/src/extensions.rs b/primitives/runtime/src/extensions.rs index 63c244c58639dc976a41e8e8733db9eebe249717..d896bc92efffc4e8fcb427ffa7057dece6f17241 100644 --- a/primitives/runtime/src/extensions.rs +++ b/primitives/runtime/src/extensions.rs @@ -88,7 +88,7 @@ pub type BridgeRejectObsoleteHeadersAndMessages = GenericSignedExtensionSchema<( /// wildcard/placeholder, which relies on the scale encoding for `()` or `((), ())`, or `((), (), /// ())` is the same. So runtime can contains any kind of tuple: /// `(BridgeRefundBridgeHubRococoMessages)` -/// `(BridgeRefundBridgeHubRococoMessages, BridgeRefundBridgeHubWococoMessages)` +/// `(BridgeRefundBridgeHubRococoMessages, BridgeRefundBridgeHubWestendMessages)` /// `(BridgeRefundParachainMessages1, ..., BridgeRefundParachainMessagesN)` pub type RefundBridgedParachainMessagesSchema = GenericSignedExtensionSchema<(), ()>; diff --git a/primitives/runtime/src/lib.rs b/primitives/runtime/src/lib.rs index 2189e59972543d4ff34bc0946b2077647b567d05..e3d43842eb1df0bf0c53248fed9d9a03b478425c 100644 --- a/primitives/runtime/src/lib.rs +++ b/primitives/runtime/src/lib.rs @@ -229,18 +229,6 @@ pub fn storage_map_final_key( StorageKey(final_key) } -/// This is how a storage key of storage parameter (`parameter_types! { storage Param: bool = false; -/// }`) is computed. -/// -/// Copied from `frame_support::parameter_types` macro. -pub fn storage_parameter_key(parameter_name: &str) -> StorageKey { - let mut buffer = Vec::with_capacity(1 + parameter_name.len() + 1); - buffer.push(b':'); - buffer.extend_from_slice(parameter_name.as_bytes()); - buffer.push(b':'); - StorageKey(sp_io::hashing::twox_128(&buffer).to_vec()) -} - /// This is how a storage key of storage value is computed. /// /// Copied from `frame_support::storage::storage_prefix`. @@ -321,7 +309,7 @@ pub trait StorageDoubleMapKeyProvider { } /// Error generated by the `OwnedBridgeModule` trait. -#[derive(Encode, Decode, TypeInfo, PalletError)] +#[derive(Encode, Decode, PartialEq, Eq, TypeInfo, PalletError)] pub enum OwnedBridgeModuleError { /// All pallet operations are halted. Halted, @@ -500,14 +488,6 @@ where mod tests { use super::*; - #[test] - fn storage_parameter_key_works() { - assert_eq!( - storage_parameter_key("MillauToRialtoConversionRate"), - StorageKey(hex_literal::hex!("58942375551bb0af1682f72786b59d04").to_vec()), - ); - } - #[test] fn storage_value_key_works() { assert_eq!( diff --git a/primitives/test-utils/Cargo.toml b/primitives/test-utils/Cargo.toml index 827bbbfa75a4a81d6252f8aa3e905189a9ae772d..68ae042f8a40485578936d9f33e302d2b381d1dc 100644 --- a/primitives/test-utils/Cargo.toml +++ b/primitives/test-utils/Cargo.toml @@ -6,13 +6,16 @@ authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] -bp-header-chain = { path = "../header-chain", default-features = false } +bp-header-chain = { path = "../header-chain", default-features = false } bp-parachains = { path = "../parachains", default-features = false } -bp-polkadot-core = { path = "../polkadot-core", default-features = false } +bp-polkadot-core = { path = "../polkadot-core", default-features = false } bp-runtime = { path = "../runtime", default-features = false, features = ["test-helpers"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } -ed25519-dalek = { version = "2.0", default-features = false } +ed25519-dalek = { version = "2.1", default-features = false } finality-grandpa = { version = "0.16.2", default-features = false } sp-application-crypto = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } @@ -22,7 +25,7 @@ sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" sp-trie = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } [features] -default = [ "std" ] +default = ["std"] std = [ "bp-header-chain/std", "bp-parachains/std", diff --git a/primitives/xcm-bridge-hub-router/Cargo.toml b/primitives/xcm-bridge-hub-router/Cargo.toml index b560a0aa2fcf3084b849b15a4b86d0053145bc1f..70b971910b851b0485593098269fdbcd8980a40d 100644 --- a/primitives/xcm-bridge-hub-router/Cargo.toml +++ b/primitives/xcm-bridge-hub-router/Cargo.toml @@ -6,13 +6,16 @@ authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] -codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "bit-vec"] } -scale-info = { version = "2.9.0", default-features = false, features = ["bit-vec", "derive"] } +codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["bit-vec", "derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["bit-vec", "derive"] } # Substrate Dependencies sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } [features] -default = [ "std" ] -std = [ "codec/std", "scale-info/std", "sp-core/std" ] +default = ["std"] +std = ["codec/std", "scale-info/std", "sp-core/std"] diff --git a/primitives/xcm-bridge-hub/Cargo.toml b/primitives/xcm-bridge-hub/Cargo.toml index 7b2ea491abc82101b3e3644bf1f51fc2247534c3..0519b0ba210d9d60f63f465d8c0db91b3b241070 100644 --- a/primitives/xcm-bridge-hub/Cargo.toml +++ b/primitives/xcm-bridge-hub/Cargo.toml @@ -2,10 +2,13 @@ name = "bp-xcm-bridge-hub" description = "Primitives of the xcm-bridge-hub pallet." version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2018" +authors.workspace = true +edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } diff --git a/primitives/xcm-bridge-hub/src/lib.rs b/primitives/xcm-bridge-hub/src/lib.rs index 9a0de1ec68c406a137c9a425baf908624e1d85df..3db6a818678f9431f5ab38ed8320bc25043ba175 100644 --- a/primitives/xcm-bridge-hub/src/lib.rs +++ b/primitives/xcm-bridge-hub/src/lib.rs @@ -22,12 +22,18 @@ use bp_messages::LaneId; use bp_runtime::{AccountIdOf, BalanceOf, Chain}; use codec::{Decode, Encode, MaxEncodedLen}; -use frame_support::{ensure, CloneNoBound, PalletError, PartialEqNoBound, RuntimeDebugNoBound}; +use frame_support::{ + ensure, traits::Get, CloneNoBound, PalletError, PartialEqNoBound, RuntimeDebugNoBound, +}; use scale_info::TypeInfo; use serde::{Deserialize, Serialize}; use sp_runtime::RuntimeDebug; use sp_std::boxed::Box; -use xcm::{latest::prelude::*, VersionedInteriorMultiLocation, VersionedMultiLocation}; +use xcm::{ + latest::prelude::*, + prelude::{GetVersion, XcmVersion}, + VersionedInteriorLocation, VersionedLocation, +}; /// Encoded XCM blob. We expect the bridge messages pallet to use this blob type for both inbound /// and outbound payloads. @@ -59,8 +65,8 @@ impl BridgeId { /// be coordinated at all involved chains (at source and target chains + at bridge hubs). /// Otherwise messages may simply be dropped anywhere on its path to the target chain. pub fn new( - universal_location1: &VersionedInteriorMultiLocation, - universal_location2: &VersionedInteriorMultiLocation, + universal_location1: &VersionedInteriorLocation, + universal_location2: &VersionedInteriorLocation, ) -> Self { // a tricky helper struct that adds required `Ord` support for // `VersionedInteriorMultiLocation` @@ -103,33 +109,33 @@ pub trait LocalXcmChannelManager { /// /// The `with` is guaranteed to be in the same consensus. However, it may point to something /// below the chain level - like the constract or pallet instance, for example. - fn is_congested(with: &MultiLocation) -> bool; + fn is_congested(with: &Location) -> bool; /// Suspend the bridge, opened by given origin. /// /// The `local_origin` is guaranteed to be in the same consensus. However, it may point to /// something below the chain level - like the constract or pallet instance, for example. - fn suspend_bridge(local_origin: &MultiLocation, bridge: BridgeId) -> Result<(), Self::Error>; + fn suspend_bridge(local_origin: &Location, bridge: BridgeId) -> Result<(), Self::Error>; /// Resume the previously suspended bridge, opened by given origin. /// /// The `local_origin` is guaranteed to be in the same consensus. However, it may point to /// something below the chain level - like the constract or pallet instance, for example. - fn resume_bridge(local_origin: &MultiLocation, bridge: BridgeId) -> Result<(), Self::Error>; + fn resume_bridge(local_origin: &Location, bridge: BridgeId) -> Result<(), Self::Error>; } impl LocalXcmChannelManager for () { type Error = (); - fn is_congested(_with: &MultiLocation) -> bool { + fn is_congested(_with: &Location) -> bool { false } - fn suspend_bridge(_local_origin: &MultiLocation, _bridge: BridgeId) -> Result<(), Self::Error> { + fn suspend_bridge(_local_origin: &Location, _bridge: BridgeId) -> Result<(), Self::Error> { Ok(()) } - fn resume_bridge(_local_origin: &MultiLocation, _bridge: BridgeId) -> Result<(), Self::Error> { + fn resume_bridge(_local_origin: &Location, _bridge: BridgeId) -> Result<(), Self::Error> { Ok(()) } } @@ -156,7 +162,7 @@ pub enum BridgeState { #[scale_info(skip_type_params(ThisChain))] pub struct Bridge { /// Relative location of the bridge origin chain. - pub bridge_origin_relative_location: Box, + pub bridge_origin_relative_location: Box, /// Current bridge state. pub state: BridgeState, /// Account with the reserved funds. @@ -169,11 +175,11 @@ pub struct Bridge { #[derive(Clone, RuntimeDebug, PartialEq, Eq)] pub struct BridgeLocations { /// Relative (to this bridge hub) location of this side of the bridge. - pub bridge_origin_relative_location: MultiLocation, + pub bridge_origin_relative_location: Location, /// Universal (unique) location of this side of the bridge. - pub bridge_origin_universal_location: InteriorMultiLocation, + pub bridge_origin_universal_location: InteriorLocation, /// Universal (unique) location of other side of the bridge. - pub bridge_destination_universal_location: InteriorMultiLocation, + pub bridge_destination_universal_location: InteriorLocation, /// An identifier of the dedicated bridge message lane. pub bridge_id: BridgeId, } @@ -215,14 +221,14 @@ pub enum BridgeLocationsError { /// Returns error if `bridge_origin_relative_location` is outside of `here_universal_location` /// local consensus OR if `bridge_destination_universal_location` is not a universal location. pub fn bridge_locations( - here_universal_location: Box, - bridge_origin_relative_location: Box, - bridge_destination_universal_location: Box, + here_universal_location: Box, + bridge_origin_relative_location: Box, + bridge_destination_universal_location: Box, expected_remote_network: NetworkId, ) -> Result, BridgeLocationsError> { fn strip_low_level_junctions( - location: InteriorMultiLocation, - ) -> Result { + location: InteriorLocation, + ) -> Result { let mut junctions = location.into_iter(); let global_consensus = junctions @@ -237,8 +243,8 @@ pub fn bridge_locations( // if there's something other than parachain, let's strip it let maybe_parachain = junctions.next().filter(|junction| matches!(junction, Parachain(_))); Ok(match maybe_parachain { - Some(parachain) => X2(global_consensus, parachain), - None => X1(global_consensus), + Some(parachain) => [global_consensus, parachain].into(), + None => [global_consensus].into(), }) } @@ -258,7 +264,7 @@ pub fn bridge_locations( // get universal location of endpoint, located at this side of the bridge let bridge_origin_universal_location = here_universal_location - .within_global(*bridge_origin_relative_location) + .within_global(*bridge_origin_relative_location.clone()) .map_err(|_| BridgeLocationsError::InvalidBridgeOrigin)?; // strip low-level junctions within universal locations let bridge_origin_universal_location = @@ -271,8 +277,8 @@ pub fn bridge_locations( // is also within the `GlobalConsensus`. So we know that the lane id will be // the same on both ends of the bridge let bridge_id = BridgeId::new( - &bridge_origin_universal_location.into(), - &bridge_destination_universal_location.into(), + &bridge_origin_universal_location.clone().into(), + &bridge_destination_universal_location.clone().into(), ); Ok(Box::new(BridgeLocations { @@ -283,6 +289,28 @@ pub fn bridge_locations( })) } +/// Adapter for the implementation of `GetVersion`, which attempts to find the minimal +/// configured XCM version between the destination `dest` and the bridge hub location provided as +/// `Get`. +pub struct XcmVersionOfDestAndRemoteBridge( + sp_std::marker::PhantomData<(Version, RemoteBridge)>, +); +impl> GetVersion + for XcmVersionOfDestAndRemoteBridge +{ + fn get_version_for(dest: &Location) -> Option { + let dest_version = Version::get_version_for(dest); + let bridge_hub_version = Version::get_version_for(&RemoteBridge::get()); + + match (dest_version, bridge_hub_version) { + (Some(dv), Some(bhv)) => Some(sp_std::cmp::min(dv, bhv)), + (Some(dv), None) => Some(dv), + (None, Some(bhv)) => Some(bhv), + (None, None) => None, + } + } +} + #[cfg(test)] mod tests { use super::*; @@ -295,26 +323,28 @@ mod tests { const REMOTE_PARACHAIN: u32 = 2000; struct SuccessfulTest { - here_universal_location: InteriorMultiLocation, - bridge_origin_relative_location: MultiLocation, + here_universal_location: InteriorLocation, + bridge_origin_relative_location: Location, - bridge_origin_universal_location: InteriorMultiLocation, - bridge_destination_universal_location: InteriorMultiLocation, + bridge_origin_universal_location: InteriorLocation, + bridge_destination_universal_location: InteriorLocation, } fn run_successful_test(test: SuccessfulTest) -> BridgeLocations { let locations = bridge_locations( Box::new(test.here_universal_location), - Box::new(test.bridge_origin_relative_location), - Box::new(test.bridge_destination_universal_location), + Box::new(test.bridge_origin_relative_location.clone()), + Box::new(test.bridge_destination_universal_location.clone()), REMOTE_NETWORK, ); assert_eq!( locations, Ok(Box::new(BridgeLocations { bridge_origin_relative_location: test.bridge_origin_relative_location, - bridge_origin_universal_location: test.bridge_origin_universal_location, - bridge_destination_universal_location: test.bridge_destination_universal_location, + bridge_origin_universal_location: test.bridge_origin_universal_location.clone(), + bridge_destination_universal_location: test + .bridge_destination_universal_location + .clone(), bridge_id: BridgeId::new( &test.bridge_origin_universal_location.into(), &test.bridge_destination_universal_location.into(), @@ -330,124 +360,126 @@ mod tests { #[test] fn at_relay_from_local_relay_to_remote_relay_works() { run_successful_test(SuccessfulTest { - here_universal_location: X1(GlobalConsensus(LOCAL_NETWORK)), + here_universal_location: [GlobalConsensus(LOCAL_NETWORK)].into(), bridge_origin_relative_location: Here.into(), - bridge_origin_universal_location: X1(GlobalConsensus(LOCAL_NETWORK)), - bridge_destination_universal_location: X1(GlobalConsensus(REMOTE_NETWORK)), + bridge_origin_universal_location: [GlobalConsensus(LOCAL_NETWORK)].into(), + bridge_destination_universal_location: [GlobalConsensus(REMOTE_NETWORK)].into(), }); } #[test] fn at_relay_from_sibling_parachain_to_remote_relay_works() { run_successful_test(SuccessfulTest { - here_universal_location: X1(GlobalConsensus(LOCAL_NETWORK)), - bridge_origin_relative_location: X1(Parachain(SIBLING_PARACHAIN)).into(), + here_universal_location: [GlobalConsensus(LOCAL_NETWORK)].into(), + bridge_origin_relative_location: [Parachain(SIBLING_PARACHAIN)].into(), - bridge_origin_universal_location: X2( + bridge_origin_universal_location: [ GlobalConsensus(LOCAL_NETWORK), Parachain(SIBLING_PARACHAIN), - ), - bridge_destination_universal_location: X1(GlobalConsensus(REMOTE_NETWORK)), + ] + .into(), + bridge_destination_universal_location: [GlobalConsensus(REMOTE_NETWORK)].into(), }); } #[test] fn at_relay_from_local_relay_to_remote_parachain_works() { run_successful_test(SuccessfulTest { - here_universal_location: X1(GlobalConsensus(LOCAL_NETWORK)), + here_universal_location: [GlobalConsensus(LOCAL_NETWORK)].into(), bridge_origin_relative_location: Here.into(), - bridge_origin_universal_location: X1(GlobalConsensus(LOCAL_NETWORK)), - bridge_destination_universal_location: X2( + bridge_origin_universal_location: [GlobalConsensus(LOCAL_NETWORK)].into(), + bridge_destination_universal_location: [ GlobalConsensus(REMOTE_NETWORK), Parachain(REMOTE_PARACHAIN), - ), + ] + .into(), }); } #[test] fn at_relay_from_sibling_parachain_to_remote_parachain_works() { run_successful_test(SuccessfulTest { - here_universal_location: X1(GlobalConsensus(LOCAL_NETWORK)), - bridge_origin_relative_location: X1(Parachain(SIBLING_PARACHAIN)).into(), + here_universal_location: [GlobalConsensus(LOCAL_NETWORK)].into(), + bridge_origin_relative_location: [Parachain(SIBLING_PARACHAIN)].into(), - bridge_origin_universal_location: X2( + bridge_origin_universal_location: [ GlobalConsensus(LOCAL_NETWORK), Parachain(SIBLING_PARACHAIN), - ), - bridge_destination_universal_location: X2( + ] + .into(), + bridge_destination_universal_location: [ GlobalConsensus(REMOTE_NETWORK), Parachain(REMOTE_PARACHAIN), - ), + ] + .into(), }); } #[test] fn at_bridge_hub_from_local_relay_to_remote_relay_works() { run_successful_test(SuccessfulTest { - here_universal_location: X2( - GlobalConsensus(LOCAL_NETWORK), - Parachain(LOCAL_BRIDGE_HUB), - ), + here_universal_location: [GlobalConsensus(LOCAL_NETWORK), Parachain(LOCAL_BRIDGE_HUB)] + .into(), bridge_origin_relative_location: Parent.into(), - bridge_origin_universal_location: X1(GlobalConsensus(LOCAL_NETWORK)), - bridge_destination_universal_location: X1(GlobalConsensus(REMOTE_NETWORK)), + bridge_origin_universal_location: [GlobalConsensus(LOCAL_NETWORK)].into(), + bridge_destination_universal_location: [GlobalConsensus(REMOTE_NETWORK)].into(), }); } #[test] fn at_bridge_hub_from_sibling_parachain_to_remote_relay_works() { run_successful_test(SuccessfulTest { - here_universal_location: X2( - GlobalConsensus(LOCAL_NETWORK), - Parachain(LOCAL_BRIDGE_HUB), - ), - bridge_origin_relative_location: ParentThen(X1(Parachain(SIBLING_PARACHAIN))).into(), + here_universal_location: [GlobalConsensus(LOCAL_NETWORK), Parachain(LOCAL_BRIDGE_HUB)] + .into(), + bridge_origin_relative_location: ParentThen([Parachain(SIBLING_PARACHAIN)].into()) + .into(), - bridge_origin_universal_location: X2( + bridge_origin_universal_location: [ GlobalConsensus(LOCAL_NETWORK), Parachain(SIBLING_PARACHAIN), - ), - bridge_destination_universal_location: X1(GlobalConsensus(REMOTE_NETWORK)), + ] + .into(), + bridge_destination_universal_location: [GlobalConsensus(REMOTE_NETWORK)].into(), }); } #[test] fn at_bridge_hub_from_local_relay_to_remote_parachain_works() { run_successful_test(SuccessfulTest { - here_universal_location: X2( - GlobalConsensus(LOCAL_NETWORK), - Parachain(LOCAL_BRIDGE_HUB), - ), + here_universal_location: [GlobalConsensus(LOCAL_NETWORK), Parachain(LOCAL_BRIDGE_HUB)] + .into(), bridge_origin_relative_location: Parent.into(), - bridge_origin_universal_location: X1(GlobalConsensus(LOCAL_NETWORK)), - bridge_destination_universal_location: X2( + bridge_origin_universal_location: [GlobalConsensus(LOCAL_NETWORK)].into(), + bridge_destination_universal_location: [ GlobalConsensus(REMOTE_NETWORK), Parachain(REMOTE_PARACHAIN), - ), + ] + .into(), }); } #[test] fn at_bridge_hub_from_sibling_parachain_to_remote_parachain_works() { run_successful_test(SuccessfulTest { - here_universal_location: X2( - GlobalConsensus(LOCAL_NETWORK), - Parachain(LOCAL_BRIDGE_HUB), - ), - bridge_origin_relative_location: ParentThen(X1(Parachain(SIBLING_PARACHAIN))).into(), + here_universal_location: [GlobalConsensus(LOCAL_NETWORK), Parachain(LOCAL_BRIDGE_HUB)] + .into(), + bridge_origin_relative_location: ParentThen([Parachain(SIBLING_PARACHAIN)].into()) + .into(), - bridge_origin_universal_location: X2( + bridge_origin_universal_location: [ GlobalConsensus(LOCAL_NETWORK), Parachain(SIBLING_PARACHAIN), - ), - bridge_destination_universal_location: X2( + ] + .into(), + bridge_destination_universal_location: [ GlobalConsensus(REMOTE_NETWORK), Parachain(REMOTE_PARACHAIN), - ), + ] + .into(), }); } @@ -456,18 +488,18 @@ mod tests { #[test] fn low_level_junctions_at_bridge_origin_are_stripped() { let locations1 = run_successful_test(SuccessfulTest { - here_universal_location: X1(GlobalConsensus(LOCAL_NETWORK)), + here_universal_location: [GlobalConsensus(LOCAL_NETWORK)].into(), bridge_origin_relative_location: Here.into(), - bridge_origin_universal_location: X1(GlobalConsensus(LOCAL_NETWORK)), - bridge_destination_universal_location: X1(GlobalConsensus(REMOTE_NETWORK)), + bridge_origin_universal_location: [GlobalConsensus(LOCAL_NETWORK)].into(), + bridge_destination_universal_location: [GlobalConsensus(REMOTE_NETWORK)].into(), }); let locations2 = run_successful_test(SuccessfulTest { - here_universal_location: X1(GlobalConsensus(LOCAL_NETWORK)), - bridge_origin_relative_location: X1(PalletInstance(0)).into(), + here_universal_location: [GlobalConsensus(LOCAL_NETWORK)].into(), + bridge_origin_relative_location: [PalletInstance(0)].into(), - bridge_origin_universal_location: X1(GlobalConsensus(LOCAL_NETWORK)), - bridge_destination_universal_location: X1(GlobalConsensus(REMOTE_NETWORK)), + bridge_origin_universal_location: [GlobalConsensus(LOCAL_NETWORK)].into(), + bridge_destination_universal_location: [GlobalConsensus(REMOTE_NETWORK)].into(), }); assert_eq!(locations1.bridge_id, locations2.bridge_id); @@ -476,18 +508,18 @@ mod tests { #[test] fn low_level_junctions_at_bridge_destination_are_stripped() { let locations1 = run_successful_test(SuccessfulTest { - here_universal_location: X1(GlobalConsensus(LOCAL_NETWORK)), + here_universal_location: [GlobalConsensus(LOCAL_NETWORK)].into(), bridge_origin_relative_location: Here.into(), - bridge_origin_universal_location: X1(GlobalConsensus(LOCAL_NETWORK)), - bridge_destination_universal_location: X1(GlobalConsensus(REMOTE_NETWORK)), + bridge_origin_universal_location: [GlobalConsensus(LOCAL_NETWORK)].into(), + bridge_destination_universal_location: [GlobalConsensus(REMOTE_NETWORK)].into(), }); let locations2 = run_successful_test(SuccessfulTest { - here_universal_location: X1(GlobalConsensus(LOCAL_NETWORK)), + here_universal_location: [GlobalConsensus(LOCAL_NETWORK)].into(), bridge_origin_relative_location: Here.into(), - bridge_origin_universal_location: X1(GlobalConsensus(LOCAL_NETWORK)), - bridge_destination_universal_location: X1(GlobalConsensus(REMOTE_NETWORK)), + bridge_origin_universal_location: [GlobalConsensus(LOCAL_NETWORK)].into(), + bridge_destination_universal_location: [GlobalConsensus(REMOTE_NETWORK)].into(), }); assert_eq!(locations1.bridge_id, locations2.bridge_id); @@ -499,9 +531,9 @@ mod tests { fn bridge_locations_fails_when_here_is_not_universal_location() { assert_eq!( bridge_locations( - Box::new(X1(Parachain(1000))), + Box::new([Parachain(1000)].into()), Box::new(Here.into()), - Box::new(X1(GlobalConsensus(REMOTE_NETWORK))), + Box::new([GlobalConsensus(REMOTE_NETWORK)].into()), REMOTE_NETWORK, ), Err(BridgeLocationsError::NonUniversalLocation), @@ -512,9 +544,9 @@ mod tests { fn bridge_locations_fails_when_computed_destination_is_not_universal_location() { assert_eq!( bridge_locations( - Box::new(X1(GlobalConsensus(LOCAL_NETWORK))), + Box::new([GlobalConsensus(LOCAL_NETWORK)].into()), Box::new(Here.into()), - Box::new(X1(OnlyChild)), + Box::new([OnlyChild].into()), REMOTE_NETWORK, ), Err(BridgeLocationsError::NonUniversalLocation), @@ -525,9 +557,9 @@ mod tests { fn bridge_locations_fails_when_computed_destination_is_local() { assert_eq!( bridge_locations( - Box::new(X1(GlobalConsensus(LOCAL_NETWORK))), + Box::new([GlobalConsensus(LOCAL_NETWORK)].into()), Box::new(Here.into()), - Box::new(X2(GlobalConsensus(LOCAL_NETWORK), OnlyChild)), + Box::new([GlobalConsensus(LOCAL_NETWORK), OnlyChild].into()), REMOTE_NETWORK, ), Err(BridgeLocationsError::DestinationIsLocal), @@ -538,9 +570,9 @@ mod tests { fn bridge_locations_fails_when_computed_destination_is_unreachable() { assert_eq!( bridge_locations( - Box::new(X1(GlobalConsensus(LOCAL_NETWORK))), + Box::new([GlobalConsensus(LOCAL_NETWORK)].into()), Box::new(Here.into()), - Box::new(X1(GlobalConsensus(UNREACHABLE_NETWORK))), + Box::new([GlobalConsensus(UNREACHABLE_NETWORK)].into()), REMOTE_NETWORK, ), Err(BridgeLocationsError::UnreachableDestination), diff --git a/relays/bin-substrate/Cargo.toml b/relays/bin-substrate/Cargo.toml index 04cf80849dbc0f9d30c66ceef7e35d1360307728..fe8bf073d394c69a2b48ddcaa763e04d45a129ac 100644 --- a/relays/bin-substrate/Cargo.toml +++ b/relays/bin-substrate/Cargo.toml @@ -5,12 +5,16 @@ authors = ["Parity Technologies "] edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] anyhow = "1.0" async-std = "1.9.0" async-trait = "0.1" codec = { package = "parity-scale-codec", version = "3.1.5" } -futures = "0.3.29" +env_logger = "0.11" +futures = "0.3.30" hex = "0.4" log = "0.4.20" num-format = "0.4" @@ -20,31 +24,28 @@ rustc-hex = "2.1" structopt = "0.3" signal-hook = "0.3.16" signal-hook-async-std = "0.2.2" -strum = { version = "0.25.0", features = ["derive"] } +strum = { version = "0.26.1", features = ["derive"] } # Bridge dependencies +bp-bridge-hub-polkadot = { path = "../../primitives/chain-bridge-hub-polkadot" } +bp-bridge-hub-rococo = { path = "../../primitives/chain-bridge-hub-rococo" } bp-header-chain = { path = "../../primitives/header-chain" } bp-messages = { path = "../../primitives/messages" } bp-parachains = { path = "../../primitives/parachains" } -bp-millau = { path = "../../primitives/chain-millau" } bp-polkadot-bulletin = { path = "../../primitives/chain-polkadot-bulletin" } +bp-polkadot = { path = "../../primitives/chain-polkadot" } bp-polkadot-core = { path = "../../primitives/polkadot-core" } -bp-rialto = { path = "../../primitives/chain-rialto" } -bp-rialto-parachain = { path = "../../primitives/chain-rialto-parachain" } +bp-rococo = { path = "../../primitives/chain-rococo" } bp-runtime = { path = "../../primitives/runtime" } bridge-runtime-common = { path = "../../bin/runtime-common" } -millau-runtime = { path = "../../bin/millau/runtime" } pallet-bridge-parachains = { path = "../../modules/parachains" } pallet-bridge-messages = { path = "../../modules/messages" } pallet-xcm-bridge-hub = { path = "../../modules/xcm-bridge-hub" } parachains-relay = { path = "../parachains" } -relay-millau-client = { path = "../client-millau" } -relay-rialto-client = { path = "../client-rialto" } -relay-rialto-parachain-client = { path = "../client-rialto-parachain" } relay-bridge-hub-kusama-client = { path = "../client-bridge-hub-kusama" } relay-bridge-hub-polkadot-client = { path = "../client-bridge-hub-polkadot" } relay-bridge-hub-rococo-client = { path = "../client-bridge-hub-rococo" } -relay-bridge-hub-wococo-client = { path = "../client-bridge-hub-wococo" } +relay-bridge-hub-westend-client = { path = "../client-bridge-hub-westend" } relay-kusama-client = { path = "../client-kusama" } relay-polkadot-client = { path = "../client-polkadot" } relay-polkadot-bulletin-client = { path = "../client-polkadot-bulletin" } @@ -52,11 +53,6 @@ relay-rococo-client = { path = "../client-rococo" } relay-substrate-client = { path = "../client-substrate" } relay-utils = { path = "../utils" } relay-westend-client = { path = "../client-westend" } -relay-wococo-client = { path = "../client-wococo" } -rialto-runtime = { path = "../../bin/rialto/runtime" } -# we are not using this runtime to craft call or transactions, but we still need it -# to prepare large XCM messages -rialto-parachain-runtime = { path = "../../bin/rialto-parachain/runtime" } substrate-relay-helper = { path = "../lib-substrate-relay" } # Substrate Dependencies @@ -65,17 +61,9 @@ frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = " sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -# Polkadot Dependencies -polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } - [dev-dependencies] bp-test-utils = { path = "../../primitives/test-utils" } hex-literal = "0.4" sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -tempfile = "3.8" +tempfile = "3.9" finality-grandpa = { version = "0.16.2" } diff --git a/relays/bin-substrate/src/bridges/kusama_polkadot/kusama_headers_to_bridge_hub_polkadot.rs b/relays/bin-substrate/src/bridges/kusama_polkadot/kusama_headers_to_bridge_hub_polkadot.rs index 9df949c3e5978b68a784fd51ce6672280fd959bc..2dc9c131305ad1969ff97df313bf37bef0e72d12 100644 --- a/relays/bin-substrate/src/bridges/kusama_polkadot/kusama_headers_to_bridge_hub_polkadot.rs +++ b/relays/bin-substrate/src/bridges/kusama_polkadot/kusama_headers_to_bridge_hub_polkadot.rs @@ -21,12 +21,10 @@ use crate::cli::bridge::{ }; use async_trait::async_trait; -use relay_substrate_client::{AccountKeyPairOf, Client}; use substrate_relay_helper::{ equivocation::SubstrateEquivocationDetectionPipeline, finality::SubstrateFinalitySyncPipeline, finality_base::{engine::Grandpa as GrandpaFinalityEngine, SubstrateFinalityPipeline}, - TransactionParams, }; /// Description of Kusama -> PolkadotBridgeHub finalized headers bridge. @@ -58,20 +56,6 @@ impl SubstrateFinalityPipeline for KusamaFinalityToBridgeHubPolkadot { #[async_trait] impl SubstrateFinalitySyncPipeline for KusamaFinalityToBridgeHubPolkadot { type SubmitFinalityProofCallBuilder = SubmitFinalityProofCallBuilder; - - async fn start_relay_guards( - target_client: &impl Client, - _transaction_params: &TransactionParams>, - enable_version_guard: bool, - ) -> relay_substrate_client::Result<()> { - if enable_version_guard { - relay_substrate_client::guard::abort_on_spec_version_change( - target_client.clone(), - target_client.simple_runtime_version().await?.spec_version, - ); - } - Ok(()) - } } #[async_trait] diff --git a/relays/bin-substrate/src/bridges/kusama_polkadot/polkadot_headers_to_bridge_hub_kusama.rs b/relays/bin-substrate/src/bridges/kusama_polkadot/polkadot_headers_to_bridge_hub_kusama.rs index 6a323d65a0d056dce28392077f499125a982b181..589bf2546e8c1823a80c217de37fba284b892720 100644 --- a/relays/bin-substrate/src/bridges/kusama_polkadot/polkadot_headers_to_bridge_hub_kusama.rs +++ b/relays/bin-substrate/src/bridges/kusama_polkadot/polkadot_headers_to_bridge_hub_kusama.rs @@ -21,12 +21,10 @@ use crate::cli::bridge::{ }; use async_trait::async_trait; -use relay_substrate_client::{AccountKeyPairOf, Client}; use substrate_relay_helper::{ equivocation::SubstrateEquivocationDetectionPipeline, finality::SubstrateFinalitySyncPipeline, finality_base::{engine::Grandpa as GrandpaFinalityEngine, SubstrateFinalityPipeline}, - TransactionParams, }; /// Description of Polkadot -> KusamaBridgeHub finalized headers bridge. @@ -58,20 +56,6 @@ impl SubstrateFinalityPipeline for PolkadotFinalityToBridgeHubKusama { #[async_trait] impl SubstrateFinalitySyncPipeline for PolkadotFinalityToBridgeHubKusama { type SubmitFinalityProofCallBuilder = SubmitFinalityProofCallBuilder; - - async fn start_relay_guards( - target_client: &impl Client, - _transaction_params: &TransactionParams>, - enable_version_guard: bool, - ) -> relay_substrate_client::Result<()> { - if enable_version_guard { - relay_substrate_client::guard::abort_on_spec_version_change( - target_client.clone(), - target_client.simple_runtime_version().await?.spec_version, - ); - } - Ok(()) - } } #[async_trait] diff --git a/relays/bin-substrate/src/bridges/mod.rs b/relays/bin-substrate/src/bridges/mod.rs index 53fe5e0c192d834fb58ced64a7a80e0d7719cd7d..cfe59c87567dad4f3e1a3c9609d2c45f68d2b477 100644 --- a/relays/bin-substrate/src/bridges/mod.rs +++ b/relays/bin-substrate/src/bridges/mod.rs @@ -18,7 +18,5 @@ pub mod kusama_polkadot; pub mod polkadot_bulletin; -pub mod rialto_millau; -pub mod rialto_parachain_millau; -pub mod rococo_wococo; -pub mod westend_millau; +pub mod rococo_bulletin; +pub mod rococo_westend; diff --git a/relays/bin-substrate/src/bridges/polkadot_bulletin/bridge_hub_polkadot_messages_to_polkadot_bulletin.rs b/relays/bin-substrate/src/bridges/polkadot_bulletin/bridge_hub_polkadot_messages_to_polkadot_bulletin.rs index fc83ff63e0322aaaca52a3417c0c19a72675e7b7..d2d3277d5fec29d63c2ca97ca913669503651b9a 100644 --- a/relays/bin-substrate/src/bridges/polkadot_bulletin/bridge_hub_polkadot_messages_to_polkadot_bulletin.rs +++ b/relays/bin-substrate/src/bridges/polkadot_bulletin/bridge_hub_polkadot_messages_to_polkadot_bulletin.rs @@ -36,8 +36,8 @@ impl MessagesCliBridge for BridgeHubPolkadotToPolkadotBulletinMessagesCliBridge substrate_relay_helper::generate_receive_message_proof_call_builder!( BridgeHubPolkadotMessagesToPolkadotBulletinMessageLane, BridgeHubPolkadotMessagesToPolkadotBulletinMessageLaneReceiveMessagesProofCallBuilder, - relay_polkadot_bulletin_client::RuntimeCall::BridgePolkadotBridgeHubMessages, - relay_polkadot_bulletin_client::BridgePolkadotBridgeHubMessagesCall::receive_messages_proof + relay_polkadot_bulletin_client::RuntimeCall::BridgePolkadotMessages, + relay_polkadot_bulletin_client::BridgePolkadotMessagesCall::receive_messages_proof ); substrate_relay_helper::generate_receive_message_delivery_proof_call_builder!( diff --git a/relays/bin-substrate/src/bridges/polkadot_bulletin/polkadot_bulletin_headers_to_bridge_hub_polkadot.rs b/relays/bin-substrate/src/bridges/polkadot_bulletin/polkadot_bulletin_headers_to_bridge_hub_polkadot.rs index 6dddbd273cad41b8b42cadb867a7fc6e294acb39..dbf89ddeec39877cbc3c35ffc5c4fd65229ffc21 100644 --- a/relays/bin-substrate/src/bridges/polkadot_bulletin/polkadot_bulletin_headers_to_bridge_hub_polkadot.rs +++ b/relays/bin-substrate/src/bridges/polkadot_bulletin/polkadot_bulletin_headers_to_bridge_hub_polkadot.rs @@ -22,12 +22,10 @@ use crate::cli::bridge::{ }; use async_trait::async_trait; -use relay_substrate_client::{AccountKeyPairOf, Client}; use substrate_relay_helper::{ equivocation::SubstrateEquivocationDetectionPipeline, finality::SubstrateFinalitySyncPipeline, finality_base::{engine::Grandpa as GrandpaFinalityEngine, SubstrateFinalityPipeline}, - TransactionParams, }; /// Description of `PolkadotBulletin` -> `PolkadotBridgeHub` finalized headers bridge. @@ -59,20 +57,6 @@ impl SubstrateFinalityPipeline for PolkadotBulletinFinalityToBridgeHubPolkadot { #[async_trait] impl SubstrateFinalitySyncPipeline for PolkadotBulletinFinalityToBridgeHubPolkadot { type SubmitFinalityProofCallBuilder = SubmitFinalityProofCallBuilder; - - async fn start_relay_guards( - target_client: &impl Client, - _transaction_params: &TransactionParams>, - enable_version_guard: bool, - ) -> relay_substrate_client::Result<()> { - if enable_version_guard { - relay_substrate_client::guard::abort_on_spec_version_change( - target_client.clone(), - target_client.simple_runtime_version().await?.spec_version, - ); - } - Ok(()) - } } #[async_trait] diff --git a/relays/bin-substrate/src/bridges/polkadot_bulletin/polkadot_bulletin_messages_to_bridge_hub_polkadot.rs b/relays/bin-substrate/src/bridges/polkadot_bulletin/polkadot_bulletin_messages_to_bridge_hub_polkadot.rs index 9009917eb4fab581d04adc37b0a43237744d9ba4..7b9cc5ec4f55a8c9b89185eb775a9bab658817b1 100644 --- a/relays/bin-substrate/src/bridges/polkadot_bulletin/polkadot_bulletin_messages_to_bridge_hub_polkadot.rs +++ b/relays/bin-substrate/src/bridges/polkadot_bulletin/polkadot_bulletin_messages_to_bridge_hub_polkadot.rs @@ -43,8 +43,8 @@ substrate_relay_helper::generate_receive_message_proof_call_builder!( substrate_relay_helper::generate_receive_message_delivery_proof_call_builder!( PolkadotBulletinMessagesToBridgeHubPolkadotMessageLane, PolkadotBulletinMessagesToBridgeHubPolkadotMessageLaneReceiveMessagesDeliveryProofCallBuilder, - relay_polkadot_bulletin_client::RuntimeCall::BridgePolkadotBridgeHubMessages, - relay_polkadot_bulletin_client::BridgePolkadotBridgeHubMessagesCall::receive_messages_delivery_proof + relay_polkadot_bulletin_client::RuntimeCall::BridgePolkadotMessages, + relay_polkadot_bulletin_client::BridgePolkadotMessagesCall::receive_messages_delivery_proof ); /// PolkadotBulletin-to-BridgeHubPolkadot messages lane. diff --git a/relays/bin-substrate/src/bridges/polkadot_bulletin/polkadot_headers_to_polkadot_bulletin.rs b/relays/bin-substrate/src/bridges/polkadot_bulletin/polkadot_headers_to_polkadot_bulletin.rs index 5af9ce5da7ce4e46c2e73f8b951ebb97e67e6429..897c2ac884f91c4e9166901d7db6b825fb4e5e55 100644 --- a/relays/bin-substrate/src/bridges/polkadot_bulletin/polkadot_headers_to_polkadot_bulletin.rs +++ b/relays/bin-substrate/src/bridges/polkadot_bulletin/polkadot_headers_to_polkadot_bulletin.rs @@ -21,12 +21,10 @@ use crate::cli::bridge::{ }; use async_trait::async_trait; -use relay_substrate_client::{AccountKeyPairOf, Client}; use substrate_relay_helper::{ equivocation::SubstrateEquivocationDetectionPipeline, finality::SubstrateFinalitySyncPipeline, finality_base::{engine::Grandpa as GrandpaFinalityEngine, SubstrateFinalityPipeline}, - TransactionParams, }; /// Description of Polkadot -> `PolkadotBulletin` finalized headers bridge. @@ -58,20 +56,6 @@ impl SubstrateFinalityPipeline for PolkadotFinalityToPolkadotBulletin { #[async_trait] impl SubstrateFinalitySyncPipeline for PolkadotFinalityToPolkadotBulletin { type SubmitFinalityProofCallBuilder = SubmitFinalityProofCallBuilder; - - async fn start_relay_guards( - target_client: &impl Client, - _transaction_params: &TransactionParams>, - enable_version_guard: bool, - ) -> relay_substrate_client::Result<()> { - if enable_version_guard { - relay_substrate_client::guard::abort_on_spec_version_change( - target_client.clone(), - target_client.simple_runtime_version().await?.spec_version, - ); - } - Ok(()) - } } #[async_trait] diff --git a/relays/bin-substrate/src/bridges/rialto_millau/millau_headers_to_rialto.rs b/relays/bin-substrate/src/bridges/rialto_millau/millau_headers_to_rialto.rs deleted file mode 100644 index 7fd5513a272959775afbb556e251ba9389d4d98a..0000000000000000000000000000000000000000 --- a/relays/bin-substrate/src/bridges/rialto_millau/millau_headers_to_rialto.rs +++ /dev/null @@ -1,74 +0,0 @@ -// 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 . - -//! Millau-to-Rialto headers sync entrypoint. - -use crate::cli::bridge::{ - CliBridgeBase, MessagesCliBridge, RelayToRelayEquivocationDetectionCliBridge, - RelayToRelayHeadersCliBridge, -}; -use substrate_relay_helper::{ - equivocation::{ - DirectReportGrandpaEquivocationCallBuilder, SubstrateEquivocationDetectionPipeline, - }, - finality::{DirectSubmitGrandpaFinalityProofCallBuilder, SubstrateFinalitySyncPipeline}, - finality_base::{engine::Grandpa as GrandpaFinalityEngine, SubstrateFinalityPipeline}, -}; - -/// Description of Millau -> Rialto finalized headers bridge. -#[derive(Clone, Debug)] -pub struct MillauFinalityToRialto; - -impl SubstrateFinalityPipeline for MillauFinalityToRialto { - type SourceChain = relay_millau_client::Millau; - type TargetChain = relay_rialto_client::Rialto; - - type FinalityEngine = GrandpaFinalityEngine; -} - -impl SubstrateFinalitySyncPipeline for MillauFinalityToRialto { - type SubmitFinalityProofCallBuilder = DirectSubmitGrandpaFinalityProofCallBuilder< - Self, - rialto_runtime::Runtime, - rialto_runtime::MillauGrandpaInstance, - >; -} - -impl SubstrateEquivocationDetectionPipeline for MillauFinalityToRialto { - type ReportEquivocationCallBuilder = - DirectReportGrandpaEquivocationCallBuilder; -} - -/// `Millau` to `Rialto` bridge definition. -pub struct MillauToRialtoCliBridge {} - -impl CliBridgeBase for MillauToRialtoCliBridge { - type Source = relay_millau_client::Millau; - type Target = relay_rialto_client::Rialto; -} - -impl RelayToRelayHeadersCliBridge for MillauToRialtoCliBridge { - type Finality = MillauFinalityToRialto; -} - -impl RelayToRelayEquivocationDetectionCliBridge for MillauToRialtoCliBridge { - type Equivocation = MillauFinalityToRialto; -} - -impl MessagesCliBridge for MillauToRialtoCliBridge { - type MessagesLane = - crate::bridges::rialto_millau::millau_messages_to_rialto::MillauMessagesToRialto; -} diff --git a/relays/bin-substrate/src/bridges/rialto_millau/millau_messages_to_rialto.rs b/relays/bin-substrate/src/bridges/rialto_millau/millau_messages_to_rialto.rs deleted file mode 100644 index e79a15a83ed2afb29a7bd1037e992e602f857619..0000000000000000000000000000000000000000 --- a/relays/bin-substrate/src/bridges/rialto_millau/millau_messages_to_rialto.rs +++ /dev/null @@ -1,47 +0,0 @@ -// 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 . - -//! Millau-to-Rialto messages sync entrypoint. - -use relay_millau_client::Millau; -use relay_rialto_client::Rialto; -use substrate_relay_helper::messages::{ - DirectReceiveMessagesDeliveryProofCallBuilder, DirectReceiveMessagesProofCallBuilder, - SubstrateMessageLane, -}; - -/// Description of Millau -> Rialto messages bridge. -#[derive(Clone, Debug)] -pub struct MillauMessagesToRialto; - -impl SubstrateMessageLane for MillauMessagesToRialto { - type SourceChain = Millau; - type TargetChain = Rialto; - - type ReceiveMessagesProofCallBuilder = DirectReceiveMessagesProofCallBuilder< - Self, - rialto_runtime::Runtime, - rialto_runtime::WithMillauMessagesInstance, - >; - type ReceiveMessagesDeliveryProofCallBuilder = DirectReceiveMessagesDeliveryProofCallBuilder< - Self, - millau_runtime::Runtime, - millau_runtime::WithRialtoMessagesInstance, - >; - - type SourceBatchCallBuilder = (); - type TargetBatchCallBuilder = (); -} diff --git a/relays/bin-substrate/src/bridges/rialto_millau/rialto_headers_to_millau.rs b/relays/bin-substrate/src/bridges/rialto_millau/rialto_headers_to_millau.rs deleted file mode 100644 index d9b98d77784e7305237c95019eb268782fd92143..0000000000000000000000000000000000000000 --- a/relays/bin-substrate/src/bridges/rialto_millau/rialto_headers_to_millau.rs +++ /dev/null @@ -1,74 +0,0 @@ -// 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 . - -//! Rialto-to-Millau headers sync entrypoint. - -use crate::cli::bridge::{ - CliBridgeBase, MessagesCliBridge, RelayToRelayEquivocationDetectionCliBridge, - RelayToRelayHeadersCliBridge, -}; -use substrate_relay_helper::{ - equivocation::{ - DirectReportGrandpaEquivocationCallBuilder, SubstrateEquivocationDetectionPipeline, - }, - finality::{DirectSubmitGrandpaFinalityProofCallBuilder, SubstrateFinalitySyncPipeline}, - finality_base::{engine::Grandpa as GrandpaFinalityEngine, SubstrateFinalityPipeline}, -}; - -/// Description of Millau -> Rialto finalized headers bridge. -#[derive(Clone, Debug)] -pub struct RialtoFinalityToMillau; - -impl SubstrateFinalityPipeline for RialtoFinalityToMillau { - type SourceChain = relay_rialto_client::Rialto; - type TargetChain = relay_millau_client::Millau; - - type FinalityEngine = GrandpaFinalityEngine; -} - -impl SubstrateFinalitySyncPipeline for RialtoFinalityToMillau { - type SubmitFinalityProofCallBuilder = DirectSubmitGrandpaFinalityProofCallBuilder< - Self, - millau_runtime::Runtime, - millau_runtime::RialtoGrandpaInstance, - >; -} - -impl SubstrateEquivocationDetectionPipeline for RialtoFinalityToMillau { - type ReportEquivocationCallBuilder = - DirectReportGrandpaEquivocationCallBuilder; -} - -/// `Rialto` to `Millau` bridge definition. -pub struct RialtoToMillauCliBridge {} - -impl CliBridgeBase for RialtoToMillauCliBridge { - type Source = relay_rialto_client::Rialto; - type Target = relay_millau_client::Millau; -} - -impl RelayToRelayHeadersCliBridge for RialtoToMillauCliBridge { - type Finality = RialtoFinalityToMillau; -} - -impl RelayToRelayEquivocationDetectionCliBridge for RialtoToMillauCliBridge { - type Equivocation = RialtoFinalityToMillau; -} - -impl MessagesCliBridge for RialtoToMillauCliBridge { - type MessagesLane = - crate::bridges::rialto_millau::rialto_messages_to_millau::RialtoMessagesToMillau; -} diff --git a/relays/bin-substrate/src/bridges/rialto_millau/rialto_messages_to_millau.rs b/relays/bin-substrate/src/bridges/rialto_millau/rialto_messages_to_millau.rs deleted file mode 100644 index fa9fac111afe0c3918417b94637bd479ad1ab418..0000000000000000000000000000000000000000 --- a/relays/bin-substrate/src/bridges/rialto_millau/rialto_messages_to_millau.rs +++ /dev/null @@ -1,47 +0,0 @@ -// 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 . - -//! Rialto-to-Millau messages sync entrypoint. - -use relay_millau_client::Millau; -use relay_rialto_client::Rialto; -use substrate_relay_helper::messages::{ - DirectReceiveMessagesDeliveryProofCallBuilder, DirectReceiveMessagesProofCallBuilder, - SubstrateMessageLane, -}; - -/// Description of Rialto -> Millau messages bridge. -#[derive(Clone, Debug)] -pub struct RialtoMessagesToMillau; - -impl SubstrateMessageLane for RialtoMessagesToMillau { - type SourceChain = Rialto; - type TargetChain = Millau; - - type ReceiveMessagesProofCallBuilder = DirectReceiveMessagesProofCallBuilder< - Self, - millau_runtime::Runtime, - millau_runtime::WithRialtoMessagesInstance, - >; - type ReceiveMessagesDeliveryProofCallBuilder = DirectReceiveMessagesDeliveryProofCallBuilder< - Self, - rialto_runtime::Runtime, - rialto_runtime::WithMillauMessagesInstance, - >; - - type SourceBatchCallBuilder = (); - type TargetBatchCallBuilder = (); -} diff --git a/relays/bin-substrate/src/bridges/rialto_parachain_millau/millau_headers_to_rialto_parachain.rs b/relays/bin-substrate/src/bridges/rialto_parachain_millau/millau_headers_to_rialto_parachain.rs deleted file mode 100644 index 051057e217665afc2bc36c21f1686083fa666c0d..0000000000000000000000000000000000000000 --- a/relays/bin-substrate/src/bridges/rialto_parachain_millau/millau_headers_to_rialto_parachain.rs +++ /dev/null @@ -1,95 +0,0 @@ -// 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 . - -//! Millau-to-RialtoParachain headers sync entrypoint. - -// 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 . - -//! Millau-to-RialtoParachain headers sync entrypoint. - -use crate::cli::bridge::{ - CliBridgeBase, MessagesCliBridge, RelayToRelayEquivocationDetectionCliBridge, - RelayToRelayHeadersCliBridge, -}; -use substrate_relay_helper::{ - equivocation::{ - DirectReportGrandpaEquivocationCallBuilder, SubstrateEquivocationDetectionPipeline, - }, - finality::SubstrateFinalitySyncPipeline, - finality_base::{engine::Grandpa as GrandpaFinalityEngine, SubstrateFinalityPipeline}, -}; - -substrate_relay_helper::generate_submit_finality_proof_call_builder!( - MillauFinalityToRialtoParachain, - MillauFinalityToRialtoParachainCallBuilder, - relay_rialto_parachain_client::RuntimeCall::BridgeMillauGrandpa, - relay_rialto_parachain_client::BridgeGrandpaCall::submit_finality_proof -); - -/// Description of Millau -> Rialto finalized headers bridge. -#[derive(Clone, Debug)] -pub struct MillauFinalityToRialtoParachain; - -impl SubstrateFinalityPipeline for MillauFinalityToRialtoParachain { - type SourceChain = relay_millau_client::Millau; - type TargetChain = relay_rialto_parachain_client::RialtoParachain; - - type FinalityEngine = GrandpaFinalityEngine; -} - -impl SubstrateFinalitySyncPipeline for MillauFinalityToRialtoParachain { - type SubmitFinalityProofCallBuilder = MillauFinalityToRialtoParachainCallBuilder; -} - -impl SubstrateEquivocationDetectionPipeline for MillauFinalityToRialtoParachain { - type ReportEquivocationCallBuilder = - DirectReportGrandpaEquivocationCallBuilder; -} - -/// `Millau` to `RialtoParachain` bridge definition. -pub struct MillauToRialtoParachainCliBridge {} - -impl CliBridgeBase for MillauToRialtoParachainCliBridge { - type Source = relay_millau_client::Millau; - type Target = relay_rialto_parachain_client::RialtoParachain; -} - -impl RelayToRelayHeadersCliBridge for MillauToRialtoParachainCliBridge { - type Finality = MillauFinalityToRialtoParachain; -} - -impl RelayToRelayEquivocationDetectionCliBridge for MillauToRialtoParachainCliBridge { - type Equivocation = MillauFinalityToRialtoParachain; -} - -impl MessagesCliBridge for MillauToRialtoParachainCliBridge { - type MessagesLane = - crate::bridges::rialto_parachain_millau::millau_messages_to_rialto_parachain::MillauMessagesToRialtoParachain; -} diff --git a/relays/bin-substrate/src/bridges/rialto_parachain_millau/millau_messages_to_rialto_parachain.rs b/relays/bin-substrate/src/bridges/rialto_parachain_millau/millau_messages_to_rialto_parachain.rs deleted file mode 100644 index b2ed88082dfbc7f9f55b7940fc2d97b11fb2cf0b..0000000000000000000000000000000000000000 --- a/relays/bin-substrate/src/bridges/rialto_parachain_millau/millau_messages_to_rialto_parachain.rs +++ /dev/null @@ -1,51 +0,0 @@ -// 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 . - -//! Millau-to-RialtoParachain messages sync entrypoint. - -use relay_millau_client::Millau; -use relay_rialto_parachain_client::RialtoParachain; -use substrate_relay_helper::{ - messages::{DirectReceiveMessagesDeliveryProofCallBuilder, SubstrateMessageLane}, - UtilityPalletBatchCallBuilder, -}; - -substrate_relay_helper::generate_receive_message_proof_call_builder!( - MillauMessagesToRialtoParachain, - MillauMessagesToRialtoParachainReceiveMessagesProofCallBuilder, - relay_rialto_parachain_client::RuntimeCall::BridgeMillauMessages, - relay_rialto_parachain_client::BridgeMessagesCall::receive_messages_proof -); - -/// Description of Millau -> RialtoParachain messages bridge. -#[derive(Clone, Debug)] -pub struct MillauMessagesToRialtoParachain; - -impl SubstrateMessageLane for MillauMessagesToRialtoParachain { - type SourceChain = Millau; - type TargetChain = RialtoParachain; - - type ReceiveMessagesProofCallBuilder = - MillauMessagesToRialtoParachainReceiveMessagesProofCallBuilder; - type ReceiveMessagesDeliveryProofCallBuilder = DirectReceiveMessagesDeliveryProofCallBuilder< - Self, - millau_runtime::Runtime, - millau_runtime::WithRialtoParachainMessagesInstance, - >; - - type SourceBatchCallBuilder = UtilityPalletBatchCallBuilder; - type TargetBatchCallBuilder = (); -} diff --git a/relays/bin-substrate/src/bridges/rialto_parachain_millau/mod.rs b/relays/bin-substrate/src/bridges/rialto_parachain_millau/mod.rs deleted file mode 100644 index f0613d1511eb3106599f53a886774f5fc1a4f302..0000000000000000000000000000000000000000 --- a/relays/bin-substrate/src/bridges/rialto_parachain_millau/mod.rs +++ /dev/null @@ -1,22 +0,0 @@ -// 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 . - -//! Declaration of all bridges between Rialto Parachain and Millau. - -pub mod millau_headers_to_rialto_parachain; -pub mod millau_messages_to_rialto_parachain; -pub mod rialto_parachain_messages_to_millau; -pub mod rialto_parachains_to_millau; diff --git a/relays/bin-substrate/src/bridges/rialto_parachain_millau/rialto_parachain_messages_to_millau.rs b/relays/bin-substrate/src/bridges/rialto_parachain_millau/rialto_parachain_messages_to_millau.rs deleted file mode 100644 index 34ba8d9d0916b5186727aad349090be5a7487c95..0000000000000000000000000000000000000000 --- a/relays/bin-substrate/src/bridges/rialto_parachain_millau/rialto_parachain_messages_to_millau.rs +++ /dev/null @@ -1,51 +0,0 @@ -// 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 . - -//! RialtoParachain-to-Millau messages sync entrypoint. - -use relay_millau_client::Millau; -use relay_rialto_parachain_client::RialtoParachain; -use substrate_relay_helper::{ - messages::{DirectReceiveMessagesProofCallBuilder, SubstrateMessageLane}, - UtilityPalletBatchCallBuilder, -}; - -substrate_relay_helper::generate_receive_message_delivery_proof_call_builder!( - RialtoParachainMessagesToMillau, - RialtoParachainMessagesToMillauReceiveMessagesDeliveryProofCallBuilder, - relay_rialto_parachain_client::RuntimeCall::BridgeMillauMessages, - relay_rialto_parachain_client::BridgeMessagesCall::receive_messages_delivery_proof -); - -/// Description of RialtoParachain -> Millau messages bridge. -#[derive(Clone, Debug)] -pub struct RialtoParachainMessagesToMillau; - -impl SubstrateMessageLane for RialtoParachainMessagesToMillau { - type SourceChain = RialtoParachain; - type TargetChain = Millau; - - type ReceiveMessagesProofCallBuilder = DirectReceiveMessagesProofCallBuilder< - Self, - millau_runtime::Runtime, - millau_runtime::WithRialtoParachainMessagesInstance, - >; - type ReceiveMessagesDeliveryProofCallBuilder = - RialtoParachainMessagesToMillauReceiveMessagesDeliveryProofCallBuilder; - - type SourceBatchCallBuilder = (); - type TargetBatchCallBuilder = UtilityPalletBatchCallBuilder; -} diff --git a/relays/bin-substrate/src/bridges/rialto_parachain_millau/rialto_parachains_to_millau.rs b/relays/bin-substrate/src/bridges/rialto_parachain_millau/rialto_parachains_to_millau.rs deleted file mode 100644 index 6b2a1332144dcdcababc1af74d2ed33d83a92989..0000000000000000000000000000000000000000 --- a/relays/bin-substrate/src/bridges/rialto_parachain_millau/rialto_parachains_to_millau.rs +++ /dev/null @@ -1,65 +0,0 @@ -// 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 . - -//! Rialto-to-Millau parachains sync entrypoint. - -use crate::cli::bridge::{CliBridgeBase, MessagesCliBridge, ParachainToRelayHeadersCliBridge}; -use relay_millau_client::Millau; -use relay_rialto_client::Rialto; -use relay_rialto_parachain_client::RialtoParachain; -use substrate_relay_helper::parachains::{ - DirectSubmitParachainHeadsCallBuilder, SubstrateParachainsPipeline, -}; - -/// Rialto-to-Millau parachains sync description. -#[derive(Clone, Debug)] -pub struct RialtoParachainsToMillau; - -impl SubstrateParachainsPipeline for RialtoParachainsToMillau { - type SourceParachain = RialtoParachain; - type SourceRelayChain = Rialto; - type TargetChain = Millau; - - type SubmitParachainHeadsCallBuilder = RialtoParachainsToMillauSubmitParachainHeadsCallBuilder; -} - -/// `submit_parachain_heads` call builder for Rialto-to-Millau parachains sync pipeline. -pub type RialtoParachainsToMillauSubmitParachainHeadsCallBuilder = - DirectSubmitParachainHeadsCallBuilder< - RialtoParachainsToMillau, - millau_runtime::Runtime, - millau_runtime::WithRialtoParachainsInstance, - >; - -/// `RialtoParachain` to `Millau` bridge definition. -pub struct RialtoParachainToMillauCliBridge {} - -impl CliBridgeBase for RialtoParachainToMillauCliBridge { - type Source = RialtoParachain; - type Target = Millau; -} - -impl ParachainToRelayHeadersCliBridge for RialtoParachainToMillauCliBridge { - type SourceRelay = Rialto; - type ParachainFinality = RialtoParachainsToMillau; - type RelayFinality = - crate::bridges::rialto_millau::rialto_headers_to_millau::RialtoFinalityToMillau; -} - -impl MessagesCliBridge for RialtoParachainToMillauCliBridge { - type MessagesLane = - crate::bridges::rialto_parachain_millau::rialto_parachain_messages_to_millau::RialtoParachainMessagesToMillau; -} diff --git a/relays/bin-substrate/src/bridges/rococo_bulletin/bridge_hub_rococo_messages_to_rococo_bulletin.rs b/relays/bin-substrate/src/bridges/rococo_bulletin/bridge_hub_rococo_messages_to_rococo_bulletin.rs new file mode 100644 index 0000000000000000000000000000000000000000..77c1538daa365dc3c4e7d3b712b63194b50e157a --- /dev/null +++ b/relays/bin-substrate/src/bridges/rococo_bulletin/bridge_hub_rococo_messages_to_rococo_bulletin.rs @@ -0,0 +1,65 @@ +// Copyright 2022 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 . + +//! BridgeHubRococo-to-RococoBulletin messages sync entrypoint. + +use super::BridgeHubRococoAsBridgeHubPolkadot; +use crate::cli::bridge::{CliBridgeBase, MessagesCliBridge}; +use relay_polkadot_bulletin_client::PolkadotBulletin as RococoBulletin; +use substrate_relay_helper::{messages::SubstrateMessageLane, UtilityPalletBatchCallBuilder}; + +/// BridgeHubRococo-to-RococoBulletin messages bridge. +pub struct BridgeHubRococoToRococoBulletinMessagesCliBridge {} + +impl CliBridgeBase for BridgeHubRococoToRococoBulletinMessagesCliBridge { + type Source = BridgeHubRococoAsBridgeHubPolkadot; + type Target = RococoBulletin; +} + +impl MessagesCliBridge for BridgeHubRococoToRococoBulletinMessagesCliBridge { + type MessagesLane = BridgeHubRococoMessagesToRococoBulletinMessageLane; +} + +substrate_relay_helper::generate_receive_message_proof_call_builder!( + BridgeHubRococoMessagesToRococoBulletinMessageLane, + BridgeHubRococoMessagesToRococoBulletinMessageLaneReceiveMessagesProofCallBuilder, + relay_polkadot_bulletin_client::RuntimeCall::BridgePolkadotMessages, + relay_polkadot_bulletin_client::BridgePolkadotMessagesCall::receive_messages_proof +); + +substrate_relay_helper::generate_receive_message_delivery_proof_call_builder!( + BridgeHubRococoMessagesToRococoBulletinMessageLane, + BridgeHubRococoMessagesToRococoBulletinMessageLaneReceiveMessagesDeliveryProofCallBuilder, + relay_bridge_hub_rococo_client::RuntimeCall::BridgePolkadotBulletinMessages, + relay_bridge_hub_rococo_client::BridgeBulletinMessagesCall::receive_messages_delivery_proof +); + +/// BridgeHubRococo-to-RococoBulletin messages lane. +#[derive(Clone, Debug)] +pub struct BridgeHubRococoMessagesToRococoBulletinMessageLane; + +impl SubstrateMessageLane for BridgeHubRococoMessagesToRococoBulletinMessageLane { + type SourceChain = BridgeHubRococoAsBridgeHubPolkadot; + type TargetChain = RococoBulletin; + + type ReceiveMessagesProofCallBuilder = + BridgeHubRococoMessagesToRococoBulletinMessageLaneReceiveMessagesProofCallBuilder; + type ReceiveMessagesDeliveryProofCallBuilder = + BridgeHubRococoMessagesToRococoBulletinMessageLaneReceiveMessagesDeliveryProofCallBuilder; + + type SourceBatchCallBuilder = UtilityPalletBatchCallBuilder; + type TargetBatchCallBuilder = (); +} diff --git a/relays/bin-substrate/src/bridges/rococo_bulletin/mod.rs b/relays/bin-substrate/src/bridges/rococo_bulletin/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..60c99fcbf7a041d53657638410b12139b35d29a2 --- /dev/null +++ b/relays/bin-substrate/src/bridges/rococo_bulletin/mod.rs @@ -0,0 +1,266 @@ +// 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 . + +//! Declaration of all bridges between Rococo Bulletin Chain and Rococo Bridge Hub. + +use crate::cli::CliChain; + +use bp_messages::MessageNonce; +use bp_runtime::{ + AccountIdOf, BalanceOf, BlockNumberOf, ChainId, HashOf, HasherOf, HeaderOf, NonceOf, + SignatureOf, +}; +use frame_support::pallet_prelude::Weight; +use relay_substrate_client::{ + Error as SubstrateError, SignParam, SimpleRuntimeVersion, UnsignedTransaction, +}; +use sp_core::storage::StorageKey; +use sp_runtime::StateVersion; +use std::time::Duration; + +pub mod bridge_hub_rococo_messages_to_rococo_bulletin; +pub mod rococo_bulletin_headers_to_bridge_hub_rococo; +pub mod rococo_bulletin_messages_to_bridge_hub_rococo; +pub mod rococo_headers_to_rococo_bulletin; +pub mod rococo_parachains_to_rococo_bulletin; + +/// Base `Chain` implementation of Rococo, pretending to be Polkadot. +pub struct RococoBaseAsPolkadot; + +impl bp_runtime::Chain for RococoBaseAsPolkadot { + const ID: ChainId = relay_rococo_client::Rococo::ID; + const STATE_VERSION: StateVersion = StateVersion::V1; + + type BlockNumber = BlockNumberOf; + type Hash = HashOf; + type Hasher = HasherOf; + type Header = HeaderOf; + + type AccountId = AccountIdOf; + type Balance = BalanceOf; + type Nonce = NonceOf; + type Signature = SignatureOf; + + fn max_extrinsic_size() -> u32 { + bp_rococo::Rococo::max_extrinsic_size() + } + + fn max_extrinsic_weight() -> Weight { + bp_rococo::Rococo::max_extrinsic_weight() + } +} + +impl bp_header_chain::ChainWithGrandpa for RococoBaseAsPolkadot { + const WITH_CHAIN_GRANDPA_PALLET_NAME: &'static str = + bp_polkadot::Polkadot::WITH_CHAIN_GRANDPA_PALLET_NAME; + const MAX_AUTHORITIES_COUNT: u32 = bp_rococo::Rococo::MAX_AUTHORITIES_COUNT; + const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = + bp_rococo::Rococo::REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY; + const MAX_MANDATORY_HEADER_SIZE: u32 = bp_rococo::Rococo::MAX_MANDATORY_HEADER_SIZE; + const AVERAGE_HEADER_SIZE: u32 = bp_rococo::Rococo::AVERAGE_HEADER_SIZE; +} + +/// Relay `Chain` implementation of Rococo, pretending to be Polkadot. +#[derive(Debug, Clone, Copy)] +pub struct RococoAsPolkadot; + +impl bp_runtime::UnderlyingChainProvider for RococoAsPolkadot { + type Chain = RococoBaseAsPolkadot; +} + +impl relay_substrate_client::Chain for RococoAsPolkadot { + const NAME: &'static str = relay_rococo_client::Rococo::NAME; + const BEST_FINALIZED_HEADER_ID_METHOD: &'static str = + relay_polkadot_client::Polkadot::BEST_FINALIZED_HEADER_ID_METHOD; + const AVERAGE_BLOCK_INTERVAL: Duration = relay_rococo_client::Rococo::AVERAGE_BLOCK_INTERVAL; + + type SignedBlock = ::SignedBlock; + type Call = ::Call; +} + +impl relay_substrate_client::ChainWithGrandpa for RococoAsPolkadot { + const SYNCED_HEADERS_GRANDPA_INFO_METHOD: &'static str = + relay_polkadot_client::Polkadot::SYNCED_HEADERS_GRANDPA_INFO_METHOD; + + type KeyOwnerProof = + ::KeyOwnerProof; +} + +impl relay_substrate_client::ChainWithBalances for RococoAsPolkadot { + fn account_info_storage_key(account_id: &Self::AccountId) -> StorageKey { + relay_rococo_client::Rococo::account_info_storage_key(account_id) + } +} + +impl relay_substrate_client::RelayChain for RococoAsPolkadot { + const PARAS_PALLET_NAME: &'static str = relay_rococo_client::Rococo::PARAS_PALLET_NAME; +} + +impl relay_substrate_client::ChainWithTransactions for RococoAsPolkadot { + type AccountKeyPair = ::AccountKeyPair; + type SignedTransaction = ::SignedTransaction; + + fn sign_transaction( + param: SignParam, + unsigned: UnsignedTransaction, + ) -> Result { + relay_rococo_client::Rococo::sign_transaction( + SignParam { + spec_version: param.spec_version, + transaction_version: param.transaction_version, + genesis_hash: param.genesis_hash, + signer: param.signer, + }, + unsigned.switch_chain(), + ) + } + + fn is_signed(tx: &Self::SignedTransaction) -> bool { + relay_rococo_client::Rococo::is_signed(tx) + } + + fn is_signed_by(signer: &Self::AccountKeyPair, tx: &Self::SignedTransaction) -> bool { + relay_rococo_client::Rococo::is_signed_by(signer, tx) + } + + fn parse_transaction(tx: Self::SignedTransaction) -> Option> { + relay_rococo_client::Rococo::parse_transaction(tx).map(|tx| tx.switch_chain()) + } +} + +impl CliChain for RococoAsPolkadot { + const RUNTIME_VERSION: Option = None; +} + +/// Base `Chain` implementation of Rococo Bridge Hub, pretending to be a Polkadot Bridge Hub. +pub struct BaseBridgeHubRococoAsBridgeHubPolkadot; + +impl bp_runtime::Chain for BaseBridgeHubRococoAsBridgeHubPolkadot { + const ID: ChainId = relay_bridge_hub_rococo_client::BridgeHubRococo::ID; + const STATE_VERSION: StateVersion = StateVersion::V1; + + type BlockNumber = BlockNumberOf; + type Hash = HashOf; + type Hasher = HasherOf; + type Header = HeaderOf; + + type AccountId = AccountIdOf; + type Balance = BalanceOf; + type Nonce = NonceOf; + type Signature = SignatureOf; + + fn max_extrinsic_size() -> u32 { + bp_bridge_hub_rococo::BridgeHubRococo::max_extrinsic_size() + } + + fn max_extrinsic_weight() -> Weight { + bp_bridge_hub_rococo::BridgeHubRococo::max_extrinsic_weight() + } +} + +impl bp_runtime::Parachain for BaseBridgeHubRococoAsBridgeHubPolkadot { + const PARACHAIN_ID: u32 = bp_bridge_hub_rococo::BridgeHubRococo::PARACHAIN_ID; +} + +impl bp_messages::ChainWithMessages for BaseBridgeHubRococoAsBridgeHubPolkadot { + const WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str = + relay_bridge_hub_polkadot_client::BridgeHubPolkadot::WITH_CHAIN_MESSAGES_PALLET_NAME; + + const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = + relay_bridge_hub_rococo_client::BridgeHubRococo::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX; + const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = + relay_bridge_hub_rococo_client::BridgeHubRococo::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; +} + +/// Relay `Chain` implementation of Rococo Bridge Hub, pretending to be a Polkadot Bridge Hub. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct BridgeHubRococoAsBridgeHubPolkadot; + +impl bp_runtime::UnderlyingChainProvider for BridgeHubRococoAsBridgeHubPolkadot { + type Chain = BaseBridgeHubRococoAsBridgeHubPolkadot; +} + +impl relay_substrate_client::Chain for BridgeHubRococoAsBridgeHubPolkadot { + const NAME: &'static str = relay_bridge_hub_rococo_client::BridgeHubRococo::NAME; + const BEST_FINALIZED_HEADER_ID_METHOD: &'static str = + relay_bridge_hub_polkadot_client::BridgeHubPolkadot::BEST_FINALIZED_HEADER_ID_METHOD; + const AVERAGE_BLOCK_INTERVAL: Duration = + relay_bridge_hub_rococo_client::BridgeHubRococo::AVERAGE_BLOCK_INTERVAL; + + type SignedBlock = ::SignedBlock; + type Call = + ::Call; +} + +impl relay_substrate_client::ChainWithBalances for BridgeHubRococoAsBridgeHubPolkadot { + fn account_info_storage_key(account_id: &Self::AccountId) -> StorageKey { + relay_bridge_hub_rococo_client::BridgeHubRococo::account_info_storage_key(account_id) + } +} + +impl relay_substrate_client::ChainWithUtilityPallet for BridgeHubRococoAsBridgeHubPolkadot { + type UtilityPallet = relay_substrate_client::MockedRuntimeUtilityPallet< + relay_bridge_hub_rococo_client::RuntimeCall, + >; +} + +impl relay_substrate_client::ChainWithTransactions for BridgeHubRococoAsBridgeHubPolkadot { + type AccountKeyPair = ::AccountKeyPair; + type SignedTransaction = ::SignedTransaction; + + fn sign_transaction( + param: SignParam, + unsigned: UnsignedTransaction, + ) -> Result { + relay_bridge_hub_rococo_client::BridgeHubRococo::sign_transaction( + SignParam { + spec_version: param.spec_version, + transaction_version: param.transaction_version, + genesis_hash: param.genesis_hash, + signer: param.signer, + }, + unsigned.switch_chain(), + ) + } + + fn is_signed(tx: &Self::SignedTransaction) -> bool { + relay_bridge_hub_rococo_client::BridgeHubRococo::is_signed(tx) + } + + fn is_signed_by(signer: &Self::AccountKeyPair, tx: &Self::SignedTransaction) -> bool { + relay_bridge_hub_rococo_client::BridgeHubRococo::is_signed_by(signer, tx) + } + + fn parse_transaction(tx: Self::SignedTransaction) -> Option> { + relay_bridge_hub_rococo_client::BridgeHubRococo::parse_transaction(tx) + .map(|tx| tx.switch_chain()) + } +} + +impl relay_substrate_client::ChainWithMessages for BridgeHubRococoAsBridgeHubPolkadot { + const WITH_CHAIN_RELAYERS_PALLET_NAME: Option<&'static str> = + relay_bridge_hub_polkadot_client::BridgeHubPolkadot::WITH_CHAIN_RELAYERS_PALLET_NAME; + + const TO_CHAIN_MESSAGE_DETAILS_METHOD: &'static str = + relay_bridge_hub_polkadot_client::BridgeHubPolkadot::TO_CHAIN_MESSAGE_DETAILS_METHOD; + const FROM_CHAIN_MESSAGE_DETAILS_METHOD: &'static str = + relay_bridge_hub_polkadot_client::BridgeHubPolkadot::FROM_CHAIN_MESSAGE_DETAILS_METHOD; +} + +impl CliChain for BridgeHubRococoAsBridgeHubPolkadot { + const RUNTIME_VERSION: Option = + Some(SimpleRuntimeVersion { spec_version: 1_003_000, transaction_version: 3 }); +} diff --git a/relays/bin-substrate/src/bridges/rococo_bulletin/rococo_bulletin_headers_to_bridge_hub_rococo.rs b/relays/bin-substrate/src/bridges/rococo_bulletin/rococo_bulletin_headers_to_bridge_hub_rococo.rs new file mode 100644 index 0000000000000000000000000000000000000000..e897cd85967dfcb62f2c3832759891bf043b7517 --- /dev/null +++ b/relays/bin-substrate/src/bridges/rococo_bulletin/rococo_bulletin_headers_to_bridge_hub_rococo.rs @@ -0,0 +1,86 @@ +// Copyright 2022 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 . + +//! RococoBulletin-to-BridgeHubRococo headers sync entrypoint. + +use super::BridgeHubRococoAsBridgeHubPolkadot; +use crate::cli::bridge::{ + CliBridgeBase, MessagesCliBridge, RelayToRelayEquivocationDetectionCliBridge, + RelayToRelayHeadersCliBridge, +}; + +use async_trait::async_trait; +use substrate_relay_helper::{ + equivocation::SubstrateEquivocationDetectionPipeline, + finality::SubstrateFinalitySyncPipeline, + finality_base::{engine::Grandpa as GrandpaFinalityEngine, SubstrateFinalityPipeline}, +}; + +/// Description of `RococoBulletin` -> `RococoBridgeHub` finalized headers bridge. +#[derive(Clone, Debug)] +pub struct RococoBulletinFinalityToBridgeHubRococo; + +substrate_relay_helper::generate_submit_finality_proof_call_builder!( + RococoBulletinFinalityToBridgeHubRococo, + SubmitFinalityProofCallBuilder, + relay_bridge_hub_rococo_client::RuntimeCall::BridgePolkadotBulletinGrandpa, + relay_bridge_hub_rococo_client::BridgeBulletinGrandpaCall::submit_finality_proof +); + +substrate_relay_helper::generate_report_equivocation_call_builder!( + RococoBulletinFinalityToBridgeHubRococo, + ReportEquivocationCallBuilder, + relay_polkadot_bulletin_client::RuntimeCall::Grandpa, + relay_polkadot_bulletin_client::GrandpaCall::report_equivocation +); + +#[async_trait] +impl SubstrateFinalityPipeline for RococoBulletinFinalityToBridgeHubRococo { + type SourceChain = relay_polkadot_bulletin_client::PolkadotBulletin; + type TargetChain = BridgeHubRococoAsBridgeHubPolkadot; + + type FinalityEngine = GrandpaFinalityEngine; +} + +#[async_trait] +impl SubstrateFinalitySyncPipeline for RococoBulletinFinalityToBridgeHubRococo { + type SubmitFinalityProofCallBuilder = SubmitFinalityProofCallBuilder; +} + +#[async_trait] +impl SubstrateEquivocationDetectionPipeline for RococoBulletinFinalityToBridgeHubRococo { + type ReportEquivocationCallBuilder = ReportEquivocationCallBuilder; +} + +/// `RococoBulletin` to BridgeHub `Rococo` bridge definition. +pub struct RococoBulletinToBridgeHubRococoCliBridge {} + +impl CliBridgeBase for RococoBulletinToBridgeHubRococoCliBridge { + type Source = relay_polkadot_bulletin_client::PolkadotBulletin; + type Target = BridgeHubRococoAsBridgeHubPolkadot; +} + +impl RelayToRelayHeadersCliBridge for RococoBulletinToBridgeHubRococoCliBridge { + type Finality = RococoBulletinFinalityToBridgeHubRococo; +} + +impl RelayToRelayEquivocationDetectionCliBridge for RococoBulletinToBridgeHubRococoCliBridge { + type Equivocation = RococoBulletinFinalityToBridgeHubRococo; +} + +impl MessagesCliBridge for RococoBulletinToBridgeHubRococoCliBridge { + type MessagesLane = crate::bridges::rococo_bulletin::rococo_bulletin_messages_to_bridge_hub_rococo::RococoBulletinMessagesToBridgeHubRococoMessageLane; +} diff --git a/relays/bin-substrate/src/bridges/rococo_bulletin/rococo_bulletin_messages_to_bridge_hub_rococo.rs b/relays/bin-substrate/src/bridges/rococo_bulletin/rococo_bulletin_messages_to_bridge_hub_rococo.rs new file mode 100644 index 0000000000000000000000000000000000000000..7d61105dd01fc968affa8ab818dd6c47d5b9e9d3 --- /dev/null +++ b/relays/bin-substrate/src/bridges/rococo_bulletin/rococo_bulletin_messages_to_bridge_hub_rococo.rs @@ -0,0 +1,65 @@ +// Copyright 2022 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 . + +//! RococoBulletin-to-BridgeHubRococo messages sync entrypoint. + +use super::BridgeHubRococoAsBridgeHubPolkadot; +use crate::cli::bridge::{CliBridgeBase, MessagesCliBridge}; +use relay_polkadot_bulletin_client::PolkadotBulletin as RococoBulletin; +use substrate_relay_helper::{messages::SubstrateMessageLane, UtilityPalletBatchCallBuilder}; + +/// RococoBulletin-to-BridgeHubRococo messages bridge. +pub struct RococoBulletinToBridgeHubRococoMessagesCliBridge {} + +impl CliBridgeBase for RococoBulletinToBridgeHubRococoMessagesCliBridge { + type Source = RococoBulletin; + type Target = BridgeHubRococoAsBridgeHubPolkadot; +} + +impl MessagesCliBridge for RococoBulletinToBridgeHubRococoMessagesCliBridge { + type MessagesLane = RococoBulletinMessagesToBridgeHubRococoMessageLane; +} + +substrate_relay_helper::generate_receive_message_proof_call_builder!( + RococoBulletinMessagesToBridgeHubRococoMessageLane, + RococoBulletinMessagesToBridgeHubRococoMessageLaneReceiveMessagesProofCallBuilder, + relay_bridge_hub_rococo_client::RuntimeCall::BridgePolkadotBulletinMessages, + relay_bridge_hub_rococo_client::BridgeBulletinMessagesCall::receive_messages_proof +); + +substrate_relay_helper::generate_receive_message_delivery_proof_call_builder!( + RococoBulletinMessagesToBridgeHubRococoMessageLane, + RococoBulletinMessagesToBridgeHubRococoMessageLaneReceiveMessagesDeliveryProofCallBuilder, + relay_polkadot_bulletin_client::RuntimeCall::BridgePolkadotMessages, + relay_polkadot_bulletin_client::BridgePolkadotMessagesCall::receive_messages_delivery_proof +); + +/// RococoBulletin-to-BridgeHubRococo messages lane. +#[derive(Clone, Debug)] +pub struct RococoBulletinMessagesToBridgeHubRococoMessageLane; + +impl SubstrateMessageLane for RococoBulletinMessagesToBridgeHubRococoMessageLane { + type SourceChain = RococoBulletin; + type TargetChain = BridgeHubRococoAsBridgeHubPolkadot; + + type ReceiveMessagesProofCallBuilder = + RococoBulletinMessagesToBridgeHubRococoMessageLaneReceiveMessagesProofCallBuilder; + type ReceiveMessagesDeliveryProofCallBuilder = + RococoBulletinMessagesToBridgeHubRococoMessageLaneReceiveMessagesDeliveryProofCallBuilder; + + type SourceBatchCallBuilder = (); + type TargetBatchCallBuilder = UtilityPalletBatchCallBuilder; +} diff --git a/relays/bin-substrate/src/bridges/rococo_bulletin/rococo_headers_to_rococo_bulletin.rs b/relays/bin-substrate/src/bridges/rococo_bulletin/rococo_headers_to_rococo_bulletin.rs new file mode 100644 index 0000000000000000000000000000000000000000..8a4b44eec27b94d5b742aadaed61b4cffc86cb07 --- /dev/null +++ b/relays/bin-substrate/src/bridges/rococo_bulletin/rococo_headers_to_rococo_bulletin.rs @@ -0,0 +1,81 @@ +// Copyright 2022 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 . + +//! Rococo-to-RococoBulletin headers sync entrypoint. + +use super::RococoAsPolkadot; +use crate::cli::bridge::{ + CliBridgeBase, RelayToRelayEquivocationDetectionCliBridge, RelayToRelayHeadersCliBridge, +}; + +use async_trait::async_trait; +use substrate_relay_helper::{ + equivocation::SubstrateEquivocationDetectionPipeline, + finality::SubstrateFinalitySyncPipeline, + finality_base::{engine::Grandpa as GrandpaFinalityEngine, SubstrateFinalityPipeline}, +}; + +/// Description of Rococo -> `RococoBulletin` finalized headers bridge. +#[derive(Clone, Debug)] +pub struct RococoFinalityToRococoBulletin; + +substrate_relay_helper::generate_submit_finality_proof_call_builder!( + RococoFinalityToRococoBulletin, + SubmitFinalityProofCallBuilder, + relay_polkadot_bulletin_client::RuntimeCall::BridgePolkadotGrandpa, + relay_polkadot_bulletin_client::BridgePolkadotGrandpaCall::submit_finality_proof +); + +substrate_relay_helper::generate_report_equivocation_call_builder!( + RococoFinalityToRococoBulletin, + ReportEquivocationCallBuilder, + relay_rococo_client::RuntimeCall::Grandpa, + relay_rococo_client::GrandpaCall::report_equivocation +); + +#[async_trait] +impl SubstrateFinalityPipeline for RococoFinalityToRococoBulletin { + type SourceChain = RococoAsPolkadot; + type TargetChain = relay_polkadot_bulletin_client::PolkadotBulletin; + + type FinalityEngine = GrandpaFinalityEngine; +} + +#[async_trait] +impl SubstrateFinalitySyncPipeline for RococoFinalityToRococoBulletin { + type SubmitFinalityProofCallBuilder = SubmitFinalityProofCallBuilder; +} + +#[async_trait] +impl SubstrateEquivocationDetectionPipeline for RococoFinalityToRococoBulletin { + type ReportEquivocationCallBuilder = ReportEquivocationCallBuilder; +} + +/// `Rococo` to BridgeHub `RococoBulletin` bridge definition. +pub struct RococoToRococoBulletinCliBridge {} + +impl CliBridgeBase for RococoToRococoBulletinCliBridge { + type Source = RococoAsPolkadot; + type Target = relay_polkadot_bulletin_client::PolkadotBulletin; +} + +impl RelayToRelayHeadersCliBridge for RococoToRococoBulletinCliBridge { + type Finality = RococoFinalityToRococoBulletin; +} + +impl RelayToRelayEquivocationDetectionCliBridge for RococoToRococoBulletinCliBridge { + type Equivocation = RococoFinalityToRococoBulletin; +} diff --git a/relays/bin-substrate/src/bridges/rococo_bulletin/rococo_parachains_to_rococo_bulletin.rs b/relays/bin-substrate/src/bridges/rococo_bulletin/rococo_parachains_to_rococo_bulletin.rs new file mode 100644 index 0000000000000000000000000000000000000000..60597d624f2ce1e6e026dbf46f6484e1bdaa925b --- /dev/null +++ b/relays/bin-substrate/src/bridges/rococo_bulletin/rococo_parachains_to_rococo_bulletin.rs @@ -0,0 +1,91 @@ +// 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 . + +//! Rococo-to-RococoBulletin parachains sync entrypoint. + +use super::{BridgeHubRococoAsBridgeHubPolkadot, RococoAsPolkadot}; +use crate::cli::bridge::{CliBridgeBase, MessagesCliBridge, ParachainToRelayHeadersCliBridge}; + +use bp_polkadot_core::parachains::{ParaHash, ParaHeadsProof, ParaId}; +use bp_runtime::Chain; +use relay_substrate_client::{CallOf, HeaderIdOf}; +use substrate_relay_helper::{ + messages::MessagesRelayLimits, + parachains::{SubmitParachainHeadsCallBuilder, SubstrateParachainsPipeline}, +}; + +/// Rococo-to-RococoBulletin parachain sync description. +#[derive(Clone, Debug)] +pub struct RococoToRococoBulletin; + +impl SubstrateParachainsPipeline for RococoToRococoBulletin { + type SourceParachain = BridgeHubRococoAsBridgeHubPolkadot; + type SourceRelayChain = RococoAsPolkadot; + type TargetChain = relay_polkadot_bulletin_client::PolkadotBulletin; + + type SubmitParachainHeadsCallBuilder = RococoToRococoBulletinCallBuilder; +} + +pub struct RococoToRococoBulletinCallBuilder; +impl SubmitParachainHeadsCallBuilder for RococoToRococoBulletinCallBuilder { + fn build_submit_parachain_heads_call( + at_relay_block: HeaderIdOf, + parachains: Vec<(ParaId, ParaHash)>, + parachain_heads_proof: ParaHeadsProof, + ) -> CallOf { + relay_polkadot_bulletin_client::RuntimeCall::BridgePolkadotParachains( + relay_polkadot_bulletin_client::BridgePolkadotParachainsCall::submit_parachain_heads { + at_relay_block: (at_relay_block.0, at_relay_block.1), + parachains, + parachain_heads_proof, + }, + ) + } +} + +/// Rococo-to-RococoBulletin parachain sync description for the CLI. +pub struct RococoToRococoBulletinCliBridge {} + +impl ParachainToRelayHeadersCliBridge for RococoToRococoBulletinCliBridge { + type SourceRelay = RococoAsPolkadot; + type ParachainFinality = RococoToRococoBulletin; + type RelayFinality = + crate::bridges::rococo_bulletin::rococo_headers_to_rococo_bulletin::RococoFinalityToRococoBulletin; +} + +impl CliBridgeBase for RococoToRococoBulletinCliBridge { + type Source = BridgeHubRococoAsBridgeHubPolkadot; + type Target = relay_polkadot_bulletin_client::PolkadotBulletin; +} + +impl MessagesCliBridge for RococoToRococoBulletinCliBridge { + type MessagesLane = + crate::bridges::rococo_bulletin::bridge_hub_rococo_messages_to_rococo_bulletin::BridgeHubRococoMessagesToRococoBulletinMessageLane; + + fn maybe_messages_limits() -> Option { + // Rococo Bulletin chain is missing the `TransactionPayment` runtime API (as well as the + // transaction payment pallet itself), so we can't estimate limits using runtime calls. + // Let's do it here. + // + // Folloiung constants are just safe **underestimations**. Normally, we are able to deliver + // and dispatch thousands of messages in the same transaction. + Some(MessagesRelayLimits { + max_messages_in_single_batch: 128, + max_messages_weight_in_single_batch: + bp_polkadot_bulletin::PolkadotBulletin::max_extrinsic_weight() / 20, + }) + } +} diff --git a/relays/bin-substrate/src/bridges/rococo_wococo/bridge_hub_rococo_messages_to_bridge_hub_wococo.rs b/relays/bin-substrate/src/bridges/rococo_westend/bridge_hub_rococo_messages_to_bridge_hub_westend.rs similarity index 54% rename from relays/bin-substrate/src/bridges/rococo_wococo/bridge_hub_rococo_messages_to_bridge_hub_wococo.rs rename to relays/bin-substrate/src/bridges/rococo_westend/bridge_hub_rococo_messages_to_bridge_hub_westend.rs index 83e653ebd8d96cba338cd8e85ade6ced2c9a4078..b620e2dc285f3b5b0cd8c8ff7ce1bda486e0b8a7 100644 --- a/relays/bin-substrate/src/bridges/rococo_wococo/bridge_hub_rococo_messages_to_bridge_hub_wococo.rs +++ b/relays/bin-substrate/src/bridges/rococo_westend/bridge_hub_rococo_messages_to_bridge_hub_westend.rs @@ -14,51 +14,51 @@ // You should have received a copy of the GNU General Public License // along with Parity Bridges Common. If not, see . -//! BridgeHubRococo-to-BridgeHubWococo messages sync entrypoint. +//! BridgeHubRococo-to-BridgeHubWestend messages sync entrypoint. use crate::cli::bridge::{CliBridgeBase, MessagesCliBridge}; use relay_bridge_hub_rococo_client::BridgeHubRococo; -use relay_bridge_hub_wococo_client::BridgeHubWococo; +use relay_bridge_hub_westend_client::BridgeHubWestend; use substrate_relay_helper::{messages::SubstrateMessageLane, UtilityPalletBatchCallBuilder}; -pub struct BridgeHubRococoToBridgeHubWococoMessagesCliBridge {} +pub struct BridgeHubRococoToBridgeHubWestendMessagesCliBridge {} -impl CliBridgeBase for BridgeHubRococoToBridgeHubWococoMessagesCliBridge { +impl CliBridgeBase for BridgeHubRococoToBridgeHubWestendMessagesCliBridge { type Source = BridgeHubRococo; - type Target = BridgeHubWococo; + type Target = BridgeHubWestend; } -impl MessagesCliBridge for BridgeHubRococoToBridgeHubWococoMessagesCliBridge { - type MessagesLane = BridgeHubRococoMessagesToBridgeHubWococoMessageLane; +impl MessagesCliBridge for BridgeHubRococoToBridgeHubWestendMessagesCliBridge { + type MessagesLane = BridgeHubRococoMessagesToBridgeHubWestendMessageLane; } substrate_relay_helper::generate_receive_message_proof_call_builder!( - BridgeHubRococoMessagesToBridgeHubWococoMessageLane, - BridgeHubRococoMessagesToBridgeHubWococoMessageLaneReceiveMessagesProofCallBuilder, - relay_bridge_hub_wococo_client::RuntimeCall::BridgeRococoMessages, - relay_bridge_hub_wococo_client::BridgeMessagesCall::receive_messages_proof + BridgeHubRococoMessagesToBridgeHubWestendMessageLane, + BridgeHubRococoMessagesToBridgeHubWestendMessageLaneReceiveMessagesProofCallBuilder, + relay_bridge_hub_westend_client::runtime::Call::BridgeRococoMessages, + relay_bridge_hub_westend_client::runtime::BridgeRococoMessagesCall::receive_messages_proof ); substrate_relay_helper::generate_receive_message_delivery_proof_call_builder!( - BridgeHubRococoMessagesToBridgeHubWococoMessageLane, - BridgeHubRococoMessagesToBridgeHubWococoMessageLaneReceiveMessagesDeliveryProofCallBuilder, - relay_bridge_hub_rococo_client::RuntimeCall::BridgeWococoMessages, + BridgeHubRococoMessagesToBridgeHubWestendMessageLane, + BridgeHubRococoMessagesToBridgeHubWestendMessageLaneReceiveMessagesDeliveryProofCallBuilder, + relay_bridge_hub_rococo_client::RuntimeCall::BridgeWestendMessages, relay_bridge_hub_rococo_client::BridgeMessagesCall::receive_messages_delivery_proof ); -/// Description of BridgeHubRococo -> BridgeHubWococo messages bridge. +/// Description of BridgeHubRococo -> BridgeHubWestendWestend messages bridge. #[derive(Clone, Debug)] -pub struct BridgeHubRococoMessagesToBridgeHubWococoMessageLane; +pub struct BridgeHubRococoMessagesToBridgeHubWestendMessageLane; -impl SubstrateMessageLane for BridgeHubRococoMessagesToBridgeHubWococoMessageLane { +impl SubstrateMessageLane for BridgeHubRococoMessagesToBridgeHubWestendMessageLane { type SourceChain = BridgeHubRococo; - type TargetChain = BridgeHubWococo; + type TargetChain = BridgeHubWestend; type ReceiveMessagesProofCallBuilder = - BridgeHubRococoMessagesToBridgeHubWococoMessageLaneReceiveMessagesProofCallBuilder; + BridgeHubRococoMessagesToBridgeHubWestendMessageLaneReceiveMessagesProofCallBuilder; type ReceiveMessagesDeliveryProofCallBuilder = - BridgeHubRococoMessagesToBridgeHubWococoMessageLaneReceiveMessagesDeliveryProofCallBuilder; + BridgeHubRococoMessagesToBridgeHubWestendMessageLaneReceiveMessagesDeliveryProofCallBuilder; type SourceBatchCallBuilder = UtilityPalletBatchCallBuilder; - type TargetBatchCallBuilder = UtilityPalletBatchCallBuilder; + type TargetBatchCallBuilder = UtilityPalletBatchCallBuilder; } diff --git a/relays/bin-substrate/src/bridges/rococo_wococo/bridge_hub_wococo_messages_to_bridge_hub_rococo.rs b/relays/bin-substrate/src/bridges/rococo_westend/bridge_hub_westend_messages_to_bridge_hub_rococo.rs similarity index 51% rename from relays/bin-substrate/src/bridges/rococo_wococo/bridge_hub_wococo_messages_to_bridge_hub_rococo.rs rename to relays/bin-substrate/src/bridges/rococo_westend/bridge_hub_westend_messages_to_bridge_hub_rococo.rs index 82e4447e6d23e9ddc8bb2092430d190efaf12512..92721713d1bf29b39ed588fb54cf0cc68c83c1fb 100644 --- a/relays/bin-substrate/src/bridges/rococo_wococo/bridge_hub_wococo_messages_to_bridge_hub_rococo.rs +++ b/relays/bin-substrate/src/bridges/rococo_westend/bridge_hub_westend_messages_to_bridge_hub_rococo.rs @@ -14,51 +14,51 @@ // You should have received a copy of the GNU General Public License // along with Parity Bridges Common. If not, see . -//! BridgeHubWococo-to-BridgeHubRococo messages sync entrypoint. +//! BridgeHubWestend-to-BridgeHubRococo messages sync entrypoint. use crate::cli::bridge::{CliBridgeBase, MessagesCliBridge}; use relay_bridge_hub_rococo_client::BridgeHubRococo; -use relay_bridge_hub_wococo_client::BridgeHubWococo; +use relay_bridge_hub_westend_client::BridgeHubWestend; use substrate_relay_helper::{messages::SubstrateMessageLane, UtilityPalletBatchCallBuilder}; -pub struct BridgeHubWococoToBridgeHubRococoMessagesCliBridge {} +pub struct BridgeHubWestendToBridgeHubRococoMessagesCliBridge {} -impl CliBridgeBase for BridgeHubWococoToBridgeHubRococoMessagesCliBridge { - type Source = BridgeHubWococo; +impl CliBridgeBase for BridgeHubWestendToBridgeHubRococoMessagesCliBridge { + type Source = BridgeHubWestend; type Target = BridgeHubRococo; } -impl MessagesCliBridge for BridgeHubWococoToBridgeHubRococoMessagesCliBridge { - type MessagesLane = BridgeHubWococoMessagesToBridgeHubRococoMessageLane; +impl MessagesCliBridge for BridgeHubWestendToBridgeHubRococoMessagesCliBridge { + type MessagesLane = BridgeHubWestendMessagesToBridgeHubRococoMessageLane; } substrate_relay_helper::generate_receive_message_proof_call_builder!( - BridgeHubWococoMessagesToBridgeHubRococoMessageLane, - BridgeHubWococoMessagesToBridgeHubRococoMessageLaneReceiveMessagesProofCallBuilder, - relay_bridge_hub_rococo_client::RuntimeCall::BridgeWococoMessages, + BridgeHubWestendMessagesToBridgeHubRococoMessageLane, + BridgeHubWestendMessagesToBridgeHubRococoMessageLaneReceiveMessagesProofCallBuilder, + relay_bridge_hub_rococo_client::RuntimeCall::BridgeWestendMessages, relay_bridge_hub_rococo_client::BridgeMessagesCall::receive_messages_proof ); substrate_relay_helper::generate_receive_message_delivery_proof_call_builder!( - BridgeHubWococoMessagesToBridgeHubRococoMessageLane, - BridgeHubWococoMessagesToBridgeHubRococoMessageLaneReceiveMessagesDeliveryProofCallBuilder, - relay_bridge_hub_wococo_client::RuntimeCall::BridgeRococoMessages, - relay_bridge_hub_wococo_client::BridgeMessagesCall::receive_messages_delivery_proof + BridgeHubWestendMessagesToBridgeHubRococoMessageLane, + BridgeHubWestendMessagesToBridgeHubRococoMessageLaneReceiveMessagesDeliveryProofCallBuilder, + relay_bridge_hub_westend_client::runtime::Call::BridgeRococoMessages, + relay_bridge_hub_westend_client::runtime::BridgeRococoMessagesCall::receive_messages_delivery_proof ); -/// Description of BridgeHubWococo -> BridgeHubRococo messages bridge. +/// Description of BridgeHubWestend -> BridgeHubRococo messages bridge. #[derive(Clone, Debug)] -pub struct BridgeHubWococoMessagesToBridgeHubRococoMessageLane; +pub struct BridgeHubWestendMessagesToBridgeHubRococoMessageLane; -impl SubstrateMessageLane for BridgeHubWococoMessagesToBridgeHubRococoMessageLane { - type SourceChain = BridgeHubWococo; +impl SubstrateMessageLane for BridgeHubWestendMessagesToBridgeHubRococoMessageLane { + type SourceChain = BridgeHubWestend; type TargetChain = BridgeHubRococo; type ReceiveMessagesProofCallBuilder = - BridgeHubWococoMessagesToBridgeHubRococoMessageLaneReceiveMessagesProofCallBuilder; + BridgeHubWestendMessagesToBridgeHubRococoMessageLaneReceiveMessagesProofCallBuilder; type ReceiveMessagesDeliveryProofCallBuilder = - BridgeHubWococoMessagesToBridgeHubRococoMessageLaneReceiveMessagesDeliveryProofCallBuilder; + BridgeHubWestendMessagesToBridgeHubRococoMessageLaneReceiveMessagesDeliveryProofCallBuilder; - type SourceBatchCallBuilder = UtilityPalletBatchCallBuilder; + type SourceBatchCallBuilder = UtilityPalletBatchCallBuilder; type TargetBatchCallBuilder = UtilityPalletBatchCallBuilder; } diff --git a/relays/bin-substrate/src/bridges/rialto_millau/mod.rs b/relays/bin-substrate/src/bridges/rococo_westend/mod.rs similarity index 66% rename from relays/bin-substrate/src/bridges/rialto_millau/mod.rs rename to relays/bin-substrate/src/bridges/rococo_westend/mod.rs index 2353b58ce616ed463561a013e25dc596bbe67f84..965d3e0561f99fdc4cc20246fb4e44db9a270169 100644 --- a/relays/bin-substrate/src/bridges/rialto_millau/mod.rs +++ b/relays/bin-substrate/src/bridges/rococo_westend/mod.rs @@ -14,9 +14,11 @@ // You should have received a copy of the GNU General Public License // along with Parity Bridges Common. If not, see . -//! Declaration of all bridges between Rialto and Millau. +//! Declaration of all bridges between Rococo Bridge Hub and Westend Bridge Hub. -pub mod millau_headers_to_rialto; -pub mod millau_messages_to_rialto; -pub mod rialto_headers_to_millau; -pub mod rialto_messages_to_millau; +pub mod bridge_hub_rococo_messages_to_bridge_hub_westend; +pub mod bridge_hub_westend_messages_to_bridge_hub_rococo; +pub mod rococo_headers_to_bridge_hub_westend; +pub mod rococo_parachains_to_bridge_hub_westend; +pub mod westend_headers_to_bridge_hub_rococo; +pub mod westend_parachains_to_bridge_hub_rococo; diff --git a/relays/bin-substrate/src/bridges/rococo_wococo/rococo_headers_to_bridge_hub_wococo.rs b/relays/bin-substrate/src/bridges/rococo_westend/rococo_headers_to_bridge_hub_westend.rs similarity index 57% rename from relays/bin-substrate/src/bridges/rococo_wococo/rococo_headers_to_bridge_hub_wococo.rs rename to relays/bin-substrate/src/bridges/rococo_westend/rococo_headers_to_bridge_hub_westend.rs index 6521958cc8a45314a2b1f8bfae468c97fb4de2a1..24d0b6603157a1bf550d6bad1164a70dedee9c9f 100644 --- a/relays/bin-substrate/src/bridges/rococo_wococo/rococo_headers_to_bridge_hub_wococo.rs +++ b/relays/bin-substrate/src/bridges/rococo_westend/rococo_headers_to_bridge_hub_westend.rs @@ -14,83 +14,67 @@ // You should have received a copy of the GNU General Public License // along with Parity Bridges Common. If not, see . -//! Rococo-to-Wococo bridge hubs headers sync entrypoint. +//! Rococo-to-Westend bridge hubs headers sync entrypoint. use crate::cli::bridge::{ CliBridgeBase, RelayToRelayEquivocationDetectionCliBridge, RelayToRelayHeadersCliBridge, }; use async_trait::async_trait; -use relay_substrate_client::{AccountKeyPairOf, Client}; use substrate_relay_helper::{ equivocation::SubstrateEquivocationDetectionPipeline, finality::SubstrateFinalitySyncPipeline, finality_base::{engine::Grandpa as GrandpaFinalityEngine, SubstrateFinalityPipeline}, - TransactionParams, }; -/// Description of Rococo -> Wococo finalized headers bridge. +/// Description of Rococo -> Westend finalized headers bridge. #[derive(Clone, Debug)] -pub struct RococoFinalityToBridgeHubWococo; +pub struct RococoFinalityToBridgeHubWestend; substrate_relay_helper::generate_submit_finality_proof_call_builder!( - RococoFinalityToBridgeHubWococo, + RococoFinalityToBridgeHubWestend, SubmitFinalityProofCallBuilder, - relay_bridge_hub_wococo_client::RuntimeCall::BridgeRococoGrandpa, - relay_bridge_hub_wococo_client::BridgeGrandpaCall::submit_finality_proof + relay_bridge_hub_westend_client::runtime::Call::BridgeRococoGrandpa, + relay_bridge_hub_westend_client::runtime::BridgeRococoGrandpaCall::submit_finality_proof ); substrate_relay_helper::generate_report_equivocation_call_builder!( - RococoFinalityToBridgeHubWococo, + RococoFinalityToBridgeHubWestend, ReportEquivocationCallBuilder, relay_rococo_client::RuntimeCall::Grandpa, relay_rococo_client::GrandpaCall::report_equivocation ); #[async_trait] -impl SubstrateFinalityPipeline for RococoFinalityToBridgeHubWococo { +impl SubstrateFinalityPipeline for RococoFinalityToBridgeHubWestend { type SourceChain = relay_rococo_client::Rococo; - type TargetChain = relay_bridge_hub_wococo_client::BridgeHubWococo; + type TargetChain = relay_bridge_hub_westend_client::BridgeHubWestend; type FinalityEngine = GrandpaFinalityEngine; } #[async_trait] -impl SubstrateFinalitySyncPipeline for RococoFinalityToBridgeHubWococo { +impl SubstrateFinalitySyncPipeline for RococoFinalityToBridgeHubWestend { type SubmitFinalityProofCallBuilder = SubmitFinalityProofCallBuilder; - - async fn start_relay_guards( - target_client: &impl Client, - _transaction_params: &TransactionParams>, - enable_version_guard: bool, - ) -> relay_substrate_client::Result<()> { - if enable_version_guard { - relay_substrate_client::guard::abort_on_spec_version_change( - target_client.clone(), - target_client.simple_runtime_version().await?.spec_version, - ); - } - Ok(()) - } } #[async_trait] -impl SubstrateEquivocationDetectionPipeline for RococoFinalityToBridgeHubWococo { +impl SubstrateEquivocationDetectionPipeline for RococoFinalityToBridgeHubWestend { type ReportEquivocationCallBuilder = ReportEquivocationCallBuilder; } -/// `Rococo` to BridgeHub `Wococo` bridge definition. -pub struct RococoToBridgeHubWococoCliBridge {} +/// `Rococo` to BridgeHub `Westend` bridge definition. +pub struct RococoToBridgeHubWestendCliBridge {} -impl CliBridgeBase for RococoToBridgeHubWococoCliBridge { +impl CliBridgeBase for RococoToBridgeHubWestendCliBridge { type Source = relay_rococo_client::Rococo; - type Target = relay_bridge_hub_wococo_client::BridgeHubWococo; + type Target = relay_bridge_hub_westend_client::BridgeHubWestend; } -impl RelayToRelayHeadersCliBridge for RococoToBridgeHubWococoCliBridge { - type Finality = RococoFinalityToBridgeHubWococo; +impl RelayToRelayHeadersCliBridge for RococoToBridgeHubWestendCliBridge { + type Finality = RococoFinalityToBridgeHubWestend; } -impl RelayToRelayEquivocationDetectionCliBridge for RococoToBridgeHubWococoCliBridge { - type Equivocation = RococoFinalityToBridgeHubWococo; +impl RelayToRelayEquivocationDetectionCliBridge for RococoToBridgeHubWestendCliBridge { + type Equivocation = RococoFinalityToBridgeHubWestend; } diff --git a/relays/bin-substrate/src/bridges/rococo_wococo/rococo_parachains_to_bridge_hub_wococo.rs b/relays/bin-substrate/src/bridges/rococo_westend/rococo_parachains_to_bridge_hub_westend.rs similarity index 64% rename from relays/bin-substrate/src/bridges/rococo_wococo/rococo_parachains_to_bridge_hub_wococo.rs rename to relays/bin-substrate/src/bridges/rococo_westend/rococo_parachains_to_bridge_hub_westend.rs index b2704c092b845bb5a5bf6f3e67a1dc59c28afc87..edd600acc4d5b5e79ac670797291d46ba19106ed 100644 --- a/relays/bin-substrate/src/bridges/rococo_wococo/rococo_parachains_to_bridge_hub_wococo.rs +++ b/relays/bin-substrate/src/bridges/rococo_westend/rococo_parachains_to_bridge_hub_westend.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Parity Bridges Common. If not, see . -//! Wococo-to-Rococo parachains sync entrypoint. +//! Westend-to-Rococo parachains sync entrypoint. use crate::cli::bridge::{CliBridgeBase, MessagesCliBridge, ParachainToRelayHeadersCliBridge}; use bp_polkadot_core::parachains::{ParaHash, ParaHeadsProof, ParaId}; @@ -25,27 +25,27 @@ use substrate_relay_helper::parachains::{ /// BridgeHub-to-BridgeHub parachain sync description. #[derive(Clone, Debug)] -pub struct BridgeHubRococoToBridgeHubWococo; +pub struct BridgeHubRococoToBridgeHubWestend; -impl SubstrateParachainsPipeline for BridgeHubRococoToBridgeHubWococo { +impl SubstrateParachainsPipeline for BridgeHubRococoToBridgeHubWestend { type SourceParachain = relay_bridge_hub_rococo_client::BridgeHubRococo; type SourceRelayChain = relay_rococo_client::Rococo; - type TargetChain = relay_bridge_hub_wococo_client::BridgeHubWococo; + type TargetChain = relay_bridge_hub_westend_client::BridgeHubWestend; - type SubmitParachainHeadsCallBuilder = BridgeHubRococoToBridgeHubWococoCallBuilder; + type SubmitParachainHeadsCallBuilder = BridgeHubRococoToBridgeHubWestendCallBuilder; } -pub struct BridgeHubRococoToBridgeHubWococoCallBuilder; -impl SubmitParachainHeadsCallBuilder - for BridgeHubRococoToBridgeHubWococoCallBuilder +pub struct BridgeHubRococoToBridgeHubWestendCallBuilder; +impl SubmitParachainHeadsCallBuilder + for BridgeHubRococoToBridgeHubWestendCallBuilder { fn build_submit_parachain_heads_call( at_relay_block: HeaderIdOf, parachains: Vec<(ParaId, ParaHash)>, parachain_heads_proof: ParaHeadsProof, - ) -> CallOf { - relay_bridge_hub_wococo_client::RuntimeCall::BridgeRococoParachain( - relay_bridge_hub_wococo_client::BridgeParachainCall::submit_parachain_heads { + ) -> CallOf { + relay_bridge_hub_westend_client::runtime::Call::BridgeRococoParachains( + relay_bridge_hub_westend_client::runtime::BridgeParachainCall::submit_parachain_heads { at_relay_block: (at_relay_block.0, at_relay_block.1), parachains, parachain_heads_proof, @@ -55,21 +55,21 @@ impl SubmitParachainHeadsCallBuilder } /// `BridgeHubParachain` to `BridgeHubParachain` bridge definition. -pub struct BridgeHubRococoToBridgeHubWococoCliBridge {} +pub struct BridgeHubRococoToBridgeHubWestendCliBridge {} -impl ParachainToRelayHeadersCliBridge for BridgeHubRococoToBridgeHubWococoCliBridge { +impl ParachainToRelayHeadersCliBridge for BridgeHubRococoToBridgeHubWestendCliBridge { type SourceRelay = relay_rococo_client::Rococo; - type ParachainFinality = BridgeHubRococoToBridgeHubWococo; + type ParachainFinality = BridgeHubRococoToBridgeHubWestend; type RelayFinality = - crate::bridges::rococo_wococo::rococo_headers_to_bridge_hub_wococo::RococoFinalityToBridgeHubWococo; + crate::bridges::rococo_westend::rococo_headers_to_bridge_hub_westend::RococoFinalityToBridgeHubWestend; } -impl CliBridgeBase for BridgeHubRococoToBridgeHubWococoCliBridge { +impl CliBridgeBase for BridgeHubRococoToBridgeHubWestendCliBridge { type Source = relay_bridge_hub_rococo_client::BridgeHubRococo; - type Target = relay_bridge_hub_wococo_client::BridgeHubWococo; + type Target = relay_bridge_hub_westend_client::BridgeHubWestend; } -impl MessagesCliBridge for BridgeHubRococoToBridgeHubWococoCliBridge { +impl MessagesCliBridge for BridgeHubRococoToBridgeHubWestendCliBridge { type MessagesLane = - crate::bridges::rococo_wococo::bridge_hub_rococo_messages_to_bridge_hub_wococo::BridgeHubRococoMessagesToBridgeHubWococoMessageLane; + crate::bridges::rococo_westend::bridge_hub_rococo_messages_to_bridge_hub_westend::BridgeHubRococoMessagesToBridgeHubWestendMessageLane; } diff --git a/relays/bin-substrate/src/bridges/rococo_wococo/wococo_headers_to_bridge_hub_rococo.rs b/relays/bin-substrate/src/bridges/rococo_westend/westend_headers_to_bridge_hub_rococo.rs similarity index 52% rename from relays/bin-substrate/src/bridges/rococo_wococo/wococo_headers_to_bridge_hub_rococo.rs rename to relays/bin-substrate/src/bridges/rococo_westend/westend_headers_to_bridge_hub_rococo.rs index 5801fda47f68c37a4807199eb7e31378bc583a24..451089b2ce009e379f89846710da060e50b3b94d 100644 --- a/relays/bin-substrate/src/bridges/rococo_wococo/wococo_headers_to_bridge_hub_rococo.rs +++ b/relays/bin-substrate/src/bridges/rococo_westend/westend_headers_to_bridge_hub_rococo.rs @@ -14,83 +14,67 @@ // You should have received a copy of the GNU General Public License // along with Parity Bridges Common. If not, see . -//! Wococo-to-Rococo bridge hubs headers sync entrypoint. +//! Westend-to-Rococo bridge hubs headers sync entrypoint. use crate::cli::bridge::{ CliBridgeBase, RelayToRelayEquivocationDetectionCliBridge, RelayToRelayHeadersCliBridge, }; use async_trait::async_trait; -use relay_substrate_client::{AccountKeyPairOf, Client}; use substrate_relay_helper::{ equivocation::SubstrateEquivocationDetectionPipeline, finality::SubstrateFinalitySyncPipeline, finality_base::{engine::Grandpa as GrandpaFinalityEngine, SubstrateFinalityPipeline}, - TransactionParams, }; -/// Description of Wococo -> Rococo finalized headers bridge. +/// Description of Westend -> Rococo finalized headers bridge. #[derive(Clone, Debug)] -pub struct WococoFinalityToBridgeHubRococo; +pub struct WestendFinalityToBridgeHubRococo; substrate_relay_helper::generate_submit_finality_proof_call_builder!( - WococoFinalityToBridgeHubRococo, + WestendFinalityToBridgeHubRococo, SubmitFinalityProofCallBuilder, - relay_bridge_hub_rococo_client::RuntimeCall::BridgeWococoGrandpa, + relay_bridge_hub_rococo_client::RuntimeCall::BridgeWestendGrandpa, relay_bridge_hub_rococo_client::BridgeGrandpaCall::submit_finality_proof ); substrate_relay_helper::generate_report_equivocation_call_builder!( - WococoFinalityToBridgeHubRococo, + WestendFinalityToBridgeHubRococo, ReportEquivocationCallBuilder, - relay_wococo_client::RuntimeCall::Grandpa, - relay_wococo_client::GrandpaCall::report_equivocation + relay_westend_client::RuntimeCall::Grandpa, + relay_westend_client::GrandpaCall::report_equivocation ); #[async_trait] -impl SubstrateFinalityPipeline for WococoFinalityToBridgeHubRococo { - type SourceChain = relay_wococo_client::Wococo; +impl SubstrateFinalityPipeline for WestendFinalityToBridgeHubRococo { + type SourceChain = relay_westend_client::Westend; type TargetChain = relay_bridge_hub_rococo_client::BridgeHubRococo; type FinalityEngine = GrandpaFinalityEngine; } #[async_trait] -impl SubstrateFinalitySyncPipeline for WococoFinalityToBridgeHubRococo { +impl SubstrateFinalitySyncPipeline for WestendFinalityToBridgeHubRococo { type SubmitFinalityProofCallBuilder = SubmitFinalityProofCallBuilder; - - async fn start_relay_guards( - target_client: &impl Client, - _transaction_params: &TransactionParams>, - enable_version_guard: bool, - ) -> relay_substrate_client::Result<()> { - if enable_version_guard { - relay_substrate_client::guard::abort_on_spec_version_change( - target_client.clone(), - target_client.simple_runtime_version().await?.spec_version, - ); - } - Ok(()) - } } #[async_trait] -impl SubstrateEquivocationDetectionPipeline for WococoFinalityToBridgeHubRococo { +impl SubstrateEquivocationDetectionPipeline for WestendFinalityToBridgeHubRococo { type ReportEquivocationCallBuilder = ReportEquivocationCallBuilder; } -/// `Wococo` to BridgeHub `Rococo` bridge definition. -pub struct WococoToBridgeHubRococoCliBridge {} +/// `Westend` to BridgeHub `Rococo` bridge definition. +pub struct WestendToBridgeHubRococoCliBridge {} -impl CliBridgeBase for WococoToBridgeHubRococoCliBridge { - type Source = relay_wococo_client::Wococo; +impl CliBridgeBase for WestendToBridgeHubRococoCliBridge { + type Source = relay_westend_client::Westend; type Target = relay_bridge_hub_rococo_client::BridgeHubRococo; } -impl RelayToRelayHeadersCliBridge for WococoToBridgeHubRococoCliBridge { - type Finality = WococoFinalityToBridgeHubRococo; +impl RelayToRelayHeadersCliBridge for WestendToBridgeHubRococoCliBridge { + type Finality = WestendFinalityToBridgeHubRococo; } -impl RelayToRelayEquivocationDetectionCliBridge for WococoToBridgeHubRococoCliBridge { - type Equivocation = WococoFinalityToBridgeHubRococo; +impl RelayToRelayEquivocationDetectionCliBridge for WestendToBridgeHubRococoCliBridge { + type Equivocation = WestendFinalityToBridgeHubRococo; } diff --git a/relays/bin-substrate/src/bridges/rococo_wococo/wococo_parachains_to_bridge_hub_rococo.rs b/relays/bin-substrate/src/bridges/rococo_westend/westend_parachains_to_bridge_hub_rococo.rs similarity index 56% rename from relays/bin-substrate/src/bridges/rococo_wococo/wococo_parachains_to_bridge_hub_rococo.rs rename to relays/bin-substrate/src/bridges/rococo_westend/westend_parachains_to_bridge_hub_rococo.rs index ca77857833d0b95e7403eea3a96887c11498d3cc..dac915dc3ba9eb2f08fa818e37f7c861fd5d969b 100644 --- a/relays/bin-substrate/src/bridges/rococo_wococo/wococo_parachains_to_bridge_hub_rococo.rs +++ b/relays/bin-substrate/src/bridges/rococo_westend/westend_parachains_to_bridge_hub_rococo.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Parity Bridges Common. If not, see . -//! Rococo-to-Wococo parachains sync entrypoint. +//! Rococo-to-Westend parachains sync entrypoint. use crate::cli::bridge::{CliBridgeBase, MessagesCliBridge, ParachainToRelayHeadersCliBridge}; use bp_polkadot_core::parachains::{ParaHash, ParaHeadsProof, ParaId}; @@ -25,26 +25,26 @@ use substrate_relay_helper::parachains::{ /// BridgeHub-to-BridgeHub parachain sync description. #[derive(Clone, Debug)] -pub struct BridgeHubWococoToBridgeHubRococo; +pub struct BridgeHubWestendToBridgeHubRococo; -impl SubstrateParachainsPipeline for BridgeHubWococoToBridgeHubRococo { - type SourceParachain = relay_bridge_hub_wococo_client::BridgeHubWococo; - type SourceRelayChain = relay_wococo_client::Wococo; +impl SubstrateParachainsPipeline for BridgeHubWestendToBridgeHubRococo { + type SourceParachain = relay_bridge_hub_westend_client::BridgeHubWestend; + type SourceRelayChain = relay_westend_client::Westend; type TargetChain = relay_bridge_hub_rococo_client::BridgeHubRococo; - type SubmitParachainHeadsCallBuilder = BridgeHubWococoToBridgeHubRococoCallBuilder; + type SubmitParachainHeadsCallBuilder = BridgeHubWestendToBridgeHubRococoCallBuilder; } -pub struct BridgeHubWococoToBridgeHubRococoCallBuilder; -impl SubmitParachainHeadsCallBuilder - for BridgeHubWococoToBridgeHubRococoCallBuilder +pub struct BridgeHubWestendToBridgeHubRococoCallBuilder; +impl SubmitParachainHeadsCallBuilder + for BridgeHubWestendToBridgeHubRococoCallBuilder { fn build_submit_parachain_heads_call( - at_relay_block: HeaderIdOf, + at_relay_block: HeaderIdOf, parachains: Vec<(ParaId, ParaHash)>, parachain_heads_proof: ParaHeadsProof, ) -> CallOf { - relay_bridge_hub_rococo_client::RuntimeCall::BridgeWococoParachain( + relay_bridge_hub_rococo_client::RuntimeCall::BridgeWestendParachains( relay_bridge_hub_rococo_client::BridgeParachainCall::submit_parachain_heads { at_relay_block: (at_relay_block.0, at_relay_block.1), parachains, @@ -55,21 +55,21 @@ impl SubmitParachainHeadsCallBuilder } /// `BridgeHubParachain` to `BridgeHubParachain` bridge definition. -pub struct BridgeHubWococoToBridgeHubRococoCliBridge {} +pub struct BridgeHubWestendToBridgeHubRococoCliBridge {} -impl ParachainToRelayHeadersCliBridge for BridgeHubWococoToBridgeHubRococoCliBridge { - type SourceRelay = relay_wococo_client::Wococo; - type ParachainFinality = BridgeHubWococoToBridgeHubRococo; +impl ParachainToRelayHeadersCliBridge for BridgeHubWestendToBridgeHubRococoCliBridge { + type SourceRelay = relay_westend_client::Westend; + type ParachainFinality = BridgeHubWestendToBridgeHubRococo; type RelayFinality = - crate::bridges::rococo_wococo::wococo_headers_to_bridge_hub_rococo::WococoFinalityToBridgeHubRococo; + crate::bridges::rococo_westend::westend_headers_to_bridge_hub_rococo::WestendFinalityToBridgeHubRococo; } -impl CliBridgeBase for BridgeHubWococoToBridgeHubRococoCliBridge { - type Source = relay_bridge_hub_wococo_client::BridgeHubWococo; +impl CliBridgeBase for BridgeHubWestendToBridgeHubRococoCliBridge { + type Source = relay_bridge_hub_westend_client::BridgeHubWestend; type Target = relay_bridge_hub_rococo_client::BridgeHubRococo; } -impl MessagesCliBridge for BridgeHubWococoToBridgeHubRococoCliBridge { +impl MessagesCliBridge for BridgeHubWestendToBridgeHubRococoCliBridge { type MessagesLane = - crate::bridges::rococo_wococo::bridge_hub_wococo_messages_to_bridge_hub_rococo::BridgeHubWococoMessagesToBridgeHubRococoMessageLane; + crate::bridges::rococo_westend::bridge_hub_westend_messages_to_bridge_hub_rococo::BridgeHubWestendMessagesToBridgeHubRococoMessageLane; } diff --git a/relays/bin-substrate/src/bridges/rococo_wococo/mod.rs b/relays/bin-substrate/src/bridges/rococo_wococo/mod.rs deleted file mode 100644 index 64330a92252cdd598ce53f95745c728435c67616..0000000000000000000000000000000000000000 --- a/relays/bin-substrate/src/bridges/rococo_wococo/mod.rs +++ /dev/null @@ -1,24 +0,0 @@ -// 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 . - -//! Declaration of all bridges between Rococo Bridge Hub and Wococo Bridge Hub. - -pub mod bridge_hub_rococo_messages_to_bridge_hub_wococo; -pub mod bridge_hub_wococo_messages_to_bridge_hub_rococo; -pub mod rococo_headers_to_bridge_hub_wococo; -pub mod rococo_parachains_to_bridge_hub_wococo; -pub mod wococo_headers_to_bridge_hub_rococo; -pub mod wococo_parachains_to_bridge_hub_rococo; diff --git a/relays/bin-substrate/src/bridges/westend_millau/mod.rs b/relays/bin-substrate/src/bridges/westend_millau/mod.rs deleted file mode 100644 index 10bc19241ce126fe322da20fbbf282f36f9144da..0000000000000000000000000000000000000000 --- a/relays/bin-substrate/src/bridges/westend_millau/mod.rs +++ /dev/null @@ -1,20 +0,0 @@ -// 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 . - -//! Declaration of all bridges between Westend and Millau. - -pub mod westend_headers_to_millau; -pub mod westend_parachains_to_millau; diff --git a/relays/bin-substrate/src/bridges/westend_millau/westend_headers_to_millau.rs b/relays/bin-substrate/src/bridges/westend_millau/westend_headers_to_millau.rs deleted file mode 100644 index afbbd064d1fe07a9d8739674d51754e605015040..0000000000000000000000000000000000000000 --- a/relays/bin-substrate/src/bridges/westend_millau/westend_headers_to_millau.rs +++ /dev/null @@ -1,54 +0,0 @@ -// 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 . - -//! Westend-to-Millau headers sync entrypoint. - -use crate::cli::bridge::{CliBridgeBase, RelayToRelayHeadersCliBridge}; -use substrate_relay_helper::{ - finality::{DirectSubmitGrandpaFinalityProofCallBuilder, SubstrateFinalitySyncPipeline}, - finality_base::{engine::Grandpa as GrandpaFinalityEngine, SubstrateFinalityPipeline}, -}; - -/// Description of Westend -> Millau finalized headers bridge. -#[derive(Clone, Debug)] -pub struct WestendFinalityToMillau; - -impl SubstrateFinalityPipeline for WestendFinalityToMillau { - type SourceChain = relay_westend_client::Westend; - type TargetChain = relay_millau_client::Millau; - - type FinalityEngine = GrandpaFinalityEngine; -} - -impl SubstrateFinalitySyncPipeline for WestendFinalityToMillau { - type SubmitFinalityProofCallBuilder = DirectSubmitGrandpaFinalityProofCallBuilder< - Self, - millau_runtime::Runtime, - millau_runtime::WestendGrandpaInstance, - >; -} - -/// `Westend` to `Millau` bridge definition. -pub struct WestendToMillauCliBridge {} - -impl CliBridgeBase for WestendToMillauCliBridge { - type Source = relay_westend_client::Westend; - type Target = relay_millau_client::Millau; -} - -impl RelayToRelayHeadersCliBridge for WestendToMillauCliBridge { - type Finality = WestendFinalityToMillau; -} diff --git a/relays/bin-substrate/src/bridges/westend_millau/westend_parachains_to_millau.rs b/relays/bin-substrate/src/bridges/westend_millau/westend_parachains_to_millau.rs deleted file mode 100644 index a3d5ba08df5038afb585d8a97c788747429f5c8d..0000000000000000000000000000000000000000 --- a/relays/bin-substrate/src/bridges/westend_millau/westend_parachains_to_millau.rs +++ /dev/null @@ -1,59 +0,0 @@ -// 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 . - -//! Westend-to-Millau parachains sync entrypoint. - -use crate::cli::bridge::{CliBridgeBase, ParachainToRelayHeadersCliBridge}; -use relay_millau_client::Millau; -use relay_westend_client::{AssetHubWestend, Westend}; -use substrate_relay_helper::parachains::{ - DirectSubmitParachainHeadsCallBuilder, SubstrateParachainsPipeline, -}; - -/// Westend-to-Millau parachains sync description. -#[derive(Clone, Debug)] -pub struct WestendParachainsToMillau; - -impl SubstrateParachainsPipeline for WestendParachainsToMillau { - type SourceParachain = AssetHubWestend; - type SourceRelayChain = Westend; - type TargetChain = Millau; - - type SubmitParachainHeadsCallBuilder = WestendParachainsToMillauSubmitParachainHeadsCallBuilder; -} - -/// `submit_parachain_heads` call builder for Rialto-to-Millau parachains sync pipeline. -pub type WestendParachainsToMillauSubmitParachainHeadsCallBuilder = - DirectSubmitParachainHeadsCallBuilder< - WestendParachainsToMillau, - millau_runtime::Runtime, - millau_runtime::WithWestendParachainsInstance, - >; - -/// `WestendParachain` to `Millau` bridge definition. -pub struct AssetHubWestendToMillauCliBridge {} - -impl ParachainToRelayHeadersCliBridge for AssetHubWestendToMillauCliBridge { - type SourceRelay = Westend; - type ParachainFinality = WestendParachainsToMillau; - type RelayFinality = - crate::bridges::westend_millau::westend_headers_to_millau::WestendFinalityToMillau; -} - -impl CliBridgeBase for AssetHubWestendToMillauCliBridge { - type Source = AssetHubWestend; - type Target = Millau; -} diff --git a/relays/bin-substrate/src/chains/millau.rs b/relays/bin-substrate/src/chains/millau.rs deleted file mode 100644 index a10a98ec7cf80935ada269c56bf91df0efc3c37a..0000000000000000000000000000000000000000 --- a/relays/bin-substrate/src/chains/millau.rs +++ /dev/null @@ -1,69 +0,0 @@ -// 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 . - -//! Millau chain specification for CLI. - -use crate::cli::{encode_message::CliEncodeMessage, CliChain}; -use bp_runtime::EncodedOrDecodedCall; -use bridge_runtime_common::CustomNetworkId; -use relay_millau_client::Millau; -use relay_substrate_client::SimpleRuntimeVersion; -use xcm_executor::traits::ExportXcm; - -impl CliEncodeMessage for Millau { - fn encode_wire_message( - target: xcm::v3::NetworkId, - at_target_xcm: xcm::v3::Xcm<()>, - ) -> anyhow::Result> { - anyhow::ensure!( - [ - CustomNetworkId::Rialto.as_network_id(), - CustomNetworkId::RialtoParachain.as_network_id() - ] - .contains(&target), - anyhow::format_err!("Unsupported target chain: {:?}", target) - ); - - Ok(pallet_xcm_bridge_hub::PalletAsHaulBlobExporter::< - millau_runtime::Runtime, - millau_runtime::WithRialtoXcmBridgeHubInstance, - >::validate( - target, - 0, - &mut Some(Self::dummy_universal_source()?), - &mut Some(target.into()), - &mut Some(at_target_xcm), - ) - .map_err(|e| anyhow::format_err!("Failed to prepare outbound message: {:?}", e))? - .0 - .0) - } - - fn encode_execute_xcm( - message: xcm::VersionedXcm, - ) -> anyhow::Result> { - Ok(millau_runtime::RuntimeCall::XcmPallet(millau_runtime::XcmCall::execute { - message: Box::new(message), - max_weight: Self::estimate_execute_xcm_weight(), - }) - .into()) - } -} - -impl CliChain for Millau { - const RUNTIME_VERSION: Option = - Some(SimpleRuntimeVersion::from_runtime_version(&millau_runtime::VERSION)); -} diff --git a/relays/bin-substrate/src/chains/mod.rs b/relays/bin-substrate/src/chains/mod.rs index 99057aa5b9197f7108d4b36957fb29de5af8c1f8..ab15a9e679cd59aad2480232f107781e7f374d48 100644 --- a/relays/bin-substrate/src/chains/mod.rs +++ b/relays/bin-substrate/src/chains/mod.rs @@ -17,90 +17,7 @@ //! Chain-specific relayer configuration. mod kusama; -mod millau; mod polkadot; mod polkadot_bulletin; -mod rialto; -mod rialto_parachain; mod rococo; mod westend; -mod wococo; - -#[cfg(test)] -mod tests { - use crate::cli::encode_message; - use bp_messages::ChainWithMessages as _; - use bp_runtime::Chain as _; - use codec::Encode; - use relay_millau_client::Millau; - use relay_rialto_client::Rialto; - use relay_substrate_client::{ChainWithTransactions, SignParam, UnsignedTransaction}; - - #[test] - fn maximal_rialto_to_millau_message_size_is_computed_correctly() { - let maximal_message_size = encode_message::compute_maximal_message_size( - bp_rialto::Rialto::max_extrinsic_size(), - bp_millau::Millau::max_extrinsic_size(), - ); - - assert_eq!(maximal_message_size, bp_millau::Millau::maximal_incoming_message_size()); - } - - #[test] - fn maximal_size_remark_to_rialto_is_generated_correctly() { - let maximal_message_size = encode_message::compute_maximal_message_size( - bp_millau::Millau::max_extrinsic_size(), - bp_rialto::Rialto::max_extrinsic_size(), - ); - - assert_eq!(maximal_message_size, bp_rialto::Rialto::maximal_incoming_message_size()); - } - - #[test] - fn rialto_tx_extra_bytes_constant_is_correct() { - let rialto_call = rialto_runtime::RuntimeCall::System(rialto_runtime::SystemCall::remark { - remark: vec![], - }); - let rialto_tx = Rialto::sign_transaction( - SignParam { - spec_version: 1, - transaction_version: 1, - genesis_hash: Default::default(), - signer: sp_keyring::AccountKeyring::Alice.pair(), - }, - UnsignedTransaction::new(rialto_call.clone().into(), 0), - ) - .unwrap(); - let extra_bytes_in_transaction = rialto_tx.encode().len() - rialto_call.encode().len(); - assert!( - bp_rialto::TX_EXTRA_BYTES as usize >= extra_bytes_in_transaction, - "Hardcoded number of extra bytes in Rialto transaction {} is lower than actual value: {}", - bp_rialto::TX_EXTRA_BYTES, - extra_bytes_in_transaction, - ); - } - - #[test] - fn millau_tx_extra_bytes_constant_is_correct() { - let millau_call = millau_runtime::RuntimeCall::System(millau_runtime::SystemCall::remark { - remark: vec![], - }); - let millau_tx = Millau::sign_transaction( - SignParam { - spec_version: 0, - transaction_version: 0, - genesis_hash: Default::default(), - signer: sp_keyring::AccountKeyring::Alice.pair(), - }, - UnsignedTransaction::new(millau_call.clone().into(), 0), - ) - .unwrap(); - let extra_bytes_in_transaction = millau_tx.encode().len() - millau_call.encode().len(); - assert!( - bp_millau::TX_EXTRA_BYTES as usize >= extra_bytes_in_transaction, - "Hardcoded number of extra bytes in Millau transaction {} is lower than actual value: {}", - bp_millau::TX_EXTRA_BYTES, - extra_bytes_in_transaction, - ); - } -} diff --git a/relays/bin-substrate/src/chains/rialto.rs b/relays/bin-substrate/src/chains/rialto.rs deleted file mode 100644 index 8de0b85d9b48e26e86cad5d1ee6334a82ca2ba84..0000000000000000000000000000000000000000 --- a/relays/bin-substrate/src/chains/rialto.rs +++ /dev/null @@ -1,65 +0,0 @@ -// 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 . - -//! Rialto chain specification for CLI. - -use crate::cli::{encode_message::CliEncodeMessage, CliChain}; -use bp_runtime::EncodedOrDecodedCall; -use bridge_runtime_common::CustomNetworkId; -use relay_rialto_client::Rialto; -use relay_substrate_client::SimpleRuntimeVersion; -use xcm_executor::traits::ExportXcm; - -impl CliEncodeMessage for Rialto { - fn encode_wire_message( - target: xcm::v3::NetworkId, - at_target_xcm: xcm::v3::Xcm<()>, - ) -> anyhow::Result> { - anyhow::ensure!( - target == CustomNetworkId::Millau.as_network_id(), - anyhow::format_err!("Unsupported target chain: {:?}", target) - ); - - Ok(pallet_xcm_bridge_hub::PalletAsHaulBlobExporter::< - rialto_runtime::Runtime, - rialto_runtime::WithMillauXcmBridgeHubInstance, - >::validate( - target, - 0, - &mut Some(Self::dummy_universal_source()?), - &mut Some(target.into()), - &mut Some(at_target_xcm), - ) - .map_err(|e| anyhow::format_err!("Failed to prepare outbound message: {:?}", e))? - .0 - .0) - } - - fn encode_execute_xcm( - message: xcm::VersionedXcm, - ) -> anyhow::Result> { - Ok(rialto_runtime::RuntimeCall::XcmPallet(rialto_runtime::XcmCall::execute { - message: Box::new(message), - max_weight: Self::estimate_execute_xcm_weight(), - }) - .into()) - } -} - -impl CliChain for Rialto { - const RUNTIME_VERSION: Option = - Some(SimpleRuntimeVersion::from_runtime_version(&rialto_runtime::VERSION)); -} diff --git a/relays/bin-substrate/src/chains/rialto_parachain.rs b/relays/bin-substrate/src/chains/rialto_parachain.rs deleted file mode 100644 index 599d8843035ac84567f05449a02cb0e3cc26d32d..0000000000000000000000000000000000000000 --- a/relays/bin-substrate/src/chains/rialto_parachain.rs +++ /dev/null @@ -1,68 +0,0 @@ -// 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 . - -//! Rialto parachain specification for CLI. - -use crate::cli::{encode_message::CliEncodeMessage, CliChain}; -use bp_runtime::EncodedOrDecodedCall; -use bridge_runtime_common::CustomNetworkId; -use relay_rialto_parachain_client::RialtoParachain; -use relay_substrate_client::SimpleRuntimeVersion; -use xcm_executor::traits::ExportXcm; - -impl CliEncodeMessage for RialtoParachain { - fn encode_wire_message( - target: xcm::v3::NetworkId, - at_target_xcm: xcm::v3::Xcm<()>, - ) -> anyhow::Result> { - anyhow::ensure!( - target == CustomNetworkId::Millau.as_network_id(), - anyhow::format_err!("Unsupported target chain: {:?}", target) - ); - - Ok(pallet_xcm_bridge_hub::PalletAsHaulBlobExporter::< - rialto_parachain_runtime::Runtime, - rialto_parachain_runtime::WithMillauXcmBridgeHubInstance, - >::validate( - target, - 0, - &mut Some(Self::dummy_universal_source()?), - &mut Some(target.into()), - &mut Some(at_target_xcm), - ) - .map_err(|e| anyhow::format_err!("Failed to prepare outbound message: {:?}", e))? - .0 - .0) - } - - fn encode_execute_xcm( - message: xcm::VersionedXcm, - ) -> anyhow::Result> { - type RuntimeCall = relay_rialto_parachain_client::RuntimeCall; - type XcmCall = relay_rialto_parachain_client::runtime_types::pallet_xcm::pallet::Call; - - let xcm_call = XcmCall::execute { - message: Box::new(unsafe { std::mem::transmute(message) }), - max_weight: Self::estimate_execute_xcm_weight(), - }; - - Ok(RuntimeCall::PolkadotXcm(xcm_call).into()) - } -} - -impl CliChain for RialtoParachain { - const RUNTIME_VERSION: Option = None; -} diff --git a/relays/bin-substrate/src/chains/rococo.rs b/relays/bin-substrate/src/chains/rococo.rs index dc8bd64836a62672121c2e6b1f7203effbc26110..fa376f0967471fca664cf253c58b9083b3071f35 100644 --- a/relays/bin-substrate/src/chains/rococo.rs +++ b/relays/bin-substrate/src/chains/rococo.rs @@ -27,5 +27,5 @@ impl CliChain for Rococo { impl CliChain for BridgeHubRococo { const RUNTIME_VERSION: Option = - Some(SimpleRuntimeVersion { spec_version: 9420, transaction_version: 3 }); + Some(SimpleRuntimeVersion { spec_version: 1_003_000, transaction_version: 3 }); } diff --git a/relays/bin-substrate/src/chains/westend.rs b/relays/bin-substrate/src/chains/westend.rs index af404878ceb06d6defb523ff80f916b11c844517..be26a36627ad87f87c153adec03ec3ae047716f8 100644 --- a/relays/bin-substrate/src/chains/westend.rs +++ b/relays/bin-substrate/src/chains/westend.rs @@ -17,13 +17,15 @@ //! Westend chain specification for CLI. use crate::cli::CliChain; +use relay_bridge_hub_westend_client::BridgeHubWestend; use relay_substrate_client::SimpleRuntimeVersion; -use relay_westend_client::{AssetHubWestend, Westend}; +use relay_westend_client::Westend; impl CliChain for Westend { const RUNTIME_VERSION: Option = None; } -impl CliChain for AssetHubWestend { - const RUNTIME_VERSION: Option = None; +impl CliChain for BridgeHubWestend { + const RUNTIME_VERSION: Option = + Some(SimpleRuntimeVersion { spec_version: 1_003_000, transaction_version: 3 }); } diff --git a/relays/bin-substrate/src/chains/wococo.rs b/relays/bin-substrate/src/chains/wococo.rs deleted file mode 100644 index c9e3943d80865e2f178cf73f2f578838da045320..0000000000000000000000000000000000000000 --- a/relays/bin-substrate/src/chains/wococo.rs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2022 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 . - -//! Wococo + Wococo parachains specification for CLI. - -use crate::cli::CliChain; -use relay_bridge_hub_wococo_client::BridgeHubWococo; -use relay_substrate_client::SimpleRuntimeVersion; -use relay_wococo_client::Wococo; - -impl CliChain for Wococo { - const RUNTIME_VERSION: Option = None; -} - -impl CliChain for BridgeHubWococo { - const RUNTIME_VERSION: Option = - Some(SimpleRuntimeVersion { spec_version: 9420, transaction_version: 3 }); -} diff --git a/relays/bin-substrate/src/cli/bridge.rs b/relays/bin-substrate/src/cli/bridge.rs index 2dc1552e152f75cd01cd46ac93263cb2f3a84a91..c41a84896efa86fa988ccc1ee7b6dfd1a4a0b320 100644 --- a/relays/bin-substrate/src/cli/bridge.rs +++ b/relays/bin-substrate/src/cli/bridge.rs @@ -17,7 +17,7 @@ use crate::cli::CliChain; use bp_parachains::{RelayBlockHash, RelayBlockHasher, RelayBlockNumber}; use relay_substrate_client::{Chain, ChainWithTransactions, Parachain, RelayChain}; -use strum::{EnumString, EnumVariantNames}; +use strum::{EnumString, VariantNames}; use substrate_relay_helper::{ equivocation::SubstrateEquivocationDetectionPipeline, finality::SubstrateFinalitySyncPipeline, @@ -25,20 +25,18 @@ use substrate_relay_helper::{ parachains::SubstrateParachainsPipeline, }; -#[derive(Debug, PartialEq, Eq, EnumString, EnumVariantNames)] +#[derive(Debug, PartialEq, Eq, EnumString, VariantNames)] #[strum(serialize_all = "kebab_case")] /// Supported full bridges (headers + messages). pub enum FullBridge { - MillauToRialto, - RialtoToMillau, - MillauToRialtoParachain, - RialtoParachainToMillau, - BridgeHubRococoToBridgeHubWococo, - BridgeHubWococoToBridgeHubRococo, + BridgeHubRococoToBridgeHubWestend, + BridgeHubWestendToBridgeHubRococo, BridgeHubKusamaToBridgeHubPolkadot, BridgeHubPolkadotToBridgeHubKusama, PolkadotBulletinToBridgeHubPolkadot, BridgeHubPolkadotToPolkadotBulletin, + RococoBulletinToBridgeHubRococo, + BridgeHubRococoToRococoBulletin, } /// Minimal bridge representation that can be used from the CLI. diff --git a/relays/bin-substrate/src/cli/chain_schema.rs b/relays/bin-substrate/src/cli/chain_schema.rs index 551a314f529799dc5e5561ff5aa9d4932fbaabfe..c9ce71aa5707e761cdffb70ea5ca3c220517ed31 100644 --- a/relays/bin-substrate/src/cli/chain_schema.rs +++ b/relays/bin-substrate/src/cli/chain_schema.rs @@ -17,14 +17,14 @@ use relay_substrate_client::{AccountKeyPairOf, ChainWithTransactions}; use structopt::StructOpt; -use strum::{EnumString, EnumVariantNames}; +use strum::{EnumString, VariantNames}; use crate::cli::CliChain; pub use relay_substrate_client::{ChainRuntimeVersion, SimpleRuntimeVersion}; use substrate_relay_helper::TransactionParams; #[doc = "Runtime version params."] -#[derive(StructOpt, Debug, PartialEq, Eq, Clone, Copy, EnumString, EnumVariantNames)] +#[derive(StructOpt, Debug, PartialEq, Eq, Clone, Copy, EnumString, VariantNames)] pub enum RuntimeVersionType { /// Auto query version from chain Auto, @@ -129,29 +129,6 @@ macro_rules! declare_chain_connection_params_cli_schema { }; } -/// Helper trait to override transaction parameters differently. -pub trait TransactionParamsProvider { - /// Returns `true` if transaction parameters are defined by this provider. - fn is_defined(&self) -> bool; - /// Returns transaction parameters. - fn transaction_params( - &self, - ) -> anyhow::Result>>; - - /// Returns transaction parameters, defined by `self` provider or, if they're not defined, - /// defined by `other` provider. - fn transaction_params_or( - &self, - other: &T, - ) -> anyhow::Result>> { - if self.is_defined() { - self.transaction_params::() - } else { - other.transaction_params::() - } - } -} - /// Create chain-specific set of signing parameters. #[macro_export] macro_rules! declare_chain_signing_params_cli_schema { @@ -239,15 +216,12 @@ macro_rules! declare_chain_signing_params_cli_schema { suri_password.as_deref() ).map_err(|e| anyhow::format_err!("{:?}", e)) } - } - - #[allow(dead_code)] - impl TransactionParamsProvider for [<$chain SigningParams>] { - fn is_defined(&self) -> bool { - self.[<$chain_prefix _signer>].is_some() || self.[<$chain_prefix _signer_file>].is_some() - } - fn transaction_params(&self) -> anyhow::Result>> { + /// Return transaction parameters. + #[allow(dead_code)] + pub fn transaction_params( + &self, + ) -> anyhow::Result>> { Ok(TransactionParams { mortality: self.transactions_mortality()?, signer: self.to_keypair::()?, @@ -310,7 +284,7 @@ mod tests { target_transactions_mortality: None, } - .to_keypair::() + .to_keypair::() .map(|p| p.public()) .map_err(drop), Ok(alice.public()), @@ -327,7 +301,7 @@ mod tests { target_transactions_mortality: None, } - .to_keypair::() + .to_keypair::() .map(|p| p.public()) .map_err(drop), Ok(bob.public()), @@ -344,7 +318,7 @@ mod tests { target_transactions_mortality: None, } - .to_keypair::() + .to_keypair::() .map(|p| p.public()) .map_err(drop), Ok(bob_with_alice_password.public()), @@ -361,7 +335,7 @@ mod tests { target_transactions_mortality: None, } - .to_keypair::() + .to_keypair::() .map(|p| p.public()) .map_err(drop), Ok(alice.public()), diff --git a/relays/bin-substrate/src/cli/detect_equivocations.rs b/relays/bin-substrate/src/cli/detect_equivocations.rs index 142a3f8e69a8803ac6b7e46844221d1f66764f99..4e2d902a57039720ec805491f5e2b810d6d20b07 100644 --- a/relays/bin-substrate/src/cli/detect_equivocations.rs +++ b/relays/bin-substrate/src/cli/detect_equivocations.rs @@ -20,24 +20,19 @@ use crate::{ kusama_headers_to_bridge_hub_polkadot::KusamaToBridgeHubPolkadotCliBridge, polkadot_headers_to_bridge_hub_kusama::PolkadotToBridgeHubKusamaCliBridge, }, - rialto_millau::{ - millau_headers_to_rialto::MillauToRialtoCliBridge, - rialto_headers_to_millau::RialtoToMillauCliBridge, - }, - rialto_parachain_millau::millau_headers_to_rialto_parachain::MillauToRialtoParachainCliBridge, - rococo_wococo::{ - rococo_headers_to_bridge_hub_wococo::RococoToBridgeHubWococoCliBridge, - wococo_headers_to_bridge_hub_rococo::WococoToBridgeHubRococoCliBridge, + rococo_westend::{ + rococo_headers_to_bridge_hub_westend::RococoToBridgeHubWestendCliBridge, + westend_headers_to_bridge_hub_rococo::WestendToBridgeHubRococoCliBridge, }, }, cli::{bridge::*, chain_schema::*, PrometheusParams}, }; use async_trait::async_trait; -use relay_substrate_client::ChainWithTransactions; +use relay_substrate_client::{ChainWithTransactions, Client}; use structopt::StructOpt; -use strum::{EnumString, EnumVariantNames, VariantNames}; -use substrate_relay_helper::equivocation; +use strum::{EnumString, VariantNames}; +use substrate_relay_helper::{equivocation, equivocation::SubstrateEquivocationDetectionPipeline}; /// Start equivocation detection loop. #[derive(StructOpt)] @@ -54,17 +49,14 @@ pub struct DetectEquivocations { prometheus_params: PrometheusParams, } -#[derive(Debug, EnumString, EnumVariantNames)] +#[derive(Debug, EnumString, VariantNames)] #[strum(serialize_all = "kebab_case")] /// Equivocations detection bridge. pub enum DetectEquivocationsBridge { - MillauToRialto, - RialtoToMillau, - MillauToRialtoParachain, - RococoToBridgeHubWococo, - WococoToBridgeHubRococo, KusamaToBridgeHubPolkadot, PolkadotToBridgeHubKusama, + RococoToBridgeHubWestend, + WestendToBridgeHubRococo, } #[async_trait] @@ -73,8 +65,15 @@ where Self::Source: ChainWithTransactions, { async fn start(data: DetectEquivocations) -> anyhow::Result<()> { + let source_client = data.source.into_client::().await?; + Self::Equivocation::start_relay_guards( + &source_client, + source_client.can_start_version_guard(), + ) + .await?; + equivocation::run::( - data.source.into_client::().await?, + source_client, data.target.into_client::().await?, data.source_sign.transaction_params::()?, data.prometheus_params.into_metrics_params()?, @@ -83,30 +82,23 @@ where } } -impl EquivocationsDetector for MillauToRialtoCliBridge {} -impl EquivocationsDetector for RialtoToMillauCliBridge {} -impl EquivocationsDetector for MillauToRialtoParachainCliBridge {} -impl EquivocationsDetector for RococoToBridgeHubWococoCliBridge {} -impl EquivocationsDetector for WococoToBridgeHubRococoCliBridge {} impl EquivocationsDetector for KusamaToBridgeHubPolkadotCliBridge {} impl EquivocationsDetector for PolkadotToBridgeHubKusamaCliBridge {} +impl EquivocationsDetector for RococoToBridgeHubWestendCliBridge {} +impl EquivocationsDetector for WestendToBridgeHubRococoCliBridge {} impl DetectEquivocations { /// Run the command. pub async fn run(self) -> anyhow::Result<()> { match self.bridge { - DetectEquivocationsBridge::MillauToRialto => MillauToRialtoCliBridge::start(self), - DetectEquivocationsBridge::RialtoToMillau => RialtoToMillauCliBridge::start(self), - DetectEquivocationsBridge::MillauToRialtoParachain => - MillauToRialtoParachainCliBridge::start(self), - DetectEquivocationsBridge::RococoToBridgeHubWococo => - RococoToBridgeHubWococoCliBridge::start(self), - DetectEquivocationsBridge::WococoToBridgeHubRococo => - WococoToBridgeHubRococoCliBridge::start(self), DetectEquivocationsBridge::KusamaToBridgeHubPolkadot => KusamaToBridgeHubPolkadotCliBridge::start(self), DetectEquivocationsBridge::PolkadotToBridgeHubKusama => PolkadotToBridgeHubKusamaCliBridge::start(self), + DetectEquivocationsBridge::RococoToBridgeHubWestend => + RococoToBridgeHubWestendCliBridge::start(self), + DetectEquivocationsBridge::WestendToBridgeHubRococo => + WestendToBridgeHubRococoCliBridge::start(self), } .await } diff --git a/relays/bin-substrate/src/cli/encode_message.rs b/relays/bin-substrate/src/cli/encode_message.rs deleted file mode 100644 index 61f06cfc476550b4948ec131cf0afffe0441444c..0000000000000000000000000000000000000000 --- a/relays/bin-substrate/src/cli/encode_message.rs +++ /dev/null @@ -1,187 +0,0 @@ -// 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 . - -use crate::cli::{ExplicitOrMaximal, HexBytes}; -use bp_runtime::EncodedOrDecodedCall; -use bridge_runtime_common::CustomNetworkId; -use codec::Encode; -use frame_support::weights::Weight; -use relay_substrate_client::Chain; -use structopt::StructOpt; -use xcm::latest::prelude::*; - -/// All possible messages that may be delivered to generic Substrate chain. -/// -/// Note this enum may be used in the context of both Source (as part of `encode-call`) -/// and Target chain (as part of `encode-message/send-message`). -#[derive(StructOpt, Debug, PartialEq, Eq)] -pub enum Message { - /// Raw bytes for the message. - Raw { - /// Raw message bytes. - data: HexBytes, - }, - /// Message with given size. - Sized { - /// Sized of the message. - size: ExplicitOrMaximal, - }, -} - -/// Raw, SCALE-encoded message payload used in expected deployment. -pub type RawMessage = Vec; - -pub trait CliEncodeMessage: Chain { - /// Returns dummy `AccountId32` universal source given this network id. - fn dummy_universal_source() -> anyhow::Result { - use xcm::v3::prelude::*; - - let this_network = CustomNetworkId::try_from(Self::ID) - .map(|n| n.as_network_id()) - .map_err(|_| anyhow::format_err!("Unsupported chain: {:?}", Self::ID))?; - Ok(X2( - GlobalConsensus(this_network), - AccountId32 { network: Some(this_network), id: [0u8; 32] }, - )) - } - - /// Returns XCM blob that is passed to the `send_message` function of the messages pallet - /// and then is sent over the wire. - fn encode_wire_message(target: NetworkId, at_target_xcm: Xcm<()>) -> anyhow::Result>; - /// Encode an `execute` XCM call of the XCM pallet. - fn encode_execute_xcm( - message: xcm::VersionedXcm, - ) -> anyhow::Result>; - - /// Estimate value of `max_weight` argument for the `execute` XCM call of the XCM pallet. - fn estimate_execute_xcm_weight() -> Weight { - // we are only executing XCM on our testnets and 1/100 of max extrinsic weight is ok - Self::max_extrinsic_weight() / 100 - } -} - -/// Encode message payload passed through CLI flags. -pub(crate) fn encode_message( - message: &Message, -) -> anyhow::Result { - Ok(match message { - Message::Raw { ref data } => data.0.clone(), - Message::Sized { ref size } => { - let destination = CustomNetworkId::try_from(Target::ID) - .map(|n| n.as_network_id()) - .map_err(|_| anyhow::format_err!("Unsupported target chain: {:?}", Target::ID))?; - let expected_size = match *size { - ExplicitOrMaximal::Explicit(size) => size, - ExplicitOrMaximal::Maximal => compute_maximal_message_size( - Source::max_extrinsic_size(), - Target::max_extrinsic_size(), - ), - } as usize; - - let at_target_xcm = vec![ExpectPallet { - index: 0, - name: vec![42; expected_size], - module_name: vec![], - crate_major: 0, - min_crate_minor: 0, - }] - .into(); - let at_target_xcm_size = - Source::encode_wire_message(destination, at_target_xcm)?.encoded_size(); - let at_target_xcm_overhead = at_target_xcm_size.saturating_sub(expected_size); - let at_target_xcm = vec![ExpectPallet { - index: 0, - name: vec![42; expected_size.saturating_sub(at_target_xcm_overhead)], - module_name: vec![], - crate_major: 0, - min_crate_minor: 0, - }] - .into(); - - xcm::VersionedXcm::<()>::V3( - vec![ExportMessage { - network: destination, - destination: destination.into(), - xcm: at_target_xcm, - }] - .into(), - ) - .encode() - }, - }) -} - -/// Compute maximal message size, given max extrinsic size at source and target chains. -pub(crate) fn compute_maximal_message_size( - maximal_source_extrinsic_size: u32, - maximal_target_extrinsic_size: u32, -) -> u32 { - // assume that both signed extensions and other arguments fit 1KB - let service_tx_bytes_on_source_chain = 1024; - let maximal_source_extrinsic_size = - maximal_source_extrinsic_size - service_tx_bytes_on_source_chain; - let maximal_message_size = - bp_messages::maximal_incoming_message_size(maximal_target_extrinsic_size); - std::cmp::min(maximal_message_size, maximal_source_extrinsic_size) -} - -#[cfg(test)] -mod tests { - use super::*; - use crate::cli::send_message::decode_xcm; - use bp_runtime::Chain; - use relay_millau_client::Millau; - use relay_rialto_client::Rialto; - - fn approximate_message_size(xcm_msg_len: usize) -> usize { - xcm_msg_len + Source::dummy_universal_source().unwrap().encoded_size() - } - - #[test] - fn encode_explicit_size_message_works() { - let msg = encode_message::(&Message::Sized { - size: ExplicitOrMaximal::Explicit(100), - }) - .unwrap(); - // since it isn't the returned XCM what is sent over the wire, we can only check if - // it is close to what we need - assert!( - (1f64 - (approximate_message_size::(msg.len()) as f64) / 100_f64).abs() < 0.1 - ); - // check that it decodes to valid xcm - let _ = decode_xcm::<()>(msg).unwrap(); - } - - #[test] - fn encode_maximal_size_message_works() { - let maximal_size = compute_maximal_message_size( - Rialto::max_extrinsic_size(), - Millau::max_extrinsic_size(), - ); - - let msg = - encode_message::(&Message::Sized { size: ExplicitOrMaximal::Maximal }) - .unwrap(); - // since it isn't the returned XCM what is sent over the wire, we can only check if - // it is close to what we need - assert!( - (1f64 - approximate_message_size::(msg.len()) as f64 / maximal_size as f64) - .abs() < 0.1 - ); - // check that it decodes to valid xcm - let _ = decode_xcm::<()>(msg).unwrap(); - } -} diff --git a/relays/bin-substrate/src/cli/init_bridge.rs b/relays/bin-substrate/src/cli/init_bridge.rs index af938102e40d1c07b6a1739934df8f7229aaa646..027dd4c482f87d837d2c1545f404c2c8ffb7f011 100644 --- a/relays/bin-substrate/src/cli/init_bridge.rs +++ b/relays/bin-substrate/src/cli/init_bridge.rs @@ -27,16 +27,14 @@ use crate::{ polkadot_bulletin_headers_to_bridge_hub_polkadot::PolkadotBulletinToBridgeHubPolkadotCliBridge, polkadot_headers_to_polkadot_bulletin::PolkadotToPolkadotBulletinCliBridge, }, - rialto_millau::{ - millau_headers_to_rialto::MillauToRialtoCliBridge, - rialto_headers_to_millau::RialtoToMillauCliBridge, + rococo_bulletin::{ + rococo_bulletin_headers_to_bridge_hub_rococo::RococoBulletinToBridgeHubRococoCliBridge, + rococo_headers_to_rococo_bulletin::RococoToRococoBulletinCliBridge, }, - rialto_parachain_millau::millau_headers_to_rialto_parachain::MillauToRialtoParachainCliBridge, - rococo_wococo::{ - rococo_headers_to_bridge_hub_wococo::RococoToBridgeHubWococoCliBridge, - wococo_headers_to_bridge_hub_rococo::WococoToBridgeHubRococoCliBridge, + rococo_westend::{ + rococo_headers_to_bridge_hub_westend::RococoToBridgeHubWestendCliBridge, + westend_headers_to_bridge_hub_rococo::WestendToBridgeHubRococoCliBridge, }, - westend_millau::westend_headers_to_millau::WestendToMillauCliBridge, }, cli::{bridge::CliBridgeBase, chain_schema::*}, }; @@ -44,7 +42,7 @@ use bp_runtime::Chain as ChainBase; use relay_substrate_client::{AccountKeyPairOf, Chain, UnsignedTransaction}; use sp_core::Pair; use structopt::StructOpt; -use strum::{EnumString, EnumVariantNames, VariantNames}; +use strum::{EnumString, VariantNames}; use substrate_relay_helper::finality_base::engine::{Engine, Grandpa as GrandpaFinalityEngine}; /// Initialize bridge pallet. @@ -64,20 +62,18 @@ pub struct InitBridge { dry_run: bool, } -#[derive(Debug, EnumString, EnumVariantNames)] +#[derive(Debug, EnumString, VariantNames)] #[strum(serialize_all = "kebab_case")] /// Bridge to initialize. pub enum InitBridgeName { - MillauToRialto, - RialtoToMillau, - WestendToMillau, - MillauToRialtoParachain, - RococoToBridgeHubWococo, - WococoToBridgeHubRococo, KusamaToBridgeHubPolkadot, PolkadotToBridgeHubKusama, PolkadotToPolkadotBulletin, PolkadotBulletinToBridgeHubPolkadot, + RococoToRococoBulletin, + RococoBulletinToBridgeHubRococo, + RococoToBridgeHubWestend, + WestendToBridgeHubRococo, } #[async_trait] @@ -120,125 +116,92 @@ where } } -impl BridgeInitializer for MillauToRialtoCliBridge { +impl BridgeInitializer for RococoToBridgeHubWestendCliBridge { type Engine = GrandpaFinalityEngine; fn encode_init_bridge( init_data: >::InitializationData, ) -> ::Call { - rialto_runtime::SudoCall::sudo { - call: Box::new(rialto_runtime::BridgeGrandpaCall::initialize { init_data }.into()), - } - .into() - } -} - -impl BridgeInitializer for MillauToRialtoParachainCliBridge { - type Engine = GrandpaFinalityEngine; - - fn encode_init_bridge( - init_data: >::InitializationData, - ) -> ::Call { - type RuntimeCall = relay_rialto_parachain_client::RuntimeCall; - type BridgeGrandpaCall = relay_rialto_parachain_client::BridgeGrandpaCall; - type SudoCall = relay_rialto_parachain_client::SudoCall; - - let initialize_call = - RuntimeCall::BridgeMillauGrandpa(BridgeGrandpaCall::initialize { init_data }); - - RuntimeCall::Sudo(SudoCall::sudo { call: Box::new(initialize_call) }) + relay_bridge_hub_westend_client::runtime::Call::BridgeRococoGrandpa( + relay_bridge_hub_westend_client::runtime::BridgeRococoGrandpaCall::initialize { + init_data, + }, + ) } } -impl BridgeInitializer for RialtoToMillauCliBridge { +impl BridgeInitializer for WestendToBridgeHubRococoCliBridge { type Engine = GrandpaFinalityEngine; fn encode_init_bridge( init_data: >::InitializationData, ) -> ::Call { - let initialize_call = millau_runtime::BridgeGrandpaCall::< - millau_runtime::Runtime, - millau_runtime::RialtoGrandpaInstance, - >::initialize { - init_data, - }; - millau_runtime::SudoCall::sudo { call: Box::new(initialize_call.into()) }.into() + relay_bridge_hub_rococo_client::RuntimeCall::BridgeWestendGrandpa( + relay_bridge_hub_rococo_client::BridgeGrandpaCall::initialize { init_data }, + ) } } -impl BridgeInitializer for WestendToMillauCliBridge { +impl BridgeInitializer for KusamaToBridgeHubPolkadotCliBridge { type Engine = GrandpaFinalityEngine; fn encode_init_bridge( init_data: >::InitializationData, ) -> ::Call { - // at Westend -> Millau initialization we're not using sudo, because otherwise - // our deployments may fail, because we need to initialize both Rialto -> Millau - // and Westend -> Millau bridge. => since there's single possible sudo account, - // one of transaction may fail with duplicate nonce error - millau_runtime::BridgeGrandpaCall::< - millau_runtime::Runtime, - millau_runtime::WestendGrandpaInstance, - >::initialize { - init_data, - } - .into() + relay_bridge_hub_polkadot_client::runtime::Call::BridgeKusamaGrandpa( + relay_bridge_hub_polkadot_client::runtime::BridgeKusamaGrandpaCall::initialize { + init_data, + }, + ) } } -impl BridgeInitializer for RococoToBridgeHubWococoCliBridge { +impl BridgeInitializer for PolkadotToBridgeHubKusamaCliBridge { type Engine = GrandpaFinalityEngine; fn encode_init_bridge( init_data: >::InitializationData, ) -> ::Call { - relay_bridge_hub_wococo_client::RuntimeCall::BridgeRococoGrandpa( - relay_bridge_hub_wococo_client::BridgeGrandpaCall::initialize { init_data }, + relay_bridge_hub_kusama_client::runtime::Call::BridgePolkadotGrandpa( + relay_bridge_hub_kusama_client::runtime::BridgePolkadotGrandpaCall::initialize { + init_data, + }, ) } } -impl BridgeInitializer for WococoToBridgeHubRococoCliBridge { +impl BridgeInitializer for PolkadotToPolkadotBulletinCliBridge { type Engine = GrandpaFinalityEngine; fn encode_init_bridge( init_data: >::InitializationData, ) -> ::Call { - relay_bridge_hub_rococo_client::RuntimeCall::BridgeWococoGrandpa( - relay_bridge_hub_rococo_client::BridgeGrandpaCall::initialize { init_data }, - ) - } -} + type RuntimeCall = relay_polkadot_bulletin_client::RuntimeCall; + type BridgePolkadotGrandpaCall = relay_polkadot_bulletin_client::BridgePolkadotGrandpaCall; + type SudoCall = relay_polkadot_bulletin_client::SudoCall; -impl BridgeInitializer for KusamaToBridgeHubPolkadotCliBridge { - type Engine = GrandpaFinalityEngine; + let initialize_call = + RuntimeCall::BridgePolkadotGrandpa(BridgePolkadotGrandpaCall::initialize { init_data }); - fn encode_init_bridge( - init_data: >::InitializationData, - ) -> ::Call { - relay_bridge_hub_polkadot_client::runtime::Call::BridgeKusamaGrandpa( - relay_bridge_hub_polkadot_client::runtime::BridgeKusamaGrandpaCall::initialize { - init_data, - }, - ) + RuntimeCall::Sudo(SudoCall::sudo { call: Box::new(initialize_call) }) } } -impl BridgeInitializer for PolkadotToBridgeHubKusamaCliBridge { +impl BridgeInitializer for PolkadotBulletinToBridgeHubPolkadotCliBridge { type Engine = GrandpaFinalityEngine; fn encode_init_bridge( init_data: >::InitializationData, ) -> ::Call { - relay_bridge_hub_kusama_client::runtime::Call::BridgePolkadotGrandpa( - relay_bridge_hub_kusama_client::runtime::BridgePolkadotGrandpaCall::initialize { + relay_bridge_hub_polkadot_client::runtime::Call::BridgePolkadotBulletinGrandpa( + relay_bridge_hub_polkadot_client::runtime::BridgePolkadotBulletinGrandpaCall::initialize { init_data, }, ) } } -impl BridgeInitializer for PolkadotToPolkadotBulletinCliBridge { +impl BridgeInitializer for RococoToRococoBulletinCliBridge { type Engine = GrandpaFinalityEngine; fn encode_init_bridge( @@ -255,16 +218,14 @@ impl BridgeInitializer for PolkadotToPolkadotBulletinCliBridge { } } -impl BridgeInitializer for PolkadotBulletinToBridgeHubPolkadotCliBridge { +impl BridgeInitializer for RococoBulletinToBridgeHubRococoCliBridge { type Engine = GrandpaFinalityEngine; fn encode_init_bridge( init_data: >::InitializationData, ) -> ::Call { - relay_bridge_hub_polkadot_client::runtime::Call::BridgePolkadotBulletinGrandpa( - relay_bridge_hub_polkadot_client::runtime::BridgePolkadotBulletinGrandpaCall::initialize { - init_data, - }, + relay_bridge_hub_rococo_client::RuntimeCall::BridgePolkadotBulletinGrandpa( + relay_bridge_hub_rococo_client::BridgeBulletinGrandpaCall::initialize { init_data }, ) } } @@ -273,15 +234,6 @@ impl InitBridge { /// Run the command. pub async fn run(self) -> anyhow::Result<()> { match self.bridge { - InitBridgeName::MillauToRialto => MillauToRialtoCliBridge::init_bridge(self), - InitBridgeName::RialtoToMillau => RialtoToMillauCliBridge::init_bridge(self), - InitBridgeName::WestendToMillau => WestendToMillauCliBridge::init_bridge(self), - InitBridgeName::MillauToRialtoParachain => - MillauToRialtoParachainCliBridge::init_bridge(self), - InitBridgeName::RococoToBridgeHubWococo => - RococoToBridgeHubWococoCliBridge::init_bridge(self), - InitBridgeName::WococoToBridgeHubRococo => - WococoToBridgeHubRococoCliBridge::init_bridge(self), InitBridgeName::KusamaToBridgeHubPolkadot => KusamaToBridgeHubPolkadotCliBridge::init_bridge(self), InitBridgeName::PolkadotToBridgeHubKusama => @@ -290,6 +242,14 @@ impl InitBridge { PolkadotToPolkadotBulletinCliBridge::init_bridge(self), InitBridgeName::PolkadotBulletinToBridgeHubPolkadot => PolkadotBulletinToBridgeHubPolkadotCliBridge::init_bridge(self), + InitBridgeName::RococoToRococoBulletin => + RococoToRococoBulletinCliBridge::init_bridge(self), + InitBridgeName::RococoBulletinToBridgeHubRococo => + RococoBulletinToBridgeHubRococoCliBridge::init_bridge(self), + InitBridgeName::RococoToBridgeHubWestend => + RococoToBridgeHubWestendCliBridge::init_bridge(self), + InitBridgeName::WestendToBridgeHubRococo => + WestendToBridgeHubRococoCliBridge::init_bridge(self), } .await } diff --git a/relays/bin-substrate/src/cli/mod.rs b/relays/bin-substrate/src/cli/mod.rs index 088c9a10aff43c45184d68573eb096b8b4cf122c..f75032c8de751d93e918f6d71456cd04a2ebb80d 100644 --- a/relays/bin-substrate/src/cli/mod.rs +++ b/relays/bin-substrate/src/cli/mod.rs @@ -16,8 +16,6 @@ //! Deal with CLI args of substrate-to-substrate relay. -use std::convert::TryInto; - use async_std::prelude::*; use codec::{Decode, Encode}; use futures::{select, FutureExt}; @@ -26,24 +24,20 @@ use signal_hook::consts::*; use signal_hook_async_std::Signals; use sp_core::H256; use structopt::{clap::arg_enum, StructOpt}; -use strum::{EnumString, EnumVariantNames}; +use strum::{EnumString, VariantNames}; use bp_messages::LaneId; use relay_substrate_client::SimpleRuntimeVersion; pub(crate) mod bridge; -pub(crate) mod encode_message; -pub(crate) mod send_message; mod chain_schema; mod detect_equivocations; mod init_bridge; -mod register_parachain; mod relay_headers; mod relay_headers_and_messages; mod relay_messages; mod relay_parachains; -mod resubmit_transactions; /// The target that will be used when publishing logs related to this pallet. pub const LOG_TARGET: &str = "bridge"; @@ -83,16 +77,6 @@ pub enum Command { /// /// Sends initialization transaction to bootstrap the bridge with current finalized block data. InitBridge(init_bridge::InitBridge), - /// Send custom message over the bridge. - /// - /// Allows interacting with the bridge by sending messages over `Messages` component. - /// The message is being sent to the source chain, delivered to the target chain and dispatched - /// there. - SendMessage(send_message::SendMessage), - /// Resubmit transactions with increased tip if they are stalled. - ResubmitTransactions(resubmit_transactions::ResubmitTransactions), - /// Register parachain. - RegisterParachain(register_parachain::RegisterParachain), /// Relay parachain heads. RelayParachains(relay_parachains::RelayParachains), /// Detect and report equivocations. @@ -127,9 +111,6 @@ impl Command { Self::RelayMessages(arg) => arg.run().await?, Self::RelayHeadersAndMessages(arg) => arg.run().await?, Self::InitBridge(arg) => arg.run().await?, - Self::SendMessage(arg) => arg.run().await?, - Self::ResubmitTransactions(arg) => arg.run().await?, - Self::RegisterParachain(arg) => arg.run().await?, Self::RelayParachains(arg) => arg.run().await?, Self::DetectEquivocations(arg) => arg.run().await?, } @@ -175,33 +156,7 @@ arg_enum! { } } -/// Generic balance type. -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub struct Balance(pub u128); - -impl std::fmt::Display for Balance { - fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result { - use num_format::{Locale, ToFormattedString}; - write!(fmt, "{}", self.0.to_formatted_string(&Locale::en)) - } -} - -impl std::str::FromStr for Balance { - type Err = ::Err; - - fn from_str(s: &str) -> Result { - Ok(Self(s.parse()?)) - } -} - -impl Balance { - /// Cast balance to `u64` type, panicking if it's too large. - pub fn cast(&self) -> u64 { - self.0.try_into().expect("Balance is too high for this chain.") - } -} - -// Bridge-supported network definition. +/// Bridge-supported network definition. /// /// Used to abstract away CLI commands. pub trait CliChain: relay_substrate_client::Chain { @@ -337,7 +292,7 @@ where } #[doc = "Runtime version params."] -#[derive(StructOpt, Debug, PartialEq, Eq, Clone, Copy, EnumString, EnumVariantNames)] +#[derive(StructOpt, Debug, PartialEq, Eq, Clone, Copy, EnumString, VariantNames)] pub enum RuntimeVersionType { /// Auto query version from chain Auto, diff --git a/relays/bin-substrate/src/cli/register_parachain.rs b/relays/bin-substrate/src/cli/register_parachain.rs deleted file mode 100644 index 927578b8f5c5b5f5246ce00661fbd189be11f52c..0000000000000000000000000000000000000000 --- a/relays/bin-substrate/src/cli/register_parachain.rs +++ /dev/null @@ -1,326 +0,0 @@ -// 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 . - -use crate::cli::{chain_schema::*, Balance}; - -use codec::Encode; -use frame_support::Twox64Concat; -use num_traits::Zero; -use polkadot_parachain_primitives::primitives::{ - HeadData as ParaHeadData, Id as ParaId, ValidationCode as ParaValidationCode, -}; -use polkadot_runtime_common::{ - paras_registrar::Call as ParaRegistrarCall, slots::Call as ParaSlotsCall, -}; -use polkadot_runtime_parachains::paras::ParaLifecycle; -use relay_substrate_client::{AccountIdOf, CallOf, Chain, Client, UnsignedTransaction}; -use relay_utils::{TrackedTransactionStatus, TransactionTracker}; -use rialto_runtime::SudoCall; -use sp_core::{ - storage::{well_known_keys::CODE, StorageKey}, - Pair, -}; -use structopt::StructOpt; -use strum::{EnumString, EnumVariantNames, VariantNames}; - -/// Name of the `NextFreeParaId` value in the `polkadot_runtime_common::paras_registrar` pallet. -const NEXT_FREE_PARA_ID_STORAGE_NAME: &str = "NextFreeParaId"; -/// Name of the `ParaLifecycles` map in the `polkadot_runtime_parachains::paras` pallet. -const PARAS_LIFECYCLES_STORAGE_NAME: &str = "ParaLifecycles"; - -/// Register parachain. -#[derive(StructOpt, Debug, PartialEq, Eq)] -pub struct RegisterParachain { - /// A parachain to register. - #[structopt(possible_values = Parachain::VARIANTS, case_insensitive = true)] - parachain: Parachain, - /// Parachain deposit. - #[structopt(long, default_value = "0")] - deposit: Balance, - /// Lease begin. - #[structopt(long, default_value = "0")] - lease_begin: u32, - /// Lease end. - #[structopt(long, default_value = "256")] - lease_end: u32, - #[structopt(flatten)] - relay_connection: RelaychainConnectionParams, - #[structopt(flatten)] - relay_sign: RelaychainSigningParams, - #[structopt(flatten)] - para_connection: ParachainConnectionParams, -} - -/// Parachain to register. -#[derive(Debug, EnumString, EnumVariantNames, PartialEq, Eq)] -#[strum(serialize_all = "kebab_case")] -pub enum Parachain { - RialtoParachain, -} - -macro_rules! select_bridge { - ($bridge: expr, $generic: tt) => { - match $bridge { - Parachain::RialtoParachain => { - type Relaychain = relay_rialto_client::Rialto; - type Parachain = relay_rialto_parachain_client::RialtoParachain; - - use bp_rialto::{PARAS_PALLET_NAME, PARAS_REGISTRAR_PALLET_NAME}; - - $generic - }, - } - }; -} - -impl RegisterParachain { - /// Run the command. - pub async fn run(self) -> anyhow::Result<()> { - select_bridge!(self.parachain, { - let relay_client = self.relay_connection.into_client::().await?; - let relay_sign = self.relay_sign.to_keypair::()?; - let para_client = self.para_connection.into_client::().await?; - - // hopefully we're the only actor that is registering parachain right now - // => read next parachain id - let best_relay_header_hash = relay_client.best_header_hash().await?; - let para_id_key = bp_runtime::storage_value_final_key( - PARAS_REGISTRAR_PALLET_NAME.as_bytes(), - NEXT_FREE_PARA_ID_STORAGE_NAME.as_bytes(), - ); - let para_id: ParaId = relay_client - .storage_value(best_relay_header_hash, StorageKey(para_id_key.to_vec())) - .await? - .unwrap_or(polkadot_primitives::v6::LOWEST_PUBLIC_ID) - .max(polkadot_primitives::v6::LOWEST_PUBLIC_ID); - log::info!(target: "bridge", "Going to reserve parachain id: {:?}", para_id); - - // step 1: reserve a parachain id - let relay_sudo_account: AccountIdOf = relay_sign.public().into(); - let reserve_parachain_id_call: CallOf = - ParaRegistrarCall::reserve {}.into(); - let reserve_result = relay_client - .submit_and_watch_signed_extrinsic(&relay_sign, move |_, transaction_nonce| { - Ok(UnsignedTransaction::new( - reserve_parachain_id_call.into(), - transaction_nonce, - )) - }) - .await? - .wait() - .await; - if reserve_result == TrackedTransactionStatus::Lost { - return Err(anyhow::format_err!( - "Failed to finalize `reserve-parachain-id` transaction" - )) - } - log::info!(target: "bridge", "Reserved parachain id: {:?}", para_id); - - // step 2: register parathread - let para_genesis_header = para_client.header_by_number(Zero::zero()).await?; - let para_code = para_client - .raw_storage_value(para_genesis_header.hash(), StorageKey(CODE.to_vec())) - .await? - .ok_or_else(|| { - anyhow::format_err!("Cannot fetch validation code of {}", Parachain::NAME) - })? - .0; - log::info!( - target: "bridge", - "Going to register parachain {:?}: genesis len = {} code len = {}", - para_id, - para_genesis_header.encode().len(), - para_code.len(), - ); - let register_parathread_call: CallOf = ParaRegistrarCall::register { - id: para_id, - genesis_head: ParaHeadData(para_genesis_header.encode()), - validation_code: ParaValidationCode(para_code), - } - .into(); - let register_result = relay_client - .submit_and_watch_signed_extrinsic(&relay_sign, move |_, transaction_nonce| { - Ok(UnsignedTransaction::new(register_parathread_call.into(), transaction_nonce)) - }) - .await? - .wait() - .await; - if register_result == TrackedTransactionStatus::Lost { - return Err(anyhow::format_err!( - "Failed to finalize `register-parathread` transaction" - )) - } - log::info!(target: "bridge", "Registered parachain: {:?}. Waiting for onboarding", para_id); - - // wait until parathread is onboarded - let para_state_key = bp_runtime::storage_map_final_key::( - PARAS_PALLET_NAME, - PARAS_LIFECYCLES_STORAGE_NAME, - ¶_id.encode(), - ); - wait_para_state( - &relay_client, - ¶_state_key.0, - &[ParaLifecycle::Onboarding, ParaLifecycle::Parathread], - ParaLifecycle::Parathread, - ) - .await?; - - // step 3: force parachain leases - let lease_begin = self.lease_begin; - let lease_end = self.lease_end; - let para_deposit = self.deposit.cast().into(); - log::info!( - target: "bridge", - "Going to force leases of parachain {:?}: [{}; {}]", - para_id, - lease_begin, - lease_end, - ); - let force_lease_call: CallOf = SudoCall::sudo { - call: Box::new( - ParaSlotsCall::force_lease { - para: para_id, - leaser: relay_sudo_account.clone(), - amount: para_deposit, - period_begin: lease_begin, - period_count: lease_end.saturating_sub(lease_begin).saturating_add(1), - } - .into(), - ), - } - .into(); - relay_client - .submit_signed_extrinsic(&relay_sign, move |_, transaction_nonce| { - Ok(UnsignedTransaction::new(force_lease_call.into(), transaction_nonce)) - }) - .await?; - log::info!(target: "bridge", "Registered parachain leases: {:?}. Waiting for onboarding", para_id); - - // wait until parachain is onboarded - wait_para_state( - &relay_client, - ¶_state_key.0, - &[ - ParaLifecycle::Onboarding, - ParaLifecycle::UpgradingParathread, - ParaLifecycle::Parathread, - ], - ParaLifecycle::Parachain, - ) - .await?; - - Ok(()) - }) - } -} - -/// Wait until parachain state is changed. -async fn wait_para_state( - relay_client: &impl Client, - para_state_key: &[u8], - from_states: &[ParaLifecycle], - to_state: ParaLifecycle, -) -> anyhow::Result<()> { - loop { - let best_relay_header_hash = relay_client.best_header_hash().await?; - let para_state: ParaLifecycle = relay_client - .storage_value(best_relay_header_hash, StorageKey(para_state_key.to_vec())) - .await? - .ok_or_else(|| { - anyhow::format_err!( - "Cannot fetch next free parachain lifecycle from the runtime storage of {}", - Relaychain::NAME, - ) - })?; - if para_state == to_state { - log::info!(target: "bridge", "Parachain state is now: {:?}", to_state); - return Ok(()) - } - if !from_states.contains(¶_state) { - return Err(anyhow::format_err!("Invalid parachain lifecycle: {:?}", para_state)) - } - - log::info!(target: "bridge", "Parachain state: {:?}. Waiting for {:?}", para_state, to_state); - async_std::task::sleep(Relaychain::AVERAGE_BLOCK_INTERVAL).await; - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn register_rialto_parachain() { - let register_parachain = RegisterParachain::from_iter(vec![ - "register-parachain", - "rialto-parachain", - "--parachain-host", - "127.0.0.1", - "--parachain-port", - "11949", - "--relaychain-host", - "127.0.0.1", - "--relaychain-port", - "9944", - "--relaychain-signer", - "//Alice", - "--deposit", - "42", - "--lease-begin", - "100", - "--lease-end", - "200", - ]); - - assert_eq!( - register_parachain, - RegisterParachain { - parachain: Parachain::RialtoParachain, - deposit: Balance(42), - lease_begin: 100, - lease_end: 200, - relay_connection: RelaychainConnectionParams { - relaychain_host: "127.0.0.1".into(), - relaychain_port: 9944, - relaychain_secure: false, - relaychain_runtime_version: RelaychainRuntimeVersionParams { - relaychain_version_mode: RuntimeVersionType::Bundle, - relaychain_spec_version: None, - relaychain_transaction_version: None, - } - }, - relay_sign: RelaychainSigningParams { - relaychain_signer: Some("//Alice".into()), - relaychain_signer_password: None, - relaychain_signer_file: None, - relaychain_signer_password_file: None, - relaychain_transactions_mortality: None, - }, - para_connection: ParachainConnectionParams { - parachain_host: "127.0.0.1".into(), - parachain_port: 11949, - parachain_secure: false, - parachain_runtime_version: ParachainRuntimeVersionParams { - parachain_version_mode: RuntimeVersionType::Bundle, - parachain_spec_version: None, - parachain_transaction_version: None, - } - }, - } - ); - } -} diff --git a/relays/bin-substrate/src/cli/relay_headers.rs b/relays/bin-substrate/src/cli/relay_headers.rs index 69ab2b4cf11a48e037ece8b5636c442b655c718a..fa4e36f6074934337b95db7e8356094e6c5008a9 100644 --- a/relays/bin-substrate/src/cli/relay_headers.rs +++ b/relays/bin-substrate/src/cli/relay_headers.rs @@ -16,7 +16,7 @@ use async_trait::async_trait; use structopt::StructOpt; -use strum::{EnumString, EnumVariantNames, VariantNames}; +use strum::{EnumString, VariantNames}; use crate::bridges::{ kusama_polkadot::{ @@ -27,16 +27,10 @@ use crate::bridges::{ polkadot_bulletin_headers_to_bridge_hub_polkadot::PolkadotBulletinToBridgeHubPolkadotCliBridge, polkadot_headers_to_polkadot_bulletin::PolkadotToPolkadotBulletinCliBridge, }, - rialto_millau::{ - millau_headers_to_rialto::MillauToRialtoCliBridge, - rialto_headers_to_millau::RialtoToMillauCliBridge, + rococo_bulletin::{ + rococo_bulletin_headers_to_bridge_hub_rococo::RococoBulletinToBridgeHubRococoCliBridge, + rococo_headers_to_rococo_bulletin::RococoToRococoBulletinCliBridge, }, - rialto_parachain_millau::millau_headers_to_rialto_parachain::MillauToRialtoParachainCliBridge, - rococo_wococo::{ - rococo_headers_to_bridge_hub_wococo::RococoToBridgeHubWococoCliBridge, - wococo_headers_to_bridge_hub_rococo::WococoToBridgeHubRococoCliBridge, - }, - westend_millau::westend_headers_to_millau::WestendToMillauCliBridge, }; use relay_substrate_client::Client; use relay_utils::metrics::{GlobalMetrics, StandaloneMetric}; @@ -64,20 +58,16 @@ pub struct RelayHeaders { prometheus_params: PrometheusParams, } -#[derive(Debug, EnumString, EnumVariantNames)] +#[derive(Debug, EnumString, VariantNames)] #[strum(serialize_all = "kebab_case")] /// Headers relay bridge. pub enum RelayHeadersBridge { - MillauToRialto, - RialtoToMillau, - WestendToMillau, - MillauToRialtoParachain, - RococoToBridgeHubWococo, - WococoToBridgeHubRococo, KusamaToBridgeHubPolkadot, PolkadotToBridgeHubKusama, PolkadotToPolkadotBulletin, PolkadotBulletinToBridgeHubPolkadot, + RococoToRococoBulletin, + RococoBulletinToBridgeHubRococo, } #[async_trait] @@ -97,12 +87,8 @@ trait HeadersRelayer: RelayToRelayHeadersCliBridge { signer: target_sign, mortality: target_transactions_mortality, }; - Self::Finality::start_relay_guards( - &target_client, - &target_transactions_params, - target_client.can_start_version_guard(), - ) - .await?; + Self::Finality::start_relay_guards(&target_client, target_client.can_start_version_guard()) + .await?; substrate_relay_helper::finality::run::( source_client, @@ -115,30 +101,17 @@ trait HeadersRelayer: RelayToRelayHeadersCliBridge { } } -impl HeadersRelayer for MillauToRialtoCliBridge {} -impl HeadersRelayer for RialtoToMillauCliBridge {} -impl HeadersRelayer for WestendToMillauCliBridge {} -impl HeadersRelayer for MillauToRialtoParachainCliBridge {} -impl HeadersRelayer for RococoToBridgeHubWococoCliBridge {} -impl HeadersRelayer for WococoToBridgeHubRococoCliBridge {} impl HeadersRelayer for KusamaToBridgeHubPolkadotCliBridge {} impl HeadersRelayer for PolkadotToBridgeHubKusamaCliBridge {} impl HeadersRelayer for PolkadotToPolkadotBulletinCliBridge {} impl HeadersRelayer for PolkadotBulletinToBridgeHubPolkadotCliBridge {} +impl HeadersRelayer for RococoToRococoBulletinCliBridge {} +impl HeadersRelayer for RococoBulletinToBridgeHubRococoCliBridge {} impl RelayHeaders { /// Run the command. pub async fn run(self) -> anyhow::Result<()> { match self.bridge { - RelayHeadersBridge::MillauToRialto => MillauToRialtoCliBridge::relay_headers(self), - RelayHeadersBridge::RialtoToMillau => RialtoToMillauCliBridge::relay_headers(self), - RelayHeadersBridge::WestendToMillau => WestendToMillauCliBridge::relay_headers(self), - RelayHeadersBridge::MillauToRialtoParachain => - MillauToRialtoParachainCliBridge::relay_headers(self), - RelayHeadersBridge::RococoToBridgeHubWococo => - RococoToBridgeHubWococoCliBridge::relay_headers(self), - RelayHeadersBridge::WococoToBridgeHubRococo => - WococoToBridgeHubRococoCliBridge::relay_headers(self), RelayHeadersBridge::KusamaToBridgeHubPolkadot => KusamaToBridgeHubPolkadotCliBridge::relay_headers(self), RelayHeadersBridge::PolkadotToBridgeHubKusama => @@ -147,6 +120,10 @@ impl RelayHeaders { PolkadotToPolkadotBulletinCliBridge::relay_headers(self), RelayHeadersBridge::PolkadotBulletinToBridgeHubPolkadot => PolkadotBulletinToBridgeHubPolkadotCliBridge::relay_headers(self), + RelayHeadersBridge::RococoToRococoBulletin => + RococoToRococoBulletinCliBridge::relay_headers(self), + RelayHeadersBridge::RococoBulletinToBridgeHubRococo => + RococoBulletinToBridgeHubRococoCliBridge::relay_headers(self), } .await } diff --git a/relays/bin-substrate/src/cli/relay_headers_and_messages/mod.rs b/relays/bin-substrate/src/cli/relay_headers_and_messages/mod.rs index deb13ce77b292b8f2595bf91caa59f4763d7f733..77977051ea7e1de780fdb6a8123d6bbedfd95e17 100644 --- a/relays/bin-substrate/src/cli/relay_headers_and_messages/mod.rs +++ b/relays/bin-substrate/src/cli/relay_headers_and_messages/mod.rs @@ -36,7 +36,6 @@ use structopt::StructOpt; use futures::{FutureExt, TryFutureExt}; use relay_to_parachain::*; -use relay_to_relay::*; use crate::{ bridges::{ @@ -48,17 +47,14 @@ use crate::{ polkadot_bulletin_headers_to_bridge_hub_polkadot::PolkadotBulletinToBridgeHubPolkadotCliBridge, polkadot_parachains_to_polkadot_bulletin::PolkadotToPolkadotBulletinCliBridge, }, - rialto_millau::{ - millau_headers_to_rialto::MillauToRialtoCliBridge, - rialto_headers_to_millau::RialtoToMillauCliBridge, + rococo_bulletin::{ + rococo_bulletin_headers_to_bridge_hub_rococo::RococoBulletinToBridgeHubRococoCliBridge, + rococo_parachains_to_rococo_bulletin::RococoToRococoBulletinCliBridge, + BridgeHubRococoAsBridgeHubPolkadot, }, - rialto_parachain_millau::{ - millau_headers_to_rialto_parachain::MillauToRialtoParachainCliBridge, - rialto_parachains_to_millau::RialtoParachainToMillauCliBridge, - }, - rococo_wococo::{ - rococo_parachains_to_bridge_hub_wococo::BridgeHubRococoToBridgeHubWococoCliBridge, - wococo_parachains_to_bridge_hub_rococo::BridgeHubWococoToBridgeHubRococoCliBridge, + rococo_westend::{ + rococo_parachains_to_bridge_hub_westend::BridgeHubRococoToBridgeHubWestendCliBridge, + westend_parachains_to_bridge_hub_rococo::BridgeHubWestendToBridgeHubRococoCliBridge, }, }, cli::{ @@ -199,32 +195,26 @@ where } // All supported chains. -declare_chain_cli_schema!(Millau, millau); -declare_chain_cli_schema!(Rialto, rialto); -declare_chain_cli_schema!(RialtoParachain, rialto_parachain); declare_chain_cli_schema!(Rococo, rococo); declare_chain_cli_schema!(BridgeHubRococo, bridge_hub_rococo); -declare_chain_cli_schema!(Wococo, wococo); -declare_chain_cli_schema!(BridgeHubWococo, bridge_hub_wococo); +declare_chain_cli_schema!(Westend, westend); +declare_chain_cli_schema!(BridgeHubWestend, bridge_hub_westend); declare_chain_cli_schema!(Kusama, kusama); declare_chain_cli_schema!(BridgeHubKusama, bridge_hub_kusama); declare_chain_cli_schema!(Polkadot, polkadot); declare_chain_cli_schema!(BridgeHubPolkadot, bridge_hub_polkadot); declare_chain_cli_schema!(PolkadotBulletin, polkadot_bulletin); +declare_chain_cli_schema!(RococoBulletin, rococo_bulletin); // Means to override signers of different layer transactions. -declare_chain_cli_schema!(MillauHeadersToRialto, millau_headers_to_rialto); -declare_chain_cli_schema!(MillauHeadersToRialtoParachain, millau_headers_to_rialto_parachain); -declare_chain_cli_schema!(RialtoHeadersToMillau, rialto_headers_to_millau); -declare_chain_cli_schema!(RialtoParachainsToMillau, rialto_parachains_to_millau); -declare_chain_cli_schema!(RococoHeadersToBridgeHubWococo, rococo_headers_to_bridge_hub_wococo); +declare_chain_cli_schema!(RococoHeadersToBridgeHubWestend, rococo_headers_to_bridge_hub_westend); declare_chain_cli_schema!( - RococoParachainsToBridgeHubWococo, - rococo_parachains_to_bridge_hub_wococo + RococoParachainsToBridgeHubWestend, + rococo_parachains_to_bridge_hub_westend ); -declare_chain_cli_schema!(WococoHeadersToBridgeHubRococo, wococo_headers_to_bridge_hub_rococo); +declare_chain_cli_schema!(WestendHeadersToBridgeHubRococo, westend_headers_to_bridge_hub_rococo); declare_chain_cli_schema!( - WococoParachainsToBridgeHubRococo, - wococo_parachains_to_bridge_hub_rococo + WestendParachainsToBridgeHubRococo, + westend_parachains_to_bridge_hub_rococo ); declare_chain_cli_schema!(KusamaHeadersToBridgeHubPolkadot, kusama_headers_to_bridge_hub_polkadot); declare_chain_cli_schema!( @@ -240,17 +230,22 @@ declare_chain_cli_schema!( PolkadotBulletinHeadersToBridgeHubPolkadot, polkadot_bulletin_headers_to_bridge_hub_polkadot ); +declare_chain_cli_schema!( + RococoBulletinHeadersToBridgeHubRococo, + rococo_bulletin_headers_to_bridge_hub_rococo +); declare_chain_cli_schema!(PolkadotHeadersToPolkadotBulletin, polkadot_headers_to_polkadot_bulletin); +declare_chain_cli_schema!(RococoHeadersToRococoBulletin, rococo_headers_to_rococo_bulletin); declare_chain_cli_schema!( PolkadotParachainsToPolkadotBulletin, polkadot_parachains_to_polkadot_bulletin ); +declare_chain_cli_schema!(RococoParachainsToRococoBulletin, rococo_parachains_to_rococo_bulletin); // All supported bridges. -declare_relay_to_relay_bridge_schema!(Millau, Rialto); -declare_relay_to_parachain_bridge_schema!(Millau, RialtoParachain, Rialto); -declare_parachain_to_parachain_bridge_schema!(BridgeHubRococo, Rococo, BridgeHubWococo, Wococo); +declare_parachain_to_parachain_bridge_schema!(BridgeHubRococo, Rococo, BridgeHubWestend, Westend); declare_parachain_to_parachain_bridge_schema!(BridgeHubKusama, Kusama, BridgeHubPolkadot, Polkadot); declare_relay_to_parachain_bridge_schema!(PolkadotBulletin, BridgeHubPolkadot, Polkadot); +declare_relay_to_parachain_bridge_schema!(RococoBulletin, BridgeHubRococo, Rococo); /// Base portion of the bidirectional complex relay. /// @@ -421,44 +416,18 @@ where } } -/// Millau <> Rialto complex relay. -pub struct MillauRialtoFull2WayBridge { - base: ::Base, -} - -#[async_trait] -impl Full2WayBridge for MillauRialtoFull2WayBridge { - type Base = RelayToRelayBridge; - type Left = relay_millau_client::Millau; - type Right = relay_rialto_client::Rialto; - type L2R = MillauToRialtoCliBridge; - type R2L = RialtoToMillauCliBridge; - - fn new(base: Self::Base) -> anyhow::Result { - Ok(Self { base }) - } - - fn base(&self) -> &Self::Base { - &self.base - } - - fn mut_base(&mut self) -> &mut Self::Base { - &mut self.base - } -} - -/// Millau <> RialtoParachain complex relay. -pub struct MillauRialtoParachainFull2WayBridge { +/// BridgeHubRococo <> BridgeHubWestend complex relay. +pub struct BridgeHubRococoBridgeHubWestendFull2WayBridge { base: ::Base, } #[async_trait] -impl Full2WayBridge for MillauRialtoParachainFull2WayBridge { - type Base = RelayToParachainBridge; - type Left = relay_millau_client::Millau; - type Right = relay_rialto_parachain_client::RialtoParachain; - type L2R = MillauToRialtoParachainCliBridge; - type R2L = RialtoParachainToMillauCliBridge; +impl Full2WayBridge for BridgeHubRococoBridgeHubWestendFull2WayBridge { + type Base = ParachainToParachainBridge; + type Left = relay_bridge_hub_rococo_client::BridgeHubRococo; + type Right = relay_bridge_hub_westend_client::BridgeHubWestend; + type L2R = BridgeHubRococoToBridgeHubWestendCliBridge; + type R2L = BridgeHubWestendToBridgeHubRococoCliBridge; fn new(base: Self::Base) -> anyhow::Result { Ok(Self { base }) @@ -473,18 +442,18 @@ impl Full2WayBridge for MillauRialtoParachainFull2WayBridge { } } -/// BridgeHubRococo <> BridgeHubWococo complex relay. -pub struct BridgeHubRococoBridgeHubWococoFull2WayBridge { +/// BridgeHubKusama <> BridgeHubPolkadot complex relay. +pub struct BridgeHubKusamaBridgeHubPolkadotFull2WayBridge { base: ::Base, } #[async_trait] -impl Full2WayBridge for BridgeHubRococoBridgeHubWococoFull2WayBridge { +impl Full2WayBridge for BridgeHubKusamaBridgeHubPolkadotFull2WayBridge { type Base = ParachainToParachainBridge; - type Left = relay_bridge_hub_rococo_client::BridgeHubRococo; - type Right = relay_bridge_hub_wococo_client::BridgeHubWococo; - type L2R = BridgeHubRococoToBridgeHubWococoCliBridge; - type R2L = BridgeHubWococoToBridgeHubRococoCliBridge; + type Left = relay_bridge_hub_kusama_client::BridgeHubKusama; + type Right = relay_bridge_hub_polkadot_client::BridgeHubPolkadot; + type L2R = BridgeHubKusamaToBridgeHubPolkadotCliBridge; + type R2L = BridgeHubPolkadotToBridgeHubKusamaCliBridge; fn new(base: Self::Base) -> anyhow::Result { Ok(Self { base }) @@ -499,18 +468,18 @@ impl Full2WayBridge for BridgeHubRococoBridgeHubWococoFull2WayBridge { } } -/// BridgeHubKusama <> BridgeHubPolkadot complex relay. -pub struct BridgeHubKusamaBridgeHubPolkadotFull2WayBridge { +/// `PolkadotBulletin` <> `BridgeHubPolkadot` complex relay. +pub struct PolkadotBulletinBridgeHubPolkadotFull2WayBridge { base: ::Base, } #[async_trait] -impl Full2WayBridge for BridgeHubKusamaBridgeHubPolkadotFull2WayBridge { - type Base = ParachainToParachainBridge; - type Left = relay_bridge_hub_kusama_client::BridgeHubKusama; +impl Full2WayBridge for PolkadotBulletinBridgeHubPolkadotFull2WayBridge { + type Base = RelayToParachainBridge; + type Left = relay_polkadot_bulletin_client::PolkadotBulletin; type Right = relay_bridge_hub_polkadot_client::BridgeHubPolkadot; - type L2R = BridgeHubKusamaToBridgeHubPolkadotCliBridge; - type R2L = BridgeHubPolkadotToBridgeHubKusamaCliBridge; + type L2R = PolkadotBulletinToBridgeHubPolkadotCliBridge; + type R2L = PolkadotToPolkadotBulletinCliBridge; fn new(base: Self::Base) -> anyhow::Result { Ok(Self { base }) @@ -525,18 +494,18 @@ impl Full2WayBridge for BridgeHubKusamaBridgeHubPolkadotFull2WayBridge { } } -/// `PolkadotBulletin` <> `BridgeHubPolkadot` complex relay. -pub struct PolkadotBulletinBridgeHubPolkadotFull2WayBridge { +/// `RococoBulletin` <> `BridgeHubRococo` complex relay. +pub struct RococoBulletinBridgeHubRococoFull2WayBridge { base: ::Base, } #[async_trait] -impl Full2WayBridge for PolkadotBulletinBridgeHubPolkadotFull2WayBridge { +impl Full2WayBridge for RococoBulletinBridgeHubRococoFull2WayBridge { type Base = RelayToParachainBridge; type Left = relay_polkadot_bulletin_client::PolkadotBulletin; - type Right = relay_bridge_hub_polkadot_client::BridgeHubPolkadot; - type L2R = PolkadotBulletinToBridgeHubPolkadotCliBridge; - type R2L = PolkadotToPolkadotBulletinCliBridge; + type Right = BridgeHubRococoAsBridgeHubPolkadot; + type L2R = RococoBulletinToBridgeHubRococoCliBridge; + type R2L = RococoToRococoBulletinCliBridge; fn new(base: Self::Base) -> anyhow::Result { Ok(Self { base }) @@ -554,30 +523,22 @@ impl Full2WayBridge for PolkadotBulletinBridgeHubPolkadotFull2WayBridge { /// Complex headers+messages relay. #[derive(Debug, PartialEq, StructOpt)] pub enum RelayHeadersAndMessages { - /// Millau <> Rialto relay. - MillauRialto(MillauRialtoHeadersAndMessages), - /// Millau <> RialtoParachain relay. - MillauRialtoParachain(MillauRialtoParachainHeadersAndMessages), - /// BridgeHubRococo <> BridgeHubWococo relay. - BridgeHubRococoBridgeHubWococo(BridgeHubRococoBridgeHubWococoHeadersAndMessages), /// BridgeHubKusama <> BridgeHubPolkadot relay. BridgeHubKusamaBridgeHubPolkadot(BridgeHubKusamaBridgeHubPolkadotHeadersAndMessages), /// `PolkadotBulletin` <> `BridgeHubPolkadot` relay. PolkadotBulletinBridgeHubPolkadot(PolkadotBulletinBridgeHubPolkadotHeadersAndMessages), + /// `RococoBulletin` <> `BridgeHubRococo` relay. + RococoBulletinBridgeHubRococo(RococoBulletinBridgeHubRococoHeadersAndMessages), + /// BridgeHubRococo <> BridgeHubWestend relay. + BridgeHubRococoBridgeHubWestend(BridgeHubRococoBridgeHubWestendHeadersAndMessages), } impl RelayHeadersAndMessages { /// Run the command. pub async fn run(self) -> anyhow::Result<()> { match self { - RelayHeadersAndMessages::MillauRialto(params) => - MillauRialtoFull2WayBridge::new(params.into_bridge().await?)?.run().await, - RelayHeadersAndMessages::MillauRialtoParachain(params) => - MillauRialtoParachainFull2WayBridge::new(params.into_bridge().await?)? - .run() - .await, - RelayHeadersAndMessages::BridgeHubRococoBridgeHubWococo(params) => - BridgeHubRococoBridgeHubWococoFull2WayBridge::new(params.into_bridge().await?)? + RelayHeadersAndMessages::BridgeHubRococoBridgeHubWestend(params) => + BridgeHubRococoBridgeHubWestendFull2WayBridge::new(params.into_bridge().await?)? .run() .await, RelayHeadersAndMessages::BridgeHubKusamaBridgeHubPolkadot(params) => @@ -588,6 +549,10 @@ impl RelayHeadersAndMessages { PolkadotBulletinBridgeHubPolkadotFull2WayBridge::new(params.into_bridge().await?)? .run() .await, + RelayHeadersAndMessages::RococoBulletinBridgeHubRococo(params) => + RococoBulletinBridgeHubRococoFull2WayBridge::new(params.into_bridge().await?)? + .run() + .await, } } } @@ -598,130 +563,34 @@ mod tests { use sp_core::H256; #[test] - fn should_parse_relay_to_relay_options() { + fn should_parse_parachain_to_parachain_options() { // when let res = RelayHeadersAndMessages::from_iter(vec![ "relay-headers-and-messages", - "millau-rialto", - "--millau-host", - "millau-node-alice", - "--millau-port", - "9944", - "--millau-signer", - "//Charlie", - "--millau-transactions-mortality", - "64", - "--rialto-host", - "rialto-node-alice", - "--rialto-port", + "bridge-hub-kusama-bridge-hub-polkadot", + "--bridge-hub-kusama-host", + "bridge-hub-kusama-node-collator1", + "--bridge-hub-kusama-port", "9944", - "--rialto-signer", - "//Charlie", - "--rialto-transactions-mortality", - "64", - "--lane", - "0000000000000000000000000000000000000000000000000000000000000000", - "--lane", - "1111111111111111111111111111111111111111111111111111111111111111", - "--prometheus-host", - "0.0.0.0", - ]); - - // then - assert_eq!( - res, - RelayHeadersAndMessages::MillauRialto(MillauRialtoHeadersAndMessages { - shared: HeadersAndMessagesSharedParams { - lane: vec![ - HexLaneId(H256::from([0x00u8; 32])), - HexLaneId(H256::from([0x11u8; 32])) - ], - only_mandatory_headers: false, - prometheus_params: PrometheusParams { - no_prometheus: false, - prometheus_host: "0.0.0.0".into(), - prometheus_port: 9616, - }, - }, - left: MillauConnectionParams { - millau_host: "millau-node-alice".into(), - millau_port: 9944, - millau_secure: false, - millau_runtime_version: MillauRuntimeVersionParams { - millau_version_mode: RuntimeVersionType::Bundle, - millau_spec_version: None, - millau_transaction_version: None, - }, - }, - left_sign: MillauSigningParams { - millau_signer: Some("//Charlie".into()), - millau_signer_password: None, - millau_signer_file: None, - millau_signer_password_file: None, - millau_transactions_mortality: Some(64), - }, - left_headers_to_right_sign_override: MillauHeadersToRialtoSigningParams { - millau_headers_to_rialto_signer: None, - millau_headers_to_rialto_signer_password: None, - millau_headers_to_rialto_signer_file: None, - millau_headers_to_rialto_signer_password_file: None, - millau_headers_to_rialto_transactions_mortality: None, - }, - right: RialtoConnectionParams { - rialto_host: "rialto-node-alice".into(), - rialto_port: 9944, - rialto_secure: false, - rialto_runtime_version: RialtoRuntimeVersionParams { - rialto_version_mode: RuntimeVersionType::Bundle, - rialto_spec_version: None, - rialto_transaction_version: None, - }, - }, - right_sign: RialtoSigningParams { - rialto_signer: Some("//Charlie".into()), - rialto_signer_password: None, - rialto_signer_file: None, - rialto_signer_password_file: None, - rialto_transactions_mortality: Some(64), - }, - right_headers_to_left_sign_override: RialtoHeadersToMillauSigningParams { - rialto_headers_to_millau_signer: None, - rialto_headers_to_millau_signer_password: None, - rialto_headers_to_millau_signer_file: None, - rialto_headers_to_millau_signer_password_file: None, - rialto_headers_to_millau_transactions_mortality: None, - }, - }), - ); - } - - #[test] - fn should_parse_relay_to_parachain_options() { - // when - let res = RelayHeadersAndMessages::from_iter(vec![ - "relay-headers-and-messages", - "millau-rialto-parachain", - "--millau-host", - "millau-node-alice", - "--millau-port", - "9944", - "--millau-signer", + "--bridge-hub-kusama-signer", "//Iden", - "--rialto-headers-to-millau-signer", - "//Ken", - "--millau-transactions-mortality", + "--bridge-hub-kusama-transactions-mortality", "64", - "--rialto-parachain-host", - "rialto-parachain-collator-charlie", - "--rialto-parachain-port", + "--kusama-host", + "kusama-alice", + "--kusama-port", + "9944", + "--bridge-hub-polkadot-host", + "bridge-hub-polkadot-collator1", + "--bridge-hub-polkadot-port", "9944", - "--rialto-parachain-signer", + "--bridge-hub-polkadot-signer", "//George", - "--rialto-parachain-transactions-mortality", + "--bridge-hub-polkadot-transactions-mortality", "64", - "--rialto-host", - "rialto-node-alice", - "--rialto-port", + "--polkadot-host", + "polkadot-alice", + "--polkadot-port", "9944", "--lane", "0000000000000000000000000000000000000000000000000000000000000000", @@ -732,8 +601,8 @@ mod tests { // then assert_eq!( res, - RelayHeadersAndMessages::MillauRialtoParachain( - MillauRialtoParachainHeadersAndMessages { + RelayHeadersAndMessages::BridgeHubKusamaBridgeHubPolkadot( + BridgeHubKusamaBridgeHubPolkadotHeadersAndMessages { shared: HeadersAndMessagesSharedParams { lane: vec![HexLaneId(H256::from([0x00u8; 32]))], only_mandatory_headers: false, @@ -743,70 +612,59 @@ mod tests { prometheus_port: 9616, }, }, - left: MillauConnectionParams { - millau_host: "millau-node-alice".into(), - millau_port: 9944, - millau_secure: false, - millau_runtime_version: MillauRuntimeVersionParams { - millau_version_mode: RuntimeVersionType::Bundle, - millau_spec_version: None, - millau_transaction_version: None, + left_relay: KusamaConnectionParams { + kusama_host: "kusama-alice".into(), + kusama_port: 9944, + kusama_secure: false, + kusama_runtime_version: KusamaRuntimeVersionParams { + kusama_version_mode: RuntimeVersionType::Bundle, + kusama_spec_version: None, + kusama_transaction_version: None, }, }, - left_sign: MillauSigningParams { - millau_signer: Some("//Iden".into()), - millau_signer_password: None, - millau_signer_file: None, - millau_signer_password_file: None, - millau_transactions_mortality: Some(64), - }, - left_headers_to_right_sign_override: - MillauHeadersToRialtoParachainSigningParams { - millau_headers_to_rialto_parachain_signer: None, - millau_headers_to_rialto_parachain_signer_password: None, - millau_headers_to_rialto_parachain_signer_file: None, - millau_headers_to_rialto_parachain_signer_password_file: None, - millau_headers_to_rialto_parachain_transactions_mortality: None, - }, - right: RialtoParachainConnectionParams { - rialto_parachain_host: "rialto-parachain-collator-charlie".into(), - rialto_parachain_port: 9944, - rialto_parachain_secure: false, - rialto_parachain_runtime_version: RialtoParachainRuntimeVersionParams { - rialto_parachain_version_mode: RuntimeVersionType::Bundle, - rialto_parachain_spec_version: None, - rialto_parachain_transaction_version: None, + left: BridgeHubKusamaConnectionParams { + bridge_hub_kusama_host: "bridge-hub-kusama-node-collator1".into(), + bridge_hub_kusama_port: 9944, + bridge_hub_kusama_secure: false, + bridge_hub_kusama_runtime_version: BridgeHubKusamaRuntimeVersionParams { + bridge_hub_kusama_version_mode: RuntimeVersionType::Bundle, + bridge_hub_kusama_spec_version: None, + bridge_hub_kusama_transaction_version: None, }, }, - right_sign: RialtoParachainSigningParams { - rialto_parachain_signer: Some("//George".into()), - rialto_parachain_signer_password: None, - rialto_parachain_signer_file: None, - rialto_parachain_signer_password_file: None, - rialto_parachain_transactions_mortality: Some(64), + left_sign: BridgeHubKusamaSigningParams { + bridge_hub_kusama_signer: Some("//Iden".into()), + bridge_hub_kusama_signer_password: None, + bridge_hub_kusama_signer_file: None, + bridge_hub_kusama_signer_password_file: None, + bridge_hub_kusama_transactions_mortality: Some(64), }, - right_relay_headers_to_left_sign_override: RialtoHeadersToMillauSigningParams { - rialto_headers_to_millau_signer: Some("//Ken".into()), - rialto_headers_to_millau_signer_password: None, - rialto_headers_to_millau_signer_file: None, - rialto_headers_to_millau_signer_password_file: None, - rialto_headers_to_millau_transactions_mortality: None, + right: BridgeHubPolkadotConnectionParams { + bridge_hub_polkadot_host: "bridge-hub-polkadot-collator1".into(), + bridge_hub_polkadot_port: 9944, + bridge_hub_polkadot_secure: false, + bridge_hub_polkadot_runtime_version: + BridgeHubPolkadotRuntimeVersionParams { + bridge_hub_polkadot_version_mode: RuntimeVersionType::Bundle, + bridge_hub_polkadot_spec_version: None, + bridge_hub_polkadot_transaction_version: None, + }, }, - right_parachains_to_left_sign_override: RialtoParachainsToMillauSigningParams { - rialto_parachains_to_millau_signer: None, - rialto_parachains_to_millau_signer_password: None, - rialto_parachains_to_millau_signer_file: None, - rialto_parachains_to_millau_signer_password_file: None, - rialto_parachains_to_millau_transactions_mortality: None, + right_sign: BridgeHubPolkadotSigningParams { + bridge_hub_polkadot_signer: Some("//George".into()), + bridge_hub_polkadot_signer_password: None, + bridge_hub_polkadot_signer_file: None, + bridge_hub_polkadot_signer_password_file: None, + bridge_hub_polkadot_transactions_mortality: Some(64), }, - right_relay: RialtoConnectionParams { - rialto_host: "rialto-node-alice".into(), - rialto_port: 9944, - rialto_secure: false, - rialto_runtime_version: RialtoRuntimeVersionParams { - rialto_version_mode: RuntimeVersionType::Bundle, - rialto_spec_version: None, - rialto_transaction_version: None, + right_relay: PolkadotConnectionParams { + polkadot_host: "polkadot-alice".into(), + polkadot_port: 9944, + polkadot_secure: false, + polkadot_runtime_version: PolkadotRuntimeVersionParams { + polkadot_version_mode: RuntimeVersionType::Bundle, + polkadot_spec_version: None, + polkadot_transaction_version: None, }, }, } diff --git a/relays/bin-substrate/src/cli/relay_headers_and_messages/parachain_to_parachain.rs b/relays/bin-substrate/src/cli/relay_headers_and_messages/parachain_to_parachain.rs index 36cca3c2f1b42f254d44837c540301e2e290dcea..84b532e4778491ca4afacd9a9b07ccdbdc52653d 100644 --- a/relays/bin-substrate/src/cli/relay_headers_and_messages/parachain_to_parachain.rs +++ b/relays/bin-substrate/src/cli/relay_headers_and_messages/parachain_to_parachain.rs @@ -33,7 +33,6 @@ use substrate_relay_helper::{ on_demand::{ headers::OnDemandHeadersRelay, parachains::OnDemandParachainsRelay, OnDemandRelay, }, - TaggedAccount, TransactionParams, }; /// A base relay between two parachain from different consensus systems. @@ -54,20 +53,6 @@ pub struct ParachainToParachainBridge< pub left_relay: DefaultClient<::SourceRelay>, /// Client of the right relay chain. pub right_relay: DefaultClient<::SourceRelay>, - - /// Override for right_relay->left headers signer. - pub right_headers_to_left_transaction_params: - TransactionParams::Target>>, - /// Override for right->left parachains signer. - pub right_parachains_to_left_transaction_params: - TransactionParams::Target>>, - - /// Override for left_relay->right headers signer. - pub left_headers_to_right_transaction_params: - TransactionParams::Target>>, - /// Override for left->right parachains signer. - pub left_parachains_to_right_transaction_params: - TransactionParams::Target>>, } macro_rules! declare_parachain_to_parachain_bridge_schema { @@ -86,12 +71,6 @@ macro_rules! declare_parachain_to_parachain_bridge_schema { // default signer, which is always used to sign messages relay transactions on the left chain #[structopt(flatten)] left_sign: [<$left_parachain SigningParams>], - // override for right_relay->left-parachain headers signer - #[structopt(flatten)] - right_relay_headers_to_left_sign_override: [<$right_chain HeadersTo $left_parachain SigningParams>], - // override for right->left parachains signer - #[structopt(flatten)] - right_parachains_to_left_sign_override: [<$right_chain ParachainsTo $left_parachain SigningParams>], #[structopt(flatten)] left_relay: [<$left_chain ConnectionParams>], @@ -101,12 +80,6 @@ macro_rules! declare_parachain_to_parachain_bridge_schema { // default signer, which is always used to sign messages relay transactions on the right chain #[structopt(flatten)] right_sign: [<$right_parachain SigningParams>], - // override for left_relay->right-parachain headers signer - #[structopt(flatten)] - left_relay_headers_to_right_sign_override: [<$left_chain HeadersTo $right_parachain SigningParams>], - // override for left->right parachains signer - #[structopt(flatten)] - left_parachains_to_right_sign_override: [<$left_chain ParachainsTo $right_parachain SigningParams>], #[structopt(flatten)] right_relay: [<$right_chain ConnectionParams>], @@ -143,18 +116,6 @@ macro_rules! declare_parachain_to_parachain_bridge_schema { )?, left_relay: self.left_relay.into_client::().await?, right_relay: self.right_relay.into_client::().await?, - right_headers_to_left_transaction_params: self - .right_relay_headers_to_left_sign_override - .transaction_params_or::(&self.left_sign)?, - left_headers_to_right_transaction_params: self - .left_relay_headers_to_right_sign_override - .transaction_params_or::(&self.right_sign)?, - right_parachains_to_left_transaction_params: self - .right_parachains_to_left_sign_override - .transaction_params_or::(&self.left_sign)?, - left_parachains_to_right_transaction_params: self - .left_parachains_to_right_sign_override - .transaction_params_or::(&self.right_sign)?, }) } } @@ -199,32 +160,13 @@ where Arc>, Arc>, )> { - self.common.left.accounts.push(TaggedAccount::Headers { - id: self.right_headers_to_left_transaction_params.signer.public().into(), - bridged_chain: RightRelay::NAME.to_string(), - }); - self.common.left.accounts.push(TaggedAccount::Parachains { - id: self.right_parachains_to_left_transaction_params.signer.public().into(), - bridged_chain: RightRelay::NAME.to_string(), - }); - self.common.right.accounts.push(TaggedAccount::Headers { - id: self.left_headers_to_right_transaction_params.signer.public().into(), - bridged_chain: Left::NAME.to_string(), - }); - self.common.right.accounts.push(TaggedAccount::Parachains { - id: self.left_parachains_to_right_transaction_params.signer.public().into(), - bridged_chain: LeftRelay::NAME.to_string(), - }); - ::RelayFinality::start_relay_guards( &self.common.right.client, - &self.left_headers_to_right_transaction_params, self.common.right.client.can_start_version_guard(), ) .await?; ::RelayFinality::start_relay_guards( &self.common.left.client, - &self.right_headers_to_left_transaction_params, self.common.left.client.can_start_version_guard(), ) .await?; @@ -236,7 +178,7 @@ where >::new( self.left_relay.clone(), self.common.right.client.clone(), - self.left_headers_to_right_transaction_params.clone(), + self.common.right.tx_params.clone(), self.common.shared.only_mandatory_headers, Some(self.common.metrics_params.clone()), ); @@ -247,7 +189,7 @@ where >::new( self.right_relay.clone(), self.common.left.client.clone(), - self.right_headers_to_left_transaction_params.clone(), + self.common.left.tx_params.clone(), self.common.shared.only_mandatory_headers, Some(self.common.metrics_params.clone()), ); @@ -259,7 +201,7 @@ where >::new( self.left_relay.clone(), self.common.right.client.clone(), - self.left_parachains_to_right_transaction_params.clone(), + self.common.right.tx_params.clone(), Arc::new(left_relay_to_right_on_demand_headers), ); let right_to_left_on_demand_parachains = OnDemandParachainsRelay::< @@ -269,7 +211,7 @@ where >::new( self.right_relay.clone(), self.common.left.client.clone(), - self.right_parachains_to_left_transaction_params.clone(), + self.common.left.tx_params.clone(), Arc::new(right_relay_to_left_on_demand_headers), ); diff --git a/relays/bin-substrate/src/cli/relay_headers_and_messages/relay_to_parachain.rs b/relays/bin-substrate/src/cli/relay_headers_and_messages/relay_to_parachain.rs index d6a2d628932a24044596277fe4344696b97e5c2b..cc8830920be294fa9e03e68f17bebd16fcded855 100644 --- a/relays/bin-substrate/src/cli/relay_headers_and_messages/relay_to_parachain.rs +++ b/relays/bin-substrate/src/cli/relay_headers_and_messages/relay_to_parachain.rs @@ -36,7 +36,6 @@ use substrate_relay_helper::{ on_demand::{ headers::OnDemandHeadersRelay, parachains::OnDemandParachainsRelay, OnDemandRelay, }, - TaggedAccount, TransactionParams, }; /// A base relay between standalone (relay) chain and a parachain from another consensus system. @@ -54,17 +53,6 @@ pub struct RelayToParachainBridge< Full2WayBridgeCommonParams<::Target, ::Target>, /// Client of the right relay chain. pub right_relay: DefaultClient<::SourceRelay>, - - /// Override for right_relay->left headers signer. - pub right_headers_to_left_transaction_params: - TransactionParams::Target>>, - /// Override for right->left parachains signer. - pub right_parachains_to_left_transaction_params: - TransactionParams::Target>>, - - /// Override for left->right headers signer. - pub left_headers_to_right_transaction_params: - TransactionParams::Target>>, } macro_rules! declare_relay_to_parachain_bridge_schema { @@ -83,21 +71,12 @@ macro_rules! declare_relay_to_parachain_bridge_schema { // default signer, which is always used to sign messages relay transactions on the left chain #[structopt(flatten)] left_sign: [<$left_chain SigningParams>], - // override for right_relay->left headers signer - #[structopt(flatten)] - right_relay_headers_to_left_sign_override: [<$right_chain HeadersTo $left_chain SigningParams>], - // override for right->left parachains signer - #[structopt(flatten)] - right_parachains_to_left_sign_override: [<$right_chain ParachainsTo $left_chain SigningParams>], #[structopt(flatten)] right: [<$right_parachain ConnectionParams>], // default signer, which is always used to sign messages relay transactions on the right chain #[structopt(flatten)] right_sign: [<$right_parachain SigningParams>], - // override for left->right headers signer - #[structopt(flatten)] - left_headers_to_right_sign_override: [<$left_chain HeadersTo $right_parachain SigningParams>], #[structopt(flatten)] right_relay: [<$right_chain ConnectionParams>], @@ -130,19 +109,6 @@ macro_rules! declare_relay_to_parachain_bridge_schema { }, )?, right_relay: self.right_relay.into_client::().await?, - right_headers_to_left_transaction_params: self - .right_relay_headers_to_left_sign_override - .transaction_params_or::( - &self.left_sign, - )?, - right_parachains_to_left_transaction_params: self - .right_parachains_to_left_sign_override - .transaction_params_or::( - &self.left_sign, - )?, - left_headers_to_right_transaction_params: self - .left_headers_to_right_sign_override - .transaction_params_or::(&self.right_sign)?, }) } } @@ -185,28 +151,13 @@ where Arc>, Arc>, )> { - self.common.left.accounts.push(TaggedAccount::Headers { - id: self.right_headers_to_left_transaction_params.signer.public().into(), - bridged_chain: RightRelay::NAME.to_string(), - }); - self.common.left.accounts.push(TaggedAccount::Parachains { - id: self.right_parachains_to_left_transaction_params.signer.public().into(), - bridged_chain: RightRelay::NAME.to_string(), - }); - self.common.right.accounts.push(TaggedAccount::Headers { - id: self.left_headers_to_right_transaction_params.signer.public().into(), - bridged_chain: Left::NAME.to_string(), - }); - ::Finality::start_relay_guards( &self.common.right.client, - &self.left_headers_to_right_transaction_params, self.common.right.client.can_start_version_guard(), ) .await?; ::RelayFinality::start_relay_guards( &self.common.left.client, - &self.right_headers_to_left_transaction_params, self.common.left.client.can_start_version_guard(), ) .await?; @@ -215,7 +166,7 @@ where OnDemandHeadersRelay::<::Finality, _, _>::new( self.common.left.client.clone(), self.common.right.client.clone(), - self.left_headers_to_right_transaction_params.clone(), + self.common.right.tx_params.clone(), self.common.shared.only_mandatory_headers, None, ); @@ -226,7 +177,7 @@ where >::new( self.right_relay.clone(), self.common.left.client.clone(), - self.right_headers_to_left_transaction_params.clone(), + self.common.left.tx_params.clone(), self.common.shared.only_mandatory_headers, Some(self.common.metrics_params.clone()), ); @@ -237,7 +188,7 @@ where >::new( self.right_relay.clone(), self.common.left.client.clone(), - self.right_parachains_to_left_transaction_params.clone(), + self.common.left.tx_params.clone(), Arc::new(right_relay_to_left_on_demand_headers), ); diff --git a/relays/bin-substrate/src/cli/relay_headers_and_messages/relay_to_relay.rs b/relays/bin-substrate/src/cli/relay_headers_and_messages/relay_to_relay.rs index 3cacaaaf786f3501387bad0be3b84d1cc3083ec6..54ef98e7fe5acb777356944be8ff959830a8a6ea 100644 --- a/relays/bin-substrate/src/cli/relay_headers_and_messages/relay_to_relay.rs +++ b/relays/bin-substrate/src/cli/relay_headers_and_messages/relay_to_relay.rs @@ -14,6 +14,10 @@ // You should have received a copy of the GNU General Public License // along with Parity Bridges Common. If not, see . +// we don't have any relay/standalone <> relay/standalone chain bridges, but we may need it in a +// future +#![allow(unused_macros)] + use async_trait::async_trait; use std::sync::Arc; @@ -27,7 +31,6 @@ use sp_core::Pair; use substrate_relay_helper::{ finality::SubstrateFinalitySyncPipeline, on_demand::{headers::OnDemandHeadersRelay, OnDemandRelay}, - TaggedAccount, TransactionParams, }; /// A base relay between two standalone (relay) chains. @@ -40,12 +43,6 @@ pub struct RelayToRelayBridge< /// Parameters that are shared by all bridge types. pub common: Full2WayBridgeCommonParams<::Target, ::Target>, - /// Override for right->left headers signer. - pub right_to_left_transaction_params: - TransactionParams::Target>>, - /// Override for left->right headers signer. - pub left_to_right_transaction_params: - TransactionParams::Target>>, } macro_rules! declare_relay_to_relay_bridge_schema { @@ -62,18 +59,12 @@ macro_rules! declare_relay_to_relay_bridge_schema { // default signer, which is always used to sign messages relay transactions on the left chain #[structopt(flatten)] left_sign: [<$left_chain SigningParams>], - // override for right->left headers signer - #[structopt(flatten)] - right_headers_to_left_sign_override: [<$right_chain HeadersTo $left_chain SigningParams>], #[structopt(flatten)] right: [<$right_chain ConnectionParams>], #[structopt(flatten)] // default signer, which is always used to sign messages relay transactions on the right chain right_sign: [<$right_chain SigningParams>], - // override for left->right headers signer - #[structopt(flatten)] - left_headers_to_right_sign_override: [<$left_chain HeadersTo $right_chain SigningParams>], } impl [<$left_chain $right_chain HeadersAndMessages>] { @@ -99,12 +90,8 @@ macro_rules! declare_relay_to_relay_bridge_schema { accounts: vec![], }, )?, - right_to_left_transaction_params: self - .right_headers_to_left_sign_override - .transaction_params_or::(&self.left_sign)?, - left_to_right_transaction_params: self - .left_headers_to_right_sign_override - .transaction_params_or::(&self.right_sign)?, + right_to_left_transaction_params: self.left_sign.transaction_params::(), + left_to_right_transaction_params: self.right_sign.transaction_params::(), }) } } @@ -145,24 +132,13 @@ where Arc>, Arc>, )> { - self.common.right.accounts.push(TaggedAccount::Headers { - id: self.left_to_right_transaction_params.signer.public().into(), - bridged_chain: Self::Left::NAME.to_string(), - }); - self.common.left.accounts.push(TaggedAccount::Headers { - id: self.right_to_left_transaction_params.signer.public().into(), - bridged_chain: Self::Right::NAME.to_string(), - }); - ::Finality::start_relay_guards( &self.common.right.client, - &self.left_to_right_transaction_params, self.common.right.client.can_start_version_guard(), ) .await?; ::Finality::start_relay_guards( &self.common.left.client, - &self.right_to_left_transaction_params, self.common.left.client.can_start_version_guard(), ) .await?; @@ -171,7 +147,7 @@ where OnDemandHeadersRelay::<::Finality, _, _>::new( self.common.left.client.clone(), self.common.right.client.clone(), - self.left_to_right_transaction_params.clone(), + self.common.right.tx_params.clone(), self.common.shared.only_mandatory_headers, None, ); @@ -179,7 +155,7 @@ where OnDemandHeadersRelay::<::Finality, _, _>::new( self.common.right.client.clone(), self.common.left.client.clone(), - self.right_to_left_transaction_params.clone(), + self.common.left.tx_params.clone(), self.common.shared.only_mandatory_headers, None, ); diff --git a/relays/bin-substrate/src/cli/relay_messages.rs b/relays/bin-substrate/src/cli/relay_messages.rs index b96ca8278de651354d56a3b558d0486532ce4edc..890c96c26a83fd5b705f10fc0be7061dbd20e9a1 100644 --- a/relays/bin-substrate/src/cli/relay_messages.rs +++ b/relays/bin-substrate/src/cli/relay_messages.rs @@ -28,17 +28,13 @@ use crate::bridges::{ bridge_hub_polkadot_messages_to_polkadot_bulletin::BridgeHubPolkadotToPolkadotBulletinMessagesCliBridge, polkadot_bulletin_messages_to_bridge_hub_polkadot::PolkadotBulletinToBridgeHubPolkadotMessagesCliBridge, }, - rialto_millau::{ - millau_headers_to_rialto::MillauToRialtoCliBridge, - rialto_headers_to_millau::RialtoToMillauCliBridge, + rococo_bulletin::{ + bridge_hub_rococo_messages_to_rococo_bulletin::BridgeHubRococoToRococoBulletinMessagesCliBridge, + rococo_bulletin_messages_to_bridge_hub_rococo::RococoBulletinToBridgeHubRococoMessagesCliBridge, }, - rialto_parachain_millau::{ - millau_headers_to_rialto_parachain::MillauToRialtoParachainCliBridge, - rialto_parachains_to_millau::RialtoParachainToMillauCliBridge, - }, - rococo_wococo::{ - bridge_hub_rococo_messages_to_bridge_hub_wococo::BridgeHubRococoToBridgeHubWococoMessagesCliBridge, - bridge_hub_wococo_messages_to_bridge_hub_rococo::BridgeHubWococoToBridgeHubRococoMessagesCliBridge, + rococo_westend::{ + bridge_hub_rococo_messages_to_bridge_hub_westend::BridgeHubRococoToBridgeHubWestendMessagesCliBridge, + bridge_hub_westend_messages_to_bridge_hub_rococo::BridgeHubWestendToBridgeHubRococoMessagesCliBridge, }, }; use relay_substrate_client::{AccountIdOf, AccountKeyPairOf, BalanceOf, ChainWithTransactions}; @@ -105,31 +101,23 @@ where } } -impl MessagesRelayer for MillauToRialtoCliBridge {} -impl MessagesRelayer for RialtoToMillauCliBridge {} -impl MessagesRelayer for MillauToRialtoParachainCliBridge {} -impl MessagesRelayer for RialtoParachainToMillauCliBridge {} -impl MessagesRelayer for BridgeHubRococoToBridgeHubWococoMessagesCliBridge {} -impl MessagesRelayer for BridgeHubWococoToBridgeHubRococoMessagesCliBridge {} +impl MessagesRelayer for BridgeHubRococoToBridgeHubWestendMessagesCliBridge {} +impl MessagesRelayer for BridgeHubWestendToBridgeHubRococoMessagesCliBridge {} impl MessagesRelayer for BridgeHubKusamaToBridgeHubPolkadotMessagesCliBridge {} impl MessagesRelayer for BridgeHubPolkadotToBridgeHubKusamaMessagesCliBridge {} impl MessagesRelayer for PolkadotBulletinToBridgeHubPolkadotMessagesCliBridge {} impl MessagesRelayer for BridgeHubPolkadotToPolkadotBulletinMessagesCliBridge {} +impl MessagesRelayer for RococoBulletinToBridgeHubRococoMessagesCliBridge {} +impl MessagesRelayer for BridgeHubRococoToRococoBulletinMessagesCliBridge {} impl RelayMessages { /// Run the command. pub async fn run(self) -> anyhow::Result<()> { match self.bridge { - FullBridge::MillauToRialto => MillauToRialtoCliBridge::relay_messages(self), - FullBridge::RialtoToMillau => RialtoToMillauCliBridge::relay_messages(self), - FullBridge::MillauToRialtoParachain => - MillauToRialtoParachainCliBridge::relay_messages(self), - FullBridge::RialtoParachainToMillau => - RialtoParachainToMillauCliBridge::relay_messages(self), - FullBridge::BridgeHubRococoToBridgeHubWococo => - BridgeHubRococoToBridgeHubWococoMessagesCliBridge::relay_messages(self), - FullBridge::BridgeHubWococoToBridgeHubRococo => - BridgeHubWococoToBridgeHubRococoMessagesCliBridge::relay_messages(self), + FullBridge::BridgeHubRococoToBridgeHubWestend => + BridgeHubRococoToBridgeHubWestendMessagesCliBridge::relay_messages(self), + FullBridge::BridgeHubWestendToBridgeHubRococo => + BridgeHubWestendToBridgeHubRococoMessagesCliBridge::relay_messages(self), FullBridge::BridgeHubKusamaToBridgeHubPolkadot => BridgeHubKusamaToBridgeHubPolkadotMessagesCliBridge::relay_messages(self), FullBridge::BridgeHubPolkadotToBridgeHubKusama => @@ -138,6 +126,10 @@ impl RelayMessages { PolkadotBulletinToBridgeHubPolkadotMessagesCliBridge::relay_messages(self), FullBridge::BridgeHubPolkadotToPolkadotBulletin => BridgeHubPolkadotToPolkadotBulletinMessagesCliBridge::relay_messages(self), + FullBridge::RococoBulletinToBridgeHubRococo => + RococoBulletinToBridgeHubRococoMessagesCliBridge::relay_messages(self), + FullBridge::BridgeHubRococoToRococoBulletin => + BridgeHubRococoToRococoBulletinMessagesCliBridge::relay_messages(self), } .await } diff --git a/relays/bin-substrate/src/cli/relay_parachains.rs b/relays/bin-substrate/src/cli/relay_parachains.rs index 6e8b94bad05647c1062cde7b9d148ddc4773eef0..0b3b4754f431cfa828760636fbabcf764eeda9d1 100644 --- a/relays/bin-substrate/src/cli/relay_parachains.rs +++ b/relays/bin-substrate/src/cli/relay_parachains.rs @@ -20,12 +20,11 @@ use crate::bridges::{ polkadot_parachains_to_bridge_hub_kusama::BridgeHubPolkadotToBridgeHubKusamaCliBridge, }, polkadot_bulletin::polkadot_parachains_to_polkadot_bulletin::PolkadotToPolkadotBulletinCliBridge, - rialto_parachain_millau::rialto_parachains_to_millau::RialtoParachainToMillauCliBridge, - rococo_wococo::{ - rococo_parachains_to_bridge_hub_wococo::BridgeHubRococoToBridgeHubWococoCliBridge, - wococo_parachains_to_bridge_hub_rococo::BridgeHubWococoToBridgeHubRococoCliBridge, + rococo_bulletin::rococo_parachains_to_rococo_bulletin::RococoToRococoBulletinCliBridge, + rococo_westend::{ + rococo_parachains_to_bridge_hub_westend::BridgeHubRococoToBridgeHubWestendCliBridge, + westend_parachains_to_bridge_hub_rococo::BridgeHubWestendToBridgeHubRococoCliBridge, }, - westend_millau::westend_parachains_to_millau::AssetHubWestendToMillauCliBridge, }; use async_std::sync::Mutex; use async_trait::async_trait; @@ -34,7 +33,7 @@ use relay_substrate_client::Parachain; use relay_utils::metrics::{GlobalMetrics, StandaloneMetric}; use std::sync::Arc; use structopt::StructOpt; -use strum::{EnumString, EnumVariantNames, VariantNames}; +use strum::{EnumString, VariantNames}; use substrate_relay_helper::{ parachains::{source::ParachainsSource, target::ParachainsTarget, ParachainsPipelineAdapter}, TransactionParams, @@ -63,16 +62,15 @@ pub struct RelayParachains { } /// Parachain heads relay bridge. -#[derive(Debug, EnumString, EnumVariantNames)] +#[derive(Debug, EnumString, VariantNames)] #[strum(serialize_all = "kebab_case")] pub enum RelayParachainsBridge { - RialtoToMillau, - WestendToMillau, - RococoToBridgeHubWococo, - WococoToBridgeHubRococo, KusamaToBridgeHubPolkadot, PolkadotToBridgeHubKusama, PolkadotToPolkadotBulletin, + RococoToRococoBulletin, + RococoToBridgeHubWestend, + WestendToBridgeHubRococo, } #[async_trait] @@ -116,32 +114,29 @@ where } } -impl ParachainsRelayer for RialtoParachainToMillauCliBridge {} -impl ParachainsRelayer for AssetHubWestendToMillauCliBridge {} -impl ParachainsRelayer for BridgeHubRococoToBridgeHubWococoCliBridge {} -impl ParachainsRelayer for BridgeHubWococoToBridgeHubRococoCliBridge {} +impl ParachainsRelayer for BridgeHubRococoToBridgeHubWestendCliBridge {} +impl ParachainsRelayer for BridgeHubWestendToBridgeHubRococoCliBridge {} impl ParachainsRelayer for BridgeHubKusamaToBridgeHubPolkadotCliBridge {} impl ParachainsRelayer for BridgeHubPolkadotToBridgeHubKusamaCliBridge {} impl ParachainsRelayer for PolkadotToPolkadotBulletinCliBridge {} +impl ParachainsRelayer for RococoToRococoBulletinCliBridge {} impl RelayParachains { /// Run the command. pub async fn run(self) -> anyhow::Result<()> { match self.bridge { - RelayParachainsBridge::RialtoToMillau => - RialtoParachainToMillauCliBridge::relay_parachains(self), - RelayParachainsBridge::WestendToMillau => - AssetHubWestendToMillauCliBridge::relay_parachains(self), - RelayParachainsBridge::RococoToBridgeHubWococo => - BridgeHubRococoToBridgeHubWococoCliBridge::relay_parachains(self), - RelayParachainsBridge::WococoToBridgeHubRococo => - BridgeHubWococoToBridgeHubRococoCliBridge::relay_parachains(self), + RelayParachainsBridge::RococoToBridgeHubWestend => + BridgeHubRococoToBridgeHubWestendCliBridge::relay_parachains(self), + RelayParachainsBridge::WestendToBridgeHubRococo => + BridgeHubWestendToBridgeHubRococoCliBridge::relay_parachains(self), RelayParachainsBridge::KusamaToBridgeHubPolkadot => BridgeHubKusamaToBridgeHubPolkadotCliBridge::relay_parachains(self), RelayParachainsBridge::PolkadotToBridgeHubKusama => BridgeHubPolkadotToBridgeHubKusamaCliBridge::relay_parachains(self), RelayParachainsBridge::PolkadotToPolkadotBulletin => PolkadotToPolkadotBulletinCliBridge::relay_parachains(self), + RelayParachainsBridge::RococoToRococoBulletin => + RococoToRococoBulletinCliBridge::relay_parachains(self), } .await } diff --git a/relays/bin-substrate/src/cli/resubmit_transactions.rs b/relays/bin-substrate/src/cli/resubmit_transactions.rs deleted file mode 100644 index 44019a1734ae4bfa5bcd33bc279c55d166680ecc..0000000000000000000000000000000000000000 --- a/relays/bin-substrate/src/cli/resubmit_transactions.rs +++ /dev/null @@ -1,560 +0,0 @@ -// 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 . - -use crate::cli::{chain_schema::*, Balance}; - -use bp_runtime::HeaderIdProvider; -use codec::{Decode, Encode}; -use num_traits::{One, Zero}; -use relay_substrate_client::{ - AccountKeyPairOf, BlockWithJustification, Chain, ChainWithTransactions, Client, - Error as SubstrateError, HeaderIdOf, HeaderOf, SignParam, -}; -use relay_utils::FailedClient; -use sp_core::Bytes; -use sp_runtime::{ - traits::{Hash, Header as HeaderT}, - transaction_validity::TransactionPriority, -}; -use structopt::StructOpt; -use strum::{EnumString, EnumVariantNames, VariantNames}; -use substrate_relay_helper::TransactionParams; - -/// Start resubmit transactions process. -#[derive(StructOpt)] -pub struct ResubmitTransactions { - /// A bridge instance to relay headers for. - #[structopt(possible_values = RelayChain::VARIANTS, case_insensitive = true)] - chain: RelayChain, - #[structopt(flatten)] - target: TargetConnectionParams, - #[structopt(flatten)] - target_sign: TargetSigningParams, - /// Number of blocks we see before considering queued transaction as stalled. - #[structopt(long, default_value = "5")] - stalled_blocks: u32, - /// Tip limit. We'll never submit transaction with larger tip. - #[structopt(long)] - tip_limit: Balance, - /// Tip increase step. We'll be checking updated transaction priority by increasing its tip by - /// this step. - #[structopt(long)] - tip_step: Balance, - /// Priority selection strategy. - #[structopt(subcommand)] - strategy: PrioritySelectionStrategy, -} - -/// Chain, which transactions we're going to track && resubmit. -#[derive(Debug, EnumString, EnumVariantNames)] -#[strum(serialize_all = "kebab_case")] -pub enum RelayChain { - Millau, -} - -/// Strategy to use for priority selection. -#[derive(StructOpt, Debug, PartialEq, Eq, Clone, Copy)] -pub enum PrioritySelectionStrategy { - /// Strategy selects tip that changes transaction priority to be better than priority of - /// the first transaction of previous block. - /// - /// It only makes sense to use this strategy for Millau transactions. Millau has transactions - /// that are close to block limits, so if there are any other queued transactions, 'large' - /// transaction won't fit the block && will be postponed. To avoid this, we change its priority - /// to some large value, making it best transaction => it'll be 'mined' first. - MakeItBestTransaction, - /// Strategy selects tip that changes transaction priority to be better than priority of - /// selected queued transaction. - /// - /// When we first see stalled transaction, we make it better than worst 1/4 of queued - /// transactions. If it is still stalled, we'll make it better than 1/3 of queued transactions, - /// ... - MakeItBetterThanQueuedTransaction, -} - -macro_rules! select_bridge { - ($bridge: expr, $generic: tt) => { - match $bridge { - RelayChain::Millau => { - type Target = relay_millau_client::Millau; - - $generic - }, - } - }; -} - -impl ResubmitTransactions { - /// Run the command. - pub async fn run(self) -> anyhow::Result<()> { - select_bridge!(self.chain, { - let relay_loop_name = format!("ResubmitTransactions{}", Target::NAME); - let client = self.target.into_client::().await?; - let transaction_params = TransactionParams { - signer: self.target_sign.to_keypair::()?, - mortality: self.target_sign.target_transactions_mortality, - }; - - relay_utils::relay_loop((), client) - .run(relay_loop_name, move |_, client, _| { - run_until_connection_lost( - client, - transaction_params.clone(), - Context { - strategy: self.strategy, - best_header: HeaderOf::::new( - Default::default(), - Default::default(), - Default::default(), - Default::default(), - Default::default(), - ), - transaction: None, - resubmitted: 0, - stalled_for: Zero::zero(), - stalled_for_limit: self.stalled_blocks as _, - tip_step: self.tip_step.cast() as _, - tip_limit: self.tip_limit.cast() as _, - }, - ) - }) - .await - .map_err(Into::into) - }) - } -} - -impl PrioritySelectionStrategy { - /// Select target priority. - async fn select_target_priority( - &self, - client: &impl Client, - context: &Context, - ) -> Result, SubstrateError> { - match *self { - PrioritySelectionStrategy::MakeItBestTransaction => - read_previous_block_best_priority(client, context).await, - PrioritySelectionStrategy::MakeItBetterThanQueuedTransaction => - select_priority_from_queue(client, context).await, - } - } -} - -#[derive(Debug)] -struct Context { - /// Priority selection strategy. - strategy: PrioritySelectionStrategy, - /// Best known block header. - best_header: C::Header, - /// Hash of the (potentially) stalled transaction. - transaction: Option, - /// How many times we have resubmitted this `transaction`? - resubmitted: u32, - /// This transaction is in pool for `stalled_for` wakeup intervals. - stalled_for: C::BlockNumber, - /// When `stalled_for` reaching this limit, transaction is considered stalled. - stalled_for_limit: C::BlockNumber, - /// Tip step interval. - tip_step: C::Balance, - /// Maximal tip. - tip_limit: C::Balance, -} - -impl Context { - /// Return true if transaction has stalled. - fn is_stalled(&self) -> bool { - self.stalled_for >= self.stalled_for_limit - } - - /// Notice resubmitted transaction. - fn notice_resubmitted_transaction(mut self, transaction: C::Hash) -> Self { - self.transaction = Some(transaction); - self.stalled_for = Zero::zero(); - self.resubmitted += 1; - self - } - - /// Notice transaction from the transaction pool. - fn notice_transaction(mut self, transaction: C::Hash) -> Self { - if self.transaction == Some(transaction) { - self.stalled_for += One::one(); - } else { - self.transaction = Some(transaction); - self.stalled_for = One::one(); - self.resubmitted = 0; - } - self - } -} - -/// Run resubmit transactions loop. -async fn run_until_connection_lost( - client: impl Client, - transaction_params: TransactionParams>, - mut context: Context, -) -> Result<(), FailedClient> { - loop { - async_std::task::sleep(C::AVERAGE_BLOCK_INTERVAL).await; - - let result = run_loop_iteration(client.clone(), transaction_params.clone(), context).await; - context = match result { - Ok(context) => context, - Err(error) => { - log::error!( - target: "bridge", - "Resubmit {} transactions loop has failed with error: {:?}", - C::NAME, - error, - ); - return Err(FailedClient::Target) - }, - }; - } -} - -/// Run single loop iteration. -async fn run_loop_iteration( - client: impl Client, - transaction_params: TransactionParams>, - mut context: Context, -) -> Result, SubstrateError> { - // correct best header is required for all other actions - context.best_header = client.best_header().await?; - - // check if there's queued transaction, signed by given author - let original_transaction = - match lookup_signer_transaction(&client, &transaction_params.signer).await? { - Some(original_transaction) => original_transaction, - None => { - log::trace!(target: "bridge", "No {} transactions from required signer in the txpool", C::NAME); - return Ok(context) - }, - }; - let original_transaction_hash = C::Hasher::hash(&original_transaction.encode()); - let context = context.notice_transaction(original_transaction_hash); - - // if transaction hasn't been mined for `stalled_blocks`, we'll need to resubmit it - if !context.is_stalled() { - log::trace!( - target: "bridge", - "{} transaction {:?} is not yet stalled ({:?}/{:?})", - C::NAME, - context.transaction, - context.stalled_for, - context.stalled_for_limit, - ); - return Ok(context) - } - - // select priority for updated transaction - let target_priority = match context.strategy.select_target_priority(&client, &context).await? { - Some(target_priority) => target_priority, - None => { - log::trace!(target: "bridge", "Failed to select target priority"); - return Ok(context) - }, - }; - - // update transaction tip - let (is_updated, updated_transaction) = update_transaction_tip( - &client, - &transaction_params, - context.best_header.id(), - original_transaction, - context.tip_step, - context.tip_limit, - target_priority, - ) - .await?; - - if !is_updated { - log::trace!(target: "bridge", "{} transaction tip can not be updated. Reached limit?", C::NAME); - return Ok(context) - } - - let updated_transaction = updated_transaction.encode(); - let updated_transaction_hash = C::Hasher::hash(&updated_transaction); - client.submit_unsigned_extrinsic(Bytes(updated_transaction)).await?; - - log::info!( - target: "bridge", - "Replaced {} transaction {} with {} in txpool", - C::NAME, - original_transaction_hash, - updated_transaction_hash, - ); - - Ok(context.notice_resubmitted_transaction(updated_transaction_hash)) -} - -/// Search transaction pool for transaction, signed by given key pair. -async fn lookup_signer_transaction( - client: &impl Client, - key_pair: &AccountKeyPairOf, -) -> Result, SubstrateError> { - let pending_transactions = client.pending_extrinsics().await?; - for pending_transaction in pending_transactions { - let pending_transaction = C::SignedTransaction::decode(&mut &pending_transaction.0[..]) - .map_err(SubstrateError::ResponseParseFailed)?; - if !C::is_signed_by(key_pair, &pending_transaction) { - continue - } - - return Ok(Some(pending_transaction)) - } - - Ok(None) -} - -/// Read priority of best signed transaction of previous block. -async fn read_previous_block_best_priority( - client: &impl Client, - context: &Context, -) -> Result, SubstrateError> { - let best_block = client.block_by_hash(context.best_header.hash()).await?; - let best_transaction = best_block - .extrinsics() - .iter() - .filter_map(|xt| C::SignedTransaction::decode(&mut &xt[..]).ok()) - .find(|xt| C::is_signed(xt)); - match best_transaction { - Some(best_transaction) => Ok(Some( - client - .validate_transaction(*context.best_header.parent_hash(), best_transaction) - .await?? - .priority, - )), - None => Ok(None), - } -} - -/// Select priority of some queued transaction. -async fn select_priority_from_queue( - client: &impl Client, - context: &Context, -) -> Result, SubstrateError> { - // select transaction from the queue - let queued_transactions = client.pending_extrinsics().await?; - let selected_transaction = match select_transaction_from_queue(queued_transactions, context) { - Some(selected_transaction) => selected_transaction, - None => return Ok(None), - }; - - let selected_transaction = C::SignedTransaction::decode(&mut &selected_transaction[..]) - .map_err(SubstrateError::ResponseParseFailed)?; - let target_priority = client - .validate_transaction(context.best_header.hash(), selected_transaction) - .await?? - .priority; - Ok(Some(target_priority)) -} - -/// Select transaction with target priority from the vec of queued transactions. -fn select_transaction_from_queue( - mut queued_transactions: Vec, - context: &Context, -) -> Option { - if queued_transactions.is_empty() { - return None - } - - // the more times we resubmit transaction (`context.resubmitted`), the closer we move - // to the front of the transaction queue - let total_transactions = queued_transactions.len(); - let resubmitted_factor = context.resubmitted; - let divisor = - 1usize.saturating_add(1usize.checked_shl(resubmitted_factor).unwrap_or(usize::MAX)); - let transactions_to_skip = total_transactions / divisor; - - Some( - queued_transactions - .swap_remove(std::cmp::min(total_transactions - 1, transactions_to_skip)), - ) -} - -/// Try to find appropriate tip for transaction so that its priority is larger than given. -async fn update_transaction_tip( - client: &impl Client, - transaction_params: &TransactionParams>, - at_block: HeaderIdOf, - tx: C::SignedTransaction, - tip_step: C::Balance, - tip_limit: C::Balance, - target_priority: TransactionPriority, -) -> Result<(bool, C::SignedTransaction), SubstrateError> { - let stx = format!("{tx:?}"); - let mut current_priority = client.validate_transaction(at_block.1, tx.clone()).await??.priority; - let mut unsigned_tx = C::parse_transaction(tx).ok_or_else(|| { - SubstrateError::Custom(format!("Failed to parse {} transaction {stx}", C::NAME,)) - })?; - let old_tip = unsigned_tx.tip; - - let runtime_version = client.simple_runtime_version().await?; - while current_priority < target_priority { - let next_tip = unsigned_tx.tip + tip_step; - if next_tip > tip_limit { - break - } - - log::trace!( - target: "bridge", - "{} transaction priority with tip={:?}: {}. Target priority: {}", - C::NAME, - unsigned_tx.tip, - current_priority, - target_priority, - ); - - unsigned_tx.tip = next_tip; - current_priority = client - .validate_transaction( - at_block.1, - C::sign_transaction( - SignParam { - spec_version: runtime_version.spec_version, - transaction_version: runtime_version.transaction_version, - genesis_hash: client.genesis_hash(), - signer: transaction_params.signer.clone(), - }, - unsigned_tx.clone(), - )?, - ) - .await?? - .priority; - } - - log::debug!( - target: "bridge", - "{} transaction tip has changed from {:?} to {:?}", - C::NAME, - old_tip, - unsigned_tx.tip, - ); - - Ok(( - old_tip != unsigned_tx.tip, - C::sign_transaction( - SignParam { - spec_version: runtime_version.spec_version, - transaction_version: runtime_version.transaction_version, - genesis_hash: client.genesis_hash(), - signer: transaction_params.signer.clone(), - }, - unsigned_tx.era(relay_substrate_client::TransactionEra::new( - at_block, - transaction_params.mortality, - )), - )?, - )) -} - -#[cfg(test)] -mod tests { - use super::*; - use bp_rialto::Hash; - use relay_rialto_client::Rialto; - - fn context() -> Context { - Context { - strategy: PrioritySelectionStrategy::MakeItBestTransaction, - best_header: HeaderOf::::new( - Default::default(), - Default::default(), - Default::default(), - Default::default(), - Default::default(), - ), - transaction: None, - resubmitted: 0, - stalled_for: Zero::zero(), - stalled_for_limit: 3, - tip_step: 100, - tip_limit: 1000, - } - } - - #[test] - fn context_works() { - let mut context = context(); - - // when transaction is noticed 2/3 times, it isn't stalled - context = context.notice_transaction(Default::default()); - assert!(!context.is_stalled()); - assert_eq!(context.stalled_for, 1); - assert_eq!(context.resubmitted, 0); - context = context.notice_transaction(Default::default()); - assert!(!context.is_stalled()); - assert_eq!(context.stalled_for, 2); - assert_eq!(context.resubmitted, 0); - - // when transaction is noticed for 3rd time in a row, it is considered stalled - context = context.notice_transaction(Default::default()); - assert!(context.is_stalled()); - assert_eq!(context.stalled_for, 3); - assert_eq!(context.resubmitted, 0); - - // and after we resubmit it, we forget previous transaction - context = context.notice_resubmitted_transaction(Hash::from([1; 32])); - assert_eq!(context.transaction, Some(Hash::from([1; 32]))); - assert_eq!(context.resubmitted, 1); - assert_eq!(context.stalled_for, 0); - } - - #[test] - fn select_transaction_from_queue_works_with_empty_queue() { - assert_eq!(select_transaction_from_queue(vec![], &context()), None); - } - - #[test] - fn select_transaction_from_queue_works() { - let mut context = context(); - let queued_transactions = vec![ - Bytes(vec![1]), - Bytes(vec![2]), - Bytes(vec![3]), - Bytes(vec![4]), - Bytes(vec![5]), - Bytes(vec![6]), - ]; - - // when we resubmit tx for the first time, 1/2 of queue is skipped - assert_eq!( - select_transaction_from_queue(queued_transactions.clone(), &context), - Some(Bytes(vec![4])), - ); - - // when we resubmit tx for the second time, 1/3 of queue is skipped - context = context.notice_resubmitted_transaction(Hash::from([1; 32])); - assert_eq!( - select_transaction_from_queue(queued_transactions.clone(), &context), - Some(Bytes(vec![3])), - ); - - // when we resubmit tx for the third time, 1/5 of queue is skipped - context = context.notice_resubmitted_transaction(Hash::from([2; 32])); - assert_eq!( - select_transaction_from_queue(queued_transactions.clone(), &context), - Some(Bytes(vec![2])), - ); - - // when we resubmit tx for the second time, 1/9 of queue is skipped - context = context.notice_resubmitted_transaction(Hash::from([3; 32])); - assert_eq!( - select_transaction_from_queue(queued_transactions, &context), - Some(Bytes(vec![1])), - ); - } -} diff --git a/relays/bin-substrate/src/cli/send_message.rs b/relays/bin-substrate/src/cli/send_message.rs deleted file mode 100644 index 27c337ca0f1a40f9f2f307e89e430336a709c300..0000000000000000000000000000000000000000 --- a/relays/bin-substrate/src/cli/send_message.rs +++ /dev/null @@ -1,178 +0,0 @@ -// 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 . - -use crate::{ - bridges::{ - rialto_millau::{ - millau_headers_to_rialto::MillauToRialtoCliBridge, - rialto_headers_to_millau::RialtoToMillauCliBridge, - }, - rialto_parachain_millau::{ - millau_headers_to_rialto_parachain::MillauToRialtoParachainCliBridge, - rialto_parachains_to_millau::RialtoParachainToMillauCliBridge, - }, - }, - cli::{ - bridge::{FullBridge, MessagesCliBridge}, - chain_schema::*, - encode_message::{self, CliEncodeMessage, RawMessage}, - CliChain, - }, -}; -use async_trait::async_trait; -use codec::{Decode, Encode}; -use relay_substrate_client::{ - AccountIdOf, AccountKeyPairOf, Chain, ChainBase, ChainWithTransactions, Client, - UnsignedTransaction, -}; -use sp_core::Pair; -use sp_runtime::AccountId32; -use std::fmt::Display; -use structopt::StructOpt; -use strum::VariantNames; - -/// Send bridge message. -#[derive(StructOpt)] -pub struct SendMessage { - /// A bridge instance to encode call for. - #[structopt(possible_values = FullBridge::VARIANTS, case_insensitive = true)] - bridge: FullBridge, - #[structopt(flatten)] - source: SourceConnectionParams, - #[structopt(flatten)] - source_sign: SourceSigningParams, - /// Message type. - #[structopt(subcommand)] - message: crate::cli::encode_message::Message, -} - -#[async_trait] -trait MessageSender: MessagesCliBridge -where - Self::Source: ChainBase + ChainWithTransactions + CliChain + CliEncodeMessage, - ::Balance: Display + From + Into, - ::Call: Sync, - ::SignedTransaction: Sync, - AccountIdOf: From< as Pair>::Public>, - AccountId32: From< as Pair>::Public>, -{ - async fn send_message(data: SendMessage) -> anyhow::Result<()> { - let payload = encode_message::encode_message::(&data.message)?; - - let source_client = data.source.into_client::().await?; - let source_sign = data.source_sign.to_keypair::()?; - - let payload_len = payload.encoded_size(); - let send_message_call = Self::Source::encode_execute_xcm(decode_xcm(payload)?)?; - - source_client - .submit_signed_extrinsic(&source_sign, move |_, transaction_nonce| { - let unsigned = UnsignedTransaction::new(send_message_call, transaction_nonce); - log::info!( - target: "bridge", - "Sending message to {}. Size: {}", - Self::Target::NAME, - payload_len, - ); - Ok(unsigned) - }) - .await?; - - Ok(()) - } -} - -impl MessageSender for MillauToRialtoCliBridge {} -impl MessageSender for RialtoToMillauCliBridge {} -impl MessageSender for MillauToRialtoParachainCliBridge {} -impl MessageSender for RialtoParachainToMillauCliBridge {} - -impl SendMessage { - /// Run the command. - pub async fn run(self) -> anyhow::Result<()> { - match self.bridge { - FullBridge::MillauToRialto => MillauToRialtoCliBridge::send_message(self), - FullBridge::RialtoToMillau => RialtoToMillauCliBridge::send_message(self), - FullBridge::MillauToRialtoParachain => - MillauToRialtoParachainCliBridge::send_message(self), - FullBridge::RialtoParachainToMillau => - RialtoParachainToMillauCliBridge::send_message(self), - // all our (soon to retire_ testnets are above, so if is fine to use `_` - _ => unimplemented!("Sending message from in {:?} is not supported", self.bridge,), - } - .await - } -} - -/// Decode SCALE encoded raw XCM message. -pub(crate) fn decode_xcm(message: RawMessage) -> anyhow::Result> { - Decode::decode(&mut &message[..]) - .map_err(|e| anyhow::format_err!("Failed to decode XCM program: {:?}", e)) -} - -#[cfg(test)] -mod tests { - use super::*; - use crate::cli::{ExplicitOrMaximal, HexBytes}; - - #[test] - fn send_raw_rialto_to_millau() { - // given - let send_message = SendMessage::from_iter(vec![ - "send-message", - "rialto-to-millau", - "--source-port", - "1234", - "--source-signer", - "//Alice", - "raw", - "dead", - ]); - - // then - assert_eq!(send_message.bridge, FullBridge::RialtoToMillau); - assert_eq!(send_message.source.source_port, 1234); - assert_eq!(send_message.source_sign.source_signer, Some("//Alice".into())); - assert_eq!( - send_message.message, - crate::cli::encode_message::Message::Raw { data: HexBytes(vec![0xDE, 0xAD]) } - ); - } - - #[test] - fn send_sized_rialto_to_millau() { - // given - let send_message = SendMessage::from_iter(vec![ - "send-message", - "rialto-to-millau", - "--source-port", - "1234", - "--source-signer", - "//Alice", - "sized", - "max", - ]); - - // then - assert_eq!(send_message.bridge, FullBridge::RialtoToMillau); - assert_eq!(send_message.source.source_port, 1234); - assert_eq!(send_message.source_sign.source_signer, Some("//Alice".into())); - assert_eq!( - send_message.message, - crate::cli::encode_message::Message::Sized { size: ExplicitOrMaximal::Maximal } - ); - } -} diff --git a/relays/client-bridge-hub-kusama/Cargo.toml b/relays/client-bridge-hub-kusama/Cargo.toml index fb61742330a162c171d7d8728a5a74939de5537a..c0be2b2463f9b0791dcdbf351559ef806b493db2 100644 --- a/relays/client-bridge-hub-kusama/Cargo.toml +++ b/relays/client-bridge-hub-kusama/Cargo.toml @@ -5,6 +5,9 @@ authors = ["Parity Technologies "] edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", features = ["derive"] } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } diff --git a/relays/client-bridge-hub-polkadot/Cargo.toml b/relays/client-bridge-hub-polkadot/Cargo.toml index 5826f1263164bb2020ed0fff157c888e9d722411..88657eb6e2752ad4d9daf5e85e61007aa9d88e77 100644 --- a/relays/client-bridge-hub-polkadot/Cargo.toml +++ b/relays/client-bridge-hub-polkadot/Cargo.toml @@ -5,6 +5,9 @@ authors = ["Parity Technologies "] edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", features = ["derive"] } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } diff --git a/relays/client-bridge-hub-rococo/Cargo.toml b/relays/client-bridge-hub-rococo/Cargo.toml index 15802dc272eed414e36a11f3a6e906c4a4045075..ea59240fd92741b76bce7de4cc9cba2bbd1664a6 100644 --- a/relays/client-bridge-hub-rococo/Cargo.toml +++ b/relays/client-bridge-hub-rococo/Cargo.toml @@ -5,6 +5,9 @@ authors = ["Parity Technologies "] edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", features = ["derive"] } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } @@ -13,12 +16,11 @@ subxt = { version = "0.32.1", default-features = false, features = ["native"] } # Bridge dependencies bp-bridge-hub-rococo = { path = "../../primitives/chain-bridge-hub-rococo" } -bp-bridge-hub-wococo = { path = "../../primitives/chain-bridge-hub-wococo" } bp-header-chain = { path = "../../primitives/header-chain" } bp-messages = { path = "../../primitives/messages" } bp-parachains = { path = "../../primitives/parachains" } bp-polkadot-core = { path = "../../primitives/polkadot-core" } -bp-wococo = { path = "../../primitives/chain-wococo" } +bp-runtime = { path = "../../primitives/runtime" } bridge-runtime-common = { path = "../../bin/runtime-common" } relay-substrate-client = { path = "../client-substrate" } diff --git a/relays/client-bridge-hub-rococo/src/codegen_runtime.rs b/relays/client-bridge-hub-rococo/src/codegen_runtime.rs index b71ed024b56b1c8557c11598aab2931e6082bfc9..fd29e0846006a57eedbd6454641218913a550821 100644 --- a/relays/client-bridge-hub-rococo/src/codegen_runtime.rs +++ b/relays/client-bridge-hub-rococo/src/codegen_runtime.rs @@ -16,17 +16,27 @@ //! Autogenerated runtime API //! THIS FILE WAS AUTOGENERATED USING parity-bridges-common::runtime-codegen -//! EXECUTED COMMAND: target/debug/runtime-codegen --from-node-url -//! wss://rococo-bridge-hub-rpc.polkadot.io:443 +//! EXECUTED COMMAND: target/debug/runtime-codegen --from-wasm-file +//! /home/svyatonik/dev/polkadot-sdk/target/debug/wbuild/bridge-hub-rococo-runtime/ +//! bridge_hub_rococo_runtime.wasm #[allow(dead_code, unused_imports, non_camel_case_types)] #[allow(clippy::all)] +#[allow(rustdoc::broken_intra_doc_links)] pub mod api { - use super::api as root_mod; + #[allow(unused_imports)] + mod root_mod { + pub use super::*; + } pub mod runtime_types { use super::runtime_types; pub mod bounded_collections { use super::runtime_types; + pub mod bounded_btree_set { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BoundedBTreeSet<_0>(pub ::std::vec::Vec<_0>); + } pub mod bounded_vec { use super::runtime_types; #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] @@ -41,6 +51,14 @@ pub mod api { pub mod bp_header_chain { use super::runtime_types; #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct AuthoritySet { + pub authorities: ::std::vec::Vec<( + runtime_types::sp_consensus_grandpa::app::Public, + ::core::primitive::u64, + )>, + pub set_id: ::core::primitive::u64, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum HeaderChainError { #[codec(index = 0)] UnknownHeader, @@ -48,6 +66,11 @@ pub mod api { StorageProof(runtime_types::bp_runtime::storage_proof::Error), } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct HeaderFinalityInfo<_0, _1> { + pub finality_proof: _0, + pub new_verification_context: ::core::option::Option<_1>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct StoredHeaderData<_0, _1> { pub number: _0, pub state_root: _1, @@ -256,26 +279,63 @@ pub mod api { XcmpQueue(runtime_types::cumulus_pallet_xcmp_queue::pallet::Call), #[codec(index = 31)] PolkadotXcm(runtime_types::pallet_xcm::pallet::Call), - #[codec(index = 33)] - DmpQueue(runtime_types::cumulus_pallet_dmp_queue::pallet::Call), #[codec(index = 40)] Utility(runtime_types::pallet_utility::pallet::Call), #[codec(index = 36)] Multisig(runtime_types::pallet_multisig::pallet::Call), - #[codec(index = 41)] - BridgeWococoGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Call), - #[codec(index = 42)] - BridgeWococoParachain(runtime_types::pallet_bridge_parachains::pallet::Call), - #[codec(index = 46)] - BridgeWococoMessages(runtime_types::pallet_bridge_messages::pallet::Call), - #[codec(index = 43)] - BridgeRococoGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Call), - #[codec(index = 44)] - BridgeRococoParachain(runtime_types::pallet_bridge_parachains::pallet::Call), - #[codec(index = 45)] - BridgeRococoMessages(runtime_types::pallet_bridge_messages::pallet::Call), + #[codec(index = 48)] + BridgeWestendGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Call), + #[codec(index = 60)] + BridgePolkadotBulletinGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Call2), + #[codec(index = 49)] + BridgeWestendParachains(runtime_types::pallet_bridge_parachains::pallet::Call), + #[codec(index = 51)] + BridgeWestendMessages(runtime_types::pallet_bridge_messages::pallet::Call), + #[codec(index = 61)] + BridgePolkadotBulletinMessages( + runtime_types::pallet_bridge_messages::pallet::Call2, + ), #[codec(index = 47)] BridgeRelayers(runtime_types::pallet_bridge_relayers::pallet::Call), + #[codec(index = 250)] + MessageQueue(runtime_types::pallet_message_queue::pallet::Call), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum RuntimeError { + #[codec(index = 0)] + System(runtime_types::frame_system::pallet::Error), + #[codec(index = 1)] + ParachainSystem(runtime_types::cumulus_pallet_parachain_system::pallet::Error), + #[codec(index = 10)] + Balances(runtime_types::pallet_balances::pallet::Error), + #[codec(index = 21)] + CollatorSelection(runtime_types::pallet_collator_selection::pallet::Error), + #[codec(index = 22)] + Session(runtime_types::pallet_session::pallet::Error), + #[codec(index = 30)] + XcmpQueue(runtime_types::cumulus_pallet_xcmp_queue::pallet::Error), + #[codec(index = 31)] + PolkadotXcm(runtime_types::pallet_xcm::pallet::Error), + #[codec(index = 40)] + Utility(runtime_types::pallet_utility::pallet::Error), + #[codec(index = 36)] + Multisig(runtime_types::pallet_multisig::pallet::Error), + #[codec(index = 48)] + BridgeWestendGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Error), + #[codec(index = 52)] + BridgePolkadotBulletinGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Error2), + #[codec(index = 49)] + BridgeWestendParachains(runtime_types::pallet_bridge_parachains::pallet::Error), + #[codec(index = 51)] + BridgeWestendMessages(runtime_types::pallet_bridge_messages::pallet::Error), + #[codec(index = 53)] + BridgePolkadotBulletinMessages( + runtime_types::pallet_bridge_messages::pallet::Error2, + ), + #[codec(index = 47)] + BridgeRelayers(runtime_types::pallet_bridge_relayers::pallet::Error), + #[codec(index = 250)] + MessageQueue(runtime_types::pallet_message_queue::pallet::Error), } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum RuntimeEvent { @@ -297,28 +357,30 @@ pub mod api { PolkadotXcm(runtime_types::pallet_xcm::pallet::Event), #[codec(index = 32)] CumulusXcm(runtime_types::cumulus_pallet_xcm::pallet::Event), - #[codec(index = 33)] - DmpQueue(runtime_types::cumulus_pallet_dmp_queue::pallet::Event), #[codec(index = 40)] Utility(runtime_types::pallet_utility::pallet::Event), #[codec(index = 36)] Multisig(runtime_types::pallet_multisig::pallet::Event), - #[codec(index = 41)] - BridgeWococoGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Event), - #[codec(index = 42)] - BridgeWococoParachain(runtime_types::pallet_bridge_parachains::pallet::Event), - #[codec(index = 46)] - BridgeWococoMessages(runtime_types::pallet_bridge_messages::pallet::Event), - #[codec(index = 43)] - BridgeRococoGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Event), - #[codec(index = 44)] - BridgeRococoParachain(runtime_types::pallet_bridge_parachains::pallet::Event), - #[codec(index = 45)] - BridgeRococoMessages(runtime_types::pallet_bridge_messages::pallet::Event), + #[codec(index = 48)] + BridgeWestendGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Event), + #[codec(index = 52)] + BridgePolkadotBulletinGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Event2), + #[codec(index = 49)] + BridgeWestendParachains(runtime_types::pallet_bridge_parachains::pallet::Event), + #[codec(index = 51)] + BridgeWestendMessages(runtime_types::pallet_bridge_messages::pallet::Event), + #[codec(index = 53)] + BridgePolkadotBulletinMessages( + runtime_types::pallet_bridge_messages::pallet::Event2, + ), #[codec(index = 47)] BridgeRelayers(runtime_types::pallet_bridge_relayers::pallet::Event), + #[codec(index = 250)] + MessageQueue(runtime_types::pallet_message_queue::pallet::Event), } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum RuntimeHoldReason {} + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct SessionKeys { pub aura: runtime_types::sp_consensus_aura::sr25519::app_sr25519::Public, } @@ -340,69 +402,11 @@ pub mod api { pub mod refund_relayer_extension { use super::runtime_types; #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct RefundBridgedParachainMessages; - } - } - pub mod cumulus_pallet_dmp_queue { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Call { - #[codec(index = 0)] - service_overweight { - index: ::core::primitive::u64, - weight_limit: ::sp_weights::Weight, - }, - } + pub struct RefundBridgedGrandpaMessages; #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Error { - #[codec(index = 0)] - Unknown, - #[codec(index = 1)] - OverLimit, - } + pub struct RefundBridgedParachainMessages; #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Event { - #[codec(index = 0)] - InvalidFormat { message_id: [::core::primitive::u8; 32usize] }, - #[codec(index = 1)] - UnsupportedVersion { message_id: [::core::primitive::u8; 32usize] }, - #[codec(index = 2)] - ExecutedDownward { - message_id: [::core::primitive::u8; 32usize], - outcome: runtime_types::xcm::v3::traits::Outcome, - }, - #[codec(index = 3)] - WeightExhausted { - message_id: [::core::primitive::u8; 32usize], - remaining_weight: ::sp_weights::Weight, - required_weight: ::sp_weights::Weight, - }, - #[codec(index = 4)] - OverweightEnqueued { - message_id: [::core::primitive::u8; 32usize], - overweight_index: ::core::primitive::u64, - required_weight: ::sp_weights::Weight, - }, - #[codec(index = 5)] - OverweightServiced { - overweight_index: ::core::primitive::u64, - weight_used: ::sp_weights::Weight, - }, - #[codec(index = 6)] - MaxMessagesExhausted { message_id: [::core::primitive::u8; 32usize] }, - } - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct ConfigData { - pub max_individual: ::sp_weights::Weight, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct PageIndexData { - pub begin_used: ::core::primitive::u32, - pub end_used: ::core::primitive::u32, - pub overweight_count: ::core::primitive::u64, + pub struct RefundSignedExtensionAdapter<_0>(pub _0); } } pub mod cumulus_pallet_parachain_system { @@ -457,13 +461,27 @@ pub mod api { pub mod relay_state_snapshot { use super::runtime_types; #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct MessagingStateSnapshot { pub dmq_mqc_head : :: subxt :: utils :: H256 , pub relay_dispatch_queue_size : runtime_types :: cumulus_pallet_parachain_system :: relay_state_snapshot :: RelayDispachQueueSize , pub ingress_channels : :: std :: vec :: Vec < (runtime_types :: polkadot_parachain :: primitives :: Id , runtime_types :: polkadot_primitives :: v4 :: AbridgedHrmpChannel ,) > , pub egress_channels : :: std :: vec :: Vec < (runtime_types :: polkadot_parachain :: primitives :: Id , runtime_types :: polkadot_primitives :: v4 :: AbridgedHrmpChannel ,) > , } + pub struct MessagingStateSnapshot { pub dmq_mqc_head : :: subxt :: utils :: H256 , pub relay_dispatch_queue_remaining_capacity : runtime_types :: cumulus_pallet_parachain_system :: relay_state_snapshot :: RelayDispatchQueueRemainingCapacity , pub ingress_channels : :: std :: vec :: Vec < (runtime_types :: polkadot_parachain_primitives :: primitives :: Id , runtime_types :: polkadot_primitives :: v6 :: AbridgedHrmpChannel ,) > , pub egress_channels : :: std :: vec :: Vec < (runtime_types :: polkadot_parachain_primitives :: primitives :: Id , runtime_types :: polkadot_primitives :: v6 :: AbridgedHrmpChannel ,) > , } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct RelayDispachQueueSize { + pub struct RelayDispatchQueueRemainingCapacity { pub remaining_count: ::core::primitive::u32, pub remaining_size: ::core::primitive::u32, } } + pub mod unincluded_segment { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Ancestor < _0 > { pub used_bandwidth : runtime_types :: cumulus_pallet_parachain_system :: unincluded_segment :: UsedBandwidth , pub para_head_hash : :: core :: option :: Option < _0 > , pub consumed_go_ahead_signal : :: core :: option :: Option < runtime_types :: polkadot_primitives :: v6 :: UpgradeGoAhead > , } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct HrmpChannelUpdate { + pub msg_count: ::core::primitive::u32, + pub total_bytes: ::core::primitive::u32, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct SegmentTracker < _0 > { pub used_bandwidth : runtime_types :: cumulus_pallet_parachain_system :: unincluded_segment :: UsedBandwidth , pub hrmp_watermark : :: core :: option :: Option < :: core :: primitive :: u32 > , pub consumed_go_ahead_signal : :: core :: option :: Option < runtime_types :: polkadot_primitives :: v6 :: UpgradeGoAhead > , # [codec (skip)] pub __subxt_unused_type_params : :: core :: marker :: PhantomData < _0 > } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct UsedBandwidth { pub ump_msg_count : :: core :: primitive :: u32 , pub ump_total_bytes : :: core :: primitive :: u32 , pub hrmp_outgoing : :: subxt :: utils :: KeyedVec < runtime_types :: polkadot_parachain_primitives :: primitives :: Id , runtime_types :: cumulus_pallet_parachain_system :: unincluded_segment :: HrmpChannelUpdate > , } + } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct CodeUpgradeAuthorization { pub code_hash: ::subxt::utils::H256, @@ -475,8 +493,6 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Error {} - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum Event { #[codec(index = 0)] InvalidFormat([::core::primitive::u8; 32usize]), @@ -493,7 +509,7 @@ pub mod api { #[codec(index = 0)] Relay, #[codec(index = 1)] - SiblingParachain(runtime_types::polkadot_parachain::primitives::Id), + SiblingParachain(runtime_types::polkadot_parachain_primitives::primitives::Id), } } } @@ -503,11 +519,6 @@ pub mod api { use super::runtime_types; #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum Call { - #[codec(index = 0)] - service_overweight { - index: ::core::primitive::u64, - weight_limit: ::sp_weights::Weight, - }, #[codec(index = 1)] suspend_xcm_execution, #[codec(index = 2)] @@ -518,81 +529,25 @@ pub mod api { update_drop_threshold { new: ::core::primitive::u32 }, #[codec(index = 5)] update_resume_threshold { new: ::core::primitive::u32 }, - #[codec(index = 6)] - update_threshold_weight { new: ::sp_weights::Weight }, - #[codec(index = 7)] - update_weight_restrict_decay { new: ::sp_weights::Weight }, - #[codec(index = 8)] - update_xcmp_max_individual_weight { new: ::sp_weights::Weight }, } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum Error { #[codec(index = 0)] - FailedToSend, + BadQueueConfig, #[codec(index = 1)] - BadXcmOrigin, + AlreadySuspended, #[codec(index = 2)] - BadXcm, - #[codec(index = 3)] - BadOverweightIndex, - #[codec(index = 4)] - WeightOverLimit, + AlreadyResumed, } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum Event { #[codec(index = 0)] - Success { - message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, - weight: ::sp_weights::Weight, - }, - #[codec(index = 1)] - Fail { - message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, - error: runtime_types::xcm::v3::traits::Error, - weight: ::sp_weights::Weight, - }, - #[codec(index = 2)] - BadVersion { - message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, - }, - #[codec(index = 3)] - BadFormat { - message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, - }, - #[codec(index = 4)] - XcmpMessageSent { - message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, - }, - #[codec(index = 5)] - OverweightEnqueued { - sender: runtime_types::polkadot_parachain::primitives::Id, - sent_at: ::core::primitive::u32, - index: ::core::primitive::u64, - required: ::sp_weights::Weight, - }, - #[codec(index = 6)] - OverweightServiced { index: ::core::primitive::u64, used: ::sp_weights::Weight }, + XcmpMessageSent { message_hash: [::core::primitive::u8; 32usize] }, } } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct InboundChannelDetails { - pub sender: runtime_types::polkadot_parachain::primitives::Id, - pub state: runtime_types::cumulus_pallet_xcmp_queue::InboundState, - pub message_metadata: ::std::vec::Vec<( - ::core::primitive::u32, - runtime_types::polkadot_parachain::primitives::XcmpMessageFormat, - )>, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum InboundState { - #[codec(index = 0)] - Ok, - #[codec(index = 1)] - Suspended, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct OutboundChannelDetails { - pub recipient: runtime_types::polkadot_parachain::primitives::Id, + pub recipient: runtime_types::polkadot_parachain_primitives::primitives::Id, pub state: runtime_types::cumulus_pallet_xcmp_queue::OutboundState, pub signals_exist: ::core::primitive::bool, pub first_index: ::core::primitive::u16, @@ -615,6 +570,18 @@ pub mod api { pub xcmp_max_individual_weight: ::sp_weights::Weight, } } + pub mod cumulus_primitives_core { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum AggregateMessageOrigin { + #[codec(index = 0)] + Here, + #[codec(index = 1)] + Parent, + #[codec(index = 2)] + Sibling(runtime_types::polkadot_parachain_primitives::primitives::Id), + } + } pub mod cumulus_primitives_parachain_inherent { use super::runtime_types; #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] @@ -622,7 +589,7 @@ pub mod api { #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct ParachainInherentData { pub validation_data: - runtime_types::polkadot_primitives::v4::PersistedValidationData< + runtime_types::polkadot_primitives::v6::PersistedValidationData< ::subxt::utils::H256, ::core::primitive::u32, >, @@ -633,7 +600,7 @@ pub mod api { >, >, pub horizontal_messages: ::subxt::utils::KeyedVec< - runtime_types::polkadot_parachain::primitives::Id, + runtime_types::polkadot_parachain_primitives::primitives::Id, ::std::vec::Vec< runtime_types::polkadot_core_primitives::InboundHrmpMessage< ::core::primitive::u32, @@ -708,6 +675,22 @@ pub mod api { } pub mod traits { use super::runtime_types; + pub mod messages { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ProcessMessageError { + #[codec(index = 0)] + BadFormat, + #[codec(index = 1)] + Corrupt, + #[codec(index = 2)] + Unsupported, + #[codec(index = 3)] + Overweight(::sp_weights::Weight), + #[codec(index = 4)] + Yield, + } + } pub mod tokens { use super::runtime_types; pub mod misc { @@ -857,9 +840,9 @@ pub mod api { #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct AccountInfo<_0, _1> { pub nonce: _0, - pub consumers: _0, - pub providers: _0, - pub sufficients: _0, + pub consumers: ::core::primitive::u32, + pub providers: ::core::primitive::u32, + pub sufficients: ::core::primitive::u32, pub data: _1, } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] @@ -896,14 +879,6 @@ pub mod api { #[codec(compact)] value: ::core::primitive::u128, }, - #[codec(index = 1)] - set_balance_deprecated { - who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - #[codec(compact)] - new_free: ::core::primitive::u128, - #[codec(compact)] - old_reserved: ::core::primitive::u128, - }, #[codec(index = 2)] force_transfer { source: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, @@ -929,12 +904,6 @@ pub mod api { }, #[codec(index = 6)] upgrade_accounts { who: ::std::vec::Vec<::sp_core::crypto::AccountId32> }, - #[codec(index = 7)] - transfer { - dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - #[codec(compact)] - value: ::core::primitive::u128, - }, #[codec(index = 8)] force_set_balance { who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, @@ -1131,6 +1100,39 @@ pub mod api { }, } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call2 { + #[codec(index = 0)] + submit_finality_proof { + finality_target: ::std::boxed::Box< + ::sp_runtime::generic::Header< + ::core::primitive::u32, + ::sp_runtime::traits::BlakeTwo256, + >, + >, + justification: ::bp_header_chain::justification::GrandpaJustification< + ::sp_runtime::generic::Header< + ::core::primitive::u32, + ::sp_runtime::traits::BlakeTwo256, + >, + >, + }, + #[codec(index = 1)] + initialize { + init_data: ::bp_header_chain::InitializationData< + ::sp_runtime::generic::Header< + ::core::primitive::u32, + ::sp_runtime::traits::BlakeTwo256, + >, + >, + }, + #[codec(index = 2)] + set_owner { new_owner: ::core::option::Option<::sp_core::crypto::AccountId32> }, + #[codec(index = 3)] + set_operating_mode { + operating_mode: runtime_types::bp_runtime::BasicOperatingMode, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum Error { #[codec(index = 0)] InvalidJustification, @@ -1150,11 +1152,56 @@ pub mod api { BridgeModule(runtime_types::bp_runtime::OwnedBridgeModuleError), } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error2 { + #[codec(index = 0)] + InvalidJustification, + #[codec(index = 1)] + InvalidAuthoritySet, + #[codec(index = 2)] + OldHeader, + #[codec(index = 3)] + UnsupportedScheduledChange, + #[codec(index = 4)] + NotInitialized, + #[codec(index = 5)] + AlreadyInitialized, + #[codec(index = 6)] + TooManyAuthoritiesInSet, + #[codec(index = 7)] + BridgeModule(runtime_types::bp_runtime::OwnedBridgeModuleError), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum Event { #[codec(index = 0)] UpdatedBestFinalizedHeader { number: ::core::primitive::u32, hash: ::subxt::utils::H256, + grandpa_info: runtime_types::bp_header_chain::HeaderFinalityInfo< + ::bp_header_chain::justification::GrandpaJustification< + ::sp_runtime::generic::Header< + ::core::primitive::u32, + ::sp_runtime::traits::BlakeTwo256, + >, + >, + runtime_types::bp_header_chain::AuthoritySet, + >, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event2 { + #[codec(index = 0)] + UpdatedBestFinalizedHeader { + number: ::core::primitive::u32, + hash: ::subxt::utils::H256, + grandpa_info: runtime_types::bp_header_chain::HeaderFinalityInfo< + ::bp_header_chain::justification::GrandpaJustification< + ::sp_runtime::generic::Header< + ::core::primitive::u32, + ::sp_runtime::traits::BlakeTwo256, + >, + >, + runtime_types::bp_header_chain::AuthoritySet, + >, }, } } @@ -1168,6 +1215,14 @@ pub mod api { )>, pub set_id: ::core::primitive::u64, } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct StoredAuthoritySet2 { + pub authorities: runtime_types::bounded_collections::bounded_vec::BoundedVec<( + runtime_types::sp_consensus_grandpa::app::Public, + ::core::primitive::u64, + )>, + pub set_id: ::core::primitive::u64, + } } } pub mod pallet_bridge_messages { @@ -1214,11 +1269,42 @@ pub mod api { }, } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call2 { + #[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: ::bp_messages::target_chain::FromBridgedChainMessagesProof< + ::subxt::utils::H256, + >, + messages_count: ::core::primitive::u32, + dispatch_weight: ::sp_weights::Weight, + }, + #[codec(index = 3)] + receive_messages_delivery_proof { + proof: ::bp_messages::source_chain::FromBridgedChainMessagesDeliveryProof< + ::subxt::utils::H256, + >, + relayers_state: ::bp_messages::UnrewardedRelayersState, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum Error { - # [codec (index = 0)] NotOperatingNormally , # [codec (index = 1)] InactiveOutboundLane , # [codec (index = 2)] MessageRejectedByChainVerifier (runtime_types :: bp_messages :: VerificationError ,) , # [codec (index = 3)] MessageRejectedByLaneVerifier (runtime_types :: bp_messages :: VerificationError ,) , # [codec (index = 4)] MessageRejectedByPallet (runtime_types :: bp_messages :: VerificationError ,) , # [codec (index = 5)] FailedToWithdrawMessageFee , # [codec (index = 6)] TooManyMessagesInTheProof , # [codec (index = 7)] InvalidMessagesProof , # [codec (index = 8)] InvalidMessagesDeliveryProof , # [codec (index = 9)] InvalidUnrewardedRelayersState , # [codec (index = 10)] InsufficientDispatchWeight , # [codec (index = 11)] MessageIsNotYetSent , # [codec (index = 12)] ReceivalConfirmation (runtime_types :: pallet_bridge_messages :: outbound_lane :: ReceivalConfirmationError ,) , # [codec (index = 13)] BridgeModule (runtime_types :: bp_runtime :: OwnedBridgeModuleError ,) , } + # [codec (index = 0)] NotOperatingNormally , # [codec (index = 1)] InactiveOutboundLane , # [codec (index = 2)] MessageDispatchInactive , # [codec (index = 3)] MessageRejectedByChainVerifier (runtime_types :: bp_messages :: VerificationError ,) , # [codec (index = 4)] MessageRejectedByLaneVerifier (runtime_types :: bp_messages :: VerificationError ,) , # [codec (index = 5)] MessageRejectedByPallet (runtime_types :: bp_messages :: VerificationError ,) , # [codec (index = 6)] FailedToWithdrawMessageFee , # [codec (index = 7)] TooManyMessagesInTheProof , # [codec (index = 8)] InvalidMessagesProof , # [codec (index = 9)] InvalidMessagesDeliveryProof , # [codec (index = 10)] InvalidUnrewardedRelayersState , # [codec (index = 11)] InsufficientDispatchWeight , # [codec (index = 12)] MessageIsNotYetSent , # [codec (index = 13)] ReceivalConfirmation (runtime_types :: pallet_bridge_messages :: outbound_lane :: ReceivalConfirmationError ,) , # [codec (index = 14)] BridgeModule (runtime_types :: bp_runtime :: OwnedBridgeModuleError ,) , } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error2 { + # [codec (index = 0)] NotOperatingNormally , # [codec (index = 1)] InactiveOutboundLane , # [codec (index = 2)] MessageDispatchInactive , # [codec (index = 3)] MessageRejectedByChainVerifier (runtime_types :: bp_messages :: VerificationError ,) , # [codec (index = 4)] MessageRejectedByLaneVerifier (runtime_types :: bp_messages :: VerificationError ,) , # [codec (index = 5)] MessageRejectedByPallet (runtime_types :: bp_messages :: VerificationError ,) , # [codec (index = 6)] FailedToWithdrawMessageFee , # [codec (index = 7)] TooManyMessagesInTheProof , # [codec (index = 8)] InvalidMessagesProof , # [codec (index = 9)] InvalidMessagesDeliveryProof , # [codec (index = 10)] InvalidUnrewardedRelayersState , # [codec (index = 11)] InsufficientDispatchWeight , # [codec (index = 12)] MessageIsNotYetSent , # [codec (index = 13)] ReceivalConfirmation (runtime_types :: pallet_bridge_messages :: outbound_lane :: ReceivalConfirmationError ,) , # [codec (index = 14)] BridgeModule (runtime_types :: bp_runtime :: OwnedBridgeModuleError ,) , } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum Event { # [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 , } , } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event2 { + # [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_parachains { @@ -1322,12 +1408,18 @@ pub mod api { #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum Event { #[codec(index = 0)] - RewardPaid { + RewardRegistered { relayer: ::sp_core::crypto::AccountId32, rewards_account_params: runtime_types::bp_relayers::RewardsAccountParams, reward: ::core::primitive::u128, }, #[codec(index = 1)] + RewardPaid { + relayer: ::sp_core::crypto::AccountId32, + rewards_account_params: runtime_types::bp_relayers::RewardsAccountParams, + reward: ::core::primitive::u128, + }, + #[codec(index = 2)] RegistrationUpdated { relayer: ::sp_core::crypto::AccountId32, registration: runtime_types::bp_relayers::registration::Registration< @@ -1335,9 +1427,9 @@ pub mod api { ::core::primitive::u128, >, }, - #[codec(index = 2)] - Deregistered { relayer: ::sp_core::crypto::AccountId32 }, #[codec(index = 3)] + Deregistered { relayer: ::sp_core::crypto::AccountId32 }, + #[codec(index = 4)] SlashedAndDeregistered { relayer: ::sp_core::crypto::AccountId32, registration: runtime_types::bp_relayers::registration::Registration< @@ -1364,6 +1456,17 @@ pub mod api { register_as_candidate, #[codec(index = 4)] leave_intent, + #[codec(index = 5)] + add_invulnerable { who: ::sp_core::crypto::AccountId32 }, + #[codec(index = 6)] + remove_invulnerable { who: ::sp_core::crypto::AccountId32 }, + #[codec(index = 7)] + update_bond { new_deposit: ::core::primitive::u128 }, + #[codec(index = 8)] + take_candidate_slot { + deposit: ::core::primitive::u128, + target: ::sp_core::crypto::AccountId32, + }, } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct CandidateInfo<_0, _1> { @@ -1375,23 +1478,37 @@ pub mod api { #[codec(index = 0)] TooManyCandidates, #[codec(index = 1)] - TooFewCandidates, + TooFewEligibleCollators, #[codec(index = 2)] - Unknown, + AlreadyCandidate, #[codec(index = 3)] - Permission, + NotCandidate, #[codec(index = 4)] - AlreadyCandidate, + TooManyInvulnerables, #[codec(index = 5)] - NotCandidate, + AlreadyInvulnerable, #[codec(index = 6)] - TooManyInvulnerables, + NotInvulnerable, #[codec(index = 7)] - AlreadyInvulnerable, - #[codec(index = 8)] NoAssociatedValidatorId, - #[codec(index = 9)] + #[codec(index = 8)] ValidatorNotRegistered, + #[codec(index = 9)] + InsertToCandidateListFailed, + #[codec(index = 10)] + RemoveFromCandidateListFailed, + #[codec(index = 11)] + DepositTooLow, + #[codec(index = 12)] + UpdateCandidateListFailed, + #[codec(index = 13)] + InsufficientBond, + #[codec(index = 14)] + TargetIsNotCandidate, + #[codec(index = 15)] + IdenticalDeposit, + #[codec(index = 16)] + InvalidUnreserve, } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum Event { @@ -1400,18 +1517,131 @@ pub mod api { invulnerables: ::std::vec::Vec<::sp_core::crypto::AccountId32>, }, #[codec(index = 1)] - NewDesiredCandidates { desired_candidates: ::core::primitive::u32 }, + InvulnerableAdded { account_id: ::sp_core::crypto::AccountId32 }, #[codec(index = 2)] - NewCandidacyBond { bond_amount: ::core::primitive::u128 }, + InvulnerableRemoved { account_id: ::sp_core::crypto::AccountId32 }, #[codec(index = 3)] + NewDesiredCandidates { desired_candidates: ::core::primitive::u32 }, + #[codec(index = 4)] + NewCandidacyBond { bond_amount: ::core::primitive::u128 }, + #[codec(index = 5)] CandidateAdded { account_id: ::sp_core::crypto::AccountId32, deposit: ::core::primitive::u128, }, - #[codec(index = 4)] + #[codec(index = 6)] + CandidateBondUpdated { + account_id: ::sp_core::crypto::AccountId32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 7)] CandidateRemoved { account_id: ::sp_core::crypto::AccountId32 }, + #[codec(index = 8)] + CandidateReplaced { + old: ::sp_core::crypto::AccountId32, + new: ::sp_core::crypto::AccountId32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 9)] + InvalidInvulnerableSkipped { account_id: ::sp_core::crypto::AccountId32 }, + } + } + } + pub mod pallet_message_queue { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + reap_page { + message_origin: + runtime_types::cumulus_primitives_core::AggregateMessageOrigin, + page_index: ::core::primitive::u32, + }, + #[codec(index = 1)] + execute_overweight { + message_origin: + runtime_types::cumulus_primitives_core::AggregateMessageOrigin, + page: ::core::primitive::u32, + index: ::core::primitive::u32, + weight_limit: ::sp_weights::Weight, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + NotReapable, + #[codec(index = 1)] + NoPage, + #[codec(index = 2)] + NoMessage, + #[codec(index = 3)] + AlreadyProcessed, + #[codec(index = 4)] + Queued, + #[codec(index = 5)] + InsufficientWeight, + #[codec(index = 6)] + TemporarilyUnprocessable, + #[codec(index = 7)] + QueuePaused, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + ProcessingFailed { + id: [::core::primitive::u8; 32usize], + origin: runtime_types::cumulus_primitives_core::AggregateMessageOrigin, + error: runtime_types::frame_support::traits::messages::ProcessMessageError, + }, + #[codec(index = 1)] + Processed { + id: [::core::primitive::u8; 32usize], + origin: runtime_types::cumulus_primitives_core::AggregateMessageOrigin, + weight_used: ::sp_weights::Weight, + success: ::core::primitive::bool, + }, + #[codec(index = 2)] + OverweightEnqueued { + id: [::core::primitive::u8; 32usize], + origin: runtime_types::cumulus_primitives_core::AggregateMessageOrigin, + page_index: ::core::primitive::u32, + message_index: ::core::primitive::u32, + }, + #[codec(index = 3)] + PageReaped { + origin: runtime_types::cumulus_primitives_core::AggregateMessageOrigin, + index: ::core::primitive::u32, + }, } } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BookState<_0> { + pub begin: ::core::primitive::u32, + pub end: ::core::primitive::u32, + pub count: ::core::primitive::u32, + pub ready_neighbours: + ::core::option::Option>, + pub message_count: ::core::primitive::u64, + pub size: ::core::primitive::u64, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Neighbours<_0> { + pub prev: _0, + pub next: _0, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Page<_0> { + pub remaining: _0, + pub remaining_size: _0, + pub first_index: _0, + pub first: _0, + pub last: _0, + pub heap: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + } } pub mod pallet_multisig { use super::runtime_types; @@ -1534,7 +1764,7 @@ pub mod api { #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct Timepoint<_0> { pub height: _0, - pub index: _0, + pub index: ::core::primitive::u32, } } pub mod pallet_session { @@ -1709,14 +1939,15 @@ pub mod api { }, #[codec(index = 3)] execute { - message: ::std::boxed::Box, + message: ::std::boxed::Box, max_weight: ::sp_weights::Weight, }, #[codec(index = 4)] force_xcm_version { - location: - ::std::boxed::Box, - xcm_version: ::core::primitive::u32, + location: ::std::boxed::Box< + runtime_types::staging_xcm::v3::multilocation::MultiLocation, + >, + version: ::core::primitive::u32, }, #[codec(index = 5)] force_default_xcm_version { @@ -1778,7 +2009,7 @@ pub mod api { #[codec(index = 12)] AlreadySubscribed, #[codec(index = 13)] - InvalidAsset, + CannotCheckOutTeleport, #[codec(index = 14)] LowBalance, #[codec(index = 15)] @@ -1791,136 +2022,201 @@ pub mod api { LockNotFound, #[codec(index = 19)] InUse, + #[codec(index = 20)] + InvalidAssetNotConcrete, + #[codec(index = 21)] + InvalidAssetUnknownReserve, + #[codec(index = 22)] + InvalidAssetUnsupportedReserve, + #[codec(index = 23)] + TooManyReserves, + #[codec(index = 24)] + LocalExecutionIncomplete, } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum Event { #[codec(index = 0)] - Attempted(runtime_types::xcm::v3::traits::Outcome), + Attempted { outcome: runtime_types::xcm::v3::traits::Outcome }, #[codec(index = 1)] - Sent( - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::v3::Xcm, - ), + Sent { + origin: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + destination: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + message: runtime_types::xcm::v3::Xcm, + message_id: [::core::primitive::u8; 32usize], + }, #[codec(index = 2)] - UnexpectedResponse( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u64, - ), + UnexpectedResponse { + origin: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + query_id: ::core::primitive::u64, + }, #[codec(index = 3)] - ResponseReady(::core::primitive::u64, runtime_types::xcm::v3::Response), + ResponseReady { + query_id: ::core::primitive::u64, + response: runtime_types::xcm::v3::Response, + }, #[codec(index = 4)] - Notified(::core::primitive::u64, ::core::primitive::u8, ::core::primitive::u8), + Notified { + query_id: ::core::primitive::u64, + pallet_index: ::core::primitive::u8, + call_index: ::core::primitive::u8, + }, #[codec(index = 5)] - NotifyOverweight( - ::core::primitive::u64, - ::core::primitive::u8, - ::core::primitive::u8, - ::sp_weights::Weight, - ::sp_weights::Weight, - ), + NotifyOverweight { + query_id: ::core::primitive::u64, + pallet_index: ::core::primitive::u8, + call_index: ::core::primitive::u8, + actual_weight: ::sp_weights::Weight, + max_budgeted_weight: ::sp_weights::Weight, + }, #[codec(index = 6)] - NotifyDispatchError( - ::core::primitive::u64, - ::core::primitive::u8, - ::core::primitive::u8, - ), + NotifyDispatchError { + query_id: ::core::primitive::u64, + pallet_index: ::core::primitive::u8, + call_index: ::core::primitive::u8, + }, #[codec(index = 7)] - NotifyDecodeFailed( - ::core::primitive::u64, - ::core::primitive::u8, - ::core::primitive::u8, - ), + NotifyDecodeFailed { + query_id: ::core::primitive::u64, + pallet_index: ::core::primitive::u8, + call_index: ::core::primitive::u8, + }, #[codec(index = 8)] - InvalidResponder( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u64, - ::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, + InvalidResponder { + origin: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + query_id: ::core::primitive::u64, + expected_location: ::core::option::Option< + runtime_types::staging_xcm::v3::multilocation::MultiLocation, >, - ), + }, #[codec(index = 9)] - InvalidResponderVersion( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u64, - ), + InvalidResponderVersion { + origin: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + query_id: ::core::primitive::u64, + }, #[codec(index = 10)] - ResponseTaken(::core::primitive::u64), + ResponseTaken { query_id: ::core::primitive::u64 }, #[codec(index = 11)] - AssetsTrapped( - ::subxt::utils::H256, - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::VersionedMultiAssets, - ), + AssetsTrapped { + hash: ::subxt::utils::H256, + origin: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + assets: runtime_types::xcm::VersionedMultiAssets, + }, #[codec(index = 12)] - VersionChangeNotified( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u32, - runtime_types::xcm::v3::multiasset::MultiAssets, - ), + VersionChangeNotified { + destination: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + result: ::core::primitive::u32, + cost: runtime_types::xcm::v3::multiasset::MultiAssets, + message_id: [::core::primitive::u8; 32usize], + }, #[codec(index = 13)] - SupportedVersionChanged( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u32, - ), + SupportedVersionChanged { + location: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + version: ::core::primitive::u32, + }, #[codec(index = 14)] - NotifyTargetSendFail( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u64, - runtime_types::xcm::v3::traits::Error, - ), + NotifyTargetSendFail { + location: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + query_id: ::core::primitive::u64, + error: runtime_types::xcm::v3::traits::Error, + }, #[codec(index = 15)] - NotifyTargetMigrationFail( - runtime_types::xcm::VersionedMultiLocation, - ::core::primitive::u64, - ), + NotifyTargetMigrationFail { + location: runtime_types::xcm::VersionedMultiLocation, + query_id: ::core::primitive::u64, + }, #[codec(index = 16)] - InvalidQuerierVersion( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u64, - ), + InvalidQuerierVersion { + origin: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + query_id: ::core::primitive::u64, + }, #[codec(index = 17)] - InvalidQuerier( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u64, - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, + InvalidQuerier { + origin: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + query_id: ::core::primitive::u64, + expected_querier: + runtime_types::staging_xcm::v3::multilocation::MultiLocation, + maybe_actual_querier: ::core::option::Option< + runtime_types::staging_xcm::v3::multilocation::MultiLocation, >, - ), + }, #[codec(index = 18)] - VersionNotifyStarted( - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::v3::multiasset::MultiAssets, - ), + VersionNotifyStarted { + destination: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + cost: runtime_types::xcm::v3::multiasset::MultiAssets, + message_id: [::core::primitive::u8; 32usize], + }, #[codec(index = 19)] - VersionNotifyRequested( - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::v3::multiasset::MultiAssets, - ), + VersionNotifyRequested { + destination: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + cost: runtime_types::xcm::v3::multiasset::MultiAssets, + message_id: [::core::primitive::u8; 32usize], + }, #[codec(index = 20)] - VersionNotifyUnrequested( - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::v3::multiasset::MultiAssets, - ), + VersionNotifyUnrequested { + destination: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + cost: runtime_types::xcm::v3::multiasset::MultiAssets, + message_id: [::core::primitive::u8; 32usize], + }, #[codec(index = 21)] - FeesPaid( - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::v3::multiasset::MultiAssets, - ), + FeesPaid { + paying: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + fees: runtime_types::xcm::v3::multiasset::MultiAssets, + }, #[codec(index = 22)] - AssetsClaimed( - ::subxt::utils::H256, - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::VersionedMultiAssets, - ), + AssetsClaimed { + hash: ::subxt::utils::H256, + origin: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + assets: runtime_types::xcm::VersionedMultiAssets, + }, } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum Origin { #[codec(index = 0)] - Xcm(runtime_types::xcm::v3::multilocation::MultiLocation), + Xcm(runtime_types::staging_xcm::v3::multilocation::MultiLocation), + #[codec(index = 1)] + Response(runtime_types::staging_xcm::v3::multilocation::MultiLocation), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum QueryStatus<_0> { + #[codec(index = 0)] + Pending { + responder: runtime_types::xcm::VersionedMultiLocation, + maybe_match_querier: + ::core::option::Option, + maybe_notify: + ::core::option::Option<(::core::primitive::u8, ::core::primitive::u8)>, + timeout: _0, + }, + #[codec(index = 1)] + VersionNotifier { + origin: runtime_types::xcm::VersionedMultiLocation, + is_active: ::core::primitive::bool, + }, + #[codec(index = 2)] + Ready { response: runtime_types::xcm::VersionedResponse, at: _0 }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct RemoteLockedFungibleRecord<_0> { + pub amount: ::core::primitive::u128, + pub owner: runtime_types::xcm::VersionedMultiLocation, + pub locker: runtime_types::xcm::VersionedMultiLocation, + pub consumers: runtime_types::bounded_collections::bounded_vec::BoundedVec<( + _0, + ::core::primitive::u128, + )>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum VersionMigrationStage { + #[codec(index = 0)] + MigrateSupportedVersion, #[codec(index = 1)] - Response(runtime_types::xcm::v3::multilocation::MultiLocation), + MigrateVersionNotifiers, + #[codec(index = 2)] + NotifyCurrentTargets( + ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, + ), + #[codec(index = 3)] + MigrateAndNotifyOldTargets, } } } @@ -1942,7 +2238,7 @@ pub mod api { pub data: ::std::vec::Vec<::core::primitive::u8>, } } - pub mod polkadot_parachain { + pub mod polkadot_parachain_primitives { use super::runtime_types; pub mod primitives { use super::runtime_types; @@ -1957,21 +2253,20 @@ pub mod api { PartialEq, )] pub struct Id(pub ::core::primitive::u32); - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum XcmpMessageFormat { - #[codec(index = 0)] - ConcatenatedVersionedXcm, - #[codec(index = 1)] - ConcatenatedEncodedBlob, - #[codec(index = 2)] - Signals, - } } } pub mod polkadot_primitives { use super::runtime_types; - pub mod v4 { + pub mod v6 { use super::runtime_types; + pub mod async_backing { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct AsyncBackingParams { + pub max_candidate_depth: ::core::primitive::u32, + pub allowed_ancestry_len: ::core::primitive::u32, + } + } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct AbridgedHostConfiguration { pub max_code_size: ::core::primitive::u32, @@ -1983,6 +2278,8 @@ pub mod api { pub hrmp_max_message_num_per_candidate: ::core::primitive::u32, pub validation_upgrade_cooldown: ::core::primitive::u32, pub validation_upgrade_delay: ::core::primitive::u32, + pub async_backing_params: + runtime_types::polkadot_primitives::v6::async_backing::AsyncBackingParams, } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct AbridgedHrmpChannel { @@ -1995,10 +2292,18 @@ pub mod api { } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct PersistedValidationData<_0, _1> { - pub parent_head: runtime_types::polkadot_parachain::primitives::HeadData, + pub parent_head: + runtime_types::polkadot_parachain_primitives::primitives::HeadData, pub relay_parent_number: _1, pub relay_parent_storage_root: _0, - pub max_pov_size: _1, + pub max_pov_size: ::core::primitive::u32, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum UpgradeGoAhead { + #[codec(index = 0)] + Abort, + #[codec(index = 1)] + GoAhead, } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum UpgradeRestriction { @@ -2122,14 +2427,6 @@ pub mod api { RuntimeEnvironmentUpdated, } } - pub mod unchecked_extrinsic { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct UncheckedExtrinsic<_0, _1, _2, _3>( - pub ::std::vec::Vec<::core::primitive::u8>, - #[codec(skip)] pub ::core::marker::PhantomData<(_0, _1, _2, _3)>, - ); - } } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum DispatchError { @@ -2240,6 +2537,20 @@ pub mod api { pub write: ::core::primitive::u64, } } + pub mod staging_xcm { + use super::runtime_types; + pub mod v3 { + use super::runtime_types; + pub mod multilocation { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct MultiLocation { + pub parents: ::core::primitive::u8, + pub interior: runtime_types::xcm::v3::junctions::Junctions, + } + } + } + } pub mod xcm { use super::runtime_types; pub mod double_encoded { @@ -2248,6 +2559,10 @@ pub mod api { pub struct DoubleEncoded { pub encoded: ::std::vec::Vec<::core::primitive::u8>, } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct DoubleEncoded2 { + pub encoded: ::std::vec::Vec<::core::primitive::u8>, + } } pub mod v2 { use super::runtime_types; @@ -2687,46 +3002,186 @@ pub mod api { UnsubscribeVersion, } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum NetworkId { - #[codec(index = 0)] - Any, - #[codec(index = 1)] - Named( - runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< - ::core::primitive::u8, - >, - ), - #[codec(index = 2)] - Polkadot, - #[codec(index = 3)] - Kusama, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum OriginKind { - #[codec(index = 0)] - Native, - #[codec(index = 1)] - SovereignAccount, - #[codec(index = 2)] - Superuser, - #[codec(index = 3)] - Xcm, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Response { + pub enum Instruction2 { #[codec(index = 0)] - Null, + WithdrawAsset(runtime_types::xcm::v2::multiasset::MultiAssets), #[codec(index = 1)] - Assets(runtime_types::xcm::v2::multiasset::MultiAssets), + ReserveAssetDeposited(runtime_types::xcm::v2::multiasset::MultiAssets), #[codec(index = 2)] - ExecutionResult( - ::core::option::Option<( - ::core::primitive::u32, - runtime_types::xcm::v2::traits::Error, - )>, - ), + ReceiveTeleportedAsset(runtime_types::xcm::v2::multiasset::MultiAssets), #[codec(index = 3)] - Version(::core::primitive::u32), + QueryResponse { + #[codec(compact)] + query_id: ::core::primitive::u64, + response: runtime_types::xcm::v2::Response, + #[codec(compact)] + max_weight: ::core::primitive::u64, + }, + #[codec(index = 4)] + TransferAsset { + assets: runtime_types::xcm::v2::multiasset::MultiAssets, + beneficiary: runtime_types::xcm::v2::multilocation::MultiLocation, + }, + #[codec(index = 5)] + TransferReserveAsset { + assets: runtime_types::xcm::v2::multiasset::MultiAssets, + dest: runtime_types::xcm::v2::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 6)] + Transact { + origin_type: runtime_types::xcm::v2::OriginKind, + #[codec(compact)] + require_weight_at_most: ::core::primitive::u64, + call: runtime_types::xcm::double_encoded::DoubleEncoded2, + }, + #[codec(index = 7)] + HrmpNewChannelOpenRequest { + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + max_message_size: ::core::primitive::u32, + #[codec(compact)] + max_capacity: ::core::primitive::u32, + }, + #[codec(index = 8)] + HrmpChannelAccepted { + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 9)] + HrmpChannelClosing { + #[codec(compact)] + initiator: ::core::primitive::u32, + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 10)] + ClearOrigin, + #[codec(index = 11)] + DescendOrigin(runtime_types::xcm::v2::multilocation::Junctions), + #[codec(index = 12)] + ReportError { + #[codec(compact)] + query_id: ::core::primitive::u64, + dest: runtime_types::xcm::v2::multilocation::MultiLocation, + #[codec(compact)] + max_response_weight: ::core::primitive::u64, + }, + #[codec(index = 13)] + DepositAsset { + assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + #[codec(compact)] + max_assets: ::core::primitive::u32, + beneficiary: runtime_types::xcm::v2::multilocation::MultiLocation, + }, + #[codec(index = 14)] + DepositReserveAsset { + assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + #[codec(compact)] + max_assets: ::core::primitive::u32, + dest: runtime_types::xcm::v2::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 15)] + ExchangeAsset { + give: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + receive: runtime_types::xcm::v2::multiasset::MultiAssets, + }, + #[codec(index = 16)] + InitiateReserveWithdraw { + assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + reserve: runtime_types::xcm::v2::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 17)] + InitiateTeleport { + assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + dest: runtime_types::xcm::v2::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 18)] + QueryHolding { + #[codec(compact)] + query_id: ::core::primitive::u64, + dest: runtime_types::xcm::v2::multilocation::MultiLocation, + assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + #[codec(compact)] + max_response_weight: ::core::primitive::u64, + }, + #[codec(index = 19)] + BuyExecution { + fees: runtime_types::xcm::v2::multiasset::MultiAsset, + weight_limit: runtime_types::xcm::v2::WeightLimit, + }, + #[codec(index = 20)] + RefundSurplus, + #[codec(index = 21)] + SetErrorHandler(runtime_types::xcm::v2::Xcm2), + #[codec(index = 22)] + SetAppendix(runtime_types::xcm::v2::Xcm2), + #[codec(index = 23)] + ClearError, + #[codec(index = 24)] + ClaimAsset { + assets: runtime_types::xcm::v2::multiasset::MultiAssets, + ticket: runtime_types::xcm::v2::multilocation::MultiLocation, + }, + #[codec(index = 25)] + Trap(#[codec(compact)] ::core::primitive::u64), + #[codec(index = 26)] + SubscribeVersion { + #[codec(compact)] + query_id: ::core::primitive::u64, + #[codec(compact)] + max_response_weight: ::core::primitive::u64, + }, + #[codec(index = 27)] + UnsubscribeVersion, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum NetworkId { + #[codec(index = 0)] + Any, + #[codec(index = 1)] + Named( + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + ::core::primitive::u8, + >, + ), + #[codec(index = 2)] + Polkadot, + #[codec(index = 3)] + Kusama, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum OriginKind { + #[codec(index = 0)] + Native, + #[codec(index = 1)] + SovereignAccount, + #[codec(index = 2)] + Superuser, + #[codec(index = 3)] + Xcm, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Response { + #[codec(index = 0)] + Null, + #[codec(index = 1)] + Assets(runtime_types::xcm::v2::multiasset::MultiAssets), + #[codec(index = 2)] + ExecutionResult( + ::core::option::Option<( + ::core::primitive::u32, + runtime_types::xcm::v2::traits::Error, + )>, + ), + #[codec(index = 3)] + Version(::core::primitive::u32), } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum WeightLimit { @@ -2737,6 +3192,8 @@ pub mod api { } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct Xcm(pub ::std::vec::Vec); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Xcm2(pub ::std::vec::Vec); } pub mod v3 { use super::runtime_types; @@ -2939,7 +3396,7 @@ pub mod api { #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum AssetId { #[codec(index = 0)] - Concrete(runtime_types::xcm::v3::multilocation::MultiLocation), + Concrete(runtime_types::staging_xcm::v3::multilocation::MultiLocation), #[codec(index = 1)] Abstract([::core::primitive::u8; 32usize]), } @@ -3008,14 +3465,6 @@ pub mod api { }, } } - pub mod multilocation { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct MultiLocation { - pub parents: ::core::primitive::u8, - pub interior: runtime_types::xcm::v3::junctions::Junctions, - } - } pub mod traits { use super::runtime_types; #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] @@ -3126,18 +3575,18 @@ pub mod api { response: runtime_types::xcm::v3::Response, max_weight: ::sp_weights::Weight, querier: ::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::staging_xcm::v3::multilocation::MultiLocation, >, }, #[codec(index = 4)] TransferAsset { assets: runtime_types::xcm::v3::multiasset::MultiAssets, - beneficiary: runtime_types::xcm::v3::multilocation::MultiLocation, + beneficiary: runtime_types::staging_xcm::v3::multilocation::MultiLocation, }, #[codec(index = 5)] TransferReserveAsset { assets: runtime_types::xcm::v3::multiasset::MultiAssets, - dest: runtime_types::xcm::v3::multilocation::MultiLocation, + dest: runtime_types::staging_xcm::v3::multilocation::MultiLocation, xcm: runtime_types::xcm::v3::Xcm, }, #[codec(index = 6)] @@ -3178,12 +3627,12 @@ pub mod api { #[codec(index = 13)] DepositAsset { assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - beneficiary: runtime_types::xcm::v3::multilocation::MultiLocation, + beneficiary: runtime_types::staging_xcm::v3::multilocation::MultiLocation, }, #[codec(index = 14)] DepositReserveAsset { assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - dest: runtime_types::xcm::v3::multilocation::MultiLocation, + dest: runtime_types::staging_xcm::v3::multilocation::MultiLocation, xcm: runtime_types::xcm::v3::Xcm, }, #[codec(index = 15)] @@ -3195,13 +3644,13 @@ pub mod api { #[codec(index = 16)] InitiateReserveWithdraw { assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - reserve: runtime_types::xcm::v3::multilocation::MultiLocation, + reserve: runtime_types::staging_xcm::v3::multilocation::MultiLocation, xcm: runtime_types::xcm::v3::Xcm, }, #[codec(index = 17)] InitiateTeleport { assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - dest: runtime_types::xcm::v3::multilocation::MultiLocation, + dest: runtime_types::staging_xcm::v3::multilocation::MultiLocation, xcm: runtime_types::xcm::v3::Xcm, }, #[codec(index = 18)] @@ -3225,7 +3674,216 @@ pub mod api { #[codec(index = 24)] ClaimAsset { assets: runtime_types::xcm::v3::multiasset::MultiAssets, - ticket: runtime_types::xcm::v3::multilocation::MultiLocation, + ticket: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 25)] + Trap(#[codec(compact)] ::core::primitive::u64), + #[codec(index = 26)] + SubscribeVersion { + #[codec(compact)] + query_id: ::core::primitive::u64, + max_response_weight: ::sp_weights::Weight, + }, + #[codec(index = 27)] + UnsubscribeVersion, + #[codec(index = 28)] + BurnAsset(runtime_types::xcm::v3::multiasset::MultiAssets), + #[codec(index = 29)] + ExpectAsset(runtime_types::xcm::v3::multiasset::MultiAssets), + #[codec(index = 30)] + ExpectOrigin( + ::core::option::Option< + runtime_types::staging_xcm::v3::multilocation::MultiLocation, + >, + ), + #[codec(index = 31)] + ExpectError( + ::core::option::Option<( + ::core::primitive::u32, + runtime_types::xcm::v3::traits::Error, + )>, + ), + #[codec(index = 32)] + ExpectTransactStatus(runtime_types::xcm::v3::MaybeErrorCode), + #[codec(index = 33)] + QueryPallet { + module_name: ::std::vec::Vec<::core::primitive::u8>, + response_info: runtime_types::xcm::v3::QueryResponseInfo, + }, + #[codec(index = 34)] + ExpectPallet { + #[codec(compact)] + index: ::core::primitive::u32, + name: ::std::vec::Vec<::core::primitive::u8>, + module_name: ::std::vec::Vec<::core::primitive::u8>, + #[codec(compact)] + crate_major: ::core::primitive::u32, + #[codec(compact)] + min_crate_minor: ::core::primitive::u32, + }, + #[codec(index = 35)] + ReportTransactStatus(runtime_types::xcm::v3::QueryResponseInfo), + #[codec(index = 36)] + ClearTransactStatus, + #[codec(index = 37)] + UniversalOrigin(runtime_types::xcm::v3::junction::Junction), + #[codec(index = 38)] + ExportMessage { + network: runtime_types::xcm::v3::junction::NetworkId, + destination: runtime_types::xcm::v3::junctions::Junctions, + xcm: runtime_types::xcm::v3::Xcm, + }, + #[codec(index = 39)] + LockAsset { + asset: runtime_types::xcm::v3::multiasset::MultiAsset, + unlocker: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 40)] + UnlockAsset { + asset: runtime_types::xcm::v3::multiasset::MultiAsset, + target: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 41)] + NoteUnlockable { + asset: runtime_types::xcm::v3::multiasset::MultiAsset, + owner: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 42)] + RequestUnlock { + asset: runtime_types::xcm::v3::multiasset::MultiAsset, + locker: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 43)] + SetFeesMode { jit_withdraw: ::core::primitive::bool }, + #[codec(index = 44)] + SetTopic([::core::primitive::u8; 32usize]), + #[codec(index = 45)] + ClearTopic, + #[codec(index = 46)] + AliasOrigin(runtime_types::staging_xcm::v3::multilocation::MultiLocation), + #[codec(index = 47)] + UnpaidExecution { + weight_limit: runtime_types::xcm::v3::WeightLimit, + check_origin: ::core::option::Option< + runtime_types::staging_xcm::v3::multilocation::MultiLocation, + >, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Instruction2 { + #[codec(index = 0)] + WithdrawAsset(runtime_types::xcm::v3::multiasset::MultiAssets), + #[codec(index = 1)] + ReserveAssetDeposited(runtime_types::xcm::v3::multiasset::MultiAssets), + #[codec(index = 2)] + ReceiveTeleportedAsset(runtime_types::xcm::v3::multiasset::MultiAssets), + #[codec(index = 3)] + QueryResponse { + #[codec(compact)] + query_id: ::core::primitive::u64, + response: runtime_types::xcm::v3::Response, + max_weight: ::sp_weights::Weight, + querier: ::core::option::Option< + runtime_types::staging_xcm::v3::multilocation::MultiLocation, + >, + }, + #[codec(index = 4)] + TransferAsset { + assets: runtime_types::xcm::v3::multiasset::MultiAssets, + beneficiary: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 5)] + TransferReserveAsset { + assets: runtime_types::xcm::v3::multiasset::MultiAssets, + dest: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + xcm: runtime_types::xcm::v3::Xcm, + }, + #[codec(index = 6)] + Transact { + origin_kind: runtime_types::xcm::v2::OriginKind, + require_weight_at_most: ::sp_weights::Weight, + call: runtime_types::xcm::double_encoded::DoubleEncoded2, + }, + #[codec(index = 7)] + HrmpNewChannelOpenRequest { + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + max_message_size: ::core::primitive::u32, + #[codec(compact)] + max_capacity: ::core::primitive::u32, + }, + #[codec(index = 8)] + HrmpChannelAccepted { + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 9)] + HrmpChannelClosing { + #[codec(compact)] + initiator: ::core::primitive::u32, + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 10)] + ClearOrigin, + #[codec(index = 11)] + DescendOrigin(runtime_types::xcm::v3::junctions::Junctions), + #[codec(index = 12)] + ReportError(runtime_types::xcm::v3::QueryResponseInfo), + #[codec(index = 13)] + DepositAsset { + assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + beneficiary: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 14)] + DepositReserveAsset { + assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + dest: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + xcm: runtime_types::xcm::v3::Xcm, + }, + #[codec(index = 15)] + ExchangeAsset { + give: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + want: runtime_types::xcm::v3::multiasset::MultiAssets, + maximal: ::core::primitive::bool, + }, + #[codec(index = 16)] + InitiateReserveWithdraw { + assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + reserve: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + xcm: runtime_types::xcm::v3::Xcm, + }, + #[codec(index = 17)] + InitiateTeleport { + assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + dest: runtime_types::staging_xcm::v3::multilocation::MultiLocation, + xcm: runtime_types::xcm::v3::Xcm, + }, + #[codec(index = 18)] + ReportHolding { + response_info: runtime_types::xcm::v3::QueryResponseInfo, + assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + }, + #[codec(index = 19)] + BuyExecution { + fees: runtime_types::xcm::v3::multiasset::MultiAsset, + weight_limit: runtime_types::xcm::v3::WeightLimit, + }, + #[codec(index = 20)] + RefundSurplus, + #[codec(index = 21)] + SetErrorHandler(runtime_types::xcm::v3::Xcm2), + #[codec(index = 22)] + SetAppendix(runtime_types::xcm::v3::Xcm2), + #[codec(index = 23)] + ClearError, + #[codec(index = 24)] + ClaimAsset { + assets: runtime_types::xcm::v3::multiasset::MultiAssets, + ticket: runtime_types::staging_xcm::v3::multilocation::MultiLocation, }, #[codec(index = 25)] Trap(#[codec(compact)] ::core::primitive::u64), @@ -3244,7 +3902,7 @@ pub mod api { #[codec(index = 30)] ExpectOrigin( ::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::staging_xcm::v3::multilocation::MultiLocation, >, ), #[codec(index = 31)] @@ -3287,22 +3945,22 @@ pub mod api { #[codec(index = 39)] LockAsset { asset: runtime_types::xcm::v3::multiasset::MultiAsset, - unlocker: runtime_types::xcm::v3::multilocation::MultiLocation, + unlocker: runtime_types::staging_xcm::v3::multilocation::MultiLocation, }, #[codec(index = 40)] UnlockAsset { asset: runtime_types::xcm::v3::multiasset::MultiAsset, - target: runtime_types::xcm::v3::multilocation::MultiLocation, + target: runtime_types::staging_xcm::v3::multilocation::MultiLocation, }, #[codec(index = 41)] NoteUnlockable { asset: runtime_types::xcm::v3::multiasset::MultiAsset, - owner: runtime_types::xcm::v3::multilocation::MultiLocation, + owner: runtime_types::staging_xcm::v3::multilocation::MultiLocation, }, #[codec(index = 42)] RequestUnlock { asset: runtime_types::xcm::v3::multiasset::MultiAsset, - locker: runtime_types::xcm::v3::multilocation::MultiLocation, + locker: runtime_types::staging_xcm::v3::multilocation::MultiLocation, }, #[codec(index = 43)] SetFeesMode { jit_withdraw: ::core::primitive::bool }, @@ -3311,12 +3969,12 @@ pub mod api { #[codec(index = 45)] ClearTopic, #[codec(index = 46)] - AliasOrigin(runtime_types::xcm::v3::multilocation::MultiLocation), + AliasOrigin(runtime_types::staging_xcm::v3::multilocation::MultiLocation), #[codec(index = 47)] UnpaidExecution { weight_limit: runtime_types::xcm::v3::WeightLimit, check_origin: ::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::staging_xcm::v3::multilocation::MultiLocation, >, }, } @@ -3356,7 +4014,7 @@ pub mod api { } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct QueryResponseInfo { - pub destination: runtime_types::xcm::v3::multilocation::MultiLocation, + pub destination: runtime_types::staging_xcm::v3::multilocation::MultiLocation, #[codec(compact)] pub query_id: ::core::primitive::u64, pub max_weight: ::sp_weights::Weight, @@ -3394,6 +4052,13 @@ pub mod api { } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct Xcm(pub ::std::vec::Vec); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Xcm2(pub ::std::vec::Vec); + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum VersionedAssetId { + #[codec(index = 3)] + V3(runtime_types::xcm::v3::multiasset::AssetId), } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum VersionedMultiAssets { @@ -3407,7 +4072,14 @@ pub mod api { #[codec(index = 1)] V2(runtime_types::xcm::v2::multilocation::MultiLocation), #[codec(index = 3)] - V3(runtime_types::xcm::v3::multilocation::MultiLocation), + V3(runtime_types::staging_xcm::v3::multilocation::MultiLocation), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum VersionedResponse { + #[codec(index = 2)] + V2(runtime_types::xcm::v2::Response), + #[codec(index = 3)] + V3(runtime_types::xcm::v3::Response), } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum VersionedXcm { @@ -3416,6 +4088,13 @@ pub mod api { #[codec(index = 3)] V3(runtime_types::xcm::v3::Xcm), } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum VersionedXcm2 { + #[codec(index = 2)] + V2(runtime_types::xcm::v2::Xcm2), + #[codec(index = 3)] + V3(runtime_types::xcm::v3::Xcm2), + } } } } diff --git a/relays/client-bridge-hub-rococo/src/lib.rs b/relays/client-bridge-hub-rococo/src/lib.rs index b329a898565673c33cf372df4ff2a76399040d2e..80a6316a454bf722df560e60399cc73221de4a3d 100644 --- a/relays/client-bridge-hub-rococo/src/lib.rs +++ b/relays/client-bridge-hub-rococo/src/lib.rs @@ -34,7 +34,9 @@ pub use codegen_runtime::api::runtime_types; pub type RuntimeCall = runtime_types::bridge_hub_rococo_runtime::RuntimeCall; pub type BridgeMessagesCall = runtime_types::pallet_bridge_messages::pallet::Call; +pub type BridgeBulletinMessagesCall = runtime_types::pallet_bridge_messages::pallet::Call2; pub type BridgeGrandpaCall = runtime_types::pallet_bridge_grandpa::pallet::Call; +pub type BridgeBulletinGrandpaCall = runtime_types::pallet_bridge_grandpa::pallet::Call2; pub type BridgeParachainCall = runtime_types::pallet_bridge_parachains::pallet::Call; type UncheckedExtrinsic = bp_bridge_hub_rococo::UncheckedExtrinsic; type UtilityCall = runtime_types::pallet_utility::pallet::Call; diff --git a/relays/client-bridge-hub-wococo/Cargo.toml b/relays/client-bridge-hub-westend/Cargo.toml similarity index 83% rename from relays/client-bridge-hub-wococo/Cargo.toml rename to relays/client-bridge-hub-westend/Cargo.toml index 1b3c12c95eb6be93a76a4833205ad5c9380890b0..4eae91963a2aefb2fd96d1e16da2bcd105d9de2c 100644 --- a/relays/client-bridge-hub-wococo/Cargo.toml +++ b/relays/client-bridge-hub-westend/Cargo.toml @@ -1,26 +1,30 @@ [package] -name = "relay-bridge-hub-wococo-client" +name = "relay-bridge-hub-westend-client" version = "0.1.0" authors = ["Parity Technologies "] edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", features = ["derive"] } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } -subxt = { version = "0.32.1", default-features = false, features = ["native"] } +subxt = { version = "0.32.1", default-features = false, features = [] } # Bridge dependencies bp-bridge-hub-rococo = { path = "../../primitives/chain-bridge-hub-rococo" } -bp-bridge-hub-wococo = { path = "../../primitives/chain-bridge-hub-wococo" } +bp-bridge-hub-westend = { path = "../../primitives/chain-bridge-hub-westend" } bp-header-chain = { path = "../../primitives/header-chain" } +bp-messages = { path = "../../primitives/messages" } bp-parachains = { path = "../../primitives/parachains" } bp-polkadot-core = { path = "../../primitives/polkadot-core" } bp-rococo = { path = "../../primitives/chain-rococo" } +bp-runtime = { path = "../../primitives/runtime" } bridge-runtime-common = { path = "../../bin/runtime-common" } -relay-bridge-hub-rococo-client = { path = "../client-bridge-hub-rococo" } relay-substrate-client = { path = "../client-substrate" } # Substrate Dependencies diff --git a/relays/client-bridge-hub-wococo/src/lib.rs b/relays/client-bridge-hub-westend/src/lib.rs similarity index 61% rename from relays/client-bridge-hub-wococo/src/lib.rs rename to relays/client-bridge-hub-westend/src/lib.rs index f32c2ac8bbafdd56945b7d7898d733077ec4af46..825082e10a11a271b62c4eac94a92a6d353bb64f 100644 --- a/relays/client-bridge-hub-wococo/src/lib.rs +++ b/relays/client-bridge-hub-westend/src/lib.rs @@ -14,9 +14,9 @@ // You should have received a copy of the GNU General Public License // along with Parity Bridges Common. If not, see . -//! Types used to connect to the BridgeHub-Wococo-Substrate parachain. +//! Types used to connect to the BridgeHub-Westend-Substrate parachain. -use bp_bridge_hub_wococo::{SignedExtension, AVERAGE_BLOCK_INTERVAL}; +use bp_bridge_hub_westend::AVERAGE_BLOCK_INTERVAL; use bp_polkadot_core::SuffixedCommonSignedExtensionExt; use codec::Encode; use relay_substrate_client::{ @@ -28,46 +28,41 @@ use sp_core::{storage::StorageKey, Pair}; use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount}; use std::time::Duration; -pub use codegen_runtime::api::runtime_types; -use relay_bridge_hub_rococo_client::codegen_runtime; +/// Re-export runtime wrapper +pub mod runtime_wrapper; +pub use runtime_wrapper as runtime; -pub type RuntimeCall = runtime_types::bridge_hub_rococo_runtime::RuntimeCall; -pub type BridgeMessagesCall = runtime_types::pallet_bridge_messages::pallet::Call; -pub type BridgeGrandpaCall = runtime_types::pallet_bridge_grandpa::pallet::Call; -pub type BridgeParachainCall = runtime_types::pallet_bridge_parachains::pallet::Call; -type UncheckedExtrinsic = bp_bridge_hub_wococo::UncheckedExtrinsic; - -/// Wococo chain definition +/// Westend chain definition #[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub struct BridgeHubWococo; +pub struct BridgeHubWestend; -impl UnderlyingChainProvider for BridgeHubWococo { - type Chain = bp_bridge_hub_wococo::BridgeHubWococo; +impl UnderlyingChainProvider for BridgeHubWestend { + type Chain = bp_bridge_hub_westend::BridgeHubWestend; } -impl Chain for BridgeHubWococo { - const NAME: &'static str = "BridgeHubWococo"; +impl Chain for BridgeHubWestend { + const NAME: &'static str = "BridgeHubWestend"; const BEST_FINALIZED_HEADER_ID_METHOD: &'static str = - bp_bridge_hub_wococo::BEST_FINALIZED_BRIDGE_HUB_WOCOCO_HEADER_METHOD; + bp_bridge_hub_westend::BEST_FINALIZED_BRIDGE_HUB_WESTEND_HEADER_METHOD; const AVERAGE_BLOCK_INTERVAL: Duration = AVERAGE_BLOCK_INTERVAL; - type SignedBlock = bp_bridge_hub_wococo::SignedBlock; - type Call = RuntimeCall; + type SignedBlock = bp_bridge_hub_westend::SignedBlock; + type Call = runtime::Call; } -impl ChainWithBalances for BridgeHubWococo { +impl ChainWithBalances for BridgeHubWestend { fn account_info_storage_key(account_id: &Self::AccountId) -> StorageKey { - bp_bridge_hub_wococo::AccountInfoStorageMapKeyProvider::final_key(account_id) + bp_bridge_hub_westend::AccountInfoStorageMapKeyProvider::final_key(account_id) } } -impl ChainWithUtilityPallet for BridgeHubWococo { - type UtilityPallet = MockedRuntimeUtilityPallet; +impl ChainWithUtilityPallet for BridgeHubWestend { + type UtilityPallet = MockedRuntimeUtilityPallet; } -impl ChainWithTransactions for BridgeHubWococo { +impl ChainWithTransactions for BridgeHubWestend { type AccountKeyPair = sp_core::sr25519::Pair; - type SignedTransaction = UncheckedExtrinsic; + type SignedTransaction = runtime::UncheckedExtrinsic; fn sign_transaction( param: SignParam, @@ -75,7 +70,7 @@ impl ChainWithTransactions for BridgeHubWococo { ) -> Result { let raw_payload = SignedPayload::new( unsigned.call, - SignedExtension::from_params( + runtime::SignedExtension::from_params( param.spec_version, param.transaction_version, unsigned.era, @@ -90,7 +85,7 @@ impl ChainWithTransactions for BridgeHubWococo { let signer: sp_runtime::MultiSigner = param.signer.public().into(); let (call, extra, _) = raw_payload.deconstruct(); - Ok(UncheckedExtrinsic::new_signed( + Ok(runtime::UncheckedExtrinsic::new_signed( call, signer.into_account().into(), signature.into(), @@ -106,7 +101,7 @@ impl ChainWithTransactions for BridgeHubWococo { tx.signature .as_ref() .map(|(address, _, _)| { - *address == bp_bridge_hub_wococo::Address::Id(signer.public().into()) + *address == bp_bridge_hub_westend::Address::Id(signer.public().into()) }) .unwrap_or(false) } @@ -117,14 +112,14 @@ impl ChainWithTransactions for BridgeHubWococo { } } -impl ChainWithMessages for BridgeHubWococo { +impl ChainWithMessages for BridgeHubWestend { const WITH_CHAIN_RELAYERS_PALLET_NAME: Option<&'static str> = - Some(bp_bridge_hub_wococo::WITH_BRIDGE_HUB_WOCOCO_RELAYERS_PALLET_NAME); + Some(bp_bridge_hub_westend::WITH_BRIDGE_HUB_WESTEND_RELAYERS_PALLET_NAME); const TO_CHAIN_MESSAGE_DETAILS_METHOD: &'static str = - bp_bridge_hub_wococo::TO_BRIDGE_HUB_WOCOCO_MESSAGE_DETAILS_METHOD; + bp_bridge_hub_westend::TO_BRIDGE_HUB_WESTEND_MESSAGE_DETAILS_METHOD; const FROM_CHAIN_MESSAGE_DETAILS_METHOD: &'static str = - bp_bridge_hub_wococo::FROM_BRIDGE_HUB_WOCOCO_MESSAGE_DETAILS_METHOD; + bp_bridge_hub_westend::FROM_BRIDGE_HUB_WESTEND_MESSAGE_DETAILS_METHOD; } #[cfg(test)] @@ -132,18 +127,16 @@ mod tests { use super::*; use relay_substrate_client::TransactionEra; - type SystemCall = runtime_types::frame_system::pallet::Call; - #[test] fn parse_transaction_works() { let unsigned = UnsignedTransaction { - call: RuntimeCall::System(SystemCall::remark { remark: b"Hello world!".to_vec() }) + call: runtime::Call::System(runtime::SystemCall::remark(b"Hello world!".to_vec())) .into(), nonce: 777, tip: 888, era: TransactionEra::immortal(), }; - let signed_transaction = BridgeHubWococo::sign_transaction( + let signed_transaction = BridgeHubWestend::sign_transaction( SignParam { spec_version: 42, transaction_version: 50000, @@ -153,7 +146,7 @@ mod tests { unsigned.clone(), ) .unwrap(); - let parsed_transaction = BridgeHubWococo::parse_transaction(signed_transaction).unwrap(); + let parsed_transaction = BridgeHubWestend::parse_transaction(signed_transaction).unwrap(); assert_eq!(parsed_transaction, unsigned); } } diff --git a/relays/client-bridge-hub-westend/src/runtime_wrapper.rs b/relays/client-bridge-hub-westend/src/runtime_wrapper.rs new file mode 100644 index 0000000000000000000000000000000000000000..063e9170f0e9985aba649af28ec99d0ba792efe8 --- /dev/null +++ b/relays/client-bridge-hub-westend/src/runtime_wrapper.rs @@ -0,0 +1,116 @@ +// 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 . + +//! Types that are specific to the BridgeHubWestend runtime. +// TODO: regenerate me using `runtime-codegen` tool? (https://github.com/paritytech/parity-bridges-common/issues/1945) + +use codec::{Decode, Encode}; +use scale_info::TypeInfo; + +pub use bp_bridge_hub_westend::SignedExtension; +pub use bp_header_chain::BridgeGrandpaCallOf; +pub use bp_messages::BridgeMessagesCallOf; +pub use bp_parachains::BridgeParachainCall; +pub use relay_substrate_client::calls::{SystemCall, UtilityCall}; + +/// Unchecked BridgeHubWestend extrinsic. +pub type UncheckedExtrinsic = bp_bridge_hub_westend::UncheckedExtrinsic; + +/// The indirect pallet call used to sync `Rococo` GRANDPA finality to `BHWestend`. +pub type BridgeRococoGrandpaCall = BridgeGrandpaCallOf; +/// The indirect pallet call used to sync `BridgeHubRococo` messages to `BridgeHubWestend`. +pub type BridgeRococoMessagesCall = BridgeMessagesCallOf; + +/// `BridgeHubWestend` Runtime `Call` enum. +/// +/// The enum represents a subset of possible `Call`s we can send to `BridgeHubWestend` chain. +/// Ideally this code would be auto-generated from metadata, because we want to +/// avoid depending directly on the ENTIRE runtime just to get the encoding of `Dispatchable`s. +/// +/// All entries here (like pretty much in the entire file) must be kept in sync with +/// `BridgeHubWestend` `construct_runtime`, so that we maintain SCALE-compatibility. +#[allow(clippy::large_enum_variant)] +#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)] +pub enum Call { + #[cfg(test)] + #[codec(index = 0)] + System(SystemCall), + /// Utility pallet. + #[codec(index = 40)] + Utility(UtilityCall), + + /// Rococo grandpa bridge pallet. + #[codec(index = 42)] + BridgeRococoGrandpa(BridgeRococoGrandpaCall), + /// Rococo parachains bridge pallet. + #[codec(index = 43)] + BridgeRococoParachains(BridgeParachainCall), + /// Rococo messages bridge pallet. + #[codec(index = 44)] + BridgeRococoMessages(BridgeRococoMessagesCall), +} + +impl From> for Call { + fn from(call: UtilityCall) -> Call { + Call::Utility(call) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use bp_runtime::BasicOperatingMode; + use sp_consensus_grandpa::AuthorityList; + use sp_core::hexdisplay::HexDisplay; + use sp_runtime::traits::Header; + use std::str::FromStr; + + pub type RelayBlockNumber = bp_polkadot_core::BlockNumber; + pub type RelayBlockHasher = bp_polkadot_core::Hasher; + pub type RelayBlockHeader = sp_runtime::generic::Header; + + #[test] + fn encode_decode_calls() { + let header = RelayBlockHeader::new( + 75, + bp_polkadot_core::Hash::from_str( + "0xd2c0afaab32de0cb8f7f0d89217e37c5ea302c1ffb5a7a83e10d20f12c32874d", + ) + .expect("invalid value"), + bp_polkadot_core::Hash::from_str( + "0x92b965f0656a4e0e5fc0167da2d4b5ee72b3be2c1583c4c1e5236c8c12aa141b", + ) + .expect("invalid value"), + bp_polkadot_core::Hash::from_str( + "0xae4a25acf250d72ed02c149ecc7dd3c9ee976d41a2888fc551de8064521dc01d", + ) + .expect("invalid value"), + Default::default(), + ); + let init_data = bp_header_chain::InitializationData { + header: Box::new(header), + authority_list: AuthorityList::default(), + set_id: 6, + operating_mode: BasicOperatingMode::Normal, + }; + let call = BridgeRococoGrandpaCall::initialize { init_data }; + let tx = Call::BridgeRococoGrandpa(call); + + // encode call as hex string + let hex_encoded_call = format!("0x{:?}", HexDisplay::from(&Encode::encode(&tx))); + assert_eq!(hex_encoded_call, "0x2a01ae4a25acf250d72ed02c149ecc7dd3c9ee976d41a2888fc551de8064521dc01d2d0192b965f0656a4e0e5fc0167da2d4b5ee72b3be2c1583c4c1e5236c8c12aa141bd2c0afaab32de0cb8f7f0d89217e37c5ea302c1ffb5a7a83e10d20f12c32874d0000060000000000000000"); + } +} diff --git a/relays/client-kusama/Cargo.toml b/relays/client-kusama/Cargo.toml index 28e00d87990e139faaf5c093ac2c6cbb703622dd..addccaadebc0f187dd67453405b5b425c5fbb738 100644 --- a/relays/client-kusama/Cargo.toml +++ b/relays/client-kusama/Cargo.toml @@ -5,6 +5,9 @@ authors = ["Parity Technologies "] edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", features = ["derive"] } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } diff --git a/relays/client-kusama/src/lib.rs b/relays/client-kusama/src/lib.rs index d287c70e8e1f6ce5c2eb23af41ef813afd291578..42350ccc52f74c4a431db3e71131af833908320e 100644 --- a/relays/client-kusama/src/lib.rs +++ b/relays/client-kusama/src/lib.rs @@ -78,7 +78,6 @@ impl ChainWithBalances for Kusama { impl RelayChain for Kusama { const PARAS_PALLET_NAME: &'static str = bp_kusama::PARAS_PALLET_NAME; - const PARACHAINS_FINALITY_PALLET_NAME: &'static str = "BridgeKusamaParachain"; } impl ChainWithTransactions for Kusama { diff --git a/relays/client-millau/Cargo.toml b/relays/client-millau/Cargo.toml deleted file mode 100644 index 1b4effa671f340154072885a86b3a13431f96e5f..0000000000000000000000000000000000000000 --- a/relays/client-millau/Cargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -[package] -name = "relay-millau-client" -version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2021" -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" - -[dependencies] -codec = { package = "parity-scale-codec", version = "3.1.5" } -relay-substrate-client = { path = "../client-substrate" } -relay-utils = { path = "../utils" } - -# Supported Chains - -bp-millau = { path = "../../primitives/chain-millau" } -millau-runtime = { path = "../../bin/millau/runtime" } - -# Substrate Dependencies - -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } diff --git a/relays/client-millau/src/lib.rs b/relays/client-millau/src/lib.rs deleted file mode 100644 index 68d71e7bdb77142fd4ddc056659386175d9d3d72..0000000000000000000000000000000000000000 --- a/relays/client-millau/src/lib.rs +++ /dev/null @@ -1,188 +0,0 @@ -// 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 . - -//! Types used to connect to the Millau-Substrate chain. - -use bp_millau::MILLAU_SYNCED_HEADERS_GRANDPA_INFO_METHOD; -use codec::{Compact, Decode, Encode}; -use relay_substrate_client::{ - BalanceOf, Chain, ChainWithBalances, ChainWithGrandpa, ChainWithMessages, - ChainWithTransactions, ChainWithUtilityPallet, Error as SubstrateError, - FullRuntimeUtilityPallet, NonceOf, SignParam, UnderlyingChainProvider, UnsignedTransaction, -}; -use sp_core::{storage::StorageKey, Pair}; -use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount}; -use sp_session::MembershipProof; -use std::time::Duration; - -/// Millau header id. -pub type HeaderId = relay_utils::HeaderId; - -/// Millau chain definition. -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub struct Millau; - -impl UnderlyingChainProvider for Millau { - type Chain = bp_millau::Millau; -} - -impl ChainWithMessages for Millau { - // TODO (https://github.com/paritytech/parity-bridges-common/issues/1692): change the name - const WITH_CHAIN_RELAYERS_PALLET_NAME: Option<&'static str> = Some("BridgeRelayers"); - const TO_CHAIN_MESSAGE_DETAILS_METHOD: &'static str = - bp_millau::TO_MILLAU_MESSAGE_DETAILS_METHOD; - const FROM_CHAIN_MESSAGE_DETAILS_METHOD: &'static str = - bp_millau::FROM_MILLAU_MESSAGE_DETAILS_METHOD; -} - -impl Chain for Millau { - const NAME: &'static str = "Millau"; - const BEST_FINALIZED_HEADER_ID_METHOD: &'static str = - bp_millau::BEST_FINALIZED_MILLAU_HEADER_METHOD; - const AVERAGE_BLOCK_INTERVAL: Duration = Duration::from_secs(5); - - type SignedBlock = millau_runtime::SignedBlock; - type Call = millau_runtime::RuntimeCall; -} - -impl ChainWithGrandpa for Millau { - const SYNCED_HEADERS_GRANDPA_INFO_METHOD: &'static str = - MILLAU_SYNCED_HEADERS_GRANDPA_INFO_METHOD; - - type KeyOwnerProof = MembershipProof; -} - -impl ChainWithBalances for Millau { - fn account_info_storage_key(account_id: &Self::AccountId) -> StorageKey { - use frame_support::storage::generator::StorageMap; - StorageKey(frame_system::Account::::storage_map_final_key( - account_id, - )) - } -} - -impl ChainWithTransactions for Millau { - type AccountKeyPair = sp_core::sr25519::Pair; - type SignedTransaction = millau_runtime::UncheckedExtrinsic; - - fn sign_transaction( - param: SignParam, - unsigned: UnsignedTransaction, - ) -> Result { - let raw_payload = SignedPayload::from_raw( - unsigned.call.clone(), - ( - frame_system::CheckNonZeroSender::::new(), - frame_system::CheckSpecVersion::::new(), - frame_system::CheckTxVersion::::new(), - frame_system::CheckGenesis::::new(), - frame_system::CheckEra::::from(unsigned.era.frame_era()), - frame_system::CheckNonce::::from(unsigned.nonce), - frame_system::CheckWeight::::new(), - pallet_transaction_payment::ChargeTransactionPayment::::from(unsigned.tip), - millau_runtime::BridgeRejectObsoleteHeadersAndMessages, - millau_runtime::BridgeRefundRialtoParachainMessages::default(), - ), - ( - (), - param.spec_version, - param.transaction_version, - param.genesis_hash, - unsigned.era.signed_payload(param.genesis_hash), - (), - (), - (), - (), - () - ), - ); - let signature = raw_payload.using_encoded(|payload| param.signer.sign(payload)); - let signer: sp_runtime::MultiSigner = param.signer.public().into(); - let (call, extra, _) = raw_payload.deconstruct(); - - Ok(millau_runtime::UncheckedExtrinsic::new_signed( - call.into_decoded()?, - signer.into_account(), - signature.into(), - extra, - )) - } - - fn is_signed(tx: &Self::SignedTransaction) -> bool { - tx.signature.is_some() - } - - fn is_signed_by(signer: &Self::AccountKeyPair, tx: &Self::SignedTransaction) -> bool { - tx.signature - .as_ref() - .map(|(address, _, _)| { - *address == millau_runtime::Address::from(*signer.public().as_array_ref()) - }) - .unwrap_or(false) - } - - fn parse_transaction(tx: Self::SignedTransaction) -> Option> { - let extra = &tx.signature.as_ref()?.2; - Some( - UnsignedTransaction::new( - tx.function.into(), - Compact::>::decode(&mut &extra.5.encode()[..]).ok()?.into(), - ) - .tip(Compact::>::decode(&mut &extra.7.encode()[..]).ok()?.into()), - ) - } -} - -impl ChainWithUtilityPallet for Millau { - type UtilityPallet = FullRuntimeUtilityPallet; -} - -/// Millau signing params. -pub type SigningParams = sp_core::sr25519::Pair; - -/// Millau header type used in headers sync. -pub type SyncHeader = relay_substrate_client::SyncHeader; - -#[cfg(test)] -mod tests { - use super::*; - use relay_substrate_client::TransactionEra; - - #[test] - fn parse_transaction_works() { - let unsigned = UnsignedTransaction { - call: millau_runtime::RuntimeCall::System(millau_runtime::SystemCall::remark { - remark: b"Hello world!".to_vec(), - }) - .into(), - nonce: 777, - tip: 888, - era: TransactionEra::immortal(), - }; - let signed_transaction = Millau::sign_transaction( - SignParam { - spec_version: 42, - transaction_version: 50000, - genesis_hash: [42u8; 64].into(), - signer: sp_core::sr25519::Pair::from_seed_slice(&[1u8; 32]).unwrap(), - }, - unsigned.clone(), - ) - .unwrap(); - let parsed_transaction = Millau::parse_transaction(signed_transaction).unwrap(); - assert_eq!(parsed_transaction, unsigned); - } -} diff --git a/relays/client-polkadot-bulletin/Cargo.toml b/relays/client-polkadot-bulletin/Cargo.toml index 31459a53d22fb482d6becfe6b181a2bc9e1dc72f..0ad24708d80b948330d18f2264cab3b7aabeb562 100644 --- a/relays/client-polkadot-bulletin/Cargo.toml +++ b/relays/client-polkadot-bulletin/Cargo.toml @@ -5,6 +5,9 @@ authors = ["Parity Technologies "] edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", features = ["derive"] } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } diff --git a/relays/client-polkadot-bulletin/src/codegen_runtime.rs b/relays/client-polkadot-bulletin/src/codegen_runtime.rs index a30662be2df1d2e3277fb4b0b52f4b1cbf00fcc8..9cfa627badefe9419ca616468014d502d081389e 100644 --- a/relays/client-polkadot-bulletin/src/codegen_runtime.rs +++ b/relays/client-polkadot-bulletin/src/codegen_runtime.rs @@ -16,12 +16,16 @@ //! Autogenerated runtime API //! THIS FILE WAS AUTOGENERATED USING parity-bridges-common::runtime-codegen -//! EXECUTED COMMAND: target/debug/runtime-codegen --from-node-url ws://127.0.0.1:9944 +//! EXECUTED COMMAND: target/debug/runtime-codegen --from-node-url ws://127.0.0.1:10000 #[allow(dead_code, unused_imports, non_camel_case_types)] #[allow(clippy::all)] +#[allow(rustdoc::broken_intra_doc_links)] pub mod api { - use super::api as root_mod; + #[allow(unused_imports)] + mod root_mod { + pub use super::*; + } pub mod runtime_types { use super::runtime_types; pub mod bounded_collections { @@ -78,6 +82,10 @@ pub mod api { pub last_confirmed_nonce: ::core::primitive::u64, } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct InboundMessageDetails { + pub dispatch_weight: ::sp_weights::Weight, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct LaneId(pub [::core::primitive::u8; 4usize]); #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct MessageKey { @@ -98,6 +106,12 @@ pub mod api { pub latest_generated_nonce: ::core::primitive::u64, } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct OutboundMessageDetails { + pub nonce: ::core::primitive::u64, + pub dispatch_weight: ::sp_weights::Weight, + pub size: ::core::primitive::u32, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum ReceivalResult<_0> { #[codec(index = 0)] Dispatched(runtime_types::bp_runtime::messages::MessageDispatchResult<_0>), @@ -205,6 +219,21 @@ pub mod api { #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct StrippableError; } + pub mod bridge_runtime_common { + use super::runtime_types; + pub mod messages_xcm_extension { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum XcmBlobMessageDispatchResult { + #[codec(index = 0)] + InvalidPayload, + #[codec(index = 1)] + Dispatched, + #[codec(index = 2)] + NotDispatched, + } + } + } pub mod finality_grandpa { use super::runtime_types; #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] @@ -405,9 +434,9 @@ pub mod api { #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct AccountInfo<_0, _1> { pub nonce: _0, - pub consumers: _0, - pub providers: _0, - pub sufficients: _0, + pub consumers: ::core::primitive::u32, + pub providers: ::core::primitive::u32, + pub sufficients: ::core::primitive::u32, pub data: _1, } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] @@ -616,21 +645,7 @@ pub mod api { # [codec (index = 0)] NotOperatingNormally , # [codec (index = 1)] InactiveOutboundLane , # [codec (index = 2)] MessageDispatchInactive , # [codec (index = 3)] MessageRejectedByChainVerifier (runtime_types :: bp_messages :: VerificationError ,) , # [codec (index = 4)] MessageRejectedByLaneVerifier (runtime_types :: bp_messages :: VerificationError ,) , # [codec (index = 5)] MessageRejectedByPallet (runtime_types :: bp_messages :: VerificationError ,) , # [codec (index = 6)] FailedToWithdrawMessageFee , # [codec (index = 7)] TooManyMessagesInTheProof , # [codec (index = 8)] InvalidMessagesProof , # [codec (index = 9)] InvalidMessagesDeliveryProof , # [codec (index = 10)] InvalidUnrewardedRelayersState , # [codec (index = 11)] InsufficientDispatchWeight , # [codec (index = 12)] MessageIsNotYetSent , # [codec (index = 13)] ReceivalConfirmation (runtime_types :: pallet_bridge_messages :: outbound_lane :: ReceivalConfirmationError ,) , # [codec (index = 14)] BridgeModule (runtime_types :: bp_runtime :: OwnedBridgeModuleError ,) , } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum Event { - #[codec(index = 0)] - MessageAccepted { - lane_id: runtime_types::bp_messages::LaneId, - nonce: ::core::primitive::u64, - }, - #[codec(index = 1)] - MessagesReceived( - ::std::vec::Vec>, - ), - #[codec(index = 2)] - 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_parachains { @@ -834,9 +849,9 @@ pub mod api { #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct Heartbeat<_0> { pub block_number: _0, - pub session_index: _0, - pub authority_index: _0, - pub validators_len: _0, + pub session_index: ::core::primitive::u32, + pub authority_index: ::core::primitive::u32, + pub validators_len: ::core::primitive::u32, } } pub mod pallet_offences { @@ -853,6 +868,30 @@ pub mod api { } } } + pub mod pallet_relayer_set { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + Duplicate, + #[codec(index = 1)] + NotARelayer, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + RelayerAdded(::sp_core::crypto::AccountId32), + #[codec(index = 1)] + RelayerRemoved(::sp_core::crypto::AccountId32), + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Relayer<_0> { + pub min_bridge_tx_block: _0, + } + } pub mod pallet_session { use super::runtime_types; pub mod pallet { @@ -1064,13 +1103,6 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Call { - #[codec(index = 0)] - add_validator { who: ::sp_core::crypto::AccountId32 }, - #[codec(index = 1)] - remove_validator { who: ::sp_core::crypto::AccountId32 }, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum Error { #[codec(index = 0)] Duplicate, @@ -1104,6 +1136,8 @@ pub mod api { } } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BridgeRejectObsoleteHeadersAndMessages; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct Runtime; #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum RuntimeCall { @@ -1113,53 +1147,76 @@ pub mod api { Babe(runtime_types::pallet_babe::pallet::Call), #[codec(index = 2)] Timestamp(runtime_types::pallet_timestamp::pallet::Call), - #[codec(index = 6)] - ValidatorSet(runtime_types::pallet_validator_set::pallet::Call), - #[codec(index = 7)] + #[codec(index = 14)] Session(runtime_types::pallet_session::pallet::Call), - #[codec(index = 8)] + #[codec(index = 15)] ImOnline(runtime_types::pallet_im_online::pallet::Call), - #[codec(index = 9)] + #[codec(index = 16)] Grandpa(runtime_types::pallet_grandpa::pallet::Call), - #[codec(index = 10)] - Sudo(runtime_types::pallet_sudo::pallet::Call), - #[codec(index = 11)] + #[codec(index = 40)] TransactionStorage(runtime_types::pallet_transaction_storage::pallet::Call), - #[codec(index = 12)] + #[codec(index = 51)] BridgePolkadotGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Call), - #[codec(index = 13)] + #[codec(index = 52)] BridgePolkadotParachains(runtime_types::pallet_bridge_parachains::pallet::Call), + #[codec(index = 53)] + BridgePolkadotMessages(runtime_types::pallet_bridge_messages::pallet::Call), + #[codec(index = 255)] + Sudo(runtime_types::pallet_sudo::pallet::Call), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum RuntimeError { + #[codec(index = 0)] + System(runtime_types::frame_system::pallet::Error), + #[codec(index = 1)] + Babe(runtime_types::pallet_babe::pallet::Error), + #[codec(index = 13)] + ValidatorSet(runtime_types::pallet_validator_set::pallet::Error), #[codec(index = 14)] - BridgePolkadotBridgeHubMessages( - runtime_types::pallet_bridge_messages::pallet::Call, - ), + Session(runtime_types::pallet_session::pallet::Error), + #[codec(index = 15)] + ImOnline(runtime_types::pallet_im_online::pallet::Error), + #[codec(index = 16)] + Grandpa(runtime_types::pallet_grandpa::pallet::Error), + #[codec(index = 40)] + TransactionStorage(runtime_types::pallet_transaction_storage::pallet::Error), + #[codec(index = 50)] + RelayerSet(runtime_types::pallet_relayer_set::pallet::Error), + #[codec(index = 51)] + BridgePolkadotGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Error), + #[codec(index = 52)] + BridgePolkadotParachains(runtime_types::pallet_bridge_parachains::pallet::Error), + #[codec(index = 53)] + BridgePolkadotMessages(runtime_types::pallet_bridge_messages::pallet::Error), + #[codec(index = 255)] + Sudo(runtime_types::pallet_sudo::pallet::Error), } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub enum RuntimeEvent { #[codec(index = 0)] System(runtime_types::frame_system::pallet::Event), - #[codec(index = 4)] + #[codec(index = 11)] Offences(runtime_types::pallet_offences::pallet::Event), - #[codec(index = 6)] + #[codec(index = 13)] ValidatorSet(runtime_types::pallet_validator_set::pallet::Event), - #[codec(index = 7)] + #[codec(index = 14)] Session(runtime_types::pallet_session::pallet::Event), - #[codec(index = 8)] + #[codec(index = 15)] ImOnline(runtime_types::pallet_im_online::pallet::Event), - #[codec(index = 9)] + #[codec(index = 16)] Grandpa(runtime_types::pallet_grandpa::pallet::Event), - #[codec(index = 10)] - Sudo(runtime_types::pallet_sudo::pallet::Event), - #[codec(index = 11)] + #[codec(index = 40)] TransactionStorage(runtime_types::pallet_transaction_storage::pallet::Event), - #[codec(index = 12)] + #[codec(index = 50)] + RelayerSet(runtime_types::pallet_relayer_set::pallet::Event), + #[codec(index = 51)] BridgePolkadotGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Event), - #[codec(index = 13)] + #[codec(index = 52)] BridgePolkadotParachains(runtime_types::pallet_bridge_parachains::pallet::Event), - #[codec(index = 14)] - BridgePolkadotBridgeHubMessages( - runtime_types::pallet_bridge_messages::pallet::Event, - ), + #[codec(index = 53)] + BridgePolkadotMessages(runtime_types::pallet_bridge_messages::pallet::Event), + #[codec(index = 255)] + Sudo(runtime_types::pallet_sudo::pallet::Event), } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct ValidateSigned; @@ -1232,10 +1289,36 @@ pub mod api { PrimaryAndSecondaryVRFSlots, } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BabeConfiguration { + pub slot_duration: ::core::primitive::u64, + pub epoch_length: ::core::primitive::u64, + pub c: (::core::primitive::u64, ::core::primitive::u64), + pub authorities: ::std::vec::Vec<( + runtime_types::sp_consensus_babe::app::Public, + ::core::primitive::u64, + )>, + pub randomness: [::core::primitive::u8; 32usize], + pub allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct BabeEpochConfiguration { pub c: (::core::primitive::u64, ::core::primitive::u64), pub allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Epoch { + pub epoch_index: ::core::primitive::u64, + pub start_slot: runtime_types::sp_consensus_slots::Slot, + pub duration: ::core::primitive::u64, + pub authorities: ::std::vec::Vec<( + runtime_types::sp_consensus_babe::app::Public, + ::core::primitive::u64, + )>, + pub randomness: [::core::primitive::u8; 32usize], + pub config: runtime_types::sp_consensus_babe::BabeEpochConfiguration, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct OpaqueKeyOwnershipProof(pub ::std::vec::Vec<::core::primitive::u8>); } pub mod sp_consensus_grandpa { use super::runtime_types; @@ -1265,6 +1348,8 @@ pub mod api { >, ), } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct OpaqueKeyOwnershipProof(pub ::std::vec::Vec<::core::primitive::u8>); } pub mod sp_consensus_slots { use super::runtime_types; @@ -1319,11 +1404,37 @@ pub mod api { #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] pub struct Signature(pub [::core::primitive::u8; 64usize]); } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct OpaqueMetadata(pub ::std::vec::Vec<::core::primitive::u8>); + } + pub mod sp_inherents { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CheckInherentsResult { + pub okay: ::core::primitive::bool, + pub fatal_error: ::core::primitive::bool, + pub errors: runtime_types::sp_inherents::InherentData, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct InherentData { + pub data: ::subxt::utils::KeyedVec< + [::core::primitive::u8; 8usize], + ::std::vec::Vec<::core::primitive::u8>, + >, + } } pub mod sp_runtime { use super::runtime_types; pub mod generic { use super::runtime_types; + pub mod block { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Block<_0, _1> { + pub header: _0, + pub extrinsics: ::std::vec::Vec<_1>, + } + } pub mod digest { use super::runtime_types; #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] @@ -1349,13 +1460,66 @@ pub mod api { RuntimeEnvironmentUpdated, } } - pub mod unchecked_extrinsic { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct UncheckedExtrinsic<_0, _1, _2, _3>( - pub ::std::vec::Vec<::core::primitive::u8>, - #[codec(skip)] pub ::core::marker::PhantomData<(_1, _0, _2, _3)>, - ); + } + pub mod transaction_validity { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum InvalidTransaction { + #[codec(index = 0)] + Call, + #[codec(index = 1)] + Payment, + #[codec(index = 2)] + Future, + #[codec(index = 3)] + Stale, + #[codec(index = 4)] + BadProof, + #[codec(index = 5)] + AncientBirthBlock, + #[codec(index = 6)] + ExhaustsResources, + #[codec(index = 7)] + Custom(::core::primitive::u8), + #[codec(index = 8)] + BadMandatory, + #[codec(index = 9)] + MandatoryValidation, + #[codec(index = 10)] + BadSigner, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum TransactionSource { + #[codec(index = 0)] + InBlock, + #[codec(index = 1)] + Local, + #[codec(index = 2)] + External, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum TransactionValidityError { + #[codec(index = 0)] + Invalid(runtime_types::sp_runtime::transaction_validity::InvalidTransaction), + #[codec(index = 1)] + Unknown(runtime_types::sp_runtime::transaction_validity::UnknownTransaction), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum UnknownTransaction { + #[codec(index = 0)] + CannotLookup, + #[codec(index = 1)] + NoUnsignedValidator, + #[codec(index = 2)] + Custom(::core::primitive::u8), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ValidTransaction { + pub priority: ::core::primitive::u64, + pub requires: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + pub provides: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + pub longevity: ::core::primitive::u64, + pub propagate: ::core::primitive::bool, } } #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] diff --git a/relays/client-polkadot-bulletin/src/lib.rs b/relays/client-polkadot-bulletin/src/lib.rs index 55a3b96bf83dbd4c5636f8b94d0b07904560c11c..647df2ada32ec9e6f21d5d94a90460d720c4ae12 100644 --- a/relays/client-polkadot-bulletin/src/lib.rs +++ b/relays/client-polkadot-bulletin/src/lib.rs @@ -42,7 +42,7 @@ pub type BridgePolkadotGrandpaCall = runtime_types::pallet_bridge_grandpa::palle /// Call of the with-PolkadotBridgeHub bridge parachains pallet. pub type BridgePolkadotParachainsCall = runtime_types::pallet_bridge_parachains::pallet::Call; /// Call of the with-PolkadotBridgeHub bridge messages pallet. -pub type BridgePolkadotBridgeHubMessagesCall = runtime_types::pallet_bridge_messages::pallet::Call; +pub type BridgePolkadotMessagesCall = runtime_types::pallet_bridge_messages::pallet::Call; /// Polkadot header id. pub type HeaderId = diff --git a/relays/client-polkadot/Cargo.toml b/relays/client-polkadot/Cargo.toml index b61c1791bb79f6c5d2ae65c4a61d101e22c93433..f3ddab4df34a45a38cfc1c59df46c9852c0b3069 100644 --- a/relays/client-polkadot/Cargo.toml +++ b/relays/client-polkadot/Cargo.toml @@ -5,6 +5,9 @@ authors = ["Parity Technologies "] edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", features = ["derive"] } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } diff --git a/relays/client-polkadot/src/lib.rs b/relays/client-polkadot/src/lib.rs index 44dfebb48bc2a8e3db245692838b968dd2eddd30..8e2a2c81748b7d1e51a648c23257a71ca9cf211b 100644 --- a/relays/client-polkadot/src/lib.rs +++ b/relays/client-polkadot/src/lib.rs @@ -78,7 +78,6 @@ impl ChainWithBalances for Polkadot { impl RelayChain for Polkadot { const PARAS_PALLET_NAME: &'static str = bp_polkadot::PARAS_PALLET_NAME; - const PARACHAINS_FINALITY_PALLET_NAME: &'static str = "BridgePolkadotParachain"; } impl ChainWithTransactions for Polkadot { diff --git a/relays/client-rialto-parachain/Cargo.toml b/relays/client-rialto-parachain/Cargo.toml deleted file mode 100644 index d7f58ffe0df2884bf3ca8ba3c5b522812e872027..0000000000000000000000000000000000000000 --- a/relays/client-rialto-parachain/Cargo.toml +++ /dev/null @@ -1,29 +0,0 @@ -[package] -name = "relay-rialto-parachain-client" -version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2021" -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.10.0", default-features = false, features = ["derive"] } -subxt = { version = "0.32.1", default-features = false, features = ["native"] } - -# Bridge dependencies - -bp-bridge-hub-cumulus = { path = "../../primitives/chain-bridge-hub-cumulus" } -bp-header-chain = { path = "../../primitives/header-chain" } -bp-messages = { path = "../../primitives/messages" } -bp-millau = { path = "../../primitives/chain-millau" } -bp-polkadot-core = { path = "../../primitives/polkadot-core" } -bp-rialto-parachain = { path = "../../primitives/chain-rialto-parachain" } - -bridge-runtime-common = { path = "../../bin/runtime-common" } -relay-substrate-client = { path = "../client-substrate" } - -# Substrate Dependencies - -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-weights = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } diff --git a/relays/client-rialto-parachain/src/codegen_runtime.rs b/relays/client-rialto-parachain/src/codegen_runtime.rs deleted file mode 100644 index 06d6d1e710ecd8e615c37fefc1ab956333bae9a7..0000000000000000000000000000000000000000 --- a/relays/client-rialto-parachain/src/codegen_runtime.rs +++ /dev/null @@ -1,2958 +0,0 @@ -// Copyright 2019-2023 Parity Technologies (UK) Ltd. -// This file is part of Parity Bridges Common. - -// Parity Bridges Common is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity Bridges Common is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity Bridges Common. If not, see . - -//! Autogenerated runtime API -//! THIS FILE WAS AUTOGENERATED USING parity-bridges-common::runtime-codegen -//! EXECUTED COMMAND: target/debug/runtime-codegen --from-node-url http://localhost:20433 - -#[allow(dead_code, unused_imports, non_camel_case_types)] -#[allow(clippy::all)] -pub mod api { - use super::api as root_mod; - 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(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct BoundedVec<_0>(pub ::std::vec::Vec<_0>); - } - pub mod weak_bounded_vec { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct WeakBoundedVec<_0>(pub ::std::vec::Vec<_0>); - } - } - pub mod bp_header_chain { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct StoredHeaderData<_0, _1> { - pub number: _0, - pub state_root: _1, - } - } - pub mod bp_messages { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct DeliveredMessages { - pub begin: ::core::primitive::u64, - pub end: ::core::primitive::u64, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct InboundLaneData<_0> { - pub relayers: ::std::vec::Vec>, - pub last_confirmed_nonce: ::core::primitive::u64, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct LaneId(pub [::core::primitive::u8; 4usize]); - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct MessageKey { - pub lane_id: runtime_types::bp_messages::LaneId, - pub nonce: ::core::primitive::u64, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum MessagesOperatingMode { - #[codec(index = 0)] - Basic(runtime_types::bp_runtime::BasicOperatingMode), - #[codec(index = 1)] - RejectingOutboundMessages, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - 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(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum ReceivalResult<_0> { - #[codec(index = 0)] - Dispatched(runtime_types::bp_runtime::messages::MessageDispatchResult<_0>), - #[codec(index = 1)] - InvalidNonce, - #[codec(index = 2)] - TooManyUnrewardedRelayers, - #[codec(index = 3)] - TooManyUnconfirmedMessages, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct ReceivedMessages<_0> { - pub lane: runtime_types::bp_messages::LaneId, - pub receive_results: ::std::vec::Vec<( - ::core::primitive::u64, - runtime_types::bp_messages::ReceivalResult<_0>, - )>, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct UnrewardedRelayer<_0> { - pub relayer: _0, - pub messages: runtime_types::bp_messages::DeliveredMessages, - } - } - pub mod bp_relayers { - use super::runtime_types; - pub mod registration { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct Registration<_0, _1> { - pub valid_till: _0, - pub stake: _1, - } - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum RewardsAccountOwner { - #[codec(index = 0)] - ThisChain, - #[codec(index = 1)] - BridgedChain, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct RewardsAccountParams { - pub lane_id: runtime_types::bp_messages::LaneId, - pub bridged_chain_id: [::core::primitive::u8; 4usize], - pub owner: runtime_types::bp_relayers::RewardsAccountOwner, - } - } - pub mod bp_runtime { - use super::runtime_types; - pub mod messages { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct MessageDispatchResult<_0> { - pub unspent_weight: ::sp_weights::Weight, - pub dispatch_level_result: _0, - } - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum BasicOperatingMode { - #[codec(index = 0)] - Normal, - #[codec(index = 1)] - Halted, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct HeaderId<_0, _1>(pub _1, pub _0); - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum OwnedBridgeModuleError { - #[codec(index = 0)] - Halted, - } - } - pub mod bridge_runtime_common { - use super::runtime_types; - pub mod messages_xcm_extension { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum XcmBlobMessageDispatchResult { - #[codec(index = 0)] - InvalidPayload, - #[codec(index = 1)] - Dispatched, - #[codec(index = 2)] - NotDispatched, - } - } - } - pub mod cumulus_pallet_dmp_queue { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Call { - #[codec(index = 0)] - service_overweight { - index: ::core::primitive::u64, - weight_limit: ::sp_weights::Weight, - }, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Error { - #[codec(index = 0)] - Unknown, - #[codec(index = 1)] - OverLimit, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Event { - #[codec(index = 0)] - InvalidFormat { message_id: [::core::primitive::u8; 32usize] }, - #[codec(index = 1)] - UnsupportedVersion { message_id: [::core::primitive::u8; 32usize] }, - #[codec(index = 2)] - ExecutedDownward { - message_id: [::core::primitive::u8; 32usize], - outcome: runtime_types::xcm::v3::traits::Outcome, - }, - #[codec(index = 3)] - WeightExhausted { - message_id: [::core::primitive::u8; 32usize], - remaining_weight: ::sp_weights::Weight, - required_weight: ::sp_weights::Weight, - }, - #[codec(index = 4)] - OverweightEnqueued { - message_id: [::core::primitive::u8; 32usize], - overweight_index: ::core::primitive::u64, - required_weight: ::sp_weights::Weight, - }, - #[codec(index = 5)] - OverweightServiced { - overweight_index: ::core::primitive::u64, - weight_used: ::sp_weights::Weight, - }, - #[codec(index = 6)] - MaxMessagesExhausted { message_id: [::core::primitive::u8; 32usize] }, - } - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct ConfigData { - pub max_individual: ::sp_weights::Weight, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct PageIndexData { - pub begin_used: ::core::primitive::u32, - pub end_used: ::core::primitive::u32, - pub overweight_count: ::core::primitive::u64, - } - } - pub mod cumulus_pallet_parachain_system { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Call { - # [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, PartialEq)] - pub enum Error { - #[codec(index = 0)] - OverlappingUpgrades, - #[codec(index = 1)] - ProhibitedByPolkadot, - #[codec(index = 2)] - TooBig, - #[codec(index = 3)] - ValidationDataNotAvailable, - #[codec(index = 4)] - HostConfigurationNotAvailable, - #[codec(index = 5)] - NotScheduled, - #[codec(index = 6)] - NothingAuthorized, - #[codec(index = 7)] - Unauthorized, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Event { - #[codec(index = 0)] - ValidationFunctionStored, - #[codec(index = 1)] - ValidationFunctionApplied { relay_chain_block_num: ::core::primitive::u32 }, - #[codec(index = 2)] - ValidationFunctionDiscarded, - #[codec(index = 3)] - UpgradeAuthorized { code_hash: ::subxt::utils::H256 }, - #[codec(index = 4)] - DownwardMessagesReceived { count: ::core::primitive::u32 }, - #[codec(index = 5)] - DownwardMessagesProcessed { - weight_used: ::sp_weights::Weight, - dmq_head: ::subxt::utils::H256, - }, - #[codec(index = 6)] - UpwardMessageSent { - message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, - }, - } - } - pub mod relay_state_snapshot { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct MessagingStateSnapshot { - pub dmq_mqc_head: ::subxt::utils::H256, - pub relay_dispatch_queue_size: (::core::primitive::u32, ::core::primitive::u32), - pub ingress_channels: ::std::vec::Vec<( - runtime_types::polkadot_parachain::primitives::Id, - runtime_types::polkadot_primitives::v4::AbridgedHrmpChannel, - )>, - pub egress_channels: ::std::vec::Vec<( - runtime_types::polkadot_parachain::primitives::Id, - runtime_types::polkadot_primitives::v4::AbridgedHrmpChannel, - )>, - } - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct CodeUpgradeAuthorization { - pub code_hash: ::subxt::utils::H256, - pub check_version: ::core::primitive::bool, - } - } - pub mod cumulus_pallet_xcm { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Call {} - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Error {} - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Event { - #[codec(index = 0)] - InvalidFormat([::core::primitive::u8; 32usize]), - #[codec(index = 1)] - UnsupportedVersion([::core::primitive::u8; 32usize]), - #[codec(index = 2)] - ExecutedDownward( - [::core::primitive::u8; 32usize], - runtime_types::xcm::v3::traits::Outcome, - ), - } - } - } - pub mod cumulus_pallet_xcmp_queue { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Call { - #[codec(index = 0)] - service_overweight { - index: ::core::primitive::u64, - weight_limit: ::sp_weights::Weight, - }, - #[codec(index = 1)] - suspend_xcm_execution, - #[codec(index = 2)] - resume_xcm_execution, - #[codec(index = 3)] - update_suspend_threshold { new: ::core::primitive::u32 }, - #[codec(index = 4)] - update_drop_threshold { new: ::core::primitive::u32 }, - #[codec(index = 5)] - update_resume_threshold { new: ::core::primitive::u32 }, - #[codec(index = 6)] - update_threshold_weight { new: ::sp_weights::Weight }, - #[codec(index = 7)] - update_weight_restrict_decay { new: ::sp_weights::Weight }, - #[codec(index = 8)] - update_xcmp_max_individual_weight { new: ::sp_weights::Weight }, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Error { - #[codec(index = 0)] - FailedToSend, - #[codec(index = 1)] - BadXcmOrigin, - #[codec(index = 2)] - BadXcm, - #[codec(index = 3)] - BadOverweightIndex, - #[codec(index = 4)] - WeightOverLimit, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Event { - #[codec(index = 0)] - Success { - message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, - weight: ::sp_weights::Weight, - }, - #[codec(index = 1)] - Fail { - message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, - error: runtime_types::xcm::v3::traits::Error, - weight: ::sp_weights::Weight, - }, - #[codec(index = 2)] - BadVersion { - message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, - }, - #[codec(index = 3)] - BadFormat { - message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, - }, - #[codec(index = 4)] - XcmpMessageSent { - message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, - }, - #[codec(index = 5)] - OverweightEnqueued { - sender: runtime_types::polkadot_parachain::primitives::Id, - sent_at: ::core::primitive::u32, - index: ::core::primitive::u64, - required: ::sp_weights::Weight, - }, - #[codec(index = 6)] - OverweightServiced { index: ::core::primitive::u64, used: ::sp_weights::Weight }, - } - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct InboundChannelDetails { - pub sender: runtime_types::polkadot_parachain::primitives::Id, - pub state: runtime_types::cumulus_pallet_xcmp_queue::InboundState, - pub message_metadata: ::std::vec::Vec<( - ::core::primitive::u32, - runtime_types::polkadot_parachain::primitives::XcmpMessageFormat, - )>, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum InboundState { - #[codec(index = 0)] - Ok, - #[codec(index = 1)] - Suspended, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct OutboundChannelDetails { - pub recipient: runtime_types::polkadot_parachain::primitives::Id, - pub state: runtime_types::cumulus_pallet_xcmp_queue::OutboundState, - pub signals_exist: ::core::primitive::bool, - pub first_index: ::core::primitive::u16, - pub last_index: ::core::primitive::u16, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum OutboundState { - #[codec(index = 0)] - Ok, - #[codec(index = 1)] - Suspended, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct QueueConfigData { - pub suspend_threshold: ::core::primitive::u32, - pub drop_threshold: ::core::primitive::u32, - pub resume_threshold: ::core::primitive::u32, - pub threshold_weight: ::sp_weights::Weight, - pub weight_restrict_decay: ::sp_weights::Weight, - pub xcmp_max_individual_weight: ::sp_weights::Weight, - } - } - pub mod cumulus_primitives_parachain_inherent { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct MessageQueueChain(pub ::subxt::utils::H256); - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct ParachainInherentData { - pub validation_data: - runtime_types::polkadot_primitives::v4::PersistedValidationData< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - pub relay_chain_state: runtime_types::sp_trie::storage_proof::StorageProof, - pub downward_messages: ::std::vec::Vec< - runtime_types::polkadot_core_primitives::InboundDownwardMessage< - ::core::primitive::u32, - >, - >, - pub horizontal_messages: ::subxt::utils::KeyedVec< - runtime_types::polkadot_parachain::primitives::Id, - ::std::vec::Vec< - runtime_types::polkadot_core_primitives::InboundHrmpMessage< - ::core::primitive::u32, - >, - >, - >, - } - } - pub mod finality_grandpa { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct Commit<_0, _1, _2, _3> { - pub target_hash: _0, - pub target_number: _1, - pub precommits: ::std::vec::Vec< - runtime_types::finality_grandpa::SignedPrecommit<_0, _1, _2, _3>, - >, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct Precommit<_0, _1> { - pub target_hash: _0, - pub target_number: _1, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct SignedPrecommit<_0, _1, _2, _3> { - pub precommit: runtime_types::finality_grandpa::Precommit<_0, _1>, - pub signature: _2, - pub id: _3, - } - } - pub mod frame_support { - use super::runtime_types; - pub mod dispatch { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum DispatchClass { - #[codec(index = 0)] - Normal, - #[codec(index = 1)] - Operational, - #[codec(index = 2)] - Mandatory, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - 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(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Pays { - #[codec(index = 0)] - Yes, - #[codec(index = 1)] - No, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct PerDispatchClass<_0> { - pub normal: _0, - pub operational: _0, - pub mandatory: _0, - } - } - pub mod traits { - use super::runtime_types; - pub mod tokens { - use super::runtime_types; - pub mod misc { - use super::runtime_types; - #[derive( - :: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq, - )] - pub enum BalanceStatus { - #[codec(index = 0)] - Free, - #[codec(index = 1)] - Reserved, - } - } - } - } - } - pub mod frame_system { - use super::runtime_types; - pub mod extensions { - use super::runtime_types; - pub mod check_genesis { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct CheckGenesis; - } - pub mod check_mortality { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct CheckMortality(pub ::sp_runtime::generic::Era); - } - pub mod check_non_zero_sender { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct CheckNonZeroSender; - } - pub mod check_nonce { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct CheckNonce(#[codec(compact)] pub ::core::primitive::u32); - } - pub mod check_spec_version { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct CheckSpecVersion; - } - pub mod check_tx_version { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct CheckTxVersion; - } - pub mod check_weight { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct CheckWeight; - } - } - pub mod limits { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct BlockLength { - pub max: runtime_types::frame_support::dispatch::PerDispatchClass< - ::core::primitive::u32, - >, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct BlockWeights { - pub base_block: ::sp_weights::Weight, - pub max_block: ::sp_weights::Weight, - pub per_class: runtime_types::frame_support::dispatch::PerDispatchClass< - runtime_types::frame_system::limits::WeightsPerClass, - >, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct WeightsPerClass { - pub base_extrinsic: ::sp_weights::Weight, - pub max_extrinsic: ::core::option::Option<::sp_weights::Weight>, - pub max_total: ::core::option::Option<::sp_weights::Weight>, - pub reserved: ::core::option::Option<::sp_weights::Weight>, - } - } - pub mod pallet { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Call { - #[codec(index = 0)] - remark { remark: ::std::vec::Vec<::core::primitive::u8> }, - #[codec(index = 1)] - set_heap_pages { pages: ::core::primitive::u64 }, - #[codec(index = 2)] - set_code { code: ::std::vec::Vec<::core::primitive::u8> }, - #[codec(index = 3)] - set_code_without_checks { code: ::std::vec::Vec<::core::primitive::u8> }, - #[codec(index = 4)] - set_storage { - items: ::std::vec::Vec<( - ::std::vec::Vec<::core::primitive::u8>, - ::std::vec::Vec<::core::primitive::u8>, - )>, - }, - #[codec(index = 5)] - kill_storage { keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>> }, - #[codec(index = 6)] - kill_prefix { - prefix: ::std::vec::Vec<::core::primitive::u8>, - subkeys: ::core::primitive::u32, - }, - #[codec(index = 7)] - remark_with_event { remark: ::std::vec::Vec<::core::primitive::u8> }, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Error { - #[codec(index = 0)] - InvalidSpecName, - #[codec(index = 1)] - SpecVersionNeedsToIncrease, - #[codec(index = 2)] - FailedToExtractRuntimeVersion, - #[codec(index = 3)] - NonDefaultComposite, - #[codec(index = 4)] - NonZeroRefCount, - #[codec(index = 5)] - CallFiltered, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Event { - #[codec(index = 0)] - ExtrinsicSuccess { - dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, - }, - #[codec(index = 1)] - ExtrinsicFailed { - dispatch_error: runtime_types::sp_runtime::DispatchError, - dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, - }, - #[codec(index = 2)] - CodeUpdated, - #[codec(index = 3)] - NewAccount { account: ::sp_core::crypto::AccountId32 }, - #[codec(index = 4)] - KilledAccount { account: ::sp_core::crypto::AccountId32 }, - #[codec(index = 5)] - Remarked { sender: ::sp_core::crypto::AccountId32, hash: ::subxt::utils::H256 }, - } - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct AccountInfo<_0, _1> { - pub nonce: _0, - pub consumers: _0, - pub providers: _0, - pub sufficients: _0, - pub data: _1, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct EventRecord<_0, _1> { - pub phase: runtime_types::frame_system::Phase, - pub event: _0, - pub topics: ::std::vec::Vec<_1>, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct LastRuntimeUpgradeInfo { - #[codec(compact)] - pub spec_version: ::core::primitive::u32, - pub spec_name: ::std::string::String, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Phase { - #[codec(index = 0)] - ApplyExtrinsic(::core::primitive::u32), - #[codec(index = 1)] - Finalization, - #[codec(index = 2)] - Initialization, - } - } - pub mod pallet_balances { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Call { - #[codec(index = 0)] - transfer_allow_death { - dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 1)] - set_balance_deprecated { - who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - #[codec(compact)] - new_free: ::core::primitive::u128, - #[codec(compact)] - old_reserved: ::core::primitive::u128, - }, - #[codec(index = 2)] - force_transfer { - source: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 3)] - transfer_keep_alive { - dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 4)] - transfer_all { - dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - keep_alive: ::core::primitive::bool, - }, - #[codec(index = 5)] - force_unreserve { - who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - amount: ::core::primitive::u128, - }, - #[codec(index = 6)] - upgrade_accounts { who: ::std::vec::Vec<::sp_core::crypto::AccountId32> }, - #[codec(index = 7)] - transfer { - dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 8)] - force_set_balance { - who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - #[codec(compact)] - new_free: ::core::primitive::u128, - }, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Error { - #[codec(index = 0)] - VestingBalance, - #[codec(index = 1)] - LiquidityRestrictions, - #[codec(index = 2)] - InsufficientBalance, - #[codec(index = 3)] - ExistentialDeposit, - #[codec(index = 4)] - Expendability, - #[codec(index = 5)] - ExistingVestingSchedule, - #[codec(index = 6)] - DeadAccount, - #[codec(index = 7)] - TooManyReserves, - #[codec(index = 8)] - TooManyHolds, - #[codec(index = 9)] - TooManyFreezes, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Event { - #[codec(index = 0)] - Endowed { - account: ::sp_core::crypto::AccountId32, - free_balance: ::core::primitive::u128, - }, - #[codec(index = 1)] - DustLost { - account: ::sp_core::crypto::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 2)] - Transfer { - from: ::sp_core::crypto::AccountId32, - to: ::sp_core::crypto::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 3)] - BalanceSet { - who: ::sp_core::crypto::AccountId32, - free: ::core::primitive::u128, - }, - #[codec(index = 4)] - Reserved { - who: ::sp_core::crypto::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 5)] - Unreserved { - who: ::sp_core::crypto::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 6)] - ReserveRepatriated { - from: ::sp_core::crypto::AccountId32, - to: ::sp_core::crypto::AccountId32, - amount: ::core::primitive::u128, - destination_status: - runtime_types::frame_support::traits::tokens::misc::BalanceStatus, - }, - #[codec(index = 7)] - Deposit { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, - #[codec(index = 8)] - Withdraw { - who: ::sp_core::crypto::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 9)] - Slashed { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, - #[codec(index = 10)] - Minted { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, - #[codec(index = 11)] - Burned { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, - #[codec(index = 12)] - Suspended { - who: ::sp_core::crypto::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 13)] - Restored { - who: ::sp_core::crypto::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 14)] - Upgraded { who: ::sp_core::crypto::AccountId32 }, - #[codec(index = 15)] - Issued { amount: ::core::primitive::u128 }, - #[codec(index = 16)] - 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(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct AccountData<_0> { - pub free: _0, - pub reserved: _0, - pub frozen: _0, - pub flags: runtime_types::pallet_balances::types::ExtraFlags, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - 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, - Clone, - Debug, - PartialEq, - )] - pub struct ExtraFlags(pub ::core::primitive::u128); - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct IdAmount<_0, _1> { - pub id: _0, - pub amount: _1, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Reasons { - #[codec(index = 0)] - Fee, - #[codec(index = 1)] - Misc, - #[codec(index = 2)] - All, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct ReserveData<_0, _1> { - pub id: _0, - pub amount: _1, - } - } - } - pub mod pallet_bridge_grandpa { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Call { - #[codec(index = 0)] - submit_finality_proof { - finality_target: ::std::boxed::Box< - ::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, - >, - >, - }, - #[codec(index = 1)] - initialize { - init_data: ::bp_header_chain::InitializationData< - ::sp_runtime::generic::Header< - ::core::primitive::u64, - ::bp_millau::BlakeTwoAndKeccak256, - >, - >, - }, - #[codec(index = 2)] - set_owner { new_owner: ::core::option::Option<::sp_core::crypto::AccountId32> }, - #[codec(index = 3)] - set_operating_mode { - operating_mode: runtime_types::bp_runtime::BasicOperatingMode, - }, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Error { - #[codec(index = 0)] - InvalidJustification, - #[codec(index = 1)] - InvalidAuthoritySet, - #[codec(index = 2)] - OldHeader, - #[codec(index = 3)] - UnsupportedScheduledChange, - #[codec(index = 4)] - NotInitialized, - #[codec(index = 5)] - AlreadyInitialized, - #[codec(index = 6)] - TooManyAuthoritiesInSet, - #[codec(index = 7)] - BridgeModule(runtime_types::bp_runtime::OwnedBridgeModuleError), - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Event { - #[codec(index = 0)] - UpdatedBestFinalizedHeader { - number: ::core::primitive::u64, - hash: ::bp_millau::MillauHash, - }, - } - } - pub mod storage_types { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct StoredAuthoritySet { - pub authorities: runtime_types::bounded_collections::bounded_vec::BoundedVec<( - runtime_types::sp_consensus_grandpa::app::Public, - ::core::primitive::u64, - )>, - pub set_id: ::core::primitive::u64, - } - } - } - pub mod pallet_bridge_messages { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Call { - #[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: ::bp_messages::target_chain::FromBridgedChainMessagesProof< - ::bp_millau::MillauHash, - >, - messages_count: ::core::primitive::u32, - dispatch_weight: ::sp_weights::Weight, - }, - #[codec(index = 3)] - receive_messages_delivery_proof { - proof: ::bp_messages::source_chain::FromBridgedChainMessagesDeliveryProof< - ::bp_millau::MillauHash, - >, - relayers_state: ::bp_messages::UnrewardedRelayersState, - }, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Error { - #[codec(index = 0)] - NotOperatingNormally, - #[codec(index = 1)] - InactiveOutboundLane, - #[codec(index = 2)] - MessageIsTooLarge, - #[codec(index = 3)] - MessageRejectedByChainVerifier, - #[codec(index = 4)] - MessageRejectedByLaneVerifier, - #[codec(index = 5)] - FailedToWithdrawMessageFee, - #[codec(index = 6)] - TooManyMessagesInTheProof, - #[codec(index = 7)] - InvalidMessagesProof, - #[codec(index = 8)] - InvalidMessagesDeliveryProof, - #[codec(index = 9)] - InvalidUnrewardedRelayers, - #[codec(index = 10)] - InvalidUnrewardedRelayersState, - #[codec(index = 11)] - InsufficientDispatchWeight, - #[codec(index = 12)] - MessageIsNotYetSent, - #[codec(index = 13)] - TryingToConfirmMoreMessagesThanExpected, - #[codec(index = 14)] - BridgeModule(runtime_types::bp_runtime::OwnedBridgeModuleError), - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Event { - # [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(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Call { - #[codec(index = 0)] - claim_rewards { - rewards_account_params: runtime_types::bp_relayers::RewardsAccountParams, - }, - #[codec(index = 1)] - register { valid_till: ::core::primitive::u32 }, - #[codec(index = 2)] - deregister, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Error { - #[codec(index = 0)] - NoRewardForRelayer, - #[codec(index = 1)] - FailedToPayReward, - #[codec(index = 2)] - InvalidRegistrationLease, - #[codec(index = 3)] - CannotReduceRegistrationLease, - #[codec(index = 4)] - FailedToReserve, - #[codec(index = 5)] - FailedToUnreserve, - #[codec(index = 6)] - NotRegistered, - #[codec(index = 7)] - RegistrationIsStillActive, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Event { - #[codec(index = 0)] - RewardPaid { - relayer: ::sp_core::crypto::AccountId32, - rewards_account_params: runtime_types::bp_relayers::RewardsAccountParams, - reward: ::core::primitive::u128, - }, - #[codec(index = 1)] - RegistrationUpdated { - relayer: ::sp_core::crypto::AccountId32, - registration: runtime_types::bp_relayers::registration::Registration< - ::core::primitive::u32, - ::core::primitive::u128, - >, - }, - #[codec(index = 2)] - Deregistered { relayer: ::sp_core::crypto::AccountId32 }, - #[codec(index = 3)] - SlashedAndDeregistered { - relayer: ::sp_core::crypto::AccountId32, - registration: runtime_types::bp_relayers::registration::Registration< - ::core::primitive::u32, - ::core::primitive::u128, - >, - }, - } - } - } - pub mod pallet_sudo { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Call { - #[codec(index = 0)] - sudo { - call: - ::std::boxed::Box, - }, - #[codec(index = 1)] - sudo_unchecked_weight { - call: - ::std::boxed::Box, - weight: ::sp_weights::Weight, - }, - #[codec(index = 2)] - set_key { - new: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - }, - #[codec(index = 3)] - sudo_as { - who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - call: - ::std::boxed::Box, - }, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Error { - #[codec(index = 0)] - RequireSudo, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Event { - #[codec(index = 0)] - Sudid { - sudo_result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - }, - #[codec(index = 1)] - KeyChanged { - old_sudoer: ::core::option::Option<::sp_core::crypto::AccountId32>, - }, - #[codec(index = 2)] - SudoAsDone { - sudo_result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - }, - } - } - } - pub mod pallet_timestamp { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Call { - #[codec(index = 0)] - set { - #[codec(compact)] - now: ::core::primitive::u64, - }, - } - } - } - pub mod pallet_transaction_payment { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Event { - #[codec(index = 0)] - TransactionFeePaid { - who: ::sp_core::crypto::AccountId32, - actual_fee: ::core::primitive::u128, - tip: ::core::primitive::u128, - }, - } - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct ChargeTransactionPayment(#[codec(compact)] pub ::core::primitive::u128); - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Releases { - #[codec(index = 0)] - V1Ancient, - #[codec(index = 1)] - V2, - } - } - pub mod pallet_xcm { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Call { - #[codec(index = 0)] - send { - dest: ::std::boxed::Box, - message: ::std::boxed::Box, - }, - #[codec(index = 1)] - teleport_assets { - dest: ::std::boxed::Box, - beneficiary: ::std::boxed::Box, - assets: ::std::boxed::Box, - fee_asset_item: ::core::primitive::u32, - }, - #[codec(index = 2)] - reserve_transfer_assets { - dest: ::std::boxed::Box, - beneficiary: ::std::boxed::Box, - assets: ::std::boxed::Box, - fee_asset_item: ::core::primitive::u32, - }, - #[codec(index = 3)] - execute { - message: ::std::boxed::Box, - max_weight: ::sp_weights::Weight, - }, - #[codec(index = 4)] - force_xcm_version { - location: - ::std::boxed::Box, - xcm_version: ::core::primitive::u32, - }, - #[codec(index = 5)] - force_default_xcm_version { - maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, - }, - #[codec(index = 6)] - force_subscribe_version_notify { - location: ::std::boxed::Box, - }, - #[codec(index = 7)] - force_unsubscribe_version_notify { - location: ::std::boxed::Box, - }, - #[codec(index = 8)] - limited_reserve_transfer_assets { - dest: ::std::boxed::Box, - beneficiary: ::std::boxed::Box, - assets: ::std::boxed::Box, - fee_asset_item: ::core::primitive::u32, - weight_limit: runtime_types::xcm::v3::WeightLimit, - }, - #[codec(index = 9)] - limited_teleport_assets { - dest: ::std::boxed::Box, - beneficiary: ::std::boxed::Box, - assets: ::std::boxed::Box, - fee_asset_item: ::core::primitive::u32, - weight_limit: runtime_types::xcm::v3::WeightLimit, - }, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Error { - #[codec(index = 0)] - Unreachable, - #[codec(index = 1)] - SendFailure, - #[codec(index = 2)] - Filtered, - #[codec(index = 3)] - UnweighableMessage, - #[codec(index = 4)] - DestinationNotInvertible, - #[codec(index = 5)] - Empty, - #[codec(index = 6)] - CannotReanchor, - #[codec(index = 7)] - TooManyAssets, - #[codec(index = 8)] - InvalidOrigin, - #[codec(index = 9)] - BadVersion, - #[codec(index = 10)] - BadLocation, - #[codec(index = 11)] - NoSubscription, - #[codec(index = 12)] - AlreadySubscribed, - #[codec(index = 13)] - InvalidAsset, - #[codec(index = 14)] - LowBalance, - #[codec(index = 15)] - TooManyLocks, - #[codec(index = 16)] - AccountNotSovereign, - #[codec(index = 17)] - FeesNotMet, - #[codec(index = 18)] - LockNotFound, - #[codec(index = 19)] - InUse, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Event { - #[codec(index = 0)] - Attempted(runtime_types::xcm::v3::traits::Outcome), - #[codec(index = 1)] - Sent( - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::v3::Xcm, - ), - #[codec(index = 2)] - UnexpectedResponse( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u64, - ), - #[codec(index = 3)] - ResponseReady(::core::primitive::u64, runtime_types::xcm::v3::Response), - #[codec(index = 4)] - Notified(::core::primitive::u64, ::core::primitive::u8, ::core::primitive::u8), - #[codec(index = 5)] - NotifyOverweight( - ::core::primitive::u64, - ::core::primitive::u8, - ::core::primitive::u8, - ::sp_weights::Weight, - ::sp_weights::Weight, - ), - #[codec(index = 6)] - NotifyDispatchError( - ::core::primitive::u64, - ::core::primitive::u8, - ::core::primitive::u8, - ), - #[codec(index = 7)] - NotifyDecodeFailed( - ::core::primitive::u64, - ::core::primitive::u8, - ::core::primitive::u8, - ), - #[codec(index = 8)] - InvalidResponder( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u64, - ::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - >, - ), - #[codec(index = 9)] - InvalidResponderVersion( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u64, - ), - #[codec(index = 10)] - ResponseTaken(::core::primitive::u64), - #[codec(index = 11)] - AssetsTrapped( - ::subxt::utils::H256, - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::VersionedMultiAssets, - ), - #[codec(index = 12)] - VersionChangeNotified( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u32, - runtime_types::xcm::v3::multiasset::MultiAssets, - ), - #[codec(index = 13)] - SupportedVersionChanged( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u32, - ), - #[codec(index = 14)] - NotifyTargetSendFail( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u64, - runtime_types::xcm::v3::traits::Error, - ), - #[codec(index = 15)] - NotifyTargetMigrationFail( - runtime_types::xcm::VersionedMultiLocation, - ::core::primitive::u64, - ), - #[codec(index = 16)] - InvalidQuerierVersion( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u64, - ), - #[codec(index = 17)] - InvalidQuerier( - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::primitive::u64, - runtime_types::xcm::v3::multilocation::MultiLocation, - ::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - >, - ), - #[codec(index = 18)] - VersionNotifyStarted( - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::v3::multiasset::MultiAssets, - ), - #[codec(index = 19)] - VersionNotifyRequested( - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::v3::multiasset::MultiAssets, - ), - #[codec(index = 20)] - VersionNotifyUnrequested( - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::v3::multiasset::MultiAssets, - ), - #[codec(index = 21)] - FeesPaid( - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::v3::multiasset::MultiAssets, - ), - #[codec(index = 22)] - AssetsClaimed( - ::subxt::utils::H256, - runtime_types::xcm::v3::multilocation::MultiLocation, - runtime_types::xcm::VersionedMultiAssets, - ), - } - } - } - pub mod polkadot_core_primitives { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct InboundDownwardMessage<_0> { - pub sent_at: _0, - pub msg: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct InboundHrmpMessage<_0> { - pub sent_at: _0, - pub data: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct OutboundHrmpMessage<_0> { - pub recipient: _0, - pub data: ::std::vec::Vec<::core::primitive::u8>, - } - } - pub mod polkadot_parachain { - use super::runtime_types; - pub mod primitives { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct HeadData(pub ::std::vec::Vec<::core::primitive::u8>); - #[derive( - :: codec :: Decode, - :: codec :: Encode, - :: subxt :: ext :: codec :: CompactAs, - Clone, - Debug, - PartialEq, - )] - pub struct Id(pub ::core::primitive::u32); - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum XcmpMessageFormat { - #[codec(index = 0)] - ConcatenatedVersionedXcm, - #[codec(index = 1)] - ConcatenatedEncodedBlob, - #[codec(index = 2)] - Signals, - } - } - } - pub mod polkadot_primitives { - use super::runtime_types; - pub mod v4 { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct AbridgedHostConfiguration { - pub max_code_size: ::core::primitive::u32, - pub max_head_data_size: ::core::primitive::u32, - pub max_upward_queue_count: ::core::primitive::u32, - pub max_upward_queue_size: ::core::primitive::u32, - pub max_upward_message_size: ::core::primitive::u32, - pub max_upward_message_num_per_candidate: ::core::primitive::u32, - pub hrmp_max_message_num_per_candidate: ::core::primitive::u32, - pub validation_upgrade_cooldown: ::core::primitive::u32, - pub validation_upgrade_delay: ::core::primitive::u32, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct AbridgedHrmpChannel { - pub max_capacity: ::core::primitive::u32, - pub max_total_size: ::core::primitive::u32, - pub max_message_size: ::core::primitive::u32, - pub msg_count: ::core::primitive::u32, - pub total_size: ::core::primitive::u32, - pub mqc_head: ::core::option::Option<::subxt::utils::H256>, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - 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(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum UpgradeRestriction { - #[codec(index = 0)] - Present, - } - } - } - pub mod rialto_parachain_runtime { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct BridgeRejectObsoleteHeadersAndMessages; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct DummyBridgeRefundMillauMessages; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct Runtime; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum RuntimeCall { - #[codec(index = 0)] - System(runtime_types::frame_system::pallet::Call), - #[codec(index = 1)] - Timestamp(runtime_types::pallet_timestamp::pallet::Call), - #[codec(index = 2)] - Sudo(runtime_types::pallet_sudo::pallet::Call), - #[codec(index = 20)] - ParachainSystem(runtime_types::cumulus_pallet_parachain_system::pallet::Call), - #[codec(index = 30)] - Balances(runtime_types::pallet_balances::pallet::Call), - #[codec(index = 50)] - XcmpQueue(runtime_types::cumulus_pallet_xcmp_queue::pallet::Call), - #[codec(index = 51)] - PolkadotXcm(runtime_types::pallet_xcm::pallet::Call), - #[codec(index = 52)] - CumulusXcm(runtime_types::cumulus_pallet_xcm::pallet::Call), - #[codec(index = 53)] - DmpQueue(runtime_types::cumulus_pallet_dmp_queue::pallet::Call), - #[codec(index = 54)] - BridgeRelayers(runtime_types::pallet_bridge_relayers::pallet::Call), - #[codec(index = 55)] - BridgeMillauGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Call), - #[codec(index = 56)] - BridgeMillauMessages(runtime_types::pallet_bridge_messages::pallet::Call), - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum RuntimeEvent { - #[codec(index = 0)] - System(runtime_types::frame_system::pallet::Event), - #[codec(index = 2)] - Sudo(runtime_types::pallet_sudo::pallet::Event), - #[codec(index = 3)] - TransactionPayment(runtime_types::pallet_transaction_payment::pallet::Event), - #[codec(index = 20)] - ParachainSystem(runtime_types::cumulus_pallet_parachain_system::pallet::Event), - #[codec(index = 30)] - Balances(runtime_types::pallet_balances::pallet::Event), - #[codec(index = 50)] - XcmpQueue(runtime_types::cumulus_pallet_xcmp_queue::pallet::Event), - #[codec(index = 51)] - PolkadotXcm(runtime_types::pallet_xcm::pallet::Event), - #[codec(index = 52)] - CumulusXcm(runtime_types::cumulus_pallet_xcm::pallet::Event), - #[codec(index = 53)] - DmpQueue(runtime_types::cumulus_pallet_dmp_queue::pallet::Event), - #[codec(index = 54)] - BridgeRelayers(runtime_types::pallet_bridge_relayers::pallet::Event), - #[codec(index = 55)] - BridgeMillauGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Event), - #[codec(index = 56)] - BridgeMillauMessages(runtime_types::pallet_bridge_messages::pallet::Event), - } - } - pub mod sp_arithmetic { - use super::runtime_types; - pub mod fixed_point { - use super::runtime_types; - #[derive( - :: codec :: Decode, - :: codec :: Encode, - :: subxt :: ext :: codec :: CompactAs, - Clone, - Debug, - PartialEq, - )] - pub struct FixedU128(pub ::core::primitive::u128); - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum ArithmeticError { - #[codec(index = 0)] - Underflow, - #[codec(index = 1)] - Overflow, - #[codec(index = 2)] - DivisionByZero, - } - } - pub mod sp_consensus_grandpa { - use super::runtime_types; - pub mod app { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct Public(pub runtime_types::sp_core::ed25519::Public); - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct Signature(pub runtime_types::sp_core::ed25519::Signature); - } - } - pub mod sp_core { - use super::runtime_types; - pub mod ecdsa { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct Signature(pub [::core::primitive::u8; 65usize]); - } - pub mod ed25519 { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct Public(pub [::core::primitive::u8; 32usize]); - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct Signature(pub [::core::primitive::u8; 64usize]); - } - pub mod sr25519 { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct Signature(pub [::core::primitive::u8; 64usize]); - } - } - pub mod sp_runtime { - use super::runtime_types; - pub mod generic { - use super::runtime_types; - pub mod digest { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum DigestItem { - #[codec(index = 6)] - PreRuntime( - [::core::primitive::u8; 4usize], - ::std::vec::Vec<::core::primitive::u8>, - ), - #[codec(index = 4)] - Consensus( - [::core::primitive::u8; 4usize], - ::std::vec::Vec<::core::primitive::u8>, - ), - #[codec(index = 5)] - Seal( - [::core::primitive::u8; 4usize], - ::std::vec::Vec<::core::primitive::u8>, - ), - #[codec(index = 0)] - Other(::std::vec::Vec<::core::primitive::u8>), - #[codec(index = 8)] - RuntimeEnvironmentUpdated, - } - } - pub mod unchecked_extrinsic { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - 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(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum DispatchError { - #[codec(index = 0)] - Other, - #[codec(index = 1)] - CannotLookup, - #[codec(index = 2)] - BadOrigin, - #[codec(index = 3)] - Module(runtime_types::sp_runtime::ModuleError), - #[codec(index = 4)] - ConsumerRemaining, - #[codec(index = 5)] - NoProviders, - #[codec(index = 6)] - TooManyConsumers, - #[codec(index = 7)] - Token(runtime_types::sp_runtime::TokenError), - #[codec(index = 8)] - Arithmetic(runtime_types::sp_arithmetic::ArithmeticError), - #[codec(index = 9)] - Transactional(runtime_types::sp_runtime::TransactionalError), - #[codec(index = 10)] - Exhausted, - #[codec(index = 11)] - Corruption, - #[codec(index = 12)] - Unavailable, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct ModuleError { - pub index: ::core::primitive::u8, - pub error: [::core::primitive::u8; 4usize], - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum MultiSignature { - #[codec(index = 0)] - Ed25519(runtime_types::sp_core::ed25519::Signature), - #[codec(index = 1)] - Sr25519(runtime_types::sp_core::sr25519::Signature), - #[codec(index = 2)] - Ecdsa(runtime_types::sp_core::ecdsa::Signature), - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum TokenError { - #[codec(index = 0)] - FundsUnavailable, - #[codec(index = 1)] - OnlyProvider, - #[codec(index = 2)] - BelowMinimum, - #[codec(index = 3)] - CannotCreate, - #[codec(index = 4)] - UnknownAsset, - #[codec(index = 5)] - Frozen, - #[codec(index = 6)] - Unsupported, - #[codec(index = 7)] - CannotCreateHold, - #[codec(index = 8)] - NotExpendable, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum TransactionalError { - #[codec(index = 0)] - LimitReached, - #[codec(index = 1)] - NoLayer, - } - } - pub mod sp_trie { - use super::runtime_types; - pub mod storage_proof { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct StorageProof { - pub trie_nodes: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - } - } - } - pub mod sp_version { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct RuntimeVersion { - pub spec_name: ::std::string::String, - pub impl_name: ::std::string::String, - pub authoring_version: ::core::primitive::u32, - pub spec_version: ::core::primitive::u32, - pub impl_version: ::core::primitive::u32, - pub apis: - ::std::vec::Vec<([::core::primitive::u8; 8usize], ::core::primitive::u32)>, - pub transaction_version: ::core::primitive::u32, - pub state_version: ::core::primitive::u8, - } - } - pub mod sp_weights { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct RuntimeDbWeight { - pub read: ::core::primitive::u64, - pub write: ::core::primitive::u64, - } - } - pub mod xcm { - use super::runtime_types; - pub mod double_encoded { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct DoubleEncoded { - pub encoded: ::std::vec::Vec<::core::primitive::u8>, - } - } - pub mod v2 { - use super::runtime_types; - pub mod junction { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Junction { - #[codec(index = 0)] - Parachain(#[codec(compact)] ::core::primitive::u32), - #[codec(index = 1)] - AccountId32 { - network: runtime_types::xcm::v2::NetworkId, - id: [::core::primitive::u8; 32usize], - }, - #[codec(index = 2)] - AccountIndex64 { - network: runtime_types::xcm::v2::NetworkId, - #[codec(compact)] - index: ::core::primitive::u64, - }, - #[codec(index = 3)] - AccountKey20 { - network: runtime_types::xcm::v2::NetworkId, - key: [::core::primitive::u8; 20usize], - }, - #[codec(index = 4)] - PalletInstance(::core::primitive::u8), - #[codec(index = 5)] - GeneralIndex(#[codec(compact)] ::core::primitive::u128), - #[codec(index = 6)] - GeneralKey( - runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< - ::core::primitive::u8, - >, - ), - #[codec(index = 7)] - OnlyChild, - #[codec(index = 8)] - Plurality { - id: runtime_types::xcm::v2::BodyId, - part: runtime_types::xcm::v2::BodyPart, - }, - } - } - pub mod multiasset { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum AssetId { - #[codec(index = 0)] - Concrete(runtime_types::xcm::v2::multilocation::MultiLocation), - #[codec(index = 1)] - Abstract(::std::vec::Vec<::core::primitive::u8>), - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum AssetInstance { - #[codec(index = 0)] - Undefined, - #[codec(index = 1)] - Index(#[codec(compact)] ::core::primitive::u128), - #[codec(index = 2)] - Array4([::core::primitive::u8; 4usize]), - #[codec(index = 3)] - Array8([::core::primitive::u8; 8usize]), - #[codec(index = 4)] - Array16([::core::primitive::u8; 16usize]), - #[codec(index = 5)] - Array32([::core::primitive::u8; 32usize]), - #[codec(index = 6)] - Blob(::std::vec::Vec<::core::primitive::u8>), - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Fungibility { - #[codec(index = 0)] - Fungible(#[codec(compact)] ::core::primitive::u128), - #[codec(index = 1)] - NonFungible(runtime_types::xcm::v2::multiasset::AssetInstance), - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct MultiAsset { - pub id: runtime_types::xcm::v2::multiasset::AssetId, - pub fun: runtime_types::xcm::v2::multiasset::Fungibility, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum MultiAssetFilter { - #[codec(index = 0)] - Definite(runtime_types::xcm::v2::multiasset::MultiAssets), - #[codec(index = 1)] - Wild(runtime_types::xcm::v2::multiasset::WildMultiAsset), - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct MultiAssets( - pub ::std::vec::Vec, - ); - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum WildFungibility { - #[codec(index = 0)] - Fungible, - #[codec(index = 1)] - NonFungible, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum WildMultiAsset { - #[codec(index = 0)] - All, - #[codec(index = 1)] - AllOf { - id: runtime_types::xcm::v2::multiasset::AssetId, - fun: runtime_types::xcm::v2::multiasset::WildFungibility, - }, - } - } - pub mod multilocation { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Junctions { - #[codec(index = 0)] - Here, - #[codec(index = 1)] - X1(runtime_types::xcm::v2::junction::Junction), - #[codec(index = 2)] - X2( - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - ), - #[codec(index = 3)] - X3( - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - ), - #[codec(index = 4)] - X4( - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - ), - #[codec(index = 5)] - X5( - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - ), - #[codec(index = 6)] - X6( - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - ), - #[codec(index = 7)] - X7( - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - ), - #[codec(index = 8)] - X8( - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - runtime_types::xcm::v2::junction::Junction, - ), - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct MultiLocation { - pub parents: ::core::primitive::u8, - pub interior: runtime_types::xcm::v2::multilocation::Junctions, - } - } - pub mod traits { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Error { - #[codec(index = 0)] - Overflow, - #[codec(index = 1)] - Unimplemented, - #[codec(index = 2)] - UntrustedReserveLocation, - #[codec(index = 3)] - UntrustedTeleportLocation, - #[codec(index = 4)] - MultiLocationFull, - #[codec(index = 5)] - MultiLocationNotInvertible, - #[codec(index = 6)] - BadOrigin, - #[codec(index = 7)] - InvalidLocation, - #[codec(index = 8)] - AssetNotFound, - #[codec(index = 9)] - FailedToTransactAsset, - #[codec(index = 10)] - NotWithdrawable, - #[codec(index = 11)] - LocationCannotHold, - #[codec(index = 12)] - ExceedsMaxMessageSize, - #[codec(index = 13)] - DestinationUnsupported, - #[codec(index = 14)] - Transport, - #[codec(index = 15)] - Unroutable, - #[codec(index = 16)] - UnknownClaim, - #[codec(index = 17)] - FailedToDecode, - #[codec(index = 18)] - MaxWeightInvalid, - #[codec(index = 19)] - NotHoldingFees, - #[codec(index = 20)] - TooExpensive, - #[codec(index = 21)] - Trap(::core::primitive::u64), - #[codec(index = 22)] - UnhandledXcmVersion, - #[codec(index = 23)] - WeightLimitReached(::core::primitive::u64), - #[codec(index = 24)] - Barrier, - #[codec(index = 25)] - WeightNotComputable, - } - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum BodyId { - #[codec(index = 0)] - Unit, - #[codec(index = 1)] - Named( - runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< - ::core::primitive::u8, - >, - ), - #[codec(index = 2)] - Index(#[codec(compact)] ::core::primitive::u32), - #[codec(index = 3)] - Executive, - #[codec(index = 4)] - Technical, - #[codec(index = 5)] - Legislative, - #[codec(index = 6)] - Judicial, - #[codec(index = 7)] - Defense, - #[codec(index = 8)] - Administration, - #[codec(index = 9)] - Treasury, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum BodyPart { - #[codec(index = 0)] - Voice, - #[codec(index = 1)] - Members { - #[codec(compact)] - count: ::core::primitive::u32, - }, - #[codec(index = 2)] - Fraction { - #[codec(compact)] - nom: ::core::primitive::u32, - #[codec(compact)] - denom: ::core::primitive::u32, - }, - #[codec(index = 3)] - AtLeastProportion { - #[codec(compact)] - nom: ::core::primitive::u32, - #[codec(compact)] - denom: ::core::primitive::u32, - }, - #[codec(index = 4)] - MoreThanProportion { - #[codec(compact)] - nom: ::core::primitive::u32, - #[codec(compact)] - denom: ::core::primitive::u32, - }, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Instruction { - #[codec(index = 0)] - WithdrawAsset(runtime_types::xcm::v2::multiasset::MultiAssets), - #[codec(index = 1)] - ReserveAssetDeposited(runtime_types::xcm::v2::multiasset::MultiAssets), - #[codec(index = 2)] - ReceiveTeleportedAsset(runtime_types::xcm::v2::multiasset::MultiAssets), - #[codec(index = 3)] - QueryResponse { - #[codec(compact)] - query_id: ::core::primitive::u64, - response: runtime_types::xcm::v2::Response, - #[codec(compact)] - max_weight: ::core::primitive::u64, - }, - #[codec(index = 4)] - TransferAsset { - assets: runtime_types::xcm::v2::multiasset::MultiAssets, - beneficiary: runtime_types::xcm::v2::multilocation::MultiLocation, - }, - #[codec(index = 5)] - TransferReserveAsset { - assets: runtime_types::xcm::v2::multiasset::MultiAssets, - dest: runtime_types::xcm::v2::multilocation::MultiLocation, - xcm: runtime_types::xcm::v2::Xcm, - }, - #[codec(index = 6)] - Transact { - origin_type: runtime_types::xcm::v2::OriginKind, - #[codec(compact)] - require_weight_at_most: ::core::primitive::u64, - call: runtime_types::xcm::double_encoded::DoubleEncoded, - }, - #[codec(index = 7)] - HrmpNewChannelOpenRequest { - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - max_message_size: ::core::primitive::u32, - #[codec(compact)] - max_capacity: ::core::primitive::u32, - }, - #[codec(index = 8)] - HrmpChannelAccepted { - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 9)] - HrmpChannelClosing { - #[codec(compact)] - initiator: ::core::primitive::u32, - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 10)] - ClearOrigin, - #[codec(index = 11)] - DescendOrigin(runtime_types::xcm::v2::multilocation::Junctions), - #[codec(index = 12)] - ReportError { - #[codec(compact)] - query_id: ::core::primitive::u64, - dest: runtime_types::xcm::v2::multilocation::MultiLocation, - #[codec(compact)] - max_response_weight: ::core::primitive::u64, - }, - #[codec(index = 13)] - DepositAsset { - assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, - #[codec(compact)] - max_assets: ::core::primitive::u32, - beneficiary: runtime_types::xcm::v2::multilocation::MultiLocation, - }, - #[codec(index = 14)] - DepositReserveAsset { - assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, - #[codec(compact)] - max_assets: ::core::primitive::u32, - dest: runtime_types::xcm::v2::multilocation::MultiLocation, - xcm: runtime_types::xcm::v2::Xcm, - }, - #[codec(index = 15)] - ExchangeAsset { - give: runtime_types::xcm::v2::multiasset::MultiAssetFilter, - receive: runtime_types::xcm::v2::multiasset::MultiAssets, - }, - #[codec(index = 16)] - InitiateReserveWithdraw { - assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, - reserve: runtime_types::xcm::v2::multilocation::MultiLocation, - xcm: runtime_types::xcm::v2::Xcm, - }, - #[codec(index = 17)] - InitiateTeleport { - assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, - dest: runtime_types::xcm::v2::multilocation::MultiLocation, - xcm: runtime_types::xcm::v2::Xcm, - }, - #[codec(index = 18)] - QueryHolding { - #[codec(compact)] - query_id: ::core::primitive::u64, - dest: runtime_types::xcm::v2::multilocation::MultiLocation, - assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, - #[codec(compact)] - max_response_weight: ::core::primitive::u64, - }, - #[codec(index = 19)] - BuyExecution { - fees: runtime_types::xcm::v2::multiasset::MultiAsset, - weight_limit: runtime_types::xcm::v2::WeightLimit, - }, - #[codec(index = 20)] - RefundSurplus, - #[codec(index = 21)] - SetErrorHandler(runtime_types::xcm::v2::Xcm), - #[codec(index = 22)] - SetAppendix(runtime_types::xcm::v2::Xcm), - #[codec(index = 23)] - ClearError, - #[codec(index = 24)] - ClaimAsset { - assets: runtime_types::xcm::v2::multiasset::MultiAssets, - ticket: runtime_types::xcm::v2::multilocation::MultiLocation, - }, - #[codec(index = 25)] - Trap(#[codec(compact)] ::core::primitive::u64), - #[codec(index = 26)] - SubscribeVersion { - #[codec(compact)] - query_id: ::core::primitive::u64, - #[codec(compact)] - max_response_weight: ::core::primitive::u64, - }, - #[codec(index = 27)] - UnsubscribeVersion, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum NetworkId { - #[codec(index = 0)] - Any, - #[codec(index = 1)] - Named( - runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< - ::core::primitive::u8, - >, - ), - #[codec(index = 2)] - Polkadot, - #[codec(index = 3)] - Kusama, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum OriginKind { - #[codec(index = 0)] - Native, - #[codec(index = 1)] - SovereignAccount, - #[codec(index = 2)] - Superuser, - #[codec(index = 3)] - Xcm, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Response { - #[codec(index = 0)] - Null, - #[codec(index = 1)] - Assets(runtime_types::xcm::v2::multiasset::MultiAssets), - #[codec(index = 2)] - ExecutionResult( - ::core::option::Option<( - ::core::primitive::u32, - runtime_types::xcm::v2::traits::Error, - )>, - ), - #[codec(index = 3)] - Version(::core::primitive::u32), - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum WeightLimit { - #[codec(index = 0)] - Unlimited, - #[codec(index = 1)] - Limited(#[codec(compact)] ::core::primitive::u64), - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct Xcm(pub ::std::vec::Vec); - } - pub mod v3 { - use super::runtime_types; - pub mod junction { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum BodyId { - #[codec(index = 0)] - Unit, - #[codec(index = 1)] - Moniker([::core::primitive::u8; 4usize]), - #[codec(index = 2)] - Index(#[codec(compact)] ::core::primitive::u32), - #[codec(index = 3)] - Executive, - #[codec(index = 4)] - Technical, - #[codec(index = 5)] - Legislative, - #[codec(index = 6)] - Judicial, - #[codec(index = 7)] - Defense, - #[codec(index = 8)] - Administration, - #[codec(index = 9)] - Treasury, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum BodyPart { - #[codec(index = 0)] - Voice, - #[codec(index = 1)] - Members { - #[codec(compact)] - count: ::core::primitive::u32, - }, - #[codec(index = 2)] - Fraction { - #[codec(compact)] - nom: ::core::primitive::u32, - #[codec(compact)] - denom: ::core::primitive::u32, - }, - #[codec(index = 3)] - AtLeastProportion { - #[codec(compact)] - nom: ::core::primitive::u32, - #[codec(compact)] - denom: ::core::primitive::u32, - }, - #[codec(index = 4)] - MoreThanProportion { - #[codec(compact)] - nom: ::core::primitive::u32, - #[codec(compact)] - denom: ::core::primitive::u32, - }, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Junction { - #[codec(index = 0)] - Parachain(#[codec(compact)] ::core::primitive::u32), - #[codec(index = 1)] - AccountId32 { - network: - ::core::option::Option, - id: [::core::primitive::u8; 32usize], - }, - #[codec(index = 2)] - AccountIndex64 { - network: - ::core::option::Option, - #[codec(compact)] - index: ::core::primitive::u64, - }, - #[codec(index = 3)] - AccountKey20 { - network: - ::core::option::Option, - key: [::core::primitive::u8; 20usize], - }, - #[codec(index = 4)] - PalletInstance(::core::primitive::u8), - #[codec(index = 5)] - GeneralIndex(#[codec(compact)] ::core::primitive::u128), - #[codec(index = 6)] - GeneralKey { - length: ::core::primitive::u8, - data: [::core::primitive::u8; 32usize], - }, - #[codec(index = 7)] - OnlyChild, - #[codec(index = 8)] - Plurality { - id: runtime_types::xcm::v3::junction::BodyId, - part: runtime_types::xcm::v3::junction::BodyPart, - }, - #[codec(index = 9)] - GlobalConsensus(runtime_types::xcm::v3::junction::NetworkId), - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum NetworkId { - #[codec(index = 0)] - ByGenesis([::core::primitive::u8; 32usize]), - #[codec(index = 1)] - ByFork { - block_number: ::core::primitive::u64, - block_hash: [::core::primitive::u8; 32usize], - }, - #[codec(index = 2)] - Polkadot, - #[codec(index = 3)] - Kusama, - #[codec(index = 4)] - Westend, - #[codec(index = 5)] - Rococo, - #[codec(index = 6)] - Wococo, - #[codec(index = 7)] - Ethereum { - #[codec(compact)] - chain_id: ::core::primitive::u64, - }, - #[codec(index = 8)] - BitcoinCore, - #[codec(index = 9)] - BitcoinCash, - } - } - pub mod junctions { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Junctions { - #[codec(index = 0)] - Here, - #[codec(index = 1)] - X1(runtime_types::xcm::v3::junction::Junction), - #[codec(index = 2)] - X2( - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - ), - #[codec(index = 3)] - X3( - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - ), - #[codec(index = 4)] - X4( - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - ), - #[codec(index = 5)] - X5( - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - ), - #[codec(index = 6)] - X6( - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - ), - #[codec(index = 7)] - X7( - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - ), - #[codec(index = 8)] - X8( - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - runtime_types::xcm::v3::junction::Junction, - ), - } - } - pub mod multiasset { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum AssetId { - #[codec(index = 0)] - Concrete(runtime_types::xcm::v3::multilocation::MultiLocation), - #[codec(index = 1)] - Abstract([::core::primitive::u8; 32usize]), - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum AssetInstance { - #[codec(index = 0)] - Undefined, - #[codec(index = 1)] - Index(#[codec(compact)] ::core::primitive::u128), - #[codec(index = 2)] - Array4([::core::primitive::u8; 4usize]), - #[codec(index = 3)] - Array8([::core::primitive::u8; 8usize]), - #[codec(index = 4)] - Array16([::core::primitive::u8; 16usize]), - #[codec(index = 5)] - Array32([::core::primitive::u8; 32usize]), - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Fungibility { - #[codec(index = 0)] - Fungible(#[codec(compact)] ::core::primitive::u128), - #[codec(index = 1)] - NonFungible(runtime_types::xcm::v3::multiasset::AssetInstance), - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct MultiAsset { - pub id: runtime_types::xcm::v3::multiasset::AssetId, - pub fun: runtime_types::xcm::v3::multiasset::Fungibility, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum MultiAssetFilter { - #[codec(index = 0)] - Definite(runtime_types::xcm::v3::multiasset::MultiAssets), - #[codec(index = 1)] - Wild(runtime_types::xcm::v3::multiasset::WildMultiAsset), - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct MultiAssets( - pub ::std::vec::Vec, - ); - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum WildFungibility { - #[codec(index = 0)] - Fungible, - #[codec(index = 1)] - NonFungible, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum WildMultiAsset { - #[codec(index = 0)] - All, - #[codec(index = 1)] - AllOf { - id: runtime_types::xcm::v3::multiasset::AssetId, - fun: runtime_types::xcm::v3::multiasset::WildFungibility, - }, - #[codec(index = 2)] - AllCounted(#[codec(compact)] ::core::primitive::u32), - #[codec(index = 3)] - AllOfCounted { - id: runtime_types::xcm::v3::multiasset::AssetId, - fun: runtime_types::xcm::v3::multiasset::WildFungibility, - #[codec(compact)] - count: ::core::primitive::u32, - }, - } - } - pub mod multilocation { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct MultiLocation { - pub parents: ::core::primitive::u8, - pub interior: runtime_types::xcm::v3::junctions::Junctions, - } - } - pub mod traits { - use super::runtime_types; - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Error { - #[codec(index = 0)] - Overflow, - #[codec(index = 1)] - Unimplemented, - #[codec(index = 2)] - UntrustedReserveLocation, - #[codec(index = 3)] - UntrustedTeleportLocation, - #[codec(index = 4)] - LocationFull, - #[codec(index = 5)] - LocationNotInvertible, - #[codec(index = 6)] - BadOrigin, - #[codec(index = 7)] - InvalidLocation, - #[codec(index = 8)] - AssetNotFound, - #[codec(index = 9)] - FailedToTransactAsset, - #[codec(index = 10)] - NotWithdrawable, - #[codec(index = 11)] - LocationCannotHold, - #[codec(index = 12)] - ExceedsMaxMessageSize, - #[codec(index = 13)] - DestinationUnsupported, - #[codec(index = 14)] - Transport, - #[codec(index = 15)] - Unroutable, - #[codec(index = 16)] - UnknownClaim, - #[codec(index = 17)] - FailedToDecode, - #[codec(index = 18)] - MaxWeightInvalid, - #[codec(index = 19)] - NotHoldingFees, - #[codec(index = 20)] - TooExpensive, - #[codec(index = 21)] - Trap(::core::primitive::u64), - #[codec(index = 22)] - ExpectationFalse, - #[codec(index = 23)] - PalletNotFound, - #[codec(index = 24)] - NameMismatch, - #[codec(index = 25)] - VersionIncompatible, - #[codec(index = 26)] - HoldingWouldOverflow, - #[codec(index = 27)] - ExportError, - #[codec(index = 28)] - ReanchorFailed, - #[codec(index = 29)] - NoDeal, - #[codec(index = 30)] - FeesNotMet, - #[codec(index = 31)] - LockError, - #[codec(index = 32)] - NoPermission, - #[codec(index = 33)] - Unanchored, - #[codec(index = 34)] - NotDepositable, - #[codec(index = 35)] - UnhandledXcmVersion, - #[codec(index = 36)] - WeightLimitReached(::sp_weights::Weight), - #[codec(index = 37)] - Barrier, - #[codec(index = 38)] - WeightNotComputable, - #[codec(index = 39)] - ExceedsStackLimit, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Outcome { - #[codec(index = 0)] - Complete(::sp_weights::Weight), - #[codec(index = 1)] - Incomplete(::sp_weights::Weight, runtime_types::xcm::v3::traits::Error), - #[codec(index = 2)] - Error(runtime_types::xcm::v3::traits::Error), - } - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Instruction { - #[codec(index = 0)] - WithdrawAsset(runtime_types::xcm::v3::multiasset::MultiAssets), - #[codec(index = 1)] - ReserveAssetDeposited(runtime_types::xcm::v3::multiasset::MultiAssets), - #[codec(index = 2)] - ReceiveTeleportedAsset(runtime_types::xcm::v3::multiasset::MultiAssets), - #[codec(index = 3)] - QueryResponse { - #[codec(compact)] - query_id: ::core::primitive::u64, - response: runtime_types::xcm::v3::Response, - max_weight: ::sp_weights::Weight, - querier: ::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - >, - }, - #[codec(index = 4)] - TransferAsset { - assets: runtime_types::xcm::v3::multiasset::MultiAssets, - beneficiary: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - #[codec(index = 5)] - TransferReserveAsset { - assets: runtime_types::xcm::v3::multiasset::MultiAssets, - dest: runtime_types::xcm::v3::multilocation::MultiLocation, - xcm: runtime_types::xcm::v3::Xcm, - }, - #[codec(index = 6)] - Transact { - origin_kind: runtime_types::xcm::v2::OriginKind, - require_weight_at_most: ::sp_weights::Weight, - call: runtime_types::xcm::double_encoded::DoubleEncoded, - }, - #[codec(index = 7)] - HrmpNewChannelOpenRequest { - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - max_message_size: ::core::primitive::u32, - #[codec(compact)] - max_capacity: ::core::primitive::u32, - }, - #[codec(index = 8)] - HrmpChannelAccepted { - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 9)] - HrmpChannelClosing { - #[codec(compact)] - initiator: ::core::primitive::u32, - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 10)] - ClearOrigin, - #[codec(index = 11)] - DescendOrigin(runtime_types::xcm::v3::junctions::Junctions), - #[codec(index = 12)] - ReportError(runtime_types::xcm::v3::QueryResponseInfo), - #[codec(index = 13)] - DepositAsset { - assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - beneficiary: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - #[codec(index = 14)] - DepositReserveAsset { - assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - dest: runtime_types::xcm::v3::multilocation::MultiLocation, - xcm: runtime_types::xcm::v3::Xcm, - }, - #[codec(index = 15)] - ExchangeAsset { - give: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - want: runtime_types::xcm::v3::multiasset::MultiAssets, - maximal: ::core::primitive::bool, - }, - #[codec(index = 16)] - InitiateReserveWithdraw { - assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - reserve: runtime_types::xcm::v3::multilocation::MultiLocation, - xcm: runtime_types::xcm::v3::Xcm, - }, - #[codec(index = 17)] - InitiateTeleport { - assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - dest: runtime_types::xcm::v3::multilocation::MultiLocation, - xcm: runtime_types::xcm::v3::Xcm, - }, - #[codec(index = 18)] - ReportHolding { - response_info: runtime_types::xcm::v3::QueryResponseInfo, - assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, - }, - #[codec(index = 19)] - BuyExecution { - fees: runtime_types::xcm::v3::multiasset::MultiAsset, - weight_limit: runtime_types::xcm::v3::WeightLimit, - }, - #[codec(index = 20)] - RefundSurplus, - #[codec(index = 21)] - SetErrorHandler(runtime_types::xcm::v3::Xcm), - #[codec(index = 22)] - SetAppendix(runtime_types::xcm::v3::Xcm), - #[codec(index = 23)] - ClearError, - #[codec(index = 24)] - ClaimAsset { - assets: runtime_types::xcm::v3::multiasset::MultiAssets, - ticket: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - #[codec(index = 25)] - Trap(#[codec(compact)] ::core::primitive::u64), - #[codec(index = 26)] - SubscribeVersion { - #[codec(compact)] - query_id: ::core::primitive::u64, - max_response_weight: ::sp_weights::Weight, - }, - #[codec(index = 27)] - UnsubscribeVersion, - #[codec(index = 28)] - BurnAsset(runtime_types::xcm::v3::multiasset::MultiAssets), - #[codec(index = 29)] - ExpectAsset(runtime_types::xcm::v3::multiasset::MultiAssets), - #[codec(index = 30)] - ExpectOrigin( - ::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - >, - ), - #[codec(index = 31)] - ExpectError( - ::core::option::Option<( - ::core::primitive::u32, - runtime_types::xcm::v3::traits::Error, - )>, - ), - #[codec(index = 32)] - ExpectTransactStatus(runtime_types::xcm::v3::MaybeErrorCode), - #[codec(index = 33)] - QueryPallet { - module_name: ::std::vec::Vec<::core::primitive::u8>, - response_info: runtime_types::xcm::v3::QueryResponseInfo, - }, - #[codec(index = 34)] - ExpectPallet { - #[codec(compact)] - index: ::core::primitive::u32, - name: ::std::vec::Vec<::core::primitive::u8>, - module_name: ::std::vec::Vec<::core::primitive::u8>, - #[codec(compact)] - crate_major: ::core::primitive::u32, - #[codec(compact)] - min_crate_minor: ::core::primitive::u32, - }, - #[codec(index = 35)] - ReportTransactStatus(runtime_types::xcm::v3::QueryResponseInfo), - #[codec(index = 36)] - ClearTransactStatus, - #[codec(index = 37)] - UniversalOrigin(runtime_types::xcm::v3::junction::Junction), - #[codec(index = 38)] - ExportMessage { - network: runtime_types::xcm::v3::junction::NetworkId, - destination: runtime_types::xcm::v3::junctions::Junctions, - xcm: runtime_types::xcm::v3::Xcm, - }, - #[codec(index = 39)] - LockAsset { - asset: runtime_types::xcm::v3::multiasset::MultiAsset, - unlocker: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - #[codec(index = 40)] - UnlockAsset { - asset: runtime_types::xcm::v3::multiasset::MultiAsset, - target: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - #[codec(index = 41)] - NoteUnlockable { - asset: runtime_types::xcm::v3::multiasset::MultiAsset, - owner: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - #[codec(index = 42)] - RequestUnlock { - asset: runtime_types::xcm::v3::multiasset::MultiAsset, - locker: runtime_types::xcm::v3::multilocation::MultiLocation, - }, - #[codec(index = 43)] - SetFeesMode { jit_withdraw: ::core::primitive::bool }, - #[codec(index = 44)] - SetTopic([::core::primitive::u8; 32usize]), - #[codec(index = 45)] - ClearTopic, - #[codec(index = 46)] - AliasOrigin(runtime_types::xcm::v3::multilocation::MultiLocation), - #[codec(index = 47)] - UnpaidExecution { - weight_limit: runtime_types::xcm::v3::WeightLimit, - check_origin: ::core::option::Option< - runtime_types::xcm::v3::multilocation::MultiLocation, - >, - }, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum MaybeErrorCode { - #[codec(index = 0)] - Success, - #[codec(index = 1)] - Error( - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ), - #[codec(index = 2)] - TruncatedError( - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ), - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct PalletInfo { - #[codec(compact)] - pub index: ::core::primitive::u32, - pub name: runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - pub module_name: runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - #[codec(compact)] - pub major: ::core::primitive::u32, - #[codec(compact)] - pub minor: ::core::primitive::u32, - #[codec(compact)] - pub patch: ::core::primitive::u32, - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - 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(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum Response { - #[codec(index = 0)] - Null, - #[codec(index = 1)] - Assets(runtime_types::xcm::v3::multiasset::MultiAssets), - #[codec(index = 2)] - ExecutionResult( - ::core::option::Option<( - ::core::primitive::u32, - runtime_types::xcm::v3::traits::Error, - )>, - ), - #[codec(index = 3)] - Version(::core::primitive::u32), - #[codec(index = 4)] - PalletsInfo( - runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::xcm::v3::PalletInfo, - >, - ), - #[codec(index = 5)] - DispatchResult(runtime_types::xcm::v3::MaybeErrorCode), - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum WeightLimit { - #[codec(index = 0)] - Unlimited, - #[codec(index = 1)] - Limited(::sp_weights::Weight), - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub struct Xcm(pub ::std::vec::Vec); - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum VersionedMultiAssets { - #[codec(index = 1)] - V2(runtime_types::xcm::v2::multiasset::MultiAssets), - #[codec(index = 3)] - V3(runtime_types::xcm::v3::multiasset::MultiAssets), - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum VersionedMultiLocation { - #[codec(index = 1)] - V2(runtime_types::xcm::v2::multilocation::MultiLocation), - #[codec(index = 3)] - V3(runtime_types::xcm::v3::multilocation::MultiLocation), - } - #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] - pub enum VersionedXcm { - #[codec(index = 2)] - V2(runtime_types::xcm::v2::Xcm), - #[codec(index = 3)] - V3(runtime_types::xcm::v3::Xcm), - } - } - } -} diff --git a/relays/client-rialto-parachain/src/lib.rs b/relays/client-rialto-parachain/src/lib.rs deleted file mode 100644 index 8532c98d5d9976fcd74e2a6ca7bc3d72756b0eb4..0000000000000000000000000000000000000000 --- a/relays/client-rialto-parachain/src/lib.rs +++ /dev/null @@ -1,129 +0,0 @@ -// 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 . - -//! Types used to connect to the Rialto-Substrate chain. - -pub mod codegen_runtime; - -use bp_polkadot_core::SuffixedCommonSignedExtensionExt; -use codec::Encode; -use relay_substrate_client::{ - Chain, ChainWithBalances, ChainWithMessages, ChainWithTransactions, Error as SubstrateError, - SignParam, UnderlyingChainProvider, UnsignedTransaction, -}; -use sp_core::{storage::StorageKey, Pair}; -use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount, MultiAddress}; -use std::time::Duration; - -pub use codegen_runtime::api::runtime_types; - -pub type RuntimeCall = runtime_types::rialto_parachain_runtime::RuntimeCall; -pub type SudoCall = runtime_types::pallet_sudo::pallet::Call; -pub type BridgeGrandpaCall = runtime_types::pallet_bridge_grandpa::pallet::Call; -pub type BridgeMessagesCall = runtime_types::pallet_bridge_messages::pallet::Call; - -/// The address format for describing accounts. -pub type Address = MultiAddress; - -/// Rialto parachain definition -#[derive(Debug, Clone, Copy)] -pub struct RialtoParachain; - -impl UnderlyingChainProvider for RialtoParachain { - type Chain = bp_rialto_parachain::RialtoParachain; -} - -impl Chain for RialtoParachain { - const NAME: &'static str = "RialtoParachain"; - const BEST_FINALIZED_HEADER_ID_METHOD: &'static str = - bp_rialto_parachain::BEST_FINALIZED_RIALTO_PARACHAIN_HEADER_METHOD; - const AVERAGE_BLOCK_INTERVAL: Duration = Duration::from_secs(5); - - type SignedBlock = bp_polkadot_core::SignedBlock; - type Call = RuntimeCall; -} - -impl ChainWithBalances for RialtoParachain { - fn account_info_storage_key(account_id: &Self::AccountId) -> StorageKey { - bp_polkadot_core::AccountInfoStorageMapKeyProvider::final_key(account_id) - } -} - -impl ChainWithMessages for RialtoParachain { - // TODO (https://github.com/paritytech/parity-bridges-common/issues/1692): change the name - const WITH_CHAIN_RELAYERS_PALLET_NAME: Option<&'static str> = Some("BridgeRelayers"); - const TO_CHAIN_MESSAGE_DETAILS_METHOD: &'static str = - bp_rialto_parachain::TO_RIALTO_PARACHAIN_MESSAGE_DETAILS_METHOD; - const FROM_CHAIN_MESSAGE_DETAILS_METHOD: &'static str = - bp_rialto_parachain::FROM_RIALTO_PARACHAIN_MESSAGE_DETAILS_METHOD; -} - -impl ChainWithTransactions for RialtoParachain { - type AccountKeyPair = sp_core::sr25519::Pair; - type SignedTransaction = - bp_polkadot_core::UncheckedExtrinsic; - - fn sign_transaction( - param: SignParam, - unsigned: UnsignedTransaction, - ) -> Result { - let raw_payload = SignedPayload::new( - unsigned.call, - bp_rialto_parachain::SignedExtension::from_params( - param.spec_version, - param.transaction_version, - unsigned.era, - param.genesis_hash, - unsigned.nonce, - unsigned.tip, - (((), ()), ((), ())), - ), - )?; - - let signature = raw_payload.using_encoded(|payload| param.signer.sign(payload)); - let signer: sp_runtime::MultiSigner = param.signer.public().into(); - let (call, extra, _) = raw_payload.deconstruct(); - - Ok(Self::SignedTransaction::new_signed( - call, - signer.into_account().into(), - signature.into(), - extra, - )) - } - - fn is_signed(tx: &Self::SignedTransaction) -> bool { - tx.signature.is_some() - } - - fn is_signed_by(signer: &Self::AccountKeyPair, tx: &Self::SignedTransaction) -> bool { - tx.signature - .as_ref() - .map(|(address, _, _)| *address == Address::Id(signer.public().into())) - .unwrap_or(false) - } - - fn parse_transaction(tx: Self::SignedTransaction) -> Option> { - let extra = &tx.signature.as_ref()?.2; - Some(UnsignedTransaction::new(tx.function, extra.nonce()).tip(extra.tip())) - } -} - -/// RialtoParachain signing params. -pub type SigningParams = sp_core::sr25519::Pair; - -/// RialtoParachain header type used in headers sync. -pub type SyncHeader = relay_substrate_client::SyncHeader; diff --git a/relays/client-rialto/Cargo.toml b/relays/client-rialto/Cargo.toml deleted file mode 100644 index 5b5db5b31446c886a9b3e114b5c7fa829bc9484e..0000000000000000000000000000000000000000 --- a/relays/client-rialto/Cargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -[package] -name = "relay-rialto-client" -version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2021" -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" - -[dependencies] -codec = { package = "parity-scale-codec", version = "3.1.5" } -relay-substrate-client = { path = "../client-substrate" } -relay-utils = { path = "../utils" } - -# Bridge dependencies - -bp-rialto = { path = "../../primitives/chain-rialto" } -rialto-runtime = { path = "../../bin/rialto/runtime" } - -# Substrate Dependencies - -frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } diff --git a/relays/client-rialto/src/lib.rs b/relays/client-rialto/src/lib.rs deleted file mode 100644 index 213be5eda650a85c6be1996d842881d77497a004..0000000000000000000000000000000000000000 --- a/relays/client-rialto/src/lib.rs +++ /dev/null @@ -1,184 +0,0 @@ -// 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 . - -//! Types used to connect to the Rialto-Substrate chain. - -use bp_rialto::RIALTO_SYNCED_HEADERS_GRANDPA_INFO_METHOD; -use codec::{Compact, Decode, Encode}; -use relay_substrate_client::{ - BalanceOf, Chain, ChainWithBalances, ChainWithGrandpa, ChainWithMessages, - ChainWithTransactions, Error as SubstrateError, NonceOf, RelayChain, SignParam, - UnderlyingChainProvider, UnsignedTransaction, -}; -use sp_core::{storage::StorageKey, Pair}; -use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount}; -use sp_session::MembershipProof; -use std::time::Duration; - -/// Rialto header id. -pub type HeaderId = relay_utils::HeaderId; - -/// Rialto chain definition -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub struct Rialto; - -impl UnderlyingChainProvider for Rialto { - type Chain = bp_rialto::Rialto; -} - -impl Chain for Rialto { - const NAME: &'static str = "Rialto"; - const BEST_FINALIZED_HEADER_ID_METHOD: &'static str = - bp_rialto::BEST_FINALIZED_RIALTO_HEADER_METHOD; - const AVERAGE_BLOCK_INTERVAL: Duration = Duration::from_secs(5); - - type SignedBlock = rialto_runtime::SignedBlock; - type Call = rialto_runtime::RuntimeCall; -} - -impl ChainWithGrandpa for Rialto { - const SYNCED_HEADERS_GRANDPA_INFO_METHOD: &'static str = - RIALTO_SYNCED_HEADERS_GRANDPA_INFO_METHOD; - - type KeyOwnerProof = MembershipProof; -} - -impl RelayChain for Rialto { - const PARAS_PALLET_NAME: &'static str = bp_rialto::PARAS_PALLET_NAME; - const PARACHAINS_FINALITY_PALLET_NAME: &'static str = - bp_rialto::WITH_RIALTO_BRIDGE_PARAS_PALLET_NAME; -} - -impl ChainWithMessages for Rialto { - // TODO (https://github.com/paritytech/parity-bridges-common/issues/1692): change the name - const WITH_CHAIN_RELAYERS_PALLET_NAME: Option<&'static str> = Some("BridgeRelayers"); - const TO_CHAIN_MESSAGE_DETAILS_METHOD: &'static str = - bp_rialto::TO_RIALTO_MESSAGE_DETAILS_METHOD; - const FROM_CHAIN_MESSAGE_DETAILS_METHOD: &'static str = - bp_rialto::FROM_RIALTO_MESSAGE_DETAILS_METHOD; -} - -impl ChainWithBalances for Rialto { - fn account_info_storage_key(account_id: &Self::AccountId) -> StorageKey { - use frame_support::storage::generator::StorageMap; - StorageKey(frame_system::Account::::storage_map_final_key( - account_id, - )) - } -} - -impl ChainWithTransactions for Rialto { - type AccountKeyPair = sp_core::sr25519::Pair; - type SignedTransaction = rialto_runtime::UncheckedExtrinsic; - - fn sign_transaction( - param: SignParam, - unsigned: UnsignedTransaction, - ) -> Result { - let raw_payload = SignedPayload::from_raw( - unsigned.call.clone(), - ( - frame_system::CheckNonZeroSender::::new(), - frame_system::CheckSpecVersion::::new(), - frame_system::CheckTxVersion::::new(), - frame_system::CheckGenesis::::new(), - frame_system::CheckEra::::from(unsigned.era.frame_era()), - frame_system::CheckNonce::::from(unsigned.nonce), - frame_system::CheckWeight::::new(), - pallet_transaction_payment::ChargeTransactionPayment::::from(unsigned.tip), - ), - ( - (), - param.spec_version, - param.transaction_version, - param.genesis_hash, - unsigned.era.signed_payload(param.genesis_hash), - (), - (), - (), - ), - ); - let signature = raw_payload.using_encoded(|payload| param.signer.sign(payload)); - let signer: sp_runtime::MultiSigner = param.signer.public().into(); - let (call, extra, _) = raw_payload.deconstruct(); - - Ok(rialto_runtime::UncheckedExtrinsic::new_signed( - call.into_decoded()?, - signer.into_account().into(), - signature.into(), - extra, - )) - } - - fn is_signed(tx: &Self::SignedTransaction) -> bool { - tx.signature.is_some() - } - - fn is_signed_by(signer: &Self::AccountKeyPair, tx: &Self::SignedTransaction) -> bool { - tx.signature - .as_ref() - .map(|(address, _, _)| *address == rialto_runtime::Address::Id(signer.public().into())) - .unwrap_or(false) - } - - fn parse_transaction(tx: Self::SignedTransaction) -> Option> { - let extra = &tx.signature.as_ref()?.2; - Some( - UnsignedTransaction::new( - tx.function.into(), - Compact::>::decode(&mut &extra.5.encode()[..]).ok()?.into(), - ) - .tip(Compact::>::decode(&mut &extra.7.encode()[..]).ok()?.into()), - ) - } -} - -/// Rialto signing params. -pub type SigningParams = sp_core::sr25519::Pair; - -/// Rialto header type used in headers sync. -pub type SyncHeader = relay_substrate_client::SyncHeader; - -#[cfg(test)] -mod tests { - use super::*; - use relay_substrate_client::TransactionEra; - - #[test] - fn parse_transaction_works() { - let unsigned = UnsignedTransaction { - call: rialto_runtime::RuntimeCall::System(rialto_runtime::SystemCall::remark { - remark: b"Hello world!".to_vec(), - }) - .into(), - nonce: 777, - tip: 888, - era: TransactionEra::immortal(), - }; - let signed_transaction = Rialto::sign_transaction( - SignParam { - spec_version: 42, - transaction_version: 50000, - genesis_hash: [42u8; 32].into(), - signer: sp_core::sr25519::Pair::from_seed_slice(&[1u8; 32]).unwrap(), - }, - unsigned.clone(), - ) - .unwrap(); - let parsed_transaction = Rialto::parse_transaction(signed_transaction).unwrap(); - assert_eq!(parsed_transaction, unsigned); - } -} diff --git a/relays/client-rococo/Cargo.toml b/relays/client-rococo/Cargo.toml index 4124dc01bf0527712f5ae2fcd02814be47998b42..ba546396fac78fdabc3c7f995193c8a0e74696f1 100644 --- a/relays/client-rococo/Cargo.toml +++ b/relays/client-rococo/Cargo.toml @@ -5,6 +5,9 @@ authors = ["Parity Technologies "] edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", features = ["derive"] } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } diff --git a/relays/client-rococo/src/lib.rs b/relays/client-rococo/src/lib.rs index 6c22d6aca37829346b94230a0c1326617d313525..c96e421fa28d53fa52173d40ff7044acc4645d68 100644 --- a/relays/client-rococo/src/lib.rs +++ b/relays/client-rococo/src/lib.rs @@ -78,7 +78,6 @@ impl ChainWithBalances for Rococo { impl RelayChain for Rococo { const PARAS_PALLET_NAME: &'static str = bp_rococo::PARAS_PALLET_NAME; - const PARACHAINS_FINALITY_PALLET_NAME: &'static str = "BridgeRococoParachain"; } impl ChainWithTransactions for Rococo { diff --git a/relays/client-substrate/Cargo.toml b/relays/client-substrate/Cargo.toml index 9efb9dc49fde950d14af2cf842d406797accd153..d6e0d05a6723bfcd0d4b88719415419f2f4f67a7 100644 --- a/relays/client-substrate/Cargo.toml +++ b/relays/client-substrate/Cargo.toml @@ -5,19 +5,22 @@ authors = ["Parity Technologies "] edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] async-std = { version = "1.6.5", features = ["attributes"] } async-trait = "0.1" codec = { package = "parity-scale-codec", version = "3.1.5" } -futures = "0.3.29" +futures = "0.3.30" jsonrpsee = { version = "0.17", features = ["macros", "ws-client"] } log = "0.4.20" num-traits = "0.2" quick_cache = "0.4" rand = "0.8" scale-info = { version = "2.10.0", features = ["derive"] } -tokio = { version = "1.33", features = ["rt-multi-thread"] } -thiserror = "1.0.50" +tokio = { version = "1.36", features = ["rt-multi-thread"] } +thiserror = "1.0.56" # Bridge dependencies diff --git a/relays/client-substrate/src/calls.rs b/relays/client-substrate/src/calls.rs index 4e0ae9d99d2e6905a55e06646e2cc515d0e96768..71b9ec84aca30cc2384b50d4c99466798f46d72f 100644 --- a/relays/client-substrate/src/calls.rs +++ b/relays/client-substrate/src/calls.rs @@ -20,7 +20,7 @@ use codec::{Decode, Encode}; use scale_info::TypeInfo; use sp_std::{boxed::Box, vec::Vec}; -use xcm::{VersionedMultiLocation, VersionedXcm}; +use xcm::{VersionedLocation, VersionedXcm}; /// A minimized version of `frame-system::Call` that can be used without a runtime. #[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)] @@ -55,5 +55,5 @@ pub enum SudoCall { pub enum XcmCall { /// `pallet-xcm::Call::send` #[codec(index = 0)] - send(Box, Box>), + send(Box, Box>), } diff --git a/relays/client-substrate/src/chain.rs b/relays/client-substrate/src/chain.rs index 1bc007c2c28d54aea6849ee493c4ae63033f6aed..8d24db97711ef8168a60c8fda39943fb330529ef 100644 --- a/relays/client-substrate/src/chain.rs +++ b/relays/client-substrate/src/chain.rs @@ -67,12 +67,6 @@ pub trait Chain: ChainBase + Clone { pub trait RelayChain: Chain { /// Name of the `runtime_parachains::paras` pallet in the runtime of this chain. const PARAS_PALLET_NAME: &'static str; - /// Name of the bridge parachains pallet (used in `construct_runtime` macro call) that is - /// deployed at the **bridged** chain. - /// - /// We assume that all chains that are bridging with this `RelayChain` are using - /// the same name. - const PARACHAINS_FINALITY_PALLET_NAME: &'static str; } /// Substrate-based chain that is using direct GRANDPA finality from minimal relay-client point of @@ -162,6 +156,24 @@ impl UnsignedTransaction { Self { call, nonce, era: TransactionEra::Immortal, tip: Zero::zero() } } + /// Convert to the transaction of the other compatible chain. + pub fn switch_chain(self) -> UnsignedTransaction + where + Other: Chain< + Nonce = C::Nonce, + Balance = C::Balance, + BlockNumber = C::BlockNumber, + Hash = C::Hash, + >, + { + UnsignedTransaction { + call: EncodedOrDecodedCall::Encoded(self.call.into_encoded()), + nonce: self.nonce, + tip: self.tip, + era: self.era, + } + } + /// Set transaction tip. #[must_use] pub fn tip(mut self, tip: C::Balance) -> Self { diff --git a/relays/client-westend/Cargo.toml b/relays/client-westend/Cargo.toml index ca20523e3fa7242af08a1234f6eccf5a3c14c6b3..1933a1f4130c657ad3e1b64fb150afa515cac9b6 100644 --- a/relays/client-westend/Cargo.toml +++ b/relays/client-westend/Cargo.toml @@ -5,15 +5,27 @@ authors = ["Parity Technologies "] edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] -relay-substrate-client = { path = "../client-substrate" } -relay-utils = { path = "../utils" } +codec = { package = "parity-scale-codec", version = "3.1.5", features = ["derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +subxt = { version = "0.32.1", default-features = false, features = ["native"] } # Bridge dependencies +bp-polkadot-core = { path = "../../primitives/polkadot-core" } +bp-runtime = { path = "../../primitives/runtime" } bp-westend = { path = "../../primitives/chain-westend" } +relay-substrate-client = { path = "../client-substrate" } +relay-utils = { path = "../utils" } + # Substrate Dependencies +sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } +sp-weights = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } diff --git a/relays/client-westend/src/codegen_runtime.rs b/relays/client-westend/src/codegen_runtime.rs new file mode 100644 index 0000000000000000000000000000000000000000..9422622e48c505d1a1bdb24786c2db62c48f3796 --- /dev/null +++ b/relays/client-westend/src/codegen_runtime.rs @@ -0,0 +1,6945 @@ +// Copyright 2019-2023 Parity Technologies (UK) Ltd. +// This file is part of Parity Bridges Common. + +// Parity Bridges Common is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity Bridges Common is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity Bridges Common. If not, see . + +//! Autogenerated runtime API +//! THIS FILE WAS AUTOGENERATED USING parity-bridges-common::runtime-codegen +//! EXECUTED COMMAND: target/debug/runtime-codegen --from-node-url wss://westend-rpc.polkadot.io:443 + +#[allow(dead_code, unused_imports, non_camel_case_types)] +#[allow(clippy::all)] +pub mod api { + use super::api as root_mod; + pub mod runtime_types { + use super::runtime_types; + pub mod bounded_collections { + use super::runtime_types; + pub mod bounded_btree_map { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BoundedBTreeMap<_0, _1>(pub ::subxt::utils::KeyedVec<_0, _1>); + } + pub mod bounded_vec { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BoundedVec<_0>(pub ::std::vec::Vec<_0>); + } + pub mod weak_bounded_vec { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct WeakBoundedVec<_0>(pub ::std::vec::Vec<_0>); + } + } + pub mod finality_grandpa { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Equivocation<_0, _1, _2> { + pub round_number: ::core::primitive::u64, + pub identity: _0, + pub first: (_1, _2), + pub second: (_1, _2), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Precommit<_0, _1> { + pub target_hash: _0, + pub target_number: _1, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Prevote<_0, _1> { + pub target_hash: _0, + pub target_number: _1, + } + } + pub mod frame_support { + use super::runtime_types; + pub mod dispatch { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum DispatchClass { + #[codec(index = 0)] + Normal, + #[codec(index = 1)] + Operational, + #[codec(index = 2)] + Mandatory, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + 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(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Pays { + #[codec(index = 0)] + Yes, + #[codec(index = 1)] + No, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct PerDispatchClass<_0> { + pub normal: _0, + pub operational: _0, + pub mandatory: _0, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum RawOrigin<_0> { + #[codec(index = 0)] + Root, + #[codec(index = 1)] + Signed(_0), + #[codec(index = 2)] + None, + } + } + pub mod traits { + use super::runtime_types; + pub mod messages { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ProcessMessageError { + #[codec(index = 0)] + BadFormat, + #[codec(index = 1)] + Corrupt, + #[codec(index = 2)] + Unsupported, + #[codec(index = 3)] + Overweight(::sp_weights::Weight), + #[codec(index = 4)] + Yield, + } + } + pub mod misc { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct WrapperOpaque<_0>( + #[codec(compact)] pub ::core::primitive::u32, + pub _0, + ); + } + pub mod preimages { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Bounded<_0> { + #[codec(index = 0)] + Legacy { + hash: ::subxt::utils::H256, + }, + #[codec(index = 1)] + Inline( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ), + #[codec(index = 2)] + Lookup { + hash: ::subxt::utils::H256, + len: ::core::primitive::u32, + }, + __Ignore(::core::marker::PhantomData<_0>), + } + } + pub mod tokens { + use super::runtime_types; + pub mod misc { + use super::runtime_types; + #[derive( + :: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq, + )] + pub enum BalanceStatus { + #[codec(index = 0)] + Free, + #[codec(index = 1)] + Reserved, + } + } + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct PalletId(pub [::core::primitive::u8; 8usize]); + } + pub mod frame_system { + use super::runtime_types; + pub mod extensions { + use super::runtime_types; + pub mod check_genesis { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CheckGenesis; + } + pub mod check_mortality { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CheckMortality(pub ::sp_runtime::generic::Era); + } + pub mod check_non_zero_sender { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CheckNonZeroSender; + } + pub mod check_nonce { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CheckNonce(#[codec(compact)] pub ::core::primitive::u32); + } + pub mod check_spec_version { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CheckSpecVersion; + } + pub mod check_tx_version { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CheckTxVersion; + } + pub mod check_weight { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CheckWeight; + } + } + pub mod limits { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BlockLength { + pub max: runtime_types::frame_support::dispatch::PerDispatchClass< + ::core::primitive::u32, + >, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BlockWeights { + pub base_block: ::sp_weights::Weight, + pub max_block: ::sp_weights::Weight, + pub per_class: runtime_types::frame_support::dispatch::PerDispatchClass< + runtime_types::frame_system::limits::WeightsPerClass, + >, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct WeightsPerClass { + pub base_extrinsic: ::sp_weights::Weight, + pub max_extrinsic: ::core::option::Option<::sp_weights::Weight>, + pub max_total: ::core::option::Option<::sp_weights::Weight>, + pub reserved: ::core::option::Option<::sp_weights::Weight>, + } + } + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + remark { remark: ::std::vec::Vec<::core::primitive::u8> }, + #[codec(index = 1)] + set_heap_pages { pages: ::core::primitive::u64 }, + #[codec(index = 2)] + set_code { code: ::std::vec::Vec<::core::primitive::u8> }, + #[codec(index = 3)] + set_code_without_checks { code: ::std::vec::Vec<::core::primitive::u8> }, + #[codec(index = 4)] + set_storage { + items: ::std::vec::Vec<( + ::std::vec::Vec<::core::primitive::u8>, + ::std::vec::Vec<::core::primitive::u8>, + )>, + }, + #[codec(index = 5)] + kill_storage { keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>> }, + #[codec(index = 6)] + kill_prefix { + prefix: ::std::vec::Vec<::core::primitive::u8>, + subkeys: ::core::primitive::u32, + }, + #[codec(index = 7)] + remark_with_event { remark: ::std::vec::Vec<::core::primitive::u8> }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + InvalidSpecName, + #[codec(index = 1)] + SpecVersionNeedsToIncrease, + #[codec(index = 2)] + FailedToExtractRuntimeVersion, + #[codec(index = 3)] + NonDefaultComposite, + #[codec(index = 4)] + NonZeroRefCount, + #[codec(index = 5)] + CallFiltered, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + ExtrinsicSuccess { + dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, + }, + #[codec(index = 1)] + ExtrinsicFailed { + dispatch_error: runtime_types::sp_runtime::DispatchError, + dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, + }, + #[codec(index = 2)] + CodeUpdated, + #[codec(index = 3)] + NewAccount { account: ::sp_core::crypto::AccountId32 }, + #[codec(index = 4)] + KilledAccount { account: ::sp_core::crypto::AccountId32 }, + #[codec(index = 5)] + Remarked { sender: ::sp_core::crypto::AccountId32, hash: ::subxt::utils::H256 }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct AccountInfo<_0, _1> { + pub nonce: _0, + pub consumers: _0, + pub providers: _0, + pub sufficients: _0, + pub data: _1, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct EventRecord<_0, _1> { + pub phase: runtime_types::frame_system::Phase, + pub event: _0, + pub topics: ::std::vec::Vec<_1>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct LastRuntimeUpgradeInfo { + #[codec(compact)] + pub spec_version: ::core::primitive::u32, + pub spec_name: ::std::string::String, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Phase { + #[codec(index = 0)] + ApplyExtrinsic(::core::primitive::u32), + #[codec(index = 1)] + Finalization, + #[codec(index = 2)] + Initialization, + } + } + pub mod pallet_babe { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + report_equivocation { + equivocation_proof: ::std::boxed::Box< + runtime_types::sp_consensus_slots::EquivocationProof< + ::sp_runtime::generic::Header< + ::core::primitive::u32, + ::sp_runtime::traits::BlakeTwo256, + >, + runtime_types::sp_consensus_babe::app::Public, + >, + >, + key_owner_proof: ::sp_session::MembershipProof, + }, + #[codec(index = 1)] + report_equivocation_unsigned { + equivocation_proof: ::std::boxed::Box< + runtime_types::sp_consensus_slots::EquivocationProof< + ::sp_runtime::generic::Header< + ::core::primitive::u32, + ::sp_runtime::traits::BlakeTwo256, + >, + runtime_types::sp_consensus_babe::app::Public, + >, + >, + key_owner_proof: ::sp_session::MembershipProof, + }, + #[codec(index = 2)] + plan_config_change { + config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + InvalidEquivocationProof, + #[codec(index = 1)] + InvalidKeyOwnershipProof, + #[codec(index = 2)] + DuplicateOffenceReport, + #[codec(index = 3)] + InvalidConfiguration, + } + } + } + pub mod pallet_bags_list { + use super::runtime_types; + pub mod list { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Bag { + pub head: ::core::option::Option<::sp_core::crypto::AccountId32>, + pub tail: ::core::option::Option<::sp_core::crypto::AccountId32>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ListError { + #[codec(index = 0)] + Duplicate, + #[codec(index = 1)] + NotHeavier, + #[codec(index = 2)] + NotInSameBag, + #[codec(index = 3)] + NodeNotFound, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Node { + pub id: ::sp_core::crypto::AccountId32, + pub prev: ::core::option::Option<::sp_core::crypto::AccountId32>, + pub next: ::core::option::Option<::sp_core::crypto::AccountId32>, + pub bag_upper: ::core::primitive::u64, + pub score: ::core::primitive::u64, + } + } + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + rebag { + dislocated: + ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 1)] + put_in_front_of { + lighter: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + List(runtime_types::pallet_bags_list::list::ListError), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Rebagged { + who: ::sp_core::crypto::AccountId32, + from: ::core::primitive::u64, + to: ::core::primitive::u64, + }, + #[codec(index = 1)] + ScoreUpdated { + who: ::sp_core::crypto::AccountId32, + new_score: ::core::primitive::u64, + }, + } + } + } + pub mod pallet_balances { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + transfer_allow_death { + dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 1)] + set_balance_deprecated { + who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + #[codec(compact)] + new_free: ::core::primitive::u128, + #[codec(compact)] + old_reserved: ::core::primitive::u128, + }, + #[codec(index = 2)] + force_transfer { + source: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 3)] + transfer_keep_alive { + dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 4)] + transfer_all { + dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + keep_alive: ::core::primitive::bool, + }, + #[codec(index = 5)] + force_unreserve { + who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + amount: ::core::primitive::u128, + }, + #[codec(index = 6)] + upgrade_accounts { who: ::std::vec::Vec<::sp_core::crypto::AccountId32> }, + #[codec(index = 7)] + transfer { + dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 8)] + force_set_balance { + who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + #[codec(compact)] + new_free: ::core::primitive::u128, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + VestingBalance, + #[codec(index = 1)] + LiquidityRestrictions, + #[codec(index = 2)] + InsufficientBalance, + #[codec(index = 3)] + ExistentialDeposit, + #[codec(index = 4)] + Expendability, + #[codec(index = 5)] + ExistingVestingSchedule, + #[codec(index = 6)] + DeadAccount, + #[codec(index = 7)] + TooManyReserves, + #[codec(index = 8)] + TooManyHolds, + #[codec(index = 9)] + TooManyFreezes, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Endowed { + account: ::sp_core::crypto::AccountId32, + free_balance: ::core::primitive::u128, + }, + #[codec(index = 1)] + DustLost { + account: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + Transfer { + from: ::sp_core::crypto::AccountId32, + to: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 3)] + BalanceSet { + who: ::sp_core::crypto::AccountId32, + free: ::core::primitive::u128, + }, + #[codec(index = 4)] + Reserved { + who: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 5)] + Unreserved { + who: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 6)] + ReserveRepatriated { + from: ::sp_core::crypto::AccountId32, + to: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + destination_status: + runtime_types::frame_support::traits::tokens::misc::BalanceStatus, + }, + #[codec(index = 7)] + Deposit { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 8)] + Withdraw { + who: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 9)] + Slashed { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 10)] + Minted { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 11)] + Burned { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 12)] + Suspended { + who: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 13)] + Restored { + who: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 14)] + Upgraded { who: ::sp_core::crypto::AccountId32 }, + #[codec(index = 15)] + Issued { amount: ::core::primitive::u128 }, + #[codec(index = 16)] + 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, + }, + #[codec(index = 19)] + Frozen { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 20)] + Thawed { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, + } + } + pub mod types { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct AccountData<_0> { + pub free: _0, + pub reserved: _0, + pub frozen: _0, + pub flags: runtime_types::pallet_balances::types::ExtraFlags, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + 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, + Clone, + Debug, + PartialEq, + )] + pub struct ExtraFlags(pub ::core::primitive::u128); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct IdAmount<_0, _1> { + pub id: _0, + pub amount: _1, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Reasons { + #[codec(index = 0)] + Fee, + #[codec(index = 1)] + Misc, + #[codec(index = 2)] + All, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ReserveData<_0, _1> { + pub id: _0, + pub amount: _1, + } + } + } + pub mod pallet_election_provider_multi_phase { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + # [codec (index = 0)] submit_unsigned { raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: westend_runtime :: NposCompactSolution16 > > , witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , } , # [codec (index = 1)] set_minimum_untrusted_score { maybe_next_score : :: core :: option :: Option < runtime_types :: sp_npos_elections :: ElectionScore > , } , # [codec (index = 2)] set_emergency_election_result { supports : :: std :: vec :: Vec < (:: sp_core :: crypto :: AccountId32 , runtime_types :: sp_npos_elections :: Support < :: sp_core :: crypto :: AccountId32 > ,) > , } , # [codec (index = 3)] submit { raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: westend_runtime :: NposCompactSolution16 > > , } , # [codec (index = 4)] governance_fallback { maybe_max_voters : :: core :: option :: Option < :: core :: primitive :: u32 > , maybe_max_targets : :: core :: option :: Option < :: core :: primitive :: u32 > , } , } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + PreDispatchEarlySubmission, + #[codec(index = 1)] + PreDispatchWrongWinnerCount, + #[codec(index = 2)] + PreDispatchWeakSubmission, + #[codec(index = 3)] + SignedQueueFull, + #[codec(index = 4)] + SignedCannotPayDeposit, + #[codec(index = 5)] + SignedInvalidWitness, + #[codec(index = 6)] + SignedTooMuchWeight, + #[codec(index = 7)] + OcwCallWrongEra, + #[codec(index = 8)] + MissingSnapshotMetadata, + #[codec(index = 9)] + InvalidSubmissionIndex, + #[codec(index = 10)] + CallNotAllowed, + #[codec(index = 11)] + FallbackFailed, + #[codec(index = 12)] + BoundNotMet, + #[codec(index = 13)] + TooManyWinners, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + SolutionStored { + compute: + runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + origin: ::core::option::Option<::sp_core::crypto::AccountId32>, + prev_ejected: ::core::primitive::bool, + }, + #[codec(index = 1)] + ElectionFinalized { + compute: + runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + score: runtime_types::sp_npos_elections::ElectionScore, + }, + #[codec(index = 2)] + ElectionFailed, + #[codec(index = 3)] + Rewarded { + account: ::sp_core::crypto::AccountId32, + value: ::core::primitive::u128, + }, + #[codec(index = 4)] + Slashed { + account: ::sp_core::crypto::AccountId32, + value: ::core::primitive::u128, + }, + #[codec(index = 5)] + PhaseTransitioned { + from: runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u32, + >, + to: runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u32, + >, + round: ::core::primitive::u32, + }, + } + } + pub mod signed { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct SignedSubmission<_0, _1, _2> { + pub who: _0, + pub deposit: _1, + pub raw_solution: + runtime_types::pallet_election_provider_multi_phase::RawSolution<_2>, + pub call_fee: _1, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ElectionCompute { + #[codec(index = 0)] + OnChain, + #[codec(index = 1)] + Signed, + #[codec(index = 2)] + Unsigned, + #[codec(index = 3)] + Fallback, + #[codec(index = 4)] + Emergency, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Phase<_0> { + #[codec(index = 0)] + Off, + #[codec(index = 1)] + Signed, + #[codec(index = 2)] + Unsigned((::core::primitive::bool, _0)), + #[codec(index = 3)] + Emergency, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct RawSolution<_0> { + pub solution: _0, + pub score: runtime_types::sp_npos_elections::ElectionScore, + pub round: ::core::primitive::u32, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ReadySolution { + pub supports: runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::sp_core::crypto::AccountId32, + runtime_types::sp_npos_elections::Support<::sp_core::crypto::AccountId32>, + )>, + pub score: runtime_types::sp_npos_elections::ElectionScore, + pub compute: runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct RoundSnapshot<_0, _1> { + pub voters: ::std::vec::Vec<_1>, + pub targets: ::std::vec::Vec<_0>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct SolutionOrSnapshotSize { + #[codec(compact)] + pub voters: ::core::primitive::u32, + #[codec(compact)] + pub targets: ::core::primitive::u32, + } + } + pub mod pallet_fast_unstake { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + register_fast_unstake, + #[codec(index = 1)] + deregister, + #[codec(index = 2)] + control { eras_to_check: ::core::primitive::u32 }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + NotController, + #[codec(index = 1)] + AlreadyQueued, + #[codec(index = 2)] + NotFullyBonded, + #[codec(index = 3)] + NotQueued, + #[codec(index = 4)] + AlreadyHead, + #[codec(index = 5)] + CallNotAllowed, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Unstaked { + stash: ::sp_core::crypto::AccountId32, + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 1)] + Slashed { + stash: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + InternalError, + #[codec(index = 3)] + BatchChecked { eras: ::std::vec::Vec<::core::primitive::u32> }, + #[codec(index = 4)] + BatchFinished { size: ::core::primitive::u32 }, + } + } + pub mod types { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct UnstakeRequest { + pub stashes: runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::sp_core::crypto::AccountId32, + ::core::primitive::u128, + )>, + pub checked: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u32, + >, + } + } + } + pub mod pallet_grandpa { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + report_equivocation { + equivocation_proof: ::std::boxed::Box< + ::sp_consensus_grandpa::EquivocationProof< + ::subxt::utils::H256, + ::core::primitive::u32, + >, + >, + key_owner_proof: ::sp_session::MembershipProof, + }, + #[codec(index = 1)] + report_equivocation_unsigned { + equivocation_proof: ::std::boxed::Box< + ::sp_consensus_grandpa::EquivocationProof< + ::subxt::utils::H256, + ::core::primitive::u32, + >, + >, + key_owner_proof: ::sp_session::MembershipProof, + }, + #[codec(index = 2)] + note_stalled { + delay: ::core::primitive::u32, + best_finalized_block_number: ::core::primitive::u32, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + PauseFailed, + #[codec(index = 1)] + ResumeFailed, + #[codec(index = 2)] + ChangePending, + #[codec(index = 3)] + TooSoon, + #[codec(index = 4)] + InvalidKeyOwnershipProof, + #[codec(index = 5)] + InvalidEquivocationProof, + #[codec(index = 6)] + DuplicateOffenceReport, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + NewAuthorities { + authority_set: ::std::vec::Vec<( + runtime_types::sp_consensus_grandpa::app::Public, + ::core::primitive::u64, + )>, + }, + #[codec(index = 1)] + Paused, + #[codec(index = 2)] + Resumed, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct StoredPendingChange<_0> { + pub scheduled_at: _0, + pub delay: _0, + pub next_authorities: + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec<( + runtime_types::sp_consensus_grandpa::app::Public, + ::core::primitive::u64, + )>, + pub forced: ::core::option::Option<_0>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum StoredState<_0> { + #[codec(index = 0)] + Live, + #[codec(index = 1)] + PendingPause { scheduled_at: _0, delay: _0 }, + #[codec(index = 2)] + Paused, + #[codec(index = 3)] + PendingResume { scheduled_at: _0, delay: _0 }, + } + } + pub mod pallet_identity { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + add_registrar { + account: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 1)] + set_identity { + info: + ::std::boxed::Box, + }, + #[codec(index = 2)] + set_subs { + subs: ::std::vec::Vec<( + ::sp_core::crypto::AccountId32, + runtime_types::pallet_identity::types::Data, + )>, + }, + #[codec(index = 3)] + clear_identity, + #[codec(index = 4)] + request_judgement { + #[codec(compact)] + reg_index: ::core::primitive::u32, + #[codec(compact)] + max_fee: ::core::primitive::u128, + }, + #[codec(index = 5)] + cancel_request { reg_index: ::core::primitive::u32 }, + #[codec(index = 6)] + set_fee { + #[codec(compact)] + index: ::core::primitive::u32, + #[codec(compact)] + fee: ::core::primitive::u128, + }, + #[codec(index = 7)] + set_account_id { + #[codec(compact)] + index: ::core::primitive::u32, + new: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 8)] + set_fields { + #[codec(compact)] + index: ::core::primitive::u32, + fields: runtime_types::pallet_identity::types::BitFlags< + runtime_types::pallet_identity::types::IdentityField, + >, + }, + #[codec(index = 9)] + provide_judgement { + #[codec(compact)] + reg_index: ::core::primitive::u32, + target: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + judgement: runtime_types::pallet_identity::types::Judgement< + ::core::primitive::u128, + >, + identity: ::subxt::utils::H256, + }, + #[codec(index = 10)] + kill_identity { + target: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 11)] + add_sub { + sub: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + data: runtime_types::pallet_identity::types::Data, + }, + #[codec(index = 12)] + rename_sub { + sub: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + data: runtime_types::pallet_identity::types::Data, + }, + #[codec(index = 13)] + remove_sub { + sub: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 14)] + quit_sub, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + TooManySubAccounts, + #[codec(index = 1)] + NotFound, + #[codec(index = 2)] + NotNamed, + #[codec(index = 3)] + EmptyIndex, + #[codec(index = 4)] + FeeChanged, + #[codec(index = 5)] + NoIdentity, + #[codec(index = 6)] + StickyJudgement, + #[codec(index = 7)] + JudgementGiven, + #[codec(index = 8)] + InvalidJudgement, + #[codec(index = 9)] + InvalidIndex, + #[codec(index = 10)] + InvalidTarget, + #[codec(index = 11)] + TooManyFields, + #[codec(index = 12)] + TooManyRegistrars, + #[codec(index = 13)] + AlreadyClaimed, + #[codec(index = 14)] + NotSub, + #[codec(index = 15)] + NotOwned, + #[codec(index = 16)] + JudgementForDifferentIdentity, + #[codec(index = 17)] + JudgementPaymentFailed, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + IdentitySet { who: ::sp_core::crypto::AccountId32 }, + #[codec(index = 1)] + IdentityCleared { + who: ::sp_core::crypto::AccountId32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 2)] + IdentityKilled { + who: ::sp_core::crypto::AccountId32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 3)] + JudgementRequested { + who: ::sp_core::crypto::AccountId32, + registrar_index: ::core::primitive::u32, + }, + #[codec(index = 4)] + JudgementUnrequested { + who: ::sp_core::crypto::AccountId32, + registrar_index: ::core::primitive::u32, + }, + #[codec(index = 5)] + JudgementGiven { + target: ::sp_core::crypto::AccountId32, + registrar_index: ::core::primitive::u32, + }, + #[codec(index = 6)] + RegistrarAdded { registrar_index: ::core::primitive::u32 }, + #[codec(index = 7)] + SubIdentityAdded { + sub: ::sp_core::crypto::AccountId32, + main: ::sp_core::crypto::AccountId32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 8)] + SubIdentityRemoved { + sub: ::sp_core::crypto::AccountId32, + main: ::sp_core::crypto::AccountId32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 9)] + SubIdentityRevoked { + sub: ::sp_core::crypto::AccountId32, + main: ::sp_core::crypto::AccountId32, + deposit: ::core::primitive::u128, + }, + } + } + pub mod types { + use super::runtime_types; + #[derive( + :: codec :: Decode, + :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + Clone, + Debug, + PartialEq, + )] + pub struct BitFlags<_0>( + pub ::core::primitive::u64, + #[codec(skip)] pub ::core::marker::PhantomData<_0>, + ); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Data { + #[codec(index = 0)] + None, + #[codec(index = 1)] + Raw0([::core::primitive::u8; 0usize]), + #[codec(index = 2)] + Raw1([::core::primitive::u8; 1usize]), + #[codec(index = 3)] + Raw2([::core::primitive::u8; 2usize]), + #[codec(index = 4)] + Raw3([::core::primitive::u8; 3usize]), + #[codec(index = 5)] + Raw4([::core::primitive::u8; 4usize]), + #[codec(index = 6)] + Raw5([::core::primitive::u8; 5usize]), + #[codec(index = 7)] + Raw6([::core::primitive::u8; 6usize]), + #[codec(index = 8)] + Raw7([::core::primitive::u8; 7usize]), + #[codec(index = 9)] + Raw8([::core::primitive::u8; 8usize]), + #[codec(index = 10)] + Raw9([::core::primitive::u8; 9usize]), + #[codec(index = 11)] + Raw10([::core::primitive::u8; 10usize]), + #[codec(index = 12)] + Raw11([::core::primitive::u8; 11usize]), + #[codec(index = 13)] + Raw12([::core::primitive::u8; 12usize]), + #[codec(index = 14)] + Raw13([::core::primitive::u8; 13usize]), + #[codec(index = 15)] + Raw14([::core::primitive::u8; 14usize]), + #[codec(index = 16)] + Raw15([::core::primitive::u8; 15usize]), + #[codec(index = 17)] + Raw16([::core::primitive::u8; 16usize]), + #[codec(index = 18)] + Raw17([::core::primitive::u8; 17usize]), + #[codec(index = 19)] + Raw18([::core::primitive::u8; 18usize]), + #[codec(index = 20)] + Raw19([::core::primitive::u8; 19usize]), + #[codec(index = 21)] + Raw20([::core::primitive::u8; 20usize]), + #[codec(index = 22)] + Raw21([::core::primitive::u8; 21usize]), + #[codec(index = 23)] + Raw22([::core::primitive::u8; 22usize]), + #[codec(index = 24)] + Raw23([::core::primitive::u8; 23usize]), + #[codec(index = 25)] + Raw24([::core::primitive::u8; 24usize]), + #[codec(index = 26)] + Raw25([::core::primitive::u8; 25usize]), + #[codec(index = 27)] + Raw26([::core::primitive::u8; 26usize]), + #[codec(index = 28)] + Raw27([::core::primitive::u8; 27usize]), + #[codec(index = 29)] + Raw28([::core::primitive::u8; 28usize]), + #[codec(index = 30)] + Raw29([::core::primitive::u8; 29usize]), + #[codec(index = 31)] + Raw30([::core::primitive::u8; 30usize]), + #[codec(index = 32)] + Raw31([::core::primitive::u8; 31usize]), + #[codec(index = 33)] + Raw32([::core::primitive::u8; 32usize]), + #[codec(index = 34)] + BlakeTwo256([::core::primitive::u8; 32usize]), + #[codec(index = 35)] + Sha256([::core::primitive::u8; 32usize]), + #[codec(index = 36)] + Keccak256([::core::primitive::u8; 32usize]), + #[codec(index = 37)] + ShaThree256([::core::primitive::u8; 32usize]), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum IdentityField { + #[codec(index = 1)] + Display, + #[codec(index = 2)] + Legal, + #[codec(index = 4)] + Web, + #[codec(index = 8)] + Riot, + #[codec(index = 16)] + Email, + #[codec(index = 32)] + PgpFingerprint, + #[codec(index = 64)] + Image, + #[codec(index = 128)] + Twitter, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct IdentityInfo { + pub additional: runtime_types::bounded_collections::bounded_vec::BoundedVec<( + runtime_types::pallet_identity::types::Data, + runtime_types::pallet_identity::types::Data, + )>, + pub display: runtime_types::pallet_identity::types::Data, + pub legal: runtime_types::pallet_identity::types::Data, + pub web: runtime_types::pallet_identity::types::Data, + pub riot: runtime_types::pallet_identity::types::Data, + pub email: runtime_types::pallet_identity::types::Data, + pub pgp_fingerprint: ::core::option::Option<[::core::primitive::u8; 20usize]>, + pub image: runtime_types::pallet_identity::types::Data, + pub twitter: runtime_types::pallet_identity::types::Data, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Judgement<_0> { + #[codec(index = 0)] + Unknown, + #[codec(index = 1)] + FeePaid(_0), + #[codec(index = 2)] + Reasonable, + #[codec(index = 3)] + KnownGood, + #[codec(index = 4)] + OutOfDate, + #[codec(index = 5)] + LowQuality, + #[codec(index = 6)] + Erroneous, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct RegistrarInfo<_0, _1> { + pub account: _1, + pub fee: _0, + pub fields: runtime_types::pallet_identity::types::BitFlags< + runtime_types::pallet_identity::types::IdentityField, + >, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Registration<_0> { + pub judgements: runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::core::primitive::u32, + runtime_types::pallet_identity::types::Judgement<_0>, + )>, + pub deposit: _0, + pub info: runtime_types::pallet_identity::types::IdentityInfo, + } + } + } + pub mod pallet_im_online { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + heartbeat { + heartbeat: + runtime_types::pallet_im_online::Heartbeat<::core::primitive::u32>, + signature: runtime_types::pallet_im_online::sr25519::app_sr25519::Signature, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + InvalidKey, + #[codec(index = 1)] + DuplicatedHeartbeat, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + HeartbeatReceived { + authority_id: runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + }, + #[codec(index = 1)] + AllGood, + #[codec(index = 2)] + SomeOffline { + offline: ::std::vec::Vec<( + ::sp_core::crypto::AccountId32, + runtime_types::pallet_staking::Exposure< + ::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, + )>, + }, + } + } + pub mod sr25519 { + use super::runtime_types; + pub mod app_sr25519 { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BoundedOpaqueNetworkState { + pub peer_id: runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + ::core::primitive::u8, + >, + pub external_addresses: + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + ::core::primitive::u8, + >, + >, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Heartbeat<_0> { + pub block_number: _0, + pub network_state: runtime_types::sp_core::offchain::OpaqueNetworkState, + pub session_index: _0, + pub authority_index: _0, + pub validators_len: _0, + } + } + pub mod pallet_indices { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + claim { index: ::core::primitive::u32 }, + #[codec(index = 1)] + transfer { + new: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + index: ::core::primitive::u32, + }, + #[codec(index = 2)] + free { index: ::core::primitive::u32 }, + #[codec(index = 3)] + force_transfer { + new: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + index: ::core::primitive::u32, + freeze: ::core::primitive::bool, + }, + #[codec(index = 4)] + freeze { index: ::core::primitive::u32 }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + NotAssigned, + #[codec(index = 1)] + NotOwner, + #[codec(index = 2)] + InUse, + #[codec(index = 3)] + NotTransfer, + #[codec(index = 4)] + Permanent, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + IndexAssigned { + who: ::sp_core::crypto::AccountId32, + index: ::core::primitive::u32, + }, + #[codec(index = 1)] + IndexFreed { index: ::core::primitive::u32 }, + #[codec(index = 2)] + IndexFrozen { + index: ::core::primitive::u32, + who: ::sp_core::crypto::AccountId32, + }, + } + } + } + pub mod pallet_message_queue { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + # [codec (index = 0)] reap_page { message_origin : runtime_types :: polkadot_runtime_parachains :: inclusion :: AggregateMessageOrigin , page_index : :: core :: primitive :: u32 , } , # [codec (index = 1)] execute_overweight { message_origin : runtime_types :: polkadot_runtime_parachains :: inclusion :: AggregateMessageOrigin , page : :: core :: primitive :: u32 , index : :: core :: primitive :: u32 , weight_limit : :: sp_weights :: Weight , } , } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + NotReapable, + #[codec(index = 1)] + NoPage, + #[codec(index = 2)] + NoMessage, + #[codec(index = 3)] + AlreadyProcessed, + #[codec(index = 4)] + Queued, + #[codec(index = 5)] + InsufficientWeight, + #[codec(index = 6)] + TemporarilyUnprocessable, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + # [codec (index = 0)] ProcessingFailed { id : [:: core :: primitive :: u8 ; 32usize] , origin : runtime_types :: polkadot_runtime_parachains :: inclusion :: AggregateMessageOrigin , error : runtime_types :: frame_support :: traits :: messages :: ProcessMessageError , } , # [codec (index = 1)] Processed { id : [:: core :: primitive :: u8 ; 32usize] , origin : runtime_types :: polkadot_runtime_parachains :: inclusion :: AggregateMessageOrigin , weight_used : :: sp_weights :: Weight , success : :: core :: primitive :: bool , } , # [codec (index = 2)] OverweightEnqueued { id : [:: core :: primitive :: u8 ; 32usize] , origin : runtime_types :: polkadot_runtime_parachains :: inclusion :: AggregateMessageOrigin , page_index : :: core :: primitive :: u32 , message_index : :: core :: primitive :: u32 , } , # [codec (index = 3)] PageReaped { origin : runtime_types :: polkadot_runtime_parachains :: inclusion :: AggregateMessageOrigin , index : :: core :: primitive :: u32 , } , } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BookState<_0> { + pub begin: ::core::primitive::u32, + pub end: ::core::primitive::u32, + pub count: ::core::primitive::u32, + pub ready_neighbours: + ::core::option::Option>, + pub message_count: ::core::primitive::u64, + pub size: ::core::primitive::u64, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Neighbours<_0> { + pub prev: _0, + pub next: _0, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Page<_0> { + pub remaining: _0, + pub remaining_size: _0, + pub first_index: _0, + pub first: _0, + pub last: _0, + pub heap: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + } + } + pub mod pallet_multisig { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + as_multi_threshold_1 { + other_signatories: ::std::vec::Vec<::sp_core::crypto::AccountId32>, + call: ::std::boxed::Box, + }, + #[codec(index = 1)] + as_multi { + threshold: ::core::primitive::u16, + other_signatories: ::std::vec::Vec<::sp_core::crypto::AccountId32>, + maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + >, + call: ::std::boxed::Box, + max_weight: ::sp_weights::Weight, + }, + #[codec(index = 2)] + approve_as_multi { + threshold: ::core::primitive::u16, + other_signatories: ::std::vec::Vec<::sp_core::crypto::AccountId32>, + maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + >, + call_hash: [::core::primitive::u8; 32usize], + max_weight: ::sp_weights::Weight, + }, + #[codec(index = 3)] + cancel_as_multi { + threshold: ::core::primitive::u16, + other_signatories: ::std::vec::Vec<::sp_core::crypto::AccountId32>, + timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + call_hash: [::core::primitive::u8; 32usize], + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + MinimumThreshold, + #[codec(index = 1)] + AlreadyApproved, + #[codec(index = 2)] + NoApprovalsNeeded, + #[codec(index = 3)] + TooFewSignatories, + #[codec(index = 4)] + TooManySignatories, + #[codec(index = 5)] + SignatoriesOutOfOrder, + #[codec(index = 6)] + SenderInSignatories, + #[codec(index = 7)] + NotFound, + #[codec(index = 8)] + NotOwner, + #[codec(index = 9)] + NoTimepoint, + #[codec(index = 10)] + WrongTimepoint, + #[codec(index = 11)] + UnexpectedTimepoint, + #[codec(index = 12)] + MaxWeightTooLow, + #[codec(index = 13)] + AlreadyStored, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + NewMultisig { + approving: ::sp_core::crypto::AccountId32, + multisig: ::sp_core::crypto::AccountId32, + call_hash: [::core::primitive::u8; 32usize], + }, + #[codec(index = 1)] + MultisigApproval { + approving: ::sp_core::crypto::AccountId32, + timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + multisig: ::sp_core::crypto::AccountId32, + call_hash: [::core::primitive::u8; 32usize], + }, + #[codec(index = 2)] + MultisigExecuted { + approving: ::sp_core::crypto::AccountId32, + timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + multisig: ::sp_core::crypto::AccountId32, + call_hash: [::core::primitive::u8; 32usize], + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 3)] + MultisigCancelled { + cancelling: ::sp_core::crypto::AccountId32, + timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + multisig: ::sp_core::crypto::AccountId32, + call_hash: [::core::primitive::u8; 32usize], + }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Multisig<_0, _1, _2> { + pub when: runtime_types::pallet_multisig::Timepoint<_0>, + pub deposit: _1, + pub depositor: _2, + pub approvals: runtime_types::bounded_collections::bounded_vec::BoundedVec<_2>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Timepoint<_0> { + pub height: _0, + pub index: _0, + } + } + pub mod pallet_nomination_pools { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + join { + #[codec(compact)] + amount: ::core::primitive::u128, + pool_id: ::core::primitive::u32, + }, + #[codec(index = 1)] + bond_extra { + extra: runtime_types::pallet_nomination_pools::BondExtra< + ::core::primitive::u128, + >, + }, + #[codec(index = 2)] + claim_payout, + #[codec(index = 3)] + unbond { + member_account: + ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + #[codec(compact)] + unbonding_points: ::core::primitive::u128, + }, + #[codec(index = 4)] + pool_withdraw_unbonded { + pool_id: ::core::primitive::u32, + num_slashing_spans: ::core::primitive::u32, + }, + #[codec(index = 5)] + withdraw_unbonded { + member_account: + ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + num_slashing_spans: ::core::primitive::u32, + }, + #[codec(index = 6)] + create { + #[codec(compact)] + amount: ::core::primitive::u128, + root: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + nominator: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + bouncer: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 7)] + create_with_pool_id { + #[codec(compact)] + amount: ::core::primitive::u128, + root: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + nominator: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + bouncer: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + pool_id: ::core::primitive::u32, + }, + #[codec(index = 8)] + nominate { + pool_id: ::core::primitive::u32, + validators: ::std::vec::Vec<::sp_core::crypto::AccountId32>, + }, + #[codec(index = 9)] + set_state { + pool_id: ::core::primitive::u32, + state: runtime_types::pallet_nomination_pools::PoolState, + }, + #[codec(index = 10)] + set_metadata { + pool_id: ::core::primitive::u32, + metadata: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 11)] + set_configs { + min_join_bond: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u128, + >, + min_create_bond: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u128, + >, + max_pools: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u32, + >, + max_members: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u32, + >, + max_members_per_pool: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u32, + >, + global_max_commission: runtime_types::pallet_nomination_pools::ConfigOp< + runtime_types::sp_arithmetic::per_things::Perbill, + >, + }, + #[codec(index = 12)] + update_roles { + pool_id: ::core::primitive::u32, + new_root: runtime_types::pallet_nomination_pools::ConfigOp< + ::sp_core::crypto::AccountId32, + >, + new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< + ::sp_core::crypto::AccountId32, + >, + new_bouncer: runtime_types::pallet_nomination_pools::ConfigOp< + ::sp_core::crypto::AccountId32, + >, + }, + #[codec(index = 13)] + chill { pool_id: ::core::primitive::u32 }, + #[codec(index = 14)] + bond_extra_other { + member: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + extra: runtime_types::pallet_nomination_pools::BondExtra< + ::core::primitive::u128, + >, + }, + #[codec(index = 15)] + set_claim_permission { + permission: runtime_types::pallet_nomination_pools::ClaimPermission, + }, + #[codec(index = 16)] + claim_payout_other { other: ::sp_core::crypto::AccountId32 }, + #[codec(index = 17)] + set_commission { + pool_id: ::core::primitive::u32, + new_commission: ::core::option::Option<( + runtime_types::sp_arithmetic::per_things::Perbill, + ::sp_core::crypto::AccountId32, + )>, + }, + #[codec(index = 18)] + set_commission_max { + pool_id: ::core::primitive::u32, + max_commission: runtime_types::sp_arithmetic::per_things::Perbill, + }, + #[codec(index = 19)] + set_commission_change_rate { + pool_id: ::core::primitive::u32, + change_rate: runtime_types::pallet_nomination_pools::CommissionChangeRate< + ::core::primitive::u32, + >, + }, + #[codec(index = 20)] + claim_commission { pool_id: ::core::primitive::u32 }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum DefensiveError { + #[codec(index = 0)] + NotEnoughSpaceInUnbondPool, + #[codec(index = 1)] + PoolNotFound, + #[codec(index = 2)] + RewardPoolNotFound, + #[codec(index = 3)] + SubPoolsNotFound, + #[codec(index = 4)] + BondedStashKilledPrematurely, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + PoolNotFound, + #[codec(index = 1)] + PoolMemberNotFound, + #[codec(index = 2)] + RewardPoolNotFound, + #[codec(index = 3)] + SubPoolsNotFound, + #[codec(index = 4)] + AccountBelongsToOtherPool, + #[codec(index = 5)] + FullyUnbonding, + #[codec(index = 6)] + MaxUnbondingLimit, + #[codec(index = 7)] + CannotWithdrawAny, + #[codec(index = 8)] + MinimumBondNotMet, + #[codec(index = 9)] + OverflowRisk, + #[codec(index = 10)] + NotDestroying, + #[codec(index = 11)] + NotNominator, + #[codec(index = 12)] + NotKickerOrDestroying, + #[codec(index = 13)] + NotOpen, + #[codec(index = 14)] + MaxPools, + #[codec(index = 15)] + MaxPoolMembers, + #[codec(index = 16)] + CanNotChangeState, + #[codec(index = 17)] + DoesNotHavePermission, + #[codec(index = 18)] + MetadataExceedsMaxLen, + #[codec(index = 19)] + Defensive(runtime_types::pallet_nomination_pools::pallet::DefensiveError), + #[codec(index = 20)] + PartialUnbondNotAllowedPermissionlessly, + #[codec(index = 21)] + MaxCommissionRestricted, + #[codec(index = 22)] + CommissionExceedsMaximum, + #[codec(index = 23)] + CommissionChangeThrottled, + #[codec(index = 24)] + CommissionChangeRateNotAllowed, + #[codec(index = 25)] + NoPendingCommission, + #[codec(index = 26)] + NoCommissionCurrentSet, + #[codec(index = 27)] + PoolIdInUse, + #[codec(index = 28)] + InvalidPoolId, + #[codec(index = 29)] + BondExtraRestricted, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Created { + depositor: ::sp_core::crypto::AccountId32, + pool_id: ::core::primitive::u32, + }, + #[codec(index = 1)] + Bonded { + member: ::sp_core::crypto::AccountId32, + pool_id: ::core::primitive::u32, + bonded: ::core::primitive::u128, + joined: ::core::primitive::bool, + }, + #[codec(index = 2)] + PaidOut { + member: ::sp_core::crypto::AccountId32, + pool_id: ::core::primitive::u32, + payout: ::core::primitive::u128, + }, + #[codec(index = 3)] + Unbonded { + member: ::sp_core::crypto::AccountId32, + pool_id: ::core::primitive::u32, + balance: ::core::primitive::u128, + points: ::core::primitive::u128, + era: ::core::primitive::u32, + }, + #[codec(index = 4)] + Withdrawn { + member: ::sp_core::crypto::AccountId32, + pool_id: ::core::primitive::u32, + balance: ::core::primitive::u128, + points: ::core::primitive::u128, + }, + #[codec(index = 5)] + Destroyed { pool_id: ::core::primitive::u32 }, + #[codec(index = 6)] + StateChanged { + pool_id: ::core::primitive::u32, + new_state: runtime_types::pallet_nomination_pools::PoolState, + }, + #[codec(index = 7)] + MemberRemoved { + pool_id: ::core::primitive::u32, + member: ::sp_core::crypto::AccountId32, + }, + #[codec(index = 8)] + RolesUpdated { + root: ::core::option::Option<::sp_core::crypto::AccountId32>, + bouncer: ::core::option::Option<::sp_core::crypto::AccountId32>, + nominator: ::core::option::Option<::sp_core::crypto::AccountId32>, + }, + #[codec(index = 9)] + PoolSlashed { + pool_id: ::core::primitive::u32, + balance: ::core::primitive::u128, + }, + #[codec(index = 10)] + UnbondingPoolSlashed { + pool_id: ::core::primitive::u32, + era: ::core::primitive::u32, + balance: ::core::primitive::u128, + }, + #[codec(index = 11)] + PoolCommissionUpdated { + pool_id: ::core::primitive::u32, + current: ::core::option::Option<( + runtime_types::sp_arithmetic::per_things::Perbill, + ::sp_core::crypto::AccountId32, + )>, + }, + #[codec(index = 12)] + PoolMaxCommissionUpdated { + pool_id: ::core::primitive::u32, + max_commission: runtime_types::sp_arithmetic::per_things::Perbill, + }, + #[codec(index = 13)] + PoolCommissionChangeRateUpdated { + pool_id: ::core::primitive::u32, + change_rate: runtime_types::pallet_nomination_pools::CommissionChangeRate< + ::core::primitive::u32, + >, + }, + #[codec(index = 14)] + PoolCommissionClaimed { + pool_id: ::core::primitive::u32, + commission: ::core::primitive::u128, + }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum BondExtra<_0> { + #[codec(index = 0)] + FreeBalance(_0), + #[codec(index = 1)] + Rewards, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BondedPoolInner { + pub commission: runtime_types::pallet_nomination_pools::Commission, + pub member_counter: ::core::primitive::u32, + pub points: ::core::primitive::u128, + pub roles: runtime_types::pallet_nomination_pools::PoolRoles< + ::sp_core::crypto::AccountId32, + >, + pub state: runtime_types::pallet_nomination_pools::PoolState, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ClaimPermission { + #[codec(index = 0)] + Permissioned, + #[codec(index = 1)] + PermissionlessCompound, + #[codec(index = 2)] + PermissionlessWithdraw, + #[codec(index = 3)] + PermissionlessAll, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Commission { + pub current: ::core::option::Option<( + runtime_types::sp_arithmetic::per_things::Perbill, + ::sp_core::crypto::AccountId32, + )>, + pub max: ::core::option::Option, + pub change_rate: ::core::option::Option< + runtime_types::pallet_nomination_pools::CommissionChangeRate< + ::core::primitive::u32, + >, + >, + pub throttle_from: ::core::option::Option<::core::primitive::u32>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CommissionChangeRate<_0> { + pub max_increase: runtime_types::sp_arithmetic::per_things::Perbill, + pub min_delay: _0, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ConfigOp<_0> { + #[codec(index = 0)] + Noop, + #[codec(index = 1)] + Set(_0), + #[codec(index = 2)] + Remove, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct PoolMember { + pub pool_id: ::core::primitive::u32, + pub points: ::core::primitive::u128, + pub last_recorded_reward_counter: + runtime_types::sp_arithmetic::fixed_point::FixedU128, + pub unbonding_eras: + runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< + ::core::primitive::u32, + ::core::primitive::u128, + >, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct PoolRoles<_0> { + pub depositor: _0, + pub root: ::core::option::Option<_0>, + pub nominator: ::core::option::Option<_0>, + pub bouncer: ::core::option::Option<_0>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum PoolState { + #[codec(index = 0)] + Open, + #[codec(index = 1)] + Blocked, + #[codec(index = 2)] + Destroying, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct RewardPool { + pub last_recorded_reward_counter: + runtime_types::sp_arithmetic::fixed_point::FixedU128, + pub last_recorded_total_payouts: ::core::primitive::u128, + pub total_rewards_claimed: ::core::primitive::u128, + pub total_commission_pending: ::core::primitive::u128, + pub total_commission_claimed: ::core::primitive::u128, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct SubPools { + pub no_era: runtime_types::pallet_nomination_pools::UnbondPool, + pub with_era: + runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< + ::core::primitive::u32, + runtime_types::pallet_nomination_pools::UnbondPool, + >, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct UnbondPool { + pub points: ::core::primitive::u128, + pub balance: ::core::primitive::u128, + } + } + pub mod pallet_offences { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Offence { + kind: [::core::primitive::u8; 16usize], + timeslot: ::std::vec::Vec<::core::primitive::u8>, + }, + } + } + } + pub mod pallet_preimage { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + note_preimage { bytes: ::std::vec::Vec<::core::primitive::u8> }, + #[codec(index = 1)] + unnote_preimage { hash: ::subxt::utils::H256 }, + #[codec(index = 2)] + request_preimage { hash: ::subxt::utils::H256 }, + #[codec(index = 3)] + unrequest_preimage { hash: ::subxt::utils::H256 }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + TooBig, + #[codec(index = 1)] + AlreadyNoted, + #[codec(index = 2)] + NotAuthorized, + #[codec(index = 3)] + NotNoted, + #[codec(index = 4)] + Requested, + #[codec(index = 5)] + NotRequested, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Noted { hash: ::subxt::utils::H256 }, + #[codec(index = 1)] + Requested { hash: ::subxt::utils::H256 }, + #[codec(index = 2)] + Cleared { hash: ::subxt::utils::H256 }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum RequestStatus<_0, _1> { + #[codec(index = 0)] + Unrequested { deposit: (_0, _1), len: ::core::primitive::u32 }, + #[codec(index = 1)] + Requested { + deposit: ::core::option::Option<(_0, _1)>, + count: ::core::primitive::u32, + len: ::core::option::Option<::core::primitive::u32>, + }, + } + } + pub mod pallet_proxy { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + proxy { + real: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + force_proxy_type: + ::core::option::Option, + call: ::std::boxed::Box, + }, + #[codec(index = 1)] + add_proxy { + delegate: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + proxy_type: runtime_types::westend_runtime::ProxyType, + delay: ::core::primitive::u32, + }, + #[codec(index = 2)] + remove_proxy { + delegate: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + proxy_type: runtime_types::westend_runtime::ProxyType, + delay: ::core::primitive::u32, + }, + #[codec(index = 3)] + remove_proxies, + #[codec(index = 4)] + create_pure { + proxy_type: runtime_types::westend_runtime::ProxyType, + delay: ::core::primitive::u32, + index: ::core::primitive::u16, + }, + #[codec(index = 5)] + kill_pure { + spawner: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + proxy_type: runtime_types::westend_runtime::ProxyType, + index: ::core::primitive::u16, + #[codec(compact)] + height: ::core::primitive::u32, + #[codec(compact)] + ext_index: ::core::primitive::u32, + }, + #[codec(index = 6)] + announce { + real: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + call_hash: ::subxt::utils::H256, + }, + #[codec(index = 7)] + remove_announcement { + real: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + call_hash: ::subxt::utils::H256, + }, + #[codec(index = 8)] + reject_announcement { + delegate: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + call_hash: ::subxt::utils::H256, + }, + #[codec(index = 9)] + proxy_announced { + delegate: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + real: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + force_proxy_type: + ::core::option::Option, + call: ::std::boxed::Box, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + TooMany, + #[codec(index = 1)] + NotFound, + #[codec(index = 2)] + NotProxy, + #[codec(index = 3)] + Unproxyable, + #[codec(index = 4)] + Duplicate, + #[codec(index = 5)] + NoPermission, + #[codec(index = 6)] + Unannounced, + #[codec(index = 7)] + NoSelfProxy, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + ProxyExecuted { + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 1)] + PureCreated { + pure: ::sp_core::crypto::AccountId32, + who: ::sp_core::crypto::AccountId32, + proxy_type: runtime_types::westend_runtime::ProxyType, + disambiguation_index: ::core::primitive::u16, + }, + #[codec(index = 2)] + Announced { + real: ::sp_core::crypto::AccountId32, + proxy: ::sp_core::crypto::AccountId32, + call_hash: ::subxt::utils::H256, + }, + #[codec(index = 3)] + ProxyAdded { + delegator: ::sp_core::crypto::AccountId32, + delegatee: ::sp_core::crypto::AccountId32, + proxy_type: runtime_types::westend_runtime::ProxyType, + delay: ::core::primitive::u32, + }, + #[codec(index = 4)] + ProxyRemoved { + delegator: ::sp_core::crypto::AccountId32, + delegatee: ::sp_core::crypto::AccountId32, + proxy_type: runtime_types::westend_runtime::ProxyType, + delay: ::core::primitive::u32, + }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Announcement<_0, _1, _2> { + pub real: _0, + pub call_hash: _1, + pub height: _2, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ProxyDefinition<_0, _1, _2> { + pub delegate: _0, + pub proxy_type: _1, + pub delay: _2, + } + } + pub mod pallet_recovery { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + as_recovered { + account: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + call: ::std::boxed::Box, + }, + #[codec(index = 1)] + set_recovered { + lost: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + rescuer: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 2)] + create_recovery { + friends: ::std::vec::Vec<::sp_core::crypto::AccountId32>, + threshold: ::core::primitive::u16, + delay_period: ::core::primitive::u32, + }, + #[codec(index = 3)] + initiate_recovery { + account: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 4)] + vouch_recovery { + lost: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + rescuer: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 5)] + claim_recovery { + account: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 6)] + close_recovery { + rescuer: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 7)] + remove_recovery, + #[codec(index = 8)] + cancel_recovered { + account: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + NotAllowed, + #[codec(index = 1)] + ZeroThreshold, + #[codec(index = 2)] + NotEnoughFriends, + #[codec(index = 3)] + MaxFriends, + #[codec(index = 4)] + NotSorted, + #[codec(index = 5)] + NotRecoverable, + #[codec(index = 6)] + AlreadyRecoverable, + #[codec(index = 7)] + AlreadyStarted, + #[codec(index = 8)] + NotStarted, + #[codec(index = 9)] + NotFriend, + #[codec(index = 10)] + DelayPeriod, + #[codec(index = 11)] + AlreadyVouched, + #[codec(index = 12)] + Threshold, + #[codec(index = 13)] + StillActive, + #[codec(index = 14)] + AlreadyProxy, + #[codec(index = 15)] + BadState, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + RecoveryCreated { account: ::sp_core::crypto::AccountId32 }, + #[codec(index = 1)] + RecoveryInitiated { + lost_account: ::sp_core::crypto::AccountId32, + rescuer_account: ::sp_core::crypto::AccountId32, + }, + #[codec(index = 2)] + RecoveryVouched { + lost_account: ::sp_core::crypto::AccountId32, + rescuer_account: ::sp_core::crypto::AccountId32, + sender: ::sp_core::crypto::AccountId32, + }, + #[codec(index = 3)] + RecoveryClosed { + lost_account: ::sp_core::crypto::AccountId32, + rescuer_account: ::sp_core::crypto::AccountId32, + }, + #[codec(index = 4)] + AccountRecovered { + lost_account: ::sp_core::crypto::AccountId32, + rescuer_account: ::sp_core::crypto::AccountId32, + }, + #[codec(index = 5)] + RecoveryRemoved { lost_account: ::sp_core::crypto::AccountId32 }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ActiveRecovery<_0, _1, _2> { + pub created: _0, + pub deposit: _1, + pub friends: _2, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct RecoveryConfig<_0, _1, _2> { + pub delay_period: _0, + pub deposit: _1, + pub friends: _2, + pub threshold: ::core::primitive::u16, + } + } + pub mod pallet_scheduler { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + schedule { + when: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: ::std::boxed::Box, + }, + #[codec(index = 1)] + cancel { when: ::core::primitive::u32, index: ::core::primitive::u32 }, + #[codec(index = 2)] + schedule_named { + id: [::core::primitive::u8; 32usize], + when: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: ::std::boxed::Box, + }, + #[codec(index = 3)] + cancel_named { id: [::core::primitive::u8; 32usize] }, + #[codec(index = 4)] + schedule_after { + after: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: ::std::boxed::Box, + }, + #[codec(index = 5)] + schedule_named_after { + id: [::core::primitive::u8; 32usize], + after: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: ::std::boxed::Box, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + FailedToSchedule, + #[codec(index = 1)] + NotFound, + #[codec(index = 2)] + TargetBlockNumberInPast, + #[codec(index = 3)] + RescheduleNoChange, + #[codec(index = 4)] + Named, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Scheduled { when: ::core::primitive::u32, index: ::core::primitive::u32 }, + #[codec(index = 1)] + Canceled { when: ::core::primitive::u32, index: ::core::primitive::u32 }, + #[codec(index = 2)] + Dispatched { + task: (::core::primitive::u32, ::core::primitive::u32), + id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 3)] + CallUnavailable { + task: (::core::primitive::u32, ::core::primitive::u32), + id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + }, + #[codec(index = 4)] + PeriodicFailed { + task: (::core::primitive::u32, ::core::primitive::u32), + id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + }, + #[codec(index = 5)] + PermanentlyOverweight { + task: (::core::primitive::u32, ::core::primitive::u32), + id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Scheduled<_0, _1, _2, _3, _4> { + pub maybe_id: ::core::option::Option<_0>, + pub priority: ::core::primitive::u8, + pub call: _1, + pub maybe_periodic: ::core::option::Option<(_2, _2)>, + pub origin: _3, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_4>, + } + } + pub mod pallet_session { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + set_keys { + keys: runtime_types::westend_runtime::SessionKeys, + proof: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 1)] + purge_keys, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + InvalidProof, + #[codec(index = 1)] + NoAssociatedValidatorId, + #[codec(index = 2)] + DuplicatedKey, + #[codec(index = 3)] + NoKeys, + #[codec(index = 4)] + NoAccount, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + NewSession { session_index: ::core::primitive::u32 }, + } + } + } + pub mod pallet_staking { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + bond { + #[codec(compact)] + value: ::core::primitive::u128, + payee: runtime_types::pallet_staking::RewardDestination< + ::sp_core::crypto::AccountId32, + >, + }, + #[codec(index = 1)] + bond_extra { + #[codec(compact)] + max_additional: ::core::primitive::u128, + }, + #[codec(index = 2)] + unbond { + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 3)] + withdraw_unbonded { num_slashing_spans: ::core::primitive::u32 }, + #[codec(index = 4)] + validate { prefs: runtime_types::pallet_staking::ValidatorPrefs }, + #[codec(index = 5)] + nominate { + targets: ::std::vec::Vec< + ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + >, + }, + #[codec(index = 6)] + chill, + #[codec(index = 7)] + set_payee { + payee: runtime_types::pallet_staking::RewardDestination< + ::sp_core::crypto::AccountId32, + >, + }, + #[codec(index = 8)] + set_controller, + #[codec(index = 9)] + set_validator_count { + #[codec(compact)] + new: ::core::primitive::u32, + }, + #[codec(index = 10)] + increase_validator_count { + #[codec(compact)] + additional: ::core::primitive::u32, + }, + #[codec(index = 11)] + scale_validator_count { + factor: runtime_types::sp_arithmetic::per_things::Percent, + }, + #[codec(index = 12)] + force_no_eras, + #[codec(index = 13)] + force_new_era, + #[codec(index = 14)] + set_invulnerables { + invulnerables: ::std::vec::Vec<::sp_core::crypto::AccountId32>, + }, + #[codec(index = 15)] + force_unstake { + stash: ::sp_core::crypto::AccountId32, + num_slashing_spans: ::core::primitive::u32, + }, + #[codec(index = 16)] + force_new_era_always, + #[codec(index = 17)] + cancel_deferred_slash { + era: ::core::primitive::u32, + slash_indices: ::std::vec::Vec<::core::primitive::u32>, + }, + #[codec(index = 18)] + payout_stakers { + validator_stash: ::sp_core::crypto::AccountId32, + era: ::core::primitive::u32, + }, + #[codec(index = 19)] + rebond { + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 20)] + reap_stash { + stash: ::sp_core::crypto::AccountId32, + num_slashing_spans: ::core::primitive::u32, + }, + #[codec(index = 21)] + kick { + who: ::std::vec::Vec< + ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + >, + }, + #[codec(index = 22)] + set_staking_configs { + min_nominator_bond: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u128, + >, + min_validator_bond: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u128, + >, + max_nominator_count: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u32, + >, + max_validator_count: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u32, + >, + chill_threshold: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + runtime_types::sp_arithmetic::per_things::Percent, + >, + min_commission: runtime_types::pallet_staking::pallet::pallet::ConfigOp< + runtime_types::sp_arithmetic::per_things::Perbill, + >, + }, + #[codec(index = 23)] + chill_other { controller: ::sp_core::crypto::AccountId32 }, + #[codec(index = 24)] + force_apply_min_commission { + validator_stash: ::sp_core::crypto::AccountId32, + }, + #[codec(index = 25)] + set_min_commission { + new: runtime_types::sp_arithmetic::per_things::Perbill, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ConfigOp<_0> { + #[codec(index = 0)] + Noop, + #[codec(index = 1)] + Set(_0), + #[codec(index = 2)] + Remove, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + NotController, + #[codec(index = 1)] + NotStash, + #[codec(index = 2)] + AlreadyBonded, + #[codec(index = 3)] + AlreadyPaired, + #[codec(index = 4)] + EmptyTargets, + #[codec(index = 5)] + DuplicateIndex, + #[codec(index = 6)] + InvalidSlashIndex, + #[codec(index = 7)] + InsufficientBond, + #[codec(index = 8)] + NoMoreChunks, + #[codec(index = 9)] + NoUnlockChunk, + #[codec(index = 10)] + FundedTarget, + #[codec(index = 11)] + InvalidEraToReward, + #[codec(index = 12)] + InvalidNumberOfNominations, + #[codec(index = 13)] + NotSortedAndUnique, + #[codec(index = 14)] + AlreadyClaimed, + #[codec(index = 15)] + IncorrectHistoryDepth, + #[codec(index = 16)] + IncorrectSlashingSpans, + #[codec(index = 17)] + BadState, + #[codec(index = 18)] + TooManyTargets, + #[codec(index = 19)] + BadTarget, + #[codec(index = 20)] + CannotChillOther, + #[codec(index = 21)] + TooManyNominators, + #[codec(index = 22)] + TooManyValidators, + #[codec(index = 23)] + CommissionTooLow, + #[codec(index = 24)] + BoundNotMet, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + EraPaid { + era_index: ::core::primitive::u32, + validator_payout: ::core::primitive::u128, + remainder: ::core::primitive::u128, + }, + #[codec(index = 1)] + Rewarded { + stash: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + Slashed { + staker: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 3)] + SlashReported { + validator: ::sp_core::crypto::AccountId32, + fraction: runtime_types::sp_arithmetic::per_things::Perbill, + slash_era: ::core::primitive::u32, + }, + #[codec(index = 4)] + OldSlashingReportDiscarded { session_index: ::core::primitive::u32 }, + #[codec(index = 5)] + StakersElected, + #[codec(index = 6)] + Bonded { + stash: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 7)] + Unbonded { + stash: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 8)] + Withdrawn { + stash: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 9)] + Kicked { + nominator: ::sp_core::crypto::AccountId32, + stash: ::sp_core::crypto::AccountId32, + }, + #[codec(index = 10)] + StakingElectionFailed, + #[codec(index = 11)] + Chilled { stash: ::sp_core::crypto::AccountId32 }, + #[codec(index = 12)] + PayoutStarted { + era_index: ::core::primitive::u32, + validator_stash: ::sp_core::crypto::AccountId32, + }, + #[codec(index = 13)] + ValidatorPrefsSet { + stash: ::sp_core::crypto::AccountId32, + prefs: runtime_types::pallet_staking::ValidatorPrefs, + }, + #[codec(index = 14)] + ForceEra { mode: runtime_types::pallet_staking::Forcing }, + } + } + } + pub mod slashing { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct SlashingSpans { + pub span_index: ::core::primitive::u32, + pub last_start: ::core::primitive::u32, + pub last_nonzero_slash: ::core::primitive::u32, + pub prior: ::std::vec::Vec<::core::primitive::u32>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct SpanRecord<_0> { + pub slashed: _0, + pub paid_out: _0, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ActiveEraInfo { + pub index: ::core::primitive::u32, + pub start: ::core::option::Option<::core::primitive::u64>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct EraRewardPoints<_0> { + pub total: ::core::primitive::u32, + pub individual: ::subxt::utils::KeyedVec<_0, ::core::primitive::u32>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Exposure<_0, _1> { + #[codec(compact)] + pub total: _1, + #[codec(compact)] + pub own: _1, + pub others: + ::std::vec::Vec>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Forcing { + #[codec(index = 0)] + NotForcing, + #[codec(index = 1)] + ForceNew, + #[codec(index = 2)] + ForceNone, + #[codec(index = 3)] + ForceAlways, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct IndividualExposure<_0, _1> { + pub who: _0, + #[codec(compact)] + pub value: _1, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Nominations { + pub targets: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::sp_core::crypto::AccountId32, + >, + pub submitted_in: ::core::primitive::u32, + pub suppressed: ::core::primitive::bool, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum RewardDestination<_0> { + #[codec(index = 0)] + Staked, + #[codec(index = 1)] + Stash, + #[codec(index = 2)] + Controller, + #[codec(index = 3)] + Account(_0), + #[codec(index = 4)] + None, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct StakingLedger { + pub stash: ::sp_core::crypto::AccountId32, + #[codec(compact)] + pub total: ::core::primitive::u128, + #[codec(compact)] + pub active: ::core::primitive::u128, + pub unlocking: runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_staking::UnlockChunk<::core::primitive::u128>, + >, + pub claimed_rewards: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u32, + >, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct UnappliedSlash<_0, _1> { + pub validator: _0, + pub own: _1, + pub others: ::std::vec::Vec<(_0, _1)>, + pub reporters: ::std::vec::Vec<_0>, + pub payout: _1, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct UnlockChunk<_0> { + #[codec(compact)] + pub value: _0, + #[codec(compact)] + pub era: ::core::primitive::u32, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ValidatorPrefs { + #[codec(compact)] + pub commission: runtime_types::sp_arithmetic::per_things::Perbill, + pub blocked: ::core::primitive::bool, + } + } + pub mod pallet_sudo { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + sudo { call: ::std::boxed::Box }, + #[codec(index = 1)] + sudo_unchecked_weight { + call: ::std::boxed::Box, + weight: ::sp_weights::Weight, + }, + #[codec(index = 2)] + set_key { + new: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 3)] + sudo_as { + who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + call: ::std::boxed::Box, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + RequireSudo, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Sudid { + sudo_result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 1)] + KeyChanged { + old_sudoer: ::core::option::Option<::sp_core::crypto::AccountId32>, + }, + #[codec(index = 2)] + SudoAsDone { + sudo_result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + } + } + } + pub mod pallet_timestamp { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + set { + #[codec(compact)] + now: ::core::primitive::u64, + }, + } + } + } + pub mod pallet_transaction_payment { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + TransactionFeePaid { + who: ::sp_core::crypto::AccountId32, + actual_fee: ::core::primitive::u128, + tip: ::core::primitive::u128, + }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ChargeTransactionPayment(#[codec(compact)] pub ::core::primitive::u128); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Releases { + #[codec(index = 0)] + V1Ancient, + #[codec(index = 1)] + V2, + } + } + pub mod pallet_utility { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + batch { calls: ::std::vec::Vec }, + #[codec(index = 1)] + as_derivative { + index: ::core::primitive::u16, + call: ::std::boxed::Box, + }, + #[codec(index = 2)] + batch_all { + calls: ::std::vec::Vec, + }, + #[codec(index = 3)] + dispatch_as { + as_origin: ::std::boxed::Box, + call: ::std::boxed::Box, + }, + #[codec(index = 4)] + force_batch { + calls: ::std::vec::Vec, + }, + #[codec(index = 5)] + with_weight { + call: ::std::boxed::Box, + weight: ::sp_weights::Weight, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + TooManyCalls, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + BatchInterrupted { + index: ::core::primitive::u32, + error: runtime_types::sp_runtime::DispatchError, + }, + #[codec(index = 1)] + BatchCompleted, + #[codec(index = 2)] + BatchCompletedWithErrors, + #[codec(index = 3)] + ItemCompleted, + #[codec(index = 4)] + ItemFailed { error: runtime_types::sp_runtime::DispatchError }, + #[codec(index = 5)] + DispatchedAs { + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + } + } + } + pub mod pallet_vesting { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + vest, + #[codec(index = 1)] + vest_other { + target: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 2)] + vested_transfer { + target: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + }, + #[codec(index = 3)] + force_vested_transfer { + source: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + target: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + }, + #[codec(index = 4)] + merge_schedules { + schedule1_index: ::core::primitive::u32, + schedule2_index: ::core::primitive::u32, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + NotVesting, + #[codec(index = 1)] + AtMaxVestingSchedules, + #[codec(index = 2)] + AmountLow, + #[codec(index = 3)] + ScheduleIndexOutOfBounds, + #[codec(index = 4)] + InvalidScheduleParams, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + VestingUpdated { + account: ::sp_core::crypto::AccountId32, + unvested: ::core::primitive::u128, + }, + #[codec(index = 1)] + VestingCompleted { account: ::sp_core::crypto::AccountId32 }, + } + } + pub mod vesting_info { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct VestingInfo<_0, _1> { + pub locked: _0, + pub per_block: _0, + pub starting_block: _1, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Releases { + #[codec(index = 0)] + V0, + #[codec(index = 1)] + V1, + } + } + pub mod pallet_xcm { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + send { + dest: ::std::boxed::Box, + message: ::std::boxed::Box, + }, + #[codec(index = 1)] + teleport_assets { + dest: ::std::boxed::Box, + beneficiary: ::std::boxed::Box, + assets: ::std::boxed::Box, + fee_asset_item: ::core::primitive::u32, + }, + #[codec(index = 2)] + reserve_transfer_assets { + dest: ::std::boxed::Box, + beneficiary: ::std::boxed::Box, + assets: ::std::boxed::Box, + fee_asset_item: ::core::primitive::u32, + }, + #[codec(index = 3)] + execute { + message: ::std::boxed::Box, + max_weight: ::sp_weights::Weight, + }, + #[codec(index = 4)] + force_xcm_version { + location: + ::std::boxed::Box, + xcm_version: ::core::primitive::u32, + }, + #[codec(index = 5)] + force_default_xcm_version { + maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, + }, + #[codec(index = 6)] + force_subscribe_version_notify { + location: ::std::boxed::Box, + }, + #[codec(index = 7)] + force_unsubscribe_version_notify { + location: ::std::boxed::Box, + }, + #[codec(index = 8)] + limited_reserve_transfer_assets { + dest: ::std::boxed::Box, + beneficiary: ::std::boxed::Box, + assets: ::std::boxed::Box, + fee_asset_item: ::core::primitive::u32, + weight_limit: runtime_types::xcm::v3::WeightLimit, + }, + #[codec(index = 9)] + limited_teleport_assets { + dest: ::std::boxed::Box, + beneficiary: ::std::boxed::Box, + assets: ::std::boxed::Box, + fee_asset_item: ::core::primitive::u32, + weight_limit: runtime_types::xcm::v3::WeightLimit, + }, + #[codec(index = 10)] + force_suspension { suspended: ::core::primitive::bool }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + Unreachable, + #[codec(index = 1)] + SendFailure, + #[codec(index = 2)] + Filtered, + #[codec(index = 3)] + UnweighableMessage, + #[codec(index = 4)] + DestinationNotInvertible, + #[codec(index = 5)] + Empty, + #[codec(index = 6)] + CannotReanchor, + #[codec(index = 7)] + TooManyAssets, + #[codec(index = 8)] + InvalidOrigin, + #[codec(index = 9)] + BadVersion, + #[codec(index = 10)] + BadLocation, + #[codec(index = 11)] + NoSubscription, + #[codec(index = 12)] + AlreadySubscribed, + #[codec(index = 13)] + InvalidAsset, + #[codec(index = 14)] + LowBalance, + #[codec(index = 15)] + TooManyLocks, + #[codec(index = 16)] + AccountNotSovereign, + #[codec(index = 17)] + FeesNotMet, + #[codec(index = 18)] + LockNotFound, + #[codec(index = 19)] + InUse, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Attempted(runtime_types::xcm::v3::traits::Outcome), + #[codec(index = 1)] + Sent( + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::v3::Xcm, + ), + #[codec(index = 2)] + UnexpectedResponse( + runtime_types::xcm::v3::multilocation::MultiLocation, + ::core::primitive::u64, + ), + #[codec(index = 3)] + ResponseReady(::core::primitive::u64, runtime_types::xcm::v3::Response), + #[codec(index = 4)] + Notified(::core::primitive::u64, ::core::primitive::u8, ::core::primitive::u8), + #[codec(index = 5)] + NotifyOverweight( + ::core::primitive::u64, + ::core::primitive::u8, + ::core::primitive::u8, + ::sp_weights::Weight, + ::sp_weights::Weight, + ), + #[codec(index = 6)] + NotifyDispatchError( + ::core::primitive::u64, + ::core::primitive::u8, + ::core::primitive::u8, + ), + #[codec(index = 7)] + NotifyDecodeFailed( + ::core::primitive::u64, + ::core::primitive::u8, + ::core::primitive::u8, + ), + #[codec(index = 8)] + InvalidResponder( + runtime_types::xcm::v3::multilocation::MultiLocation, + ::core::primitive::u64, + ::core::option::Option< + runtime_types::xcm::v3::multilocation::MultiLocation, + >, + ), + #[codec(index = 9)] + InvalidResponderVersion( + runtime_types::xcm::v3::multilocation::MultiLocation, + ::core::primitive::u64, + ), + #[codec(index = 10)] + ResponseTaken(::core::primitive::u64), + #[codec(index = 11)] + AssetsTrapped( + ::subxt::utils::H256, + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::VersionedMultiAssets, + ), + #[codec(index = 12)] + VersionChangeNotified( + runtime_types::xcm::v3::multilocation::MultiLocation, + ::core::primitive::u32, + runtime_types::xcm::v3::multiasset::MultiAssets, + ), + #[codec(index = 13)] + SupportedVersionChanged( + runtime_types::xcm::v3::multilocation::MultiLocation, + ::core::primitive::u32, + ), + #[codec(index = 14)] + NotifyTargetSendFail( + runtime_types::xcm::v3::multilocation::MultiLocation, + ::core::primitive::u64, + runtime_types::xcm::v3::traits::Error, + ), + #[codec(index = 15)] + NotifyTargetMigrationFail( + runtime_types::xcm::VersionedMultiLocation, + ::core::primitive::u64, + ), + #[codec(index = 16)] + InvalidQuerierVersion( + runtime_types::xcm::v3::multilocation::MultiLocation, + ::core::primitive::u64, + ), + #[codec(index = 17)] + InvalidQuerier( + runtime_types::xcm::v3::multilocation::MultiLocation, + ::core::primitive::u64, + runtime_types::xcm::v3::multilocation::MultiLocation, + ::core::option::Option< + runtime_types::xcm::v3::multilocation::MultiLocation, + >, + ), + #[codec(index = 18)] + VersionNotifyStarted( + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::v3::multiasset::MultiAssets, + ), + #[codec(index = 19)] + VersionNotifyRequested( + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::v3::multiasset::MultiAssets, + ), + #[codec(index = 20)] + VersionNotifyUnrequested( + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::v3::multiasset::MultiAssets, + ), + #[codec(index = 21)] + FeesPaid( + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::v3::multiasset::MultiAssets, + ), + #[codec(index = 22)] + AssetsClaimed( + ::subxt::utils::H256, + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::VersionedMultiAssets, + ), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Origin { + #[codec(index = 0)] + Xcm(runtime_types::xcm::v3::multilocation::MultiLocation), + #[codec(index = 1)] + Response(runtime_types::xcm::v3::multilocation::MultiLocation), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum QueryStatus<_0> { + #[codec(index = 0)] + Pending { + responder: runtime_types::xcm::VersionedMultiLocation, + maybe_match_querier: + ::core::option::Option, + maybe_notify: + ::core::option::Option<(::core::primitive::u8, ::core::primitive::u8)>, + timeout: _0, + }, + #[codec(index = 1)] + VersionNotifier { + origin: runtime_types::xcm::VersionedMultiLocation, + is_active: ::core::primitive::bool, + }, + #[codec(index = 2)] + Ready { response: runtime_types::xcm::VersionedResponse, at: _0 }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct RemoteLockedFungibleRecord<_0> { + pub amount: ::core::primitive::u128, + pub owner: runtime_types::xcm::VersionedMultiLocation, + pub locker: runtime_types::xcm::VersionedMultiLocation, + pub consumers: runtime_types::bounded_collections::bounded_vec::BoundedVec<( + _0, + ::core::primitive::u128, + )>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum VersionMigrationStage { + #[codec(index = 0)] + MigrateSupportedVersion, + #[codec(index = 1)] + MigrateVersionNotifiers, + #[codec(index = 2)] + NotifyCurrentTargets( + ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, + ), + #[codec(index = 3)] + MigrateAndNotifyOldTargets, + } + } + } + pub mod polkadot_core_primitives { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CandidateHash(pub ::subxt::utils::H256); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct InboundDownwardMessage<_0> { + pub sent_at: _0, + pub msg: ::std::vec::Vec<::core::primitive::u8>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct InboundHrmpMessage<_0> { + pub sent_at: _0, + pub data: ::std::vec::Vec<::core::primitive::u8>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct OutboundHrmpMessage<_0> { + pub recipient: _0, + pub data: ::std::vec::Vec<::core::primitive::u8>, + } + } + pub mod polkadot_parachain { + use super::runtime_types; + pub mod primitives { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct HeadData(pub ::std::vec::Vec<::core::primitive::u8>); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct HrmpChannelId { + pub sender: runtime_types::polkadot_parachain::primitives::Id, + pub recipient: runtime_types::polkadot_parachain::primitives::Id, + } + #[derive( + :: codec :: Decode, + :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + Clone, + Debug, + PartialEq, + )] + pub struct Id(pub ::core::primitive::u32); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ValidationCode(pub ::std::vec::Vec<::core::primitive::u8>); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ValidationCodeHash(pub ::subxt::utils::H256); + } + } + pub mod polkadot_primitives { + use super::runtime_types; + pub mod v4 { + use super::runtime_types; + pub mod assignment_app { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + } + pub mod collator_app { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); + } + pub mod executor_params { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ExecutorParam { + #[codec(index = 1)] + MaxMemoryPages(::core::primitive::u32), + #[codec(index = 2)] + StackLogicalMax(::core::primitive::u32), + #[codec(index = 3)] + StackNativeMax(::core::primitive::u32), + #[codec(index = 4)] + PrecheckingMaxMemory(::core::primitive::u64), + #[codec(index = 5)] + PvfPrepTimeout( + runtime_types::polkadot_primitives::v4::PvfPrepTimeoutKind, + ::core::primitive::u64, + ), + #[codec(index = 6)] + PvfExecTimeout( + runtime_types::polkadot_primitives::v4::PvfExecTimeoutKind, + ::core::primitive::u64, + ), + #[codec(index = 7)] + WasmExtBulkMemory, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ExecutorParams( + pub ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::executor_params::ExecutorParam, + >, + ); + } + pub mod signed { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct UncheckedSigned<_0, _1> { + pub payload: _0, + pub validator_index: runtime_types::polkadot_primitives::v4::ValidatorIndex, + pub signature: + runtime_types::polkadot_primitives::v4::validator_app::Signature, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, + } + } + pub mod validator_app { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct AvailabilityBitfield( + pub ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + ); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BackedCandidate<_0> { + pub candidate: + runtime_types::polkadot_primitives::v4::CommittedCandidateReceipt<_0>, + pub validity_votes: ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::ValidityAttestation, + >, + pub validator_indices: ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CandidateCommitments<_0> { + pub upward_messages: + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::std::vec::Vec<::core::primitive::u8>, + >, + pub horizontal_messages: + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::polkadot_core_primitives::OutboundHrmpMessage< + runtime_types::polkadot_parachain::primitives::Id, + >, + >, + pub new_validation_code: ::core::option::Option< + runtime_types::polkadot_parachain::primitives::ValidationCode, + >, + pub head_data: runtime_types::polkadot_parachain::primitives::HeadData, + pub processed_downward_messages: _0, + pub hrmp_watermark: _0, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CandidateDescriptor<_0> { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub relay_parent: _0, + pub collator: runtime_types::polkadot_primitives::v4::collator_app::Public, + pub persisted_validation_data_hash: _0, + pub pov_hash: _0, + pub erasure_root: _0, + pub signature: runtime_types::polkadot_primitives::v4::collator_app::Signature, + pub para_head: _0, + pub validation_code_hash: + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CandidateReceipt<_0> { + pub descriptor: runtime_types::polkadot_primitives::v4::CandidateDescriptor<_0>, + pub commitments_hash: _0, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CommittedCandidateReceipt<_0> { + pub descriptor: runtime_types::polkadot_primitives::v4::CandidateDescriptor<_0>, + pub commitments: runtime_types::polkadot_primitives::v4::CandidateCommitments< + ::core::primitive::u32, + >, + } + #[derive( + :: codec :: Decode, + :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + Clone, + Debug, + PartialEq, + )] + pub struct CoreIndex(pub ::core::primitive::u32); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum CoreOccupied { + #[codec(index = 0)] + Parathread(runtime_types::polkadot_primitives::v4::ParathreadEntry), + #[codec(index = 1)] + Parachain, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct DisputeState<_0> { + pub validators_for: ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + pub validators_against: ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + pub start: _0, + pub concluded_at: ::core::option::Option<_0>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum DisputeStatement { + #[codec(index = 0)] + Valid(runtime_types::polkadot_primitives::v4::ValidDisputeStatementKind), + #[codec(index = 1)] + Invalid(runtime_types::polkadot_primitives::v4::InvalidDisputeStatementKind), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct DisputeStatementSet { + pub candidate_hash: runtime_types::polkadot_core_primitives::CandidateHash, + pub session: ::core::primitive::u32, + pub statements: ::std::vec::Vec<( + runtime_types::polkadot_primitives::v4::DisputeStatement, + runtime_types::polkadot_primitives::v4::ValidatorIndex, + runtime_types::polkadot_primitives::v4::validator_app::Signature, + )>, + } + #[derive( + :: codec :: Decode, + :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + Clone, + Debug, + PartialEq, + )] + pub struct GroupIndex(pub ::core::primitive::u32); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct IndexedVec<_0, _1>( + pub ::std::vec::Vec<_1>, + #[codec(skip)] pub ::core::marker::PhantomData<_0>, + ); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct InherentData<_0> { + pub bitfields: ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::signed::UncheckedSigned< + runtime_types::polkadot_primitives::v4::AvailabilityBitfield, + runtime_types::polkadot_primitives::v4::AvailabilityBitfield, + >, + >, + pub backed_candidates: ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::BackedCandidate< + ::subxt::utils::H256, + >, + >, + pub disputes: ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::DisputeStatementSet, + >, + pub parent_header: _0, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum InvalidDisputeStatementKind { + #[codec(index = 0)] + Explicit, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ParathreadClaim( + pub runtime_types::polkadot_parachain::primitives::Id, + pub runtime_types::polkadot_primitives::v4::collator_app::Public, + ); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ParathreadEntry { + pub claim: runtime_types::polkadot_primitives::v4::ParathreadClaim, + pub retries: ::core::primitive::u32, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct PvfCheckStatement { + pub accept: ::core::primitive::bool, + pub subject: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + pub session_index: ::core::primitive::u32, + pub validator_index: runtime_types::polkadot_primitives::v4::ValidatorIndex, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum PvfExecTimeoutKind { + #[codec(index = 0)] + Backing, + #[codec(index = 1)] + Approval, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum PvfPrepTimeoutKind { + #[codec(index = 0)] + Precheck, + #[codec(index = 1)] + Lenient, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ScrapedOnChainVotes<_0> { + pub session: ::core::primitive::u32, + pub backing_validators_per_candidate: ::std::vec::Vec<( + runtime_types::polkadot_primitives::v4::CandidateReceipt<_0>, + ::std::vec::Vec<( + runtime_types::polkadot_primitives::v4::ValidatorIndex, + runtime_types::polkadot_primitives::v4::ValidityAttestation, + )>, + )>, + pub disputes: ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::DisputeStatementSet, + >, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct SessionInfo { + pub active_validator_indices: + ::std::vec::Vec, + pub random_seed: [::core::primitive::u8; 32usize], + pub dispute_period: ::core::primitive::u32, + pub validators: runtime_types::polkadot_primitives::v4::IndexedVec< + runtime_types::polkadot_primitives::v4::ValidatorIndex, + runtime_types::polkadot_primitives::v4::validator_app::Public, + >, + pub discovery_keys: + ::std::vec::Vec, + pub assignment_keys: ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::assignment_app::Public, + >, + pub validator_groups: runtime_types::polkadot_primitives::v4::IndexedVec< + runtime_types::polkadot_primitives::v4::GroupIndex, + ::std::vec::Vec, + >, + pub n_cores: ::core::primitive::u32, + pub zeroth_delay_tranche_width: ::core::primitive::u32, + pub relay_vrf_modulo_samples: ::core::primitive::u32, + pub n_delay_tranches: ::core::primitive::u32, + pub no_show_slots: ::core::primitive::u32, + pub needed_approvals: ::core::primitive::u32, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum UpgradeGoAhead { + #[codec(index = 0)] + Abort, + #[codec(index = 1)] + GoAhead, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum UpgradeRestriction { + #[codec(index = 0)] + Present, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ValidDisputeStatementKind { + #[codec(index = 0)] + Explicit, + #[codec(index = 1)] + BackingSeconded(::subxt::utils::H256), + #[codec(index = 2)] + BackingValid(::subxt::utils::H256), + #[codec(index = 3)] + ApprovalChecking, + } + #[derive( + :: codec :: Decode, + :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + Clone, + Debug, + PartialEq, + )] + pub struct ValidatorIndex(pub ::core::primitive::u32); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ValidityAttestation { + #[codec(index = 1)] + Implicit(runtime_types::polkadot_primitives::v4::validator_app::Signature), + #[codec(index = 2)] + Explicit(runtime_types::polkadot_primitives::v4::validator_app::Signature), + } + } + pub mod vstaging { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct AsyncBackingParams { + pub max_candidate_depth: ::core::primitive::u32, + pub allowed_ancestry_len: ::core::primitive::u32, + } + } + } + pub mod polkadot_runtime_common { + use super::runtime_types; + pub mod assigned_slots { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + # [codec (index = 0)] assign_perm_parachain_slot { id : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 1)] assign_temp_parachain_slot { id : runtime_types :: polkadot_parachain :: primitives :: Id , lease_period_start : runtime_types :: polkadot_runtime_common :: assigned_slots :: SlotLeasePeriodStart , } , # [codec (index = 2)] unassign_parachain_slot { id : runtime_types :: polkadot_parachain :: primitives :: Id , } , } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + ParaDoesntExist, + #[codec(index = 1)] + NotParathread, + #[codec(index = 2)] + CannotUpgrade, + #[codec(index = 3)] + CannotDowngrade, + #[codec(index = 4)] + SlotAlreadyAssigned, + #[codec(index = 5)] + SlotNotAssigned, + #[codec(index = 6)] + OngoingLeaseExists, + #[codec(index = 7)] + MaxPermanentSlotsExceeded, + #[codec(index = 8)] + MaxTemporarySlotsExceeded, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + PermanentSlotAssigned(runtime_types::polkadot_parachain::primitives::Id), + #[codec(index = 1)] + TemporarySlotAssigned(runtime_types::polkadot_parachain::primitives::Id), + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ParachainTemporarySlot<_0, _1> { + pub manager: _0, + pub period_begin: _1, + pub period_count: _1, + pub last_lease: ::core::option::Option<_1>, + pub lease_count: _1, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum SlotLeasePeriodStart { + #[codec(index = 0)] + Current, + #[codec(index = 1)] + Next, + } + } + pub mod auctions { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + new_auction { + #[codec(compact)] + duration: ::core::primitive::u32, + #[codec(compact)] + lease_period_index: ::core::primitive::u32, + }, + #[codec(index = 1)] + bid { + #[codec(compact)] + para: runtime_types::polkadot_parachain::primitives::Id, + #[codec(compact)] + auction_index: ::core::primitive::u32, + #[codec(compact)] + first_slot: ::core::primitive::u32, + #[codec(compact)] + last_slot: ::core::primitive::u32, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + cancel_auction, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + AuctionInProgress, + #[codec(index = 1)] + LeasePeriodInPast, + #[codec(index = 2)] + ParaNotRegistered, + #[codec(index = 3)] + NotCurrentAuction, + #[codec(index = 4)] + NotAuction, + #[codec(index = 5)] + AuctionEnded, + #[codec(index = 6)] + AlreadyLeasedOut, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + AuctionStarted { + auction_index: ::core::primitive::u32, + lease_period: ::core::primitive::u32, + ending: ::core::primitive::u32, + }, + #[codec(index = 1)] + AuctionClosed { auction_index: ::core::primitive::u32 }, + #[codec(index = 2)] + Reserved { + bidder: ::sp_core::crypto::AccountId32, + extra_reserved: ::core::primitive::u128, + total_amount: ::core::primitive::u128, + }, + #[codec(index = 3)] + Unreserved { + bidder: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 4)] + ReserveConfiscated { + para_id: runtime_types::polkadot_parachain::primitives::Id, + leaser: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 5)] + BidAccepted { + bidder: ::sp_core::crypto::AccountId32, + para_id: runtime_types::polkadot_parachain::primitives::Id, + amount: ::core::primitive::u128, + first_slot: ::core::primitive::u32, + last_slot: ::core::primitive::u32, + }, + #[codec(index = 6)] + WinningOffset { + auction_index: ::core::primitive::u32, + block_number: ::core::primitive::u32, + }, + } + } + } + pub mod crowdloan { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + create { + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + #[codec(compact)] + cap: ::core::primitive::u128, + #[codec(compact)] + first_period: ::core::primitive::u32, + #[codec(compact)] + last_period: ::core::primitive::u32, + #[codec(compact)] + end: ::core::primitive::u32, + verifier: + ::core::option::Option, + }, + #[codec(index = 1)] + contribute { + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + #[codec(compact)] + value: ::core::primitive::u128, + signature: + ::core::option::Option, + }, + #[codec(index = 2)] + withdraw { + who: ::sp_core::crypto::AccountId32, + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 3)] + refund { + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 4)] + dissolve { + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 5)] + edit { + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + #[codec(compact)] + cap: ::core::primitive::u128, + #[codec(compact)] + first_period: ::core::primitive::u32, + #[codec(compact)] + last_period: ::core::primitive::u32, + #[codec(compact)] + end: ::core::primitive::u32, + verifier: + ::core::option::Option, + }, + #[codec(index = 6)] + add_memo { + index: runtime_types::polkadot_parachain::primitives::Id, + memo: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 7)] + poke { index: runtime_types::polkadot_parachain::primitives::Id }, + #[codec(index = 8)] + contribute_all { + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + signature: + ::core::option::Option, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + FirstPeriodInPast, + #[codec(index = 1)] + FirstPeriodTooFarInFuture, + #[codec(index = 2)] + LastPeriodBeforeFirstPeriod, + #[codec(index = 3)] + LastPeriodTooFarInFuture, + #[codec(index = 4)] + CannotEndInPast, + #[codec(index = 5)] + EndTooFarInFuture, + #[codec(index = 6)] + Overflow, + #[codec(index = 7)] + ContributionTooSmall, + #[codec(index = 8)] + InvalidParaId, + #[codec(index = 9)] + CapExceeded, + #[codec(index = 10)] + ContributionPeriodOver, + #[codec(index = 11)] + InvalidOrigin, + #[codec(index = 12)] + NotParachain, + #[codec(index = 13)] + LeaseActive, + #[codec(index = 14)] + BidOrLeaseActive, + #[codec(index = 15)] + FundNotEnded, + #[codec(index = 16)] + NoContributions, + #[codec(index = 17)] + NotReadyToDissolve, + #[codec(index = 18)] + InvalidSignature, + #[codec(index = 19)] + MemoTooLarge, + #[codec(index = 20)] + AlreadyInNewRaise, + #[codec(index = 21)] + VrfDelayInProgress, + #[codec(index = 22)] + NoLeasePeriod, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Created { para_id: runtime_types::polkadot_parachain::primitives::Id }, + #[codec(index = 1)] + Contributed { + who: ::sp_core::crypto::AccountId32, + fund_index: runtime_types::polkadot_parachain::primitives::Id, + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + Withdrew { + who: ::sp_core::crypto::AccountId32, + fund_index: runtime_types::polkadot_parachain::primitives::Id, + amount: ::core::primitive::u128, + }, + #[codec(index = 3)] + PartiallyRefunded { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 4)] + AllRefunded { para_id: runtime_types::polkadot_parachain::primitives::Id }, + #[codec(index = 5)] + Dissolved { para_id: runtime_types::polkadot_parachain::primitives::Id }, + #[codec(index = 6)] + HandleBidResult { + para_id: runtime_types::polkadot_parachain::primitives::Id, + result: ::core::result::Result< + (), + runtime_types::sp_runtime::DispatchError, + >, + }, + #[codec(index = 7)] + Edited { para_id: runtime_types::polkadot_parachain::primitives::Id }, + #[codec(index = 8)] + MemoUpdated { + who: ::sp_core::crypto::AccountId32, + para_id: runtime_types::polkadot_parachain::primitives::Id, + memo: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 9)] + AddedToNewRaise { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct FundInfo<_0, _1, _2, _3> { + pub depositor: _0, + pub verifier: ::core::option::Option, + pub deposit: _1, + pub raised: _1, + pub end: _2, + pub cap: _1, + pub last_contribution: + runtime_types::polkadot_runtime_common::crowdloan::LastContribution<_2>, + pub first_period: _2, + pub last_period: _2, + pub fund_index: _2, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_3>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum LastContribution<_0> { + #[codec(index = 0)] + Never, + #[codec(index = 1)] + PreEnding(_0), + #[codec(index = 2)] + Ending(_0), + } + } + pub mod paras_registrar { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + register { + id: runtime_types::polkadot_parachain::primitives::Id, + genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, + validation_code: + runtime_types::polkadot_parachain::primitives::ValidationCode, + }, + #[codec(index = 1)] + force_register { + who: ::sp_core::crypto::AccountId32, + deposit: ::core::primitive::u128, + id: runtime_types::polkadot_parachain::primitives::Id, + genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, + validation_code: + runtime_types::polkadot_parachain::primitives::ValidationCode, + }, + #[codec(index = 2)] + deregister { id: runtime_types::polkadot_parachain::primitives::Id }, + #[codec(index = 3)] + swap { + id: runtime_types::polkadot_parachain::primitives::Id, + other: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 4)] + remove_lock { para: runtime_types::polkadot_parachain::primitives::Id }, + #[codec(index = 5)] + reserve, + #[codec(index = 6)] + add_lock { para: runtime_types::polkadot_parachain::primitives::Id }, + #[codec(index = 7)] + schedule_code_upgrade { + para: runtime_types::polkadot_parachain::primitives::Id, + new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, + }, + #[codec(index = 8)] + set_current_head { + para: runtime_types::polkadot_parachain::primitives::Id, + new_head: runtime_types::polkadot_parachain::primitives::HeadData, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + NotRegistered, + #[codec(index = 1)] + AlreadyRegistered, + #[codec(index = 2)] + NotOwner, + #[codec(index = 3)] + CodeTooLarge, + #[codec(index = 4)] + HeadDataTooLarge, + #[codec(index = 5)] + NotParachain, + #[codec(index = 6)] + NotParathread, + #[codec(index = 7)] + CannotDeregister, + #[codec(index = 8)] + CannotDowngrade, + #[codec(index = 9)] + CannotUpgrade, + #[codec(index = 10)] + ParaLocked, + #[codec(index = 11)] + NotReserved, + #[codec(index = 12)] + EmptyCode, + #[codec(index = 13)] + CannotSwap, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Registered { + para_id: runtime_types::polkadot_parachain::primitives::Id, + manager: ::sp_core::crypto::AccountId32, + }, + #[codec(index = 1)] + Deregistered { para_id: runtime_types::polkadot_parachain::primitives::Id }, + #[codec(index = 2)] + Reserved { + para_id: runtime_types::polkadot_parachain::primitives::Id, + who: ::sp_core::crypto::AccountId32, + }, + #[codec(index = 3)] + Swapped { + para_id: runtime_types::polkadot_parachain::primitives::Id, + other_id: runtime_types::polkadot_parachain::primitives::Id, + }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ParaInfo<_0, _1> { + pub manager: _0, + pub deposit: _1, + pub locked: ::core::primitive::bool, + } + } + pub mod paras_sudo_wrapper { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + sudo_schedule_para_initialize { + id: runtime_types::polkadot_parachain::primitives::Id, + genesis: + runtime_types::polkadot_runtime_parachains::paras::ParaGenesisArgs, + }, + #[codec(index = 1)] + sudo_schedule_para_cleanup { + id: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 2)] + sudo_schedule_parathread_upgrade { + id: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 3)] + sudo_schedule_parachain_downgrade { + id: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 4)] + sudo_queue_downward_xcm { + id: runtime_types::polkadot_parachain::primitives::Id, + xcm: ::std::boxed::Box, + }, + #[codec(index = 5)] + sudo_establish_hrmp_channel { + sender: runtime_types::polkadot_parachain::primitives::Id, + recipient: runtime_types::polkadot_parachain::primitives::Id, + max_capacity: ::core::primitive::u32, + max_message_size: ::core::primitive::u32, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + ParaDoesntExist, + #[codec(index = 1)] + ParaAlreadyExists, + #[codec(index = 2)] + ExceedsMaxMessageSize, + #[codec(index = 3)] + CouldntCleanup, + #[codec(index = 4)] + NotParathread, + #[codec(index = 5)] + NotParachain, + #[codec(index = 6)] + CannotUpgrade, + #[codec(index = 7)] + CannotDowngrade, + } + } + } + pub mod slots { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + force_lease { + para: runtime_types::polkadot_parachain::primitives::Id, + leaser: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + period_begin: ::core::primitive::u32, + period_count: ::core::primitive::u32, + }, + #[codec(index = 1)] + clear_all_leases { para: runtime_types::polkadot_parachain::primitives::Id }, + #[codec(index = 2)] + trigger_onboard { para: runtime_types::polkadot_parachain::primitives::Id }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + ParaNotOnboarding, + #[codec(index = 1)] + LeaseError, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + NewLeasePeriod { lease_period: ::core::primitive::u32 }, + #[codec(index = 1)] + Leased { + para_id: runtime_types::polkadot_parachain::primitives::Id, + leaser: ::sp_core::crypto::AccountId32, + period_begin: ::core::primitive::u32, + period_count: ::core::primitive::u32, + extra_reserved: ::core::primitive::u128, + total_amount: ::core::primitive::u128, + }, + } + } + } + } + pub mod polkadot_runtime_parachains { + use super::runtime_types; + pub mod configuration { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + # [codec (index = 0)] set_validation_upgrade_cooldown { new : :: core :: primitive :: u32 , } , # [codec (index = 1)] set_validation_upgrade_delay { new : :: core :: primitive :: u32 , } , # [codec (index = 2)] set_code_retention_period { new : :: core :: primitive :: u32 , } , # [codec (index = 3)] set_max_code_size { new : :: core :: primitive :: u32 , } , # [codec (index = 4)] set_max_pov_size { new : :: core :: primitive :: u32 , } , # [codec (index = 5)] set_max_head_data_size { new : :: core :: primitive :: u32 , } , # [codec (index = 6)] set_parathread_cores { new : :: core :: primitive :: u32 , } , # [codec (index = 7)] set_parathread_retries { new : :: core :: primitive :: u32 , } , # [codec (index = 8)] set_group_rotation_frequency { new : :: core :: primitive :: u32 , } , # [codec (index = 9)] set_chain_availability_period { new : :: core :: primitive :: u32 , } , # [codec (index = 10)] set_thread_availability_period { new : :: core :: primitive :: u32 , } , # [codec (index = 11)] set_scheduling_lookahead { new : :: core :: primitive :: u32 , } , # [codec (index = 12)] set_max_validators_per_core { new : :: core :: option :: Option < :: core :: primitive :: u32 > , } , # [codec (index = 13)] set_max_validators { new : :: core :: option :: Option < :: core :: primitive :: u32 > , } , # [codec (index = 14)] set_dispute_period { new : :: core :: primitive :: u32 , } , # [codec (index = 15)] set_dispute_post_conclusion_acceptance_period { new : :: core :: primitive :: u32 , } , # [codec (index = 18)] set_no_show_slots { new : :: core :: primitive :: u32 , } , # [codec (index = 19)] set_n_delay_tranches { new : :: core :: primitive :: u32 , } , # [codec (index = 20)] set_zeroth_delay_tranche_width { new : :: core :: primitive :: u32 , } , # [codec (index = 21)] set_needed_approvals { new : :: core :: primitive :: u32 , } , # [codec (index = 22)] set_relay_vrf_modulo_samples { new : :: core :: primitive :: u32 , } , # [codec (index = 23)] set_max_upward_queue_count { new : :: core :: primitive :: u32 , } , # [codec (index = 24)] set_max_upward_queue_size { new : :: core :: primitive :: u32 , } , # [codec (index = 25)] set_max_downward_message_size { new : :: core :: primitive :: u32 , } , # [codec (index = 27)] set_max_upward_message_size { new : :: core :: primitive :: u32 , } , # [codec (index = 28)] set_max_upward_message_num_per_candidate { new : :: core :: primitive :: u32 , } , # [codec (index = 29)] set_hrmp_open_request_ttl { new : :: core :: primitive :: u32 , } , # [codec (index = 30)] set_hrmp_sender_deposit { new : :: core :: primitive :: u128 , } , # [codec (index = 31)] set_hrmp_recipient_deposit { new : :: core :: primitive :: u128 , } , # [codec (index = 32)] set_hrmp_channel_max_capacity { new : :: core :: primitive :: u32 , } , # [codec (index = 33)] set_hrmp_channel_max_total_size { new : :: core :: primitive :: u32 , } , # [codec (index = 34)] set_hrmp_max_parachain_inbound_channels { new : :: core :: primitive :: u32 , } , # [codec (index = 35)] set_hrmp_max_parathread_inbound_channels { new : :: core :: primitive :: u32 , } , # [codec (index = 36)] set_hrmp_channel_max_message_size { new : :: core :: primitive :: u32 , } , # [codec (index = 37)] set_hrmp_max_parachain_outbound_channels { new : :: core :: primitive :: u32 , } , # [codec (index = 38)] set_hrmp_max_parathread_outbound_channels { new : :: core :: primitive :: u32 , } , # [codec (index = 39)] set_hrmp_max_message_num_per_candidate { new : :: core :: primitive :: u32 , } , # [codec (index = 41)] set_pvf_checking_enabled { new : :: core :: primitive :: bool , } , # [codec (index = 42)] set_pvf_voting_ttl { new : :: core :: primitive :: u32 , } , # [codec (index = 43)] set_minimum_validation_upgrade_delay { new : :: core :: primitive :: u32 , } , # [codec (index = 44)] set_bypass_consistency_check { new : :: core :: primitive :: bool , } , # [codec (index = 45)] set_async_backing_params { new : runtime_types :: polkadot_primitives :: vstaging :: AsyncBackingParams , } , # [codec (index = 46)] set_executor_params { new : runtime_types :: polkadot_primitives :: v4 :: executor_params :: ExecutorParams , } , } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + InvalidNewValue, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct HostConfiguration<_0> { + pub max_code_size: _0, + pub max_head_data_size: _0, + pub max_upward_queue_count: _0, + pub max_upward_queue_size: _0, + pub max_upward_message_size: _0, + pub max_upward_message_num_per_candidate: _0, + pub hrmp_max_message_num_per_candidate: _0, + pub validation_upgrade_cooldown: _0, + pub validation_upgrade_delay: _0, + pub async_backing_params: + runtime_types::polkadot_primitives::vstaging::AsyncBackingParams, + pub max_pov_size: _0, + pub max_downward_message_size: _0, + pub hrmp_max_parachain_outbound_channels: _0, + pub hrmp_max_parathread_outbound_channels: _0, + pub hrmp_sender_deposit: ::core::primitive::u128, + pub hrmp_recipient_deposit: ::core::primitive::u128, + pub hrmp_channel_max_capacity: _0, + pub hrmp_channel_max_total_size: _0, + pub hrmp_max_parachain_inbound_channels: _0, + pub hrmp_max_parathread_inbound_channels: _0, + pub hrmp_channel_max_message_size: _0, + pub executor_params: + runtime_types::polkadot_primitives::v4::executor_params::ExecutorParams, + pub code_retention_period: _0, + pub parathread_cores: _0, + pub parathread_retries: _0, + pub group_rotation_frequency: _0, + pub chain_availability_period: _0, + pub thread_availability_period: _0, + pub scheduling_lookahead: _0, + pub max_validators_per_core: ::core::option::Option<_0>, + pub max_validators: ::core::option::Option<_0>, + pub dispute_period: _0, + pub dispute_post_conclusion_acceptance_period: _0, + pub no_show_slots: _0, + pub n_delay_tranches: _0, + pub zeroth_delay_tranche_width: _0, + pub needed_approvals: _0, + pub relay_vrf_modulo_samples: _0, + pub pvf_checking_enabled: ::core::primitive::bool, + pub pvf_voting_ttl: _0, + pub minimum_validation_upgrade_delay: _0, + } + } + pub mod disputes { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + force_unfreeze, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + DuplicateDisputeStatementSets, + #[codec(index = 1)] + AncientDisputeStatement, + #[codec(index = 2)] + ValidatorIndexOutOfBounds, + #[codec(index = 3)] + InvalidSignature, + #[codec(index = 4)] + DuplicateStatement, + #[codec(index = 5)] + SingleSidedDispute, + #[codec(index = 6)] + MaliciousBacker, + #[codec(index = 7)] + MissingBackingVotes, + #[codec(index = 8)] + UnconfirmedDispute, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + DisputeInitiated( + runtime_types::polkadot_core_primitives::CandidateHash, + runtime_types::polkadot_runtime_parachains::disputes::DisputeLocation, + ), + #[codec(index = 1)] + DisputeConcluded( + runtime_types::polkadot_core_primitives::CandidateHash, + runtime_types::polkadot_runtime_parachains::disputes::DisputeResult, + ), + #[codec(index = 2)] + Revert(::core::primitive::u32), + } + } + pub mod slashing { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq, + )] + pub enum Call { + # [codec (index = 0)] report_dispute_lost_unsigned { dispute_proof : :: std :: boxed :: Box < runtime_types :: polkadot_runtime_parachains :: disputes :: slashing :: DisputeProof > , key_owner_proof : :: sp_session :: MembershipProof , } , } + #[derive( + :: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq, + )] + pub enum Error { + #[codec(index = 0)] + InvalidKeyOwnershipProof, + #[codec(index = 1)] + InvalidSessionIndex, + #[codec(index = 2)] + InvalidCandidateHash, + #[codec(index = 3)] + InvalidValidatorIndex, + #[codec(index = 4)] + ValidatorIndexIdMismatch, + #[codec(index = 5)] + DuplicateSlashingReport, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct DisputeProof { pub time_slot : runtime_types :: polkadot_runtime_parachains :: disputes :: slashing :: DisputesTimeSlot , pub kind : runtime_types :: polkadot_runtime_parachains :: disputes :: slashing :: SlashingOffenceKind , pub validator_index : runtime_types :: polkadot_primitives :: v4 :: ValidatorIndex , pub validator_id : runtime_types :: polkadot_primitives :: v4 :: validator_app :: Public , } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct DisputesTimeSlot { + pub session_index: ::core::primitive::u32, + pub candidate_hash: runtime_types::polkadot_core_primitives::CandidateHash, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct PendingSlashes { pub keys : :: subxt :: utils :: KeyedVec < runtime_types :: polkadot_primitives :: v4 :: ValidatorIndex , runtime_types :: polkadot_primitives :: v4 :: validator_app :: Public > , pub kind : runtime_types :: polkadot_runtime_parachains :: disputes :: slashing :: SlashingOffenceKind , } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum SlashingOffenceKind { + #[codec(index = 0)] + ForInvalid, + #[codec(index = 1)] + AgainstValid, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum DisputeLocation { + #[codec(index = 0)] + Local, + #[codec(index = 1)] + Remote, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum DisputeResult { + #[codec(index = 0)] + Valid, + #[codec(index = 1)] + Invalid, + } + } + pub mod hrmp { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + hrmp_init_open_channel { + recipient: runtime_types::polkadot_parachain::primitives::Id, + proposed_max_capacity: ::core::primitive::u32, + proposed_max_message_size: ::core::primitive::u32, + }, + #[codec(index = 1)] + hrmp_accept_open_channel { + sender: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 2)] + hrmp_close_channel { + channel_id: + runtime_types::polkadot_parachain::primitives::HrmpChannelId, + }, + #[codec(index = 3)] + force_clean_hrmp { + para: runtime_types::polkadot_parachain::primitives::Id, + inbound: ::core::primitive::u32, + outbound: ::core::primitive::u32, + }, + #[codec(index = 4)] + force_process_hrmp_open { channels: ::core::primitive::u32 }, + #[codec(index = 5)] + force_process_hrmp_close { channels: ::core::primitive::u32 }, + #[codec(index = 6)] + hrmp_cancel_open_request { + channel_id: + runtime_types::polkadot_parachain::primitives::HrmpChannelId, + open_requests: ::core::primitive::u32, + }, + #[codec(index = 7)] + force_open_hrmp_channel { + sender: runtime_types::polkadot_parachain::primitives::Id, + recipient: runtime_types::polkadot_parachain::primitives::Id, + max_capacity: ::core::primitive::u32, + max_message_size: ::core::primitive::u32, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + OpenHrmpChannelToSelf, + #[codec(index = 1)] + OpenHrmpChannelInvalidRecipient, + #[codec(index = 2)] + OpenHrmpChannelZeroCapacity, + #[codec(index = 3)] + OpenHrmpChannelCapacityExceedsLimit, + #[codec(index = 4)] + OpenHrmpChannelZeroMessageSize, + #[codec(index = 5)] + OpenHrmpChannelMessageSizeExceedsLimit, + #[codec(index = 6)] + OpenHrmpChannelAlreadyExists, + #[codec(index = 7)] + OpenHrmpChannelAlreadyRequested, + #[codec(index = 8)] + OpenHrmpChannelLimitExceeded, + #[codec(index = 9)] + AcceptHrmpChannelDoesntExist, + #[codec(index = 10)] + AcceptHrmpChannelAlreadyConfirmed, + #[codec(index = 11)] + AcceptHrmpChannelLimitExceeded, + #[codec(index = 12)] + CloseHrmpChannelUnauthorized, + #[codec(index = 13)] + CloseHrmpChannelDoesntExist, + #[codec(index = 14)] + CloseHrmpChannelAlreadyUnderway, + #[codec(index = 15)] + CancelHrmpOpenChannelUnauthorized, + #[codec(index = 16)] + OpenHrmpChannelDoesntExist, + #[codec(index = 17)] + OpenHrmpChannelAlreadyConfirmed, + #[codec(index = 18)] + WrongWitness, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + OpenChannelRequested( + runtime_types::polkadot_parachain::primitives::Id, + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u32, + ::core::primitive::u32, + ), + #[codec(index = 1)] + OpenChannelCanceled( + runtime_types::polkadot_parachain::primitives::Id, + runtime_types::polkadot_parachain::primitives::HrmpChannelId, + ), + #[codec(index = 2)] + OpenChannelAccepted( + runtime_types::polkadot_parachain::primitives::Id, + runtime_types::polkadot_parachain::primitives::Id, + ), + #[codec(index = 3)] + ChannelClosed( + runtime_types::polkadot_parachain::primitives::Id, + runtime_types::polkadot_parachain::primitives::HrmpChannelId, + ), + #[codec(index = 4)] + HrmpChannelForceOpened( + runtime_types::polkadot_parachain::primitives::Id, + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u32, + ::core::primitive::u32, + ), + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct HrmpChannel { + pub max_capacity: ::core::primitive::u32, + pub max_total_size: ::core::primitive::u32, + pub max_message_size: ::core::primitive::u32, + pub msg_count: ::core::primitive::u32, + pub total_size: ::core::primitive::u32, + pub mqc_head: ::core::option::Option<::subxt::utils::H256>, + pub sender_deposit: ::core::primitive::u128, + pub recipient_deposit: ::core::primitive::u128, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct HrmpOpenChannelRequest { + pub confirmed: ::core::primitive::bool, + pub _age: ::core::primitive::u32, + pub sender_deposit: ::core::primitive::u128, + pub max_message_size: ::core::primitive::u32, + pub max_capacity: ::core::primitive::u32, + pub max_total_size: ::core::primitive::u32, + } + } + pub mod inclusion { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call {} + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + UnsortedOrDuplicateValidatorIndices, + #[codec(index = 1)] + UnsortedOrDuplicateDisputeStatementSet, + #[codec(index = 2)] + UnsortedOrDuplicateBackedCandidates, + #[codec(index = 3)] + UnexpectedRelayParent, + #[codec(index = 4)] + WrongBitfieldSize, + #[codec(index = 5)] + BitfieldAllZeros, + #[codec(index = 6)] + BitfieldDuplicateOrUnordered, + #[codec(index = 7)] + ValidatorIndexOutOfBounds, + #[codec(index = 8)] + InvalidBitfieldSignature, + #[codec(index = 9)] + UnscheduledCandidate, + #[codec(index = 10)] + CandidateScheduledBeforeParaFree, + #[codec(index = 11)] + WrongCollator, + #[codec(index = 12)] + ScheduledOutOfOrder, + #[codec(index = 13)] + HeadDataTooLarge, + #[codec(index = 14)] + PrematureCodeUpgrade, + #[codec(index = 15)] + NewCodeTooLarge, + #[codec(index = 16)] + CandidateNotInParentContext, + #[codec(index = 17)] + InvalidGroupIndex, + #[codec(index = 18)] + InsufficientBacking, + #[codec(index = 19)] + InvalidBacking, + #[codec(index = 20)] + NotCollatorSigned, + #[codec(index = 21)] + ValidationDataHashMismatch, + #[codec(index = 22)] + IncorrectDownwardMessageHandling, + #[codec(index = 23)] + InvalidUpwardMessages, + #[codec(index = 24)] + HrmpWatermarkMishandling, + #[codec(index = 25)] + InvalidOutboundHrmp, + #[codec(index = 26)] + InvalidValidationCodeHash, + #[codec(index = 27)] + ParaHeadMismatch, + #[codec(index = 28)] + BitfieldReferencesFreedCore, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + CandidateBacked( + runtime_types::polkadot_primitives::v4::CandidateReceipt< + ::subxt::utils::H256, + >, + runtime_types::polkadot_parachain::primitives::HeadData, + runtime_types::polkadot_primitives::v4::CoreIndex, + runtime_types::polkadot_primitives::v4::GroupIndex, + ), + #[codec(index = 1)] + CandidateIncluded( + runtime_types::polkadot_primitives::v4::CandidateReceipt< + ::subxt::utils::H256, + >, + runtime_types::polkadot_parachain::primitives::HeadData, + runtime_types::polkadot_primitives::v4::CoreIndex, + runtime_types::polkadot_primitives::v4::GroupIndex, + ), + #[codec(index = 2)] + CandidateTimedOut( + runtime_types::polkadot_primitives::v4::CandidateReceipt< + ::subxt::utils::H256, + >, + runtime_types::polkadot_parachain::primitives::HeadData, + runtime_types::polkadot_primitives::v4::CoreIndex, + ), + #[codec(index = 3)] + UpwardMessagesReceived { + from: runtime_types::polkadot_parachain::primitives::Id, + count: ::core::primitive::u32, + }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum AggregateMessageOrigin { + #[codec(index = 0)] + Ump(runtime_types::polkadot_runtime_parachains::inclusion::UmpQueueId), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct AvailabilityBitfieldRecord<_0> { + pub bitfield: runtime_types::polkadot_primitives::v4::AvailabilityBitfield, + pub submitted_at: _0, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CandidatePendingAvailability<_0, _1> { + pub core: runtime_types::polkadot_primitives::v4::CoreIndex, + pub hash: runtime_types::polkadot_core_primitives::CandidateHash, + pub descriptor: runtime_types::polkadot_primitives::v4::CandidateDescriptor<_0>, + pub availability_votes: ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + pub backers: ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + pub relay_parent_number: _1, + pub backed_in_number: _1, + pub backing_group: runtime_types::polkadot_primitives::v4::GroupIndex, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum UmpQueueId { + #[codec(index = 0)] + Para(runtime_types::polkadot_parachain::primitives::Id), + } + } + pub mod initializer { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + force_approve { up_to: ::core::primitive::u32 }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BufferedSessionChange { + pub validators: ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::validator_app::Public, + >, + pub queued: ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::validator_app::Public, + >, + pub session_index: ::core::primitive::u32, + } + } + pub mod origin { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Origin { + #[codec(index = 0)] + Parachain(runtime_types::polkadot_parachain::primitives::Id), + } + } + } + pub mod paras { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + force_set_current_code { + para: runtime_types::polkadot_parachain::primitives::Id, + new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, + }, + #[codec(index = 1)] + force_set_current_head { + para: runtime_types::polkadot_parachain::primitives::Id, + new_head: runtime_types::polkadot_parachain::primitives::HeadData, + }, + #[codec(index = 2)] + force_schedule_code_upgrade { + para: runtime_types::polkadot_parachain::primitives::Id, + new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, + relay_parent_number: ::core::primitive::u32, + }, + #[codec(index = 3)] + force_note_new_head { + para: runtime_types::polkadot_parachain::primitives::Id, + new_head: runtime_types::polkadot_parachain::primitives::HeadData, + }, + #[codec(index = 4)] + force_queue_action { + para: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 5)] + add_trusted_validation_code { + validation_code: + runtime_types::polkadot_parachain::primitives::ValidationCode, + }, + #[codec(index = 6)] + poke_unused_validation_code { + validation_code_hash: + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + }, + #[codec(index = 7)] + include_pvf_check_statement { + stmt: runtime_types::polkadot_primitives::v4::PvfCheckStatement, + signature: + runtime_types::polkadot_primitives::v4::validator_app::Signature, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + NotRegistered, + #[codec(index = 1)] + CannotOnboard, + #[codec(index = 2)] + CannotOffboard, + #[codec(index = 3)] + CannotUpgrade, + #[codec(index = 4)] + CannotDowngrade, + #[codec(index = 5)] + PvfCheckStatementStale, + #[codec(index = 6)] + PvfCheckStatementFuture, + #[codec(index = 7)] + PvfCheckValidatorIndexOutOfBounds, + #[codec(index = 8)] + PvfCheckInvalidSignature, + #[codec(index = 9)] + PvfCheckDoubleVote, + #[codec(index = 10)] + PvfCheckSubjectInvalid, + #[codec(index = 11)] + CannotUpgradeCode, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + CurrentCodeUpdated(runtime_types::polkadot_parachain::primitives::Id), + #[codec(index = 1)] + CurrentHeadUpdated(runtime_types::polkadot_parachain::primitives::Id), + #[codec(index = 2)] + CodeUpgradeScheduled(runtime_types::polkadot_parachain::primitives::Id), + #[codec(index = 3)] + NewHeadNoted(runtime_types::polkadot_parachain::primitives::Id), + #[codec(index = 4)] + ActionQueued( + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u32, + ), + #[codec(index = 5)] + PvfCheckStarted( + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + runtime_types::polkadot_parachain::primitives::Id, + ), + #[codec(index = 6)] + PvfCheckAccepted( + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + runtime_types::polkadot_parachain::primitives::Id, + ), + #[codec(index = 7)] + PvfCheckRejected( + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + runtime_types::polkadot_parachain::primitives::Id, + ), + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ParaGenesisArgs { + pub genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, + pub validation_code: + runtime_types::polkadot_parachain::primitives::ValidationCode, + pub para_kind: ::core::primitive::bool, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ParaLifecycle { + #[codec(index = 0)] + Onboarding, + #[codec(index = 1)] + Parathread, + #[codec(index = 2)] + Parachain, + #[codec(index = 3)] + UpgradingParathread, + #[codec(index = 4)] + DowngradingParachain, + #[codec(index = 5)] + OffboardingParathread, + #[codec(index = 6)] + OffboardingParachain, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ParaPastCodeMeta<_0> { + pub upgrade_times: ::std::vec::Vec< + runtime_types::polkadot_runtime_parachains::paras::ReplacementTimes<_0>, + >, + pub last_pruned: ::core::option::Option<_0>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct PvfCheckActiveVoteState<_0> { + pub votes_accept: ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + pub votes_reject: ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + pub age: _0, + pub created_at: _0, + pub causes: ::std::vec::Vec< + runtime_types::polkadot_runtime_parachains::paras::PvfCheckCause<_0>, + >, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum PvfCheckCause<_0> { + #[codec(index = 0)] + Onboarding(runtime_types::polkadot_parachain::primitives::Id), + #[codec(index = 1)] + Upgrade { + id: runtime_types::polkadot_parachain::primitives::Id, + relay_parent_number: _0, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ReplacementTimes<_0> { + pub expected_at: _0, + pub activated_at: _0, + } + } + pub mod paras_inherent { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + enter { + data: runtime_types::polkadot_primitives::v4::InherentData< + ::sp_runtime::generic::Header< + ::core::primitive::u32, + ::sp_runtime::traits::BlakeTwo256, + >, + >, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + TooManyInclusionInherents, + #[codec(index = 1)] + InvalidParentHeader, + #[codec(index = 2)] + CandidateConcludedInvalid, + #[codec(index = 3)] + InherentOverweight, + #[codec(index = 4)] + DisputeStatementsUnsortedOrDuplicates, + #[codec(index = 5)] + DisputeInvalid, + } + } + } + pub mod scheduler { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum AssignmentKind { + #[codec(index = 0)] + Parachain, + #[codec(index = 1)] + Parathread( + runtime_types::polkadot_primitives::v4::collator_app::Public, + ::core::primitive::u32, + ), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CoreAssignment { + pub core: runtime_types::polkadot_primitives::v4::CoreIndex, + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub kind: runtime_types::polkadot_runtime_parachains::scheduler::AssignmentKind, + pub group_idx: runtime_types::polkadot_primitives::v4::GroupIndex, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ParathreadClaimQueue { + pub queue: ::std::vec::Vec< + runtime_types::polkadot_runtime_parachains::scheduler::QueuedParathread, + >, + pub next_core_offset: ::core::primitive::u32, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct QueuedParathread { + pub claim: runtime_types::polkadot_primitives::v4::ParathreadEntry, + pub core_offset: ::core::primitive::u32, + } + } + pub mod shared { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call {} + } + } + } + pub mod sp_arithmetic { + use super::runtime_types; + pub mod fixed_point { + use super::runtime_types; + #[derive( + :: codec :: Decode, + :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + Clone, + Debug, + PartialEq, + )] + pub struct FixedU128(pub ::core::primitive::u128); + } + pub mod per_things { + use super::runtime_types; + #[derive( + :: codec :: Decode, + :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + Clone, + Debug, + PartialEq, + )] + pub struct PerU16(pub ::core::primitive::u16); + #[derive( + :: codec :: Decode, + :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + Clone, + Debug, + PartialEq, + )] + pub struct Perbill(pub ::core::primitive::u32); + #[derive( + :: codec :: Decode, + :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + Clone, + Debug, + PartialEq, + )] + pub struct Percent(pub ::core::primitive::u8); + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ArithmeticError { + #[codec(index = 0)] + Underflow, + #[codec(index = 1)] + Overflow, + #[codec(index = 2)] + DivisionByZero, + } + } + pub mod sp_authority_discovery { + use super::runtime_types; + pub mod app { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + } + } + pub mod sp_consensus_babe { + use super::runtime_types; + pub mod app { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + } + pub mod digests { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum NextConfigDescriptor { + #[codec(index = 1)] + V1 { + c: (::core::primitive::u64, ::core::primitive::u64), + allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum PreDigest { + #[codec(index = 1)] + Primary(runtime_types::sp_consensus_babe::digests::PrimaryPreDigest), + #[codec(index = 2)] + SecondaryPlain( + runtime_types::sp_consensus_babe::digests::SecondaryPlainPreDigest, + ), + #[codec(index = 3)] + SecondaryVRF(runtime_types::sp_consensus_babe::digests::SecondaryVRFPreDigest), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct PrimaryPreDigest { + pub authority_index: ::core::primitive::u32, + pub slot: runtime_types::sp_consensus_slots::Slot, + pub vrf_signature: runtime_types::sp_core::sr25519::vrf::VrfSignature, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct SecondaryPlainPreDigest { + pub authority_index: ::core::primitive::u32, + pub slot: runtime_types::sp_consensus_slots::Slot, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct SecondaryVRFPreDigest { + pub authority_index: ::core::primitive::u32, + pub slot: runtime_types::sp_consensus_slots::Slot, + pub vrf_signature: runtime_types::sp_core::sr25519::vrf::VrfSignature, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum AllowedSlots { + #[codec(index = 0)] + PrimarySlots, + #[codec(index = 1)] + PrimaryAndSecondaryPlainSlots, + #[codec(index = 2)] + PrimaryAndSecondaryVRFSlots, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BabeEpochConfiguration { + pub c: (::core::primitive::u64, ::core::primitive::u64), + pub allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, + } + } + pub mod sp_consensus_grandpa { + use super::runtime_types; + pub mod app { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Public(pub runtime_types::sp_core::ed25519::Public); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Signature(pub runtime_types::sp_core::ed25519::Signature); + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Equivocation<_0, _1> { + #[codec(index = 0)] + Prevote( + runtime_types::finality_grandpa::Equivocation< + runtime_types::sp_consensus_grandpa::app::Public, + runtime_types::finality_grandpa::Prevote<_0, _1>, + runtime_types::sp_consensus_grandpa::app::Signature, + >, + ), + #[codec(index = 1)] + Precommit( + runtime_types::finality_grandpa::Equivocation< + runtime_types::sp_consensus_grandpa::app::Public, + runtime_types::finality_grandpa::Precommit<_0, _1>, + runtime_types::sp_consensus_grandpa::app::Signature, + >, + ), + } + } + pub mod sp_consensus_slots { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct EquivocationProof<_0, _1> { + pub offender: _1, + pub slot: runtime_types::sp_consensus_slots::Slot, + pub first_header: _0, + pub second_header: _0, + } + #[derive( + :: codec :: Decode, + :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + Clone, + Debug, + PartialEq, + )] + pub struct Slot(pub ::core::primitive::u64); + } + pub mod sp_core { + use super::runtime_types; + pub mod crypto { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct KeyTypeId(pub [::core::primitive::u8; 4usize]); + } + pub mod ecdsa { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Public(pub [::core::primitive::u8; 33usize]); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Signature(pub [::core::primitive::u8; 65usize]); + } + pub mod ed25519 { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Public(pub [::core::primitive::u8; 32usize]); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Signature(pub [::core::primitive::u8; 64usize]); + } + pub mod offchain { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct OpaqueMultiaddr(pub ::std::vec::Vec<::core::primitive::u8>); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct OpaqueNetworkState { + pub peer_id: runtime_types::sp_core::OpaquePeerId, + pub external_addresses: + ::std::vec::Vec, + } + } + pub mod sr25519 { + use super::runtime_types; + pub mod vrf { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct VrfSignature { + pub output: [::core::primitive::u8; 32usize], + pub proof: [::core::primitive::u8; 64usize], + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Public(pub [::core::primitive::u8; 32usize]); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Signature(pub [::core::primitive::u8; 64usize]); + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct OpaquePeerId(pub ::std::vec::Vec<::core::primitive::u8>); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Void {} + } + pub mod sp_npos_elections { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ElectionScore { + pub minimal_stake: ::core::primitive::u128, + pub sum_stake: ::core::primitive::u128, + pub sum_stake_squared: ::core::primitive::u128, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Support<_0> { + pub total: ::core::primitive::u128, + pub voters: ::std::vec::Vec<(_0, ::core::primitive::u128)>, + } + } + pub mod sp_runtime { + use super::runtime_types; + pub mod generic { + use super::runtime_types; + pub mod digest { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum DigestItem { + #[codec(index = 6)] + PreRuntime( + [::core::primitive::u8; 4usize], + ::std::vec::Vec<::core::primitive::u8>, + ), + #[codec(index = 4)] + Consensus( + [::core::primitive::u8; 4usize], + ::std::vec::Vec<::core::primitive::u8>, + ), + #[codec(index = 5)] + Seal( + [::core::primitive::u8; 4usize], + ::std::vec::Vec<::core::primitive::u8>, + ), + #[codec(index = 0)] + Other(::std::vec::Vec<::core::primitive::u8>), + #[codec(index = 8)] + RuntimeEnvironmentUpdated, + } + } + pub mod unchecked_extrinsic { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct UncheckedExtrinsic<_0, _1, _2, _3>( + pub ::std::vec::Vec<::core::primitive::u8>, + #[codec(skip)] pub ::core::marker::PhantomData<(_0, _1, _2, _3)>, + ); + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum DispatchError { + #[codec(index = 0)] + Other, + #[codec(index = 1)] + CannotLookup, + #[codec(index = 2)] + BadOrigin, + #[codec(index = 3)] + Module(runtime_types::sp_runtime::ModuleError), + #[codec(index = 4)] + ConsumerRemaining, + #[codec(index = 5)] + NoProviders, + #[codec(index = 6)] + TooManyConsumers, + #[codec(index = 7)] + Token(runtime_types::sp_runtime::TokenError), + #[codec(index = 8)] + Arithmetic(runtime_types::sp_arithmetic::ArithmeticError), + #[codec(index = 9)] + Transactional(runtime_types::sp_runtime::TransactionalError), + #[codec(index = 10)] + Exhausted, + #[codec(index = 11)] + Corruption, + #[codec(index = 12)] + Unavailable, + #[codec(index = 13)] + RootNotAllowed, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ModuleError { + pub index: ::core::primitive::u8, + pub error: [::core::primitive::u8; 4usize], + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum MultiSignature { + #[codec(index = 0)] + Ed25519(runtime_types::sp_core::ed25519::Signature), + #[codec(index = 1)] + Sr25519(runtime_types::sp_core::sr25519::Signature), + #[codec(index = 2)] + Ecdsa(runtime_types::sp_core::ecdsa::Signature), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum MultiSigner { + #[codec(index = 0)] + Ed25519(runtime_types::sp_core::ed25519::Public), + #[codec(index = 1)] + Sr25519(runtime_types::sp_core::sr25519::Public), + #[codec(index = 2)] + Ecdsa(runtime_types::sp_core::ecdsa::Public), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum TokenError { + #[codec(index = 0)] + FundsUnavailable, + #[codec(index = 1)] + OnlyProvider, + #[codec(index = 2)] + BelowMinimum, + #[codec(index = 3)] + CannotCreate, + #[codec(index = 4)] + UnknownAsset, + #[codec(index = 5)] + Frozen, + #[codec(index = 6)] + Unsupported, + #[codec(index = 7)] + CannotCreateHold, + #[codec(index = 8)] + NotExpendable, + #[codec(index = 9)] + Blocked, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum TransactionalError { + #[codec(index = 0)] + LimitReached, + #[codec(index = 1)] + NoLayer, + } + } + pub mod sp_staking { + use super::runtime_types; + pub mod offence { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct OffenceDetails<_0, _1> { + pub offender: _1, + pub reporters: ::std::vec::Vec<_0>, + } + } + } + pub mod sp_version { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct RuntimeVersion { + pub spec_name: ::std::string::String, + pub impl_name: ::std::string::String, + pub authoring_version: ::core::primitive::u32, + pub spec_version: ::core::primitive::u32, + pub impl_version: ::core::primitive::u32, + pub apis: + ::std::vec::Vec<([::core::primitive::u8; 8usize], ::core::primitive::u32)>, + pub transaction_version: ::core::primitive::u32, + pub state_version: ::core::primitive::u8, + } + } + pub mod sp_weights { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct RuntimeDbWeight { + pub read: ::core::primitive::u64, + pub write: ::core::primitive::u64, + } + } + pub mod westend_runtime { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct NposCompactSolution16 { + pub votes1: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes2: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + ( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ), + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes3: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 2usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes4: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 3usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes5: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 4usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes6: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 5usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes7: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 6usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes8: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 7usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes9: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 8usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes10: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 9usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes11: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 10usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes12: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 11usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes13: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 12usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes14: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 13usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes15: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 14usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes16: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 15usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum OriginCaller { + #[codec(index = 0)] + system( + runtime_types::frame_support::dispatch::RawOrigin< + ::sp_core::crypto::AccountId32, + >, + ), + #[codec(index = 41)] + ParachainsOrigin( + runtime_types::polkadot_runtime_parachains::origin::pallet::Origin, + ), + #[codec(index = 99)] + XcmPallet(runtime_types::pallet_xcm::pallet::Origin), + #[codec(index = 3)] + Void(runtime_types::sp_core::Void), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ProxyType { + #[codec(index = 0)] + Any, + #[codec(index = 1)] + NonTransfer, + #[codec(index = 2)] + Staking, + #[codec(index = 3)] + SudoBalances, + #[codec(index = 4)] + IdentityJudgement, + #[codec(index = 5)] + CancelProxy, + #[codec(index = 6)] + Auction, + #[codec(index = 7)] + NominationPools, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Runtime; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum RuntimeCall { + #[codec(index = 0)] + System(runtime_types::frame_system::pallet::Call), + #[codec(index = 1)] + Babe(runtime_types::pallet_babe::pallet::Call), + #[codec(index = 2)] + Timestamp(runtime_types::pallet_timestamp::pallet::Call), + #[codec(index = 3)] + Indices(runtime_types::pallet_indices::pallet::Call), + #[codec(index = 4)] + Balances(runtime_types::pallet_balances::pallet::Call), + #[codec(index = 6)] + Staking(runtime_types::pallet_staking::pallet::pallet::Call), + #[codec(index = 8)] + Session(runtime_types::pallet_session::pallet::Call), + #[codec(index = 10)] + Grandpa(runtime_types::pallet_grandpa::pallet::Call), + #[codec(index = 11)] + ImOnline(runtime_types::pallet_im_online::pallet::Call), + #[codec(index = 16)] + Utility(runtime_types::pallet_utility::pallet::Call), + #[codec(index = 17)] + Identity(runtime_types::pallet_identity::pallet::Call), + #[codec(index = 18)] + Recovery(runtime_types::pallet_recovery::pallet::Call), + #[codec(index = 19)] + Vesting(runtime_types::pallet_vesting::pallet::Call), + #[codec(index = 20)] + Scheduler(runtime_types::pallet_scheduler::pallet::Call), + #[codec(index = 28)] + Preimage(runtime_types::pallet_preimage::pallet::Call), + #[codec(index = 21)] + Sudo(runtime_types::pallet_sudo::pallet::Call), + #[codec(index = 22)] + Proxy(runtime_types::pallet_proxy::pallet::Call), + #[codec(index = 23)] + Multisig(runtime_types::pallet_multisig::pallet::Call), + #[codec(index = 24)] + ElectionProviderMultiPhase( + runtime_types::pallet_election_provider_multi_phase::pallet::Call, + ), + #[codec(index = 25)] + VoterList(runtime_types::pallet_bags_list::pallet::Call), + #[codec(index = 29)] + NominationPools(runtime_types::pallet_nomination_pools::pallet::Call), + #[codec(index = 30)] + FastUnstake(runtime_types::pallet_fast_unstake::pallet::Call), + #[codec(index = 42)] + Configuration( + runtime_types::polkadot_runtime_parachains::configuration::pallet::Call, + ), + #[codec(index = 43)] + ParasShared(runtime_types::polkadot_runtime_parachains::shared::pallet::Call), + #[codec(index = 44)] + ParaInclusion(runtime_types::polkadot_runtime_parachains::inclusion::pallet::Call), + #[codec(index = 45)] + ParaInherent( + runtime_types::polkadot_runtime_parachains::paras_inherent::pallet::Call, + ), + #[codec(index = 47)] + Paras(runtime_types::polkadot_runtime_parachains::paras::pallet::Call), + #[codec(index = 48)] + Initializer(runtime_types::polkadot_runtime_parachains::initializer::pallet::Call), + #[codec(index = 51)] + Hrmp(runtime_types::polkadot_runtime_parachains::hrmp::pallet::Call), + #[codec(index = 53)] + ParasDisputes(runtime_types::polkadot_runtime_parachains::disputes::pallet::Call), + #[codec(index = 54)] + ParasSlashing( + runtime_types::polkadot_runtime_parachains::disputes::slashing::pallet::Call, + ), + #[codec(index = 60)] + Registrar(runtime_types::polkadot_runtime_common::paras_registrar::pallet::Call), + #[codec(index = 61)] + Slots(runtime_types::polkadot_runtime_common::slots::pallet::Call), + #[codec(index = 62)] + ParasSudoWrapper( + runtime_types::polkadot_runtime_common::paras_sudo_wrapper::pallet::Call, + ), + #[codec(index = 63)] + Auctions(runtime_types::polkadot_runtime_common::auctions::pallet::Call), + #[codec(index = 64)] + Crowdloan(runtime_types::polkadot_runtime_common::crowdloan::pallet::Call), + #[codec(index = 65)] + AssignedSlots(runtime_types::polkadot_runtime_common::assigned_slots::pallet::Call), + #[codec(index = 99)] + XcmPallet(runtime_types::pallet_xcm::pallet::Call), + #[codec(index = 100)] + MessageQueue(runtime_types::pallet_message_queue::pallet::Call), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum RuntimeEvent { + #[codec(index = 0)] + System(runtime_types::frame_system::pallet::Event), + #[codec(index = 3)] + Indices(runtime_types::pallet_indices::pallet::Event), + #[codec(index = 4)] + Balances(runtime_types::pallet_balances::pallet::Event), + #[codec(index = 26)] + TransactionPayment(runtime_types::pallet_transaction_payment::pallet::Event), + #[codec(index = 6)] + Staking(runtime_types::pallet_staking::pallet::pallet::Event), + #[codec(index = 7)] + Offences(runtime_types::pallet_offences::pallet::Event), + #[codec(index = 8)] + Session(runtime_types::pallet_session::pallet::Event), + #[codec(index = 10)] + Grandpa(runtime_types::pallet_grandpa::pallet::Event), + #[codec(index = 11)] + ImOnline(runtime_types::pallet_im_online::pallet::Event), + #[codec(index = 16)] + Utility(runtime_types::pallet_utility::pallet::Event), + #[codec(index = 17)] + Identity(runtime_types::pallet_identity::pallet::Event), + #[codec(index = 18)] + Recovery(runtime_types::pallet_recovery::pallet::Event), + #[codec(index = 19)] + Vesting(runtime_types::pallet_vesting::pallet::Event), + #[codec(index = 20)] + Scheduler(runtime_types::pallet_scheduler::pallet::Event), + #[codec(index = 28)] + Preimage(runtime_types::pallet_preimage::pallet::Event), + #[codec(index = 21)] + Sudo(runtime_types::pallet_sudo::pallet::Event), + #[codec(index = 22)] + Proxy(runtime_types::pallet_proxy::pallet::Event), + #[codec(index = 23)] + Multisig(runtime_types::pallet_multisig::pallet::Event), + #[codec(index = 24)] + ElectionProviderMultiPhase( + runtime_types::pallet_election_provider_multi_phase::pallet::Event, + ), + #[codec(index = 25)] + VoterList(runtime_types::pallet_bags_list::pallet::Event), + #[codec(index = 29)] + NominationPools(runtime_types::pallet_nomination_pools::pallet::Event), + #[codec(index = 30)] + FastUnstake(runtime_types::pallet_fast_unstake::pallet::Event), + #[codec(index = 44)] + ParaInclusion(runtime_types::polkadot_runtime_parachains::inclusion::pallet::Event), + #[codec(index = 47)] + Paras(runtime_types::polkadot_runtime_parachains::paras::pallet::Event), + #[codec(index = 51)] + Hrmp(runtime_types::polkadot_runtime_parachains::hrmp::pallet::Event), + #[codec(index = 53)] + ParasDisputes(runtime_types::polkadot_runtime_parachains::disputes::pallet::Event), + #[codec(index = 60)] + Registrar(runtime_types::polkadot_runtime_common::paras_registrar::pallet::Event), + #[codec(index = 61)] + Slots(runtime_types::polkadot_runtime_common::slots::pallet::Event), + #[codec(index = 63)] + Auctions(runtime_types::polkadot_runtime_common::auctions::pallet::Event), + #[codec(index = 64)] + Crowdloan(runtime_types::polkadot_runtime_common::crowdloan::pallet::Event), + #[codec(index = 65)] + AssignedSlots( + runtime_types::polkadot_runtime_common::assigned_slots::pallet::Event, + ), + #[codec(index = 99)] + XcmPallet(runtime_types::pallet_xcm::pallet::Event), + #[codec(index = 100)] + MessageQueue(runtime_types::pallet_message_queue::pallet::Event), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct SessionKeys { + pub grandpa: runtime_types::sp_consensus_grandpa::app::Public, + pub babe: runtime_types::sp_consensus_babe::app::Public, + pub im_online: runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + pub para_validator: runtime_types::polkadot_primitives::v4::validator_app::Public, + pub para_assignment: runtime_types::polkadot_primitives::v4::assignment_app::Public, + pub authority_discovery: runtime_types::sp_authority_discovery::app::Public, + } + } + pub mod xcm { + use super::runtime_types; + pub mod double_encoded { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct DoubleEncoded { + pub encoded: ::std::vec::Vec<::core::primitive::u8>, + } + } + pub mod v2 { + use super::runtime_types; + pub mod junction { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Junction { + #[codec(index = 0)] + Parachain(#[codec(compact)] ::core::primitive::u32), + #[codec(index = 1)] + AccountId32 { + network: runtime_types::xcm::v2::NetworkId, + id: [::core::primitive::u8; 32usize], + }, + #[codec(index = 2)] + AccountIndex64 { + network: runtime_types::xcm::v2::NetworkId, + #[codec(compact)] + index: ::core::primitive::u64, + }, + #[codec(index = 3)] + AccountKey20 { + network: runtime_types::xcm::v2::NetworkId, + key: [::core::primitive::u8; 20usize], + }, + #[codec(index = 4)] + PalletInstance(::core::primitive::u8), + #[codec(index = 5)] + GeneralIndex(#[codec(compact)] ::core::primitive::u128), + #[codec(index = 6)] + GeneralKey( + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + ::core::primitive::u8, + >, + ), + #[codec(index = 7)] + OnlyChild, + #[codec(index = 8)] + Plurality { + id: runtime_types::xcm::v2::BodyId, + part: runtime_types::xcm::v2::BodyPart, + }, + } + } + pub mod multiasset { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum AssetId { + #[codec(index = 0)] + Concrete(runtime_types::xcm::v2::multilocation::MultiLocation), + #[codec(index = 1)] + Abstract(::std::vec::Vec<::core::primitive::u8>), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum AssetInstance { + #[codec(index = 0)] + Undefined, + #[codec(index = 1)] + Index(#[codec(compact)] ::core::primitive::u128), + #[codec(index = 2)] + Array4([::core::primitive::u8; 4usize]), + #[codec(index = 3)] + Array8([::core::primitive::u8; 8usize]), + #[codec(index = 4)] + Array16([::core::primitive::u8; 16usize]), + #[codec(index = 5)] + Array32([::core::primitive::u8; 32usize]), + #[codec(index = 6)] + Blob(::std::vec::Vec<::core::primitive::u8>), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Fungibility { + #[codec(index = 0)] + Fungible(#[codec(compact)] ::core::primitive::u128), + #[codec(index = 1)] + NonFungible(runtime_types::xcm::v2::multiasset::AssetInstance), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct MultiAsset { + pub id: runtime_types::xcm::v2::multiasset::AssetId, + pub fun: runtime_types::xcm::v2::multiasset::Fungibility, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum MultiAssetFilter { + #[codec(index = 0)] + Definite(runtime_types::xcm::v2::multiasset::MultiAssets), + #[codec(index = 1)] + Wild(runtime_types::xcm::v2::multiasset::WildMultiAsset), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct MultiAssets( + pub ::std::vec::Vec, + ); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum WildFungibility { + #[codec(index = 0)] + Fungible, + #[codec(index = 1)] + NonFungible, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum WildMultiAsset { + #[codec(index = 0)] + All, + #[codec(index = 1)] + AllOf { + id: runtime_types::xcm::v2::multiasset::AssetId, + fun: runtime_types::xcm::v2::multiasset::WildFungibility, + }, + } + } + pub mod multilocation { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Junctions { + #[codec(index = 0)] + Here, + #[codec(index = 1)] + X1(runtime_types::xcm::v2::junction::Junction), + #[codec(index = 2)] + X2( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), + #[codec(index = 3)] + X3( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), + #[codec(index = 4)] + X4( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), + #[codec(index = 5)] + X5( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), + #[codec(index = 6)] + X6( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), + #[codec(index = 7)] + X7( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), + #[codec(index = 8)] + X8( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct MultiLocation { + pub parents: ::core::primitive::u8, + pub interior: runtime_types::xcm::v2::multilocation::Junctions, + } + } + pub mod traits { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + Overflow, + #[codec(index = 1)] + Unimplemented, + #[codec(index = 2)] + UntrustedReserveLocation, + #[codec(index = 3)] + UntrustedTeleportLocation, + #[codec(index = 4)] + MultiLocationFull, + #[codec(index = 5)] + MultiLocationNotInvertible, + #[codec(index = 6)] + BadOrigin, + #[codec(index = 7)] + InvalidLocation, + #[codec(index = 8)] + AssetNotFound, + #[codec(index = 9)] + FailedToTransactAsset, + #[codec(index = 10)] + NotWithdrawable, + #[codec(index = 11)] + LocationCannotHold, + #[codec(index = 12)] + ExceedsMaxMessageSize, + #[codec(index = 13)] + DestinationUnsupported, + #[codec(index = 14)] + Transport, + #[codec(index = 15)] + Unroutable, + #[codec(index = 16)] + UnknownClaim, + #[codec(index = 17)] + FailedToDecode, + #[codec(index = 18)] + MaxWeightInvalid, + #[codec(index = 19)] + NotHoldingFees, + #[codec(index = 20)] + TooExpensive, + #[codec(index = 21)] + Trap(::core::primitive::u64), + #[codec(index = 22)] + UnhandledXcmVersion, + #[codec(index = 23)] + WeightLimitReached(::core::primitive::u64), + #[codec(index = 24)] + Barrier, + #[codec(index = 25)] + WeightNotComputable, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum BodyId { + #[codec(index = 0)] + Unit, + #[codec(index = 1)] + Named( + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + ::core::primitive::u8, + >, + ), + #[codec(index = 2)] + Index(#[codec(compact)] ::core::primitive::u32), + #[codec(index = 3)] + Executive, + #[codec(index = 4)] + Technical, + #[codec(index = 5)] + Legislative, + #[codec(index = 6)] + Judicial, + #[codec(index = 7)] + Defense, + #[codec(index = 8)] + Administration, + #[codec(index = 9)] + Treasury, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum BodyPart { + #[codec(index = 0)] + Voice, + #[codec(index = 1)] + Members { + #[codec(compact)] + count: ::core::primitive::u32, + }, + #[codec(index = 2)] + Fraction { + #[codec(compact)] + nom: ::core::primitive::u32, + #[codec(compact)] + denom: ::core::primitive::u32, + }, + #[codec(index = 3)] + AtLeastProportion { + #[codec(compact)] + nom: ::core::primitive::u32, + #[codec(compact)] + denom: ::core::primitive::u32, + }, + #[codec(index = 4)] + MoreThanProportion { + #[codec(compact)] + nom: ::core::primitive::u32, + #[codec(compact)] + denom: ::core::primitive::u32, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Instruction { + #[codec(index = 0)] + WithdrawAsset(runtime_types::xcm::v2::multiasset::MultiAssets), + #[codec(index = 1)] + ReserveAssetDeposited(runtime_types::xcm::v2::multiasset::MultiAssets), + #[codec(index = 2)] + ReceiveTeleportedAsset(runtime_types::xcm::v2::multiasset::MultiAssets), + #[codec(index = 3)] + QueryResponse { + #[codec(compact)] + query_id: ::core::primitive::u64, + response: runtime_types::xcm::v2::Response, + #[codec(compact)] + max_weight: ::core::primitive::u64, + }, + #[codec(index = 4)] + TransferAsset { + assets: runtime_types::xcm::v2::multiasset::MultiAssets, + beneficiary: runtime_types::xcm::v2::multilocation::MultiLocation, + }, + #[codec(index = 5)] + TransferReserveAsset { + assets: runtime_types::xcm::v2::multiasset::MultiAssets, + dest: runtime_types::xcm::v2::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 6)] + Transact { + origin_type: runtime_types::xcm::v2::OriginKind, + #[codec(compact)] + require_weight_at_most: ::core::primitive::u64, + call: runtime_types::xcm::double_encoded::DoubleEncoded, + }, + #[codec(index = 7)] + HrmpNewChannelOpenRequest { + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + max_message_size: ::core::primitive::u32, + #[codec(compact)] + max_capacity: ::core::primitive::u32, + }, + #[codec(index = 8)] + HrmpChannelAccepted { + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 9)] + HrmpChannelClosing { + #[codec(compact)] + initiator: ::core::primitive::u32, + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 10)] + ClearOrigin, + #[codec(index = 11)] + DescendOrigin(runtime_types::xcm::v2::multilocation::Junctions), + #[codec(index = 12)] + ReportError { + #[codec(compact)] + query_id: ::core::primitive::u64, + dest: runtime_types::xcm::v2::multilocation::MultiLocation, + #[codec(compact)] + max_response_weight: ::core::primitive::u64, + }, + #[codec(index = 13)] + DepositAsset { + assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + #[codec(compact)] + max_assets: ::core::primitive::u32, + beneficiary: runtime_types::xcm::v2::multilocation::MultiLocation, + }, + #[codec(index = 14)] + DepositReserveAsset { + assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + #[codec(compact)] + max_assets: ::core::primitive::u32, + dest: runtime_types::xcm::v2::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 15)] + ExchangeAsset { + give: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + receive: runtime_types::xcm::v2::multiasset::MultiAssets, + }, + #[codec(index = 16)] + InitiateReserveWithdraw { + assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + reserve: runtime_types::xcm::v2::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 17)] + InitiateTeleport { + assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + dest: runtime_types::xcm::v2::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 18)] + QueryHolding { + #[codec(compact)] + query_id: ::core::primitive::u64, + dest: runtime_types::xcm::v2::multilocation::MultiLocation, + assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + #[codec(compact)] + max_response_weight: ::core::primitive::u64, + }, + #[codec(index = 19)] + BuyExecution { + fees: runtime_types::xcm::v2::multiasset::MultiAsset, + weight_limit: runtime_types::xcm::v2::WeightLimit, + }, + #[codec(index = 20)] + RefundSurplus, + #[codec(index = 21)] + SetErrorHandler(runtime_types::xcm::v2::Xcm), + #[codec(index = 22)] + SetAppendix(runtime_types::xcm::v2::Xcm), + #[codec(index = 23)] + ClearError, + #[codec(index = 24)] + ClaimAsset { + assets: runtime_types::xcm::v2::multiasset::MultiAssets, + ticket: runtime_types::xcm::v2::multilocation::MultiLocation, + }, + #[codec(index = 25)] + Trap(#[codec(compact)] ::core::primitive::u64), + #[codec(index = 26)] + SubscribeVersion { + #[codec(compact)] + query_id: ::core::primitive::u64, + #[codec(compact)] + max_response_weight: ::core::primitive::u64, + }, + #[codec(index = 27)] + UnsubscribeVersion, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum NetworkId { + #[codec(index = 0)] + Any, + #[codec(index = 1)] + Named( + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + ::core::primitive::u8, + >, + ), + #[codec(index = 2)] + Polkadot, + #[codec(index = 3)] + Kusama, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum OriginKind { + #[codec(index = 0)] + Native, + #[codec(index = 1)] + SovereignAccount, + #[codec(index = 2)] + Superuser, + #[codec(index = 3)] + Xcm, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Response { + #[codec(index = 0)] + Null, + #[codec(index = 1)] + Assets(runtime_types::xcm::v2::multiasset::MultiAssets), + #[codec(index = 2)] + ExecutionResult( + ::core::option::Option<( + ::core::primitive::u32, + runtime_types::xcm::v2::traits::Error, + )>, + ), + #[codec(index = 3)] + Version(::core::primitive::u32), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum WeightLimit { + #[codec(index = 0)] + Unlimited, + #[codec(index = 1)] + Limited(#[codec(compact)] ::core::primitive::u64), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Xcm(pub ::std::vec::Vec); + } + pub mod v3 { + use super::runtime_types; + pub mod junction { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum BodyId { + #[codec(index = 0)] + Unit, + #[codec(index = 1)] + Moniker([::core::primitive::u8; 4usize]), + #[codec(index = 2)] + Index(#[codec(compact)] ::core::primitive::u32), + #[codec(index = 3)] + Executive, + #[codec(index = 4)] + Technical, + #[codec(index = 5)] + Legislative, + #[codec(index = 6)] + Judicial, + #[codec(index = 7)] + Defense, + #[codec(index = 8)] + Administration, + #[codec(index = 9)] + Treasury, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum BodyPart { + #[codec(index = 0)] + Voice, + #[codec(index = 1)] + Members { + #[codec(compact)] + count: ::core::primitive::u32, + }, + #[codec(index = 2)] + Fraction { + #[codec(compact)] + nom: ::core::primitive::u32, + #[codec(compact)] + denom: ::core::primitive::u32, + }, + #[codec(index = 3)] + AtLeastProportion { + #[codec(compact)] + nom: ::core::primitive::u32, + #[codec(compact)] + denom: ::core::primitive::u32, + }, + #[codec(index = 4)] + MoreThanProportion { + #[codec(compact)] + nom: ::core::primitive::u32, + #[codec(compact)] + denom: ::core::primitive::u32, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Junction { + #[codec(index = 0)] + Parachain(#[codec(compact)] ::core::primitive::u32), + #[codec(index = 1)] + AccountId32 { + network: + ::core::option::Option, + id: [::core::primitive::u8; 32usize], + }, + #[codec(index = 2)] + AccountIndex64 { + network: + ::core::option::Option, + #[codec(compact)] + index: ::core::primitive::u64, + }, + #[codec(index = 3)] + AccountKey20 { + network: + ::core::option::Option, + key: [::core::primitive::u8; 20usize], + }, + #[codec(index = 4)] + PalletInstance(::core::primitive::u8), + #[codec(index = 5)] + GeneralIndex(#[codec(compact)] ::core::primitive::u128), + #[codec(index = 6)] + GeneralKey { + length: ::core::primitive::u8, + data: [::core::primitive::u8; 32usize], + }, + #[codec(index = 7)] + OnlyChild, + #[codec(index = 8)] + Plurality { + id: runtime_types::xcm::v3::junction::BodyId, + part: runtime_types::xcm::v3::junction::BodyPart, + }, + #[codec(index = 9)] + GlobalConsensus(runtime_types::xcm::v3::junction::NetworkId), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum NetworkId { + #[codec(index = 0)] + ByGenesis([::core::primitive::u8; 32usize]), + #[codec(index = 1)] + ByFork { + block_number: ::core::primitive::u64, + block_hash: [::core::primitive::u8; 32usize], + }, + #[codec(index = 2)] + Polkadot, + #[codec(index = 3)] + Kusama, + #[codec(index = 4)] + Westend, + #[codec(index = 5)] + Rococo, + #[codec(index = 6)] + Wococo, + #[codec(index = 7)] + Ethereum { + #[codec(compact)] + chain_id: ::core::primitive::u64, + }, + #[codec(index = 8)] + BitcoinCore, + #[codec(index = 9)] + BitcoinCash, + } + } + pub mod junctions { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Junctions { + #[codec(index = 0)] + Here, + #[codec(index = 1)] + X1(runtime_types::xcm::v3::junction::Junction), + #[codec(index = 2)] + X2( + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + ), + #[codec(index = 3)] + X3( + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + ), + #[codec(index = 4)] + X4( + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + ), + #[codec(index = 5)] + X5( + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + ), + #[codec(index = 6)] + X6( + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + ), + #[codec(index = 7)] + X7( + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + ), + #[codec(index = 8)] + X8( + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + ), + } + } + pub mod multiasset { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum AssetId { + #[codec(index = 0)] + Concrete(runtime_types::xcm::v3::multilocation::MultiLocation), + #[codec(index = 1)] + Abstract([::core::primitive::u8; 32usize]), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum AssetInstance { + #[codec(index = 0)] + Undefined, + #[codec(index = 1)] + Index(#[codec(compact)] ::core::primitive::u128), + #[codec(index = 2)] + Array4([::core::primitive::u8; 4usize]), + #[codec(index = 3)] + Array8([::core::primitive::u8; 8usize]), + #[codec(index = 4)] + Array16([::core::primitive::u8; 16usize]), + #[codec(index = 5)] + Array32([::core::primitive::u8; 32usize]), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Fungibility { + #[codec(index = 0)] + Fungible(#[codec(compact)] ::core::primitive::u128), + #[codec(index = 1)] + NonFungible(runtime_types::xcm::v3::multiasset::AssetInstance), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct MultiAsset { + pub id: runtime_types::xcm::v3::multiasset::AssetId, + pub fun: runtime_types::xcm::v3::multiasset::Fungibility, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum MultiAssetFilter { + #[codec(index = 0)] + Definite(runtime_types::xcm::v3::multiasset::MultiAssets), + #[codec(index = 1)] + Wild(runtime_types::xcm::v3::multiasset::WildMultiAsset), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct MultiAssets( + pub ::std::vec::Vec, + ); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum WildFungibility { + #[codec(index = 0)] + Fungible, + #[codec(index = 1)] + NonFungible, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum WildMultiAsset { + #[codec(index = 0)] + All, + #[codec(index = 1)] + AllOf { + id: runtime_types::xcm::v3::multiasset::AssetId, + fun: runtime_types::xcm::v3::multiasset::WildFungibility, + }, + #[codec(index = 2)] + AllCounted(#[codec(compact)] ::core::primitive::u32), + #[codec(index = 3)] + AllOfCounted { + id: runtime_types::xcm::v3::multiasset::AssetId, + fun: runtime_types::xcm::v3::multiasset::WildFungibility, + #[codec(compact)] + count: ::core::primitive::u32, + }, + } + } + pub mod multilocation { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct MultiLocation { + pub parents: ::core::primitive::u8, + pub interior: runtime_types::xcm::v3::junctions::Junctions, + } + } + pub mod traits { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + Overflow, + #[codec(index = 1)] + Unimplemented, + #[codec(index = 2)] + UntrustedReserveLocation, + #[codec(index = 3)] + UntrustedTeleportLocation, + #[codec(index = 4)] + LocationFull, + #[codec(index = 5)] + LocationNotInvertible, + #[codec(index = 6)] + BadOrigin, + #[codec(index = 7)] + InvalidLocation, + #[codec(index = 8)] + AssetNotFound, + #[codec(index = 9)] + FailedToTransactAsset, + #[codec(index = 10)] + NotWithdrawable, + #[codec(index = 11)] + LocationCannotHold, + #[codec(index = 12)] + ExceedsMaxMessageSize, + #[codec(index = 13)] + DestinationUnsupported, + #[codec(index = 14)] + Transport, + #[codec(index = 15)] + Unroutable, + #[codec(index = 16)] + UnknownClaim, + #[codec(index = 17)] + FailedToDecode, + #[codec(index = 18)] + MaxWeightInvalid, + #[codec(index = 19)] + NotHoldingFees, + #[codec(index = 20)] + TooExpensive, + #[codec(index = 21)] + Trap(::core::primitive::u64), + #[codec(index = 22)] + ExpectationFalse, + #[codec(index = 23)] + PalletNotFound, + #[codec(index = 24)] + NameMismatch, + #[codec(index = 25)] + VersionIncompatible, + #[codec(index = 26)] + HoldingWouldOverflow, + #[codec(index = 27)] + ExportError, + #[codec(index = 28)] + ReanchorFailed, + #[codec(index = 29)] + NoDeal, + #[codec(index = 30)] + FeesNotMet, + #[codec(index = 31)] + LockError, + #[codec(index = 32)] + NoPermission, + #[codec(index = 33)] + Unanchored, + #[codec(index = 34)] + NotDepositable, + #[codec(index = 35)] + UnhandledXcmVersion, + #[codec(index = 36)] + WeightLimitReached(::sp_weights::Weight), + #[codec(index = 37)] + Barrier, + #[codec(index = 38)] + WeightNotComputable, + #[codec(index = 39)] + ExceedsStackLimit, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Outcome { + #[codec(index = 0)] + Complete(::sp_weights::Weight), + #[codec(index = 1)] + Incomplete(::sp_weights::Weight, runtime_types::xcm::v3::traits::Error), + #[codec(index = 2)] + Error(runtime_types::xcm::v3::traits::Error), + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Instruction { + #[codec(index = 0)] + WithdrawAsset(runtime_types::xcm::v3::multiasset::MultiAssets), + #[codec(index = 1)] + ReserveAssetDeposited(runtime_types::xcm::v3::multiasset::MultiAssets), + #[codec(index = 2)] + ReceiveTeleportedAsset(runtime_types::xcm::v3::multiasset::MultiAssets), + #[codec(index = 3)] + QueryResponse { + #[codec(compact)] + query_id: ::core::primitive::u64, + response: runtime_types::xcm::v3::Response, + max_weight: ::sp_weights::Weight, + querier: ::core::option::Option< + runtime_types::xcm::v3::multilocation::MultiLocation, + >, + }, + #[codec(index = 4)] + TransferAsset { + assets: runtime_types::xcm::v3::multiasset::MultiAssets, + beneficiary: runtime_types::xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 5)] + TransferReserveAsset { + assets: runtime_types::xcm::v3::multiasset::MultiAssets, + dest: runtime_types::xcm::v3::multilocation::MultiLocation, + xcm: runtime_types::xcm::v3::Xcm, + }, + #[codec(index = 6)] + Transact { + origin_kind: runtime_types::xcm::v2::OriginKind, + require_weight_at_most: ::sp_weights::Weight, + call: runtime_types::xcm::double_encoded::DoubleEncoded, + }, + #[codec(index = 7)] + HrmpNewChannelOpenRequest { + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + max_message_size: ::core::primitive::u32, + #[codec(compact)] + max_capacity: ::core::primitive::u32, + }, + #[codec(index = 8)] + HrmpChannelAccepted { + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 9)] + HrmpChannelClosing { + #[codec(compact)] + initiator: ::core::primitive::u32, + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 10)] + ClearOrigin, + #[codec(index = 11)] + DescendOrigin(runtime_types::xcm::v3::junctions::Junctions), + #[codec(index = 12)] + ReportError(runtime_types::xcm::v3::QueryResponseInfo), + #[codec(index = 13)] + DepositAsset { + assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + beneficiary: runtime_types::xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 14)] + DepositReserveAsset { + assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + dest: runtime_types::xcm::v3::multilocation::MultiLocation, + xcm: runtime_types::xcm::v3::Xcm, + }, + #[codec(index = 15)] + ExchangeAsset { + give: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + want: runtime_types::xcm::v3::multiasset::MultiAssets, + maximal: ::core::primitive::bool, + }, + #[codec(index = 16)] + InitiateReserveWithdraw { + assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + reserve: runtime_types::xcm::v3::multilocation::MultiLocation, + xcm: runtime_types::xcm::v3::Xcm, + }, + #[codec(index = 17)] + InitiateTeleport { + assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + dest: runtime_types::xcm::v3::multilocation::MultiLocation, + xcm: runtime_types::xcm::v3::Xcm, + }, + #[codec(index = 18)] + ReportHolding { + response_info: runtime_types::xcm::v3::QueryResponseInfo, + assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + }, + #[codec(index = 19)] + BuyExecution { + fees: runtime_types::xcm::v3::multiasset::MultiAsset, + weight_limit: runtime_types::xcm::v3::WeightLimit, + }, + #[codec(index = 20)] + RefundSurplus, + #[codec(index = 21)] + SetErrorHandler(runtime_types::xcm::v3::Xcm), + #[codec(index = 22)] + SetAppendix(runtime_types::xcm::v3::Xcm), + #[codec(index = 23)] + ClearError, + #[codec(index = 24)] + ClaimAsset { + assets: runtime_types::xcm::v3::multiasset::MultiAssets, + ticket: runtime_types::xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 25)] + Trap(#[codec(compact)] ::core::primitive::u64), + #[codec(index = 26)] + SubscribeVersion { + #[codec(compact)] + query_id: ::core::primitive::u64, + max_response_weight: ::sp_weights::Weight, + }, + #[codec(index = 27)] + UnsubscribeVersion, + #[codec(index = 28)] + BurnAsset(runtime_types::xcm::v3::multiasset::MultiAssets), + #[codec(index = 29)] + ExpectAsset(runtime_types::xcm::v3::multiasset::MultiAssets), + #[codec(index = 30)] + ExpectOrigin( + ::core::option::Option< + runtime_types::xcm::v3::multilocation::MultiLocation, + >, + ), + #[codec(index = 31)] + ExpectError( + ::core::option::Option<( + ::core::primitive::u32, + runtime_types::xcm::v3::traits::Error, + )>, + ), + #[codec(index = 32)] + ExpectTransactStatus(runtime_types::xcm::v3::MaybeErrorCode), + #[codec(index = 33)] + QueryPallet { + module_name: ::std::vec::Vec<::core::primitive::u8>, + response_info: runtime_types::xcm::v3::QueryResponseInfo, + }, + #[codec(index = 34)] + ExpectPallet { + #[codec(compact)] + index: ::core::primitive::u32, + name: ::std::vec::Vec<::core::primitive::u8>, + module_name: ::std::vec::Vec<::core::primitive::u8>, + #[codec(compact)] + crate_major: ::core::primitive::u32, + #[codec(compact)] + min_crate_minor: ::core::primitive::u32, + }, + #[codec(index = 35)] + ReportTransactStatus(runtime_types::xcm::v3::QueryResponseInfo), + #[codec(index = 36)] + ClearTransactStatus, + #[codec(index = 37)] + UniversalOrigin(runtime_types::xcm::v3::junction::Junction), + #[codec(index = 38)] + ExportMessage { + network: runtime_types::xcm::v3::junction::NetworkId, + destination: runtime_types::xcm::v3::junctions::Junctions, + xcm: runtime_types::xcm::v3::Xcm, + }, + #[codec(index = 39)] + LockAsset { + asset: runtime_types::xcm::v3::multiasset::MultiAsset, + unlocker: runtime_types::xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 40)] + UnlockAsset { + asset: runtime_types::xcm::v3::multiasset::MultiAsset, + target: runtime_types::xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 41)] + NoteUnlockable { + asset: runtime_types::xcm::v3::multiasset::MultiAsset, + owner: runtime_types::xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 42)] + RequestUnlock { + asset: runtime_types::xcm::v3::multiasset::MultiAsset, + locker: runtime_types::xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 43)] + SetFeesMode { jit_withdraw: ::core::primitive::bool }, + #[codec(index = 44)] + SetTopic([::core::primitive::u8; 32usize]), + #[codec(index = 45)] + ClearTopic, + #[codec(index = 46)] + AliasOrigin(runtime_types::xcm::v3::multilocation::MultiLocation), + #[codec(index = 47)] + UnpaidExecution { + weight_limit: runtime_types::xcm::v3::WeightLimit, + check_origin: ::core::option::Option< + runtime_types::xcm::v3::multilocation::MultiLocation, + >, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum MaybeErrorCode { + #[codec(index = 0)] + Success, + #[codec(index = 1)] + Error( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ), + #[codec(index = 2)] + TruncatedError( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct PalletInfo { + #[codec(compact)] + pub index: ::core::primitive::u32, + pub name: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + pub module_name: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + #[codec(compact)] + pub major: ::core::primitive::u32, + #[codec(compact)] + pub minor: ::core::primitive::u32, + #[codec(compact)] + pub patch: ::core::primitive::u32, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + 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(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Response { + #[codec(index = 0)] + Null, + #[codec(index = 1)] + Assets(runtime_types::xcm::v3::multiasset::MultiAssets), + #[codec(index = 2)] + ExecutionResult( + ::core::option::Option<( + ::core::primitive::u32, + runtime_types::xcm::v3::traits::Error, + )>, + ), + #[codec(index = 3)] + Version(::core::primitive::u32), + #[codec(index = 4)] + PalletsInfo( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::xcm::v3::PalletInfo, + >, + ), + #[codec(index = 5)] + DispatchResult(runtime_types::xcm::v3::MaybeErrorCode), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum WeightLimit { + #[codec(index = 0)] + Unlimited, + #[codec(index = 1)] + Limited(::sp_weights::Weight), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Xcm(pub ::std::vec::Vec); + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum VersionedAssetId { + #[codec(index = 3)] + V3(runtime_types::xcm::v3::multiasset::AssetId), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum VersionedMultiAssets { + #[codec(index = 1)] + V2(runtime_types::xcm::v2::multiasset::MultiAssets), + #[codec(index = 3)] + V3(runtime_types::xcm::v3::multiasset::MultiAssets), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum VersionedMultiLocation { + #[codec(index = 1)] + V2(runtime_types::xcm::v2::multilocation::MultiLocation), + #[codec(index = 3)] + V3(runtime_types::xcm::v3::multilocation::MultiLocation), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum VersionedResponse { + #[codec(index = 2)] + V2(runtime_types::xcm::v2::Response), + #[codec(index = 3)] + V3(runtime_types::xcm::v3::Response), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum VersionedXcm { + #[codec(index = 2)] + V2(runtime_types::xcm::v2::Xcm), + #[codec(index = 3)] + V3(runtime_types::xcm::v3::Xcm), + } + } + } +} diff --git a/relays/client-westend/src/lib.rs b/relays/client-westend/src/lib.rs index 523accbfdbf53591c8596aaad19a08b208abd497..789599bbb1d299eca047ec93aa16effd9627c171 100644 --- a/relays/client-westend/src/lib.rs +++ b/relays/client-westend/src/lib.rs @@ -16,20 +16,35 @@ //! Types used to connect to the Westend chain. +pub mod codegen_runtime; + +use bp_polkadot_core::SuffixedCommonSignedExtensionExt; use bp_westend::WESTEND_SYNCED_HEADERS_GRANDPA_INFO_METHOD; +use codec::Encode; use relay_substrate_client::{ - Chain, ChainWithBalances, ChainWithGrandpa, RelayChain, UnderlyingChainProvider, + Chain, ChainWithBalances, ChainWithGrandpa, ChainWithTransactions, Error as SubstrateError, + RelayChain, SignParam, UnderlyingChainProvider, UnsignedTransaction, }; -use sp_core::storage::StorageKey; +use sp_core::{storage::StorageKey, Pair}; +use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount, MultiAddress}; use sp_session::MembershipProof; use std::time::Duration; +pub use codegen_runtime::api::runtime_types; + +pub type RuntimeCall = runtime_types::westend_runtime::RuntimeCall; + +pub type GrandpaCall = runtime_types::pallet_grandpa::pallet::Call; + /// Westend header id. pub type HeaderId = relay_utils::HeaderId; /// Westend header type used in headers sync. pub type SyncHeader = relay_substrate_client::SyncHeader; +/// The address format for describing accounts. +pub type Address = MultiAddress; + /// Westend chain definition #[derive(Debug, Clone, Copy)] pub struct Westend; @@ -45,7 +60,7 @@ impl Chain for Westend { const AVERAGE_BLOCK_INTERVAL: Duration = Duration::from_secs(6); type SignedBlock = bp_westend::SignedBlock; - type Call = (); + type Call = RuntimeCall; } impl ChainWithGrandpa for Westend { @@ -57,8 +72,6 @@ impl ChainWithGrandpa for Westend { impl RelayChain for Westend { const PARAS_PALLET_NAME: &'static str = bp_westend::PARAS_PALLET_NAME; - const PARACHAINS_FINALITY_PALLET_NAME: &'static str = - bp_westend::WITH_WESTEND_BRIDGE_PARAS_PALLET_NAME; } impl ChainWithBalances for Westend { @@ -67,22 +80,53 @@ impl ChainWithBalances for Westend { } } -/// `AssetHubWestend` parachain definition -#[derive(Debug, Clone, Copy)] -pub struct AssetHubWestend; +impl ChainWithTransactions for Westend { + type AccountKeyPair = sp_core::sr25519::Pair; + type SignedTransaction = + bp_polkadot_core::UncheckedExtrinsic; + + fn sign_transaction( + param: SignParam, + unsigned: UnsignedTransaction, + ) -> Result { + let raw_payload = SignedPayload::new( + unsigned.call, + bp_westend::SignedExtension::from_params( + param.spec_version, + param.transaction_version, + unsigned.era, + param.genesis_hash, + unsigned.nonce, + unsigned.tip, + ((), ()), + ), + )?; + + let signature = raw_payload.using_encoded(|payload| param.signer.sign(payload)); + let signer: sp_runtime::MultiSigner = param.signer.public().into(); + let (call, extra, _) = raw_payload.deconstruct(); + + Ok(Self::SignedTransaction::new_signed( + call, + signer.into_account().into(), + signature.into(), + extra, + )) + } -impl UnderlyingChainProvider for AssetHubWestend { - type Chain = bp_westend::AssetHubWestend; -} + fn is_signed(tx: &Self::SignedTransaction) -> bool { + tx.signature.is_some() + } -// AssetHubWestend seems to use the same configuration as all Polkadot-like chains, so we'll use -// Westend primitives here. -impl Chain for AssetHubWestend { - const NAME: &'static str = "AssetHubWestend"; - const BEST_FINALIZED_HEADER_ID_METHOD: &'static str = - bp_westend::BEST_FINALIZED_ASSETHUBWESTEND_HEADER_METHOD; - const AVERAGE_BLOCK_INTERVAL: Duration = Duration::from_secs(6); + fn is_signed_by(signer: &Self::AccountKeyPair, tx: &Self::SignedTransaction) -> bool { + tx.signature + .as_ref() + .map(|(address, _, _)| *address == Address::Id(signer.public().into())) + .unwrap_or(false) + } - type SignedBlock = bp_westend::SignedBlock; - type Call = (); + fn parse_transaction(tx: Self::SignedTransaction) -> Option> { + let extra = &tx.signature.as_ref()?.2; + Some(UnsignedTransaction::new(tx.function, extra.nonce()).tip(extra.tip())) + } } diff --git a/relays/client-wococo/Cargo.toml b/relays/client-wococo/Cargo.toml deleted file mode 100644 index 49bb5ec5f53eeb74f649f011c7922b50fd4e52c3..0000000000000000000000000000000000000000 --- a/relays/client-wococo/Cargo.toml +++ /dev/null @@ -1,23 +0,0 @@ -[package] -name = "relay-wococo-client" -version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2021" -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" - -[dependencies] -codec = { package = "parity-scale-codec", version = "3.1.5", features = ["derive"] } - -# Bridge dependencies - -bp-polkadot-core = { path = "../../primitives/polkadot-core" } -bp-wococo = { path = "../../primitives/chain-wococo" } - -relay-rococo-client = { path = "../client-rococo" } -relay-substrate-client = { path = "../client-substrate" } -relay-utils = { path = "../utils" } - -# Substrate Dependencies -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } diff --git a/relays/client-wococo/src/lib.rs b/relays/client-wococo/src/lib.rs deleted file mode 100644 index 7308f07a2b389bfa5e2801f17319189f4efc6eb6..0000000000000000000000000000000000000000 --- a/relays/client-wococo/src/lib.rs +++ /dev/null @@ -1,132 +0,0 @@ -// 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 . - -//! Types used to connect to the Wococo-Substrate chain. - -use bp_polkadot_core::SuffixedCommonSignedExtensionExt; -use bp_wococo::WOCOCO_SYNCED_HEADERS_GRANDPA_INFO_METHOD; -use codec::Encode; -use relay_substrate_client::{ - Chain, ChainWithBalances, ChainWithGrandpa, ChainWithTransactions, Error as SubstrateError, - RelayChain, SignParam, UnderlyingChainProvider, UnsignedTransaction, -}; -use sp_core::{storage::StorageKey, Pair}; -use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount, MultiAddress}; -use sp_session::MembershipProof; -use std::time::Duration; - -pub use codegen_runtime::api::runtime_types; -use relay_rococo_client::codegen_runtime; - -pub type RuntimeCall = runtime_types::rococo_runtime::RuntimeCall; - -pub type GrandpaCall = runtime_types::pallet_grandpa::pallet::Call; - -/// Wococo header id. -pub type HeaderId = relay_utils::HeaderId; - -/// Wococo header type used in headers sync. -pub type SyncHeader = relay_substrate_client::SyncHeader; - -/// The address format for describing accounts. -pub type Address = MultiAddress; - -/// Wococo chain definition -#[derive(Debug, Clone, Copy)] -pub struct Wococo; - -impl UnderlyingChainProvider for Wococo { - type Chain = bp_wococo::Wococo; -} - -impl Chain for Wococo { - const NAME: &'static str = "Wococo"; - const BEST_FINALIZED_HEADER_ID_METHOD: &'static str = - bp_wococo::BEST_FINALIZED_WOCOCO_HEADER_METHOD; - const AVERAGE_BLOCK_INTERVAL: Duration = Duration::from_secs(6); - - type SignedBlock = bp_wococo::SignedBlock; - type Call = RuntimeCall; -} - -impl ChainWithGrandpa for Wococo { - const SYNCED_HEADERS_GRANDPA_INFO_METHOD: &'static str = - WOCOCO_SYNCED_HEADERS_GRANDPA_INFO_METHOD; - - type KeyOwnerProof = MembershipProof; -} - -impl ChainWithBalances for Wococo { - fn account_info_storage_key(account_id: &Self::AccountId) -> StorageKey { - bp_wococo::AccountInfoStorageMapKeyProvider::final_key(account_id) - } -} - -impl RelayChain for Wococo { - const PARAS_PALLET_NAME: &'static str = bp_wococo::PARAS_PALLET_NAME; - const PARACHAINS_FINALITY_PALLET_NAME: &'static str = "BridgeWococoParachain"; -} - -impl ChainWithTransactions for Wococo { - type AccountKeyPair = sp_core::sr25519::Pair; - type SignedTransaction = - bp_polkadot_core::UncheckedExtrinsic; - - fn sign_transaction( - param: SignParam, - unsigned: UnsignedTransaction, - ) -> Result { - let raw_payload = SignedPayload::new( - unsigned.call, - bp_wococo::SignedExtension::from_params( - param.spec_version, - param.transaction_version, - unsigned.era, - param.genesis_hash, - unsigned.nonce, - unsigned.tip, - ((), ()), - ), - )?; - - let signature = raw_payload.using_encoded(|payload| param.signer.sign(payload)); - let signer: sp_runtime::MultiSigner = param.signer.public().into(); - let (call, extra, _) = raw_payload.deconstruct(); - - Ok(Self::SignedTransaction::new_signed( - call, - signer.into_account().into(), - signature.into(), - extra, - )) - } - - fn is_signed(tx: &Self::SignedTransaction) -> bool { - tx.signature.is_some() - } - - fn is_signed_by(signer: &Self::AccountKeyPair, tx: &Self::SignedTransaction) -> bool { - tx.signature - .as_ref() - .map(|(address, _, _)| *address == Address::Id(signer.public().into())) - .unwrap_or(false) - } - - fn parse_transaction(tx: Self::SignedTransaction) -> Option> { - let extra = &tx.signature.as_ref()?.2; - Some(UnsignedTransaction::new(tx.function, extra.nonce()).tip(extra.tip())) - } -} diff --git a/relays/equivocation/Cargo.toml b/relays/equivocation/Cargo.toml index d14177bacec8c70ea9d91ab26a9137a23e39ed2e..2cc41dd60ec23a24b78f4e346b954ad66b3a9446 100644 --- a/relays/equivocation/Cargo.toml +++ b/relays/equivocation/Cargo.toml @@ -6,13 +6,16 @@ edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" description = "Equivocation detector" +[lints] +workspace = true + [dependencies] async-std = { version = "1.6.5", features = ["attributes"] } async-trait = "0.1" bp-header-chain = { path = "../../primitives/header-chain" } finality-relay = { path = "../finality" } frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -futures = "0.3.29" +futures = "0.3.30" log = "0.4.20" num-traits = "0.2" relay-utils = { path = "../utils" } diff --git a/relays/finality/Cargo.toml b/relays/finality/Cargo.toml index 725ac5386b1b45f6d111b7fc762f26fb9f12f511..1f2173630e08b32dcaf4abd632127f084abe667d 100644 --- a/relays/finality/Cargo.toml +++ b/relays/finality/Cargo.toml @@ -6,12 +6,15 @@ edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" description = "Finality proofs relay" +[lints] +workspace = true + [dependencies] async-std = "1.6.5" async-trait = "0.1" backoff = "0.4" bp-header-chain = { path = "../../primitives/header-chain" } -futures = "0.3.29" +futures = "0.3.30" log = "0.4.20" num-traits = "0.2" relay-utils = { path = "../utils" } diff --git a/relays/finality/README.md b/relays/finality/README.md index 444056e756303f29ec0a57948df60f295c90c8dd..0a8d6a4c8b128825f7ee3bdec9cf812bea317436 100644 --- a/relays/finality/README.md +++ b/relays/finality/README.md @@ -38,21 +38,21 @@ with mandatory headers are fee-free, the cost of running such relay is zero (in ## Finality Relay Metrics Finality relay provides several metrics. Metrics names depend on names of source and target chains. The list below -shows metrics names for Rialto (source chain) to Millau (target chain) finality relay. For other chains, simply -change chain names. So the metrics are: +shows metrics names for Rococo (source chain) to BridgeHubWestend (target chain) finality relay. For other +chains, simply change chain names. So the metrics are: -- `Rialto_to_Millau_Sync_best_source_block_number` - returns best finalized source chain (Rialto) block number, known +- `Rococo_to_BridgeHubWestend_Sync_best_source_block_number` - returns best finalized source chain (Rococo) block number, known to the relay. If relay is running in [on-demand mode](../bin-substrate/src/cli/relay_headers_and_messages/), the number may not match (it may be far behind) the actual best finalized number; -- `Rialto_to_Millau_Sync_best_source_at_target_block_number` - returns best finalized source chain (Rialto) block +- `Rococo_to_BridgeHubWestend_Sync_best_source_at_target_block_number` - returns best finalized source chain (Rococo) block number that is known to the bridge GRANDPA pallet at the target chain. -- `Rialto_to_Millau_Sync_is_source_and_source_at_target_using_different_forks` - if this metrics is set to `1`, then +- `Rococo_to_BridgeHubWestend_Sync_is_source_and_source_at_target_using_different_forks` - if this metrics is set to `1`, then the best source chain header, known to the target chain doesn't match the same-number-header at the source chain. It means that the GRANDPA validators set has crafted the duplicate justification and it has been submitted to the target chain. Normally (if majority of validators are honest and if you're running finality relay without large breaks) this shall not happen and the metric will have `0` value. -If relay operates properly, you should see that the `Rialto_to_Millau_Sync_best_source_at_target_block_number` -tries to reach the `Rialto_to_Millau_Sync_best_source_block_number`. And the latter one always increases. +If relay operates properly, you should see that the `Rococo_to_BridgeHubWestend_Sync_best_source_at_target_block_number` +tries to reach the `Rococo_to_BridgeHubWestend_Sync_best_source_block_number`. And the latter one always increases. diff --git a/relays/lib-substrate-relay/Cargo.toml b/relays/lib-substrate-relay/Cargo.toml index 6fe3c02cbca82effc8108f6c370b43a55cd96ae8..732ee768393cd97c7f36b23ebadca91700125dca 100644 --- a/relays/lib-substrate-relay/Cargo.toml +++ b/relays/lib-substrate-relay/Cargo.toml @@ -5,13 +5,16 @@ authors = ["Parity Technologies "] edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] anyhow = "1.0" -thiserror = "1.0.50" +thiserror = "1.0.56" async-std = "1.9.0" async-trait = "0.1" codec = { package = "parity-scale-codec", version = "3.1.5" } -futures = "0.3.29" +futures = "0.3.30" hex = "0.4" num-traits = "0.2" log = "0.4.20" @@ -50,12 +53,8 @@ sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", bra sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } [dev-dependencies] -bp-rialto = { path = "../../primitives/chain-rialto" } -bp-rialto-parachain = { path = "../../primitives/chain-rialto-parachain" } bp-rococo = { path = "../../primitives/chain-rococo" } -bp-wococo = { path = "../../primitives/chain-wococo" } pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -relay-rialto-client = { path = "../client-rialto" } +relay-bridge-hub-rococo-client = { path = "../client-bridge-hub-rococo" } +relay-bridge-hub-westend-client = { path = "../client-bridge-hub-westend" } relay-rococo-client = { path = "../client-rococo" } -relay-wococo-client = { path = "../client-wococo" } -rialto-runtime = { path = "../../bin/rialto/runtime" } diff --git a/relays/lib-substrate-relay/src/equivocation/mod.rs b/relays/lib-substrate-relay/src/equivocation/mod.rs index 0c7b6dc9dc44776d3896f73f010e616e8b059010..d07f5eea0849a754820c83dd346539d4d41f29a4 100644 --- a/relays/lib-substrate-relay/src/equivocation/mod.rs +++ b/relays/lib-substrate-relay/src/equivocation/mod.rs @@ -67,6 +67,20 @@ pub trait SubstrateEquivocationDetectionPipeline: { /// How the `report_equivocation` call is built ? type ReportEquivocationCallBuilder: ReportEquivocationCallBuilder; + + /// Add relay guards if required. + async fn start_relay_guards( + source_client: &impl Client, + enable_version_guard: bool, + ) -> relay_substrate_client::Result<()> { + if enable_version_guard { + relay_substrate_client::guard::abort_on_spec_version_change( + source_client.clone(), + source_client.simple_runtime_version().await?.spec_version, + ); + } + Ok(()) + } } type FinalityProoffOf

= <

::FinalityEngine as Engine< diff --git a/relays/lib-substrate-relay/src/finality/mod.rs b/relays/lib-substrate-relay/src/finality/mod.rs index 28f52de25e6755a96d0bf71a5bf718a5fdb62d0e..753648d34e21c0b31973cdd2e505e867ffcb1789 100644 --- a/relays/lib-substrate-relay/src/finality/mod.rs +++ b/relays/lib-substrate-relay/src/finality/mod.rs @@ -76,10 +76,15 @@ pub trait SubstrateFinalitySyncPipeline: BaseSubstrateFinalitySyncPipeline { /// Add relay guards if required. async fn start_relay_guards( - _target_client: &impl Client, - _transaction_params: &TransactionParams>, - _enable_version_guard: bool, + target_client: &impl Client, + enable_version_guard: bool, ) -> relay_substrate_client::Result<()> { + if enable_version_guard { + relay_substrate_client::guard::abort_on_spec_version_change( + target_client.clone(), + target_client.simple_runtime_version().await?.spec_version, + ); + } Ok(()) } } diff --git a/relays/lib-substrate-relay/src/finality_base/engine.rs b/relays/lib-substrate-relay/src/finality_base/engine.rs index f3ddd1085956d1f76d1ee05cbf7e9460e9cfd255..b18cd0715aaaab9d77fc3cdbe482dee0171bcaec 100644 --- a/relays/lib-substrate-relay/src/finality_base/engine.rs +++ b/relays/lib-substrate-relay/src/finality_base/engine.rs @@ -23,8 +23,9 @@ use bp_header_chain::{ verify_and_optimize_justification, GrandpaEquivocationsFinder, GrandpaJustification, JustificationVerificationContext, }, - AuthoritySet, ConsensusLogReader, FinalityProof, FindEquivocations, GrandpaConsensusLogReader, - HeaderFinalityInfo, HeaderGrandpaInfo, StoredHeaderGrandpaInfo, + max_expected_submit_finality_proof_arguments_size, AuthoritySet, ConsensusLogReader, + FinalityProof, FindEquivocations, GrandpaConsensusLogReader, HeaderFinalityInfo, + HeaderGrandpaInfo, StoredHeaderGrandpaInfo, }; use bp_runtime::{BasicOperatingMode, HeaderIdProvider, OperatingMode}; use codec::{Decode, Encode}; @@ -36,9 +37,22 @@ use relay_substrate_client::{ }; use sp_consensus_grandpa::{AuthorityList as GrandpaAuthoritiesSet, GRANDPA_ENGINE_ID}; use sp_core::{storage::StorageKey, Bytes}; -use sp_runtime::{scale_info::TypeInfo, traits::Header, ConsensusEngineId}; +use sp_runtime::{scale_info::TypeInfo, traits::Header, ConsensusEngineId, SaturatedConversion}; use std::{fmt::Debug, marker::PhantomData}; +/// Result of checking maximal expected call size. +pub enum MaxExpectedCallSizeCheck { + /// Size is ok and call will be refunded. + Ok, + /// The call size exceeds the maximal expected and relayer will only get partial refund. + Exceeds { + /// Actual call size. + call_size: u32, + /// Maximal expected call size. + max_call_size: u32, + }, +} + /// Finality engine, used by the Substrate chain. #[async_trait] pub trait Engine: Send { @@ -111,6 +125,14 @@ pub trait Engine: Send { proof: &mut Self::FinalityProof, ) -> Result<(), SubstrateError>; + /// Checks whether the given `header` and its finality `proof` fit the maximal expected + /// call size limit. If result is `MaxExpectedCallSizeCheck::Exceeds { .. }`, this + /// submission won't be fully refunded and relayer will spend its own funds on that. + fn check_max_expected_call_size( + header: &C::Header, + proof: &Self::FinalityProof, + ) -> MaxExpectedCallSizeCheck; + /// Prepare initialization data for the finality bridge pallet. async fn prepare_initialization_data( client: impl Client, @@ -216,7 +238,7 @@ impl Engine for Grandpa { ) .map_err(|e| { SubstrateError::Custom(format!( - "Failed to optimize {} GRANDPA jutification for header {:?}: {:?}", + "Failed to optimize {} GRANDPA justification for header {:?}: {:?}", C::NAME, header.id(), e, @@ -224,6 +246,24 @@ impl Engine for Grandpa { }) } + fn check_max_expected_call_size( + header: &C::Header, + proof: &Self::FinalityProof, + ) -> MaxExpectedCallSizeCheck { + let is_mandatory = Self::ConsensusLogReader::schedules_authorities_change(header.digest()); + let call_size: u32 = + header.encoded_size().saturating_add(proof.encoded_size()).saturated_into(); + let max_call_size = max_expected_submit_finality_proof_arguments_size::( + is_mandatory, + proof.commit.precommits.len().saturated_into(), + ); + if call_size > max_call_size { + MaxExpectedCallSizeCheck::Exceeds { call_size, max_call_size } + } else { + MaxExpectedCallSizeCheck::Ok + } + } + /// Prepare initialization data for the GRANDPA verifier pallet. async fn prepare_initialization_data( source_client: impl Client, diff --git a/relays/lib-substrate-relay/src/lib.rs b/relays/lib-substrate-relay/src/lib.rs index 068c5ceccf39cdab8214f831e7eb75eb65b2f8cc..eef06519b997757b3dd4f3ae0530eca6bf1f2fcb 100644 --- a/relays/lib-substrate-relay/src/lib.rs +++ b/relays/lib-substrate-relay/src/lib.rs @@ -42,21 +42,8 @@ pub struct TransactionParams { /// Tagged relay account, which balance may be exposed as metrics by the relay. #[derive(Clone, Debug)] pub enum TaggedAccount { - /// Account, used to sign headers relay transactions from given bridged chain. - Headers { - /// Account id. - id: AccountId, - /// Name of the bridged chain, which headers are relayed. - bridged_chain: String, - }, - /// Account, used to sign parachains relay transactions from given bridged relay chain. - Parachains { - /// Account id. - id: AccountId, - /// Name of the bridged relay chain with parachain heads. - bridged_chain: String, - }, - /// Account, used to sign message relay transactions from given bridged chain. + /// Account, used to sign message (also headers and parachains) relay transactions from given + /// bridged chain. Messages { /// Account id. id: AccountId, @@ -69,8 +56,6 @@ impl TaggedAccount { /// Returns reference to the account id. pub fn id(&self) -> &AccountId { match *self { - TaggedAccount::Headers { ref id, .. } => id, - TaggedAccount::Parachains { ref id, .. } => id, TaggedAccount::Messages { ref id, .. } => id, } } @@ -78,10 +63,6 @@ impl TaggedAccount { /// Returns stringified account tag. pub fn tag(&self) -> String { match *self { - TaggedAccount::Headers { ref bridged_chain, .. } => format!("{bridged_chain}Headers"), - TaggedAccount::Parachains { ref bridged_chain, .. } => { - format!("{bridged_chain}Parachains") - }, TaggedAccount::Messages { ref bridged_chain, .. } => { format!("{bridged_chain}Messages") }, diff --git a/relays/lib-substrate-relay/src/messages/mod.rs b/relays/lib-substrate-relay/src/messages/mod.rs index e0d6b8012296c15be8eaeea33d753c14f3176570..b53af8bc87c9d08e9422ed906aba56b54192b5f1 100644 --- a/relays/lib-substrate-relay/src/messages/mod.rs +++ b/relays/lib-substrate-relay/src/messages/mod.rs @@ -197,8 +197,6 @@ where { // 2/3 is reserved for proofs and tx overhead let max_messages_size_in_single_batch = P::TargetChain::max_extrinsic_size() / 3; - // we don't know exact weights of the Polkadot runtime. So to guess weights we'll be using - // weights from Rialto and then simply dividing it by x2. let limits = match params.limits { Some(limits) => limits, None => diff --git a/relays/lib-substrate-relay/src/messages/source.rs b/relays/lib-substrate-relay/src/messages/source.rs index 2c360c2488a38cc8083d50cacdee3f21aec8ce1f..e2fdb67237b5dcf403b14d4a99acc587cef8a4f2 100644 --- a/relays/lib-substrate-relay/src/messages/source.rs +++ b/relays/lib-substrate-relay/src/messages/source.rs @@ -577,9 +577,8 @@ fn split_msgs_to_refine( mod tests { use super::*; use bp_runtime::Chain as ChainBase; - use relay_rialto_client::Rialto; - use relay_rococo_client::Rococo; - use relay_wococo_client::Wococo; + use relay_bridge_hub_rococo_client::BridgeHubRococo; + use relay_bridge_hub_westend_client::BridgeHubWestend; fn message_details_from_rpc( nonces: RangeInclusive, @@ -596,16 +595,20 @@ mod tests { #[test] fn validate_out_msgs_details_succeeds_if_no_messages_are_missing() { - assert!( - validate_out_msgs_details::(&message_details_from_rpc(1..=3), 1..=3,).is_ok() - ); + assert!(validate_out_msgs_details::( + &message_details_from_rpc(1..=3), + 1..=3, + ) + .is_ok()); } #[test] fn validate_out_msgs_details_succeeds_if_head_messages_are_missing() { - assert!( - validate_out_msgs_details::(&message_details_from_rpc(2..=3), 1..=3,).is_ok() + assert!(validate_out_msgs_details::( + &message_details_from_rpc(2..=3), + 1..=3, ) + .is_ok()) } #[test] @@ -613,7 +616,7 @@ mod tests { let mut message_details_from_rpc = message_details_from_rpc(1..=3); message_details_from_rpc.remove(1); assert!(matches!( - validate_out_msgs_details::(&message_details_from_rpc, 1..=3,), + validate_out_msgs_details::(&message_details_from_rpc, 1..=3,), Err(SubstrateError::Custom(_)) )); } @@ -621,7 +624,7 @@ mod tests { #[test] fn validate_out_msgs_details_map_fails_if_tail_messages_are_missing() { assert!(matches!( - validate_out_msgs_details::(&message_details_from_rpc(1..=2), 1..=3,), + validate_out_msgs_details::(&message_details_from_rpc(1..=2), 1..=3,), Err(SubstrateError::Custom(_)) )); } @@ -629,7 +632,7 @@ mod tests { #[test] fn validate_out_msgs_details_fails_if_all_messages_are_missing() { assert!(matches!( - validate_out_msgs_details::(&[], 1..=3), + validate_out_msgs_details::(&[], 1..=3), Err(SubstrateError::Custom(_)) )); } @@ -637,7 +640,7 @@ mod tests { #[test] fn validate_out_msgs_details_fails_if_more_messages_than_nonces() { assert!(matches!( - validate_out_msgs_details::(&message_details_from_rpc(1..=5), 2..=5,), + validate_out_msgs_details::(&message_details_from_rpc(1..=5), 2..=5,), Err(SubstrateError::Custom(_)) )); } @@ -663,8 +666,10 @@ mod tests { msgs_to_refine.push((payload, out_msg_details)); } - let maybe_batches = - split_msgs_to_refine::(LaneId::new(1, 2), msgs_to_refine); + let maybe_batches = split_msgs_to_refine::( + Default::default(), + msgs_to_refine, + ); match expected_batches { Ok(expected_batches) => { let batches = maybe_batches.unwrap(); @@ -686,7 +691,7 @@ mod tests { #[test] fn test_split_msgs_to_refine() { - let max_extrinsic_size = Rococo::max_extrinsic_size() as usize; + let max_extrinsic_size = BridgeHubRococo::max_extrinsic_size() as usize; // Check that an error is returned when one of the messages is too big. check_split_msgs_to_refine(vec![max_extrinsic_size], Err(())); diff --git a/relays/lib-substrate-relay/src/on_demand/headers.rs b/relays/lib-substrate-relay/src/on_demand/headers.rs index ac88f43204983f064e91f4525bec275a80b80477..fbab3c8a77ab4279da39eb677ede8de0ac4e020f 100644 --- a/relays/lib-substrate-relay/src/on_demand/headers.rs +++ b/relays/lib-substrate-relay/src/on_demand/headers.rs @@ -16,14 +16,16 @@ //! On-demand Substrate -> Substrate header finality relay. -use crate::finality::SubmitFinalityProofCallBuilder; +use crate::{ + finality::SubmitFinalityProofCallBuilder, finality_base::engine::MaxExpectedCallSizeCheck, +}; use async_std::sync::{Arc, Mutex}; use async_trait::async_trait; use bp_header_chain::ConsensusLogReader; use bp_runtime::HeaderIdProvider; use futures::{select, FutureExt}; -use num_traits::{One, Zero}; +use num_traits::{One, Saturating, Zero}; use sp_runtime::traits::Header; use finality_relay::{FinalitySyncParams, TargetClient as FinalityTargetClient}; @@ -142,30 +144,61 @@ impl< &self, required_header: BlockNumberOf, ) -> Result<(HeaderIdOf, Vec>), SubstrateError> { - // first find proper header (either `required_header`) or its descendant - let finality_source = - SubstrateFinalitySource::::new(self.source_client.clone(), None); - let (header, mut proof) = finality_source.prove_block_finality(required_header).await?; - let header_id = header.id(); + const MAX_ITERATIONS: u32 = 4; + let mut iterations = 0; + let mut current_required_header = required_header; + loop { + // first find proper header (either `current_required_header`) or its descendant + let finality_source = + SubstrateFinalitySource::::new(self.source_client.clone(), None); + let (header, mut proof) = + finality_source.prove_block_finality(current_required_header).await?; + let header_id = header.id(); + + // optimize justification before including it into the call + P::FinalityEngine::optimize_proof(&self.target_client, &header, &mut proof).await?; + + // now we have the header and its proof, but we want to minimize our losses, so let's + // check if we'll get the full refund for submitting this header + let check_result = P::FinalityEngine::check_max_expected_call_size(&header, &proof); + if let MaxExpectedCallSizeCheck::Exceeds { call_size, max_call_size } = check_result { + iterations += 1; + current_required_header = header_id.number().saturating_add(One::one()); + if iterations < MAX_ITERATIONS { + log::debug!( + target: "bridge", + "[{}] Requested to prove {} head {:?}. Selected to prove {} head {:?}. But it is too large: {} vs {}. \ + Going to select next header", + self.relay_task_name, + P::SourceChain::NAME, + required_header, + P::SourceChain::NAME, + header_id, + call_size, + max_call_size, + ); - // optimize justification before including it into the call - P::FinalityEngine::optimize_proof(&self.target_client, &header, &mut proof).await?; + continue; + } + } - log::debug!( - target: "bridge", - "[{}] Requested to prove {} head {:?}. Selected to prove {} head {:?}", - self.relay_task_name, - P::SourceChain::NAME, - required_header, - P::SourceChain::NAME, - header_id, - ); + log::debug!( + target: "bridge", + "[{}] Requested to prove {} head {:?}. Selected to prove {} head {:?} (after {} iterations)", + self.relay_task_name, + P::SourceChain::NAME, + required_header, + P::SourceChain::NAME, + header_id, + iterations, + ); - // and then craft the submit-proof call - let call = - P::SubmitFinalityProofCallBuilder::build_submit_finality_proof_call(header, proof); + // and then craft the submit-proof call + let call = + P::SubmitFinalityProofCallBuilder::build_submit_finality_proof_call(header, proof); - Ok((header_id, vec![call])) + return Ok((header_id, vec![call])); + } } } diff --git a/relays/messages/Cargo.toml b/relays/messages/Cargo.toml index ccaed009a5ab4da902aedd87a05176858dfc8d5d..c03699b01eab9a594d07f9c6b6d458294cc9bad8 100644 --- a/relays/messages/Cargo.toml +++ b/relays/messages/Cargo.toml @@ -5,11 +5,14 @@ authors = ["Parity Technologies "] edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] async-std = { version = "1.6.5", features = ["attributes"] } async-trait = "0.1" -env_logger = "0.10" -futures = "0.3.29" +env_logger = "0.11" +futures = "0.3.30" hex = "0.4" log = "0.4.20" num-traits = "0.2" diff --git a/relays/parachains/Cargo.toml b/relays/parachains/Cargo.toml index 89aab19b4b55623de4758ecdbc5ea7e2fa559379..12d5d8e9281343a75e87d91eaa602bbb516c108a 100644 --- a/relays/parachains/Cargo.toml +++ b/relays/parachains/Cargo.toml @@ -5,10 +5,13 @@ authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] async-std = "1.6.5" -async-trait = "0.1.74" -futures = "0.3.29" +async-trait = "0.1" +futures = "0.3.30" log = "0.4.20" relay-utils = { path = "../utils" } diff --git a/relays/parachains/README.md b/relays/parachains/README.md index fc5ad03fb340df82fdf2ad2fffbe4b28369af26f..bacd28594d8076f352a0eadf0d1176b1aac672a4 100644 --- a/relays/parachains/README.md +++ b/relays/parachains/README.md @@ -35,15 +35,15 @@ transaction. Every parachain in Polkadot is identified by the 32-bit number. All metrics, exposed by the parachains finality relay have the `parachain` label, which is set to the parachain id. And the metrics are prefixed with the prefix, that depends on the name of the source relay and target chains. The list below shows metrics names for -Rialto (source relay chain) to Millau (target chain) parachains finality relay. For other chains, simply +Rococo (source relay chain) to BridgeHubWestend (target chain) parachains finality relay. For other chains, simply change chain names. So the metrics are: -- `Rialto_to_Millau_Parachains_best_parachain_block_number_at_source` - returns best known parachain block - number, registered in the `paras` pallet at the source relay chain (Rialto in our example); +- `Rococo_to_BridgeHubWestend_Parachains_best_parachain_block_number_at_source` - returns best known parachain block + number, registered in the `paras` pallet at the source relay chain (Rococo in our example); -- `Rialto_to_Millau_Parachains_best_parachain_block_number_at_target` - returns best known parachain block - number, registered in the bridge parachains pallet at the target chain (Millau in our example). +- `Rococo_to_BridgeHubWestend_Parachains_best_parachain_block_number_at_target` - returns best known parachain block + number, registered in the bridge parachains pallet at the target chain (BridgeHubWestend in our example). -If relay operates properly, you should see that the `Rialto_to_Millau_Parachains_best_parachain_block_number_at_target` -tries to reach the `Rialto_to_Millau_Parachains_best_parachain_block_number_at_source`. And the latter one +If relay operates properly, you should see that the `Rococo_to_BridgeHubWestend_Parachains_best_parachain_block_number_at_target` +tries to reach the `Rococo_to_BridgeHubWestend_Parachains_best_parachain_block_number_at_source`. And the latter one always increases. diff --git a/relays/utils/Cargo.toml b/relays/utils/Cargo.toml index e39cf8cdacbf7331b50398b441781520e21a274c..f68a3d2a3b213f39bef6ad5aeb37d038b8c3cbf2 100644 --- a/relays/utils/Cargo.toml +++ b/relays/utils/Cargo.toml @@ -5,6 +5,9 @@ authors = ["Parity Technologies "] edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +[lints] +workspace = true + [dependencies] ansi_term = "0.12" anyhow = "1.0" @@ -12,16 +15,16 @@ async-std = "1.6.5" async-trait = "0.1" backoff = "0.4" isahc = "1.2" -env_logger = "0.10.0" -futures = "0.3.29" +env_logger = "0.11.1" +futures = "0.3.30" jsonpath_lib = "0.3" log = "0.4.20" num-traits = "0.2" serde_json = "1.0" -sysinfo = "0.29" +sysinfo = "0.30" time = { version = "0.3", features = ["formatting", "local-offset", "std"] } -tokio = { version = "1.33", features = ["rt"] } -thiserror = "1.0.50" +tokio = { version = "1.36", features = ["rt"] } +thiserror = "1.0.56" # Bridge dependencies diff --git a/relays/utils/src/metrics/global.rs b/relays/utils/src/metrics/global.rs index f7d3e25c964793969455ebcf97ff0bb9314d1822..9b22fb86ef0cbf11268b80e7c0ac0d8c2d68d129 100644 --- a/relays/utils/src/metrics/global.rs +++ b/relays/utils/src/metrics/global.rs @@ -24,7 +24,7 @@ use crate::metrics::{ use async_std::sync::{Arc, Mutex}; use async_trait::async_trait; use std::time::Duration; -use sysinfo::{ProcessExt, RefreshKind, System, SystemExt}; +use sysinfo::{RefreshKind, System}; /// Global metrics update interval. const UPDATE_INTERVAL: Duration = Duration::from_secs(10); @@ -73,7 +73,7 @@ impl StandaloneMetric for GlobalMetrics { async fn update(&self) { // update system-wide metrics let mut system = self.system.lock().await; - let load = system.load_average(); + let load = sysinfo::System::load_average(); self.system_average_load.with_label_values(&["1min"]).set(load.one); self.system_average_load.with_label_values(&["5min"]).set(load.five); self.system_average_load.with_label_values(&["15min"]).set(load.fifteen); diff --git a/scripts/add_license.sh b/scripts/add_license.sh deleted file mode 100755 index 49864b47c05f883f83ea9b0388d5fa189e1c95ee..0000000000000000000000000000000000000000 --- a/scripts/add_license.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -PAT_GPL="^// Copyright.*If not, see \.$" -PAT_OTHER="^// Copyright" - -SCRIPTS_DIR=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) - -for f in $(find . -type f | egrep '\.(c|cpp|rs)$'); do - HEADER=$(head -16 $f) - if [[ $HEADER =~ $PAT_GPL ]]; then - BODY=$(tail -n +17 $f) - cat $SCRIPTS_DIR/license_header > temp - echo "$BODY" >> temp - mv temp $f - elif [[ $HEADER =~ $PAT_OTHER ]]; then - echo "Other license was found do nothing" - else - echo "$f was missing header" - cat $SCRIPTS_DIR/license_header $f > temp - mv temp $f - fi -done diff --git a/scripts/build-containers.sh b/scripts/build-containers.sh index b853b35f7f97d860bd5058956a3206d1e1ad3c55..cb87af7743f0843ea584b2dcd69c4942b12e55e3 100755 --- a/scripts/build-containers.sh +++ b/scripts/build-containers.sh @@ -3,12 +3,9 @@ set -eux if [ -z "${LOCAL:-}" ]; then time docker build . -t local/substrate-relay --build-arg=PROJECT=substrate-relay - time docker build . -t local/rialto-bridge-node --build-arg=PROJECT=rialto-bridge-node - time docker build . -t local/millau-bridge-node --build-arg=PROJECT=millau-bridge-node - time docker build . -t local/rialto-parachain-collator --build-arg=PROJECT=rialto-parachain-collator else if [ -z "${SKIP_BUILD:-}" ]; then - time cargo build -p substrate-relay -p rialto-bridge-node -p millau-bridge-node -p rialto-parachain-collator --release + time cargo build -p substrate-relay --release fi # (try to) use docker image matching the host os @@ -18,13 +15,4 @@ else DOCKER_BUILDKIT=1 time docker build . -f local.Dockerfile -t local/substrate-relay \ --build-arg=PROJECT=substrate-relay \ --build-arg=UBUNTU_RELEASE=${UBUNTU_RELEASE} - DOCKER_BUILDKIT=1 time docker build . -f local.Dockerfile -t local/rialto-bridge-node \ - --build-arg=PROJECT=rialto-bridge-node \ - --build-arg=UBUNTU_RELEASE=${UBUNTU_RELEASE} - DOCKER_BUILDKIT=1 time docker build . -f local.Dockerfile -t local/millau-bridge-node \ - --build-arg=PROJECT=millau-bridge-node \ - --build-arg=UBUNTU_RELEASE=${UBUNTU_RELEASE} - DOCKER_BUILDKIT=1 time docker build . -f local.Dockerfile -t local/rialto-parachain-collator \ - --build-arg=PROJECT=rialto-parachain-collator \ - --build-arg=UBUNTU_RELEASE=${UBUNTU_RELEASE} fi diff --git a/scripts/ci-cache.sh b/scripts/ci-cache.sh deleted file mode 100755 index 040d44fa74a0e7641b4135367807d77270d8b1ba..0000000000000000000000000000000000000000 --- a/scripts/ci-cache.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -set -xeu - -echo $CARGO_TARGET_DIR; -mkdir -p $CARGO_TARGET_DIR; -echo "Current Rust nightly version:"; -rustc +nightly --version; -echo "Cached Rust nightly version:"; -if [ ! -f $CARGO_TARGET_DIR/check_nightly_rust ]; then - echo "" > $CARGO_TARGET_DIR/check_nightly_rust; -fi -cat $CARGO_TARGET_DIR/check_nightly_rust; -if [[ $(cat $CARGO_TARGET_DIR/check_nightly_rust) == $(rustc +nightly --version) ]]; then - echo "The Rust nightly version has not changed"; -else - echo "The Rust nightly version has changed. Clearing the cache"; - rm -rf $CARGO_TARGET_DIR/*; -fi diff --git a/scripts/dump-logs.sh b/scripts/dump-logs.sh deleted file mode 100755 index 709a50658872bda25a050b68072c86a15c48c22f..0000000000000000000000000000000000000000 --- a/scripts/dump-logs.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -# A script to dump logs from selected important docker containers -# to make it easier to analyze locally. - -set -xeu - -DATE=$(date +"%Y-%m-%d-%T") -LOGS_DIR="${DATE//:/-}-logs" -mkdir $LOGS_DIR -cd $LOGS_DIR - -# From $ docker ps --format '{{.Names}}' - -SERVICES=(\ - deployments_relay-messages-millau-to-rialto-generator_1 \ - deployments_relay-messages-rialto-to-millau-generator_1 \ - deployments_relay-millau-rialto_1 \ - deployments_relay-headers-westend-to-millau-1_1 \ - deployments_relay-headers-westend-to-millau-2_1 \ - deployments_relay-parachains-westend-to-millau-1_1 \ - deployments_relay-parachains-westend-to-millau-1_2 \ - deployments_relay-messages-millau-to-rialto-parachain-generator_1 \ - deployments_relay-messages-rialto-parachain-to-millau-generator_1 \ - deployments_relay-millau-rialto-parachain-1_1 \ - deployments_relay-millau-rialto-parachain-2_1 \ - deployments_rialto-node-alice_1 \ - deployments_rialto-node-bob_1 \ - deployments_millau-node-alice_1 \ - deployments_millau-node-bob_1 \ - deployments_rialto-parachain-collator-alice_1 \ - deployments_rialto-parachain-collator-bob_1 \ - deployments_relay-messages-millau-to-rialto-resubmitter_1 \ - deployments_relay-messages-millau-to-rialto-parachain-resubmitter_1 \ -) - -for SVC in ${SERVICES[*]} -do - SHORT_NAME="${SVC//deployments_/}" - docker logs $SVC &> $SHORT_NAME.log | true -done - -cd - -tar cvjf $LOGS_DIR.tar.bz2 $LOGS_DIR diff --git a/scripts/license_header b/scripts/license_header deleted file mode 100644 index 66ef8f292f4699e15050903baf808ea5e8b54ea6..0000000000000000000000000000000000000000 --- a/scripts/license_header +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2019-2023 Parity Technologies (UK) Ltd. -// This file is part of Parity Bridges Common. - -// Parity Bridges Common is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity Bridges Common is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity Bridges Common. If not, see . - diff --git a/scripts/regenerate_runtimes.sh b/scripts/regenerate_runtimes.sh index 60b2878ff08a518db2d37df3a85dd1b36f99265a..700f4dc1c86e8d8dda4196c8f00aa8f77e45d6cd 100755 --- a/scripts/regenerate_runtimes.sh +++ b/scripts/regenerate_runtimes.sh @@ -2,15 +2,21 @@ cd tools/runtime-codegen cargo run --bin runtime-codegen -- --from-node-url "wss://rococo-bridge-hub-rpc.polkadot.io:443" > ../../relays/client-bridge-hub-rococo/src/codegen_runtime.rs -cargo run --bin runtime-codegen -- --from-node-url "http://localhost:20433" > ../../relays/client-rialto-parachain/src/codegen_runtime.rs cargo run --bin runtime-codegen -- --from-node-url "wss://rococo-rpc.polkadot.io:443" > ../../relays/client-rococo/src/codegen_runtime.rs +cargo run --bin runtime-codegen -- --from-node-url "wss://westend-rpc.polkadot.io:443" > ../../relays/client-westend/src/codegen_runtime.rs cargo run --bin runtime-codegen -- --from-node-url "wss://kusama-rpc.polkadot.io:443" > ../../relays/client-kusama/src/codegen_runtime.rs cargo run --bin runtime-codegen -- --from-node-url "wss://rpc.polkadot.io:443" > ../../relays/client-polkadot/src/codegen_runtime.rs -cd - -cargo fmt --all # Uncomment to update other runtimes +# For `polkadot-sdk` testnet runtimes: +# TODO: there is a bug, probably needs to update subxt, generates: `::sp_runtime::generic::Header<::core::primitive::u32>` withtout second `Hash` parameter. +# cargo run --bin runtime-codegen -- --from-wasm-file ../../../polkadot-sdk/target/release/wbuild/bridge-hub-rococo-runtime/bridge_hub_rococo_runtime.compact.compressed.wasm > ../../relays/client-bridge-hub-rococo/src/codegen_runtime.rs +# cargo run --bin runtime-codegen -- --from-wasm-file ../../../polkadot-sdk/target/release/wbuild/bridge-hub-westend-runtime/bridge_hub_westend_runtime.compact.compressed.wasm > ../../relays/client-bridge-hub-westend/src/codegen_runtime.rs + +cd - +cargo fmt --all + # Polkadot Bulletin Chain: # # git clone https://github.com/zdave-parity/polkadot-bulletin-chain.git diff --git a/scripts/send-message-from-millau-rialto.sh b/scripts/send-message-from-millau-rialto.sh deleted file mode 100755 index 1a736b4f8bd4ddbbfc78f7d2702fbb6092f6093d..0000000000000000000000000000000000000000 --- a/scripts/send-message-from-millau-rialto.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# Used for manually sending a message to a running network. -# -# You could for example spin up a full network using the Docker Compose files -# we have (to make sure the message relays are running), but remove the message -# generator service. From there you may submit messages manually using this script. - -# TODO: Fix demeo scripts https://github.com/paritytech/parity-bridges-common/issues/1406 - -MILLAU_PORT="${MILLAU_PORT:-9945}" - -RUST_LOG=runtime=trace,substrate-relay=trace,bridge=trace \ -./target/debug/substrate-relay send-message millau-to-rialto \ - --source-host localhost \ - --source-port $MILLAU_PORT \ - --source-signer //Alice \ - raw 030426020109020419a8 diff --git a/scripts/send-message-from-rialto-millau.sh b/scripts/send-message-from-rialto-millau.sh deleted file mode 100755 index 8133978f6ce53d3e9a92a1d13fb3fa890c863fe1..0000000000000000000000000000000000000000 --- a/scripts/send-message-from-rialto-millau.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# Used for manually sending a message to a running network. -# -# You could for example spin up a full network using the Docker Compose files -# we have (to make sure the message relays are running), but remove the message -# generator service. From there you may submit messages manually using this script. - -# TODO: Fix demeo scripts https://github.com/paritytech/parity-bridges-common/issues/1406 - -RIALTO_PORT="${RIALTO_PORT:-9944}" - -RUST_LOG=runtime=trace,substrate-relay=trace,bridge=trace \ -./target/debug/substrate-relay send-message rialto-to-millau \ - --source-host localhost \ - --source-port $RIALTO_PORT \ - --source-signer //Bob \ - raw 030426030109030419a8 diff --git a/scripts/update-weights-setup.sh b/scripts/update-weights-setup.sh deleted file mode 100644 index 72534423d63c41a09b676b99db49178c06ad1399..0000000000000000000000000000000000000000 --- a/scripts/update-weights-setup.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -set -exu - -# Set up the standardized machine and run `update-weights.sh` script. -# The system is assumed to be pristine Ubuntu 20.04 and we install -# all required dependencies. - -# To avoid interruptions you might want to run this script in `screen` cause it will take a while -# to finish. - -# We start off with upgrading the system -apt update && apt dist-upgrade - -# and installing `git` and other required deps. -apt install -y git clang curl libssl-dev llvm libudev-dev screen - -# Now we clone the repository -git clone https://github.com/paritytech/parity-bridges-common.git -cd parity-bridges-common - -# Install rustup & toolchain -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y - -# Source config -source ~/.cargo/env - -# Add nightly and WASM -rustup install nightly -rustup target add wasm32-unknown-unknown --toolchain nightly - -# Update the weights -./scripts/update-weights.sh diff --git a/scripts/update-weights.sh b/scripts/update-weights.sh deleted file mode 100755 index a969ba7ba621133ab30d7be3aec65cde4b2b7cfe..0000000000000000000000000000000000000000 --- a/scripts/update-weights.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh -# -# Runtime benchmarks for the `pallet-bridge-messages` and `pallet-bridge-grandpa` pallets. -# -# Run this script from root of the repo. -# Redirecting the output to a file gives much more consistent results -# e.g. `./scripts/update-weights.sh > /tmp/benchmarks 2>&1` - -set -eux - -# default (test) weights that we'll bundle with our pallets - -time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet \ - --chain=dev \ - --steps=50 \ - --repeat=20 \ - --pallet=pallet_bridge_messages \ - --extrinsic=* \ - --wasm-execution=Compiled \ - --heap-pages=4096 \ - --output=./modules/messages/src/weights.rs \ - --template=./.maintain/bridge-weight-template.hbs - -time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet \ - --chain=dev \ - --steps=50 \ - --repeat=20 \ - --pallet=pallet_bridge_grandpa \ - --extrinsic=* \ - --wasm-execution=Compiled \ - --heap-pages=4096 \ - --output=./modules/grandpa/src/weights.rs \ - --template=./.maintain/bridge-weight-template.hbs - -time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet \ - --chain=dev \ - --steps=50 \ - --repeat=20 \ - --pallet=pallet_bridge_parachains \ - --extrinsic=* \ - --wasm-execution=Compiled \ - --heap-pages=4096 \ - --output=./modules/parachains/src/weights.rs \ - --template=./.maintain/bridge-weight-template.hbs - -time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet \ - --chain=dev \ - --steps=50 \ - --repeat=20 \ - --pallet=pallet_bridge_relayers \ - --extrinsic=* \ - --wasm-execution=Compiled \ - --heap-pages=4096 \ - --output=./modules/relayers/src/weights.rs \ - --template=./.maintain/bridge-weight-template.hbs - -time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet \ - --chain=dev \ - --steps=50 \ - --repeat=20 \ - --pallet=pallet_xcm_bridge_hub_router \ - --extrinsic=* \ - --wasm-execution=Compiled \ - --heap-pages=4096 \ - --output=./modules/xcm_bridge_hub_router/src/weights.rs \ - --template=./.maintain/bridge-weight-template.hbs - -# weights for Millau runtime. We want to provide runtime weight overhead for messages calls, -# so we can't use "default" test weights directly - they'll be rejected by our integration tests. - -time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet \ - --chain=dev \ - --steps=50 \ - --repeat=20 \ - --pallet=pallet_bridge_messages \ - --extrinsic=* \ - --wasm-execution=Compiled \ - --heap-pages=4096 \ - --output=./bin/millau/runtime/src/weights/ - diff --git a/scripts/update_substrate.sh b/scripts/update_substrate.sh deleted file mode 100755 index f7715bda5d1c5623221669caedcb6a0e8465ac27..0000000000000000000000000000000000000000 --- a/scripts/update_substrate.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# One-liner to update between Substrate releases -# Usage: ./update_substrate.sh 2.0.0-rc6 2.0.0 -set -xeu - -OLD_VERSION=$1 -NEW_VERSION=$2 - -find . -type f -name 'Cargo.toml' -exec sed -i '' -e "s/$OLD_VERSION/$NEW_VERSION/g" {} \; diff --git a/scripts/verify-pallets-build.sh b/scripts/verify-pallets-build.sh index 849eb001a70bb36cf3520e18dd31a94a766aa659..e647eaca9716fb1540998d7a3c23ca188f93e0e1 100755 --- a/scripts/verify-pallets-build.sh +++ b/scripts/verify-pallets-build.sh @@ -61,20 +61,12 @@ trap revert_to_clean_state EXIT rm -rf $BRIDGES_FOLDER/.config rm -rf $BRIDGES_FOLDER/.github rm -rf $BRIDGES_FOLDER/.maintain -rm -rf $BRIDGES_FOLDER/bin/millau -rm -rf $BRIDGES_FOLDER/bin/rialto -rm -rf $BRIDGES_FOLDER/bin/rialto-parachain -rm -rf $BRIDGES_FOLDER/bin/.keep rm -rf $BRIDGES_FOLDER/deployments rm -f $BRIDGES_FOLDER/docs/dockerhub-* rm -rf $BRIDGES_FOLDER/fuzz rm -rf $BRIDGES_FOLDER/modules/beefy rm -rf $BRIDGES_FOLDER/modules/shift-session-manager rm -rf $BRIDGES_FOLDER/primitives/beefy -rm -rf $BRIDGES_FOLDER/primitives/chain-millau -rm -rf $BRIDGES_FOLDER/primitives/chain-rialto -rm -rf $BRIDGES_FOLDER/primitives/chain-rialto-parachain -rm -rf $BRIDGES_FOLDER/primitives/chain-westend rm -rf $BRIDGES_FOLDER/relays rm -rf $BRIDGES_FOLDER/scripts/add_license.sh rm -rf $BRIDGES_FOLDER/scripts/build-containers.sh @@ -82,8 +74,6 @@ rm -rf $BRIDGES_FOLDER/scripts/ci-cache.sh rm -rf $BRIDGES_FOLDER/scripts/dump-logs.sh rm -rf $BRIDGES_FOLDER/scripts/license_header rm -rf $BRIDGES_FOLDER/scripts/regenerate_runtimes.sh -rm -rf $BRIDGES_FOLDER/scripts/send-message-from-millau-rialto.sh -rm -rf $BRIDGES_FOLDER/scripts/send-message-from-rialto-millau.sh rm -rf $BRIDGES_FOLDER/scripts/update-weights.sh rm -rf $BRIDGES_FOLDER/scripts/update-weights-setup.sh rm -rf $BRIDGES_FOLDER/scripts/update_substrate.sh diff --git a/tools/runtime-codegen/Cargo.lock b/tools/runtime-codegen/Cargo.lock index a5107e299420ae15dae9b06ebe2caab7b2fd5982..57d5d2e353a5e249cb82b4e399aed639656668de 100644 --- a/tools/runtime-codegen/Cargo.lock +++ b/tools/runtime-codegen/Cargo.lock @@ -14,20 +14,20 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.17.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli 0.26.2", + "gimli 0.27.3", ] [[package]] name = "addr2line" -version = "0.19.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli 0.27.2", + "gimli 0.28.0", ] [[package]] @@ -36,38 +36,54 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "affix" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50e7ea84d3fa2009f355f8429a0b418a96849135a4188fadf384f59127d5d4bc" +dependencies = [ + "convert_case", +] + [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ "cfg-if", - "getrandom 0.2.9", + "getrandom 0.2.10", "once_cell", "version_check", + "zerocopy", ] [[package]] name = "aho-corasick" -version = "1.0.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -88,30 +104,29 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.1" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6342bd4f5a1205d7f41e94a41a901f5647c938cdfa96036338e8533c9d6c2450" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" dependencies = [ "utf8parse", ] @@ -127,9 +142,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -137,15 +152,302 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.70" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" + +[[package]] +name = "ark-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-bls12-377-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20c7021f180a0cbea0380eba97c2af3c57074cdaffe0eef7e840e1c9f2841e55" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-models-ext", + "ark-std", +] + +[[package]] +name = "ark-bls12-381" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-bls12-381-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1dc4b3d08f19e8ec06e949712f95b8361e43f1391d94f65e4234df03480631c" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-bw6-761" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e0605daf0cc5aa2034b78d008aaf159f56901d92a52ee4f6ecdfdac4f426700" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-bw6-761-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccee5fba47266f460067588ee1bf070a9c760bf2050c1c509982c5719aadb4f2" +dependencies = [ + "ark-bw6-761", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools", + "num-traits", + "rayon", + "zeroize", +] + +[[package]] +name = "ark-ed-on-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b10d901b9ac4b38f9c32beacedfadcdd64e46f8d7f8e88c1ae1060022cf6f6c6" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ed-on-bls12-377-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524a4fb7540df2e1a8c2e67a83ba1d1e6c3947f4f9342cc2359fc2e789ad731d" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ff", + "ark-models-ext", + "ark-std", +] + +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9cde0f2aa063a2a5c28d39b47761aa102bda7c13c84fc118a61b87c7b2f785c" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d15185f1acb49a07ff8cbe5f11a1adc5a93b19e211e325d826ae98e98e124346" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff", + "ark-models-ext", + "ark-std", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-models-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e9eab5d4b5ff2f228b763d38442adc9b084b0a465409b059fac5c2308835ec2" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-scale" +version = "0.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51bd73bb6ddb72630987d37fa963e99196896c0d0ea81b7c894567e74a2f83af" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "ark-secret-scalar" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=cbc342e#cbc342e95d3cbcd3c5ba8d45af7200eb58e63502" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "ark-transcript", + "digest 0.10.7", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", + "rayon", +] + +[[package]] +name = "ark-transcript" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=cbc342e#cbc342e95d3cbcd3c5ba8d45af7200eb58e63502" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "digest 0.10.7", + "rand_core 0.6.4", + "sha3", +] [[package]] name = "array-bytes" -version = "4.2.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" +checksum = "d9b1c5a481ec30a5abd8dfbd94ab5cf1bb4e9a66be7f1b3b322f2f1170c200fd" [[package]] name = "arrayref" @@ -161,28 +463,28 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "async-lock" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" dependencies = [ "event-listener", ] [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.38", ] [[package]] @@ -193,19 +495,48 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "addr2line 0.19.0", + "addr2line 0.21.0", "cc", "cfg-if", "libc", "miniz_oxide", - "object 0.30.3", + "object 0.32.1", "rustc-demangle", ] +[[package]] +name = "bandersnatch_vrfs" +version = "0.0.3" +source = "git+https://github.com/w3f/ring-vrf?rev=cbc342e#cbc342e95d3cbcd3c5ba8d45af7200eb58e63502" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff", + "ark-serialize", + "ark-std", + "dleq_vrf", + "fflonk", + "merlin 3.0.0", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "ring 0.1.0", + "sha2 0.10.8", + "sp-ark-bls12-381", + "sp-ark-ed-on-bls12-381-bandersnatch", + "zeroize", +] + +[[package]] +name = "base-x" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" + [[package]] name = "base64" version = "0.13.1" @@ -214,9 +545,15 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.0" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "beef" @@ -236,12 +573,37 @@ dependencies = [ "serde", ] +[[package]] +name = "bip39" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" +dependencies = [ + "bitcoin_hashes", + "rand 0.8.5", + "rand_core 0.6.4", + "serde", + "unicode-normalization", +] + +[[package]] +name = "bitcoin_hashes" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" + [[package]] name = "bitflags" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + [[package]] name = "bitvec" version = "1.0.1" @@ -260,17 +622,17 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", ] [[package]] name = "blake2b_simd" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", - "arrayvec 0.7.2", + "arrayvec 0.7.4", "constant_time_eq", ] @@ -315,9 +677,9 @@ dependencies = [ [[package]] name = "bounded-collections" -version = "0.1.5" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a071c348a5ef6da1d3a87166b408170b46002382b1dda83992b5c2208cefb370" +checksum = "ca548b6163b872067dc5eb82fd130c56881435e30367d2073594a3d9744120dd" dependencies = [ "log", "parity-scale-codec", @@ -327,15 +689,18 @@ dependencies = [ [[package]] name = "bs58" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "tinyvec", +] [[package]] name = "bumpalo" -version = "3.12.1" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b1ce199063694f33ffb7dd4e0ee620741495c32833cde5aa08f02a0bf96f0c8" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byte-slice-cast" @@ -351,23 +716,24 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -378,68 +744,55 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ + "android-tzdata", "iana-time-zone", - "num-integer", "num-traits", - "winapi", + "windows-targets 0.48.5", ] [[package]] name = "clap" -version = "4.2.4" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ac1f6381d8d82ab4684768f89c0ea3afe66925ceadb4eeb3fc452ffc55d62" +checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.2.4" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84080e799e54cff944f4b4a4b0e71630b0e0443b25b985175c7dddc1a859b749" +checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" dependencies = [ "anstream", "anstyle", - "bitflags", "clap_lex", - "once_cell", "strsim", ] [[package]] name = "clap_derive" -version = "4.2.0" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.38", ] [[package]] name = "clap_lex" -version = "0.4.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" - -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "color-eyre" @@ -474,11 +827,44 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +[[package]] +name = "common" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof#edd1e90b847e560bf60fc2e8712235ccfa11a9a9" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "fflonk", + "merlin 3.0.0", + "rand_chacha 0.3.1", +] + +[[package]] +name = "const-oid" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" + [[package]] name = "constant_time_eq" -version = "0.2.5" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" + +[[package]] +name = "constcat" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" +checksum = "cd7e35aee659887cbfb97aaf227ac12cad1a9d7c71e55ff3376839ed4e282d08" + +[[package]] +name = "convert_case" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb4a24b1aaf0fd0ce8b45161144d6f42cd91677fd5940fd431183eb023b3a2b8" [[package]] name = "core-foundation" @@ -496,6 +882,15 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +[[package]] +name = "core2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" +dependencies = [ + "memchr", +] + [[package]] name = "cpp_demangle" version = "0.3.5" @@ -507,37 +902,36 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] [[package]] name = "cranelift-bforest" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc42ba2e232e5b20ff7dc299a812d53337dadce9a7e39a238e6a5cb82d2e57b" +checksum = "1277fbfa94bc82c8ec4af2ded3e639d49ca5f7f3c7eeab2c66accd135ece4e70" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "253531aca9b6f56103c9420369db3263e784df39aa1c90685a1f69cfbba0623e" +checksum = "c6e8c31ad3b2270e9aeec38723888fe1b0ace3bea2b06b3f749ccf46661d3220" dependencies = [ - "arrayvec 0.7.2", "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", "cranelift-isle", - "gimli 0.26.2", - "hashbrown 0.12.3", + "gimli 0.27.3", + "hashbrown 0.13.2", "log", "regalloc2", "smallvec", @@ -546,33 +940,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f2154365e2bff1b1b8537a7181591fdff50d8e27fa6e40d5c69c3bad0ca7c8" +checksum = "c8ac5ac30d62b2d66f12651f6b606dbdfd9c2cfd0908de6b387560a277c5c9da" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "687e14e3f5775248930e0d5a84195abef8b829958e9794bf8d525104993612b4" +checksum = "dd82b8b376247834b59ed9bdc0ddeb50f517452827d4a11bccf5937b213748b8" [[package]] name = "cranelift-entity" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f42ea692c7b450ad18b8c9889661505d51c09ec4380cf1c2d278dbb2da22cae1" +checksum = "40099d38061b37e505e63f89bab52199037a72b931ad4868d9089ff7268660b0" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8483c2db6f45fe9ace984e5adc5d058102227e4c62e5aa2054e16b0275fd3a6e" +checksum = "64a25d9d0a0ae3079c463c34115ec59507b4707175454f0eee0891e83e30e82d" dependencies = [ "cranelift-codegen", "log", @@ -582,15 +976,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9793158837678902446c411741d87b43f57dadfb944f2440db4287cda8cbd59" +checksum = "80de6a7d0486e4acbd5f9f87ec49912bf4c8fb6aea00087b989685460d4469ba" [[package]] name = "cranelift-native" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72668c7755f2b880665cb422c8ad2d56db58a88b9bebfef0b73edc2277c13c49" +checksum = "bb6b03e0e03801c4b3fd8ce0758a94750c07a44e7944cc0ffbf0d3f2e7c79b00" dependencies = [ "cranelift-codegen", "libc", @@ -599,9 +993,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3852ce4b088b44ac4e29459573943009a70d1b192c8d77ef949b4e814f656fc1" +checksum = "ff3220489a3d928ad91e59dd7aeaa8b3de18afb554a6211213673a71c90737ac" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -622,16 +1016,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - [[package]] name = "crossbeam-deque" version = "0.8.3" @@ -645,22 +1029,22 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.8.0", + "memoffset 0.9.0", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] @@ -728,80 +1112,76 @@ dependencies = [ ] [[package]] -name = "cxx" -version = "1.0.94" +name = "curve25519-dalek" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "platforms", + "rustc_version", + "subtle", + "zeroize", ] [[package]] -name = "cxx-build" -version = "1.0.94" +name = "curve25519-dalek-derive" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ - "cc", - "codespan-reporting", - "once_cell", "proc-macro2", "quote", - "scratch", - "syn 2.0.15", + "syn 2.0.38", ] [[package]] -name = "cxxbridge-flags" -version = "1.0.94" +name = "data-encoding" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" +checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" [[package]] -name = "cxxbridge-macro" -version = "1.0.94" +name = "data-encoding-macro" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" +checksum = "c904b33cc60130e1aeea4956ab803d08a3f4a0ca82d64ed757afac3891f2bb99" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.15", + "data-encoding", + "data-encoding-macro-internal", ] [[package]] -name = "darling" -version = "0.14.4" +name = "data-encoding-macro-internal" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +checksum = "8fdf3fce3ce863539ec1d7fd1b6dcc3c645663376b43ed376bbf887733e4f772" dependencies = [ - "darling_core", - "darling_macro", + "data-encoding", + "syn 1.0.109", ] [[package]] -name = "darling_core" -version = "0.14.4" +name = "der" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 1.0.109", + "const-oid", + "zeroize", ] [[package]] -name = "darling_macro" -version = "0.14.4" +name = "derivative" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "darling_core", + "proc-macro2", "quote", "syn 1.0.109", ] @@ -837,9 +1217,9 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", "crypto-common", @@ -868,10 +1248,21 @@ dependencies = [ ] [[package]] -name = "downcast-rs" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +name = "dleq_vrf" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=cbc342e#cbc342e95d3cbcd3c5ba8d45af7200eb58e63502" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-scale", + "ark-secret-scalar", + "ark-serialize", + "ark-std", + "ark-transcript", + "arrayvec 0.7.4", + "rand_core 0.6.4", + "zeroize", +] [[package]] name = "dyn-clonable" @@ -896,28 +1287,30 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" [[package]] name = "ed25519" -version = "1.5.3" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ + "pkcs8", "signature", ] [[package]] name = "ed25519-dalek" -version = "1.0.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" dependencies = [ - "curve25519-dalek 3.2.0", + "curve25519-dalek 4.1.1", "ed25519", - "sha2 0.9.9", + "serde", + "sha2 0.10.8", "zeroize", ] @@ -937,9 +1330,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "env_logger" @@ -961,24 +1354,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" [[package]] -name = "errno" -version = "0.3.1" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", -] +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "errno" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" dependencies = [ - "cc", "libc", + "windows-sys 0.48.0", ] [[package]] @@ -989,15 +1377,15 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "expander" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f360349150728553f92e4c997a16af8915f418d3a0f21b440d34c5632f16ed84" +checksum = "5f86a749cf851891866c10515ef6c299b5c69661465e9c3bbe7e07a2b77fb0f7" dependencies = [ "blake2", "fs-err", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.38", ] [[package]] @@ -1022,6 +1410,25 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fflonk" +version = "0.1.0" +source = "git+https://github.com/w3f/fflonk#e141d4b6f42fb481aefe1b479788694945b6940d" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "merlin 3.0.0", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a481586acf778f1b1455424c343f71124b048ffa5f4fc3f8f6ae9dc432dcb3c7" + [[package]] name = "file-per-thread-logger" version = "0.1.6" @@ -1044,6 +1451,16 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "flate2" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + [[package]] name = "fnv" version = "1.0.7" @@ -1052,18 +1469,29 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] [[package]] name = "frame-metadata" -version = "15.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cf1549fba25a6fcac22785b61698317d958e96cac72a59102ea45b9ae64692" +dependencies = [ + "cfg-if", + "parity-scale-codec", + "scale-info", + "serde", +] + +[[package]] +name = "frame-metadata" +version = "16.0.0" +source = "git+https://github.com/paritytech/frame-metadata?branch=main#a07b2451b82809501fd797691046c1164f7e8840" dependencies = [ "cfg-if", "parity-scale-codec", @@ -1085,9 +1513,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" dependencies = [ "futures-channel", "futures-core", @@ -1100,9 +1528,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ "futures-core", "futures-sink", @@ -1110,15 +1538,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ "futures-core", "futures-task", @@ -1128,48 +1556,44 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.38", ] [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" [[package]] name = "futures-timer" version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" -dependencies = [ - "gloo-timers", - "send_wrapper", -] [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ "futures-channel", "futures-core", @@ -1224,9 +1648,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", @@ -1235,71 +1659,26 @@ dependencies = [ [[package]] name = "gimli" -version = "0.26.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" dependencies = [ "fallible-iterator", - "indexmap", + "indexmap 1.9.3", "stable_deref_trait", ] [[package]] name = "gimli" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" - -[[package]] -name = "gloo-net" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9902a044653b26b99f7e3693a42f171312d9be8b26b5697bd1e43ad1f8a35e10" -dependencies = [ - "futures-channel", - "futures-core", - "futures-sink", - "gloo-utils", - "js-sys", - "pin-project", - "serde", - "serde_json", - "thiserror", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "gloo-timers" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "gloo-utils" -version = "0.1.6" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8e8fc851e9c7b9852508bc6e3f690f452f474417e8545ec9857b7f7377036b5" -dependencies = [ - "js-sys", - "serde", - "serde_json", - "wasm-bindgen", - "web-sys", -] +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "h2" -version = "0.3.18" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -1307,7 +1686,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 2.1.0", "slab", "tokio", "tokio-util", @@ -1335,7 +1714,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.7", ] [[package]] @@ -1344,29 +1723,26 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", ] [[package]] -name = "heck" -version = "0.4.1" +name = "hashbrown" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" [[package]] -name = "hermit-abi" -version = "0.2.6" +name = "heck" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -1394,15 +1770,6 @@ dependencies = [ "digest 0.9.0", ] -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.6", -] - [[package]] name = "hmac-drbg" version = "0.3.0" @@ -1444,9 +1811,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -1456,9 +1823,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -1471,7 +1838,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -1480,70 +1847,48 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" -dependencies = [ - "http", - "hyper", - "log", - "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" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0646026eb1b3eea4cd9ba47912ea5ce9cc07713d105b1a14698f4e6433d348b7" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ + "futures-util", "http", "hyper", "log", - "rustls 0.21.0", + "rustls", "rustls-native-certs", "tokio", - "tokio-rustls 0.24.0", + "tokio-rustls", ] [[package]] name = "iana-time-zone" -version = "0.1.56" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows", + "windows-core", ] [[package]] name = "iana-time-zone-haiku" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "cxx", - "cxx-build", + "cc", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -1595,6 +1940,16 @@ dependencies = [ "serde", ] +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.2", +] + [[package]] name = "integer-sqrt" version = "0.1.5" @@ -1606,24 +1961,23 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi", "libc", "windows-sys 0.48.0", ] [[package]] name = "is-terminal" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix 0.37.14", + "hermit-abi", + "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -1638,125 +1992,65 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jobserver" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.61" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" dependencies = [ "wasm-bindgen", ] [[package]] name = "jsonrpsee" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d291e3a5818a2384645fd9756362e6d89cf0541b0b916fa7702ea4a9833608e" -dependencies = [ - "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.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b971ce0f6cd1521ede485afc564b95b2c8e7079b9da41d4273bd9b55140a55d" -dependencies = [ - "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", -] - -[[package]] -name = "jsonrpsee-client-transport" -version = "0.16.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965de52763f2004bc91ac5bcec504192440f0b568a5d621c59d9dbd6f886c3fb" +checksum = "affdc52f7596ccb2d7645231fc6163bb314630c989b64998f3699a28b4d5d4dc" dependencies = [ - "futures-util", - "http", - "jsonrpsee-core 0.16.2", - "jsonrpsee-types 0.16.2", - "pin-project", - "rustls-native-certs", - "soketto", - "thiserror", - "tokio", - "tokio-rustls 0.23.4", - "tokio-util", - "tracing", - "webpki-roots 0.22.6", + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-http-client", + "jsonrpsee-types", ] [[package]] name = "jsonrpsee-client-transport" -version = "0.17.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ca00d975eda834826b04ad57d4e690c67439bb51b02eb0f8b7e4c30fcef8ab9" +checksum = "b5b005c793122d03217da09af68ba9383363caa950b90d3436106df8cabce935" dependencies = [ - "futures-channel", "futures-util", - "gloo-net", "http", - "jsonrpsee-core 0.17.1", + "jsonrpsee-core", "pin-project", "rustls-native-certs", "soketto", "thiserror", "tokio", - "tokio-rustls 0.24.0", + "tokio-rustls", "tokio-util", "tracing", - "webpki-roots 0.23.0", -] - -[[package]] -name = "jsonrpsee-core" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e70b4439a751a5de7dd5ed55eacff78ebf4ffe0fc009cb1ebb11417f5b536b" -dependencies = [ - "anyhow", - "async-lock", - "async-trait", - "beef", - "futures-channel", - "futures-timer", - "futures-util", - "hyper", - "jsonrpsee-types 0.16.2", - "rustc-hash", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", + "url", ] [[package]] name = "jsonrpsee-core" -version = "0.17.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b83cca7a5a7899eed8b2935d5f755c8c4052ad66ab5b328bd34ac2b3ffd3515f" +checksum = "da2327ba8df2fdbd5e897e2b5ed25ce7f299d345b9736b6828814c3dbd1fd47b" dependencies = [ "anyhow", "async-lock", @@ -1765,28 +2059,7 @@ dependencies = [ "futures-timer", "futures-util", "hyper", - "jsonrpsee-types 0.17.1", - "rustc-hash", - "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-stream", - "tracing", - "wasm-bindgen-futures", -] - -[[package]] -name = "jsonrpsee-http-client" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc345b0a43c6bc49b947ebeb936e886a419ee3d894421790c969cc56040542ad" -dependencies = [ - "async-trait", - "hyper", - "hyper-rustls 0.23.2", - "jsonrpsee-core 0.16.2", - "jsonrpsee-types 0.16.2", + "jsonrpsee-types", "rustc-hash", "serde", "serde_json", @@ -1797,42 +2070,29 @@ dependencies = [ [[package]] name = "jsonrpsee-http-client" -version = "0.17.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6483fea826f62260a88a132fa750a47b40d4218d41e3391936579533c6c67509" +checksum = "5f80c17f62c7653ce767e3d7288b793dfec920f97067ceb189ebdd3570f2bc20" dependencies = [ "async-trait", "hyper", - "hyper-rustls 0.24.0", - "jsonrpsee-core 0.17.1", - "jsonrpsee-types 0.17.1", + "hyper-rustls", + "jsonrpsee-core", + "jsonrpsee-types", "serde", "serde_json", "thiserror", "tokio", "tower", "tracing", + "url", ] [[package]] name = "jsonrpsee-types" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bd522fe1ce3702fd94812965d7bb7a3364b1c9aba743944c5a00529aae80f8c" -dependencies = [ - "anyhow", - "beef", - "serde", - "serde_json", - "thiserror", - "tracing", -] - -[[package]] -name = "jsonrpsee-types" -version = "0.17.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd301ccc3e08718393432d1961539d78c4580dcca86014dfe6769c308b2c08b2" +checksum = "5be0be325642e850ed0bdff426674d2e66b2b7117c9be23a7caef68a2902b7d9" dependencies = [ "anyhow", "beef", @@ -1842,34 +2102,11 @@ dependencies = [ "tracing", ] -[[package]] -name = "jsonrpsee-wasm-client" -version = "0.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85dc3aea8bbb844dacc45cd98d01f624e4485184149a045761888c2e5fa5a0c6" -dependencies = [ - "jsonrpsee-client-transport 0.17.1", - "jsonrpsee-core 0.17.1", - "jsonrpsee-types 0.17.1", -] - -[[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]] name = "keccak" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3afef3b6eff9ce9d8ff9b3601125eec7f0c8cbac7abd14f355d053fa56c98768" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" dependencies = [ "cpufeatures", ] @@ -1882,15 +2119,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.142" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317" - -[[package]] -name = "libm" -version = "0.2.6" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libsecp256k1" @@ -1940,15 +2171,6 @@ dependencies = [ "libsecp256k1-core", ] -[[package]] -name = "link-cplusplus" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" -dependencies = [ - "cc", -] - [[package]] name = "linux-raw-sys" version = "0.1.4" @@ -1957,15 +2179,15 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "linux-raw-sys" -version = "0.3.4" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36eb31c1778188ae1e64398743890d0877fef36d11521ac60406b42016e8c2cf" +checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -1973,21 +2195,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "lru" -version = "0.8.1" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" -dependencies = [ - "hashbrown 0.12.3", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "mach" @@ -2004,38 +2214,38 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" dependencies = [ - "regex-automata", + "regex-automata 0.1.10", ] [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memfd" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" +checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.37.14", + "rustix 0.38.21", ] [[package]] name = "memoffset" -version = "0.6.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" dependencies = [ "autocfg", ] [[package]] name = "memoffset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] @@ -2049,12 +2259,6 @@ dependencies = [ "hash-db", ] -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "merlin" version = "2.0.1" @@ -2067,25 +2271,57 @@ dependencies = [ "zeroize", ] +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + [[package]] name = "miniz_oxide" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.6" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" dependencies = [ "libc", - "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.45.0", + "windows-sys 0.48.0", +] + +[[package]] +name = "multibase" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b3539ec3c1f04ac9748a260728e855f261b4977f5c3406612c884564f329404" +dependencies = [ + "base-x", + "data-encoding", + "data-encoding-macro", +] + +[[package]] +name = "multihash" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076d548d76a0e2a0d4ab471d0b1c36c577786dfc4471242035d97a12a735c492" +dependencies = [ + "core2", + "unsigned-varint", ] [[package]] @@ -2096,9 +2332,9 @@ checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -2111,7 +2347,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "itoa", ] @@ -2125,63 +2361,51 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-rational" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" -dependencies = [ - "autocfg", - "num-bigint", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi", "libc", ] [[package]] name = "object" -version = "0.29.0" +version = "0.30.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" dependencies = [ "crc32fast", - "hashbrown 0.12.3", - "indexmap", + "hashbrown 0.13.2", + "indexmap 1.9.3", "memchr", ] [[package]] name = "object" -version = "0.30.3" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "opaque-debug" @@ -2209,11 +2433,11 @@ checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" [[package]] name = "parity-scale-codec" -version = "3.4.0" +version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "637935964ff85a605d114591d4d2c13c5d1ba2806dae97cea6bf180238a749ac" +checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "bitvec", "byte-slice-cast", "bytes", @@ -2224,9 +2448,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.1.4" +version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b26a931f824dd4eca30b3e43bb4f31cd5f0d3a403c5f5ff27106b805bfde7b" +checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2252,22 +2476,22 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.4.1", "smallvec", - "windows-sys 0.45.0", + "windows-targets 0.48.5", ] [[package]] name = "paste" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pbkdf2" @@ -2278,46 +2502,37 @@ dependencies = [ "crypto-mac 0.11.1", ] -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.6", -] - [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pin-project" -version = "1.0.12" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.12" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.38", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2325,11 +2540,27 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + [[package]] name = "pkg-config" -version = "0.3.26" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + +[[package]] +name = "platforms" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" +checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" [[package]] name = "ppv-lite86" @@ -2339,9 +2570,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "primitive-types" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", @@ -2362,9 +2593,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.56" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -2380,9 +2611,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.26" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -2452,7 +2683,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", ] [[package]] @@ -2466,9 +2697,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ "either", "rayon-core", @@ -2476,14 +2707,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] @@ -2492,7 +2721,16 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", ] [[package]] @@ -2501,36 +2739,36 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.9", - "redox_syscall", + "getrandom 0.2.10", + "redox_syscall 0.2.16", "thiserror", ] [[package]] name = "ref-cast" -version = "1.0.16" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43faa91b1c8b36841ee70e97188a869d37ae21759da6846d4be66de5bf7b12c" +checksum = "acde58d073e9c79da00f2b5b84eed919c8326832648a5b109b3fce1bb1175280" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.16" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" +checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.38", ] [[package]] name = "regalloc2" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c" +checksum = "80535183cae11b149d618fbd3c37e38d7cda589d82d7769e196ca9a9042d7621" dependencies = [ "fxhash", "log", @@ -2540,13 +2778,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.1" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.1", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -2558,6 +2797,17 @@ dependencies = [ "regex-syntax 0.6.29", ] +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.2", +] + [[package]] name = "regex-syntax" version = "0.6.29" @@ -2566,35 +2816,38 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] -name = "region" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e" +name = "ring" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof#edd1e90b847e560bf60fc2e8712235ccfa11a9a9" dependencies = [ - "bitflags", - "libc", - "mach", - "winapi", + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "blake2", + "common", + "fflonk", + "merlin 3.0.0", ] [[package]] name = "ring" -version = "0.16.20" +version = "0.17.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" dependencies = [ "cc", + "getrandom 0.2.10", "libc", - "once_cell", "spin", "untrusted", - "web-sys", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -2605,8 +2858,8 @@ dependencies = [ "color-eyre", "parity-scale-codec", "proc-macro2", + "quote", "subxt-codegen", - "syn 1.0.109", "wasm-loader", "wasm-testbed", ] @@ -2629,13 +2882,22 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + [[package]] name = "rustix" -version = "0.36.16" +version = "0.36.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6da3636faa25820d8648e0e31c5d519bbb01f72fdf57131f0f5f7da5fed36eab" +checksum = "305efbd14fde4139eb501df5f136994bb520b033fa9fbdce287507dc23b8c7ed" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", @@ -2645,47 +2907,34 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.14" +version = "0.38.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b864d3c18a5785a05953adeed93e2dca37ed30f18e69bba9f30079d51f363f" +checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" dependencies = [ - "bitflags", + "bitflags 2.4.1", "errno", - "io-lifetimes", "libc", - "linux-raw-sys 0.3.4", + "linux-raw-sys 0.4.10", "windows-sys 0.48.0", ] [[package]] name = "rustls" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" -dependencies = [ - "log", - "ring", - "sct", - "webpki", -] - -[[package]] -name = "rustls" -version = "0.21.0" +version = "0.21.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07180898a28ed6a7f7ba2311594308f595e3dd2e3c3812fa0a80a47b45f17e5d" +checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c" dependencies = [ "log", - "ring", + "ring 0.17.5", "rustls-webpki", "sct", ] [[package]] name = "rustls-native-certs" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", "rustls-pemfile", @@ -2695,119 +2944,103 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.0", + "base64 0.21.5", ] [[package]] name = "rustls-webpki" -version = "0.100.2" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring", + "ring 0.17.5", "untrusted", ] [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "log", "sp-core", - "sp-wasm-interface", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "thiserror", ] [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ - "lru", "parity-scale-codec", "parking_lot", "sc-executor-common", - "sc-executor-wasmi", "sc-executor-wasmtime", + "schnellru", "sp-api", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-io", "sp-panic-handler", - "sp-runtime-interface", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-trie", "sp-version", - "sp-wasm-interface", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "tracing", - "wasmi", ] [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "sc-allocator", - "sp-maybe-compressed-blob", - "sp-wasm-interface", + "sp-maybe-compressed-blob 4.1.0-dev (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "thiserror", "wasm-instrument", - "wasmi", -] - -[[package]] -name = "sc-executor-wasmi" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" -dependencies = [ - "log", - "sc-allocator", - "sc-executor-common", - "sp-runtime-interface", - "sp-wasm-interface", - "wasmi", ] [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "anyhow", "cfg-if", "libc", "log", - "once_cell", - "rustix 0.36.16", + "parking_lot", + "rustix 0.36.17", "sc-allocator", "sc-executor-common", - "sp-runtime-interface", - "sp-wasm-interface", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "wasmtime", ] [[package]] name = "scale-info" -version = "2.5.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cfdffd972d76b22f3d7f81c8be34b2296afd3a25e0a547bd9abe340a4dbbe97" +checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" dependencies = [ "bitvec", "cfg-if", @@ -2819,9 +3052,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.5.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61fa974aea2d63dd18a4ec3a49d59af9f34178c73a4f56d2f18205628d00681e" +checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2831,11 +3064,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -2844,7 +3077,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "cfg-if", "hashbrown 0.13.2", ] @@ -2859,7 +3092,7 @@ dependencies = [ "arrayvec 0.5.2", "curve25519-dalek 2.1.3", "getrandom 0.1.16", - "merlin", + "merlin 2.0.1", "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", @@ -2869,23 +3102,17 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "scratch" -version = "1.0.5" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring", + "ring 0.17.5", "untrusted", ] @@ -2918,11 +3145,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.8.2" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -2931,45 +3158,45 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.8.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", ] [[package]] -name = "send_wrapper" -version = "0.4.0" +name = "semver" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" -version = "1.0.160" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" +checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.160" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" +checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.38", ] [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", @@ -2989,6 +3216,17 @@ dependencies = [ "opaque-debug 0.3.0", ] +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + [[package]] name = "sha2" version = "0.8.2" @@ -3016,80 +3254,81 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.6", + "digest 0.10.7", ] [[package]] name = "sha3" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c2bb1a323307527314a36bfb73f24febb08ce2b8a554bf4ffd6f51ad15198c" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", "keccak", ] [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] -[[package]] -name = "signal-hook-registry" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" -dependencies = [ - "libc", -] - [[package]] name = "signature" -version = "1.6.4" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "slice-group-by" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec" +checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", ] +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "soketto" version = "0.7.1" @@ -3108,16 +3347,19 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "hash-db", "log", "parity-scale-codec", + "scale-info", "sp-api-proc-macro", "sp-core", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-metadata-ir", "sp-runtime", "sp-state-machine", - "sp-std 5.0.0", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-trie", "sp-version", "thiserror", @@ -3126,7 +3368,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "Inflector", "blake2", @@ -3134,43 +3376,63 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.38", ] [[package]] name = "sp-application-crypto" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", - "sp-std 5.0.0", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] [[package]] name = "sp-arithmetic" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "integer-sqrt", "num-traits", "parity-scale-codec", "scale-info", "serde", - "sp-std 5.0.0", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "static_assertions", ] +[[package]] +name = "sp-ark-bls12-381" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" +dependencies = [ + "ark-bls12-381-ext", + "sp-crypto-ec-utils", +] + +[[package]] +name = "sp-ark-ed-on-bls12-381-bandersnatch" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" +dependencies = [ + "ark-ed-on-bls12-381-bandersnatch-ext", + "sp-crypto-ec-utils", +] + [[package]] name = "sp-core" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "21.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "array-bytes", - "bitflags", + "bandersnatch_vrfs", + "bip39", + "bitflags 1.3.2", "blake2", "bounded-collections", "bs58", @@ -3180,12 +3442,14 @@ dependencies = [ "hash-db", "hash256-std-hasher", "impl-serde", + "itertools", "lazy_static", "libsecp256k1", "log", - "merlin", + "merlin 2.0.1", "parity-scale-codec", "parking_lot", + "paste", "primitive-types", "rand 0.8.5", "regex", @@ -3194,101 +3458,140 @@ dependencies = [ "secp256k1", "secrecy", "serde", - "sp-core-hashing 5.0.0", - "sp-debug-derive", - "sp-externalities", - "sp-runtime-interface", - "sp-std 5.0.0", - "sp-storage", + "sp-core-hashing 9.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-debug-derive 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "ss58-registry", "substrate-bip39", "thiserror", - "tiny-bip39", + "tracing", + "w3f-bls", "zeroize", ] [[package]] name = "sp-core-hashing" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ee599a8399448e65197f9a6cee338ad192e9023e35e31f22382964c3c174c68" dependencies = [ "blake2b_simd", "byteorder", - "digest 0.10.6", - "sha2 0.10.6", + "digest 0.10.7", + "sha2 0.10.8", "sha3", - "sp-std 5.0.0", + "sp-std 8.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "twox-hash", ] [[package]] name = "sp-core-hashing" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27449abdfbe41b473e625bce8113745e81d65777dd1d5a8462cf24137930dad8" +version = "9.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "blake2b_simd", "byteorder", - "digest 0.10.6", - "sha2 0.10.6", + "digest 0.10.7", + "sha2 0.10.8", "sha3", - "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-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "9.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" +dependencies = [ + "quote", + "sp-core-hashing 9.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "syn 2.0.38", +] + +[[package]] +name = "sp-crypto-ec-utils" +version = "0.4.1" +source = "git+https://github.com/paritytech/polkadot-sdk#29b4bd423387c0704d467a49f99444beaa2690eb" +dependencies = [ + "ark-bls12-377", + "ark-bls12-377-ext", + "ark-bls12-381", + "ark-bls12-381-ext", + "ark-bw6-761", + "ark-bw6-761-ext", + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ed-on-bls12-377-ext", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ed-on-bls12-381-bandersnatch-ext", + "ark-scale", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", +] + +[[package]] +name = "sp-debug-derive" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "proc-macro2", "quote", - "sp-core-hashing 5.0.0", - "syn 1.0.109", + "syn 2.0.38", ] [[package]] name = "sp-debug-derive" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.38", +] + +[[package]] +name = "sp-externalities" +version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] [[package]] name = "sp-externalities" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "environmental", "parity-scale-codec", - "sp-std 5.0.0", - "sp-storage", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk)", ] [[package]] name = "sp-io" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "bytes", - "ed25519", "ed25519-dalek", - "futures", "libsecp256k1", "log", "parity-scale-codec", "rustversion", "secp256k1", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-keystore", - "sp-runtime-interface", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-state-machine", - "sp-std 5.0.0", - "sp-tracing", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-tracing 10.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-trie", "tracing", "tracing-core", @@ -3296,32 +3599,49 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "0.27.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ - "futures", - "merlin", "parity-scale-codec", "parking_lot", - "schnorrkel", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "thiserror", +] + +[[package]] +name = "sp-maybe-compressed-blob" +version = "4.1.0-dev" +source = "git+https://github.com/paritytech/substrate/?tag=monthly-2023-08#22f0669efc4a8b785854a335c70b7e4385d0ca53" +dependencies = [ "thiserror", + "zstd 0.12.4", ] [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "thiserror", - "zstd", + "zstd 0.12.4", +] + +[[package]] +name = "sp-metadata-ir" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" +dependencies = [ + "frame-metadata 16.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec", + "scale-info", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] [[package]] name = "sp-panic-handler" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "backtrace", "lazy_static", @@ -3330,8 +3650,8 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "either", "hash256-std-hasher", @@ -3346,44 +3666,74 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-io", - "sp-std 5.0.0", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-weights", ] [[package]] name = "sp-runtime-interface" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-runtime-interface-proc-macro 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-tracing 10.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities", - "sp-runtime-interface-proc-macro", - "sp-std 5.0.0", - "sp-storage", - "sp-tracing", - "sp-wasm-interface", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-runtime-interface-proc-macro 11.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-tracing 10.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "static_assertions", ] [[package]] name = "sp-runtime-interface-proc-macro" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "Inflector", "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.38", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#29b4bd423387c0704d467a49f99444beaa2690eb" +dependencies = [ + "Inflector", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.38", ] [[package]] name = "sp-state-machine" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "0.28.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "hash-db", "log", @@ -3392,45 +3742,76 @@ dependencies = [ "rand 0.8.5", "smallvec", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-panic-handler", - "sp-std 5.0.0", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-trie", "thiserror", "tracing", + "trie-db", ] [[package]] name = "sp-std" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53458e3c57df53698b3401ec0934bea8e8cfce034816873c0b0abbd83d7bac0d" [[package]] name = "sp-std" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1de8eef39962b5b97478719c493bed2926cf70cb621005bbf68ebe58252ff986" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" + +[[package]] +name = "sp-std" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#29b4bd423387c0704d467a49f99444beaa2690eb" + +[[package]] +name = "sp-storage" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", +] [[package]] name = "sp-storage" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "impl-serde", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive", - "sp-std 5.0.0", + "sp-debug-derive 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", +] + +[[package]] +name = "sp-tracing" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" +dependencies = [ + "parity-scale-codec", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "tracing", + "tracing-core", + "tracing-subscriber 0.2.25", ] [[package]] name = "sp-tracing" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "parity-scale-codec", - "sp-std 5.0.0", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "tracing", "tracing-core", "tracing-subscriber 0.2.25", @@ -3438,10 +3819,10 @@ dependencies = [ [[package]] name = "sp-trie" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "hash-db", "hashbrown 0.13.2", "lazy_static", @@ -3449,10 +3830,11 @@ dependencies = [ "nohash-hasher", "parity-scale-codec", "parking_lot", + "rand 0.8.5", "scale-info", "schnellru", "sp-core", - "sp-std 5.0.0", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "thiserror", "tracing", "trie-db", @@ -3461,8 +3843,8 @@ dependencies = [ [[package]] name = "sp-version" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "impl-serde", "parity-scale-codec", @@ -3471,40 +3853,52 @@ dependencies = [ "serde", "sp-core-hashing-proc-macro", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-version-proc-macro", "thiserror", ] [[package]] name = "sp-version-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.38", +] + +[[package]] +name = "sp-wasm-interface" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "wasmtime", ] [[package]] name = "sp-wasm-interface" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std 5.0.0", - "wasmi", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "wasmtime", ] [[package]] name = "sp-weights" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#29b4bd423387c0704d467a49f99444beaa2690eb" dependencies = [ "parity-scale-codec", "scale-info", @@ -3512,21 +3906,31 @@ dependencies = [ "smallvec", "sp-arithmetic", "sp-core", - "sp-debug-derive", - "sp-std 5.0.0", + "sp-debug-derive 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] [[package]] name = "spin" -version = "0.5.2" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +dependencies = [ + "base64ct", + "der", +] [[package]] name = "ss58-registry" -version = "1.39.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecf0bd63593ef78eca595a7fc25e9a443ca46fe69fd472f8f09f5245cdcd769d" +checksum = "5e6915280e2d0db8911e5032a5c275571af6bdded2916abd691a659be25d3439" dependencies = [ "Inflector", "num-format", @@ -3555,14 +3959,25 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "subrpcer" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92660ce1320c3b4351b025ffc2932c3d410c71625be049922acefe1cae81c2e9" +dependencies = [ + "affix", + "serde", + "serde_json", +] + [[package]] name = "substrate-bip39" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" +checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" dependencies = [ "hmac 0.11.0", - "pbkdf2 0.8.0", + "pbkdf2", "schnorrkel", "sha2 0.9.9", "zeroize", @@ -3570,16 +3985,18 @@ dependencies = [ [[package]] name = "substrate-runtime-proposal-hash" -version = "0.19.1" -source = "git+https://github.com/chevdor/subwasm?branch=master#04fd6218fb41c29d04b21db7e821810b25664d9b" +version = "0.20.0" +source = "git+https://github.com/chevdor/subwasm?branch=master#03dc0352cbdff33f31d77ef84be2fc88593103c5" dependencies = [ "blake2", + "frame-metadata 16.0.0 (git+https://github.com/paritytech/frame-metadata?branch=main)", "hex", "parity-scale-codec", "sp-core", "sp-io", "sp-runtime", - "sp-wasm-interface", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "thiserror", ] [[package]] @@ -3590,33 +4007,33 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "subxt-codegen" -version = "0.28.0" -source = "git+https://github.com/paritytech/subxt?branch=master#e583aa987eb57ac6ce70c7166925189a663d0d31" +version = "0.32.1" +source = "git+https://github.com/paritytech/subxt?branch=master#40aca5ba65f1181e8496eb91615d73c0d3c01502" dependencies = [ - "darling", - "frame-metadata", + "frame-metadata 16.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "heck", "hex", - "jsonrpsee 0.16.2", + "jsonrpsee", "parity-scale-codec", "proc-macro2", "quote", "scale-info", "subxt-metadata", - "syn 1.0.109", + "syn 2.0.38", "thiserror", "tokio", ] [[package]] name = "subxt-metadata" -version = "0.28.0" -source = "git+https://github.com/paritytech/subxt?branch=master#e583aa987eb57ac6ce70c7166925189a663d0d31" +version = "0.32.1" +source = "git+https://github.com/paritytech/subxt?branch=master#40aca5ba65f1181e8496eb91615d73c0d3c01502" dependencies = [ - "frame-metadata", + "frame-metadata 16.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec", "scale-info", - "sp-core-hashing 8.0.0", + "sp-core-hashing 9.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror", ] [[package]] @@ -3632,9 +4049,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.15" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -3649,37 +4066,37 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.7" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" +checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" [[package]] name = "termcolor" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" dependencies = [ "winapi-util", ] [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.38", ] [[package]] @@ -3692,25 +4109,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "tiny-bip39" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861" -dependencies = [ - "anyhow", - "hmac 0.12.1", - "once_cell", - "pbkdf2 0.11.0", - "rand 0.8.5", - "rustc-hash", - "sha2 0.10.6", - "thiserror", - "unicode-normalization", - "wasm-bindgen", - "zeroize", -] - [[package]] name = "tinyvec" version = "1.6.0" @@ -3728,19 +4126,17 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.0" +version = "1.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c786bf8134e5a3a166db9b29ab8f48134739014a3eca7bc6bfa95d673b136f" +checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", "mio", "num_cpus", - "parking_lot", "pin-project-lite", - "signal-hook-registry", - "socket2", + "socket2 0.5.5", "tokio-macros", "windows-sys 0.48.0", ] @@ -3753,46 +4149,24 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", -] - -[[package]] -name = "tokio-rustls" -version = "0.23.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" -dependencies = [ - "rustls 0.20.8", - "tokio", - "webpki", + "syn 2.0.38", ] [[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.13" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76cd2598a37719e3cd4c28af93f978506a97a2920ef4d96e4b12e38b8cbc8940" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "futures-core", - "pin-project-lite", + "rustls", "tokio", ] [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", @@ -3814,17 +4188,17 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.1" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" [[package]] name = "toml_edit" -version = "0.19.8" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap", + "indexmap 2.1.0", "toml_datetime", "winnow", ] @@ -3858,9 +4232,9 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.38" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9cf6a813d3f40c88b0b6b6f29a5c95c6cdbf97c1f9cc53fb820200f5ad814d" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "log", "pin-project-lite", @@ -3870,20 +4244,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.24" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.38", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -3901,12 +4275,12 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] @@ -3955,9 +4329,9 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.27.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85" +checksum = "ff28e0f815c2fea41ebddf148e008b077d2faddb026c9555b29696114d602642" dependencies = [ "hash-db", "hashbrown 0.13.2", @@ -3981,6 +4355,27 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +[[package]] +name = "tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand 0.8.5", + "rustls", + "rustls-native-certs", + "sha1", + "thiserror", + "url", + "utf-8", +] + [[package]] name = "twox-hash" version = "1.6.3" @@ -3988,16 +4383,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", - "digest 0.10.6", - "rand 0.7.3", + "digest 0.10.7", + "rand 0.8.5", "static_assertions", ] [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "uint" @@ -4019,9 +4414,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -4032,35 +4427,59 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-width" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" - [[package]] name = "unicode-xid" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +[[package]] +name = "unsigned-varint" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" + [[package]] name = "untrusted" -version = "0.7.1" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "ureq" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +checksum = "f5ccd538d4a604753ebc2f17cd9946e89b77bf87f6a8e2309667c6f2e87855e3" +dependencies = [ + "base64 0.21.5", + "flate2", + "log", + "once_cell", + "rustls", + "rustls-webpki", + "serde", + "serde_json", + "url", + "webpki-roots", +] [[package]] name = "url" -version = "2.3.1" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + [[package]] name = "utf8parse" version = "0.2.1" @@ -4079,13 +4498,36 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "w3f-bls" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7335e4c132c28cc43caef6adb339789e599e39adbe78da0c4d547fad48cbc331" +dependencies = [ + "ark-bls12-377", + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-serialize-derive", + "arrayref", + "constcat", + "digest 0.10.7", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "sha2 0.10.8", + "sha3", + "thiserror", + "zeroize", +] + [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -4103,9 +4545,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.84" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -4113,36 +4555,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.84" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.38", "wasm-bindgen-shared", ] -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4150,22 +4580,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" [[package]] name = "wasm-instrument" @@ -4178,95 +4608,69 @@ dependencies = [ [[package]] name = "wasm-loader" -version = "0.19.1" -source = "git+https://github.com/chevdor/subwasm?branch=master#04fd6218fb41c29d04b21db7e821810b25664d9b" +version = "0.20.0" +source = "git+https://github.com/chevdor/subwasm?branch=master#03dc0352cbdff33f31d77ef84be2fc88593103c5" dependencies = [ - "hex", - "jsonrpsee 0.17.1", + "array-bytes", "log", + "multibase", + "multihash", "serde", - "sp-maybe-compressed-blob", - "tokio", + "serde_json", + "sp-maybe-compressed-blob 4.1.0-dev (git+https://github.com/paritytech/substrate/?tag=monthly-2023-08)", + "subrpcer", + "thiserror", + "tungstenite", + "ureq", + "url", ] [[package]] name = "wasm-testbed" -version = "0.19.1" -source = "git+https://github.com/chevdor/subwasm?branch=master#04fd6218fb41c29d04b21db7e821810b25664d9b" +version = "0.20.0" +source = "git+https://github.com/chevdor/subwasm?branch=master#03dc0352cbdff33f31d77ef84be2fc88593103c5" dependencies = [ - "frame-metadata", + "frame-metadata 16.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "hex", "log", "parity-scale-codec", "sc-executor", "sc-executor-common", + "scale-info", "sp-core", "sp-io", "sp-runtime", "sp-state-machine", "sp-version", - "sp-wasm-interface", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "substrate-runtime-proposal-hash", + "thiserror", "wasm-loader", ] -[[package]] -name = "wasmi" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" -dependencies = [ - "parity-wasm", - "wasmi-validation", - "wasmi_core", -] - -[[package]] -name = "wasmi-validation" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" -dependencies = [ - "parity-wasm", -] - -[[package]] -name = "wasmi_core" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" -dependencies = [ - "downcast-rs", - "libm", - "memory_units", - "num-rational", - "num-traits", - "region", -] - [[package]] name = "wasmparser" -version = "0.100.0" +version = "0.102.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64b20236ab624147dfbb62cf12a19aaf66af0e41b8398838b66e997d07d269d4" +checksum = "48134de3d7598219ab9eaf6b91b15d8e50d31da76b8519fe4ecfcec2cf35104b" dependencies = [ - "indexmap", + "indexmap 1.9.3", "url", ] [[package]] name = "wasmtime" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a222f5fa1e14b2cefc286f1b68494d7a965f4bf57ec04c59bb62673d639af6" +checksum = "f907fdead3153cb9bfb7a93bbd5b62629472dc06dee83605358c64c52ed3dda9" dependencies = [ "anyhow", "bincode", "cfg-if", - "indexmap", + "indexmap 1.9.3", "libc", "log", - "object 0.29.0", + "object 0.30.4", "once_cell", "paste", "psm", @@ -4279,43 +4683,43 @@ dependencies = [ "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-asm-macros" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4407a7246e7d2f3d8fb1cf0c72fda8dbafdb6dd34d555ae8bea0e5ae031089cc" +checksum = "d3b9daa7c14cd4fa3edbf69de994408d5f4b7b0959ac13fa69d465f6597f810d" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ceb3adf61d654be0be67fffdce42447b0880481348785be5fe40b5dd7663a4c" +checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" dependencies = [ "anyhow", - "base64 0.13.1", + "base64 0.21.5", "bincode", "directories-next", "file-per-thread-logger", "log", - "rustix 0.36.16", + "rustix 0.36.17", "serde", - "sha2 0.10.6", + "sha2 0.10.8", "toml", - "windows-sys 0.42.0", - "zstd", + "windows-sys 0.45.0", + "zstd 0.11.2+zstd.1.5.2", ] [[package]] name = "wasmtime-cranelift" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c366bb8647e01fd08cb5589976284b00abfded5529b33d7e7f3f086c68304a4" +checksum = "b1cefde0cce8cb700b1b21b6298a3837dba46521affd7b8c38a9ee2c869eee04" dependencies = [ "anyhow", "cranelift-codegen", @@ -4323,27 +4727,43 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli 0.26.2", + "gimli 0.27.3", "log", - "object 0.29.0", + "object 0.30.4", "target-lexicon", "thiserror", "wasmparser", + "wasmtime-cranelift-shared", + "wasmtime-environ", +] + +[[package]] +name = "wasmtime-cranelift-shared" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd041e382ef5aea1b9fc78442394f1a4f6d676ce457e7076ca4cb3f397882f8b" +dependencies = [ + "anyhow", + "cranelift-codegen", + "cranelift-native", + "gimli 0.27.3", + "object 0.30.4", + "target-lexicon", "wasmtime-environ", ] [[package]] name = "wasmtime-environ" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b8b50962eae38ee319f7b24900b7cf371f03eebdc17400c1dc8575fc10c9a7" +checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" dependencies = [ "anyhow", "cranelift-entity", - "gimli 0.26.2", - "indexmap", + "gimli 0.27.3", + "indexmap 1.9.3", "log", - "object 0.29.0", + "object 0.30.4", "serde", "target-lexicon", "thiserror", @@ -4353,18 +4773,18 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffaed4f9a234ba5225d8e64eac7b4a5d13b994aeb37353cde2cbeb3febda9eaa" +checksum = "0de48df552cfca1c9b750002d3e07b45772dd033b0b206d5c0968496abf31244" dependencies = [ - "addr2line 0.17.0", + "addr2line 0.19.0", "anyhow", "bincode", "cfg-if", "cpp_demangle", - "gimli 0.26.2", + "gimli 0.27.3", "log", - "object 0.29.0", + "object 0.30.4", "rustc-demangle", "serde", "target-lexicon", @@ -4372,60 +4792,60 @@ dependencies = [ "wasmtime-jit-debug", "wasmtime-jit-icache-coherence", "wasmtime-runtime", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-jit-debug" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed41cbcbf74ce3ff6f1d07d1b707888166dc408d1a880f651268f4f7c9194b2" +checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846" dependencies = [ - "object 0.29.0", + "object 0.30.4", "once_cell", - "rustix 0.36.16", + "rustix 0.36.17", ] [[package]] name = "wasmtime-jit-icache-coherence" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a28ae1e648461bfdbb79db3efdaee1bca5b940872e4175390f465593a2e54c" +checksum = "aecae978b13f7f67efb23bd827373ace4578f2137ec110bbf6a4a7cde4121bbd" dependencies = [ "cfg-if", "libc", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-runtime" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e704b126e4252788ccfc3526d4d4511d4b23c521bf123e447ac726c14545217b" +checksum = "658cf6f325232b6760e202e5255d823da5e348fdea827eff0a2a22319000b441" dependencies = [ "anyhow", "cc", "cfg-if", - "indexmap", + "indexmap 1.9.3", "libc", "log", "mach", "memfd", - "memoffset 0.6.5", + "memoffset 0.8.0", "paste", "rand 0.8.5", - "rustix 0.36.16", + "rustix 0.36.17", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-types" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83e5572c5727c1ee7e8f28717aaa8400e4d22dcbd714ea5457d85b5005206568" +checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f" dependencies = [ "cranelift-entity", "serde", @@ -4433,43 +4853,11 @@ dependencies = [ "wasmparser", ] -[[package]] -name = "web-sys" -version = "0.3.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki" -version = "0.22.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ecc0cd7cac091bf682ec5efa18b1cff79d617b84181f38b3951dbe135f607f" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki-roots" -version = "0.22.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki", -] - [[package]] name = "webpki-roots" -version = "0.23.0" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa54963694b65584e170cf5dc46aeb4dcaa5584e652ff5f3952e56d66aff0125" -dependencies = [ - "rustls-webpki", -] +checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" [[package]] name = "winapi" @@ -4489,9 +4877,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -4503,27 +4891,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-targets 0.48.0", -] - -[[package]] -name = "windows-sys" -version = "0.42.0" +name = "windows-core" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" dependencies = [ - "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", + "windows-targets 0.48.5", ] [[package]] @@ -4541,7 +4914,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -4561,17 +4934,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 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", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -4582,9 +4955,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -4594,9 +4967,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -4606,9 +4979,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -4618,9 +4991,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -4630,9 +5003,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -4642,9 +5015,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -4654,15 +5027,15 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.4.1" +version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8970b36c66498d8ff1d66685dc86b91b29db0c7739899012f63a63814b4b28" +checksum = "176b6138793677221d420fd2f0aeeced263f197688b36484660da767bca2fa32" dependencies = [ "memchr", ] @@ -4676,6 +5049,26 @@ dependencies = [ "tap", ] +[[package]] +name = "zerocopy" +version = "0.7.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c4061bedbb353041c12f413700357bec76df2c7e2ca8e4df8bac24c6bf68e3d" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + [[package]] name = "zeroize" version = "1.6.0" @@ -4693,7 +5086,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.38", ] [[package]] @@ -4702,7 +5095,16 @@ version = "0.11.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" dependencies = [ - "zstd-safe", + "zstd-safe 5.0.2+zstd.1.5.2", +] + +[[package]] +name = "zstd" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" +dependencies = [ + "zstd-safe 6.0.6", ] [[package]] @@ -4715,13 +5117,22 @@ dependencies = [ "zstd-sys", ] +[[package]] +name = "zstd-safe" +version = "6.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" +dependencies = [ + "libc", + "zstd-sys", +] + [[package]] name = "zstd-sys" -version = "2.0.8+zstd.1.5.5" +version = "2.0.9+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" dependencies = [ "cc", - "libc", "pkg-config", ] diff --git a/tools/runtime-codegen/Cargo.toml b/tools/runtime-codegen/Cargo.toml index b0c1070f80a88cef5fb50c16297b5eb7bc1077cb..faed2865e8c158a14743dbd3fedf72f8423755b7 100644 --- a/tools/runtime-codegen/Cargo.toml +++ b/tools/runtime-codegen/Cargo.toml @@ -11,11 +11,12 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [workspace] [dependencies] -clap = { version = "4.0.8", features = ["derive", "cargo"] } +clap = { version = "4.4.6", 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" -syn = "1.0" -subxt-codegen = { git = "https://github.com/paritytech/subxt", branch = "master", default-features = false, features = [] } +proc-macro2 = "1.0.56" +quote = "1.0.28" +subxt-codegen = { git = "https://github.com/paritytech/subxt", branch = "master", default-features = false, features = ["fetch-metadata"] } wasm-loader = { git = "https://github.com/chevdor/subwasm", branch = "master" } wasm-testbed = { git = "https://github.com/chevdor/subwasm", branch = "master" } + diff --git a/tools/runtime-codegen/README.md b/tools/runtime-codegen/README.md index 52ff3818461c07f2343ac959605b39c5ea8a2982..a5faeb840b81c615f0460841f4346c57e8c08939 100644 --- a/tools/runtime-codegen/README.md +++ b/tools/runtime-codegen/README.md @@ -2,14 +2,10 @@ This is a tool for generating the bridge runtime code from metadata. Example commands: -``` -cargo run --bin runtime-codegen -- --from-node-url "http://localhost:20433" > /tmp/rialto_codegen.rs -``` - ``` cargo run --bin runtime-codegen -- --from-node-url "wss://rococo-bridge-hub-rpc.polkadot.io:443" > /tmp/rococo_codegen.rs ``` ``` -cargo run --bin runtime-codegen -- --from-wasm ~/workplace/bridge-hub-rococo_runtime-v9360.compact.compressed.wasm > /tmp/rococo_bridge_hub_codegen.rs +cargo run --bin runtime-codegen -- --from-wasm-file ~/workplace/bridge-hub-rococo_runtime-v9360.compact.compressed.wasm > /tmp/rococo_bridge_hub_codegen.rs ``` \ No newline at end of file diff --git a/tools/runtime-codegen/src/main.rs b/tools/runtime-codegen/src/main.rs index 5a81fa75c0562b52c296a9bb0c831ed67ee9b90e..d7a722b09c9982efa9fb1bd4e01c9c0bf34cc0d8 100644 --- a/tools/runtime-codegen/src/main.rs +++ b/tools/runtime-codegen/src/main.rs @@ -15,12 +15,12 @@ // along with Parity Bridges Common. If not, see . use clap::Parser as ClapParser; -use codec::Encode; +use codec::{Decode, Encode}; use color_eyre::eyre; use std::{env, path::PathBuf}; use subxt_codegen::{ - generate_runtime_api_from_bytes, generate_runtime_api_from_url, utils::Uri, CratePath, - DerivesRegistry, TypeSubstitutes, + fetch_metadata::{fetch_metadata_from_url_blocking, MetadataVersion, Url}, + syn, CodegenBuilder, Metadata, }; use wasm_testbed::WasmTestBed; @@ -28,13 +28,13 @@ use wasm_testbed::WasmTestBed; #[derive(Debug, ClapParser)] struct Command { #[clap(name = "from-node-url", long, value_parser)] - node_url: Option, + node_url: Option, #[clap(name = "from-wasm-file", long, value_parser)] wasm_file: Option, } enum RuntimeMetadataSource { - NodeUrl(Uri), + NodeUrl(Url), WasmFile(wasm_loader::Source), } @@ -107,90 +107,69 @@ fn main() -> color_eyre::Result<()> { let args: Command = Command::parse(); let metadata_source = RuntimeMetadataSource::from_command(args)?; - // Module under which the API is generated. - let item_mod = syn::parse_quote!( - pub mod api {} - ); + let mut codegen_builder = CodegenBuilder::new(); + codegen_builder.runtime_types_only(); + codegen_builder.no_docs(); + // Default module derivatives. - 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), - syn::parse_quote!(PartialEq), - ], - vec![], - ); + codegen_builder.disable_default_derives(); + codegen_builder.set_additional_global_derives(vec![ + syn::parse_quote!(::codec::Encode), + syn::parse_quote!(::codec::Decode), + syn::parse_quote!(Clone), + syn::parse_quote!(Debug), + syn::parse_quote!(PartialEq), + ]); + // Type substitutes - let mut type_substitutes = TypeSubstitutes::new(&CratePath::default()); - type_substitutes - .extend( - vec![ - TypeSubstitute::simple("sp_core::crypto::AccountId32"), - TypeSubstitute::custom("sp_weights::weight_v2::Weight", "::sp_weights::Weight"), - TypeSubstitute::custom( - "sp_runtime::generic::era::Era", - "::sp_runtime::generic::Era", - ), - TypeSubstitute::custom( - "sp_runtime::generic::header::Header", - "::sp_runtime::generic::Header", - ), - TypeSubstitute::simple("sp_runtime::traits::BlakeTwo256"), - TypeSubstitute::simple("sp_session::MembershipProof"), - TypeSubstitute::simple("sp_consensus_grandpa::EquivocationProof"), - TypeSubstitute::simple("bp_header_chain::justification::GrandpaJustification"), - TypeSubstitute::simple("bp_header_chain::InitializationData"), - TypeSubstitute::simple("bp_polkadot_core::parachains::ParaId"), - TypeSubstitute::simple("bp_polkadot_core::parachains::ParaHeadsProof"), - TypeSubstitute::simple("bp_messages::target_chain::FromBridgedChainMessagesProof"), - TypeSubstitute::simple( - "bp_messages::source_chain::FromBridgedChainMessagesDeliveryProof", - ), - TypeSubstitute::simple("bp_messages::UnrewardedRelayersState"), - TypeSubstitute::custom( - "bp_millau::millau_hash::MillauHash", - "::bp_millau::MillauHash", - ), - TypeSubstitute::simple("bp_millau::BlakeTwoAndKeccak256"), - TypeSubstitute::custom( - "sp_runtime::generic::digest::Digest", - "::sp_runtime::generic::Digest", - ), - ] - .drain(..) - .map(|substitute| (substitute.subxt_type, substitute.substitute.try_into().unwrap())), - ) - .map_err(|e| eyre::eyre!("Error extending type substitutes: {:?}", e))?; + let type_substitutes = vec![ + TypeSubstitute::simple("sp_core::crypto::AccountId32"), + TypeSubstitute::custom("sp_weights::weight_v2::Weight", "::sp_weights::Weight"), + TypeSubstitute::custom("sp_runtime::generic::era::Era", "::sp_runtime::generic::Era"), + TypeSubstitute::custom( + "sp_runtime::generic::header::Header", + "::sp_runtime::generic::Header", + ), + TypeSubstitute::simple("sp_runtime::traits::BlakeTwo256"), + TypeSubstitute::simple("sp_session::MembershipProof"), + TypeSubstitute::simple("sp_consensus_grandpa::EquivocationProof"), + TypeSubstitute::simple("bp_header_chain::justification::GrandpaJustification"), + TypeSubstitute::simple("bp_header_chain::InitializationData"), + TypeSubstitute::simple("bp_polkadot_core::parachains::ParaId"), + TypeSubstitute::simple("bp_polkadot_core::parachains::ParaHeadsProof"), + TypeSubstitute::simple( + "bridge_runtime_common::messages::target::FromBridgedChainMessagesProof", + ), + TypeSubstitute::simple( + "bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof", + ), + TypeSubstitute::simple("bp_messages::UnrewardedRelayersState"), + TypeSubstitute::custom( + "sp_runtime::generic::digest::Digest", + "::sp_runtime::generic::Digest", + ), + ]; + for type_substitute in type_substitutes { + codegen_builder.set_type_substitute(type_substitute.subxt_type, type_substitute.substitute); + } // Generate the Runtime API. - let runtime_api = match metadata_source { - RuntimeMetadataSource::NodeUrl(node_url) => generate_runtime_api_from_url( - item_mod, - &node_url, - derives, - type_substitutes, - CratePath::default(), - false, - true, - ), + let raw_metadata = match metadata_source { + RuntimeMetadataSource::NodeUrl(node_url) => + fetch_metadata_from_url_blocking(node_url, MetadataVersion::Latest) + .map_err(|e| eyre::eyre!("Error fetching metadata from node url: {:?}", e))?, RuntimeMetadataSource::WasmFile(source) => { let testbed = WasmTestBed::new(&source) .map_err(|e| eyre::eyre!("Error creating WasmTestBed: {:?}", e))?; - generate_runtime_api_from_bytes( - item_mod, - &testbed.runtime_metadata_prefixed().encode(), - derives, - type_substitutes, - CratePath::default(), - false, - true, - ) + testbed.runtime_metadata_prefixed().encode() }, - } - .map_err(|e| eyre::eyre!("Error generating runtime api: {:?}", e))?; + }; + let metadata = Metadata::decode(&mut &raw_metadata[..]) + .map_err(|e| eyre::eyre!("Error decoding metadata: {:?}", e))?; + + let runtime_api = codegen_builder + .generate(metadata) + .map_err(|e| eyre::eyre!("Error generating runtime api: {:?}", e))?; print_runtime(runtime_api); diff --git a/zombienet/README.md b/zombienet/README.md index dfd88d487ec70248cf5f3418ad3706d95a51608d..b601154b624ce69ed921ea6c2453d17c4d37b6c8 100644 --- a/zombienet/README.md +++ b/zombienet/README.md @@ -1,24 +1,24 @@ -### Bridges Tests for Local Rococo <> Wococo Bridge +# Bridges Tests for Local Rococo <> Westend Bridge This folder contains [zombienet](https://github.com/paritytech/zombienet/) based integration tests for both onchain and offchain bridges code. Due to some -[technical diffuculties](https://github.com/paritytech/parity-bridges-common/pull/2649#issue-1965339051), we +[technical difficulties](https://github.com/paritytech/parity-bridges-common/pull/2649#issue-1965339051), we are using native zombienet provider, which means that you need to build some binaries locally. To start those tests, you need to: - download latest [zombienet release](https://github.com/paritytech/zombienet/releases); -- build polkadot binary by running `cargo build -p polkadot --release` command in the +- build Polkadot binary by running `cargo build -p polkadot --release --features fast-runtime` command in the [`polkadot-sdk`](https://github.com/paritytech/polkadot-sdk) repository clone; -- build polkadot binary by running `cargo build -p polkadot-parachain-bin --release` command in the +- build Polkadot Parachain binary by running `cargo build -p polkadot-parachain-bin --release` command in the [`polkadot-sdk`](https://github.com/paritytech/polkadot-sdk) repository clone; - ensure that you have [`node`](https://nodejs.org/en) installed. Additionally, we'll need globally installed `polkadot/api-cli` package (use `npm install -g @polkadot/api-cli@beta` to install it); -- build substrate relay by running `cargo build -p substrate-relay --release` command in the +- build Substrate relay by running `cargo build -p substrate-relay --release` command in the [`parity-bridges-common`](https://github.com/paritytech/parity-bridges-common) repository clone. - copy fresh `substrate-relay` binary, built in previous point, to the `~/local_bridge_testing/bin/substrate-relay`; diff --git a/zombienet/helpers/native-assets-balance-increased.js b/zombienet/helpers/native-assets-balance-increased.js new file mode 100644 index 0000000000000000000000000000000000000000..9ee1a769e9f2807ed7b73ca9c6aa4b89d5c135f9 --- /dev/null +++ b/zombienet/helpers/native-assets-balance-increased.js @@ -0,0 +1,20 @@ +async function run(nodeName, networkInfo, args) { + const {wsUri, userDefinedTypes} = networkInfo.nodesByName[nodeName]; + const api = await zombie.connect(wsUri, userDefinedTypes); + + const accountAddress = args[0]; + const initialAccountData = await api.query.system.account(accountAddress); + const initialAccountBalance = initialAccountData.data['free']; + while (true) { + const accountData = await api.query.system.account(accountAddress); + const accountBalance = accountData.data['free']; + if (accountBalance > initialAccountBalance) { + return accountBalance; + } + + // else sleep and retry + await new Promise((resolve) => setTimeout(resolve, 12000)); + } +} + +module.exports = { run } diff --git a/zombienet/helpers/wait-hrmp-channel-opened.js b/zombienet/helpers/wait-hrmp-channel-opened.js new file mode 100644 index 0000000000000000000000000000000000000000..e700cab1d7481d77631e55492e4b0032f4382028 --- /dev/null +++ b/zombienet/helpers/wait-hrmp-channel-opened.js @@ -0,0 +1,22 @@ +async function run(nodeName, networkInfo, args) { + const {wsUri, userDefinedTypes} = networkInfo.nodesByName[nodeName]; + const api = await zombie.connect(wsUri, userDefinedTypes); + + const sibling = args[0]; + + while (true) { + const messagingStateAsObj = await api.query.parachainSystem.relevantMessagingState(); + const messagingState = api.createType("Option", messagingStateAsObj); + if (messagingState.isSome) { + const egressChannels = messagingState.unwrap().egressChannels; + if (egressChannels.find(x => x[0] == sibling)) { + return; + } + } + + // else sleep and retry + await new Promise((resolve) => setTimeout(resolve, 12000)); + } +} + +module.exports = { run } diff --git a/zombienet/run-tests.sh b/zombienet/run-tests.sh index 1fdbc6b8d6111a1338c5629670fe6f417a6d23bd..34487e13261f375d0072817d667212d21b31f498 100755 --- a/zombienet/run-tests.sh +++ b/zombienet/run-tests.sh @@ -1,30 +1,68 @@ #!/bin/bash #set -eu +set -x shopt -s nullglob -trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT +trap "trap - SIGINT SIGTERM EXIT && kill -- -$$" SIGINT SIGTERM EXIT + +# whether to use paths for zombienet+bridges tests container or for local testing +ZOMBIENET_DOCKER_PATHS=0 +while [ $# -ne 0 ] +do + arg="$1" + case "$arg" in + --docker) + ZOMBIENET_DOCKER_PATHS=1 + ;; + esac + shift +done # assuming that we'll be using native provide && all processes will be executing locally # (we need absolute paths here, because they're used when scripts are called by zombienet from tmp folders) export POLKADOT_SDK_FOLDER=`realpath $(dirname "$0")/../..` export BRIDGE_TESTS_FOLDER=$POLKADOT_SDK_FOLDER/bridges/zombienet/tests -export POLKADOT_BINARY_PATH=$POLKADOT_SDK_FOLDER/target/release/polkadot -export POLKADOT_PARACHAIN_BINARY_PATH=$POLKADOT_SDK_FOLDER/target/release/polkadot-parachain -export POLKADOT_PARACHAIN_BINARY_PATH_FOR_ASSET_HUB_ROCOCO=$POLKADOT_PARACHAIN_BINARY_PATH -export POLKADOT_PARACHAIN_BINARY_PATH_FOR_ASSET_HUB_WOCOCO=$POLKADOT_PARACHAIN_BINARY_PATH -export ZOMBIENET_BINARY_PATH=~/local_bridge_testing/bin/zombienet-linux + +# set pathc to binaries +if [ "$ZOMBIENET_DOCKER_PATHS" -eq 1 ]; then + export POLKADOT_BINARY_PATH=/usr/local/bin/polkadot + export POLKADOT_PARACHAIN_BINARY_PATH=/usr/local/bin/polkadot-parachain + export POLKADOT_PARACHAIN_BINARY_PATH_FOR_ASSET_HUB_ROCOCO=/usr/local/bin/polkadot-parachain + export POLKADOT_PARACHAIN_BINARY_PATH_FOR_ASSET_HUB_WESTEND=/usr/local/bin/polkadot-parachain + + export SUBSTRATE_RELAY_PATH=/usr/local/bin/substrate-relay + export ZOMBIENET_BINARY_PATH=/usr/local/bin/zombie +else + export POLKADOT_BINARY_PATH=$POLKADOT_SDK_FOLDER/target/release/polkadot + export POLKADOT_PARACHAIN_BINARY_PATH=$POLKADOT_SDK_FOLDER/target/release/polkadot-parachain + export POLKADOT_PARACHAIN_BINARY_PATH_FOR_ASSET_HUB_ROCOCO=$POLKADOT_PARACHAIN_BINARY_PATH + export POLKADOT_PARACHAIN_BINARY_PATH_FOR_ASSET_HUB_WESTEND=$POLKADOT_PARACHAIN_BINARY_PATH + + export SUBSTRATE_RELAY_PATH=~/local_bridge_testing/bin/substrate-relay + export ZOMBIENET_BINARY_PATH=~/local_bridge_testing/bin/zombienet-linux +fi + +# check if `wait` supports -p flag +if [ `printf "$BASH_VERSION\n5.1" | sort -V | head -n 1` = "5.1" ]; then IS_BASH_5_1=1; else IS_BASH_5_1=0; fi + +# check if `wait` supports -p flag +if [ `printf "$BASH_VERSION\n5.1" | sort -V | head -n 1` = "5.1" ]; then IS_BASH_5_1=1; else IS_BASH_5_1=0; fi # bridge configuration -export LANE_ID="00000001" +export LANE_ID="00000002" # tests configuration -ALL_TESTS_FOLDER=`mktemp -d` +ALL_TESTS_FOLDER=`mktemp -d /tmp/bridges-zombienet-tests.XXXXX` function start_coproc() { local command=$1 local name=$2 local coproc_log=`mktemp -p $TEST_FOLDER` coproc COPROC { + # otherwise zombienet uses some hardcoded paths + unset RUN_IN_CONTAINER + unset ZOMBIENET_IMAGE + $command >$coproc_log 2>&1 } TEST_COPROCS[$COPROC_PID, 0]=$name @@ -66,12 +104,19 @@ do # wait until all tests are completed relay_exited=0 for n in `seq 1 $TEST_COPROCS_COUNT`; do - wait -n -p COPROC_PID - exit_code=$? - coproc_name=${TEST_COPROCS[$COPROC_PID, 0]} - coproc_log=${TEST_COPROCS[$COPROC_PID, 1]} - coproc_stdout=$(cat $coproc_log) - relay_exited=$(expr "${coproc_name}" == "relay") + if [ "$IS_BASH_5_1" -eq 1 ]; then + wait -n -p COPROC_PID + exit_code=$? + coproc_name=${TEST_COPROCS[$COPROC_PID, 0]} + coproc_log=${TEST_COPROCS[$COPROC_PID, 1]} + coproc_stdout=$(cat $coproc_log) + relay_exited=$(expr "${coproc_name}" == "relay") + else + wait -n + exit_code=$? + coproc_name="" + coproc_stdout="" + fi echo "Process $coproc_name has finished with exit code: $exit_code" # if exit code is not zero, exit @@ -80,6 +125,7 @@ do echo "=== Shutting down. Log of failed process below ===" echo "=====================================================================" echo $coproc_stdout + exit 1 fi diff --git a/zombienet/scripts/invoke-script.sh b/zombienet/scripts/invoke-script.sh index cb21d61ab91db7030553f8879a7d64abe527057a..6a3754a8824017e18409cde031be9a09e9392a75 100755 --- a/zombienet/scripts/invoke-script.sh +++ b/zombienet/scripts/invoke-script.sh @@ -1,5 +1,5 @@ #!/bin/bash pushd $POLKADOT_SDK_FOLDER/cumulus/scripts -./bridges_rococo_wococo.sh $1 +./bridges_rococo_westend.sh $1 popd diff --git a/zombienet/tests/0001-asset-transfer-works-rococo-to-westend.zndsl b/zombienet/tests/0001-asset-transfer-works-rococo-to-westend.zndsl new file mode 100644 index 0000000000000000000000000000000000000000..fe7dc26b001125342f449911c8808b9b9dcf5775 --- /dev/null +++ b/zombienet/tests/0001-asset-transfer-works-rococo-to-westend.zndsl @@ -0,0 +1,34 @@ +Description: User is able to transfer ROC from Rococo Asset Hub to Westend Asset Hub and back +Network: ../../../cumulus/zombienet/bridge-hubs/bridge_hub_westend_local_network.toml +Creds: config + +# step 1: initialize Westend AH +asset-hub-westend-collator1: run ../scripts/invoke-script.sh with "init-asset-hub-westend-local" within 240 seconds +asset-hub-westend-collator1: js-script ../helpers/wait-hrmp-channel-opened.js with "1002" within 400 seconds + +# step 2: initialize Westend bridge hub +bridge-hub-westend-collator1: run ../scripts/invoke-script.sh with "init-bridge-hub-westend-local" within 120 seconds + +# step 3: relay is started elsewhere - let's wait until with-Rococo GRANPDA pallet is initialized at Westend +bridge-hub-westend-collator1: js-script ../helpers/best-finalized-header-at-bridged-chain.js with "Rococo,0" within 400 seconds + +# step 4: send WND to //Alice on Rococo AH +# (that's a required part of a sibling 0001-asset-transfer-works-westend-to-rococo.zndsl test) +asset-hub-westend-collator1: run ../scripts/invoke-script.sh with "reserve-transfer-assets-from-asset-hub-westend-local" within 120 seconds + +# step 5: elsewhere Rococo has sent ROC to //Alice - let's wait for it +asset-hub-westend-collator1: js-script ../helpers/wrapped-assets-balance.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,0,Rococo" within 600 seconds + +# step 6: check that the relayer //Charlie is rewarded by both our AH and target AH +bridge-hub-westend-collator1: js-script ../helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000002,0x6268726f,BridgedChain,0" within 300 seconds +bridge-hub-westend-collator1: js-script ../helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000002,0x6268726F,ThisChain,0" within 300 seconds + +# step 7: send wROC back to Alice at Rococo AH +asset-hub-westend-collator1: run ../scripts/invoke-script.sh with "withdraw-reserve-assets-from-asset-hub-westend-local" within 120 seconds + +# step 8: elsewhere Rococo has sent wWND to //Alice - let's wait for it +# (we wait until //Alice account increases here - there are no other transactionc that may increase it) +asset-hub-westend-collator1: js-script ../helpers/native-assets-balance-increased.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" within 600 seconds + +# wait until other network test has completed OR exit with an error too +asset-hub-westend-collator1: run ../scripts/sync-exit.sh within 600 seconds diff --git a/zombienet/tests/0001-asset-transfer-works-rococo-to-wococo.zndsl b/zombienet/tests/0001-asset-transfer-works-rococo-to-wococo.zndsl deleted file mode 100644 index a1af2625c1ca569ce2e05310ead3cd14da2a9952..0000000000000000000000000000000000000000 --- a/zombienet/tests/0001-asset-transfer-works-rococo-to-wococo.zndsl +++ /dev/null @@ -1,25 +0,0 @@ -Description: User is able to transfer ROC from Rococo Asset Hub to Wococo Asset Hub -Network: ../../../cumulus/zombienet/bridge-hubs/bridge_hub_wococo_local_network.toml -Creds: config - -# step 1: initialize Wococo asset hub -asset-hub-wococo-collator1: run ../scripts/invoke-script.sh with "init-asset-hub-wococo-local" within 120 seconds - -# step 2: initialize Wococo bridge hub -bridge-hub-wococo-collator1: run ../scripts/invoke-script.sh with "init-bridge-hub-wococo-local" within 120 seconds - -# step 3: relay is started elsewhere - let's wait until with-Rococo GRANPDA pallet is initialized at Wococo -bridge-hub-wococo-collator1: js-script ../helpers/best-finalized-header-at-bridged-chain.js with "Rococo,0" within 400 seconds - -# step 2: send WOC to Rococo -asset-hub-wococo-collator1: run ../scripts/invoke-script.sh with "reserve-transfer-assets-from-asset-hub-wococo-local" within 60 seconds - -# step 3: elsewhere Rococo has sent ROC to //Alice - let's wait for it -asset-hub-wococo-collator1: js-script ../helpers/wrapped-assets-balance.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,0,Rococo" within 600 seconds - -# step 4: check that the relayer //Charlie is rewarded by both our AH and target AH -bridge-hub-wococo-collator1: js-script ../helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000001,0x6268726F,BridgedChain,0" within 300 seconds -bridge-hub-wococo-collator1: js-script ../helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000001,0x6268726F,ThisChain,0" within 300 seconds - -# wait until other network test has completed OR exit with an error too -asset-hub-wococo-collator1: run ../scripts/sync-exit.sh within 600 seconds diff --git a/zombienet/tests/0001-asset-transfer-works-westend-to-rococo.zndsl b/zombienet/tests/0001-asset-transfer-works-westend-to-rococo.zndsl new file mode 100644 index 0000000000000000000000000000000000000000..610b4ca7acdc372323f8781478722c0b9613d162 --- /dev/null +++ b/zombienet/tests/0001-asset-transfer-works-westend-to-rococo.zndsl @@ -0,0 +1,34 @@ +Description: User is able to transfer WND from Westend Asset Hub to Rococo Asset Hub and back +Network: ../../../cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml +Creds: config + +# step 1: initialize Rococo AH +asset-hub-rococo-collator1: run ../scripts/invoke-script.sh with "init-asset-hub-rococo-local" within 240 seconds +asset-hub-rococo-collator1: js-script ../helpers/wait-hrmp-channel-opened.js with "1013" within 400 seconds + +# step 2: initialize Rococo bridge hub +bridge-hub-rococo-collator1: run ../scripts/invoke-script.sh with "init-bridge-hub-rococo-local" within 120 seconds + +# step 3: relay is started elsewhere - let's wait until with-Westend GRANPDA pallet is initialized at Rococo +bridge-hub-rococo-collator1: js-script ../helpers/best-finalized-header-at-bridged-chain.js with "Westend,0" within 400 seconds + +# step 4: send ROC to //Alice on Westend AH +# (that's a required part of a sibling 0001-asset-transfer-works-rococo-to-westend.zndsl test) +asset-hub-rococo-collator1: run ../scripts/invoke-script.sh with "reserve-transfer-assets-from-asset-hub-rococo-local" within 120 seconds + +# step 5: elsewhere Westend has sent WND to //Alice - let's wait for it +asset-hub-rococo-collator1: js-script ../helpers/wrapped-assets-balance.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,0,Westend" within 600 seconds + +# step 6: check that the relayer //Charlie is rewarded by both our AH and target AH +bridge-hub-rococo-collator1: js-script ../helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000002,0x62687764,BridgedChain,0" within 300 seconds +bridge-hub-rococo-collator1: js-script ../helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000002,0x62687764,ThisChain,0" within 300 seconds + +# step 7: send wWND back to Alice at Westend AH +asset-hub-rococo-collator1: run ../scripts/invoke-script.sh with "withdraw-reserve-assets-from-asset-hub-rococo-local" within 120 seconds + +# step 8: elsewhere Westend has sent wROC to //Alice - let's wait for it +# (we wait until //Alice account increases here - there are no other transactionc that may increase it) +asset-hub-rococo-collator1: js-script ../helpers/native-assets-balance-increased.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" within 600 seconds + +# wait until other network test has completed OR exit with an error too +asset-hub-rococo-collator1: run ../scripts/sync-exit.sh within 600 seconds diff --git a/zombienet/tests/0001-asset-transfer-works-wococo-to-rococo.zndsl b/zombienet/tests/0001-asset-transfer-works-wococo-to-rococo.zndsl deleted file mode 100644 index ad2446d58ce743d063246e42ea2e378e753a78bc..0000000000000000000000000000000000000000 --- a/zombienet/tests/0001-asset-transfer-works-wococo-to-rococo.zndsl +++ /dev/null @@ -1,25 +0,0 @@ -Description: User is able to transfer WOC from Wococo Asset Hub to Rococo Asset Hub -Network: ../../../cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml -Creds: config - -# step 1: initialize Rococo asset hub -asset-hub-rococo-collator1: run ../scripts/invoke-script.sh with "init-asset-hub-rococo-local" within 120 seconds - -# step 2: initialize Rococo bridge hub -bridge-hub-rococo-collator1: run ../scripts/invoke-script.sh with "init-bridge-hub-rococo-local" within 120 seconds - -# step 3: relay is started elsewhere - let's wait until with-Wococo GRANPDA pallet is initialized at Rococo -bridge-hub-rococo-collator1: js-script ../helpers/best-finalized-header-at-bridged-chain.js with "Wococo,0" within 400 seconds - -# step 4: send ROC to Wococo -asset-hub-rococo-collator1: run ../scripts/invoke-script.sh with "reserve-transfer-assets-from-asset-hub-rococo-local" within 60 seconds - -# step 5: elsewhere Wococo has sent WOC to //Alice - let's wait for it -asset-hub-rococo-collator1: js-script ../helpers/wrapped-assets-balance.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,0,Wococo" within 600 seconds - -# step 6: check that the relayer //Charlie is rewarded by both our AH and target AH -bridge-hub-rococo-collator1: js-script ../helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000001,0x6268776F,BridgedChain,0" within 300 seconds -bridge-hub-rococo-collator1: js-script ../helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000001,0x6268776F,ThisChain,0" within 300 seconds - -# wait until other network test has completed OR exit with an error too -asset-hub-rococo-collator1: run ../scripts/sync-exit.sh within 600 seconds diff --git a/zombienet/tests/0001-start-relay.sh b/zombienet/tests/0001-start-relay.sh old mode 100644 new mode 100755 index fc231fba89595112e84353db36086cf426fd08c3..7be2cf4d5938797b98b86e8abf08ae43a5cee449 --- a/zombienet/tests/0001-start-relay.sh +++ b/zombienet/tests/0001-start-relay.sh @@ -1,5 +1,5 @@ #!/bin/bash pushd $POLKADOT_SDK_FOLDER/cumulus/scripts -./bridges_rococo_wococo.sh run-relay +./bridges_rococo_westend.sh run-relay popd