check-health.sh: retry logic for hash comparison (fix false-positive forked) #8

Merged
sebastian merged 1 commits from issue-42 into main 2026-06-18 16:08:32 +00:00
Collaborator

Durable compose-repo PR for vibe-node issue #42. Supersedes the conflict-prone parent gitlink-PR vibe-node#45 — this is a plain check-health.sh file diff with no submodule gitlink, so it stays mergeable regardless of deploy churn on main.

Change

check-health.sh declares a node "forked" on a single hash mismatch between local and reference RPC at the same height. Chains with frequent 1-block tip reorgs (Viction PoSV, Rootstock merge-mining) produce transient mismatches that resolve in seconds → false-positive "forked" alerts.

Wrap the hash comparison in a 3-attempt retry loop (re-fetch local + reference each try, 3s sleep; only declare "forked" if all 3 mismatch; worst-case +6s for genuinely-forked nodes). A healthy node hitting a transient reorg falls through to normal online/lagging/syncing.

Verification

  • Genuinely-forked node (all 3 mismatch) → still "forked".
  • Healthy node, transient tip reorg (≥1 match) → online/lagging/syncing.
  • Script structure, timeout handling, cosmos/starknet/aztec branches, error handling unchanged. Only check-health.sh modified.

On merge

The next deploy-compose-repo bumps the vibe-node rpc gitlink to rpc main HEAD (which then includes this). No PR touches the gitlink — closes the merge-window problem. (Branch issue-42, commit e9ed1c0.)

**Durable compose-repo PR** for vibe-node issue #42. Supersedes the conflict-prone parent gitlink-PR vibe-node#45 — this is a plain `check-health.sh` file diff with **no submodule gitlink**, so it stays mergeable regardless of deploy churn on `main`. ## Change `check-health.sh` declares a node "forked" on a single hash mismatch between local and reference RPC at the same height. Chains with frequent 1-block tip reorgs (Viction PoSV, Rootstock merge-mining) produce transient mismatches that resolve in seconds → false-positive "forked" alerts. Wrap the hash comparison in a **3-attempt retry loop** (re-fetch local + reference each try, 3s sleep; only declare "forked" if all 3 mismatch; worst-case +6s for genuinely-forked nodes). A healthy node hitting a transient reorg falls through to normal online/lagging/syncing. ## Verification - Genuinely-forked node (all 3 mismatch) → still "forked". - Healthy node, transient tip reorg (≥1 match) → online/lagging/syncing. - Script structure, timeout handling, cosmos/starknet/aztec branches, error handling unchanged. Only `check-health.sh` modified. ## On merge The next `deploy-compose-repo` bumps the vibe-node `rpc` gitlink to rpc `main` HEAD (which then includes this). No PR touches the gitlink — closes the merge-window problem. (Branch `issue-42`, commit `e9ed1c0`.)
claude added 1 commit 2026-06-18 15:50:35 +00:00
sebastian merged commit 30e866802a into main 2026-06-18 16:08:32 +00:00
sebastian deleted branch issue-42 2026-06-18 16:08:32 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: StakeSquid/ethereum-rpc-docker#8