signet_cold_mdbx/lib.rs
1//! MDBX table definitions and backend for cold storage.
2//!
3//! This crate provides table definitions for storing historical blockchain data
4//! in MDBX. It defines 9 tables:
5//!
6//! ## Primary Data Tables
7//!
8//! - [`ColdHeaders`]: Block headers indexed by block number.
9//! - [`ColdTransactions`]: Transactions indexed by (block number, tx index).
10//! - [`ColdTxSenders`]: Transaction senders indexed by (block number, tx index).
11//! - [`ColdReceipts`]: Receipts indexed by (block number, tx index).
12//! - [`ColdSignetEvents`]: Signet events indexed by (block number, event index).
13//! - [`ColdZenithHeaders`]: Zenith headers indexed by block number.
14//!
15//! ## Index Tables
16//!
17//! - [`ColdBlockHashIndex`]: Maps block hash to block number.
18//! - [`ColdTxHashIndex`]: Maps transaction hash to (block number, tx index).
19//!
20//! # Feature Flags
21//!
22//! - **`test-utils`**: Propagates `signet-cold/test-utils` for conformance
23//! testing against the MDBX backend.
24
25#![warn(
26 missing_copy_implementations,
27 missing_debug_implementations,
28 missing_docs,
29 unreachable_pub,
30 clippy::missing_const_for_fn,
31 rustdoc::all
32)]
33#![cfg_attr(not(test), warn(unused_crate_dependencies))]
34#![deny(unused_must_use, rust_2018_idioms)]
35#![cfg_attr(docsrs, feature(doc_cfg))]
36
37mod error;
38pub use error::MdbxColdError;
39
40mod tables;
41pub use tables::{
42 ColdBlockHashIndex, ColdHeaders, ColdReceipts, ColdSignetEvents, ColdTransactions,
43 ColdTxHashIndex, ColdTxSenders, ColdZenithHeaders,
44};
45
46mod backend;
47pub use backend::MdbxColdBackend;
48
49mod connector;
50pub use connector::{MdbxConnector, MdbxConnectorError};
51
52pub use signet_hot_mdbx::{DatabaseArguments, DatabaseEnvKind};