Skip to content

Add ERC: AI Inference Proof Verification Interfaces#1771

Open
JimmyShi22 wants to merge 43 commits into
ethereum:masterfrom
JimmyShi22:master
Open

Add ERC: AI Inference Proof Verification Interfaces#1771
JimmyShi22 wants to merge 43 commits into
ethereum:masterfrom
JimmyShi22:master

Conversation

@JimmyShi22

@JimmyShi22 JimmyShi22 commented May 26, 2026

Copy link
Copy Markdown

ERC-8274 v0.2 — Two-layer inference verification interfaces

This PR introduces ERC-8274, defining three minimal abstract interfaces organized into two composable layers for on-chain AI inference proof verification.

What this ERC defines

IProofVerifier — inner algorithm layer, implemented by proof system providers (ZK teams, TEE vendors, oracle networks, attestation gateways). Stateless. Answers: "is this proof cryptographically valid for this input and output?"

function verify(bytes32 inputHash, bytes32 outputHash, bytes calldata metadata, bytes calldata proof) external returns (bool);
function proofSystem() external view returns (string memory);  // e.g. "zk/sp1", "attestation/judgment"
function proofProfile() external view returns (bytes32);       // deployment-specific fingerprint

IAgentVerifier — outer application layer, implemented by agent developers. Stateful. Wraps one or more IProofVerifier(s). Answers: "for this task, was this agent authorized and does the proof confirm it?"

function verify(bytes32 taskId, bytes32 agentId, bytes32 inputHash, bytes32 outputHash, bytes calldata proof)
    external returns (bool valid, bytes32 verificationDigest);

event VerificationCompleted(bytes32 indexed taskId, bytes32 indexed agentId, bytes32 indexed verificationDigest,
    bool valid, bytes32 inputHash, bytes32 outputHash, bytes32 agentProofProfile);

IAgentVerifiable — declaration layer for settlement contracts; declares which IAgentVerifier is in use and emits AgentVerifierUpdated on any change.

Key design decisions

Two-layer separation. Proof system providers implement IProofVerifier without knowing the application context. Agent developers implement IAgentVerifier without being coupled to a specific proof system. Settlement contracts call IAgentVerifier without knowing the backend. Each layer is independently deployable and auditable.

verificationDigest commitment. IAgentVerifier.verify() returns a bytes32 digest computed from keccak256(abi.encode(taskId, agentId, inputHash, outputHash, valid, agentProofProfile)). VerificationCompleted carries all preimage fields alongside the digest, making every record independently verifiable by any observer without querying live contract state — following OCP's recompute → compare → confirm model.

proofSystem() paradigm taxonomy. Four paradigms are named: zk, op, tee, attestation. Within attestation, three variants are named: multisig, wyriwe, judgment. This allows consumers to inspect and reason about trust assumptions without reading implementation internals.

metadata ownership. Invariant deployment configuration (circuit key, enclave hash, signer registry address) is stored in IAgentVerifier and passed to IProofVerifier on each call. Settlement contracts never encode or see it.

OCP alignment. VerificationCompleted is designed so any observer can apply OCP's three-step procedure (recompute → compare → confirm inclusion) independently, covering both on-chain and off-chain verification contexts.

Input provenance. IProofVerifier.verify()'s inputHash maps directly to WYRIWE's triple-commitment input_hash field. WyriweProofVerifier is already deployed on mainnet and implements IProofVerifier directly.

Proof anchoring. verify() confirms cryptographic validity but not when the proof was generated. The proof anchoring rationale section describes how an on-chain anchor registry closes this gap at the IAgentVerifier layer.

Note on cross-references: OCP, WYRIWE, and the proof anchoring work are referenced by name in the current spec rather than by ERC number. The corresponding PRs have not yet been formally merged, so direct ERC links would fail CI checks. References will be updated once those PRs land.

Reference implementation (3-layer stack)

  1. SP1ProofVerifier (Layer 1 — IProofVerifier) — ZK backend; decodes programVKey from metadata; proofProfile() includes VERIFIER_HASH to fingerprint the specific verifier deployment.
  2. AgentVerifier (Layer 2 — IAgentVerifier) — wraps SP1ProofVerifier; stores metadata and authorized agent set; enforces single-use taskId; computes and emits verificationDigest.
  3. ProofEvaluator (Layer 3 — ERC-8183 settlement) — implements IAgentVerifiable; calls IAgentVerifier.verify() at settlement time; forwards verificationDigest as job.reason.

Pre-submission alignment

  • Damon Zwicker (OCP author) — the OCP primitive and recompute → compare → confirm framing shaped the VerificationCompleted event design; discussed in the Ethereum Magicians thread.
  • Tiago Merlini (WYRIWE, ERC-8004) — the WYRIWE input provenance work clarified the inputHash contract; WyriweProofVerifier provides a ready-made IProofVerifier backend; attestation/wyriwe is a named proofSystem() variant.
  • Vincent Wu (ERC-8263) — the proof anchoring layer closes the temporal gap that pure cryptographic verification leaves open; discussed and confirmed in the Ethereum Magicians thread.

Changes from v0.1

  • Replaced single-interface design (IProofVerifier + IVerificationMethod) with two-layer architecture (IProofVerifier + IAgentVerifier + IAgentVerifiable)
  • verify() is no longer view; returns (bool valid, bytes32 verificationDigest) instead of bool
  • Replaced name() + version() with proofSystem() (paradigm/variant string) and proofProfile() (deployment fingerprint)
  • Added VerificationCompleted event with agentProofProfile and full preimage fields
  • Added verificationDigest commitment following OCP
  • metadata ownership clarified: stored in IAgentVerifier, never exposed to settlement contracts
  • Reference implementation updated to 3-layer composable stack
  • Added Composability in Practice section (ERC-8183 and WYRIWE integration examples)

Discussion

Ethereum Magicians thread: https://ethereum-magicians.org/t/erc-8274-ai-inference-proof-verification/28083

@eip-review-bot

eip-review-bot commented May 26, 2026

Copy link
Copy Markdown
Collaborator

File ERCS/erc-8274.md

Requires 1 more review from Editors: @g11tech, @jochem-brouwer, @samwilsn, @xinbenlv

@github-actions github-actions Bot added w-ci and removed w-ci labels May 26, 2026
@eip-review-bot eip-review-bot changed the title Add ERC: Standard Interfaces for AI Inference Proof Verification Add ERC: AI Inference Proof Verification Interfaces May 26, 2026
@github-actions github-actions Bot added w-ci and removed w-ci labels May 26, 2026
@github-actions github-actions Bot removed the w-ci label May 26, 2026
@JimmyShi22 JimmyShi22 changed the title Add ERC: AI Inference Proof Verification Interfaces Add ERC-8288: AI Inference Proof Verification Interfaces May 26, 2026
@JimmyShi22 JimmyShi22 changed the title Add ERC-8288: AI Inference Proof Verification Interfaces Add ERC-8xxx: AI Inference Proof Verification Interfaces May 26, 2026
@JimmyShi22 JimmyShi22 changed the title Add ERC-8xxx: AI Inference Proof Verification Interfaces Add ERC: AI Inference Proof Verification Interfaces May 26, 2026
Comment thread ERCS/erc-8288.md Outdated
Comment thread ERCS/erc-8288.md Outdated
Comment thread ERCS/erc-8288.md Outdated
Co-authored-by: Andrew B Coathup <28278242+abcoathup@users.noreply.github.com>
…dings

- Remove ERC-8263 number pattern from On-Chain Proof Anchoring section
  to resolve eipw markdown-link-first conflict with HTMLProofer (ERC-8263
  PR ethereum#1748 not yet merged; cross-reference deferred to v0.2)
- Rename Rationale subsections to Primitive/Design/Query/Result pattern
  for symmetric coverage framing
@github-actions github-actions Bot removed the w-ci label May 29, 2026
@JimmyShi22

Copy link
Copy Markdown
Author

@damonzwicker all check passed

@JimmyShi22

Copy link
Copy Markdown
Author

@abcoathup Hi editor, the ERC draft is fully prepared and ready for the official review and merging process. Thank you for your assistance with the next steps—your support is much appreciated!

@github-actions github-actions Bot added the w-ci label Jun 12, 2026
…cture

- Shorten description to ≤140 chars and remove forbidden word 'standard'
- Add markdown links for first occurrences of ERC-8281, ERC-8299, ERC-8263
- Move 'Composability in Practice' inside Reference Implementation
- Rename original Reference Implementation content to 'Coding in Practice'
- Demote Layer 1/2/3 from ### to ####
…rop unmerged ERC numbers

- Add [EIP-712](./eip-712.md) link at first plain-text occurrence (eipw markdown-link-first)
- Remove ERC-8275 from bullet point (unmerged, no file to link to)
- Replace ERC-8281/8299/8263 references with OCP/WYRIWE/descriptive text (HTMLProofer: files don't exist)
@github-actions github-actions Bot removed the w-ci label Jun 12, 2026
babyblueviper1 and others added 4 commits June 12, 2026 14:06
Concrete wiring of the attestation/judgment variant per t/28083 ethereum#97-#102: inner-layer verify semantics + verdict encoding, Type A/B deterministic-bool aggregation (derived confidence, outcome-oracle dependency stated explicitly, self-dealing guard), recordPointer accountability invariants, optional WYRIWE L4 execution binding, production reference data.
…, conformance-aligned

Carries TMerlini's expanded WYRIWE subsection ('drop it in, no PR needed from my side') with three constructions aligned to the filed ERC-8299 normative text per the same-day conformance review: sanitizationPipelineHash keeps the || rawInputHash binding; non-sentinel inputHash = keccak256(sanitized_input) per the verification invariant; the judgment mapping uses the L4 JudgmentExecutionAttestation fields (verdictHash = keccak256(verdict_artifact_ref || rawProposalHash)) rather than overloading L3 fields. Co-authored-by: TMerlini <tmerlini@users.noreply.github.com>
…n (t/28083 ethereum#106)

Per TMerlini's ask: one note distinguishing sanitizationPipelineHash (pipeline declared + bound to a raw input) from inputHash (what the model received) so the two commitments read as complementary, not contradictory.
…section

Composability in Practice: add Judgment Validator subsection (attestation/judgment)
@github-actions github-actions Bot added the w-ci label Jun 13, 2026
ERC-8299, ERC-8263, ERC-8275 not yet merged — eipw markdown-link-first
and HTMLProofer both fail when referenced by number without an existing
target file. Replace with WYRIWE, proof anchoring, and settlement
periodId respectively.
Removed redundant statement about anchor leg satisfaction in ERC-8274 documentation.
@github-actions github-actions Bot removed the w-ci label Jun 13, 2026
Per t/28083 convergence + JimmyShi22 go-ahead (ethereum#122).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added the w-ci label Jun 15, 2026
@github-actions

Copy link
Copy Markdown

The commit 10ed575 (as a parent of 6c9f1d2) contains errors.
Please inspect the Run Summary for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants