-
Notifications
You must be signed in to change notification settings - Fork 108
feat(l1): add tx broadcasting time interval flag to cli #4751
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
base: main
Are you sure you want to change the base?
Conversation
Lines of code reportTotal lines added: Detailed view
|
dev: Default::default(), | ||
force: false, | ||
mempool_max_size: Default::default(), | ||
tx_broadcasting_time_interval: Default::default(), |
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.
isnt this 0? Do we actually want the default?
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.
cmd/ethrex/cli.rs
Outdated
pub discovery_port: String, | ||
#[arg( | ||
long = "p2p.tx-broadcasting-interval", | ||
default_value = "1000", |
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 you put this as a constant instead of hardcoding it here?
cmd/ethrex/cli.rs
Outdated
use ethrex_config::networks::Network; | ||
|
||
// Amount of seconds between each broadcast | ||
const BROADCAST_INTERVAL_MS: u64 = 1000; // 1 second |
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.
why did you move it here?
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.
I must have misunderstood, I thought this was what you ment here. How should I put this as a constant then?
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't you import the constant from the place it was originally?
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.
Oh! Yes! Done here!
Motivation
We've detected that the Request Blob Pooled Transactions Multiple hive test is failing with:
FAIL: Error executing step 4: expected 1 hashes, got 5
and that's because there's a 1 second interval between broadcasting transactions that batch several (in this case 5) transactions before sending them, instead of broadcasting a transaction as soon as it arrives. To pass the test but still be able to batch transactions (since it translates in a significative improvement in performance) I'm introducing a new flag in the cli to set the interval as needed.
Description
This pr introduces a new flag in the cli to control the size of the broadcasting time interval for broadcasting transactions.
This pr depends on this other pr to be merged in lambda/hive to pass the ci.
Closes #3914