Skip to content

Commit

Permalink
Reinitialize bridge relay subcommand (#1331)
Browse files Browse the repository at this point in the history
* reinitialize bridge subcommand

* PolkadotToKusama in reinit-bridge
  • Loading branch information
svyatonik authored and bkchr committed Apr 10, 2024
1 parent 60f82cf commit e656e00
Show file tree
Hide file tree
Showing 7 changed files with 590 additions and 4 deletions.
6 changes: 4 additions & 2 deletions bridges/relays/bin-substrate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,16 @@ bp-polkadot = { path = "../../primitives/chain-polkadot" }
bp-rialto = { path = "../../primitives/chain-rialto" }
bp-rialto-parachain = { path = "../../primitives/chain-rialto-parachain" }
bp-rococo = { path = "../../primitives/chain-rococo" }
bp-token-swap = { path = "../../primitives/token-swap" }
bp-wococo = { path = "../../primitives/chain-wococo" }
bp-runtime = { path = "../../primitives/runtime" }
bp-token-swap = { path = "../../primitives/token-swap" }
bp-westend = { path = "../../primitives/chain-westend" }
bp-wococo = { path = "../../primitives/chain-wococo" }
bridge-runtime-common = { path = "../../bin/runtime-common" }
finality-relay = { path = "../finality" }
messages-relay = { path = "../messages" }
millau-runtime = { path = "../../bin/millau/runtime" }
pallet-bridge-dispatch = { path = "../../modules/dispatch" }
pallet-bridge-grandpa = { path = "../../modules/grandpa" }
pallet-bridge-messages = { path = "../../modules/messages" }
pallet-bridge-token-swap = { path = "../../modules/token-swap" }
relay-kusama-client = { path = "../client-kusama" }
Expand Down Expand Up @@ -73,6 +74,7 @@ polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", bran
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "master" }

[dev-dependencies]
bp-test-utils = { path = "../../primitives/test-utils" }
hex-literal = "0.3"
pallet-bridge-grandpa = { path = "../../modules/grandpa" }
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" }
Expand Down
7 changes: 7 additions & 0 deletions bridges/relays/bin-substrate/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pub(crate) mod send_message;
mod derive_account;
mod init_bridge;
mod register_parachain;
mod reinit_bridge;
mod relay_headers;
mod relay_headers_and_messages;
mod relay_messages;
Expand Down Expand Up @@ -71,6 +72,11 @@ pub enum Command {
///
/// Sends initialization transaction to bootstrap the bridge with current finalized block data.
InitBridge(init_bridge::InitBridge),
/// Reinitialize on-chain bridge pallet with current header data.
///
/// Sends all missing mandatory headers to bootstrap the bridge with current finalized block
/// data.
ReinitBridge(reinit_bridge::ReinitBridge),
/// Send custom message over the bridge.
///
/// Allows interacting with the bridge by sending messages over `Messages` component.
Expand Down Expand Up @@ -126,6 +132,7 @@ impl Command {
Self::RelayMessages(arg) => arg.run().await?,
Self::RelayHeadersAndMessages(arg) => arg.run().await?,
Self::InitBridge(arg) => arg.run().await?,
Self::ReinitBridge(arg) => arg.run().await?,
Self::SendMessage(arg) => arg.run().await?,
Self::EncodeCall(arg) => arg.run().await?,
Self::EncodeMessage(arg) => arg.run().await?,
Expand Down
Loading

0 comments on commit e656e00

Please sign in to comment.