forked from informalsystems/hermes
-
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.
Spike for parallel relaying between multiple channels (informalsystem…
…s#692) * Spike for parallel relaying between multiple channels * Adjust event heights * Re-use existing Link infra for relaying packets * Formatting * Use only source chain, channel and port to identify packets * Force use of in-memory store * Fix computation of UnidrectionalChannelPath for WriteAck * Run two supervisors in parallel * Relay in both directions with a single supervisor * Revert "Force use of in-memory store" This reverts commit b197537. * Move supervisor into ibc-relayer crate * Formatting * Remove println statements * Formatting
- Loading branch information
Showing
11 changed files
with
385 additions
and
73 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
use abscissa_core::{config, Command, Options, Runnable}; | ||
|
||
use ibc::ics24_host::identifier::ChainId; | ||
use ibc_relayer::supervisor::Supervisor; | ||
|
||
use crate::conclude::Output; | ||
use crate::prelude::*; | ||
use crate::{application::CliApp, commands::cli_utils::ChainHandlePair}; | ||
|
||
#[derive(Clone, Command, Debug, Options)] | ||
pub struct StartMultiCmd { | ||
#[options(free, required, help = "identifier of the source chain")] | ||
src_chain_id: ChainId, | ||
|
||
#[options(free, required, help = "identifier of the destination chain")] | ||
dst_chain_id: ChainId, | ||
} | ||
|
||
impl Runnable for StartMultiCmd { | ||
fn run(&self) { | ||
let config = app_config(); | ||
|
||
match start_multi(&config, &self.src_chain_id, &self.dst_chain_id) { | ||
Ok(output) => output.exit(), | ||
Err(e) => Output::error(format!("{}", e)).exit(), | ||
} | ||
} | ||
} | ||
|
||
fn start_multi( | ||
config: &config::Reader<CliApp>, | ||
chain_a: &ChainId, | ||
chain_b: &ChainId, | ||
) -> Result<Output, BoxError> { | ||
let chains = ChainHandlePair::spawn(config, chain_a, chain_b)?; | ||
let supervisor = Supervisor::spawn(chains.src, chains.dst)?; | ||
supervisor.run()?; | ||
|
||
Ok(Output::success("ok")) | ||
} |
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
Oops, something went wrong.