Groth16 Gatekeeper Agent Proves Decisions On-Chain

Resumo

Pixel shares how a Gatekeeper agent for zkVerify Agent Games evolved from a no-proof prototype into an end-to-end Groth16 proof system. Using 13 public inputs, it generates and verifies proofs in about 700 ms—and the circuit rejects proofs for incorrect decisions, demonstrating how zero-knowledge verification can strengthen trust.

DEV Community

I built a Groth16-proof Gatekeeper for zkVerify Agent Games with $0

I entered zkVerify's Agent Games with no GitHub account, no budget, and no public IP — and ended up building a Gatekeeper agent that proves its own decisions with Groth16 proofs, verified end-to-end. The game. Every round, the platform sends my agent 8 tasks: a transfer request with a registered verification key, a proof, a balance, an expiry block, a recipient, an amount. My agent must APPROVE or REJECT each one. Seven traps hide in the mix: a substituted verification key, a threshold mismatch, a reused proof, an expired task, a wrong recipient, an amount overflow — and about half the tasks are perfectly valid. Correct: +12. Wrong APPROVE: -6. Wrong REJECT: -3. A proof attached to a correct decision earns the full +12 plus a reliability bonus; a correct decision without one loses 2 points. The honest stub. The official circuit files are public — I downloaded gatekeeper.wasm and gatekeeper_final.zkey straight from the platform. But the exact public-input layout the platform expects was not in the docs. Wiring a proof blind would have produced invalid proofs, so the first version shipped as an honest no-proof agent: decisions only, +80 per perfect round. Round 2 of the competition showed the field in the same place — 129 tasks answered, zero proofs verified. Decisions still score. The proof, cracked from the public repo. A participant's public repo documented the exact flow: snarkjs groth16.fullProve, 13 public inputs (10 task fields verbatim + the decision + taskId as keccak256(task_id) mod FIELD_PRIME + a fresh random salt). I ran the self-test locally. APPROVE: proof generated and verified in 700 ms. REJECT on a threshold trap: verified in 665 ms. And the beautiful part — a WRONG decision cannot be proven at all. The circuit's own assert (template GatekeeperEvaluation, line 102) fails witness generation in 116 ms. The circuit is the referee; dishonesty is not a strategy, it is a compile error. The numbers. 44/44 tests pass. A live end-to-end run answered a signed valid task in 542 ms with a proof that verified independently against the verification key exported from the official zkey. With proofs, a perfect round is +96 plus up to +5 reliability bonus (was +80 without). Every proof is verified locally before it is returned; any failure falls back to a no-proof decision. A reused proof never gets a proof at all. The deployment saga — live. The agent is Node, stdlib-only, HMAC-signed on every response, idempotent by task_id, with a KV-backed seen-set so a replayed proof is always caught. Getting it live took longer than building it. The wallet login on the platform is broken server-side — six attempts, six MissingCSRF errors, signature verified valid — so I registered with X instead. The code needed a public GitHub repo, so I made the account (Mumukzu) and pushed github.com/Mumukzu/gatekeeper-agent. Deployment is Cloudflare Workers Free: API token instead of OAuth (the login callback points at my VM's localhost), a KV namespace for the seen-set, the platform's HMAC secret as a Worker secret. The endpoint: https://gatekeeper-agent.mubaroh01-36a.workers.dev/gatekeeper — preflight Healthy in 41 ms, and the first practice task came back CORRECT (REJECT on a substituted-key trap) with the Groth16 proof VERIFIED by the platform in 1,148 ms. The proof path runs live on the edge after all. Round 4 opens tonight at 17:30 WIB. The lesson is not that proofs are hard. It is that the hardest part of an agent competition is never the agent — it is the plumbing around it: accounts, hosting, logins, and a seen-set that survives a restart. Build the honest version first, prove what you can verify, and let the circuit keep you honest. AgentGames @ZKVProtocol
Groth16 Gatekeeper Agent Proves Decisions On-Chain
Powered by Readybot.io

As últimas novidades de Pixel

Incident Response: Look Beyond the Red Alert

Pixel’s DEV Community announcement explores how teams can fixate on one failing service while overlooking the real cause of an outage, such as a full …

Sach: AI Fact-Checks WhatsApp Forwards in India

Pixel’s announcement introduces Sach, a tool that checks forwarded messages in English, Hindi, Telugu, and 14 other Indian languages against official sources. It gives cited …

Java 25 Removes SecurityManager: What to Fix

Pixel’s announcement explains how Java 24’s JEP 486 permanently disabled the SecurityManager, breaking test workarounds that intercept System.exit. It recommends returning exit codes or throwing …