@aztec/cli-wallet 0.85.0-alpha-testnet.2 → 0.85.0-nightly.20250418
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/profile.d.ts.map +1 -1
- package/dest/cmds/profile.js +4 -18
- package/package.json +12 -15
- package/src/cmds/profile.ts +4 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/cmds/profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,0BAA0B,EAAE,WAAW,EAAE,KAAK,YAAY,EAAY,MAAM,iBAAiB,CAAC;AAE5G,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/cmds/profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,0BAA0B,EAAE,WAAW,EAAE,KAAK,YAAY,EAAY,MAAM,iBAAiB,CAAC;AAE5G,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AA6BnD,wBAAsB,OAAO,CAC3B,MAAM,EAAE,0BAA0B,EAClC,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,GAAG,EAAE,EACrB,oBAAoB,EAAE,MAAM,EAC5B,eAAe,EAAE,YAAY,EAC7B,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,aAAa,EAAE,WAAW,EAAE,EAC5B,GAAG,EAAE,KAAK,iBAeX"}
|
package/dest/cmds/profile.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Contract } from '@aztec/aztec.js';
|
|
2
2
|
import { prepTx } from '@aztec/cli/utils';
|
|
3
|
-
import {
|
|
4
|
-
import { encode } from '@msgpack/msgpack';
|
|
3
|
+
import { serializePrivateExecutionSteps } from '@aztec/stdlib/kernel';
|
|
5
4
|
import { promises as fs } from 'fs';
|
|
6
5
|
import path from 'path';
|
|
7
6
|
import { format } from 'util';
|
|
@@ -16,20 +15,6 @@ function printProfileResult(result, log) {
|
|
|
16
15
|
});
|
|
17
16
|
log(format('\nTotal gates:', acc.toLocaleString()));
|
|
18
17
|
}
|
|
19
|
-
// TODO(#7371): This is duplicated.
|
|
20
|
-
// Longer term we won't use this hacked together msgpack format
|
|
21
|
-
// Leaving duplicated as this eventually bb will provide a serialization
|
|
22
|
-
// helper for passing to a generic msgpack RPC endpoint.
|
|
23
|
-
async function _createClientIvcProofFiles(directory, executionSteps) {
|
|
24
|
-
const acirPath = path.join(directory, 'acir.msgpack');
|
|
25
|
-
const witnessPath = path.join(directory, 'witnesses.msgpack');
|
|
26
|
-
await fs.writeFile(acirPath, encode(executionSteps.map((map)=>map.bytecode)));
|
|
27
|
-
await fs.writeFile(witnessPath, encode(executionSteps.map((map)=>serializeWitness(map.witness))));
|
|
28
|
-
return {
|
|
29
|
-
acirPath,
|
|
30
|
-
witnessPath
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
18
|
export async function profile(wallet, functionName, functionArgsIn, contractArtifactPath, contractAddress, debugOutputPath, authWitnesses, log) {
|
|
34
19
|
const profileMode = debugOutputPath ? 'full' : 'gates';
|
|
35
20
|
const { functionArgs, contractArtifact } = await prepTx(contractArtifactPath, functionName, functionArgsIn, log);
|
|
@@ -41,7 +26,8 @@ export async function profile(wallet, functionName, functionArgsIn, contractArti
|
|
|
41
26
|
});
|
|
42
27
|
printProfileResult(result, log);
|
|
43
28
|
if (debugOutputPath) {
|
|
44
|
-
|
|
45
|
-
|
|
29
|
+
const ivcInputsPath = path.join(debugOutputPath, 'ivc-inputs.msgpack');
|
|
30
|
+
log(`Debug output written to ${ivcInputsPath}.`);
|
|
31
|
+
await fs.writeFile(ivcInputsPath, serializePrivateExecutionSteps(result.executionSteps));
|
|
46
32
|
}
|
|
47
33
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/cli-wallet",
|
|
3
|
-
"version": "0.85.0-
|
|
3
|
+
"version": "0.85.0-nightly.20250418",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/cmds/index.js",
|
|
@@ -23,8 +23,6 @@
|
|
|
23
23
|
"build": "yarn clean && tsc -b",
|
|
24
24
|
"build:dev": "tsc -b --watch",
|
|
25
25
|
"clean": "rm -rf ./dest .tsbuildinfo",
|
|
26
|
-
"formatting": "run -T prettier --check ./src && run -T eslint ./src",
|
|
27
|
-
"formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src",
|
|
28
26
|
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
|
|
29
27
|
},
|
|
30
28
|
"inherits": [
|
|
@@ -65,18 +63,17 @@
|
|
|
65
63
|
]
|
|
66
64
|
},
|
|
67
65
|
"dependencies": {
|
|
68
|
-
"@aztec/accounts": "0.85.0-
|
|
69
|
-
"@aztec/aztec.js": "0.85.0-
|
|
70
|
-
"@aztec/cli": "0.85.0-
|
|
71
|
-
"@aztec/entrypoints": "0.85.0-
|
|
72
|
-
"@aztec/ethereum": "0.85.0-
|
|
73
|
-
"@aztec/foundation": "0.85.0-
|
|
74
|
-
"@aztec/kv-store": "0.85.0-
|
|
75
|
-
"@aztec/noir-contracts.js": "0.85.0-
|
|
76
|
-
"@aztec/noir-noirc_abi": "0.85.0-
|
|
77
|
-
"@aztec/pxe": "0.85.0-
|
|
78
|
-
"@aztec/stdlib": "0.85.0-
|
|
79
|
-
"@msgpack/msgpack": "^3.0.0-beta2",
|
|
66
|
+
"@aztec/accounts": "0.85.0-nightly.20250418",
|
|
67
|
+
"@aztec/aztec.js": "0.85.0-nightly.20250418",
|
|
68
|
+
"@aztec/cli": "0.85.0-nightly.20250418",
|
|
69
|
+
"@aztec/entrypoints": "0.85.0-nightly.20250418",
|
|
70
|
+
"@aztec/ethereum": "0.85.0-nightly.20250418",
|
|
71
|
+
"@aztec/foundation": "0.85.0-nightly.20250418",
|
|
72
|
+
"@aztec/kv-store": "0.85.0-nightly.20250418",
|
|
73
|
+
"@aztec/noir-contracts.js": "0.85.0-nightly.20250418",
|
|
74
|
+
"@aztec/noir-noirc_abi": "0.85.0-nightly.20250418",
|
|
75
|
+
"@aztec/pxe": "0.85.0-nightly.20250418",
|
|
76
|
+
"@aztec/stdlib": "0.85.0-nightly.20250418",
|
|
80
77
|
"commander": "^12.1.0",
|
|
81
78
|
"inquirer": "^10.1.8",
|
|
82
79
|
"source-map-support": "^0.5.21",
|
package/src/cmds/profile.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type AccountWalletWithSecretKey, AuthWitness, type AztecAddress, Contract } from '@aztec/aztec.js';
|
|
2
2
|
import { prepTx } from '@aztec/cli/utils';
|
|
3
3
|
import type { LogFn } from '@aztec/foundation/log';
|
|
4
|
-
import {
|
|
5
|
-
import type { PrivateExecutionStep } from '@aztec/stdlib/kernel';
|
|
4
|
+
import { serializePrivateExecutionSteps } from '@aztec/stdlib/kernel';
|
|
6
5
|
import type { TxProfileResult } from '@aztec/stdlib/tx';
|
|
7
6
|
|
|
8
|
-
import { encode } from '@msgpack/msgpack';
|
|
9
7
|
import { promises as fs } from 'fs';
|
|
10
8
|
import path from 'path';
|
|
11
9
|
import { format } from 'util';
|
|
@@ -31,21 +29,6 @@ function printProfileResult(result: TxProfileResult, log: LogFn) {
|
|
|
31
29
|
log(format('\nTotal gates:', acc.toLocaleString()));
|
|
32
30
|
}
|
|
33
31
|
|
|
34
|
-
// TODO(#7371): This is duplicated.
|
|
35
|
-
// Longer term we won't use this hacked together msgpack format
|
|
36
|
-
// Leaving duplicated as this eventually bb will provide a serialization
|
|
37
|
-
// helper for passing to a generic msgpack RPC endpoint.
|
|
38
|
-
async function _createClientIvcProofFiles(directory: string, executionSteps: PrivateExecutionStep[]) {
|
|
39
|
-
const acirPath = path.join(directory, 'acir.msgpack');
|
|
40
|
-
const witnessPath = path.join(directory, 'witnesses.msgpack');
|
|
41
|
-
await fs.writeFile(acirPath, encode(executionSteps.map(map => map.bytecode)));
|
|
42
|
-
await fs.writeFile(witnessPath, encode(executionSteps.map(map => serializeWitness(map.witness))));
|
|
43
|
-
return {
|
|
44
|
-
acirPath,
|
|
45
|
-
witnessPath,
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
32
|
export async function profile(
|
|
50
33
|
wallet: AccountWalletWithSecretKey,
|
|
51
34
|
functionName: string,
|
|
@@ -65,7 +48,8 @@ export async function profile(
|
|
|
65
48
|
const result = await call.profile({ profileMode, authWitnesses });
|
|
66
49
|
printProfileResult(result, log);
|
|
67
50
|
if (debugOutputPath) {
|
|
68
|
-
|
|
69
|
-
|
|
51
|
+
const ivcInputsPath = path.join(debugOutputPath, 'ivc-inputs.msgpack');
|
|
52
|
+
log(`Debug output written to ${ivcInputsPath}.`);
|
|
53
|
+
await fs.writeFile(ivcInputsPath, serializePrivateExecutionSteps(result.executionSteps));
|
|
70
54
|
}
|
|
71
55
|
}
|