Skip to content

Handle stale snapshots by returning ErrSnapshotStale#5066

Draft
Frozen wants to merge 1 commit into
devfrom
fix/flaky-failing-test
Draft

Handle stale snapshots by returning ErrSnapshotStale#5066
Frozen wants to merge 1 commit into
devfrom
fix/flaky-failing-test

Conversation

@Frozen

@Frozen Frozen commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

This pull request adds additional stale state checks to the diff layer's account and storage retrieval methods, improving the robustness of snapshot state management. Now, before attempting to access account or storage data, the code verifies if the diff layer is stale and returns an appropriate error if so.

Improvements to snapshot diff layer safety:

  • Added a check for Stale() in the AccountRLP method of diffLayer to prevent access and return ErrSnapshotStale if the layer is stale.
  • Added a similar Stale() check in the Storage method of diffLayer to ensure safe handling of stale state.

@Frozen Frozen self-assigned this Jun 23, 2026
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.

1 participant