Repository navigation
research: onchain-gas-baseline - #91
Open
alexandre-mrt wants to merge 1 commit into
Open
alexandre-mrt wants to merge 1 commit into
alexandre-mrt wants to merge 1 commit into
Conversation
Builds sui from the pinned rev, measures gas for 8 entry points with real Groth16 proofs on localnet, isolates verifier cost via an N-call PTB probe. Verify ~270k MIST = 9.4% of shielded_transfer; storage is 65%. Updates BASELINE, LEDGER, EXPERIMENTS (aggregation demoted, storage item added). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TG7BPaetzKjNgyRCUAsGNh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was tested
Queue item #1: on-chain gas per entry point. Hypothesis — Groth16 verification is ≥ 50 % of
shielded_transfernet gas, so aggregation is the top gas lever.Result (verdict: KEEP — hypothesis refuted, baseline established)
sui1.72.1 from the revisioncontracts/Move.tomlpins (45m52s), ran a localnet, drove 8 entry points with real Groth16 proofs.shielded_transfer: 2,872,944 MIST net. Computation is floored at 1,000,000 MIST for every call; storage is 65 % of net.prepare_verifying_key. Matches the protocol-config constants within ~2 %.sui move test124/124.Caveats: localnet at RGP 1000, not mainnet;
compliant_transfernot driven; pot15 regenerated locally (Hermez ptau no longer downloadable) so proving-time rows were not re-run.Tests
Move 124/124, circuits 43/30/35, converter, compliance utils, fuzz (6 properties), frontend vitest 19 — all green.
No circuit or contract code changed (no soundness/leakage delta).
Writeup:
docs/research/2026-10-11-onchain-gas-baseline.md. Bench:scripts/bench/gas-local.ts.🤖 Generated with Claude Code
https://claude.ai/code/session_01TG7BPaetzKjNgyRCUAsGNh
Generated by Claude Code