feat: always write receipts to static files on new nodes#19399
Merged
feat: always write receipts to static files on new nodes#19399
Conversation
This was referenced Oct 29, 2025
012a482 to
0a784c1
Compare
d1a52cc to
8590a0f
Compare
0a784c1 to
4c15c75
Compare
1e3d5b8 to
309d1d2
Compare
e5d730d to
eea160a
Compare
309d1d2 to
894b411
Compare
894b411 to
cca09b0
Compare
eea160a to
6429250
Compare
cca09b0 to
57ba2fb
Compare
joshieDo
commented
Nov 6, 2025
crates/storage/db-common/src/init.rs
Outdated
|
|
||
| // Behaviour reserved only for new nodes should be set here. | ||
| let storage_settings = StorageSettings::new(); | ||
| let storage_settings = StorageSettings::new().with_receipts_in_static_files(); |
Collaborator
Author
There was a problem hiding this comment.
ensures that only new nodes will do it
mediocregopher
approved these changes
Nov 11, 2025
mattsse
approved these changes
Nov 13, 2025
1d6d85d to
ffa9181
Compare
joshieDo
commented
Nov 13, 2025
| /// - If the node should always write receipts to static files, but receipt log filter pruning | ||
| /// is enabled, write to the database. | ||
| /// - Otherwise, write to static files. | ||
| pub fn receipts_destination<P: DBProvider + StorageSettingsCache>( |
mattsse
approved these changes
Nov 13, 2025
Comment on lines
+1652
to
+1653
| // files yet. Once receipts exist in static files, we must continue writing to maintain | ||
| // continuity and have no gaps. |
mattsse
approved these changes
Nov 13, 2025
shekhirin
approved these changes
Nov 13, 2025
Comment on lines
+50
to
+54
| if self.receipts { | ||
| StorageSettings::new().with_receipts_in_static_files() | ||
| } else { | ||
| StorageSettings::legacy() | ||
| } |
Member
There was a problem hiding this comment.
nit: think it's nicer to be able to do
Suggested change
| if self.receipts { | |
| StorageSettings::new().with_receipts_in_static_files() | |
| } else { | |
| StorageSettings::legacy() | |
| } | |
| StorageSettings::legacy().with_receipts_in_static_files(self.receipts) |
emhane
pushed a commit
to op-rs/op-reth
that referenced
this pull request
Nov 24, 2025
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.
On top of #19384
On old nodes we are writing receipts to database if pruning is enabled, otherwise to static files.
Moving forward and using
StorageSettingsthe new logic should be:For now, only enabled through
--static-files.receiptswhen launching the node