i turned the SHALL rules in the Specification section into a foundry test suite and ran it on forks against five escrows: the reference code in the ERC, Circle’s arc testnet deployment, ArcBounty’s arc mainnet escrow, G2 Jobs on arc mainnet (@apexfaucet-hub) and Virtuals’ AgenticCommerceV3 on base. nothing is sent on chain, every job lives and dies on the fork.
of 29 SHALL rules, the reference code, Circle and ArcBounty pass 25, G2 28 and Virtuals 22. the matrix and what each gap means are in docs/CONFORMANCE.md of github.com/vijaygopalbalasa/judge-protocol
the four the reference code misses are worth fixing in the ERC itself, since deployments copy it. fund has no expectedBudget, the front-running check @javierpmateos raised in #425, and it’s the only gap here that can move money: a client who approved more than the agreed price can be charged a budget the provider raised just before. only the provider can call setBudget. fund accepts a zero budget. submit accepts an Open job whose budget is 0.
G2’s one gap and most of Virtuals’ look deliberate: settle-on-silence instead of a refund for submitted work, the 15 minute evaluator grace period, jobs with no evaluator.
the suite checks itself on every run: an escrow written from the spec alone passes all 30 tests, and 34 planted single-rule violations each make at least one fail. adding another deployment is one small adapter contract. happy to add yours, or to hear where i read a rule wrong.
Thanks @vijaygopalbalasa for running this. I checked the four reference-code gaps against the current erc-8183.md and they hold:
fund: the Specification says it SHALL revert on a zero budget and when job.budget != expectedBudget, but the reference fund(uint256 jobId, bytes optParams) takes no expectedBudget and transfers whatever job.budget is at execution. The shorter snippet earlier in the ERC, fund(uint256 jobId, uint256 expectedBudget), does have the check, so the document currently disagrees with itself.
setBudget: the Specification allows client or provider; the reference reverts unless the caller is the provider.
submit: the Specification requires Funded; the reference also accepts Open with a zero budget.
One thing for whoever fixes it: adding expectedBudget changes the selector of fund, so escrows that already copied the reference keep the old ABI and the old behavior. Until they redeploy, the protection a client actually has is its ERC-20 allowance: approving exactly the agreed amount makes a raised budget fail at transferFrom instead of charging more.
Happy to open a PR against the reference implementation if the authors want it.
@javierpmateos thanks for checking them against the text. one data point for whoever writes the fix: of the five escrows in the suite, two already have the front-running guard, G2 Jobs on arc mainnet and Virtuals’ AgenticCommerceV3 on base, and both take fund(uint256,uint256,bytes), the same shape as fund(jobId, expectedBudget, optParams?) in the Specification section. so a reference that adopts that signature would match an ABI that’s already deployed. the three without the guard are the reference code, circle’s arc testnet deployment and arcbounty’s mainnet escrow.
agreed on the allowance: docs/CONFORMANCE.md already tells clients of those three to approve exactly the agreed budget right before funding. if the PR goes ahead, i’ll run the suite against your branch and post the result here.
Thank you, this is exactly the kind of test we hoped someone would run.
Two changes on our side, both live today:
Hash binding. Our provider now commits keccak256 of the exact bytes served at the deliverable link (submitWithUri), not of the answer text. Checked end to end: the file fetched through our CDN hashes to the committed value. So an evaluator can download the link and verify it with no extra step.
Your point on silence is right. Under settle-on-silence, “the delivery cannot be loaded” and “the bytes do not match the hash” have to become an explicit reject with a reason, and silence should be kept for the evaluator’s own outages. We will say that plainly in our evaluator guidance.
On the kill fee for a missing or mismatched delivery: agreed that it should not pay. The deployed contracts have no owner and no upgrade path, so this can only change in a new version; until then a client who wants that protection can create the job with kill fee 0 (createJobWithTerms).
The 1 h minimum window: noted, rulings need to be on demand, not a periodic sweep.
Happy for G2 to stay in your matrix, and thanks for the 28/29.
On the evaluator side of this: now that providers commit keccak256 of the exact bytes served, the missing half is the evaluator committing to its own ruling. One way that needs no new role is to make reason the sha256 of a signed verdict anyone can fetch and rerun. A rejected provider then points at the verdict and the check it failed, and a client who was paid out against can show what was delivered against what was declared, both held to the hashes on chain.
We run a check of that shape for x402 endpoints, free: it judges a delivered answer against the output schema the provider declared and returns a verdict signed with a published key, canonical JSON per RFC 8785, so its hash is stable. It checks form, not truth, and it cannot judge taste; what it can say is whether what came back is what was declared, which is the part a contract can act on without trusting anyone’s opinion.
For jobs here the schema would come from the job. Before we build that: what would an evaluator contract need the verdict to carry to release on it and record its hash in reason?
I’d bind the signed verdict to chain ID, escrow address, job ID, deliverable hash, agreed schema hash, decision and expiry. The evaluator contract would verify its configured signer and those bindings before acting; reason can record the verdict hash. A useful negative test: replay a valid verdict against another job or escrow deployment and require rejection.
Agree on those bindings, and on the replay test. Two things we ran into with a signed statement of this shape in production (an Ed25519-signed pass on about 25,000 agents on Base, valid three hours), which may be worth writing into the evaluator guidance:
Put the signer’s key id inside the signed body, and publish the evaluator’s keys with the date each one starts and stops signing. Without that, a verdict stops being checkable once the evaluator rotates its key, and disputes over old jobs can outlive a key.
Give “could not check” its own field, separate from reject. If the deliverable cannot be fetched or its hash cannot be computed, the signed verdict should say so, with the reason. That keeps silence for the evaluator’s own outages, as @apexfaucet-hub put it above, and lets a client tell “the provider failed” apart from “the evaluator could not look”.
On the evaluator committing to its own ruling: a signed verdict can still be quietly reissued with a different decision. Appending verdicts to a Merkle log and putting the log head on chain closes that. We do it daily with a zero-value self-transaction on Base that carries the head in calldata; the first one, today, cost about 0.0000002 ETH.
ERC-8183 leaves the decision to a single evaluator and says “No dispute resolution or arbitration; reject/expire is final.” We have an open protocol that decides whether an executor gets paid through an on-chain dispute, and a small evaluator contract that lets an 8183 job use that decision. We would like feedback on whether this is useful before going further.
How it works: the client links its 8183 job to an OMEGA job before submission. OMEGA pays an executor only after its result survives a challenge window: a bisection game ending in a one-step proof, Optimism’s fault dispute games for output roots, or a cloned Cannon game for MIPS64 programs. When a result is false, every job built on it is voided before it pays and honest downstream executors are compensated from the faulty executor’s stake. Anyone can then call decide, which calls complete exactly when OMEGA paid the 8183 provider and reject when it did not. The evaluator holds no funds and has no owner.
Two questions: (1) is anyone running 8183 jobs whose deliverable can be recomputed by a deterministic program, and on which chain? (2) is an evaluator that can revert until a dispute ends (instead of deciding at once) compatible with how you expect expiredAt to be used?
On Sepolia the evaluator decided three jobs linked to OMEGA jobs that had already ended: one completed (paid executor = provider), two rejected (a disputed false result; a provider other than the paid executor). decide cost 306k-325k gas. The 8183 side there is our own mock written from the EIP text, not another team’s deployment.
It changes only the reference implementation: fund(uint256 jobId, uint256 expectedBudget, bytes optParams) with the zero-budget and expectedBudget checks, setBudget callable by client or provider, and submit limited to Funded jobs. The meta-transaction example uses the same signature. Happy to adjust if the suite flags anything I read wrong.
@mavenjang that’s useful Sepolia evidence for the deterministic path. The limit you name is the one that covers most 8183 jobs: writing and design work cannot be recomputed by a program, so a bisection or fault-dispute game cannot decide them.
For those jobs the evaluator is a rater, not a prover. A panel of evaluators (the pattern @armanalabsai sketched in #429, still open on how clients tell evaluators apart) can be placed on one logit scale with a many-facet Rasch model. Each signed complete or reject then carries that evaluator’s severity and its standard error, in the reason field or a standard event, so a client can compare harshness across committees over time.
For non-reproducible deliverables, would you rather see severity, standard error, fit to the Rasch model on the evaluator profile, or on each verdict?
Both, split by what changes. … both, split by what changes. On each verdict: the severity and its standard error as estimated when the verdict is signed, plus the id or hash of the calibration run they came from, so a verdict stays checkable after the profile moves on (the same reason as the key id in #438). On the evaluator profile: fit to the model and the severity history, since fit only means something over many ratings.
One thing has to hold before a client can rely on those numbers: a many-facet model only places evaluators on one scale if their ratings are connected, i.e. evaluators share jobs or anchor items. On today’s deployments that overlap barely exists. In @vijaygopalbalasa’s census, third parties evaluate 37 of 81,252 jobs (0.05%) on Virtuals’ contract on Base, and on Circle’s Arc testnet about half of the paid third-party volume goes to five evaluators, each named by a single client. So a committee design like #429 would have to create the overlap on purpose: rotate members across committees and seed a few calibration jobs with a known rating.
We can build an open reference for this, MIT: (1) a verdict format with @ted0x’s bindings from #437, a key id, a model id, severity, standard error and a separate “could not check” outcome, verified on chain with the replay test; (2) a many-facet Rasch estimator that reads those verdicts, with a simulation of how many shared ratings it takes to get an evaluator’s severity below a given standard error. Would you be open to advising on the measurement side (model choice, anchoring, fit thresholds)? We would write the contracts and tests.
SignedVerdictEvaluator8183: acts only on an EIP-712 verdict from a registered rater key, binding #437’s fields plus key id, model id, severity, standard error, calibration run and a “could not check” outcome that changes nothing on the escrow. 24 tests. Refused: the same verdict twice, a replay to another job, another escrow or another evaluator deployment on the same escrow, a tampered severity or deliverable hash, expired or future-dated verdicts, compromised keys, keys used outside their validity, high-s signatures. A retired key’s earlier verdicts stay valid. Limit: getJob has no deliverable field, so the deliverable hash is checked against JobSubmitted off chain.
measurement/: a many-facet Rasch estimator and a synthetic committee simulation (21 raters, 20 replications). With fixed committees the reported standard error keeps falling while the real error stalls. With committees of 3 and 1008 jobs, the SE reads 0.20 logits but the actual error is 0.41. Rotating committees bring it to 0.20 vs 0.21. Six calibration jobs per committee connect fixed committees but leave about 0.25.
@drmattbarney one measurement question: with 3 to 5 raters per job, joint estimation deflates infit toward (L-1)/L, so we calibrate it against data simulated from the fitted model. Would you use that null, or something else?
@javierpmateos ran the suite against the reference in your PR (72b2654) as its own target: all 30 tests pass, including the four the current reference fails (zero budget, expectedBudget mismatch, client calling setBudget, submit on an unfunded job). the published reference still gets 26 of 30, the same four, so nothing else moved. nothing flagged that you read wrong.
it now runs on every plain forge test next to the published one, if anyone wants to re-run it: vijaygopalbalasa/judge-protocol at commit 344e974, contract ConformanceReferencePR2144 in contracts/test/conformance/Targets.t.sol (from contracts/: forge test --match-contract ConformanceReferencePR2144)
@mavenjang on (1) in #439: yes. our judge (Judge Protocol) is the evaluator on ERC-8183 jobs on Arc testnet and on ArcBounty’s escrow on Arc mainnet, and it only rules on checks a program can recompute. the criteria are written into the job description at createJob, the judge re-runs them on the delivered bytes, and anyone can run the same verifier on the same inputs and get the same verdict. so the deterministic case exists on a live chain, it’s just small.
on (2): an evaluator that reverts until a dispute ends only works while the job is short of expiredAt. after expiredAt the Specification refunds a Funded or Submitted job through claimRefund, so a dispute still open at expiry gets overtaken by the refund. the conformance suite from #432 checks exactly this (claimRefund on a submitted job at expiry refunds in full): the reference, Circle’s arc testnet escrow and ArcBounty’s follow it, G2 Jobs settles on silence instead, and Virtuals’ contract waits 15 minutes past expiry. so the challenge window has to close before expiredAt, or the client has to set expiredAt with the dispute window in mind.
and the census numbers in #442 are right (docs/CENSUS.md in the same repo).
Thanks for running it and keeping it in the suite. 30/30 on 72b2654 with nothing else moving is what I hoped for. I’ll link your run from the PR so the authors can see it.
one thing worth putting next to #2144. the eip.md in erc-8183/base-contracts (at 142e669) has moved past the text on eips.ethereum.org, on the same points #2144 touches:
only the provider calls setBudget, and it sets a per-job token too (setBudget(jobId, token, amount), fund(jobId, expectedToken, expectedBudget))
zero-budget jobs are allowed: fund takes a 0 budget, and submit works on an Open job with budget 0
the provider may reject an Open job
claimRefund can expire an Open job
submitted work only becomes refundable one hour after expiredAt (the grace period from #61 and #63)
i ran the same 30 tests, written from the published text, against that code: 24 pass, and the 6 failures are exactly those points, so the code matches its own eip.md. it’s in the suite now as ConformanceBaseContracts142e669 (vijaygopalbalasa/judge-protocol, contracts/test/conformance/BaseContracts.t.sol).
so #2144 and the repo pull in opposite directions on three of its four changes (zero budget, who sets the budget, submit before funding); only the expectedBudget check is in both. @javierpmateos@miratisu which text should #2144 and new deployments follow?
and a correction to my #445: under the repo’s text a dispute window can run up to an hour past expiredAt for submitted work, so that much slack exists there. under the published text it doesn’t.
Thanks, that’s useful context. I wrote #2144 against the published text, since that’s what eips.ethereum.org shows and what the suite reads. If base-contracts reflects where the standard is going, then it’s the published Specification that should change, and which text is canonical is the authors’ call.
To keep #2144 uncontroversial in the meantime, I’m happy to narrow it to the one change both texts agree on: fund checks expectedBudget and reverts on a mismatch, which is also the only one of the four that can move money. The zero-budget, setBudget caller and submit-before-funding changes can wait until the authors decide which text the reference should follow.
@miratisu would a PR limited to the expectedBudget check work for you?