BlockInspector
https://github.com/datafast-network/datafast-runtime/blob/main/src/components/inspector.rs
Last updated
https://github.com/datafast-network/datafast-runtime/blob/main/src/components/inspector.rs
Last updated
The role of BlockInspector is to ensure:
Data Integrity: only valid blocks are subjected for processing
Block Continuity: blocks must be processed sequentially and no blocks are missed
To check for block validity, BlockInspector reads subgraph.yaml
to determine the earliest start block of the subgraph and also reads from Database to know the current indexing progress.
Incoming blocks must be sequential most of the time and block numbers must be correct based on the current indexing progress.
BlockInspector silently reject invalid blocks, or panic if incoming blocks are not in proper order.
In case of Ethereum indexing, BlockInspector only validate block by checking block numbers & block hashes - but when implementing other chains, there may be more values needed to be taken into account for data integrity confirmation.
BlockInspector does not need to be configured.