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: increase batch size during diffToDisk #816

Merged
merged 1 commit into from
Aug 25, 2023

Conversation

aaronbuchwald
Copy link
Collaborator

This PR migrates ethereum/go-ethereum#27977.

This increases the cap on the size of a batch when flattening a snapshot diff layer to disk. This is a non-atomic operation to ensure that flattening does not create such a large batch that it causes an OOM.

However, breaking this up may result in invalidating the snapshot since you may apply only part of the change, which results in needing to re-generate the snapshot.

Increasing the capped size to 64MB provides a reasonable cap to avoid an OOM and drastically increases the size of a diff that is needed to potentially corrupt a snapshot.

@aaronbuchwald aaronbuchwald merged commit 86d757d into master Aug 25, 2023
@aaronbuchwald aaronbuchwald deleted the increase-snapshot-diff-to-disk-batch-cap branch August 25, 2023 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants