Skip to content

Commit

Permalink
chore: use 2^19 as MAX_CIRCUIT_SIZE for NodeJS CLI (#1834)
Browse files Browse the repository at this point in the history
resolves #1829 

# 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 28, 2023
1 parent 58b3c3a commit c573282
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 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,13 @@ import { Command } from 'commander';
createDebug.log = console.error.bind(console);
const debug = createDebug('bb.js');

// Maximum we support natively. It is 2^19 for browser.
const MAX_CIRCUIT_SIZE = 2 ** 23;
// Maximum we support in node and the browser is 2^19.
// This is because both node and browser use barretenberg.wasm.
//
// This is not a restriction in the bb binary and one should be
// aware of this discrepancy, when creating proofs in bb versus
// creating the same proofs in the node CLI.
const MAX_CIRCUIT_SIZE = 2 ** 19;

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

0 comments on commit c573282

Please sign in to comment.