Skip to content
  • Svyatoslav Nikolsky's avatar
    Add Rococo People <> Rococo Bulletin bridge support to Rococo Bridge Hub (#2540) · 097308e3
    Svyatoslav Nikolsky authored
    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: default avatardependabot[bot] <[email protected]>
    Signed-off-by: default avatarAndrei Sandu <[email protected]>
    Co-authored-by: default avatarAdrian Catangiu <[email protected]>
    Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: default avatarAndrei Sandu <[email protected]>
    Co-authored-by: default avatarEgor_P <[email protected]>
    Co-authored-by: command-bot <>
    097308e3