@aztec/aztec 5.0.0-nightly.20260430 → 5.0.0-nightly.20260502
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/cli/aztec_start_options.d.ts +1 -1
- package/dest/cli/aztec_start_options.d.ts.map +1 -1
- package/dest/cli/aztec_start_options.js +0 -6
- package/dest/cli/cmds/profile.d.ts +1 -1
- package/dest/cli/cmds/profile.d.ts.map +1 -1
- package/dest/cli/cmds/profile.js +1 -1
- package/dest/cli/cmds/profile_gates.d.ts +2 -2
- package/dest/cli/cmds/profile_gates.d.ts.map +1 -1
- package/dest/cli/cmds/profile_gates.js +21 -3
- package/dest/cli/cmds/start_prover_agent.js +2 -2
- package/dest/cli/cmds/start_prover_broker.js +2 -2
- package/package.json +33 -33
- package/src/cli/aztec_start_options.ts +1 -9
- package/src/cli/cmds/profile.ts +2 -1
- package/src/cli/cmds/profile_gates.ts +20 -4
- package/src/cli/cmds/start_prover_agent.ts +2 -2
- package/src/cli/cmds/start_prover_broker.ts +2 -2
|
@@ -14,4 +14,4 @@ export declare const NETWORK_FLAG = "network";
|
|
|
14
14
|
export declare const aztecStartOptions: {
|
|
15
15
|
[key: string]: AztecStartOption[];
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXp0ZWNfc3RhcnRfb3B0aW9ucy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NsaS9henRlY19zdGFydF9vcHRpb25zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQU9BLE9BQU8sRUFDTCxLQUFLLGFBQWEsRUFDbEIsS0FBSyxNQUFNLEVBSVosTUFBTSwwQkFBMEIsQ0FBQztBQWVsQyxNQUFNLFdBQVcsZ0JBQWdCO0lBQy9CLElBQUksRUFBRSxNQUFNLENBQUM7SUFDYixXQUFXLEVBQUUsTUFBTSxDQUFDO0lBQ3BCLFlBQVksRUFBRSxHQUFHLENBQUM7SUFDbEIsWUFBWSxDQUFDLEVBQUUsQ0FBQyxHQUFHLEVBQUUsR0FBRyxLQUFLLE1BQU0sQ0FBQztJQUNwQyxHQUFHLEVBQUUsTUFBTSxHQUFHLFNBQVMsQ0FBQztJQUN4QixRQUFRLENBQUMsRUFBRSxNQUFNLEVBQUUsQ0FBQztJQUNwQixRQUFRLENBQUMsRUFBRSxDQUFDLEdBQUcsRUFBRSxNQUFNLEtBQUssR0FBRyxDQUFDO0NBQ2pDO0FBRUQsZUFBTyxNQUFNLFVBQVUsbUdBb0J0QixDQUFDO0FBMkJGLGVBQU8sTUFBTSxnQkFBZ0IsVUFZNUIsQ0FBQztBQUVGLGVBQU8sTUFBTSxZQUFZLFlBQVksQ0FBQztBQUd0QyxlQUFPLE1BQU0saUJBQWlCLEVBQUU7SUFBRSxDQUFDLEdBQUcsRUFBRSxNQUFNLEdBQUcsZ0JBQWdCLEVBQUUsQ0FBQTtDQTJPbEUsQ0FBQyJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aztec_start_options.d.ts","sourceRoot":"","sources":["../../src/cli/aztec_start_options.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,MAAM,EAIZ,MAAM,0BAA0B,CAAC;AAelC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,GAAG,CAAC;IAClB,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,CAAC;IACpC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,GAAG,CAAC;CACjC;AAED,eAAO,MAAM,UAAU,mGAoBtB,CAAC;AA2BF,eAAO,MAAM,gBAAgB,UAY5B,CAAC;AAEF,eAAO,MAAM,YAAY,YAAY,CAAC;AAGtC,eAAO,MAAM,iBAAiB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"aztec_start_options.d.ts","sourceRoot":"","sources":["../../src/cli/aztec_start_options.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,MAAM,EAIZ,MAAM,0BAA0B,CAAC;AAelC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,GAAG,CAAC;IAClB,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,CAAC;IACpC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,GAAG,CAAC;CACjC;AAED,eAAO,MAAM,UAAU,mGAoBtB,CAAC;AA2BF,eAAO,MAAM,gBAAgB,UAY5B,CAAC;AAEF,eAAO,MAAM,YAAY,YAAY,CAAC;AAGtC,eAAO,MAAM,iBAAiB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;CA2OlE,CAAC"}
|
|
@@ -279,12 +279,6 @@ export const aztecStartOptions = {
|
|
|
279
279
|
...getOptions('bot', botConfigMappings)
|
|
280
280
|
],
|
|
281
281
|
PXE: [
|
|
282
|
-
{
|
|
283
|
-
flag: '--pxe',
|
|
284
|
-
description: 'Starts Aztec PXE with options',
|
|
285
|
-
defaultValue: undefined,
|
|
286
|
-
env: undefined
|
|
287
|
-
},
|
|
288
282
|
...getOptions('pxe', allPxeConfigMappings)
|
|
289
283
|
],
|
|
290
284
|
TXE: [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { LogFn } from '@aztec/foundation/log';
|
|
2
2
|
import type { Command } from 'commander';
|
|
3
3
|
export declare function injectProfileCommand(program: Command, log: LogFn): Command;
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZmlsZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NsaS9jbWRzL3Byb2ZpbGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsS0FBSyxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFFbkQsT0FBTyxLQUFLLEVBQUUsT0FBTyxFQUFFLE1BQU0sV0FBVyxDQUFDO0FBS3pDLHdCQUFnQixvQkFBb0IsQ0FBQyxPQUFPLEVBQUUsT0FBTyxFQUFFLEdBQUcsRUFBRSxLQUFLLEdBQUcsT0FBTyxDQWtCMUUifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/profile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/profile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,GAAG,OAAO,CAkB1E"}
|
package/dest/cli/cmds/profile.js
CHANGED
|
@@ -2,7 +2,7 @@ import { profileFlamegraph } from './profile_flamegraph.js';
|
|
|
2
2
|
import { profileGates } from './profile_gates.js';
|
|
3
3
|
export function injectProfileCommand(program, log) {
|
|
4
4
|
const profile = program.command('profile').description('Profile compiled Aztec artifacts.');
|
|
5
|
-
profile.command('gates').argument('[target-dir]', 'Path to the compiled artifacts directory', './target').description('Display gate counts for all compiled Aztec artifacts in a target directory.').action((targetDir)=>profileGates(targetDir, log));
|
|
5
|
+
profile.command('gates').argument('[target-dir]', 'Path to the compiled artifacts directory', './target').option('--json', 'Output gate counts as JSON instead of a table', false).description('Display gate counts for all compiled Aztec artifacts in a target directory.').action((targetDir, options)=>profileGates(targetDir, options.json, log));
|
|
6
6
|
profile.command('flamegraph').argument('<contract-artifact>', 'Path to the compiled contract artifact JSON').argument('<function>', 'Name of the contract function to profile').description('Generate a gate count flamegraph SVG for a contract function.').action((artifactPath, functionName)=>profileFlamegraph(artifactPath, functionName, log));
|
|
7
7
|
return program;
|
|
8
8
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { LogFn } from '@aztec/foundation/log';
|
|
2
2
|
/** Profiles all compiled artifacts in a target directory and prints gate counts. */
|
|
3
|
-
export declare function profileGates(targetDir: string, log: LogFn): Promise<void>;
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
3
|
+
export declare function profileGates(targetDir: string, json: boolean, log: LogFn): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZmlsZV9nYXRlcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NsaS9jbWRzL3Byb2ZpbGVfZ2F0ZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsT0FBTyxLQUFLLEVBQUUsS0FBSyxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFnQ25ELG9GQUFvRjtBQUNwRix3QkFBc0IsWUFBWSxDQUFDLFNBQVMsRUFBRSxNQUFNLEVBQUUsSUFBSSxFQUFFLE9BQU8sRUFBRSxHQUFHLEVBQUUsS0FBSyxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FnRDlGIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile_gates.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/profile_gates.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"profile_gates.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/profile_gates.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAgCnD,oFAAoF;AACpF,wBAAsB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAgD9F"}
|
|
@@ -23,21 +23,39 @@ const execFile = promisify(execFileCb);
|
|
|
23
23
|
]);
|
|
24
24
|
return parseGateCount(stdout);
|
|
25
25
|
}
|
|
26
|
-
/** Profiles all compiled artifacts in a target directory and prints gate counts. */ export async function profileGates(targetDir, log) {
|
|
26
|
+
/** Profiles all compiled artifacts in a target directory and prints gate counts. */ export async function profileGates(targetDir, json, log) {
|
|
27
27
|
const bb = process.env.BB ?? findBbBinary() ?? 'bb';
|
|
28
28
|
const { artifacts, tmpDir } = await discoverArtifacts(targetDir);
|
|
29
29
|
if (artifacts.length === 0) {
|
|
30
|
-
|
|
30
|
+
if (json) {
|
|
31
|
+
log('[]');
|
|
32
|
+
} else {
|
|
33
|
+
log('No artifacts found in target directory.');
|
|
34
|
+
}
|
|
31
35
|
return;
|
|
32
36
|
}
|
|
33
37
|
try {
|
|
34
38
|
const results = await asyncPool(MAX_CONCURRENT, artifacts, async (artifact)=>({
|
|
35
39
|
name: artifact.name,
|
|
40
|
+
type: artifact.type,
|
|
36
41
|
gateCount: await getGateCount(bb, artifact.filePath)
|
|
37
42
|
}));
|
|
38
43
|
results.sort((a, b)=>a.name.localeCompare(b.name));
|
|
39
44
|
if (results.length === 0) {
|
|
40
|
-
|
|
45
|
+
if (json) {
|
|
46
|
+
log('[]');
|
|
47
|
+
} else {
|
|
48
|
+
log('No constrained circuits found.');
|
|
49
|
+
}
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (json) {
|
|
53
|
+
const entries = results.map((r)=>({
|
|
54
|
+
name: r.name,
|
|
55
|
+
type: r.type,
|
|
56
|
+
gates: r.gateCount
|
|
57
|
+
}));
|
|
58
|
+
log(JSON.stringify(entries, null, 2));
|
|
41
59
|
return;
|
|
42
60
|
}
|
|
43
61
|
const maxNameLen = Math.max(...results.map((r)=>r.name.length));
|
|
@@ -8,8 +8,8 @@ import { initTelemetryClient, makeTracedFetch, telemetryClientConfigMappings } f
|
|
|
8
8
|
import { extractRelevantOptions, preloadCrsDataForServerSideProving } from '../util.js';
|
|
9
9
|
import { getVersions } from '../versioning.js';
|
|
10
10
|
export async function startProverAgent(options, signalHandlers, services, userLog) {
|
|
11
|
-
if (options.node || options.sequencer || options.
|
|
12
|
-
userLog(`Starting a prover agent with --node, --sequencer, --
|
|
11
|
+
if (options.node || options.sequencer || options.p2pBootstrap || options.txe) {
|
|
12
|
+
userLog(`Starting a prover agent with --node, --sequencer, --p2p-bootstrap, or --txe is not supported.`);
|
|
13
13
|
process.exit(1);
|
|
14
14
|
}
|
|
15
15
|
const config = {
|
|
@@ -8,8 +8,8 @@ import { getConfigEnvVars as getTelemetryClientConfig, initTelemetryClient } fro
|
|
|
8
8
|
import { extractRelevantOptions } from '../util.js';
|
|
9
9
|
import { computeExpectedGenesisRoot, waitForCompatibleRollup } from './standby.js';
|
|
10
10
|
export async function startProverBroker(options, signalHandlers, services, userLog) {
|
|
11
|
-
if (options.node || options.sequencer || options.
|
|
12
|
-
userLog(`Starting a prover broker with --node, --sequencer, --
|
|
11
|
+
if (options.node || options.sequencer || options.p2pBootstrap || options.txe) {
|
|
12
|
+
userLog(`Starting a prover broker with --node, --sequencer, --p2p-bootstrap, or --txe is not supported.`);
|
|
13
13
|
process.exit(1);
|
|
14
14
|
}
|
|
15
15
|
const config = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/aztec",
|
|
3
|
-
"version": "5.0.0-nightly.
|
|
3
|
+
"version": "5.0.0-nightly.20260502",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -28,38 +28,38 @@
|
|
|
28
28
|
"../package.common.json"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@aztec/accounts": "5.0.0-nightly.
|
|
32
|
-
"@aztec/archiver": "5.0.0-nightly.
|
|
33
|
-
"@aztec/aztec-node": "5.0.0-nightly.
|
|
34
|
-
"@aztec/aztec.js": "5.0.0-nightly.
|
|
35
|
-
"@aztec/bb-prover": "5.0.0-nightly.
|
|
36
|
-
"@aztec/bb.js": "5.0.0-nightly.
|
|
37
|
-
"@aztec/blob-client": "5.0.0-nightly.
|
|
38
|
-
"@aztec/bot": "5.0.0-nightly.
|
|
39
|
-
"@aztec/builder": "5.0.0-nightly.
|
|
40
|
-
"@aztec/cli": "5.0.0-nightly.
|
|
41
|
-
"@aztec/constants": "5.0.0-nightly.
|
|
42
|
-
"@aztec/entrypoints": "5.0.0-nightly.
|
|
43
|
-
"@aztec/ethereum": "5.0.0-nightly.
|
|
44
|
-
"@aztec/foundation": "5.0.0-nightly.
|
|
45
|
-
"@aztec/kv-store": "5.0.0-nightly.
|
|
46
|
-
"@aztec/l1-artifacts": "5.0.0-nightly.
|
|
47
|
-
"@aztec/node-lib": "5.0.0-nightly.
|
|
48
|
-
"@aztec/noir-contracts.js": "5.0.0-nightly.
|
|
49
|
-
"@aztec/noir-protocol-circuits-types": "5.0.0-nightly.
|
|
50
|
-
"@aztec/p2p": "5.0.0-nightly.
|
|
51
|
-
"@aztec/p2p-bootstrap": "5.0.0-nightly.
|
|
52
|
-
"@aztec/protocol-contracts": "5.0.0-nightly.
|
|
53
|
-
"@aztec/prover-client": "5.0.0-nightly.
|
|
54
|
-
"@aztec/prover-node": "5.0.0-nightly.
|
|
55
|
-
"@aztec/pxe": "5.0.0-nightly.
|
|
56
|
-
"@aztec/sequencer-client": "5.0.0-nightly.
|
|
57
|
-
"@aztec/stdlib": "5.0.0-nightly.
|
|
58
|
-
"@aztec/telemetry-client": "5.0.0-nightly.
|
|
59
|
-
"@aztec/txe": "5.0.0-nightly.
|
|
60
|
-
"@aztec/validator-ha-signer": "5.0.0-nightly.
|
|
61
|
-
"@aztec/wallets": "5.0.0-nightly.
|
|
62
|
-
"@aztec/world-state": "5.0.0-nightly.
|
|
31
|
+
"@aztec/accounts": "5.0.0-nightly.20260502",
|
|
32
|
+
"@aztec/archiver": "5.0.0-nightly.20260502",
|
|
33
|
+
"@aztec/aztec-node": "5.0.0-nightly.20260502",
|
|
34
|
+
"@aztec/aztec.js": "5.0.0-nightly.20260502",
|
|
35
|
+
"@aztec/bb-prover": "5.0.0-nightly.20260502",
|
|
36
|
+
"@aztec/bb.js": "5.0.0-nightly.20260502",
|
|
37
|
+
"@aztec/blob-client": "5.0.0-nightly.20260502",
|
|
38
|
+
"@aztec/bot": "5.0.0-nightly.20260502",
|
|
39
|
+
"@aztec/builder": "5.0.0-nightly.20260502",
|
|
40
|
+
"@aztec/cli": "5.0.0-nightly.20260502",
|
|
41
|
+
"@aztec/constants": "5.0.0-nightly.20260502",
|
|
42
|
+
"@aztec/entrypoints": "5.0.0-nightly.20260502",
|
|
43
|
+
"@aztec/ethereum": "5.0.0-nightly.20260502",
|
|
44
|
+
"@aztec/foundation": "5.0.0-nightly.20260502",
|
|
45
|
+
"@aztec/kv-store": "5.0.0-nightly.20260502",
|
|
46
|
+
"@aztec/l1-artifacts": "5.0.0-nightly.20260502",
|
|
47
|
+
"@aztec/node-lib": "5.0.0-nightly.20260502",
|
|
48
|
+
"@aztec/noir-contracts.js": "5.0.0-nightly.20260502",
|
|
49
|
+
"@aztec/noir-protocol-circuits-types": "5.0.0-nightly.20260502",
|
|
50
|
+
"@aztec/p2p": "5.0.0-nightly.20260502",
|
|
51
|
+
"@aztec/p2p-bootstrap": "5.0.0-nightly.20260502",
|
|
52
|
+
"@aztec/protocol-contracts": "5.0.0-nightly.20260502",
|
|
53
|
+
"@aztec/prover-client": "5.0.0-nightly.20260502",
|
|
54
|
+
"@aztec/prover-node": "5.0.0-nightly.20260502",
|
|
55
|
+
"@aztec/pxe": "5.0.0-nightly.20260502",
|
|
56
|
+
"@aztec/sequencer-client": "5.0.0-nightly.20260502",
|
|
57
|
+
"@aztec/stdlib": "5.0.0-nightly.20260502",
|
|
58
|
+
"@aztec/telemetry-client": "5.0.0-nightly.20260502",
|
|
59
|
+
"@aztec/txe": "5.0.0-nightly.20260502",
|
|
60
|
+
"@aztec/validator-ha-signer": "5.0.0-nightly.20260502",
|
|
61
|
+
"@aztec/wallets": "5.0.0-nightly.20260502",
|
|
62
|
+
"@aztec/world-state": "5.0.0-nightly.20260502",
|
|
63
63
|
"@iarna/toml": "^2.2.5",
|
|
64
64
|
"@types/chalk": "^2.2.0",
|
|
65
65
|
"abitype": "^0.8.11",
|
|
@@ -326,15 +326,7 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
|
|
|
326
326
|
},
|
|
327
327
|
...getOptions('bot', botConfigMappings),
|
|
328
328
|
],
|
|
329
|
-
PXE: [
|
|
330
|
-
{
|
|
331
|
-
flag: '--pxe',
|
|
332
|
-
description: 'Starts Aztec PXE with options',
|
|
333
|
-
defaultValue: undefined,
|
|
334
|
-
env: undefined,
|
|
335
|
-
},
|
|
336
|
-
...getOptions('pxe', allPxeConfigMappings),
|
|
337
|
-
],
|
|
329
|
+
PXE: [...getOptions('pxe', allPxeConfigMappings)],
|
|
338
330
|
TXE: [
|
|
339
331
|
{
|
|
340
332
|
flag: '--txe',
|
package/src/cli/cmds/profile.ts
CHANGED
|
@@ -11,8 +11,9 @@ export function injectProfileCommand(program: Command, log: LogFn): Command {
|
|
|
11
11
|
profile
|
|
12
12
|
.command('gates')
|
|
13
13
|
.argument('[target-dir]', 'Path to the compiled artifacts directory', './target')
|
|
14
|
+
.option('--json', 'Output gate counts as JSON instead of a table', false)
|
|
14
15
|
.description('Display gate counts for all compiled Aztec artifacts in a target directory.')
|
|
15
|
-
.action((targetDir: string) => profileGates(targetDir, log));
|
|
16
|
+
.action((targetDir: string, options: { json: boolean }) => profileGates(targetDir, options.json, log));
|
|
16
17
|
|
|
17
18
|
profile
|
|
18
19
|
.command('flamegraph')
|
|
@@ -6,12 +6,13 @@ import { execFile as execFileCb } from 'child_process';
|
|
|
6
6
|
import { rm } from 'fs/promises';
|
|
7
7
|
import { promisify } from 'util';
|
|
8
8
|
|
|
9
|
-
import { MAX_CONCURRENT, discoverArtifacts } from './profile_utils.js';
|
|
9
|
+
import { type DiscoveredArtifact, MAX_CONCURRENT, discoverArtifacts } from './profile_utils.js';
|
|
10
10
|
|
|
11
11
|
const execFile = promisify(execFileCb);
|
|
12
12
|
|
|
13
13
|
interface GateCountResult {
|
|
14
14
|
name: string;
|
|
15
|
+
type: DiscoveredArtifact['type'];
|
|
15
16
|
gateCount: number;
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -32,24 +33,39 @@ async function getGateCount(bb: string, artifactPath: string): Promise<number> {
|
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
/** Profiles all compiled artifacts in a target directory and prints gate counts. */
|
|
35
|
-
export async function profileGates(targetDir: string, log: LogFn): Promise<void> {
|
|
36
|
+
export async function profileGates(targetDir: string, json: boolean, log: LogFn): Promise<void> {
|
|
36
37
|
const bb = process.env.BB ?? findBbBinary() ?? 'bb';
|
|
37
38
|
const { artifacts, tmpDir } = await discoverArtifacts(targetDir);
|
|
38
39
|
|
|
39
40
|
if (artifacts.length === 0) {
|
|
40
|
-
|
|
41
|
+
if (json) {
|
|
42
|
+
log('[]');
|
|
43
|
+
} else {
|
|
44
|
+
log('No artifacts found in target directory.');
|
|
45
|
+
}
|
|
41
46
|
return;
|
|
42
47
|
}
|
|
43
48
|
|
|
44
49
|
try {
|
|
45
50
|
const results: GateCountResult[] = await asyncPool(MAX_CONCURRENT, artifacts, async artifact => ({
|
|
46
51
|
name: artifact.name,
|
|
52
|
+
type: artifact.type,
|
|
47
53
|
gateCount: await getGateCount(bb, artifact.filePath),
|
|
48
54
|
}));
|
|
49
55
|
results.sort((a, b) => a.name.localeCompare(b.name));
|
|
50
56
|
|
|
51
57
|
if (results.length === 0) {
|
|
52
|
-
|
|
58
|
+
if (json) {
|
|
59
|
+
log('[]');
|
|
60
|
+
} else {
|
|
61
|
+
log('No constrained circuits found.');
|
|
62
|
+
}
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (json) {
|
|
67
|
+
const entries = results.map(r => ({ name: r.name, type: r.type, gates: r.gateCount }));
|
|
68
|
+
log(JSON.stringify(entries, null, 2));
|
|
53
69
|
return;
|
|
54
70
|
}
|
|
55
71
|
|
|
@@ -24,8 +24,8 @@ export async function startProverAgent(
|
|
|
24
24
|
services: NamespacedApiHandlers,
|
|
25
25
|
userLog: LogFn,
|
|
26
26
|
) {
|
|
27
|
-
if (options.node || options.sequencer || options.
|
|
28
|
-
userLog(`Starting a prover agent with --node, --sequencer, --
|
|
27
|
+
if (options.node || options.sequencer || options.p2pBootstrap || options.txe) {
|
|
28
|
+
userLog(`Starting a prover agent with --node, --sequencer, --p2p-bootstrap, or --txe is not supported.`);
|
|
29
29
|
process.exit(1);
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -24,8 +24,8 @@ export async function startProverBroker(
|
|
|
24
24
|
services: NamespacedApiHandlers,
|
|
25
25
|
userLog: LogFn,
|
|
26
26
|
): Promise<{ broker: ProvingJobBroker; config: ProverBrokerConfig }> {
|
|
27
|
-
if (options.node || options.sequencer || options.
|
|
28
|
-
userLog(`Starting a prover broker with --node, --sequencer, --
|
|
27
|
+
if (options.node || options.sequencer || options.p2pBootstrap || options.txe) {
|
|
28
|
+
userLog(`Starting a prover broker with --node, --sequencer, --p2p-bootstrap, or --txe is not supported.`);
|
|
29
29
|
process.exit(1);
|
|
30
30
|
}
|
|
31
31
|
|