MershTrust

Proving one AI decision without handing over the whole log

MershLab ·

Short answerGive the other side a receipt: the one event, the Merkle path from its hash to the run's sealed root, the run's capsule, and an inclusion proof for the run in a public transparency log. They can check that exact event belongs to that run without seeing any other event.

The problem with sending the whole run

When a customer disputes a decision, say a declined loan or a refused refund, you need to show what the system decided and on what basis. Sending the entire run exposes every other step, often other customers' data and internal prompts. Sending only the one step proves nothing, because nothing ties it to the rest.

What a receipt contains

PartWhat it proves
The eventWhat was decided, with hashes of its inputs and outputs
The Merkle pathThis event is one of the leaves under the run's Merkle root, at this position
The capsuleThe run's sealed root, event count and identity
The log inclusion proofThis run was appended to the public transparency log

How it is checked

  1. Recompute the event's leaf hash from its fields. A changed field fails here.
  2. Walk the Merkle path up to the capsule's root. An event from elsewhere fails here.
  3. Check the claimed position against the event's sequence number and the run's size.
  4. If the disputing party holds the inputs or outputs, hash them and compare.
  5. Pin the receipt to something the checker already trusts: the run's capsule hash, given to them at the time, or a published log root.

Why pinning is the step that matters

A receipt invented from nothing is internally consistent too: anyone can build an event, a tree and a capsule that agree with each other. The receipt only proves something when it is anchored to a value the checker obtained independently. That is why the verifier reports an unpinned receipt as unverified, even when every other check passes.

from mershtrust import verify_receipt

result = verify_receipt(receipt, log_root=published_root)
for check in result.checks:
    print(check.name, check.passed)

The same check exists in the TypeScript verifier, with the same check names, so a receipt can be verified in a browser.

Questions

What is a Merkle proof?
A short list of sibling hashes that lets you recompute a tree's root from one leaf. If the result equals the published root, the leaf is in the tree.
Does a receipt reveal the rest of the run?
No. It reveals one event plus hashes of its siblings in the tree, which say nothing about their content.
Why does a receipt need a published root?
Because a self consistent receipt can be fabricated. Checking it against a root the checker already holds is what makes it evidence.

Read next