Skip to content

Commit 68028b2

Browse files
committed
fix: use js prover on CI
1 parent 16d205c commit 68028b2

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

packages/contracts/sdk/backendSdk.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import type { UltraHonkBackend } from "@aztec/bb.js";
1+
import { UltraHonkBackend } from "@aztec/bb.js";
22
import { utils } from "@repo/utils";
3+
import os from "node:os";
34
import type { AsyncOrSync } from "ts-essentials";
45
import { NativeUltraHonkBackend } from "./NativeUltraHonkBackend";
56
import { RollupService } from "./RollupOnlyService";
@@ -14,11 +15,14 @@ export function createBackendSdk(
1415
const rollup = new RollupService(coreSdk.contract, trees, {
1516
rollup: utils.iife(async () => {
1617
const { Noir } = await import("@noir-lang/noir_js");
17-
const noir = new Noir(await compiledCircuits.rollup);
18-
const backend = new NativeUltraHonkBackend(
19-
`${process.env.HOME}/.bb/bb`,
20-
await compiledCircuits.rollup,
21-
) as unknown as UltraHonkBackend;
18+
const circuit = await compiledCircuits.rollup;
19+
const noir = new Noir(circuit);
20+
const backend = process.env.CI
21+
? new UltraHonkBackend(circuit.bytecode, { threads: os.cpus().length })
22+
: (new NativeUltraHonkBackend(
23+
`${process.env.HOME}/.bb/bb`,
24+
circuit,
25+
) as unknown as UltraHonkBackend);
2226
return { noir, backend };
2327
}),
2428
});

0 commit comments

Comments
 (0)