@aztec/aztec 2.0.3 → 2.1.0-rc.10
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 +4 -4
- package/dest/cli/aztec_start_options.js +2 -2
- package/dest/cli/cmds/start_prover_agent.d.ts.map +1 -1
- package/dest/cli/cmds/start_prover_agent.js +10 -1
- package/dest/cli/cmds/start_prover_broker.d.ts.map +1 -1
- package/dest/cli/cmds/start_prover_broker.js +6 -1
- package/dest/cli/cmds/start_prover_node.d.ts.map +1 -1
- package/dest/cli/cmds/start_prover_node.js +9 -0
- package/dest/examples/util.d.ts +1 -1
- package/dest/examples/util.d.ts.map +1 -1
- package/dest/sandbox/sandbox.d.ts +2 -1
- package/dest/sandbox/sandbox.d.ts.map +1 -1
- package/dest/sandbox/sandbox.js +3 -3
- package/dest/testing/anvil_test_watcher.js +1 -1
- package/package.json +34 -34
- package/src/bin/index.ts +4 -4
- package/src/cli/aztec_start_options.ts +2 -2
- package/src/cli/cmds/start_prover_agent.ts +6 -1
- package/src/cli/cmds/start_prover_broker.ts +15 -1
- package/src/cli/cmds/start_prover_node.ts +6 -1
- package/src/examples/util.ts +1 -1
- package/src/sandbox/sandbox.ts +9 -3
- package/src/testing/anvil_test_watcher.ts +1 -1
package/dest/bin/index.js
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
//
|
|
3
3
|
import { injectCommands as injectBuilderCommands } from '@aztec/builder';
|
|
4
4
|
import { injectCommands as injectWalletCommands } from '@aztec/cli-wallet';
|
|
5
|
-
import { enrichEnvironmentWithChainConfig } from '@aztec/cli/config';
|
|
5
|
+
import { enrichEnvironmentWithChainConfig, enrichEnvironmentWithNetworkConfig } from '@aztec/cli/config';
|
|
6
6
|
import { injectCommands as injectContractCommands } from '@aztec/cli/contracts';
|
|
7
|
-
import { injectCommands as injectDevnetCommands } from '@aztec/cli/devnet';
|
|
8
7
|
import { injectCommands as injectInfrastructureCommands } from '@aztec/cli/infrastructure';
|
|
9
8
|
import { injectCommands as injectL1Commands } from '@aztec/cli/l1';
|
|
10
9
|
import { injectCommands as injectMiscCommands } from '@aztec/cli/misc';
|
|
@@ -30,7 +29,9 @@ const debugLogger = createLogger('cli');
|
|
|
30
29
|
if (networkIndex !== -1) {
|
|
31
30
|
networkValue = args[networkIndex].split('=')[1] || args[networkIndex + 1];
|
|
32
31
|
}
|
|
33
|
-
|
|
32
|
+
const networkName = getActiveNetworkName(networkValue);
|
|
33
|
+
await enrichEnvironmentWithChainConfig(networkName);
|
|
34
|
+
await enrichEnvironmentWithNetworkConfig(networkName);
|
|
34
35
|
const cliVersion = getCliVersion();
|
|
35
36
|
let program = new Command('aztec');
|
|
36
37
|
program.description('Aztec command line interface').version(cliVersion);
|
|
@@ -41,7 +42,6 @@ const debugLogger = createLogger('cli');
|
|
|
41
42
|
program = injectL1Commands(program, userLog, debugLogger);
|
|
42
43
|
program = injectPXECommands(program, userLog, debugLogger);
|
|
43
44
|
program = injectMiscCommands(program, userLog);
|
|
44
|
-
program = injectDevnetCommands(program, userLog, debugLogger);
|
|
45
45
|
program = injectWalletCommands(program, userLog, debugLogger);
|
|
46
46
|
await program.parseAsync(process.argv);
|
|
47
47
|
}
|
|
@@ -76,7 +76,7 @@ export const aztecStartOptions = {
|
|
|
76
76
|
configToFlag('--auto-update', sharedNodeConfigMappings.autoUpdate),
|
|
77
77
|
configToFlag('--auto-update-url', sharedNodeConfigMappings.autoUpdateUrl),
|
|
78
78
|
configToFlag('--sync-mode', sharedNodeConfigMappings.syncMode),
|
|
79
|
-
configToFlag('--snapshots-
|
|
79
|
+
configToFlag('--snapshots-urls', sharedNodeConfigMappings.snapshotsUrls)
|
|
80
80
|
],
|
|
81
81
|
SANDBOX: [
|
|
82
82
|
{
|
|
@@ -140,7 +140,7 @@ export const aztecStartOptions = {
|
|
|
140
140
|
],
|
|
141
141
|
'L1 CONTRACTS': [
|
|
142
142
|
configToFlag('--registry-address', l1ContractAddressesMapping.registryAddress),
|
|
143
|
-
configToFlag('--rollup-version', chainConfigMappings.rollupVersion
|
|
143
|
+
configToFlag('--rollup-version', chainConfigMappings.rollupVersion)
|
|
144
144
|
],
|
|
145
145
|
STORAGE: [
|
|
146
146
|
configToFlag('--data-directory', dataConfigMappings.dataDirectory),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start_prover_agent.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_prover_agent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE/E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAgBnD,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,GAAG,EACZ,cAAc,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EACvC,QAAQ,EAAE,qBAAqB,EAC/B,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"start_prover_agent.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_prover_agent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE/E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAgBnD,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,GAAG,EACZ,cAAc,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EACvC,QAAQ,EAAE,qBAAqB,EAC/B,OAAO,EAAE,KAAK,iBAgEf"}
|
|
@@ -25,9 +25,18 @@ export async function startProverAgent(options, signalHandlers, services, userLo
|
|
|
25
25
|
process.exit(1);
|
|
26
26
|
}
|
|
27
27
|
await preloadCrsDataForServerSideProving(config, userLog);
|
|
28
|
-
const fetch = makeTracedFetch(
|
|
28
|
+
const fetch = makeTracedFetch(// retry connections every 3s, up to 30s before giving up
|
|
29
|
+
[
|
|
29
30
|
1,
|
|
30
31
|
2,
|
|
32
|
+
3,
|
|
33
|
+
3,
|
|
34
|
+
3,
|
|
35
|
+
3,
|
|
36
|
+
3,
|
|
37
|
+
3,
|
|
38
|
+
3,
|
|
39
|
+
3,
|
|
31
40
|
3
|
|
32
41
|
], false, makeUndiciFetch(new Agent({
|
|
33
42
|
connections: 10
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start_prover_broker.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_prover_broker.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"start_prover_broker.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_prover_broker.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EACL,KAAK,kBAAkB,EAIxB,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAKxE,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,GAAG,EACZ,cAAc,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EACvC,QAAQ,EAAE,qBAAqB,EAC/B,OAAO,EAAE,KAAK,GACb,OAAO,CAAC;IAAE,MAAM,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,kBAAkB,CAAA;CAAE,CAAC,CA4CnE"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { getL1Config } from '@aztec/cli/config';
|
|
2
|
+
import { getPublicClient } from '@aztec/ethereum';
|
|
2
3
|
import { ProvingJobBrokerSchema, createAndStartProvingBroker, proverBrokerConfigMappings } from '@aztec/prover-client/broker';
|
|
3
4
|
import { getProverNodeBrokerConfigFromEnv } from '@aztec/prover-node';
|
|
4
5
|
import { getConfigEnvVars as getTelemetryClientConfig, initTelemetryClient } from '@aztec/telemetry-client';
|
|
5
|
-
import { extractRelevantOptions } from '../util.js';
|
|
6
|
+
import { extractRelevantOptions, setupUpdateMonitor } from '../util.js';
|
|
6
7
|
export async function startProverBroker(options, signalHandlers, services, userLog) {
|
|
7
8
|
if (options.node || options.sequencer || options.pxe || options.p2pBootstrap || options.txe) {
|
|
8
9
|
userLog(`Starting a prover broker with --node, --sequencer, --pxe, --p2p-bootstrap, or --txe is not supported.`);
|
|
@@ -15,11 +16,15 @@ export async function startProverBroker(options, signalHandlers, services, userL
|
|
|
15
16
|
if (!config.l1Contracts.registryAddress || config.l1Contracts.registryAddress.isZero()) {
|
|
16
17
|
throw new Error('L1 registry address is required to start Aztec Node without --deploy-aztec-contracts option');
|
|
17
18
|
}
|
|
19
|
+
const followsCanonicalRollup = typeof config.rollupVersion !== 'number';
|
|
18
20
|
const { addresses, config: rollupConfig } = await getL1Config(config.l1Contracts.registryAddress, config.l1RpcUrls, config.l1ChainId, config.rollupVersion);
|
|
19
21
|
config.l1Contracts = addresses;
|
|
20
22
|
config.rollupVersion = rollupConfig.rollupVersion;
|
|
21
23
|
const client = initTelemetryClient(getTelemetryClientConfig());
|
|
22
24
|
const broker = await createAndStartProvingBroker(config, client);
|
|
25
|
+
if (options.autoUpdate !== 'disabled' && options.autoUpdateUrl) {
|
|
26
|
+
await setupUpdateMonitor(options.autoUpdate, new URL(options.autoUpdateUrl), followsCanonicalRollup, getPublicClient(config), config.l1Contracts.registryAddress, signalHandlers);
|
|
27
|
+
}
|
|
23
28
|
services.proverBroker = [
|
|
24
29
|
broker,
|
|
25
30
|
ProvingJobBrokerSchema
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start_prover_node.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_prover_node.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE/E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EACL,KAAK,gBAAgB,EAItB,MAAM,oBAAoB,CAAC;AAS5B,wBAAsB,eAAe,CACnC,OAAO,EAAE,GAAG,EACZ,cAAc,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EACvC,QAAQ,EAAE,qBAAqB,EAC/B,OAAO,EAAE,KAAK,GACb,OAAO,CAAC;IAAE,MAAM,EAAE,gBAAgB,CAAA;CAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"start_prover_node.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_prover_node.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE/E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EACL,KAAK,gBAAgB,EAItB,MAAM,oBAAoB,CAAC;AAS5B,wBAAsB,eAAe,CACnC,OAAO,EAAE,GAAG,EACZ,cAAc,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EACvC,QAAQ,EAAE,qBAAqB,EAC/B,OAAO,EAAE,KAAK,GACb,OAAO,CAAC;IAAE,MAAM,EAAE,gBAAgB,CAAA;CAAE,CAAC,CA+FvC"}
|
|
@@ -48,9 +48,18 @@ export async function startProverNode(options, signalHandlers, services, userLog
|
|
|
48
48
|
if (proverConfig.proverBrokerUrl) {
|
|
49
49
|
// at 1TPS we'd enqueue ~1k tube proofs and ~1k AVM proofs immediately
|
|
50
50
|
// set a lower connection limit such that we don't overload the server
|
|
51
|
+
// Keep retrying up to 30s
|
|
51
52
|
const fetch = makeTracedFetch([
|
|
52
53
|
1,
|
|
53
54
|
2,
|
|
55
|
+
3,
|
|
56
|
+
3,
|
|
57
|
+
3,
|
|
58
|
+
3,
|
|
59
|
+
3,
|
|
60
|
+
3,
|
|
61
|
+
3,
|
|
62
|
+
3,
|
|
54
63
|
3
|
|
55
64
|
], false, makeUndiciFetch(new Agent({
|
|
56
65
|
connections: 100
|
package/dest/examples/util.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/aztec.js';
|
|
2
2
|
import type { ExtendedViemWalletClient } from '@aztec/ethereum';
|
|
3
|
+
import type { Hex } from '@spalladino/viem';
|
|
3
4
|
import type { Abi, Narrow } from 'abitype';
|
|
4
|
-
import type { Hex } from 'viem';
|
|
5
5
|
/**
|
|
6
6
|
* Helper function to deploy ETH contracts.
|
|
7
7
|
* @param l1Client - A viem WalletClient extended with public actions.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/examples/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAGhE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/examples/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAGhE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,wBAAwB,EAClC,GAAG,EAAE,MAAM,CAAC,GAAG,GAAG,SAAS,OAAO,EAAE,CAAC,EACrC,QAAQ,EAAE,GAAG,EACb,IAAI,GAAE,SAAS,OAAO,EAAO,GAC5B,OAAO,CAAC,UAAU,CAAC,CAcrB;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/C"}
|
|
@@ -9,7 +9,7 @@ import { type PXEServiceConfig } from '@aztec/pxe/server';
|
|
|
9
9
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
10
10
|
import type { PublicDataTreeLeaf } from '@aztec/stdlib/trees';
|
|
11
11
|
import { type TelemetryClient } from '@aztec/telemetry-client';
|
|
12
|
-
import { type HDAccount, type PrivateKeyAccount } from 'viem';
|
|
12
|
+
import { type HDAccount, type PrivateKeyAccount } from '@spalladino/viem';
|
|
13
13
|
/**
|
|
14
14
|
* Function to deploy our L1 contracts to the sandbox L1
|
|
15
15
|
* @param aztecNodeConfig - The Aztec Node Config
|
|
@@ -38,6 +38,7 @@ export declare function deployContractsToL1(aztecNodeConfig: AztecNodeConfig, hd
|
|
|
38
38
|
stakingAssetHandlerAddress?: EthAddress | undefined;
|
|
39
39
|
zkPassportVerifierAddress?: EthAddress | undefined;
|
|
40
40
|
gseAddress?: EthAddress | undefined;
|
|
41
|
+
dateGatedRelayerAddress?: EthAddress | undefined;
|
|
41
42
|
} & {
|
|
42
43
|
rollupAddress: EthAddress;
|
|
43
44
|
} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../../src/sandbox/sandbox.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,KAAK,eAAe,EAAE,gBAAgB,EAAoB,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,KAAK,uBAAuB,EAAwB,MAAM,yBAAyB,CAAC;AAa7F,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,KAAK,KAAK,EAAgB,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,YAAY,EAAoB,MAAM,yBAAyB,CAAC;AAGzE,OAAO,EAAE,KAAK,gBAAgB,EAAyC,MAAM,mBAAmB,CAAC;AACjG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,
|
|
1
|
+
{"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../../src/sandbox/sandbox.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,KAAK,eAAe,EAAE,gBAAgB,EAAoB,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,KAAK,uBAAuB,EAAwB,MAAM,yBAAyB,CAAC;AAa7F,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,KAAK,KAAK,EAAgB,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,YAAY,EAAoB,MAAM,yBAAyB,CAAC;AAGzE,OAAO,EAAE,KAAK,gBAAgB,EAAyC,MAAM,mBAAmB,CAAC;AACjG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,KAAK,SAAS,EACd,KAAK,iBAAiB,EAIvB,MAAM,kBAAkB,CAAC;AAc1B;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,GAAG,iBAAiB,EACxC,oBAAoB,mCAAS,EAC7B,IAAI,GAAE;IACJ,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kBAAkB,CAAC,EAAE,EAAE,CAAC;IACxB,4BAA4B,CAAC,EAAE,MAAM,CAAC;CAClC;;;;;;;;;;;;;;;;;;;;;;;GAkCP;AAED,wBAAwB;AACxB,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG;IAC5C,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,wBAAwB,EAAE,MAAM,CAAC;IACjC,qDAAqD;IACrD,KAAK,EAAE,OAAO,CAAC;IACf,uDAAuD;IACvD,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,YAAK,EAAE,OAAO,EAAE,KAAK;;;;GA4GtF;AAED;;;GAGG;AACH,wBAAsB,eAAe,CACnC,MAAM,GAAE,OAAO,CAAC,eAAe,CAAM,EACrC,IAAI,GAAE;IAAE,SAAS,CAAC,EAAE,eAAe,CAAC;IAAC,cAAc,CAAC,EAAE,uBAAuB,CAAC;IAAC,YAAY,CAAC,EAAE,YAAY,CAAA;CAAO,EACjH,OAAO,GAAE;IAAE,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,CAAA;CAAO,6BAW7D;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,GAAE,OAAO,CAAC,gBAAgB,CAAM,mDAI3F"}
|
package/dest/sandbox/sandbox.js
CHANGED
|
@@ -17,9 +17,9 @@ import { protocolContractTreeRoot } from '@aztec/protocol-contracts';
|
|
|
17
17
|
import { createPXEService, getPXEServiceConfig } from '@aztec/pxe/server';
|
|
18
18
|
import { getConfigEnvVars as getTelemetryClientConfig, initTelemetryClient } from '@aztec/telemetry-client';
|
|
19
19
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
20
|
-
import { createPublicClient, fallback, http as httpViemTransport } from 'viem';
|
|
21
|
-
import { mnemonicToAccount, privateKeyToAddress } from 'viem/accounts';
|
|
22
|
-
import { foundry } from 'viem/chains';
|
|
20
|
+
import { createPublicClient, fallback, http as httpViemTransport } from '@spalladino/viem';
|
|
21
|
+
import { mnemonicToAccount, privateKeyToAddress } from '@spalladino/viem/accounts';
|
|
22
|
+
import { foundry } from '@spalladino/viem/chains';
|
|
23
23
|
import { createAccountLogs } from '../cli/util.js';
|
|
24
24
|
import { DefaultMnemonic } from '../mnemonic.js';
|
|
25
25
|
import { AnvilTestWatcher } from '../testing/anvil_test_watcher.js';
|
|
@@ -2,7 +2,7 @@ import { RollupCheatCodes } from '@aztec/ethereum/test';
|
|
|
2
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
3
|
import { RunningPromise } from '@aztec/foundation/running-promise';
|
|
4
4
|
import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
|
|
5
|
-
import { getAddress, getContract } from 'viem';
|
|
5
|
+
import { getAddress, getContract } from '@spalladino/viem';
|
|
6
6
|
/**
|
|
7
7
|
* Represents a watcher for a rollup contract.
|
|
8
8
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/aztec",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.1.0-rc.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -28,44 +28,44 @@
|
|
|
28
28
|
"../package.common.json"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@aztec/accounts": "2.0.
|
|
32
|
-
"@aztec/archiver": "2.0.
|
|
33
|
-
"@aztec/aztec-faucet": "2.0.
|
|
34
|
-
"@aztec/aztec-node": "2.0.
|
|
35
|
-
"@aztec/aztec.js": "2.0.
|
|
36
|
-
"@aztec/bb-prover": "2.0.
|
|
37
|
-
"@aztec/bb.js": "2.0.
|
|
38
|
-
"@aztec/blob-sink": "2.0.
|
|
39
|
-
"@aztec/bot": "2.0.
|
|
40
|
-
"@aztec/builder": "2.0.
|
|
41
|
-
"@aztec/cli": "2.0.
|
|
42
|
-
"@aztec/cli-wallet": "2.0.
|
|
43
|
-
"@aztec/constants": "2.0.
|
|
44
|
-
"@aztec/entrypoints": "2.0.
|
|
45
|
-
"@aztec/ethereum": "2.0.
|
|
46
|
-
"@aztec/foundation": "2.0.
|
|
47
|
-
"@aztec/kv-store": "2.0.
|
|
48
|
-
"@aztec/l1-artifacts": "2.0.
|
|
49
|
-
"@aztec/node-lib": "2.0.
|
|
50
|
-
"@aztec/noir-contracts.js": "2.0.
|
|
51
|
-
"@aztec/noir-protocol-circuits-types": "2.0.
|
|
52
|
-
"@aztec/p2p": "2.0.
|
|
53
|
-
"@aztec/p2p-bootstrap": "2.0.
|
|
54
|
-
"@aztec/protocol-contracts": "2.0.
|
|
55
|
-
"@aztec/prover-client": "2.0.
|
|
56
|
-
"@aztec/prover-node": "2.0.
|
|
57
|
-
"@aztec/pxe": "2.0.
|
|
58
|
-
"@aztec/stdlib": "2.0.
|
|
59
|
-
"@aztec/telemetry-client": "2.0.
|
|
60
|
-
"@aztec/txe": "2.0.
|
|
61
|
-
"@aztec/world-state": "2.0.
|
|
31
|
+
"@aztec/accounts": "2.1.0-rc.10",
|
|
32
|
+
"@aztec/archiver": "2.1.0-rc.10",
|
|
33
|
+
"@aztec/aztec-faucet": "2.1.0-rc.10",
|
|
34
|
+
"@aztec/aztec-node": "2.1.0-rc.10",
|
|
35
|
+
"@aztec/aztec.js": "2.1.0-rc.10",
|
|
36
|
+
"@aztec/bb-prover": "2.1.0-rc.10",
|
|
37
|
+
"@aztec/bb.js": "2.1.0-rc.10",
|
|
38
|
+
"@aztec/blob-sink": "2.1.0-rc.10",
|
|
39
|
+
"@aztec/bot": "2.1.0-rc.10",
|
|
40
|
+
"@aztec/builder": "2.1.0-rc.10",
|
|
41
|
+
"@aztec/cli": "2.1.0-rc.10",
|
|
42
|
+
"@aztec/cli-wallet": "2.1.0-rc.10",
|
|
43
|
+
"@aztec/constants": "2.1.0-rc.10",
|
|
44
|
+
"@aztec/entrypoints": "2.1.0-rc.10",
|
|
45
|
+
"@aztec/ethereum": "2.1.0-rc.10",
|
|
46
|
+
"@aztec/foundation": "2.1.0-rc.10",
|
|
47
|
+
"@aztec/kv-store": "2.1.0-rc.10",
|
|
48
|
+
"@aztec/l1-artifacts": "2.1.0-rc.10",
|
|
49
|
+
"@aztec/node-lib": "2.1.0-rc.10",
|
|
50
|
+
"@aztec/noir-contracts.js": "2.1.0-rc.10",
|
|
51
|
+
"@aztec/noir-protocol-circuits-types": "2.1.0-rc.10",
|
|
52
|
+
"@aztec/p2p": "2.1.0-rc.10",
|
|
53
|
+
"@aztec/p2p-bootstrap": "2.1.0-rc.10",
|
|
54
|
+
"@aztec/protocol-contracts": "2.1.0-rc.10",
|
|
55
|
+
"@aztec/prover-client": "2.1.0-rc.10",
|
|
56
|
+
"@aztec/prover-node": "2.1.0-rc.10",
|
|
57
|
+
"@aztec/pxe": "2.1.0-rc.10",
|
|
58
|
+
"@aztec/stdlib": "2.1.0-rc.10",
|
|
59
|
+
"@aztec/telemetry-client": "2.1.0-rc.10",
|
|
60
|
+
"@aztec/txe": "2.1.0-rc.10",
|
|
61
|
+
"@aztec/world-state": "2.1.0-rc.10",
|
|
62
|
+
"@spalladino/viem": "2.38.2-eip7594.0",
|
|
62
63
|
"@types/chalk": "^2.2.0",
|
|
63
64
|
"abitype": "^0.8.11",
|
|
64
65
|
"chalk": "^5.3.0",
|
|
65
66
|
"commander": "^12.1.0",
|
|
66
67
|
"koa": "^2.16.1",
|
|
67
|
-
"koa-router": "^
|
|
68
|
-
"viem": "2.23.7"
|
|
68
|
+
"koa-router": "^13.1.1"
|
|
69
69
|
},
|
|
70
70
|
"files": [
|
|
71
71
|
"dest",
|
package/src/bin/index.ts
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
//
|
|
3
3
|
import { injectCommands as injectBuilderCommands } from '@aztec/builder';
|
|
4
4
|
import { injectCommands as injectWalletCommands } from '@aztec/cli-wallet';
|
|
5
|
-
import { enrichEnvironmentWithChainConfig } from '@aztec/cli/config';
|
|
5
|
+
import { enrichEnvironmentWithChainConfig, enrichEnvironmentWithNetworkConfig } from '@aztec/cli/config';
|
|
6
6
|
import { injectCommands as injectContractCommands } from '@aztec/cli/contracts';
|
|
7
|
-
import { injectCommands as injectDevnetCommands } from '@aztec/cli/devnet';
|
|
8
7
|
import { injectCommands as injectInfrastructureCommands } from '@aztec/cli/infrastructure';
|
|
9
8
|
import { injectCommands as injectL1Commands } from '@aztec/cli/l1';
|
|
10
9
|
import { injectCommands as injectMiscCommands } from '@aztec/cli/misc';
|
|
@@ -39,7 +38,9 @@ async function main() {
|
|
|
39
38
|
networkValue = args[networkIndex].split('=')[1] || args[networkIndex + 1];
|
|
40
39
|
}
|
|
41
40
|
|
|
42
|
-
|
|
41
|
+
const networkName = getActiveNetworkName(networkValue);
|
|
42
|
+
await enrichEnvironmentWithChainConfig(networkName);
|
|
43
|
+
await enrichEnvironmentWithNetworkConfig(networkName);
|
|
43
44
|
|
|
44
45
|
const cliVersion = getCliVersion();
|
|
45
46
|
let program = new Command('aztec');
|
|
@@ -51,7 +52,6 @@ async function main() {
|
|
|
51
52
|
program = injectL1Commands(program, userLog, debugLogger);
|
|
52
53
|
program = injectPXECommands(program, userLog, debugLogger);
|
|
53
54
|
program = injectMiscCommands(program, userLog);
|
|
54
|
-
program = injectDevnetCommands(program, userLog, debugLogger);
|
|
55
55
|
program = injectWalletCommands(program, userLog, debugLogger);
|
|
56
56
|
|
|
57
57
|
await program.parseAsync(process.argv);
|
|
@@ -106,7 +106,7 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
|
|
|
106
106
|
configToFlag('--auto-update-url', sharedNodeConfigMappings.autoUpdateUrl),
|
|
107
107
|
|
|
108
108
|
configToFlag('--sync-mode', sharedNodeConfigMappings.syncMode),
|
|
109
|
-
configToFlag('--snapshots-
|
|
109
|
+
configToFlag('--snapshots-urls', sharedNodeConfigMappings.snapshotsUrls),
|
|
110
110
|
],
|
|
111
111
|
SANDBOX: [
|
|
112
112
|
{
|
|
@@ -168,7 +168,7 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
|
|
|
168
168
|
],
|
|
169
169
|
'L1 CONTRACTS': [
|
|
170
170
|
configToFlag('--registry-address', l1ContractAddressesMapping.registryAddress),
|
|
171
|
-
configToFlag('--rollup-version', chainConfigMappings.rollupVersion
|
|
171
|
+
configToFlag('--rollup-version', chainConfigMappings.rollupVersion),
|
|
172
172
|
],
|
|
173
173
|
STORAGE: [
|
|
174
174
|
configToFlag('--data-directory', dataConfigMappings.dataDirectory),
|
|
@@ -45,7 +45,12 @@ export async function startProverAgent(
|
|
|
45
45
|
|
|
46
46
|
await preloadCrsDataForServerSideProving(config, userLog);
|
|
47
47
|
|
|
48
|
-
const fetch = makeTracedFetch(
|
|
48
|
+
const fetch = makeTracedFetch(
|
|
49
|
+
// retry connections every 3s, up to 30s before giving up
|
|
50
|
+
[1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3],
|
|
51
|
+
false,
|
|
52
|
+
makeUndiciFetch(new Agent({ connections: 10 })),
|
|
53
|
+
);
|
|
49
54
|
const broker = createProvingJobBrokerClient(config.proverBrokerUrl, getVersions(), fetch);
|
|
50
55
|
|
|
51
56
|
const telemetry = initTelemetryClient(extractRelevantOptions(options, telemetryClientConfigMappings, 'tel'));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getL1Config } from '@aztec/cli/config';
|
|
2
|
+
import { getPublicClient } from '@aztec/ethereum';
|
|
2
3
|
import type { NamespacedApiHandlers } from '@aztec/foundation/json-rpc/server';
|
|
3
4
|
import type { LogFn } from '@aztec/foundation/log';
|
|
4
5
|
import {
|
|
@@ -11,7 +12,7 @@ import { getProverNodeBrokerConfigFromEnv } from '@aztec/prover-node';
|
|
|
11
12
|
import type { ProvingJobBroker } from '@aztec/stdlib/interfaces/server';
|
|
12
13
|
import { getConfigEnvVars as getTelemetryClientConfig, initTelemetryClient } from '@aztec/telemetry-client';
|
|
13
14
|
|
|
14
|
-
import { extractRelevantOptions } from '../util.js';
|
|
15
|
+
import { extractRelevantOptions, setupUpdateMonitor } from '../util.js';
|
|
15
16
|
|
|
16
17
|
export async function startProverBroker(
|
|
17
18
|
options: any,
|
|
@@ -33,6 +34,7 @@ export async function startProverBroker(
|
|
|
33
34
|
throw new Error('L1 registry address is required to start Aztec Node without --deploy-aztec-contracts option');
|
|
34
35
|
}
|
|
35
36
|
|
|
37
|
+
const followsCanonicalRollup = typeof config.rollupVersion !== 'number';
|
|
36
38
|
const { addresses, config: rollupConfig } = await getL1Config(
|
|
37
39
|
config.l1Contracts.registryAddress,
|
|
38
40
|
config.l1RpcUrls,
|
|
@@ -45,6 +47,18 @@ export async function startProverBroker(
|
|
|
45
47
|
|
|
46
48
|
const client = initTelemetryClient(getTelemetryClientConfig());
|
|
47
49
|
const broker = await createAndStartProvingBroker(config, client);
|
|
50
|
+
|
|
51
|
+
if (options.autoUpdate !== 'disabled' && options.autoUpdateUrl) {
|
|
52
|
+
await setupUpdateMonitor(
|
|
53
|
+
options.autoUpdate,
|
|
54
|
+
new URL(options.autoUpdateUrl),
|
|
55
|
+
followsCanonicalRollup,
|
|
56
|
+
getPublicClient(config),
|
|
57
|
+
config.l1Contracts.registryAddress,
|
|
58
|
+
signalHandlers,
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
48
62
|
services.proverBroker = [broker, ProvingJobBrokerSchema];
|
|
49
63
|
signalHandlers.push(() => broker.stop());
|
|
50
64
|
|
|
@@ -73,7 +73,12 @@ export async function startProverNode(
|
|
|
73
73
|
if (proverConfig.proverBrokerUrl) {
|
|
74
74
|
// at 1TPS we'd enqueue ~1k tube proofs and ~1k AVM proofs immediately
|
|
75
75
|
// set a lower connection limit such that we don't overload the server
|
|
76
|
-
|
|
76
|
+
// Keep retrying up to 30s
|
|
77
|
+
const fetch = makeTracedFetch(
|
|
78
|
+
[1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3],
|
|
79
|
+
false,
|
|
80
|
+
makeUndiciFetch(new Agent({ connections: 100 })),
|
|
81
|
+
);
|
|
77
82
|
broker = createProvingJobBrokerClient(proverConfig.proverBrokerUrl, getVersions(proverConfig), fetch);
|
|
78
83
|
} else if (options.proverBroker) {
|
|
79
84
|
({ broker } = await startProverBroker(options, signalHandlers, services, userLog));
|
package/src/examples/util.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { EthAddress } from '@aztec/aztec.js';
|
|
|
2
2
|
import type { ExtendedViemWalletClient } from '@aztec/ethereum';
|
|
3
3
|
import { jsonStringify } from '@aztec/foundation/json-rpc';
|
|
4
4
|
|
|
5
|
+
import type { Hex } from '@spalladino/viem';
|
|
5
6
|
import type { Abi, Narrow } from 'abitype';
|
|
6
|
-
import type { Hex } from 'viem';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Helper function to deploy ETH contracts.
|
package/src/sandbox/sandbox.ts
CHANGED
|
@@ -31,9 +31,15 @@ import {
|
|
|
31
31
|
} from '@aztec/telemetry-client';
|
|
32
32
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
33
33
|
|
|
34
|
-
import {
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
import {
|
|
35
|
+
type HDAccount,
|
|
36
|
+
type PrivateKeyAccount,
|
|
37
|
+
createPublicClient,
|
|
38
|
+
fallback,
|
|
39
|
+
http as httpViemTransport,
|
|
40
|
+
} from '@spalladino/viem';
|
|
41
|
+
import { mnemonicToAccount, privateKeyToAddress } from '@spalladino/viem/accounts';
|
|
42
|
+
import { foundry } from '@spalladino/viem/chains';
|
|
37
43
|
|
|
38
44
|
import { createAccountLogs } from '../cli/util.js';
|
|
39
45
|
import { DefaultMnemonic } from '../mnemonic.js';
|
|
@@ -6,7 +6,7 @@ import { RunningPromise } from '@aztec/foundation/running-promise';
|
|
|
6
6
|
import type { TestDateProvider } from '@aztec/foundation/timer';
|
|
7
7
|
import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
|
|
8
8
|
|
|
9
|
-
import { type GetContractReturnType, getAddress, getContract } from 'viem';
|
|
9
|
+
import { type GetContractReturnType, getAddress, getContract } from '@spalladino/viem';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Represents a watcher for a rollup contract.
|