@aztec/validator-client 0.0.1-commit.f504929 → 0.0.1-commit.f650c0a5c
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 +97 -29
- 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 +5 -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 +2 -2
- package/dest/metrics.d.ts.map +1 -1
- 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 +11 -16
- package/dest/validator.d.ts.map +1 -1
- package/dest/validator.js +60 -220
- package/package.json +19 -19
- package/src/checkpoint_builder.ts +120 -34
- package/src/config.ts +22 -6
- package/src/duties/validation_service.ts +10 -23
- package/src/factory.ts +9 -4
- package/src/index.ts +1 -1
- package/src/key_store/ha_key_store.ts +1 -1
- package/src/metrics.ts +1 -1
- package/src/proposal_handler.ts +1033 -0
- package/src/validator.ts +80 -249
- 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.
|
|
@@ -101,14 +101,14 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
101
101
|
private keyStore: ExtendedValidatorKeyStore,
|
|
102
102
|
private epochCache: EpochCache,
|
|
103
103
|
private p2pClient: P2P,
|
|
104
|
-
private
|
|
104
|
+
private proposalHandler: ProposalHandler,
|
|
105
105
|
private blockSource: L2BlockSource,
|
|
106
106
|
private checkpointsBuilder: FullNodeCheckpointsBuilder,
|
|
107
107
|
private worldState: WorldStateSynchronizer,
|
|
108
108
|
private l1ToL2MessageSource: L1ToL2MessageSource,
|
|
109
109
|
private config: ValidatorClientFullConfig,
|
|
110
110
|
private blobClient: BlobClientInterface,
|
|
111
|
-
private
|
|
111
|
+
private slashingProtectionSigner: ValidatorHASigner,
|
|
112
112
|
private dateProvider: DateProvider = new DateProvider(),
|
|
113
113
|
telemetry: TelemetryClient = getTelemetryClient(),
|
|
114
114
|
log = createLogger('validator'),
|
|
@@ -196,13 +196,14 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
196
196
|
blobClient: BlobClientInterface,
|
|
197
197
|
dateProvider: DateProvider = new DateProvider(),
|
|
198
198
|
telemetry: TelemetryClient = getTelemetryClient(),
|
|
199
|
+
slashingProtectionDb?: SlashingProtectionDatabase,
|
|
199
200
|
) {
|
|
200
201
|
const metrics = new ValidatorMetrics(telemetry);
|
|
201
202
|
const blockProposalValidator = new BlockProposalValidator(epochCache, {
|
|
202
203
|
txsPermitted: !config.disableTransactions,
|
|
203
|
-
maxTxsPerBlock: config.
|
|
204
|
+
maxTxsPerBlock: config.validateMaxTxsPerBlock,
|
|
204
205
|
});
|
|
205
|
-
const
|
|
206
|
+
const proposalHandler = new ProposalHandler(
|
|
206
207
|
checkpointsBuilder,
|
|
207
208
|
worldState,
|
|
208
209
|
blockSource,
|
|
@@ -211,37 +212,53 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
211
212
|
blockProposalValidator,
|
|
212
213
|
epochCache,
|
|
213
214
|
config,
|
|
215
|
+
blobClient,
|
|
214
216
|
metrics,
|
|
215
217
|
dateProvider,
|
|
216
218
|
telemetry,
|
|
217
219
|
);
|
|
218
220
|
|
|
219
221
|
const nodeKeystoreAdapter = NodeKeystoreAdapter.fromKeyStoreManager(keyStoreManager);
|
|
220
|
-
let
|
|
221
|
-
|
|
222
|
-
|
|
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.
|
|
223
231
|
// If maxStuckDutiesAgeMs is not explicitly set, compute it from Aztec slot duration
|
|
224
232
|
const haConfig = {
|
|
225
233
|
...config,
|
|
226
234
|
maxStuckDutiesAgeMs: config.maxStuckDutiesAgeMs ?? epochCache.getL1Constants().slotDuration * 2 * 1000,
|
|
227
235
|
};
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
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
|
+
}));
|
|
231
247
|
}
|
|
248
|
+
const validatorKeyStore: ExtendedValidatorKeyStore = new HAKeyStore(nodeKeystoreAdapter, slashingProtectionSigner);
|
|
232
249
|
|
|
233
250
|
const validator = new ValidatorClient(
|
|
234
251
|
validatorKeyStore,
|
|
235
252
|
epochCache,
|
|
236
253
|
p2pClient,
|
|
237
|
-
|
|
254
|
+
proposalHandler,
|
|
238
255
|
blockSource,
|
|
239
256
|
checkpointsBuilder,
|
|
240
257
|
worldState,
|
|
241
258
|
l1ToL2MessageSource,
|
|
242
259
|
config,
|
|
243
260
|
blobClient,
|
|
244
|
-
|
|
261
|
+
slashingProtectionSigner,
|
|
245
262
|
dateProvider,
|
|
246
263
|
telemetry,
|
|
247
264
|
);
|
|
@@ -255,8 +272,8 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
255
272
|
.filter(addr => !this.config.disabledValidators.some(disabled => disabled.equals(addr)));
|
|
256
273
|
}
|
|
257
274
|
|
|
258
|
-
public
|
|
259
|
-
return this.
|
|
275
|
+
public getProposalHandler() {
|
|
276
|
+
return this.proposalHandler;
|
|
260
277
|
}
|
|
261
278
|
|
|
262
279
|
public signWithAddress(addr: EthAddress, msg: TypedDataDefinition, context: SigningContext) {
|
|
@@ -280,24 +297,8 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
280
297
|
}
|
|
281
298
|
|
|
282
299
|
public reloadKeystore(newManager: KeystoreManager): void {
|
|
283
|
-
if (this.config.haSigningEnabled && !this.haSigner) {
|
|
284
|
-
this.log.warn(
|
|
285
|
-
'HA signing is enabled in config but was not initialized at startup. ' +
|
|
286
|
-
'Restart the node to enable HA signing.',
|
|
287
|
-
);
|
|
288
|
-
} else if (!this.config.haSigningEnabled && this.haSigner) {
|
|
289
|
-
this.log.warn(
|
|
290
|
-
'HA signing was disabled via config update but the HA signer is still active. ' +
|
|
291
|
-
'Restart the node to fully disable HA signing.',
|
|
292
|
-
);
|
|
293
|
-
}
|
|
294
|
-
|
|
295
300
|
const newAdapter = NodeKeystoreAdapter.fromKeyStoreManager(newManager);
|
|
296
|
-
|
|
297
|
-
this.keyStore = new HAKeyStore(newAdapter, this.haSigner);
|
|
298
|
-
} else {
|
|
299
|
-
this.keyStore = newAdapter;
|
|
300
|
-
}
|
|
301
|
+
this.keyStore = new HAKeyStore(newAdapter, this.slashingProtectionSigner);
|
|
301
302
|
this.validationService = new ValidationService(this.keyStore, this.log.createChild('validation-service'));
|
|
302
303
|
}
|
|
303
304
|
|
|
@@ -345,7 +346,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
345
346
|
checkpoint: CheckpointProposalCore,
|
|
346
347
|
proposalSender: PeerId,
|
|
347
348
|
): Promise<CheckpointAttestation[] | undefined> => this.attestToCheckpointProposal(checkpoint, proposalSender);
|
|
348
|
-
this.p2pClient.
|
|
349
|
+
this.p2pClient.registerValidatorCheckpointProposalHandler(checkpointHandler);
|
|
349
350
|
|
|
350
351
|
// Duplicate proposal handler - triggers slashing for equivocation
|
|
351
352
|
this.p2pClient.registerDuplicateProposalCallback((info: DuplicateProposalInfo) => {
|
|
@@ -384,13 +385,12 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
384
385
|
return false;
|
|
385
386
|
}
|
|
386
387
|
|
|
387
|
-
//
|
|
388
|
+
// Log self-proposals from HA peers (same validator key on different nodes)
|
|
388
389
|
if (this.getValidatorAddresses().some(addr => addr.equals(proposer))) {
|
|
389
|
-
this.log.
|
|
390
|
+
this.log.verbose(`Processing block proposal from HA peer for slot ${slotNumber}`, {
|
|
390
391
|
proposer: proposer.toString(),
|
|
391
392
|
slotNumber,
|
|
392
393
|
});
|
|
393
|
-
return false;
|
|
394
394
|
}
|
|
395
395
|
|
|
396
396
|
// Check if we're in the committee (for metrics purposes)
|
|
@@ -406,25 +406,25 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
406
406
|
|
|
407
407
|
// Reexecute txs if we are part of the committee, or if slashing is enabled, or if we are configured to always reexecute.
|
|
408
408
|
// In fisherman mode, we always reexecute to validate proposals.
|
|
409
|
-
const {
|
|
410
|
-
this.config;
|
|
409
|
+
const { slashBroadcastedInvalidBlockPenalty, alwaysReexecuteBlockProposals, fishermanMode } = this.config;
|
|
411
410
|
const shouldReexecute =
|
|
412
411
|
fishermanMode ||
|
|
413
|
-
|
|
414
|
-
|
|
412
|
+
slashBroadcastedInvalidBlockPenalty > 0n ||
|
|
413
|
+
partOfCommittee ||
|
|
415
414
|
alwaysReexecuteBlockProposals ||
|
|
416
415
|
this.blobClient.canUpload();
|
|
417
416
|
|
|
418
|
-
const validationResult = await this.
|
|
417
|
+
const validationResult = await this.proposalHandler.handleBlockProposal(
|
|
419
418
|
proposal,
|
|
420
419
|
proposalSender,
|
|
421
420
|
!!shouldReexecute && !escapeHatchOpen,
|
|
422
421
|
);
|
|
423
422
|
|
|
424
423
|
if (!validationResult.isValid) {
|
|
425
|
-
this.log.warn(`Block proposal validation failed: ${validationResult.reason}`, proposalInfo);
|
|
426
|
-
|
|
427
424
|
const reason = validationResult.reason || 'unknown';
|
|
425
|
+
|
|
426
|
+
this.log.warn(`Block proposal validation failed: ${reason}`, proposalInfo);
|
|
427
|
+
|
|
428
428
|
// Classify failure reason: bad proposal vs node issue
|
|
429
429
|
const badProposalReasons: BlockProposalValidationFailureReason[] = [
|
|
430
430
|
'invalid_proposal',
|
|
@@ -479,70 +479,50 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
479
479
|
proposal: CheckpointProposalCore,
|
|
480
480
|
_proposalSender: PeerId,
|
|
481
481
|
): Promise<CheckpointAttestation[] | undefined> {
|
|
482
|
-
const
|
|
482
|
+
const proposalSlotNumber = proposal.slotNumber;
|
|
483
483
|
const proposer = proposal.getSender();
|
|
484
484
|
|
|
485
485
|
// If escape hatch is open for this slot's epoch, do not attest.
|
|
486
|
-
if (await this.epochCache.isEscapeHatchOpenAtSlot(
|
|
487
|
-
this.log.warn(`Escape hatch open for slot ${
|
|
488
|
-
return undefined;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
// Reject proposals with invalid signatures
|
|
492
|
-
if (!proposer) {
|
|
493
|
-
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`);
|
|
494
488
|
return undefined;
|
|
495
489
|
}
|
|
496
490
|
|
|
497
491
|
// Ignore proposals from ourselves (may happen in HA setups)
|
|
498
|
-
if (this.getValidatorAddresses().some(addr => addr.equals(proposer))) {
|
|
499
|
-
this.log.
|
|
492
|
+
if (proposer && this.getValidatorAddresses().some(addr => addr.equals(proposer))) {
|
|
493
|
+
this.log.debug(`Ignoring block proposal from self for slot ${proposalSlotNumber}`, {
|
|
500
494
|
proposer: proposer.toString(),
|
|
501
|
-
|
|
495
|
+
proposalSlotNumber,
|
|
502
496
|
});
|
|
503
497
|
return undefined;
|
|
504
498
|
}
|
|
505
499
|
|
|
506
|
-
//
|
|
507
|
-
|
|
508
|
-
this.log.warn(
|
|
509
|
-
`Received checkpoint proposal with invalid feeAssetPriceModifier ${proposal.feeAssetPriceModifier} for slot ${slotNumber}`,
|
|
510
|
-
);
|
|
511
|
-
return undefined;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
// Check that I have any address in current committee before attesting
|
|
515
|
-
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());
|
|
516
502
|
const partOfCommittee = inCommittee.length > 0;
|
|
517
503
|
|
|
518
504
|
const proposalInfo = {
|
|
519
|
-
|
|
505
|
+
proposalSlotNumber,
|
|
520
506
|
archive: proposal.archive.toString(),
|
|
521
|
-
proposer: proposer
|
|
522
|
-
txCount: proposal.txHashes.length,
|
|
507
|
+
proposer: proposer?.toString(),
|
|
523
508
|
};
|
|
524
|
-
this.log.info(`Received checkpoint proposal for slot ${
|
|
509
|
+
this.log.info(`Received checkpoint proposal for slot ${proposalSlotNumber}`, {
|
|
525
510
|
...proposalInfo,
|
|
526
|
-
txHashes: proposal.txHashes.map(t => t.toString()),
|
|
527
511
|
fishermanMode: this.config.fishermanMode || false,
|
|
528
512
|
});
|
|
529
513
|
|
|
530
|
-
// 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).
|
|
531
516
|
if (this.config.skipCheckpointProposalValidation) {
|
|
532
|
-
this.log.warn(`Skipping checkpoint proposal validation for slot ${
|
|
517
|
+
this.log.warn(`Skipping checkpoint proposal validation for slot ${proposalSlotNumber}`, proposalInfo);
|
|
533
518
|
} else {
|
|
534
|
-
const validationResult = await this.
|
|
519
|
+
const validationResult = await this.proposalHandler.handleCheckpointProposal(proposal, proposalInfo);
|
|
535
520
|
if (!validationResult.isValid) {
|
|
536
521
|
this.log.warn(`Checkpoint proposal validation failed: ${validationResult.reason}`, proposalInfo);
|
|
537
522
|
return undefined;
|
|
538
523
|
}
|
|
539
524
|
}
|
|
540
525
|
|
|
541
|
-
// Upload blobs to filestore if we can (fire and forget)
|
|
542
|
-
if (this.blobClient.canUpload()) {
|
|
543
|
-
void this.uploadBlobsForCheckpoint(proposal, proposalInfo);
|
|
544
|
-
}
|
|
545
|
-
|
|
546
526
|
// Check that I have any address in current committee before attesting
|
|
547
527
|
// In fisherman mode, we still create attestations for validation even if not in committee
|
|
548
528
|
if (!partOfCommittee && !this.config.fishermanMode) {
|
|
@@ -551,16 +531,19 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
551
531
|
}
|
|
552
532
|
|
|
553
533
|
// Provided all of the above checks pass, we can attest to the proposal
|
|
554
|
-
this.log.info(
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
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
|
+
);
|
|
559
542
|
|
|
560
543
|
this.metrics.incSuccessfulAttestations(inCommittee.length);
|
|
561
544
|
|
|
562
545
|
// Track epoch participation per attester: count each (attester, epoch) pair at most once
|
|
563
|
-
const proposalEpoch = getEpochAtSlot(
|
|
546
|
+
const proposalEpoch = getEpochAtSlot(proposalSlotNumber, this.epochCache.getL1Constants());
|
|
564
547
|
for (const attester of inCommittee) {
|
|
565
548
|
const key = attester.toString();
|
|
566
549
|
const lastEpoch = this.lastAttestedEpochByAttester.get(key);
|
|
@@ -588,7 +571,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
588
571
|
|
|
589
572
|
if (this.config.fishermanMode) {
|
|
590
573
|
// bail out early and don't save attestations to the pool in fisherman mode
|
|
591
|
-
this.log.info(`Creating checkpoint attestations for slot ${
|
|
574
|
+
this.log.info(`Creating checkpoint attestations for slot ${proposalSlotNumber}`, {
|
|
592
575
|
...proposalInfo,
|
|
593
576
|
attestors: attestors.map(a => a.toString()),
|
|
594
577
|
});
|
|
@@ -637,158 +620,6 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
637
620
|
return attestations;
|
|
638
621
|
}
|
|
639
622
|
|
|
640
|
-
/**
|
|
641
|
-
* Validates a checkpoint proposal by building the full checkpoint and comparing it with the proposal.
|
|
642
|
-
* @returns Validation result with isValid flag and reason if invalid.
|
|
643
|
-
*/
|
|
644
|
-
private async validateCheckpointProposal(
|
|
645
|
-
proposal: CheckpointProposalCore,
|
|
646
|
-
proposalInfo: LogData,
|
|
647
|
-
): Promise<{ isValid: true } | { isValid: false; reason: string }> {
|
|
648
|
-
const slot = proposal.slotNumber;
|
|
649
|
-
|
|
650
|
-
// Timeout block syncing at the start of the next slot
|
|
651
|
-
const config = this.checkpointsBuilder.getConfig();
|
|
652
|
-
const nextSlotTimestampSeconds = Number(getTimestampForSlot(SlotNumber(slot + 1), config));
|
|
653
|
-
const timeoutSeconds = Math.max(1, nextSlotTimestampSeconds - Math.floor(this.dateProvider.now() / 1000));
|
|
654
|
-
|
|
655
|
-
// Wait for last block to sync by archive
|
|
656
|
-
let lastBlockHeader: BlockHeader | undefined;
|
|
657
|
-
try {
|
|
658
|
-
lastBlockHeader = await retryUntil(
|
|
659
|
-
async () => {
|
|
660
|
-
await this.blockSource.syncImmediate();
|
|
661
|
-
return this.blockSource.getBlockHeaderByArchive(proposal.archive);
|
|
662
|
-
},
|
|
663
|
-
`waiting for block with archive ${proposal.archive.toString()} for slot ${slot}`,
|
|
664
|
-
timeoutSeconds,
|
|
665
|
-
0.5,
|
|
666
|
-
);
|
|
667
|
-
} catch (err) {
|
|
668
|
-
if (err instanceof TimeoutError) {
|
|
669
|
-
this.log.warn(`Timed out waiting for block with archive matching checkpoint proposal`, proposalInfo);
|
|
670
|
-
return { isValid: false, reason: 'last_block_not_found' };
|
|
671
|
-
}
|
|
672
|
-
this.log.error(`Error fetching last block for checkpoint proposal`, err, proposalInfo);
|
|
673
|
-
return { isValid: false, reason: 'block_fetch_error' };
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
if (!lastBlockHeader) {
|
|
677
|
-
this.log.warn(`Last block not found for checkpoint proposal`, proposalInfo);
|
|
678
|
-
return { isValid: false, reason: 'last_block_not_found' };
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
// Get all full blocks for the slot and checkpoint
|
|
682
|
-
const blocks = await this.blockSource.getBlocksForSlot(slot);
|
|
683
|
-
if (blocks.length === 0) {
|
|
684
|
-
this.log.warn(`No blocks found for slot ${slot}`, proposalInfo);
|
|
685
|
-
return { isValid: false, reason: 'no_blocks_for_slot' };
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
// Ensure the last block for this slot matches the archive in the checkpoint proposal
|
|
689
|
-
if (!blocks.at(-1)?.archive.root.equals(proposal.archive)) {
|
|
690
|
-
this.log.warn(`Last block archive mismatch for checkpoint proposal`, proposalInfo);
|
|
691
|
-
return { isValid: false, reason: 'last_block_archive_mismatch' };
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
this.log.debug(`Found ${blocks.length} blocks for slot ${slot}`, {
|
|
695
|
-
...proposalInfo,
|
|
696
|
-
blockNumbers: blocks.map(b => b.number),
|
|
697
|
-
});
|
|
698
|
-
|
|
699
|
-
// Get checkpoint constants from first block
|
|
700
|
-
const firstBlock = blocks[0];
|
|
701
|
-
const constants = this.extractCheckpointConstants(firstBlock);
|
|
702
|
-
const checkpointNumber = firstBlock.checkpointNumber;
|
|
703
|
-
|
|
704
|
-
// Get L1-to-L2 messages for this checkpoint
|
|
705
|
-
const l1ToL2Messages = await this.l1ToL2MessageSource.getL1ToL2Messages(checkpointNumber);
|
|
706
|
-
|
|
707
|
-
// Collect the out hashes of all the checkpoints before this one in the same epoch
|
|
708
|
-
const epoch = getEpochAtSlot(slot, this.epochCache.getL1Constants());
|
|
709
|
-
const previousCheckpointOutHashes = (await this.blockSource.getCheckpointsDataForEpoch(epoch))
|
|
710
|
-
.filter(c => c.checkpointNumber < checkpointNumber)
|
|
711
|
-
.map(c => c.checkpointOutHash);
|
|
712
|
-
|
|
713
|
-
// Fork world state at the block before the first block
|
|
714
|
-
const parentBlockNumber = BlockNumber(firstBlock.number - 1);
|
|
715
|
-
const fork = await this.worldState.fork(parentBlockNumber);
|
|
716
|
-
|
|
717
|
-
try {
|
|
718
|
-
// Create checkpoint builder with all existing blocks
|
|
719
|
-
const checkpointBuilder = await this.checkpointsBuilder.openCheckpoint(
|
|
720
|
-
checkpointNumber,
|
|
721
|
-
constants,
|
|
722
|
-
proposal.feeAssetPriceModifier,
|
|
723
|
-
l1ToL2Messages,
|
|
724
|
-
previousCheckpointOutHashes,
|
|
725
|
-
fork,
|
|
726
|
-
blocks,
|
|
727
|
-
this.log.getBindings(),
|
|
728
|
-
);
|
|
729
|
-
|
|
730
|
-
// Complete the checkpoint to get computed values
|
|
731
|
-
const computedCheckpoint = await checkpointBuilder.completeCheckpoint();
|
|
732
|
-
|
|
733
|
-
// Compare checkpoint header with proposal
|
|
734
|
-
if (!computedCheckpoint.header.equals(proposal.checkpointHeader)) {
|
|
735
|
-
this.log.warn(`Checkpoint header mismatch`, {
|
|
736
|
-
...proposalInfo,
|
|
737
|
-
computed: computedCheckpoint.header.toInspect(),
|
|
738
|
-
proposal: proposal.checkpointHeader.toInspect(),
|
|
739
|
-
});
|
|
740
|
-
return { isValid: false, reason: 'checkpoint_header_mismatch' };
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
// Compare archive root with proposal
|
|
744
|
-
if (!computedCheckpoint.archive.root.equals(proposal.archive)) {
|
|
745
|
-
this.log.warn(`Archive root mismatch`, {
|
|
746
|
-
...proposalInfo,
|
|
747
|
-
computed: computedCheckpoint.archive.root.toString(),
|
|
748
|
-
proposal: proposal.archive.toString(),
|
|
749
|
-
});
|
|
750
|
-
return { isValid: false, reason: 'archive_mismatch' };
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
// Check that the accumulated epoch out hash matches the value in the proposal.
|
|
754
|
-
// The epoch out hash is the accumulated hash of all checkpoint out hashes in the epoch.
|
|
755
|
-
const checkpointOutHash = computedCheckpoint.getCheckpointOutHash();
|
|
756
|
-
const computedEpochOutHash = accumulateCheckpointOutHashes([...previousCheckpointOutHashes, checkpointOutHash]);
|
|
757
|
-
const proposalEpochOutHash = proposal.checkpointHeader.epochOutHash;
|
|
758
|
-
if (!computedEpochOutHash.equals(proposalEpochOutHash)) {
|
|
759
|
-
this.log.warn(`Epoch out hash mismatch`, {
|
|
760
|
-
proposalEpochOutHash: proposalEpochOutHash.toString(),
|
|
761
|
-
computedEpochOutHash: computedEpochOutHash.toString(),
|
|
762
|
-
checkpointOutHash: checkpointOutHash.toString(),
|
|
763
|
-
previousCheckpointOutHashes: previousCheckpointOutHashes.map(h => h.toString()),
|
|
764
|
-
...proposalInfo,
|
|
765
|
-
});
|
|
766
|
-
return { isValid: false, reason: 'out_hash_mismatch' };
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
this.log.verbose(`Checkpoint proposal validation successful for slot ${slot}`, proposalInfo);
|
|
770
|
-
return { isValid: true };
|
|
771
|
-
} finally {
|
|
772
|
-
await fork.close();
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
/**
|
|
777
|
-
* Extract checkpoint global variables from a block.
|
|
778
|
-
*/
|
|
779
|
-
private extractCheckpointConstants(block: L2Block): CheckpointGlobalVariables {
|
|
780
|
-
const gv = block.header.globalVariables;
|
|
781
|
-
return {
|
|
782
|
-
chainId: gv.chainId,
|
|
783
|
-
version: gv.version,
|
|
784
|
-
slotNumber: gv.slotNumber,
|
|
785
|
-
timestamp: gv.timestamp,
|
|
786
|
-
coinbase: gv.coinbase,
|
|
787
|
-
feeRecipient: gv.feeRecipient,
|
|
788
|
-
gasFees: gv.gasFees,
|
|
789
|
-
};
|
|
790
|
-
}
|
|
791
|
-
|
|
792
623
|
/**
|
|
793
624
|
* Uploads blobs for a checkpoint to the filestore (fire and forget).
|
|
794
625
|
*/
|
|
@@ -937,7 +768,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
937
768
|
checkpointHeader: CheckpointHeader,
|
|
938
769
|
archive: Fr,
|
|
939
770
|
feeAssetPriceModifier: bigint,
|
|
940
|
-
|
|
771
|
+
lastBlockProposal: BlockProposal | undefined,
|
|
941
772
|
proposerAddress: EthAddress | undefined,
|
|
942
773
|
options: CheckpointProposalOptions = {},
|
|
943
774
|
): Promise<CheckpointProposal> {
|
|
@@ -959,7 +790,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
959
790
|
checkpointHeader,
|
|
960
791
|
archive,
|
|
961
792
|
feeAssetPriceModifier,
|
|
962
|
-
|
|
793
|
+
lastBlockProposal,
|
|
963
794
|
proposerAddress,
|
|
964
795
|
options,
|
|
965
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 {};
|
|
63
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxvY2tfcHJvcG9zYWxfaGFuZGxlci5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2Jsb2NrX3Byb3Bvc2FsX2hhbmRsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDckQsT0FBTyxFQUFFLFdBQVcsRUFBRSxnQkFBZ0IsRUFBYyxNQUFNLGlDQUFpQyxDQUFDO0FBQzVGLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUlwRCxPQUFPLEVBQUUsWUFBWSxFQUFTLE1BQU0seUJBQXlCLENBQUM7QUFDOUQsT0FBTyxLQUFLLEVBQUUsR0FBRyxFQUFFLE1BQU0sRUFBRSxNQUFNLFlBQVksQ0FBQztBQUM5QyxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUNuRSxPQUFPLEtBQUssRUFBYSxPQUFPLEVBQUUsV0FBVyxFQUFFLGFBQWEsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBRTFGLE9BQU8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