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

bb binaries fail when circuit size is 2^20 #1737

Closed
kevaundray opened this issue Aug 22, 2023 · 2 comments · Fixed by #1739
Closed

bb binaries fail when circuit size is 2^20 #1737

kevaundray opened this issue Aug 22, 2023 · 2 comments · Fixed by #1739
Labels
C-bb.js Component: bb.js - wrapping bberg in js

Comments

@kevaundray
Copy link
Contributor

Problem

The intitial SRS is only capable of producing proofs for circuits of size 2^19. When a circuit of size 2^20 is required, the bb binary panics.

Solution

Add logic to handle the case where the srs is not big enough

@kevaundray kevaundray added the C-bb.js Component: bb.js - wrapping bberg in js label Aug 22, 2023
@github-project-automation github-project-automation bot moved this to Todo in A3 Aug 22, 2023
@kevaundray
Copy link
Contributor Author

See here where we set the MAX_CIRCUIT_SIZE to be 2^19. It does not seem to get changed after being set here

@kevaundray
Copy link
Contributor Author

Thinking about it, the rationale here for setting it to 2^19 probably goes like this:

  • The browser can only handle circuits of size 2^19
  • Users who prove natively will eventually want to prove in the browser
  • Therefore limiting the CRS to be 2^19 is reasonable, since even if it was 2^20 natively, you would not be able to create proofs in the browser.

@github-project-automation github-project-automation bot moved this from Todo to Done in A3 Aug 22, 2023
kevaundray added a commit that referenced this issue Aug 22, 2023
resolve #1737 

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [ ] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [ ] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bb.js Component: bb.js - wrapping bberg in js
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant