@aztec/cli-wallet 0.87.4 → 0.87.6
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/cmds/create_account.js +1 -1
- package/dest/cmds/deploy.js +1 -1
- package/dest/cmds/deploy_account.js +1 -1
- package/dest/cmds/profile.js +1 -1
- package/dest/cmds/send.js +1 -1
- package/dest/cmds/simulate.js +2 -2
- package/dest/utils/profiling.d.ts +2 -2
- package/dest/utils/profiling.d.ts.map +1 -1
- package/dest/utils/profiling.js +13 -1
- package/package.json +12 -12
- package/src/cmds/create_account.ts +1 -1
- package/src/cmds/deploy.ts +1 -1
- package/src/cmds/deploy_account.ts +1 -1
- package/src/cmds/profile.ts +1 -1
- package/src/cmds/send.ts +1 -1
- package/src/cmds/simulate.ts +2 -2
- package/src/utils/profiling.ts +24 -2
|
@@ -83,7 +83,7 @@ export async function createAccount(client, accountType, secretKey, publicKey, a
|
|
|
83
83
|
contractAddressSalt: salt
|
|
84
84
|
});
|
|
85
85
|
if (verbose) {
|
|
86
|
-
printProfileResult(provenTx.
|
|
86
|
+
printProfileResult(provenTx.stats, log);
|
|
87
87
|
}
|
|
88
88
|
tx = provenTx.send();
|
|
89
89
|
const txHash = await tx.getTxHash();
|
package/dest/cmds/deploy.js
CHANGED
|
@@ -37,7 +37,7 @@ export async function deploy(wallet, artifactPath, json, publicKeys, rawArgs, sa
|
|
|
37
37
|
}
|
|
38
38
|
const provenTx = await deploy.prove(deployOpts);
|
|
39
39
|
if (verbose) {
|
|
40
|
-
printProfileResult(provenTx.
|
|
40
|
+
printProfileResult(provenTx.stats, log);
|
|
41
41
|
}
|
|
42
42
|
const tx = provenTx.send();
|
|
43
43
|
const txHash = await tx.getTxHash();
|
|
@@ -72,7 +72,7 @@ export async function deployAccount(account, wait, registerClass, publicDeploy,
|
|
|
72
72
|
contractAddressSalt: salt
|
|
73
73
|
});
|
|
74
74
|
if (verbose) {
|
|
75
|
-
printProfileResult(provenTx.
|
|
75
|
+
printProfileResult(provenTx.stats, log);
|
|
76
76
|
}
|
|
77
77
|
tx = provenTx.send();
|
|
78
78
|
const txHash = await tx.getTxHash();
|
package/dest/cmds/profile.js
CHANGED
|
@@ -14,7 +14,7 @@ export async function profile(wallet, functionName, functionArgsIn, contractArti
|
|
|
14
14
|
authWitnesses,
|
|
15
15
|
skipProofGeneration: false
|
|
16
16
|
});
|
|
17
|
-
printProfileResult(result.
|
|
17
|
+
printProfileResult(result.stats, log, result.executionSteps);
|
|
18
18
|
if (debugOutputPath) {
|
|
19
19
|
const ivcInputsPath = path.join(debugOutputPath, 'ivc-inputs.msgpack');
|
|
20
20
|
log(`Debug output written to ${ivcInputsPath}.`);
|
package/dest/cmds/send.js
CHANGED
|
@@ -22,7 +22,7 @@ export async function send(wallet, functionName, functionArgsIn, contractArtifac
|
|
|
22
22
|
}
|
|
23
23
|
const provenTx = await call.prove(sendOptions);
|
|
24
24
|
if (verbose) {
|
|
25
|
-
printProfileResult(provenTx.
|
|
25
|
+
printProfileResult(provenTx.stats, log);
|
|
26
26
|
}
|
|
27
27
|
const tx = provenTx.send();
|
|
28
28
|
const txHash = await tx.getTxHash();
|
package/dest/cmds/simulate.js
CHANGED
|
@@ -9,10 +9,10 @@ export async function simulate(wallet, functionName, functionArgsIn, contractArt
|
|
|
9
9
|
const simulationResult = await call.simulate({
|
|
10
10
|
...await feeOpts.toSendOpts(wallet),
|
|
11
11
|
authWitnesses,
|
|
12
|
-
|
|
12
|
+
includeStats: true
|
|
13
13
|
});
|
|
14
14
|
if (verbose) {
|
|
15
|
-
printProfileResult(simulationResult.
|
|
15
|
+
printProfileResult(simulationResult.stats, log);
|
|
16
16
|
}
|
|
17
17
|
log(format('\nSimulation result: ', simulationResult.result, '\n'));
|
|
18
18
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LogFn } from '@aztec/foundation/log';
|
|
2
2
|
import type { PrivateExecutionStep } from '@aztec/stdlib/kernel';
|
|
3
|
-
import type {
|
|
4
|
-
export declare function printProfileResult(
|
|
3
|
+
import type { ProvingStats, SimulationStats } from '@aztec/stdlib/tx';
|
|
4
|
+
export declare function printProfileResult(stats: ProvingStats | SimulationStats, log: LogFn, executionSteps?: PrivateExecutionStep[]): void;
|
|
5
5
|
//# sourceMappingURL=profiling.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiling.d.ts","sourceRoot":"","sources":["../../src/utils/profiling.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"profiling.d.ts","sourceRoot":"","sources":["../../src/utils/profiling.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAkB,eAAe,EAAqB,MAAM,kBAAkB,CAAC;AAUzG,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,YAAY,GAAG,eAAe,EACrC,GAAG,EAAE,KAAK,EACV,cAAc,CAAC,EAAE,oBAAoB,EAAE,QA6IxC"}
|
package/dest/utils/profiling.js
CHANGED
|
@@ -3,12 +3,13 @@ const FN_NAME_PADDING = 50;
|
|
|
3
3
|
const COLUMN_MIN_WIDTH = 13;
|
|
4
4
|
const COLUMN_MAX_WIDTH = 15;
|
|
5
5
|
const ORACLE_NAME_PADDING = 50;
|
|
6
|
-
export function printProfileResult(
|
|
6
|
+
export function printProfileResult(stats, log, executionSteps) {
|
|
7
7
|
log(format('\nPer circuit breakdown:\n'));
|
|
8
8
|
log(format(' ', 'Function name'.padEnd(FN_NAME_PADDING), 'Time'.padStart(COLUMN_MIN_WIDTH).padEnd(COLUMN_MAX_WIDTH), executionSteps ? 'Gates'.padStart(COLUMN_MIN_WIDTH).padEnd(COLUMN_MAX_WIDTH) : '', executionSteps ? 'Subtotal'.padStart(COLUMN_MIN_WIDTH).padEnd(COLUMN_MAX_WIDTH) : ''));
|
|
9
9
|
log(format(''.padEnd(FN_NAME_PADDING + COLUMN_MAX_WIDTH + COLUMN_MAX_WIDTH + (executionSteps ? COLUMN_MAX_WIDTH + COLUMN_MAX_WIDTH : 0), '-')));
|
|
10
10
|
let acc = 0;
|
|
11
11
|
let biggest = executionSteps?.[0];
|
|
12
|
+
const timings = stats.timings;
|
|
12
13
|
timings.perFunction.forEach((fn, i)=>{
|
|
13
14
|
const currentExecutionStep = executionSteps?.[i];
|
|
14
15
|
if (currentExecutionStep && biggest && currentExecutionStep.gateCount > biggest.gateCount) {
|
|
@@ -32,6 +33,17 @@ export function printProfileResult(timings, log, executionSteps) {
|
|
|
32
33
|
if (biggest) {
|
|
33
34
|
log(format('\nTotal gates:', acc.toLocaleString(), `(Biggest circuit: ${biggest.functionName} -> ${biggest.gateCount.toLocaleString()})`));
|
|
34
35
|
}
|
|
36
|
+
if (stats.nodeRPCCalls) {
|
|
37
|
+
log(format('\nRPC calls:\n'));
|
|
38
|
+
for (const [method, { times }] of Object.entries(stats.nodeRPCCalls)){
|
|
39
|
+
const calls = times.length;
|
|
40
|
+
const total = times.reduce((acc, time)=>acc + time, 0);
|
|
41
|
+
const avg = total / calls;
|
|
42
|
+
const min = Math.min(...times);
|
|
43
|
+
const max = Math.max(...times);
|
|
44
|
+
log(format(method.padEnd(ORACLE_NAME_PADDING), `${calls} calls`.padStart(COLUMN_MIN_WIDTH).padEnd(COLUMN_MAX_WIDTH), `${total.toFixed(2)}ms`.padStart(COLUMN_MIN_WIDTH).padEnd(COLUMN_MAX_WIDTH), `min: ${min.toFixed(2)}ms`.padStart(COLUMN_MIN_WIDTH).padEnd(COLUMN_MAX_WIDTH), `avg: ${avg.toFixed(2)}ms`.padStart(COLUMN_MIN_WIDTH).padEnd(COLUMN_MAX_WIDTH), `max: ${max.toFixed(2)}ms`.padStart(COLUMN_MIN_WIDTH).padEnd(COLUMN_MAX_WIDTH)));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
35
47
|
log(format('\nSync time:'.padEnd(25), `${timings.sync?.toFixed(2)}ms`.padStart(16)));
|
|
36
48
|
log(format('Private simulation time:'.padEnd(25), `${timings.perFunction.reduce((acc, { time })=>acc + time, 0).toFixed(2)}ms`.padStart(COLUMN_MAX_WIDTH)));
|
|
37
49
|
if (timings.proving) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/cli-wallet",
|
|
3
|
-
"version": "0.87.
|
|
3
|
+
"version": "0.87.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/cmds/index.js",
|
|
@@ -63,17 +63,17 @@
|
|
|
63
63
|
]
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@aztec/accounts": "0.87.
|
|
67
|
-
"@aztec/aztec.js": "0.87.
|
|
68
|
-
"@aztec/cli": "0.87.
|
|
69
|
-
"@aztec/entrypoints": "0.87.
|
|
70
|
-
"@aztec/ethereum": "0.87.
|
|
71
|
-
"@aztec/foundation": "0.87.
|
|
72
|
-
"@aztec/kv-store": "0.87.
|
|
73
|
-
"@aztec/noir-contracts.js": "0.87.
|
|
74
|
-
"@aztec/noir-noirc_abi": "0.87.
|
|
75
|
-
"@aztec/pxe": "0.87.
|
|
76
|
-
"@aztec/stdlib": "0.87.
|
|
66
|
+
"@aztec/accounts": "0.87.6",
|
|
67
|
+
"@aztec/aztec.js": "0.87.6",
|
|
68
|
+
"@aztec/cli": "0.87.6",
|
|
69
|
+
"@aztec/entrypoints": "0.87.6",
|
|
70
|
+
"@aztec/ethereum": "0.87.6",
|
|
71
|
+
"@aztec/foundation": "0.87.6",
|
|
72
|
+
"@aztec/kv-store": "0.87.6",
|
|
73
|
+
"@aztec/noir-contracts.js": "0.87.6",
|
|
74
|
+
"@aztec/noir-noirc_abi": "0.87.6",
|
|
75
|
+
"@aztec/pxe": "0.87.6",
|
|
76
|
+
"@aztec/stdlib": "0.87.6",
|
|
77
77
|
"commander": "^12.1.0",
|
|
78
78
|
"inquirer": "^10.1.8",
|
|
79
79
|
"source-map-support": "^0.5.21",
|
|
@@ -108,7 +108,7 @@ export async function createAccount(
|
|
|
108
108
|
} else {
|
|
109
109
|
const provenTx = await deployMethod.prove({ ...deployOpts, universalDeploy: true, contractAddressSalt: salt });
|
|
110
110
|
if (verbose) {
|
|
111
|
-
printProfileResult(provenTx.
|
|
111
|
+
printProfileResult(provenTx.stats!, log);
|
|
112
112
|
}
|
|
113
113
|
tx = provenTx.send();
|
|
114
114
|
|
package/src/cmds/deploy.ts
CHANGED
|
@@ -85,7 +85,7 @@ export async function deployAccount(
|
|
|
85
85
|
} else {
|
|
86
86
|
const provenTx = await deployMethod.prove({ ...deployOpts, universalDeploy: true, contractAddressSalt: salt });
|
|
87
87
|
if (verbose) {
|
|
88
|
-
printProfileResult(provenTx.
|
|
88
|
+
printProfileResult(provenTx.stats!, log);
|
|
89
89
|
}
|
|
90
90
|
tx = provenTx.send();
|
|
91
91
|
|
package/src/cmds/profile.ts
CHANGED
|
@@ -31,7 +31,7 @@ export async function profile(
|
|
|
31
31
|
authWitnesses,
|
|
32
32
|
skipProofGeneration: false,
|
|
33
33
|
});
|
|
34
|
-
printProfileResult(result.
|
|
34
|
+
printProfileResult(result.stats, log, result.executionSteps);
|
|
35
35
|
if (debugOutputPath) {
|
|
36
36
|
const ivcInputsPath = path.join(debugOutputPath, 'ivc-inputs.msgpack');
|
|
37
37
|
log(`Debug output written to ${ivcInputsPath}.`);
|
package/src/cmds/send.ts
CHANGED
package/src/cmds/simulate.ts
CHANGED
|
@@ -25,10 +25,10 @@ export async function simulate(
|
|
|
25
25
|
const simulationResult = await call.simulate({
|
|
26
26
|
...(await feeOpts.toSendOpts(wallet)),
|
|
27
27
|
authWitnesses,
|
|
28
|
-
|
|
28
|
+
includeStats: true,
|
|
29
29
|
});
|
|
30
30
|
if (verbose) {
|
|
31
|
-
printProfileResult(simulationResult.
|
|
31
|
+
printProfileResult(simulationResult.stats!, log);
|
|
32
32
|
}
|
|
33
33
|
log(format('\nSimulation result: ', simulationResult.result, '\n'));
|
|
34
34
|
}
|
package/src/utils/profiling.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LogFn } from '@aztec/foundation/log';
|
|
2
2
|
import type { PrivateExecutionStep } from '@aztec/stdlib/kernel';
|
|
3
|
-
import type { ProvingTimings, SimulationTimings } from '@aztec/stdlib/tx';
|
|
3
|
+
import type { ProvingStats, ProvingTimings, SimulationStats, SimulationTimings } from '@aztec/stdlib/tx';
|
|
4
4
|
|
|
5
5
|
import { format } from 'util';
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ const COLUMN_MAX_WIDTH = 15;
|
|
|
11
11
|
const ORACLE_NAME_PADDING = 50;
|
|
12
12
|
|
|
13
13
|
export function printProfileResult(
|
|
14
|
-
|
|
14
|
+
stats: ProvingStats | SimulationStats,
|
|
15
15
|
log: LogFn,
|
|
16
16
|
executionSteps?: PrivateExecutionStep[],
|
|
17
17
|
) {
|
|
@@ -39,6 +39,7 @@ export function printProfileResult(
|
|
|
39
39
|
let acc = 0;
|
|
40
40
|
let biggest: PrivateExecutionStep | undefined = executionSteps?.[0];
|
|
41
41
|
|
|
42
|
+
const timings = stats.timings;
|
|
42
43
|
timings.perFunction.forEach((fn, i) => {
|
|
43
44
|
const currentExecutionStep = executionSteps?.[i];
|
|
44
45
|
if (currentExecutionStep && biggest && currentExecutionStep.gateCount! > biggest.gateCount!) {
|
|
@@ -91,6 +92,27 @@ export function printProfileResult(
|
|
|
91
92
|
);
|
|
92
93
|
}
|
|
93
94
|
|
|
95
|
+
if (stats.nodeRPCCalls) {
|
|
96
|
+
log(format('\nRPC calls:\n'));
|
|
97
|
+
for (const [method, { times }] of Object.entries(stats.nodeRPCCalls)) {
|
|
98
|
+
const calls = times.length;
|
|
99
|
+
const total = times.reduce((acc, time) => acc + time, 0);
|
|
100
|
+
const avg = total / calls;
|
|
101
|
+
const min = Math.min(...times);
|
|
102
|
+
const max = Math.max(...times);
|
|
103
|
+
log(
|
|
104
|
+
format(
|
|
105
|
+
method.padEnd(ORACLE_NAME_PADDING),
|
|
106
|
+
`${calls} calls`.padStart(COLUMN_MIN_WIDTH).padEnd(COLUMN_MAX_WIDTH),
|
|
107
|
+
`${total.toFixed(2)}ms`.padStart(COLUMN_MIN_WIDTH).padEnd(COLUMN_MAX_WIDTH),
|
|
108
|
+
`min: ${min.toFixed(2)}ms`.padStart(COLUMN_MIN_WIDTH).padEnd(COLUMN_MAX_WIDTH),
|
|
109
|
+
`avg: ${avg.toFixed(2)}ms`.padStart(COLUMN_MIN_WIDTH).padEnd(COLUMN_MAX_WIDTH),
|
|
110
|
+
`max: ${max.toFixed(2)}ms`.padStart(COLUMN_MIN_WIDTH).padEnd(COLUMN_MAX_WIDTH),
|
|
111
|
+
),
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
94
116
|
log(format('\nSync time:'.padEnd(25), `${timings.sync?.toFixed(2)}ms`.padStart(16)));
|
|
95
117
|
log(
|
|
96
118
|
format(
|