feature: add signet-cold-mdbx crate with MDBX table definitions#4
Merged
Conversation
Introduces a new crate for cold storage MDBX tables with 8 tables: - Primary data: ColdHeaders, ColdTransactions, ColdReceipts, ColdSignetEvents, ColdZenithHeaders - Index: ColdBlockHashIndex, ColdTxHashIndex - Metadata: ColdMetadata with MetadataKey enum Also adds: - TxLocation type in signet-storage-types for transaction location indexing - KeySer/ValSer implementations for cold storage types in signet-hot Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements the ColdStorage trait using MDBX as the backend. Includes proper feature flagging with `backend` and `test-utils` features. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add `impl From<MdbxColdError> for ColdStorageError` to enable automatic error conversion via the `?` operator. Refactor backend methods to use internal helpers returning `MdbxColdError`, eliminating ~90 repetitive `.map_err(ColdStorageError::backend)` calls. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Extract specifier resolution into dedicated methods (resolve_header_spec, resolve_tx_spec, resolve_receipt_spec) - Replace large match blocks with function invocations - Use iterator collection patterns to avoid manual loop allocation - Simplify table creation with a loop over table metadata - Use scoped blocks to manage cursor lifetimes in truncate_above_inner Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove the optional `backend` feature and make both `signet-hot-mdbx` and `signet-cold` required dependencies. The backend implementation is now always available. Gate conformance test behind `test-utils` feature since it requires `signet_cold::conformance`. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
7 tasks
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
signet-cold-mdbxcrate with MDBX table definitions for cold storageTxLocationtype insignet-storage-typesfor transaction location indexing (16-byte fixed-size struct)KeySer/ValSerserialization implementations for cold storage types insignet-hotTest plan
cargo build -p signet-cold-mdbxcompiles successfullycargo test -p signet-cold-mdbxpasses (8 tests)cargo test -p signet-hotpasses (including cold_impls serialization tests)🤖 Generated with Claude Code