Skip to content

fix(anvil): restore fee state on revert - #16241

Merged
stevencartavia merged 1 commit into
masterfrom
steven/anvil-revert-fees
Aug 19, 2026
Merged

fix(anvil): restore fee state on revert#16241
stevencartavia merged 1 commit into
masterfrom
steven/anvil-revert-fees

Conversation

@stevencartavia

Copy link
Copy Markdown
Member

Mining advances next-block base and blob fee state outside the database snapshot. As a result, evm_revert restored the chain head and database while retaining fee progression from reverted blocks, causing a replacement block to use a different base fee.

This stores the chain-derived next-block fee state with each snapshot and restores it only after the database revert succeeds. Persistent gas-price configuration and fee rules remain unchanged. Regression coverage verifies that mining, reverting, and remining produces the same base fee.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Changelog found

The deterministic check will validate the changed entry.

@mattsse mattsse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@stevencartavia
stevencartavia merged commit 2edda26 into master Aug 19, 2026
42 checks passed
@stevencartavia
stevencartavia deleted the steven/anvil-revert-fees branch August 19, 2026 14:59
@github-project-automation github-project-automation Bot moved this to Done in Foundry Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants