feat(storage): write headers and transactions only to static files#18681
Merged
feat(storage): write headers and transactions only to static files#18681
Conversation
6f9f855 to
4ec8c3c
Compare
CodSpeed Performance ReportMerging #18681 will not alter performanceComparing Summary
|
444e05e to
a3603f3
Compare
4efd278 to
e293209
Compare
a8c4ff3 to
85600aa
Compare
00cad91 to
773da64
Compare
773da64 to
61e162c
Compare
455978e to
8c0b19e
Compare
8c0b19e to
a1fb6dc
Compare
mediocregopher
approved these changes
Sep 29, 2025
Member
mediocregopher
left a comment
There was a problem hiding this comment.
It's a lot of changes but 80% looks like removing the StorageLocation argument from everything so pretty straightforward. LGTM
joshieDo
reviewed
Sep 29, 2025
joshieDo
reviewed
Sep 29, 2025
joshieDo
reviewed
Sep 29, 2025
joshieDo
reviewed
Sep 29, 2025
joshieDo
reviewed
Sep 29, 2025
joshieDo
reviewed
Sep 29, 2025
| Ok(self.tx.commit()?) | ||
| /// Commit database transaction and static file if it exists. | ||
| pub fn commit(self) -> ProviderResult<()> { | ||
| UnifiedStorageWriter::commit(self) |
Collaborator
There was a problem hiding this comment.
unsure here, if this is called after/during an unwind this would technically be wrong right? UnifiedStorageWriter::commit_unwind exists
theochap
pushed a commit
to theochap/reth
that referenced
this pull request
Oct 13, 2025
theochap
pushed a commit
to ethereum-optimism/optimism
that referenced
this pull request
Jan 22, 2026
theochap
pushed a commit
to ethereum-optimism/optimism
that referenced
this pull request
Feb 11, 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.
Closes #18683
Closes #11524
Removes the
StorageLocationenum that was used to tell the provider where to write the data. Headers and transactions now are always written to static files only.This doesn't break existing nodes, because on startup we always copy to static files
reth/crates/node/builder/src/launch/engine.rs
Lines 159 to 160 in aa192c2
We need to figure out what to do with receipts pruning. We support
receipts_log_filteroption that can prune everything but certain receipts that match the log filter, and use it for NOT pruning the deposit contract receipts. This type of pruning can't be done with static files, as they don't support deletions in the middle of the file.For now, I'm still always writing receipts to the database, and to static files only if pruning is not enabled.