feat(state-prune): add snapshot speed knobs#3947
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces tunable performance/safety knobs for state-prune snapshot creation, focused on dedup behavior and RocksDB compaction/auto-compaction. It wires these knobs from the CLI through the snapshot builder configuration down to the RocksDB-backed writer and adds minimal test updates to reflect the new config fields.
Changes:
- Adds three new CLI flags to
snapshot(--skip-dedup,--skip-final-compact,--enable-auto-compactions) and plumbs them intoSnapshotBuilderConfig. - Extends
SnapshotBuilderConfigandSnapshotNodeWriterto support skipping deduplication, skipping final compaction (flush-only finish), and optionally disabling auto-compactions during snapshot builds, with appropriate behavior changes in traversal and finalization. - Updates snapshot-related tests to construct
SnapshotBuilderConfigwith the new fields and to keep scalable dedup tests aligned with the updated configuration structure.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
crates/rooch/src/commands/db/commands/state_prune/snapshot.rs |
Adds new CLI flags for deduplication, final compaction, and auto-compactions, and passes them into SnapshotBuilderConfig used to build snapshots and to persist operation metadata. |
crates/rooch-pruner/src/state_prune/config.rs |
Extends SnapshotBuilderConfig with skip_dedup, skip_final_compact, and disable_auto_compactions, including defaults and construction from StatePruneConfig. |
crates/rooch-pruner/src/state_prune/snapshot_builder.rs |
Wires config flags into traversal (optional dedup), SnapshotNodeWriter behavior (skip dedup, optionally disable auto-compactions), and finalize behavior (flush-only vs flush+compact), while keeping metadata and integrity verification paths intact. |
crates/rooch-pruner/tests/snapshot_replay_e2e_test.rs |
Updates the snapshot e2e test configuration to include the new SnapshotBuilderConfig fields so tests compile and continue to exercise snapshot creation behavior with explicit settings. |
added 2 commits
February 2, 2026 13:21
|
Docker images for this PR are available:
Pull commands:
|
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.
Summary\n- add CLI flags to control dedup, final compaction, and auto-compaction during state-prune snapshot\n- allow flush-only finish to avoid long compaction stalls on large snapshots\n- optional skip-dedup to save extra read I/O when SMT nodes are unique\n\n## Testing\n- cargo check -p rooch-pruner\n