forked from paritytech/polkadot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Rococo BH <> Rococo Bulletin bridge (paritytech#2724)
* added Rococo BH <> Rococo Bulletin bridge * init-bridge support * allow customising finality-related runtime APIs * revert me * use Rococo/BridgeHubRococo pretending to be a Polkadot/BridgeHubPolkadot in Rococo <> RococoBulletin bridge * Revert "revert me" This reverts commit 90c598d9d50a25e7182c97eee7818bf8d4bc404c. * Revert "allow customising finality-related runtime APIs" This reverts commit b39c32c34acddfd0b919042122e0e667470bd0a4. * fmt * WITH_BRIDGE_ROCOCO_TO_BULLETIN_MESSAGES_PALLET_INDEX * regenerate bulletin chain runtime (pallet indices have changed) * fx WITH_BRIDGE_ROCOCO_TO_BULLETIN_MESSAGES_PALLET_INDEX constant because of latest changes * also change indices in runtime * fmt * clippy
- Loading branch information
Showing
26 changed files
with
2,087 additions
and
497 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,5 @@ | |
|
||
pub mod kusama_polkadot; | ||
pub mod polkadot_bulletin; | ||
pub mod rococo_bulletin; | ||
pub mod rococo_westend; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
...in-substrate/src/bridges/rococo_bulletin/bridge_hub_rococo_messages_to_rococo_bulletin.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// Copyright 2022 Parity Technologies (UK) Ltd. | ||
// This file is part of Parity Bridges Common. | ||
|
||
// Parity Bridges Common is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
|
||
// Parity Bridges Common is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
// You should have received a copy of the GNU General Public License | ||
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
//! BridgeHubRococo-to-RococoBulletin messages sync entrypoint. | ||
|
||
use super::BridgeHubRococoAsBridgeHubPolkadot; | ||
use crate::cli::bridge::{CliBridgeBase, MessagesCliBridge}; | ||
use relay_polkadot_bulletin_client::PolkadotBulletin as RococoBulletin; | ||
use substrate_relay_helper::{messages_lane::SubstrateMessageLane, UtilityPalletBatchCallBuilder}; | ||
|
||
/// BridgeHubRococo-to-RococoBulletin messages bridge. | ||
pub struct BridgeHubRococoToRococoBulletinMessagesCliBridge {} | ||
|
||
impl CliBridgeBase for BridgeHubRococoToRococoBulletinMessagesCliBridge { | ||
type Source = BridgeHubRococoAsBridgeHubPolkadot; | ||
type Target = RococoBulletin; | ||
} | ||
|
||
impl MessagesCliBridge for BridgeHubRococoToRococoBulletinMessagesCliBridge { | ||
type MessagesLane = BridgeHubRococoMessagesToRococoBulletinMessageLane; | ||
} | ||
|
||
substrate_relay_helper::generate_receive_message_proof_call_builder!( | ||
BridgeHubRococoMessagesToRococoBulletinMessageLane, | ||
BridgeHubRococoMessagesToRococoBulletinMessageLaneReceiveMessagesProofCallBuilder, | ||
relay_polkadot_bulletin_client::RuntimeCall::BridgePolkadotMessages, | ||
relay_polkadot_bulletin_client::BridgePolkadotMessagesCall::receive_messages_proof | ||
); | ||
|
||
substrate_relay_helper::generate_receive_message_delivery_proof_call_builder!( | ||
BridgeHubRococoMessagesToRococoBulletinMessageLane, | ||
BridgeHubRococoMessagesToRococoBulletinMessageLaneReceiveMessagesDeliveryProofCallBuilder, | ||
relay_bridge_hub_rococo_client::RuntimeCall::BridgePolkadotBulletinMessages, | ||
relay_bridge_hub_rococo_client::BridgeBulletinMessagesCall::receive_messages_delivery_proof | ||
); | ||
|
||
/// BridgeHubRococo-to-RococoBulletin messages lane. | ||
#[derive(Clone, Debug)] | ||
pub struct BridgeHubRococoMessagesToRococoBulletinMessageLane; | ||
|
||
impl SubstrateMessageLane for BridgeHubRococoMessagesToRococoBulletinMessageLane { | ||
type SourceChain = BridgeHubRococoAsBridgeHubPolkadot; | ||
type TargetChain = RococoBulletin; | ||
|
||
type ReceiveMessagesProofCallBuilder = | ||
BridgeHubRococoMessagesToRococoBulletinMessageLaneReceiveMessagesProofCallBuilder; | ||
type ReceiveMessagesDeliveryProofCallBuilder = | ||
BridgeHubRococoMessagesToRococoBulletinMessageLaneReceiveMessagesDeliveryProofCallBuilder; | ||
|
||
type SourceBatchCallBuilder = UtilityPalletBatchCallBuilder<BridgeHubRococoAsBridgeHubPolkadot>; | ||
type TargetBatchCallBuilder = (); | ||
} |
Oops, something went wrong.