fix(store): batch DB transactions in copy_state_to_cold#15624
Open
fix(store): batch DB transactions in copy_state_to_cold#15624
Conversation
This functions copies only genesis state, but on forknet this contains the full mainnet state, which leads to gigabytes of RAM allocations and archival nodes getting eventually OOM-killed. The fix re-introduces copying in 500 MB batches, which was removed by #15484
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #15624 +/- ##
=======================================
Coverage 69.32% 69.33%
=======================================
Files 942 942
Lines 213123 213134 +11
Branches 213123 213134 +11
=======================================
+ Hits 147754 147772 +18
+ Misses 59498 59480 -18
- Partials 5871 5882 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
wacban
approved these changes
Apr 24, 2026
Contributor
wacban
left a comment
There was a problem hiding this comment.
LGTM
Is it covered by any tests? Do those tests have big enough size to actually exercise the batching logic?
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.
This functions copies only genesis state, but on forknet this contains the full mainnet state, which leads to gigabytes of RAM allocations and archival nodes getting eventually OOM-killed.
The fix re-introduces copying in 500 MB batches, which was removed by #15484