-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1918 from o1-labs/fix-list-limit
Increase max branches in a circuit
- Loading branch information
Showing
3 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule bindings
updated
12 files
+116,958 −116,891 | compiled/node_bindings/o1js_node.bc.cjs | |
+1 −1 | compiled/node_bindings/o1js_node.bc.map | |
+499 −499 | compiled/node_bindings/plonk_wasm.cjs | |
+205 −205 | compiled/node_bindings/plonk_wasm.d.cts | |
+ − | compiled/node_bindings/plonk_wasm_bg.wasm | |
+326 −326 | compiled/node_bindings/plonk_wasm_bg.wasm.d.ts | |
+41 −41 | compiled/web_bindings/o1js_web.bc.js | |
+345 −345 | compiled/web_bindings/plonk_wasm.d.ts | |
+216 −216 | compiled/web_bindings/plonk_wasm.js | |
+ − | compiled/web_bindings/plonk_wasm_bg.wasm | |
+253 −253 | compiled/web_bindings/plonk_wasm_bg.wasm.d.ts | |
+20 −0 | ocaml/lib/pickles_bindings.ml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { Field } from '../provable/wrapped.js'; | ||
import { ZkProgram } from './zkprogram.js'; | ||
|
||
const methodCount = 30; | ||
|
||
let MyProgram = ZkProgram({ | ||
name: 'large-program', | ||
publicOutput: Field, | ||
methods: nMethods(methodCount), | ||
}); | ||
|
||
function nMethods(i: number) { | ||
let methods: Record<string, any> = {}; | ||
for (let j = 0; j < i; j++) { | ||
methods['method' + j] = { | ||
privateInputs: [Field], | ||
async method(a: Field) { | ||
return { | ||
publicOutput: a.mul(1), | ||
}; | ||
}, | ||
}; | ||
} | ||
return methods; | ||
} | ||
|
||
try { | ||
await MyProgram.compile(); | ||
} catch (error) { | ||
throw Error( | ||
`Could not compile zkProgram with ${methodCount} branches: ${error}` | ||
); | ||
} |