Skip to content

Verdict Codes

Ranesh Rajit edited this page Oct 7, 2026 · 2 revisions

Verdict Codes

All produced by Verifier.java.

Code Meaning
OK All checks pass, GREEN
KEY_MISMATCH The signing key on disk is not the one pinned in baseline.json at enrollment (key-swap attack; component: key)
SIG_FAIL Full 8-field seal invalid (Boss verifies off-chain; EVM has no Ed25519). Malformed base64/length also lands here - verify never throws
MEASURE_MISMATCH_BIN/CFG/MEM Boss recompute vs reported diverge per component (lying Checker / MITM)
POLICY_BIN/CFG/MEM_CHANGED Honest report but dirty vs the golden baseline, per component
COMB_MISMATCH hComb != SHA256(raws)
PREV_HASH_BREAK Missing or forked cycle (chain linkage broken)
STALE_REPLAY Old block.timestamp-checked time or reused seq
CHAIN_MISMATCH The on-chain record read back via getLatest after anchoring differs from the submitted measurement (wrong contract, reorg, RPC manipulation; component: chain)
CYCLE_ERR Heartbeat exception (cause shown); promotes to STALE past the 12s window

Attack table

Attack Result
No attack GREEN OK
Edit config, honest Checker RED POLICY_CFG_CHANGED comp=config, sustained
Edit binary RED POLICY_BIN_CHANGED comp=binary
Memory flip via endpoint RED POLICY_MEM_CHANGED comp=memory
Lying Checker (anchors old good hash) RED MEASURE_MISMATCH_* comp=<that component>
Replay / reorder RED STALE_REPLAY (seq/ts/prevHash)
Heartbeat stalled (locked/hung files) RED CYCLE_ERR, then STALE after 12s via the 1s watchdog
Kill the engine process Page honestly shows "engine unreachable" (no stale green light)
Swap in a new key pair RED KEY_MISMATCH comp=key (when the baseline is pinned)
Chain stores a different record than submitted RED CHAIN_MISMATCH comp=chain (getLatest readback after each anchor)
Rewrite a witness.jsonl line Witness panel flips BROKEN, chain verification fails

Contract API

Integrity.sol (owner-only, block.timestamp authoritative):

  • enroll(agentId, hBin, hCfg, hMem, hComb) - once, cycle 0 genesis, sets ownerOf
  • anchor(agentId, seq, hBin, hCfg, hMem, hComb, prevHash, sig) - heartbeat, require(msg.sender==owner), prevHash linkage
  • getLatest(agentId) / anchorCount(agentIdHash) - reads
  • Events (history lives here; the mapping holds latest only): Enrolled(bytes32 indexed agentIdHash, ...), Anchored(bytes32 indexed agentIdHash, ...)

Ed25519 signatures are verified off-chain by the Boss; the contract stores, orders, and timestamps. After each mined anchor the Boss reads the record back via getLatest and requires it to match the submission (CHAIN_MISMATCH otherwise; the check is skipped gracefully when the RPC read fails). Enrollment also pins chainContract + chainId into the baseline when config/chain.json exists; any mismatch refuses chain mode (ledger fallback + boot log).

Clone this wiki locally