Skip to content

fix(node): keep full nodes syncing on root verification failures#1027

Merged
curryxbo merged 1 commit into
mainfrom
fix/role-aware-root-verification
Jul 27, 2026
Merged

fix(node): keep full nodes syncing on root verification failures#1027
curryxbo merged 1 commit into
mainfrom
fix/role-aware-root-verification

Conversation

@curryxbo

@curryxbo curryxbo commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keep batch root verification fail-closed for layer1 validator nodes
  • let regular local-mode nodes log a structured warning and continue advancing when root verification fails
  • preserve divergence metrics and add coverage for the role-based enforcement policy

Test plan

  • go test ./node/derivation

Made with Cursor

Summary by CodeRabbit

  • Bug Fixes

    • Local derivation now continues when batch root verification fails, while recording a warning.
    • Strict verification modes continue to stop processing on verification failures.
    • Divergence errors continue to be reported as state exceptions.
  • Tests

    • Added coverage to confirm verification behavior differs correctly between strict and local modes.

Keep layer1 validators fail-closed while allowing regular nodes to continue syncing when root verification fails.

Co-authored-by: Cursor <cursoragent@cursor.com>
@curryxbo
curryxbo requested a review from a team as a code owner July 27, 2026 06:54
@curryxbo
curryxbo requested review from twcctop and removed request for a team July 27, 2026 06:54

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: eb666481-89e0-43a2-a419-58fd414a53c7

📥 Commits

Reviewing files that changed from the base of the PR and between 5ae47e4 and 73b913a.

📒 Files selected for processing (2)
  • node/derivation/derivation.go
  • node/derivation/verify_policy_test.go

📝 Walkthrough

Walkthrough

Batch root verification failures now terminate derivation only in Layer1 verification mode. Local mode logs a structured warning and continues processing, while divergence still marks the batch as exceptional. A helper centralizes enforcement policy and is covered by table-driven tests.

Changes

Batch root verification policy

Layer / File(s) Summary
Mode-aware enforcement and validation
node/derivation/derivation.go, node/derivation/verify_policy_test.go
derivationBlock stops on root verification failures only when Layer1 enforcement applies, logs warnings in local mode, preserves divergence handling, and tests the enforcement helper for both modes.

Estimated code review effort: 3 (Moderate) | ~15–30 minutes

Suggested reviewers: twcctop, dylancai9

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main behavior change: full nodes continue syncing after root verification failures.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/role-aware-root-verification

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@curryxbo
curryxbo merged commit 7ef2814 into main Jul 27, 2026
13 checks passed
@curryxbo
curryxbo deleted the fix/role-aware-root-verification branch July 27, 2026 08:32
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