1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! Unified storage interface for Signet.
//!
//! This crate provides a unified interface for writing execution data to both
//! hot storage (for fast state access) and cold storage (for historical archival).
//!
//! # Overview
//!
//! The [`UnifiedStorage`] struct wraps both a hot storage backend and a cold
//! storage handle, providing a single API for block writes:
//!
//! - Hot storage receives headers and state changes for fast access
//! - Cold storage receives full block data (transactions, receipts, events)
//!
//! # Write Semantics
//!
//! - Hot writes are synchronous (database transactions)
//! - Cold writes are dispatched asynchronously (fire-and-forget)
//! - Hot errors are fatal; cold errors are logged but don't block
//!
//! # Example
//!
//! ```ignore
//! use signet_storage::UnifiedStorage;
//! use signet_storage_types::ExecutedBlockBuilder;
//!
//! // Create unified storage from hot and cold backends
//! let storage = UnifiedStorage::new(hot_db, cold_handle);
//!
//! // Build an executed block
//! let block = ExecutedBlockBuilder::new()
//! .header(sealed_header)
//! .bundle(bundle_state)
//! .transactions(txs)
//! .receipts(receipts)
//! .build()
//! .unwrap();
//!
//! // Write to both storages (takes ownership)
//! storage.append_blocks(vec![block])?;
//! ```
//!
//! # Feature Flags
//!
//! - **`test-utils`**: Propagates `signet-hot/test-utils` and
//! `signet-cold/test-utils`, enabling in-memory backends and conformance
//! tests for both storage layers.
pub use ;
pub use UnifiedStorage;
// Re-export key types for convenience
pub use ;
pub use ;
pub use ;
pub use CancellationToken;