Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Deserialization fails for large circuits #1208

Closed
liyue201 opened this issue Jul 18, 2024 · 3 comments
Closed

bug: Deserialization fails for large circuits #1208

liyue201 opened this issue Jul 18, 2024 · 3 comments

Comments

@liyue201
Copy link
Contributor

Deserialization fails when the circuit reaches around 100 million constraints

panic: cbor: exceeded max number of elements 2147483647 for CBOR array

Description

Expected Behavior

Actual Behavior

Possible Fix

Steps to Reproduce

Context

Your Environment

  • gnark v0.9.1
@readygo67
Copy link
Contributor

could you provide more infos about this issue? for example

  1. how many constraints of your circuit?
  2. how to reproduce this problem?

@ivokub
Copy link
Collaborator

ivokub commented Jul 24, 2024

Interesting, the bound is 2^31, which is somewhat limited by the internal representation we use, and it is interesting to see that you hit the limit with smaller circuits. Are you sure the circuit has approximately 100M constraints? Imo we have tried using PLONK circuits of size approximately 2^27 and it serializes well.

What proof system (Groth16, PLONK) are you using and what is the exact constraint count?

@liyue201
Copy link
Contributor Author

This place is over the limit

dm, err := cbor.DecOptions{

I see that the latest code has been optimized and this problem should no longer exist.

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

No branches or pull requests

3 participants