Skip to content

Commit

Permalink
fix: proving fails when circuit has size > ~500K (#1739)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
kevaundray authored Aug 22, 2023
1 parent 4c89941 commit 708b05c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions circuits/cpp/barretenberg/cpp/src/barretenberg/bb/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@
#include <vector>

using namespace barretenberg;

uint32_t MAX_CIRCUIT_SIZE = 1 << 19;
// The maximum size that we can do in the browser is 2^19
// based on memory constraints for UltraPlonk.
// However, since this will be ran natively, we can increase the
// size.
uint32_t MAX_CIRCUIT_SIZE = 1 << 23;
std::string CRS_PATH = "./crs";
bool verbose = false;

Expand Down
4 changes: 2 additions & 2 deletions circuits/cpp/barretenberg/ts/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { Command } from 'commander';
createDebug.log = console.error.bind(console);
const debug = createDebug('bb.js');

// Maximum we support.
const MAX_CIRCUIT_SIZE = 2 ** 19;
// Maximum we support natively. It is 2^19 for browser.
const MAX_CIRCUIT_SIZE = 2 ** 23;

function getBytecode(bytecodePath: string) {
const encodedCircuit = readFileSync(bytecodePath, 'utf-8');
Expand Down

0 comments on commit 708b05c

Please sign in to comment.