Open
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request implements archival node functionality for the TON blockchain node, enabling efficient storage and retrieval of historical blockchain data through an epoch-based archive system. The implementation extracts cell database logic into a reusable CellDb module, introduces epoch-based routing for distributing archives across multiple RocksDB instances, and adds comprehensive archive import/export capabilities.
Changes:
- Refactored cell storage into a dedicated
CellDbmodule (extracted fromDynamicBocDb) - Added epoch-based archive routing with
EpochRouterfor distributing blocks across time-based epochs - Implemented archive import functionality with block validation and shard chain verification
- Added
ArchiveShardStateDbfor archive-only state management andDynamicBocArchiveDbfor archive operations - Extended test coverage with epoch router tests and archive import tests
- Enhanced
BlockMetawithfor_import()factory for creating pre-configured metadata during archive imports
Reviewed changes
Copilot reviewed 51 out of 59 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/node/storage/src/cell_db.rs | New module extracting cell database functionality (caching, loading, serialization) into a reusable component |
| src/node/storage/src/dynamic_boc_rc_db.rs | Refactored to delegate cell operations to CellDb, simplified structure |
| src/node/storage/src/dynamic_boc_archive_db.rs | New append-only archive database for importing and saving cell trees |
| src/node/storage/src/archive_shardstate_db.rs | New archive-specific shard state database for immutable state storage |
| src/node/storage/src/archives/epoch.rs | New epoch router and configuration for time-based archive distribution |
| src/node/storage/src/archives/db_provider.rs | New abstraction for routing archive access to single or epoch-based databases |
| src/node/src/archive_import/mod.rs | New archive import orchestration with validation and state management |
| src/node/src/archive_import/ingester.rs | New parallel importer for processing archive package groups |
| src/node/src/archive_import/scanner.rs | New package file scanner and parser for archive file discovery |
| src/node/src/archive_import/validator.rs | New block proof validator for archive imports |
| src/node/src/internal_db/mod.rs | Enhanced with archival mode support, epoch routing, and state DB abstraction |
| src/node/src/full_node/apply_block.rs | Modified to support archival mode state update storage |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.