@aztec/aztec-node 1.0.0-nightly.20250608 → 1.0.0-nightly.20250611
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/aztec-node/server.d.ts +4 -1
- package/dest/aztec-node/server.d.ts.map +1 -1
- package/dest/aztec-node/server.js +63 -35
- package/package.json +25 -24
- package/src/aztec-node/server.ts +78 -45
|
@@ -7,6 +7,7 @@ import { DateProvider } from '@aztec/foundation/timer';
|
|
|
7
7
|
import { SiblingPath } from '@aztec/foundation/trees';
|
|
8
8
|
import { type P2P } from '@aztec/p2p';
|
|
9
9
|
import { SequencerClient, type SequencerPublisher } from '@aztec/sequencer-client';
|
|
10
|
+
import { EpochPruneWatcher, SlasherClient } from '@aztec/slasher';
|
|
10
11
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
11
12
|
import type { InBlock, L2Block, L2BlockNumber, L2BlockSource, PublishedL2Block } from '@aztec/stdlib/block';
|
|
12
13
|
import type { ContractClassPublic, ContractDataSource, ContractInstanceWithAddress, NodeInfo, ProtocolContractAddresses } from '@aztec/stdlib/contract';
|
|
@@ -35,7 +36,9 @@ export declare class AztecNodeService implements AztecNode, AztecNodeAdmin, Trac
|
|
|
35
36
|
protected readonly l1ToL2MessageSource: L1ToL2MessageSource;
|
|
36
37
|
protected readonly worldStateSynchronizer: WorldStateSynchronizer;
|
|
37
38
|
protected readonly sequencer: SequencerClient | undefined;
|
|
39
|
+
protected readonly slasherClient: SlasherClient | undefined;
|
|
38
40
|
protected readonly validatorsSentinel: Sentinel | undefined;
|
|
41
|
+
protected readonly epochPruneWatcher: EpochPruneWatcher | undefined;
|
|
39
42
|
protected readonly l1ChainId: number;
|
|
40
43
|
protected readonly version: number;
|
|
41
44
|
protected readonly globalVariableBuilder: GlobalVariableBuilderInterface;
|
|
@@ -47,7 +50,7 @@ export declare class AztecNodeService implements AztecNode, AztecNodeAdmin, Trac
|
|
|
47
50
|
private isUploadingSnapshot;
|
|
48
51
|
private txQueue;
|
|
49
52
|
readonly tracer: Tracer;
|
|
50
|
-
constructor(config: AztecNodeConfig, p2pClient: P2P, blockSource: L2BlockSource & Partial<Service>, logsSource: L2LogsSource, contractDataSource: ContractDataSource, l1ToL2MessageSource: L1ToL2MessageSource, worldStateSynchronizer: WorldStateSynchronizer, sequencer: SequencerClient | undefined, validatorsSentinel: Sentinel | undefined, l1ChainId: number, version: number, globalVariableBuilder: GlobalVariableBuilderInterface, packageVersion: string, proofVerifier: ClientProtocolCircuitVerifier, telemetry?: TelemetryClient, log?: Logger);
|
|
53
|
+
constructor(config: AztecNodeConfig, p2pClient: P2P, blockSource: L2BlockSource & Partial<Service>, logsSource: L2LogsSource, contractDataSource: ContractDataSource, l1ToL2MessageSource: L1ToL2MessageSource, worldStateSynchronizer: WorldStateSynchronizer, sequencer: SequencerClient | undefined, slasherClient: SlasherClient | undefined, validatorsSentinel: Sentinel | undefined, epochPruneWatcher: EpochPruneWatcher | undefined, l1ChainId: number, version: number, globalVariableBuilder: GlobalVariableBuilderInterface, packageVersion: string, proofVerifier: ClientProtocolCircuitVerifier, telemetry?: TelemetryClient, log?: Logger);
|
|
51
54
|
getWorldStateSyncStatus(): Promise<WorldStateSyncStatus>;
|
|
52
55
|
getL2Tips(): Promise<import("@aztec/stdlib/block").L2Tips>;
|
|
53
56
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/aztec-node/server.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,uBAAuB,EAAwB,MAAM,yBAAyB,CAAC;AAC7F,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC7B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/aztec-node/server.ts"],"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} from '@aztec/foundation/queue';
|
|
|
20
20
|
import { count } from '@aztec/foundation/string';
|
|
21
21
|
import { DateProvider, Timer } from '@aztec/foundation/timer';
|
|
22
22
|
import { trySnapshotSync, uploadSnapshot } from '@aztec/node-lib/actions';
|
|
23
|
-
import { createP2PClient, getDefaultAllowedSetupFunctions } from '@aztec/p2p';
|
|
23
|
+
import { TxCollector, createP2PClient, getDefaultAllowedSetupFunctions } from '@aztec/p2p';
|
|
24
24
|
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
25
25
|
import { BlockBuilder, GlobalVariableBuilder, SequencerClient, createValidatorForAcceptingTxs } from '@aztec/sequencer-client';
|
|
26
26
|
import { PublicProcessorFactory } from '@aztec/simulator/server';
|
|
@@ -49,7 +49,9 @@ import { NodeMetrics } from './node_metrics.js';
|
|
|
49
49
|
l1ToL2MessageSource;
|
|
50
50
|
worldStateSynchronizer;
|
|
51
51
|
sequencer;
|
|
52
|
+
slasherClient;
|
|
52
53
|
validatorsSentinel;
|
|
54
|
+
epochPruneWatcher;
|
|
53
55
|
l1ChainId;
|
|
54
56
|
version;
|
|
55
57
|
globalVariableBuilder;
|
|
@@ -63,7 +65,7 @@ import { NodeMetrics } from './node_metrics.js';
|
|
|
63
65
|
// Serial queue to ensure that we only send one tx at a time
|
|
64
66
|
txQueue;
|
|
65
67
|
tracer;
|
|
66
|
-
constructor(config, p2pClient, blockSource, logsSource, contractDataSource, l1ToL2MessageSource, worldStateSynchronizer, sequencer, validatorsSentinel, l1ChainId, version, globalVariableBuilder, packageVersion, proofVerifier, telemetry = getTelemetryClient(), log = createLogger('node')){
|
|
68
|
+
constructor(config, p2pClient, blockSource, logsSource, contractDataSource, l1ToL2MessageSource, worldStateSynchronizer, sequencer, slasherClient, validatorsSentinel, epochPruneWatcher, l1ChainId, version, globalVariableBuilder, packageVersion, proofVerifier, telemetry = getTelemetryClient(), log = createLogger('node')){
|
|
67
69
|
this.config = config;
|
|
68
70
|
this.p2pClient = p2pClient;
|
|
69
71
|
this.blockSource = blockSource;
|
|
@@ -72,7 +74,9 @@ import { NodeMetrics } from './node_metrics.js';
|
|
|
72
74
|
this.l1ToL2MessageSource = l1ToL2MessageSource;
|
|
73
75
|
this.worldStateSynchronizer = worldStateSynchronizer;
|
|
74
76
|
this.sequencer = sequencer;
|
|
77
|
+
this.slasherClient = slasherClient;
|
|
75
78
|
this.validatorsSentinel = validatorsSentinel;
|
|
79
|
+
this.epochPruneWatcher = epochPruneWatcher;
|
|
76
80
|
this.l1ChainId = l1ChainId;
|
|
77
81
|
this.version = version;
|
|
78
82
|
this.globalVariableBuilder = globalVariableBuilder;
|
|
@@ -123,9 +127,7 @@ import { NodeMetrics } from './node_metrics.js';
|
|
|
123
127
|
...config.l1Contracts,
|
|
124
128
|
...l1ContractsAddresses
|
|
125
129
|
};
|
|
126
|
-
const
|
|
127
|
-
const l1TxUtils = new L1TxUtilsWithBlobs(l1Client, log, config);
|
|
128
|
-
const rollupContract = new RollupContract(l1Client, config.l1Contracts.rollupAddress.toString());
|
|
130
|
+
const rollupContract = new RollupContract(publicClient, config.l1Contracts.rollupAddress.toString());
|
|
129
131
|
const [l1GenesisTime, slotDuration, rollupVersionFromRollup] = await Promise.all([
|
|
130
132
|
rollupContract.getL1GenesisTime(),
|
|
131
133
|
rollupContract.getSlotDuration(),
|
|
@@ -156,23 +158,26 @@ import { NodeMetrics } from './node_metrics.js';
|
|
|
156
158
|
await worldStateSynchronizer.start();
|
|
157
159
|
// Start p2p. Note that it depends on world state to be running.
|
|
158
160
|
await p2pClient.start();
|
|
161
|
+
config.txPublicSetupAllowList = config.txPublicSetupAllowList ?? await getDefaultAllowedSetupFunctions();
|
|
162
|
+
const blockBuilder = new BlockBuilder({
|
|
163
|
+
l1GenesisTime,
|
|
164
|
+
slotDuration: Number(slotDuration),
|
|
165
|
+
rollupVersion: config.rollupVersion,
|
|
166
|
+
l1ChainId: config.l1ChainId,
|
|
167
|
+
txPublicSetupAllowList: config.txPublicSetupAllowList
|
|
168
|
+
}, archiver, worldStateSynchronizer, archiver, dateProvider, telemetry);
|
|
159
169
|
const watchers = [];
|
|
160
170
|
const validatorsSentinel = await createSentinel(epochCache, archiver, p2pClient, config);
|
|
161
171
|
if (validatorsSentinel && config.slashInactivityEnabled) {
|
|
162
172
|
watchers.push(validatorsSentinel);
|
|
163
173
|
}
|
|
174
|
+
let epochPruneWatcher;
|
|
164
175
|
if (config.slashPruneEnabled) {
|
|
165
|
-
const
|
|
176
|
+
const txCollector = new TxCollector(p2pClient);
|
|
177
|
+
epochPruneWatcher = new EpochPruneWatcher(archiver, epochCache, txCollector, blockBuilder, config.slashPrunePenalty, config.slashPruneMaxPenalty);
|
|
178
|
+
await epochPruneWatcher.start();
|
|
166
179
|
watchers.push(epochPruneWatcher);
|
|
167
180
|
}
|
|
168
|
-
const slasherClient = await SlasherClient.new(config, config.l1Contracts, l1TxUtils, watchers, dateProvider);
|
|
169
|
-
await slasherClient.start();
|
|
170
|
-
const blockBuilder = new BlockBuilder({
|
|
171
|
-
l1GenesisTime,
|
|
172
|
-
slotDuration: Number(slotDuration),
|
|
173
|
-
rollupVersion: config.rollupVersion,
|
|
174
|
-
l1ChainId: config.l1ChainId
|
|
175
|
-
}, archiver, worldStateSynchronizer, archiver, dateProvider, telemetry);
|
|
176
181
|
const validatorClient = createValidatorClient(config, {
|
|
177
182
|
p2pClient,
|
|
178
183
|
telemetry,
|
|
@@ -181,26 +186,46 @@ import { NodeMetrics } from './node_metrics.js';
|
|
|
181
186
|
blockBuilder,
|
|
182
187
|
blockSource: archiver
|
|
183
188
|
});
|
|
189
|
+
if (validatorClient) {
|
|
190
|
+
watchers.push(validatorClient);
|
|
191
|
+
}
|
|
184
192
|
log.verbose(`All Aztec Node subsystems synced`);
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
193
|
+
let sequencer;
|
|
194
|
+
let slasherClient;
|
|
195
|
+
let l1TxUtils;
|
|
196
|
+
let l1Client;
|
|
197
|
+
if (config.publisherPrivateKey) {
|
|
198
|
+
// we can still run a slasher client if a private key is provided
|
|
199
|
+
l1Client = createExtendedL1Client(config.l1RpcUrls, config.publisherPrivateKey, ethereumChain.chainInfo);
|
|
200
|
+
l1TxUtils = new L1TxUtilsWithBlobs(l1Client, log, config);
|
|
201
|
+
slasherClient = await SlasherClient.new(config, config.l1Contracts, l1TxUtils, watchers, dateProvider);
|
|
202
|
+
slasherClient.start();
|
|
203
|
+
}
|
|
204
|
+
// Validator enabled, create/start relevant service
|
|
205
|
+
if (!config.disableValidator) {
|
|
206
|
+
// This shouldn't happen, validators need a publisher private key.
|
|
207
|
+
if (!config.publisherPrivateKey) {
|
|
208
|
+
throw new Error('A publisher private key is required to run a validator');
|
|
209
|
+
}
|
|
210
|
+
sequencer = await SequencerClient.new(config, {
|
|
211
|
+
// if deps were provided, they should override the defaults,
|
|
212
|
+
// or things that we created in this function
|
|
213
|
+
...deps,
|
|
214
|
+
epochCache,
|
|
215
|
+
l1TxUtils,
|
|
216
|
+
validatorClient,
|
|
217
|
+
p2pClient,
|
|
218
|
+
worldStateSynchronizer,
|
|
219
|
+
slasherClient: slasherClient,
|
|
220
|
+
blockBuilder,
|
|
221
|
+
l2BlockSource: archiver,
|
|
222
|
+
l1ToL2MessageSource: archiver,
|
|
223
|
+
telemetry,
|
|
224
|
+
dateProvider,
|
|
225
|
+
blobSinkClient
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
return new AztecNodeService(config, p2pClient, archiver, archiver, archiver, archiver, worldStateSynchronizer, sequencer, slasherClient, validatorsSentinel, epochPruneWatcher, ethereumChain.chainInfo.id, config.rollupVersion, new GlobalVariableBuilder(config), packageVersion, proofVerifier, telemetry, log);
|
|
204
229
|
}
|
|
205
230
|
/**
|
|
206
231
|
* Returns the sequencer client instance.
|
|
@@ -385,6 +410,8 @@ import { NodeMetrics } from './node_metrics.js';
|
|
|
385
410
|
this.log.info(`Stopping Aztec Node`);
|
|
386
411
|
await this.txQueue.end();
|
|
387
412
|
await tryStop(this.validatorsSentinel);
|
|
413
|
+
await tryStop(this.epochPruneWatcher);
|
|
414
|
+
await tryStop(this.slasherClient);
|
|
388
415
|
await tryStop(this.proofVerifier);
|
|
389
416
|
await tryStop(this.sequencer);
|
|
390
417
|
await tryStop(this.p2pClient);
|
|
@@ -666,7 +693,7 @@ import { NodeMetrics } from './node_metrics.js';
|
|
|
666
693
|
throw failedTxs[0].error;
|
|
667
694
|
}
|
|
668
695
|
const [processedTx] = processedTxs;
|
|
669
|
-
return new PublicSimulationOutput(processedTx.revertReason, processedTx.
|
|
696
|
+
return new PublicSimulationOutput(processedTx.revertReason, processedTx.globalVariables, processedTx.txEffect, returns, processedTx.gasUsed);
|
|
670
697
|
} finally{
|
|
671
698
|
await merkleTreeFork.close();
|
|
672
699
|
}
|
|
@@ -690,7 +717,8 @@ import { NodeMetrics } from './node_metrics.js';
|
|
|
690
717
|
...this.config,
|
|
691
718
|
...config
|
|
692
719
|
};
|
|
693
|
-
|
|
720
|
+
this.sequencer?.updateSequencerConfig(config);
|
|
721
|
+
// this.blockBuilder.updateConfig(config); // TODO: Spyros has a PR to add the builder to `this`, so we can do this
|
|
694
722
|
await this.p2pClient.updateP2PConfig(config);
|
|
695
723
|
if (newConfig.realProofs !== this.config.realProofs) {
|
|
696
724
|
this.proofVerifier = config.realProofs ? await BBCircuitVerifier.new(newConfig) : new TestCircuitVerifier();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/aztec-node",
|
|
3
|
-
"version": "1.0.0-nightly.
|
|
3
|
+
"version": "1.0.0-nightly.20250611",
|
|
4
4
|
"main": "dest/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -58,31 +58,32 @@
|
|
|
58
58
|
"testTimeout": 120000,
|
|
59
59
|
"setupFiles": [
|
|
60
60
|
"../../foundation/src/jest/setup.mjs"
|
|
61
|
-
]
|
|
61
|
+
],
|
|
62
|
+
"testEnvironment": "../../foundation/src/jest/env.mjs"
|
|
62
63
|
},
|
|
63
64
|
"dependencies": {
|
|
64
|
-
"@aztec/archiver": "1.0.0-nightly.
|
|
65
|
-
"@aztec/bb-prover": "1.0.0-nightly.
|
|
66
|
-
"@aztec/blob-sink": "1.0.0-nightly.
|
|
67
|
-
"@aztec/constants": "1.0.0-nightly.
|
|
68
|
-
"@aztec/epoch-cache": "1.0.0-nightly.
|
|
69
|
-
"@aztec/ethereum": "1.0.0-nightly.
|
|
70
|
-
"@aztec/foundation": "1.0.0-nightly.
|
|
71
|
-
"@aztec/kv-store": "1.0.0-nightly.
|
|
72
|
-
"@aztec/l1-artifacts": "1.0.0-nightly.
|
|
73
|
-
"@aztec/merkle-tree": "1.0.0-nightly.
|
|
74
|
-
"@aztec/node-lib": "1.0.0-nightly.
|
|
75
|
-
"@aztec/noir-protocol-circuits-types": "1.0.0-nightly.
|
|
76
|
-
"@aztec/p2p": "1.0.0-nightly.
|
|
77
|
-
"@aztec/protocol-contracts": "1.0.0-nightly.
|
|
78
|
-
"@aztec/prover-client": "1.0.0-nightly.
|
|
79
|
-
"@aztec/sequencer-client": "1.0.0-nightly.
|
|
80
|
-
"@aztec/simulator": "1.0.0-nightly.
|
|
81
|
-
"@aztec/slasher": "1.0.0-nightly.
|
|
82
|
-
"@aztec/stdlib": "1.0.0-nightly.
|
|
83
|
-
"@aztec/telemetry-client": "1.0.0-nightly.
|
|
84
|
-
"@aztec/validator-client": "1.0.0-nightly.
|
|
85
|
-
"@aztec/world-state": "1.0.0-nightly.
|
|
65
|
+
"@aztec/archiver": "1.0.0-nightly.20250611",
|
|
66
|
+
"@aztec/bb-prover": "1.0.0-nightly.20250611",
|
|
67
|
+
"@aztec/blob-sink": "1.0.0-nightly.20250611",
|
|
68
|
+
"@aztec/constants": "1.0.0-nightly.20250611",
|
|
69
|
+
"@aztec/epoch-cache": "1.0.0-nightly.20250611",
|
|
70
|
+
"@aztec/ethereum": "1.0.0-nightly.20250611",
|
|
71
|
+
"@aztec/foundation": "1.0.0-nightly.20250611",
|
|
72
|
+
"@aztec/kv-store": "1.0.0-nightly.20250611",
|
|
73
|
+
"@aztec/l1-artifacts": "1.0.0-nightly.20250611",
|
|
74
|
+
"@aztec/merkle-tree": "1.0.0-nightly.20250611",
|
|
75
|
+
"@aztec/node-lib": "1.0.0-nightly.20250611",
|
|
76
|
+
"@aztec/noir-protocol-circuits-types": "1.0.0-nightly.20250611",
|
|
77
|
+
"@aztec/p2p": "1.0.0-nightly.20250611",
|
|
78
|
+
"@aztec/protocol-contracts": "1.0.0-nightly.20250611",
|
|
79
|
+
"@aztec/prover-client": "1.0.0-nightly.20250611",
|
|
80
|
+
"@aztec/sequencer-client": "1.0.0-nightly.20250611",
|
|
81
|
+
"@aztec/simulator": "1.0.0-nightly.20250611",
|
|
82
|
+
"@aztec/slasher": "1.0.0-nightly.20250611",
|
|
83
|
+
"@aztec/stdlib": "1.0.0-nightly.20250611",
|
|
84
|
+
"@aztec/telemetry-client": "1.0.0-nightly.20250611",
|
|
85
|
+
"@aztec/validator-client": "1.0.0-nightly.20250611",
|
|
86
|
+
"@aztec/world-state": "1.0.0-nightly.20250611",
|
|
86
87
|
"koa": "^2.16.1",
|
|
87
88
|
"koa-router": "^12.0.0",
|
|
88
89
|
"tslib": "^2.4.0",
|
package/src/aztec-node/server.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
} from '@aztec/constants';
|
|
12
12
|
import { EpochCache } from '@aztec/epoch-cache';
|
|
13
13
|
import {
|
|
14
|
+
type ExtendedViemWalletClient,
|
|
14
15
|
type L1ContractAddresses,
|
|
15
16
|
RegistryContract,
|
|
16
17
|
RollupContract,
|
|
@@ -28,7 +29,7 @@ import { count } from '@aztec/foundation/string';
|
|
|
28
29
|
import { DateProvider, Timer } from '@aztec/foundation/timer';
|
|
29
30
|
import { SiblingPath } from '@aztec/foundation/trees';
|
|
30
31
|
import { trySnapshotSync, uploadSnapshot } from '@aztec/node-lib/actions';
|
|
31
|
-
import { type P2P, createP2PClient, getDefaultAllowedSetupFunctions } from '@aztec/p2p';
|
|
32
|
+
import { type P2P, TxCollector, createP2PClient, getDefaultAllowedSetupFunctions } from '@aztec/p2p';
|
|
32
33
|
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
33
34
|
import {
|
|
34
35
|
BlockBuilder,
|
|
@@ -125,7 +126,9 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
|
|
|
125
126
|
protected readonly l1ToL2MessageSource: L1ToL2MessageSource,
|
|
126
127
|
protected readonly worldStateSynchronizer: WorldStateSynchronizer,
|
|
127
128
|
protected readonly sequencer: SequencerClient | undefined,
|
|
129
|
+
protected readonly slasherClient: SlasherClient | undefined,
|
|
128
130
|
protected readonly validatorsSentinel: Sentinel | undefined,
|
|
131
|
+
protected readonly epochPruneWatcher: EpochPruneWatcher | undefined,
|
|
129
132
|
protected readonly l1ChainId: number,
|
|
130
133
|
protected readonly version: number,
|
|
131
134
|
protected readonly globalVariableBuilder: GlobalVariableBuilderInterface,
|
|
@@ -199,10 +202,7 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
|
|
|
199
202
|
// Overwrite the passed in vars.
|
|
200
203
|
config.l1Contracts = { ...config.l1Contracts, ...l1ContractsAddresses };
|
|
201
204
|
|
|
202
|
-
const
|
|
203
|
-
const l1TxUtils = new L1TxUtilsWithBlobs(l1Client, log, config);
|
|
204
|
-
|
|
205
|
-
const rollupContract = new RollupContract(l1Client, config.l1Contracts.rollupAddress.toString());
|
|
205
|
+
const rollupContract = new RollupContract(publicClient, config.l1Contracts.rollupAddress.toString());
|
|
206
206
|
const [l1GenesisTime, slotDuration, rollupVersionFromRollup] = await Promise.all([
|
|
207
207
|
rollupContract.getL1GenesisTime(),
|
|
208
208
|
rollupContract.getSlotDuration(),
|
|
@@ -255,24 +255,7 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
|
|
|
255
255
|
// Start p2p. Note that it depends on world state to be running.
|
|
256
256
|
await p2pClient.start();
|
|
257
257
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
const validatorsSentinel = await createSentinel(epochCache, archiver, p2pClient, config);
|
|
261
|
-
if (validatorsSentinel && config.slashInactivityEnabled) {
|
|
262
|
-
watchers.push(validatorsSentinel);
|
|
263
|
-
}
|
|
264
|
-
if (config.slashPruneEnabled) {
|
|
265
|
-
const epochPruneWatcher = new EpochPruneWatcher(
|
|
266
|
-
archiver,
|
|
267
|
-
epochCache,
|
|
268
|
-
config.slashPrunePenalty,
|
|
269
|
-
config.slashPruneMaxPenalty,
|
|
270
|
-
);
|
|
271
|
-
watchers.push(epochPruneWatcher);
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
const slasherClient = await SlasherClient.new(config, config.l1Contracts, l1TxUtils, watchers, dateProvider);
|
|
275
|
-
await slasherClient.start();
|
|
258
|
+
config.txPublicSetupAllowList = config.txPublicSetupAllowList ?? (await getDefaultAllowedSetupFunctions());
|
|
276
259
|
|
|
277
260
|
const blockBuilder = new BlockBuilder(
|
|
278
261
|
{
|
|
@@ -280,6 +263,7 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
|
|
|
280
263
|
slotDuration: Number(slotDuration),
|
|
281
264
|
rollupVersion: config.rollupVersion,
|
|
282
265
|
l1ChainId: config.l1ChainId,
|
|
266
|
+
txPublicSetupAllowList: config.txPublicSetupAllowList,
|
|
283
267
|
},
|
|
284
268
|
archiver,
|
|
285
269
|
worldStateSynchronizer,
|
|
@@ -288,6 +272,27 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
|
|
|
288
272
|
telemetry,
|
|
289
273
|
);
|
|
290
274
|
|
|
275
|
+
const watchers: Watcher[] = [];
|
|
276
|
+
|
|
277
|
+
const validatorsSentinel = await createSentinel(epochCache, archiver, p2pClient, config);
|
|
278
|
+
if (validatorsSentinel && config.slashInactivityEnabled) {
|
|
279
|
+
watchers.push(validatorsSentinel);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
let epochPruneWatcher: EpochPruneWatcher | undefined;
|
|
283
|
+
if (config.slashPruneEnabled) {
|
|
284
|
+
const txCollector = new TxCollector(p2pClient);
|
|
285
|
+
epochPruneWatcher = new EpochPruneWatcher(
|
|
286
|
+
archiver,
|
|
287
|
+
epochCache,
|
|
288
|
+
txCollector,
|
|
289
|
+
blockBuilder,
|
|
290
|
+
config.slashPrunePenalty,
|
|
291
|
+
config.slashPruneMaxPenalty,
|
|
292
|
+
);
|
|
293
|
+
await epochPruneWatcher.start();
|
|
294
|
+
watchers.push(epochPruneWatcher);
|
|
295
|
+
}
|
|
291
296
|
const validatorClient = createValidatorClient(config, {
|
|
292
297
|
p2pClient,
|
|
293
298
|
telemetry,
|
|
@@ -296,28 +301,51 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
|
|
|
296
301
|
blockBuilder,
|
|
297
302
|
blockSource: archiver,
|
|
298
303
|
});
|
|
304
|
+
|
|
305
|
+
if (validatorClient) {
|
|
306
|
+
watchers.push(validatorClient);
|
|
307
|
+
}
|
|
308
|
+
|
|
299
309
|
log.verbose(`All Aztec Node subsystems synced`);
|
|
300
310
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
311
|
+
let sequencer: SequencerClient | undefined;
|
|
312
|
+
let slasherClient: SlasherClient | undefined;
|
|
313
|
+
let l1TxUtils: L1TxUtilsWithBlobs | undefined;
|
|
314
|
+
let l1Client: ExtendedViemWalletClient | undefined;
|
|
315
|
+
|
|
316
|
+
if (config.publisherPrivateKey) {
|
|
317
|
+
// we can still run a slasher client if a private key is provided
|
|
318
|
+
l1Client = createExtendedL1Client(config.l1RpcUrls, config.publisherPrivateKey, ethereumChain.chainInfo);
|
|
319
|
+
l1TxUtils = new L1TxUtilsWithBlobs(l1Client, log, config);
|
|
320
|
+
slasherClient = await SlasherClient.new(config, config.l1Contracts, l1TxUtils, watchers, dateProvider);
|
|
321
|
+
slasherClient.start();
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// Validator enabled, create/start relevant service
|
|
325
|
+
if (!config.disableValidator) {
|
|
326
|
+
// This shouldn't happen, validators need a publisher private key.
|
|
327
|
+
if (!config.publisherPrivateKey) {
|
|
328
|
+
throw new Error('A publisher private key is required to run a validator');
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
sequencer = await SequencerClient.new(config, {
|
|
332
|
+
// if deps were provided, they should override the defaults,
|
|
333
|
+
// or things that we created in this function
|
|
334
|
+
...deps,
|
|
335
|
+
epochCache,
|
|
336
|
+
l1TxUtils,
|
|
337
|
+
validatorClient,
|
|
338
|
+
p2pClient,
|
|
339
|
+
worldStateSynchronizer,
|
|
340
|
+
slasherClient: slasherClient!,
|
|
341
|
+
blockBuilder,
|
|
342
|
+
l2BlockSource: archiver,
|
|
343
|
+
l1ToL2MessageSource: archiver,
|
|
344
|
+
telemetry,
|
|
345
|
+
dateProvider,
|
|
346
|
+
blobSinkClient,
|
|
347
|
+
});
|
|
348
|
+
}
|
|
321
349
|
|
|
322
350
|
return new AztecNodeService(
|
|
323
351
|
config,
|
|
@@ -328,7 +356,9 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
|
|
|
328
356
|
archiver,
|
|
329
357
|
worldStateSynchronizer,
|
|
330
358
|
sequencer,
|
|
359
|
+
slasherClient,
|
|
331
360
|
validatorsSentinel,
|
|
361
|
+
epochPruneWatcher,
|
|
332
362
|
ethereumChain.chainInfo.id,
|
|
333
363
|
config.rollupVersion,
|
|
334
364
|
new GlobalVariableBuilder(config),
|
|
@@ -568,6 +598,8 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
|
|
|
568
598
|
this.log.info(`Stopping Aztec Node`);
|
|
569
599
|
await this.txQueue.end();
|
|
570
600
|
await tryStop(this.validatorsSentinel);
|
|
601
|
+
await tryStop(this.epochPruneWatcher);
|
|
602
|
+
await tryStop(this.slasherClient);
|
|
571
603
|
await tryStop(this.proofVerifier);
|
|
572
604
|
await tryStop(this.sequencer);
|
|
573
605
|
await tryStop(this.p2pClient);
|
|
@@ -962,7 +994,7 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
|
|
|
962
994
|
const [processedTx] = processedTxs;
|
|
963
995
|
return new PublicSimulationOutput(
|
|
964
996
|
processedTx.revertReason,
|
|
965
|
-
processedTx.
|
|
997
|
+
processedTx.globalVariables,
|
|
966
998
|
processedTx.txEffect,
|
|
967
999
|
returns,
|
|
968
1000
|
processedTx.gasUsed,
|
|
@@ -993,7 +1025,8 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
|
|
|
993
1025
|
|
|
994
1026
|
public async setConfig(config: Partial<SequencerConfig & ProverConfig>): Promise<void> {
|
|
995
1027
|
const newConfig = { ...this.config, ...config };
|
|
996
|
-
|
|
1028
|
+
this.sequencer?.updateSequencerConfig(config);
|
|
1029
|
+
// this.blockBuilder.updateConfig(config); // TODO: Spyros has a PR to add the builder to `this`, so we can do this
|
|
997
1030
|
await this.p2pClient.updateP2PConfig(config);
|
|
998
1031
|
|
|
999
1032
|
if (newConfig.realProofs !== this.config.realProofs) {
|