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

core/state/snapshot: check difflayer staleness early (#27255) #383

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

minh-bq
Copy link
Collaborator

@minh-bq minh-bq commented Nov 22, 2023

This fixes the flaky unit test TestDiffLayerExternalInvalidationPartialFlatten we sometimes observe. The expected behavior is that we get the error when query account or storage slot from stale diff layer. However, the staleness check is done after the bloom filter check. If we get the bloom filter miss in diff layer, we go directly to disk layer, so we don't go through the staleness check in diff layer. The test is flaky because bloom filter is randomized. This commit moves the staleness check earlier before bloom filter check.

More details at: ethereum/go-ethereum#27254

This PR adds a staleness-check to AccountRLP, before checking the bloom-filter and potentially going directly into the disklayer.

---------

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
@minh-bq minh-bq merged commit f4a8cdb into axieinfinity:master Nov 23, 2023
1 check passed
@minh-bq minh-bq deleted the fix/snap-diff-layer branch November 23, 2023 06:05
minh-bq added a commit to minh-bq/ronin that referenced this pull request Feb 20, 2024
…finity#383)

This PR adds a staleness-check to AccountRLP, before checking the bloom-filter and potentially going directly into the disklayer.

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
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.

3 participants