Skip to content

Commit dc4bdfa

Browse files
committed
chore: add crsPath option
1 parent 8706812 commit dc4bdfa

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

web-starter/web/nextjs/pages/api/verify.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { NextApiRequest, NextApiResponse } from 'next';
2-
import { UltraHonkBackend } from '@aztec/bb.js';
2+
import { UltraHonkBackend, BarretenbergVerifier } from '@aztec/bb.js';
33
import { promises as fs } from 'fs';
44
import path from 'path';
55

@@ -12,7 +12,13 @@ async function initializeCircuit() {
1212
const circuitPath = path.resolve(process.cwd(), '../../circuits/target/noir_uh_starter.json');
1313
const circuitData = await fs.readFile(circuitPath, 'utf-8');
1414
circuit = JSON.parse(circuitData);
15-
honk = new UltraHonkBackend(circuit.bytecode, { threads: 8 });
15+
honk = new UltraHonkBackend(circuit.bytecode, {
16+
threads: 8,
17+
18+
// By default, bb.js downloads CRS files to ~/.bb-crs. For serverless environments where
19+
// this path isn't writable, configure an alternate path (e.g. /tmp) using crsPath option
20+
// crsPath: `/tmp`
21+
});
1622
}
1723
}
1824

0 commit comments

Comments
 (0)