@aztec/validator-client 0.0.1-commit.10bd49492 → 0.0.1-commit.11bf3dd6e

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/src/validator.ts CHANGED
@@ -1,20 +1,11 @@
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
- import {
6
- BlockNumber,
7
- CheckpointNumber,
8
- EpochNumber,
9
- IndexWithinCheckpoint,
10
- SlotNumber,
11
- } from '@aztec/foundation/branded-types';
4
+ import { CheckpointNumber, EpochNumber, IndexWithinCheckpoint, SlotNumber } from '@aztec/foundation/branded-types';
12
5
  import { Fr } from '@aztec/foundation/curves/bn254';
13
- import { TimeoutError } from '@aztec/foundation/error';
14
6
  import type { EthAddress } from '@aztec/foundation/eth-address';
15
7
  import type { Signature } from '@aztec/foundation/eth-signature';
16
8
  import { type LogData, type Logger, createLogger } from '@aztec/foundation/log';
17
- import { retryUntil } from '@aztec/foundation/retry';
18
9
  import { RunningPromise } from '@aztec/foundation/running-promise';
19
10
  import { sleep } from '@aztec/foundation/sleep';
20
11
  import { DateProvider } from '@aztec/foundation/timer';
@@ -23,17 +14,15 @@ import type { DuplicateAttestationInfo, DuplicateProposalInfo, P2P, PeerId } fro
23
14
  import { AuthRequest, AuthResponse, BlockProposalValidator, ReqRespSubProtocol } from '@aztec/p2p';
24
15
  import { OffenseType, WANT_TO_SLASH_EVENT, type Watcher, type WatcherEmitter } from '@aztec/slasher';
25
16
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
26
- import type { CommitteeAttestationsAndSigners, L2Block, L2BlockSink, L2BlockSource } from '@aztec/stdlib/block';
27
- import { validateCheckpoint } from '@aztec/stdlib/checkpoint';
28
- import { getEpochAtSlot, getTimestampForSlot } from '@aztec/stdlib/epoch-helpers';
17
+ import type { CommitteeAttestationsAndSigners, L2BlockSink, L2BlockSource } from '@aztec/stdlib/block';
18
+ import { getEpochAtSlot } from '@aztec/stdlib/epoch-helpers';
29
19
  import type {
30
- CreateCheckpointProposalLastBlockData,
31
20
  ITxProvider,
32
21
  Validator,
33
22
  ValidatorClientFullConfig,
34
23
  WorldStateSynchronizer,
35
24
  } from '@aztec/stdlib/interfaces/server';
36
- import { type L1ToL2MessageSource, accumulateCheckpointOutHashes } from '@aztec/stdlib/messaging';
25
+ import type { L1ToL2MessageSource } from '@aztec/stdlib/messaging';
37
26
  import {
38
27
  type BlockProposal,
39
28
  type BlockProposalOptions,
@@ -43,23 +32,27 @@ import {
43
32
  type CheckpointProposalOptions,
44
33
  } from '@aztec/stdlib/p2p';
45
34
  import type { CheckpointHeader } from '@aztec/stdlib/rollup';
46
- import type { BlockHeader, CheckpointGlobalVariables, Tx } from '@aztec/stdlib/tx';
35
+ import type { BlockHeader, Tx } from '@aztec/stdlib/tx';
47
36
  import { AttestationTimeoutError } from '@aztec/stdlib/validators';
48
37
  import { type TelemetryClient, type Tracer, getTelemetryClient } from '@aztec/telemetry-client';
49
- import { createHASigner, createLocalSignerWithProtection } from '@aztec/validator-ha-signer/factory';
50
- import { DutyType, type SigningContext } from '@aztec/validator-ha-signer/types';
38
+ import {
39
+ createHASigner,
40
+ createLocalSignerWithProtection,
41
+ createSignerFromSharedDb,
42
+ } from '@aztec/validator-ha-signer/factory';
43
+ import { DutyType, type SigningContext, type SlashingProtectionDatabase } from '@aztec/validator-ha-signer/types';
51
44
  import type { ValidatorHASigner } from '@aztec/validator-ha-signer/validator-ha-signer';
52
45
 
53
46
  import { EventEmitter } from 'events';
54
47
  import type { TypedDataDefinition } from 'viem';
55
48
 
56
- import { BlockProposalHandler, type BlockProposalValidationFailureReason } from './block_proposal_handler.js';
57
49
  import type { FullNodeCheckpointsBuilder } from './checkpoint_builder.js';
58
50
  import { ValidationService } from './duties/validation_service.js';
59
51
  import { HAKeyStore } from './key_store/ha_key_store.js';
60
52
  import type { ExtendedValidatorKeyStore } from './key_store/interface.js';
61
53
  import { NodeKeystoreAdapter } from './key_store/node_keystore_adapter.js';
62
54
  import { ValidatorMetrics } from './metrics.js';
55
+ import { type BlockProposalValidationFailureReason, ProposalHandler } from './proposal_handler.js';
63
56
 
64
57
  // We maintain a set of proposers who have proposed invalid blocks.
65
58
  // Just cap the set to avoid unbounded growth.
@@ -102,7 +95,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
102
95
  private keyStore: ExtendedValidatorKeyStore,
103
96
  private epochCache: EpochCache,
104
97
  private p2pClient: P2P,
105
- private blockProposalHandler: BlockProposalHandler,
98
+ private proposalHandler: ProposalHandler,
106
99
  private blockSource: L2BlockSource,
107
100
  private checkpointsBuilder: FullNodeCheckpointsBuilder,
108
101
  private worldState: WorldStateSynchronizer,
@@ -197,13 +190,14 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
197
190
  blobClient: BlobClientInterface,
198
191
  dateProvider: DateProvider = new DateProvider(),
199
192
  telemetry: TelemetryClient = getTelemetryClient(),
193
+ slashingProtectionDb?: SlashingProtectionDatabase,
200
194
  ) {
201
195
  const metrics = new ValidatorMetrics(telemetry);
202
196
  const blockProposalValidator = new BlockProposalValidator(epochCache, {
203
197
  txsPermitted: !config.disableTransactions,
204
198
  maxTxsPerBlock: config.validateMaxTxsPerBlock,
205
199
  });
206
- const blockProposalHandler = new BlockProposalHandler(
200
+ const proposalHandler = new ProposalHandler(
207
201
  checkpointsBuilder,
208
202
  worldState,
209
203
  blockSource,
@@ -212,14 +206,22 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
212
206
  blockProposalValidator,
213
207
  epochCache,
214
208
  config,
209
+ blobClient,
215
210
  metrics,
216
211
  dateProvider,
217
212
  telemetry,
213
+ undefined,
218
214
  );
219
215
 
220
216
  const nodeKeystoreAdapter = NodeKeystoreAdapter.fromKeyStoreManager(keyStoreManager);
221
217
  let slashingProtectionSigner: ValidatorHASigner;
222
- if (config.haSigningEnabled) {
218
+ if (slashingProtectionDb) {
219
+ // Shared database mode: use a pre-existing database (e.g. for testing HA setups).
220
+ ({ signer: slashingProtectionSigner } = createSignerFromSharedDb(slashingProtectionDb, config, {
221
+ telemetryClient: telemetry,
222
+ dateProvider,
223
+ }));
224
+ } else if (config.haSigningEnabled) {
223
225
  // Multi-node HA mode: use PostgreSQL-backed distributed locking.
224
226
  // If maxStuckDutiesAgeMs is not explicitly set, compute it from Aztec slot duration
225
227
  const haConfig = {
@@ -244,7 +246,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
244
246
  validatorKeyStore,
245
247
  epochCache,
246
248
  p2pClient,
247
- blockProposalHandler,
249
+ proposalHandler,
248
250
  blockSource,
249
251
  checkpointsBuilder,
250
252
  worldState,
@@ -265,8 +267,8 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
265
267
  .filter(addr => !this.config.disabledValidators.some(disabled => disabled.equals(addr)));
266
268
  }
267
269
 
268
- public getBlockProposalHandler() {
269
- return this.blockProposalHandler;
270
+ public getProposalHandler() {
271
+ return this.proposalHandler;
270
272
  }
271
273
 
272
274
  public signWithAddress(addr: EthAddress, msg: TypedDataDefinition, context: SigningContext) {
@@ -339,7 +341,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
339
341
  checkpoint: CheckpointProposalCore,
340
342
  proposalSender: PeerId,
341
343
  ): Promise<CheckpointAttestation[] | undefined> => this.attestToCheckpointProposal(checkpoint, proposalSender);
342
- this.p2pClient.registerCheckpointProposalHandler(checkpointHandler);
344
+ this.p2pClient.registerValidatorCheckpointProposalHandler(checkpointHandler);
343
345
 
344
346
  // Duplicate proposal handler - triggers slashing for equivocation
345
347
  this.p2pClient.registerDuplicateProposalCallback((info: DuplicateProposalInfo) => {
@@ -378,13 +380,12 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
378
380
  return false;
379
381
  }
380
382
 
381
- // Ignore proposals from ourselves (may happen in HA setups)
383
+ // Log self-proposals from HA peers (same validator key on different nodes)
382
384
  if (this.getValidatorAddresses().some(addr => addr.equals(proposer))) {
383
- this.log.debug(`Ignoring block proposal from self for slot ${slotNumber}`, {
385
+ this.log.verbose(`Processing block proposal from HA peer for slot ${slotNumber}`, {
384
386
  proposer: proposer.toString(),
385
387
  slotNumber,
386
388
  });
387
- return false;
388
389
  }
389
390
 
390
391
  // Check if we're in the committee (for metrics purposes)
@@ -400,16 +401,15 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
400
401
 
401
402
  // Reexecute txs if we are part of the committee, or if slashing is enabled, or if we are configured to always reexecute.
402
403
  // In fisherman mode, we always reexecute to validate proposals.
403
- const { validatorReexecute, slashBroadcastedInvalidBlockPenalty, alwaysReexecuteBlockProposals, fishermanMode } =
404
- this.config;
404
+ const { slashBroadcastedInvalidBlockPenalty, alwaysReexecuteBlockProposals, fishermanMode } = this.config;
405
405
  const shouldReexecute =
406
406
  fishermanMode ||
407
- (slashBroadcastedInvalidBlockPenalty > 0n && validatorReexecute) ||
408
- (partOfCommittee && validatorReexecute) ||
407
+ slashBroadcastedInvalidBlockPenalty > 0n ||
408
+ partOfCommittee ||
409
409
  alwaysReexecuteBlockProposals ||
410
410
  this.blobClient.canUpload();
411
411
 
412
- const validationResult = await this.blockProposalHandler.handleBlockProposal(
412
+ const validationResult = await this.proposalHandler.handleBlockProposal(
413
413
  proposal,
414
414
  proposalSender,
415
415
  !!shouldReexecute && !escapeHatchOpen,
@@ -474,66 +474,51 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
474
474
  proposal: CheckpointProposalCore,
475
475
  _proposalSender: PeerId,
476
476
  ): Promise<CheckpointAttestation[] | undefined> {
477
- const slotNumber = proposal.slotNumber;
477
+ const proposalSlotNumber = proposal.slotNumber;
478
478
  const proposer = proposal.getSender();
479
479
 
480
480
  // If escape hatch is open for this slot's epoch, do not attest.
481
- if (await this.epochCache.isEscapeHatchOpenAtSlot(slotNumber)) {
482
- this.log.warn(`Escape hatch open for slot ${slotNumber}, skipping checkpoint attestation handling`);
483
- return undefined;
484
- }
485
-
486
- // Reject proposals with invalid signatures
487
- if (!proposer) {
488
- this.log.warn(`Received checkpoint proposal with invalid signature for slot ${slotNumber}`);
481
+ if (await this.epochCache.isEscapeHatchOpenAtSlot(proposalSlotNumber)) {
482
+ this.log.warn(`Escape hatch open for slot ${proposalSlotNumber}, skipping checkpoint attestation handling`);
489
483
  return undefined;
490
484
  }
491
485
 
492
486
  // Ignore proposals from ourselves (may happen in HA setups)
493
- if (this.getValidatorAddresses().some(addr => addr.equals(proposer))) {
494
- this.log.debug(`Ignoring block proposal from self for slot ${slotNumber}`, {
487
+ if (proposer && this.getValidatorAddresses().some(addr => addr.equals(proposer))) {
488
+ this.log.debug(`Ignoring block proposal from self for slot ${proposalSlotNumber}`, {
495
489
  proposer: proposer.toString(),
496
- slotNumber,
490
+ proposalSlotNumber,
497
491
  });
498
492
  return undefined;
499
493
  }
500
494
 
501
- // Validate fee asset price modifier is within allowed range
502
- if (!validateFeeAssetPriceModifier(proposal.feeAssetPriceModifier)) {
503
- this.log.warn(
504
- `Received checkpoint proposal with invalid feeAssetPriceModifier ${proposal.feeAssetPriceModifier} for slot ${slotNumber}`,
505
- );
506
- return undefined;
507
- }
508
-
509
- // Check that I have any address in current committee before attesting
510
- const inCommittee = await this.epochCache.filterInCommittee(slotNumber, this.getValidatorAddresses());
495
+ // Check that I have any address in the committee where this checkpoint will land before attesting
496
+ const inCommittee = await this.epochCache.filterInCommittee(proposalSlotNumber, this.getValidatorAddresses());
511
497
  const partOfCommittee = inCommittee.length > 0;
512
498
 
513
499
  const proposalInfo = {
514
- slotNumber,
500
+ proposalSlotNumber,
515
501
  archive: proposal.archive.toString(),
516
- proposer: proposer.toString(),
502
+ proposer: proposer?.toString(),
517
503
  };
518
- this.log.info(`Received checkpoint proposal for slot ${slotNumber}`, {
504
+ this.log.info(`Received checkpoint proposal for slot ${proposalSlotNumber}`, {
519
505
  ...proposalInfo,
520
506
  fishermanMode: this.config.fishermanMode || false,
521
507
  });
522
508
 
523
- // Validate the checkpoint proposal before attesting (unless skipCheckpointProposalValidation is set)
509
+ // Validate the checkpoint proposal before attesting (unless skipCheckpointProposalValidation is set).
510
+ // Uses the cached result from the all-nodes callback if available (avoids double validation).
511
+ let checkpointNumber: CheckpointNumber;
524
512
  if (this.config.skipCheckpointProposalValidation) {
525
- this.log.warn(`Skipping checkpoint proposal validation for slot ${slotNumber}`, proposalInfo);
513
+ this.log.warn(`Skipping checkpoint proposal validation for slot ${proposalSlotNumber}`, proposalInfo);
514
+ checkpointNumber = CheckpointNumber(0);
526
515
  } else {
527
- const validationResult = await this.validateCheckpointProposal(proposal, proposalInfo);
516
+ const validationResult = await this.proposalHandler.handleCheckpointProposal(proposal, proposalInfo);
528
517
  if (!validationResult.isValid) {
529
518
  this.log.warn(`Checkpoint proposal validation failed: ${validationResult.reason}`, proposalInfo);
530
519
  return undefined;
531
520
  }
532
- }
533
-
534
- // Upload blobs to filestore if we can (fire and forget)
535
- if (this.blobClient.canUpload()) {
536
- void this.uploadBlobsForCheckpoint(proposal, proposalInfo);
521
+ checkpointNumber = validationResult.checkpointNumber;
537
522
  }
538
523
 
539
524
  // Check that I have any address in current committee before attesting
@@ -544,16 +529,19 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
544
529
  }
545
530
 
546
531
  // Provided all of the above checks pass, we can attest to the proposal
547
- this.log.info(`${partOfCommittee ? 'Attesting to' : 'Validated'} checkpoint proposal for slot ${slotNumber}`, {
548
- ...proposalInfo,
549
- inCommittee: partOfCommittee,
550
- fishermanMode: this.config.fishermanMode || false,
551
- });
532
+ this.log.info(
533
+ `${partOfCommittee ? 'Attesting to' : 'Validated'} checkpoint proposal for slot ${proposalSlotNumber}`,
534
+ {
535
+ ...proposalInfo,
536
+ inCommittee: partOfCommittee,
537
+ fishermanMode: this.config.fishermanMode || false,
538
+ },
539
+ );
552
540
 
553
541
  this.metrics.incSuccessfulAttestations(inCommittee.length);
554
542
 
555
543
  // Track epoch participation per attester: count each (attester, epoch) pair at most once
556
- const proposalEpoch = getEpochAtSlot(slotNumber, this.epochCache.getL1Constants());
544
+ const proposalEpoch = getEpochAtSlot(proposalSlotNumber, this.epochCache.getL1Constants());
557
545
  for (const attester of inCommittee) {
558
546
  const key = attester.toString();
559
547
  const lastEpoch = this.lastAttestedEpochByAttester.get(key);
@@ -581,14 +569,14 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
581
569
 
582
570
  if (this.config.fishermanMode) {
583
571
  // bail out early and don't save attestations to the pool in fisherman mode
584
- this.log.info(`Creating checkpoint attestations for slot ${slotNumber}`, {
572
+ this.log.info(`Creating checkpoint attestations for slot ${proposalSlotNumber}`, {
585
573
  ...proposalInfo,
586
574
  attestors: attestors.map(a => a.toString()),
587
575
  });
588
576
  return undefined;
589
577
  }
590
578
 
591
- return await this.createCheckpointAttestationsFromProposal(proposal, attestors);
579
+ return await this.createCheckpointAttestationsFromProposal(proposal, attestors, checkpointNumber);
592
580
  }
593
581
 
594
582
  /**
@@ -615,13 +603,14 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
615
603
  private async createCheckpointAttestationsFromProposal(
616
604
  proposal: CheckpointProposalCore,
617
605
  attestors: EthAddress[] = [],
606
+ checkpointNumber: CheckpointNumber,
618
607
  ): Promise<CheckpointAttestation[] | undefined> {
619
608
  // Equivocation check: must happen right before signing to minimize the race window
620
609
  if (!this.shouldAttestToSlot(proposal.slotNumber)) {
621
610
  return undefined;
622
611
  }
623
612
 
624
- const attestations = await this.validationService.attestToCheckpointProposal(proposal, attestors);
613
+ const attestations = await this.validationService.attestToCheckpointProposal(proposal, attestors, checkpointNumber);
625
614
 
626
615
  // Track the proposal we attested to (to prevent equivocation)
627
616
  this.lastAttestedProposal = proposal;
@@ -630,172 +619,6 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
630
619
  return attestations;
631
620
  }
632
621
 
633
- /**
634
- * Validates a checkpoint proposal by building the full checkpoint and comparing it with the proposal.
635
- * @returns Validation result with isValid flag and reason if invalid.
636
- */
637
- private async validateCheckpointProposal(
638
- proposal: CheckpointProposalCore,
639
- proposalInfo: LogData,
640
- ): Promise<{ isValid: true } | { isValid: false; reason: string }> {
641
- const slot = proposal.slotNumber;
642
-
643
- // Timeout block syncing at the start of the next slot
644
- const config = this.checkpointsBuilder.getConfig();
645
- const nextSlotTimestampSeconds = Number(getTimestampForSlot(SlotNumber(slot + 1), config));
646
- const timeoutSeconds = Math.max(1, nextSlotTimestampSeconds - Math.floor(this.dateProvider.now() / 1000));
647
-
648
- // Wait for last block to sync by archive
649
- let lastBlockHeader: BlockHeader | undefined;
650
- try {
651
- lastBlockHeader = await retryUntil(
652
- async () => {
653
- await this.blockSource.syncImmediate();
654
- return this.blockSource.getBlockHeaderByArchive(proposal.archive);
655
- },
656
- `waiting for block with archive ${proposal.archive.toString()} for slot ${slot}`,
657
- timeoutSeconds,
658
- 0.5,
659
- );
660
- } catch (err) {
661
- if (err instanceof TimeoutError) {
662
- this.log.warn(`Timed out waiting for block with archive matching checkpoint proposal`, proposalInfo);
663
- return { isValid: false, reason: 'last_block_not_found' };
664
- }
665
- this.log.error(`Error fetching last block for checkpoint proposal`, err, proposalInfo);
666
- return { isValid: false, reason: 'block_fetch_error' };
667
- }
668
-
669
- if (!lastBlockHeader) {
670
- this.log.warn(`Last block not found for checkpoint proposal`, proposalInfo);
671
- return { isValid: false, reason: 'last_block_not_found' };
672
- }
673
-
674
- // Get all full blocks for the slot and checkpoint
675
- const blocks = await this.blockSource.getBlocksForSlot(slot);
676
- if (blocks.length === 0) {
677
- this.log.warn(`No blocks found for slot ${slot}`, proposalInfo);
678
- return { isValid: false, reason: 'no_blocks_for_slot' };
679
- }
680
-
681
- // Ensure the last block for this slot matches the archive in the checkpoint proposal
682
- if (!blocks.at(-1)?.archive.root.equals(proposal.archive)) {
683
- this.log.warn(`Last block archive mismatch for checkpoint proposal`, proposalInfo);
684
- return { isValid: false, reason: 'last_block_archive_mismatch' };
685
- }
686
-
687
- this.log.debug(`Found ${blocks.length} blocks for slot ${slot}`, {
688
- ...proposalInfo,
689
- blockNumbers: blocks.map(b => b.number),
690
- });
691
-
692
- // Get checkpoint constants from first block
693
- const firstBlock = blocks[0];
694
- const constants = this.extractCheckpointConstants(firstBlock);
695
- const checkpointNumber = firstBlock.checkpointNumber;
696
-
697
- // Get L1-to-L2 messages for this checkpoint
698
- const l1ToL2Messages = await this.l1ToL2MessageSource.getL1ToL2Messages(checkpointNumber);
699
-
700
- // Collect the out hashes of all the checkpoints before this one in the same epoch
701
- const epoch = getEpochAtSlot(slot, this.epochCache.getL1Constants());
702
- const previousCheckpointOutHashes = (await this.blockSource.getCheckpointsDataForEpoch(epoch))
703
- .filter(c => c.checkpointNumber < checkpointNumber)
704
- .map(c => c.checkpointOutHash);
705
-
706
- // Fork world state at the block before the first block
707
- const parentBlockNumber = BlockNumber(firstBlock.number - 1);
708
- const fork = await this.worldState.fork(parentBlockNumber);
709
-
710
- try {
711
- // Create checkpoint builder with all existing blocks
712
- const checkpointBuilder = await this.checkpointsBuilder.openCheckpoint(
713
- checkpointNumber,
714
- constants,
715
- proposal.feeAssetPriceModifier,
716
- l1ToL2Messages,
717
- previousCheckpointOutHashes,
718
- fork,
719
- blocks,
720
- this.log.getBindings(),
721
- );
722
-
723
- // Complete the checkpoint to get computed values
724
- const computedCheckpoint = await checkpointBuilder.completeCheckpoint();
725
-
726
- // Compare checkpoint header with proposal
727
- if (!computedCheckpoint.header.equals(proposal.checkpointHeader)) {
728
- this.log.warn(`Checkpoint header mismatch`, {
729
- ...proposalInfo,
730
- computed: computedCheckpoint.header.toInspect(),
731
- proposal: proposal.checkpointHeader.toInspect(),
732
- });
733
- return { isValid: false, reason: 'checkpoint_header_mismatch' };
734
- }
735
-
736
- // Compare archive root with proposal
737
- if (!computedCheckpoint.archive.root.equals(proposal.archive)) {
738
- this.log.warn(`Archive root mismatch`, {
739
- ...proposalInfo,
740
- computed: computedCheckpoint.archive.root.toString(),
741
- proposal: proposal.archive.toString(),
742
- });
743
- return { isValid: false, reason: 'archive_mismatch' };
744
- }
745
-
746
- // Check that the accumulated epoch out hash matches the value in the proposal.
747
- // The epoch out hash is the accumulated hash of all checkpoint out hashes in the epoch.
748
- const checkpointOutHash = computedCheckpoint.getCheckpointOutHash();
749
- const computedEpochOutHash = accumulateCheckpointOutHashes([...previousCheckpointOutHashes, checkpointOutHash]);
750
- const proposalEpochOutHash = proposal.checkpointHeader.epochOutHash;
751
- if (!computedEpochOutHash.equals(proposalEpochOutHash)) {
752
- this.log.warn(`Epoch out hash mismatch`, {
753
- proposalEpochOutHash: proposalEpochOutHash.toString(),
754
- computedEpochOutHash: computedEpochOutHash.toString(),
755
- checkpointOutHash: checkpointOutHash.toString(),
756
- previousCheckpointOutHashes: previousCheckpointOutHashes.map(h => h.toString()),
757
- ...proposalInfo,
758
- });
759
- return { isValid: false, reason: 'out_hash_mismatch' };
760
- }
761
-
762
- // Final round of validations on the checkpoint, just in case.
763
- try {
764
- validateCheckpoint(computedCheckpoint, {
765
- rollupManaLimit: this.checkpointsBuilder.getConfig().rollupManaLimit,
766
- maxDABlockGas: this.config.validateMaxDABlockGas,
767
- maxL2BlockGas: this.config.validateMaxL2BlockGas,
768
- maxTxsPerBlock: this.config.validateMaxTxsPerBlock,
769
- maxTxsPerCheckpoint: this.config.validateMaxTxsPerCheckpoint,
770
- });
771
- } catch (err) {
772
- this.log.warn(`Checkpoint validation failed: ${err}`, proposalInfo);
773
- return { isValid: false, reason: 'checkpoint_validation_failed' };
774
- }
775
-
776
- this.log.verbose(`Checkpoint proposal validation successful for slot ${slot}`, proposalInfo);
777
- return { isValid: true };
778
- } finally {
779
- await fork.close();
780
- }
781
- }
782
-
783
- /**
784
- * Extract checkpoint global variables from a block.
785
- */
786
- private extractCheckpointConstants(block: L2Block): CheckpointGlobalVariables {
787
- const gv = block.header.globalVariables;
788
- return {
789
- chainId: gv.chainId,
790
- version: gv.version,
791
- slotNumber: gv.slotNumber,
792
- timestamp: gv.timestamp,
793
- coinbase: gv.coinbase,
794
- feeRecipient: gv.feeRecipient,
795
- gasFees: gv.gasFees,
796
- };
797
- }
798
-
799
622
  /**
800
623
  * Uploads blobs for a checkpoint to the filestore (fire and forget).
801
624
  */
@@ -900,6 +723,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
900
723
 
901
724
  async createBlockProposal(
902
725
  blockHeader: BlockHeader,
726
+ checkpointNumber: CheckpointNumber,
903
727
  indexWithinCheckpoint: IndexWithinCheckpoint,
904
728
  inHash: Fr,
905
729
  archive: Fr,
@@ -926,6 +750,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
926
750
  );
927
751
  const newProposal = await this.validationService.createBlockProposal(
928
752
  blockHeader,
753
+ checkpointNumber,
929
754
  indexWithinCheckpoint,
930
755
  inHash,
931
756
  archive,
@@ -943,8 +768,9 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
943
768
  async createCheckpointProposal(
944
769
  checkpointHeader: CheckpointHeader,
945
770
  archive: Fr,
771
+ checkpointNumber: CheckpointNumber,
946
772
  feeAssetPriceModifier: bigint,
947
- lastBlockInfo: CreateCheckpointProposalLastBlockData | undefined,
773
+ lastBlockProposal: BlockProposal | undefined,
948
774
  proposerAddress: EthAddress | undefined,
949
775
  options: CheckpointProposalOptions = {},
950
776
  ): Promise<CheckpointProposal> {
@@ -965,8 +791,9 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
965
791
  const newProposal = await this.validationService.createCheckpointProposal(
966
792
  checkpointHeader,
967
793
  archive,
794
+ checkpointNumber,
968
795
  feeAssetPriceModifier,
969
- lastBlockInfo,
796
+ lastBlockProposal,
970
797
  proposerAddress,
971
798
  options,
972
799
  );
@@ -982,16 +809,24 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
982
809
  attestationsAndSigners: CommitteeAttestationsAndSigners,
983
810
  proposer: EthAddress,
984
811
  slot: SlotNumber,
985
- blockNumber: BlockNumber | CheckpointNumber,
812
+ checkpointNumber: CheckpointNumber,
986
813
  ): Promise<Signature> {
987
- return await this.validationService.signAttestationsAndSigners(attestationsAndSigners, proposer, slot, blockNumber);
814
+ return await this.validationService.signAttestationsAndSigners(
815
+ attestationsAndSigners,
816
+ proposer,
817
+ slot,
818
+ checkpointNumber,
819
+ );
988
820
  }
989
821
 
990
- async collectOwnAttestations(proposal: CheckpointProposal): Promise<CheckpointAttestation[]> {
822
+ async collectOwnAttestations(
823
+ proposal: CheckpointProposal,
824
+ checkpointNumber: CheckpointNumber,
825
+ ): Promise<CheckpointAttestation[]> {
991
826
  const slot = proposal.slotNumber;
992
827
  const inCommittee = await this.epochCache.filterInCommittee(slot, this.getValidatorAddresses());
993
828
  this.log.debug(`Collecting ${inCommittee.length} self-attestations for slot ${slot}`, { inCommittee });
994
- const attestations = await this.createCheckpointAttestationsFromProposal(proposal, inCommittee);
829
+ const attestations = await this.createCheckpointAttestationsFromProposal(proposal, inCommittee, checkpointNumber);
995
830
 
996
831
  if (!attestations) {
997
832
  return [];
@@ -1010,6 +845,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
1010
845
  proposal: CheckpointProposal,
1011
846
  required: number,
1012
847
  deadline: Date,
848
+ checkpointNumber: CheckpointNumber,
1013
849
  ): Promise<CheckpointAttestation[]> {
1014
850
  // Wait and poll the p2pClient's attestation pool for this checkpoint until we have enough attestations
1015
851
  const slot = proposal.slotNumber;
@@ -1022,7 +858,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
1022
858
  throw new AttestationTimeoutError(0, required, slot);
1023
859
  }
1024
860
 
1025
- await this.collectOwnAttestations(proposal);
861
+ await this.collectOwnAttestations(proposal, checkpointNumber);
1026
862
 
1027
863
  const proposalId = proposal.archive.toString();
1028
864
  const myAddresses = this.getValidatorAddresses();
@@ -1,64 +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' | 'block_source_not_synced' | 'parent_block_wrong_slot' | 'in_hash_mismatch' | 'global_variables_mismatch' | 'block_number_already_exists' | 'txs_not_available' | 'state_mismatch' | 'failed_txs' | 'initial_state_mismatch' | '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
- register(p2pClient: P2P, shouldReexecute: boolean): 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 waitForBlockSourceSync;
60
- private getReexecuteFailureReason;
61
- reexecuteTransactions(proposal: BlockProposal, blockNumber: BlockNumber, checkpointNumber: CheckpointNumber, txs: Tx[], l1ToL2Messages: Fr[], previousCheckpointOutHashes: Fr[]): Promise<ReexecuteTransactionsResult>;
62
- }
63
- export {};
64
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxvY2tfcHJvcG9zYWxfaGFuZGxlci5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2Jsb2NrX3Byb3Bvc2FsX2hhbmRsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7Q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