hopr_chain_indexer/lib.rs
1//! The chain indexer package encapsulates utilities responsible for processing the
2//! on-chain data.
3//!
4//! The processing pipeline uses the RPC endpoint to extract a stream of blocks with logs
5//! with the [`block::Indexer`] continually processing the stream utilizing
6//! spawned threads.
7//!
8//! The processing itself transforms the on-chain data into hoprd specific data, while also
9//! triggering specific actions for each event, ensuring finality, storing the data in the
10//! local storage, and further reactively triggering higher level components of the business
11//! logic.
12//!
13//! # Fast Synchronization
14//!
15//! The indexer supports fast synchronization through pre-built logs database snapshots.
16//! The [`snapshot`] module provides secure download, extraction, and installation
17//! of compressed database snapshots, allowing nodes to quickly catch up with the
18//! blockchain state instead of fetching all historical logs from genesis from an RPC endpoint.
19
20pub mod block;
21pub mod config;
22pub mod constants;
23pub mod errors;
24pub mod handlers;
25pub mod snapshot;
26pub mod traits;
27
28/// Configuration for the chain indexer functionality.
29///
30/// Includes settings for fast synchronization and snapshot downloads.
31pub use config::IndexerConfig;