-
Notifications
You must be signed in to change notification settings - Fork 18
Split relayer sessions into separate threads #164
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
Conversation
src/agent/services/lazer_exporter.rs
Outdated
.await | ||
{ | ||
tracing::error!("Error sending transaction to Lazer relayer session: {e:?}"); | ||
// TODO: Under what circumstances would the channel be hosed and is it worth retry? |
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.
The channels are mpsc so I think the only way to receive error is if the channel is closed.
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.
lgtm, wait for ali to approve
Thanks, going to make changes reflecting lazer agent review also. |
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.
lgtm, let's wait for @ali-bahjati to do the final review.
…azer-relayer-threads
src/agent/services/lazer_exporter.rs
Outdated
let mut relayer_senders = vec![]; | ||
|
||
for url in config.relayer_urls.iter() { | ||
let (sender, receiver) = mpsc::channel(RELAYER_CHANNEL_CAPACITY); |
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.
you can use a broadcast::channel here instead of managing multiple single consumer channels
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.
LGTM. Please address my comment before merging, and also don't forget to bump the version (if it's gonna be released)
Refactored to broadcast::channel in most recent commit. Will bump version if I end up wanting to deploy to test without needing anything else. |
This should mirror the changes in the new lazer agent (both of which should be refactored into common code).