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

anvil base fee increases to 1 after starting with 0 and sending many transactions #5161

Closed
2 tasks done
alvrs opened this issue Jun 15, 2023 · 1 comment · Fixed by #5163
Closed
2 tasks done

anvil base fee increases to 1 after starting with 0 and sending many transactions #5161

alvrs opened this issue Jun 15, 2023 · 1 comment · Fixed by #5163
Labels
T-bug Type: bug

Comments

@alvrs
Copy link

alvrs commented Jun 15, 2023

Component

Anvil

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (ce687fc 2023-06-15T00:05:25.914566000Z)

What command(s) is the bug in?

anvil -b 1 --block-base-fee-per-gas 0

Operating System

macOS (Apple Silicon)

Describe the bug

  1. Start a new anvil node with anvil -b 1 --block-base-fee-per-gas 0.
  2. Run cast block to confirm baseFeePerGas is 0
  3. Execute a bunch of transactions (in my case deploying a MUD app, but shouldn't be specific to the type of transactions)
  4. Run cast block again, baseFeePerGas is now 1

This is problematic for local environments where transactions are executed from accounts with no balance.

Note: this wasn't the case yet with this version:
CleanShot 2023-06-15 at 16 56 57@2x

@mattsse
Copy link
Member

mattsse commented Jun 15, 2023

this could be a regression is a fix in #5067 actually

see

https://github.com/foundry-rs/foundry/pull/5067/files#diff-3363023cb8e5c61c1619e30709f220faf6b583bbe864719e91122b76df095048R143-R149

which increases the base fee, since it only moves up or down.

I think the right fix here would be to treat basefee of 0 as desired constant and never increase base fee of 0, because a basefee of 0 would technically be impossible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants