@aztec/aztec 0.0.1-commit.d3ec352c → 0.0.1-commit.fcb71a6
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 +3 -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 +0 -4
- 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 +12 -25
- package/dest/cli/cli.d.ts +1 -1
- package/dest/cli/cli.d.ts.map +1 -1
- package/dest/cli/cli.js +15 -3
- package/dest/cli/cmds/start_archiver.js +6 -6
- package/dest/cli/cmds/start_bot.js +1 -1
- package/dest/cli/cmds/start_node.js +2 -2
- package/dest/cli/cmds/start_p2p_bootstrap.js +1 -1
- package/dest/cli/cmds/start_prover_agent.js +1 -1
- package/dest/cli/cmds/start_prover_broker.js +2 -2
- package/dest/cli/cmds/start_prover_node.js +2 -2
- package/dest/cli/util.d.ts +5 -5
- package/dest/cli/util.d.ts.map +1 -1
- package/dest/cli/util.js +2 -2
- package/dest/examples/util.d.ts +2 -2
- package/dest/examples/util.d.ts.map +1 -1
- package/dest/local-network/banana_fpc.js +1 -1
- package/dest/local-network/local-network.d.ts +10 -12
- package/dest/local-network/local-network.d.ts.map +1 -1
- package/dest/local-network/local-network.js +18 -19
- package/dest/testing/anvil_test_watcher.d.ts +2 -2
- package/dest/testing/anvil_test_watcher.d.ts.map +1 -1
- package/package.json +34 -34
- package/src/bin/index.ts +4 -2
- package/src/cli/aztec_start_action.ts +0 -4
- package/src/cli/aztec_start_options.ts +12 -26
- package/src/cli/cli.ts +18 -6
- package/src/cli/cmds/start_archiver.ts +6 -6
- package/src/cli/cmds/start_bot.ts +1 -1
- package/src/cli/cmds/start_node.ts +2 -2
- package/src/cli/cmds/start_p2p_bootstrap.ts +1 -1
- package/src/cli/cmds/start_prover_agent.ts +1 -1
- package/src/cli/cmds/start_prover_broker.ts +2 -2
- package/src/cli/cmds/start_prover_node.ts +2 -2
- package/src/cli/util.ts +6 -6
- package/src/examples/util.ts +1 -1
- package/src/local-network/banana_fpc.ts +1 -1
- package/src/local-network/local-network.ts +39 -59
- package/src/testing/anvil_test_watcher.ts +1 -1
- 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/scripts/aztec.sh +0 -56
- package/scripts/compile.sh +0 -44
- package/scripts/extract_function.js +0 -47
- package/scripts/flamegraph.sh +0 -59
- package/scripts/init.sh +0 -35
- package/scripts/new.sh +0 -59
- package/scripts/setup_project.sh +0 -31
- package/src/cli/cmds/start_blob_sink.ts +0 -57
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/aztec",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.fcb71a6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
7
7
|
"./testing": "./dest/testing/index.js"
|
|
8
8
|
},
|
|
9
|
-
"bin": "./
|
|
9
|
+
"bin": "./dest/bin/index.js",
|
|
10
10
|
"typedocOptions": {
|
|
11
11
|
"entryPoints": [
|
|
12
12
|
"./src/index.ts"
|
|
@@ -28,37 +28,38 @@
|
|
|
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/
|
|
61
|
-
"@aztec/
|
|
31
|
+
"@aztec/accounts": "0.0.1-commit.fcb71a6",
|
|
32
|
+
"@aztec/archiver": "0.0.1-commit.fcb71a6",
|
|
33
|
+
"@aztec/aztec-faucet": "0.0.1-commit.fcb71a6",
|
|
34
|
+
"@aztec/aztec-node": "0.0.1-commit.fcb71a6",
|
|
35
|
+
"@aztec/aztec.js": "0.0.1-commit.fcb71a6",
|
|
36
|
+
"@aztec/bb-prover": "0.0.1-commit.fcb71a6",
|
|
37
|
+
"@aztec/bb.js": "0.0.1-commit.fcb71a6",
|
|
38
|
+
"@aztec/blob-client": "0.0.1-commit.fcb71a6",
|
|
39
|
+
"@aztec/bot": "0.0.1-commit.fcb71a6",
|
|
40
|
+
"@aztec/builder": "0.0.1-commit.fcb71a6",
|
|
41
|
+
"@aztec/cli": "0.0.1-commit.fcb71a6",
|
|
42
|
+
"@aztec/constants": "0.0.1-commit.fcb71a6",
|
|
43
|
+
"@aztec/entrypoints": "0.0.1-commit.fcb71a6",
|
|
44
|
+
"@aztec/ethereum": "0.0.1-commit.fcb71a6",
|
|
45
|
+
"@aztec/foundation": "0.0.1-commit.fcb71a6",
|
|
46
|
+
"@aztec/kv-store": "0.0.1-commit.fcb71a6",
|
|
47
|
+
"@aztec/l1-artifacts": "0.0.1-commit.fcb71a6",
|
|
48
|
+
"@aztec/node-lib": "0.0.1-commit.fcb71a6",
|
|
49
|
+
"@aztec/noir-contracts.js": "0.0.1-commit.fcb71a6",
|
|
50
|
+
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.fcb71a6",
|
|
51
|
+
"@aztec/p2p": "0.0.1-commit.fcb71a6",
|
|
52
|
+
"@aztec/p2p-bootstrap": "0.0.1-commit.fcb71a6",
|
|
53
|
+
"@aztec/protocol-contracts": "0.0.1-commit.fcb71a6",
|
|
54
|
+
"@aztec/prover-client": "0.0.1-commit.fcb71a6",
|
|
55
|
+
"@aztec/prover-node": "0.0.1-commit.fcb71a6",
|
|
56
|
+
"@aztec/pxe": "0.0.1-commit.fcb71a6",
|
|
57
|
+
"@aztec/sequencer-client": "0.0.1-commit.fcb71a6",
|
|
58
|
+
"@aztec/stdlib": "0.0.1-commit.fcb71a6",
|
|
59
|
+
"@aztec/telemetry-client": "0.0.1-commit.fcb71a6",
|
|
60
|
+
"@aztec/test-wallet": "0.0.1-commit.fcb71a6",
|
|
61
|
+
"@aztec/txe": "0.0.1-commit.fcb71a6",
|
|
62
|
+
"@aztec/world-state": "0.0.1-commit.fcb71a6",
|
|
62
63
|
"@types/chalk": "^2.2.0",
|
|
63
64
|
"abitype": "^0.8.11",
|
|
64
65
|
"chalk": "^5.3.0",
|
|
@@ -69,7 +70,6 @@
|
|
|
69
70
|
},
|
|
70
71
|
"files": [
|
|
71
72
|
"dest",
|
|
72
|
-
"scripts",
|
|
73
73
|
"src",
|
|
74
74
|
"!*.test.*"
|
|
75
75
|
],
|
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,11 @@ import { createConsoleLogger, createLogger } from '@aztec/foundation/log';
|
|
|
13
14
|
|
|
14
15
|
import { Command } from 'commander';
|
|
15
16
|
|
|
16
|
-
import { NETWORK_FLAG } from '../cli/aztec_start_options.js';
|
|
17
17
|
import { injectAztecCommands } from '../cli/index.js';
|
|
18
18
|
import { getCliVersion } from '../cli/release_version.js';
|
|
19
19
|
|
|
20
|
+
const NETWORK_FLAG = 'network';
|
|
21
|
+
|
|
20
22
|
const userLog = createConsoleLogger();
|
|
21
23
|
const debugLogger = createLogger('cli');
|
|
22
24
|
|
|
@@ -33,7 +33,6 @@ 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,
|
|
39
38
|
},
|
|
@@ -53,9 +52,6 @@ export async function aztecStart(options: any, userLog: LogFn, debugLogger: Logg
|
|
|
53
52
|
} else if (options.proverNode) {
|
|
54
53
|
const { startProverNode } = await import('./cmds/start_prover_node.js');
|
|
55
54
|
({ 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
55
|
} else if (options.archiver) {
|
|
60
56
|
const { startArchiver } = await import('./cmds/start_archiver.js');
|
|
61
57
|
({ 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';
|
|
21
|
+
import { sequencerClientConfigMappings } from '@aztec/sequencer-client/config';
|
|
20
22
|
import { chainConfigMappings } from '@aztec/stdlib/config';
|
|
21
|
-
import { telemetryClientConfigMappings } from '@aztec/telemetry-client';
|
|
22
|
-
import { worldStateConfigMappings } from '@aztec/world-state';
|
|
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
|
{
|
|
@@ -159,9 +153,9 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
|
|
|
159
153
|
configToFlag('--l1-chain-id', l1ReaderConfigMappings.l1ChainId),
|
|
160
154
|
// Do not set default for CLI: keep undefined unless provided via flag or env
|
|
161
155
|
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',
|
|
156
|
+
configToFlag('--l1-consensus-host-urls', blobClientConfigMapping.l1ConsensusHostUrls),
|
|
157
|
+
configToFlag('--l1-consensus-host-api-keys', blobClientConfigMapping.l1ConsensusHostApiKeys),
|
|
158
|
+
configToFlag('--l1-consensus-host-api-key-headers', blobClientConfigMapping.l1ConsensusHostApiKeyHeaders),
|
|
165
159
|
],
|
|
166
160
|
'L1 CONTRACTS': [
|
|
167
161
|
configToFlag('--registry-address', l1ContractAddressesMapping.registryAddress),
|
|
@@ -208,21 +202,13 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
|
|
|
208
202
|
'sequencer',
|
|
209
203
|
omitConfigMappings(sequencerClientConfigMappings, [
|
|
210
204
|
'fakeProcessingDelayPerTxMs',
|
|
205
|
+
'fakeThrowAfterProcessingTxCount',
|
|
211
206
|
'skipCollectingAttestations',
|
|
212
207
|
'skipInvalidateBlockAsProposer',
|
|
213
208
|
'blobSinkMapSizeKb',
|
|
214
209
|
]),
|
|
215
210
|
),
|
|
216
211
|
],
|
|
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
212
|
'PROVER NODE': [
|
|
227
213
|
{
|
|
228
214
|
flag: '--prover-node',
|
package/src/cli/cli.ts
CHANGED
|
@@ -31,10 +31,9 @@ export function injectAztecCommands(program: Command, userLog: LogFn, debugLogge
|
|
|
31
31
|
|
|
32
32
|
program.configureHelp({ sortSubcommands: true });
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
`
|
|
34
|
+
program.addHelpText(
|
|
35
|
+
'after',
|
|
36
|
+
`
|
|
38
37
|
|
|
39
38
|
Additional commands:
|
|
40
39
|
|
|
@@ -65,17 +64,30 @@ export function injectAztecCommands(program: Command, userLog: LogFn, debugLogge
|
|
|
65
64
|
The compiled contracts will be placed in the target/ directory by default.
|
|
66
65
|
Supports standard nargo compile options.
|
|
67
66
|
|
|
67
|
+
fmt [options]: formats Noir code using nargo fmt
|
|
68
|
+
Example:
|
|
69
|
+
$ aztec fmt # formats all Noir files in the project
|
|
70
|
+
|
|
71
|
+
check [options]: type-checks Noir code without compiling using nargo check
|
|
72
|
+
Example:
|
|
73
|
+
$ aztec check # checks all Noir files in the project
|
|
74
|
+
|
|
68
75
|
test [options]: starts a dockerized TXE node via
|
|
69
76
|
$ aztec start --txe
|
|
70
77
|
then runs
|
|
71
78
|
$ aztec test --silence-warnings --oracle-resolver=<TXE_ADDRESS> [options]
|
|
72
79
|
|
|
80
|
+
lsp: starts the Nargo Language Server Protocol server
|
|
81
|
+
Runs nargo lsp in a Docker container for IDE integration with Noir.
|
|
82
|
+
This command is typically used by IDE extensions and not called directly by users.
|
|
83
|
+
Example:
|
|
84
|
+
$ aztec lsp # starts the LSP server
|
|
85
|
+
|
|
73
86
|
preload-crs: Downloads and caches the Common Reference String (CRS) data required for zero-knowledge proofs.
|
|
74
87
|
Example:
|
|
75
88
|
$ aztec preload-crs # preloads CRS data
|
|
76
89
|
`,
|
|
77
|
-
|
|
78
|
-
}
|
|
90
|
+
);
|
|
79
91
|
|
|
80
92
|
program
|
|
81
93
|
.command('preload-crs')
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getArchiverConfigFromEnv,
|
|
7
7
|
} from '@aztec/archiver';
|
|
8
8
|
import { createLogger } from '@aztec/aztec.js/log';
|
|
9
|
-
import { type
|
|
9
|
+
import { type BlobClientConfig, blobClientConfigMapping, createBlobClient } from '@aztec/blob-client/client';
|
|
10
10
|
import { getL1Config } from '@aztec/cli/config';
|
|
11
11
|
import type { NamespacedApiHandlers } from '@aztec/foundation/json-rpc/server';
|
|
12
12
|
import { type DataStoreConfig, dataConfigMappings } from '@aztec/kv-store/config';
|
|
@@ -25,9 +25,9 @@ export async function startArchiver(
|
|
|
25
25
|
services: NamespacedApiHandlers,
|
|
26
26
|
): Promise<{ config: ArchiverConfig & DataStoreConfig }> {
|
|
27
27
|
const envConfig = getArchiverConfigFromEnv();
|
|
28
|
-
const cliOptions = extractRelevantOptions<ArchiverConfig & DataStoreConfig &
|
|
28
|
+
const cliOptions = extractRelevantOptions<ArchiverConfig & DataStoreConfig & BlobClientConfig>(
|
|
29
29
|
options,
|
|
30
|
-
{ ...archiverConfigMappings, ...dataConfigMappings, ...
|
|
30
|
+
{ ...archiverConfigMappings, ...dataConfigMappings, ...blobClientConfigMapping },
|
|
31
31
|
'archiver',
|
|
32
32
|
);
|
|
33
33
|
|
|
@@ -51,9 +51,9 @@ export async function startArchiver(
|
|
|
51
51
|
const store = await createStore('archiver', KVArchiverDataStore.SCHEMA_VERSION, archiverConfig, storeLog);
|
|
52
52
|
const archiverStore = new KVArchiverDataStore(store, archiverConfig.maxLogs);
|
|
53
53
|
|
|
54
|
-
const telemetry = initTelemetryClient(getTelemetryClientConfig());
|
|
55
|
-
const
|
|
56
|
-
const archiver = await Archiver.createAndSync(archiverConfig, archiverStore, { telemetry,
|
|
54
|
+
const telemetry = await initTelemetryClient(getTelemetryClientConfig());
|
|
55
|
+
const blobClient = createBlobClient(archiverConfig, { logger: createLogger('archiver:blob-client:client') });
|
|
56
|
+
const archiver = await Archiver.createAndSync(archiverConfig, archiverStore, { telemetry, blobClient }, true);
|
|
57
57
|
services.archiver = [archiver, ArchiverApiSchema];
|
|
58
58
|
signalHandlers.push(archiver.stop);
|
|
59
59
|
|
|
@@ -40,7 +40,7 @@ export async function startBot(
|
|
|
40
40
|
const pxeConfig = extractRelevantOptions<PXEConfig & CliPXEOptions>(options, allPxeConfigMappings, 'pxe');
|
|
41
41
|
const wallet = await TestWallet.create(aztecNode, pxeConfig);
|
|
42
42
|
|
|
43
|
-
const telemetry = initTelemetryClient(getTelemetryClientConfig());
|
|
43
|
+
const telemetry = await initTelemetryClient(getTelemetryClientConfig());
|
|
44
44
|
await addBot(options, signalHandlers, services, wallet, aztecNode, telemetry, undefined);
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -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';
|
|
@@ -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 });
|
|
@@ -25,7 +25,7 @@ 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
30
|
const store = await createStore('p2p-bootstrap', 1, config, createLogger('p2p:bootstrap:store'));
|
|
31
31
|
const node = new BootstrapNode(store, telemetryClient);
|
|
@@ -53,7 +53,7 @@ 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
58
|
const proofStore = new InlineProofStore();
|
|
59
59
|
const agents = times(
|
|
@@ -1,5 +1,5 @@
|
|
|
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 {
|
|
@@ -45,7 +45,7 @@ export async function startProverBroker(
|
|
|
45
45
|
config.l1Contracts = addresses;
|
|
46
46
|
config.rollupVersion = rollupConfig.rollupVersion;
|
|
47
47
|
|
|
48
|
-
const client = initTelemetryClient(getTelemetryClientConfig());
|
|
48
|
+
const client = await initTelemetryClient(getTelemetryClientConfig());
|
|
49
49
|
const broker = await createAndStartProvingBroker(config, client);
|
|
50
50
|
|
|
51
51
|
if (options.autoUpdate !== 'disabled' && options.autoUpdateUrl) {
|
|
@@ -2,7 +2,7 @@ import { getInitialTestAccountsData } from '@aztec/accounts/testing';
|
|
|
2
2
|
import { Fr } from '@aztec/aztec.js/fields';
|
|
3
3
|
import { getSponsoredFPCAddress } from '@aztec/cli/cli-utils';
|
|
4
4
|
import { getL1Config } from '@aztec/cli/config';
|
|
5
|
-
import { getPublicClient } from '@aztec/ethereum';
|
|
5
|
+
import { getPublicClient } from '@aztec/ethereum/client';
|
|
6
6
|
import type { NamespacedApiHandlers } from '@aztec/foundation/json-rpc/server';
|
|
7
7
|
import { Agent, makeUndiciFetch } from '@aztec/foundation/json-rpc/undici';
|
|
8
8
|
import type { LogFn } from '@aztec/foundation/log';
|
|
@@ -67,7 +67,7 @@ export async function startProverNode(
|
|
|
67
67
|
);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
const telemetry = initTelemetryClient(extractRelevantOptions(options, telemetryClientConfigMappings, 'tel'));
|
|
70
|
+
const telemetry = await initTelemetryClient(extractRelevantOptions(options, telemetryClientConfigMappings, 'tel'));
|
|
71
71
|
|
|
72
72
|
let broker: ProvingJobBroker;
|
|
73
73
|
if (proverConfig.proverBrokerUrl) {
|
package/src/cli/util.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import type { AztecNodeConfig } from '@aztec/aztec-node';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { AccountManager } from '@aztec/aztec.js/wallet';
|
|
5
|
-
import type { ViemClient } from '@aztec/ethereum';
|
|
2
|
+
import type { AccountManager } from '@aztec/aztec.js/wallet';
|
|
3
|
+
import type { ViemClient } from '@aztec/ethereum/types';
|
|
6
4
|
import type { ConfigMappingsType } from '@aztec/foundation/config';
|
|
5
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
6
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
7
7
|
import { type LogFn, createLogger } from '@aztec/foundation/log';
|
|
8
8
|
import type { SharedNodeConfig } from '@aztec/node-lib/config';
|
|
9
9
|
import type { ProverConfig } from '@aztec/stdlib/interfaces/server';
|
|
10
|
-
import {
|
|
11
|
-
import { getTelemetryClient } from '@aztec/telemetry-client';
|
|
10
|
+
import { getTelemetryClient } from '@aztec/telemetry-client/start';
|
|
12
11
|
import type { TestWallet } from '@aztec/test-wallet/server';
|
|
13
12
|
|
|
14
13
|
import chalk from 'chalk';
|
|
@@ -312,6 +311,7 @@ export async function setupUpdateMonitor(
|
|
|
312
311
|
updateNodeConfig?: (config: object) => Promise<void>,
|
|
313
312
|
) {
|
|
314
313
|
const logger = createLogger('update-check');
|
|
314
|
+
const { UpdateChecker } = await import('@aztec/stdlib/update-checker');
|
|
315
315
|
const checker = await UpdateChecker.new({
|
|
316
316
|
baseURL: updatesLocation,
|
|
317
317
|
publicClient,
|
package/src/examples/util.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/aztec.js/addresses';
|
|
2
|
-
import type { ExtendedViemWalletClient } from '@aztec/ethereum';
|
|
2
|
+
import type { ExtendedViemWalletClient } from '@aztec/ethereum/types';
|
|
3
3
|
import { jsonStringify } from '@aztec/foundation/json-rpc';
|
|
4
4
|
|
|
5
5
|
import type { Abi, Narrow } from 'abitype';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type InitialAccountData, getInitialTestAccountsData } from '@aztec/accounts/testing';
|
|
2
2
|
import type { Wallet } from '@aztec/aztec.js/wallet';
|
|
3
|
-
import { Fr } from '@aztec/foundation/
|
|
3
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
4
|
import type { LogFn } from '@aztec/foundation/log';
|
|
5
5
|
import { FPCContract } from '@aztec/noir-contracts.js/FPC';
|
|
6
6
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env -S node --no-warnings
|
|
2
2
|
import { getInitialTestAccountsData } from '@aztec/accounts/testing';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { AztecNodeService } from '@aztec/aztec-node';
|
|
4
|
+
import { type AztecNodeConfig, getConfigEnvVars } from '@aztec/aztec-node/config';
|
|
5
|
+
import { Fr } from '@aztec/aztec.js/fields';
|
|
6
|
+
import { createLogger } from '@aztec/aztec.js/log';
|
|
7
|
+
import { type BlobClientInterface, createBlobClient } from '@aztec/blob-client/client';
|
|
6
8
|
import { GENESIS_ARCHIVE_ROOT } from '@aztec/constants';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
getL1ContractsConfigEnvVars,
|
|
13
|
-
waitForPublicClient,
|
|
14
|
-
} from '@aztec/ethereum';
|
|
9
|
+
import { createEthereumChain } from '@aztec/ethereum/chain';
|
|
10
|
+
import { waitForPublicClient } from '@aztec/ethereum/client';
|
|
11
|
+
import { getL1ContractsConfigEnvVars } from '@aztec/ethereum/config';
|
|
12
|
+
import { NULL_KEY } from '@aztec/ethereum/constants';
|
|
13
|
+
import { deployAztecL1Contracts } from '@aztec/ethereum/deploy-aztec-l1-contracts';
|
|
15
14
|
import { EthCheatCodes } from '@aztec/ethereum/test';
|
|
16
15
|
import { SecretValue } from '@aztec/foundation/config';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
16
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
17
|
+
import type { LogFn } from '@aztec/foundation/log';
|
|
19
18
|
import { DateProvider, TestDateProvider } from '@aztec/foundation/timer';
|
|
20
19
|
import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
21
20
|
import { protocolContractsHash } from '@aztec/protocol-contracts';
|
|
@@ -28,7 +27,7 @@ import {
|
|
|
28
27
|
import { TestWallet, deployFundedSchnorrAccounts } from '@aztec/test-wallet/server';
|
|
29
28
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
30
29
|
|
|
31
|
-
import { type
|
|
30
|
+
import { type Hex, createPublicClient, fallback, http as httpViemTransport } from 'viem';
|
|
32
31
|
import { mnemonicToAccount, privateKeyToAddress } from 'viem/accounts';
|
|
33
32
|
import { foundry } from 'viem/chains';
|
|
34
33
|
|
|
@@ -49,42 +48,26 @@ const localAnvil = foundry;
|
|
|
49
48
|
*/
|
|
50
49
|
export async function deployContractsToL1(
|
|
51
50
|
aztecNodeConfig: AztecNodeConfig,
|
|
52
|
-
|
|
53
|
-
contractDeployLogger = logger,
|
|
51
|
+
privateKey: Hex,
|
|
54
52
|
opts: {
|
|
55
53
|
assumeProvenThroughBlockNumber?: number;
|
|
56
|
-
salt?: number;
|
|
57
54
|
genesisArchiveRoot?: Fr;
|
|
58
55
|
feeJuicePortalInitialBalance?: bigint;
|
|
59
56
|
} = {},
|
|
60
57
|
) {
|
|
61
|
-
const chain =
|
|
62
|
-
aztecNodeConfig.l1RpcUrls.length > 0
|
|
63
|
-
? createEthereumChain(aztecNodeConfig.l1RpcUrls, aztecNodeConfig.l1ChainId)
|
|
64
|
-
: { chainInfo: localAnvil };
|
|
65
|
-
|
|
66
58
|
await waitForPublicClient(aztecNodeConfig);
|
|
67
59
|
|
|
68
|
-
const l1Contracts = await
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
salt: opts.salt,
|
|
80
|
-
feeJuicePortalInitialBalance: opts.feeJuicePortalInitialBalance,
|
|
81
|
-
aztecTargetCommitteeSize: 0, // no committee in local network
|
|
82
|
-
slasherFlavor: 'none', // no slashing in local network
|
|
83
|
-
realVerifier: false,
|
|
84
|
-
},
|
|
85
|
-
);
|
|
86
|
-
|
|
87
|
-
await deployMulticall3(l1Contracts.l1Client, logger);
|
|
60
|
+
const l1Contracts = await deployAztecL1Contracts(aztecNodeConfig.l1RpcUrls[0], privateKey, foundry.id, {
|
|
61
|
+
...getL1ContractsConfigEnvVars(), // TODO: We should not need to be loading config from env again, caller should handle this
|
|
62
|
+
...aztecNodeConfig,
|
|
63
|
+
vkTreeRoot: getVKTreeRoot(),
|
|
64
|
+
protocolContractsHash,
|
|
65
|
+
genesisArchiveRoot: opts.genesisArchiveRoot ?? new Fr(GENESIS_ARCHIVE_ROOT),
|
|
66
|
+
feeJuicePortalInitialBalance: opts.feeJuicePortalInitialBalance,
|
|
67
|
+
aztecTargetCommitteeSize: 0, // no committee in local network
|
|
68
|
+
slasherFlavor: 'none', // no slashing in local network
|
|
69
|
+
realVerifier: false,
|
|
70
|
+
});
|
|
88
71
|
|
|
89
72
|
aztecNodeConfig.l1Contracts = l1Contracts.l1ContractAddresses;
|
|
90
73
|
aztecNodeConfig.rollupVersion = l1Contracts.rollupVersion;
|
|
@@ -96,8 +79,6 @@ export async function deployContractsToL1(
|
|
|
96
79
|
export type LocalNetworkConfig = AztecNodeConfig & {
|
|
97
80
|
/** Mnemonic used to derive the L1 deployer private key.*/
|
|
98
81
|
l1Mnemonic: string;
|
|
99
|
-
/** Salt used to deploy L1 contracts.*/
|
|
100
|
-
deployAztecContractsSalt: string;
|
|
101
82
|
/** Whether to deploy test accounts on local network start.*/
|
|
102
83
|
testAccounts: boolean;
|
|
103
84
|
};
|
|
@@ -156,12 +137,15 @@ export async function createLocalNetwork(config: Partial<LocalNetworkConfig> = {
|
|
|
156
137
|
let watcher: AnvilTestWatcher | undefined = undefined;
|
|
157
138
|
const dateProvider = new TestDateProvider();
|
|
158
139
|
if (!aztecNodeConfig.p2pEnabled) {
|
|
159
|
-
const l1ContractAddresses = await deployContractsToL1(
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
140
|
+
const l1ContractAddresses = await deployContractsToL1(
|
|
141
|
+
aztecNodeConfig,
|
|
142
|
+
aztecNodeConfig.validatorPrivateKeys.getValue()[0],
|
|
143
|
+
{
|
|
144
|
+
assumeProvenThroughBlockNumber: Number.MAX_SAFE_INTEGER,
|
|
145
|
+
genesisArchiveRoot,
|
|
146
|
+
feeJuicePortalInitialBalance: fundingNeeded,
|
|
147
|
+
},
|
|
148
|
+
);
|
|
165
149
|
|
|
166
150
|
const chain =
|
|
167
151
|
aztecNodeConfig.l1RpcUrls.length > 0
|
|
@@ -183,14 +167,10 @@ export async function createLocalNetwork(config: Partial<LocalNetworkConfig> = {
|
|
|
183
167
|
await watcher.start();
|
|
184
168
|
}
|
|
185
169
|
|
|
186
|
-
const telemetry = initTelemetryClient(getTelemetryClientConfig());
|
|
187
|
-
// Create a local blob
|
|
188
|
-
const
|
|
189
|
-
const node = await createAztecNode(
|
|
190
|
-
aztecNodeConfig,
|
|
191
|
-
{ telemetry, blobSinkClient, dateProvider },
|
|
192
|
-
{ prefilledPublicData },
|
|
193
|
-
);
|
|
170
|
+
const telemetry = await initTelemetryClient(getTelemetryClientConfig());
|
|
171
|
+
// Create a local blob client client inside the local network, no http connectivity
|
|
172
|
+
const blobClient = createBlobClient();
|
|
173
|
+
const node = await createAztecNode(aztecNodeConfig, { telemetry, blobClient, dateProvider }, { prefilledPublicData });
|
|
194
174
|
|
|
195
175
|
if (initialAccounts.length) {
|
|
196
176
|
const PXEConfig = { proverEnabled: aztecNodeConfig.realProofs };
|
|
@@ -227,7 +207,7 @@ export async function createLocalNetwork(config: Partial<LocalNetworkConfig> = {
|
|
|
227
207
|
*/
|
|
228
208
|
export async function createAztecNode(
|
|
229
209
|
config: Partial<AztecNodeConfig> = {},
|
|
230
|
-
deps: { telemetry?: TelemetryClient;
|
|
210
|
+
deps: { telemetry?: TelemetryClient; blobClient?: BlobClientInterface; dateProvider?: DateProvider } = {},
|
|
231
211
|
options: { prefilledPublicData?: PublicDataTreeLeaf[] } = {},
|
|
232
212
|
) {
|
|
233
213
|
// TODO(#12272): will clean this up. This is criminal.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ViemClient } from '@aztec/ethereum';
|
|
2
1
|
import { EthCheatCodes, RollupCheatCodes } from '@aztec/ethereum/test';
|
|
2
|
+
import type { ViemClient } from '@aztec/ethereum/types';
|
|
3
3
|
import { SlotNumber } from '@aztec/foundation/branded-types';
|
|
4
4
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
5
5
|
import { type Logger, createLogger } from '@aztec/foundation/log';
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { LogFn } from '@aztec/foundation/log';
|
|
2
|
-
export declare function startBlobSink(options: any, signalHandlers: (() => Promise<void>)[], userLog: LogFn): Promise<void>;
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhcnRfYmxvYl9zaW5rLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY2xpL2NtZHMvc3RhcnRfYmxvYl9zaW5rLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQU9BLE9BQU8sS0FBSyxFQUFFLEtBQUssRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBS25ELHdCQUFzQixhQUFhLENBQUMsT0FBTyxFQUFFLEdBQUcsRUFBRSxjQUFjLEVBQUUsQ0FBQyxNQUFNLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxFQUFFLEVBQUUsT0FBTyxFQUFFLEtBQUssaUJBNEN4RyJ9
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"start_blob_sink.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_blob_sink.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAKnD,wBAAsB,aAAa,CAAC,OAAO,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,iBA4CxG"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { blobSinkConfigMappings, createBlobSinkServer, getBlobSinkConfigFromEnv } from '@aztec/blob-sink/server';
|
|
2
|
-
import { getL1Config } from '@aztec/cli/config';
|
|
3
|
-
import { getConfigEnvVars as getTelemetryClientConfig, initTelemetryClient } from '@aztec/telemetry-client';
|
|
4
|
-
import { extractRelevantOptions } from '../util.js';
|
|
5
|
-
export async function startBlobSink(options, signalHandlers, userLog) {
|
|
6
|
-
if (options.prover || options.node || options.sequencer || options.pxe || options.p2pBootstrap || options.txe) {
|
|
7
|
-
userLog(`Starting a blob sink with --node, --sequencer, --pxe, --p2p-bootstrap, --prover or --txe is not supported.`);
|
|
8
|
-
process.exit(1);
|
|
9
|
-
}
|
|
10
|
-
let blobSinkConfig = {
|
|
11
|
-
...getBlobSinkConfigFromEnv(),
|
|
12
|
-
...extractRelevantOptions(options, blobSinkConfigMappings, 'blobSink')
|
|
13
|
-
};
|
|
14
|
-
if (!blobSinkConfig.l1Contracts?.registryAddress || blobSinkConfig.l1Contracts.registryAddress.isZero()) {
|
|
15
|
-
throw new Error('REGISTRY_CONTRACT_ADDRESS not set');
|
|
16
|
-
}
|
|
17
|
-
if (!blobSinkConfig.l1RpcUrls || blobSinkConfig.l1RpcUrls.length === 0) {
|
|
18
|
-
throw new Error('ETHEREUM_HOSTS not set');
|
|
19
|
-
}
|
|
20
|
-
if (typeof blobSinkConfig.l1ChainId !== 'number') {
|
|
21
|
-
throw new Error('L1_CHAIN_ID');
|
|
22
|
-
}
|
|
23
|
-
const telemetry = initTelemetryClient(getTelemetryClientConfig());
|
|
24
|
-
const { config: chainConfig, addresses } = await getL1Config(blobSinkConfig.l1Contracts.registryAddress, blobSinkConfig.l1RpcUrls, blobSinkConfig.l1ChainId, blobSinkConfig.rollupVersion);
|
|
25
|
-
blobSinkConfig = {
|
|
26
|
-
...blobSinkConfig,
|
|
27
|
-
l1Contracts: addresses,
|
|
28
|
-
...chainConfig
|
|
29
|
-
};
|
|
30
|
-
const blobSink = await createBlobSinkServer(blobSinkConfig, telemetry);
|
|
31
|
-
signalHandlers.push(blobSink.stop.bind(blobSink));
|
|
32
|
-
await blobSink.start();
|
|
33
|
-
}
|