Skip to content

Conversation

@incrypto32
Copy link
Member

  • Initialize ReorgAwareStream from resume_watermark to restore block hashes
  • Add hash mismatch detection: compare stored hash with server's prev_hash
  • Pass resume_watermark from client.py to ReorgAwareStream
  • Add 6 unit tests for cross-restart reorg detection scenarios

This enables detecting chain reorgs that occur while the process is down by comparing the stored block hash with the server's prev_hash.

- Initialize ReorgAwareStream from resume_watermark to restore block hashes
- Add hash mismatch detection: compare stored hash with server's prev_hash
- Pass resume_watermark from client.py to ReorgAwareStream
- Add 6 unit tests for cross-restart reorg detection scenarios

This enables detecting chain reorgs that occur while the process is down
by comparing the stored block hash (from state store) with the server's prev_hash.
@incrypto32 incrypto32 force-pushed the krishna/cross-restart-reorg-detection branch from 8c79fc7 to cdb1f28 Compare January 13, 2026 12:45
@edgeandnode edgeandnode deleted a comment from github-actions bot Jan 13, 2026
)

if is_reorg:
invalidation = BlockRange(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we invalidate the entire previous range in this case to be safe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants