diff --git a/.maintain/millau-weight-template.hbs b/.maintain/millau-weight-template.hbs index aee1379933..ac5c6b85b9 100644 --- a/.maintain/millau-weight-template.hbs +++ b/.maintain/millau-weight-template.hbs @@ -57,21 +57,21 @@ impl WeightInfo for BridgeWeight { {{~#each benchmark.components as |c| ~}} {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} ) -> Weight { - ({{underscore benchmark.base_weight}} as Weight) + Weight::from_ref_time({{underscore benchmark.base_weight}} as u64) {{~#each benchmark.component_weight as |cw|}} - .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)) + .saturating_add(Weight::from_ref_time({{underscore cw.slope}} as u64).saturating_mul({{cw.name}} as u64)) {{~/each}} {{~#if (ne benchmark.base_reads "0")}} - .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight)) + .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as u64)) {{~/if}} {{~#each benchmark.component_reads as |cr|}} - .saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight))) + .saturating_add(T::DbWeight::get().reads(({{cr.slope}} as u64).saturating_mul({{cr.name}} as u64))) {{~/each}} {{~#if (ne benchmark.base_writes "0")}} - .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight)) + .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as u64)) {{~/if}} {{~#each benchmark.component_writes as |cw|}} - .saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))) + .saturating_add(T::DbWeight::get().writes(({{cw.slope}} as u64).saturating_mul({{cw.name}} as u64))) {{~/each}} } {{~/each}} @@ -85,21 +85,21 @@ impl WeightInfo for () { {{~#each benchmark.components as |c| ~}} {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} ) -> Weight { - ({{underscore benchmark.base_weight}} as Weight) + Weight::from_ref_time({{underscore benchmark.base_weight}} as u64) {{~#each benchmark.component_weight as |cw|}} - .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)) + .saturating_add(Weight::from_ref_time({{underscore cw.slope}} as u64).saturating_mul({{cw.name}} as u64)) {{~/each}} {{~#if (ne benchmark.base_reads "0")}} - .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as Weight)) + .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as u64)) {{~/if}} {{~#each benchmark.component_reads as |cr|}} - .saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight))) + .saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as u64).saturating_mul({{cr.name}} as u64))) {{~/each}} {{~#if (ne benchmark.base_writes "0")}} - .saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as Weight)) + .saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as u64)) {{~/if}} {{~#each benchmark.component_writes as |cw|}} - .saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))) + .saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as u64).saturating_mul({{cw.name}} as u64))) {{~/each}} } {{~/each}} diff --git a/Cargo.lock b/Cargo.lock index bf19953dfb..a1e55eadeb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -127,6 +127,12 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "510c76ecefdceada737ea728f4f9a84bd2e1ef29f1ba555e560940fe279954de" +[[package]] +name = "array-bytes" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a913633b0c922e6b745072795f50d90ebea78ba31a57e2ac8c2fc7b50950949" + [[package]] name = "array_tool" version = "1.0.3" @@ -423,6 +429,12 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +[[package]] +name = "base64ct" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2b2456fd614d856680dcd9fcc660a51a820fa09daef2e49772b56a193c8474" + [[package]] name = "beef" version = "0.5.1" @@ -435,14 +447,14 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "array-bytes", "async-trait", "beefy-primitives", "fnv", "futures", "futures-timer", - "hex", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -452,6 +464,7 @@ dependencies = [ "sc-finality-grandpa", "sc-keystore", "sc-network", + "sc-network-common", "sc-network-gossip", "sc-utils", "sp-api", @@ -471,7 +484,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -491,22 +504,25 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "beefy-primitives", "sp-api", + "sp-runtime", ] [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", "sp-core", + "sp-io", + "sp-mmr-primitives", "sp-runtime", "sp-std", ] @@ -528,9 +544,9 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.59.2" +version = "0.60.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8" +checksum = "062dddbc1ba4aca46de6338e2bf87771414c335f7b2f2036e8f3e9befebf88e6" dependencies = [ "bitflags", "cexpr", @@ -553,9 +569,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitvec" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1489fcb93a5bb47da0462ca93ad252ad6af2145cce58d10d46a83931ba9f016b" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ "funty", "radium", @@ -738,12 +754,12 @@ version = "0.1.0" dependencies = [ "bp-messages", "bp-runtime", - "fixed-hash", + "fixed-hash 0.7.0", "frame-support", "frame-system", "hash256-std-hasher", "impl-codec", - "impl-serde", + "impl-serde 0.3.2", "parity-util-mem", "scale-info", "serde", @@ -963,9 +979,9 @@ checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c" [[package]] name = "byte-slice-cast" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d30c751592b77c499e7bce34d99d67c2c11bdc0574e9a488ddade14150a4698" +checksum = "87c5fdd0166095e1d463fc6cc01aa8ce547ad77a4e84d42eb6762b084e28067e" [[package]] name = "byte-tools" @@ -1057,6 +1073,15 @@ dependencies = [ "nom", ] +[[package]] +name = "cfg-expr" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aacacf4d96c24b2ad6eb8ee6df040e4f27b0d0b39a5710c30091baa830485db" +dependencies = [ + "smallvec", +] + [[package]] name = "cfg-if" version = "0.1.10" @@ -1152,7 +1177,7 @@ checksum = "fa66045b9cb23c2e9c1520732030608b02ee07e5cfaa5a521ec15ded7fa24c90" dependencies = [ "glob", "libc", - "libloading 0.7.2", + "libloading", ] [[package]] @@ -1172,9 +1197,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.18" +version = "3.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15f2ea93df33549dbe2e8eecd1ca55269d63ae0b3ba1f55db030817d1c2867f" +checksum = "86447ad904c7fb335a790c9d7fe3d0d971dc523b8ccd1561a520de9a85302750" dependencies = [ "atty", "bitflags", @@ -1184,7 +1209,7 @@ dependencies = [ "once_cell", "strsim 0.10.0", "termcolor", - "textwrap 0.15.0", + "textwrap 0.15.1", ] [[package]] @@ -1313,19 +1338,21 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.85.3" +version = "0.88.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "749d0d6022c9038dccf480bdde2a38d435937335bf2bb0f14e815d94517cdce8" +checksum = "44409ccf2d0f663920cab563d2b79fcd6b2e9a2bcc6e929fef76c8f82ad6c17a" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.85.3" +version = "0.88.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94370cc7b37bf652ccd8bb8f09bd900997f7ccf97520edfc75554bb5c4abbea" +checksum = "98de2018ad96eb97f621f7d6b900a0cc661aec8d02ea4a50e56ecb48e5a2fcaf" dependencies = [ + "arrayvec 0.7.2", + "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", @@ -1340,33 +1367,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.85.3" +version = "0.88.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a3cea8fdab90e44018c5b9a1dfd460d8ee265ac354337150222a354628bdb6" +checksum = "5287ce36e6c4758fbaf298bd1a8697ad97a4f2375a3d1b61142ea538db4877e5" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.85.3" +version = "0.88.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ac72f76f2698598951ab26d8c96eaa854810e693e7dd52523958b5909fde6b2" +checksum = "2855c24219e2f08827f3f4ffb2da92e134ae8d8ecc185b11ec8f9878cf5f588e" [[package]] name = "cranelift-entity" -version = "0.85.3" +version = "0.88.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09eaeacfcd2356fe0e66b295e8f9d59fdd1ac3ace53ba50de14d628ec902f72d" +checksum = "0b65673279d75d34bf11af9660ae2dbd1c22e6d28f163f5c72f4e1dc56d56103" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.85.3" +version = "0.88.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dba69c9980d5ffd62c18a2bde927855fcd7c8dc92f29feaf8636052662cbd99c" +checksum = "3ed2b3d7a4751163f6c4a349205ab1b7d9c00eecf19dcea48592ef1f7688eefc" dependencies = [ "cranelift-codegen", "log", @@ -1376,15 +1403,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.85.3" +version = "0.88.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2920dc1e05cac40304456ed3301fde2c09bd6a9b0210bcfa2f101398d628d5b" +checksum = "3be64cecea9d90105fc6a2ba2d003e98c867c1d6c4c86cc878f97ad9fb916293" [[package]] name = "cranelift-native" -version = "0.85.3" +version = "0.88.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04dfa45f9b2a6f587c564d6b63388e00cd6589d2df6ea2758cf79e1a13285e6" +checksum = "c4a03a6ac1b063e416ca4b93f6247978c991475e8271465340caa6f92f3c16a4" dependencies = [ "cranelift-codegen", "libc", @@ -1393,9 +1420,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.85.3" +version = "0.88.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31a46513ae6f26f3f267d8d75b5373d555fbbd1e68681f348d99df43f747ec54" +checksum = "c699873f7b30bc5f20dd03a796b4183e073a46616c91704792ec35e45d13f913" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1551,9 +1578,9 @@ dependencies = [ [[package]] name = "cumulus-client-cli" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#516669814078a308e8de659979aa0f97e8d67eff" +source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#c446b6321ba3440dd44a56fd97bcb0453621f077" dependencies = [ - "clap 3.2.18", + "clap 3.2.22", "parity-scale-codec", "sc-chain-spec", "sc-cli", @@ -1566,12 +1593,11 @@ dependencies = [ [[package]] name = "cumulus-client-collator" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#516669814078a308e8de659979aa0f97e8d67eff" +source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#c446b6321ba3440dd44a56fd97bcb0453621f077" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", "cumulus-primitives-core", - "cumulus-relay-chain-interface", "futures", "parity-scale-codec", "parking_lot 0.12.1", @@ -1590,7 +1616,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-aura" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#516669814078a308e8de659979aa0f97e8d67eff" +source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#c446b6321ba3440dd44a56fd97bcb0453621f077" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -1619,7 +1645,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#516669814078a308e8de659979aa0f97e8d67eff" +source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#c446b6321ba3440dd44a56fd97bcb0453621f077" dependencies = [ "async-trait", "cumulus-relay-chain-interface", @@ -1629,7 +1655,6 @@ dependencies = [ "polkadot-primitives", "sc-client-api", "sc-consensus", - "sp-api", "sp-blockchain", "sp-consensus", "sp-runtime", @@ -1640,11 +1665,10 @@ dependencies = [ [[package]] name = "cumulus-client-network" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#516669814078a308e8de659979aa0f97e8d67eff" +source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#c446b6321ba3440dd44a56fd97bcb0453621f077" dependencies = [ "async-trait", "cumulus-relay-chain-interface", - "derive_more", "futures", "futures-timer", "parity-scale-codec", @@ -1653,7 +1677,6 @@ dependencies = [ "polkadot-parachain", "polkadot-primitives", "sc-client-api", - "sp-api", "sp-blockchain", "sp-consensus", "sp-core", @@ -1665,7 +1688,7 @@ dependencies = [ [[package]] name = "cumulus-client-pov-recovery" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#516669814078a308e8de659979aa0f97e8d67eff" +source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#c446b6321ba3440dd44a56fd97bcb0453621f077" dependencies = [ "cumulus-primitives-core", "cumulus-relay-chain-interface", @@ -1679,7 +1702,6 @@ dependencies = [ "rand 0.8.5", "sc-client-api", "sc-consensus", - "sp-api", "sp-consensus", "sp-maybe-compressed-blob", "sp-runtime", @@ -1689,7 +1711,7 @@ dependencies = [ [[package]] name = "cumulus-client-service" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#516669814078a308e8de659979aa0f97e8d67eff" +source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#c446b6321ba3440dd44a56fd97bcb0453621f077" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", @@ -1698,34 +1720,27 @@ dependencies = [ "cumulus-primitives-core", "cumulus-relay-chain-interface", "parking_lot 0.12.1", - "polkadot-overseer", "polkadot-primitives", "sc-client-api", "sc-consensus", - "sc-consensus-babe", "sc-service", - "sc-telemetry", - "sc-tracing", "sp-api", "sp-blockchain", "sp-consensus", "sp-core", "sp-runtime", - "tracing", ] [[package]] name = "cumulus-pallet-aura-ext" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#516669814078a308e8de659979aa0f97e8d67eff" +source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#c446b6321ba3440dd44a56fd97bcb0453621f077" dependencies = [ - "frame-executive", "frame-support", "frame-system", "pallet-aura", "parity-scale-codec", "scale-info", - "serde", "sp-application-crypto", "sp-consensus-aura", "sp-runtime", @@ -1735,25 +1750,23 @@ dependencies = [ [[package]] name = "cumulus-pallet-dmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#516669814078a308e8de659979aa0f97e8d67eff" +source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#c446b6321ba3440dd44a56fd97bcb0453621f077" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", - "log", "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", "sp-std", "xcm", - "xcm-executor", ] [[package]] name = "cumulus-pallet-parachain-system" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#516669814078a308e8de659979aa0f97e8d67eff" +source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#c446b6321ba3440dd44a56fd97bcb0453621f077" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", @@ -1764,11 +1777,9 @@ dependencies = [ "frame-system", "impl-trait-for-tuples", "log", - "pallet-balances", "parity-scale-codec", "polkadot-parachain", "scale-info", - "serde", "sp-core", "sp-externalities", "sp-inherents", @@ -1778,13 +1789,12 @@ dependencies = [ "sp-std", "sp-trie", "sp-version", - "xcm", ] [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#516669814078a308e8de659979aa0f97e8d67eff" +source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#c446b6321ba3440dd44a56fd97bcb0453621f077" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1795,14 +1805,13 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcm" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#516669814078a308e8de659979aa0f97e8d67eff" +source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#c446b6321ba3440dd44a56fd97bcb0453621f077" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "serde", "sp-io", "sp-runtime", "sp-std", @@ -1812,7 +1821,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#516669814078a308e8de659979aa0f97e8d67eff" +source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#c446b6321ba3440dd44a56fd97bcb0453621f077" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1832,9 +1841,8 @@ dependencies = [ [[package]] name = "cumulus-primitives-core" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#516669814078a308e8de659979aa0f97e8d67eff" +source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#c446b6321ba3440dd44a56fd97bcb0453621f077" dependencies = [ - "frame-support", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain", @@ -1848,7 +1856,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#516669814078a308e8de659979aa0f97e8d67eff" +source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#c446b6321ba3440dd44a56fd97bcb0453621f077" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1871,7 +1879,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-timestamp" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#516669814078a308e8de659979aa0f97e8d67eff" +source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#c446b6321ba3440dd44a56fd97bcb0453621f077" dependencies = [ "cumulus-primitives-core", "futures", @@ -1884,7 +1892,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-inprocess-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#516669814078a308e8de659979aa0f97e8d67eff" +source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#c446b6321ba3440dd44a56fd97bcb0453621f077" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1896,39 +1904,31 @@ dependencies = [ "polkadot-service", "sc-cli", "sc-client-api", - "sc-consensus-babe", - "sc-network", "sc-sysinfo", "sc-telemetry", "sc-tracing", "sp-api", - "sp-blockchain", "sp-consensus", "sp-core", "sp-runtime", "sp-state-machine", - "tracing", ] [[package]] name = "cumulus-relay-chain-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#516669814078a308e8de659979aa0f97e8d67eff" +source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#c446b6321ba3440dd44a56fd97bcb0453621f077" dependencies = [ "async-trait", "cumulus-primitives-core", - "derive_more", "futures", "jsonrpsee-core", "parity-scale-codec", - "parking_lot 0.12.1", "polkadot-overseer", "polkadot-service", "sc-client-api", "sp-api", "sp-blockchain", - "sp-core", - "sp-runtime", "sp-state-machine", "thiserror", ] @@ -1936,7 +1936,7 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#516669814078a308e8de659979aa0f97e8d67eff" +source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#c446b6321ba3440dd44a56fd97bcb0453621f077" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", @@ -2393,27 +2393,27 @@ dependencies = [ [[package]] name = "ethbloom" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11da94e443c60508eb62cf256243a64da87304c2802ac2528847f79d750007ef" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", - "fixed-hash", + "fixed-hash 0.8.0", "impl-rlp", - "impl-serde", + "impl-serde 0.4.0", "tiny-keccak", ] [[package]] name = "ethereum-types" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2827b94c556145446fcce834ca86b7abf0c39a805883fe20e72c5bfdb5a0dc6" +checksum = "81224dc661606574f5a0f28c9947d0ee1d93ff11c5f1c4e7272f52e8c0b5483c" dependencies = [ "ethbloom", - "fixed-hash", + "fixed-hash 0.8.0", "impl-rlp", - "impl-serde", + "impl-serde 0.4.0", "primitive-types", "uint", ] @@ -2588,6 +2588,18 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", +] + [[package]] name = "fixedbitset" version = "0.4.0" @@ -2616,25 +2628,24 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "parity-scale-codec", ] [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" dependencies = [ - "matches", "percent-encoding", ] [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-support", "frame-system", @@ -2657,11 +2668,12 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "Inflector", + "array-bytes", "chrono", - "clap 3.2.18", + "clap 3.2.22", "comfy-table", "frame-benchmarking", "frame-support", @@ -2669,7 +2681,6 @@ dependencies = [ "gethostname", "handlebars", "hash-db", - "hex", "itertools", "kvdb", "lazy_static", @@ -2708,7 +2719,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2719,7 +2730,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2735,7 +2746,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-support", "frame-system", @@ -2763,7 +2774,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "bitflags", "frame-metadata", @@ -2788,16 +2799,19 @@ dependencies = [ "sp-state-machine", "sp-std", "sp-tracing", + "sp-weights", "tt-call", ] [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "Inflector", + "cfg-expr", "frame-support-procedural-tools", + "itertools", "proc-macro2", "quote", "syn", @@ -2806,7 +2820,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2818,7 +2832,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "proc-macro2", "quote", @@ -2828,7 +2842,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-support", "log", @@ -2840,12 +2854,13 @@ dependencies = [ "sp-runtime", "sp-std", "sp-version", + "sp-weights", ] [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-benchmarking", "frame-support", @@ -2860,7 +2875,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "parity-scale-codec", "sp-api", @@ -2869,9 +2884,10 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-support", + "parity-scale-codec", "sp-api", "sp-runtime", "sp-std", @@ -2883,18 +2899,6 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ebd3504ad6116843b8375ad70df74e7bfe83cac77a1f3fe73200c844d43bfe0" -[[package]] -name = "fs-swap" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d47dad3685eceed8488986cad3d5027165ea5edb164331770e2059555f10a5" -dependencies = [ - "lazy_static", - "libc", - "libloading 0.5.2", - "winapi", -] - [[package]] name = "fs2" version = "0.4.3" @@ -3213,15 +3217,6 @@ dependencies = [ "crunchy", ] -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash", -] - [[package]] name = "hashbrown" version = "0.12.3" @@ -3425,6 +3420,16 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "idna" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "if-addrs" version = "0.7.0" @@ -3480,6 +3485,15 @@ dependencies = [ "serde", ] +[[package]] +name = "impl-serde" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +dependencies = [ + "serde", +] + [[package]] name = "impl-trait-for-tuples" version = "0.2.2" @@ -3498,7 +3512,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg", - "hashbrown 0.12.3", + "hashbrown", "serde", ] @@ -3526,12 +3540,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "io-lifetimes" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec58677acfea8a15352d42fc87d11d63596ade9239e0a7c9352914417515dbe6" - [[package]] name = "io-lifetimes" version = "0.7.3" @@ -3805,8 +3813,8 @@ checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" [[package]] name = "kusama-runtime" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "beefy-primitives", "bitvec", @@ -3826,9 +3834,11 @@ dependencies = [ "pallet-bounties", "pallet-child-bounties", "pallet-collective", + "pallet-conviction-voting", "pallet-democracy", "pallet-election-provider-multi-phase", "pallet-elections-phragmen", + "pallet-fast-unstake", "pallet-gilt", "pallet-grandpa", "pallet-identity", @@ -3841,7 +3851,9 @@ dependencies = [ "pallet-offences", "pallet-preimage", "pallet-proxy", + "pallet-ranked-collective", "pallet-recovery", + "pallet-referenda", "pallet-scheduler", "pallet-session", "pallet-society", @@ -3854,6 +3866,7 @@ dependencies = [ "pallet-treasury", "pallet-utility", "pallet-vesting", + "pallet-whitelist", "pallet-xcm", "parity-scale-codec", "polkadot-primitives", @@ -3890,8 +3903,8 @@ dependencies = [ [[package]] name = "kusama-runtime-constants" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "frame-support", "polkadot-primitives", @@ -3911,9 +3924,9 @@ dependencies = [ [[package]] name = "kvdb" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a301d8ecb7989d4a6e2c57a49baca77d353bdbf879909debe3f375fe25d61f86" +checksum = "585089ceadba0197ffe9af6740ab350b325e3c1f5fccfbc3522e0250c750409b" dependencies = [ "parity-util-mem", "smallvec", @@ -3921,9 +3934,9 @@ dependencies = [ [[package]] name = "kvdb-memorydb" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece7e668abd21387aeb6628130a6f4c802787f014fa46bc83221448322250357" +checksum = "40d109c87bfb7759edd2a49b2649c1afe25af785d930ad6a38479b4dc70dd873" dependencies = [ "kvdb", "parity-util-mem", @@ -3932,15 +3945,13 @@ dependencies = [ [[package]] name = "kvdb-rocksdb" -version = "0.15.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca7fbdfd71cd663dceb0faf3367a99f8cf724514933e9867cec4995b6027cbc1" +checksum = "c076cc2cdbac89b9910c853a36c957d3862a779f31c2661174222cefb49ee597" dependencies = [ - "fs-swap", "kvdb", "log", "num_cpus", - "owning_ref", "parity-util-mem", "parking_lot 0.12.1", "regex", @@ -3966,16 +3977,6 @@ version = "0.2.132" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5" -[[package]] -name = "libloading" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" -dependencies = [ - "cc", - "winapi", -] - [[package]] name = "libloading" version = "0.7.2" @@ -4060,8 +4061,8 @@ dependencies = [ "libp2p-request-response", "libp2p-swarm", "log", - "prost", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "rand 0.8.5", ] @@ -4087,8 +4088,8 @@ dependencies = [ "multistream-select", "parking_lot 0.12.1", "pin-project", - "prost", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "rand 0.8.5", "ring", "rw-stream-sink", @@ -4138,8 +4139,8 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log", - "prost", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "rand 0.7.3", "smallvec", ] @@ -4162,8 +4163,8 @@ dependencies = [ "libp2p-swarm", "log", "prometheus-client", - "prost", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "rand 0.7.3", "regex", "sha2 0.10.5", @@ -4185,8 +4186,8 @@ dependencies = [ "libp2p-swarm", "log", "lru 0.7.8", - "prost", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "prost-codec", "smallvec", "thiserror", @@ -4210,8 +4211,8 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log", - "prost", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "rand 0.7.3", "sha2 0.10.5", "smallvec", @@ -4288,8 +4289,8 @@ dependencies = [ "lazy_static", "libp2p-core", "log", - "prost", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "rand 0.8.5", "sha2 0.10.5", "snow", @@ -4325,8 +4326,8 @@ dependencies = [ "futures", "libp2p-core", "log", - "prost", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "unsigned-varint", "void", ] @@ -4361,8 +4362,8 @@ dependencies = [ "libp2p-swarm", "log", "pin-project", - "prost", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "prost-codec", "rand 0.8.5", "smallvec", @@ -4385,8 +4386,8 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log", - "prost", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "rand 0.8.5", "sha2 0.10.5", "thiserror", @@ -4519,9 +4520,9 @@ dependencies = [ [[package]] name = "librocksdb-sys" -version = "0.6.1+6.28.2" +version = "0.8.0+7.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bc587013734dadb7cf23468e531aa120788b87243648be42e2d3a072186291" +checksum = "611804e4666a25136fcc5f8cf425ab4d26c7f74ea245ffe92ea23b85b6420b5d" dependencies = [ "bindgen", "bzip2-sys", @@ -4617,12 +4618,6 @@ dependencies = [ "statrs", ] -[[package]] -name = "linux-raw-sys" -version = "0.0.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5284f00d480e1c39af34e72f8ad60b94f47007e3481cd3b731c1d67190ddc7b7" - [[package]] name = "linux-raw-sys" version = "0.0.46" @@ -4650,20 +4645,20 @@ dependencies = [ [[package]] name = "lru" -version = "0.6.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ea2d928b485416e8908cff2d97d621db22b27f7b3b6729e438bcf42c671ba91" +checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" dependencies = [ - "hashbrown 0.11.2", + "hashbrown", ] [[package]] name = "lru" -version = "0.7.8" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" +checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" dependencies = [ - "hashbrown 0.12.3", + "hashbrown", ] [[package]] @@ -4748,11 +4743,11 @@ checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" [[package]] name = "memfd" -version = "0.4.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6627dc657574b49d6ad27105ed671822be56e0d2547d413bfbf3e8d8fa92e7a" +checksum = "480b5a5de855d11ff13195950bdc8b98b5e942ef47afc447f6615cdcc4e15d80" dependencies = [ - "libc", + "rustix", ] [[package]] @@ -4785,29 +4780,29 @@ dependencies = [ [[package]] name = "memory-db" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6566c70c1016f525ced45d7b7f97730a2bafb037c788211d0c186ef5b2189f0a" +checksum = "34ac11bb793c28fa095b7554466f53b3a60a2cd002afdac01bcf135cbd73a269" dependencies = [ "hash-db", - "hashbrown 0.12.3", + "hashbrown", "parity-util-mem", ] [[package]] name = "memory-lru" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beeb98b3d1ed2c0054bd81b5ba949a0243c3ccad751d45ea898fa8059fa2860a" +checksum = "ce95ae042940bad7e312857b929ee3d11b8f799a80cb7b9c7ec5125516906395" dependencies = [ - "lru 0.6.6", + "lru 0.8.1", ] [[package]] name = "memory_units" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" +checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" [[package]] name = "merlin" @@ -4857,7 +4852,7 @@ dependencies = [ "beefy-gadget", "beefy-gadget-rpc", "beefy-primitives", - "clap 3.2.18", + "clap 3.2.22", "frame-benchmarking", "frame-benchmarking-cli", "jsonrpsee", @@ -4996,12 +4991,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "more-asserts" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" - [[package]] name = "multiaddr" version = "0.14.0" @@ -5206,9 +5195,9 @@ dependencies = [ [[package]] name = "node-inspect" version = "0.9.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ - "clap 3.2.18", + "clap 3.2.22", "parity-scale-codec", "sc-cli", "sc-client-api", @@ -5263,6 +5252,17 @@ dependencies = [ "num-traits", ] +[[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.0" @@ -5299,7 +5299,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" dependencies = [ "autocfg", - "num-bigint", + "num-bigint 0.2.6", "num-integer", "num-traits", ] @@ -5311,6 +5311,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" dependencies = [ "autocfg", + "num-bigint 0.4.3", "num-integer", "num-traits", ] @@ -5355,12 +5356,12 @@ dependencies = [ [[package]] name = "object" -version = "0.28.4" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" +checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" dependencies = [ "crc32fast", - "hashbrown 0.11.2", + "hashbrown", "indexmap", "memchr", ] @@ -5404,8 +5405,9 @@ dependencies = [ [[package]] name = "orchestra" -version = "0.0.1" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aab54694ddaa8a9b703724c6ef04272b2d27bc32d2c855aae5cdd1857216b43" dependencies = [ "async-trait", "dyn-clonable", @@ -5420,8 +5422,9 @@ dependencies = [ [[package]] name = "orchestra-proc-macro" -version = "0.0.1" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a702b2f6bf592b3eb06c00d80d05afaf7a8eff6b41bb361e397d799acc21b45a" dependencies = [ "expander 0.0.6", "itertools", @@ -5459,7 +5462,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-support", "frame-system", @@ -5475,7 +5478,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-support", "frame-system", @@ -5491,7 +5494,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-support", "frame-system", @@ -5506,7 +5509,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-benchmarking", "frame-support", @@ -5530,22 +5533,27 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "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", + "sp-tracing", ] [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-benchmarking", "frame-support", @@ -5560,7 +5568,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "beefy-primitives", "frame-support", @@ -5576,13 +5584,13 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "array-bytes", "beefy-merkle-tree", "beefy-primitives", "frame-support", "frame-system", - "hex", "log", "pallet-beefy", "pallet-mmr", @@ -5599,8 +5607,9 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "log", @@ -5704,8 +5713,9 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "log", @@ -5722,7 +5732,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-benchmarking", "frame-support", @@ -5736,17 +5746,36 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-conviction-voting" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" +dependencies = [ + "assert_matches", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "serde", + "sp-core", "sp-io", "sp-runtime", "sp-std", @@ -5755,13 +5784,14 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-support", "frame-system", "log", + "pallet-election-provider-support-benchmarking", "parity-scale-codec", "rand 0.7.3", "scale-info", @@ -5775,11 +5805,25 @@ dependencies = [ "strum 0.24.1", ] +[[package]] +name = "pallet-election-provider-support-benchmarking" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" +dependencies = [ + "frame-benchmarking", + "frame-election-provider-support", + "frame-system", + "parity-scale-codec", + "sp-npos-elections", + "sp-runtime", +] + [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "log", @@ -5792,10 +5836,31 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-fast-unstake" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" +dependencies = [ + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "log", + "pallet-balances", + "pallet-staking", + "pallet-timestamp", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", +] + [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-benchmarking", "frame-support", @@ -5810,7 +5875,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-benchmarking", "frame-support", @@ -5833,7 +5898,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5849,8 +5914,9 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "log", @@ -5868,8 +5934,9 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", @@ -5884,7 +5951,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-benchmarking", "frame-support", @@ -5901,7 +5968,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5919,7 +5986,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -5934,10 +6001,12 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-io", @@ -5948,7 +6017,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-support", "frame-system", @@ -5965,7 +6034,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "parity-scale-codec", "sp-api", @@ -5975,7 +6044,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-support", "frame-system", @@ -5992,11 +6061,12 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-core", @@ -6008,8 +6078,9 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", @@ -6022,7 +6093,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-support", "frame-system", @@ -6033,16 +6104,51 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-ranked-collective" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-referenda" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", + "serde", + "sp-arithmetic", "sp-io", "sp-runtime", "sp-std", @@ -6051,7 +6157,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-benchmarking", "frame-support", @@ -6067,7 +6173,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-support", "frame-system", @@ -6103,7 +6209,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-support", "frame-system", @@ -6117,8 +6223,9 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "frame-benchmarking", "frame-election-provider-support", "frame-support", "frame-system", @@ -6138,7 +6245,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -6149,7 +6256,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "log", "sp-arithmetic", @@ -6158,7 +6265,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-support", "frame-system", @@ -6172,7 +6279,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-benchmarking", "frame-support", @@ -6190,8 +6297,9 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "log", @@ -6208,7 +6316,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-support", "frame-system", @@ -6224,7 +6332,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6239,7 +6347,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6250,8 +6358,9 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "impl-trait-for-tuples", @@ -6266,8 +6375,9 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", @@ -6281,8 +6391,9 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "log", @@ -6292,10 +6403,25 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-whitelist" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-xcm" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "frame-support", "frame-system", @@ -6314,14 +6440,13 @@ dependencies = [ [[package]] name = "parachain-info" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#516669814078a308e8de659979aa0f97e8d67eff" +source = "git+https://github.com/paritytech/cumulus?branch=gav-xcm-v3#c446b6321ba3440dd44a56fd97bcb0453621f077" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "serde", ] [[package]] @@ -6361,9 +6486,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.1.5" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9182e4a71cae089267ab03e67c99368db7cd877baf50f931e5d6d4b71e195ac0" +checksum = "366e44391a8af4cfd6002ef6ba072bae071a96aafca98d7d448a34c5dca38b6a" dependencies = [ "arrayvec 0.7.2", "bitvec", @@ -6394,15 +6519,15 @@ checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" [[package]] name = "parity-util-mem" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c32561d248d352148124f036cac253a644685a21dc9fea383eb4907d7bd35a8f" +checksum = "0d32c34f4f5ca7f9196001c0aba5a1f9a5a12382c8944b8b0f90233282d1e8f8" dependencies = [ "cfg-if 1.0.0", "ethereum-types", - "hashbrown 0.12.3", + "hashbrown", "impl-trait-for-tuples", - "lru 0.7.8", + "lru 0.8.1", "parity-util-mem-derive", "parking_lot 0.12.1", "primitive-types", @@ -6432,9 +6557,9 @@ dependencies = [ [[package]] name = "parity-wasm" -version = "0.42.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" +checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking" @@ -6522,9 +6647,9 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pest" @@ -6581,18 +6706,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" +checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" +checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", @@ -6617,6 +6742,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs8" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +dependencies = [ + "der", + "spki", + "zeroize", +] + [[package]] name = "pkg-config" version = "0.3.22" @@ -6631,8 +6767,8 @@ checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" [[package]] name = "polkadot-approval-distribution" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "futures", "polkadot-node-network-protocol", @@ -6646,8 +6782,8 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "futures", "polkadot-node-network-protocol", @@ -6660,13 +6796,13 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "derive_more", "fatality", "futures", - "lru 0.7.8", + "lru 0.8.1", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -6683,12 +6819,12 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "fatality", "futures", - "lru 0.7.8", + "lru 0.8.1", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -6704,10 +6840,10 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ - "clap 3.2.18", + "clap 3.2.22", "frame-benchmarking-cli", "futures", "log", @@ -6730,8 +6866,8 @@ dependencies = [ [[package]] name = "polkadot-client" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "beefy-primitives", "frame-benchmarking", @@ -6770,10 +6906,11 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "always-assert", + "bitvec", "fatality", "futures", "futures-timer", @@ -6791,8 +6928,8 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "parity-scale-codec", "parity-util-mem", @@ -6804,13 +6941,15 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "derive_more", "fatality", "futures", - "lru 0.7.8", + "futures-timer", + "indexmap", + "lru 0.8.1", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -6827,8 +6966,8 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -6841,8 +6980,8 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "futures", "futures-timer", @@ -6861,8 +7000,8 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "always-assert", "async-trait", @@ -6885,8 +7024,8 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "futures", "parity-scale-codec", @@ -6903,15 +7042,15 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "bitvec", "derive_more", "futures", "futures-timer", "kvdb", - "lru 0.7.8", + "lru 0.8.1", "merlin", "parity-scale-codec", "polkadot-node-jaeger", @@ -6932,8 +7071,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "bitvec", "futures", @@ -6952,8 +7091,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "bitvec", "fatality", @@ -6971,8 +7110,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "futures", "polkadot-node-subsystem", @@ -6986,8 +7125,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "async-trait", "futures", @@ -7004,8 +7143,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "futures", "polkadot-node-subsystem", @@ -7019,8 +7158,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "futures", "futures-timer", @@ -7036,13 +7175,13 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "fatality", "futures", "kvdb", - "lru 0.7.8", + "lru 0.8.1", "parity-scale-codec", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -7055,8 +7194,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "async-trait", "futures", @@ -7072,8 +7211,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "bitvec", "fatality", @@ -7090,8 +7229,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "always-assert", "assert_matches", @@ -7102,7 +7241,7 @@ dependencies = [ "parity-scale-codec", "pin-project", "polkadot-core-primitives", - "polkadot-node-subsystem-util", + "polkadot-node-metrics", "polkadot-parachain", "rand 0.8.5", "rayon", @@ -7122,8 +7261,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "futures", "polkadot-node-primitives", @@ -7138,8 +7277,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "futures", "memory-lru", @@ -7154,8 +7293,8 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "async-std", "lazy_static", @@ -7172,8 +7311,8 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "bs58", "futures", @@ -7191,8 +7330,8 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "async-trait", "derive_more", @@ -7206,6 +7345,7 @@ dependencies = [ "rand 0.8.5", "sc-authority-discovery", "sc-network", + "sc-network-common", "strum 0.24.1", "thiserror", "tracing-gum", @@ -7213,8 +7353,8 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "bounded-vec", "futures", @@ -7235,8 +7375,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -7245,8 +7385,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "async-trait", "derive_more", @@ -7268,8 +7408,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "async-trait", "derive_more", @@ -7277,7 +7417,7 @@ dependencies = [ "futures", "itertools", "kvdb", - "lru 0.7.8", + "lru 0.8.1", "parity-db", "parity-scale-codec", "parity-util-mem", @@ -7301,13 +7441,13 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "async-trait", "futures", "futures-timer", - "lru 0.7.8", + "lru 0.8.1", "orchestra", "parity-util-mem", "parking_lot 0.12.1", @@ -7324,8 +7464,8 @@ dependencies = [ [[package]] name = "polkadot-parachain" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "derive_more", "frame-support", @@ -7341,8 +7481,8 @@ dependencies = [ [[package]] name = "polkadot-performance-test" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "env_logger 0.9.0", "kusama-runtime", @@ -7356,8 +7496,8 @@ dependencies = [ [[package]] name = "polkadot-primitives" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "bitvec", "frame-system", @@ -7386,8 +7526,8 @@ dependencies = [ [[package]] name = "polkadot-rpc" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "beefy-gadget", "beefy-gadget-rpc", @@ -7418,8 +7558,8 @@ dependencies = [ [[package]] name = "polkadot-runtime" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "beefy-primitives", "bitvec", @@ -7441,6 +7581,7 @@ dependencies = [ "pallet-democracy", "pallet-election-provider-multi-phase", "pallet-elections-phragmen", + "pallet-fast-unstake", "pallet-grandpa", "pallet-identity", "pallet-im-online", @@ -7448,6 +7589,7 @@ dependencies = [ "pallet-membership", "pallet-multisig", "pallet-nomination-pools", + "pallet-nomination-pools-runtime-api", "pallet-offences", "pallet-preimage", "pallet-proxy", @@ -7498,8 +7640,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "beefy-primitives", "bitvec", @@ -7543,8 +7685,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-constants" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "frame-support", "polkadot-primitives", @@ -7555,8 +7697,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "bs58", "parity-scale-codec", @@ -7567,8 +7709,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "bitflags", "bitvec", @@ -7607,18 +7749,19 @@ dependencies = [ [[package]] name = "polkadot-service" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "async-trait", "beefy-gadget", "beefy-primitives", + "frame-support", "frame-system-rpc-runtime-api", "futures", "hex-literal", "kvdb", "kvdb-rocksdb", - "lru 0.7.8", + "lru 0.8.1", "pallet-babe", "pallet-im-online", "pallet-staking", @@ -7707,8 +7850,8 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "arrayvec 0.5.2", "fatality", @@ -7728,8 +7871,8 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -7780,14 +7923,14 @@ checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" [[package]] name = "primitive-types" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" +checksum = "5cfd65aea0c5fa0bfcc7c9e7ca828c921ef778f43d325325ec84bda371bfa75a" dependencies = [ - "fixed-hash", + "fixed-hash 0.8.0", "impl-codec", "impl-rlp", - "impl-serde", + "impl-serde 0.4.0", "scale-info", "uint", ] @@ -7795,7 +7938,8 @@ dependencies = [ [[package]] name = "prioritized-metered-channel" version = "0.2.0" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "382698e48a268c832d0b181ed438374a6bb708a82a8ca273bb0f61c74cf209c4" dependencies = [ "coarsetime", "crossbeam-queue", @@ -7844,9 +7988,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.43" +version = "1.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" +checksum = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b" dependencies = [ "unicode-ident", ] @@ -7895,7 +8039,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71adf41db68aa0daaefc69bb30bcd68ded9b9abaad5d1fbb6304c4fb390e083e" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.10.1", +] + +[[package]] +name = "prost" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "399c3c31cdec40583bb68f0b18403400d01ec4289c383aa047560439952c4dd7" +dependencies = [ + "bytes", + "prost-derive 0.11.0", ] [[package]] @@ -7913,8 +8067,28 @@ dependencies = [ "log", "multimap", "petgraph", - "prost", - "prost-types", + "prost 0.10.4", + "prost-types 0.10.1", + "regex", + "tempfile", + "which", +] + +[[package]] +name = "prost-build" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f835c582e6bd972ba8347313300219fed5bfa52caf175298d860b61ff6069bb" +dependencies = [ + "bytes", + "heck 0.4.0", + "itertools", + "lazy_static", + "log", + "multimap", + "petgraph", + "prost 0.11.0", + "prost-types 0.11.1", "regex", "tempfile", "which", @@ -7928,7 +8102,7 @@ checksum = "00af1e92c33b4813cc79fda3f2dbf56af5169709be0202df730e9ebc3e4cd007" dependencies = [ "asynchronous-codec", "bytes", - "prost", + "prost 0.10.4", "thiserror", "unsigned-varint", ] @@ -7946,6 +8120,19 @@ dependencies = [ "syn", ] +[[package]] +name = "prost-derive" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7345d5f0e08c0536d7ac7229952590239e77abf0a0100a1b1d890add6ea96364" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "prost-types" version = "0.10.1" @@ -7953,7 +8140,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d0a014229361011dc8e69c8a1ec6c2e8d0f2af7c91e3ea3f5b2170298461e68" dependencies = [ "bytes", - "prost", + "prost 0.10.4", +] + +[[package]] +name = "prost-types" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dfaa718ad76a44b3415e6c4d53b17c8f99160dcb3a99b10470fce8ad43f6e3e" +dependencies = [ + "bytes", + "prost 0.11.0", ] [[package]] @@ -8162,7 +8359,7 @@ dependencies = [ "derive_more", "fs-err", "itertools", - "static_init", + "static_init 0.5.2", "thiserror", ] @@ -8188,9 +8385,9 @@ dependencies = [ [[package]] name = "regalloc2" -version = "0.2.3" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a8d23b35d7177df3b9d31ed8a9ab4bf625c668be77a319d4f5efd4a5257701c" +checksum = "d43a209257d978ef079f3d446331d0f1794f5e0fc19b306a199983857833a779" dependencies = [ "fxhash", "log", @@ -8224,18 +8421,6 @@ version = "0.6.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" -[[package]] -name = "region" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877e54ea2adcd70d80e9179344c97f93ef0dffd6b03e1f4529e6e83ab2fa9ae0" -dependencies = [ - "bitflags", - "libc", - "mach", - "winapi", -] - [[package]] name = "relay-kusama-client" version = "0.1.0" @@ -8406,7 +8591,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "env_logger 0.9.0", "jsonrpsee", @@ -8455,9 +8640,10 @@ name = "rialto-bridge-node" version = "0.1.0" dependencies = [ "beefy-primitives", - "clap 3.2.18", + "clap 3.2.22", "frame-benchmarking", "frame-benchmarking-cli", + "frame-support", "node-inspect", "polkadot-node-core-pvf", "polkadot-primitives", @@ -8480,7 +8666,7 @@ dependencies = [ name = "rialto-parachain-collator" version = "0.1.0" dependencies = [ - "clap 3.2.18", + "clap 3.2.22", "cumulus-client-cli", "cumulus-client-consensus-aura", "cumulus-client-consensus-common", @@ -8676,9 +8862,9 @@ dependencies = [ [[package]] name = "rocksdb" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "620f4129485ff1a7128d184bc687470c21c7951b64779ebc9cfdad3dcd920290" +checksum = "7e9562ea1d70c0cc63a34a22d977753b50cca91cc6b6527750463bd5dd8697bc" dependencies = [ "libc", "librocksdb-sys", @@ -8745,20 +8931,6 @@ dependencies = [ "semver 1.0.4", ] -[[package]] -name = "rustix" -version = "0.33.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938a344304321a9da4973b9ff4f9f8db9caf4597dfd9dda6a60b523340a0fff0" -dependencies = [ - "bitflags", - "errno", - "io-lifetimes 0.5.3", - "libc", - "linux-raw-sys 0.0.42", - "winapi", -] - [[package]] name = "rustix" version = "0.35.9" @@ -8767,9 +8939,9 @@ checksum = "72c825b8aa8010eb9ee99b75f05e10180b9278d161583034d7574c9d617aeada" dependencies = [ "bitflags", "errno", - "io-lifetimes 0.7.3", + "io-lifetimes", "libc", - "linux-raw-sys 0.0.46", + "linux-raw-sys", "windows-sys 0.36.1", ] @@ -8859,7 +9031,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "log", "sp-core", @@ -8870,16 +9042,17 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "async-trait", "futures", "futures-timer", "ip_network", "libp2p", "log", "parity-scale-codec", - "prost", - "prost-build", + "prost 0.11.0", + "prost-build 0.11.1", "rand 0.7.3", "sc-client-api", "sc-network-common", @@ -8896,7 +9069,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "futures", "futures-timer", @@ -8919,7 +9092,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8935,7 +9108,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "impl-trait-for-tuples", "memmap2", @@ -8952,7 +9125,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8963,13 +9136,13 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "array-bytes", "chrono", - "clap 3.2.18", + "clap 3.2.22", "fdlimit", "futures", - "hex", "libp2p", "log", "names", @@ -8981,6 +9154,7 @@ dependencies = [ "sc-client-db", "sc-keystore", "sc-network", + "sc-network-common", "sc-service", "sc-telemetry", "sc-tracing", @@ -9002,7 +9176,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "fnv", "futures", @@ -9030,7 +9204,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "hash-db", "kvdb", @@ -9055,7 +9229,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "async-trait", "futures", @@ -9079,7 +9253,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "async-trait", "futures", @@ -9108,14 +9282,14 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "async-trait", "fork-tree", "futures", "log", "merlin", - "num-bigint", + "num-bigint 0.2.6", "num-rational 0.2.4", "num-traits", "parity-scale-codec", @@ -9150,7 +9324,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "futures", "jsonrpsee", @@ -9172,7 +9346,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9185,7 +9359,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "async-trait", "futures", @@ -9203,14 +9377,13 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-timestamp", "thiserror", ] [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "lazy_static", "lru 0.7.8", @@ -9237,7 +9410,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "environmental", "parity-scale-codec", @@ -9253,7 +9426,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "log", "parity-scale-codec", @@ -9268,15 +9441,15 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "cfg-if 1.0.0", "libc", "log", "once_cell", "parity-scale-codec", - "parity-wasm 0.42.2", - "rustix 0.35.9", + "parity-wasm 0.45.0", + "rustix", "sc-allocator", "sc-executor-common", "sp-runtime-interface", @@ -9288,16 +9461,16 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "ahash", + "array-bytes", "async-trait", "dyn-clone", "finality-grandpa", "fork-tree", "futures", "futures-timer", - "hex", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -9329,7 +9502,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "finality-grandpa", "futures", @@ -9350,7 +9523,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "ansi_term 0.12.1", "futures", @@ -9367,10 +9540,10 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "array-bytes", "async-trait", - "hex", "parking_lot 0.12.1", "serde_json", "sp-application-crypto", @@ -9382,8 +9555,9 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "array-bytes", "async-trait", "asynchronous-codec", "bitflags", @@ -9394,7 +9568,6 @@ dependencies = [ "fork-tree", "futures", "futures-timer", - "hex", "ip_network", "libp2p", "linked-hash-map", @@ -9404,8 +9577,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "pin-project", - "prost", - "prost-build", + "prost 0.11.0", "rand 0.7.3", "sc-block-builder", "sc-client-api", @@ -9424,36 +9596,59 @@ dependencies = [ "substrate-prometheus-endpoint", "thiserror", "unsigned-varint", - "void", "zeroize", ] +[[package]] +name = "sc-network-bitswap" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" +dependencies = [ + "cid", + "futures", + "libp2p", + "log", + "prost 0.11.0", + "prost-build 0.11.1", + "sc-client-api", + "sc-network-common", + "sp-blockchain", + "sp-runtime", + "thiserror", + "unsigned-varint", + "void", +] + [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "async-trait", "bitflags", "bytes", "futures", + "futures-timer", "libp2p", + "linked_hash_set", "parity-scale-codec", - "prost-build", + "prost-build 0.11.1", "sc-consensus", "sc-peerset", "serde", "smallvec", + "sp-blockchain", "sp-consensus", "sp-finality-grandpa", "sp-runtime", + "substrate-prometheus-endpoint", "thiserror", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "ahash", "futures", @@ -9471,15 +9666,15 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "array-bytes", "futures", - "hex", "libp2p", "log", "parity-scale-codec", - "prost", - "prost-build", + "prost 0.11.0", + "prost-build 0.11.1", "sc-client-api", "sc-network-common", "sc-peerset", @@ -9492,17 +9687,17 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "array-bytes", "fork-tree", "futures", - "hex", "libp2p", "log", "lru 0.7.8", "parity-scale-codec", - "prost", - "prost-build", + "prost 0.11.0", + "prost-build 0.11.1", "sc-client-api", "sc-consensus", "sc-network-common", @@ -9517,16 +9712,35 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-network-transactions" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" +dependencies = [ + "array-bytes", + "futures", + "hex", + "libp2p", + "log", + "parity-scale-codec", + "pin-project", + "sc-network-common", + "sc-peerset", + "sp-consensus", + "sp-runtime", + "substrate-prometheus-endpoint", +] + [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "array-bytes", "bytes", "fnv", "futures", "futures-timer", - "hex", "hyper", "hyper-rustls", "libp2p", @@ -9550,7 +9764,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "futures", "libp2p", @@ -9563,7 +9777,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9572,7 +9786,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "futures", "hash-db", @@ -9602,7 +9816,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "futures", "jsonrpsee", @@ -9625,7 +9839,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "futures", "jsonrpsee", @@ -9635,10 +9849,29 @@ dependencies = [ "tokio", ] +[[package]] +name = "sc-rpc-spec-v2" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" +dependencies = [ + "futures", + "hex", + "jsonrpsee", + "parity-scale-codec", + "sc-chain-spec", + "sc-transaction-pool-api", + "serde", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-runtime", + "thiserror", +] + [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "async-trait", "directories", @@ -9662,12 +9895,15 @@ dependencies = [ "sc-informant", "sc-keystore", "sc-network", + "sc-network-bitswap", "sc-network-common", "sc-network-light", "sc-network-sync", + "sc-network-transactions", "sc-offchain", "sc-rpc", "sc-rpc-server", + "sc-rpc-spec-v2", "sc-sysinfo", "sc-telemetry", "sc-tracing", @@ -9694,6 +9930,7 @@ dependencies = [ "sp-transaction-storage-proof", "sp-trie", "sp-version", + "static_init 1.0.3", "substrate-prometheus-endpoint", "tempfile", "thiserror", @@ -9705,7 +9942,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "log", "parity-scale-codec", @@ -9719,7 +9956,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9738,7 +9975,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "futures", "libc", @@ -9757,7 +9994,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "chrono", "futures", @@ -9775,7 +10012,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "ansi_term 0.12.1", "atty", @@ -9806,7 +10043,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9817,7 +10054,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "futures", "futures-timer", @@ -9843,7 +10080,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "futures", "log", @@ -9856,7 +10093,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "futures", "futures-timer", @@ -9868,9 +10105,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c46be926081c9f4dd5dd9b6f1d3e3229f2360bc6502dd8836f84a93b7c75e99a" +checksum = "333af15b02563b8182cd863f925bd31ef8fa86a0e095d30c091956057d436153" dependencies = [ "bitvec", "cfg-if 1.0.0", @@ -9882,9 +10119,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e334bb10a245e28e5fd755cabcafd96cfcd167c99ae63a46924ca8d8703a3c" +checksum = "53f56acbd0743d29ffa08f911ab5397def774ad01bab3786804cf6ee057fb5e1" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9944,6 +10181,7 @@ checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" dependencies = [ "der", "generic-array 0.14.4", + "pkcs8", "subtle", "zeroize", ] @@ -10225,8 +10463,8 @@ checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec" [[package]] name = "slot-range-helper" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "enumn", "parity-scale-codec", @@ -10313,7 +10551,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "hash-db", "log", @@ -10331,7 +10569,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "blake2", "proc-macro-crate", @@ -10343,7 +10581,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "6.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "parity-scale-codec", "scale-info", @@ -10356,7 +10594,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "5.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "integer-sqrt", "num-traits", @@ -10371,7 +10609,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "parity-scale-codec", "scale-info", @@ -10384,7 +10622,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "async-trait", "parity-scale-codec", @@ -10396,7 +10634,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "parity-scale-codec", "sp-api", @@ -10408,7 +10646,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "futures", "log", @@ -10426,7 +10664,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "async-trait", "futures", @@ -10445,7 +10683,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "async-trait", "parity-scale-codec", @@ -10463,7 +10701,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "async-trait", "merlin", @@ -10486,7 +10724,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "parity-scale-codec", "scale-info", @@ -10500,7 +10738,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "parity-scale-codec", "scale-info", @@ -10513,19 +10751,19 @@ dependencies = [ [[package]] name = "sp-core" version = "6.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ + "array-bytes", "base58", "bitflags", - "blake2-rfc", + "blake2", "byteorder", "dyn-clonable", "ed25519-zebra", "futures", "hash-db", "hash256-std-hasher", - "hex", - "impl-serde", + "impl-serde 0.4.0", "lazy_static", "libsecp256k1", "log", @@ -10559,7 +10797,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "blake2", "byteorder", @@ -10573,7 +10811,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "proc-macro2", "quote", @@ -10584,7 +10822,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10593,7 +10831,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "proc-macro2", "quote", @@ -10603,7 +10841,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.12.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "environmental", "parity-scale-codec", @@ -10614,7 +10852,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "finality-grandpa", "log", @@ -10632,7 +10870,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10646,7 +10884,7 @@ dependencies = [ [[package]] name = "sp-io" version = "6.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "bytes", "futures", @@ -10672,7 +10910,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "6.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "lazy_static", "sp-core", @@ -10683,7 +10921,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.12.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "async-trait", "futures", @@ -10700,7 +10938,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "thiserror", "zstd", @@ -10709,10 +10947,11 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "log", "parity-scale-codec", + "scale-info", "serde", "sp-api", "sp-core", @@ -10724,7 +10963,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "parity-scale-codec", "scale-info", @@ -10738,7 +10977,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "sp-api", "sp-core", @@ -10748,7 +10987,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "backtrace", "lazy_static", @@ -10758,7 +10997,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "rustc-hash", "serde", @@ -10768,7 +11007,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "6.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "either", "hash256-std-hasher", @@ -10785,12 +11024,13 @@ dependencies = [ "sp-core", "sp-io", "sp-std", + "sp-weights", ] [[package]] name = "sp-runtime-interface" version = "6.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -10808,7 +11048,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "Inflector", "proc-macro-crate", @@ -10820,7 +11060,7 @@ dependencies = [ [[package]] name = "sp-sandbox" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "log", "parity-scale-codec", @@ -10834,7 +11074,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "parity-scale-codec", "scale-info", @@ -10848,7 +11088,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "parity-scale-codec", "scale-info", @@ -10859,7 +11099,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.12.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "hash-db", "log", @@ -10881,14 +11121,14 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" [[package]] name = "sp-storage" version = "6.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ - "impl-serde", + "impl-serde 0.4.0", "parity-scale-codec", "ref-cast", "serde", @@ -10899,7 +11139,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "log", "sp-core", @@ -10912,7 +11152,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "async-trait", "futures-timer", @@ -10928,7 +11168,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "5.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "parity-scale-codec", "sp-std", @@ -10940,7 +11180,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "sp-api", "sp-runtime", @@ -10949,7 +11189,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "async-trait", "log", @@ -10965,11 +11205,11 @@ dependencies = [ [[package]] name = "sp-trie" version = "6.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "ahash", "hash-db", - "hashbrown 0.12.3", + "hashbrown", "lazy_static", "lru 0.7.8", "memory-db", @@ -10988,11 +11228,11 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ - "impl-serde", + "impl-serde 0.4.0", "parity-scale-codec", - "parity-wasm 0.42.2", + "parity-wasm 0.45.0", "scale-info", "serde", "sp-core-hashing-proc-macro", @@ -11005,7 +11245,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11016,7 +11256,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "6.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "impl-trait-for-tuples", "log", @@ -11026,17 +11266,43 @@ dependencies = [ "wasmtime", ] +[[package]] +name = "sp-weights" +version = "4.0.0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic", + "sp-core", + "sp-debug-derive", + "sp-std", +] + [[package]] name = "spin" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spki" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "ss58-registry" -version = "1.28.0" +version = "1.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c8a1e645fa0bd3e81a90e592a677f7ada3182ac338c4a71cd9ec0ba911f6abb" +checksum = "1de151faef619cb7b5c26b32d42bc7ddccac0d202beb7a84344b44e9232b92f7" dependencies = [ "Inflector", "num-format", @@ -11068,7 +11334,22 @@ dependencies = [ "cfg_aliases", "libc", "parking_lot 0.11.2", - "static_init_macro", + "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", + "cfg_aliases", + "libc", + "parking_lot 0.11.2", + "parking_lot_core 0.8.5", + "static_init_macro 1.0.2", + "winapi", ] [[package]] @@ -11084,6 +11365,19 @@ dependencies = [ "syn", ] +[[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", + "quote", + "syn", +] + [[package]] name = "statrs" version = "0.15.0" @@ -11207,7 +11501,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "platforms", ] @@ -11215,7 +11509,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11236,7 +11530,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "futures-util", "hyper", @@ -11346,7 +11640,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "jsonrpsee", "log", @@ -11367,7 +11661,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ "ansi_term 0.12.1", "build-helper", @@ -11389,9 +11683,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.99" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" +checksum = "3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1" dependencies = [ "proc-macro2", "quote", @@ -11494,24 +11788,24 @@ dependencies = [ [[package]] name = "textwrap" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" +checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16" [[package]] name = "thiserror" -version = "1.0.32" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5f6586b7f764adc0231f4c79be7b920e766bb2f3e51b3661cdb263828f19994" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.32" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12bafc5b54507e0149cdf1b145a5d80ab80a90bcd9275df43d4fff68460f6c21" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -11557,9 +11851,9 @@ dependencies = [ [[package]] name = "tikv-jemalloc-sys" -version = "0.4.3+5.2.1-patched.2" +version = "0.5.2+5.3.0-patched" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1792ccb507d955b46af42c123ea8863668fae24d03721e40cad6a41773dbb49" +checksum = "ec45c14da997d0925c7835883e4d5c181f196fa142f8c19d7643d1e9af2592c3" dependencies = [ "cc", "fs_extra", @@ -11774,8 +12068,8 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "polkadot-node-jaeger", "polkadot-primitives", @@ -11785,8 +12079,8 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "expander 0.0.6", "proc-macro-crate", @@ -11846,7 +12140,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908" dependencies = [ "hash-db", - "hashbrown 0.12.3", + "hashbrown", "log", "rustc-hex", "smallvec", @@ -11874,7 +12168,7 @@ dependencies = [ "futures-channel", "futures-io", "futures-util", - "idna", + "idna 0.2.3", "ipnet", "lazy_static", "log", @@ -11913,9 +12207,10 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges#3af538b5b1f55b744f59a83119998d8c70a259b0" +source = "git+https://github.com/paritytech//substrate?branch=sv-locked-for-gav-xcm-v3-and-bridges-2#1bf2e6db6ccc0f9d872cddf9e3254227d100f2bf" dependencies = [ - "clap 3.2.18", + "clap 3.2.22", + "frame-try-runtime", "jsonrpsee", "log", "parity-scale-codec", @@ -11947,9 +12242,9 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "digest 0.10.3", - "rand 0.7.3", + "rand 0.8.5", "static_assertions", ] @@ -12055,13 +12350,12 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.2.2" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" dependencies = [ "form_urlencoded", - "idna", - "matches", + "idna 0.3.0", "percent-encoding", ] @@ -12229,11 +12523,11 @@ dependencies = [ [[package]] name = "wasm-instrument" -version = "0.1.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "962e5b0401bbb6c887f54e69b8c496ea36f704df65db73e81fd5ff8dc3e63a9f" +checksum = "aa1dafb3e60065305741e83db35c6c2584bb3725b692b5b66148a38d72ace6cd" dependencies = [ - "parity-wasm 0.42.2", + "parity-wasm 0.45.0", ] [[package]] @@ -12253,58 +12547,63 @@ dependencies = [ [[package]] name = "wasmi" -version = "0.9.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca00c5147c319a8ec91ec1a0edbec31e566ce2c9cc93b3f9bb86a9efd0eb795d" +checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" dependencies = [ - "downcast-rs", - "libc", - "libm", - "memory_units", - "num-rational 0.2.4", - "num-traits", - "parity-wasm 0.42.2", + "parity-wasm 0.45.0", "wasmi-validation", + "wasmi_core", ] [[package]] name = "wasmi-validation" -version = "0.4.1" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" +dependencies = [ + "parity-wasm 0.45.0", +] + +[[package]] +name = "wasmi_core" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "165343ecd6c018fc09ebcae280752702c9a2ef3e6f8d02f1cfcbdb53ef6d7937" +checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" dependencies = [ - "parity-wasm 0.42.2", + "downcast-rs", + "libm", + "memory_units", + "num-rational 0.4.0", + "num-traits", ] [[package]] name = "wasmparser" -version = "0.85.0" +version = "0.89.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "570460c58b21e9150d2df0eaaedbb7816c34bcec009ae0dcc976e40ba81463e7" +checksum = "ab5d3e08b13876f96dd55608d03cd4883a0545884932d5adf11925876c96daef" dependencies = [ "indexmap", ] [[package]] name = "wasmtime" -version = "0.38.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f50eadf868ab6a04b7b511460233377d0bfbb92e417b2f6a98b98fef2e098f5" +checksum = "f1f511c4917c83d04da68333921107db75747c4e11a2f654a8e909cc5e0520dc" dependencies = [ "anyhow", - "backtrace", "bincode", "cfg-if 1.0.0", "indexmap", - "lazy_static", "libc", "log", - "object 0.28.4", + "object 0.29.0", "once_cell", "paste", "psm", "rayon", - "region", "serde", "target-lexicon", "wasmparser", @@ -12313,14 +12612,23 @@ dependencies = [ "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", - "winapi", + "windows-sys 0.36.1", +] + +[[package]] +name = "wasmtime-asm-macros" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39bf3debfe744bf19dd3732990ce6f8c0ced7439e2370ba4e1d8f5a3660a3178" +dependencies = [ + "cfg-if 1.0.0", ] [[package]] name = "wasmtime-cache" -version = "0.38.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1df23c642e1376892f3b72f311596976979cbf8b85469680cdd3a8a063d12a2" +checksum = "ece42fa4676a263f7558cdaaf5a71c2592bebcbac22a0580e33cf3406c103da2" dependencies = [ "anyhow", "base64", @@ -12328,19 +12636,19 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix 0.33.7", + "rustix", "serde", "sha2 0.9.8", "toml", - "winapi", + "windows-sys 0.36.1", "zstd", ] [[package]] name = "wasmtime-cranelift" -version = "0.38.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f264ff6b4df247d15584f2f53d009fbc90032cfdc2605b52b961bffc71b6eccd" +checksum = "058217e28644b012bdcdf0e445f58d496d78c2e0b6a6dd93558e701591dad705" dependencies = [ "anyhow", "cranelift-codegen", @@ -12350,8 +12658,7 @@ dependencies = [ "cranelift-wasm", "gimli", "log", - "more-asserts", - "object 0.28.4", + "object 0.29.0", "target-lexicon", "thiserror", "wasmparser", @@ -12360,17 +12667,16 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "0.38.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "839d2820e4b830f4b9e7aa08d4c0acabf4a5036105d639f6dfa1c6891c73bdc6" +checksum = "c7af06848df28b7661471d9a80d30a973e0f401f2e3ed5396ad7e225ed217047" dependencies = [ "anyhow", "cranelift-entity", "gimli", "indexmap", "log", - "more-asserts", - "object 0.28.4", + "object 0.29.0", "serde", "target-lexicon", "thiserror", @@ -12380,9 +12686,9 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "0.38.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef0a0bcbfa18b946d890078ba0e1bc76bcc53eccfb40806c0020ec29dcd1bd49" +checksum = "9028fb63a54185b3c192b7500ef8039c7bb8d7f62bfc9e7c258483a33a3d13bb" dependencies = [ "addr2line", "anyhow", @@ -12391,38 +12697,36 @@ dependencies = [ "cpp_demangle", "gimli", "log", - "object 0.28.4", - "region", + "object 0.29.0", "rustc-demangle", - "rustix 0.33.7", + "rustix", "serde", "target-lexicon", "thiserror", "wasmtime-environ", "wasmtime-jit-debug", "wasmtime-runtime", - "winapi", + "windows-sys 0.36.1", ] [[package]] name = "wasmtime-jit-debug" -version = "0.38.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4779d976206c458edd643d1ac622b6c37e4a0800a8b1d25dfbf245ac2f2cac" +checksum = "25e82d4ef93296785de7efca92f7679dc67fe68a13b625a5ecc8d7503b377a37" dependencies = [ - "lazy_static", - "object 0.28.4", - "rustix 0.33.7", + "object 0.29.0", + "once_cell", + "rustix", ] [[package]] name = "wasmtime-runtime" -version = "0.38.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7eb6ffa169eb5dcd18ac9473c817358cd57bc62c244622210566d473397954a" +checksum = "9f0e9bea7d517d114fe66b930b2124ee086516ee93eeebfd97f75f366c5b0553" dependencies = [ "anyhow", - "backtrace", "cc", "cfg-if 1.0.0", "indexmap", @@ -12431,21 +12735,21 @@ dependencies = [ "mach", "memfd", "memoffset", - "more-asserts", + "paste", "rand 0.8.5", - "region", - "rustix 0.33.7", + "rustix", "thiserror", + "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", - "winapi", + "windows-sys 0.36.1", ] [[package]] name = "wasmtime-types" -version = "0.38.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d932b0ac5336f7308d869703dd225610a6a3aeaa8e968c52b43eed96cefb1c2" +checksum = "69b83e93ed41b8fdc936244cfd5e455480cf1eca1fd60c78a0040038b4ce5075" dependencies = [ "cranelift-entity", "serde", @@ -12699,8 +13003,8 @@ dependencies = [ [[package]] name = "xcm" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "derivative", "impl-trait-for-tuples", @@ -12715,8 +13019,8 @@ dependencies = [ [[package]] name = "xcm-builder" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "frame-support", "frame-system", @@ -12736,8 +13040,8 @@ dependencies = [ [[package]] name = "xcm-executor" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -12753,8 +13057,8 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "0.9.27" -source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges#dd02a13f43b4fabb5293027d6977b59fb0050eed" +version = "0.9.29" +source = "git+https://github.com/paritytech//polkadot?branch=locked-for-gav-xcm-v3-and-bridges-2#fa54983dece5b8a358fefb1ec163e56d633ab6a9" dependencies = [ "Inflector", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 6a0eddb32a..3fc1ec76b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,221 +17,226 @@ members = [ # Once XCMv3 PR is merged, we may remove both Substrate and Polkadot patch section. [patch."https://github.com/paritytech/substrate"] -beefy-gadget = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -beefy-gadget-rpc = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -beefy-merkle-tree = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -beefy-primitives = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -fork-tree = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -frame-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -frame-benchmarking-cli = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -frame-election-provider-solution-type = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -frame-election-provider-support = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -frame-executive = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -frame-support = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -frame-support-procedural = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -frame-support-procedural-tools = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -frame-support-procedural-tools-derive = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -frame-system = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -frame-system-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -frame-try-runtime = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -node-inspect = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-aura = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-authorship = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-babe = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-bags-list = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-balances = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-beefy = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-beefy-mmr = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-bounties = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-child-bounties = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-collective = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-democracy = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-election-provider-multi-phase = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-elections-phragmen = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-gilt = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-grandpa = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-identity = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-im-online = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-indices = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-membership = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-mmr = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-mmr-rpc = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-multisig = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-nomination-pools = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-offences = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-preimage = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-proxy = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-randomness-collective-flip = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-recovery = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-scheduler = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-session = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-society = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-staking = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-staking-reward-curve = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-staking-reward-fn = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-sudo = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-timestamp = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-tips = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-transaction-payment = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-treasury = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-utility = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -pallet-vesting = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -remote-externalities = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-allocator = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-authority-discovery = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-basic-authorship = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-block-builder = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-chain-spec = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-chain-spec-derive = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-cli = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-client-api = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-client-db = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-consensus = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-consensus-aura = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-consensus-babe = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-consensus-babe-rpc = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-consensus-epochs = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-consensus-slots = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-executor = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-executor-common = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-executor-wasmi = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-executor-wasmtime = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-finality-grandpa = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-finality-grandpa-rpc = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-informant = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-keystore = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-network = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-network-common = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-network-gossip = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-offchain = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-peerset = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-proposer-metrics = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-rpc = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-rpc-api = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-rpc-server = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-service = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-state-db = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-sync-state-rpc = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-sysinfo = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-telemetry = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-tracing = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-tracing-proc-macro = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-transaction-pool = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-transaction-pool-api = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sc-utils = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-api = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-api-proc-macro = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-application-crypto = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-arithmetic = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-authority-discovery = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-authorship = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-block-builder = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-blockchain = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-consensus = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-consensus-aura = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-consensus-babe = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-consensus-slots = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-consensus-vrf = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-core = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-core-hashing = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-core-hashing-proc-macro = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-database = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-debug-derive = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-externalities = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-finality-grandpa = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-inherents = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-io = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-keyring = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-keystore = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-maybe-compressed-blob = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-mmr-primitives = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-npos-elections = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-offchain = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-panic-handler = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-rpc = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-runtime = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-runtime-interface = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-runtime-interface-proc-macro = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-session = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-staking = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-state-machine = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-std = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-storage = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-tasks = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-timestamp = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-tracing = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-transaction-pool = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-transaction-storage-proof = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-trie = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-version = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-version-proc-macro = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -sp-wasm-interface = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -substrate-build-script-utils = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -substrate-wasm-builder = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } -try-runtime-cli = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges" } +beefy-gadget = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +beefy-gadget-rpc = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +beefy-merkle-tree = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +beefy-primitives = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +fork-tree = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +frame-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +frame-benchmarking-cli = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +frame-election-provider-solution-type = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +frame-election-provider-support = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +frame-executive = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +frame-support = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +frame-support-procedural = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +frame-support-procedural-tools = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +frame-support-procedural-tools-derive = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +frame-system = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +frame-system-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +frame-try-runtime = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +node-inspect = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-aura = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-authorship = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-babe = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-bags-list = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-balances = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-beefy = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-beefy-mmr = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-bounties = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-child-bounties = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-collective = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-conviction-voting = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-democracy = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-election-provider-multi-phase = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-elections-phragmen = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-fast-unstake = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-gilt = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-grandpa = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-identity = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-im-online = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-indices = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-membership = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-mmr = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-mmr-rpc = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-multisig = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-nomination-pools = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-offences = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-preimage = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-proxy = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-randomness-collective-flip = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-ranked-collective = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-recovery = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-referenda = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-scheduler = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-session = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-society = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-staking = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-staking-reward-curve = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-staking-reward-fn = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-sudo = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-timestamp = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-tips = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-transaction-payment = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-treasury = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-utility = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-vesting = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +pallet-whitelist = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +remote-externalities = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-allocator = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-authority-discovery = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-basic-authorship = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-block-builder = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-chain-spec = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-chain-spec-derive = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-cli = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-client-api = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-client-db = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-consensus = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-consensus-aura = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-consensus-babe = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-consensus-babe-rpc = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-consensus-epochs = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-consensus-slots = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-executor = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-executor-common = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-executor-wasmi = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-executor-wasmtime = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-finality-grandpa = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-finality-grandpa-rpc = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-informant = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-keystore = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-network = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-network-common = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-network-gossip = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-offchain = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-peerset = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-proposer-metrics = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-rpc = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-rpc-api = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-rpc-server = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-service = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-state-db = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-sync-state-rpc = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-sysinfo = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-telemetry = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-tracing = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-tracing-proc-macro = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-transaction-pool = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-transaction-pool-api = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sc-utils = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-api = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-api-proc-macro = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-application-crypto = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-arithmetic = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-authority-discovery = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-authorship = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-block-builder = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-blockchain = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-consensus = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-consensus-aura = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-consensus-babe = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-consensus-slots = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-consensus-vrf = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-core = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-core-hashing = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-core-hashing-proc-macro = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-database = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-debug-derive = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-externalities = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-finality-grandpa = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-inherents = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-io = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-keyring = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-keystore = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-maybe-compressed-blob = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-mmr-primitives = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-npos-elections = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-offchain = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-panic-handler = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-rpc = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-runtime = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-runtime-interface = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-runtime-interface-proc-macro = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-session = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-staking = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-state-machine = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-std = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-storage = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-tasks = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-timestamp = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-tracing = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-transaction-pool = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-transaction-storage-proof = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-trie = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-version = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-version-proc-macro = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +sp-wasm-interface = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +substrate-build-script-utils = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +substrate-wasm-builder = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } +try-runtime-cli = { git = "https://github.com/paritytech//substrate", branch = "sv-locked-for-gav-xcm-v3-and-bridges-2" } [patch."https://github.com/paritytech/polkadot"] -kusama-runtime = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -kusama-runtime-constants = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -pallet-xcm = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-approval-distribution = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-availability-bitfield-distribution = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-availability-distribution = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-availability-recovery = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-cli = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-client = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-collator-protocol = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-core-primitives = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-dispute-distribution = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-erasure-coding = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-gossip-support = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-network-bridge = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-node-collation-generation = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-node-core-approval-voting = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-node-core-av-store = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-node-core-backing = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-node-core-bitfield-signing = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-node-core-candidate-validation = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-node-core-chain-api = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-node-core-chain-selection = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-node-core-dispute-coordinator = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-node-core-parachains-inherent = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-node-core-provisioner = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-node-core-pvf = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-node-core-pvf-checker = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-node-core-runtime-api = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-node-jaeger = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-node-metrics = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-node-network-protocol = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-node-primitives = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-node-subsystem = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-node-subsystem-types = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-node-subsystem-util = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-overseer = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-parachain = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-performance-test = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-primitives = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-rpc = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-runtime = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-runtime-common = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-runtime-constants = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-runtime-metrics = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-service = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-statement-distribution = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -polkadot-statement-table = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -slot-range-helper = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -tracing-gum = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -tracing-gum-proc-macro = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -xcm = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -xcm-builder = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -xcm-executor = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } -xcm-procedural = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges" } +kusama-runtime = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +kusama-runtime-constants = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +pallet-xcm = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-approval-distribution = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-availability-bitfield-distribution = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-availability-distribution = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-availability-recovery = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-cli = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-client = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-collator-protocol = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-core-primitives = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-dispute-distribution = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-erasure-coding = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-gossip-support = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-network-bridge = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-node-collation-generation = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-node-core-approval-voting = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-node-core-av-store = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-node-core-backing = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-node-core-bitfield-signing = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-node-core-candidate-validation = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-node-core-chain-api = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-node-core-chain-selection = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-node-core-dispute-coordinator = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-node-core-parachains-inherent = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-node-core-provisioner = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-node-core-pvf = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-node-core-pvf-checker = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-node-core-runtime-api = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-node-jaeger = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-node-metrics = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-node-network-protocol = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-node-primitives = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-node-subsystem = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-node-subsystem-types = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-node-subsystem-util = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-overseer = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-parachain = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-performance-test = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-primitives = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-rpc = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-runtime = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-runtime-common = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-runtime-constants = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-runtime-metrics = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-service = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-statement-distribution = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +polkadot-statement-table = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +slot-range-helper = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +tracing-gum = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +tracing-gum-proc-macro = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +xcm = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +xcm-builder = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +xcm-executor = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } +xcm-procedural = { git = "https://github.com/paritytech//polkadot", branch = "locked-for-gav-xcm-v3-and-bridges-2" } diff --git a/bin/millau/node/src/service.rs b/bin/millau/node/src/service.rs index 5b4461f3ca..72ad071726 100644 --- a/bin/millau/node/src/service.rs +++ b/bin/millau/node/src/service.rs @@ -18,7 +18,7 @@ use jsonrpsee::RpcModule; use millau_runtime::{self, opaque::Block, RuntimeApi}; -use sc_client_api::{BlockBackend, ExecutorProvider}; +use sc_client_api::BlockBackend; use sc_consensus_aura::{ImportQueueParams, SlotProportion, StartAuraParams}; pub use sc_executor::NativeElseWasmExecutor; use sc_finality_grandpa::SharedVoterState; @@ -140,7 +140,7 @@ pub fn new_partial( let slot_duration = sc_consensus_aura::slot_duration(&*client)?; let import_queue = - sc_consensus_aura::import_queue::(ImportQueueParams { + sc_consensus_aura::import_queue::(ImportQueueParams { block_import: beefy_block_import, justification_import: Some(Box::new(grandpa_block_import.clone())), client: client.clone(), @@ -153,12 +153,9 @@ pub fn new_partial( slot_duration, ); - Ok((timestamp, slot)) + Ok((slot, timestamp)) }, spawner: &task_manager.spawn_essential_handle(), - can_author_with: sp_consensus::CanAuthorWithNativeVersion::new( - client.executor().clone(), - ), registry: config.prometheus_registry(), check_for_equivocation: Default::default(), telemetry: telemetry.as_ref().map(|x| x.handle()), @@ -207,6 +204,8 @@ pub fn new_full(mut config: Configuration) -> Result }; } + let genesis_hash = client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"); + // 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. @@ -219,14 +218,21 @@ pub fn new_full(mut config: Configuration) -> Result .extra_sets .push(sc_finality_grandpa::grandpa_peers_set_config(grandpa_protocol_name.clone())); - let beefy_protocol_name = beefy_gadget::protocol_standard_name( - &client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"), - &config.chain_spec, - ); + let beefy_gossip_proto_name = + beefy_gadget::gossip_protocol_name(genesis_hash, config.chain_spec.fork_id()); + // `beefy_on_demand_justifications_handler` is given to `beefy-gadget` task to be run, + // while `beefy_req_resp_cfg` is added to `config.network.request_response_protocols`. + let (beefy_on_demand_justifications_handler, beefy_req_resp_cfg) = + beefy_gadget::communication::request_response::BeefyJustifsRequestHandler::new( + genesis_hash, + config.chain_spec.fork_id(), + client.clone(), + ); config .network .extra_sets - .push(beefy_gadget::beefy_peers_set_config(beefy_protocol_name.clone())); + .push(beefy_gadget::communication::beefy_peers_set_config(beefy_gossip_proto_name.clone())); + config.network.request_response_protocols.push(beefy_req_resp_cfg); let warp_sync = Arc::new(sc_finality_grandpa::warp_proof::NetworkProvider::new( backend.clone(), @@ -234,7 +240,7 @@ pub fn new_full(mut config: Configuration) -> Result Vec::default(), )); - let (network, system_rpc_tx, network_starter) = + let (network, system_rpc_tx, tx_handler_controller, network_starter) = sc_service::build_network(sc_service::BuildNetworkParams { config: &config, client: client.clone(), @@ -327,6 +333,7 @@ pub fn new_full(mut config: Configuration) -> Result backend: backend.clone(), system_rpc_tx, config, + tx_handler_controller, telemetry: telemetry.as_mut(), })?; @@ -339,12 +346,9 @@ pub fn new_full(mut config: Configuration) -> Result telemetry.as_ref().map(|x| x.handle()), ); - let can_author_with = - sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()); - let slot_duration = sc_consensus_aura::slot_duration(&*client)?; - let aura = sc_consensus_aura::start_aura::( + let aura = sc_consensus_aura::start_aura::( StartAuraParams { slot_duration, client: client.clone(), @@ -360,12 +364,11 @@ pub fn new_full(mut config: Configuration) -> Result slot_duration, ); - Ok((timestamp, slot)) + Ok((slot, timestamp)) }, force_authoring, backoff_authoring_blocks, keystore: keystore_container.sync_keystore(), - can_author_with, sync_oracle: network.clone(), justification_sync_link: network.clone(), block_proposal_slot_portion: SlotProportion::new(2f32 / 3f32), @@ -386,23 +389,31 @@ pub fn new_full(mut config: Configuration) -> Result let keystore = if role.is_authority() { Some(keystore_container.sync_keystore()) } else { None }; + let justifications_protocol_name = beefy_on_demand_justifications_handler.protocol_name(); + let payload_provider = beefy_primitives::mmr::MmrRootProvider::new(client.clone()); let beefy_params = beefy_gadget::BeefyParams { client: client.clone(), backend, + payload_provider, runtime: client, key_store: keystore.clone(), - network: network.clone(), + network_params: beefy_gadget::BeefyNetworkParams { + network: network.clone(), + gossip_protocol_name: beefy_gossip_proto_name, + justifications_protocol_name, + _phantom: core::marker::PhantomData::, + }, min_block_delta: 2, prometheus_registry: prometheus_registry.clone(), - protocol_name: beefy_protocol_name, 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, - beefy_gadget::start_beefy_gadget::<_, _, _, _, _>(beefy_params), + beefy_gadget::start_beefy_gadget::<_, _, _, _, _, _>(beefy_params), ); let grandpa_config = sc_finality_grandpa::Config { diff --git a/bin/millau/runtime/src/lib.rs b/bin/millau/runtime/src/lib.rs index b048bf5e60..6439c04565 100644 --- a/bin/millau/runtime/src/lib.rs +++ b/bin/millau/runtime/src/lib.rs @@ -69,11 +69,12 @@ pub use bridge_runtime_common; // A few exports that help ease life for downstream crates. pub use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + dispatch::DispatchClass, + parameter_types, traits::{Currency, ExistenceRequirement, Imbalance, KeyOwnerProofSystem}, weights::{ - constants::WEIGHT_PER_SECOND, ConstantMultiplier, DispatchClass, IdentityFee, - RuntimeDbWeight, Weight, + constants::WEIGHT_PER_SECOND, ConstantMultiplier, IdentityFee, RuntimeDbWeight, Weight, }, RuntimeDebug, StorageValue, }; @@ -177,7 +178,7 @@ 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 Call = Call; + 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. @@ -191,9 +192,9 @@ impl frame_system::Config for Runtime { /// The header type. type Header = generic::Header; /// The ubiquitous event type. - type Event = Event; + type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; /// Maximum number of block number to block hash mappings to keep (oldest pruned first). type BlockHashCount = BlockHashCount; /// Version of the runtime. @@ -241,8 +242,7 @@ impl pallet_beefy::Config for Runtime { } impl pallet_grandpa::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; type KeyOwnerProofSystem = (); type KeyOwnerProof = >::Proof; @@ -331,7 +331,7 @@ impl pallet_balances::Config for Runtime { /// The type for recording an account's balance. type Balance = Balance; /// The ubiquitous event type. - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -351,6 +351,7 @@ parameter_types! { 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 { @@ -363,13 +364,14 @@ impl pallet_transaction_payment::Config for Runtime { TargetBlockFullness, AdjustmentVariable, MinimumMultiplier, + MaximumMultiplier, >; - type Event = Event; + type RuntimeEvent = RuntimeEvent; } impl pallet_sudo::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; } parameter_types! { @@ -379,7 +381,7 @@ parameter_types! { } impl pallet_session::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorId = ::AccountId; type ValidatorIdOf = (); type ShouldEndSession = pallet_session::PeriodicSessions; @@ -400,7 +402,7 @@ parameter_types! { } impl pallet_bridge_relayers::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Reward = Balance; type PaymentProcedure = bp_relayers::MintReward, AccountId>; type WeightInfo = (); @@ -470,7 +472,7 @@ parameter_types! { bp_rialto::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; // `IdentityFee` is used by Millau => we may use weight directly pub const GetDeliveryConfirmationTransactionFee: Balance = - bp_millau::MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT as _; + bp_millau::MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT.ref_time() as _; pub const RootAccountForPayments: Option = None; pub const RialtoChainId: bp_runtime::ChainId = bp_runtime::RIALTO_CHAIN_ID; pub const RialtoParachainChainId: bp_runtime::ChainId = bp_runtime::RIALTO_PARACHAIN_CHAIN_ID; @@ -480,7 +482,7 @@ parameter_types! { pub type WithRialtoMessagesInstance = (); impl pallet_bridge_messages::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = pallet_bridge_messages::weights::BridgeWeight; type Parameter = rialto_messages::MillauToRialtoMessagesParameter; type MaxMessagesToPruneAtOnce = MaxMessagesToPruneAtOnce; @@ -515,7 +517,7 @@ impl pallet_bridge_messages::Config for Runtime { pub type WithRialtoParachainMessagesInstance = pallet_bridge_messages::Instance1; impl pallet_bridge_messages::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = pallet_bridge_messages::weights::BridgeWeight; type Parameter = rialto_parachain_messages::MillauToRialtoParachainMessagesParameter; type MaxMessagesToPruneAtOnce = MaxMessagesToPruneAtOnce; @@ -558,7 +560,7 @@ parameter_types! { pub type WithRialtoParachainsInstance = (); impl pallet_bridge_parachains::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = pallet_bridge_parachains::weights::BridgeWeight; type BridgesGrandpaPalletInstance = RialtoGrandpaInstance; type ParasPalletName = RialtoParasPalletName; @@ -571,7 +573,7 @@ impl pallet_bridge_parachains::Config for Runtime pub type WithWestendParachainsInstance = pallet_bridge_parachains::Instance1; impl pallet_bridge_parachains::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = pallet_bridge_parachains::weights::BridgeWeight; type BridgesGrandpaPalletInstance = WestendGrandpaInstance; type ParasPalletName = WestendParasPalletName; @@ -626,7 +628,7 @@ construct_runtime!( ); generate_bridge_reject_obsolete_headers_and_messages! { - Call, AccountId, + RuntimeCall, AccountId, // Grandpa BridgeRialtoGrandpa, BridgeWestendGrandpa, // Parachains @@ -658,11 +660,12 @@ pub type SignedExtra = ( BridgeRejectObsoleteHeadersAndMessages, ); /// The payload being signed in transactions. -pub type SignedPayload = generic::SignedPayload; +pub type SignedPayload = generic::SignedPayload; /// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic; /// Extrinsic type that has already been checked. -pub type CheckedExtrinsic = generic::CheckedExtrinsic; +pub type CheckedExtrinsic = generic::CheckedExtrinsic; /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -821,6 +824,23 @@ impl_runtime_apis! { .map(|(leaves, proof)| (leaves.into_iter().map(|leaf| mmr::EncodableOpaqueLeaf::from_leaf(&leaf)).collect(), proof)) } + fn generate_historical_batch_proof( + leaf_indices: Vec, + leaves_count: mmr::LeafIndex, + ) -> Result<(Vec, mmr::BatchProof), mmr::Error> { + Mmr::generate_historical_batch_proof(leaf_indices, leaves_count).map( + |(leaves, proof)| { + ( + leaves + .into_iter() + .map(|leaf| mmr::EncodableOpaqueLeaf::from_leaf(&leaf)) + .collect(), + proof, + ) + }, + ) + } + fn verify_batch_proof(leaves: Vec, proof: mmr::BatchProof) -> Result<(), mmr::Error> { @@ -1151,6 +1171,6 @@ mod tests { BRIDGES_PALLETS_MAX_CALL_SIZE ); const MAX_CALL_SIZE: usize = 230; // value from polkadot-runtime tests - assert!(core::mem::size_of::() <= MAX_CALL_SIZE); + 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 index f043f8b9d4..bb9f5dfe75 100644 --- a/bin/millau/runtime/src/rialto_messages.rs +++ b/bin/millau/runtime/src/rialto_messages.rs @@ -16,7 +16,7 @@ //! Everything required to serve Millau <-> Rialto messages. -use crate::{Call, OriginCaller, Runtime}; +use crate::{OriginCaller, Runtime, RuntimeCall, RuntimeOrigin}; use bp_messages::{ source_chain::{SenderOrigin, TargetHeaderChain}, @@ -28,11 +28,7 @@ use bridge_runtime_common::messages::{ self, BasicConfirmationTransactionEstimation, MessageBridge, MessageTransaction, }; use codec::{Decode, Encode}; -use frame_support::{ - parameter_types, - weights::{DispatchClass, Weight}, - RuntimeDebug, -}; +use frame_support::{dispatch::DispatchClass, parameter_types, weights::Weight, RuntimeDebug}; use scale_info::TypeInfo; use sp_runtime::{traits::Saturating, FixedPointNumber, FixedU128}; use sp_std::convert::TryFrom; @@ -47,13 +43,18 @@ pub const INITIAL_RIALTO_FEE_MULTIPLIER: FixedU128 = FixedU128::from_inner(Fixed /// Weight of 2 XCM instructions is for simple `Trap(42)` program, coming through bridge /// (it is prepended with `UniversalOrigin` instruction). It is used just for simplest manual /// tests, confirming that we don't break encoding somewhere between. -pub const BASE_XCM_WEIGHT_TWICE: Weight = 2 * crate::xcm_config::BASE_XCM_WEIGHT; +pub const BASE_XCM_WEIGHT_TWICE: u64 = 2 * crate::xcm_config::BASE_XCM_WEIGHT; parameter_types! { /// Rialto to Millau conversion rate. Initially we treat both tokens as equal. pub storage RialtoToMillauConversionRate: FixedU128 = INITIAL_RIALTO_TO_MILLAU_CONVERSION_RATE; /// Fee multiplier value at Rialto chain. pub storage RialtoFeeMultiplier: FixedU128 = INITIAL_RIALTO_FEE_MULTIPLIER; + /// Weight credit for our test messages. + /// + /// 2 XCM instructions is for simple `Trap(42)` program, coming through bridge + /// (it is prepended with `UniversalOrigin` instruction). + pub const WeightCredit: Weight = Weight::from_ref_time(BASE_XCM_WEIGHT_TWICE); } /// Message payload for Millau -> Rialto messages. @@ -64,7 +65,7 @@ pub type ToRialtoMessageVerifier = messages::source::FromThisChainMessageVerifier; /// Message payload for Rialto -> Millau messages. -pub type FromRialtoMessagePayload = messages::target::FromBridgedChainMessagePayload; +pub type FromRialtoMessagePayload = messages::target::FromBridgedChainMessagePayload; /// Messages proof for Rialto -> Millau messages. pub type FromRialtoMessagesProof = messages::target::FromBridgedChainMessagesProof; @@ -78,9 +79,7 @@ pub type FromRialtoMessageDispatch = messages::target::FromBridgedChainMessageDi WithRialtoMessageBridge, xcm_executor::XcmExecutor, crate::xcm_config::XcmWeigher, - // 2 XCM instructions is for simple `Trap(42)` program, coming through bridge - // (it is prepended with `UniversalOrigin` instruction) - frame_support::traits::ConstU64, + WeightCredit, >; /// Maximal outbound payload size of Millau -> Rialto messages. @@ -120,21 +119,20 @@ impl messages::ChainWithMessages for Millau { type AccountId = bp_millau::AccountId; type Signer = bp_millau::AccountSigner; type Signature = bp_millau::Signature; - type Weight = Weight; type Balance = bp_millau::Balance; } impl messages::ThisChainWithMessages for Millau { - type Origin = crate::Origin; - type Call = crate::Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type ConfirmationTransactionEstimation = BasicConfirmationTransactionEstimation< Self::AccountId, - { bp_millau::MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT }, + { bp_millau::MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT.ref_time() }, { bp_rialto::EXTRA_STORAGE_PROOF_SIZE }, { bp_millau::TX_EXTRA_BYTES }, >; - fn is_message_accepted(send_origin: &Self::Origin, lane: &LaneId) -> bool { + fn is_message_accepted(send_origin: &Self::RuntimeOrigin, lane: &LaneId) -> bool { let here_location = xcm::v3::MultiLocation::from(crate::xcm_config::UniversalLocation::get()); match send_origin.caller { @@ -168,7 +166,7 @@ impl messages::ThisChainWithMessages for Millau { bp_millau::BlockWeights::get().get(DispatchClass::Normal).base_extrinsic, 1, multiplier, - |weight| weight as _, + |weight| weight.ref_time() as _, transaction, ) } @@ -183,7 +181,6 @@ impl messages::ChainWithMessages for Rialto { type AccountId = bp_rialto::AccountId; type Signer = bp_rialto::AccountSigner; type Signature = bp_rialto::Signature; - type Weight = Weight; type Balance = bp_rialto::Balance; } @@ -202,15 +199,15 @@ impl messages::BridgedChainWithMessages for Rialto { message_dispatch_weight: Weight, ) -> MessageTransaction { let message_payload_len = u32::try_from(message_payload.len()).unwrap_or(u32::MAX); - let extra_bytes_in_payload = Weight::from(message_payload_len) - .saturating_sub(pallet_bridge_messages::EXPECTED_DEFAULT_MESSAGE_LENGTH.into()); + let extra_bytes_in_payload = message_payload_len + .saturating_sub(pallet_bridge_messages::EXPECTED_DEFAULT_MESSAGE_LENGTH); MessageTransaction { - dispatch_weight: extra_bytes_in_payload - .saturating_mul(bp_rialto::ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT) + dispatch_weight: bp_rialto::ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT + .saturating_mul(extra_bytes_in_payload as u64) .saturating_add(bp_rialto::DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT) .saturating_sub(if include_pay_dispatch_fee_cost { - 0 + Weight::from_ref_time(0) } else { bp_rialto::PAY_INBOUND_DISPATCH_FEE_WEIGHT }) @@ -230,7 +227,7 @@ impl messages::BridgedChainWithMessages for Rialto { bp_rialto::BlockWeights::get().get(DispatchClass::Normal).base_extrinsic, 1, multiplier, - |weight| weight as _, + |weight| weight.ref_time() as _, transaction, ) } @@ -280,7 +277,7 @@ impl SourceHeaderChain for Rialto { } } -impl SenderOrigin for crate::Origin { +impl SenderOrigin for RuntimeOrigin { fn linked_account(&self) -> Option { // XCM deals wit fees in our deployments None diff --git a/bin/millau/runtime/src/rialto_parachain_messages.rs b/bin/millau/runtime/src/rialto_parachain_messages.rs index f26e0d1006..cce7aa79ba 100644 --- a/bin/millau/runtime/src/rialto_parachain_messages.rs +++ b/bin/millau/runtime/src/rialto_parachain_messages.rs @@ -16,7 +16,7 @@ //! Everything required to serve Millau <-> RialtoParachain messages. -use crate::Runtime; +use crate::{Runtime, RuntimeCall, RuntimeOrigin}; use bp_messages::{ source_chain::TargetHeaderChain, @@ -29,11 +29,7 @@ use bridge_runtime_common::messages::{ self, BasicConfirmationTransactionEstimation, MessageBridge, MessageTransaction, }; use codec::{Decode, Encode}; -use frame_support::{ - parameter_types, - weights::{DispatchClass, Weight}, - RuntimeDebug, -}; +use frame_support::{dispatch::DispatchClass, parameter_types, weights::Weight, RuntimeDebug}; use scale_info::TypeInfo; use sp_runtime::{traits::Saturating, FixedPointNumber, FixedU128}; use sp_std::convert::TryFrom; @@ -43,7 +39,7 @@ pub const DEFAULT_XCM_LANE_TO_RIALTO_PARACHAIN: LaneId = [0, 0, 0, 0]; /// Weight of 2 XCM instructions is for simple `Trap(42)` program, coming through bridge /// (it is prepended with `UniversalOrigin` instruction). It is used just for simplest manual /// tests, confirming that we don't break encoding somewhere between. -pub const BASE_XCM_WEIGHT_TWICE: Weight = 2 * crate::xcm_config::BASE_XCM_WEIGHT; +pub const BASE_XCM_WEIGHT_TWICE: u64 = 2 * crate::xcm_config::BASE_XCM_WEIGHT; /// Initial value of `RialtoParachainToMillauConversionRate` parameter. pub const INITIAL_RIALTO_PARACHAIN_TO_MILLAU_CONVERSION_RATE: FixedU128 = @@ -57,6 +53,11 @@ parameter_types! { pub storage RialtoParachainToMillauConversionRate: FixedU128 = INITIAL_RIALTO_PARACHAIN_TO_MILLAU_CONVERSION_RATE; /// Fee multiplier value at RialtoParachain chain. pub storage RialtoParachainFeeMultiplier: FixedU128 = INITIAL_RIALTO_PARACHAIN_FEE_MULTIPLIER; + /// Weight credit for our test messages. + /// + /// 2 XCM instructions is for simple `Trap(42)` program, coming through bridge + /// (it is prepended with `UniversalOrigin` instruction). + pub const WeightCredit: Weight = Weight::from_ref_time(BASE_XCM_WEIGHT_TWICE); } /// Message payload for Millau -> RialtoParachain messages. @@ -68,7 +69,7 @@ pub type ToRialtoParachainMessageVerifier = /// Message payload for RialtoParachain -> Millau messages. pub type FromRialtoParachainMessagePayload = - messages::target::FromBridgedChainMessagePayload; + messages::target::FromBridgedChainMessagePayload; /// Messages proof for RialtoParachain -> Millau messages. type FromRialtoParachainMessagesProof = @@ -83,9 +84,7 @@ pub type FromRialtoParachainMessageDispatch = messages::target::FromBridgedChain WithRialtoParachainMessageBridge, xcm_executor::XcmExecutor, crate::xcm_config::XcmWeigher, - // 2 XCM instructions is for simple `Trap(42)` program, coming through bridge - // (it is prepended with `UniversalOrigin` instruction) - frame_support::traits::ConstU64, + WeightCredit, >; /// Maximal outbound payload size of Millau -> RialtoParachain messages. @@ -125,21 +124,20 @@ impl messages::ChainWithMessages for Millau { type AccountId = bp_millau::AccountId; type Signer = bp_millau::AccountSigner; type Signature = bp_millau::Signature; - type Weight = Weight; type Balance = bp_millau::Balance; } impl messages::ThisChainWithMessages for Millau { - type Call = crate::Call; - type Origin = crate::Origin; + type RuntimeCall = RuntimeCall; + type RuntimeOrigin = RuntimeOrigin; type ConfirmationTransactionEstimation = BasicConfirmationTransactionEstimation< Self::AccountId, - { bp_millau::MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT }, + { bp_millau::MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT.ref_time() }, { bp_rialto_parachain::EXTRA_STORAGE_PROOF_SIZE }, { bp_millau::TX_EXTRA_BYTES }, >; - fn is_message_accepted(_send_origin: &Self::Origin, lane: &LaneId) -> bool { + fn is_message_accepted(_send_origin: &Self::RuntimeOrigin, lane: &LaneId) -> bool { *lane == DEFAULT_XCM_LANE_TO_RIALTO_PARACHAIN || *lane == [0, 0, 0, 1] } @@ -157,7 +155,7 @@ impl messages::ThisChainWithMessages for Millau { bp_millau::BlockWeights::get().get(DispatchClass::Normal).base_extrinsic, 1, multiplier, - |weight| weight as _, + |weight| weight.ref_time() as _, transaction, ) } @@ -172,7 +170,6 @@ impl messages::ChainWithMessages for RialtoParachain { type AccountId = bp_rialto_parachain::AccountId; type Signer = bp_rialto_parachain::AccountSigner; type Signature = bp_rialto_parachain::Signature; - type Weight = Weight; type Balance = bp_rialto_parachain::Balance; } @@ -191,15 +188,15 @@ impl messages::BridgedChainWithMessages for RialtoParachain { message_dispatch_weight: Weight, ) -> MessageTransaction { let message_payload_len = u32::try_from(message_payload.len()).unwrap_or(u32::MAX); - let extra_bytes_in_payload = Weight::from(message_payload_len) - .saturating_sub(pallet_bridge_messages::EXPECTED_DEFAULT_MESSAGE_LENGTH.into()); + let extra_bytes_in_payload = message_payload_len + .saturating_sub(pallet_bridge_messages::EXPECTED_DEFAULT_MESSAGE_LENGTH); MessageTransaction { - dispatch_weight: extra_bytes_in_payload - .saturating_mul(bp_rialto_parachain::ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT) + dispatch_weight: bp_rialto_parachain::ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT + .saturating_mul(extra_bytes_in_payload as _) .saturating_add(bp_rialto_parachain::DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT) .saturating_sub(if include_pay_dispatch_fee_cost { - 0 + Weight::from_ref_time(0) } else { bp_rialto_parachain::PAY_INBOUND_DISPATCH_FEE_WEIGHT }) @@ -223,7 +220,7 @@ impl messages::BridgedChainWithMessages for RialtoParachain { .base_extrinsic, 1, multiplier, - |weight| weight as _, + |weight| weight.ref_time() as _, transaction, ) } diff --git a/bin/millau/runtime/src/xcm_config.rs b/bin/millau/runtime/src/xcm_config.rs index 88398345d4..9a5851c8d0 100644 --- a/bin/millau/runtime/src/xcm_config.rs +++ b/bin/millau/runtime/src/xcm_config.rs @@ -21,7 +21,7 @@ use super::{ rialto_parachain_messages::{ WithRialtoParachainMessageBridge, DEFAULT_XCM_LANE_TO_RIALTO_PARACHAIN, }, - AccountId, AllPalletsWithSystem, Balances, Call, Event, Origin, Runtime, + AccountId, AllPalletsWithSystem, Balances, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WithRialtoMessagesInstance, WithRialtoParachainMessagesInstance, XcmPallet, }; use bp_messages::LaneId; @@ -34,12 +34,11 @@ use bridge_runtime_common::{ use frame_support::{ parameter_types, traits::{Everything, Nothing}, - weights::Weight, }; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowTopLevelPaidExecutionFrom, - CurrencyAdapter as XcmCurrencyAdapter, IsConcrete, SignedAccountId32AsNative, + CurrencyAdapter as XcmCurrencyAdapter, IsConcrete, MintLocation, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; @@ -60,7 +59,7 @@ parameter_types! { /// 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 = XcmPallet::check_account(); + pub CheckAccount: (AccountId, MintLocation) = (XcmPallet::check_account(), MintLocation::Local); } /// The canonical means of converting a `MultiLocation` into an `AccountId`, used when we want to @@ -90,17 +89,17 @@ pub type LocalAssetTransactor = XcmCurrencyAdapter< /// 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, + SovereignSignedViaLocation, // The AccountId32 location type can be expressed natively as a `Signed` origin. - SignedAccountId32AsNative, + SignedAccountId32AsNative, ); /// The amount of weight an XCM operation takes. This is a safe overestimate. -pub const BASE_XCM_WEIGHT: Weight = 1_000_000_000; +pub const BASE_XCM_WEIGHT: u64 = 1_000_000_000; parameter_types! { /// The amount of weight an XCM operation takes. This is a safe overestimate. - pub const BaseXcmWeight: Weight = BASE_XCM_WEIGHT; + pub const BaseXcmWeight: u64 = BASE_XCM_WEIGHT; /// Maximum number of instructions in a single XCM fragment. A sanity check against weight /// calculations getting too crazy. pub const MaxInstructions: u32 = 100; @@ -130,11 +129,11 @@ pub type Barrier = ( ); /// XCM weigher type. -pub type XcmWeigher = xcm_builder::FixedWeightBounds; +pub type XcmWeigher = xcm_builder::FixedWeightBounds; pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; type AssetTransactor = LocalAssetTransactor; type OriginConverter = LocalOriginConverter; @@ -156,26 +155,26 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; - type CallDispatcher = Call; + type CallDispatcher = RuntimeCall; } /// 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, + SignedToAccountId32, ); impl pallet_xcm::Config for Runtime { - type Event = Event; + 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 SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = XcmRouter; // Anyone can execute XCM messages locally. - type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; + 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 @@ -186,8 +185,8 @@ impl pallet_xcm::Config for Runtime { type XcmReserveTransferFilter = Everything; type Weigher = XcmWeigher; type UniversalLocation = UniversalLocation; - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; type Currency = Balances; @@ -253,6 +252,7 @@ impl XcmBridge for ToRialtoParachainBridge { #[cfg(test)] mod tests { use super::*; + use crate::rialto_messages::WeightCredit; use bp_messages::{ target_chain::{DispatchMessage, DispatchMessageData, MessageDispatch}, MessageKey, @@ -295,13 +295,13 @@ mod tests { WithRialtoMessageBridge, XcmExecutor, XcmWeigher, - frame_support::traits::ConstU64, + WeightCredit, >; new_test_ext().execute_with(|| { let location: MultiLocation = (Parent, X1(GlobalConsensus(RialtoNetwork::get()))).into(); - let xcm: Xcm = vec![Instruction::Trap(42)].into(); + let xcm: Xcm = vec![Instruction::Trap(42)].into(); let mut incoming_message = DispatchMessage { key: MessageKey { lane_id: [0, 0, 0, 0], nonce: 1 }, @@ -309,7 +309,10 @@ mod tests { }; let dispatch_weight = MessageDispatcher::dispatch_weight(&mut incoming_message); - assert_eq!(dispatch_weight, 1_000_000_000); + assert_eq!( + dispatch_weight, + frame_support::weights::Weight::from_ref_time(1_000_000_000) + ); let dispatch_result = MessageDispatcher::dispatch(&AccountId::from([0u8; 32]), incoming_message); @@ -317,7 +320,7 @@ mod tests { dispatch_result, MessageDispatchResult { dispatch_result: true, - unspent_weight: 0, + unspent_weight: frame_support::weights::Weight::from_ref_time(0), dispatch_fee_paid_during_dispatch: false, } ); diff --git a/bin/rialto-parachain/node/src/command.rs b/bin/rialto-parachain/node/src/command.rs index 6afae824a7..533e731b3a 100644 --- a/bin/rialto-parachain/node/src/command.rs +++ b/bin/rialto-parachain/node/src/command.rs @@ -354,7 +354,7 @@ impl CliConfiguration for RelayChainCli { fn base_path(&self) -> Result> { Ok(self .shared_params() - .base_path() + .base_path()? .or_else(|| self.base_path.clone().map(Into::into))) } diff --git a/bin/rialto-parachain/node/src/service.rs b/bin/rialto-parachain/node/src/service.rs index e55f89bacf..f97c2fcd7c 100644 --- a/bin/rialto-parachain/node/src/service.rs +++ b/bin/rialto-parachain/node/src/service.rs @@ -40,7 +40,6 @@ use cumulus_relay_chain_inprocess_interface::build_inprocess_relay_chain; use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface}; // Substrate Imports -use sc_client_api::ExecutorProvider; use sc_executor::{NativeElseWasmExecutor, NativeExecutionDispatch}; use sc_network::{NetworkBlock, NetworkService}; use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager}; @@ -289,7 +288,7 @@ where let prometheus_registry = parachain_config.prometheus_registry().cloned(); let transaction_pool = params.transaction_pool.clone(); let import_queue = cumulus_client_service::SharedImportQueue::new(params.import_queue); - let (network, system_rpc_tx, start_network) = + let (network, system_rpc_tx, tx_handler_controller, start_network) = sc_service::build_network(sc_service::BuildNetworkParams { config: ¶chain_config, client: client.clone(), @@ -318,6 +317,7 @@ where backend: backend.clone(), network: network.clone(), system_rpc_tx, + tx_handler_controller, telemetry: telemetry.as_mut(), })?; @@ -401,10 +401,9 @@ pub fn parachain_build_import_queue( _, _, _, - _, >(cumulus_client_consensus_aura::ImportQueueParams { block_import: client.clone(), - client: client.clone(), + client, create_inherent_data_providers: move |_, _| async move { let time = sp_timestamp::InherentDataProvider::from_system_time(); @@ -414,10 +413,9 @@ pub fn parachain_build_import_queue( slot_duration, ); - Ok((time, slot)) + Ok((slot, time)) }, registry: config.prometheus_registry(), - can_author_with: sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()), spawner: &task_manager.spawn_essential_handle(), telemetry, }) @@ -496,7 +494,7 @@ pub async fn start_node( "Failed to create parachain inherent", ) })?; - Ok((time, slot, parachain_inherent)) + Ok((slot, time, parachain_inherent)) } }, block_import: client.clone(), diff --git a/bin/rialto-parachain/runtime/src/lib.rs b/bin/rialto-parachain/runtime/src/lib.rs index 752270f04c..c427bfac59 100644 --- a/bin/rialto-parachain/runtime/src/lib.rs +++ b/bin/rialto-parachain/runtime/src/lib.rs @@ -52,11 +52,13 @@ use sp_version::RuntimeVersion; // A few exports that help ease life for downstream crates. use bp_runtime::{HeaderId, HeaderIdProvider}; pub use frame_support::{ - construct_runtime, match_types, parameter_types, + construct_runtime, + dispatch::DispatchClass, + match_types, parameter_types, traits::{Everything, IsInVec, Nothing, Randomness}, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, - DispatchClass, IdentityFee, Weight, + IdentityFee, Weight, }, StorageValue, }; @@ -114,9 +116,10 @@ pub type SignedExtra = ( pallet_transaction_payment::ChargeTransactionPayment, ); /// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic; /// Extrinsic type that has already been checked. -pub type CheckedExtrinsic = generic::CheckedExtrinsic; +pub type CheckedExtrinsic = generic::CheckedExtrinsic; /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -188,7 +191,7 @@ 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 Call = Call; + 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. @@ -202,9 +205,9 @@ impl frame_system::Config for Runtime { /// The header type. type Header = generic::Header; /// The ubiquitous event type. - type Event = Event; + type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; /// Maximum number of block number to block hash mappings to keep (oldest pruned first). type BlockHashCount = BlockHashCount; /// Runtime version. @@ -259,7 +262,7 @@ impl pallet_balances::Config for Runtime { /// The type for recording an account's balance. type Balance = Balance; /// The ubiquitous event type. - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -275,21 +278,21 @@ impl pallet_transaction_payment::Config for Runtime { type WeightToFee = IdentityFee; type LengthToFee = IdentityFee; type FeeMultiplierUpdate = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; } impl pallet_sudo::Config for Runtime { - type Call = Call; - type Event = Event; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; } parameter_types! { - pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; + 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 Event = Event; + type RuntimeEvent = RuntimeEvent; type OnSystemEvent = (); type SelfParaId = parachain_info::Pallet; type OutboundXcmpMessageSource = XcmpQueue; @@ -309,7 +312,7 @@ impl pallet_randomness_collective_flip::Config for Runtime {} parameter_types! { pub const RelayLocation: MultiLocation = MultiLocation::parent(); pub const RelayNetwork: NetworkId = CustomNetworkId::Rialto.as_network_id(); - pub RelayOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); + pub RelayOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub UniversalLocation: InteriorMultiLocation = X1(Parachain(ParachainInfo::parachain_id().into())); /// The Millau network ID. pub const MillauNetwork: NetworkId = CustomNetworkId::Millau.as_network_id(); @@ -350,31 +353,31 @@ 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, + SovereignSignedViaLocation, // Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when // recognised. - RelayChainAsNative, + RelayChainAsNative, // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when // recognised. - SiblingParachainAsNative, + SiblingParachainAsNative, // Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a // transaction from the Root origin. - ParentAsSuperuser, + ParentAsSuperuser, // Native signed account converter; this just converts an `AccountId32` origin into a normal // `Origin::Signed` origin of the same 32-byte value. - SignedAccountId32AsNative, + SignedAccountId32AsNative, // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. - XcmPassthrough, + 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. /// One XCM operation is `1_000_000_000` weight - almost certainly a conservative estimate. -pub const BASE_XCM_WEIGHT: Weight = 1_000_000_000; +pub const BASE_XCM_WEIGHT: u64 = 1_000_000_000; parameter_types! { - pub UnitWeightCost: Weight = BASE_XCM_WEIGHT; + pub UnitWeightCost: u64 = BASE_XCM_WEIGHT; // One UNIT buys 1 second of weight. pub const WeightPrice: (MultiLocation, u128) = (MultiLocation::parent(), UNIT); pub const MaxInstructions: u32 = 100; @@ -397,11 +400,11 @@ pub type Barrier = ( ); /// XCM weigher type. -pub type XcmWeigher = FixedWeightBounds; +pub type XcmWeigher = FixedWeightBounds; pub struct XcmConfig; impl Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; type AssetTransactor = LocalAssetTransactor; type OriginConverter = XcmOriginToTransactDispatchOrigin; @@ -422,11 +425,11 @@ impl Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; - type CallDispatcher = Call; + type CallDispatcher = RuntimeCall; } /// No local origins on this chain are allowed to dispatch XCM sends/executions. -pub type LocalOriginToLocation = SignedToAccountId32; +pub type LocalOriginToLocation = SignedToAccountId32; /// The means for routing XCM messages which are not for local execution into the right message /// queues. @@ -462,17 +465,17 @@ impl XcmBridge for ToMillauBridge { } impl pallet_xcm::Config for Runtime { - type Event = Event; - type SendXcmOrigin = EnsureXcmOrigin; + type RuntimeEvent = RuntimeEvent; + type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; - type ExecuteXcmOrigin = EnsureXcmOrigin; + type ExecuteXcmOrigin = EnsureXcmOrigin; type XcmExecuteFilter = Everything; type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; type Weigher = XcmWeigher; - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; type Currency = Balances; @@ -484,12 +487,12 @@ impl pallet_xcm::Config for Runtime { } impl cumulus_pallet_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } impl cumulus_pallet_xcmp_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = (); @@ -501,7 +504,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { } impl cumulus_pallet_dmp_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ExecuteOverweightOrigin = frame_system::EnsureRoot; } @@ -513,7 +516,7 @@ impl pallet_aura::Config for Runtime { } impl pallet_bridge_relayers::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Reward = Balance; type PaymentProcedure = bp_relayers::MintReward, AccountId>; type WeightInfo = (); @@ -556,7 +559,7 @@ parameter_types! { bp_millau::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; // `IdentityFee` is used by Rialto => we may use weight directly pub const GetDeliveryConfirmationTransactionFee: Balance = - bp_rialto_parachain::MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT as _; + bp_rialto_parachain::MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT.ref_time() as _; pub const RootAccountForPayments: Option = None; pub const BridgedChainId: bp_runtime::ChainId = bp_runtime::MILLAU_CHAIN_ID; } @@ -565,7 +568,7 @@ parameter_types! { pub type WithMillauMessagesInstance = (); impl pallet_bridge_messages::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = pallet_bridge_messages::weights::BridgeWeight; type Parameter = millau_messages::RialtoParachainToMillauMessagesParameter; type MaxMessagesToPruneAtOnce = MaxMessagesToPruneAtOnce; @@ -856,6 +859,7 @@ cumulus_pallet_parachain_system::register_validate_block!( #[cfg(test)] mod tests { use super::*; + use crate::millau_messages::WeightCredit; use bp_messages::{ target_chain::{DispatchMessage, DispatchMessageData, MessageDispatch}, MessageKey, @@ -892,13 +896,13 @@ mod tests { WithMillauMessageBridge, XcmExecutor, XcmWeigher, - frame_support::traits::ConstU64, + WeightCredit, >; new_test_ext().execute_with(|| { let location: MultiLocation = (Parent, X1(GlobalConsensus(MillauNetwork::get()))).into(); - let xcm: Xcm = vec![Instruction::Trap(42)].into(); + let xcm: Xcm = vec![Instruction::Trap(42)].into(); let mut incoming_message = DispatchMessage { key: MessageKey { lane_id: [0, 0, 0, 0], nonce: 1 }, @@ -906,7 +910,10 @@ mod tests { }; let dispatch_weight = MessageDispatcher::dispatch_weight(&mut incoming_message); - assert_eq!(dispatch_weight, 1_000_000_000); + assert_eq!( + dispatch_weight, + frame_support::weights::Weight::from_ref_time(1_000_000_000) + ); let dispatch_result = MessageDispatcher::dispatch(&AccountId::from([0u8; 32]), incoming_message); @@ -914,7 +921,7 @@ mod tests { dispatch_result, MessageDispatchResult { dispatch_result: true, - unspent_weight: 0, + unspent_weight: frame_support::weights::Weight::from_ref_time(0), dispatch_fee_paid_during_dispatch: false, } ); diff --git a/bin/rialto-parachain/runtime/src/millau_messages.rs b/bin/rialto-parachain/runtime/src/millau_messages.rs index 96ff18810b..14dc922e19 100644 --- a/bin/rialto-parachain/runtime/src/millau_messages.rs +++ b/bin/rialto-parachain/runtime/src/millau_messages.rs @@ -19,7 +19,7 @@ // TODO: this is almost exact copy of `millau_messages.rs` from Rialto runtime. // Should be extracted to a separate crate and reused here. -use crate::{OriginCaller, Runtime}; +use crate::{OriginCaller, Runtime, RuntimeCall, RuntimeOrigin}; use bp_messages::{ source_chain::{SenderOrigin, TargetHeaderChain}, @@ -31,11 +31,7 @@ use bridge_runtime_common::messages::{ self, BasicConfirmationTransactionEstimation, MessageBridge, MessageTransaction, }; use codec::{Decode, Encode}; -use frame_support::{ - parameter_types, - weights::{DispatchClass, Weight}, - RuntimeDebug, -}; +use frame_support::{dispatch::DispatchClass, parameter_types, weights::Weight, RuntimeDebug}; use scale_info::TypeInfo; use sp_runtime::{traits::Saturating, FixedPointNumber, FixedU128}; use sp_std::convert::TryFrom; @@ -50,13 +46,18 @@ pub const INITIAL_MILLAU_FEE_MULTIPLIER: FixedU128 = FixedU128::from_inner(Fixed /// Weight of 2 XCM instructions is for simple `Trap(42)` program, coming through bridge /// (it is prepended with `UniversalOrigin` instruction). It is used just for simplest manual /// tests, confirming that we don't break encoding somewhere between. -pub const BASE_XCM_WEIGHT_TWICE: Weight = 2 * crate::BASE_XCM_WEIGHT; +pub const BASE_XCM_WEIGHT_TWICE: u64 = 2 * crate::BASE_XCM_WEIGHT; parameter_types! { /// Millau to RialtoParachain conversion rate. Initially we treat both tokens as equal. pub storage MillauToRialtoParachainConversionRate: FixedU128 = INITIAL_MILLAU_TO_RIALTO_PARACHAIN_CONVERSION_RATE; /// Fee multiplier value at Millau chain. pub storage MillauFeeMultiplier: FixedU128 = INITIAL_MILLAU_FEE_MULTIPLIER; + /// Weight credit for our test messages. + /// + /// 2 XCM instructions is for simple `Trap(42)` program, coming through bridge + /// (it is prepended with `UniversalOrigin` instruction). + pub const WeightCredit: Weight = Weight::from_ref_time(BASE_XCM_WEIGHT_TWICE); } /// Message payload for RialtoParachain -> Millau messages. @@ -67,16 +68,14 @@ pub type ToMillauMessageVerifier = messages::source::FromThisChainMessageVerifier; /// Message payload for Millau -> RialtoParachain messages. -pub type FromMillauMessagePayload = messages::target::FromBridgedChainMessagePayload; +pub type FromMillauMessagePayload = messages::target::FromBridgedChainMessagePayload; /// Call-dispatch based message dispatch for Millau -> RialtoParachain messages. pub type FromMillauMessageDispatch = messages::target::FromBridgedChainMessageDispatch< WithMillauMessageBridge, xcm_executor::XcmExecutor, crate::XcmWeigher, - // 2 XCM instructions is for simple `Trap(42)` program, coming through bridge - // (it is prepended with `UniversalOrigin` instruction) - frame_support::traits::ConstU64, + WeightCredit, >; /// Messages proof for Millau -> RialtoParachain messages. @@ -124,21 +123,20 @@ impl messages::ChainWithMessages for RialtoParachain { type AccountId = bp_rialto_parachain::AccountId; type Signer = bp_rialto_parachain::AccountSigner; type Signature = bp_rialto_parachain::Signature; - type Weight = Weight; type Balance = bp_rialto_parachain::Balance; } impl messages::ThisChainWithMessages for RialtoParachain { - type Call = crate::Call; - type Origin = crate::Origin; + type RuntimeCall = RuntimeCall; + type RuntimeOrigin = RuntimeOrigin; type ConfirmationTransactionEstimation = BasicConfirmationTransactionEstimation< Self::AccountId, - { bp_rialto_parachain::MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT }, + { bp_rialto_parachain::MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT.ref_time() }, { bp_millau::EXTRA_STORAGE_PROOF_SIZE }, { bp_rialto_parachain::TX_EXTRA_BYTES }, >; - fn is_message_accepted(send_origin: &Self::Origin, lane: &LaneId) -> bool { + fn is_message_accepted(send_origin: &Self::RuntimeOrigin, lane: &LaneId) -> bool { let here_location = xcm::v3::MultiLocation::from(crate::UniversalLocation::get()); match send_origin.caller { OriginCaller::PolkadotXcm(pallet_xcm::Origin::Xcm(ref location)) @@ -175,7 +173,7 @@ impl messages::ThisChainWithMessages for RialtoParachain { .base_extrinsic, 1, multiplier, - |weight| weight as _, + |weight| weight.ref_time() as _, transaction, ) } @@ -190,7 +188,6 @@ impl messages::ChainWithMessages for Millau { type AccountId = bp_millau::AccountId; type Signer = bp_millau::AccountSigner; type Signature = bp_millau::Signature; - type Weight = Weight; type Balance = bp_millau::Balance; } @@ -209,15 +206,15 @@ impl messages::BridgedChainWithMessages for Millau { message_dispatch_weight: Weight, ) -> MessageTransaction { let message_payload_len = u32::try_from(message_payload.len()).unwrap_or(u32::MAX); - let extra_bytes_in_payload = Weight::from(message_payload_len) - .saturating_sub(pallet_bridge_messages::EXPECTED_DEFAULT_MESSAGE_LENGTH.into()); + let extra_bytes_in_payload = message_payload_len + .saturating_sub(pallet_bridge_messages::EXPECTED_DEFAULT_MESSAGE_LENGTH); MessageTransaction { - dispatch_weight: extra_bytes_in_payload - .saturating_mul(bp_millau::ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT) + dispatch_weight: bp_millau::ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT + .saturating_mul(extra_bytes_in_payload as u64) .saturating_add(bp_millau::DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT) .saturating_sub(if include_pay_dispatch_fee_cost { - 0 + Weight::from_ref_time(0) } else { bp_millau::PAY_INBOUND_DISPATCH_FEE_WEIGHT }) @@ -237,7 +234,7 @@ impl messages::BridgedChainWithMessages for Millau { bp_millau::BlockWeights::get().get(DispatchClass::Normal).base_extrinsic, 1, multiplier, - |weight| weight as _, + |weight| weight.ref_time() as _, transaction, ) } @@ -287,7 +284,7 @@ impl SourceHeaderChain for Millau { } } -impl SenderOrigin for crate::Origin { +impl SenderOrigin for RuntimeOrigin { fn linked_account(&self) -> Option { match self.caller { crate::OriginCaller::system(frame_system::RawOrigin::Signed(ref submitter)) => diff --git a/bin/rialto/node/Cargo.toml b/bin/rialto/node/Cargo.toml index 6a0a1e946c..688279afc7 100644 --- a/bin/rialto/node/Cargo.toml +++ b/bin/rialto/node/Cargo.toml @@ -21,6 +21,7 @@ rialto-runtime = { path = "../runtime" } beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master" } frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master" } frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" } node-inspect = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master", features = ["wasmtime"] } sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/bin/rialto/node/src/chain_spec.rs b/bin/rialto/node/src/chain_spec.rs index 41958aaf39..ffd7bafaa8 100644 --- a/bin/rialto/node/src/chain_spec.rs +++ b/bin/rialto/node/src/chain_spec.rs @@ -15,6 +15,7 @@ // along with Parity Bridges Common. If not, see . use beefy_primitives::crypto::AuthorityId as BeefyId; +use frame_support::weights::Weight; use polkadot_primitives::v2::{AssignmentId, ValidatorId}; use rialto_runtime::{ AccountId, BabeConfig, BalancesConfig, BeefyConfig, BridgeMillauMessagesConfig, @@ -252,7 +253,7 @@ fn testnet_genesis( max_upward_queue_count: 8, max_upward_queue_size: 1024 * 1024, max_downward_message_size: 1024 * 1024, - ump_service_total_weight: 100_000_000_000, + ump_service_total_weight: Weight::from_ref_time(100_000_000_000), max_upward_message_size: 50 * 1024, max_upward_message_num_per_candidate: 5, hrmp_sender_deposit: 0, diff --git a/bin/rialto/runtime/src/lib.rs b/bin/rialto/runtime/src/lib.rs index 506806d0ae..ff7ad88725 100644 --- a/bin/rialto/runtime/src/lib.rs +++ b/bin/rialto/runtime/src/lib.rs @@ -63,9 +63,11 @@ use sp_version::RuntimeVersion; // A few exports that help ease life for downstream crates. pub use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + dispatch::DispatchClass, + parameter_types, traits::{Currency, ExistenceRequirement, Imbalance, KeyOwnerProofSystem}, - weights::{constants::WEIGHT_PER_SECOND, DispatchClass, IdentityFee, RuntimeDbWeight, Weight}, + weights::{constants::WEIGHT_PER_SECOND, IdentityFee, RuntimeDbWeight, Weight}, StorageValue, }; @@ -169,7 +171,7 @@ 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 Call = Call; + 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. @@ -183,9 +185,9 @@ impl frame_system::Config for Runtime { /// The header type. type Header = generic::Header; /// The ubiquitous event type. - type Event = Event; + type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; /// Maximum number of block number to block hash mappings to keep (oldest pruned first). type BlockHashCount = BlockHashCount; /// Version of the runtime. @@ -258,8 +260,7 @@ impl pallet_beefy::Config for Runtime { } impl pallet_grandpa::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; type MaxAuthorities = MaxAuthorities; type KeyOwnerProofSystem = (); type KeyOwnerProof = @@ -340,7 +341,7 @@ impl pallet_balances::Config for Runtime { /// The type for recording an account's balance. type Balance = Balance; /// The ubiquitous event type. - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -360,6 +361,7 @@ parameter_types! { 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 { @@ -372,17 +374,18 @@ impl pallet_transaction_payment::Config for Runtime { TargetBlockFullness, AdjustmentVariable, MinimumMultiplier, + MaximumMultiplier, >; - type Event = Event; + type RuntimeEvent = RuntimeEvent; } impl pallet_sudo::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; } impl pallet_session::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorId = ::AccountId; type ValidatorIdOf = (); type ShouldEndSession = Babe; @@ -399,7 +402,7 @@ impl pallet_authority_discovery::Config for Runtime { } impl pallet_bridge_relayers::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Reward = Balance; type PaymentProcedure = bp_relayers::MintReward, AccountId>; type WeightInfo = (); @@ -444,7 +447,7 @@ parameter_types! { bp_millau::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; // `IdentityFee` is used by Rialto => we may use weight directly pub const GetDeliveryConfirmationTransactionFee: Balance = - bp_rialto::MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT as _; + bp_rialto::MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT.ref_time() as _; pub const RootAccountForPayments: Option = None; pub const BridgedChainId: bp_runtime::ChainId = bp_runtime::MILLAU_CHAIN_ID; } @@ -453,7 +456,7 @@ parameter_types! { pub type WithMillauMessagesInstance = (); impl pallet_bridge_messages::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = pallet_bridge_messages::weights::BridgeWeight; type Parameter = millau_messages::RialtoToMillauMessagesParameter; type MaxMessagesToPruneAtOnce = MaxMessagesToPruneAtOnce; @@ -529,6 +532,9 @@ construct_runtime!( Ump: polkadot_runtime_parachains::ump::{Pallet, Call, Storage, Event}, Hrmp: polkadot_runtime_parachains::hrmp::{Pallet, Call, Storage, Event, Config}, SessionInfo: polkadot_runtime_parachains::session_info::{Pallet, Storage}, + 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}, // Parachain Onboarding Pallets Registrar: polkadot_runtime_common::paras_registrar::{Pallet, Call, Storage, Event}, @@ -562,11 +568,12 @@ pub type SignedExtra = ( pallet_transaction_payment::ChargeTransactionPayment, ); /// The payload being signed in transactions. -pub type SignedPayload = generic::SignedPayload; +pub type SignedPayload = generic::SignedPayload; /// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic; /// Extrinsic type that has already been checked. -pub type CheckedExtrinsic = generic::CheckedExtrinsic; +pub type CheckedExtrinsic = generic::CheckedExtrinsic; /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -679,6 +686,23 @@ impl_runtime_apis! { .map(|(leaves, proof)| (leaves.into_iter().map(|leaf| mmr::EncodableOpaqueLeaf::from_leaf(&leaf)).collect(), proof)) } + fn generate_historical_batch_proof( + leaf_indices: Vec, + leaves_count: mmr::LeafIndex, + ) -> Result<(Vec, mmr::BatchProof), mmr::Error> { + Mmr::generate_historical_batch_proof(leaf_indices, leaves_count).map( + |(leaves, proof)| { + ( + leaves + .into_iter() + .map(|leaf| mmr::EncodableOpaqueLeaf::from_leaf(&leaf)) + .collect(), + proof, + ) + }, + ) + } + fn verify_batch_proof(leaves: Vec, proof: mmr::BatchProof) -> Result<(), mmr::Error> { @@ -725,17 +749,17 @@ impl_runtime_apis! { } impl sp_consensus_babe::BabeApi for Runtime { - fn configuration() -> sp_consensus_babe::BabeGenesisConfiguration { + 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::BabeGenesisConfiguration { + sp_consensus_babe::BabeConfiguration { slot_duration: Babe::slot_duration(), epoch_length: EpochDuration::get(), c: BABE_GENESIS_EPOCH_CONFIG.c, - genesis_authorities: Babe::authorities().to_vec(), + authorities: Babe::authorities().to_vec(), randomness: Babe::randomness(), allowed_slots: BABE_GENESIS_EPOCH_CONFIG.allowed_slots, } @@ -824,7 +848,7 @@ impl_runtime_apis! { fn candidate_events() -> Vec> { polkadot_runtime_parachains::runtime_api_impl::v2::candidate_events::(|ev| { match ev { - Event::Inclusion(ev) => { + RuntimeEvent::Inclusion(ev) => { Some(ev) } _ => None, @@ -867,10 +891,6 @@ impl_runtime_apis! { { polkadot_runtime_parachains::runtime_api_impl::v2::validation_code_hash::(para_id, assumption) } - - fn staging_get_disputes() -> Vec<(polkadot_primitives::v2::SessionIndex, polkadot_primitives::v2::CandidateHash, polkadot_primitives::v2::DisputeState)> { - unimplemented!() - } } impl sp_authority_discovery::AuthorityDiscoveryApi for Runtime { @@ -995,6 +1015,6 @@ mod tests { // 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); + 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 index e5869998fa..ec8a7b822d 100644 --- a/bin/rialto/runtime/src/millau_messages.rs +++ b/bin/rialto/runtime/src/millau_messages.rs @@ -16,7 +16,7 @@ //! Everything required to serve Millau <-> Rialto messages. -use crate::{Call, OriginCaller, Runtime}; +use crate::{OriginCaller, Runtime, RuntimeCall, RuntimeOrigin}; use bp_messages::{ source_chain::{SenderOrigin, TargetHeaderChain}, @@ -28,11 +28,7 @@ use bridge_runtime_common::messages::{ self, BasicConfirmationTransactionEstimation, MessageBridge, MessageTransaction, }; use codec::{Decode, Encode}; -use frame_support::{ - parameter_types, - weights::{DispatchClass, Weight}, - RuntimeDebug, -}; +use frame_support::{dispatch::DispatchClass, parameter_types, weights::Weight, RuntimeDebug}; use scale_info::TypeInfo; use sp_runtime::{traits::Saturating, FixedPointNumber, FixedU128}; use sp_std::convert::TryFrom; @@ -45,13 +41,18 @@ pub const INITIAL_MILLAU_FEE_MULTIPLIER: FixedU128 = FixedU128::from_inner(Fixed /// Weight of 2 XCM instructions is for simple `Trap(42)` program, coming through bridge /// (it is prepended with `UniversalOrigin` instruction). It is used just for simplest manual /// tests, confirming that we don't break encoding somewhere between. -pub const BASE_XCM_WEIGHT_TWICE: Weight = 2 * crate::xcm_config::BASE_XCM_WEIGHT; +pub const BASE_XCM_WEIGHT_TWICE: u64 = 2 * crate::xcm_config::BASE_XCM_WEIGHT; parameter_types! { /// Millau to Rialto conversion rate. Initially we treat both tokens as equal. pub storage MillauToRialtoConversionRate: FixedU128 = INITIAL_MILLAU_TO_RIALTO_CONVERSION_RATE; /// Fee multiplier value at Millau chain. pub storage MillauFeeMultiplier: FixedU128 = INITIAL_MILLAU_FEE_MULTIPLIER; + /// Weight credit for our test messages. + /// + /// 2 XCM instructions is for simple `Trap(42)` program, coming through bridge + /// (it is prepended with `UniversalOrigin` instruction). + pub const WeightCredit: Weight = Weight::from_ref_time(BASE_XCM_WEIGHT_TWICE); } /// Message payload for Rialto -> Millau messages. @@ -62,15 +63,14 @@ pub type ToMillauMessageVerifier = messages::source::FromThisChainMessageVerifier; /// Message payload for Millau -> Rialto messages. -pub type FromMillauMessagePayload = messages::target::FromBridgedChainMessagePayload; +pub type FromMillauMessagePayload = messages::target::FromBridgedChainMessagePayload; /// Call-dispatch based message dispatch for Millau -> Rialto messages. pub type FromMillauMessageDispatch = messages::target::FromBridgedChainMessageDispatch< WithMillauMessageBridge, xcm_executor::XcmExecutor, crate::xcm_config::XcmWeigher, - // - frame_support::traits::ConstU64, + WeightCredit, >; /// Messages proof for Millau -> Rialto messages. @@ -117,21 +117,20 @@ impl messages::ChainWithMessages for Rialto { type AccountId = bp_rialto::AccountId; type Signer = bp_rialto::AccountSigner; type Signature = bp_rialto::Signature; - type Weight = Weight; type Balance = bp_rialto::Balance; } impl messages::ThisChainWithMessages for Rialto { - type Origin = crate::Origin; - type Call = crate::Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type ConfirmationTransactionEstimation = BasicConfirmationTransactionEstimation< Self::AccountId, - { bp_rialto::MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT }, + { bp_rialto::MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT.ref_time() }, { bp_millau::EXTRA_STORAGE_PROOF_SIZE }, { bp_rialto::TX_EXTRA_BYTES }, >; - fn is_message_accepted(send_origin: &Self::Origin, lane: &LaneId) -> bool { + fn is_message_accepted(send_origin: &Self::RuntimeOrigin, lane: &LaneId) -> bool { let here_location = xcm::v3::MultiLocation::from(crate::xcm_config::UniversalLocation::get()); match send_origin.caller { @@ -165,7 +164,7 @@ impl messages::ThisChainWithMessages for Rialto { bp_rialto::BlockWeights::get().get(DispatchClass::Normal).base_extrinsic, 1, multiplier, - |weight| weight as _, + |weight| weight.ref_time() as _, transaction, ) } @@ -180,7 +179,6 @@ impl messages::ChainWithMessages for Millau { type AccountId = bp_millau::AccountId; type Signer = bp_millau::AccountSigner; type Signature = bp_millau::Signature; - type Weight = Weight; type Balance = bp_millau::Balance; } @@ -199,15 +197,15 @@ impl messages::BridgedChainWithMessages for Millau { message_dispatch_weight: Weight, ) -> MessageTransaction { let message_payload_len = u32::try_from(message_payload.len()).unwrap_or(u32::MAX); - let extra_bytes_in_payload = Weight::from(message_payload_len) - .saturating_sub(pallet_bridge_messages::EXPECTED_DEFAULT_MESSAGE_LENGTH.into()); + let extra_bytes_in_payload = message_payload_len + .saturating_sub(pallet_bridge_messages::EXPECTED_DEFAULT_MESSAGE_LENGTH); MessageTransaction { - dispatch_weight: extra_bytes_in_payload - .saturating_mul(bp_millau::ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT) + dispatch_weight: bp_millau::ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT + .saturating_mul(extra_bytes_in_payload as u64) .saturating_add(bp_millau::DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT) .saturating_sub(if include_pay_dispatch_fee_cost { - 0 + Weight::from_ref_time(0) } else { bp_millau::PAY_INBOUND_DISPATCH_FEE_WEIGHT }) @@ -227,7 +225,7 @@ impl messages::BridgedChainWithMessages for Millau { bp_millau::BlockWeights::get().get(DispatchClass::Normal).base_extrinsic, 1, multiplier, - |weight| weight as _, + |weight| weight.ref_time() as _, transaction, ) } @@ -277,7 +275,7 @@ impl SourceHeaderChain for Millau { } } -impl SenderOrigin for crate::Origin { +impl SenderOrigin for RuntimeOrigin { fn linked_account(&self) -> Option { // XCM deals wit fees in our deployments None diff --git a/bin/rialto/runtime/src/parachains.rs b/bin/rialto/runtime/src/parachains.rs index d6267bca23..583358e503 100644 --- a/bin/rialto/runtime/src/parachains.rs +++ b/bin/rialto/runtime/src/parachains.rs @@ -17,29 +17,31 @@ //! Parachains support in Rialto runtime. use crate::{ - AccountId, Babe, Balance, Balances, BlockNumber, Call, Event, Origin, Registrar, Runtime, - ShiftSessionManager, Slots, UncheckedExtrinsic, + AccountId, Babe, Balance, Balances, BlockNumber, Registrar, Runtime, RuntimeCall, RuntimeEvent, + RuntimeOrigin, ShiftSessionManager, Slots, UncheckedExtrinsic, }; -use frame_support::{parameter_types, weights::Weight}; +use frame_support::{parameter_types, traits::KeyOwnerProofSystem, weights::Weight}; use frame_system::EnsureRoot; -use polkadot_primitives::v2::ValidatorIndex; +use polkadot_primitives::v2::{ValidatorId, ValidatorIndex}; use polkadot_runtime_common::{paras_registrar, paras_sudo_wrapper, slots}; use polkadot_runtime_parachains::{ - configuration as parachains_configuration, dmp as parachains_dmp, hrmp as parachains_hrmp, + 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, 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, ump as parachains_ump, }; +use sp_core::crypto::KeyTypeId; use sp_runtime::transaction_validity::TransactionPriority; impl frame_system::offchain::SendTransactionTypes for Runtime where - Call: From, + RuntimeCall: From, { type Extrinsic = UncheckedExtrinsic; - type OverarchingCall = Call; + type OverarchingCall = RuntimeCall; } /// Special `RewardValidators` that does nothing ;) @@ -58,14 +60,14 @@ impl parachains_configuration::Config for Runtime { impl parachains_dmp::Config for Runtime {} impl parachains_hrmp::Config for Runtime { - type Event = Event; - type Origin = Origin; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; type Currency = Balances; type WeightInfo = parachains_hrmp::TestWeightInfo; } impl parachains_inclusion::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type RewardValidators = RewardValidators; type DisputesHandler = (); } @@ -76,6 +78,26 @@ impl parachains_initializer::Config for Runtime { 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! { @@ -83,7 +105,7 @@ parameter_types! { } impl parachains_paras::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = parachains_paras::TestWeightInfo; type UnsignedPriority = ParasUnsignedPriority; type NextSessionRotation = Babe; @@ -106,7 +128,7 @@ parameter_types! { } impl parachains_ump::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type UmpSink = (); type FirstMessageFactorPercent = FirstMessageFactorPercent; type ExecuteOverweightOrigin = EnsureRoot; @@ -121,8 +143,8 @@ parameter_types! { } impl paras_registrar::Config for Runtime { - type Event = Event; - type Origin = Origin; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; type Currency = Balances; type OnSwap = Slots; type ParaDeposit = ParaDeposit; @@ -135,7 +157,7 @@ parameter_types! { } impl slots::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type Registrar = Registrar; type LeasePeriod = LeasePeriod; @@ -150,33 +172,33 @@ pub struct ZeroWeights; impl polkadot_runtime_common::paras_registrar::WeightInfo for ZeroWeights { fn reserve() -> Weight { - 0 + Weight::from_ref_time(0) } fn register() -> Weight { - 0 + Weight::from_ref_time(0) } fn force_register() -> Weight { - 0 + Weight::from_ref_time(0) } fn deregister() -> Weight { - 0 + Weight::from_ref_time(0) } fn swap() -> Weight { - 0 + Weight::from_ref_time(0) } } impl polkadot_runtime_common::slots::WeightInfo for ZeroWeights { fn force_lease() -> Weight { - 0 + Weight::from_ref_time(0) } fn manage_lease_period_start(_c: u32, _t: u32) -> Weight { - 0 + Weight::from_ref_time(0) } fn clear_all_leases() -> Weight { - 0 + Weight::from_ref_time(0) } fn trigger_onboard() -> Weight { - 0 + Weight::from_ref_time(0) } } diff --git a/bin/rialto/runtime/src/xcm_config.rs b/bin/rialto/runtime/src/xcm_config.rs index ab0029302a..780ce710ba 100644 --- a/bin/rialto/runtime/src/xcm_config.rs +++ b/bin/rialto/runtime/src/xcm_config.rs @@ -17,8 +17,8 @@ //! XCM configurations for the Rialto runtime. use super::{ - millau_messages::WithMillauMessageBridge, AccountId, AllPalletsWithSystem, Balances, Call, - Event, Origin, Runtime, WithMillauMessagesInstance, XcmPallet, + millau_messages::WithMillauMessageBridge, AccountId, AllPalletsWithSystem, Balances, Runtime, + RuntimeCall, RuntimeEvent, RuntimeOrigin, WithMillauMessagesInstance, XcmPallet, }; use bp_rialto::WeightToFee; use bridge_runtime_common::{ @@ -28,12 +28,11 @@ use bridge_runtime_common::{ use frame_support::{ parameter_types, traits::{Everything, Nothing}, - weights::Weight, }; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowTopLevelPaidExecutionFrom, - CurrencyAdapter as XcmCurrencyAdapter, IsConcrete, SignedAccountId32AsNative, + CurrencyAdapter as XcmCurrencyAdapter, IsConcrete, MintLocation, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; @@ -52,7 +51,7 @@ parameter_types! { /// 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 = XcmPallet::check_account(); + pub CheckAccount: (AccountId, MintLocation) = (XcmPallet::check_account(), MintLocation::Local); } /// The canonical means of converting a `MultiLocation` into an `AccountId`, used when we want to @@ -82,17 +81,17 @@ pub type LocalAssetTransactor = XcmCurrencyAdapter< /// 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, + SovereignSignedViaLocation, // The AccountId32 location type can be expressed natively as a `Signed` origin. - SignedAccountId32AsNative, + SignedAccountId32AsNative, ); /// The amount of weight an XCM operation takes. This is a safe overestimate. -pub const BASE_XCM_WEIGHT: Weight = 1_000_000_000; +pub const BASE_XCM_WEIGHT: u64 = 1_000_000_000; parameter_types! { /// The amount of weight an XCM operation takes. This is a safe overestimate. - pub const BaseXcmWeight: Weight = BASE_XCM_WEIGHT; + pub const BaseXcmWeight: u64 = BASE_XCM_WEIGHT; /// Maximum number of instructions in a single XCM fragment. A sanity check against weight /// calculations getting too crazy. pub const MaxInstructions: u32 = 100; @@ -120,11 +119,11 @@ pub type Barrier = ( ); /// Incoming XCM weigher type. -pub type XcmWeigher = xcm_builder::FixedWeightBounds; +pub type XcmWeigher = xcm_builder::FixedWeightBounds; pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; type AssetTransactor = LocalAssetTransactor; type OriginConverter = LocalOriginConverter; @@ -146,26 +145,26 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; - type CallDispatcher = Call; + type CallDispatcher = RuntimeCall; } /// 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, + SignedToAccountId32, ); impl pallet_xcm::Config for Runtime { - type Event = Event; + 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 SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = XcmRouter; // Anyone can execute XCM messages locally. - type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; + 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 @@ -176,8 +175,8 @@ impl pallet_xcm::Config for Runtime { type XcmReserveTransferFilter = Everything; type Weigher = XcmWeigher; type UniversalLocation = UniversalLocation; - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; type Currency = Balances; @@ -216,6 +215,7 @@ impl XcmBridge for ToMillauBridge { #[cfg(test)] mod tests { use super::*; + use crate::millau_messages::WeightCredit; use bp_messages::{ target_chain::{DispatchMessage, DispatchMessageData, MessageDispatch}, MessageKey, @@ -252,13 +252,13 @@ mod tests { WithMillauMessageBridge, XcmExecutor, XcmWeigher, - frame_support::traits::ConstU64, + WeightCredit, >; new_test_ext().execute_with(|| { let location: MultiLocation = (Parent, X1(GlobalConsensus(MillauNetwork::get()))).into(); - let xcm: Xcm = vec![Instruction::Trap(42)].into(); + let xcm: Xcm = vec![Instruction::Trap(42)].into(); let mut incoming_message = DispatchMessage { key: MessageKey { lane_id: [0, 0, 0, 0], nonce: 1 }, @@ -266,7 +266,10 @@ mod tests { }; let dispatch_weight = MessageDispatcher::dispatch_weight(&mut incoming_message); - assert_eq!(dispatch_weight, 1_000_000_000); + assert_eq!( + dispatch_weight, + frame_support::weights::Weight::from_ref_time(1_000_000_000) + ); let dispatch_result = MessageDispatcher::dispatch(&AccountId::from([0u8; 32]), incoming_message); @@ -274,7 +277,7 @@ mod tests { dispatch_result, MessageDispatchResult { dispatch_result: true, - unspent_weight: 0, + unspent_weight: frame_support::weights::Weight::from_ref_time(0), dispatch_fee_paid_during_dispatch: false, } ); diff --git a/bin/runtime-common/src/integrity.rs b/bin/runtime-common/src/integrity.rs index 850c71181e..90f048cb9c 100644 --- a/bin/runtime-common/src/integrity.rs +++ b/bin/runtime-common/src/integrity.rs @@ -60,7 +60,7 @@ macro_rules! assert_bridge_types( // `frame_support::weights::Weight` is used here directly, because all chains we know are using this // primitive (may be changed in the future) use $crate::messages::{ - AccountIdOf, BalanceOf, BridgedChain, HashOf, SignatureOf, SignerOf, ThisChain, WeightOf, + AccountIdOf, BalanceOf, BridgedChain, HashOf, SignatureOf, SignerOf, ThisChain, }; use static_assertions::assert_type_eq_all; @@ -68,14 +68,12 @@ macro_rules! assert_bridge_types( assert_type_eq_all!(AccountIdOf>, bp_runtime::AccountIdOf<$this>); assert_type_eq_all!(SignerOf>, bp_runtime::AccountPublicOf<$this>); assert_type_eq_all!(SignatureOf>, bp_runtime::SignatureOf<$this>); - assert_type_eq_all!(WeightOf>, frame_support::weights::Weight); assert_type_eq_all!(BalanceOf>, bp_runtime::BalanceOf<$this>); assert_type_eq_all!(HashOf>, bp_runtime::HashOf<$bridged>); assert_type_eq_all!(AccountIdOf>, bp_runtime::AccountIdOf<$bridged>); assert_type_eq_all!(SignerOf>, bp_runtime::AccountPublicOf<$bridged>); assert_type_eq_all!(SignatureOf>, bp_runtime::SignatureOf<$bridged>); - assert_type_eq_all!(WeightOf>, frame_support::weights::Weight); assert_type_eq_all!(BalanceOf>, bp_runtime::BalanceOf<$bridged>); } } @@ -114,7 +112,7 @@ macro_rules! assert_bridge_messages_pallet_types( use $crate::messages::{ source::FromThisChainMessagePayload, target::FromBridgedChainMessagePayload, - AccountIdOf, BalanceOf, BridgedChain, CallOf, ThisChain, WeightOf, + AccountIdOf, BalanceOf, BridgedChain, CallOf, ThisChain, }; use pallet_bridge_messages::Config as MessagesConfig; use static_assertions::assert_type_eq_all; diff --git a/bin/runtime-common/src/lib.rs b/bin/runtime-common/src/lib.rs index a8f2434fc7..e56b887885 100644 --- a/bin/runtime-common/src/lib.rs +++ b/bin/runtime-common/src/lib.rs @@ -156,14 +156,14 @@ mod tests { } impl sp_runtime::traits::Dispatchable for MockCall { - type Origin = (); + type RuntimeOrigin = (); type Config = (); type Info = (); type PostInfo = (); fn dispatch( self, - _origin: Self::Origin, + _origin: Self::RuntimeOrigin, ) -> sp_runtime::DispatchResultWithInfo { unimplemented!() } diff --git a/bin/runtime-common/src/messages.rs b/bin/runtime-common/src/messages.rs index 57f3f38cb2..880bc6bc39 100644 --- a/bin/runtime-common/src/messages.rs +++ b/bin/runtime-common/src/messages.rs @@ -75,11 +75,6 @@ pub trait ChainWithMessages { type Signer: Encode + Decode; /// Signature type used on the chain. type Signature: Encode + Decode; - /// Type of weight that is used on the chain. This would almost always be a regular - /// `frame_support::weight::Weight`. But since the meaning of weight on different chains - /// may be different, the `WeightOf<>` construct is used to avoid confusion between - /// different weights. - type Weight: From + PartialOrd; /// Type of balances that is used on the chain. type Balance: Encode + Decode @@ -110,14 +105,14 @@ pub trait ConfirmationTransactionEstimation { /// Default implementation for `ConfirmationTransactionEstimation`. pub struct BasicConfirmationTransactionEstimation< AccountId: MaxEncodedLen, - const MAX_CONFIRMATION_TX_WEIGHT: Weight, + const MAX_CONFIRMATION_TX_WEIGHT: u64, const EXTRA_STORAGE_PROOF_SIZE: u32, const TX_EXTRA_BYTES: u32, >(PhantomData); impl< AccountId: MaxEncodedLen, - const MAX_CONFIRMATION_TX_WEIGHT: Weight, + const MAX_CONFIRMATION_TX_WEIGHT: u64, const EXTRA_STORAGE_PROOF_SIZE: u32, const TX_EXTRA_BYTES: u32, > ConfirmationTransactionEstimation @@ -131,7 +126,7 @@ impl< fn estimate_delivery_confirmation_transaction() -> MessageTransaction { let inbound_data_size = InboundLaneData::::encoded_size_hint_u32(1, 1); MessageTransaction { - dispatch_weight: MAX_CONFIRMATION_TX_WEIGHT, + dispatch_weight: Weight::from_ref_time(MAX_CONFIRMATION_TX_WEIGHT), size: inbound_data_size .saturating_add(EXTRA_STORAGE_PROOF_SIZE) .saturating_add(TX_EXTRA_BYTES), @@ -142,15 +137,15 @@ impl< /// This chain that has `pallet-bridge-messages` and `dispatch` modules. pub trait ThisChainWithMessages: ChainWithMessages { /// Call origin on the chain. - type Origin; + type RuntimeOrigin; /// Call type on the chain. - type Call: Encode + Decode; + type RuntimeCall: Encode + Decode; /// Helper for estimating the size and weight of a single message delivery confirmation /// transaction at this chain. - type ConfirmationTransactionEstimation: ConfirmationTransactionEstimation>; + type ConfirmationTransactionEstimation: ConfirmationTransactionEstimation; /// Do we accept message sent by given origin to given lane? - fn is_message_accepted(origin: &Self::Origin, lane: &LaneId) -> bool; + fn is_message_accepted(origin: &Self::RuntimeOrigin, lane: &LaneId) -> bool; /// Maximal number of pending (not yet delivered) messages at This chain. /// @@ -158,12 +153,12 @@ pub trait ThisChainWithMessages: ChainWithMessages { fn maximal_pending_messages_at_outbound_lane() -> MessageNonce; /// Estimate size and weight of single message delivery confirmation transaction at This chain. - fn estimate_delivery_confirmation_transaction() -> MessageTransaction> { + fn estimate_delivery_confirmation_transaction() -> MessageTransaction { Self::ConfirmationTransactionEstimation::estimate_delivery_confirmation_transaction() } /// Returns minimal transaction fee that must be paid for given transaction at This chain. - fn transaction_payment(transaction: MessageTransaction>) -> BalanceOf; + fn transaction_payment(transaction: MessageTransaction) -> BalanceOf; } /// Bridged chain that has `pallet-bridge-messages` and `dispatch` modules. @@ -179,12 +174,12 @@ pub trait BridgedChainWithMessages: ChainWithMessages { fn estimate_delivery_transaction( message_payload: &[u8], include_pay_dispatch_fee_cost: bool, - message_dispatch_weight: WeightOf, - ) -> MessageTransaction>; + message_dispatch_weight: Weight, + ) -> MessageTransaction; /// Returns minimal transaction fee that must be paid for given transaction at the Bridged /// chain. - fn transaction_payment(transaction: MessageTransaction>) -> BalanceOf; + fn transaction_payment(transaction: MessageTransaction) -> BalanceOf; } /// This chain in context of message bridge. @@ -199,14 +194,12 @@ pub type AccountIdOf = ::AccountId; pub type SignerOf = ::Signer; /// Signature type used on the chain. pub type SignatureOf = ::Signature; -/// Type of weight that used on the chain. -pub type WeightOf = ::Weight; /// Type of balances that is used on the chain. pub type BalanceOf = ::Balance; /// Type of origin that is used on the chain. -pub type OriginOf = ::Origin; +pub type OriginOf = ::RuntimeOrigin; /// Type of call that is used on this chain. -pub type CallOf = ::Call; +pub type CallOf = ::RuntimeCall; /// Raw storage proof type (just raw trie nodes). pub type RawStorageProof = Vec>; @@ -411,8 +404,11 @@ pub mod source { // // if we're going to pay dispatch fee at the target chain, then we don't include weight // of the message dispatch in the delivery transaction cost - let delivery_transaction = - BridgedChain::::estimate_delivery_transaction(&payload.encode(), true, 0.into()); + let delivery_transaction = BridgedChain::::estimate_delivery_transaction( + &payload.encode(), + true, + Weight::from_ref_time(0), + ); let delivery_transaction_fee = BridgedChain::::transaction_payment(delivery_transaction); // the fee (in This tokens) of all transactions that are made on This chain @@ -720,7 +716,7 @@ pub mod target { // I have no idea why this method takes `&mut` reference and there's nothing // about that in documentation. Hope it'll only mutate iff error is returned. let weight = XcmWeigher::weight(&mut payload.xcm.1); - let weight = weight.unwrap_or_else(|e| { + let weight = Weight::from_ref_time(weight.unwrap_or_else(|e| { log::debug!( target: "runtime::bridge-dispatch", "Failed to compute dispatch weight of incoming XCM message {:?}/{}: {:?}", @@ -732,12 +728,12 @@ pub mod target { // we shall return 0 and then the XCM executor will fail to execute XCM // if we'll return something else (e.g. maximal value), the lane may stuck 0 - }); + })); payload.weight = Some(weight); weight }, - _ => 0, + _ => Weight::from_ref_time(0), } } @@ -766,8 +762,8 @@ pub mod target { location, xcm, hash, - weight_limit.unwrap_or(0), - weight_credit, + weight_limit.unwrap_or(Weight::from_ref_time(0)).ref_time(), + weight_credit.ref_time(), ); Ok(xcm_outcome) }; @@ -776,7 +772,7 @@ pub mod target { log::trace!(target: "runtime::bridge-dispatch", "Incoming message {:?} dispatched with result: {:?}", message_id, xcm_outcome); MessageDispatchResult { dispatch_result: true, - unspent_weight: 0, + unspent_weight: Weight::from_ref_time(0), dispatch_fee_paid_during_dispatch: false, } } @@ -1093,6 +1089,7 @@ pub mod xcm_copy { fn validate( network: NetworkId, _channel: u32, + _universal_source: &mut Option, destination: &mut Option, message: &mut Option>, ) -> Result<((Vec, XcmHash), MultiAssets), SendError> { @@ -1127,10 +1124,10 @@ mod tests { use frame_support::weights::Weight; use std::ops::RangeInclusive; - const DELIVERY_TRANSACTION_WEIGHT: Weight = 100; - const DELIVERY_CONFIRMATION_TRANSACTION_WEIGHT: Weight = 100; - const THIS_CHAIN_WEIGHT_TO_BALANCE_RATE: Weight = 2; - const BRIDGED_CHAIN_WEIGHT_TO_BALANCE_RATE: Weight = 4; + const DELIVERY_TRANSACTION_WEIGHT: Weight = Weight::from_ref_time(100); + const DELIVERY_CONFIRMATION_TRANSACTION_WEIGHT: u64 = 100; + const THIS_CHAIN_WEIGHT_TO_BALANCE_RATE: u32 = 2; + const BRIDGED_CHAIN_WEIGHT_TO_BALANCE_RATE: u32 = 4; const BRIDGED_CHAIN_TO_THIS_CHAIN_BALANCE_RATE: u32 = 6; const BRIDGED_CHAIN_MIN_EXTRINSIC_WEIGHT: usize = 5; const BRIDGED_CHAIN_MAX_EXTRINSIC_WEIGHT: usize = 2048; @@ -1301,13 +1298,12 @@ mod tests { type AccountId = ThisChainAccountId; type Signer = ThisChainSigner; type Signature = ThisChainSignature; - type Weight = frame_support::weights::Weight; type Balance = ThisChainBalance; } impl ThisChainWithMessages for ThisChain { - type Origin = ThisChainOrigin; - type Call = ThisChainCall; + type RuntimeOrigin = ThisChainOrigin; + type RuntimeCall = ThisChainCall; type ConfirmationTransactionEstimation = BasicConfirmationTransactionEstimation< ::AccountId, { DELIVERY_CONFIRMATION_TRANSACTION_WEIGHT }, @@ -1315,7 +1311,7 @@ mod tests { 0, >; - fn is_message_accepted(_send_origin: &Self::Origin, lane: &LaneId) -> bool { + fn is_message_accepted(_send_origin: &Self::RuntimeOrigin, lane: &LaneId) -> bool { lane == TEST_LANE_ID } @@ -1323,9 +1319,12 @@ mod tests { MAXIMAL_PENDING_MESSAGES_AT_TEST_LANE } - fn transaction_payment(transaction: MessageTransaction>) -> BalanceOf { + fn transaction_payment(transaction: MessageTransaction) -> BalanceOf { ThisChainBalance( - transaction.dispatch_weight as u32 * THIS_CHAIN_WEIGHT_TO_BALANCE_RATE as u32, + transaction + .dispatch_weight + .saturating_mul(THIS_CHAIN_WEIGHT_TO_BALANCE_RATE as u64) + .ref_time() as _, ) } } @@ -1342,14 +1341,12 @@ mod tests { fn estimate_delivery_transaction( _message_payload: &[u8], _include_pay_dispatch_fee_cost: bool, - _message_dispatch_weight: WeightOf, - ) -> MessageTransaction> { + _message_dispatch_weight: Weight, + ) -> MessageTransaction { unreachable!() } - fn transaction_payment( - _transaction: MessageTransaction>, - ) -> BalanceOf { + fn transaction_payment(_transaction: MessageTransaction) -> BalanceOf { unreachable!() } } @@ -1361,13 +1358,12 @@ mod tests { type AccountId = BridgedChainAccountId; type Signer = BridgedChainSigner; type Signature = BridgedChainSignature; - type Weight = frame_support::weights::Weight; type Balance = BridgedChainBalance; } impl ThisChainWithMessages for BridgedChain { - type Origin = BridgedChainOrigin; - type Call = BridgedChainCall; + type RuntimeOrigin = BridgedChainOrigin; + type RuntimeCall = BridgedChainCall; type ConfirmationTransactionEstimation = BasicConfirmationTransactionEstimation< ::AccountId, 0, @@ -1375,7 +1371,7 @@ mod tests { 0, >; - fn is_message_accepted(_send_origin: &Self::Origin, _lane: &LaneId) -> bool { + fn is_message_accepted(_send_origin: &Self::RuntimeOrigin, _lane: &LaneId) -> bool { unreachable!() } @@ -1383,9 +1379,7 @@ mod tests { unreachable!() } - fn transaction_payment( - _transaction: MessageTransaction>, - ) -> BalanceOf { + fn transaction_payment(_transaction: MessageTransaction) -> BalanceOf { unreachable!() } } @@ -1403,17 +1397,20 @@ mod tests { fn estimate_delivery_transaction( _message_payload: &[u8], _include_pay_dispatch_fee_cost: bool, - message_dispatch_weight: WeightOf, - ) -> MessageTransaction> { + message_dispatch_weight: Weight, + ) -> MessageTransaction { MessageTransaction { dispatch_weight: DELIVERY_TRANSACTION_WEIGHT + message_dispatch_weight, size: 0, } } - fn transaction_payment(transaction: MessageTransaction>) -> BalanceOf { + fn transaction_payment(transaction: MessageTransaction) -> BalanceOf { BridgedChainBalance( - transaction.dispatch_weight as u32 * BRIDGED_CHAIN_WEIGHT_TO_BALANCE_RATE as u32, + transaction + .dispatch_weight + .saturating_mul(BRIDGED_CHAIN_WEIGHT_TO_BALANCE_RATE as u64) + .ref_time() as _, ) } } @@ -1786,11 +1783,11 @@ mod tests { assert_eq!( transaction_payment( - 100, + Weight::from_ref_time(100), 10, FixedU128::zero(), - |weight| weight, - MessageTransaction { size: 50, dispatch_weight: 777 }, + |weight| weight.ref_time(), + MessageTransaction { size: 50, dispatch_weight: Weight::from_ref_time(777) }, ), 100 + 50 * 10, ); @@ -1801,12 +1798,12 @@ mod tests { use sp_runtime::traits::One; assert_eq!( - transaction_payment( - 100, + transaction_payment::( + Weight::from_ref_time(100), 10, FixedU128::one(), - |weight| weight, - MessageTransaction { size: 50, dispatch_weight: 777 }, + |weight| weight.ref_time(), + MessageTransaction { size: 50, dispatch_weight: Weight::from_ref_time(777) }, ), 100 + 50 * 10 + 777, ); diff --git a/bin/runtime-common/src/messages_api.rs b/bin/runtime-common/src/messages_api.rs index 68465fa16e..acc4c6d9a6 100644 --- a/bin/runtime-common/src/messages_api.rs +++ b/bin/runtime-common/src/messages_api.rs @@ -39,7 +39,7 @@ where nonce, // dispatch message weight is always zero at the source chain, since we're paying for // dispatch at the target chain - dispatch_weight: 0, + dispatch_weight: frame_support::weights::Weight::from_ref_time(0), size: message_data.payload.len() as _, delivery_and_dispatch_fee: message_data.fee, // we're delivering XCM messages here, so fee is always paid at the target chain diff --git a/bin/runtime-common/src/messages_benchmarking.rs b/bin/runtime-common/src/messages_benchmarking.rs index 68f58d76b8..2a384236af 100644 --- a/bin/runtime-common/src/messages_benchmarking.rs +++ b/bin/runtime-common/src/messages_benchmarking.rs @@ -29,7 +29,7 @@ use crate::messages::{ use bp_messages::{storage_keys, MessageData, MessageKey, MessagePayload}; use bp_runtime::{record_all_trie_keys, StorageProofSize}; use codec::Encode; -use frame_support::weights::{GetDispatchInfo, Weight}; +use frame_support::{dispatch::GetDispatchInfo, weights::Weight}; use pallet_bridge_messages::benchmarking::{ MessageDeliveryProofParams, MessageParams, MessageProofParams, }; @@ -94,7 +94,7 @@ where nonces_start: *params.message_nonces.start(), nonces_end: *params.message_nonces.end(), }, - 0, + Weight::from_ref_time(0), ) } diff --git a/bin/runtime-common/src/messages_extension.rs b/bin/runtime-common/src/messages_extension.rs index bcaadd60ca..39d44ad11f 100644 --- a/bin/runtime-common/src/messages_extension.rs +++ b/bin/runtime-common/src/messages_extension.rs @@ -40,7 +40,7 @@ impl< MessagesDeliveryProof = FromBridgedChainMessagesDeliveryProof, >, Call: IsSubType, T>>, - T: frame_system::Config + T: frame_system::Config + Config, I: 'static, > BridgeRuntimeFilterCall for Pallet @@ -106,7 +106,7 @@ mod tests { }, BridgeRuntimeFilterCall, }, - Call, Runtime, WithRialtoMessagesInstance, + Runtime, RuntimeCall, WithRialtoMessagesInstance, }; fn deliver_message_10() { @@ -121,11 +121,11 @@ mod tests { nonces_end: bp_messages::MessageNonce, ) -> bool { pallet_bridge_messages::Pallet::::validate( - &Call::BridgeRialtoMessages( + &RuntimeCall::BridgeRialtoMessages( pallet_bridge_messages::Call::::receive_messages_proof { relayer_id_at_bridged_chain: [0u8; 32].into(), messages_count: (nonces_end - nonces_start + 1) as u32, - dispatch_weight: 0, + dispatch_weight: frame_support::weights::Weight::from_ref_time(0), proof: FromBridgedChainMessagesProof { bridged_header_hash: Default::default(), storage_proof: vec![], @@ -182,7 +182,7 @@ mod tests { fn validate_message_confirmation(last_delivered_nonce: bp_messages::MessageNonce) -> bool { pallet_bridge_messages::Pallet::::validate( - &Call::BridgeRialtoMessages(pallet_bridge_messages::Call::< + &RuntimeCall::BridgeRialtoMessages(pallet_bridge_messages::Call::< Runtime, WithRialtoMessagesInstance, >::receive_messages_delivery_proof { diff --git a/modules/grandpa/src/extension.rs b/modules/grandpa/src/extension.rs index a724b6518d..c0f02da751 100644 --- a/modules/grandpa/src/extension.rs +++ b/modules/grandpa/src/extension.rs @@ -27,11 +27,11 @@ use sp_runtime::{ /// if there are multiple relays running and submitting the same information. impl< Call: IsSubType, T>>, - T: frame_system::Config + Config, + T: frame_system::Config + Config, I: 'static, > FilterCall for Pallet { - fn validate(call: &::Call) -> TransactionValidity { + fn validate(call: &::RuntimeCall) -> TransactionValidity { let bundled_block_number = match call.is_sub_type() { Some(crate::Call::::submit_finality_proof { ref finality_target, .. }) => *finality_target.number(), @@ -63,18 +63,19 @@ impl< mod tests { use super::FilterCall; use crate::{ - mock::{run_test, test_header, Call, TestNumber, TestRuntime}, + mock::{run_test, test_header, RuntimeCall, TestNumber, TestRuntime}, BestFinalized, }; use bp_test_utils::make_default_justification; fn validate_block_submit(num: TestNumber) -> bool { - crate::Pallet::::validate(&Call::Grandpa( - crate::Call::::submit_finality_proof { - finality_target: Box::new(test_header(num)), - justification: make_default_justification(&test_header(num)), - }, - )) + crate::Pallet::::validate(&RuntimeCall::Grandpa(crate::Call::< + TestRuntime, + (), + >::submit_finality_proof { + finality_target: Box::new(test_header(num)), + justification: make_default_justification(&test_header(num)), + })) .is_ok() } diff --git a/modules/grandpa/src/lib.rs b/modules/grandpa/src/lib.rs index b3801beb6f..97875e8fad 100644 --- a/modules/grandpa/src/lib.rs +++ b/modules/grandpa/src/lib.rs @@ -135,7 +135,7 @@ pub mod pallet { fn on_initialize(_n: T::BlockNumber) -> frame_support::weights::Weight { >::mutate(|count| *count = count.saturating_sub(1)); - (0_u64) + Weight::from_ref_time(0) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -666,7 +666,7 @@ pub fn initialize_for_benchmarks, I: 'static>(header: BridgedHeader mod tests { use super::*; use crate::mock::{ - run_test, test_header, Origin, TestHeader, TestNumber, TestRuntime, + run_test, test_header, RuntimeOrigin, TestHeader, TestNumber, TestRuntime, MAX_BRIDGED_AUTHORITIES, MAX_HEADER_SIZE, }; use bp_runtime::BasicOperatingMode; @@ -676,17 +676,17 @@ mod tests { }; use codec::Encode; use frame_support::{ - assert_err, assert_noop, assert_ok, storage::generator::StorageValue, - weights::PostDispatchInfo, + assert_err, assert_noop, assert_ok, dispatch::PostDispatchInfo, + storage::generator::StorageValue, }; use sp_runtime::{Digest, DigestItem, DispatchError}; fn initialize_substrate_bridge() { - assert_ok!(init_with_origin(Origin::root())); + assert_ok!(init_with_origin(RuntimeOrigin::root())); } fn init_with_origin( - origin: Origin, + origin: RuntimeOrigin, ) -> Result< InitializationData, sp_runtime::DispatchErrorWithPostInfo, @@ -708,7 +708,7 @@ mod tests { let justification = make_default_justification(&header); Pallet::::submit_finality_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), Box::new(header), justification, ) @@ -763,13 +763,13 @@ mod tests { #[test] fn init_root_or_owner_origin_can_initialize_pallet() { run_test(|| { - assert_noop!(init_with_origin(Origin::signed(1)), DispatchError::BadOrigin); - assert_ok!(init_with_origin(Origin::root())); + assert_noop!(init_with_origin(RuntimeOrigin::signed(1)), DispatchError::BadOrigin); + assert_ok!(init_with_origin(RuntimeOrigin::root())); // Reset storage so we can initialize the pallet again BestFinalized::::kill(); PalletOwner::::put(2); - assert_ok!(init_with_origin(Origin::signed(2))); + assert_ok!(init_with_origin(RuntimeOrigin::signed(2))); }) } @@ -779,7 +779,7 @@ mod tests { assert_eq!(BestFinalized::::get(), None,); assert_eq!(Pallet::::best_finalized(), None); - let init_data = init_with_origin(Origin::root()).unwrap(); + let init_data = init_with_origin(RuntimeOrigin::root()).unwrap(); assert!(>::contains_key(init_data.header.hash())); assert_eq!(BestFinalized::::get().unwrap().1, init_data.header.hash()); @@ -796,7 +796,7 @@ mod tests { run_test(|| { initialize_substrate_bridge(); assert_noop!( - init_with_origin(Origin::root()), + init_with_origin(RuntimeOrigin::root()), >::AlreadyInitialized ); }) @@ -816,7 +816,7 @@ mod tests { }; assert_noop!( - Pallet::::initialize(Origin::root(), init_data), + Pallet::::initialize(RuntimeOrigin::root(), init_data), Error::::TooManyAuthoritiesInSet, ); }); @@ -835,7 +835,7 @@ mod tests { }; assert_noop!( - Pallet::::initialize(Origin::root(), init_data), + Pallet::::initialize(RuntimeOrigin::root(), init_data), Error::::TooLargeHeader, ); }); @@ -847,7 +847,7 @@ mod tests { initialize_substrate_bridge(); assert_ok!(Pallet::::set_operating_mode( - Origin::root(), + RuntimeOrigin::root(), BasicOperatingMode::Halted )); assert_noop!( @@ -856,7 +856,7 @@ mod tests { ); assert_ok!(Pallet::::set_operating_mode( - Origin::root(), + RuntimeOrigin::root(), BasicOperatingMode::Normal )); assert_ok!(submit_finality_proof(1)); @@ -878,7 +878,7 @@ mod tests { submit_finality_proof(1), PostDispatchInfo { actual_weight: None, - pays_fee: frame_support::weights::Pays::Yes, + pays_fee: frame_support::dispatch::Pays::Yes, }, ); @@ -901,7 +901,7 @@ mod tests { assert_err!( Pallet::::submit_finality_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), Box::new(header), justification, ), @@ -921,7 +921,7 @@ mod tests { assert_err!( Pallet::::submit_finality_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), Box::new(header), justification, ), @@ -943,14 +943,14 @@ mod tests { operating_mode: BasicOperatingMode::Normal, }; - assert_ok!(Pallet::::initialize(Origin::root(), init_data)); + assert_ok!(Pallet::::initialize(RuntimeOrigin::root(), init_data)); let header = test_header(1); let justification = make_default_justification(&header); assert_err!( Pallet::::submit_finality_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), Box::new(header), justification, ), @@ -989,13 +989,13 @@ mod tests { // Let's import our test header assert_ok!( Pallet::::submit_finality_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), Box::new(header.clone()), justification ), PostDispatchInfo { actual_weight: None, - pays_fee: frame_support::weights::Pays::No, + pays_fee: frame_support::dispatch::Pays::No, }, ); @@ -1028,7 +1028,7 @@ mod tests { // Should not be allowed to import this header assert_err!( Pallet::::submit_finality_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), Box::new(header), justification ), @@ -1053,7 +1053,7 @@ mod tests { // Should not be allowed to import this header assert_err!( Pallet::::submit_finality_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), Box::new(header), justification ), @@ -1078,7 +1078,7 @@ mod tests { // Should not be allowed to import this header assert_err!( Pallet::::submit_finality_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), Box::new(header), justification ), @@ -1103,7 +1103,7 @@ mod tests { // Should not be allowed to import this header assert_err!( Pallet::::submit_finality_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), Box::new(header), justification ), @@ -1168,7 +1168,7 @@ mod tests { invalid_justification.round = 42; Pallet::::submit_finality_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), Box::new(header), invalid_justification, ) diff --git a/modules/grandpa/src/mock.rs b/modules/grandpa/src/mock.rs index babdd4b792..0f83bd528d 100644 --- a/modules/grandpa/src/mock.rs +++ b/modules/grandpa/src/mock.rs @@ -51,22 +51,22 @@ construct_runtime! { parameter_types! { pub const BlockHashCount: u64 = 250; - pub const MaximumBlockWeight: Weight = 1024; + pub const MaximumBlockWeight: Weight = Weight::from_ref_time(1024); pub const MaximumBlockLength: u32 = 2 * 1024; pub const AvailableBlockRatio: Perbill = Perbill::one(); } impl frame_system::Config for TestRuntime { - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type Index = u64; - type Call = Call; + type RuntimeCall = RuntimeCall; type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = (); + type RuntimeEvent = (); type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; diff --git a/modules/grandpa/src/storage_types.rs b/modules/grandpa/src/storage_types.rs index ac4835e4f0..d930dbadbc 100644 --- a/modules/grandpa/src/storage_types.rs +++ b/modules/grandpa/src/storage_types.rs @@ -43,7 +43,7 @@ impl, I: 'static> StoredAuthoritySet { /// /// Returns error if number of authorities in the provided list is too large. pub fn try_new(authorities: AuthorityList, set_id: SetId) -> Result { - Ok(Self { authorities: TryFrom::try_from(authorities)?, set_id }) + Ok(Self { authorities: TryFrom::try_from(authorities).map_err(drop)?, set_id }) } } diff --git a/modules/grandpa/src/weights.rs b/modules/grandpa/src/weights.rs index ece88ab55c..bb9d5270b5 100644 --- a/modules/grandpa/src/weights.rs +++ b/modules/grandpa/src/weights.rs @@ -59,21 +59,21 @@ pub trait WeightInfo { pub struct BridgeWeight(PhantomData); impl WeightInfo for BridgeWeight { fn submit_finality_proof(p: u32, v: u32) -> Weight { - (105_417_000 as Weight) - .saturating_add((40_923_000 as Weight).saturating_mul(p as Weight)) - .saturating_add((1_691_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(105_417_000 as u64) + .saturating_add(Weight::from_ref_time(40_923_000 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_ref_time(1_691_000 as u64).saturating_mul(v as u64)) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { fn submit_finality_proof(p: u32, v: u32) -> Weight { - (105_417_000 as Weight) - .saturating_add((40_923_000 as Weight).saturating_mul(p as Weight)) - .saturating_add((1_691_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(105_417_000 as u64) + .saturating_add(Weight::from_ref_time(40_923_000 as u64).saturating_mul(p as u64)) + .saturating_add(Weight::from_ref_time(1_691_000 as u64).saturating_mul(v as u64)) + .saturating_add(RocksDbWeight::get().reads(7 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) } } diff --git a/modules/messages/src/inbound_lane.rs b/modules/messages/src/inbound_lane.rs index cae7692704..bee1df06c5 100644 --- a/modules/messages/src/inbound_lane.rs +++ b/modules/messages/src/inbound_lane.rs @@ -554,7 +554,7 @@ mod tests { run_test(|| { let mut lane = inbound_lane::(TEST_LANE_ID); let mut payload = REGULAR_PAYLOAD; - payload.dispatch_result.unspent_weight = 1; + *payload.dispatch_result.unspent_weight.ref_time_mut() = 1; assert_eq!( lane.receive_message::( &TEST_RELAYER_A, diff --git a/modules/messages/src/lib.rs b/modules/messages/src/lib.rs index 962fd8f791..61e6df211c 100644 --- a/modules/messages/src/lib.rs +++ b/modules/messages/src/lib.rs @@ -65,11 +65,7 @@ use bp_messages::{ }; use bp_runtime::{BasicOperatingMode, ChainId, OwnedBridgeModule, Size}; use codec::{Decode, Encode, MaxEncodedLen}; -use frame_support::{ - ensure, fail, - traits::Get, - weights::{Pays, PostDispatchInfo}, -}; +use frame_support::{dispatch::PostDispatchInfo, ensure, fail, traits::Get}; use num_traits::{SaturatingAdd, Zero}; use sp_std::{ cell::RefCell, cmp::PartialOrd, collections::vec_deque::VecDeque, marker::PhantomData, @@ -104,7 +100,8 @@ pub mod pallet { // General types /// The overarching event type. - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + + IsType<::RuntimeEvent>; /// Benchmarks results from runtime we're plugged into. type WeightInfo: WeightInfoExt; @@ -174,13 +171,13 @@ pub mod pallet { type TargetHeaderChain: TargetHeaderChain; /// Message payload verifier. type LaneMessageVerifier: LaneMessageVerifier< - Self::Origin, + Self::RuntimeOrigin, Self::OutboundPayload, Self::OutboundMessageFee, >; /// Message delivery payment. type MessageDeliveryAndDispatchPayment: MessageDeliveryAndDispatchPayment< - Self::Origin, + Self::RuntimeOrigin, Self::AccountId, Self::OutboundMessageFee, >; @@ -333,9 +330,10 @@ pub mod pallet { }); // compute actual dispatch weight that depends on the stored message size - let actual_weight = sp_std::cmp::min( + let actual_weight = sp_std::cmp::min_by( T::WeightInfo::maximal_increase_message_fee(), T::WeightInfo::increase_message_fee(message_size as _), + |w1, w2| w1.ref_time().cmp(&w2.ref_time()), ); Ok(PostDispatchInfo { actual_weight: Some(actual_weight), pays_fee: Pays::Yes }) @@ -418,7 +416,7 @@ pub mod pallet { // on this lane. We can't dispatch lane messages out-of-order, so if declared // weight is not enough, let's move to next lane let dispatch_weight = T::MessageDispatch::dispatch_weight(&mut message); - if dispatch_weight > dispatch_weight_left { + if dispatch_weight.ref_time() > dispatch_weight_left.ref_time() { log::trace!( target: LOG_TARGET, "Cannot dispatch any more messages on lane {:?}. Weight: declared={}, left={}", @@ -456,7 +454,10 @@ pub mod pallet { ReceivalResult::TooManyUnconfirmedMessages => (dispatch_weight, true), }; - let unspent_weight = sp_std::cmp::min(unspent_weight, dispatch_weight); + let unspent_weight = + sp_std::cmp::min_by(unspent_weight, dispatch_weight, |w1, w2| { + w1.ref_time().cmp(&w2.ref_time()) + }); dispatch_weight_left -= dispatch_weight - unspent_weight; actual_weight = actual_weight.saturating_sub(unspent_weight).saturating_sub( // delivery call weight formula assumes that the fee is paid at @@ -465,7 +466,7 @@ pub mod pallet { if refund_pay_dispatch_fee { T::WeightInfo::pay_inbound_dispatch_fee_overhead() } else { - 0 + Weight::from_ref_time(0) }, ); } @@ -580,11 +581,11 @@ pub mod pallet { if let Some(confirmed_messages) = confirmed_messages { // handle messages delivery confirmation let preliminary_callback_overhead = - relayers_state.total_messages.saturating_mul(single_message_callback_overhead); + single_message_callback_overhead.saturating_mul(relayers_state.total_messages); let actual_callback_weight = T::OnDeliveryConfirmed::on_messages_delivered(&lane_id, &confirmed_messages); - match preliminary_callback_overhead.checked_sub(actual_callback_weight) { - Some(difference) if difference == 0 => (), + match preliminary_callback_overhead.checked_sub(&actual_callback_weight) { + Some(difference) if difference.ref_time() == 0 => (), Some(difference) => { log::trace!( target: LOG_TARGET, @@ -775,8 +776,11 @@ pub mod pallet { } impl - bp_messages::source_chain::MessagesBridge - for Pallet + bp_messages::source_chain::MessagesBridge< + T::RuntimeOrigin, + T::OutboundMessageFee, + T::OutboundPayload, + > for Pallet where T: Config, I: 'static, @@ -784,7 +788,7 @@ where type Error = sp_runtime::DispatchErrorWithPostInfo; fn send_message( - sender: T::Origin, + sender: T::RuntimeOrigin, lane: LaneId, message: T::OutboundPayload, delivery_and_dispatch_fee: T::OutboundMessageFee, @@ -795,7 +799,7 @@ where /// Function that actually sends message. fn send_message, I: 'static>( - submitter: T::Origin, + submitter: T::RuntimeOrigin, lane_id: LaneId, payload: T::OutboundPayload, delivery_and_dispatch_fee: T::OutboundMessageFee, @@ -875,8 +879,8 @@ fn send_message, I: 'static>( let single_message_callback_overhead = T::WeightInfo::single_message_callback_overhead(T::DbWeight::get()); let actual_callback_weight = T::OnMessageAccepted::on_messages_accepted(&lane_id, &nonce); - match single_message_callback_overhead.checked_sub(actual_callback_weight) { - Some(difference) if difference == 0 => (), + match single_message_callback_overhead.checked_sub(&actual_callback_weight) { + Some(difference) if difference.ref_time() == 0 => (), Some(difference) => { log::trace!( target: LOG_TARGET, @@ -1104,8 +1108,8 @@ fn verify_and_decode_messages_proof, Fee, Dispatch mod tests { use super::*; use crate::mock::{ - message, message_payload, run_test, unrewarded_relayer, Balance, Event as TestEvent, - Origin, TestMessageDeliveryAndDispatchPayment, TestMessagesDeliveryProof, + message, message_payload, run_test, unrewarded_relayer, Balance, RuntimeEvent as TestEvent, + RuntimeOrigin, TestMessageDeliveryAndDispatchPayment, TestMessagesDeliveryProof, TestMessagesParameter, TestMessagesProof, TestOnDeliveryConfirmed1, TestOnDeliveryConfirmed2, TestOnMessageAccepted, TestRuntime, TokenConversionRate, MAX_OUTBOUND_PAYLOAD_SIZE, PAYLOAD_REJECTED_BY_TARGET_CHAIN, REGULAR_PAYLOAD, TEST_LANE_ID, @@ -1149,10 +1153,10 @@ mod tests { let message_nonce = outbound_lane::(TEST_LANE_ID).data().latest_generated_nonce + 1; let weight = Pallet::::send_message( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_LANE_ID, REGULAR_PAYLOAD, - REGULAR_PAYLOAD.declared_weight, + REGULAR_PAYLOAD.declared_weight.ref_time(), ) .expect("send_message has failed") .actual_weight @@ -1174,7 +1178,7 @@ mod tests { // check that fee has been withdrawn from submitter assert!(TestMessageDeliveryAndDispatchPayment::is_fee_paid( 1, - REGULAR_PAYLOAD.declared_weight + REGULAR_PAYLOAD.declared_weight.ref_time() )); weight @@ -1185,7 +1189,7 @@ mod tests { System::::reset_events(); assert_ok!(Pallet::::receive_messages_delivery_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TestMessagesDeliveryProof(Ok(( TEST_LANE_ID, InboundLaneData { @@ -1226,7 +1230,7 @@ mod tests { let parameter = TestMessagesParameter::TokenConversionRate(10.into()); assert_ok!(Pallet::::update_pallet_parameter( - Origin::root(), + RuntimeOrigin::root(), parameter.clone(), )); @@ -1250,7 +1254,7 @@ mod tests { let parameter = TestMessagesParameter::TokenConversionRate(10.into()); assert_ok!(Pallet::::update_pallet_parameter( - Origin::signed(2), + RuntimeOrigin::signed(2), parameter.clone(), )); @@ -1271,7 +1275,7 @@ mod tests { run_test(|| { assert_noop!( Pallet::::update_pallet_parameter( - Origin::signed(2), + RuntimeOrigin::signed(2), TestMessagesParameter::TokenConversionRate(10.into()), ), DispatchError::BadOrigin, @@ -1281,7 +1285,7 @@ mod tests { assert_noop!( Pallet::::update_pallet_parameter( - Origin::signed(1), + RuntimeOrigin::signed(1), TestMessagesParameter::TokenConversionRate(10.into()), ), DispatchError::BadOrigin, @@ -1327,22 +1331,27 @@ mod tests { assert_noop!( Pallet::::send_message( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_LANE_ID, REGULAR_PAYLOAD, - REGULAR_PAYLOAD.declared_weight, + REGULAR_PAYLOAD.declared_weight.ref_time(), ), Error::::NotOperatingNormally, ); assert_noop!( - Pallet::::increase_message_fee(Origin::signed(1), TEST_LANE_ID, 1, 1,), + Pallet::::increase_message_fee( + RuntimeOrigin::signed(1), + TEST_LANE_ID, + 1, + 1, + ), Error::::BridgeModule(bp_runtime::OwnedBridgeModuleError::Halted), ); assert_noop!( Pallet::::receive_messages_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_RELAYER_A, Ok(vec![message(2, REGULAR_PAYLOAD)]).into(), 1, @@ -1353,7 +1362,7 @@ mod tests { assert_noop!( Pallet::::receive_messages_delivery_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TestMessagesDeliveryProof(Ok(( TEST_LANE_ID, InboundLaneData { @@ -1387,23 +1396,23 @@ mod tests { assert_noop!( Pallet::::send_message( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_LANE_ID, REGULAR_PAYLOAD, - REGULAR_PAYLOAD.declared_weight, + REGULAR_PAYLOAD.declared_weight.ref_time(), ), Error::::NotOperatingNormally, ); assert_ok!(Pallet::::increase_message_fee( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_LANE_ID, 1, 1, )); assert_ok!(Pallet::::receive_messages_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_RELAYER_A, Ok(vec![message(1, REGULAR_PAYLOAD)]).into(), 1, @@ -1411,7 +1420,7 @@ mod tests { ),); assert_ok!(Pallet::::receive_messages_delivery_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TestMessagesDeliveryProof(Ok(( TEST_LANE_ID, InboundLaneData { @@ -1449,7 +1458,7 @@ mod tests { .extend_from_slice(&[0u8; MAX_OUTBOUND_PAYLOAD_SIZE as usize]); assert_noop!( Pallet::::send_message( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_LANE_ID, message_payload.clone(), Balance::MAX, @@ -1463,7 +1472,7 @@ mod tests { } assert_eq!(message_payload.size(), MAX_OUTBOUND_PAYLOAD_SIZE); assert_ok!(Pallet::::send_message( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_LANE_ID, message_payload, Balance::MAX, @@ -1477,10 +1486,10 @@ mod tests { // messages with this payload are rejected by target chain verifier assert_noop!( Pallet::::send_message( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_LANE_ID, PAYLOAD_REJECTED_BY_TARGET_CHAIN, - PAYLOAD_REJECTED_BY_TARGET_CHAIN.declared_weight + PAYLOAD_REJECTED_BY_TARGET_CHAIN.declared_weight.ref_time(), ), Error::::MessageRejectedByChainVerifier, ); @@ -1493,7 +1502,7 @@ mod tests { // messages with zero fee are rejected by lane verifier assert_noop!( Pallet::::send_message( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_LANE_ID, REGULAR_PAYLOAD, 0 @@ -1509,10 +1518,10 @@ mod tests { TestMessageDeliveryAndDispatchPayment::reject_payments(); assert_noop!( Pallet::::send_message( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_LANE_ID, REGULAR_PAYLOAD, - REGULAR_PAYLOAD.declared_weight + REGULAR_PAYLOAD.declared_weight.ref_time(), ), Error::::FailedToWithdrawMessageFee, ); @@ -1523,7 +1532,7 @@ mod tests { fn receive_messages_proof_works() { run_test(|| { assert_ok!(Pallet::::receive_messages_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_RELAYER_A, Ok(vec![message(1, REGULAR_PAYLOAD)]).into(), 1, @@ -1567,7 +1576,7 @@ mod tests { Some(OutboundLaneData { latest_received_nonce: 9, ..Default::default() }); assert_ok!(Pallet::::receive_messages_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_RELAYER_A, message_proof, 1, @@ -1601,12 +1610,14 @@ mod tests { #[test] fn receive_messages_proof_does_not_accept_message_if_dispatch_weight_is_not_enough() { run_test(|| { + let mut declared_weight = REGULAR_PAYLOAD.declared_weight; + *declared_weight.ref_time_mut() -= 1; assert_ok!(Pallet::::receive_messages_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_RELAYER_A, Ok(vec![message(1, REGULAR_PAYLOAD)]).into(), 1, - REGULAR_PAYLOAD.declared_weight - 1, + declared_weight, )); assert_eq!(InboundLanes::::get(TEST_LANE_ID).last_delivered_nonce(), 0); }); @@ -1617,11 +1628,11 @@ mod tests { run_test(|| { assert_noop!( Pallet::::receive_messages_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_RELAYER_A, Err(()).into(), 1, - 0, + Weight::from_ref_time(0), ), Error::::InvalidMessagesProof, ); @@ -1633,11 +1644,11 @@ mod tests { run_test(|| { assert_noop!( Pallet::::receive_messages_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_RELAYER_A, Ok(vec![message(1, REGULAR_PAYLOAD)]).into(), u32::MAX, - 0, + Weight::from_ref_time(0), ), Error::::TooManyMessagesInTheProof, ); @@ -1661,13 +1672,13 @@ mod tests { fn receive_messages_delivery_proof_rewards_relayers() { run_test(|| { assert_ok!(Pallet::::send_message( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_LANE_ID, REGULAR_PAYLOAD, 1000, )); assert_ok!(Pallet::::send_message( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_LANE_ID, REGULAR_PAYLOAD, 2000, @@ -1675,7 +1686,7 @@ mod tests { // this reports delivery of message 1 => reward is paid to TEST_RELAYER_A assert_ok!(Pallet::::receive_messages_delivery_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TestMessagesDeliveryProof(Ok(( TEST_LANE_ID, InboundLaneData { @@ -1698,7 +1709,7 @@ mod tests { // this reports delivery of both message 1 and message 2 => reward is paid only to // TEST_RELAYER_B assert_ok!(Pallet::::receive_messages_delivery_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TestMessagesDeliveryProof(Ok(( TEST_LANE_ID, InboundLaneData { @@ -1728,7 +1739,7 @@ mod tests { run_test(|| { assert_noop!( Pallet::::receive_messages_delivery_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TestMessagesDeliveryProof(Err(())), Default::default(), ), @@ -1743,7 +1754,7 @@ mod tests { // when number of relayers entries is invalid assert_noop!( Pallet::::receive_messages_delivery_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TestMessagesDeliveryProof(Ok(( TEST_LANE_ID, InboundLaneData { @@ -1769,7 +1780,7 @@ mod tests { // when number of messages is invalid assert_noop!( Pallet::::receive_messages_delivery_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TestMessagesDeliveryProof(Ok(( TEST_LANE_ID, InboundLaneData { @@ -1795,7 +1806,7 @@ mod tests { // when last delivered nonce is invalid assert_noop!( Pallet::::receive_messages_delivery_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TestMessagesDeliveryProof(Ok(( TEST_LANE_ID, InboundLaneData { @@ -1827,11 +1838,12 @@ mod tests { invalid_message.data.payload = Vec::new(); assert_ok!(Pallet::::receive_messages_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_RELAYER_A, Ok(vec![invalid_message]).into(), 1, - 0, // weight may be zero in this case (all messages are improperly encoded) + Weight::from_ref_time(0), /* weight may be zero in this case (all messages are + * improperly encoded) */ ),); assert_eq!(InboundLanes::::get(TEST_LANE_ID).last_delivered_nonce(), 1,); @@ -1845,7 +1857,7 @@ mod tests { invalid_message.data.payload = Vec::new(); assert_ok!(Pallet::::receive_messages_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_RELAYER_A, Ok( vec![message(1, REGULAR_PAYLOAD), invalid_message, message(3, REGULAR_PAYLOAD),] @@ -1862,12 +1874,12 @@ mod tests { #[test] fn actual_dispatch_weight_does_not_overlow() { run_test(|| { - let message1 = message(1, message_payload(0, Weight::MAX / 2)); - let message2 = message(2, message_payload(0, Weight::MAX / 2)); - let message3 = message(3, message_payload(0, Weight::MAX / 2)); + let message1 = message(1, message_payload(0, u64::MAX / 2)); + let message2 = message(2, message_payload(0, u64::MAX / 2)); + let message3 = message(3, message_payload(0, u64::MAX / 2)); assert_ok!(Pallet::::receive_messages_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_RELAYER_A, // this may cause overflow if source chain storage is invalid Ok(vec![message1, message2, message3]).into(), @@ -1886,7 +1898,7 @@ mod tests { assert_noop!( Pallet::::increase_message_fee( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_LANE_ID, 1, 100, @@ -1901,7 +1913,7 @@ mod tests { run_test(|| { assert_noop!( Pallet::::increase_message_fee( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_LANE_ID, 1, 100, @@ -1920,7 +1932,7 @@ mod tests { assert_noop!( Pallet::::increase_message_fee( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_LANE_ID, 1, 100, @@ -1936,7 +1948,7 @@ mod tests { send_regular_message(); assert_ok!(Pallet::::increase_message_fee( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_LANE_ID, 1, 100, @@ -1950,11 +1962,11 @@ mod tests { run_test(|| { fn submit_with_unspent_weight( nonce: MessageNonce, - unspent_weight: Weight, + unspent_weight: u64, is_prepaid: bool, ) -> (Weight, Weight) { let mut payload = REGULAR_PAYLOAD; - payload.dispatch_result.unspent_weight = unspent_weight; + *payload.dispatch_result.unspent_weight.ref_time_mut() = unspent_weight; payload.dispatch_result.dispatch_fee_paid_during_dispatch = !is_prepaid; let proof = Ok(vec![message(nonce, payload)]).into(); let messages_count = 1; @@ -1965,7 +1977,7 @@ mod tests { REGULAR_PAYLOAD.declared_weight, ); let post_dispatch_weight = Pallet::::receive_messages_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_RELAYER_A, proof, messages_count, @@ -1980,16 +1992,26 @@ mod tests { // when dispatch is returning `unspent_weight < declared_weight` let (pre, post) = submit_with_unspent_weight(1, 1, false); - assert_eq!(post, pre - 1); + assert_eq!(post.ref_time(), pre.ref_time() - 1); // when dispatch is returning `unspent_weight = declared_weight` - let (pre, post) = submit_with_unspent_weight(2, REGULAR_PAYLOAD.declared_weight, false); - assert_eq!(post, pre - REGULAR_PAYLOAD.declared_weight); + let (pre, post) = + submit_with_unspent_weight(2, REGULAR_PAYLOAD.declared_weight.ref_time(), false); + assert_eq!( + post.ref_time(), + pre.ref_time() - REGULAR_PAYLOAD.declared_weight.ref_time() + ); // when dispatch is returning `unspent_weight > declared_weight` - let (pre, post) = - submit_with_unspent_weight(3, REGULAR_PAYLOAD.declared_weight + 1, false); - assert_eq!(post, pre - REGULAR_PAYLOAD.declared_weight); + let (pre, post) = submit_with_unspent_weight( + 3, + REGULAR_PAYLOAD.declared_weight.ref_time() + 1, + false, + ); + assert_eq!( + post.ref_time(), + pre.ref_time() - REGULAR_PAYLOAD.declared_weight.ref_time() + ); // when there's no unspent weight let (pre, post) = submit_with_unspent_weight(4, 0, false); @@ -1998,8 +2020,10 @@ mod tests { // when dispatch is returning `unspent_weight < declared_weight` AND message is prepaid let (pre, post) = submit_with_unspent_weight(5, 1, true); assert_eq!( - post, - pre - 1 - ::WeightInfo::pay_inbound_dispatch_fee_overhead() + post.ref_time(), + pre.ref_time() - + 1 - ::WeightInfo::pay_inbound_dispatch_fee_overhead() + .ref_time() ); }); } @@ -2043,7 +2067,7 @@ mod tests { // first tx with messages 1+2 assert_ok!(Pallet::::receive_messages_delivery_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TestMessagesDeliveryProof(messages_1_and_2_proof), UnrewardedRelayersState { unrewarded_relayer_entries: 1, @@ -2054,7 +2078,7 @@ mod tests { )); // second tx with message 3 assert_ok!(Pallet::::receive_messages_delivery_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TestMessagesDeliveryProof(messages_3_proof), UnrewardedRelayersState { unrewarded_relayer_entries: 1, @@ -2097,7 +2121,7 @@ mod tests { crate::mock::DbWeight::get(), ); let post_dispatch_weight = Pallet::::receive_messages_delivery_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), proof, relayers_state, ) @@ -2157,7 +2181,7 @@ mod tests { // numer of actually confirmed messages is `1`. assert_noop!( Pallet::::receive_messages_delivery_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TestMessagesDeliveryProof(Ok(( TEST_LANE_ID, InboundLaneData { last_confirmed_nonce: 1, relayers: Default::default() }, @@ -2178,32 +2202,40 @@ mod tests { large_payload.extra = vec![2; MAX_OUTBOUND_PAYLOAD_SIZE as usize / 5]; assert_ok!(Pallet::::send_message( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_LANE_ID, small_payload, 100, )); assert_ok!(Pallet::::send_message( - Origin::signed(1), + RuntimeOrigin::signed(1), TEST_LANE_ID, large_payload, 100, )); - let small_weight = - Pallet::::increase_message_fee(Origin::signed(1), TEST_LANE_ID, 1, 1) - .expect("increase_message_fee has failed") - .actual_weight - .expect("increase_message_fee always returns Some"); + let small_weight = Pallet::::increase_message_fee( + RuntimeOrigin::signed(1), + TEST_LANE_ID, + 1, + 1, + ) + .expect("increase_message_fee has failed") + .actual_weight + .expect("increase_message_fee always returns Some"); - let large_weight = - Pallet::::increase_message_fee(Origin::signed(1), TEST_LANE_ID, 2, 1) - .expect("increase_message_fee has failed") - .actual_weight - .expect("increase_message_fee always returns Some"); + let large_weight = Pallet::::increase_message_fee( + RuntimeOrigin::signed(1), + TEST_LANE_ID, + 2, + 1, + ) + .expect("increase_message_fee has failed") + .actual_weight + .expect("increase_message_fee always returns Some"); assert!( - large_weight > small_weight, + large_weight.ref_time() > small_weight.ref_time(), "Actual post-dispatch weigth for larger message {} must be larger than {} for small message", large_weight, small_weight, @@ -2225,7 +2257,7 @@ mod tests { // confirm delivery of all sent messages assert_ok!(Pallet::::receive_messages_delivery_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), TestMessagesDeliveryProof(Ok(( TEST_LANE_ID, InboundLaneData { @@ -2332,7 +2364,7 @@ mod tests { REGULAR_PAYLOAD.encode(), OutboundMessageDetails { nonce: 0, - dispatch_weight: 0, + dispatch_weight: Weight::from_ref_time(0), size: 0, delivery_and_dispatch_fee: 0, dispatch_fee_payment: diff --git a/modules/messages/src/mock.rs b/modules/messages/src/mock.rs index 41ae0352cf..4e6a6e53fb 100644 --- a/modules/messages/src/mock.rs +++ b/modules/messages/src/mock.rs @@ -87,23 +87,23 @@ frame_support::construct_runtime! { parameter_types! { pub const BlockHashCount: u64 = 250; - pub const MaximumBlockWeight: Weight = 1024; + pub const MaximumBlockWeight: Weight = Weight::from_ref_time(1024); pub const MaximumBlockLength: u32 = 2 * 1024; pub const AvailableBlockRatio: Perbill = Perbill::one(); pub const DbWeight: RuntimeDbWeight = RuntimeDbWeight { read: 1, write: 2 }; } impl frame_system::Config for TestRuntime { - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type Index = u64; - type Call = Call; + type RuntimeCall = RuntimeCall; type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; type Header = SubstrateHeader; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -128,7 +128,7 @@ impl pallet_balances::Config for TestRuntime { type MaxLocks = (); type Balance = Balance; type DustRemoval = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ExistentialDeposit; type AccountStore = frame_system::Pallet; type WeightInfo = (); @@ -159,7 +159,7 @@ impl MessagesParameter for TestMessagesParameter { } impl Config for TestRuntime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = (); type Parameter = TestMessagesParameter; type MaxMessagesToPruneAtOnce = MaxMessagesToPruneAtOnce; @@ -185,7 +185,7 @@ impl Config for TestRuntime { type BridgedChainId = TestBridgedChainId; } -impl SenderOrigin for Origin { +impl SenderOrigin for RuntimeOrigin { fn linked_account(&self) -> Option { match self.caller { OriginCaller::system(frame_system::RawOrigin::Signed(ref submitter)) => @@ -298,11 +298,11 @@ impl TargetHeaderChain for TestTargetHeaderChain { #[derive(Debug, Default)] pub struct TestLaneMessageVerifier; -impl LaneMessageVerifier for TestLaneMessageVerifier { +impl LaneMessageVerifier for TestLaneMessageVerifier { type Error = &'static str; fn verify_message( - _submitter: &Origin, + _submitter: &RuntimeOrigin, delivery_and_dispatch_fee: &TestMessageFee, _lane: &LaneId, _lane_outbound_data: &OutboundLaneData, @@ -328,7 +328,8 @@ impl TestMessageDeliveryAndDispatchPayment { /// Returns true if given fee has been paid by given submitter. pub fn is_fee_paid(submitter: AccountId, fee: TestMessageFee) -> bool { - let raw_origin: Result, _> = Origin::signed(submitter).into(); + let raw_origin: Result, _> = + RuntimeOrigin::signed(submitter).into(); frame_support::storage::unhashed::get(b":message-fee:") == Some((raw_origin.unwrap(), fee)) } @@ -340,13 +341,13 @@ impl TestMessageDeliveryAndDispatchPayment { } } -impl MessageDeliveryAndDispatchPayment +impl MessageDeliveryAndDispatchPayment for TestMessageDeliveryAndDispatchPayment { type Error = &'static str; fn pay_delivery_and_dispatch_fee( - submitter: &Origin, + submitter: &RuntimeOrigin, fee: &TestMessageFee, ) -> Result<(), Self::Error> { if frame_support::storage::unhashed::get(b":reject-message-fee:") == Some(true) { @@ -451,7 +452,7 @@ impl OnDeliveryConfirmed for TestOnDeliveryConfirmed2 { fn on_messages_delivered(lane: &LaneId, messages: &DeliveredMessages) -> Weight { let key = (b"TestOnDeliveryConfirmed2", lane, messages).encode(); frame_support::storage::unhashed::put(&key, &true); - 0 + Weight::from_ref_time(0) } } @@ -482,7 +483,7 @@ impl MessageDispatch for TestMessageDispatch { fn dispatch_weight(message: &mut DispatchMessage) -> Weight { match message.data.payload.as_ref() { Ok(payload) => payload.declared_weight, - Err(_) => 0, + Err(_) => Weight::from_ref_time(0), } } @@ -503,8 +504,13 @@ pub fn message(nonce: MessageNonce, payload: TestPayload) -> Message TestPayload { - TestPayload { id, declared_weight, dispatch_result: dispatch_result(0), extra: Vec::new() } +pub const fn message_payload(id: u64, declared_weight: u64) -> TestPayload { + TestPayload { + id, + declared_weight: Weight::from_ref_time(declared_weight), + dispatch_result: dispatch_result(0), + extra: Vec::new(), + } } /// Return message data with valid fee for given payload. @@ -513,10 +519,10 @@ pub fn message_data(payload: TestPayload) -> MessageData { } /// Returns message dispatch result with given unspent weight. -pub const fn dispatch_result(unspent_weight: Weight) -> MessageDispatchResult { +pub const fn dispatch_result(unspent_weight: u64) -> MessageDispatchResult { MessageDispatchResult { dispatch_result: true, - unspent_weight, + unspent_weight: Weight::from_ref_time(unspent_weight), dispatch_fee_paid_during_dispatch: true, } } diff --git a/modules/messages/src/weights.rs b/modules/messages/src/weights.rs index 02b014120f..3801b57b61 100644 --- a/modules/messages/src/weights.rs +++ b/modules/messages/src/weights.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_bridge_messages` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-04, STEPS: 50, REPEAT: 20 +//! DATE: 2022-10-17, STEPS: 50, REPEAT: 20 //! LOW RANGE: [], HIGH RANGE: [] //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled //! CHAIN: Some("dev"), DB CACHE: 1024 @@ -72,149 +72,149 @@ pub trait WeightInfo { pub struct BridgeWeight(PhantomData); impl WeightInfo for BridgeWeight { fn send_minimal_message_worst_case() -> Weight { - (62_300_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(61_807_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } fn send_1_kb_message_worst_case() -> Weight { - (63_176_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(65_074_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } fn send_16_kb_message_worst_case() -> Weight { - (73_472_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(73_584_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } fn maximal_increase_message_fee() -> Weight { - (2_539_209_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(2_522_629_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn increase_message_fee(i: u32) -> Weight { - (0 as Weight) - .saturating_add((1_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(27_072_000 as u64) + .saturating_add(Weight::from_ref_time(892 as u64).saturating_mul(i as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn receive_single_message_proof() -> Weight { - (49_205_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(49_628_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } fn receive_two_messages_proof() -> Weight { - (62_182_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(61_514_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } fn receive_single_message_proof_with_outbound_lane_state() -> Weight { - (55_928_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(65_960_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } fn receive_single_message_proof_1_kb() -> Weight { - (47_298_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(48_009_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn receive_single_message_proof_16_kb() -> Weight { - (105_016_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(100_439_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn receive_single_prepaid_message_proof() -> Weight { - (49_067_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(50_463_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } fn receive_delivery_proof_for_single_message() -> Weight { - (58_520_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(57_383_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } fn receive_delivery_proof_for_two_messages_by_single_relayer() -> Weight { - (61_563_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(62_003_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight { - (63_197_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(64_401_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { fn send_minimal_message_worst_case() -> Weight { - (62_300_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(61_807_000 as u64) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(10 as u64)) } fn send_1_kb_message_worst_case() -> Weight { - (63_176_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(65_074_000 as u64) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(10 as u64)) } fn send_16_kb_message_worst_case() -> Weight { - (73_472_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(73_584_000 as u64) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(10 as u64)) } fn maximal_increase_message_fee() -> Weight { - (2_539_209_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(2_522_629_000 as u64) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) } fn increase_message_fee(i: u32) -> Weight { - (0 as Weight) - .saturating_add((1_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(27_072_000 as u64) + .saturating_add(Weight::from_ref_time(892 as u64).saturating_mul(i as u64)) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) } fn receive_single_message_proof() -> Weight { - (49_205_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(49_628_000 as u64) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } fn receive_two_messages_proof() -> Weight { - (62_182_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(61_514_000 as u64) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } fn receive_single_message_proof_with_outbound_lane_state() -> Weight { - (55_928_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(65_960_000 as u64) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } fn receive_single_message_proof_1_kb() -> Weight { - (47_298_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(48_009_000 as u64) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) } fn receive_single_message_proof_16_kb() -> Weight { - (105_016_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(100_439_000 as u64) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) } fn receive_single_prepaid_message_proof() -> Weight { - (49_067_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(50_463_000 as u64) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } fn receive_delivery_proof_for_single_message() -> Weight { - (58_520_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(57_383_000 as u64) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } fn receive_delivery_proof_for_two_messages_by_single_relayer() -> Weight { - (61_563_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(62_003_000 as u64) + .saturating_add(RocksDbWeight::get().reads(6 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight { - (63_197_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(64_401_000 as u64) + .saturating_add(RocksDbWeight::get().reads(7 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } } diff --git a/modules/messages/src/weights_ext.rs b/modules/messages/src/weights_ext.rs index 52eb426190..eaf6bc1029 100644 --- a/modules/messages/src/weights_ext.rs +++ b/modules/messages/src/weights_ext.rs @@ -43,14 +43,14 @@ pub fn ensure_weights_are_correct( db_weight: RuntimeDbWeight, ) { // verify `send_message` weight components - assert_ne!(W::send_message_overhead(), 0); - assert_ne!(W::send_message_size_overhead(0), 0); + assert_ne!(W::send_message_overhead(), Weight::from_ref_time(0)); + assert_ne!(W::send_message_size_overhead(0), Weight::from_ref_time(0)); // verify `receive_messages_proof` weight components - assert_ne!(W::receive_messages_proof_overhead(), 0); - assert_ne!(W::receive_messages_proof_messages_overhead(1), 0); - assert_ne!(W::receive_messages_proof_outbound_lane_state_overhead(), 0); - assert_ne!(W::storage_proof_size_overhead(1), 0); + assert_ne!(W::receive_messages_proof_overhead(), Weight::from_ref_time(0)); + assert_ne!(W::receive_messages_proof_messages_overhead(1), Weight::from_ref_time(0)); + assert_ne!(W::receive_messages_proof_outbound_lane_state_overhead(), Weight::from_ref_time(0)); + assert_ne!(W::storage_proof_size_overhead(1), Weight::from_ref_time(0)); // verify that the hardcoded value covers `receive_messages_proof` weight let actual_single_regular_message_delivery_tx_weight = W::receive_messages_proof_weight( @@ -58,11 +58,11 @@ pub fn ensure_weights_are_correct( (EXPECTED_DEFAULT_MESSAGE_LENGTH + W::expected_extra_storage_proof_size()) as usize, ), 1, - 0, + Weight::from_ref_time(0), ); assert!( - actual_single_regular_message_delivery_tx_weight <= - expected_default_message_delivery_tx_weight, + actual_single_regular_message_delivery_tx_weight.ref_time() <= + expected_default_message_delivery_tx_weight.ref_time(), "Default message delivery transaction weight {} is larger than expected weight {}", actual_single_regular_message_delivery_tx_weight, expected_default_message_delivery_tx_weight, @@ -71,15 +71,16 @@ pub fn ensure_weights_are_correct( // verify that hardcoded value covers additional byte length of `receive_messages_proof` weight let actual_additional_byte_delivery_weight = W::storage_proof_size_overhead(1); assert!( - actual_additional_byte_delivery_weight <= expected_additional_byte_delivery_weight, + actual_additional_byte_delivery_weight.ref_time() <= + expected_additional_byte_delivery_weight.ref_time(), "Single additional byte delivery weight {} is larger than expected weight {}", actual_additional_byte_delivery_weight, expected_additional_byte_delivery_weight, ); // verify `receive_messages_delivery_proof` weight components - assert_ne!(W::receive_messages_delivery_proof_overhead(), 0); - assert_ne!(W::storage_proof_size_overhead(1), 0); + assert_ne!(W::receive_messages_delivery_proof_overhead(), Weight::from_ref_time(0)); + assert_ne!(W::storage_proof_size_overhead(1), Weight::from_ref_time(0)); // `receive_messages_delivery_proof_messages_overhead` and // `receive_messages_delivery_proof_relayers_overhead` may return zero if rewards are not paid @@ -96,8 +97,8 @@ pub fn ensure_weights_are_correct( db_weight, ); assert!( - actual_messages_delivery_confirmation_tx_weight <= - expected_messages_delivery_confirmation_tx_weight, + actual_messages_delivery_confirmation_tx_weight.ref_time() <= + expected_messages_delivery_confirmation_tx_weight.ref_time(), "Messages delivery confirmation transaction weight {} is larger than expected weight {}", actual_messages_delivery_confirmation_tx_weight, expected_messages_delivery_confirmation_tx_weight, @@ -106,7 +107,7 @@ pub fn ensure_weights_are_correct( // verify pay-dispatch-fee overhead for inbound messages let actual_pay_inbound_dispatch_fee_weight = W::pay_inbound_dispatch_fee_overhead(); assert!( - actual_pay_inbound_dispatch_fee_weight <= expected_pay_inbound_dispatch_fee_weight, + actual_pay_inbound_dispatch_fee_weight.ref_time() <= expected_pay_inbound_dispatch_fee_weight.ref_time(), "Weight {} of pay-dispatch-fee overhead for inbound messages is larger than expected weight {}", actual_pay_inbound_dispatch_fee_weight, expected_pay_inbound_dispatch_fee_weight, @@ -140,7 +141,7 @@ pub fn ensure_able_to_receive_message( max_incoming_message_dispatch_weight, ); assert!( - max_delivery_transaction_dispatch_weight <= max_extrinsic_weight, + max_delivery_transaction_dispatch_weight.ref_time() <= max_extrinsic_weight.ref_time(), "Weight of maximal message delivery transaction + {} is larger than maximal possible transaction weight {}", max_delivery_transaction_dispatch_weight, max_extrinsic_weight, @@ -179,7 +180,7 @@ pub fn ensure_able_to_receive_confirmation( db_weight, ); assert!( - max_confirmation_transaction_dispatch_weight <= max_extrinsic_weight, + max_confirmation_transaction_dispatch_weight.ref_time() <= max_extrinsic_weight.ref_time(), "Weight of maximal confirmation transaction {} is larger than maximal possible transaction weight {}", max_confirmation_transaction_dispatch_weight, max_extrinsic_weight, @@ -264,13 +265,13 @@ pub trait WeightInfoExt: WeightInfo { // message let callback_overhead = relayers_state .total_messages - .saturating_mul(Self::single_message_callback_overhead(db_weight)); + .saturating_mul(Self::single_message_callback_overhead(db_weight).ref_time()); transaction_overhead .saturating_add(messages_overhead) .saturating_add(relayers_overhead) .saturating_add(proof_size_overhead) - .saturating_add(callback_overhead) + .saturating_add(Weight::from_ref_time(callback_overhead)) } // Functions that are used by extrinsics weights formulas. @@ -305,7 +306,7 @@ pub trait WeightInfoExt: WeightInfo { let weight_of_single_message_and_single_tx_overhead = Self::receive_single_message_proof(); weight_of_two_messages_and_single_tx_overhead .saturating_sub(weight_of_single_message_and_single_tx_overhead) - .saturating_mul(messages as Weight) + .saturating_mul(messages as _) } /// Returns weight that needs to be accounted when message delivery transaction @@ -336,7 +337,7 @@ pub trait WeightInfoExt: WeightInfo { let weight_of_single_message = Self::receive_delivery_proof_for_single_message(); weight_of_two_messages .saturating_sub(weight_of_single_message) - .saturating_mul(messages as Weight) + .saturating_mul(messages as _) } /// Returns weight that needs to be accounted when receiving confirmations for given a number of @@ -348,7 +349,7 @@ pub trait WeightInfoExt: WeightInfo { Self::receive_delivery_proof_for_two_messages_by_single_relayer(); weight_of_two_messages_by_two_relayers .saturating_sub(weight_of_two_messages_by_single_relayer) - .saturating_mul(relayers as Weight) + .saturating_mul(relayers as _) } /// Returns weight that needs to be accounted when storage proof of given size is received @@ -360,7 +361,7 @@ pub trait WeightInfoExt: WeightInfo { /// relayer must pay when it relays proof of given size (even if cost based on other parameters /// is less than that cost). fn storage_proof_size_overhead(proof_size: u32) -> Weight { - let proof_size_in_bytes = proof_size as Weight; + let proof_size_in_bytes = proof_size; let byte_weight = (Self::receive_single_message_proof_16_kb() - Self::receive_single_message_proof_1_kb()) / (15 * 1024); diff --git a/modules/parachains/src/extension.rs b/modules/parachains/src/extension.rs index 05500cf41d..5c2f54257f 100644 --- a/modules/parachains/src/extension.rs +++ b/modules/parachains/src/extension.rs @@ -31,7 +31,7 @@ use sp_runtime::transaction_validity::{InvalidTransaction, TransactionValidity, /// pallet will be used in our environment. impl< Call: IsSubType, T>>, - T: frame_system::Config + Config, + T: frame_system::Config + Config, I: 'static, > FilterCall for Pallet where @@ -77,7 +77,7 @@ where mod tests { use crate::{ extension::FilterCall, - mock::{run_test, Call, TestRuntime}, + mock::{run_test, RuntimeCall, TestRuntime}, ParaInfo, ParasInfo, RelayBlockNumber, }; use bp_parachains::BestParaHeadHash; @@ -87,13 +87,14 @@ mod tests { num: RelayBlockNumber, parachains: Vec<(ParaId, ParaHash)>, ) -> bool { - crate::Pallet::::validate(&Call::Parachains( - crate::Call::::submit_parachain_heads { - at_relay_block: (num, Default::default()), - parachains, - parachain_heads_proof: ParaHeadsProof(Vec::new()), - }, - )) + crate::Pallet::::validate(&RuntimeCall::Parachains(crate::Call::< + TestRuntime, + (), + >::submit_parachain_heads { + at_relay_block: (num, Default::default()), + parachains, + parachain_heads_proof: ParaHeadsProof(Vec::new()), + })) .is_ok() } diff --git a/modules/parachains/src/lib.rs b/modules/parachains/src/lib.rs index ac21e997f3..e0c3ff8340 100644 --- a/modules/parachains/src/lib.rs +++ b/modules/parachains/src/lib.rs @@ -29,7 +29,7 @@ pub use weights_ext::WeightInfoExt; use bp_parachains::{parachain_head_storage_key_at_source, ParaInfo}; use bp_polkadot_core::parachains::{ParaHash, ParaHasher, ParaHead, ParaHeadsProof, ParaId}; use bp_runtime::StorageProofError; -use frame_support::{traits::Contains, weights::PostDispatchInfo}; +use frame_support::{dispatch::PostDispatchInfo, traits::Contains}; use sp_runtime::traits::Header as HeaderT; use sp_std::vec::Vec; @@ -132,7 +132,8 @@ pub mod pallet { pallet_bridge_grandpa::Config { /// The overarching event type. - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + + IsType<::RuntimeEvent>; /// Benchmarks results from runtime we're plugged into. type WeightInfo: WeightInfoExt; @@ -620,7 +621,7 @@ pub mod pallet { mod tests { use super::*; use crate::mock::{ - run_test, test_relay_header, Event as TestEvent, Origin, TestRuntime, + run_test, test_relay_header, RuntimeEvent as TestEvent, RuntimeOrigin, TestRuntime, MAXIMAL_PARACHAIN_HEAD_SIZE, PARAS_PALLET_NAME, UNTRACKED_PARACHAIN_ID, }; use codec::Encode; @@ -650,7 +651,7 @@ mod tests { fn initialize(state_root: RelayBlockHash) { pallet_bridge_grandpa::Pallet::::initialize( - Origin::root(), + RuntimeOrigin::root(), bp_header_chain::InitializationData { header: Box::new(test_relay_header(0, state_root)), authority_list: authority_list(), @@ -670,7 +671,7 @@ mod tests { let justification = make_default_justification(&header); assert_ok!( pallet_bridge_grandpa::Pallet::::submit_finality_proof( - Origin::signed(1), + RuntimeOrigin::signed(1), Box::new(header), justification, ) @@ -736,7 +737,7 @@ mod tests { proof: ParaHeadsProof, ) -> DispatchResultWithPostInfo { Pallet::::submit_parachain_heads( - Origin::signed(1), + RuntimeOrigin::signed(1), (relay_chain_block, test_relay_header(relay_chain_block, relay_state_root).hash()), parachains, proof, @@ -747,7 +748,7 @@ mod tests { let db_weight = ::DbWeight::get(); WeightInfoOf::::submit_parachain_heads_weight(db_weight, proof, 1) .saturating_sub(if prune_expected { - 0 + Weight::from_ref_time(0) } else { WeightInfoOf::::parachain_head_pruning_weight(db_weight) }) @@ -765,7 +766,7 @@ mod tests { PalletOperatingMode::::put(BasicOperatingMode::Halted); assert_noop!( Pallet::::submit_parachain_heads( - Origin::signed(1), + RuntimeOrigin::signed(1), (0, test_relay_header(0, state_root).hash()), parachains.clone(), proof.clone(), @@ -776,7 +777,7 @@ mod tests { // `submit_parachain_heads()` should succeed now that the pallet is resumed. PalletOperatingMode::::put(BasicOperatingMode::Normal); assert_ok!(Pallet::::submit_parachain_heads( - Origin::signed(1), + RuntimeOrigin::signed(1), (0, test_relay_header(0, state_root).hash()), parachains, proof, @@ -795,7 +796,7 @@ mod tests { let expected_weight = WeightInfo::submit_parachain_heads_weight(DbWeight::get(), &proof, 2); let result = Pallet::::submit_parachain_heads( - Origin::signed(1), + RuntimeOrigin::signed(1), (0, test_relay_header(0, state_root).hash()), parachains, proof, @@ -969,7 +970,7 @@ mod tests { )); initialize(state_root); let result = Pallet::::submit_parachain_heads( - Origin::signed(1), + RuntimeOrigin::signed(1), (0, test_relay_header(0, state_root).hash()), parachains, proof, @@ -1159,7 +1160,7 @@ mod tests { // parachain initialize(state_root); let result = Pallet::::submit_parachain_heads( - Origin::signed(1), + RuntimeOrigin::signed(1), (0, test_relay_header(0, state_root).hash()), parachains, proof, @@ -1303,7 +1304,7 @@ mod tests { // => we'll leave previous value proceed(20, state_root_10_at_20); assert_ok!(Pallet::::submit_parachain_heads( - Origin::signed(1), + RuntimeOrigin::signed(1), (20, test_relay_header(20, state_root_10_at_20).hash()), parachains_10_at_20, proof_10_at_20, @@ -1319,7 +1320,7 @@ mod tests { // => we'll update value proceed(30, state_root_10_at_30); assert_ok!(Pallet::::submit_parachain_heads( - Origin::signed(1), + RuntimeOrigin::signed(1), (30, test_relay_header(30, state_root_10_at_30).hash()), parachains_10_at_30, proof_10_at_30, @@ -1360,7 +1361,7 @@ mod tests { run_test(|| { initialize(state_root); assert_ok!(Pallet::::submit_parachain_heads( - Origin::signed(1), + RuntimeOrigin::signed(1), (0, test_relay_header(0, state_root).hash()), parachains, proof, @@ -1385,7 +1386,7 @@ mod tests { run_test(|| { initialize(state_root); assert_ok!(Pallet::::submit_parachain_heads( - Origin::signed(1), + RuntimeOrigin::signed(1), (0, test_relay_header(0, state_root).hash()), parachains, proof, diff --git a/modules/parachains/src/mock.rs b/modules/parachains/src/mock.rs index f1d39592b2..9638472aa9 100644 --- a/modules/parachains/src/mock.rs +++ b/modules/parachains/src/mock.rs @@ -53,22 +53,22 @@ construct_runtime! { parameter_types! { pub const BlockHashCount: TestNumber = 250; - pub const MaximumBlockWeight: Weight = 1024; + pub const MaximumBlockWeight: Weight = Weight::from_ref_time(1024); pub const MaximumBlockLength: u32 = 2 * 1024; pub const AvailableBlockRatio: Perbill = Perbill::one(); } impl frame_system::Config for TestRuntime { - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type Index = u64; - type Call = Call; + type RuntimeCall = RuntimeCall; type BlockNumber = TestNumber; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -117,7 +117,7 @@ parameter_types! { } impl pallet_bridge_parachains::Config for TestRuntime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = (); type BridgesGrandpaPalletInstance = pallet_bridge_grandpa::Instance1; type ParasPalletName = ParasPalletName; diff --git a/modules/parachains/src/weights.rs b/modules/parachains/src/weights.rs index 1ab2e6c554..43cd68b01d 100644 --- a/modules/parachains/src/weights.rs +++ b/modules/parachains/src/weights.rs @@ -61,41 +61,41 @@ pub trait WeightInfo { pub struct BridgeWeight(PhantomData); impl WeightInfo for BridgeWeight { fn submit_parachain_heads_with_n_parachains(p: u32) -> Weight { - (0 as Weight) - .saturating_add((24_869_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(p as Weight))) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(p as Weight))) + Weight::from_ref_time(0 as u64) + .saturating_add(Weight::from_ref_time(24_869_000 as u64).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(p as u64))) + .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(p as u64))) } fn submit_parachain_heads_with_1kb_proof() -> Weight { - (56_262_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(56_262_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } fn submit_parachain_heads_with_16kb_proof() -> Weight { - (105_189_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(105_189_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { fn submit_parachain_heads_with_n_parachains(p: u32) -> Weight { - (0 as Weight) - .saturating_add((24_869_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(p as Weight))) - .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(p as Weight))) + Weight::from_ref_time(0 as u64) + .saturating_add(Weight::from_ref_time(24_869_000 as u64).saturating_mul(p as u64)) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().reads((2 as u64).saturating_mul(p as u64))) + .saturating_add(RocksDbWeight::get().writes((3 as u64).saturating_mul(p as u64))) } fn submit_parachain_heads_with_1kb_proof() -> Weight { - (56_262_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(56_262_000 as u64) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } fn submit_parachain_heads_with_16kb_proof() -> Weight { - (105_189_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(105_189_000 as u64) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } } diff --git a/modules/parachains/src/weights_ext.rs b/modules/parachains/src/weights_ext.rs index 63684ecc21..eecdfe9035 100644 --- a/modules/parachains/src/weights_ext.rs +++ b/modules/parachains/src/weights_ext.rs @@ -62,8 +62,8 @@ pub trait WeightInfoExt: WeightInfo { ); // potential pruning weight (refunded if hasn't happened) - let pruning_weight = (parachains_count as Weight) - .saturating_mul(Self::parachain_head_pruning_weight(db_weight)); + let pruning_weight = + Self::parachain_head_pruning_weight(db_weight).saturating_mul(parachains_count as u64); base_weight.saturating_add(proof_size_overhead).saturating_add(pruning_weight) } @@ -87,11 +87,10 @@ pub trait WeightInfoExt: WeightInfo { /// Returns weight that needs to be accounted when storage proof of given size is received. fn storage_proof_size_overhead(extra_proof_bytes: u32) -> Weight { - let extra_proof_bytes_in_bytes = extra_proof_bytes as Weight; let extra_byte_weight = (Self::submit_parachain_heads_with_16kb_proof() - Self::submit_parachain_heads_with_1kb_proof()) / (15 * 1024); - extra_proof_bytes_in_bytes.saturating_mul(extra_byte_weight) + extra_byte_weight.saturating_mul(extra_proof_bytes as u64) } } diff --git a/modules/relayers/src/lib.rs b/modules/relayers/src/lib.rs index 779cc285c9..f3195f1288 100644 --- a/modules/relayers/src/lib.rs +++ b/modules/relayers/src/lib.rs @@ -46,7 +46,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { /// The overarching event type. - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Type of relayer reward. type Reward: AtLeast32BitUnsigned + Copy + Parameter + MaxEncodedLen; /// Pay rewards adapter. @@ -113,7 +113,7 @@ pub mod pallet { #[cfg(test)] mod tests { use super::*; - use mock::{Event as TestEvent, *}; + use mock::{RuntimeEvent as TestEvent, *}; use crate::Event::RewardPaid; use frame_support::{assert_noop, assert_ok, traits::fungible::Inspect}; @@ -129,7 +129,7 @@ mod tests { fn root_cant_claim_anything() { run_test(|| { assert_noop!( - Pallet::::claim_rewards(Origin::root()), + Pallet::::claim_rewards(RuntimeOrigin::root()), DispatchError::BadOrigin, ); }); @@ -139,7 +139,7 @@ mod tests { fn relayer_cant_claim_if_no_reward_exists() { run_test(|| { assert_noop!( - Pallet::::claim_rewards(Origin::signed(REGULAR_RELAYER)), + Pallet::::claim_rewards(RuntimeOrigin::signed(REGULAR_RELAYER)), Error::::NoRewardForRelayer, ); }); @@ -150,7 +150,7 @@ mod tests { run_test(|| { RelayerRewards::::insert(FAILING_RELAYER, 100); assert_noop!( - Pallet::::claim_rewards(Origin::signed(FAILING_RELAYER)), + Pallet::::claim_rewards(RuntimeOrigin::signed(FAILING_RELAYER)), Error::::FailedToPayReward, ); }); @@ -162,7 +162,9 @@ mod tests { get_ready_for_events(); RelayerRewards::::insert(REGULAR_RELAYER, 100); - assert_ok!(Pallet::::claim_rewards(Origin::signed(REGULAR_RELAYER))); + assert_ok!(Pallet::::claim_rewards(RuntimeOrigin::signed( + REGULAR_RELAYER + ))); assert_eq!(RelayerRewards::::get(REGULAR_RELAYER), None); //Check if the `RewardPaid` event was emitted. diff --git a/modules/relayers/src/mock.rs b/modules/relayers/src/mock.rs index 2ceabc6621..d090da3e6d 100644 --- a/modules/relayers/src/mock.rs +++ b/modules/relayers/src/mock.rs @@ -51,16 +51,16 @@ parameter_types! { } impl frame_system::Config for TestRuntime { - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type Index = u64; - type Call = Call; + type RuntimeCall = RuntimeCall; type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; type Header = SubstrateHeader; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = frame_support::traits::ConstU64<250>; type Version = (); type PalletInfo = PalletInfo; @@ -81,7 +81,7 @@ impl pallet_balances::Config for TestRuntime { type MaxLocks = (); type Balance = Balance; type DustRemoval = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = frame_support::traits::ConstU64<1>; type AccountStore = frame_system::Pallet; type WeightInfo = (); @@ -95,7 +95,7 @@ parameter_types! { // we're not testing messages pallet here, so values in this config might be crazy impl pallet_bridge_messages::Config for TestRuntime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = (); type Parameter = (); type MaxMessagesToPruneAtOnce = frame_support::traits::ConstU64<0>; @@ -122,7 +122,7 @@ impl pallet_bridge_messages::Config for TestRuntime { } impl pallet_bridge_relayers::Config for TestRuntime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Reward = Balance; type PaymentProcedure = TestPaymentProcedure; type WeightInfo = (); diff --git a/modules/relayers/src/payment_adapter.rs b/modules/relayers/src/payment_adapter.rs index f027ab6429..d472810c5c 100644 --- a/modules/relayers/src/payment_adapter.rs +++ b/modules/relayers/src/payment_adapter.rs @@ -31,7 +31,7 @@ pub struct MessageDeliveryAndDispatchPaymentAdapter - MessageDeliveryAndDispatchPayment + MessageDeliveryAndDispatchPayment for MessageDeliveryAndDispatchPaymentAdapter where T: Config + pallet_bridge_messages::Config, @@ -41,7 +41,7 @@ where type Error = &'static str; fn pay_delivery_and_dispatch_fee( - _submitter: &T::Origin, + _submitter: &T::RuntimeOrigin, _fee: &T::Reward, ) -> Result<(), Self::Error> { // nothing shall happen here, because XCM deals with fee payment (planned to be burnt? diff --git a/modules/relayers/src/weights.rs b/modules/relayers/src/weights.rs index afecbe9d6d..b8df8c9449 100644 --- a/modules/relayers/src/weights.rs +++ b/modules/relayers/src/weights.rs @@ -59,17 +59,17 @@ pub trait WeightInfo { pub struct BridgeWeight(PhantomData); impl WeightInfo for BridgeWeight { fn claim_rewards() -> Weight { - (55_856_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(55_856_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { fn claim_rewards() -> Weight { - (55_856_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(55_856_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } } diff --git a/modules/shift-session-manager/src/lib.rs b/modules/shift-session-manager/src/lib.rs index f8475851bb..073013d92d 100644 --- a/modules/shift-session-manager/src/lib.rs +++ b/modules/shift-session-manager/src/lib.rs @@ -153,22 +153,22 @@ mod tests { parameter_types! { pub const BlockHashCount: u64 = 250; - pub const MaximumBlockWeight: Weight = 1024; + pub const MaximumBlockWeight: Weight = Weight::from_ref_time(1024); pub const MaximumBlockLength: u32 = 2 * 1024; pub const AvailableBlockRatio: Perbill = Perbill::one(); } impl frame_system::Config for TestRuntime { - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type Index = u64; - type Call = Call; + type RuntimeCall = RuntimeCall; type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = (); + type RuntimeEvent = (); type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -191,7 +191,7 @@ mod tests { } impl pallet_session::Config for TestRuntime { - type Event = (); + type RuntimeEvent = (); type ValidatorId = ::AccountId; type ValidatorIdOf = ConvertInto; type ShouldEndSession = pallet_session::PeriodicSessions; diff --git a/primitives/chain-millau/Cargo.toml b/primitives/chain-millau/Cargo.toml index 4cd8b30f7f..c4d77b80fe 100644 --- a/primitives/chain-millau/Cargo.toml +++ b/primitives/chain-millau/Cargo.toml @@ -16,7 +16,7 @@ fixed-hash = { version = "0.7.0", 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.3.1", optional = true } -parity-util-mem = { version = "0.11", default-features = false, features = ["primitive-types"] } +parity-util-mem = { version = "0.12", default-features = false, features = ["primitive-types"] } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } serde = { version = "1.0", optional = true, features = ["derive"] } diff --git a/primitives/chain-millau/src/lib.rs b/primitives/chain-millau/src/lib.rs index e63903aff7..9c0b4782e3 100644 --- a/primitives/chain-millau/src/lib.rs +++ b/primitives/chain-millau/src/lib.rs @@ -25,7 +25,8 @@ use bp_messages::{ }; use bp_runtime::{decl_bridge_runtime_apis, Chain}; use frame_support::{ - weights::{constants::WEIGHT_PER_SECOND, DispatchClass, IdentityFee, Weight}, + dispatch::DispatchClass, + weights::{constants::WEIGHT_PER_SECOND, IdentityFee, Weight}, Parameter, RuntimeDebug, }; use frame_system::limits; @@ -56,11 +57,8 @@ 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. -pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2; - -/// Represents the average portion of a block's weight that will be used by an -/// `on_initialize()` runtime call. -pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); +// TODO: https://github.com/paritytech/parity-bridges-common/issues/1543 - remove `set_proof_size` +pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.set_proof_size(1_000).saturating_div(2); /// Represents the portion of a block that will be used by Normal extrinsics. pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); @@ -77,21 +75,22 @@ pub const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = 128; /// for the case when single message of `pallet_bridge_messages::EXPECTED_DEFAULT_MESSAGE_LENGTH` /// bytes is delivered. The message must have dispatch weight set to zero. The result then must be /// rounded up to account possible future runtime upgrades. -pub const DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT: Weight = 1_500_000_000; +pub const DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT: Weight = Weight::from_ref_time(1_500_000_000); /// Increase of delivery transaction weight on Millau chain with every additional message byte. /// /// This value is a result of /// `pallet_bridge_messages::WeightInfoExt::storage_proof_size_overhead(1)` call. The result then /// must be rounded up to account possible future runtime upgrades. -pub const ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT: Weight = 25_000; +pub const ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT: Weight = Weight::from_ref_time(25_000); /// Maximal weight of single message delivery confirmation transaction on Millau chain. /// /// This value is a result of `pallet_bridge_messages::Pallet::receive_messages_delivery_proof` /// weight formula computation for the case when single message is confirmed. The result then must /// be rounded up to account possible future runtime upgrades. -pub const MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT: Weight = 2_000_000_000; +pub const MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT: Weight = + Weight::from_ref_time(2_000_000_000); /// Weight of pay-dispatch-fee operation for inbound messages at Millau chain. /// @@ -100,7 +99,7 @@ pub const MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT: Weight = 2_000_000 /// chain. Don't put too much reserve there, because it is used to **decrease** /// `DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT` cost. So putting large reserve would make delivery /// transactions cheaper. -pub const PAY_INBOUND_DISPATCH_FEE_WEIGHT: Weight = 700_000_000; +pub const PAY_INBOUND_DISPATCH_FEE_WEIGHT: Weight = Weight::from_ref_time(700_000_000); /// The target length of a session (how often authorities change) on Millau measured in of number of /// blocks. @@ -227,21 +226,8 @@ impl sp_runtime::traits::Hash for BlakeTwoAndKeccak256 { frame_support::parameter_types! { pub BlockLength: limits::BlockLength = limits::BlockLength::max_with_normal_ratio(2 * 1024 * 1024, NORMAL_DISPATCH_RATIO); - pub BlockWeights: limits::BlockWeights = limits::BlockWeights::builder() - // Allowance for Normal class - .for_class(DispatchClass::Normal, |weights| { - weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT); - }) - // Allowance for Operational class - .for_class(DispatchClass::Operational, |weights| { - weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT); - // Extra reserved space for Operational class - weights.reserved = Some(MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT); - }) - // By default Mandatory class is not limited at all. - // This parameter is used to derive maximal size of a single extrinsic. - .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO) - .build_or_panic(); + 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. diff --git a/primitives/chain-rialto-parachain/src/lib.rs b/primitives/chain-rialto-parachain/src/lib.rs index 8afbf87725..3a54a2fb54 100644 --- a/primitives/chain-rialto-parachain/src/lib.rs +++ b/primitives/chain-rialto-parachain/src/lib.rs @@ -23,7 +23,8 @@ use bp_messages::{ }; use bp_runtime::{decl_bridge_runtime_apis, Chain}; use frame_support::{ - weights::{constants::WEIGHT_PER_SECOND, DispatchClass, IdentityFee, Weight}, + dispatch::DispatchClass, + weights::{constants::WEIGHT_PER_SECOND, IdentityFee, Weight}, Parameter, RuntimeDebug, }; use frame_system::limits; @@ -53,11 +54,8 @@ 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. -pub const MAXIMUM_BLOCK_WEIGHT: Weight = 2 * WEIGHT_PER_SECOND; - -/// Represents the average portion of a block's weight that will be used by an -/// `on_initialize()` runtime call. -pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); +// TODO: https://github.com/paritytech/parity-bridges-common/issues/1543 - remove `set_proof_size` +pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.set_proof_size(1_000).saturating_mul(2); /// Represents the portion of a block that will be used by Normal extrinsics. pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); @@ -74,7 +72,7 @@ pub const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = 1024; /// for the case when single message of `pallet_bridge_messages::EXPECTED_DEFAULT_MESSAGE_LENGTH` /// bytes is delivered. The message must have dispatch weight set to zero. The result then must be /// rounded up to account possible future runtime upgrades. -pub const DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT: Weight = 1_500_000_000; +pub const DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT: Weight = Weight::from_ref_time(1_500_000_000); /// Increase of delivery transaction weight on RialtoParachain chain with every additional message /// byte. @@ -82,14 +80,15 @@ pub const DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT: Weight = 1_500_000_000; /// This value is a result of /// `pallet_bridge_messages::WeightInfoExt::storage_proof_size_overhead(1)` call. The result then /// must be rounded up to account possible future runtime upgrades. -pub const ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT: Weight = 25_000; +pub const ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT: Weight = Weight::from_ref_time(25_000); /// Maximal weight of single message delivery confirmation transaction on RialtoParachain chain. /// /// This value is a result of `pallet_bridge_messages::Pallet::receive_messages_delivery_proof` /// weight formula computation for the case when single message is confirmed. The result then must /// be rounded up to account possible future runtime upgrades. -pub const MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT: Weight = 2_000_000_000; +pub const MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT: Weight = + Weight::from_ref_time(2_000_000_000); /// Weight of pay-dispatch-fee operation for inbound messages at Rialto chain. /// @@ -98,7 +97,7 @@ pub const MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT: Weight = 2_000_000 /// chain. Don't put too much reserve there, because it is used to **decrease** /// `DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT` cost. So putting large reserve would make delivery /// transactions cheaper. -pub const PAY_INBOUND_DISPATCH_FEE_WEIGHT: Weight = 600_000_000; +pub const PAY_INBOUND_DISPATCH_FEE_WEIGHT: Weight = Weight::from_ref_time(600_000_000); /// Block number type used in Rialto. pub type BlockNumber = u32; @@ -164,21 +163,8 @@ impl Chain for RialtoParachain { frame_support::parameter_types! { pub BlockLength: limits::BlockLength = limits::BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); - pub BlockWeights: limits::BlockWeights = limits::BlockWeights::builder() - // Allowance for Normal class - .for_class(DispatchClass::Normal, |weights| { - weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT); - }) - // Allowance for Operational class - .for_class(DispatchClass::Operational, |weights| { - weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT); - // Extra reserved space for Operational class - weights.reserved = Some(MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT); - }) - // By default Mandatory class is not limited at all. - // This parameter is used to derive maximal size of a single extrinsic. - .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO) - .build_or_panic(); + 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. diff --git a/primitives/chain-rialto/src/lib.rs b/primitives/chain-rialto/src/lib.rs index d87e82e78a..4d272fe683 100644 --- a/primitives/chain-rialto/src/lib.rs +++ b/primitives/chain-rialto/src/lib.rs @@ -23,7 +23,8 @@ use bp_messages::{ }; use bp_runtime::{decl_bridge_runtime_apis, Chain}; use frame_support::{ - weights::{constants::WEIGHT_PER_SECOND, DispatchClass, IdentityFee, Weight}, + dispatch::DispatchClass, + weights::{constants::WEIGHT_PER_SECOND, IdentityFee, Weight}, Parameter, RuntimeDebug, }; use frame_system::limits; @@ -47,11 +48,8 @@ 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. -pub const MAXIMUM_BLOCK_WEIGHT: Weight = 2 * WEIGHT_PER_SECOND; - -/// Represents the average portion of a block's weight that will be used by an -/// `on_initialize()` runtime call. -pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); +// TODO: https://github.com/paritytech/parity-bridges-common/issues/1543 - remove `set_proof_size` +pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.set_proof_size(1_000).saturating_mul(2); /// Represents the portion of a block that will be used by Normal extrinsics. pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); @@ -68,21 +66,22 @@ pub const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = 1024; /// for the case when single message of `pallet_bridge_messages::EXPECTED_DEFAULT_MESSAGE_LENGTH` /// bytes is delivered. The message must have dispatch weight set to zero. The result then must be /// rounded up to account possible future runtime upgrades. -pub const DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT: Weight = 1_500_000_000; +pub const DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT: Weight = Weight::from_ref_time(1_500_000_000); /// Increase of delivery transaction weight on Rialto chain with every additional message byte. /// /// This value is a result of /// `pallet_bridge_messages::WeightInfoExt::storage_proof_size_overhead(1)` call. The result then /// must be rounded up to account possible future runtime upgrades. -pub const ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT: Weight = 25_000; +pub const ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT: Weight = Weight::from_ref_time(25_000); /// Maximal weight of single message delivery confirmation transaction on Rialto chain. /// /// This value is a result of `pallet_bridge_messages::Pallet::receive_messages_delivery_proof` /// weight formula computation for the case when single message is confirmed. The result then must /// be rounded up to account possible future runtime upgrades. -pub const MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT: Weight = 2_000_000_000; +pub const MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT: Weight = + Weight::from_ref_time(2_000_000_000); /// Weight of pay-dispatch-fee operation for inbound messages at Rialto chain. /// @@ -91,7 +90,7 @@ pub const MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT: Weight = 2_000_000 /// chain. Don't put too much reserve there, because it is used to **decrease** /// `DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT` cost. So putting large reserve would make delivery /// transactions cheaper. -pub const PAY_INBOUND_DISPATCH_FEE_WEIGHT: Weight = 700_000_000; +pub const PAY_INBOUND_DISPATCH_FEE_WEIGHT: Weight = Weight::from_ref_time(700_000_000); /// The target length of a session (how often authorities change) on Rialto measured in of number of /// blocks. @@ -193,21 +192,8 @@ impl Chain for Rialto { frame_support::parameter_types! { pub BlockLength: limits::BlockLength = limits::BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); - pub BlockWeights: limits::BlockWeights = limits::BlockWeights::builder() - // Allowance for Normal class - .for_class(DispatchClass::Normal, |weights| { - weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT); - }) - // Allowance for Operational class - .for_class(DispatchClass::Operational, |weights| { - weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT); - // Extra reserved space for Operational class - weights.reserved = Some(MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT); - }) - // By default Mandatory class is not limited at all. - // This parameter is used to derive maximal size of a single extrinsic. - .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO) - .build_or_panic(); + 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. diff --git a/primitives/chain-westend/src/lib.rs b/primitives/chain-westend/src/lib.rs index 2fd27094cb..8d5d8d9a92 100644 --- a/primitives/chain-westend/src/lib.rs +++ b/primitives/chain-westend/src/lib.rs @@ -33,12 +33,15 @@ pub type Westend = PolkadotLike; pub enum Call {} impl sp_runtime::traits::Dispatchable for Call { - type Origin = (); + type RuntimeOrigin = (); type Config = (); type Info = (); type PostInfo = (); - fn dispatch(self, _origin: Self::Origin) -> sp_runtime::DispatchResultWithInfo { + fn dispatch( + self, + _origin: Self::RuntimeOrigin, + ) -> sp_runtime::DispatchResultWithInfo { unimplemented!("The Call is not expected to be dispatched.") } } diff --git a/primitives/messages/src/source_chain.rs b/primitives/messages/src/source_chain.rs index 70b52dc63a..e1f2c0c3c8 100644 --- a/primitives/messages/src/source_chain.rs +++ b/primitives/messages/src/source_chain.rs @@ -212,7 +212,7 @@ impl MessagesBridge Result { - Ok(SendMessageArtifacts { nonce: 0, weight: 0 }) + Ok(SendMessageArtifacts { nonce: 0, weight: Weight::from_ref_time(0) }) } } @@ -233,10 +233,11 @@ pub trait OnDeliveryConfirmed { fn on_messages_delivered(_lane: &LaneId, _messages: &DeliveredMessages) -> Weight; } +#[allow(clippy::let_and_return)] #[impl_trait_for_tuples::impl_for_tuples(30)] impl OnDeliveryConfirmed for Tuple { fn on_messages_delivered(lane: &LaneId, messages: &DeliveredMessages) -> Weight { - let mut total_weight: Weight = 0; + let mut total_weight = Weight::from_ref_time(0); for_tuples!( #( total_weight = total_weight.saturating_add(Tuple::on_messages_delivered(lane, messages)); @@ -254,7 +255,7 @@ pub trait OnMessageAccepted { impl OnMessageAccepted for () { fn on_messages_accepted(_lane: &LaneId, _message: &MessageNonce) -> Weight { - 0 + Weight::from_ref_time(0) } } diff --git a/primitives/messages/src/target_chain.rs b/primitives/messages/src/target_chain.rs index a5686e4abe..05623d0efb 100644 --- a/primitives/messages/src/target_chain.rs +++ b/primitives/messages/src/target_chain.rs @@ -167,7 +167,7 @@ impl MessageDispatch for ForbidInboundMessages { ) -> MessageDispatchResult { MessageDispatchResult { dispatch_result: false, - unspent_weight: 0, + unspent_weight: Weight::from_ref_time(0), dispatch_fee_paid_during_dispatch: false, } } diff --git a/primitives/polkadot-core/Cargo.toml b/primitives/polkadot-core/Cargo.toml index 9a68e8ccc2..a9db53a8bf 100644 --- a/primitives/polkadot-core/Cargo.toml +++ b/primitives/polkadot-core/Cargo.toml @@ -8,7 +8,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } -parity-util-mem = { version = "0.11.0", optional = true } +parity-util-mem = { version = "0.12.0", optional = true } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } serde = { version = "1.0", optional = true, features = ["derive"] } diff --git a/primitives/polkadot-core/src/lib.rs b/primitives/polkadot-core/src/lib.rs index 476b1f2f23..34eb4ae13b 100644 --- a/primitives/polkadot-core/src/lib.rs +++ b/primitives/polkadot-core/src/lib.rs @@ -20,11 +20,11 @@ use bp_messages::MessageNonce; use bp_runtime::{Chain, EncodedOrDecodedCall}; use codec::Compact; use frame_support::{ - dispatch::Dispatchable, + dispatch::{DispatchClass, Dispatchable}, parameter_types, weights::{ constants::{BlockExecutionWeight, WEIGHT_PER_SECOND}, - DispatchClass, Weight, + Weight, }, Blake2_128Concat, RuntimeDebug, StorageHasher, Twox128, }; @@ -73,7 +73,8 @@ const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// All Polkadot-like chains allow 2 seconds of compute with a 6-second average block time. /// /// This is a copy-paste from the Polkadot repo's `polkadot-runtime-common` crate. -pub const MAXIMUM_BLOCK_WEIGHT: Weight = 2 * WEIGHT_PER_SECOND; +// TODO: https://github.com/paritytech/parity-bridges-common/issues/1543 - remove `set_proof_size` +pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.set_proof_size(1_000).saturating_mul(2); /// All Polkadot-like chains assume that an on-initialize consumes 1 percent of the weight on /// average, hence a single extrinsic will not be allowed to consume more than @@ -134,7 +135,8 @@ pub const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = 8192; /// This value is a result of `pallet_bridge_messages::Pallet::receive_messages_delivery_proof` /// weight formula computation for the case when single message is confirmed. The result then must /// be rounded up to account possible future runtime upgrades. -pub const MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT: Weight = 2_000_000_000; +pub const MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT: Weight = + Weight::from_ref_time(2_000_000_000); /// Increase of delivery transaction weight on Polkadot-like chain with every additional message /// byte. @@ -142,7 +144,7 @@ pub const MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT: Weight = 2_000_000 /// This value is a result of /// `pallet_bridge_messages::WeightInfoExt::storage_proof_size_overhead(1)` call. The result then /// must be rounded up to account possible future runtime upgrades. -pub const ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT: Weight = 25_000; +pub const ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT: Weight = Weight::from_ref_time(25_000); /// Maximal number of bytes, included in the signed Polkadot-like transaction apart from the encoded /// call itself. @@ -156,7 +158,7 @@ pub const TX_EXTRA_BYTES: u32 = 256; /// for the case when single message of `pallet_bridge_messages::EXPECTED_DEFAULT_MESSAGE_LENGTH` /// bytes is delivered. The message must have dispatch weight set to zero. The result then must be /// rounded up to account possible future runtime upgrades. -pub const DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT: Weight = 1_500_000_000; +pub const DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT: Weight = Weight::from_ref_time(1_500_000_000); /// Weight of pay-dispatch-fee operation for inbound messages at Polkadot-like chain. /// @@ -165,7 +167,7 @@ pub const DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT: Weight = 1_500_000_000; /// chain. Don't put too much reserve there, because it is used to **decrease** /// `DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT` cost. So putting large reserve would make delivery /// transactions cheaper. -pub const PAY_INBOUND_DISPATCH_FEE_WEIGHT: Weight = 600_000_000; +pub const PAY_INBOUND_DISPATCH_FEE_WEIGHT: Weight = Weight::from_ref_time(600_000_000); /// Re-export `time_units` to make usage easier. pub use time_units::*; diff --git a/primitives/runtime/src/lib.rs b/primitives/runtime/src/lib.rs index 94a231333d..cd39519204 100644 --- a/primitives/runtime/src/lib.rs +++ b/primitives/runtime/src/lib.rs @@ -403,7 +403,7 @@ pub trait OwnedBridgeModule { } /// Ensure that the origin is either root, or `PalletOwner`. - fn ensure_owner_or_root(origin: T::Origin) -> Result<(), BadOrigin> { + fn ensure_owner_or_root(origin: T::RuntimeOrigin) -> Result<(), BadOrigin> { match origin.into() { Ok(RawOrigin::Root) => Ok(()), Ok(RawOrigin::Signed(ref signer)) @@ -422,7 +422,7 @@ pub trait OwnedBridgeModule { } /// Change the owner of the module. - fn set_owner(origin: T::Origin, maybe_owner: Option) -> DispatchResult { + fn set_owner(origin: T::RuntimeOrigin, maybe_owner: Option) -> DispatchResult { Self::ensure_owner_or_root(origin)?; match maybe_owner { Some(owner) => { @@ -440,7 +440,7 @@ pub trait OwnedBridgeModule { /// Halt or resume all/some module operations. fn set_operating_mode( - origin: T::Origin, + origin: T::RuntimeOrigin, operating_mode: Self::OperatingMode, ) -> DispatchResult { Self::ensure_owner_or_root(origin)?; diff --git a/primitives/test-utils/src/lib.rs b/primitives/test-utils/src/lib.rs index e16c43c981..c1e95ec6fe 100644 --- a/primitives/test-utils/src/lib.rs +++ b/primitives/test-utils/src/lib.rs @@ -228,16 +228,16 @@ macro_rules! generate_owned_bridge_module_tests { PalletOwner::::put(1); // The root should be able to change the owner. - assert_ok!(Pallet::::set_owner(Origin::root(), Some(2))); + assert_ok!(Pallet::::set_owner(RuntimeOrigin::root(), Some(2))); assert_eq!(PalletOwner::::get(), Some(2)); // The owner should be able to change the owner. - assert_ok!(Pallet::::set_owner(Origin::signed(2), Some(3))); + assert_ok!(Pallet::::set_owner(RuntimeOrigin::signed(2), Some(3))); assert_eq!(PalletOwner::::get(), Some(3)); // Other users shouldn't be able to change the owner. assert_noop!( - Pallet::::set_owner(Origin::signed(1), Some(4)), + Pallet::::set_owner(RuntimeOrigin::signed(1), Some(4)), DispatchError::BadOrigin ); assert_eq!(PalletOwner::::get(), Some(3)); @@ -252,26 +252,26 @@ macro_rules! generate_owned_bridge_module_tests { // The root should be able to halt the pallet. assert_ok!(Pallet::::set_operating_mode( - Origin::root(), + RuntimeOrigin::root(), $halted_operating_mode )); assert_eq!(PalletOperatingMode::::get(), $halted_operating_mode); // The root should be able to resume the pallet. assert_ok!(Pallet::::set_operating_mode( - Origin::root(), + RuntimeOrigin::root(), $normal_operating_mode )); assert_eq!(PalletOperatingMode::::get(), $normal_operating_mode); // The owner should be able to halt the pallet. assert_ok!(Pallet::::set_operating_mode( - Origin::signed(1), + RuntimeOrigin::signed(1), $halted_operating_mode )); assert_eq!(PalletOperatingMode::::get(), $halted_operating_mode); // The owner should be able to resume the pallet. assert_ok!(Pallet::::set_operating_mode( - Origin::signed(1), + RuntimeOrigin::signed(1), $normal_operating_mode )); assert_eq!(PalletOperatingMode::::get(), $normal_operating_mode); @@ -279,7 +279,7 @@ macro_rules! generate_owned_bridge_module_tests { // Other users shouldn't be able to halt the pallet. assert_noop!( Pallet::::set_operating_mode( - Origin::signed(2), + RuntimeOrigin::signed(2), $halted_operating_mode ), DispatchError::BadOrigin @@ -289,7 +289,7 @@ macro_rules! generate_owned_bridge_module_tests { PalletOperatingMode::::put($halted_operating_mode); assert_noop!( Pallet::::set_operating_mode( - Origin::signed(2), + RuntimeOrigin::signed(2), $normal_operating_mode ), DispatchError::BadOrigin diff --git a/relays/bin-substrate/src/chains/millau.rs b/relays/bin-substrate/src/chains/millau.rs index 59d53edf99..55c48bee3e 100644 --- a/relays/bin-substrate/src/chains/millau.rs +++ b/relays/bin-substrate/src/chains/millau.rs @@ -50,7 +50,7 @@ impl CliEncodeMessage for Millau { ), }; - Ok(millau_runtime::Call::XcmPallet(millau_runtime::XcmCall::send { + Ok(millau_runtime::RuntimeCall::XcmPallet(millau_runtime::XcmCall::send { dest: Box::new(dest.into()), message: Box::new(message), }) @@ -64,7 +64,7 @@ impl CliEncodeMessage for Millau { bridge_instance_index: u8, ) -> anyhow::Result> { Ok(match bridge_instance_index { - bridge::MILLAU_TO_RIALTO_INDEX => millau_runtime::Call::BridgeRialtoMessages( + bridge::MILLAU_TO_RIALTO_INDEX => millau_runtime::RuntimeCall::BridgeRialtoMessages( millau_runtime::MessagesCall::send_message { lane_id: lane, payload, @@ -73,7 +73,7 @@ impl CliEncodeMessage for Millau { ) .into(), bridge::MILLAU_TO_RIALTO_PARACHAIN_INDEX => - millau_runtime::Call::BridgeRialtoParachainMessages( + millau_runtime::RuntimeCall::BridgeRialtoParachainMessages( millau_runtime::MessagesCall::send_message { lane_id: lane, payload, diff --git a/relays/bin-substrate/src/chains/mod.rs b/relays/bin-substrate/src/chains/mod.rs index c1e963a63e..772f2552f5 100644 --- a/relays/bin-substrate/src/chains/mod.rs +++ b/relays/bin-substrate/src/chains/mod.rs @@ -69,8 +69,9 @@ mod tests { } #[test] fn rialto_tx_extra_bytes_constant_is_correct() { - let rialto_call = - rialto_runtime::Call::System(rialto_runtime::SystemCall::remark { remark: vec![] }); + let rialto_call = rialto_runtime::RuntimeCall::System(rialto_runtime::SystemCall::remark { + remark: vec![], + }); let rialto_tx = Rialto::sign_transaction( SignParam { spec_version: 1, @@ -92,8 +93,9 @@ mod tests { #[test] fn millau_tx_extra_bytes_constant_is_correct() { - let millau_call = - millau_runtime::Call::System(millau_runtime::SystemCall::remark { remark: vec![] }); + let millau_call = millau_runtime::RuntimeCall::System(millau_runtime::SystemCall::remark { + remark: vec![], + }); let millau_tx = Millau::sign_transaction( SignParam { spec_version: 0, diff --git a/relays/bin-substrate/src/chains/rialto.rs b/relays/bin-substrate/src/chains/rialto.rs index 285476a331..6a322d889c 100644 --- a/relays/bin-substrate/src/chains/rialto.rs +++ b/relays/bin-substrate/src/chains/rialto.rs @@ -42,7 +42,7 @@ impl CliEncodeMessage for Rialto { ), }; - Ok(rialto_runtime::Call::XcmPallet(rialto_runtime::XcmCall::send { + Ok(rialto_runtime::RuntimeCall::XcmPallet(rialto_runtime::XcmCall::send { dest: Box::new(dest.into()), message: Box::new(message), }) @@ -56,7 +56,7 @@ impl CliEncodeMessage for Rialto { bridge_instance_index: u8, ) -> anyhow::Result> { Ok(match bridge_instance_index { - bridge::RIALTO_TO_MILLAU_INDEX => rialto_runtime::Call::BridgeMillauMessages( + bridge::RIALTO_TO_MILLAU_INDEX => rialto_runtime::RuntimeCall::BridgeMillauMessages( rialto_runtime::MessagesCall::send_message { lane_id: lane, payload, diff --git a/relays/bin-substrate/src/chains/rialto_parachain.rs b/relays/bin-substrate/src/chains/rialto_parachain.rs index c359c42087..08cc38d90d 100644 --- a/relays/bin-substrate/src/chains/rialto_parachain.rs +++ b/relays/bin-substrate/src/chains/rialto_parachain.rs @@ -42,10 +42,12 @@ impl CliEncodeMessage for RialtoParachain { ), }; - Ok(rialto_parachain_runtime::Call::PolkadotXcm(rialto_parachain_runtime::XcmCall::send { - dest: Box::new(dest.into()), - message: Box::new(message), - }) + Ok(rialto_parachain_runtime::RuntimeCall::PolkadotXcm( + rialto_parachain_runtime::XcmCall::send { + dest: Box::new(dest.into()), + message: Box::new(message), + }, + ) .into()) } @@ -57,7 +59,7 @@ impl CliEncodeMessage for RialtoParachain { ) -> anyhow::Result> { Ok(match bridge_instance_index { bridge::RIALTO_PARACHAIN_TO_MILLAU_INDEX => - rialto_parachain_runtime::Call::BridgeMillauMessages( + rialto_parachain_runtime::RuntimeCall::BridgeMillauMessages( rialto_parachain_runtime::MessagesCall::send_message { lane_id: lane, payload, diff --git a/relays/client-millau/src/lib.rs b/relays/client-millau/src/lib.rs index 3c861214df..8adb108c85 100644 --- a/relays/client-millau/src/lib.rs +++ b/relays/client-millau/src/lib.rs @@ -85,7 +85,7 @@ impl Chain for Millau { const STORAGE_PROOF_OVERHEAD: u32 = bp_millau::EXTRA_STORAGE_PROOF_SIZE; type SignedBlock = millau_runtime::SignedBlock; - type Call = millau_runtime::Call; + type Call = millau_runtime::RuntimeCall; } impl ChainWithBalances for Millau { @@ -186,7 +186,7 @@ mod tests { #[test] fn parse_transaction_works() { let unsigned = UnsignedTransaction { - call: millau_runtime::Call::System(millau_runtime::SystemCall::remark { + call: millau_runtime::RuntimeCall::System(millau_runtime::SystemCall::remark { remark: b"Hello world!".to_vec(), }) .into(), diff --git a/relays/client-rialto-parachain/src/lib.rs b/relays/client-rialto-parachain/src/lib.rs index 489baa4be5..7e1415720b 100644 --- a/relays/client-rialto-parachain/src/lib.rs +++ b/relays/client-rialto-parachain/src/lib.rs @@ -65,7 +65,7 @@ impl Chain for RialtoParachain { const STORAGE_PROOF_OVERHEAD: u32 = bp_rialto_parachain::EXTRA_STORAGE_PROOF_SIZE; type SignedBlock = rialto_parachain_runtime::SignedBlock; - type Call = rialto_parachain_runtime::Call; + type Call = rialto_parachain_runtime::RuntimeCall; } impl ChainWithBalances for RialtoParachain { diff --git a/relays/client-rialto/src/lib.rs b/relays/client-rialto/src/lib.rs index 816a21baf0..fbb1f85ec1 100644 --- a/relays/client-rialto/src/lib.rs +++ b/relays/client-rialto/src/lib.rs @@ -65,7 +65,7 @@ impl Chain for Rialto { const STORAGE_PROOF_OVERHEAD: u32 = bp_rialto::EXTRA_STORAGE_PROOF_SIZE; type SignedBlock = rialto_runtime::SignedBlock; - type Call = rialto_runtime::Call; + type Call = rialto_runtime::RuntimeCall; } impl RelayChain for Rialto { @@ -189,7 +189,7 @@ mod tests { #[test] fn parse_transaction_works() { let unsigned = UnsignedTransaction { - call: rialto_runtime::Call::System(rialto_runtime::SystemCall::remark { + call: rialto_runtime::RuntimeCall::System(rialto_runtime::SystemCall::remark { remark: b"Hello world!".to_vec(), }) .into(), diff --git a/relays/client-substrate/src/transaction_tracker.rs b/relays/client-substrate/src/transaction_tracker.rs index 44d8b72cb8..1730647f00 100644 --- a/relays/client-substrate/src/transaction_tracker.rs +++ b/relays/client-substrate/src/transaction_tracker.rs @@ -168,7 +168,7 @@ async fn watch_transaction_status< loop { match subscription.next().await { - Some(TransactionStatusOf::::Finalized(block_hash)) => { + Some(TransactionStatusOf::::Finalized((block_hash, _))) => { // the only "successful" outcome of this method is when the block with transaction // has been finalized log::trace!( diff --git a/relays/lib-substrate-relay/src/messages_lane.rs b/relays/lib-substrate-relay/src/messages_lane.rs index 14227f379d..d821aa6f4c 100644 --- a/relays/lib-substrate-relay/src/messages_lane.rs +++ b/relays/lib-substrate-relay/src/messages_lane.rs @@ -32,7 +32,7 @@ use bridge_runtime_common::messages::{ source::FromBridgedChainMessagesDeliveryProof, target::FromBridgedChainMessagesProof, }; use codec::Encode; -use frame_support::weights::{GetDispatchInfo, Weight}; +use frame_support::{dispatch::GetDispatchInfo, weights::Weight}; use messages_relay::{message_lane::MessageLane, relay_strategy::RelayStrategy}; use pallet_bridge_messages::{Call as BridgeMessagesCall, Config as BridgeMessagesConfig}; use relay_substrate_client::{ @@ -461,17 +461,23 @@ pub fn select_delivery_transaction_limits 0, "Relay should fit at least one message in every delivery transaction", ); assert!( - weight_for_messages_dispatch >= max_extrinsic_weight / 2, + weight_for_messages_dispatch.ref_time() >= max_extrinsic_weight.ref_time() / 2, "Relay shall be able to deliver messages with dispatch weight = max_extrinsic_weight / 2", ); @@ -500,7 +506,9 @@ mod tests { // i.e. weight reserved for messages dispatch allows dispatch of non-trivial messages. // // Any significant change in this values should attract additional attention. - (1024, 216_609_134_667), + // + // TODO: https://github.com/paritytech/parity-bridges-common/issues/1543 - remove `set_proof_size` + (1024, Weight::from_ref_time(216_609_134_667).set_proof_size(217)), ); } } diff --git a/relays/lib-substrate-relay/src/messages_source.rs b/relays/lib-substrate-relay/src/messages_source.rs index e34f477e5f..25869da678 100644 --- a/relays/lib-substrate-relay/src/messages_source.rs +++ b/relays/lib-substrate-relay/src/messages_source.rs @@ -653,7 +653,7 @@ mod tests { .into_iter() .map(|nonce| bp_messages::OutboundMessageDetails { nonce, - dispatch_weight: 0, + dispatch_weight: Weight::from_ref_time(0), size: 0, delivery_and_dispatch_fee: 0, dispatch_fee_payment: DispatchFeePayment::AtSourceChain, @@ -730,7 +730,7 @@ mod tests { for (idx, _) in payload_sizes.iter().enumerate() { out_msgs_details.push(OutboundMessageDetails::> { nonce: idx as MessageNonce, - dispatch_weight: 0, + dispatch_weight: Weight::from_ref_time(0), size: 0, delivery_and_dispatch_fee: 0, dispatch_fee_payment: DispatchFeePayment::AtTargetChain, diff --git a/relays/lib-substrate-relay/src/messages_target.rs b/relays/lib-substrate-relay/src/messages_target.rs index da41dba63a..46c3b6141c 100644 --- a/relays/lib-substrate-relay/src/messages_target.rs +++ b/relays/lib-substrate-relay/src/messages_target.rs @@ -347,7 +347,7 @@ where // chain. This requires more knowledge of the Target chain, but seems there's no better way // to solve this now. let expected_refund_in_target_tokens = if total_prepaid_nonces != 0 { - const WEIGHT_DIFFERENCE: Weight = 100; + const WEIGHT_DIFFERENCE: Weight = Weight::from_ref_time(100); let (spec_version, transaction_version) = self.target_client.simple_runtime_version().await?; @@ -533,7 +533,7 @@ mod tests { #[test] fn prepare_dummy_messages_proof_works() { - const DISPATCH_WEIGHT: Weight = 1_000_000; + const DISPATCH_WEIGHT: Weight = Weight::from_ref_time(1_000_000); const SIZE: u32 = 1_000; let dummy_proof = prepare_dummy_messages_proof::(1..=10, DISPATCH_WEIGHT, SIZE); assert_eq!(dummy_proof.0, DISPATCH_WEIGHT); @@ -563,21 +563,24 @@ mod tests { #[test] fn compute_fee_multiplier_returns_sane_results() { - let multiplier: FixedU128 = bp_rialto::WeightToFee::weight_to_fee(&1).into(); + let multiplier: FixedU128 = + bp_rialto::WeightToFee::weight_to_fee(&Weight::from_ref_time(1)).into(); let smaller_weight = 1_000_000; - let smaller_adjusted_weight_fee = - multiplier.saturating_mul_int(WeightToFeeOf::::weight_to_fee(&smaller_weight)); + let smaller_adjusted_weight_fee = multiplier.saturating_mul_int( + WeightToFeeOf::::weight_to_fee(&Weight::from_ref_time(smaller_weight)), + ); let larger_weight = smaller_weight + 200_000; - let larger_adjusted_weight_fee = - multiplier.saturating_mul_int(WeightToFeeOf::::weight_to_fee(&larger_weight)); + let larger_adjusted_weight_fee = multiplier.saturating_mul_int( + WeightToFeeOf::::weight_to_fee(&Weight::from_ref_time(larger_weight)), + ); assert_eq!( compute_fee_multiplier::( smaller_adjusted_weight_fee, - smaller_weight, + Weight::from_ref_time(smaller_weight), larger_adjusted_weight_fee, - larger_weight, + Weight::from_ref_time(larger_weight), ), multiplier, ); @@ -589,7 +592,9 @@ mod tests { compute_prepaid_messages_refund::( 10, FixedU128::saturating_from_rational(110, 100), - ) > (10 * Rialto::PAY_INBOUND_DISPATCH_FEE_WEIGHT_AT_CHAIN).into() + ) > Rialto::PAY_INBOUND_DISPATCH_FEE_WEIGHT_AT_CHAIN + .saturating_mul(10u64) + .ref_time() as _ ); } } diff --git a/relays/messages/src/message_lane_loop.rs b/relays/messages/src/message_lane_loop.rs index 05c157ee72..8d9f3ded08 100644 --- a/relays/messages/src/message_lane_loop.rs +++ b/relays/messages/src/message_lane_loop.rs @@ -678,7 +678,7 @@ pub(crate) mod tests { ( nonce, MessageDetails { - dispatch_weight: 1, + dispatch_weight: Weight::from_ref_time(1), size: 1, reward: 1, dispatch_fee_payment: DispatchFeePayment::AtSourceChain, @@ -879,9 +879,11 @@ pub(crate) mod tests { total_dispatch_weight: Weight, total_size: u32, ) -> Result { - Ok(BASE_MESSAGE_DELIVERY_TRANSACTION_COST * (nonces.end() - nonces.start() + 1) + + Ok((Weight::from_ref_time(BASE_MESSAGE_DELIVERY_TRANSACTION_COST) * + (nonces.end() - nonces.start() + 1) + total_dispatch_weight + - total_size as TestSourceChainBalance) + Weight::from_ref_time(total_size as u64)) + .ref_time()) } } @@ -916,7 +918,7 @@ pub(crate) mod tests { max_unrewarded_relayer_entries_at_target: 4, max_unconfirmed_nonces_at_target: 4, max_messages_in_single_batch: 4, - max_messages_weight_in_single_batch: 4, + max_messages_weight_in_single_batch: Weight::from_ref_time(4), max_messages_size_in_single_batch: 4, relay_strategy: AltruisticStrategy, }, diff --git a/relays/messages/src/message_race_delivery.rs b/relays/messages/src/message_race_delivery.rs index e15e08b042..a2c81d8cc3 100644 --- a/relays/messages/src/message_race_delivery.rs +++ b/relays/messages/src/message_race_delivery.rs @@ -295,7 +295,7 @@ impl MessageDeliveryStrategy; @@ -629,7 +629,7 @@ mod tests { max_unrewarded_relayer_entries_at_target: 4, max_unconfirmed_nonces_at_target: 4, max_messages_in_single_batch: 4, - max_messages_weight_in_single_batch: 4, + max_messages_weight_in_single_batch: Weight::from_ref_time(4), max_messages_size_in_single_batch: 4, latest_confirmed_nonces_at_source: vec![(header_id(1), 19)].into_iter().collect(), lane_source_client: TestSourceClient::default(), @@ -667,10 +667,10 @@ mod tests { (race_state, race_strategy) } - fn proof_parameters(state_required: bool, weight: Weight) -> MessageProofParameters { + fn proof_parameters(state_required: bool, weight: u32) -> MessageProofParameters { MessageProofParameters { outbound_state_proof_required: state_required, - dispatch_weight: weight, + dispatch_weight: Weight::from_ref_time(weight as u64), } } @@ -684,7 +684,7 @@ mod tests { ( idx, MessageDetails { - dispatch_weight: idx, + dispatch_weight: Weight::from_ref_time(idx), size: idx as _, reward: idx as _, dispatch_fee_payment: DispatchFeePayment::AtSourceChain, @@ -813,7 +813,7 @@ mod tests { let (state, mut strategy) = prepare_strategy(); // not all queued messages may fit in the batch, because batch has max weight - strategy.max_messages_weight_in_single_batch = 3; + strategy.max_messages_weight_in_single_batch = Weight::from_ref_time(3); assert_eq!( strategy.select_nonces_to_deliver(state).await, Some(((20..=22), proof_parameters(false, 3))) @@ -827,7 +827,8 @@ mod tests { // first message doesn't fit in the batch, because it has weight (10) that overflows max // weight (4) - strategy.strategy.source_queue_mut()[0].1.get_mut(&20).unwrap().dispatch_weight = 10; + strategy.strategy.source_queue_mut()[0].1.get_mut(&20).unwrap().dispatch_weight = + Weight::from_ref_time(10); assert_eq!( strategy.select_nonces_to_deliver(state).await, Some(((20..=20), proof_parameters(false, 10))) @@ -1023,7 +1024,7 @@ mod tests { let nonces = source_nonces( 24..=24, 19, - DEFAULT_REWARD - DEFAULT_DISPATCH_WEIGHT, + DEFAULT_REWARD - DEFAULT_DISPATCH_WEIGHT.ref_time(), dispatch_fee_payment, ); strategy.strategy.source_nonces_updated(header_id(2), nonces); @@ -1031,7 +1032,7 @@ mod tests { strategy.max_unrewarded_relayer_entries_at_target = 100; strategy.max_unconfirmed_nonces_at_target = 100; strategy.max_messages_in_single_batch = 100; - strategy.max_messages_weight_in_single_batch = 100; + strategy.max_messages_weight_in_single_batch = Weight::from_ref_time(100); strategy.max_messages_size_in_single_batch = 100; strategy.relay_strategy = MixStrategy::new(RelayerMode::Rational); @@ -1070,7 +1071,7 @@ mod tests { strategy.max_unrewarded_relayer_entries_at_target = 100; strategy.max_unconfirmed_nonces_at_target = 100; strategy.max_messages_in_single_batch = 5; - strategy.max_messages_weight_in_single_batch = 100; + strategy.max_messages_weight_in_single_batch = Weight::from_ref_time(100); strategy.max_messages_size_in_single_batch = 100; state.best_finalized_source_header_id_at_best_target = Some(header_id(2)); diff --git a/relays/messages/src/relay_strategy/enforcement_strategy.rs b/relays/messages/src/relay_strategy/enforcement_strategy.rs index bb4192d45a..9ebb7c0e68 100644 --- a/relays/messages/src/relay_strategy/enforcement_strategy.rs +++ b/relays/messages/src/relay_strategy/enforcement_strategy.rs @@ -55,7 +55,7 @@ impl EnforcementStrategy { let mut hard_selected_count = 0; let mut soft_selected_count = 0; - let mut selected_weight: Weight = 0; + let mut selected_weight = Weight::from_ref_time(0); let mut selected_count: MessageNonce = 0; let hard_selected_begin_nonce = @@ -77,12 +77,12 @@ impl EnforcementStrategy { hard_selected_begin_nonce, selected_prepaid_nonces: 0, - selected_unpaid_weight: 0, + selected_unpaid_weight: Weight::from_ref_time(0), index: 0, nonce: 0, details: MessageDetails { - dispatch_weight: 0, + dispatch_weight: Weight::from_ref_time(0), size: 0, reward: P::SourceChainBalance::zero(), dispatch_fee_payment: DispatchFeePayment::AtSourceChain, @@ -105,9 +105,10 @@ impl EnforcementStrategy { // transaction will be rejected by the target runtime, but at least we have tried. // limit messages in the batch by weight - let new_selected_weight = match selected_weight.checked_add(details.dispatch_weight) { + let new_selected_weight = match selected_weight.checked_add(&details.dispatch_weight) { Some(new_selected_weight) - if new_selected_weight <= reference.max_messages_weight_in_single_batch => + if new_selected_weight.ref_time() <= + reference.max_messages_weight_in_single_batch.ref_time() => new_selected_weight, new_selected_weight if selected_count == 0 => { log::warn!(