@aztec/aztec 0.82.2 → 0.82.3
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/cli/aztec_start_options.d.ts.map +1 -1
- package/dest/cli/aztec_start_options.js +12 -0
- package/dest/cli/chain_l2_config.d.ts +3 -0
- package/dest/cli/chain_l2_config.d.ts.map +1 -1
- package/dest/cli/chain_l2_config.js +11 -2
- package/dest/cli/cmds/start_node.d.ts.map +1 -1
- package/dest/cli/cmds/start_node.js +10 -2
- package/dest/cli/cmds/start_p2p_bootstrap.d.ts.map +1 -1
- package/dest/cli/cmds/start_p2p_bootstrap.js +5 -1
- package/dest/cli/cmds/start_prover_node.d.ts.map +1 -1
- package/dest/cli/cmds/start_prover_node.js +10 -2
- package/dest/sandbox/sandbox.d.ts.map +1 -1
- package/dest/sandbox/sandbox.js +0 -2
- package/package.json +30 -30
- package/src/cli/aztec_start_options.ts +13 -0
- package/src/cli/chain_l2_config.ts +14 -2
- package/src/cli/cmds/start_node.ts +11 -4
- package/src/cli/cmds/start_p2p_bootstrap.ts +2 -1
- package/src/cli/cmds/start_prover_node.ts +10 -2
- package/src/sandbox/sandbox.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aztec_start_options.d.ts","sourceRoot":"","sources":["../../src/cli/aztec_start_options.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,MAAM,EAIZ,MAAM,0BAA0B,CAAC;AAelC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,GAAG,GAAG,SAAS,CAAC;IAC9B,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,CAAC;IACpC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,GAAG,CAAC;CACjC;AAED,eAAO,MAAM,UAAU,cAAe,MAAM,kBAAkB,OAAO,MAAM,EAAE,aAAa,CAAC,uBAiB1F,CAAC;AAGF,eAAO,MAAM,gBAAgB,UAU5B,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"aztec_start_options.d.ts","sourceRoot":"","sources":["../../src/cli/aztec_start_options.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,MAAM,EAIZ,MAAM,0BAA0B,CAAC;AAelC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,GAAG,GAAG,SAAS,CAAC;IAC9B,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,CAAC;IACpC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,GAAG,CAAC;CACjC;AAED,eAAO,MAAM,UAAU,cAAe,MAAM,kBAAkB,OAAO,MAAM,EAAE,aAAa,CAAC,uBAiB1F,CAAC;AAGF,eAAO,MAAM,gBAAgB,UAU5B,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;CAyWlE,CAAC"}
|
|
@@ -245,6 +245,18 @@ export const aztecStartOptions = {
|
|
|
245
245
|
description: 'Populate genesis state with initial fee juice for test accounts',
|
|
246
246
|
envVar: 'TEST_ACCOUNTS',
|
|
247
247
|
...booleanConfigHelper()
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
flag: '--node.syncMode <value>',
|
|
251
|
+
description: 'Set sync mode to `full` to always sync via L1, `snapshot` to download a snapshot if there is no local data, `force-snapshot` to download even if there is local data.',
|
|
252
|
+
defaultValue: 'snapshot',
|
|
253
|
+
envVar: 'SYNC_MODE'
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
flag: '--node.snapshotsUrl <value>',
|
|
257
|
+
description: 'Base URL for downloading snapshots for snapshot sync.',
|
|
258
|
+
defaultValue: undefined,
|
|
259
|
+
envVar: 'SYNC_SNAPSHOTS_URL'
|
|
248
260
|
}
|
|
249
261
|
],
|
|
250
262
|
'P2P SUBSYSTEM': [
|
|
@@ -6,9 +6,12 @@ export type L2ChainConfig = {
|
|
|
6
6
|
aztecEpochDuration: number;
|
|
7
7
|
aztecProofSubmissionWindow: number;
|
|
8
8
|
testAccounts: boolean;
|
|
9
|
+
sponsoredFPC: boolean;
|
|
9
10
|
p2pEnabled: boolean;
|
|
10
11
|
p2pBootstrapNodes: string[];
|
|
11
12
|
registryAddress: string;
|
|
13
|
+
slashFactoryAddress: string;
|
|
14
|
+
feeAssetHandlerAddress: string;
|
|
12
15
|
seqMinTxsPerBlock: number;
|
|
13
16
|
seqMaxTxsPerBlock: number;
|
|
14
17
|
realProofs: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain_l2_config.d.ts","sourceRoot":"","sources":["../../src/cli/chain_l2_config.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG,eAAe,CAAC;AAEhE,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,0BAA0B,EAAE,MAAM,CAAC;IACnC,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,
|
|
1
|
+
{"version":3,"file":"chain_l2_config.d.ts","sourceRoot":"","sources":["../../src/cli/chain_l2_config.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG,eAAe,CAAC;AAEhE,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,0BAA0B,EAAE,MAAM,CAAC;IACnC,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,aAgB1C,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,aAgBvC,CAAC;AAEF,wBAAsB,YAAY,CAAC,WAAW,EAAE,YAAY,gBAW3D;AAED,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAWpG;AAUD,wBAAsB,gCAAgC,CAAC,WAAW,EAAE,YAAY,iBAsB/E"}
|
|
@@ -6,9 +6,12 @@ export const testnetIgnitionL2ChainConfig = {
|
|
|
6
6
|
aztecEpochDuration: 32,
|
|
7
7
|
aztecProofSubmissionWindow: 64,
|
|
8
8
|
testAccounts: true,
|
|
9
|
+
sponsoredFPC: false,
|
|
9
10
|
p2pEnabled: true,
|
|
10
11
|
p2pBootstrapNodes: [],
|
|
11
12
|
registryAddress: '0x12b3ebc176a1646b911391eab3760764f2e05fe3',
|
|
13
|
+
slashFactoryAddress: '',
|
|
14
|
+
feeAssetHandlerAddress: '',
|
|
12
15
|
seqMinTxsPerBlock: 0,
|
|
13
16
|
seqMaxTxsPerBlock: 0,
|
|
14
17
|
realProofs: true
|
|
@@ -19,10 +22,13 @@ export const alphaTestnetL2ChainConfig = {
|
|
|
19
22
|
aztecSlotDuration: 36,
|
|
20
23
|
aztecEpochDuration: 32,
|
|
21
24
|
aztecProofSubmissionWindow: 64,
|
|
22
|
-
testAccounts:
|
|
25
|
+
testAccounts: true,
|
|
26
|
+
sponsoredFPC: true,
|
|
23
27
|
p2pEnabled: true,
|
|
24
28
|
p2pBootstrapNodes: [],
|
|
25
|
-
registryAddress: '',
|
|
29
|
+
registryAddress: '0xad85d55a4bbef35e95396191c22903aa717edf1c',
|
|
30
|
+
slashFactoryAddress: '0xf667f50fd68b30c38b12d29fee537fa5ea158eb8',
|
|
31
|
+
feeAssetHandlerAddress: '0xf0664fec6ac15313e18d5ad8225e46b7c6463338',
|
|
26
32
|
seqMinTxsPerBlock: 0,
|
|
27
33
|
seqMaxTxsPerBlock: 4,
|
|
28
34
|
realProofs: true
|
|
@@ -70,9 +76,12 @@ export async function enrichEnvironmentWithChainConfig(networkName) {
|
|
|
70
76
|
enrichVar('AZTEC_PROOF_SUBMISSION_WINDOW', config.aztecProofSubmissionWindow.toString());
|
|
71
77
|
enrichVar('BOOTSTRAP_NODES', config.p2pBootstrapNodes.join(','));
|
|
72
78
|
enrichVar('TEST_ACCOUNTS', config.testAccounts.toString());
|
|
79
|
+
enrichVar('SPONSORED_FPC', config.sponsoredFPC.toString());
|
|
73
80
|
enrichVar('P2P_ENABLED', config.p2pEnabled.toString());
|
|
74
81
|
enrichVar('L1_CHAIN_ID', config.l1ChainId.toString());
|
|
75
82
|
enrichVar('REGISTRY_CONTRACT_ADDRESS', config.registryAddress);
|
|
83
|
+
enrichVar('SLASH_FACTORY_CONTRACT_ADDRESS', config.slashFactoryAddress);
|
|
84
|
+
enrichVar('FEE_ASSET_HANDLER_CONTRACT_ADDRESS', config.feeAssetHandlerAddress);
|
|
76
85
|
enrichVar('SEQ_MIN_TX_PER_BLOCK', config.seqMinTxsPerBlock.toString());
|
|
77
86
|
enrichVar('SEQ_MAX_TX_PER_BLOCK', config.seqMaxTxsPerBlock.toString());
|
|
78
87
|
enrichVar('DATA_DIRECTORY', path.join(process.env.HOME || '~', '.aztec', networkName, 'data'));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start_node.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_node.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,eAAe,EAA6C,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"start_node.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_node.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,eAAe,EAA6C,MAAM,mBAAmB,CAAC;AAGpG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAgBnD,wBAAsB,SAAS,CAC7B,OAAO,EAAE,GAAG,EACZ,cAAc,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EACvC,QAAQ,EAAE,qBAAqB,EAC/B,aAAa,EAAE,qBAAqB,EACpC,OAAO,EAAE,KAAK,GACb,OAAO,CAAC;IAAE,MAAM,EAAE,eAAe,CAAA;CAAE,CAAC,CAiJtC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { getInitialTestAccounts } from '@aztec/accounts/testing';
|
|
2
2
|
import { aztecNodeConfigMappings, getConfigEnvVars } from '@aztec/aztec-node';
|
|
3
|
+
import { getSponsoredFPCAddress } from '@aztec/cli/cli-utils';
|
|
3
4
|
import { NULL_KEY } from '@aztec/ethereum';
|
|
4
5
|
import { AztecNodeAdminApiSchema, AztecNodeApiSchema } from '@aztec/stdlib/interfaces/client';
|
|
5
6
|
import { P2PApiSchema } from '@aztec/stdlib/interfaces/server';
|
|
@@ -26,8 +27,15 @@ export async function startNode(options, signalHandlers, services, adminServices
|
|
|
26
27
|
process.exit(1);
|
|
27
28
|
}
|
|
28
29
|
await preloadCrsDataForVerifying(nodeConfig, userLog);
|
|
29
|
-
const
|
|
30
|
-
const
|
|
30
|
+
const testAccounts = nodeConfig.testAccounts ? (await getInitialTestAccounts()).map((a)=>a.address) : [];
|
|
31
|
+
const sponsoredFPCAccounts = nodeConfig.sponsoredFPC ? [
|
|
32
|
+
await getSponsoredFPCAddress()
|
|
33
|
+
] : [];
|
|
34
|
+
const initialFundedAccounts = testAccounts.concat(sponsoredFPCAccounts);
|
|
35
|
+
userLog(`Initial funded accounts: ${initialFundedAccounts.map((a)=>a.toString()).join(', ')}`);
|
|
36
|
+
const { genesisBlockHash, genesisArchiveRoot, prefilledPublicData } = await getGenesisValues(initialFundedAccounts);
|
|
37
|
+
userLog(`Genesis block hash: ${genesisBlockHash.toString()}`);
|
|
38
|
+
userLog(`Genesis archive root: ${genesisArchiveRoot.toString()}`);
|
|
31
39
|
// Deploy contracts if needed
|
|
32
40
|
if (nodeSpecificOptions.deployAztecContracts || nodeSpecificOptions.deployAztecContractsSalt) {
|
|
33
41
|
let account;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start_p2p_bootstrap.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_p2p_bootstrap.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,KAAK,KAAK,EAAgB,MAAM,uBAAuB,CAAC;AASjE,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;;
|
|
1
|
+
{"version":3,"file":"start_p2p_bootstrap.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_p2p_bootstrap.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,KAAK,KAAK,EAAgB,MAAM,uBAAuB,CAAC;AASjE,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;;GAcf"}
|
|
@@ -9,7 +9,11 @@ import { extractRelevantOptions } from '../util.js';
|
|
|
9
9
|
export async function startP2PBootstrap(options, signalHandlers, services, userLog) {
|
|
10
10
|
// Start a P2P bootstrap node.
|
|
11
11
|
const config = extractRelevantOptions(options, bootnodeConfigMappings, 'p2p');
|
|
12
|
-
|
|
12
|
+
const safeConfig = {
|
|
13
|
+
...config,
|
|
14
|
+
peerIdPrivateKey: '<redacted>'
|
|
15
|
+
};
|
|
16
|
+
userLog(`Starting P2P bootstrap node with config: ${jsonStringify(safeConfig)}`);
|
|
13
17
|
const telemetryClient = initTelemetryClient(getTelemetryClientConfig());
|
|
14
18
|
const store = await createStore('p2p-bootstrap', 1, config, createLogger('p2p:bootstrap:store'));
|
|
15
19
|
const node = new BootstrapNode(store, telemetryClient);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start_prover_node.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_prover_node.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"start_prover_node.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_prover_node.ts"],"names":[],"mappings":"AAGA,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;AAa5B,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,CAoGvC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getInitialTestAccounts } from '@aztec/accounts/testing';
|
|
2
|
+
import { getSponsoredFPCAddress } from '@aztec/cli/cli-utils';
|
|
2
3
|
import { NULL_KEY } from '@aztec/ethereum';
|
|
3
4
|
import { Agent, makeUndiciFetch } from '@aztec/foundation/json-rpc/undici';
|
|
4
5
|
import { ProvingJobConsumerSchema, createProvingJobBrokerClient } from '@aztec/prover-client/broker';
|
|
@@ -78,8 +79,15 @@ export async function startProverNode(options, signalHandlers, services, userLog
|
|
|
78
79
|
userLog(`Running prover node without local prover agent. Connect one or more prover agents to this node or pass --proverAgent.proverAgentCount`);
|
|
79
80
|
}
|
|
80
81
|
await preloadCrsDataForVerifying(proverConfig, userLog);
|
|
81
|
-
const
|
|
82
|
-
const
|
|
82
|
+
const testAccounts = proverConfig.testAccounts ? (await getInitialTestAccounts()).map((a)=>a.address) : [];
|
|
83
|
+
const sponsoredFPCAccounts = proverConfig.sponsoredFPC ? [
|
|
84
|
+
await getSponsoredFPCAddress()
|
|
85
|
+
] : [];
|
|
86
|
+
const initialFundedAccounts = testAccounts.concat(sponsoredFPCAccounts);
|
|
87
|
+
userLog(`Initial funded accounts: ${initialFundedAccounts.map((a)=>a.toString()).join(', ')}`);
|
|
88
|
+
const { genesisArchiveRoot, genesisBlockHash, prefilledPublicData } = await getGenesisValues(initialFundedAccounts);
|
|
89
|
+
userLog(`Genesis block hash: ${genesisBlockHash.toString()}`);
|
|
90
|
+
userLog(`Genesis archive root: ${genesisArchiveRoot.toString()}`);
|
|
83
91
|
const proverNode = await createProverNode(proverConfig, {
|
|
84
92
|
telemetry,
|
|
85
93
|
broker
|
|
@@ -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;AAE7F,OAAO,EAAE,KAAK,uBAAuB,EAAwB,MAAM,yBAAyB,CAAC;AAU7F,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,KAAK,KAAK,EAAgB,MAAM,uBAAuB,CAAC;AAGjE,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,EAAE,KAAK,SAAS,EAAE,KAAK,iBAAiB,EAA2D,MAAM,MAAM,CAAC;AAavH;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,GAAG,iBAAiB,EACxC,oBAAoB,yCAAS,EAC7B,IAAI,GAAE;IAAE,8BAA8B,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC;IAAC,gBAAgB,CAAC,EAAE,EAAE,CAAA;CAAO;;;;;;;;;;;;;;;;;;;GA6BtH;AAED,wBAAwB;AACxB,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG;IAC5C,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,KAAK,EAAE,OAAO,CAAC;IACf,uDAAuD;IACvD,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,MAAM,oCAA6B,EAAE,OAAO,EAAE,KAAK;;;;
|
|
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;AAE7F,OAAO,EAAE,KAAK,uBAAuB,EAAwB,MAAM,yBAAyB,CAAC;AAU7F,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,KAAK,KAAK,EAAgB,MAAM,uBAAuB,CAAC;AAGjE,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,EAAE,KAAK,SAAS,EAAE,KAAK,iBAAiB,EAA2D,MAAM,MAAM,CAAC;AAavH;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,GAAG,iBAAiB,EACxC,oBAAoB,yCAAS,EAC7B,IAAI,GAAE;IAAE,8BAA8B,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC;IAAC,gBAAgB,CAAC,EAAE,EAAE,CAAA;CAAO;;;;;;;;;;;;;;;;;;;GA6BtH;AAED,wBAAwB;AACxB,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG;IAC5C,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,KAAK,EAAE,OAAO,CAAC;IACf,uDAAuD;IACvD,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,MAAM,oCAA6B,EAAE,OAAO,EAAE,KAAK;;;;GA4FtF;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,CAAA;CAAO,EACpF,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
|
@@ -75,8 +75,6 @@ const localAnvil = foundry;
|
|
|
75
75
|
if (config.testAccounts) {
|
|
76
76
|
if (aztecNodeConfig.p2pEnabled) {
|
|
77
77
|
userLog(`Not setting up test accounts as we are connecting to a network`);
|
|
78
|
-
} else if (config.noPXE) {
|
|
79
|
-
userLog(`Not setting up test accounts as we are not exposing a PXE`);
|
|
80
78
|
} else {
|
|
81
79
|
return await getInitialTestAccounts();
|
|
82
80
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/aztec",
|
|
3
|
-
"version": "0.82.
|
|
3
|
+
"version": "0.82.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js"
|
|
@@ -29,35 +29,35 @@
|
|
|
29
29
|
"../package.common.json"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@aztec/accounts": "0.82.
|
|
33
|
-
"@aztec/archiver": "0.82.
|
|
34
|
-
"@aztec/aztec-faucet": "0.82.
|
|
35
|
-
"@aztec/aztec-node": "0.82.
|
|
36
|
-
"@aztec/aztec.js": "0.82.
|
|
37
|
-
"@aztec/bb-prover": "0.82.
|
|
38
|
-
"@aztec/bb.js": "0.82.
|
|
39
|
-
"@aztec/blob-sink": "0.82.
|
|
40
|
-
"@aztec/bot": "0.82.
|
|
41
|
-
"@aztec/builder": "0.82.
|
|
42
|
-
"@aztec/cli": "0.82.
|
|
43
|
-
"@aztec/cli-wallet": "0.82.
|
|
44
|
-
"@aztec/constants": "0.82.
|
|
45
|
-
"@aztec/entrypoints": "0.82.
|
|
46
|
-
"@aztec/ethereum": "0.82.
|
|
47
|
-
"@aztec/foundation": "0.82.
|
|
48
|
-
"@aztec/kv-store": "0.82.
|
|
49
|
-
"@aztec/noir-contracts.js": "0.82.
|
|
50
|
-
"@aztec/noir-protocol-circuits-types": "0.82.
|
|
51
|
-
"@aztec/p2p": "0.82.
|
|
52
|
-
"@aztec/p2p-bootstrap": "0.82.
|
|
53
|
-
"@aztec/protocol-contracts": "0.82.
|
|
54
|
-
"@aztec/prover-client": "0.82.
|
|
55
|
-
"@aztec/prover-node": "0.82.
|
|
56
|
-
"@aztec/pxe": "0.82.
|
|
57
|
-
"@aztec/stdlib": "0.82.
|
|
58
|
-
"@aztec/telemetry-client": "0.82.
|
|
59
|
-
"@aztec/txe": "0.82.
|
|
60
|
-
"@aztec/world-state": "0.82.
|
|
32
|
+
"@aztec/accounts": "0.82.3",
|
|
33
|
+
"@aztec/archiver": "0.82.3",
|
|
34
|
+
"@aztec/aztec-faucet": "0.82.3",
|
|
35
|
+
"@aztec/aztec-node": "0.82.3",
|
|
36
|
+
"@aztec/aztec.js": "0.82.3",
|
|
37
|
+
"@aztec/bb-prover": "0.82.3",
|
|
38
|
+
"@aztec/bb.js": "0.82.3",
|
|
39
|
+
"@aztec/blob-sink": "0.82.3",
|
|
40
|
+
"@aztec/bot": "0.82.3",
|
|
41
|
+
"@aztec/builder": "0.82.3",
|
|
42
|
+
"@aztec/cli": "0.82.3",
|
|
43
|
+
"@aztec/cli-wallet": "0.82.3",
|
|
44
|
+
"@aztec/constants": "0.82.3",
|
|
45
|
+
"@aztec/entrypoints": "0.82.3",
|
|
46
|
+
"@aztec/ethereum": "0.82.3",
|
|
47
|
+
"@aztec/foundation": "0.82.3",
|
|
48
|
+
"@aztec/kv-store": "0.82.3",
|
|
49
|
+
"@aztec/noir-contracts.js": "0.82.3",
|
|
50
|
+
"@aztec/noir-protocol-circuits-types": "0.82.3",
|
|
51
|
+
"@aztec/p2p": "0.82.3",
|
|
52
|
+
"@aztec/p2p-bootstrap": "0.82.3",
|
|
53
|
+
"@aztec/protocol-contracts": "0.82.3",
|
|
54
|
+
"@aztec/prover-client": "0.82.3",
|
|
55
|
+
"@aztec/prover-node": "0.82.3",
|
|
56
|
+
"@aztec/pxe": "0.82.3",
|
|
57
|
+
"@aztec/stdlib": "0.82.3",
|
|
58
|
+
"@aztec/telemetry-client": "0.82.3",
|
|
59
|
+
"@aztec/txe": "0.82.3",
|
|
60
|
+
"@aztec/world-state": "0.82.3",
|
|
61
61
|
"@types/chalk": "^2.2.0",
|
|
62
62
|
"abitype": "^0.8.11",
|
|
63
63
|
"chalk": "^5.3.0",
|
|
@@ -273,6 +273,19 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
|
|
|
273
273
|
envVar: 'TEST_ACCOUNTS',
|
|
274
274
|
...booleanConfigHelper(),
|
|
275
275
|
},
|
|
276
|
+
{
|
|
277
|
+
flag: '--node.syncMode <value>',
|
|
278
|
+
description:
|
|
279
|
+
'Set sync mode to `full` to always sync via L1, `snapshot` to download a snapshot if there is no local data, `force-snapshot` to download even if there is local data.',
|
|
280
|
+
defaultValue: 'snapshot',
|
|
281
|
+
envVar: 'SYNC_MODE',
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
flag: '--node.snapshotsUrl <value>',
|
|
285
|
+
description: 'Base URL for downloading snapshots for snapshot sync.',
|
|
286
|
+
defaultValue: undefined,
|
|
287
|
+
envVar: 'SYNC_SNAPSHOTS_URL',
|
|
288
|
+
},
|
|
276
289
|
],
|
|
277
290
|
'P2P SUBSYSTEM': [
|
|
278
291
|
{
|
|
@@ -11,9 +11,12 @@ export type L2ChainConfig = {
|
|
|
11
11
|
aztecEpochDuration: number;
|
|
12
12
|
aztecProofSubmissionWindow: number;
|
|
13
13
|
testAccounts: boolean;
|
|
14
|
+
sponsoredFPC: boolean;
|
|
14
15
|
p2pEnabled: boolean;
|
|
15
16
|
p2pBootstrapNodes: string[];
|
|
16
17
|
registryAddress: string;
|
|
18
|
+
slashFactoryAddress: string;
|
|
19
|
+
feeAssetHandlerAddress: string;
|
|
17
20
|
seqMinTxsPerBlock: number;
|
|
18
21
|
seqMaxTxsPerBlock: number;
|
|
19
22
|
realProofs: boolean;
|
|
@@ -26,9 +29,12 @@ export const testnetIgnitionL2ChainConfig: L2ChainConfig = {
|
|
|
26
29
|
aztecEpochDuration: 32,
|
|
27
30
|
aztecProofSubmissionWindow: 64,
|
|
28
31
|
testAccounts: true,
|
|
32
|
+
sponsoredFPC: false,
|
|
29
33
|
p2pEnabled: true,
|
|
30
34
|
p2pBootstrapNodes: [],
|
|
31
35
|
registryAddress: '0x12b3ebc176a1646b911391eab3760764f2e05fe3',
|
|
36
|
+
slashFactoryAddress: '',
|
|
37
|
+
feeAssetHandlerAddress: '',
|
|
32
38
|
seqMinTxsPerBlock: 0,
|
|
33
39
|
seqMaxTxsPerBlock: 0,
|
|
34
40
|
realProofs: true,
|
|
@@ -40,10 +46,13 @@ export const alphaTestnetL2ChainConfig: L2ChainConfig = {
|
|
|
40
46
|
aztecSlotDuration: 36,
|
|
41
47
|
aztecEpochDuration: 32,
|
|
42
48
|
aztecProofSubmissionWindow: 64,
|
|
43
|
-
testAccounts:
|
|
49
|
+
testAccounts: true,
|
|
50
|
+
sponsoredFPC: true,
|
|
44
51
|
p2pEnabled: true,
|
|
45
52
|
p2pBootstrapNodes: [],
|
|
46
|
-
registryAddress: '',
|
|
53
|
+
registryAddress: '0xad85d55a4bbef35e95396191c22903aa717edf1c',
|
|
54
|
+
slashFactoryAddress: '0xf667f50fd68b30c38b12d29fee537fa5ea158eb8',
|
|
55
|
+
feeAssetHandlerAddress: '0xf0664fec6ac15313e18d5ad8225e46b7c6463338',
|
|
47
56
|
seqMinTxsPerBlock: 0,
|
|
48
57
|
seqMaxTxsPerBlock: 4,
|
|
49
58
|
realProofs: true,
|
|
@@ -94,9 +103,12 @@ export async function enrichEnvironmentWithChainConfig(networkName: NetworkNames
|
|
|
94
103
|
enrichVar('AZTEC_PROOF_SUBMISSION_WINDOW', config.aztecProofSubmissionWindow.toString());
|
|
95
104
|
enrichVar('BOOTSTRAP_NODES', config.p2pBootstrapNodes.join(','));
|
|
96
105
|
enrichVar('TEST_ACCOUNTS', config.testAccounts.toString());
|
|
106
|
+
enrichVar('SPONSORED_FPC', config.sponsoredFPC.toString());
|
|
97
107
|
enrichVar('P2P_ENABLED', config.p2pEnabled.toString());
|
|
98
108
|
enrichVar('L1_CHAIN_ID', config.l1ChainId.toString());
|
|
99
109
|
enrichVar('REGISTRY_CONTRACT_ADDRESS', config.registryAddress);
|
|
110
|
+
enrichVar('SLASH_FACTORY_CONTRACT_ADDRESS', config.slashFactoryAddress);
|
|
111
|
+
enrichVar('FEE_ASSET_HANDLER_CONTRACT_ADDRESS', config.feeAssetHandlerAddress);
|
|
100
112
|
enrichVar('SEQ_MIN_TX_PER_BLOCK', config.seqMinTxsPerBlock.toString());
|
|
101
113
|
enrichVar('SEQ_MAX_TX_PER_BLOCK', config.seqMaxTxsPerBlock.toString());
|
|
102
114
|
enrichVar('DATA_DIRECTORY', path.join(process.env.HOME || '~', '.aztec', networkName, 'data'));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { getInitialTestAccounts } from '@aztec/accounts/testing';
|
|
2
2
|
import { type AztecNodeConfig, aztecNodeConfigMappings, getConfigEnvVars } from '@aztec/aztec-node';
|
|
3
|
+
import { getSponsoredFPCAddress } from '@aztec/cli/cli-utils';
|
|
3
4
|
import { NULL_KEY } from '@aztec/ethereum';
|
|
4
5
|
import type { NamespacedApiHandlers } from '@aztec/foundation/json-rpc/server';
|
|
5
6
|
import type { LogFn } from '@aztec/foundation/log';
|
|
@@ -47,10 +48,16 @@ export async function startNode(
|
|
|
47
48
|
|
|
48
49
|
await preloadCrsDataForVerifying(nodeConfig, userLog);
|
|
49
50
|
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
const testAccounts = nodeConfig.testAccounts ? (await getInitialTestAccounts()).map(a => a.address) : [];
|
|
52
|
+
const sponsoredFPCAccounts = nodeConfig.sponsoredFPC ? [await getSponsoredFPCAddress()] : [];
|
|
53
|
+
const initialFundedAccounts = testAccounts.concat(sponsoredFPCAccounts);
|
|
54
|
+
|
|
55
|
+
userLog(`Initial funded accounts: ${initialFundedAccounts.map(a => a.toString()).join(', ')}`);
|
|
56
|
+
|
|
57
|
+
const { genesisBlockHash, genesisArchiveRoot, prefilledPublicData } = await getGenesisValues(initialFundedAccounts);
|
|
58
|
+
|
|
59
|
+
userLog(`Genesis block hash: ${genesisBlockHash.toString()}`);
|
|
60
|
+
userLog(`Genesis archive root: ${genesisArchiveRoot.toString()}`);
|
|
54
61
|
|
|
55
62
|
// Deploy contracts if needed
|
|
56
63
|
if (nodeSpecificOptions.deployAztecContracts || nodeSpecificOptions.deployAztecContractsSalt) {
|
|
@@ -17,7 +17,8 @@ export async function startP2PBootstrap(
|
|
|
17
17
|
) {
|
|
18
18
|
// Start a P2P bootstrap node.
|
|
19
19
|
const config = extractRelevantOptions<BootnodeConfig>(options, bootnodeConfigMappings, 'p2p');
|
|
20
|
-
|
|
20
|
+
const safeConfig = { ...config, peerIdPrivateKey: '<redacted>' };
|
|
21
|
+
userLog(`Starting P2P bootstrap node with config: ${jsonStringify(safeConfig)}`);
|
|
21
22
|
const telemetryClient = initTelemetryClient(getTelemetryClientConfig());
|
|
22
23
|
const store = await createStore('p2p-bootstrap', 1, config, createLogger('p2p:bootstrap:store'));
|
|
23
24
|
const node = new BootstrapNode(store, telemetryClient);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getInitialTestAccounts } from '@aztec/accounts/testing';
|
|
2
|
+
import { getSponsoredFPCAddress } from '@aztec/cli/cli-utils';
|
|
2
3
|
import { NULL_KEY } from '@aztec/ethereum';
|
|
3
4
|
import type { NamespacedApiHandlers } from '@aztec/foundation/json-rpc/server';
|
|
4
5
|
import { Agent, makeUndiciFetch } from '@aztec/foundation/json-rpc/undici';
|
|
@@ -101,8 +102,15 @@ export async function startProverNode(
|
|
|
101
102
|
|
|
102
103
|
await preloadCrsDataForVerifying(proverConfig, userLog);
|
|
103
104
|
|
|
104
|
-
const
|
|
105
|
-
const
|
|
105
|
+
const testAccounts = proverConfig.testAccounts ? (await getInitialTestAccounts()).map(a => a.address) : [];
|
|
106
|
+
const sponsoredFPCAccounts = proverConfig.sponsoredFPC ? [await getSponsoredFPCAddress()] : [];
|
|
107
|
+
const initialFundedAccounts = testAccounts.concat(sponsoredFPCAccounts);
|
|
108
|
+
|
|
109
|
+
userLog(`Initial funded accounts: ${initialFundedAccounts.map(a => a.toString()).join(', ')}`);
|
|
110
|
+
const { genesisArchiveRoot, genesisBlockHash, prefilledPublicData } = await getGenesisValues(initialFundedAccounts);
|
|
111
|
+
|
|
112
|
+
userLog(`Genesis block hash: ${genesisBlockHash.toString()}`);
|
|
113
|
+
userLog(`Genesis archive root: ${genesisArchiveRoot.toString()}`);
|
|
106
114
|
|
|
107
115
|
const proverNode = await createProverNode(proverConfig, { telemetry, broker }, { prefilledPublicData });
|
|
108
116
|
services.proverNode = [proverNode, ProverNodeApiSchema];
|
package/src/sandbox/sandbox.ts
CHANGED
|
@@ -121,8 +121,6 @@ export async function createSandbox(config: Partial<SandboxConfig> = {}, userLog
|
|
|
121
121
|
if (config.testAccounts) {
|
|
122
122
|
if (aztecNodeConfig.p2pEnabled) {
|
|
123
123
|
userLog(`Not setting up test accounts as we are connecting to a network`);
|
|
124
|
-
} else if (config.noPXE) {
|
|
125
|
-
userLog(`Not setting up test accounts as we are not exposing a PXE`);
|
|
126
124
|
} else {
|
|
127
125
|
return await getInitialTestAccounts();
|
|
128
126
|
}
|