diff --git a/Cargo.lock b/Cargo.lock index aebaaebddfa..d8cffcb227d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -244,6 +244,29 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +[[package]] +name = "ark-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-bls12-377-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20c7021f180a0cbea0380eba97c2af3c57074cdaffe0eef7e840e1c9f2841e55" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-bls12-381" version = "0.4.0" @@ -256,6 +279,45 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-bls12-381-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1dc4b3d08f19e8ec06e949712f95b8361e43f1391d94f65e4234df03480631c" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-bw6-761" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e0605daf0cc5aa2034b78d008aaf159f56901d92a52ee4f6ecdfdac4f426700" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-bw6-761-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccee5fba47266f460067588ee1bf070a9c760bf2050c1c509982c5719aadb4f2" +dependencies = [ + "ark-bw6-761", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ec" version = "0.4.2" @@ -270,9 +332,35 @@ dependencies = [ "hashbrown 0.13.2", "itertools", "num-traits", + "rayon", "zeroize", ] +[[package]] +name = "ark-ed-on-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b10d901b9ac4b38f9c32beacedfadcdd64e46f8d7f8e88c1ae1060022cf6f6c6" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ed-on-bls12-377-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524a4fb7540df2e1a8c2e67a83ba1d1e6c3947f4f9342cc2359fc2e789ad731d" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ed-on-bls12-381-bandersnatch" version = "0.4.0" @@ -285,6 +373,19 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d15185f1acb49a07ff8cbe5f11a1adc5a93b19e211e325d826ae98e98e124346" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ff" version = "0.4.2" @@ -328,6 +429,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-models-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e9eab5d4b5ff2f228b763d38442adc9b084b0a465409b059fac5c2308835ec2" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", +] + [[package]] name = "ark-poly" version = "0.4.2" @@ -358,7 +472,7 @@ dependencies = [ [[package]] name = "ark-secret-scalar" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=4b09416#4b09416fd23383ec436ddac127d58c7b7cd392c6" +source = "git+https://github.com/w3f/ring-vrf?rev=cbc342e#cbc342e95d3cbcd3c5ba8d45af7200eb58e63502" dependencies = [ "ark-ec", "ark-ff", @@ -401,12 +515,13 @@ checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", "rand 0.8.5", + "rayon", ] [[package]] name = "ark-transcript" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=4b09416#4b09416fd23383ec436ddac127d58c7b7cd392c6" +source = "git+https://github.com/w3f/ring-vrf?rev=cbc342e#cbc342e95d3cbcd3c5ba8d45af7200eb58e63502" dependencies = [ "ark-ff", "ark-serialize", @@ -598,7 +713,7 @@ dependencies = [ "log", "parking", "polling", - "rustix 0.37.23", + "rustix 0.37.27", "slab", "socket2 0.4.9", "waker-fn", @@ -638,7 +753,7 @@ dependencies = [ "cfg-if 1.0.0", "event-listener", "futures-lite", - "rustix 0.37.23", + "rustix 0.37.27", "signal-hook", "windows-sys 0.48.0", ] @@ -757,8 +872,8 @@ dependencies = [ [[package]] name = "bandersnatch_vrfs" -version = "0.0.1" -source = "git+https://github.com/w3f/ring-vrf?rev=4b09416#4b09416fd23383ec436ddac127d58c7b7cd392c6" +version = "0.0.3" +source = "git+https://github.com/w3f/ring-vrf?rev=cbc342e#cbc342e95d3cbcd3c5ba8d45af7200eb58e63502" dependencies = [ "ark-bls12-381", "ark-ec", @@ -773,6 +888,8 @@ dependencies = [ "rand_core 0.6.4", "ring 0.1.0", "sha2 0.10.7", + "sp-ark-bls12-381", + "sp-ark-ed-on-bls12-381-bandersnatch", "zeroize", ] @@ -830,7 +947,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "hash-db", "log", @@ -852,6 +969,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ "bitcoin_hashes", + "rand 0.7.3", + "rand_core 0.5.1", + "serde", + "unicode-normalization", ] [[package]] @@ -1028,16 +1149,6 @@ dependencies = [ "scale-info", ] -[[package]] -name = "bp-asset-hub-wococo" -version = "0.1.0" -dependencies = [ - "bp-xcm-bridge-hub-router", - "frame-support", - "parity-scale-codec", - "scale-info", -] - [[package]] name = "bp-beefy" version = "0.1.0" @@ -1121,19 +1232,6 @@ dependencies = [ "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] -[[package]] -name = "bp-bridge-hub-wococo" -version = "0.1.0" -dependencies = [ - "bp-bridge-hub-cumulus", - "bp-messages", - "bp-runtime", - "frame-support", - "sp-api", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - [[package]] name = "bp-header-chain" version = "0.1.0" @@ -1335,20 +1433,6 @@ dependencies = [ "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] -[[package]] -name = "bp-wococo" -version = "0.1.0" -dependencies = [ - "bp-header-chain", - "bp-polkadot-core", - "bp-rococo", - "bp-runtime", - "frame-support", - "sp-api", - "sp-runtime", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", -] - [[package]] name = "bp-xcm-bridge-hub" version = "0.1.0" @@ -1708,6 +1792,12 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6" +[[package]] +name = "constcat" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd7e35aee659887cbfb97aaf227ac12cad1a9d7c71e55ff3376839ed4e282d08" + [[package]] name = "convert_case" version = "0.4.0" @@ -2410,7 +2500,7 @@ dependencies = [ [[package]] name = "dleq_vrf" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=4b09416#4b09416fd23383ec436ddac127d58c7b7cd392c6" +source = "git+https://github.com/w3f/ring-vrf?rev=cbc342e#cbc342e95d3cbcd3c5ba8d45af7200eb58e63502" dependencies = [ "ark-ec", "ark-ff", @@ -2426,18 +2516,18 @@ dependencies = [ [[package]] name = "docify" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ee528c501ddd15d5181997e9518e59024844eac44fd1e40cb20ddb2a8562fa" +checksum = "4235e9b248e2ba4b92007fe9c646f3adf0ffde16dc74713eacc92b8bc58d8d2f" dependencies = [ "docify_macros", ] [[package]] name = "docify_macros" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca01728ab2679c464242eca99f94e2ce0514b52ac9ad950e2ed03fca991231c" +checksum = "47020e12d7c7505670d1363dd53d6c23724f71a90a3ae32ff8eba40de8404626" dependencies = [ "common-path", "derive-syn-parse", @@ -2904,7 +2994,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "frame-support", "frame-support-procedural", @@ -2920,9 +3010,9 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-storage", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "static_assertions", ] @@ -2952,9 +3042,10 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "aquamarine", + "array-bytes 6.1.0", "bitflags 1.3.2", "docify", "environmental", @@ -2974,7 +3065,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-core-hashing-proc-macro", - "sp-debug-derive", + "sp-debug-derive 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-genesis-builder", "sp-inherents", "sp-io", @@ -2983,7 +3074,7 @@ dependencies = [ "sp-staking", "sp-state-machine", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-tracing", + "sp-tracing 10.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-weights", "static_assertions", "tt-call", @@ -2992,7 +3083,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "Inflector", "cfg-expr", @@ -3011,7 +3102,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -3023,7 +3114,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "proc-macro2 1.0.69", "quote 1.0.33", @@ -3033,7 +3124,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "cfg-if 1.0.0", "frame-support", @@ -4935,7 +5026,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" dependencies = [ - "rustix 0.37.23", + "rustix 0.37.27", ] [[package]] @@ -5515,7 +5606,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "frame-support", "frame-system", @@ -5529,7 +5620,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "frame-benchmarking", "frame-support", @@ -5544,7 +5635,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "frame-support", "frame-system", @@ -5564,7 +5655,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "array-bytes 6.1.0", "binary-merkle-tree", @@ -5649,7 +5740,6 @@ dependencies = [ "pallet-bridge-grandpa", "parity-scale-codec", "scale-info", - "sp-core", "sp-io", "sp-runtime", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", @@ -5703,7 +5793,6 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-arithmetic", - "sp-core", "sp-io", "sp-runtime", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", @@ -5712,7 +5801,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "frame-benchmarking", "frame-support", @@ -5735,7 +5824,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "frame-benchmarking", "frame-support", @@ -5753,7 +5842,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "frame-support", "frame-system", @@ -5775,7 +5864,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "docify", "frame-benchmarking", @@ -5788,14 +5877,14 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-storage", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-timestamp", ] [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "frame-support", "frame-system", @@ -5811,7 +5900,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5823,7 +5912,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "frame-benchmarking", "frame-support", @@ -6037,15 +6126,6 @@ dependencies = [ "crypto-mac 0.11.1", ] -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", -] - [[package]] name = "pbkdf2" version = "0.12.2" @@ -6162,7 +6242,7 @@ checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" [[package]] name = "polkadot-core-primitives" version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "parity-scale-codec", "scale-info", @@ -6174,11 +6254,10 @@ dependencies = [ [[package]] name = "polkadot-parachain-primitives" version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "bounded-collections", "derive_more", - "frame-support", "parity-scale-codec", "polkadot-core-primitives", "scale-info", @@ -6186,12 +6265,13 @@ dependencies = [ "sp-core", "sp-runtime", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-weights", ] [[package]] name = "polkadot-primitives" version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "bitvec", "hex-literal", @@ -6904,12 +6984,11 @@ name = "relay-bridge-hub-rococo-client" version = "0.1.0" dependencies = [ "bp-bridge-hub-rococo", - "bp-bridge-hub-wococo", "bp-header-chain", "bp-messages", "bp-parachains", "bp-polkadot-core", - "bp-wococo", + "bp-runtime", "bridge-runtime-common", "parity-scale-codec", "relay-substrate-client", @@ -6943,28 +7022,6 @@ dependencies = [ "subxt", ] -[[package]] -name = "relay-bridge-hub-wococo-client" -version = "0.1.0" -dependencies = [ - "bp-bridge-hub-rococo", - "bp-bridge-hub-wococo", - "bp-header-chain", - "bp-parachains", - "bp-polkadot-core", - "bp-runtime", - "bridge-runtime-common", - "parity-scale-codec", - "relay-bridge-hub-rococo-client", - "relay-substrate-client", - "scale-info", - "sp-consensus-grandpa", - "sp-core", - "sp-runtime", - "sp-weights", - "subxt", -] - [[package]] name = "relay-kusama-client" version = "0.1.0" @@ -7125,21 +7182,6 @@ dependencies = [ "subxt", ] -[[package]] -name = "relay-wococo-client" -version = "0.1.0" -dependencies = [ - "bp-polkadot-core", - "bp-wococo", - "parity-scale-codec", - "relay-rococo-client", - "relay-substrate-client", - "relay-utils", - "sp-core", - "sp-runtime", - "sp-session", -] - [[package]] name = "resolv-conf" version = "0.7.0" @@ -7304,9 +7346,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.23" +version = "0.37.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" dependencies = [ "bitflags 1.3.2", "errno", @@ -7452,20 +7494,24 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "log", "sp-core", - "sp-wasm-interface", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "thiserror", ] [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ + "array-bytes 6.1.0", + "docify", + "log", "memmap2", + "parity-scale-codec", "sc-chain-spec-derive", "sc-client-api", "sc-executor", @@ -7475,6 +7521,8 @@ dependencies = [ "serde_json", "sp-blockchain", "sp-core", + "sp-genesis-builder", + "sp-io", "sp-runtime", "sp-state-machine", ] @@ -7482,7 +7530,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "proc-macro-crate", "proc-macro2 1.0.69", @@ -7493,7 +7541,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "fnv", "futures", @@ -7508,11 +7556,11 @@ dependencies = [ "sp-consensus", "sp-core", "sp-database", - "sp-externalities", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-runtime", "sp-state-machine", "sp-statement-store", - "sp-storage", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-trie", "substrate-prometheus-endpoint", ] @@ -7520,7 +7568,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "async-trait", "futures", @@ -7545,7 +7593,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", @@ -7554,24 +7602,24 @@ dependencies = [ "schnellru", "sp-api", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-io", "sp-panic-handler", - "sp-runtime-interface", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-trie", "sp-version", - "sp-wasm-interface", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "tracing", ] [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", - "sp-wasm-interface", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "thiserror", "wasm-instrument", ] @@ -7579,24 +7627,25 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "anyhow", "cfg-if 1.0.0", "libc", "log", + "parking_lot 0.12.1", "rustix 0.36.16", "sc-allocator", "sc-executor-common", - "sp-runtime-interface", - "sp-wasm-interface", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "wasmtime", ] [[package]] name = "sc-mixnet" version = "0.1.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "array-bytes 4.2.0", "arrayvec 0.7.4", @@ -7624,7 +7673,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "array-bytes 6.1.0", "async-channel", @@ -7665,7 +7714,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -7682,7 +7731,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "jsonrpsee 0.16.2", "parity-scale-codec", @@ -7702,7 +7751,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "chrono", "futures", @@ -7721,7 +7770,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "async-trait", "futures", @@ -7737,7 +7786,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "async-channel", "futures", @@ -8415,7 +8464,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "hash-db", "log", @@ -8423,7 +8472,7 @@ dependencies = [ "scale-info", "sp-api-proc-macro", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-metadata-ir", "sp-runtime", "sp-state-machine", @@ -8436,7 +8485,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "Inflector", "blake2 0.10.6", @@ -8450,7 +8499,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "parity-scale-codec", "scale-info", @@ -8463,7 +8512,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "integer-sqrt", "num-traits", @@ -8474,10 +8523,28 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "sp-ark-bls12-381" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" +dependencies = [ + "ark-bls12-381-ext", + "sp-crypto-ec-utils", +] + +[[package]] +name = "sp-ark-ed-on-bls12-381-bandersnatch" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" +dependencies = [ + "ark-ed-on-bls12-381-bandersnatch-ext", + "sp-crypto-ec-utils", +] + [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "parity-scale-codec", "scale-info", @@ -8490,7 +8557,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "futures", "log", @@ -8508,7 +8575,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "async-trait", "futures", @@ -8523,7 +8590,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "lazy_static", "parity-scale-codec", @@ -8542,7 +8609,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "finality-grandpa", "log", @@ -8560,7 +8627,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "parity-scale-codec", "scale-info", @@ -8572,10 +8639,11 @@ dependencies = [ [[package]] name = "sp-core" version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "array-bytes 6.1.0", "bandersnatch_vrfs", + "bip39", "bitflags 1.3.2", "blake2 0.10.6", "bounded-collections", @@ -8586,6 +8654,7 @@ dependencies = [ "hash-db", "hash256-std-hasher", "impl-serde", + "itertools", "lazy_static", "libsecp256k1", "log", @@ -8602,16 +8671,16 @@ dependencies = [ "secrecy", "serde", "sp-core-hashing 9.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-debug-derive", - "sp-externalities", - "sp-runtime-interface", + "sp-debug-derive 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-storage", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "ss58-registry", "substrate-bip39", "thiserror", - "tiny-bip39", "tracing", + "w3f-bls", "zeroize", ] @@ -8633,7 +8702,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "9.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "blake2b_simd", "byteorder", @@ -8646,17 +8715,38 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "9.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "quote 1.0.33", "sp-core-hashing 9.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "syn 2.0.38", ] +[[package]] +name = "sp-crypto-ec-utils" +version = "0.4.1" +source = "git+https://github.com/paritytech/polkadot-sdk#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" +dependencies = [ + "ark-bls12-377", + "ark-bls12-377-ext", + "ark-bls12-381", + "ark-bls12-381-ext", + "ark-bw6-761", + "ark-bw6-761-ext", + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ed-on-bls12-377-ext", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ed-on-bls12-381-bandersnatch-ext", + "ark-scale", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", +] + [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -8665,7 +8755,17 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" +dependencies = [ + "proc-macro2 1.0.69", + "quote 1.0.33", + "syn 2.0.38", +] + +[[package]] +name = "sp-debug-derive" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "proc-macro2 1.0.69", "quote 1.0.33", @@ -8675,18 +8775,29 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "environmental", "parity-scale-codec", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-storage", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", +] + +[[package]] +name = "sp-externalities" +version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk)", ] [[package]] name = "sp-genesis-builder" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "serde_json", "sp-api", @@ -8697,7 +8808,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -8711,7 +8822,7 @@ dependencies = [ [[package]] name = "sp-io" version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "bytes", "ed25519-dalek", @@ -8721,12 +8832,12 @@ dependencies = [ "rustversion", "secp256k1", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-keystore", - "sp-runtime-interface", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-state-machine", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-tracing", + "sp-tracing 10.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-trie", "tracing", "tracing-core", @@ -8735,7 +8846,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "lazy_static", "sp-core", @@ -8746,19 +8857,19 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.27.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "thiserror", ] [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "thiserror", "zstd 0.12.4", @@ -8767,7 +8878,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "frame-metadata 16.0.0", "parity-scale-codec", @@ -8778,7 +8889,7 @@ dependencies = [ [[package]] name = "sp-mixnet" version = "0.1.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "parity-scale-codec", "scale-info", @@ -8790,7 +8901,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "ckb-merkle-mountain-range 0.5.2", "log", @@ -8799,7 +8910,7 @@ dependencies = [ "serde", "sp-api", "sp-core", - "sp-debug-derive", + "sp-debug-derive 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-runtime", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "thiserror", @@ -8808,7 +8919,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "backtrace", "lazy_static", @@ -8818,7 +8929,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "rustc-hash", "serde", @@ -8828,7 +8939,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "either", "hash256-std-hasher", @@ -8850,25 +8961,55 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities", - "sp-runtime-interface-proc-macro", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-runtime-interface-proc-macro 11.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "sp-storage", - "sp-tracing", - "sp-wasm-interface", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-tracing 10.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-runtime-interface-proc-macro 11.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-tracing 10.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "static_assertions", ] [[package]] name = "sp-runtime-interface-proc-macro" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" +dependencies = [ + "Inflector", + "proc-macro-crate", + "proc-macro2 1.0.69", + "quote 1.0.33", + "syn 2.0.38", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "Inflector", "proc-macro-crate", @@ -8880,7 +9021,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "parity-scale-codec", "scale-info", @@ -8895,7 +9036,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8909,7 +9050,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.28.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "hash-db", "log", @@ -8918,7 +9059,7 @@ dependencies = [ "rand 0.8.5", "smallvec", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-panic-handler", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-trie", @@ -8930,7 +9071,7 @@ dependencies = [ [[package]] name = "sp-statement-store" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "aes-gcm 0.10.2", "curve25519-dalek 4.0.0", @@ -8943,9 +9084,9 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-runtime", - "sp-runtime-interface", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "thiserror", "x25519-dalek 2.0.0", @@ -8960,25 +9101,43 @@ checksum = "53458e3c57df53698b3401ec0934bea8e8cfce034816873c0b0abbd83d7bac0d" [[package]] name = "sp-std" version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" + +[[package]] +name = "sp-std" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" [[package]] name = "sp-storage" version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "impl-serde", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive", + "sp-debug-derive 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] +[[package]] +name = "sp-storage" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", +] + [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "async-trait", "parity-scale-codec", @@ -8991,7 +9150,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "parity-scale-codec", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", @@ -9000,10 +9159,22 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "sp-tracing" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" +dependencies = [ + "parity-scale-codec", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "tracing", + "tracing-core", + "tracing-subscriber", +] + [[package]] name = "sp-trie" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "ahash 0.8.3", "hash-db", @@ -9013,6 +9184,7 @@ dependencies = [ "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", + "rand 0.8.5", "scale-info", "schnellru", "sp-core", @@ -9026,7 +9198,7 @@ dependencies = [ [[package]] name = "sp-version" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9043,7 +9215,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "parity-scale-codec", "proc-macro2 1.0.69", @@ -9054,7 +9226,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -9064,10 +9236,23 @@ dependencies = [ "wasmtime", ] +[[package]] +name = "sp-wasm-interface" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "wasmtime", +] + [[package]] name = "sp-weights" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "parity-scale-codec", "scale-info", @@ -9075,7 +9260,7 @@ dependencies = [ "smallvec", "sp-arithmetic", "sp-core", - "sp-debug-derive", + "sp-debug-derive 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] @@ -9135,7 +9320,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staging-xcm" version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "bounded-collections", "derivative", @@ -9152,7 +9337,7 @@ dependencies = [ [[package]] name = "staging-xcm-builder" version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "frame-support", "frame-system", @@ -9174,7 +9359,7 @@ dependencies = [ [[package]] name = "staging-xcm-executor" version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "environmental", "frame-benchmarking", @@ -9182,6 +9367,7 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec", + "scale-info", "sp-arithmetic", "sp-core", "sp-io", @@ -9312,7 +9498,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "hyper", "log", @@ -9354,7 +9540,6 @@ dependencies = [ "relay-bridge-hub-polkadot-client", "relay-bridge-hub-rococo-client", "relay-bridge-hub-westend-client", - "relay-bridge-hub-wococo-client", "relay-kusama-client", "relay-polkadot-bulletin-client", "relay-polkadot-client", @@ -9362,7 +9547,6 @@ dependencies = [ "relay-substrate-client", "relay-utils", "relay-westend-client", - "relay-wococo-client", "rustc-hex", "signal-hook", "signal-hook-async-std", @@ -9389,7 +9573,6 @@ dependencies = [ "bp-relayers", "bp-rococo", "bp-runtime", - "bp-wococo", "bridge-runtime-common", "equivocation-detector", "finality-grandpa", @@ -9410,7 +9593,7 @@ dependencies = [ "parachains-relay", "parity-scale-codec", "relay-bridge-hub-rococo-client", - "relay-bridge-hub-wococo-client", + "relay-bridge-hub-westend-client", "relay-rococo-client", "relay-substrate-client", "relay-utils", @@ -9764,25 +9947,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "tiny-bip39" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861" -dependencies = [ - "anyhow", - "hmac 0.12.1", - "once_cell", - "pbkdf2 0.11.0", - "rand 0.8.5", - "rustc-hash", - "sha2 0.10.7", - "thiserror", - "unicode-normalization", - "wasm-bindgen", - "zeroize", -] - [[package]] name = "tiny-keccak" version = "2.0.2" @@ -10308,6 +10472,30 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "w3f-bls" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7335e4c132c28cc43caef6adb339789e599e39adbe78da0c4d547fad48cbc331" +dependencies = [ + "ark-bls12-377", + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-serialize-derive", + "arrayref", + "constcat", + "digest 0.10.7", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "sha2 0.10.7", + "sha3", + "thiserror", + "zeroize", +] + [[package]] name = "waitgroup" version = "0.1.2" @@ -11277,7 +11465,7 @@ dependencies = [ [[package]] name = "xcm-procedural" version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#1cf7d3aafa0e7edaa20d34581e0f1656895cb9c2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=master#ae1bdcfb91a26c5f65c5ca534aa8a04523ca2277" dependencies = [ "Inflector", "proc-macro2 1.0.69", diff --git a/Cargo.toml b/Cargo.toml index 6b42f4b9eb8..5225e6fbf9d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,19 +19,16 @@ members = [ "primitives/beefy", "primitives/chain-asset-hub-rococo", "primitives/chain-asset-hub-westend", - "primitives/chain-asset-hub-wococo", "primitives/chain-bridge-hub-cumulus", "primitives/chain-bridge-hub-kusama", "primitives/chain-bridge-hub-polkadot", "primitives/chain-bridge-hub-rococo", "primitives/chain-bridge-hub-westend", - "primitives/chain-bridge-hub-wococo", "primitives/chain-kusama", "primitives/chain-polkadot", "primitives/chain-polkadot-bulletin", "primitives/chain-rococo", "primitives/chain-westend", - "primitives/chain-wococo", "primitives/header-chain", "primitives/messages", "primitives/parachains", @@ -45,14 +42,12 @@ members = [ "relays/client-bridge-hub-polkadot", "relays/client-bridge-hub-rococo", "relays/client-bridge-hub-westend", - "relays/client-bridge-hub-wococo", "relays/client-kusama", "relays/client-polkadot", "relays/client-polkadot-bulletin", "relays/client-rococo", "relays/client-substrate", "relays/client-westend", - "relays/client-wococo", "relays/equivocation", "relays/finality", "relays/lib-substrate-relay", diff --git a/modules/beefy/src/mock.rs b/modules/beefy/src/mock.rs index 3c1c31cb5ca..9d586aaa2f7 100644 --- a/modules/beefy/src/mock.rs +++ b/modules/beefy/src/mock.rs @@ -24,12 +24,12 @@ use crate::{ use bp_beefy::{BeefyValidatorSignatureOf, ChainWithBeefy, Commitment, MmrDataOrHash}; use bp_runtime::{BasicOperatingMode, Chain, ChainId}; use codec::Encode; -use frame_support::{construct_runtime, parameter_types, traits::ConstU64, weights::Weight}; +use frame_support::{construct_runtime, derive_impl, weights::Weight}; use sp_core::{sr25519::Signature, Pair}; use sp_runtime::{ testing::{Header, H256}, - traits::{BlakeTwo256, Hash, IdentityLookup}, - Perbill, StateVersion, + traits::{BlakeTwo256, Hash}, + StateVersion, }; pub use sp_consensus_beefy::ecdsa_crypto::{AuthorityId as BeefyId, Pair as BeefyPair}; @@ -67,36 +67,9 @@ construct_runtime! { } } -parameter_types! { - pub const MaximumBlockWeight: Weight = Weight::from_parts(1024, 0); - pub const MaximumBlockLength: u32 = 2 * 1024; - pub const AvailableBlockRatio: Perbill = Perbill::one(); -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for TestRuntime { - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; type Block = Block; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = TestAccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = (); - type BlockHashCount = ConstU64<250>; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = (); - type OnNewAccount = (); - type OnKilledAccount = (); - type BaseCallFilter = frame_support::traits::Everything; - type SystemWeightInfo = (); - type DbWeight = (); - type BlockWeights = (); - type BlockLength = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; } impl beefy::Config for TestRuntime { diff --git a/modules/grandpa/src/mock.rs b/modules/grandpa/src/mock.rs index 7d94898c304..17518305dd9 100644 --- a/modules/grandpa/src/mock.rs +++ b/modules/grandpa/src/mock.rs @@ -20,16 +20,10 @@ use bp_header_chain::ChainWithGrandpa; use bp_runtime::{Chain, ChainId}; use frame_support::{ - construct_runtime, parameter_types, - traits::{ConstU32, ConstU64, Hooks}, - weights::Weight, + construct_runtime, derive_impl, parameter_types, traits::Hooks, weights::Weight, }; use sp_core::sr25519::Signature; -use sp_runtime::{ - testing::H256, - traits::{BlakeTwo256, IdentityLookup}, - Perbill, StateVersion, -}; +use sp_runtime::StateVersion; pub type AccountId = u64; pub type TestHeader = sp_runtime::testing::Header; @@ -49,43 +43,14 @@ construct_runtime! { } } -parameter_types! { - pub const MaximumBlockWeight: Weight = Weight::from_parts(1024, 0); - pub const MaximumBlockLength: u32 = 2 * 1024; - pub const AvailableBlockRatio: Perbill = Perbill::one(); -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for TestRuntime { - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = AccountId; - type Lookup = IdentityLookup; type Block = Block; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = ConstU64<250>; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = (); - type OnNewAccount = (); - type OnKilledAccount = (); - type BaseCallFilter = frame_support::traits::Everything; - type SystemWeightInfo = (); - type DbWeight = (); - type BlockWeights = (); - type BlockLength = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = ConstU32<16>; } parameter_types! { pub const MaxFreeMandatoryHeadersPerBlock: u32 = 2; pub const HeadersToKeep: u32 = 5; - pub const SessionLength: u64 = 5; - pub const NumValidators: u32 = 5; } impl grandpa::Config for TestRuntime { diff --git a/modules/messages/Cargo.toml b/modules/messages/Cargo.toml index e03326b3b0b..a86b2fbfdca 100644 --- a/modules/messages/Cargo.toml +++ b/modules/messages/Cargo.toml @@ -23,7 +23,6 @@ bp-runtime = { path = "../../primitives/runtime", default-features = false } frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false, optional = true } frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } sp-trie = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false, optional = true } @@ -49,7 +48,6 @@ std = [ "log/std", "num-traits/std", "scale-info/std", - "sp-core/std", "sp-runtime/std", "sp-std/std", "sp-trie/std", diff --git a/modules/messages/src/tests/mock.rs b/modules/messages/src/tests/mock.rs index 1392039656d..36c5b74c75f 100644 --- a/modules/messages/src/tests/mock.rs +++ b/modules/messages/src/tests/mock.rs @@ -42,16 +42,14 @@ use bp_runtime::{ }; use codec::{Decode, Encode}; use frame_support::{ - parameter_types, - traits::ConstU64, + derive_impl, weights::{constants::RocksDbWeight, Weight}, }; use scale_info::TypeInfo; -use sp_core::H256; use sp_runtime::{ - testing::Header as SubstrateHeader, - traits::{BlakeTwo256, ConstU32, IdentityLookup}, - BuildStorage, Perbill, StateVersion, + testing::{Header as SubstrateHeader, H256}, + traits::{BlakeTwo256, ConstU32}, + BuildStorage, StateVersion, }; use std::{collections::VecDeque, ops::RangeInclusive}; @@ -161,55 +159,19 @@ frame_support::construct_runtime! { } } -parameter_types! { - pub const BlockHashCount: u64 = 250; - pub const MaximumBlockWeight: Weight = Weight::from_parts(1024, 0); - pub const MaximumBlockLength: u32 = 2 * 1024; - pub const AvailableBlockRatio: Perbill = Perbill::one(); -} - pub type DbWeight = RocksDbWeight; +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for TestRuntime { - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = AccountId; - type Lookup = IdentityLookup; type Block = Block; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = ConstU64<250>; - type Version = (); - type PalletInfo = PalletInfo; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type BaseCallFilter = frame_support::traits::Everything; - type SystemWeightInfo = (); - type BlockWeights = (); - type BlockLength = (); type DbWeight = DbWeight; - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for TestRuntime { - type MaxLocks = (); - type Balance = Balance; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ConstU64<1>; - type AccountStore = frame_system::Pallet; - type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type RuntimeHoldReason = RuntimeHoldReason; - type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; - type MaxFreezes = ConstU32<0>; + type ReserveIdentifier = [u8; 8]; + type AccountStore = System; } impl pallet_bridge_grandpa::Config for TestRuntime { diff --git a/modules/parachains/src/mock.rs b/modules/parachains/src/mock.rs index 933826bcbfc..efc02d7508e 100644 --- a/modules/parachains/src/mock.rs +++ b/modules/parachains/src/mock.rs @@ -17,17 +17,18 @@ use bp_header_chain::ChainWithGrandpa; use bp_polkadot_core::parachains::ParaId; use bp_runtime::{Chain, ChainId, Parachain}; -use frame_support::{construct_runtime, parameter_types, traits::ConstU32, weights::Weight}; +use frame_support::{ + construct_runtime, derive_impl, parameter_types, traits::ConstU32, weights::Weight, +}; use sp_runtime::{ testing::H256, - traits::{BlakeTwo256, Header as HeaderT, IdentityLookup}, - MultiSignature, Perbill, StateVersion, + traits::{BlakeTwo256, Header as HeaderT}, + MultiSignature, StateVersion, }; use crate as pallet_bridge_parachains; pub type AccountId = u64; -pub type TestNumber = u64; pub type RelayBlockHeader = sp_runtime::generic::Header; @@ -168,42 +169,12 @@ construct_runtime! { } } -parameter_types! { - pub const BlockHashCount: TestNumber = 250; - pub const MaximumBlockWeight: Weight = Weight::from_parts(1024, 0); - pub const MaximumBlockLength: u32 = 2 * 1024; - pub const AvailableBlockRatio: Perbill = Perbill::one(); -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for TestRuntime { - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; type Block = Block; - type Hash = H256; - type Hashing = RegularParachainHasher; - type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = (); - type OnNewAccount = (); - type OnKilledAccount = (); - type BaseCallFilter = frame_support::traits::Everything; - type SystemWeightInfo = (); - type DbWeight = (); - type BlockWeights = (); - type BlockLength = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = ConstU32<16>; } parameter_types! { - pub const SessionLength: u64 = 5; - pub const NumValidators: u32 = 5; pub const HeadersToKeep: u32 = 5; } diff --git a/modules/relayers/Cargo.toml b/modules/relayers/Cargo.toml index 6078ed2fc4f..3bb58b6171b 100644 --- a/modules/relayers/Cargo.toml +++ b/modules/relayers/Cargo.toml @@ -37,7 +37,6 @@ bp-polkadot-core = { path = "../../primitives/polkadot-core" } bp-test-utils = { path = "../../primitives/test-utils" } pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } [features] diff --git a/modules/relayers/src/mock.rs b/modules/relayers/src/mock.rs index 9f407fa49ee..46d0e742266 100644 --- a/modules/relayers/src/mock.rs +++ b/modules/relayers/src/mock.rs @@ -30,14 +30,14 @@ use bp_relayers::{ use bp_runtime::{messages::MessageDispatchResult, Chain, ChainId, Parachain}; use codec::Encode; use frame_support::{ - parameter_types, + derive_impl, parameter_types, traits::fungible::Mutate, weights::{ConstantMultiplier, IdentityFee, RuntimeDbWeight, Weight}, }; use pallet_transaction_payment::Multiplier; -use sp_core::{ConstU64, ConstU8, H256}; use sp_runtime::{ - traits::{BlakeTwo256, ConstU32, IdentityLookup}, + testing::H256, + traits::{BlakeTwo256, ConstU32, ConstU64, ConstU8}, transaction_validity::TransactionPriority, BuildStorage, FixedPointNumber, Perquintill, StateVersion, }; @@ -202,30 +202,12 @@ parameter_types! { pub PriorityBoostForActiveLaneRelayer: TransactionPriority = 1; } +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for TestRuntime { - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; type Block = ThisChainBlock; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = ThisChainAccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = frame_support::traits::ConstU32<250>; - type Version = (); - type PalletInfo = PalletInfo; + type BlockHashCount = ConstU32<256>; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type BaseCallFilter = frame_support::traits::Everything; - type SystemWeightInfo = (); - type BlockWeights = (); - type BlockLength = (); type DbWeight = DbWeight; - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; } impl pallet_utility::Config for TestRuntime { @@ -235,20 +217,10 @@ impl pallet_utility::Config for TestRuntime { type WeightInfo = (); } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for TestRuntime { - type MaxLocks = (); - type Balance = ThisChainBalance; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = frame_system::Pallet; - type WeightInfo = (); - type MaxReserves = ConstU32<1>; type ReserveIdentifier = [u8; 8]; - type RuntimeHoldReason = RuntimeHoldReason; - type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; - type MaxFreezes = ConstU32<0>; + type AccountStore = System; } impl pallet_transaction_payment::Config for TestRuntime { diff --git a/modules/xcm-bridge-hub-router/src/mock.rs b/modules/xcm-bridge-hub-router/src/mock.rs index fdd14e0d6bc..a83baee0702 100644 --- a/modules/xcm-bridge-hub-router/src/mock.rs +++ b/modules/xcm-bridge-hub-router/src/mock.rs @@ -19,16 +19,11 @@ use crate as pallet_xcm_bridge_hub_router; use bp_xcm_bridge_hub::{BridgeId, LocalXcmChannelManager}; -use frame_support::{construct_runtime, parameter_types}; -use sp_core::H256; -use sp_runtime::{ - traits::{BlakeTwo256, ConstU128, IdentityLookup}, - BuildStorage, -}; +use frame_support::{construct_runtime, derive_impl, parameter_types}; +use sp_runtime::{traits::ConstU128, BuildStorage}; use xcm::prelude::*; use xcm_builder::{NetworkExportTable, NetworkExportTableItem}; -pub type AccountId = u64; type Block = frame_system::mocking::MockBlock; /// HRMP fee. @@ -63,30 +58,9 @@ parameter_types! { ]; } +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for TestRuntime { - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; type Block = Block; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = frame_support::traits::ConstU64<250>; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = (); - type OnNewAccount = (); - type OnKilledAccount = (); - type BaseCallFilter = frame_support::traits::Everything; - type SystemWeightInfo = (); - type BlockWeights = (); - type BlockLength = (); - type DbWeight = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; } impl pallet_xcm_bridge_hub_router::Config<()> for TestRuntime { diff --git a/modules/xcm-bridge-hub/src/mock.rs b/modules/xcm-bridge-hub/src/mock.rs index fc624903bcd..5c942229866 100644 --- a/modules/xcm-bridge-hub/src/mock.rs +++ b/modules/xcm-bridge-hub/src/mock.rs @@ -26,7 +26,7 @@ use bp_runtime::{messages::MessageDispatchResult, Chain, ChainId}; use bp_xcm_bridge_hub::{BridgeId, LocalXcmChannelManager}; use codec::Encode; use frame_support::{ - parameter_types, + derive_impl, parameter_types, traits::{EnsureOrigin, OriginTrait}, weights::RuntimeDbWeight, }; @@ -34,7 +34,7 @@ use polkadot_parachain_primitives::primitives::Sibling; use sp_core::H256; use sp_runtime::{ testing::Header as SubstrateHeader, - traits::{BlakeTwo256, ConstU32, IdentityLookup}, + traits::{BlakeTwo256, IdentityLookup}, AccountId32, BuildStorage, StateVersion, }; use xcm::prelude::*; @@ -63,46 +63,17 @@ parameter_types! { pub const ExistentialDeposit: Balance = 1; } +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for TestRuntime { - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type Block = Block; - type Hash = H256; - type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = frame_support::traits::ConstU64<250>; - type Version = (); - type PalletInfo = PalletInfo; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type BaseCallFilter = frame_support::traits::Everything; - type SystemWeightInfo = (); - type BlockWeights = (); - type BlockLength = (); - type DbWeight = DbWeight; - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type Block = Block; + type Lookup = IdentityLookup; } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for TestRuntime { - type MaxLocks = (); - type Balance = Balance; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = frame_system::Pallet; - type WeightInfo = (); - type MaxReserves = ConstU32<1>; - type ReserveIdentifier = [u8; 8]; - type RuntimeHoldReason = RuntimeHoldReason; - type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; - type MaxFreezes = ConstU32<0>; + type AccountStore = System; } impl pallet_bridge_messages::Config for TestRuntime { diff --git a/primitives/chain-asset-hub-rococo/src/lib.rs b/primitives/chain-asset-hub-rococo/src/lib.rs index 6216b24d75c..de2e9ae856d 100644 --- a/primitives/chain-asset-hub-rococo/src/lib.rs +++ b/primitives/chain-asset-hub-rococo/src/lib.rs @@ -34,9 +34,6 @@ pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall; #[allow(clippy::large_enum_variant)] #[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)] pub enum Call { - /// `ToWococoXcmRouter` bridge pallet. - #[codec(index = 43)] - ToWococoXcmRouter(XcmBridgeHubRouterCall), /// `ToWestendXcmRouter` bridge pallet. #[codec(index = 45)] ToWestendXcmRouter(XcmBridgeHubRouterCall), diff --git a/primitives/chain-asset-hub-wococo/Cargo.toml b/primitives/chain-asset-hub-wococo/Cargo.toml deleted file mode 100644 index d56205c3a12..00000000000 --- a/primitives/chain-asset-hub-wococo/Cargo.toml +++ /dev/null @@ -1,26 +0,0 @@ -[package] -name = "bp-asset-hub-wococo" -description = "Primitives of AssetHubWococo parachain runtime." -version = "0.1.0" -authors.workspace = true -edition.workspace = true -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" - -[dependencies] -codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } -scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } - -# Substrate Dependencies -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } - -# Bridge Dependencies -bp-xcm-bridge-hub-router = { path = "../xcm-bridge-hub-router", default-features = false } - -[features] -default = [ "std" ] -std = [ - "bp-xcm-bridge-hub-router/std", - "codec/std", - "frame-support/std", - "scale-info/std", -] diff --git a/primitives/chain-asset-hub-wococo/src/lib.rs b/primitives/chain-asset-hub-wococo/src/lib.rs deleted file mode 100644 index c04eb04cce7..00000000000 --- a/primitives/chain-asset-hub-wococo/src/lib.rs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Parity Bridges Common. - -// Parity Bridges Common is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity Bridges Common is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity Bridges Common. If not, see . - -//! Module with configuration which reflects AssetHubWococo runtime setup. - -#![cfg_attr(not(feature = "std"), no_std)] - -use codec::{Decode, Encode}; -use scale_info::TypeInfo; - -pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall; - -/// `AssetHubWococo` Runtime `Call` enum. -/// -/// The enum represents a subset of possible `Call`s we can send to `AssetHubWococo` chain. -/// Ideally this code would be auto-generated from metadata, because we want to -/// avoid depending directly on the ENTIRE runtime just to get the encoding of `Dispatchable`s. -/// -/// All entries here (like pretty much in the entire file) must be kept in sync with -/// `AssetHubWococo` `construct_runtime`, so that we maintain SCALE-compatibility. -#[allow(clippy::large_enum_variant)] -#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)] -pub enum Call { - /// `ToRococoXcmRouter` bridge pallet. - #[codec(index = 44)] - ToRococoXcmRouter(XcmBridgeHubRouterCall), -} - -frame_support::parameter_types! { - /// Some sane weight to execute `xcm::Transact(pallet-xcm-bridge-hub-router::Call::report_bridge_status)`. - pub const XcmBridgeHubRouterTransactCallMaxWeight: frame_support::weights::Weight = frame_support::weights::Weight::from_parts(200_000_000, 6144); -} - -/// Identifier of AssetHubWococo in the Wococo relay chain. -pub const ASSET_HUB_WOCOCO_PARACHAIN_ID: u32 = 1000; diff --git a/primitives/chain-bridge-hub-kusama/Cargo.toml b/primitives/chain-bridge-hub-kusama/Cargo.toml index d9fc32524c0..2d6b5ba424e 100644 --- a/primitives/chain-bridge-hub-kusama/Cargo.toml +++ b/primitives/chain-bridge-hub-kusama/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bp-bridge-hub-kusama" -description = "Primitives of BridgeHubRococo parachain runtime." +description = "Primitives of BridgeHubKusama parachain runtime." version = "0.1.0" authors.workspace = true edition.workspace = true diff --git a/primitives/chain-bridge-hub-polkadot/Cargo.toml b/primitives/chain-bridge-hub-polkadot/Cargo.toml index 5e3516136c8..a4a116f0ce9 100644 --- a/primitives/chain-bridge-hub-polkadot/Cargo.toml +++ b/primitives/chain-bridge-hub-polkadot/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bp-bridge-hub-polkadot" -description = "Primitives of BridgeHubWococo parachain runtime." +description = "Primitives of BridgeHubPolkadot parachain runtime." version = "0.1.0" authors.workspace = true edition.workspace = true diff --git a/primitives/chain-bridge-hub-rococo/src/lib.rs b/primitives/chain-bridge-hub-rococo/src/lib.rs index 417bc9cd48a..d1b0fbfcb4d 100644 --- a/primitives/chain-bridge-hub-rococo/src/lib.rs +++ b/primitives/chain-bridge-hub-rococo/src/lib.rs @@ -89,9 +89,6 @@ pub const WITH_BRIDGE_HUB_ROCOCO_MESSAGES_PALLET_NAME: &str = "BridgeRococoMessa /// chains. pub const WITH_BRIDGE_HUB_ROCOCO_RELAYERS_PALLET_NAME: &str = "BridgeRelayers"; -/// Pallet index of `BridgeWococoMessages: pallet_bridge_messages::`. -pub const WITH_BRIDGE_ROCOCO_TO_WOCOCO_MESSAGES_PALLET_INDEX: u8 = 46; - /// Pallet index of `BridgeWestendMessages: pallet_bridge_messages::`. pub const WITH_BRIDGE_ROCOCO_TO_WESTEND_MESSAGES_PALLET_INDEX: u8 = 51; diff --git a/primitives/chain-bridge-hub-wococo/Cargo.toml b/primitives/chain-bridge-hub-wococo/Cargo.toml deleted file mode 100644 index 28536dce1f7..00000000000 --- a/primitives/chain-bridge-hub-wococo/Cargo.toml +++ /dev/null @@ -1,34 +0,0 @@ -[package] -name = "bp-bridge-hub-wococo" -description = "Primitives of BridgeHubWococo parachain runtime." -version = "0.1.0" -authors.workspace = true -edition.workspace = true -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" - -[dependencies] - -# Bridge Dependencies - -bp-bridge-hub-cumulus = { path = "../chain-bridge-hub-cumulus", default-features = false } -bp-runtime = { path = "../../primitives/runtime", default-features = false } -bp-messages = { path = "../../primitives/messages", default-features = false } - -# Substrate Based Dependencies - -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } - -[features] -default = [ "std" ] -std = [ - "bp-bridge-hub-cumulus/std", - "bp-messages/std", - "bp-runtime/std", - "frame-support/std", - "sp-api/std", - "sp-runtime/std", - "sp-std/std", -] diff --git a/primitives/chain-bridge-hub-wococo/src/lib.rs b/primitives/chain-bridge-hub-wococo/src/lib.rs deleted file mode 100644 index 40fe6548810..00000000000 --- a/primitives/chain-bridge-hub-wococo/src/lib.rs +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Parity Bridges Common. - -// Parity Bridges Common is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity Bridges Common is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity Bridges Common. If not, see . - -//! Module with configuration which reflects BridgeHubWococo runtime setup -//! (AccountId, Headers, Hashes...) - -#![warn(missing_docs)] -#![cfg_attr(not(feature = "std"), no_std)] - -pub use bp_bridge_hub_cumulus::*; -use bp_messages::*; -use bp_runtime::{ - decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Parachain, -}; -use frame_support::dispatch::DispatchClass; -use sp_runtime::{RuntimeDebug, StateVersion}; - -/// BridgeHubWococo parachain. -#[derive(RuntimeDebug)] -pub struct BridgeHubWococo; - -impl Chain for BridgeHubWococo { - const ID: ChainId = *b"bhwo"; - - type BlockNumber = BlockNumber; - type Hash = Hash; - type Hasher = Hasher; - type Header = Header; - - type AccountId = AccountId; - type Balance = Balance; - type Nonce = Nonce; - type Signature = Signature; - - const STATE_VERSION: StateVersion = StateVersion::V1; - - fn max_extrinsic_size() -> u32 { - *BlockLength::get().max.get(DispatchClass::Normal) - } - - fn max_extrinsic_weight() -> Weight { - BlockWeights::get() - .get(DispatchClass::Normal) - .max_extrinsic - .unwrap_or(Weight::MAX) - } -} - -impl Parachain for BridgeHubWococo { - const PARACHAIN_ID: u32 = BRIDGE_HUB_WOCOCO_PARACHAIN_ID; -} - -impl ChainWithMessages for BridgeHubWococo { - const WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str = - WITH_BRIDGE_HUB_WOCOCO_MESSAGES_PALLET_NAME; - - const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = - MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX; - const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = - MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; -} - -/// Identifier of BridgeHubWococo in the Wococo relay chain. -pub const BRIDGE_HUB_WOCOCO_PARACHAIN_ID: u32 = 1014; - -/// Name of the With-BridgeHubWococo messages pallet instance that is deployed at bridged chains. -pub const WITH_BRIDGE_HUB_WOCOCO_MESSAGES_PALLET_NAME: &str = "BridgeWococoMessages"; - -/// Name of the With-BridgeHubWococo bridge-relayers pallet instance that is deployed at bridged -/// chains. -pub const WITH_BRIDGE_HUB_WOCOCO_RELAYERS_PALLET_NAME: &str = "BridgeRelayers"; - -/// Pallet index of `BridgeRococoMessages: pallet_bridge_messages::`. -pub const WITH_BRIDGE_WOCOCO_TO_ROCOCO_MESSAGES_PALLET_INDEX: u8 = 45; - -decl_bridge_finality_runtime_apis!(bridge_hub_wococo); -decl_bridge_messages_runtime_apis!(bridge_hub_wococo); - -frame_support::parameter_types! { - /// The XCM fee that is paid for executing XCM program (with `ExportMessage` instruction) at the Wococo - /// BridgeHub. - /// (initially was calculated by test `BridgeHubWococo::can_calculate_weight_for_paid_export_message_with_reserve_transfer` + `33%`) - pub const BridgeHubWococoBaseXcmFeeInWocs: u128 = 1624803349; - - /// Transaction fee that is paid at the Wococo BridgeHub for delivering single inbound message. - /// (initially was calculated by test `BridgeHubWococo::can_calculate_fee_for_complex_message_delivery_transaction` + `33%`) - pub const BridgeHubWococoBaseDeliveryFeeInWocs: u128 = 6417262881; - - /// Transaction fee that is paid at the Wococo BridgeHub for delivering single outbound message confirmation. - /// (initially was calculated by test `BridgeHubWococo::can_calculate_fee_for_complex_message_confirmation_transaction` + `33%`) - pub const BridgeHubWococoBaseConfirmationFeeInWocs: u128 = 6159996668; -} diff --git a/primitives/chain-wococo/Cargo.toml b/primitives/chain-wococo/Cargo.toml deleted file mode 100644 index 5937b87769c..00000000000 --- a/primitives/chain-wococo/Cargo.toml +++ /dev/null @@ -1,35 +0,0 @@ -[package] -name = "bp-wococo" -description = "Primitives of Wococo runtime." -version = "0.1.0" -authors.workspace = true -edition.workspace = true -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" - -[dependencies] - -# Bridge Dependencies - -bp-header-chain = { path = "../header-chain", default-features = false } -bp-polkadot-core = { path = "../polkadot-core", default-features = false } -bp-runtime = { path = "../runtime", default-features = false } -bp-rococo = { path = "../chain-rococo", default-features = false } - -# Substrate Based Dependencies - -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } - -[features] -default = [ "std" ] -std = [ - "bp-header-chain/std", - "bp-polkadot-core/std", - "bp-rococo/std", - "bp-runtime/std", - "frame-support/std", - "sp-api/std", - "sp-std/std", -] diff --git a/primitives/chain-wococo/src/lib.rs b/primitives/chain-wococo/src/lib.rs deleted file mode 100644 index c709736100a..00000000000 --- a/primitives/chain-wococo/src/lib.rs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Parity Bridges Common. - -// Parity Bridges Common is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity Bridges Common is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity Bridges Common. If not, see . - -//! Primitives of the Rococo chain. - -#![warn(missing_docs)] -#![cfg_attr(not(feature = "std"), no_std)] - -pub use bp_polkadot_core::*; -pub use bp_rococo::{ - MAX_AUTHORITIES_COUNT, MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE, PARAS_PALLET_NAME, -}; - -use bp_header_chain::ChainWithGrandpa; -use bp_runtime::{decl_bridge_finality_runtime_apis, Chain, ChainId}; -use frame_support::weights::Weight; -use sp_runtime::StateVersion; - -/// Wococo Chain -pub struct Wococo; - -impl Chain for Wococo { - const ID: ChainId = *b"woco"; - - type BlockNumber = BlockNumber; - type Hash = Hash; - type Hasher = Hasher; - type Header = Header; - - type AccountId = AccountId; - type Balance = Balance; - type Nonce = Nonce; - type Signature = Signature; - - const STATE_VERSION: StateVersion = StateVersion::V1; - - fn max_extrinsic_size() -> u32 { - max_extrinsic_size() - } - - fn max_extrinsic_weight() -> Weight { - max_extrinsic_weight() - } -} - -impl ChainWithGrandpa for Wococo { - const WITH_CHAIN_GRANDPA_PALLET_NAME: &'static str = WITH_WOCOCO_GRANDPA_PALLET_NAME; - const MAX_AUTHORITIES_COUNT: u32 = MAX_AUTHORITIES_COUNT; - const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 = - REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY; - const MAX_HEADER_SIZE: u32 = MAX_HEADER_SIZE; - const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = AVERAGE_HEADER_SIZE_IN_JUSTIFICATION; -} - -// The SignedExtension used by Wococo. -pub use bp_rococo::CommonSignedExtension as SignedExtension; - -/// Name of the With-Wococo GRANDPA pallet instance that is deployed at bridged chains. -pub const WITH_WOCOCO_GRANDPA_PALLET_NAME: &str = "BridgeWococoGrandpa"; - -decl_bridge_finality_runtime_apis!(wococo, grandpa); diff --git a/primitives/relayers/src/lib.rs b/primitives/relayers/src/lib.rs index 837cb4da974..0089afe3c43 100644 --- a/primitives/relayers/src/lib.rs +++ b/primitives/relayers/src/lib.rs @@ -128,7 +128,7 @@ where impl PaymentProcedure for PayRewardFromAccount where T: frame_support::traits::fungible::Mutate, - Relayer: Decode + Encode, + Relayer: Decode + Encode + Eq, { type Error = sp_runtime::DispatchError; diff --git a/primitives/runtime/src/extensions.rs b/primitives/runtime/src/extensions.rs index 63c244c5863..d896bc92eff 100644 --- a/primitives/runtime/src/extensions.rs +++ b/primitives/runtime/src/extensions.rs @@ -88,7 +88,7 @@ pub type BridgeRejectObsoleteHeadersAndMessages = GenericSignedExtensionSchema<( /// wildcard/placeholder, which relies on the scale encoding for `()` or `((), ())`, or `((), (), /// ())` is the same. So runtime can contains any kind of tuple: /// `(BridgeRefundBridgeHubRococoMessages)` -/// `(BridgeRefundBridgeHubRococoMessages, BridgeRefundBridgeHubWococoMessages)` +/// `(BridgeRefundBridgeHubRococoMessages, BridgeRefundBridgeHubWestendMessages)` /// `(BridgeRefundParachainMessages1, ..., BridgeRefundParachainMessagesN)` pub type RefundBridgedParachainMessagesSchema = GenericSignedExtensionSchema<(), ()>; diff --git a/relays/bin-substrate/Cargo.toml b/relays/bin-substrate/Cargo.toml index 30bbe7864d8..51155cb651d 100644 --- a/relays/bin-substrate/Cargo.toml +++ b/relays/bin-substrate/Cargo.toml @@ -38,7 +38,6 @@ relay-bridge-hub-kusama-client = { path = "../client-bridge-hub-kusama" } relay-bridge-hub-polkadot-client = { path = "../client-bridge-hub-polkadot" } relay-bridge-hub-rococo-client = { path = "../client-bridge-hub-rococo" } relay-bridge-hub-westend-client = { path = "../client-bridge-hub-westend" } -relay-bridge-hub-wococo-client = { path = "../client-bridge-hub-wococo" } relay-kusama-client = { path = "../client-kusama" } relay-polkadot-client = { path = "../client-polkadot" } relay-polkadot-bulletin-client = { path = "../client-polkadot-bulletin" } @@ -46,7 +45,6 @@ relay-rococo-client = { path = "../client-rococo" } relay-substrate-client = { path = "../client-substrate" } relay-utils = { path = "../utils" } relay-westend-client = { path = "../client-westend" } -relay-wococo-client = { path = "../client-wococo" } substrate-relay-helper = { path = "../lib-substrate-relay" } # Substrate Dependencies diff --git a/relays/bin-substrate/src/bridges/mod.rs b/relays/bin-substrate/src/bridges/mod.rs index 5a40b80cb93..8dad329cf73 100644 --- a/relays/bin-substrate/src/bridges/mod.rs +++ b/relays/bin-substrate/src/bridges/mod.rs @@ -19,4 +19,3 @@ pub mod kusama_polkadot; pub mod polkadot_bulletin; pub mod rococo_westend; -pub mod rococo_wococo; diff --git a/relays/bin-substrate/src/bridges/rococo_wococo/bridge_hub_rococo_messages_to_bridge_hub_wococo.rs b/relays/bin-substrate/src/bridges/rococo_wococo/bridge_hub_rococo_messages_to_bridge_hub_wococo.rs deleted file mode 100644 index 83e653ebd8d..00000000000 --- a/relays/bin-substrate/src/bridges/rococo_wococo/bridge_hub_rococo_messages_to_bridge_hub_wococo.rs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2022 Parity Technologies (UK) Ltd. -// This file is part of Parity Bridges Common. - -// Parity Bridges Common is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity Bridges Common is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity Bridges Common. If not, see . - -//! BridgeHubRococo-to-BridgeHubWococo messages sync entrypoint. - -use crate::cli::bridge::{CliBridgeBase, MessagesCliBridge}; -use relay_bridge_hub_rococo_client::BridgeHubRococo; -use relay_bridge_hub_wococo_client::BridgeHubWococo; -use substrate_relay_helper::{messages::SubstrateMessageLane, UtilityPalletBatchCallBuilder}; - -pub struct BridgeHubRococoToBridgeHubWococoMessagesCliBridge {} - -impl CliBridgeBase for BridgeHubRococoToBridgeHubWococoMessagesCliBridge { - type Source = BridgeHubRococo; - type Target = BridgeHubWococo; -} - -impl MessagesCliBridge for BridgeHubRococoToBridgeHubWococoMessagesCliBridge { - type MessagesLane = BridgeHubRococoMessagesToBridgeHubWococoMessageLane; -} - -substrate_relay_helper::generate_receive_message_proof_call_builder!( - BridgeHubRococoMessagesToBridgeHubWococoMessageLane, - BridgeHubRococoMessagesToBridgeHubWococoMessageLaneReceiveMessagesProofCallBuilder, - relay_bridge_hub_wococo_client::RuntimeCall::BridgeRococoMessages, - relay_bridge_hub_wococo_client::BridgeMessagesCall::receive_messages_proof -); - -substrate_relay_helper::generate_receive_message_delivery_proof_call_builder!( - BridgeHubRococoMessagesToBridgeHubWococoMessageLane, - BridgeHubRococoMessagesToBridgeHubWococoMessageLaneReceiveMessagesDeliveryProofCallBuilder, - relay_bridge_hub_rococo_client::RuntimeCall::BridgeWococoMessages, - relay_bridge_hub_rococo_client::BridgeMessagesCall::receive_messages_delivery_proof -); - -/// Description of BridgeHubRococo -> BridgeHubWococo messages bridge. -#[derive(Clone, Debug)] -pub struct BridgeHubRococoMessagesToBridgeHubWococoMessageLane; - -impl SubstrateMessageLane for BridgeHubRococoMessagesToBridgeHubWococoMessageLane { - type SourceChain = BridgeHubRococo; - type TargetChain = BridgeHubWococo; - - type ReceiveMessagesProofCallBuilder = - BridgeHubRococoMessagesToBridgeHubWococoMessageLaneReceiveMessagesProofCallBuilder; - type ReceiveMessagesDeliveryProofCallBuilder = - BridgeHubRococoMessagesToBridgeHubWococoMessageLaneReceiveMessagesDeliveryProofCallBuilder; - - type SourceBatchCallBuilder = UtilityPalletBatchCallBuilder; - type TargetBatchCallBuilder = UtilityPalletBatchCallBuilder; -} diff --git a/relays/bin-substrate/src/bridges/rococo_wococo/bridge_hub_wococo_messages_to_bridge_hub_rococo.rs b/relays/bin-substrate/src/bridges/rococo_wococo/bridge_hub_wococo_messages_to_bridge_hub_rococo.rs deleted file mode 100644 index 82e4447e6d2..00000000000 --- a/relays/bin-substrate/src/bridges/rococo_wococo/bridge_hub_wococo_messages_to_bridge_hub_rococo.rs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2022 Parity Technologies (UK) Ltd. -// This file is part of Parity Bridges Common. - -// Parity Bridges Common is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity Bridges Common is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity Bridges Common. If not, see . - -//! BridgeHubWococo-to-BridgeHubRococo messages sync entrypoint. - -use crate::cli::bridge::{CliBridgeBase, MessagesCliBridge}; -use relay_bridge_hub_rococo_client::BridgeHubRococo; -use relay_bridge_hub_wococo_client::BridgeHubWococo; -use substrate_relay_helper::{messages::SubstrateMessageLane, UtilityPalletBatchCallBuilder}; - -pub struct BridgeHubWococoToBridgeHubRococoMessagesCliBridge {} - -impl CliBridgeBase for BridgeHubWococoToBridgeHubRococoMessagesCliBridge { - type Source = BridgeHubWococo; - type Target = BridgeHubRococo; -} - -impl MessagesCliBridge for BridgeHubWococoToBridgeHubRococoMessagesCliBridge { - type MessagesLane = BridgeHubWococoMessagesToBridgeHubRococoMessageLane; -} - -substrate_relay_helper::generate_receive_message_proof_call_builder!( - BridgeHubWococoMessagesToBridgeHubRococoMessageLane, - BridgeHubWococoMessagesToBridgeHubRococoMessageLaneReceiveMessagesProofCallBuilder, - relay_bridge_hub_rococo_client::RuntimeCall::BridgeWococoMessages, - relay_bridge_hub_rococo_client::BridgeMessagesCall::receive_messages_proof -); - -substrate_relay_helper::generate_receive_message_delivery_proof_call_builder!( - BridgeHubWococoMessagesToBridgeHubRococoMessageLane, - BridgeHubWococoMessagesToBridgeHubRococoMessageLaneReceiveMessagesDeliveryProofCallBuilder, - relay_bridge_hub_wococo_client::RuntimeCall::BridgeRococoMessages, - relay_bridge_hub_wococo_client::BridgeMessagesCall::receive_messages_delivery_proof -); - -/// Description of BridgeHubWococo -> BridgeHubRococo messages bridge. -#[derive(Clone, Debug)] -pub struct BridgeHubWococoMessagesToBridgeHubRococoMessageLane; - -impl SubstrateMessageLane for BridgeHubWococoMessagesToBridgeHubRococoMessageLane { - type SourceChain = BridgeHubWococo; - type TargetChain = BridgeHubRococo; - - type ReceiveMessagesProofCallBuilder = - BridgeHubWococoMessagesToBridgeHubRococoMessageLaneReceiveMessagesProofCallBuilder; - type ReceiveMessagesDeliveryProofCallBuilder = - BridgeHubWococoMessagesToBridgeHubRococoMessageLaneReceiveMessagesDeliveryProofCallBuilder; - - type SourceBatchCallBuilder = UtilityPalletBatchCallBuilder; - type TargetBatchCallBuilder = UtilityPalletBatchCallBuilder; -} diff --git a/relays/bin-substrate/src/bridges/rococo_wococo/mod.rs b/relays/bin-substrate/src/bridges/rococo_wococo/mod.rs deleted file mode 100644 index 64330a92252..00000000000 --- a/relays/bin-substrate/src/bridges/rococo_wococo/mod.rs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2019-2021 Parity Technologies (UK) Ltd. -// This file is part of Parity Bridges Common. - -// Parity Bridges Common is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity Bridges Common is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity Bridges Common. If not, see . - -//! Declaration of all bridges between Rococo Bridge Hub and Wococo Bridge Hub. - -pub mod bridge_hub_rococo_messages_to_bridge_hub_wococo; -pub mod bridge_hub_wococo_messages_to_bridge_hub_rococo; -pub mod rococo_headers_to_bridge_hub_wococo; -pub mod rococo_parachains_to_bridge_hub_wococo; -pub mod wococo_headers_to_bridge_hub_rococo; -pub mod wococo_parachains_to_bridge_hub_rococo; diff --git a/relays/bin-substrate/src/bridges/rococo_wococo/rococo_headers_to_bridge_hub_wococo.rs b/relays/bin-substrate/src/bridges/rococo_wococo/rococo_headers_to_bridge_hub_wococo.rs deleted file mode 100644 index b9b9a89ba0f..00000000000 --- a/relays/bin-substrate/src/bridges/rococo_wococo/rococo_headers_to_bridge_hub_wococo.rs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2022 Parity Technologies (UK) Ltd. -// This file is part of Parity Bridges Common. - -// Parity Bridges Common is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity Bridges Common is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity Bridges Common. If not, see . - -//! Rococo-to-Wococo bridge hubs headers sync entrypoint. - -use crate::cli::bridge::{ - CliBridgeBase, RelayToRelayEquivocationDetectionCliBridge, RelayToRelayHeadersCliBridge, -}; - -use async_trait::async_trait; -use substrate_relay_helper::{ - equivocation::SubstrateEquivocationDetectionPipeline, - finality::SubstrateFinalitySyncPipeline, - finality_base::{engine::Grandpa as GrandpaFinalityEngine, SubstrateFinalityPipeline}, -}; - -/// Description of Rococo -> Wococo finalized headers bridge. -#[derive(Clone, Debug)] -pub struct RococoFinalityToBridgeHubWococo; - -substrate_relay_helper::generate_submit_finality_proof_call_builder!( - RococoFinalityToBridgeHubWococo, - SubmitFinalityProofCallBuilder, - relay_bridge_hub_wococo_client::RuntimeCall::BridgeRococoGrandpa, - relay_bridge_hub_wococo_client::BridgeGrandpaCall::submit_finality_proof -); - -substrate_relay_helper::generate_report_equivocation_call_builder!( - RococoFinalityToBridgeHubWococo, - ReportEquivocationCallBuilder, - relay_rococo_client::RuntimeCall::Grandpa, - relay_rococo_client::GrandpaCall::report_equivocation -); - -#[async_trait] -impl SubstrateFinalityPipeline for RococoFinalityToBridgeHubWococo { - type SourceChain = relay_rococo_client::Rococo; - type TargetChain = relay_bridge_hub_wococo_client::BridgeHubWococo; - - type FinalityEngine = GrandpaFinalityEngine; -} - -#[async_trait] -impl SubstrateFinalitySyncPipeline for RococoFinalityToBridgeHubWococo { - type SubmitFinalityProofCallBuilder = SubmitFinalityProofCallBuilder; -} - -#[async_trait] -impl SubstrateEquivocationDetectionPipeline for RococoFinalityToBridgeHubWococo { - type ReportEquivocationCallBuilder = ReportEquivocationCallBuilder; -} - -/// `Rococo` to BridgeHub `Wococo` bridge definition. -pub struct RococoToBridgeHubWococoCliBridge {} - -impl CliBridgeBase for RococoToBridgeHubWococoCliBridge { - type Source = relay_rococo_client::Rococo; - type Target = relay_bridge_hub_wococo_client::BridgeHubWococo; -} - -impl RelayToRelayHeadersCliBridge for RococoToBridgeHubWococoCliBridge { - type Finality = RococoFinalityToBridgeHubWococo; -} - -impl RelayToRelayEquivocationDetectionCliBridge for RococoToBridgeHubWococoCliBridge { - type Equivocation = RococoFinalityToBridgeHubWococo; -} diff --git a/relays/bin-substrate/src/bridges/rococo_wococo/rococo_parachains_to_bridge_hub_wococo.rs b/relays/bin-substrate/src/bridges/rococo_wococo/rococo_parachains_to_bridge_hub_wococo.rs deleted file mode 100644 index b7296e0a38f..00000000000 --- a/relays/bin-substrate/src/bridges/rococo_wococo/rococo_parachains_to_bridge_hub_wococo.rs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2019-2021 Parity Technologies (UK) Ltd. -// This file is part of Parity Bridges Common. - -// Parity Bridges Common is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity Bridges Common is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity Bridges Common. If not, see . - -//! Wococo-to-Rococo parachains sync entrypoint. - -use crate::cli::bridge::{CliBridgeBase, MessagesCliBridge, ParachainToRelayHeadersCliBridge}; -use bp_polkadot_core::parachains::{ParaHash, ParaHeadsProof, ParaId}; -use relay_substrate_client::{CallOf, HeaderIdOf}; -use substrate_relay_helper::parachains::{ - SubmitParachainHeadsCallBuilder, SubstrateParachainsPipeline, -}; - -/// BridgeHub-to-BridgeHub parachain sync description. -#[derive(Clone, Debug)] -pub struct BridgeHubRococoToBridgeHubWococo; - -impl SubstrateParachainsPipeline for BridgeHubRococoToBridgeHubWococo { - type SourceParachain = relay_bridge_hub_rococo_client::BridgeHubRococo; - type SourceRelayChain = relay_rococo_client::Rococo; - type TargetChain = relay_bridge_hub_wococo_client::BridgeHubWococo; - - type SubmitParachainHeadsCallBuilder = BridgeHubRococoToBridgeHubWococoCallBuilder; -} - -pub struct BridgeHubRococoToBridgeHubWococoCallBuilder; -impl SubmitParachainHeadsCallBuilder - for BridgeHubRococoToBridgeHubWococoCallBuilder -{ - fn build_submit_parachain_heads_call( - at_relay_block: HeaderIdOf, - parachains: Vec<(ParaId, ParaHash)>, - parachain_heads_proof: ParaHeadsProof, - ) -> CallOf { - relay_bridge_hub_wococo_client::RuntimeCall::BridgeRococoParachains( - relay_bridge_hub_wococo_client::BridgeParachainCall::submit_parachain_heads { - at_relay_block: (at_relay_block.0, at_relay_block.1), - parachains, - parachain_heads_proof, - }, - ) - } -} - -/// `BridgeHubParachain` to `BridgeHubParachain` bridge definition. -pub struct BridgeHubRococoToBridgeHubWococoCliBridge {} - -impl ParachainToRelayHeadersCliBridge for BridgeHubRococoToBridgeHubWococoCliBridge { - type SourceRelay = relay_rococo_client::Rococo; - type ParachainFinality = BridgeHubRococoToBridgeHubWococo; - type RelayFinality = - crate::bridges::rococo_wococo::rococo_headers_to_bridge_hub_wococo::RococoFinalityToBridgeHubWococo; -} - -impl CliBridgeBase for BridgeHubRococoToBridgeHubWococoCliBridge { - type Source = relay_bridge_hub_rococo_client::BridgeHubRococo; - type Target = relay_bridge_hub_wococo_client::BridgeHubWococo; -} - -impl MessagesCliBridge for BridgeHubRococoToBridgeHubWococoCliBridge { - type MessagesLane = - crate::bridges::rococo_wococo::bridge_hub_rococo_messages_to_bridge_hub_wococo::BridgeHubRococoMessagesToBridgeHubWococoMessageLane; -} diff --git a/relays/bin-substrate/src/bridges/rococo_wococo/wococo_headers_to_bridge_hub_rococo.rs b/relays/bin-substrate/src/bridges/rococo_wococo/wococo_headers_to_bridge_hub_rococo.rs deleted file mode 100644 index c000a2764e2..00000000000 --- a/relays/bin-substrate/src/bridges/rococo_wococo/wococo_headers_to_bridge_hub_rococo.rs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2022 Parity Technologies (UK) Ltd. -// This file is part of Parity Bridges Common. - -// Parity Bridges Common is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity Bridges Common is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity Bridges Common. If not, see . - -//! Wococo-to-Rococo bridge hubs headers sync entrypoint. - -use crate::cli::bridge::{ - CliBridgeBase, RelayToRelayEquivocationDetectionCliBridge, RelayToRelayHeadersCliBridge, -}; - -use async_trait::async_trait; -use substrate_relay_helper::{ - equivocation::SubstrateEquivocationDetectionPipeline, - finality::SubstrateFinalitySyncPipeline, - finality_base::{engine::Grandpa as GrandpaFinalityEngine, SubstrateFinalityPipeline}, -}; - -/// Description of Wococo -> Rococo finalized headers bridge. -#[derive(Clone, Debug)] -pub struct WococoFinalityToBridgeHubRococo; - -substrate_relay_helper::generate_submit_finality_proof_call_builder!( - WococoFinalityToBridgeHubRococo, - SubmitFinalityProofCallBuilder, - relay_bridge_hub_rococo_client::RuntimeCall::BridgeWococoGrandpa, - relay_bridge_hub_rococo_client::BridgeGrandpaCall::submit_finality_proof -); - -substrate_relay_helper::generate_report_equivocation_call_builder!( - WococoFinalityToBridgeHubRococo, - ReportEquivocationCallBuilder, - relay_wococo_client::RuntimeCall::Grandpa, - relay_wococo_client::GrandpaCall::report_equivocation -); - -#[async_trait] -impl SubstrateFinalityPipeline for WococoFinalityToBridgeHubRococo { - type SourceChain = relay_wococo_client::Wococo; - type TargetChain = relay_bridge_hub_rococo_client::BridgeHubRococo; - - type FinalityEngine = GrandpaFinalityEngine; -} - -#[async_trait] -impl SubstrateFinalitySyncPipeline for WococoFinalityToBridgeHubRococo { - type SubmitFinalityProofCallBuilder = SubmitFinalityProofCallBuilder; -} - -#[async_trait] -impl SubstrateEquivocationDetectionPipeline for WococoFinalityToBridgeHubRococo { - type ReportEquivocationCallBuilder = ReportEquivocationCallBuilder; -} - -/// `Wococo` to BridgeHub `Rococo` bridge definition. -pub struct WococoToBridgeHubRococoCliBridge {} - -impl CliBridgeBase for WococoToBridgeHubRococoCliBridge { - type Source = relay_wococo_client::Wococo; - type Target = relay_bridge_hub_rococo_client::BridgeHubRococo; -} - -impl RelayToRelayHeadersCliBridge for WococoToBridgeHubRococoCliBridge { - type Finality = WococoFinalityToBridgeHubRococo; -} - -impl RelayToRelayEquivocationDetectionCliBridge for WococoToBridgeHubRococoCliBridge { - type Equivocation = WococoFinalityToBridgeHubRococo; -} diff --git a/relays/bin-substrate/src/bridges/rococo_wococo/wococo_parachains_to_bridge_hub_rococo.rs b/relays/bin-substrate/src/bridges/rococo_wococo/wococo_parachains_to_bridge_hub_rococo.rs deleted file mode 100644 index 165f4af11c8..00000000000 --- a/relays/bin-substrate/src/bridges/rococo_wococo/wococo_parachains_to_bridge_hub_rococo.rs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2019-2021 Parity Technologies (UK) Ltd. -// This file is part of Parity Bridges Common. - -// Parity Bridges Common is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity Bridges Common is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity Bridges Common. If not, see . - -//! Rococo-to-Wococo parachains sync entrypoint. - -use crate::cli::bridge::{CliBridgeBase, MessagesCliBridge, ParachainToRelayHeadersCliBridge}; -use bp_polkadot_core::parachains::{ParaHash, ParaHeadsProof, ParaId}; -use relay_substrate_client::{CallOf, HeaderIdOf}; -use substrate_relay_helper::parachains::{ - SubmitParachainHeadsCallBuilder, SubstrateParachainsPipeline, -}; - -/// BridgeHub-to-BridgeHub parachain sync description. -#[derive(Clone, Debug)] -pub struct BridgeHubWococoToBridgeHubRococo; - -impl SubstrateParachainsPipeline for BridgeHubWococoToBridgeHubRococo { - type SourceParachain = relay_bridge_hub_wococo_client::BridgeHubWococo; - type SourceRelayChain = relay_wococo_client::Wococo; - type TargetChain = relay_bridge_hub_rococo_client::BridgeHubRococo; - - type SubmitParachainHeadsCallBuilder = BridgeHubWococoToBridgeHubRococoCallBuilder; -} - -pub struct BridgeHubWococoToBridgeHubRococoCallBuilder; -impl SubmitParachainHeadsCallBuilder - for BridgeHubWococoToBridgeHubRococoCallBuilder -{ - fn build_submit_parachain_heads_call( - at_relay_block: HeaderIdOf, - parachains: Vec<(ParaId, ParaHash)>, - parachain_heads_proof: ParaHeadsProof, - ) -> CallOf { - relay_bridge_hub_rococo_client::RuntimeCall::BridgeWococoParachains( - relay_bridge_hub_rococo_client::BridgeParachainCall::submit_parachain_heads { - at_relay_block: (at_relay_block.0, at_relay_block.1), - parachains, - parachain_heads_proof, - }, - ) - } -} - -/// `BridgeHubParachain` to `BridgeHubParachain` bridge definition. -pub struct BridgeHubWococoToBridgeHubRococoCliBridge {} - -impl ParachainToRelayHeadersCliBridge for BridgeHubWococoToBridgeHubRococoCliBridge { - type SourceRelay = relay_wococo_client::Wococo; - type ParachainFinality = BridgeHubWococoToBridgeHubRococo; - type RelayFinality = - crate::bridges::rococo_wococo::wococo_headers_to_bridge_hub_rococo::WococoFinalityToBridgeHubRococo; -} - -impl CliBridgeBase for BridgeHubWococoToBridgeHubRococoCliBridge { - type Source = relay_bridge_hub_wococo_client::BridgeHubWococo; - type Target = relay_bridge_hub_rococo_client::BridgeHubRococo; -} - -impl MessagesCliBridge for BridgeHubWococoToBridgeHubRococoCliBridge { - type MessagesLane = - crate::bridges::rococo_wococo::bridge_hub_wococo_messages_to_bridge_hub_rococo::BridgeHubWococoMessagesToBridgeHubRococoMessageLane; -} diff --git a/relays/bin-substrate/src/chains/mod.rs b/relays/bin-substrate/src/chains/mod.rs index 442236997c8..ab15a9e679c 100644 --- a/relays/bin-substrate/src/chains/mod.rs +++ b/relays/bin-substrate/src/chains/mod.rs @@ -21,4 +21,3 @@ mod polkadot; mod polkadot_bulletin; mod rococo; mod westend; -mod wococo; diff --git a/relays/bin-substrate/src/chains/wococo.rs b/relays/bin-substrate/src/chains/wococo.rs deleted file mode 100644 index c9e3943d808..00000000000 --- a/relays/bin-substrate/src/chains/wococo.rs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2022 Parity Technologies (UK) Ltd. -// This file is part of Parity Bridges Common. - -// Parity Bridges Common is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity Bridges Common is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity Bridges Common. If not, see . - -//! Wococo + Wococo parachains specification for CLI. - -use crate::cli::CliChain; -use relay_bridge_hub_wococo_client::BridgeHubWococo; -use relay_substrate_client::SimpleRuntimeVersion; -use relay_wococo_client::Wococo; - -impl CliChain for Wococo { - const RUNTIME_VERSION: Option = None; -} - -impl CliChain for BridgeHubWococo { - const RUNTIME_VERSION: Option = - Some(SimpleRuntimeVersion { spec_version: 9420, transaction_version: 3 }); -} diff --git a/relays/bin-substrate/src/cli/bridge.rs b/relays/bin-substrate/src/cli/bridge.rs index b903b2d2c90..59311812bd6 100644 --- a/relays/bin-substrate/src/cli/bridge.rs +++ b/relays/bin-substrate/src/cli/bridge.rs @@ -29,8 +29,6 @@ use substrate_relay_helper::{ #[strum(serialize_all = "kebab_case")] /// Supported full bridges (headers + messages). pub enum FullBridge { - BridgeHubRococoToBridgeHubWococo, - BridgeHubWococoToBridgeHubRococo, BridgeHubRococoToBridgeHubWestend, BridgeHubWestendToBridgeHubRococo, BridgeHubKusamaToBridgeHubPolkadot, diff --git a/relays/bin-substrate/src/cli/detect_equivocations.rs b/relays/bin-substrate/src/cli/detect_equivocations.rs index b78fd3a81e4..d5290a33cb4 100644 --- a/relays/bin-substrate/src/cli/detect_equivocations.rs +++ b/relays/bin-substrate/src/cli/detect_equivocations.rs @@ -20,9 +20,9 @@ use crate::{ kusama_headers_to_bridge_hub_polkadot::KusamaToBridgeHubPolkadotCliBridge, polkadot_headers_to_bridge_hub_kusama::PolkadotToBridgeHubKusamaCliBridge, }, - rococo_wococo::{ - rococo_headers_to_bridge_hub_wococo::RococoToBridgeHubWococoCliBridge, - wococo_headers_to_bridge_hub_rococo::WococoToBridgeHubRococoCliBridge, + rococo_westend::{ + rococo_headers_to_bridge_hub_westend::RococoToBridgeHubWestendCliBridge, + westend_headers_to_bridge_hub_rococo::WestendToBridgeHubRococoCliBridge, }, }, cli::{bridge::*, chain_schema::*, PrometheusParams}, @@ -53,10 +53,10 @@ pub struct DetectEquivocations { #[strum(serialize_all = "kebab_case")] /// Equivocations detection bridge. pub enum DetectEquivocationsBridge { - RococoToBridgeHubWococo, - WococoToBridgeHubRococo, KusamaToBridgeHubPolkadot, PolkadotToBridgeHubKusama, + RococoToBridgeHubWestend, + WestendToBridgeHubRococo, } #[async_trait] @@ -82,23 +82,23 @@ where } } -impl EquivocationsDetector for RococoToBridgeHubWococoCliBridge {} -impl EquivocationsDetector for WococoToBridgeHubRococoCliBridge {} impl EquivocationsDetector for KusamaToBridgeHubPolkadotCliBridge {} impl EquivocationsDetector for PolkadotToBridgeHubKusamaCliBridge {} +impl EquivocationsDetector for RococoToBridgeHubWestendCliBridge {} +impl EquivocationsDetector for WestendToBridgeHubRococoCliBridge {} impl DetectEquivocations { /// Run the command. pub async fn run(self) -> anyhow::Result<()> { match self.bridge { - DetectEquivocationsBridge::RococoToBridgeHubWococo => - RococoToBridgeHubWococoCliBridge::start(self), - DetectEquivocationsBridge::WococoToBridgeHubRococo => - WococoToBridgeHubRococoCliBridge::start(self), DetectEquivocationsBridge::KusamaToBridgeHubPolkadot => KusamaToBridgeHubPolkadotCliBridge::start(self), DetectEquivocationsBridge::PolkadotToBridgeHubKusama => PolkadotToBridgeHubKusamaCliBridge::start(self), + DetectEquivocationsBridge::RococoToBridgeHubWestend => + RococoToBridgeHubWestendCliBridge::start(self), + DetectEquivocationsBridge::WestendToBridgeHubRococo => + WestendToBridgeHubRococoCliBridge::start(self), } .await } diff --git a/relays/bin-substrate/src/cli/init_bridge.rs b/relays/bin-substrate/src/cli/init_bridge.rs index 21d95b4bfa0..30875e70cbb 100644 --- a/relays/bin-substrate/src/cli/init_bridge.rs +++ b/relays/bin-substrate/src/cli/init_bridge.rs @@ -31,10 +31,6 @@ use crate::{ rococo_headers_to_bridge_hub_westend::RococoToBridgeHubWestendCliBridge, westend_headers_to_bridge_hub_rococo::WestendToBridgeHubRococoCliBridge, }, - rococo_wococo::{ - rococo_headers_to_bridge_hub_wococo::RococoToBridgeHubWococoCliBridge, - wococo_headers_to_bridge_hub_rococo::WococoToBridgeHubRococoCliBridge, - }, }, cli::{bridge::CliBridgeBase, chain_schema::*}, }; @@ -66,8 +62,6 @@ pub struct InitBridge { #[strum(serialize_all = "kebab_case")] /// Bridge to initialize. pub enum InitBridgeName { - RococoToBridgeHubWococo, - WococoToBridgeHubRococo, KusamaToBridgeHubPolkadot, PolkadotToBridgeHubKusama, PolkadotToPolkadotBulletin, @@ -116,30 +110,6 @@ where } } -impl BridgeInitializer for RococoToBridgeHubWococoCliBridge { - type Engine = GrandpaFinalityEngine; - - fn encode_init_bridge( - init_data: >::InitializationData, - ) -> ::Call { - relay_bridge_hub_wococo_client::RuntimeCall::BridgeRococoGrandpa( - relay_bridge_hub_wococo_client::BridgeGrandpaCall::initialize { init_data }, - ) - } -} - -impl BridgeInitializer for WococoToBridgeHubRococoCliBridge { - type Engine = GrandpaFinalityEngine; - - fn encode_init_bridge( - init_data: >::InitializationData, - ) -> ::Call { - relay_bridge_hub_rococo_client::RuntimeCall::BridgeWococoGrandpa( - relay_bridge_hub_rococo_client::BridgeGrandpaCall::initialize { init_data }, - ) - } -} - impl BridgeInitializer for RococoToBridgeHubWestendCliBridge { type Engine = GrandpaFinalityEngine; @@ -229,10 +199,6 @@ impl InitBridge { /// Run the command. pub async fn run(self) -> anyhow::Result<()> { match self.bridge { - InitBridgeName::RococoToBridgeHubWococo => - RococoToBridgeHubWococoCliBridge::init_bridge(self), - InitBridgeName::WococoToBridgeHubRococo => - WococoToBridgeHubRococoCliBridge::init_bridge(self), InitBridgeName::KusamaToBridgeHubPolkadot => KusamaToBridgeHubPolkadotCliBridge::init_bridge(self), InitBridgeName::PolkadotToBridgeHubKusama => diff --git a/relays/bin-substrate/src/cli/relay_headers.rs b/relays/bin-substrate/src/cli/relay_headers.rs index fd2b55339c7..258e0338f46 100644 --- a/relays/bin-substrate/src/cli/relay_headers.rs +++ b/relays/bin-substrate/src/cli/relay_headers.rs @@ -27,10 +27,6 @@ use crate::bridges::{ polkadot_bulletin_headers_to_bridge_hub_polkadot::PolkadotBulletinToBridgeHubPolkadotCliBridge, polkadot_headers_to_polkadot_bulletin::PolkadotToPolkadotBulletinCliBridge, }, - rococo_wococo::{ - rococo_headers_to_bridge_hub_wococo::RococoToBridgeHubWococoCliBridge, - wococo_headers_to_bridge_hub_rococo::WococoToBridgeHubRococoCliBridge, - }, }; use relay_substrate_client::Client; use relay_utils::metrics::{GlobalMetrics, StandaloneMetric}; @@ -62,8 +58,6 @@ pub struct RelayHeaders { #[strum(serialize_all = "kebab_case")] /// Headers relay bridge. pub enum RelayHeadersBridge { - RococoToBridgeHubWococo, - WococoToBridgeHubRococo, KusamaToBridgeHubPolkadot, PolkadotToBridgeHubKusama, PolkadotToPolkadotBulletin, @@ -101,8 +95,6 @@ trait HeadersRelayer: RelayToRelayHeadersCliBridge { } } -impl HeadersRelayer for RococoToBridgeHubWococoCliBridge {} -impl HeadersRelayer for WococoToBridgeHubRococoCliBridge {} impl HeadersRelayer for KusamaToBridgeHubPolkadotCliBridge {} impl HeadersRelayer for PolkadotToBridgeHubKusamaCliBridge {} impl HeadersRelayer for PolkadotToPolkadotBulletinCliBridge {} @@ -112,10 +104,6 @@ impl RelayHeaders { /// Run the command. pub async fn run(self) -> anyhow::Result<()> { match self.bridge { - RelayHeadersBridge::RococoToBridgeHubWococo => - RococoToBridgeHubWococoCliBridge::relay_headers(self), - RelayHeadersBridge::WococoToBridgeHubRococo => - WococoToBridgeHubRococoCliBridge::relay_headers(self), RelayHeadersBridge::KusamaToBridgeHubPolkadot => KusamaToBridgeHubPolkadotCliBridge::relay_headers(self), RelayHeadersBridge::PolkadotToBridgeHubKusama => diff --git a/relays/bin-substrate/src/cli/relay_headers_and_messages/mod.rs b/relays/bin-substrate/src/cli/relay_headers_and_messages/mod.rs index 64ca6aeecd6..e98f2650376 100644 --- a/relays/bin-substrate/src/cli/relay_headers_and_messages/mod.rs +++ b/relays/bin-substrate/src/cli/relay_headers_and_messages/mod.rs @@ -51,10 +51,6 @@ use crate::{ rococo_parachains_to_bridge_hub_westend::BridgeHubRococoToBridgeHubWestendCliBridge, westend_parachains_to_bridge_hub_rococo::BridgeHubWestendToBridgeHubRococoCliBridge, }, - rococo_wococo::{ - rococo_parachains_to_bridge_hub_wococo::BridgeHubRococoToBridgeHubWococoCliBridge, - wococo_parachains_to_bridge_hub_rococo::BridgeHubWococoToBridgeHubRococoCliBridge, - }, }, cli::{ bridge::{ @@ -196,8 +192,6 @@ where // All supported chains. declare_chain_cli_schema!(Rococo, rococo); declare_chain_cli_schema!(BridgeHubRococo, bridge_hub_rococo); -declare_chain_cli_schema!(Wococo, wococo); -declare_chain_cli_schema!(BridgeHubWococo, bridge_hub_wococo); declare_chain_cli_schema!(Westend, westend); declare_chain_cli_schema!(BridgeHubWestend, bridge_hub_westend); declare_chain_cli_schema!(Kusama, kusama); @@ -205,8 +199,37 @@ declare_chain_cli_schema!(BridgeHubKusama, bridge_hub_kusama); declare_chain_cli_schema!(Polkadot, polkadot); declare_chain_cli_schema!(BridgeHubPolkadot, bridge_hub_polkadot); declare_chain_cli_schema!(PolkadotBulletin, polkadot_bulletin); +// Means to override signers of different layer transactions. +declare_chain_cli_schema!(RococoHeadersToBridgeHubWestend, rococo_headers_to_bridge_hub_westend); +declare_chain_cli_schema!( + RococoParachainsToBridgeHubWestend, + rococo_parachains_to_bridge_hub_westend +); +declare_chain_cli_schema!(WestendHeadersToBridgeHubRococo, westend_headers_to_bridge_hub_rococo); +declare_chain_cli_schema!( + WestendParachainsToBridgeHubRococo, + westend_parachains_to_bridge_hub_rococo +); +declare_chain_cli_schema!(KusamaHeadersToBridgeHubPolkadot, kusama_headers_to_bridge_hub_polkadot); +declare_chain_cli_schema!( + KusamaParachainsToBridgeHubPolkadot, + kusama_parachains_to_bridge_hub_polkadot +); +declare_chain_cli_schema!(PolkadotHeadersToBridgeHubKusama, polkadot_headers_to_bridge_hub_kusama); +declare_chain_cli_schema!( + PolkadotParachainsToBridgeHubKusama, + polkadot_parachains_to_bridge_hub_kusama +); +declare_chain_cli_schema!( + PolkadotBulletinHeadersToBridgeHubPolkadot, + polkadot_bulletin_headers_to_bridge_hub_polkadot +); +declare_chain_cli_schema!(PolkadotHeadersToPolkadotBulletin, polkadot_headers_to_polkadot_bulletin); +declare_chain_cli_schema!( + PolkadotParachainsToPolkadotBulletin, + polkadot_parachains_to_polkadot_bulletin +); // All supported bridges. -declare_parachain_to_parachain_bridge_schema!(BridgeHubRococo, Rococo, BridgeHubWococo, Wococo); declare_parachain_to_parachain_bridge_schema!(BridgeHubRococo, Rococo, BridgeHubWestend, Westend); declare_parachain_to_parachain_bridge_schema!(BridgeHubKusama, Kusama, BridgeHubPolkadot, Polkadot); declare_relay_to_parachain_bridge_schema!(PolkadotBulletin, BridgeHubPolkadot, Polkadot); @@ -380,32 +403,6 @@ where } } -/// BridgeHubRococo <> BridgeHubWococo complex relay. -pub struct BridgeHubRococoBridgeHubWococoFull2WayBridge { - base: ::Base, -} - -#[async_trait] -impl Full2WayBridge for BridgeHubRococoBridgeHubWococoFull2WayBridge { - type Base = ParachainToParachainBridge; - type Left = relay_bridge_hub_rococo_client::BridgeHubRococo; - type Right = relay_bridge_hub_wococo_client::BridgeHubWococo; - type L2R = BridgeHubRococoToBridgeHubWococoCliBridge; - type R2L = BridgeHubWococoToBridgeHubRococoCliBridge; - - fn new(base: Self::Base) -> anyhow::Result { - Ok(Self { base }) - } - - fn base(&self) -> &Self::Base { - &self.base - } - - fn mut_base(&mut self) -> &mut Self::Base { - &mut self.base - } -} - /// BridgeHubRococo <> BridgeHubWestend complex relay. pub struct BridgeHubRococoBridgeHubWestendFull2WayBridge { base: ::Base, @@ -487,8 +484,6 @@ impl Full2WayBridge for PolkadotBulletinBridgeHubPolkadotFull2WayBridge { /// Complex headers+messages relay. #[derive(Debug, PartialEq, StructOpt)] pub enum RelayHeadersAndMessages { - /// BridgeHubRococo <> BridgeHubWococo relay. - BridgeHubRococoBridgeHubWococo(BridgeHubRococoBridgeHubWococoHeadersAndMessages), /// BridgeHubKusama <> BridgeHubPolkadot relay. BridgeHubKusamaBridgeHubPolkadot(BridgeHubKusamaBridgeHubPolkadotHeadersAndMessages), /// `PolkadotBulletin` <> `BridgeHubPolkadot` relay. @@ -501,10 +496,6 @@ impl RelayHeadersAndMessages { /// Run the command. pub async fn run(self) -> anyhow::Result<()> { match self { - RelayHeadersAndMessages::BridgeHubRococoBridgeHubWococo(params) => - BridgeHubRococoBridgeHubWococoFull2WayBridge::new(params.into_bridge().await?)? - .run() - .await, RelayHeadersAndMessages::BridgeHubRococoBridgeHubWestend(params) => BridgeHubRococoBridgeHubWestendFull2WayBridge::new(params.into_bridge().await?)? .run() diff --git a/relays/bin-substrate/src/cli/relay_messages.rs b/relays/bin-substrate/src/cli/relay_messages.rs index 7109fd09391..f1d7537d68e 100644 --- a/relays/bin-substrate/src/cli/relay_messages.rs +++ b/relays/bin-substrate/src/cli/relay_messages.rs @@ -32,10 +32,6 @@ use crate::bridges::{ bridge_hub_rococo_messages_to_bridge_hub_westend::BridgeHubRococoToBridgeHubWestendMessagesCliBridge, bridge_hub_westend_messages_to_bridge_hub_rococo::BridgeHubWestendToBridgeHubRococoMessagesCliBridge, }, - rococo_wococo::{ - bridge_hub_rococo_messages_to_bridge_hub_wococo::BridgeHubRococoToBridgeHubWococoMessagesCliBridge, - bridge_hub_wococo_messages_to_bridge_hub_rococo::BridgeHubWococoToBridgeHubRococoMessagesCliBridge, - }, }; use relay_substrate_client::{AccountIdOf, AccountKeyPairOf, BalanceOf, ChainWithTransactions}; use substrate_relay_helper::{messages::MessagesRelayParams, TransactionParams}; @@ -101,8 +97,6 @@ where } } -impl MessagesRelayer for BridgeHubRococoToBridgeHubWococoMessagesCliBridge {} -impl MessagesRelayer for BridgeHubWococoToBridgeHubRococoMessagesCliBridge {} impl MessagesRelayer for BridgeHubRococoToBridgeHubWestendMessagesCliBridge {} impl MessagesRelayer for BridgeHubWestendToBridgeHubRococoMessagesCliBridge {} impl MessagesRelayer for BridgeHubKusamaToBridgeHubPolkadotMessagesCliBridge {} @@ -114,10 +108,6 @@ impl RelayMessages { /// Run the command. pub async fn run(self) -> anyhow::Result<()> { match self.bridge { - FullBridge::BridgeHubRococoToBridgeHubWococo => - BridgeHubRococoToBridgeHubWococoMessagesCliBridge::relay_messages(self), - FullBridge::BridgeHubWococoToBridgeHubRococo => - BridgeHubWococoToBridgeHubRococoMessagesCliBridge::relay_messages(self), FullBridge::BridgeHubRococoToBridgeHubWestend => BridgeHubRococoToBridgeHubWestendMessagesCliBridge::relay_messages(self), FullBridge::BridgeHubWestendToBridgeHubRococo => diff --git a/relays/bin-substrate/src/cli/relay_parachains.rs b/relays/bin-substrate/src/cli/relay_parachains.rs index 53ecde6a36d..5f702f2470e 100644 --- a/relays/bin-substrate/src/cli/relay_parachains.rs +++ b/relays/bin-substrate/src/cli/relay_parachains.rs @@ -24,10 +24,6 @@ use crate::bridges::{ rococo_parachains_to_bridge_hub_westend::BridgeHubRococoToBridgeHubWestendCliBridge, westend_parachains_to_bridge_hub_rococo::BridgeHubWestendToBridgeHubRococoCliBridge, }, - rococo_wococo::{ - rococo_parachains_to_bridge_hub_wococo::BridgeHubRococoToBridgeHubWococoCliBridge, - wococo_parachains_to_bridge_hub_rococo::BridgeHubWococoToBridgeHubRococoCliBridge, - }, }; use async_std::sync::Mutex; use async_trait::async_trait; @@ -68,8 +64,6 @@ pub struct RelayParachains { #[derive(Debug, EnumString, EnumVariantNames)] #[strum(serialize_all = "kebab_case")] pub enum RelayParachainsBridge { - RococoToBridgeHubWococo, - WococoToBridgeHubRococo, KusamaToBridgeHubPolkadot, PolkadotToBridgeHubKusama, PolkadotToPolkadotBulletin, @@ -118,8 +112,6 @@ where } } -impl ParachainsRelayer for BridgeHubRococoToBridgeHubWococoCliBridge {} -impl ParachainsRelayer for BridgeHubWococoToBridgeHubRococoCliBridge {} impl ParachainsRelayer for BridgeHubRococoToBridgeHubWestendCliBridge {} impl ParachainsRelayer for BridgeHubWestendToBridgeHubRococoCliBridge {} impl ParachainsRelayer for BridgeHubKusamaToBridgeHubPolkadotCliBridge {} @@ -130,10 +122,6 @@ impl RelayParachains { /// Run the command. pub async fn run(self) -> anyhow::Result<()> { match self.bridge { - RelayParachainsBridge::RococoToBridgeHubWococo => - BridgeHubRococoToBridgeHubWococoCliBridge::relay_parachains(self), - RelayParachainsBridge::WococoToBridgeHubRococo => - BridgeHubWococoToBridgeHubRococoCliBridge::relay_parachains(self), RelayParachainsBridge::RococoToBridgeHubWestend => BridgeHubRococoToBridgeHubWestendCliBridge::relay_parachains(self), RelayParachainsBridge::WestendToBridgeHubRococo => diff --git a/relays/client-bridge-hub-rococo/Cargo.toml b/relays/client-bridge-hub-rococo/Cargo.toml index 15802dc272e..58f27b2c2c4 100644 --- a/relays/client-bridge-hub-rococo/Cargo.toml +++ b/relays/client-bridge-hub-rococo/Cargo.toml @@ -13,12 +13,11 @@ subxt = { version = "0.32.1", default-features = false, features = ["native"] } # Bridge dependencies bp-bridge-hub-rococo = { path = "../../primitives/chain-bridge-hub-rococo" } -bp-bridge-hub-wococo = { path = "../../primitives/chain-bridge-hub-wococo" } bp-header-chain = { path = "../../primitives/header-chain" } bp-messages = { path = "../../primitives/messages" } bp-parachains = { path = "../../primitives/parachains" } bp-polkadot-core = { path = "../../primitives/polkadot-core" } -bp-wococo = { path = "../../primitives/chain-wococo" } +bp-runtime = { path = "../../primitives/runtime" } bridge-runtime-common = { path = "../../bin/runtime-common" } relay-substrate-client = { path = "../client-substrate" } diff --git a/relays/client-bridge-hub-wococo/Cargo.toml b/relays/client-bridge-hub-wococo/Cargo.toml deleted file mode 100644 index 50b60be8081..00000000000 --- a/relays/client-bridge-hub-wococo/Cargo.toml +++ /dev/null @@ -1,33 +0,0 @@ -[package] -name = "relay-bridge-hub-wococo-client" -version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2021" -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" - -[dependencies] -codec = { package = "parity-scale-codec", version = "3.1.5", features = ["derive"] } -scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } -subxt = { version = "0.32.1", default-features = false, features = ["native"] } - -# Bridge dependencies - -bp-bridge-hub-rococo = { path = "../../primitives/chain-bridge-hub-rococo" } -bp-bridge-hub-wococo = { path = "../../primitives/chain-bridge-hub-wococo" } -bp-header-chain = { path = "../../primitives/header-chain" } -bp-parachains = { path = "../../primitives/parachains" } -bp-polkadot-core = { path = "../../primitives/polkadot-core" } -bp-runtime = { path = "../../primitives/runtime" } - -bridge-runtime-common = { path = "../../bin/runtime-common" } -relay-bridge-hub-rococo-client = { path = "../client-bridge-hub-rococo" } -relay-substrate-client = { path = "../client-substrate" } - -# Substrate Dependencies - -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-weights = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } - -[dev-dependencies] -sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } diff --git a/relays/client-bridge-hub-wococo/src/lib.rs b/relays/client-bridge-hub-wococo/src/lib.rs deleted file mode 100644 index f32c2ac8bba..00000000000 --- a/relays/client-bridge-hub-wococo/src/lib.rs +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright 2022 Parity Technologies (UK) Ltd. -// This file is part of Parity Bridges Common. - -// Parity Bridges Common is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity Bridges Common is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity Bridges Common. If not, see . - -//! Types used to connect to the BridgeHub-Wococo-Substrate parachain. - -use bp_bridge_hub_wococo::{SignedExtension, AVERAGE_BLOCK_INTERVAL}; -use bp_polkadot_core::SuffixedCommonSignedExtensionExt; -use codec::Encode; -use relay_substrate_client::{ - Chain, ChainWithBalances, ChainWithMessages, ChainWithTransactions, ChainWithUtilityPallet, - Error as SubstrateError, MockedRuntimeUtilityPallet, SignParam, UnderlyingChainProvider, - UnsignedTransaction, -}; -use sp_core::{storage::StorageKey, Pair}; -use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount}; -use std::time::Duration; - -pub use codegen_runtime::api::runtime_types; -use relay_bridge_hub_rococo_client::codegen_runtime; - -pub type RuntimeCall = runtime_types::bridge_hub_rococo_runtime::RuntimeCall; -pub type BridgeMessagesCall = runtime_types::pallet_bridge_messages::pallet::Call; -pub type BridgeGrandpaCall = runtime_types::pallet_bridge_grandpa::pallet::Call; -pub type BridgeParachainCall = runtime_types::pallet_bridge_parachains::pallet::Call; -type UncheckedExtrinsic = bp_bridge_hub_wococo::UncheckedExtrinsic; - -/// Wococo chain definition -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub struct BridgeHubWococo; - -impl UnderlyingChainProvider for BridgeHubWococo { - type Chain = bp_bridge_hub_wococo::BridgeHubWococo; -} - -impl Chain for BridgeHubWococo { - const NAME: &'static str = "BridgeHubWococo"; - const BEST_FINALIZED_HEADER_ID_METHOD: &'static str = - bp_bridge_hub_wococo::BEST_FINALIZED_BRIDGE_HUB_WOCOCO_HEADER_METHOD; - const AVERAGE_BLOCK_INTERVAL: Duration = AVERAGE_BLOCK_INTERVAL; - - type SignedBlock = bp_bridge_hub_wococo::SignedBlock; - type Call = RuntimeCall; -} - -impl ChainWithBalances for BridgeHubWococo { - fn account_info_storage_key(account_id: &Self::AccountId) -> StorageKey { - bp_bridge_hub_wococo::AccountInfoStorageMapKeyProvider::final_key(account_id) - } -} - -impl ChainWithUtilityPallet for BridgeHubWococo { - type UtilityPallet = MockedRuntimeUtilityPallet; -} - -impl ChainWithTransactions for BridgeHubWococo { - type AccountKeyPair = sp_core::sr25519::Pair; - type SignedTransaction = UncheckedExtrinsic; - - fn sign_transaction( - param: SignParam, - unsigned: UnsignedTransaction, - ) -> Result { - let raw_payload = SignedPayload::new( - unsigned.call, - SignedExtension::from_params( - param.spec_version, - param.transaction_version, - unsigned.era, - param.genesis_hash, - unsigned.nonce, - unsigned.tip, - (((), ()), ((), ())), - ), - )?; - - let signature = raw_payload.using_encoded(|payload| param.signer.sign(payload)); - let signer: sp_runtime::MultiSigner = param.signer.public().into(); - let (call, extra, _) = raw_payload.deconstruct(); - - Ok(UncheckedExtrinsic::new_signed( - call, - signer.into_account().into(), - signature.into(), - extra, - )) - } - - fn is_signed(tx: &Self::SignedTransaction) -> bool { - tx.signature.is_some() - } - - fn is_signed_by(signer: &Self::AccountKeyPair, tx: &Self::SignedTransaction) -> bool { - tx.signature - .as_ref() - .map(|(address, _, _)| { - *address == bp_bridge_hub_wococo::Address::Id(signer.public().into()) - }) - .unwrap_or(false) - } - - fn parse_transaction(tx: Self::SignedTransaction) -> Option> { - let extra = &tx.signature.as_ref()?.2; - Some(UnsignedTransaction::new(tx.function, extra.nonce()).tip(extra.tip())) - } -} - -impl ChainWithMessages for BridgeHubWococo { - const WITH_CHAIN_RELAYERS_PALLET_NAME: Option<&'static str> = - Some(bp_bridge_hub_wococo::WITH_BRIDGE_HUB_WOCOCO_RELAYERS_PALLET_NAME); - - const TO_CHAIN_MESSAGE_DETAILS_METHOD: &'static str = - bp_bridge_hub_wococo::TO_BRIDGE_HUB_WOCOCO_MESSAGE_DETAILS_METHOD; - const FROM_CHAIN_MESSAGE_DETAILS_METHOD: &'static str = - bp_bridge_hub_wococo::FROM_BRIDGE_HUB_WOCOCO_MESSAGE_DETAILS_METHOD; -} - -#[cfg(test)] -mod tests { - use super::*; - use relay_substrate_client::TransactionEra; - - type SystemCall = runtime_types::frame_system::pallet::Call; - - #[test] - fn parse_transaction_works() { - let unsigned = UnsignedTransaction { - call: RuntimeCall::System(SystemCall::remark { remark: b"Hello world!".to_vec() }) - .into(), - nonce: 777, - tip: 888, - era: TransactionEra::immortal(), - }; - let signed_transaction = BridgeHubWococo::sign_transaction( - SignParam { - spec_version: 42, - transaction_version: 50000, - genesis_hash: [42u8; 32].into(), - signer: sp_core::sr25519::Pair::from_seed_slice(&[1u8; 32]).unwrap(), - }, - unsigned.clone(), - ) - .unwrap(); - let parsed_transaction = BridgeHubWococo::parse_transaction(signed_transaction).unwrap(); - assert_eq!(parsed_transaction, unsigned); - } -} diff --git a/relays/client-wococo/Cargo.toml b/relays/client-wococo/Cargo.toml deleted file mode 100644 index 49bb5ec5f53..00000000000 --- a/relays/client-wococo/Cargo.toml +++ /dev/null @@ -1,23 +0,0 @@ -[package] -name = "relay-wococo-client" -version = "0.1.0" -authors = ["Parity Technologies "] -edition = "2021" -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" - -[dependencies] -codec = { package = "parity-scale-codec", version = "3.1.5", features = ["derive"] } - -# Bridge dependencies - -bp-polkadot-core = { path = "../../primitives/polkadot-core" } -bp-wococo = { path = "../../primitives/chain-wococo" } - -relay-rococo-client = { path = "../client-rococo" } -relay-substrate-client = { path = "../client-substrate" } -relay-utils = { path = "../utils" } - -# Substrate Dependencies -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } diff --git a/relays/client-wococo/src/lib.rs b/relays/client-wococo/src/lib.rs deleted file mode 100644 index 7515bb9af94..00000000000 --- a/relays/client-wococo/src/lib.rs +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright 2019-2021 Parity Technologies (UK) Ltd. -// This file is part of Parity Bridges Common. - -// Parity Bridges Common is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity Bridges Common is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity Bridges Common. If not, see . - -//! Types used to connect to the Wococo-Substrate chain. - -use bp_polkadot_core::SuffixedCommonSignedExtensionExt; -use bp_wococo::WOCOCO_SYNCED_HEADERS_GRANDPA_INFO_METHOD; -use codec::Encode; -use relay_substrate_client::{ - Chain, ChainWithBalances, ChainWithGrandpa, ChainWithTransactions, Error as SubstrateError, - RelayChain, SignParam, UnderlyingChainProvider, UnsignedTransaction, -}; -use sp_core::{storage::StorageKey, Pair}; -use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount, MultiAddress}; -use sp_session::MembershipProof; -use std::time::Duration; - -pub use codegen_runtime::api::runtime_types; -use relay_rococo_client::codegen_runtime; - -pub type RuntimeCall = runtime_types::rococo_runtime::RuntimeCall; - -pub type GrandpaCall = runtime_types::pallet_grandpa::pallet::Call; - -/// Wococo header id. -pub type HeaderId = relay_utils::HeaderId; - -/// Wococo header type used in headers sync. -pub type SyncHeader = relay_substrate_client::SyncHeader; - -/// The address format for describing accounts. -pub type Address = MultiAddress; - -/// Wococo chain definition -#[derive(Debug, Clone, Copy)] -pub struct Wococo; - -impl UnderlyingChainProvider for Wococo { - type Chain = bp_wococo::Wococo; -} - -impl Chain for Wococo { - const NAME: &'static str = "Wococo"; - const BEST_FINALIZED_HEADER_ID_METHOD: &'static str = - bp_wococo::BEST_FINALIZED_WOCOCO_HEADER_METHOD; - const AVERAGE_BLOCK_INTERVAL: Duration = Duration::from_secs(6); - - type SignedBlock = bp_wococo::SignedBlock; - type Call = RuntimeCall; -} - -impl ChainWithGrandpa for Wococo { - const SYNCED_HEADERS_GRANDPA_INFO_METHOD: &'static str = - WOCOCO_SYNCED_HEADERS_GRANDPA_INFO_METHOD; - - type KeyOwnerProof = MembershipProof; -} - -impl ChainWithBalances for Wococo { - fn account_info_storage_key(account_id: &Self::AccountId) -> StorageKey { - bp_wococo::AccountInfoStorageMapKeyProvider::final_key(account_id) - } -} - -impl RelayChain for Wococo { - const PARAS_PALLET_NAME: &'static str = bp_wococo::PARAS_PALLET_NAME; -} - -impl ChainWithTransactions for Wococo { - type AccountKeyPair = sp_core::sr25519::Pair; - type SignedTransaction = - bp_polkadot_core::UncheckedExtrinsic; - - fn sign_transaction( - param: SignParam, - unsigned: UnsignedTransaction, - ) -> Result { - let raw_payload = SignedPayload::new( - unsigned.call, - bp_wococo::SignedExtension::from_params( - param.spec_version, - param.transaction_version, - unsigned.era, - param.genesis_hash, - unsigned.nonce, - unsigned.tip, - ((), ()), - ), - )?; - - let signature = raw_payload.using_encoded(|payload| param.signer.sign(payload)); - let signer: sp_runtime::MultiSigner = param.signer.public().into(); - let (call, extra, _) = raw_payload.deconstruct(); - - Ok(Self::SignedTransaction::new_signed( - call, - signer.into_account().into(), - signature.into(), - extra, - )) - } - - fn is_signed(tx: &Self::SignedTransaction) -> bool { - tx.signature.is_some() - } - - fn is_signed_by(signer: &Self::AccountKeyPair, tx: &Self::SignedTransaction) -> bool { - tx.signature - .as_ref() - .map(|(address, _, _)| *address == Address::Id(signer.public().into())) - .unwrap_or(false) - } - - fn parse_transaction(tx: Self::SignedTransaction) -> Option> { - let extra = &tx.signature.as_ref()?.2; - Some(UnsignedTransaction::new(tx.function, extra.nonce()).tip(extra.tip())) - } -} diff --git a/relays/lib-substrate-relay/Cargo.toml b/relays/lib-substrate-relay/Cargo.toml index 8a490a9d275..f4df31766fe 100644 --- a/relays/lib-substrate-relay/Cargo.toml +++ b/relays/lib-substrate-relay/Cargo.toml @@ -51,8 +51,7 @@ sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "mas [dev-dependencies] bp-rococo = { path = "../../primitives/chain-rococo" } -bp-wococo = { path = "../../primitives/chain-wococo" } pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } -relay-rococo-client = { path = "../client-rococo" } relay-bridge-hub-rococo-client = { path = "../client-bridge-hub-rococo" } -relay-bridge-hub-wococo-client = { path = "../client-bridge-hub-wococo" } +relay-bridge-hub-westend-client = { path = "../client-bridge-hub-westend" } +relay-rococo-client = { path = "../client-rococo" } diff --git a/relays/lib-substrate-relay/src/messages/source.rs b/relays/lib-substrate-relay/src/messages/source.rs index 11f1e7f00bf..e2fdb67237b 100644 --- a/relays/lib-substrate-relay/src/messages/source.rs +++ b/relays/lib-substrate-relay/src/messages/source.rs @@ -578,7 +578,7 @@ mod tests { use super::*; use bp_runtime::Chain as ChainBase; use relay_bridge_hub_rococo_client::BridgeHubRococo; - use relay_bridge_hub_wococo_client::BridgeHubWococo; + use relay_bridge_hub_westend_client::BridgeHubWestend; fn message_details_from_rpc( nonces: RangeInclusive, @@ -666,8 +666,8 @@ mod tests { msgs_to_refine.push((payload, out_msg_details)); } - let maybe_batches = split_msgs_to_refine::( - LaneId::new(1, 2), + let maybe_batches = split_msgs_to_refine::( + Default::default(), msgs_to_refine, ); match expected_batches { diff --git a/scripts/verify-pallets-build.sh b/scripts/verify-pallets-build.sh index 8e2017d1b9e..e647eaca971 100755 --- a/scripts/verify-pallets-build.sh +++ b/scripts/verify-pallets-build.sh @@ -65,6 +65,7 @@ rm -rf $BRIDGES_FOLDER/deployments rm -f $BRIDGES_FOLDER/docs/dockerhub-* rm -rf $BRIDGES_FOLDER/fuzz rm -rf $BRIDGES_FOLDER/modules/beefy +rm -rf $BRIDGES_FOLDER/modules/shift-session-manager rm -rf $BRIDGES_FOLDER/primitives/beefy rm -rf $BRIDGES_FOLDER/relays rm -rf $BRIDGES_FOLDER/scripts/add_license.sh diff --git a/zombienet/README.md b/zombienet/README.md index 2da3093f4f0..7f7de770814 100644 --- a/zombienet/README.md +++ b/zombienet/README.md @@ -2,7 +2,7 @@ This folder contains [zombienet](https://github.com/paritytech/zombienet/) based integration tests for both onchain and offchain bridges code. Due to some -[technical diffuculties](https://github.com/paritytech/parity-bridges-common/pull/2649#issue-1965339051), we +[technical difficulties](https://github.com/paritytech/parity-bridges-common/pull/2649#issue-1965339051), we are using native zombienet provider, which means that you need to build some binaries locally. To start those tests, you need to: