Skip to content

adjust recursive calculation using standard gates#251

Merged
ed255 merged 3 commits intomainfrom
feat/adjust_rec_calc
Jun 10, 2025
Merged

adjust recursive calculation using standard gates#251
ed255 merged 3 commits intomainfrom
feat/adjust_rec_calc

Conversation

@ed255
Copy link
Collaborator

@ed255 ed255 commented May 30, 2025

I realized that the measure of verification cost was done on a circuit with just the NoopGate, but every time we add a gate to the set the verifier needs to perform the corresponding evaluation, so more gates add a constant overhead.
Now the measure is done with the same set of gates we use to define the recursively verifiable circuit.
With this we get a much better estimation and reduce the accuracy error of the linear regression to 2% (from 8%)

The overhead between verifying any proof with just the NoopGate and verifying a proof with all these standard gates is about 400 num_gates (rows), no matter the circuit size.

This needs to be updated once we add the gates from #236

Blocked by #236

I've extended the PR to:
resolve #253

@ed255 ed255 requested a review from arnaucube May 30, 2025 10:37
Copy link
Collaborator

@arnaucube arnaucube left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, will need to check if we would need to add a way to define extra custom gates for cases like the ecdsa introduction gadget

@ed255
Copy link
Collaborator Author

ed255 commented May 30, 2025

LGTM, will need to check if we would need to add a way to define extra custom gates for cases like the ecdsa introduction gadget

We definitely need to add the custom gates defined in #236 to the list and redo the linear regression to get accurate values. For this reason I'll leave this PR unmerged until #236 is merged so that I can adjust it :)

@ed255 ed255 force-pushed the feat/adjust_rec_calc branch from c91e4a6 to c232e1b Compare June 6, 2025 10:14
@ed255 ed255 mentioned this pull request Jun 6, 2025
1 task
@ed255 ed255 force-pushed the feat/adjust_rec_calc branch from 5c548d7 to 1be5954 Compare June 9, 2025 15:21
@ed255 ed255 force-pushed the feat/adjust_rec_calc branch from 1be5954 to 0c5738b Compare June 9, 2025 15:24
@ed255 ed255 merged commit 9c70909 into main Jun 10, 2025
6 checks passed
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.

measuring the cost of zk

2 participants