Skip to content

feature: add MdbxColdBackend implementation#5

Merged
prestwich merged 4 commits intoclaude-storagefrom
cold-mdbx-impl
Feb 3, 2026
Merged

feature: add MdbxColdBackend implementation#5
prestwich merged 4 commits intoclaude-storagefrom
cold-mdbx-impl

Conversation

@prestwich
Copy link
Copy Markdown
Member

Summary

  • Implements MdbxColdBackend for the ColdStorage trait using MDBX
  • Adds backend and test-utils feature flags for optional backend support
  • Fixes clippy warnings about constant assertions in tests

Test plan

  • cargo clippy -p signet-cold-mdbx --all-features --all-targets passes
  • cargo clippy -p signet-cold-mdbx --no-default-features --all-targets passes
  • cargo t -p signet-cold-mdbx passes

🤖 Generated with Claude Code

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>
prestwich and others added 3 commits February 2, 2026 14:30
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>
@prestwich prestwich merged commit ede9d70 into claude-storage Feb 3, 2026
10 of 12 checks passed
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.

1 participant