computer: trying the new stateful

This commit is contained in:
nym21
2025-12-16 21:59:13 +01:00
parent 1ad8d8a631
commit 4b2ada14a0
74 changed files with 1896 additions and 1841 deletions

View File

@@ -0,0 +1,33 @@
//! Block processing pipeline.
//!
//! This module handles the main computation loop that processes blocks:
//! 1. Recover state from checkpoint or start fresh
//! 2. Process each block's outputs and inputs
//! 3. Update cohort states
//! 4. Periodically flush to disk
//! 5. Compute aggregate cohorts from separate cohorts
mod aggregates;
mod block_loop;
mod context;
mod flush;
mod readers;
mod recover;
pub use block_loop::process_blocks;
pub use context::ComputeContext;
pub use readers::{
IndexerReaders, VecsReaders, build_txinindex_to_txindex, build_txoutindex_to_txindex,
};
pub use recover::{
StartMode, determine_start_mode,
};
/// Flush checkpoint interval (every N blocks).
pub const FLUSH_INTERVAL: usize = 10_000;
// BIP30 duplicate coinbase heights (special case handling)
pub const BIP30_DUPLICATE_HEIGHT_1: u32 = 91_842;
pub const BIP30_DUPLICATE_HEIGHT_2: u32 = 91_880;
pub const BIP30_ORIGINAL_HEIGHT_1: u32 = 91_812;
pub const BIP30_ORIGINAL_HEIGHT_2: u32 = 91_722;