@aztec/validator-client 0.0.1-commit.ec5f612 → 0.0.1-commit.ec7ac5448
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 +14 -4
- package/dest/checkpoint_builder.d.ts.map +1 -1
- package/dest/checkpoint_builder.js +101 -30
- 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 +3 -4
- package/dest/duties/validation_service.d.ts.map +1 -1
- package/dest/duties/validation_service.js +10 -21
- 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 -2
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +1 -1
- 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 +966 -0
- package/dest/validator.d.ts +13 -16
- package/dest/validator.d.ts.map +1 -1
- package/dest/validator.js +72 -219
- package/package.json +19 -19
- package/src/checkpoint_builder.ts +124 -35
- package/src/config.ts +22 -6
- package/src/duties/validation_service.ts +10 -23
- package/src/factory.ts +9 -3
- package/src/index.ts +1 -1
- package/src/key_store/ha_key_store.ts +1 -1
- package/src/metrics.ts +19 -1
- package/src/proposal_handler.ts +1033 -0
- package/src/validator.ts +93 -247
- 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 -532
- package/src/block_proposal_handler.ts +0 -535
package/src/validator.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { BlobClientInterface } from '@aztec/blob-client/client';
|
|
2
2
|
import { type Blob, getBlobsPerL1Block } from '@aztec/blob-lib';
|
|
3
3
|
import type { EpochCache } from '@aztec/epoch-cache';
|
|
4
|
-
import { validateFeeAssetPriceModifier } from '@aztec/ethereum/contracts';
|
|
5
4
|
import {
|
|
6
5
|
BlockNumber,
|
|
7
6
|
CheckpointNumber,
|
|
@@ -10,11 +9,9 @@ import {
|
|
|
10
9
|
SlotNumber,
|
|
11
10
|
} from '@aztec/foundation/branded-types';
|
|
12
11
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
13
|
-
import { TimeoutError } from '@aztec/foundation/error';
|
|
14
12
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
15
13
|
import type { Signature } from '@aztec/foundation/eth-signature';
|
|
16
14
|
import { type LogData, type Logger, createLogger } from '@aztec/foundation/log';
|
|
17
|
-
import { retryUntil } from '@aztec/foundation/retry';
|
|
18
15
|
import { RunningPromise } from '@aztec/foundation/running-promise';
|
|
19
16
|
import { sleep } from '@aztec/foundation/sleep';
|
|
20
17
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
@@ -23,16 +20,15 @@ import type { DuplicateAttestationInfo, DuplicateProposalInfo, P2P, PeerId } fro
|
|
|
23
20
|
import { AuthRequest, AuthResponse, BlockProposalValidator, ReqRespSubProtocol } from '@aztec/p2p';
|
|
24
21
|
import { OffenseType, WANT_TO_SLASH_EVENT, type Watcher, type WatcherEmitter } from '@aztec/slasher';
|
|
25
22
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
26
|
-
import type { CommitteeAttestationsAndSigners,
|
|
27
|
-
import { getEpochAtSlot
|
|
23
|
+
import type { CommitteeAttestationsAndSigners, L2BlockSink, L2BlockSource } from '@aztec/stdlib/block';
|
|
24
|
+
import { getEpochAtSlot } from '@aztec/stdlib/epoch-helpers';
|
|
28
25
|
import type {
|
|
29
|
-
CreateCheckpointProposalLastBlockData,
|
|
30
26
|
ITxProvider,
|
|
31
27
|
Validator,
|
|
32
28
|
ValidatorClientFullConfig,
|
|
33
29
|
WorldStateSynchronizer,
|
|
34
30
|
} from '@aztec/stdlib/interfaces/server';
|
|
35
|
-
import {
|
|
31
|
+
import type { L1ToL2MessageSource } from '@aztec/stdlib/messaging';
|
|
36
32
|
import {
|
|
37
33
|
type BlockProposal,
|
|
38
34
|
type BlockProposalOptions,
|
|
@@ -42,23 +38,27 @@ import {
|
|
|
42
38
|
type CheckpointProposalOptions,
|
|
43
39
|
} from '@aztec/stdlib/p2p';
|
|
44
40
|
import type { CheckpointHeader } from '@aztec/stdlib/rollup';
|
|
45
|
-
import type { BlockHeader,
|
|
41
|
+
import type { BlockHeader, Tx } from '@aztec/stdlib/tx';
|
|
46
42
|
import { AttestationTimeoutError } from '@aztec/stdlib/validators';
|
|
47
43
|
import { type TelemetryClient, type Tracer, getTelemetryClient } from '@aztec/telemetry-client';
|
|
48
|
-
import {
|
|
49
|
-
|
|
44
|
+
import {
|
|
45
|
+
createHASigner,
|
|
46
|
+
createLocalSignerWithProtection,
|
|
47
|
+
createSignerFromSharedDb,
|
|
48
|
+
} from '@aztec/validator-ha-signer/factory';
|
|
49
|
+
import { DutyType, type SigningContext, type SlashingProtectionDatabase } from '@aztec/validator-ha-signer/types';
|
|
50
50
|
import type { ValidatorHASigner } from '@aztec/validator-ha-signer/validator-ha-signer';
|
|
51
51
|
|
|
52
52
|
import { EventEmitter } from 'events';
|
|
53
53
|
import type { TypedDataDefinition } from 'viem';
|
|
54
54
|
|
|
55
|
-
import { BlockProposalHandler, type BlockProposalValidationFailureReason } from './block_proposal_handler.js';
|
|
56
55
|
import type { FullNodeCheckpointsBuilder } from './checkpoint_builder.js';
|
|
57
56
|
import { ValidationService } from './duties/validation_service.js';
|
|
58
57
|
import { HAKeyStore } from './key_store/ha_key_store.js';
|
|
59
58
|
import type { ExtendedValidatorKeyStore } from './key_store/interface.js';
|
|
60
59
|
import { NodeKeystoreAdapter } from './key_store/node_keystore_adapter.js';
|
|
61
60
|
import { ValidatorMetrics } from './metrics.js';
|
|
61
|
+
import { type BlockProposalValidationFailureReason, ProposalHandler } from './proposal_handler.js';
|
|
62
62
|
|
|
63
63
|
// We maintain a set of proposers who have proposed invalid blocks.
|
|
64
64
|
// Just cap the set to avoid unbounded growth.
|
|
@@ -89,6 +89,8 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
89
89
|
|
|
90
90
|
private lastEpochForCommitteeUpdateLoop: EpochNumber | undefined;
|
|
91
91
|
private epochCacheUpdateLoop: RunningPromise;
|
|
92
|
+
/** Tracks the last epoch in which each attester successfully submitted at least one attestation. */
|
|
93
|
+
private lastAttestedEpochByAttester: Map<string, EpochNumber> = new Map();
|
|
92
94
|
|
|
93
95
|
private proposersOfInvalidBlocks: Set<string> = new Set();
|
|
94
96
|
|
|
@@ -99,14 +101,14 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
99
101
|
private keyStore: ExtendedValidatorKeyStore,
|
|
100
102
|
private epochCache: EpochCache,
|
|
101
103
|
private p2pClient: P2P,
|
|
102
|
-
private
|
|
104
|
+
private proposalHandler: ProposalHandler,
|
|
103
105
|
private blockSource: L2BlockSource,
|
|
104
106
|
private checkpointsBuilder: FullNodeCheckpointsBuilder,
|
|
105
107
|
private worldState: WorldStateSynchronizer,
|
|
106
108
|
private l1ToL2MessageSource: L1ToL2MessageSource,
|
|
107
109
|
private config: ValidatorClientFullConfig,
|
|
108
110
|
private blobClient: BlobClientInterface,
|
|
109
|
-
private
|
|
111
|
+
private slashingProtectionSigner: ValidatorHASigner,
|
|
110
112
|
private dateProvider: DateProvider = new DateProvider(),
|
|
111
113
|
telemetry: TelemetryClient = getTelemetryClient(),
|
|
112
114
|
log = createLogger('validator'),
|
|
@@ -160,6 +162,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
160
162
|
this.log.trace(`No committee found for slot`);
|
|
161
163
|
return;
|
|
162
164
|
}
|
|
165
|
+
this.metrics.setCurrentEpoch(epoch);
|
|
163
166
|
if (epoch !== this.lastEpochForCommitteeUpdateLoop) {
|
|
164
167
|
const me = this.getValidatorAddresses();
|
|
165
168
|
const committeeSet = new Set(committee.map(v => v.toString()));
|
|
@@ -193,12 +196,14 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
193
196
|
blobClient: BlobClientInterface,
|
|
194
197
|
dateProvider: DateProvider = new DateProvider(),
|
|
195
198
|
telemetry: TelemetryClient = getTelemetryClient(),
|
|
199
|
+
slashingProtectionDb?: SlashingProtectionDatabase,
|
|
196
200
|
) {
|
|
197
201
|
const metrics = new ValidatorMetrics(telemetry);
|
|
198
202
|
const blockProposalValidator = new BlockProposalValidator(epochCache, {
|
|
199
203
|
txsPermitted: !config.disableTransactions,
|
|
204
|
+
maxTxsPerBlock: config.validateMaxTxsPerBlock,
|
|
200
205
|
});
|
|
201
|
-
const
|
|
206
|
+
const proposalHandler = new ProposalHandler(
|
|
202
207
|
checkpointsBuilder,
|
|
203
208
|
worldState,
|
|
204
209
|
blockSource,
|
|
@@ -207,37 +212,53 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
207
212
|
blockProposalValidator,
|
|
208
213
|
epochCache,
|
|
209
214
|
config,
|
|
215
|
+
blobClient,
|
|
210
216
|
metrics,
|
|
211
217
|
dateProvider,
|
|
212
218
|
telemetry,
|
|
213
219
|
);
|
|
214
220
|
|
|
215
221
|
const nodeKeystoreAdapter = NodeKeystoreAdapter.fromKeyStoreManager(keyStoreManager);
|
|
216
|
-
let
|
|
217
|
-
|
|
218
|
-
|
|
222
|
+
let slashingProtectionSigner: ValidatorHASigner;
|
|
223
|
+
if (slashingProtectionDb) {
|
|
224
|
+
// Shared database mode: use a pre-existing database (e.g. for testing HA setups).
|
|
225
|
+
({ signer: slashingProtectionSigner } = createSignerFromSharedDb(slashingProtectionDb, config, {
|
|
226
|
+
telemetryClient: telemetry,
|
|
227
|
+
dateProvider,
|
|
228
|
+
}));
|
|
229
|
+
} else if (config.haSigningEnabled) {
|
|
230
|
+
// Multi-node HA mode: use PostgreSQL-backed distributed locking.
|
|
219
231
|
// If maxStuckDutiesAgeMs is not explicitly set, compute it from Aztec slot duration
|
|
220
232
|
const haConfig = {
|
|
221
233
|
...config,
|
|
222
234
|
maxStuckDutiesAgeMs: config.maxStuckDutiesAgeMs ?? epochCache.getL1Constants().slotDuration * 2 * 1000,
|
|
223
235
|
};
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
236
|
+
({ signer: slashingProtectionSigner } = await createHASigner(haConfig, {
|
|
237
|
+
telemetryClient: telemetry,
|
|
238
|
+
dateProvider,
|
|
239
|
+
}));
|
|
240
|
+
} else {
|
|
241
|
+
// Single-node mode: use LMDB-backed local signing protection.
|
|
242
|
+
// This prevents double-signing if the node crashes and restarts mid-proposal.
|
|
243
|
+
({ signer: slashingProtectionSigner } = await createLocalSignerWithProtection(config, {
|
|
244
|
+
telemetryClient: telemetry,
|
|
245
|
+
dateProvider,
|
|
246
|
+
}));
|
|
227
247
|
}
|
|
248
|
+
const validatorKeyStore: ExtendedValidatorKeyStore = new HAKeyStore(nodeKeystoreAdapter, slashingProtectionSigner);
|
|
228
249
|
|
|
229
250
|
const validator = new ValidatorClient(
|
|
230
251
|
validatorKeyStore,
|
|
231
252
|
epochCache,
|
|
232
253
|
p2pClient,
|
|
233
|
-
|
|
254
|
+
proposalHandler,
|
|
234
255
|
blockSource,
|
|
235
256
|
checkpointsBuilder,
|
|
236
257
|
worldState,
|
|
237
258
|
l1ToL2MessageSource,
|
|
238
259
|
config,
|
|
239
260
|
blobClient,
|
|
240
|
-
|
|
261
|
+
slashingProtectionSigner,
|
|
241
262
|
dateProvider,
|
|
242
263
|
telemetry,
|
|
243
264
|
);
|
|
@@ -251,8 +272,8 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
251
272
|
.filter(addr => !this.config.disabledValidators.some(disabled => disabled.equals(addr)));
|
|
252
273
|
}
|
|
253
274
|
|
|
254
|
-
public
|
|
255
|
-
return this.
|
|
275
|
+
public getProposalHandler() {
|
|
276
|
+
return this.proposalHandler;
|
|
256
277
|
}
|
|
257
278
|
|
|
258
279
|
public signWithAddress(addr: EthAddress, msg: TypedDataDefinition, context: SigningContext) {
|
|
@@ -276,24 +297,8 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
276
297
|
}
|
|
277
298
|
|
|
278
299
|
public reloadKeystore(newManager: KeystoreManager): void {
|
|
279
|
-
if (this.config.haSigningEnabled && !this.haSigner) {
|
|
280
|
-
this.log.warn(
|
|
281
|
-
'HA signing is enabled in config but was not initialized at startup. ' +
|
|
282
|
-
'Restart the node to enable HA signing.',
|
|
283
|
-
);
|
|
284
|
-
} else if (!this.config.haSigningEnabled && this.haSigner) {
|
|
285
|
-
this.log.warn(
|
|
286
|
-
'HA signing was disabled via config update but the HA signer is still active. ' +
|
|
287
|
-
'Restart the node to fully disable HA signing.',
|
|
288
|
-
);
|
|
289
|
-
}
|
|
290
|
-
|
|
291
300
|
const newAdapter = NodeKeystoreAdapter.fromKeyStoreManager(newManager);
|
|
292
|
-
|
|
293
|
-
this.keyStore = new HAKeyStore(newAdapter, this.haSigner);
|
|
294
|
-
} else {
|
|
295
|
-
this.keyStore = newAdapter;
|
|
296
|
-
}
|
|
301
|
+
this.keyStore = new HAKeyStore(newAdapter, this.slashingProtectionSigner);
|
|
297
302
|
this.validationService = new ValidationService(this.keyStore, this.log.createChild('validation-service'));
|
|
298
303
|
}
|
|
299
304
|
|
|
@@ -341,7 +346,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
341
346
|
checkpoint: CheckpointProposalCore,
|
|
342
347
|
proposalSender: PeerId,
|
|
343
348
|
): Promise<CheckpointAttestation[] | undefined> => this.attestToCheckpointProposal(checkpoint, proposalSender);
|
|
344
|
-
this.p2pClient.
|
|
349
|
+
this.p2pClient.registerValidatorCheckpointProposalHandler(checkpointHandler);
|
|
345
350
|
|
|
346
351
|
// Duplicate proposal handler - triggers slashing for equivocation
|
|
347
352
|
this.p2pClient.registerDuplicateProposalCallback((info: DuplicateProposalInfo) => {
|
|
@@ -380,13 +385,12 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
380
385
|
return false;
|
|
381
386
|
}
|
|
382
387
|
|
|
383
|
-
//
|
|
388
|
+
// Log self-proposals from HA peers (same validator key on different nodes)
|
|
384
389
|
if (this.getValidatorAddresses().some(addr => addr.equals(proposer))) {
|
|
385
|
-
this.log.
|
|
390
|
+
this.log.verbose(`Processing block proposal from HA peer for slot ${slotNumber}`, {
|
|
386
391
|
proposer: proposer.toString(),
|
|
387
392
|
slotNumber,
|
|
388
393
|
});
|
|
389
|
-
return false;
|
|
390
394
|
}
|
|
391
395
|
|
|
392
396
|
// Check if we're in the committee (for metrics purposes)
|
|
@@ -402,25 +406,25 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
402
406
|
|
|
403
407
|
// Reexecute txs if we are part of the committee, or if slashing is enabled, or if we are configured to always reexecute.
|
|
404
408
|
// In fisherman mode, we always reexecute to validate proposals.
|
|
405
|
-
const {
|
|
406
|
-
this.config;
|
|
409
|
+
const { slashBroadcastedInvalidBlockPenalty, alwaysReexecuteBlockProposals, fishermanMode } = this.config;
|
|
407
410
|
const shouldReexecute =
|
|
408
411
|
fishermanMode ||
|
|
409
|
-
|
|
410
|
-
|
|
412
|
+
slashBroadcastedInvalidBlockPenalty > 0n ||
|
|
413
|
+
partOfCommittee ||
|
|
411
414
|
alwaysReexecuteBlockProposals ||
|
|
412
415
|
this.blobClient.canUpload();
|
|
413
416
|
|
|
414
|
-
const validationResult = await this.
|
|
417
|
+
const validationResult = await this.proposalHandler.handleBlockProposal(
|
|
415
418
|
proposal,
|
|
416
419
|
proposalSender,
|
|
417
420
|
!!shouldReexecute && !escapeHatchOpen,
|
|
418
421
|
);
|
|
419
422
|
|
|
420
423
|
if (!validationResult.isValid) {
|
|
421
|
-
this.log.warn(`Block proposal validation failed: ${validationResult.reason}`, proposalInfo);
|
|
422
|
-
|
|
423
424
|
const reason = validationResult.reason || 'unknown';
|
|
425
|
+
|
|
426
|
+
this.log.warn(`Block proposal validation failed: ${reason}`, proposalInfo);
|
|
427
|
+
|
|
424
428
|
// Classify failure reason: bad proposal vs node issue
|
|
425
429
|
const badProposalReasons: BlockProposalValidationFailureReason[] = [
|
|
426
430
|
'invalid_proposal',
|
|
@@ -475,70 +479,50 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
475
479
|
proposal: CheckpointProposalCore,
|
|
476
480
|
_proposalSender: PeerId,
|
|
477
481
|
): Promise<CheckpointAttestation[] | undefined> {
|
|
478
|
-
const
|
|
482
|
+
const proposalSlotNumber = proposal.slotNumber;
|
|
479
483
|
const proposer = proposal.getSender();
|
|
480
484
|
|
|
481
485
|
// If escape hatch is open for this slot's epoch, do not attest.
|
|
482
|
-
if (await this.epochCache.isEscapeHatchOpenAtSlot(
|
|
483
|
-
this.log.warn(`Escape hatch open for slot ${
|
|
484
|
-
return undefined;
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
// Reject proposals with invalid signatures
|
|
488
|
-
if (!proposer) {
|
|
489
|
-
this.log.warn(`Received checkpoint proposal with invalid signature for slot ${slotNumber}`);
|
|
486
|
+
if (await this.epochCache.isEscapeHatchOpenAtSlot(proposalSlotNumber)) {
|
|
487
|
+
this.log.warn(`Escape hatch open for slot ${proposalSlotNumber}, skipping checkpoint attestation handling`);
|
|
490
488
|
return undefined;
|
|
491
489
|
}
|
|
492
490
|
|
|
493
491
|
// Ignore proposals from ourselves (may happen in HA setups)
|
|
494
|
-
if (this.getValidatorAddresses().some(addr => addr.equals(proposer))) {
|
|
495
|
-
this.log.
|
|
492
|
+
if (proposer && this.getValidatorAddresses().some(addr => addr.equals(proposer))) {
|
|
493
|
+
this.log.debug(`Ignoring block proposal from self for slot ${proposalSlotNumber}`, {
|
|
496
494
|
proposer: proposer.toString(),
|
|
497
|
-
|
|
495
|
+
proposalSlotNumber,
|
|
498
496
|
});
|
|
499
497
|
return undefined;
|
|
500
498
|
}
|
|
501
499
|
|
|
502
|
-
//
|
|
503
|
-
|
|
504
|
-
this.log.warn(
|
|
505
|
-
`Received checkpoint proposal with invalid feeAssetPriceModifier ${proposal.feeAssetPriceModifier} for slot ${slotNumber}`,
|
|
506
|
-
);
|
|
507
|
-
return undefined;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
// Check that I have any address in current committee before attesting
|
|
511
|
-
const inCommittee = await this.epochCache.filterInCommittee(slotNumber, this.getValidatorAddresses());
|
|
500
|
+
// Check that I have any address in the committee where this checkpoint will land before attesting
|
|
501
|
+
const inCommittee = await this.epochCache.filterInCommittee(proposalSlotNumber, this.getValidatorAddresses());
|
|
512
502
|
const partOfCommittee = inCommittee.length > 0;
|
|
513
503
|
|
|
514
504
|
const proposalInfo = {
|
|
515
|
-
|
|
505
|
+
proposalSlotNumber,
|
|
516
506
|
archive: proposal.archive.toString(),
|
|
517
|
-
proposer: proposer
|
|
518
|
-
txCount: proposal.txHashes.length,
|
|
507
|
+
proposer: proposer?.toString(),
|
|
519
508
|
};
|
|
520
|
-
this.log.info(`Received checkpoint proposal for slot ${
|
|
509
|
+
this.log.info(`Received checkpoint proposal for slot ${proposalSlotNumber}`, {
|
|
521
510
|
...proposalInfo,
|
|
522
|
-
txHashes: proposal.txHashes.map(t => t.toString()),
|
|
523
511
|
fishermanMode: this.config.fishermanMode || false,
|
|
524
512
|
});
|
|
525
513
|
|
|
526
|
-
// Validate the checkpoint proposal before attesting (unless skipCheckpointProposalValidation is set)
|
|
514
|
+
// Validate the checkpoint proposal before attesting (unless skipCheckpointProposalValidation is set).
|
|
515
|
+
// Uses the cached result from the all-nodes callback if available (avoids double validation).
|
|
527
516
|
if (this.config.skipCheckpointProposalValidation) {
|
|
528
|
-
this.log.warn(`Skipping checkpoint proposal validation for slot ${
|
|
517
|
+
this.log.warn(`Skipping checkpoint proposal validation for slot ${proposalSlotNumber}`, proposalInfo);
|
|
529
518
|
} else {
|
|
530
|
-
const validationResult = await this.
|
|
519
|
+
const validationResult = await this.proposalHandler.handleCheckpointProposal(proposal, proposalInfo);
|
|
531
520
|
if (!validationResult.isValid) {
|
|
532
521
|
this.log.warn(`Checkpoint proposal validation failed: ${validationResult.reason}`, proposalInfo);
|
|
533
522
|
return undefined;
|
|
534
523
|
}
|
|
535
524
|
}
|
|
536
525
|
|
|
537
|
-
// Upload blobs to filestore if we can (fire and forget)
|
|
538
|
-
if (this.blobClient.canUpload()) {
|
|
539
|
-
void this.uploadBlobsForCheckpoint(proposal, proposalInfo);
|
|
540
|
-
}
|
|
541
|
-
|
|
542
526
|
// Check that I have any address in current committee before attesting
|
|
543
527
|
// In fisherman mode, we still create attestations for validation even if not in committee
|
|
544
528
|
if (!partOfCommittee && !this.config.fishermanMode) {
|
|
@@ -547,14 +531,28 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
547
531
|
}
|
|
548
532
|
|
|
549
533
|
// Provided all of the above checks pass, we can attest to the proposal
|
|
550
|
-
this.log.info(
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
534
|
+
this.log.info(
|
|
535
|
+
`${partOfCommittee ? 'Attesting to' : 'Validated'} checkpoint proposal for slot ${proposalSlotNumber}`,
|
|
536
|
+
{
|
|
537
|
+
...proposalInfo,
|
|
538
|
+
inCommittee: partOfCommittee,
|
|
539
|
+
fishermanMode: this.config.fishermanMode || false,
|
|
540
|
+
},
|
|
541
|
+
);
|
|
555
542
|
|
|
556
543
|
this.metrics.incSuccessfulAttestations(inCommittee.length);
|
|
557
544
|
|
|
545
|
+
// Track epoch participation per attester: count each (attester, epoch) pair at most once
|
|
546
|
+
const proposalEpoch = getEpochAtSlot(proposalSlotNumber, this.epochCache.getL1Constants());
|
|
547
|
+
for (const attester of inCommittee) {
|
|
548
|
+
const key = attester.toString();
|
|
549
|
+
const lastEpoch = this.lastAttestedEpochByAttester.get(key);
|
|
550
|
+
if (lastEpoch === undefined || proposalEpoch > lastEpoch) {
|
|
551
|
+
this.lastAttestedEpochByAttester.set(key, proposalEpoch);
|
|
552
|
+
this.metrics.incAttestedEpochCount(attester);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
|
|
558
556
|
// Determine which validators should attest
|
|
559
557
|
let attestors: EthAddress[];
|
|
560
558
|
if (partOfCommittee) {
|
|
@@ -573,7 +571,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
573
571
|
|
|
574
572
|
if (this.config.fishermanMode) {
|
|
575
573
|
// bail out early and don't save attestations to the pool in fisherman mode
|
|
576
|
-
this.log.info(`Creating checkpoint attestations for slot ${
|
|
574
|
+
this.log.info(`Creating checkpoint attestations for slot ${proposalSlotNumber}`, {
|
|
577
575
|
...proposalInfo,
|
|
578
576
|
attestors: attestors.map(a => a.toString()),
|
|
579
577
|
});
|
|
@@ -622,158 +620,6 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
622
620
|
return attestations;
|
|
623
621
|
}
|
|
624
622
|
|
|
625
|
-
/**
|
|
626
|
-
* Validates a checkpoint proposal by building the full checkpoint and comparing it with the proposal.
|
|
627
|
-
* @returns Validation result with isValid flag and reason if invalid.
|
|
628
|
-
*/
|
|
629
|
-
private async validateCheckpointProposal(
|
|
630
|
-
proposal: CheckpointProposalCore,
|
|
631
|
-
proposalInfo: LogData,
|
|
632
|
-
): Promise<{ isValid: true } | { isValid: false; reason: string }> {
|
|
633
|
-
const slot = proposal.slotNumber;
|
|
634
|
-
|
|
635
|
-
// Timeout block syncing at the start of the next slot
|
|
636
|
-
const config = this.checkpointsBuilder.getConfig();
|
|
637
|
-
const nextSlotTimestampSeconds = Number(getTimestampForSlot(SlotNumber(slot + 1), config));
|
|
638
|
-
const timeoutSeconds = Math.max(1, nextSlotTimestampSeconds - Math.floor(this.dateProvider.now() / 1000));
|
|
639
|
-
|
|
640
|
-
// Wait for last block to sync by archive
|
|
641
|
-
let lastBlockHeader: BlockHeader | undefined;
|
|
642
|
-
try {
|
|
643
|
-
lastBlockHeader = await retryUntil(
|
|
644
|
-
async () => {
|
|
645
|
-
await this.blockSource.syncImmediate();
|
|
646
|
-
return this.blockSource.getBlockHeaderByArchive(proposal.archive);
|
|
647
|
-
},
|
|
648
|
-
`waiting for block with archive ${proposal.archive.toString()} for slot ${slot}`,
|
|
649
|
-
timeoutSeconds,
|
|
650
|
-
0.5,
|
|
651
|
-
);
|
|
652
|
-
} catch (err) {
|
|
653
|
-
if (err instanceof TimeoutError) {
|
|
654
|
-
this.log.warn(`Timed out waiting for block with archive matching checkpoint proposal`, proposalInfo);
|
|
655
|
-
return { isValid: false, reason: 'last_block_not_found' };
|
|
656
|
-
}
|
|
657
|
-
this.log.error(`Error fetching last block for checkpoint proposal`, err, proposalInfo);
|
|
658
|
-
return { isValid: false, reason: 'block_fetch_error' };
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
if (!lastBlockHeader) {
|
|
662
|
-
this.log.warn(`Last block not found for checkpoint proposal`, proposalInfo);
|
|
663
|
-
return { isValid: false, reason: 'last_block_not_found' };
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
// Get all full blocks for the slot and checkpoint
|
|
667
|
-
const blocks = await this.blockSource.getBlocksForSlot(slot);
|
|
668
|
-
if (blocks.length === 0) {
|
|
669
|
-
this.log.warn(`No blocks found for slot ${slot}`, proposalInfo);
|
|
670
|
-
return { isValid: false, reason: 'no_blocks_for_slot' };
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
// Ensure the last block for this slot matches the archive in the checkpoint proposal
|
|
674
|
-
if (!blocks.at(-1)?.archive.root.equals(proposal.archive)) {
|
|
675
|
-
this.log.warn(`Last block archive mismatch for checkpoint proposal`, proposalInfo);
|
|
676
|
-
return { isValid: false, reason: 'last_block_archive_mismatch' };
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
this.log.debug(`Found ${blocks.length} blocks for slot ${slot}`, {
|
|
680
|
-
...proposalInfo,
|
|
681
|
-
blockNumbers: blocks.map(b => b.number),
|
|
682
|
-
});
|
|
683
|
-
|
|
684
|
-
// Get checkpoint constants from first block
|
|
685
|
-
const firstBlock = blocks[0];
|
|
686
|
-
const constants = this.extractCheckpointConstants(firstBlock);
|
|
687
|
-
const checkpointNumber = firstBlock.checkpointNumber;
|
|
688
|
-
|
|
689
|
-
// Get L1-to-L2 messages for this checkpoint
|
|
690
|
-
const l1ToL2Messages = await this.l1ToL2MessageSource.getL1ToL2Messages(checkpointNumber);
|
|
691
|
-
|
|
692
|
-
// Collect the out hashes of all the checkpoints before this one in the same epoch
|
|
693
|
-
const epoch = getEpochAtSlot(slot, this.epochCache.getL1Constants());
|
|
694
|
-
const previousCheckpointOutHashes = (await this.blockSource.getCheckpointsDataForEpoch(epoch))
|
|
695
|
-
.filter(c => c.checkpointNumber < checkpointNumber)
|
|
696
|
-
.map(c => c.checkpointOutHash);
|
|
697
|
-
|
|
698
|
-
// Fork world state at the block before the first block
|
|
699
|
-
const parentBlockNumber = BlockNumber(firstBlock.number - 1);
|
|
700
|
-
const fork = await this.worldState.fork(parentBlockNumber);
|
|
701
|
-
|
|
702
|
-
try {
|
|
703
|
-
// Create checkpoint builder with all existing blocks
|
|
704
|
-
const checkpointBuilder = await this.checkpointsBuilder.openCheckpoint(
|
|
705
|
-
checkpointNumber,
|
|
706
|
-
constants,
|
|
707
|
-
proposal.feeAssetPriceModifier,
|
|
708
|
-
l1ToL2Messages,
|
|
709
|
-
previousCheckpointOutHashes,
|
|
710
|
-
fork,
|
|
711
|
-
blocks,
|
|
712
|
-
this.log.getBindings(),
|
|
713
|
-
);
|
|
714
|
-
|
|
715
|
-
// Complete the checkpoint to get computed values
|
|
716
|
-
const computedCheckpoint = await checkpointBuilder.completeCheckpoint();
|
|
717
|
-
|
|
718
|
-
// Compare checkpoint header with proposal
|
|
719
|
-
if (!computedCheckpoint.header.equals(proposal.checkpointHeader)) {
|
|
720
|
-
this.log.warn(`Checkpoint header mismatch`, {
|
|
721
|
-
...proposalInfo,
|
|
722
|
-
computed: computedCheckpoint.header.toInspect(),
|
|
723
|
-
proposal: proposal.checkpointHeader.toInspect(),
|
|
724
|
-
});
|
|
725
|
-
return { isValid: false, reason: 'checkpoint_header_mismatch' };
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
// Compare archive root with proposal
|
|
729
|
-
if (!computedCheckpoint.archive.root.equals(proposal.archive)) {
|
|
730
|
-
this.log.warn(`Archive root mismatch`, {
|
|
731
|
-
...proposalInfo,
|
|
732
|
-
computed: computedCheckpoint.archive.root.toString(),
|
|
733
|
-
proposal: proposal.archive.toString(),
|
|
734
|
-
});
|
|
735
|
-
return { isValid: false, reason: 'archive_mismatch' };
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
// Check that the accumulated epoch out hash matches the value in the proposal.
|
|
739
|
-
// The epoch out hash is the accumulated hash of all checkpoint out hashes in the epoch.
|
|
740
|
-
const checkpointOutHash = computedCheckpoint.getCheckpointOutHash();
|
|
741
|
-
const computedEpochOutHash = accumulateCheckpointOutHashes([...previousCheckpointOutHashes, checkpointOutHash]);
|
|
742
|
-
const proposalEpochOutHash = proposal.checkpointHeader.epochOutHash;
|
|
743
|
-
if (!computedEpochOutHash.equals(proposalEpochOutHash)) {
|
|
744
|
-
this.log.warn(`Epoch out hash mismatch`, {
|
|
745
|
-
proposalEpochOutHash: proposalEpochOutHash.toString(),
|
|
746
|
-
computedEpochOutHash: computedEpochOutHash.toString(),
|
|
747
|
-
checkpointOutHash: checkpointOutHash.toString(),
|
|
748
|
-
previousCheckpointOutHashes: previousCheckpointOutHashes.map(h => h.toString()),
|
|
749
|
-
...proposalInfo,
|
|
750
|
-
});
|
|
751
|
-
return { isValid: false, reason: 'out_hash_mismatch' };
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
this.log.verbose(`Checkpoint proposal validation successful for slot ${slot}`, proposalInfo);
|
|
755
|
-
return { isValid: true };
|
|
756
|
-
} finally {
|
|
757
|
-
await fork.close();
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
/**
|
|
762
|
-
* Extract checkpoint global variables from a block.
|
|
763
|
-
*/
|
|
764
|
-
private extractCheckpointConstants(block: L2Block): CheckpointGlobalVariables {
|
|
765
|
-
const gv = block.header.globalVariables;
|
|
766
|
-
return {
|
|
767
|
-
chainId: gv.chainId,
|
|
768
|
-
version: gv.version,
|
|
769
|
-
slotNumber: gv.slotNumber,
|
|
770
|
-
timestamp: gv.timestamp,
|
|
771
|
-
coinbase: gv.coinbase,
|
|
772
|
-
feeRecipient: gv.feeRecipient,
|
|
773
|
-
gasFees: gv.gasFees,
|
|
774
|
-
};
|
|
775
|
-
}
|
|
776
|
-
|
|
777
623
|
/**
|
|
778
624
|
* Uploads blobs for a checkpoint to the filestore (fire and forget).
|
|
779
625
|
*/
|
|
@@ -922,7 +768,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
922
768
|
checkpointHeader: CheckpointHeader,
|
|
923
769
|
archive: Fr,
|
|
924
770
|
feeAssetPriceModifier: bigint,
|
|
925
|
-
|
|
771
|
+
lastBlockProposal: BlockProposal | undefined,
|
|
926
772
|
proposerAddress: EthAddress | undefined,
|
|
927
773
|
options: CheckpointProposalOptions = {},
|
|
928
774
|
): Promise<CheckpointProposal> {
|
|
@@ -944,7 +790,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
944
790
|
checkpointHeader,
|
|
945
791
|
archive,
|
|
946
792
|
feeAssetPriceModifier,
|
|
947
|
-
|
|
793
|
+
lastBlockProposal,
|
|
948
794
|
proposerAddress,
|
|
949
795
|
options,
|
|
950
796
|
);
|
|
@@ -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, 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 {};
|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