Skip to content

Chain Reorg Detection and Handling #5

@LeoPatOZ

Description

@LeoPatOZ

Description:

Implement blockchain reorg detection to ensure event ordering consistency and data integrity during chain reorgs.

Implementation:

  • Detect when a reorg occurs (block hash changes)
  • Maintain recent block history (configurable depth, e.g., 12 blocks) We should actually do:
    • Reorg to depth specified in config
    • Do 1 check of parent hash, if it matches return depth --> start streaming from there
    • If not, recursively find parent hash match
    • Return match --> stream from there
  • Re-process events from reorg point
  • Ensure event ordering is maintained during reorg recovery
  • Ensure reorg logic exists for both historical and live modes.

Sub-issues

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions