Skip to content

research: onchain-gas-baseline - #85

Open
alexandre-mrt wants to merge 1 commit into
mainfrom
claude/intelligent-cannon-cnoabe
Open

alexandre-mrt wants to merge 1 commit into
mainfrom
claude/intelligent-cannon-cnoabe

Conversation

@alexandre-mrt

Copy link
Copy Markdown
Owner

Summary

Nightly research run — queue item #1: on-chain gas per entry point, measured with real Groth16 proofs on a local Sui network (scripts/bench/gas-bench.ts).

  • Gas (net MIST): deposit 1.80M, shielded_transfer 2.88–3.12M, compliant_transfer 5.29M, zk_withdraw 4.45M. Computation is a flat 1,000,000 MIST floor on every tx → verification is not the cost driver, storage churn is. Batched verification (old research: contra confidential transfers PoC + nightly research loop #3) re-ranked down.
  • Security finding (threat-model E7): pool::zk_withdraw never binds recipient to the proof's recipientHash. A valid proof was accepted with an unrelated recipient on localnet (raw output in the report). docs/threat-model.md E7 changed from Mitigated to OPEN; fix queued as feat: Veil privacy payment protocol — full stack MVP #1. Not fixed in this PR (one experiment per night).
  • Toolchain unblocked: Sui 1.72.4 release binary, circom built from source, ptau regenerated locally (Hermez bucket 403 — dev-only).
  • Full suites green: circuits 43+30+35, scripts 109, Move 124/124, frontend 19.

Report: docs/research/2026-10-05-onchain-gas-baseline.md. Verdict: KEEP. BASELINE/LEDGER/EXPERIMENTS updated.

Note: the branch is claude/intelligent-cannon-cnoabe (session-designated) rather than research/….

🤖 Generated with Claude Code

https://claude.ai/code/session_01KzPPx2UPRwUtYit6mLTSgP


Generated by Claude Code

…ng (E7)

Measured gas per entry point with real Groth16 proofs on a local Sui network
(scripts/bench/gas-bench.ts). Computation is a flat 1,000,000 MIST floor; cost is
storage churn. Found that zk_withdraw never binds recipient to recipientHash;
threat-model E7 updated to OPEN. Queue re-ranked, BASELINE updated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KzPPx2UPRwUtYit6mLTSgP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants