Skip to content

Commit bf1e275

Browse files
committed
final fix: avoid mapping over the entire zkprogram
1 parent c9c81f7 commit bf1e275

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib/proof-system/recursive.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function Recursive<
6262

6363
let methodKeys: MethodKey[] = Object.keys(methods);
6464

65-
let regularRecursiveProvers = mapObject(zkprogram, (prover, key) => {
65+
let regularRecursiveProvers = mapToObject(methodKeys, (key) => {
6666
return async function proveRecursively_(
6767
publicInput: PublicInput,
6868
...args: TupleToInstances<PrivateInputs[MethodKey]>
@@ -77,6 +77,9 @@ function Recursive<
7777
let constArgs = zip(args, privateInputs[key]).map(([arg, type]) =>
7878
Provable.toConstant(type, arg)
7979
);
80+
81+
let prover = zkprogram[key];
82+
8083
if (hasPublicInput) {
8184
let { proof } = await prover(constInput, ...constArgs);
8285
return proof;

0 commit comments

Comments
 (0)