Skip to content

Commit

Permalink
Update on-chain-verifier.md
Browse files Browse the repository at this point in the history
  • Loading branch information
GUJustin committed Aug 22, 2024
1 parent cdb09f1 commit 269c239
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions book/src/future/on-chain-verifier.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Estimated costs of on-chain verifier with no proof composition

We expect more than 1 million gas but (with enough optimization) less than 2 million gas, with proofs that are a couple of dozen KBs in size.
We expect proof storage and verification to cost about 2 million gas, with proofs that are a couple of dozen KBs in size.
A crude and speculative explanation of where this estimate comes from is below.

## Details
Expand Down Expand Up @@ -35,8 +35,7 @@ Sum-check verification is simply field work, let's say ~100 field ops total per

All told we can ballpark the total number of field ops done by the verifier as about $2,000$, and Fiat-Shamir-hashing at most 40 KBs of data.

The gas costs of this hashing, plus field work, plus storing the entire proof in CALLDATA, should be well under $1$ million,
and perhaps as little as a few hundred thousand gas with enough optimization.
The gas costs of this hashing, plus field work, plus storing the entire proof in CALLDATA, should be under $1$ million.

Combined with the ~1 million gas to perform scalar multiplications and pairings, we obtain an estimate of between 1.3 million and 2 million gas in total.

0 comments on commit 269c239

Please sign in to comment.