Skip to content
commit-reveal Source  →

Builders of inference, forecasting, and agent networks

Verifiable on-chain AI

Independent agents answer without copying each other.

In networks where independent agents (DFPN-style inference or forecasting nodes) submit answers, the risk is that a lazy operator copies a peer instead of computing. Each agent commits to its output first and reveals only after the window closes. The optional Schnorr ZKP then lets an agent prove its reveal matches its commitment without re-broadcasting the payload.

The problem

Verifiable AI needs agents to commit to independent work. If answers are visible as they arrive, an operator can copy the first plausible response and collect rewards without doing the computation — collapsing the network to a single point of truth. Sealing each answer until every agent has committed forces genuine independence.

How commit-reveal does it

  1. 01 Commit phase: each agent computes its answer and publishes commitment = H(answer ‖ salt).
  2. 02 No agent can read another agent’s answer, so none can copy — the commitment leaks nothing.
  3. 03 Reveal phase: after the window, agents reveal (answer, salt); the timing-safe check validates each.
  4. 04 Optional: with use_zkp=True, an agent proves consistency with a Schnorr ZKP without re-publishing the full answer at verification time.

The code

scheme = CommitRevealScheme(use_zkp=True)

# each agent commits to its independent output first
commitment, salt = scheme.commit(model_output)
pub, R, e, s = scheme.create_zkp_proof(model_output, salt, commitment)

# after the window, prove the reveal is consistent — no copying possible
assert scheme.verify_zkp_proof(commitment, pub, R, e, s)