@aztec/aztec 0.0.1-commit.21caa21 → 0.0.1-commit.21ecf947b
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/bin/index.js +5 -2
- package/dest/cli/aztec_start_action.d.ts +1 -1
- package/dest/cli/aztec_start_action.d.ts.map +1 -1
- package/dest/cli/aztec_start_action.js +6 -5
- 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 +16 -27
- package/dest/cli/cli.d.ts +1 -1
- package/dest/cli/cli.d.ts.map +1 -1
- package/dest/cli/cli.js +5 -37
- package/dest/cli/cmds/migrate_ha_db.d.ts +3 -0
- package/dest/cli/cmds/migrate_ha_db.d.ts.map +1 -0
- package/dest/cli/cmds/migrate_ha_db.js +27 -0
- package/dest/cli/cmds/start_archiver.d.ts +1 -1
- package/dest/cli/cmds/start_archiver.d.ts.map +1 -1
- package/dest/cli/cmds/start_archiver.js +11 -13
- package/dest/cli/cmds/start_bot.d.ts +3 -3
- package/dest/cli/cmds/start_bot.d.ts.map +1 -1
- package/dest/cli/cmds/start_bot.js +10 -6
- package/dest/cli/cmds/start_node.js +6 -4
- package/dest/cli/cmds/start_p2p_bootstrap.d.ts +2 -2
- package/dest/cli/cmds/start_p2p_bootstrap.d.ts.map +1 -1
- package/dest/cli/cmds/start_p2p_bootstrap.js +2 -3
- package/dest/cli/cmds/start_prover_agent.d.ts +1 -1
- package/dest/cli/cmds/start_prover_agent.d.ts.map +1 -1
- package/dest/cli/cmds/start_prover_agent.js +4 -4
- package/dest/cli/cmds/start_prover_broker.d.ts +1 -1
- package/dest/cli/cmds/start_prover_broker.d.ts.map +1 -1
- package/dest/cli/cmds/start_prover_broker.js +4 -4
- package/dest/cli/cmds/start_prover_node.js +2 -2
- package/dest/cli/util.d.ts +8 -17
- package/dest/cli/util.d.ts.map +1 -1
- package/dest/cli/util.js +13 -8
- package/dest/examples/token.js +5 -5
- package/dest/examples/util.d.ts +2 -2
- package/dest/examples/util.d.ts.map +1 -1
- package/dest/local-network/banana_fpc.d.ts +1 -1
- package/dest/local-network/banana_fpc.d.ts.map +1 -1
- package/dest/local-network/banana_fpc.js +3 -3
- package/dest/local-network/local-network.d.ts +11 -14
- package/dest/local-network/local-network.d.ts.map +1 -1
- package/dest/local-network/local-network.js +44 -35
- package/dest/testing/anvil_test_watcher.d.ts +2 -2
- package/dest/testing/anvil_test_watcher.d.ts.map +1 -1
- package/dest/testing/anvil_test_watcher.js +1 -1
- package/dest/testing/cheat_codes.d.ts +3 -1
- package/dest/testing/cheat_codes.d.ts.map +1 -1
- package/dest/testing/epoch_test_settler.d.ts +19 -0
- package/dest/testing/epoch_test_settler.d.ts.map +1 -0
- package/dest/testing/epoch_test_settler.js +62 -0
- package/dest/testing/index.d.ts +2 -1
- package/dest/testing/index.d.ts.map +1 -1
- package/dest/testing/index.js +1 -0
- package/package.json +37 -35
- package/scripts/aztec.sh +15 -12
- package/src/bin/index.ts +6 -2
- package/src/cli/aztec_start_action.ts +5 -4
- package/src/cli/aztec_start_options.ts +15 -27
- package/src/cli/cli.ts +5 -37
- package/src/cli/cmds/migrate_ha_db.ts +43 -0
- package/src/cli/cmds/start_archiver.ts +7 -18
- package/src/cli/cmds/start_bot.ts +9 -6
- package/src/cli/cmds/start_node.ts +4 -4
- package/src/cli/cmds/start_p2p_bootstrap.ts +3 -3
- package/src/cli/cmds/start_prover_agent.ts +4 -12
- package/src/cli/cmds/start_prover_broker.ts +7 -3
- package/src/cli/cmds/start_prover_node.ts +2 -2
- package/src/cli/util.ts +20 -25
- package/src/examples/token.ts +5 -7
- package/src/examples/util.ts +1 -1
- package/src/local-network/banana_fpc.ts +11 -7
- package/src/local-network/local-network.ts +71 -77
- package/src/testing/anvil_test_watcher.ts +2 -2
- package/src/testing/cheat_codes.ts +3 -2
- package/src/testing/epoch_test_settler.ts +71 -0
- package/src/testing/index.ts +1 -0
- package/dest/cli/cmds/start_blob_sink.d.ts +0 -3
- package/dest/cli/cmds/start_blob_sink.d.ts.map +0 -1
- package/dest/cli/cmds/start_blob_sink.js +0 -33
- package/src/cli/cmds/start_blob_sink.ts +0 -57
package/dest/testing/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { AnvilTestWatcher } from './anvil_test_watcher.js';
|
|
2
2
|
export { EthCheatCodes, RollupCheatCodes } from '@aztec/ethereum/test';
|
|
3
3
|
export { CheatCodes } from './cheat_codes.js';
|
|
4
|
-
|
|
4
|
+
export { EpochTestSettler } from './epoch_test_settler.js';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90ZXN0aW5nL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQzNELE9BQU8sRUFBRSxhQUFhLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUN2RSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFDOUMsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0seUJBQXlCLENBQUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC"}
|
package/dest/testing/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/aztec",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.21ecf947b",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"tsconfig": "./tsconfig.json"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
|
-
"build": "yarn clean &&
|
|
18
|
+
"build": "yarn clean && ../scripts/tsc.sh",
|
|
19
19
|
"start": "node --no-warnings ./dest/bin",
|
|
20
20
|
"start:debug": "node --inspect=0.0.0.0:9221 --no-warnings ./dest/bin",
|
|
21
21
|
"start:local-network": "ETHEREUM_HOSTS=http://0.0.0.0:8545/ && yarn start start --local-network",
|
|
22
22
|
"clean": "rm -rf ./dest .tsbuildinfo",
|
|
23
|
-
"build:dev": "
|
|
23
|
+
"build:dev": "../scripts/tsc.sh --watch",
|
|
24
24
|
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}",
|
|
25
25
|
"run:example:token": "LOG_LEVEL='verbose' node ./dest/examples/token.js"
|
|
26
26
|
},
|
|
@@ -28,37 +28,39 @@
|
|
|
28
28
|
"../package.common.json"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@aztec/accounts": "0.0.1-commit.
|
|
32
|
-
"@aztec/archiver": "0.0.1-commit.
|
|
33
|
-
"@aztec/aztec-faucet": "0.0.1-commit.
|
|
34
|
-
"@aztec/aztec-node": "0.0.1-commit.
|
|
35
|
-
"@aztec/aztec.js": "0.0.1-commit.
|
|
36
|
-
"@aztec/bb-prover": "0.0.1-commit.
|
|
37
|
-
"@aztec/bb.js": "0.0.1-commit.
|
|
38
|
-
"@aztec/blob-
|
|
39
|
-
"@aztec/bot": "0.0.1-commit.
|
|
40
|
-
"@aztec/builder": "0.0.1-commit.
|
|
41
|
-
"@aztec/cli": "0.0.1-commit.
|
|
42
|
-
"@aztec/constants": "0.0.1-commit.
|
|
43
|
-
"@aztec/entrypoints": "0.0.1-commit.
|
|
44
|
-
"@aztec/ethereum": "0.0.1-commit.
|
|
45
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
46
|
-
"@aztec/kv-store": "0.0.1-commit.
|
|
47
|
-
"@aztec/l1-artifacts": "0.0.1-commit.
|
|
48
|
-
"@aztec/node-lib": "0.0.1-commit.
|
|
49
|
-
"@aztec/noir-contracts.js": "0.0.1-commit.
|
|
50
|
-
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.
|
|
51
|
-
"@aztec/p2p": "0.0.1-commit.
|
|
52
|
-
"@aztec/p2p-bootstrap": "0.0.1-commit.
|
|
53
|
-
"@aztec/protocol-contracts": "0.0.1-commit.
|
|
54
|
-
"@aztec/prover-client": "0.0.1-commit.
|
|
55
|
-
"@aztec/prover-node": "0.0.1-commit.
|
|
56
|
-
"@aztec/pxe": "0.0.1-commit.
|
|
57
|
-
"@aztec/
|
|
58
|
-
"@aztec/
|
|
59
|
-
"@aztec/
|
|
60
|
-
"@aztec/txe": "0.0.1-commit.
|
|
61
|
-
"@aztec/
|
|
31
|
+
"@aztec/accounts": "0.0.1-commit.21ecf947b",
|
|
32
|
+
"@aztec/archiver": "0.0.1-commit.21ecf947b",
|
|
33
|
+
"@aztec/aztec-faucet": "0.0.1-commit.21ecf947b",
|
|
34
|
+
"@aztec/aztec-node": "0.0.1-commit.21ecf947b",
|
|
35
|
+
"@aztec/aztec.js": "0.0.1-commit.21ecf947b",
|
|
36
|
+
"@aztec/bb-prover": "0.0.1-commit.21ecf947b",
|
|
37
|
+
"@aztec/bb.js": "0.0.1-commit.21ecf947b",
|
|
38
|
+
"@aztec/blob-client": "0.0.1-commit.21ecf947b",
|
|
39
|
+
"@aztec/bot": "0.0.1-commit.21ecf947b",
|
|
40
|
+
"@aztec/builder": "0.0.1-commit.21ecf947b",
|
|
41
|
+
"@aztec/cli": "0.0.1-commit.21ecf947b",
|
|
42
|
+
"@aztec/constants": "0.0.1-commit.21ecf947b",
|
|
43
|
+
"@aztec/entrypoints": "0.0.1-commit.21ecf947b",
|
|
44
|
+
"@aztec/ethereum": "0.0.1-commit.21ecf947b",
|
|
45
|
+
"@aztec/foundation": "0.0.1-commit.21ecf947b",
|
|
46
|
+
"@aztec/kv-store": "0.0.1-commit.21ecf947b",
|
|
47
|
+
"@aztec/l1-artifacts": "0.0.1-commit.21ecf947b",
|
|
48
|
+
"@aztec/node-lib": "0.0.1-commit.21ecf947b",
|
|
49
|
+
"@aztec/noir-contracts.js": "0.0.1-commit.21ecf947b",
|
|
50
|
+
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.21ecf947b",
|
|
51
|
+
"@aztec/p2p": "0.0.1-commit.21ecf947b",
|
|
52
|
+
"@aztec/p2p-bootstrap": "0.0.1-commit.21ecf947b",
|
|
53
|
+
"@aztec/protocol-contracts": "0.0.1-commit.21ecf947b",
|
|
54
|
+
"@aztec/prover-client": "0.0.1-commit.21ecf947b",
|
|
55
|
+
"@aztec/prover-node": "0.0.1-commit.21ecf947b",
|
|
56
|
+
"@aztec/pxe": "0.0.1-commit.21ecf947b",
|
|
57
|
+
"@aztec/sequencer-client": "0.0.1-commit.21ecf947b",
|
|
58
|
+
"@aztec/stdlib": "0.0.1-commit.21ecf947b",
|
|
59
|
+
"@aztec/telemetry-client": "0.0.1-commit.21ecf947b",
|
|
60
|
+
"@aztec/txe": "0.0.1-commit.21ecf947b",
|
|
61
|
+
"@aztec/validator-ha-signer": "0.0.1-commit.21ecf947b",
|
|
62
|
+
"@aztec/wallets": "0.0.1-commit.21ecf947b",
|
|
63
|
+
"@aztec/world-state": "0.0.1-commit.21ecf947b",
|
|
62
64
|
"@types/chalk": "^2.2.0",
|
|
63
65
|
"abitype": "^0.8.11",
|
|
64
66
|
"chalk": "^5.3.0",
|
|
@@ -78,7 +80,7 @@
|
|
|
78
80
|
"@jest/globals": "^30.0.0",
|
|
79
81
|
"@types/jest": "^30.0.0",
|
|
80
82
|
"@types/koa": "^2.15.0",
|
|
81
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
83
|
+
"@typescript/native-preview": "7.0.0-dev.20260113.1",
|
|
82
84
|
"jest": "^30.0.0",
|
|
83
85
|
"ts-node": "^10.9.1",
|
|
84
86
|
"typescript": "^5.3.3"
|
package/scripts/aztec.sh
CHANGED
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
set -euo pipefail
|
|
3
|
+
shopt -s inherit_errexit
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
# Re-execute using correct version if we have an .aztecrc file.
|
|
6
|
+
if [ "${AZTEC_VERSIONED:-0}" -eq 0 ] && [ -f .aztecrc ] && command -v aztec-up &>/dev/null; then
|
|
7
|
+
env_setup=$(aztec-up env)
|
|
8
|
+
eval "$env_setup"
|
|
9
|
+
AZTEC_VERSIONED=1 exec aztec "$@"
|
|
10
|
+
fi
|
|
9
11
|
|
|
10
12
|
cmd=${1:-}
|
|
11
13
|
[ -n "$cmd" ] && shift
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
script_dir="$(dirname "$(realpath "$0")")"
|
|
16
|
+
|
|
17
|
+
function aztec {
|
|
18
|
+
export AZTEC_SHELL_WRAPPER=1
|
|
19
|
+
exec node --no-warnings $script_dir/../dest/bin/index.js "$@"
|
|
20
|
+
}
|
|
14
21
|
|
|
15
22
|
case $cmd in
|
|
16
23
|
test)
|
|
17
|
-
export LOG_LEVEL="${LOG_LEVEL:-
|
|
24
|
+
export LOG_LEVEL="${LOG_LEVEL:-error}"
|
|
18
25
|
aztec start --txe --port 8081 &
|
|
19
26
|
server_pid=$!
|
|
20
27
|
trap 'kill $server_pid &>/dev/null || true' EXIT
|
|
21
28
|
while ! nc -z 127.0.0.1 8081 &>/dev/null; do sleep 0.2; done
|
|
22
29
|
export NARGO_FOREIGN_CALL_TIMEOUT=300000
|
|
23
|
-
nargo test --silence-warnings
|
|
30
|
+
nargo test --silence-warnings --oracle-resolver http://127.0.0.1:8081 "$@"
|
|
24
31
|
;;
|
|
25
32
|
start)
|
|
26
33
|
if [ "${1:-}" == "--local-network" ]; then
|
|
@@ -50,10 +57,6 @@ case $cmd in
|
|
|
50
57
|
compile|new|init|flamegraph)
|
|
51
58
|
$script_dir/${cmd}.sh "$@"
|
|
52
59
|
;;
|
|
53
|
-
fmt|check|lsp)
|
|
54
|
-
# TODO: These should be removed, just use nargo directly.
|
|
55
|
-
nargo $cmd "$@"
|
|
56
|
-
;;
|
|
57
60
|
*)
|
|
58
61
|
aztec $cmd "$@"
|
|
59
62
|
;;
|
package/src/bin/index.ts
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
//
|
|
3
3
|
import { injectCommands as injectBuilderCommands } from '@aztec/builder';
|
|
4
4
|
import { injectCommands as injectAztecNodeCommands } from '@aztec/cli/aztec_node';
|
|
5
|
-
import { enrichEnvironmentWithChainName
|
|
5
|
+
import { enrichEnvironmentWithChainName } from '@aztec/cli/config/chain';
|
|
6
|
+
import { enrichEnvironmentWithNetworkConfig } from '@aztec/cli/config/network';
|
|
6
7
|
import { injectCommands as injectContractCommands } from '@aztec/cli/contracts';
|
|
7
8
|
import { injectCommands as injectInfrastructureCommands } from '@aztec/cli/infrastructure';
|
|
8
9
|
import { injectCommands as injectL1Commands } from '@aztec/cli/l1';
|
|
@@ -13,10 +14,12 @@ import { createConsoleLogger, createLogger } from '@aztec/foundation/log';
|
|
|
13
14
|
|
|
14
15
|
import { Command } from 'commander';
|
|
15
16
|
|
|
16
|
-
import {
|
|
17
|
+
import { injectMigrateCommand } from '../cli/cmds/migrate_ha_db.js';
|
|
17
18
|
import { injectAztecCommands } from '../cli/index.js';
|
|
18
19
|
import { getCliVersion } from '../cli/release_version.js';
|
|
19
20
|
|
|
21
|
+
const NETWORK_FLAG = 'network';
|
|
22
|
+
|
|
20
23
|
const userLog = createConsoleLogger();
|
|
21
24
|
const debugLogger = createLogger('cli');
|
|
22
25
|
|
|
@@ -53,6 +56,7 @@ async function main() {
|
|
|
53
56
|
program = injectAztecNodeCommands(program, userLog, debugLogger);
|
|
54
57
|
program = injectMiscCommands(program, userLog);
|
|
55
58
|
program = injectValidatorKeysCommands(program, userLog);
|
|
59
|
+
program = injectMigrateCommand(program, userLog);
|
|
56
60
|
|
|
57
61
|
await program.parseAsync(process.argv);
|
|
58
62
|
}
|
|
@@ -33,9 +33,13 @@ export async function aztecStart(options: any, userLog: LogFn, debugLogger: Logg
|
|
|
33
33
|
{
|
|
34
34
|
l1Mnemonic: localNetwork.l1Mnemonic,
|
|
35
35
|
l1RpcUrls: options.l1RpcUrls,
|
|
36
|
-
deployAztecContractsSalt: localNetwork.deployAztecContractsSalt,
|
|
37
36
|
testAccounts: localNetwork.testAccounts,
|
|
38
37
|
realProofs: false,
|
|
38
|
+
// Setting the epoch duration to 4 by default for local network. This allows the epoch to be "proven" faster, so
|
|
39
|
+
// the users can consume out hash without having to wait for a long time.
|
|
40
|
+
// Note: We are not proving anything in the local network (realProofs == false). But in `createLocalNetwork`,
|
|
41
|
+
// the EpochTestSettler will set the out hash to the outbox when an epoch is complete.
|
|
42
|
+
aztecEpochDuration: 4,
|
|
39
43
|
},
|
|
40
44
|
userLog,
|
|
41
45
|
);
|
|
@@ -53,9 +57,6 @@ export async function aztecStart(options: any, userLog: LogFn, debugLogger: Logg
|
|
|
53
57
|
} else if (options.proverNode) {
|
|
54
58
|
const { startProverNode } = await import('./cmds/start_prover_node.js');
|
|
55
59
|
({ config } = await startProverNode(options, signalHandlers, services, userLog));
|
|
56
|
-
} else if (options.blobSink) {
|
|
57
|
-
const { startBlobSink } = await import('./cmds/start_blob_sink.js');
|
|
58
|
-
await startBlobSink(options, signalHandlers, userLog);
|
|
59
60
|
} else if (options.archiver) {
|
|
60
61
|
const { startArchiver } = await import('./cmds/start_archiver.js');
|
|
61
62
|
({ config } = await startArchiver(options, signalHandlers, services));
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type ArchiverConfig, archiverConfigMappings } from '@aztec/archiver/config';
|
|
2
|
-
import {
|
|
3
|
-
import { blobSinkConfigMappings } from '@aztec/blob-sink/server';
|
|
2
|
+
import { blobClientConfigMapping } from '@aztec/blob-client/client/config';
|
|
4
3
|
import { botConfigMappings } from '@aztec/bot/config';
|
|
5
|
-
import {
|
|
4
|
+
import { l1ContractsConfigMappings } from '@aztec/ethereum/config';
|
|
5
|
+
import { l1ContractAddressesMapping } from '@aztec/ethereum/l1-contract-addresses';
|
|
6
|
+
import { l1ReaderConfigMappings } from '@aztec/ethereum/l1-reader';
|
|
6
7
|
import { getKeys } from '@aztec/foundation/collection';
|
|
7
8
|
import {
|
|
8
9
|
type ConfigMapping,
|
|
@@ -14,12 +15,13 @@ import {
|
|
|
14
15
|
import { dataConfigMappings } from '@aztec/kv-store/config';
|
|
15
16
|
import { sharedNodeConfigMappings } from '@aztec/node-lib/config';
|
|
16
17
|
import { bootnodeConfigMappings, p2pConfigMappings } from '@aztec/p2p/config';
|
|
17
|
-
import { proverAgentConfigMappings, proverBrokerConfigMappings } from '@aztec/prover-client/broker';
|
|
18
|
+
import { proverAgentConfigMappings, proverBrokerConfigMappings } from '@aztec/prover-client/broker/config';
|
|
18
19
|
import { proverNodeConfigMappings } from '@aztec/prover-node/config';
|
|
19
20
|
import { allPxeConfigMappings } from '@aztec/pxe/config';
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
21
|
+
import { sequencerClientConfigMappings } from '@aztec/sequencer-client/config';
|
|
22
|
+
import { chainConfigMappings, nodeRpcConfigMappings } from '@aztec/stdlib/config';
|
|
23
|
+
import { telemetryClientConfigMappings } from '@aztec/telemetry-client/config';
|
|
24
|
+
import { worldStateConfigMappings } from '@aztec/world-state/config';
|
|
23
25
|
|
|
24
26
|
import { DefaultMnemonic } from '../mnemonic.js';
|
|
25
27
|
|
|
@@ -124,14 +126,6 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
|
|
|
124
126
|
defaultValue: DefaultMnemonic,
|
|
125
127
|
env: 'MNEMONIC',
|
|
126
128
|
},
|
|
127
|
-
{
|
|
128
|
-
flag: '--local-network.deployAztecContractsSalt <value>',
|
|
129
|
-
description:
|
|
130
|
-
'Numeric salt for deploying L1 Aztec contracts before starting the local network. Needs mnemonic or private key to be set.',
|
|
131
|
-
env: 'DEPLOY_AZTEC_CONTRACTS_SALT',
|
|
132
|
-
defaultValue: undefined,
|
|
133
|
-
parseVal: (val: string) => (val ? parseInt(val) : undefined),
|
|
134
|
-
},
|
|
135
129
|
],
|
|
136
130
|
API: [
|
|
137
131
|
{
|
|
@@ -154,14 +148,16 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
|
|
|
154
148
|
defaultValue: '',
|
|
155
149
|
env: 'API_PREFIX',
|
|
156
150
|
},
|
|
151
|
+
configToFlag('--rpcMaxBatchSize', nodeRpcConfigMappings.rpcMaxBatchSize),
|
|
152
|
+
configToFlag('--rpcMaxBodySize', nodeRpcConfigMappings.rpcMaxBodySize),
|
|
157
153
|
],
|
|
158
154
|
ETHEREUM: [
|
|
159
155
|
configToFlag('--l1-chain-id', l1ReaderConfigMappings.l1ChainId),
|
|
160
156
|
// Do not set default for CLI: keep undefined unless provided via flag or env
|
|
161
157
|
configToFlag('--l1-rpc-urls', { ...l1ReaderConfigMappings.l1RpcUrls, defaultValue: undefined }),
|
|
162
|
-
configToFlag('--l1-consensus-host-urls',
|
|
163
|
-
configToFlag('--l1-consensus-host-api-keys',
|
|
164
|
-
configToFlag('--l1-consensus-host-api-key-headers',
|
|
158
|
+
configToFlag('--l1-consensus-host-urls', blobClientConfigMapping.l1ConsensusHostUrls),
|
|
159
|
+
configToFlag('--l1-consensus-host-api-keys', blobClientConfigMapping.l1ConsensusHostApiKeys),
|
|
160
|
+
configToFlag('--l1-consensus-host-api-key-headers', blobClientConfigMapping.l1ConsensusHostApiKeyHeaders),
|
|
165
161
|
],
|
|
166
162
|
'L1 CONTRACTS': [
|
|
167
163
|
configToFlag('--registry-address', l1ContractAddressesMapping.registryAddress),
|
|
@@ -208,21 +204,13 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
|
|
|
208
204
|
'sequencer',
|
|
209
205
|
omitConfigMappings(sequencerClientConfigMappings, [
|
|
210
206
|
'fakeProcessingDelayPerTxMs',
|
|
207
|
+
'fakeThrowAfterProcessingTxCount',
|
|
211
208
|
'skipCollectingAttestations',
|
|
212
209
|
'skipInvalidateBlockAsProposer',
|
|
213
210
|
'blobSinkMapSizeKb',
|
|
214
211
|
]),
|
|
215
212
|
),
|
|
216
213
|
],
|
|
217
|
-
'BLOB SINK': [
|
|
218
|
-
{
|
|
219
|
-
flag: '--blob-sink',
|
|
220
|
-
description: 'Starts Aztec Blob Sink with options',
|
|
221
|
-
defaultValue: undefined,
|
|
222
|
-
env: undefined,
|
|
223
|
-
},
|
|
224
|
-
...getOptions('blobSink', blobSinkConfigMappings),
|
|
225
|
-
],
|
|
226
214
|
'PROVER NODE': [
|
|
227
215
|
{
|
|
228
216
|
flag: '--prover-node',
|
package/src/cli/cli.ts
CHANGED
|
@@ -35,44 +35,12 @@ export function injectAztecCommands(program: Command, userLog: LogFn, debugLogge
|
|
|
35
35
|
program.addHelpText(
|
|
36
36
|
'after',
|
|
37
37
|
`
|
|
38
|
+
Additional commands:
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
--name <name> Name of the package
|
|
44
|
-
--contract Use a contract template (default)
|
|
45
|
-
--lib Use a library template
|
|
46
|
-
--bin Use a binary template
|
|
47
|
-
Examples:
|
|
48
|
-
$ aztec init # creates a contract project in current directory
|
|
49
|
-
$ aztec init --lib # creates a library project
|
|
50
|
-
|
|
51
|
-
new <path> [options]: creates a new Noir project in a new directory
|
|
52
|
-
Options:
|
|
53
|
-
--name <name> Name of the package
|
|
54
|
-
--contract Use a contract template (default)
|
|
55
|
-
--lib Use a library template
|
|
56
|
-
--bin Use a binary template
|
|
57
|
-
Examples:
|
|
58
|
-
$ aztec new my-project # creates a contract project in ./my-project
|
|
59
|
-
$ aztec new my-lib --lib # creates a library project in ./my-lib
|
|
60
|
-
|
|
61
|
-
compile [options]: compiles Aztec Noir contracts
|
|
62
|
-
Compiles contracts with nargo compile and then postprocesses them to generate Aztec-specific artifacts including:
|
|
63
|
-
- Transpiled contract artifacts
|
|
64
|
-
- Verification keys
|
|
65
|
-
The compiled contracts will be placed in the target/ directory by default.
|
|
66
|
-
Supports standard nargo compile options.
|
|
67
|
-
|
|
68
|
-
test [options]: starts a dockerized TXE node via
|
|
69
|
-
$ aztec start --txe
|
|
70
|
-
then runs
|
|
71
|
-
$ aztec test --silence-warnings --oracle-resolver=<TXE_ADDRESS> [options]
|
|
72
|
-
|
|
73
|
-
preload-crs: Downloads and caches the Common Reference String (CRS) data required for zero-knowledge proofs.
|
|
74
|
-
Example:
|
|
75
|
-
$ aztec preload-crs # preloads CRS data
|
|
40
|
+
init [folder] [options] creates a new Aztec Noir project.
|
|
41
|
+
new <path> [options] creates a new Aztec Noir project in a new directory.
|
|
42
|
+
compile [options] compiles Aztec Noir contracts.
|
|
43
|
+
test [options] starts a TXE and runs "nargo test" using it as the oracle resolver.
|
|
76
44
|
`,
|
|
77
45
|
);
|
|
78
46
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { runMigrations } from '@aztec/validator-ha-signer/migrations';
|
|
2
|
+
|
|
3
|
+
import type { Command } from 'commander';
|
|
4
|
+
|
|
5
|
+
export function injectMigrateCommand(program: Command, log: (msg: string) => void): Command {
|
|
6
|
+
const migrateCommand = program.command('migrate-ha-db').description('Run validator-ha-signer database migrations');
|
|
7
|
+
|
|
8
|
+
migrateCommand
|
|
9
|
+
.command('up')
|
|
10
|
+
.description('Apply pending migrations')
|
|
11
|
+
.requiredOption('--database-url <string>', 'PostgreSQL connection string', process.env.DATABASE_URL)
|
|
12
|
+
.option('--verbose', 'Enable verbose output', false)
|
|
13
|
+
.action(async options => {
|
|
14
|
+
const migrations = await runMigrations(options.databaseUrl, {
|
|
15
|
+
direction: 'up',
|
|
16
|
+
verbose: options.verbose,
|
|
17
|
+
});
|
|
18
|
+
if (migrations.length > 0) {
|
|
19
|
+
log(`Applied migrations: ${migrations.join(', ')}`);
|
|
20
|
+
} else {
|
|
21
|
+
log('No migrations to apply - schema is up to date');
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
migrateCommand
|
|
26
|
+
.command('down')
|
|
27
|
+
.description('Rollback the last migration')
|
|
28
|
+
.requiredOption('--database-url <string>', 'PostgreSQL connection string', process.env.DATABASE_URL)
|
|
29
|
+
.option('--verbose', 'Enable verbose output', false)
|
|
30
|
+
.action(async options => {
|
|
31
|
+
const migrations = await runMigrations(options.databaseUrl, {
|
|
32
|
+
direction: 'down',
|
|
33
|
+
verbose: options.verbose,
|
|
34
|
+
});
|
|
35
|
+
if (migrations.length > 0) {
|
|
36
|
+
log(`Rolled back migrations: ${migrations.join(', ')}`);
|
|
37
|
+
} else {
|
|
38
|
+
log('No migrations to rollback');
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
return program;
|
|
43
|
+
}
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Archiver,
|
|
3
|
-
type ArchiverConfig,
|
|
4
|
-
KVArchiverDataStore,
|
|
5
|
-
archiverConfigMappings,
|
|
6
|
-
getArchiverConfigFromEnv,
|
|
7
|
-
} from '@aztec/archiver';
|
|
1
|
+
import { type ArchiverConfig, archiverConfigMappings, createArchiver, getArchiverConfigFromEnv } from '@aztec/archiver';
|
|
8
2
|
import { createLogger } from '@aztec/aztec.js/log';
|
|
9
|
-
import { type
|
|
3
|
+
import { type BlobClientConfig, blobClientConfigMapping, createBlobClient } from '@aztec/blob-client/client';
|
|
10
4
|
import { getL1Config } from '@aztec/cli/config';
|
|
11
5
|
import type { NamespacedApiHandlers } from '@aztec/foundation/json-rpc/server';
|
|
12
6
|
import { type DataStoreConfig, dataConfigMappings } from '@aztec/kv-store/config';
|
|
13
|
-
import { createStore } from '@aztec/kv-store/lmdb-v2';
|
|
14
7
|
import { ArchiverApiSchema } from '@aztec/stdlib/interfaces/server';
|
|
15
8
|
import { getConfigEnvVars as getTelemetryClientConfig, initTelemetryClient } from '@aztec/telemetry-client';
|
|
16
9
|
|
|
@@ -25,9 +18,9 @@ export async function startArchiver(
|
|
|
25
18
|
services: NamespacedApiHandlers,
|
|
26
19
|
): Promise<{ config: ArchiverConfig & DataStoreConfig }> {
|
|
27
20
|
const envConfig = getArchiverConfigFromEnv();
|
|
28
|
-
const cliOptions = extractRelevantOptions<ArchiverConfig & DataStoreConfig &
|
|
21
|
+
const cliOptions = extractRelevantOptions<ArchiverConfig & DataStoreConfig & BlobClientConfig>(
|
|
29
22
|
options,
|
|
30
|
-
{ ...archiverConfigMappings, ...dataConfigMappings, ...
|
|
23
|
+
{ ...archiverConfigMappings, ...dataConfigMappings, ...blobClientConfigMapping },
|
|
31
24
|
'archiver',
|
|
32
25
|
);
|
|
33
26
|
|
|
@@ -47,13 +40,9 @@ export async function startArchiver(
|
|
|
47
40
|
archiverConfig.l1Contracts = addresses;
|
|
48
41
|
archiverConfig = { ...archiverConfig, ...l1Config };
|
|
49
42
|
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
const telemetry = initTelemetryClient(getTelemetryClientConfig());
|
|
55
|
-
const blobSinkClient = createBlobSinkClient(archiverConfig, { logger: createLogger('archiver:blob-sink:client') });
|
|
56
|
-
const archiver = await Archiver.createAndSync(archiverConfig, archiverStore, { telemetry, blobSinkClient }, true);
|
|
43
|
+
const telemetry = await initTelemetryClient(getTelemetryClientConfig());
|
|
44
|
+
const blobClient = createBlobClient(archiverConfig, { logger: createLogger('archiver:blob-client:client') });
|
|
45
|
+
const archiver = await createArchiver(archiverConfig, { telemetry, blobClient }, { blockUntilSync: true });
|
|
57
46
|
services.archiver = [archiver, ArchiverApiSchema];
|
|
58
47
|
signalHandlers.push(archiver.stop);
|
|
59
48
|
|
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
initTelemetryClient,
|
|
11
11
|
makeTracedFetch,
|
|
12
12
|
} from '@aztec/telemetry-client';
|
|
13
|
-
import {
|
|
13
|
+
import { EmbeddedWallet } from '@aztec/wallets/embedded';
|
|
14
14
|
|
|
15
|
-
import { extractRelevantOptions } from '../util.js';
|
|
15
|
+
import { extractRelevantOptions, stringifyConfig } from '../util.js';
|
|
16
16
|
import { getVersions } from '../versioning.js';
|
|
17
17
|
|
|
18
18
|
export async function startBot(
|
|
@@ -38,22 +38,25 @@ export async function startBot(
|
|
|
38
38
|
const aztecNode = createAztecNodeClient(config.nodeUrl, getVersions(), fetch);
|
|
39
39
|
|
|
40
40
|
const pxeConfig = extractRelevantOptions<PXEConfig & CliPXEOptions>(options, allPxeConfigMappings, 'pxe');
|
|
41
|
-
|
|
41
|
+
userLog(`Creating bot wallet with config ${stringifyConfig(pxeConfig)}`);
|
|
42
|
+
const wallet = await EmbeddedWallet.create(aztecNode, { pxeConfig });
|
|
42
43
|
|
|
43
|
-
const telemetry = initTelemetryClient(getTelemetryClientConfig());
|
|
44
|
-
await addBot(options, signalHandlers, services, wallet, aztecNode, telemetry, undefined);
|
|
44
|
+
const telemetry = await initTelemetryClient(getTelemetryClientConfig());
|
|
45
|
+
await addBot(options, signalHandlers, services, wallet, aztecNode, telemetry, undefined, userLog);
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
export async function addBot(
|
|
48
49
|
options: any,
|
|
49
50
|
signalHandlers: (() => Promise<void>)[],
|
|
50
51
|
services: NamespacedApiHandlers,
|
|
51
|
-
wallet:
|
|
52
|
+
wallet: EmbeddedWallet,
|
|
52
53
|
aztecNode: AztecNode,
|
|
53
54
|
telemetry: TelemetryClient,
|
|
54
55
|
aztecNodeAdmin?: AztecNodeAdmin,
|
|
56
|
+
userLog?: LogFn,
|
|
55
57
|
) {
|
|
56
58
|
const config = extractRelevantOptions<BotConfig>(options, botConfigMappings, 'bot');
|
|
59
|
+
userLog?.(`Starting bot with config ${stringifyConfig(config)}`);
|
|
57
60
|
|
|
58
61
|
const db = await (config.dataDirectory
|
|
59
62
|
? createStore('bot', BotStore.SCHEMA_VERSION, config)
|
|
@@ -3,7 +3,7 @@ import { type AztecNodeConfig, aztecNodeConfigMappings, getConfigEnvVars } from
|
|
|
3
3
|
import { Fr } from '@aztec/aztec.js/fields';
|
|
4
4
|
import { getSponsoredFPCAddress } from '@aztec/cli/cli-utils';
|
|
5
5
|
import { getL1Config } from '@aztec/cli/config';
|
|
6
|
-
import { getPublicClient } from '@aztec/ethereum';
|
|
6
|
+
import { getPublicClient } from '@aztec/ethereum/client';
|
|
7
7
|
import { SecretValue } from '@aztec/foundation/config';
|
|
8
8
|
import type { NamespacedApiHandlers } from '@aztec/foundation/json-rpc/server';
|
|
9
9
|
import type { LogFn } from '@aztec/foundation/log';
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
initTelemetryClient,
|
|
16
16
|
telemetryClientConfigMappings,
|
|
17
17
|
} from '@aztec/telemetry-client';
|
|
18
|
-
import {
|
|
18
|
+
import { EmbeddedWallet } from '@aztec/wallets/embedded';
|
|
19
19
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
20
20
|
|
|
21
21
|
import { createAztecNode } from '../../local-network/index.js';
|
|
@@ -117,7 +117,7 @@ export async function startNode(
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
const telemetryConfig = extractRelevantOptions<TelemetryClientConfig>(options, telemetryClientConfigMappings, 'tel');
|
|
120
|
-
const telemetry = initTelemetryClient(telemetryConfig);
|
|
120
|
+
const telemetry = await initTelemetryClient(telemetryConfig);
|
|
121
121
|
|
|
122
122
|
// Create and start Aztec Node
|
|
123
123
|
const node = await createAztecNode(nodeConfig, { telemetry }, { prefilledPublicData });
|
|
@@ -135,7 +135,7 @@ export async function startNode(
|
|
|
135
135
|
const { addBot } = await import('./start_bot.js');
|
|
136
136
|
|
|
137
137
|
const pxeConfig = extractRelevantOptions<PXEConfig & CliPXEOptions>(options, allPxeConfigMappings, 'pxe');
|
|
138
|
-
const wallet = await
|
|
138
|
+
const wallet = await EmbeddedWallet.create(node, { pxeConfig });
|
|
139
139
|
|
|
140
140
|
await addBot(options, signalHandlers, services, wallet, node, telemetry, undefined);
|
|
141
141
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsonStringify } from '@aztec/foundation/json-rpc';
|
|
2
2
|
import type { NamespacedApiHandlers } from '@aztec/foundation/json-rpc/server';
|
|
3
|
-
import {
|
|
3
|
+
import type { LogFn } from '@aztec/foundation/log';
|
|
4
4
|
import { createStore } from '@aztec/kv-store/lmdb-v2';
|
|
5
5
|
import { type BootnodeConfig, BootstrapNode, bootnodeConfigMappings } from '@aztec/p2p';
|
|
6
6
|
import { emptyChainConfig } from '@aztec/stdlib/config';
|
|
@@ -25,9 +25,9 @@ export async function startP2PBootstrap(
|
|
|
25
25
|
userLog(`Starting P2P bootstrap node with config: ${jsonStringify(safeConfig)}`);
|
|
26
26
|
|
|
27
27
|
const telemetryConfig = extractRelevantOptions<TelemetryClientConfig>(options, telemetryClientConfigMappings, 'tel');
|
|
28
|
-
const telemetryClient = initTelemetryClient(telemetryConfig);
|
|
28
|
+
const telemetryClient = await initTelemetryClient(telemetryConfig);
|
|
29
29
|
|
|
30
|
-
const store = await createStore('p2p-bootstrap', 1, config
|
|
30
|
+
const store = await createStore('p2p-bootstrap', 1, config);
|
|
31
31
|
const node = new BootstrapNode(store, telemetryClient);
|
|
32
32
|
await node.start(config);
|
|
33
33
|
signalHandlers.push(() => node.stop());
|
|
@@ -4,9 +4,9 @@ import { Agent, makeUndiciFetch } from '@aztec/foundation/json-rpc/undici';
|
|
|
4
4
|
import type { LogFn } from '@aztec/foundation/log';
|
|
5
5
|
import { buildServerCircuitProver } from '@aztec/prover-client';
|
|
6
6
|
import {
|
|
7
|
-
InlineProofStore,
|
|
8
7
|
type ProverAgentConfig,
|
|
9
8
|
ProvingAgent,
|
|
9
|
+
createProofStore,
|
|
10
10
|
createProvingJobBrokerClient,
|
|
11
11
|
proverAgentConfigMappings,
|
|
12
12
|
} from '@aztec/prover-client/broker';
|
|
@@ -53,20 +53,12 @@ export async function startProverAgent(
|
|
|
53
53
|
);
|
|
54
54
|
const broker = createProvingJobBrokerClient(config.proverBrokerUrl, getVersions(), fetch);
|
|
55
55
|
|
|
56
|
-
const telemetry = initTelemetryClient(extractRelevantOptions(options, telemetryClientConfigMappings, 'tel'));
|
|
56
|
+
const telemetry = await initTelemetryClient(extractRelevantOptions(options, telemetryClientConfigMappings, 'tel'));
|
|
57
57
|
const prover = await buildServerCircuitProver(config, telemetry);
|
|
58
|
-
const proofStore =
|
|
58
|
+
const proofStore = await createProofStore(config.proofStore);
|
|
59
59
|
const agents = times(
|
|
60
60
|
config.proverAgentCount,
|
|
61
|
-
() =>
|
|
62
|
-
new ProvingAgent(
|
|
63
|
-
broker,
|
|
64
|
-
proofStore,
|
|
65
|
-
prover,
|
|
66
|
-
config.proverAgentProofTypes,
|
|
67
|
-
config.proverAgentPollIntervalMs,
|
|
68
|
-
telemetry,
|
|
69
|
-
),
|
|
61
|
+
() => new ProvingAgent(broker, proofStore, prover, config.proverAgentProofTypes, config.proverAgentPollIntervalMs),
|
|
70
62
|
);
|
|
71
63
|
|
|
72
64
|
// expose all agents as individual services
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { getL1Config } from '@aztec/cli/config';
|
|
2
|
-
import { getPublicClient } from '@aztec/ethereum';
|
|
2
|
+
import { getPublicClient } from '@aztec/ethereum/client';
|
|
3
3
|
import type { NamespacedApiHandlers } from '@aztec/foundation/json-rpc/server';
|
|
4
4
|
import type { LogFn } from '@aztec/foundation/log';
|
|
5
5
|
import {
|
|
6
6
|
type ProverBrokerConfig,
|
|
7
7
|
ProvingJobBrokerSchema,
|
|
8
|
+
ProvingJobBrokerSchemaWithDebug,
|
|
8
9
|
createAndStartProvingBroker,
|
|
9
10
|
proverBrokerConfigMappings,
|
|
10
11
|
} from '@aztec/prover-client/broker';
|
|
@@ -45,7 +46,7 @@ export async function startProverBroker(
|
|
|
45
46
|
config.l1Contracts = addresses;
|
|
46
47
|
config.rollupVersion = rollupConfig.rollupVersion;
|
|
47
48
|
|
|
48
|
-
const client = initTelemetryClient(getTelemetryClientConfig());
|
|
49
|
+
const client = await initTelemetryClient(getTelemetryClientConfig());
|
|
49
50
|
const broker = await createAndStartProvingBroker(config, client);
|
|
50
51
|
|
|
51
52
|
if (options.autoUpdate !== 'disabled' && options.autoUpdateUrl) {
|
|
@@ -59,7 +60,10 @@ export async function startProverBroker(
|
|
|
59
60
|
);
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
services.proverBroker = [
|
|
63
|
+
services.proverBroker = [
|
|
64
|
+
broker,
|
|
65
|
+
config.proverBrokerDebugReplayEnabled ? ProvingJobBrokerSchemaWithDebug : ProvingJobBrokerSchema,
|
|
66
|
+
];
|
|
63
67
|
signalHandlers.push(() => broker.stop());
|
|
64
68
|
|
|
65
69
|
return { broker, config };
|