Skip to content

Comments

fix: better tx receipt mitigation#614

Merged
mattsse merged 3 commits intomainfrom
matt/mitigate-race-condition
Apr 24, 2024
Merged

fix: better tx receipt mitigation#614
mattsse merged 3 commits intomainfrom
matt/mitigate-race-condition

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
@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