fix(anvil): refetch full fork blocks with missing tx cache#14384
Merged
mattsse merged 2 commits intofoundry-rs:masterfrom Apr 21, 2026
Merged
fix(anvil): refetch full fork blocks with missing tx cache#14384mattsse merged 2 commits intofoundry-rs:masterfrom
mattsse merged 2 commits intofoundry-rs:masterfrom
Conversation
figtracer
previously approved these changes
Apr 21, 2026
Collaborator
figtracer
left a comment
There was a problem hiding this comment.
this is defensive but not sure how important it is here, pending another review
Contributor
Author
|
Hi @mattsse, thanks for your review. I noticed this was approved and later closed while I was working on the CI issue, so I wanted to check whether there was some other concern with the change. |
Collaborator
|
re-opened 👍 |
Contributor
Author
|
@mablr @mattsse @figtracer I fixed the CI issue. Could you please re-run the CI? Thanks very much for your time! |
mattsse
approved these changes
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Cached fork blocks can lose one or more stored transaction payloads while still keeping the block shell. When
block_by_hash_fullorblock_by_number_fullreconstructs that stale cache entry, RPC consumers receive an incomplete full block instead of a refetched upstream response.Solution
Return
Nonefrom full-block reconstruction when any cached transaction is missing, then fall back tofetch_full_block(...)so the fork cache is repaired from upstream data. Add an integration test that removes one cached transaction and asserts the next full-block read refetches and restores it.PR Checklist