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

feat: deserialization limits #1308

Open
ivokub opened this issue Oct 30, 2024 · 0 comments
Open

feat: deserialization limits #1308

ivokub opened this issue Oct 30, 2024 · 0 comments
Labels
consolidate strengthen an existing feature
Milestone

Comments

@ivokub
Copy link
Collaborator

ivokub commented Oct 30, 2024

We currently have no limits when deserializing compiled circuits, keys and proofs. But it would be beneficial to allow having some limits when gnark is run as a service with input coming externally to be able to bound the sizes of circuits etc.

There are several approaches:

  • add some options to the ReadFrom interfaces (max circuit size etc.). But the problem with this approach is that we would like to use io.ReaderFrom which doesn't allow to use options. Maybe we could have a wrapper option instead e.g. gnarkio.LimitSize(io.ReaderFrom) io.ReaderFrom etc.
  • implement io.LimitReader instead. But this would prevent having different limits and only limit on the file (or in-memory?) size.

cc @gbotrel

@ivokub ivokub added the consolidate strengthen an existing feature label Oct 30, 2024
@ivokub ivokub added this to the v0.12.0 milestone Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consolidate strengthen an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant