Add parent hash verification during block ingestion#954
Conversation
Verify that each new block's parent hash matches the hash of the previous block when syncing from the access node. This ensures blockchain integrity by rejecting blocks with mismatched parent hashes.
📝 WalkthroughWalkthroughThis change introduces parent block hash validation to the block ingestion pipeline. A new error type is defined, BlocksProvider validates incoming blocks reference the correct parent hash, and test infrastructure is expanded to support parent-linked block chains. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Verify that each new block's parent hash matches the hash of the previous block when syncing from the access node. This ensures blockchain integrity by rejecting blocks with mismatched parent hashes.
Closes: #???
Description
For contributor use:
masterbranchFiles changedin the Github PR explorerSummary by CodeRabbit
New Features
Bug Fixes