Skip to content

feat: enable account changesets on save_blocks#21012

Merged
joshieDo merged 2 commits intojoshie/par-save-blocksfrom
joshie/par-save-blocks-acc-cs
Jan 14, 2026
Merged

feat: enable account changesets on save_blocks#21012
joshieDo merged 2 commits intojoshie/par-save-blocksfrom
joshie/par-save-blocks-acc-cs

Conversation

@joshieDo
Copy link
Collaborator

@joshieDo joshieDo commented Jan 13, 2026

  • Adds account changesets to the segment list being written in parallel on SF
  • Adds the struct below so we can cover cases when we call write_state BUT we have already written either receipts or account changesets elsewhere.
    • reth-edge will always pass false through save_blocks (they get written to SF in parallel) but MIGHT call it with true in other usages (eg. tests, legacy nodes writing fully to mdbx)
/// Configuration for what to write when calling [`StateWriter::write_state`].
///
/// Used to skip writing certain data types, when they are being written separately.
#[derive(Debug, Clone, Copy)]
pub struct StateWriteConfig {
    /// Whether to write receipts.
    pub write_receipts: bool,
    /// Whether to write account changesets.
    pub write_account_changesets: bool,
}

PR Stack

#21045 (metrics)    #21003 (rocksdb)
         \           /
          \         /
           #21012 (account changesets) ◀
              ↓
           #20993 (parallelize save_blocks)
              ↓
            main

@joshieDo joshieDo self-assigned this Jan 13, 2026
@joshieDo joshieDo added A-db Related to the database A-static-files Related to static files labels Jan 13, 2026
@github-project-automation github-project-automation bot moved this to Backlog in Reth Tracker Jan 13, 2026
@github-project-automation github-project-automation bot moved this from Backlog to In Progress in Reth Tracker Jan 14, 2026
@joshieDo joshieDo merged commit fadc97a into joshie/par-save-blocks Jan 14, 2026
36 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Reth Tracker Jan 14, 2026
@joshieDo joshieDo deleted the joshie/par-save-blocks-acc-cs branch January 14, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-db Related to the database A-static-files Related to static files

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants