Add Rococo People <> Rococo Bulletin bridge support to Rococo Bridge Hub (#2540)
This PR adds [Rococo People](https://github.com/paritytech/polkadot-sdk/pull/2281) <> [Rococo Bulletin](https://github.com/zdave-parity/polkadot-bulletin-chain) to the Rococo Bridge Hub code. There's a couple of things left to do here: - [x] add remaining tests - it'd need some refactoring in the `bridge-hub-test-utils` - will do in a separate PR; - [x] actually run benchmarks for new messaging pallet (do we have bot nowadays?). The reason why I'm opening it before this ^^^ is ready, is that I'd like to hear others opinion on how to deal with hacks with that bridge. Initially I was assuming that Rococo Bulletin will be the 1:1 copy of the Polkadot Bulletin (to avoid maintaining multiple runtimes/releases/...), so you can see many `PolkadotBulletin` mentions in this PR, even though we are going to bridge with the parallel chain (`RococoBulletin`). That's because e.g. pallet names from `construct_runtime` are affecting runtime storage keys and bridges are using runtime storage proofs => it is important to use names that the Bulletin chain expects. But in the end, this hack won't work - we can't use Polkadot Bulletin runtime to bridge with Rococo Bridge Hub, because Polkadot Bulletin expects Polkadot Bridge hub to use `1002` parachain id and Rococo Bridge Hub seats on the `1013`. This also affects storage keys using in bridging, so I had to add the [`rococo` feature](https://github.com/svyatonik/polkadot-bulletin-chain/blob/add-bridge-pallets/runtime/Cargo.toml#L198) to the Bulletin chain. So now we can actually alter its runtime and adapt it for Rococo. So the question here is - what's better for us here - to leave everything as is (seems hacky and non-trivial); - change Bulletin chain runtime when `rococo` feature is used - e.g. use proper names there (`WithPolkadotGrandpa` -> `WithRococoGrandpa`, ...) - add another set of pallets to the Bulletin chain runtime to bridge with Rococo and never use them in production. Similar to hack that we had in Rococo/Wococo cc @acatangiu @bkontur @serban300 also cc @joepetrowski as the main "client" of this bridge --- A couple words on how this bridge is different from the Rococo <> Westend bridge: - it is a bridge with a chain that uses GRANDPA finality, not the parachain finality (hence the tests needs to be changed); - it is a fee-free bridge. So `AllowExplicitUnpaidExecutionFrom<Equals<SiblingPeople>>` + we are not paying any rewards to relayers (apart from compensating transaction costs). --------- Signed-off-by:dependabot[bot] <support@github.com> Signed-off-by:
Andrei Sandu <andrei-mihail@parity.io> Co-authored-by:
Adrian Catangiu <adrian@parity.io> Co-authored-by:
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by:
Andrei Sandu <54316454+sandreim@users.noreply.github.com> Co-authored-by:
Egor_P <egor@parity.io> Co-authored-by: command-bot <>
Showing
- Cargo.lock 2 additions, 0 deletionsCargo.lock
- bridges/modules/messages/src/weights_ext.rs 2 additions, 1 deletionbridges/modules/messages/src/weights_ext.rs
- bridges/primitives/chain-bridge-hub-rococo/src/lib.rs 2 additions, 0 deletionsbridges/primitives/chain-bridge-hub-rococo/src/lib.rs
- cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml 4 additions, 0 deletions...achains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml
- cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_common_config.rs 37 additions, 2 deletions...bridge-hubs/bridge-hub-rococo/src/bridge_common_config.rs
- cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs 292 additions, 0 deletions...e-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs
- cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs 8 additions, 18 deletions...ge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs
- cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs 117 additions, 16 deletions...achains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs
- cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs 22 additions, 2 deletions...runtimes/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs
- cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_bridge_messages_rococo_to_rococo_bulletin.rs 221 additions, 0 deletions...ights/pallet_bridge_messages_rococo_to_rococo_bulletin.rs
- cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_bridge_messages_rococo_to_westend.rs 35 additions, 34 deletions...o/src/weights/pallet_bridge_messages_rococo_to_westend.rs
- cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs 14 additions, 4 deletions.../runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs
- cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/tests/tests.rs 242 additions, 45 deletions...ins/runtimes/bridge-hubs/bridge-hub-rococo/tests/tests.rs
- polkadot/runtime/rococo/constants/src/lib.rs 2 additions, 0 deletionspolkadot/runtime/rococo/constants/src/lib.rs