-
Notifications
You must be signed in to change notification settings - Fork 28
feat: add timer warning on contract deployment #179
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
crates/cli/src/commands/setup.rs
Outdated
} | ||
|
||
let timekeeper_handle = tokio::spawn(async { | ||
tokio::time::sleep(Duration::from_secs(10)).await; |
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.
Instead of locking in 10 seconds, could we wait for (num_deployments + 10) blocks? 10 seconds will make sense on devnets, but on live testnets with 12-second blocks, this will probably be confusing.
We can still use a timer; we just need to derive the block time (we've done this once already here: https://github.com/flashbots/contender/blob/main/crates/core/src/test_scenario.rs#L134-L144)
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.
Got it
Pushed a fix...do let me know if that was the intended direction.
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.
looks good, thank you!
Motivation
Fixes #149
Adds a log in case contract deployment takes >10secs
Solution
Adds a log in case contract deployment takes >10secs
Should ideally use
info
orwarn
fromtracing
crate. Will add it if advised by maintainersPR Checklist