-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add IBC events, handler and per chain monitor tasks #88
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just have some nitpicks and minor comments, looks good otherwise! (only reviewed it superficially, so not an endorsement w.r.t. to functionality, though nothing on that side jumped out to me :)
Codecov Report
@@ Coverage Diff @@
## master #88 +/- ##
========================================
- Coverage 14.5% 11.1% -3.4%
========================================
Files 58 67 +9
Lines 2219 2825 +606
Branches 761 1002 +241
========================================
- Hits 322 315 -7
- Misses 1598 2211 +613
Partials 299 299
Continue to review full report at Codecov.
|
channel_to_handler: Sender<(ChainId, Vec<IBCEvent>)>, | ||
) -> Result<Self, Box<dyn std::error::Error>> { | ||
let mut event_listener = event_listener::EventListener::connect(rpc_addr.clone()).await?; | ||
// TODO move them to config file(?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we create issue for this?
pub async fn collect_events(&mut self) -> Result<(), TMError> { | ||
if let Some(tm_event) = self.event_listener.get_event().await? { | ||
if let Ok(ibc_events) = relayer_modules::events::get_all_events(tm_event) { | ||
// TODO - send_timeout()? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we create issue for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work. I have created an issue for figuring out common format for IBC events informalsystems/ibc-rs#102.
* Add main event handler and per chain monitor tasks * Code review comments and fix clippy errors * Fix cargo fmt * Add command to start relayer in listen mode * Change to use anomaly::BoxError - review comment * Remove unused code - review comments
Closes: #87
Description
Starting with informalsystems/ibc-rs#59 as base, extract attributes specific to IBC events.
Add monitor tasks, one per chain, that register for Tx and Block events with tendermint nodes.
Push the IBC events to the main handler task.
There are a few things to clarify:
need access tofixed in Quickfix: make fields in event subscription accessible publicly tendermint-rs#312 and add Clone to EventSubscription tendermint-rs#315TMEventData::EventDataNewBlock()
that is an Option; need to extract block height. I had to change tendermint for this.For contributor use:
docs/
) and code commentsFiles changed
in the Github PR explorer