Skip to content

fix(anvil): honor epoch slots for safe/finalized tags#14466

Open
solanaXpeter wants to merge 3 commits intofoundry-rs:masterfrom
solanaXpeter:fix-anvil-epoch-slots-block-tags
Open

fix(anvil): honor epoch slots for safe/finalized tags#14466
solanaXpeter wants to merge 3 commits intofoundry-rs:masterfrom
solanaXpeter:fix-anvil-epoch-slots-block-tags

Conversation

@solanaXpeter
Copy link
Copy Markdown
Contributor

Motivation

Anvil exposes --slots-in-an-epoch, but some safe/finalized block tag paths still used a hard-coded 32-slot epoch. With a custom value, eth_feeHistory and block lookup could resolve different heights for the same tag.

Solution

Route eth_feeHistory through the backend block-number conversion and pass the configured epoch length when resolving block hashes. Add a regression test that mines with slots_in_an_epoch = 2 and checks safe/finalized tags for both block lookup and fee history.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Copy link
Copy Markdown
Collaborator

@mablr mablr left a comment

Choose a reason for hiding this comment

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

Lgtm, thanks!

Pending another review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants