Introduce state prune with snapshots and changeset replayer#3848
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 a state pruning system with snapshot creation and changeset replay capabilities for managing large-scale state data in the Rooch blockchain. The implementation includes CLI commands, core pruning logic, configuration management, and comprehensive E2E tests. Additionally, the PR replaces emoji symbols with text-based markers (e.g., ✅ → [PASS], ❌ → [FAIL]) in test output across the codebase for better compatibility.
Key changes include:
- New
state-pruneCLI command withsnapshotandreplaysubcommands for state management operations - Core implementation files including
SnapshotBuilderandIncrementalReplayerfor snapshot creation and changeset replay - Configuration structures and metadata tracking for state pruning operations
- Extended
StateStorewith range query capabilities for retrieving changeset batches - Comprehensive TypeScript E2E tests validating the state-prune functionality
- Test output standardization replacing emoji/unicode symbols with ASCII text markers
Reviewed changes
Copilot reviewed 34 out of 35 changed files in this pull request and generated 18 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/typescript/rooch-pruner-e2e/src/case/state-prune.spec.ts | New E2E test suite for state-prune commands with comprehensive test coverage |
| crates/testsuite/tests/integration.rs | Replaced emoji symbols with text markers in test output |
| crates/rooch/src/commands/statedb/commands/export.rs | Added placeholder snapshot mode implementation and modified state root extraction logic |
| crates/rooch/src/commands/db/mod.rs | Added StatePrune command to DB command enum |
| crates/rooch/src/commands/db/commands/state_prune_wrapper.rs | Wrapper implementation for state-prune commands (duplicate structure) |
| crates/rooch/src/commands/db/commands/state_prune/*.rs | Alternative modular implementation of state-prune commands (conflicts with wrapper) |
| crates/rooch/src/commands/db/commands/mod.rs | Added state_prune_wrapper module export |
| crates/rooch-types/src/transaction/authenticator.rs | Replaced emoji symbols with text markers in test output |
| crates/rooch-store/src/state_store/mod.rs | Added changeset range query methods with iterator and batch fallback |
| crates/rooch-store/src/lib.rs | Forwarded new range query methods from StateDBStore |
| crates/rooch-pruner/src/tests/*.rs | Replaced emoji symbols with text markers across all test files |
| crates/rooch-pruner/src/state_prune/*.rs | Core state pruning implementation including snapshot builder, incremental replayer, progress tracking, and metadata |
| crates/rooch-pruner/src/lib.rs | Added state_prune module export |
| crates/rooch-pruner/Cargo.toml | Added serde_json dependency |
| crates/rooch-config/src/state_prune.rs | Configuration structures for state pruning operations |
| crates/rooch-config/src/lib.rs | Added state_prune module export |
| Cargo.lock | Updated with new dependency (serde_json for rooch-pruner) |
|
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
Summary about this PR