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
//! Type definitions for the chain index.
//!
//! This module provides types for blockchain indexing, organized into two main categories:
//!
//! ## Database Types
//! Types that implement `ZainoVersionedSerde` for database persistence.
//! These types follow strict versioning rules and require migrations for any changes.
//!
//! Currently organized in `db/legacy.rs` (pending refactoring into focused modules):
//! - Block types: BlockHash, BlockIndex, BlockData, IndexedBlock, etc.
//! - Transaction types: TransactionHash, CompactTxData, TransparentCompactTx, etc.
//! - Address types: AddrScript, Outpoint, AddrHistRecord, etc.
//! - Shielded types: SaplingCompactTx, OrchardCompactTx, etc.
//! - Primitives: Height, ChainWork, ShardIndex, etc.
//!
//! ## Helper Types
//! Non-database types for in-memory operations and conversions:
//! - BestChainLocation, NonBestChainLocation - Transaction location tracking
//! - TreeRootData - Commitment tree roots wrapper
//! - BlockMetadata, BlockWithMetadata - Block construction helpers
//!
//! ## Module Organization Rules
//!
//! **Database Types (`db` module):**
//! 1. Must implement `ZainoVersionedSerde`
//! 2. Never use external types as fields directly - store fundamental data
//! 3. Never change without implementing a new version and database migration
//! 4. Follow stringent versioning rules for backward compatibility
//!
//! **Helper Types (`helpers` module):**
//! 1. Do NOT implement `ZainoVersionedSerde`
//! 2. Used for in-memory operations, conversions, and coordination
//! 3. Can be changed more freely as they're not persisted
// Re-export database types for backward compatibility
pub use *;
pub use ;
// Re-export business-layer primitives and containers
pub use BlockContext;
pub use BlockIndex;
// Re-export helper types
pub use ;