Skip to content

Archival node functionality#47

Open
bvscd wants to merge 1 commit intorelease/node/v0.4.0from
archival_node
Open

Archival node functionality#47
bvscd wants to merge 1 commit intorelease/node/v0.4.0from
archival_node

Conversation

@bvscd
Copy link
Copy Markdown
Collaborator

@bvscd bvscd commented Apr 1, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 1, 2026 20:26
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 CellDb module (extracted from DynamicBocDb)
  • Added epoch-based archive routing with EpochRouter for distributing blocks across time-based epochs
  • Implemented archive import functionality with block validation and shard chain verification
  • Added ArchiveShardStateDb for archive-only state management and DynamicBocArchiveDb for archive operations
  • Extended test coverage with epoch router tests and archive import tests
  • Enhanced BlockMeta with for_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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants