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: eip1559 estimator #509

Merged
merged 2 commits into from
Apr 11, 2024
Merged

fix: eip1559 estimator #509

merged 2 commits into from
Apr 11, 2024

Conversation

klkvr
Copy link
Member

@klkvr klkvr commented Apr 10, 2024

Motivation

ref foundry-rs/foundry#7620

currently we are not accounting for an edge case when estimated priority fee is higher than base fee. baseFee*2 is usually enough, but in the mentioned PR anvil was started with 0 baseFee, thus baseFee was always estimated as zero

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@klkvr klkvr changed the title fix: default estimator fix: eip1559 estimator Apr 10, 2024
Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

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

How can we catch this in the future in foundry ci?

@klkvr
Copy link
Member Author

klkvr commented Apr 10, 2024

I think we can try testing this directly: the repro for this is spinning up anvil with --block-base-fee-per-gas 0, then sending any tx with non-zero prio fee and then running any script

@mattsse mattsse merged commit 9e6e34f into alloy-rs:main Apr 11, 2024
18 checks passed
ben186 pushed a commit to ben186/alloy that referenced this pull request Jul 27, 2024
* fix: default estimator

* Add zero base fee test case
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.

3 participants