Skip to content
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

fix: better tx receipt mitigation #614

Merged
merged 3 commits into from
Apr 24, 2024
Merged

Conversation

mattsse
Copy link
Member

@mattsse mattsse commented Apr 23, 2024

we still encounter issues with low block times (arbitrum) resulting in hanging requests.

this provides a slightly better mitigation that keeps polling for the receipt based on an interval while also awaiting the pending res from the heartbeat

foundry-rs/foundry#7642


// FIXME: this is a hotfix to prevent a race condition where the heartbeat would miss the
// block the tx was mined in
let mut interval = tokio::time::interval(Duration::from_secs(7));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get polling interval from provider?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice,
done

@onbjerg onbjerg added the bug Something isn't working label Apr 24, 2024
@mattsse mattsse merged commit 9aea693 into main Apr 24, 2024
18 checks passed
@mattsse mattsse deleted the matt/mitigate-race-condition branch April 24, 2024 09:32
ben186 pushed a commit to ben186/alloy that referenced this pull request Jul 27, 2024
* fix: better tx receipt mitigation

* rustfmt

* use client poll interval
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants