# How to independently verify the CAIN 37 evidence chain

This bundle contains a real, cryptographically-chained evidence log. You do
not need to trust cainstudio.online, mcpgate.online, or this session's word
for any of it -- run the verifier yourself.

## 1. Download

Get these three files from this same directory:
- `cain_37_independent_verifier.py`
- `cain37_evidence_chain.jsonl`
- `cain37_evidence_checkpoints.jsonl`

## 2. Verify the chain (expect VALID)

```
python3 cain_37_independent_verifier.py verify-chain cain37_evidence_chain.jsonl
```

Expected output:
```json
{
  "verdict": "VALID",
  "checked": 3,
  "final_chain_hash": "a02dc8518fd72c4ba6c556ba1a675356abb8a24e73346bf7398e294a78448c5f"
}
```

## 3. Verify the Merkle checkpoint (expect VALID)

```
python3 cain_37_independent_verifier.py verify-checkpoint cain37_evidence_chain.jsonl cain37_evidence_checkpoints.jsonl
```

## 4. Negative control -- tamper it yourself (expect FAILURE)

```bash
cp cain37_evidence_chain.jsonl tampered.jsonl
python3 - <<'PY'
import json
lines = open("tampered.jsonl").read().splitlines()
recs = [json.loads(l) for l in lines]
recs[1]["evidence"]["decision"] = "REWRITTEN_BY_YOU"
open("tampered.jsonl", "w").write("\n".join(json.dumps(r, sort_keys=True) for r in recs) + "\n")
PY
python3 cain_37_independent_verifier.py verify-chain tampered.jsonl
```

This MUST report `"verdict": "VERIFICATION_FAILURE"` with the tampered index
named. If it instead reports `VALID`, something is wrong with the verifier
and you should not trust this bundle -- please report it.

## What this does and does not prove

- Proves: these 3 evidence objects are exactly what a real 4/4-signer PBFT
  commit on CAIN's live test cluster produced at the time stated, and the
  chain has not been reordered, truncated, or edited since it was sealed.
- Does NOT prove: that the underlying PBFT consensus itself is correct (see
  CAIN_35_FINAL_FORENSIC_REPORT.md for that), that this chain is reachable
  via the public domain names (it currently is not -- see
  CAIN_37_CONNECTIVITY_FORENSICS.json in this bundle), or anything about
  hardware attestation, formal verification, or long-horizon behavior (see
  CAIN_37_LIMITATIONS.md in the repo root).
