Skip to content

feat(#98): VM-bridge cross-check auditor (observe-only divergence alarm)#107

Merged
Reiers merged 1 commit into
mainfrom
feat/98-vm-crosscheck
Jul 1, 2026
Merged

feat(#98): VM-bridge cross-check auditor (observe-only divergence alarm)#107
Reiers merged 1 commit into
mainfrom
feat/98-vm-crosscheck

Conversation

@Reiers

@Reiers Reiers commented Jul 1, 2026

Copy link
Copy Markdown
Owner

New chain/crosscheck + opt-in --vm-crosscheck: once a minute, compare the local canonical tipset at head-3 against the operator's own bridge node; alarm loudly on divergence.

  • Observe-only: reads stay 100% local; head path never blocked/rewritten.
  • No false alarms: bridge lag, null rounds, shallow chain, bridge-down = skips; depth head-3 sits behind honest near-tip reorgs.
  • No new trust: the bridge is already trusted for block production; TRUST-MODEL 4.2 documents the auditor role.
  • Catches the attack class Stage C: pure-Go FVM via wazero (remove filecoin-ffi dep #2) #89 (full re-execution) would catch, at ~zero cost, and generates Stage C's future reference vectors.
  • Dashboard dev-page card (checks/agrees/diverges/skips/last).

Soak tie-in (#104): the Forest bridge is already up for block production in Phase 5; this rides the same session as the bridge-outage drill's observability.

Tests: agree, diverge (+OnDiverge hook), lag-skip, down-skip, shallow-skip, config validation. Build/vet/gofmt clean.

Closes #98.

The VM bridge is normally a production dependency (state roots for block
production). --vm-crosscheck reuses the same connection as an AUDITOR
for the read path: every interval (default 60s) Lantern asks the bridge
node for the canonical tipset at head-3 (default depth) and compares it
against the local header store.

- Agreement: counter. Divergence: loud DIVERGE error log + counter +
  dashboard card + OnDiverge hook. STRICTLY observe-only: reads stay
  100% local, the head path is never blocked or rewritten.
- No false alarms by construction: bridge lag, null rounds, shallow
  chains, unreachable bridge and unparseable responses are all skips,
  and the target depth (head-3) sits behind legitimate near-tip reorgs.
- No new trust: the bridge is already trusted for block production
  (TRUST-MODEL 4.2 documents the auditor role). This catches the attack
  class full re-execution (#89 Stage C) would catch - headers that
  verify but state that was never honestly executed - at ~zero cost,
  and doubles as Stage C's future vector generator.

Wiring: --vm-crosscheck + --vm-crosscheck-interval (requires
--vm-bridge-rpc + header store), dashboard dev-page card, CHANGELOG.

Tests: agree / diverge (+hook) / bridge-lag skip / bridge-down skip /
shallow-chain skip (bridge not even called) / config validation.
@Reiers Reiers merged commit 3021887 into main Jul 1, 2026
1 check passed
@Reiers Reiers deleted the feat/98-vm-crosscheck branch July 1, 2026 22:34
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.

FVM cross-check mode: use the VM bridge as an auditor (state-root divergence alarm)

1 participant