@aztec/validator-client 0.0.1-commit.4ad48494d → 0.0.1-commit.4d3c002
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/README.md +41 -2
- package/dest/checkpoint_builder.d.ts +21 -8
- package/dest/checkpoint_builder.d.ts.map +1 -1
- package/dest/checkpoint_builder.js +124 -46
- package/dest/config.d.ts +1 -1
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +22 -6
- package/dest/duties/validation_service.d.ts +2 -2
- package/dest/duties/validation_service.d.ts.map +1 -1
- package/dest/duties/validation_service.js +6 -12
- package/dest/factory.d.ts +7 -4
- package/dest/factory.d.ts.map +1 -1
- package/dest/factory.js +6 -5
- package/dest/index.d.ts +2 -3
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +1 -2
- package/dest/key_store/ha_key_store.js +1 -1
- package/dest/metrics.d.ts +10 -2
- package/dest/metrics.d.ts.map +1 -1
- package/dest/metrics.js +12 -0
- package/dest/proposal_handler.d.ts +107 -0
- package/dest/proposal_handler.d.ts.map +1 -0
- package/dest/proposal_handler.js +963 -0
- package/dest/validator.d.ts +17 -14
- package/dest/validator.d.ts.map +1 -1
- package/dest/validator.js +80 -191
- package/package.json +19 -19
- package/src/checkpoint_builder.ts +142 -39
- package/src/config.ts +22 -6
- package/src/duties/validation_service.ts +12 -11
- package/src/factory.ts +9 -3
- package/src/index.ts +1 -2
- package/src/key_store/ha_key_store.ts +1 -1
- package/src/metrics.ts +19 -1
- package/src/proposal_handler.ts +1027 -0
- package/src/validator.ts +101 -207
- package/dest/block_proposal_handler.d.ts +0 -63
- package/dest/block_proposal_handler.d.ts.map +0 -1
- package/dest/block_proposal_handler.js +0 -546
- package/dest/tx_validator/index.d.ts +0 -3
- package/dest/tx_validator/index.d.ts.map +0 -1
- package/dest/tx_validator/index.js +0 -2
- package/dest/tx_validator/nullifier_cache.d.ts +0 -14
- package/dest/tx_validator/nullifier_cache.d.ts.map +0 -1
- package/dest/tx_validator/nullifier_cache.js +0 -24
- package/dest/tx_validator/tx_validator_factory.d.ts +0 -19
- package/dest/tx_validator/tx_validator_factory.d.ts.map +0 -1
- package/dest/tx_validator/tx_validator_factory.js +0 -54
- package/src/block_proposal_handler.ts +0 -555
- package/src/tx_validator/index.ts +0 -2
- package/src/tx_validator/nullifier_cache.ts +0 -30
- package/src/tx_validator/tx_validator_factory.ts +0 -154
package/src/validator.ts
CHANGED
|
@@ -9,11 +9,9 @@ import {
|
|
|
9
9
|
SlotNumber,
|
|
10
10
|
} from '@aztec/foundation/branded-types';
|
|
11
11
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
12
|
-
import { TimeoutError } from '@aztec/foundation/error';
|
|
13
12
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
14
13
|
import type { Signature } from '@aztec/foundation/eth-signature';
|
|
15
14
|
import { type LogData, type Logger, createLogger } from '@aztec/foundation/log';
|
|
16
|
-
import { retryUntil } from '@aztec/foundation/retry';
|
|
17
15
|
import { RunningPromise } from '@aztec/foundation/running-promise';
|
|
18
16
|
import { sleep } from '@aztec/foundation/sleep';
|
|
19
17
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
@@ -22,7 +20,7 @@ import type { DuplicateAttestationInfo, DuplicateProposalInfo, P2P, PeerId } fro
|
|
|
22
20
|
import { AuthRequest, AuthResponse, BlockProposalValidator, ReqRespSubProtocol } from '@aztec/p2p';
|
|
23
21
|
import { OffenseType, WANT_TO_SLASH_EVENT, type Watcher, type WatcherEmitter } from '@aztec/slasher';
|
|
24
22
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
25
|
-
import type { CommitteeAttestationsAndSigners,
|
|
23
|
+
import type { CommitteeAttestationsAndSigners, L2BlockSink, L2BlockSource } from '@aztec/stdlib/block';
|
|
26
24
|
import { getEpochAtSlot } from '@aztec/stdlib/epoch-helpers';
|
|
27
25
|
import type {
|
|
28
26
|
CreateCheckpointProposalLastBlockData,
|
|
@@ -31,7 +29,7 @@ import type {
|
|
|
31
29
|
ValidatorClientFullConfig,
|
|
32
30
|
WorldStateSynchronizer,
|
|
33
31
|
} from '@aztec/stdlib/interfaces/server';
|
|
34
|
-
import {
|
|
32
|
+
import type { L1ToL2MessageSource } from '@aztec/stdlib/messaging';
|
|
35
33
|
import {
|
|
36
34
|
type BlockProposal,
|
|
37
35
|
type BlockProposalOptions,
|
|
@@ -41,22 +39,27 @@ import {
|
|
|
41
39
|
type CheckpointProposalOptions,
|
|
42
40
|
} from '@aztec/stdlib/p2p';
|
|
43
41
|
import type { CheckpointHeader } from '@aztec/stdlib/rollup';
|
|
44
|
-
import type { BlockHeader,
|
|
42
|
+
import type { BlockHeader, Tx } from '@aztec/stdlib/tx';
|
|
45
43
|
import { AttestationTimeoutError } from '@aztec/stdlib/validators';
|
|
46
44
|
import { type TelemetryClient, type Tracer, getTelemetryClient } from '@aztec/telemetry-client';
|
|
47
|
-
import {
|
|
48
|
-
|
|
45
|
+
import {
|
|
46
|
+
createHASigner,
|
|
47
|
+
createLocalSignerWithProtection,
|
|
48
|
+
createSignerFromSharedDb,
|
|
49
|
+
} from '@aztec/validator-ha-signer/factory';
|
|
50
|
+
import { DutyType, type SigningContext, type SlashingProtectionDatabase } from '@aztec/validator-ha-signer/types';
|
|
51
|
+
import type { ValidatorHASigner } from '@aztec/validator-ha-signer/validator-ha-signer';
|
|
49
52
|
|
|
50
53
|
import { EventEmitter } from 'events';
|
|
51
54
|
import type { TypedDataDefinition } from 'viem';
|
|
52
55
|
|
|
53
|
-
import { BlockProposalHandler, type BlockProposalValidationFailureReason } from './block_proposal_handler.js';
|
|
54
56
|
import type { FullNodeCheckpointsBuilder } from './checkpoint_builder.js';
|
|
55
57
|
import { ValidationService } from './duties/validation_service.js';
|
|
56
58
|
import { HAKeyStore } from './key_store/ha_key_store.js';
|
|
57
59
|
import type { ExtendedValidatorKeyStore } from './key_store/interface.js';
|
|
58
60
|
import { NodeKeystoreAdapter } from './key_store/node_keystore_adapter.js';
|
|
59
61
|
import { ValidatorMetrics } from './metrics.js';
|
|
62
|
+
import { type BlockProposalValidationFailureReason, ProposalHandler } from './proposal_handler.js';
|
|
60
63
|
|
|
61
64
|
// We maintain a set of proposers who have proposed invalid blocks.
|
|
62
65
|
// Just cap the set to avoid unbounded growth.
|
|
@@ -76,7 +79,6 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
76
79
|
private validationService: ValidationService;
|
|
77
80
|
private metrics: ValidatorMetrics;
|
|
78
81
|
private log: Logger;
|
|
79
|
-
|
|
80
82
|
// Whether it has already registered handlers on the p2p client
|
|
81
83
|
private hasRegisteredHandlers = false;
|
|
82
84
|
|
|
@@ -88,6 +90,8 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
88
90
|
|
|
89
91
|
private lastEpochForCommitteeUpdateLoop: EpochNumber | undefined;
|
|
90
92
|
private epochCacheUpdateLoop: RunningPromise;
|
|
93
|
+
/** Tracks the last epoch in which each attester successfully submitted at least one attestation. */
|
|
94
|
+
private lastAttestedEpochByAttester: Map<string, EpochNumber> = new Map();
|
|
91
95
|
|
|
92
96
|
private proposersOfInvalidBlocks: Set<string> = new Set();
|
|
93
97
|
|
|
@@ -98,13 +102,14 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
98
102
|
private keyStore: ExtendedValidatorKeyStore,
|
|
99
103
|
private epochCache: EpochCache,
|
|
100
104
|
private p2pClient: P2P,
|
|
101
|
-
private
|
|
105
|
+
private proposalHandler: ProposalHandler,
|
|
102
106
|
private blockSource: L2BlockSource,
|
|
103
107
|
private checkpointsBuilder: FullNodeCheckpointsBuilder,
|
|
104
108
|
private worldState: WorldStateSynchronizer,
|
|
105
109
|
private l1ToL2MessageSource: L1ToL2MessageSource,
|
|
106
110
|
private config: ValidatorClientFullConfig,
|
|
107
111
|
private blobClient: BlobClientInterface,
|
|
112
|
+
private slashingProtectionSigner: ValidatorHASigner,
|
|
108
113
|
private dateProvider: DateProvider = new DateProvider(),
|
|
109
114
|
telemetry: TelemetryClient = getTelemetryClient(),
|
|
110
115
|
log = createLogger('validator'),
|
|
@@ -158,6 +163,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
158
163
|
this.log.trace(`No committee found for slot`);
|
|
159
164
|
return;
|
|
160
165
|
}
|
|
166
|
+
this.metrics.setCurrentEpoch(epoch);
|
|
161
167
|
if (epoch !== this.lastEpochForCommitteeUpdateLoop) {
|
|
162
168
|
const me = this.getValidatorAddresses();
|
|
163
169
|
const committeeSet = new Set(committee.map(v => v.toString()));
|
|
@@ -191,12 +197,14 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
191
197
|
blobClient: BlobClientInterface,
|
|
192
198
|
dateProvider: DateProvider = new DateProvider(),
|
|
193
199
|
telemetry: TelemetryClient = getTelemetryClient(),
|
|
200
|
+
slashingProtectionDb?: SlashingProtectionDatabase,
|
|
194
201
|
) {
|
|
195
202
|
const metrics = new ValidatorMetrics(telemetry);
|
|
196
203
|
const blockProposalValidator = new BlockProposalValidator(epochCache, {
|
|
197
204
|
txsPermitted: !config.disableTransactions,
|
|
205
|
+
maxTxsPerBlock: config.validateMaxTxsPerBlock,
|
|
198
206
|
});
|
|
199
|
-
const
|
|
207
|
+
const proposalHandler = new ProposalHandler(
|
|
200
208
|
checkpointsBuilder,
|
|
201
209
|
worldState,
|
|
202
210
|
blockSource,
|
|
@@ -205,33 +213,53 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
205
213
|
blockProposalValidator,
|
|
206
214
|
epochCache,
|
|
207
215
|
config,
|
|
216
|
+
blobClient,
|
|
208
217
|
metrics,
|
|
209
218
|
dateProvider,
|
|
210
219
|
telemetry,
|
|
211
220
|
);
|
|
212
221
|
|
|
213
|
-
|
|
214
|
-
|
|
222
|
+
const nodeKeystoreAdapter = NodeKeystoreAdapter.fromKeyStoreManager(keyStoreManager);
|
|
223
|
+
let slashingProtectionSigner: ValidatorHASigner;
|
|
224
|
+
if (slashingProtectionDb) {
|
|
225
|
+
// Shared database mode: use a pre-existing database (e.g. for testing HA setups).
|
|
226
|
+
({ signer: slashingProtectionSigner } = createSignerFromSharedDb(slashingProtectionDb, config, {
|
|
227
|
+
telemetryClient: telemetry,
|
|
228
|
+
dateProvider,
|
|
229
|
+
}));
|
|
230
|
+
} else if (config.haSigningEnabled) {
|
|
231
|
+
// Multi-node HA mode: use PostgreSQL-backed distributed locking.
|
|
215
232
|
// If maxStuckDutiesAgeMs is not explicitly set, compute it from Aztec slot duration
|
|
216
233
|
const haConfig = {
|
|
217
234
|
...config,
|
|
218
235
|
maxStuckDutiesAgeMs: config.maxStuckDutiesAgeMs ?? epochCache.getL1Constants().slotDuration * 2 * 1000,
|
|
219
236
|
};
|
|
220
|
-
|
|
221
|
-
|
|
237
|
+
({ signer: slashingProtectionSigner } = await createHASigner(haConfig, {
|
|
238
|
+
telemetryClient: telemetry,
|
|
239
|
+
dateProvider,
|
|
240
|
+
}));
|
|
241
|
+
} else {
|
|
242
|
+
// Single-node mode: use LMDB-backed local signing protection.
|
|
243
|
+
// This prevents double-signing if the node crashes and restarts mid-proposal.
|
|
244
|
+
({ signer: slashingProtectionSigner } = await createLocalSignerWithProtection(config, {
|
|
245
|
+
telemetryClient: telemetry,
|
|
246
|
+
dateProvider,
|
|
247
|
+
}));
|
|
222
248
|
}
|
|
249
|
+
const validatorKeyStore: ExtendedValidatorKeyStore = new HAKeyStore(nodeKeystoreAdapter, slashingProtectionSigner);
|
|
223
250
|
|
|
224
251
|
const validator = new ValidatorClient(
|
|
225
252
|
validatorKeyStore,
|
|
226
253
|
epochCache,
|
|
227
254
|
p2pClient,
|
|
228
|
-
|
|
255
|
+
proposalHandler,
|
|
229
256
|
blockSource,
|
|
230
257
|
checkpointsBuilder,
|
|
231
258
|
worldState,
|
|
232
259
|
l1ToL2MessageSource,
|
|
233
260
|
config,
|
|
234
261
|
blobClient,
|
|
262
|
+
slashingProtectionSigner,
|
|
235
263
|
dateProvider,
|
|
236
264
|
telemetry,
|
|
237
265
|
);
|
|
@@ -245,8 +273,8 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
245
273
|
.filter(addr => !this.config.disabledValidators.some(disabled => disabled.equals(addr)));
|
|
246
274
|
}
|
|
247
275
|
|
|
248
|
-
public
|
|
249
|
-
return this.
|
|
276
|
+
public getProposalHandler() {
|
|
277
|
+
return this.proposalHandler;
|
|
250
278
|
}
|
|
251
279
|
|
|
252
280
|
public signWithAddress(addr: EthAddress, msg: TypedDataDefinition, context: SigningContext) {
|
|
@@ -269,6 +297,12 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
269
297
|
this.config = { ...this.config, ...config };
|
|
270
298
|
}
|
|
271
299
|
|
|
300
|
+
public reloadKeystore(newManager: KeystoreManager): void {
|
|
301
|
+
const newAdapter = NodeKeystoreAdapter.fromKeyStoreManager(newManager);
|
|
302
|
+
this.keyStore = new HAKeyStore(newAdapter, this.slashingProtectionSigner);
|
|
303
|
+
this.validationService = new ValidationService(this.keyStore, this.log.createChild('validation-service'));
|
|
304
|
+
}
|
|
305
|
+
|
|
272
306
|
public async start() {
|
|
273
307
|
if (this.epochCacheUpdateLoop.isRunning()) {
|
|
274
308
|
this.log.warn(`Validator client already started`);
|
|
@@ -313,7 +347,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
313
347
|
checkpoint: CheckpointProposalCore,
|
|
314
348
|
proposalSender: PeerId,
|
|
315
349
|
): Promise<CheckpointAttestation[] | undefined> => this.attestToCheckpointProposal(checkpoint, proposalSender);
|
|
316
|
-
this.p2pClient.
|
|
350
|
+
this.p2pClient.registerValidatorCheckpointProposalHandler(checkpointHandler);
|
|
317
351
|
|
|
318
352
|
// Duplicate proposal handler - triggers slashing for equivocation
|
|
319
353
|
this.p2pClient.registerDuplicateProposalCallback((info: DuplicateProposalInfo) => {
|
|
@@ -352,13 +386,12 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
352
386
|
return false;
|
|
353
387
|
}
|
|
354
388
|
|
|
355
|
-
//
|
|
389
|
+
// Log self-proposals from HA peers (same validator key on different nodes)
|
|
356
390
|
if (this.getValidatorAddresses().some(addr => addr.equals(proposer))) {
|
|
357
|
-
this.log.
|
|
391
|
+
this.log.verbose(`Processing block proposal from HA peer for slot ${slotNumber}`, {
|
|
358
392
|
proposer: proposer.toString(),
|
|
359
393
|
slotNumber,
|
|
360
394
|
});
|
|
361
|
-
return false;
|
|
362
395
|
}
|
|
363
396
|
|
|
364
397
|
// Check if we're in the committee (for metrics purposes)
|
|
@@ -374,25 +407,25 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
374
407
|
|
|
375
408
|
// Reexecute txs if we are part of the committee, or if slashing is enabled, or if we are configured to always reexecute.
|
|
376
409
|
// In fisherman mode, we always reexecute to validate proposals.
|
|
377
|
-
const {
|
|
378
|
-
this.config;
|
|
410
|
+
const { slashBroadcastedInvalidBlockPenalty, alwaysReexecuteBlockProposals, fishermanMode } = this.config;
|
|
379
411
|
const shouldReexecute =
|
|
380
412
|
fishermanMode ||
|
|
381
|
-
|
|
382
|
-
|
|
413
|
+
slashBroadcastedInvalidBlockPenalty > 0n ||
|
|
414
|
+
partOfCommittee ||
|
|
383
415
|
alwaysReexecuteBlockProposals ||
|
|
384
416
|
this.blobClient.canUpload();
|
|
385
417
|
|
|
386
|
-
const validationResult = await this.
|
|
418
|
+
const validationResult = await this.proposalHandler.handleBlockProposal(
|
|
387
419
|
proposal,
|
|
388
420
|
proposalSender,
|
|
389
421
|
!!shouldReexecute && !escapeHatchOpen,
|
|
390
422
|
);
|
|
391
423
|
|
|
392
424
|
if (!validationResult.isValid) {
|
|
393
|
-
this.log.warn(`Block proposal validation failed: ${validationResult.reason}`, proposalInfo);
|
|
394
|
-
|
|
395
425
|
const reason = validationResult.reason || 'unknown';
|
|
426
|
+
|
|
427
|
+
this.log.warn(`Block proposal validation failed: ${reason}`, proposalInfo);
|
|
428
|
+
|
|
396
429
|
// Classify failure reason: bad proposal vs node issue
|
|
397
430
|
const badProposalReasons: BlockProposalValidationFailureReason[] = [
|
|
398
431
|
'invalid_proposal',
|
|
@@ -447,62 +480,50 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
447
480
|
proposal: CheckpointProposalCore,
|
|
448
481
|
_proposalSender: PeerId,
|
|
449
482
|
): Promise<CheckpointAttestation[] | undefined> {
|
|
450
|
-
const
|
|
483
|
+
const proposalSlotNumber = proposal.slotNumber;
|
|
451
484
|
const proposer = proposal.getSender();
|
|
452
485
|
|
|
453
486
|
// If escape hatch is open for this slot's epoch, do not attest.
|
|
454
|
-
if (await this.epochCache.isEscapeHatchOpenAtSlot(
|
|
455
|
-
this.log.warn(`Escape hatch open for slot ${
|
|
456
|
-
return undefined;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
// Reject proposals with invalid signatures
|
|
460
|
-
if (!proposer) {
|
|
461
|
-
this.log.warn(`Received checkpoint proposal with invalid signature for slot ${slotNumber}`);
|
|
487
|
+
if (await this.epochCache.isEscapeHatchOpenAtSlot(proposalSlotNumber)) {
|
|
488
|
+
this.log.warn(`Escape hatch open for slot ${proposalSlotNumber}, skipping checkpoint attestation handling`);
|
|
462
489
|
return undefined;
|
|
463
490
|
}
|
|
464
491
|
|
|
465
492
|
// Ignore proposals from ourselves (may happen in HA setups)
|
|
466
|
-
if (this.getValidatorAddresses().some(addr => addr.equals(proposer))) {
|
|
467
|
-
this.log.
|
|
493
|
+
if (proposer && this.getValidatorAddresses().some(addr => addr.equals(proposer))) {
|
|
494
|
+
this.log.debug(`Ignoring block proposal from self for slot ${proposalSlotNumber}`, {
|
|
468
495
|
proposer: proposer.toString(),
|
|
469
|
-
|
|
496
|
+
proposalSlotNumber,
|
|
470
497
|
});
|
|
471
498
|
return undefined;
|
|
472
499
|
}
|
|
473
500
|
|
|
474
|
-
// Check that I have any address in
|
|
475
|
-
const inCommittee = await this.epochCache.filterInCommittee(
|
|
501
|
+
// Check that I have any address in the committee where this checkpoint will land before attesting
|
|
502
|
+
const inCommittee = await this.epochCache.filterInCommittee(proposalSlotNumber, this.getValidatorAddresses());
|
|
476
503
|
const partOfCommittee = inCommittee.length > 0;
|
|
477
504
|
|
|
478
505
|
const proposalInfo = {
|
|
479
|
-
|
|
506
|
+
proposalSlotNumber,
|
|
480
507
|
archive: proposal.archive.toString(),
|
|
481
|
-
proposer: proposer
|
|
482
|
-
txCount: proposal.txHashes.length,
|
|
508
|
+
proposer: proposer?.toString(),
|
|
483
509
|
};
|
|
484
|
-
this.log.info(`Received checkpoint proposal for slot ${
|
|
510
|
+
this.log.info(`Received checkpoint proposal for slot ${proposalSlotNumber}`, {
|
|
485
511
|
...proposalInfo,
|
|
486
|
-
txHashes: proposal.txHashes.map(t => t.toString()),
|
|
487
512
|
fishermanMode: this.config.fishermanMode || false,
|
|
488
513
|
});
|
|
489
514
|
|
|
490
|
-
// Validate the checkpoint proposal before attesting (unless skipCheckpointProposalValidation is set)
|
|
515
|
+
// Validate the checkpoint proposal before attesting (unless skipCheckpointProposalValidation is set).
|
|
516
|
+
// Uses the cached result from the all-nodes callback if available (avoids double validation).
|
|
491
517
|
if (this.config.skipCheckpointProposalValidation) {
|
|
492
|
-
this.log.warn(`Skipping checkpoint proposal validation for slot ${
|
|
518
|
+
this.log.warn(`Skipping checkpoint proposal validation for slot ${proposalSlotNumber}`, proposalInfo);
|
|
493
519
|
} else {
|
|
494
|
-
const validationResult = await this.
|
|
520
|
+
const validationResult = await this.proposalHandler.handleCheckpointProposal(proposal, proposalInfo);
|
|
495
521
|
if (!validationResult.isValid) {
|
|
496
522
|
this.log.warn(`Checkpoint proposal validation failed: ${validationResult.reason}`, proposalInfo);
|
|
497
523
|
return undefined;
|
|
498
524
|
}
|
|
499
525
|
}
|
|
500
526
|
|
|
501
|
-
// Upload blobs to filestore if we can (fire and forget)
|
|
502
|
-
if (this.blobClient.canUpload()) {
|
|
503
|
-
void this.uploadBlobsForCheckpoint(proposal, proposalInfo);
|
|
504
|
-
}
|
|
505
|
-
|
|
506
527
|
// Check that I have any address in current committee before attesting
|
|
507
528
|
// In fisherman mode, we still create attestations for validation even if not in committee
|
|
508
529
|
if (!partOfCommittee && !this.config.fishermanMode) {
|
|
@@ -511,14 +532,28 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
511
532
|
}
|
|
512
533
|
|
|
513
534
|
// Provided all of the above checks pass, we can attest to the proposal
|
|
514
|
-
this.log.info(
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
535
|
+
this.log.info(
|
|
536
|
+
`${partOfCommittee ? 'Attesting to' : 'Validated'} checkpoint proposal for slot ${proposalSlotNumber}`,
|
|
537
|
+
{
|
|
538
|
+
...proposalInfo,
|
|
539
|
+
inCommittee: partOfCommittee,
|
|
540
|
+
fishermanMode: this.config.fishermanMode || false,
|
|
541
|
+
},
|
|
542
|
+
);
|
|
519
543
|
|
|
520
544
|
this.metrics.incSuccessfulAttestations(inCommittee.length);
|
|
521
545
|
|
|
546
|
+
// Track epoch participation per attester: count each (attester, epoch) pair at most once
|
|
547
|
+
const proposalEpoch = getEpochAtSlot(proposalSlotNumber, this.epochCache.getL1Constants());
|
|
548
|
+
for (const attester of inCommittee) {
|
|
549
|
+
const key = attester.toString();
|
|
550
|
+
const lastEpoch = this.lastAttestedEpochByAttester.get(key);
|
|
551
|
+
if (lastEpoch === undefined || proposalEpoch > lastEpoch) {
|
|
552
|
+
this.lastAttestedEpochByAttester.set(key, proposalEpoch);
|
|
553
|
+
this.metrics.incAttestedEpochCount(attester);
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
|
|
522
557
|
// Determine which validators should attest
|
|
523
558
|
let attestors: EthAddress[];
|
|
524
559
|
if (partOfCommittee) {
|
|
@@ -537,7 +572,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
537
572
|
|
|
538
573
|
if (this.config.fishermanMode) {
|
|
539
574
|
// bail out early and don't save attestations to the pool in fisherman mode
|
|
540
|
-
this.log.info(`Creating checkpoint attestations for slot ${
|
|
575
|
+
this.log.info(`Creating checkpoint attestations for slot ${proposalSlotNumber}`, {
|
|
541
576
|
...proposalInfo,
|
|
542
577
|
attestors: attestors.map(a => a.toString()),
|
|
543
578
|
});
|
|
@@ -586,153 +621,10 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
586
621
|
return attestations;
|
|
587
622
|
}
|
|
588
623
|
|
|
589
|
-
/**
|
|
590
|
-
* Validates a checkpoint proposal by building the full checkpoint and comparing it with the proposal.
|
|
591
|
-
* @returns Validation result with isValid flag and reason if invalid.
|
|
592
|
-
*/
|
|
593
|
-
private async validateCheckpointProposal(
|
|
594
|
-
proposal: CheckpointProposalCore,
|
|
595
|
-
proposalInfo: LogData,
|
|
596
|
-
): Promise<{ isValid: true } | { isValid: false; reason: string }> {
|
|
597
|
-
const slot = proposal.slotNumber;
|
|
598
|
-
const timeoutSeconds = 10; // TODO(palla/mbps): This should map to the timetable settings
|
|
599
|
-
|
|
600
|
-
// Wait for last block to sync by archive
|
|
601
|
-
let lastBlockHeader: BlockHeader | undefined;
|
|
602
|
-
try {
|
|
603
|
-
lastBlockHeader = await retryUntil(
|
|
604
|
-
async () => {
|
|
605
|
-
await this.blockSource.syncImmediate();
|
|
606
|
-
return this.blockSource.getBlockHeaderByArchive(proposal.archive);
|
|
607
|
-
},
|
|
608
|
-
`waiting for block with archive ${proposal.archive.toString()} for slot ${slot}`,
|
|
609
|
-
timeoutSeconds,
|
|
610
|
-
0.5,
|
|
611
|
-
);
|
|
612
|
-
} catch (err) {
|
|
613
|
-
if (err instanceof TimeoutError) {
|
|
614
|
-
this.log.warn(`Timed out waiting for block with archive matching checkpoint proposal`, proposalInfo);
|
|
615
|
-
return { isValid: false, reason: 'last_block_not_found' };
|
|
616
|
-
}
|
|
617
|
-
this.log.error(`Error fetching last block for checkpoint proposal`, err, proposalInfo);
|
|
618
|
-
return { isValid: false, reason: 'block_fetch_error' };
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
if (!lastBlockHeader) {
|
|
622
|
-
this.log.warn(`Last block not found for checkpoint proposal`, proposalInfo);
|
|
623
|
-
return { isValid: false, reason: 'last_block_not_found' };
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
// Get all full blocks for the slot and checkpoint
|
|
627
|
-
const blocks = await this.blockSource.getBlocksForSlot(slot);
|
|
628
|
-
if (blocks.length === 0) {
|
|
629
|
-
this.log.warn(`No blocks found for slot ${slot}`, proposalInfo);
|
|
630
|
-
return { isValid: false, reason: 'no_blocks_for_slot' };
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
this.log.debug(`Found ${blocks.length} blocks for slot ${slot}`, {
|
|
634
|
-
...proposalInfo,
|
|
635
|
-
blockNumbers: blocks.map(b => b.number),
|
|
636
|
-
});
|
|
637
|
-
|
|
638
|
-
// Get checkpoint constants from first block
|
|
639
|
-
const firstBlock = blocks[0];
|
|
640
|
-
const constants = this.extractCheckpointConstants(firstBlock);
|
|
641
|
-
const checkpointNumber = firstBlock.checkpointNumber;
|
|
642
|
-
|
|
643
|
-
// Get L1-to-L2 messages for this checkpoint
|
|
644
|
-
const l1ToL2Messages = await this.l1ToL2MessageSource.getL1ToL2Messages(checkpointNumber);
|
|
645
|
-
|
|
646
|
-
// Compute the previous checkpoint out hashes for the epoch.
|
|
647
|
-
// TODO: There can be a more efficient way to get the previous checkpoint out hashes without having to fetch the
|
|
648
|
-
// actual checkpoints and the blocks/txs in them.
|
|
649
|
-
const epoch = getEpochAtSlot(slot, this.epochCache.getL1Constants());
|
|
650
|
-
const previousCheckpoints = (await this.blockSource.getCheckpointsForEpoch(epoch))
|
|
651
|
-
.filter(b => b.number < checkpointNumber)
|
|
652
|
-
.sort((a, b) => a.number - b.number);
|
|
653
|
-
const previousCheckpointOutHashes = previousCheckpoints.map(c => c.getCheckpointOutHash());
|
|
654
|
-
|
|
655
|
-
// Fork world state at the block before the first block
|
|
656
|
-
const parentBlockNumber = BlockNumber(firstBlock.number - 1);
|
|
657
|
-
const fork = await this.worldState.fork(parentBlockNumber);
|
|
658
|
-
|
|
659
|
-
try {
|
|
660
|
-
// Create checkpoint builder with all existing blocks
|
|
661
|
-
const checkpointBuilder = await this.checkpointsBuilder.openCheckpoint(
|
|
662
|
-
checkpointNumber,
|
|
663
|
-
constants,
|
|
664
|
-
l1ToL2Messages,
|
|
665
|
-
previousCheckpointOutHashes,
|
|
666
|
-
fork,
|
|
667
|
-
blocks,
|
|
668
|
-
this.log.getBindings(),
|
|
669
|
-
);
|
|
670
|
-
|
|
671
|
-
// Complete the checkpoint to get computed values
|
|
672
|
-
const computedCheckpoint = await checkpointBuilder.completeCheckpoint();
|
|
673
|
-
|
|
674
|
-
// Compare checkpoint header with proposal
|
|
675
|
-
if (!computedCheckpoint.header.equals(proposal.checkpointHeader)) {
|
|
676
|
-
this.log.warn(`Checkpoint header mismatch`, {
|
|
677
|
-
...proposalInfo,
|
|
678
|
-
computed: computedCheckpoint.header.toInspect(),
|
|
679
|
-
proposal: proposal.checkpointHeader.toInspect(),
|
|
680
|
-
});
|
|
681
|
-
return { isValid: false, reason: 'checkpoint_header_mismatch' };
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
// Compare archive root with proposal
|
|
685
|
-
if (!computedCheckpoint.archive.root.equals(proposal.archive)) {
|
|
686
|
-
this.log.warn(`Archive root mismatch`, {
|
|
687
|
-
...proposalInfo,
|
|
688
|
-
computed: computedCheckpoint.archive.root.toString(),
|
|
689
|
-
proposal: proposal.archive.toString(),
|
|
690
|
-
});
|
|
691
|
-
return { isValid: false, reason: 'archive_mismatch' };
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
// Check that the accumulated epoch out hash matches the value in the proposal.
|
|
695
|
-
// The epoch out hash is the accumulated hash of all checkpoint out hashes in the epoch.
|
|
696
|
-
const checkpointOutHash = computedCheckpoint.getCheckpointOutHash();
|
|
697
|
-
const computedEpochOutHash = accumulateCheckpointOutHashes([...previousCheckpointOutHashes, checkpointOutHash]);
|
|
698
|
-
const proposalEpochOutHash = proposal.checkpointHeader.epochOutHash;
|
|
699
|
-
if (!computedEpochOutHash.equals(proposalEpochOutHash)) {
|
|
700
|
-
this.log.warn(`Epoch out hash mismatch`, {
|
|
701
|
-
proposalEpochOutHash: proposalEpochOutHash.toString(),
|
|
702
|
-
computedEpochOutHash: computedEpochOutHash.toString(),
|
|
703
|
-
checkpointOutHash: checkpointOutHash.toString(),
|
|
704
|
-
previousCheckpointOutHashes: previousCheckpointOutHashes.map(h => h.toString()),
|
|
705
|
-
...proposalInfo,
|
|
706
|
-
});
|
|
707
|
-
return { isValid: false, reason: 'out_hash_mismatch' };
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
this.log.verbose(`Checkpoint proposal validation successful for slot ${slot}`, proposalInfo);
|
|
711
|
-
return { isValid: true };
|
|
712
|
-
} finally {
|
|
713
|
-
await fork.close();
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
/**
|
|
718
|
-
* Extract checkpoint global variables from a block.
|
|
719
|
-
*/
|
|
720
|
-
private extractCheckpointConstants(block: L2Block): CheckpointGlobalVariables {
|
|
721
|
-
const gv = block.header.globalVariables;
|
|
722
|
-
return {
|
|
723
|
-
chainId: gv.chainId,
|
|
724
|
-
version: gv.version,
|
|
725
|
-
slotNumber: gv.slotNumber,
|
|
726
|
-
coinbase: gv.coinbase,
|
|
727
|
-
feeRecipient: gv.feeRecipient,
|
|
728
|
-
gasFees: gv.gasFees,
|
|
729
|
-
};
|
|
730
|
-
}
|
|
731
|
-
|
|
732
624
|
/**
|
|
733
625
|
* Uploads blobs for a checkpoint to the filestore (fire and forget).
|
|
734
626
|
*/
|
|
735
|
-
|
|
627
|
+
protected async uploadBlobsForCheckpoint(proposal: CheckpointProposalCore, proposalInfo: LogData): Promise<void> {
|
|
736
628
|
try {
|
|
737
629
|
const lastBlockHeader = await this.blockSource.getBlockHeaderByArchive(proposal.archive);
|
|
738
630
|
if (!lastBlockHeader) {
|
|
@@ -747,7 +639,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
747
639
|
}
|
|
748
640
|
|
|
749
641
|
const blobFields = blocks.flatMap(b => b.toBlobFields());
|
|
750
|
-
const blobs: Blob[] = getBlobsPerL1Block(blobFields);
|
|
642
|
+
const blobs: Blob[] = await getBlobsPerL1Block(blobFields);
|
|
751
643
|
await this.blobClient.sendBlobsToFilestore(blobs);
|
|
752
644
|
this.log.debug(`Uploaded ${blobs.length} blobs to filestore for checkpoint at slot ${proposal.slotNumber}`, {
|
|
753
645
|
...proposalInfo,
|
|
@@ -876,6 +768,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
876
768
|
async createCheckpointProposal(
|
|
877
769
|
checkpointHeader: CheckpointHeader,
|
|
878
770
|
archive: Fr,
|
|
771
|
+
feeAssetPriceModifier: bigint,
|
|
879
772
|
lastBlockInfo: CreateCheckpointProposalLastBlockData | undefined,
|
|
880
773
|
proposerAddress: EthAddress | undefined,
|
|
881
774
|
options: CheckpointProposalOptions = {},
|
|
@@ -897,6 +790,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
897
790
|
const newProposal = await this.validationService.createCheckpointProposal(
|
|
898
791
|
checkpointHeader,
|
|
899
792
|
archive,
|
|
793
|
+
feeAssetPriceModifier,
|
|
900
794
|
lastBlockInfo,
|
|
901
795
|
proposerAddress,
|
|
902
796
|
options,
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type { EpochCache } from '@aztec/epoch-cache';
|
|
2
|
-
import { BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-types';
|
|
3
|
-
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
|
-
import { DateProvider } from '@aztec/foundation/timer';
|
|
5
|
-
import type { P2P, PeerId } from '@aztec/p2p';
|
|
6
|
-
import { BlockProposalValidator } from '@aztec/p2p/msg_validators';
|
|
7
|
-
import type { L2Block, L2BlockSink, L2BlockSource } from '@aztec/stdlib/block';
|
|
8
|
-
import type { ITxProvider, ValidatorClientFullConfig, WorldStateSynchronizer } from '@aztec/stdlib/interfaces/server';
|
|
9
|
-
import { type L1ToL2MessageSource } from '@aztec/stdlib/messaging';
|
|
10
|
-
import type { BlockProposal } from '@aztec/stdlib/p2p';
|
|
11
|
-
import { type FailedTx, type Tx } from '@aztec/stdlib/tx';
|
|
12
|
-
import { type TelemetryClient, type Tracer } from '@aztec/telemetry-client';
|
|
13
|
-
import type { FullNodeCheckpointsBuilder } from './checkpoint_builder.js';
|
|
14
|
-
import type { ValidatorMetrics } from './metrics.js';
|
|
15
|
-
export type BlockProposalValidationFailureReason = 'invalid_proposal' | 'parent_block_not_found' | 'parent_block_wrong_slot' | 'in_hash_mismatch' | 'global_variables_mismatch' | 'block_number_already_exists' | 'txs_not_available' | 'state_mismatch' | 'failed_txs' | 'timeout' | 'unknown_error';
|
|
16
|
-
type ReexecuteTransactionsResult = {
|
|
17
|
-
block: L2Block;
|
|
18
|
-
failedTxs: FailedTx[];
|
|
19
|
-
reexecutionTimeMs: number;
|
|
20
|
-
totalManaUsed: number;
|
|
21
|
-
};
|
|
22
|
-
export type BlockProposalValidationSuccessResult = {
|
|
23
|
-
isValid: true;
|
|
24
|
-
blockNumber: BlockNumber;
|
|
25
|
-
reexecutionResult?: ReexecuteTransactionsResult;
|
|
26
|
-
};
|
|
27
|
-
export type BlockProposalValidationFailureResult = {
|
|
28
|
-
isValid: false;
|
|
29
|
-
reason: BlockProposalValidationFailureReason;
|
|
30
|
-
blockNumber?: BlockNumber;
|
|
31
|
-
reexecutionResult?: ReexecuteTransactionsResult;
|
|
32
|
-
};
|
|
33
|
-
export type BlockProposalValidationResult = BlockProposalValidationSuccessResult | BlockProposalValidationFailureResult;
|
|
34
|
-
export declare class BlockProposalHandler {
|
|
35
|
-
private checkpointsBuilder;
|
|
36
|
-
private worldState;
|
|
37
|
-
private blockSource;
|
|
38
|
-
private l1ToL2MessageSource;
|
|
39
|
-
private txProvider;
|
|
40
|
-
private blockProposalValidator;
|
|
41
|
-
private epochCache;
|
|
42
|
-
private config;
|
|
43
|
-
private metrics?;
|
|
44
|
-
private dateProvider;
|
|
45
|
-
private log;
|
|
46
|
-
readonly tracer: Tracer;
|
|
47
|
-
constructor(checkpointsBuilder: FullNodeCheckpointsBuilder, worldState: WorldStateSynchronizer, blockSource: L2BlockSource & L2BlockSink, l1ToL2MessageSource: L1ToL2MessageSource, txProvider: ITxProvider, blockProposalValidator: BlockProposalValidator, epochCache: EpochCache, config: ValidatorClientFullConfig, metrics?: ValidatorMetrics | undefined, dateProvider?: DateProvider, telemetry?: TelemetryClient, log?: import("@aztec/foundation/log").Logger);
|
|
48
|
-
registerForReexecution(p2pClient: P2P): BlockProposalHandler;
|
|
49
|
-
handleBlockProposal(proposal: BlockProposal, proposalSender: PeerId, shouldReexecute: boolean): Promise<BlockProposalValidationResult>;
|
|
50
|
-
private getParentBlock;
|
|
51
|
-
private computeCheckpointNumber;
|
|
52
|
-
/**
|
|
53
|
-
* Validates that a non-first block in a checkpoint has consistent global variables with its parent.
|
|
54
|
-
* For blocks with indexWithinCheckpoint > 0, all global variables except blockNumber must match the parent.
|
|
55
|
-
* @returns A failure result if validation fails, undefined if validation passes
|
|
56
|
-
*/
|
|
57
|
-
private validateNonFirstBlockInCheckpoint;
|
|
58
|
-
private getReexecutionDeadline;
|
|
59
|
-
private getReexecuteFailureReason;
|
|
60
|
-
reexecuteTransactions(proposal: BlockProposal, blockNumber: BlockNumber, checkpointNumber: CheckpointNumber, txs: Tx[], l1ToL2Messages: Fr[], previousCheckpointOutHashes: Fr[]): Promise<ReexecuteTransactionsResult>;
|
|
61
|
-
}
|
|
62
|
-
export {};
|
|
63
|
-
//# sourceMappingURL=data:application/json;base64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