CAIN-42 CAIN Studio
CAIN-42 Academy

CFVE · Module 3 of 5 · 11 min

Proof-carrying actions and code

A proof-carrying action ships with evidence that it satisfies policy, which the receiver checks cheaply instead of trusting the sender.

In CAIN, proofs are bound to the exact action by hash: change any parameter and the proof no longer matches.

The receiver verifies; it never assumes. A missing or mismatched proof is a refusal.

Key points

  • Ship the proof with the action.
  • Bind proof to action by hash.
  • Missing/mismatched proof = refuse.

In the CAIN-42 codebase

  • cain/cain_proof_carrying_code.py — proof-carrying code
  • actionproof/ — ActionProof

Practice check

Practice 1 · choose one

A parameter changes after the proof was made. The proof…

Practice 2 · true or false

“The receiver should trust the sender's statement that a proof exists.”