Skip to content

Conversation

varun-doshi
Copy link
Contributor

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 or warn from tracing crate. Will add it if advised by maintainers

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@varun-doshi varun-doshi requested a review from zeroXbrock as a code owner April 15, 2025 07:03
}

let timekeeper_handle = tokio::spawn(async {
tokio::time::sleep(Duration::from_secs(10)).await;
Copy link
Member

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)

Copy link
Contributor Author

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.

@varun-doshi varun-doshi requested a review from zeroXbrock April 17, 2025 06:22
Copy link
Member

@zeroXbrock zeroXbrock left a 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warn if contract deployments take too long
2 participants