@aztec/validator-client 0.0.1-commit.88e6f9396 → 0.0.1-commit.8c0b8ff
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/checkpoint_builder.js +1 -1
- package/dest/config.d.ts +1 -1
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +1 -2
- package/dest/factory.d.ts +5 -4
- package/dest/factory.d.ts.map +1 -1
- package/dest/factory.js +3 -3
- package/dest/index.d.ts +2 -2
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +1 -1
- package/dest/metrics.d.ts +2 -2
- package/dest/metrics.d.ts.map +1 -1
- package/dest/proposal_handler.d.ts +94 -0
- package/dest/proposal_handler.d.ts.map +1 -0
- package/dest/{block_proposal_handler.js → proposal_handler.js} +257 -19
- package/dest/validator.d.ts +8 -21
- package/dest/validator.d.ts.map +1 -1
- package/dest/validator.js +47 -256
- package/package.json +19 -19
- package/src/checkpoint_builder.ts +1 -1
- package/src/config.ts +1 -2
- package/src/factory.ts +5 -3
- package/src/index.ts +1 -1
- package/src/metrics.ts +1 -1
- package/src/{block_proposal_handler.ts → proposal_handler.ts} +288 -17
- package/src/validator.ts +61 -288
- package/dest/block_proposal_handler.d.ts +0 -64
- package/dest/block_proposal_handler.d.ts.map +0 -1
package/src/validator.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { BlobClientInterface } from '@aztec/blob-client/client';
|
|
2
|
-
import { type Blob, getBlobsPerL1Block } from '@aztec/blob-lib';
|
|
3
2
|
import type { EpochCache } from '@aztec/epoch-cache';
|
|
4
|
-
import { validateFeeAssetPriceModifier } from '@aztec/ethereum/contracts';
|
|
5
3
|
import {
|
|
6
4
|
BlockNumber,
|
|
7
5
|
CheckpointNumber,
|
|
@@ -10,11 +8,9 @@ import {
|
|
|
10
8
|
SlotNumber,
|
|
11
9
|
} from '@aztec/foundation/branded-types';
|
|
12
10
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
13
|
-
import { TimeoutError } from '@aztec/foundation/error';
|
|
14
11
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
15
12
|
import type { Signature } from '@aztec/foundation/eth-signature';
|
|
16
|
-
import { type
|
|
17
|
-
import { retryUntil } from '@aztec/foundation/retry';
|
|
13
|
+
import { type Logger, createLogger } from '@aztec/foundation/log';
|
|
18
14
|
import { RunningPromise } from '@aztec/foundation/running-promise';
|
|
19
15
|
import { sleep } from '@aztec/foundation/sleep';
|
|
20
16
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
@@ -23,9 +19,8 @@ import type { DuplicateAttestationInfo, DuplicateProposalInfo, P2P, PeerId } fro
|
|
|
23
19
|
import { AuthRequest, AuthResponse, BlockProposalValidator, ReqRespSubProtocol } from '@aztec/p2p';
|
|
24
20
|
import { OffenseType, WANT_TO_SLASH_EVENT, type Watcher, type WatcherEmitter } from '@aztec/slasher';
|
|
25
21
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
26
|
-
import type { CommitteeAttestationsAndSigners,
|
|
27
|
-
import {
|
|
28
|
-
import { getEpochAtSlot, getTimestampForSlot } from '@aztec/stdlib/epoch-helpers';
|
|
22
|
+
import type { CommitteeAttestationsAndSigners, L2BlockSink, L2BlockSource } from '@aztec/stdlib/block';
|
|
23
|
+
import { getEpochAtSlot } from '@aztec/stdlib/epoch-helpers';
|
|
29
24
|
import type {
|
|
30
25
|
CreateCheckpointProposalLastBlockData,
|
|
31
26
|
ITxProvider,
|
|
@@ -33,7 +28,7 @@ import type {
|
|
|
33
28
|
ValidatorClientFullConfig,
|
|
34
29
|
WorldStateSynchronizer,
|
|
35
30
|
} from '@aztec/stdlib/interfaces/server';
|
|
36
|
-
import {
|
|
31
|
+
import type { L1ToL2MessageSource } from '@aztec/stdlib/messaging';
|
|
37
32
|
import {
|
|
38
33
|
type BlockProposal,
|
|
39
34
|
type BlockProposalOptions,
|
|
@@ -43,27 +38,23 @@ import {
|
|
|
43
38
|
type CheckpointProposalOptions,
|
|
44
39
|
} from '@aztec/stdlib/p2p';
|
|
45
40
|
import type { CheckpointHeader } from '@aztec/stdlib/rollup';
|
|
46
|
-
import type { BlockHeader,
|
|
41
|
+
import type { BlockHeader, Tx } from '@aztec/stdlib/tx';
|
|
47
42
|
import { AttestationTimeoutError } from '@aztec/stdlib/validators';
|
|
48
43
|
import { type TelemetryClient, type Tracer, getTelemetryClient } from '@aztec/telemetry-client';
|
|
49
|
-
import {
|
|
50
|
-
createHASigner,
|
|
51
|
-
createLocalSignerWithProtection,
|
|
52
|
-
createSignerFromSharedDb,
|
|
53
|
-
} from '@aztec/validator-ha-signer/factory';
|
|
44
|
+
import { createHASigner, createSignerFromSharedDb } from '@aztec/validator-ha-signer/factory';
|
|
54
45
|
import { DutyType, type SigningContext, type SlashingProtectionDatabase } from '@aztec/validator-ha-signer/types';
|
|
55
46
|
import type { ValidatorHASigner } from '@aztec/validator-ha-signer/validator-ha-signer';
|
|
56
47
|
|
|
57
48
|
import { EventEmitter } from 'events';
|
|
58
49
|
import type { TypedDataDefinition } from 'viem';
|
|
59
50
|
|
|
60
|
-
import { BlockProposalHandler, type BlockProposalValidationFailureReason } from './block_proposal_handler.js';
|
|
61
51
|
import type { FullNodeCheckpointsBuilder } from './checkpoint_builder.js';
|
|
62
52
|
import { ValidationService } from './duties/validation_service.js';
|
|
63
53
|
import { HAKeyStore } from './key_store/ha_key_store.js';
|
|
64
54
|
import type { ExtendedValidatorKeyStore } from './key_store/interface.js';
|
|
65
55
|
import { NodeKeystoreAdapter } from './key_store/node_keystore_adapter.js';
|
|
66
56
|
import { ValidatorMetrics } from './metrics.js';
|
|
57
|
+
import { type BlockProposalValidationFailureReason, ProposalHandler } from './proposal_handler.js';
|
|
67
58
|
|
|
68
59
|
// We maintain a set of proposers who have proposed invalid blocks.
|
|
69
60
|
// Just cap the set to avoid unbounded growth.
|
|
@@ -106,14 +97,10 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
106
97
|
private keyStore: ExtendedValidatorKeyStore,
|
|
107
98
|
private epochCache: EpochCache,
|
|
108
99
|
private p2pClient: P2P,
|
|
109
|
-
private
|
|
110
|
-
private blockSource: L2BlockSource,
|
|
111
|
-
private checkpointsBuilder: FullNodeCheckpointsBuilder,
|
|
112
|
-
private worldState: WorldStateSynchronizer,
|
|
113
|
-
private l1ToL2MessageSource: L1ToL2MessageSource,
|
|
100
|
+
private proposalHandler: ProposalHandler,
|
|
114
101
|
private config: ValidatorClientFullConfig,
|
|
115
102
|
private blobClient: BlobClientInterface,
|
|
116
|
-
private
|
|
103
|
+
private haSigner: ValidatorHASigner | undefined,
|
|
117
104
|
private dateProvider: DateProvider = new DateProvider(),
|
|
118
105
|
telemetry: TelemetryClient = getTelemetryClient(),
|
|
119
106
|
log = createLogger('validator'),
|
|
@@ -208,7 +195,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
208
195
|
txsPermitted: !config.disableTransactions,
|
|
209
196
|
maxTxsPerBlock: config.validateMaxTxsPerBlock,
|
|
210
197
|
});
|
|
211
|
-
const
|
|
198
|
+
const proposalHandler = new ProposalHandler(
|
|
212
199
|
checkpointsBuilder,
|
|
213
200
|
worldState,
|
|
214
201
|
blockSource,
|
|
@@ -217,52 +204,39 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
217
204
|
blockProposalValidator,
|
|
218
205
|
epochCache,
|
|
219
206
|
config,
|
|
207
|
+
blobClient,
|
|
220
208
|
metrics,
|
|
221
209
|
dateProvider,
|
|
222
210
|
telemetry,
|
|
223
211
|
);
|
|
224
212
|
|
|
225
213
|
const nodeKeystoreAdapter = NodeKeystoreAdapter.fromKeyStoreManager(keyStoreManager);
|
|
226
|
-
let
|
|
214
|
+
let validatorKeyStore: ExtendedValidatorKeyStore = nodeKeystoreAdapter;
|
|
215
|
+
let haSigner: ValidatorHASigner | undefined;
|
|
227
216
|
if (slashingProtectionDb) {
|
|
228
217
|
// Shared database mode: use a pre-existing database (e.g. for testing HA setups).
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
}));
|
|
218
|
+
const { signer } = createSignerFromSharedDb(slashingProtectionDb, config);
|
|
219
|
+
haSigner = signer;
|
|
220
|
+
validatorKeyStore = new HAKeyStore(nodeKeystoreAdapter, signer);
|
|
233
221
|
} else if (config.haSigningEnabled) {
|
|
234
|
-
// Multi-node HA mode: use PostgreSQL-backed distributed locking.
|
|
235
222
|
// If maxStuckDutiesAgeMs is not explicitly set, compute it from Aztec slot duration
|
|
236
223
|
const haConfig = {
|
|
237
224
|
...config,
|
|
238
225
|
maxStuckDutiesAgeMs: config.maxStuckDutiesAgeMs ?? epochCache.getL1Constants().slotDuration * 2 * 1000,
|
|
239
226
|
};
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
}));
|
|
244
|
-
} else {
|
|
245
|
-
// Single-node mode: use LMDB-backed local signing protection.
|
|
246
|
-
// This prevents double-signing if the node crashes and restarts mid-proposal.
|
|
247
|
-
({ signer: slashingProtectionSigner } = await createLocalSignerWithProtection(config, {
|
|
248
|
-
telemetryClient: telemetry,
|
|
249
|
-
dateProvider,
|
|
250
|
-
}));
|
|
227
|
+
const { signer } = await createHASigner(haConfig);
|
|
228
|
+
haSigner = signer;
|
|
229
|
+
validatorKeyStore = new HAKeyStore(nodeKeystoreAdapter, signer);
|
|
251
230
|
}
|
|
252
|
-
const validatorKeyStore: ExtendedValidatorKeyStore = new HAKeyStore(nodeKeystoreAdapter, slashingProtectionSigner);
|
|
253
231
|
|
|
254
232
|
const validator = new ValidatorClient(
|
|
255
233
|
validatorKeyStore,
|
|
256
234
|
epochCache,
|
|
257
235
|
p2pClient,
|
|
258
|
-
|
|
259
|
-
blockSource,
|
|
260
|
-
checkpointsBuilder,
|
|
261
|
-
worldState,
|
|
262
|
-
l1ToL2MessageSource,
|
|
236
|
+
proposalHandler,
|
|
263
237
|
config,
|
|
264
238
|
blobClient,
|
|
265
|
-
|
|
239
|
+
haSigner,
|
|
266
240
|
dateProvider,
|
|
267
241
|
telemetry,
|
|
268
242
|
);
|
|
@@ -276,8 +250,8 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
276
250
|
.filter(addr => !this.config.disabledValidators.some(disabled => disabled.equals(addr)));
|
|
277
251
|
}
|
|
278
252
|
|
|
279
|
-
public
|
|
280
|
-
return this.
|
|
253
|
+
public getProposalHandler() {
|
|
254
|
+
return this.proposalHandler;
|
|
281
255
|
}
|
|
282
256
|
|
|
283
257
|
public signWithAddress(addr: EthAddress, msg: TypedDataDefinition, context: SigningContext) {
|
|
@@ -301,8 +275,24 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
301
275
|
}
|
|
302
276
|
|
|
303
277
|
public reloadKeystore(newManager: KeystoreManager): void {
|
|
278
|
+
if (this.config.haSigningEnabled && !this.haSigner) {
|
|
279
|
+
this.log.warn(
|
|
280
|
+
'HA signing is enabled in config but was not initialized at startup. ' +
|
|
281
|
+
'Restart the node to enable HA signing.',
|
|
282
|
+
);
|
|
283
|
+
} else if (!this.config.haSigningEnabled && this.haSigner) {
|
|
284
|
+
this.log.warn(
|
|
285
|
+
'HA signing was disabled via config update but the HA signer is still active. ' +
|
|
286
|
+
'Restart the node to fully disable HA signing.',
|
|
287
|
+
);
|
|
288
|
+
}
|
|
289
|
+
|
|
304
290
|
const newAdapter = NodeKeystoreAdapter.fromKeyStoreManager(newManager);
|
|
305
|
-
|
|
291
|
+
if (this.haSigner) {
|
|
292
|
+
this.keyStore = new HAKeyStore(newAdapter, this.haSigner);
|
|
293
|
+
} else {
|
|
294
|
+
this.keyStore = newAdapter;
|
|
295
|
+
}
|
|
306
296
|
this.validationService = new ValidationService(this.keyStore, this.log.createChild('validation-service'));
|
|
307
297
|
}
|
|
308
298
|
|
|
@@ -419,7 +409,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
419
409
|
alwaysReexecuteBlockProposals ||
|
|
420
410
|
this.blobClient.canUpload();
|
|
421
411
|
|
|
422
|
-
const validationResult = await this.
|
|
412
|
+
const validationResult = await this.proposalHandler.handleBlockProposal(
|
|
423
413
|
proposal,
|
|
424
414
|
proposalSender,
|
|
425
415
|
!!shouldReexecute && !escapeHatchOpen,
|
|
@@ -484,68 +474,49 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
484
474
|
proposal: CheckpointProposalCore,
|
|
485
475
|
_proposalSender: PeerId,
|
|
486
476
|
): Promise<CheckpointAttestation[] | undefined> {
|
|
487
|
-
const
|
|
477
|
+
const slotNumber = proposal.slotNumber;
|
|
488
478
|
const proposer = proposal.getSender();
|
|
489
479
|
|
|
490
480
|
// If escape hatch is open for this slot's epoch, do not attest.
|
|
491
|
-
if (await this.epochCache.isEscapeHatchOpenAtSlot(
|
|
492
|
-
this.log.warn(`Escape hatch open for slot ${
|
|
493
|
-
return undefined;
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
// Reject proposals with invalid signatures
|
|
497
|
-
if (!proposer) {
|
|
498
|
-
this.log.warn(`Received checkpoint proposal with invalid signature for proposal slot ${proposalSlotNumber}`);
|
|
481
|
+
if (await this.epochCache.isEscapeHatchOpenAtSlot(slotNumber)) {
|
|
482
|
+
this.log.warn(`Escape hatch open for slot ${slotNumber}, skipping checkpoint attestation handling`);
|
|
499
483
|
return undefined;
|
|
500
484
|
}
|
|
501
485
|
|
|
502
486
|
// Ignore proposals from ourselves (may happen in HA setups)
|
|
503
|
-
if (this.getValidatorAddresses().some(addr => addr.equals(proposer))) {
|
|
504
|
-
this.log.debug(`Ignoring block proposal from self for slot ${
|
|
487
|
+
if (proposer && this.getValidatorAddresses().some(addr => addr.equals(proposer))) {
|
|
488
|
+
this.log.debug(`Ignoring block proposal from self for slot ${slotNumber}`, {
|
|
505
489
|
proposer: proposer.toString(),
|
|
506
|
-
|
|
490
|
+
slotNumber,
|
|
507
491
|
});
|
|
508
492
|
return undefined;
|
|
509
493
|
}
|
|
510
494
|
|
|
511
|
-
// Validate fee asset price modifier is within allowed range
|
|
512
|
-
if (!validateFeeAssetPriceModifier(proposal.feeAssetPriceModifier)) {
|
|
513
|
-
this.log.warn(
|
|
514
|
-
`Received checkpoint proposal with invalid feeAssetPriceModifier ${proposal.feeAssetPriceModifier} for slot ${proposalSlotNumber}`,
|
|
515
|
-
);
|
|
516
|
-
return undefined;
|
|
517
|
-
}
|
|
518
|
-
|
|
519
495
|
// Check that I have any address in the committee where this checkpoint will land before attesting
|
|
520
|
-
const inCommittee = await this.epochCache.filterInCommittee(
|
|
496
|
+
const inCommittee = await this.epochCache.filterInCommittee(slotNumber, this.getValidatorAddresses());
|
|
521
497
|
const partOfCommittee = inCommittee.length > 0;
|
|
522
498
|
|
|
523
499
|
const proposalInfo = {
|
|
524
|
-
|
|
500
|
+
slotNumber,
|
|
525
501
|
archive: proposal.archive.toString(),
|
|
526
|
-
proposer: proposer
|
|
502
|
+
proposer: proposer?.toString(),
|
|
527
503
|
};
|
|
528
|
-
this.log.info(`Received checkpoint proposal for slot ${
|
|
504
|
+
this.log.info(`Received checkpoint proposal for slot ${slotNumber}`, {
|
|
529
505
|
...proposalInfo,
|
|
530
506
|
fishermanMode: this.config.fishermanMode || false,
|
|
531
507
|
});
|
|
532
508
|
|
|
533
|
-
// Validate the checkpoint proposal
|
|
509
|
+
// Validate the checkpoint proposal and upload blobs (unless skipCheckpointProposalValidation is set)
|
|
534
510
|
if (this.config.skipCheckpointProposalValidation) {
|
|
535
|
-
this.log.warn(`Skipping checkpoint proposal validation for slot ${
|
|
511
|
+
this.log.warn(`Skipping checkpoint proposal validation for slot ${slotNumber}`, proposalInfo);
|
|
536
512
|
} else {
|
|
537
|
-
const validationResult = await this.
|
|
513
|
+
const validationResult = await this.proposalHandler.handleCheckpointProposal(proposal, proposalInfo);
|
|
538
514
|
if (!validationResult.isValid) {
|
|
539
515
|
this.log.warn(`Checkpoint proposal validation failed: ${validationResult.reason}`, proposalInfo);
|
|
540
516
|
return undefined;
|
|
541
517
|
}
|
|
542
518
|
}
|
|
543
519
|
|
|
544
|
-
// Upload blobs to filestore if we can (fire and forget)
|
|
545
|
-
if (this.blobClient.canUpload()) {
|
|
546
|
-
void this.uploadBlobsForCheckpoint(proposal, proposalInfo);
|
|
547
|
-
}
|
|
548
|
-
|
|
549
520
|
// Check that I have any address in current committee before attesting
|
|
550
521
|
// In fisherman mode, we still create attestations for validation even if not in committee
|
|
551
522
|
if (!partOfCommittee && !this.config.fishermanMode) {
|
|
@@ -554,19 +525,16 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
554
525
|
}
|
|
555
526
|
|
|
556
527
|
// Provided all of the above checks pass, we can attest to the proposal
|
|
557
|
-
this.log.info(
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
fishermanMode: this.config.fishermanMode || false,
|
|
563
|
-
},
|
|
564
|
-
);
|
|
528
|
+
this.log.info(`${partOfCommittee ? 'Attesting to' : 'Validated'} checkpoint proposal for slot ${slotNumber}`, {
|
|
529
|
+
...proposalInfo,
|
|
530
|
+
inCommittee: partOfCommittee,
|
|
531
|
+
fishermanMode: this.config.fishermanMode || false,
|
|
532
|
+
});
|
|
565
533
|
|
|
566
534
|
this.metrics.incSuccessfulAttestations(inCommittee.length);
|
|
567
535
|
|
|
568
536
|
// Track epoch participation per attester: count each (attester, epoch) pair at most once
|
|
569
|
-
const proposalEpoch = getEpochAtSlot(
|
|
537
|
+
const proposalEpoch = getEpochAtSlot(slotNumber, this.epochCache.getL1Constants());
|
|
570
538
|
for (const attester of inCommittee) {
|
|
571
539
|
const key = attester.toString();
|
|
572
540
|
const lastEpoch = this.lastAttestedEpochByAttester.get(key);
|
|
@@ -594,7 +562,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
594
562
|
|
|
595
563
|
if (this.config.fishermanMode) {
|
|
596
564
|
// bail out early and don't save attestations to the pool in fisherman mode
|
|
597
|
-
this.log.info(`Creating checkpoint attestations for slot ${
|
|
565
|
+
this.log.info(`Creating checkpoint attestations for slot ${slotNumber}`, {
|
|
598
566
|
...proposalInfo,
|
|
599
567
|
attestors: attestors.map(a => a.toString()),
|
|
600
568
|
});
|
|
@@ -643,201 +611,6 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
643
611
|
return attestations;
|
|
644
612
|
}
|
|
645
613
|
|
|
646
|
-
/**
|
|
647
|
-
* Validates a checkpoint proposal by building the full checkpoint and comparing it with the proposal.
|
|
648
|
-
* @returns Validation result with isValid flag and reason if invalid.
|
|
649
|
-
*/
|
|
650
|
-
private async validateCheckpointProposal(
|
|
651
|
-
proposal: CheckpointProposalCore,
|
|
652
|
-
proposalInfo: LogData,
|
|
653
|
-
): Promise<{ isValid: true } | { isValid: false; reason: string }> {
|
|
654
|
-
const slot = proposal.slotNumber;
|
|
655
|
-
|
|
656
|
-
// Timeout block syncing at the start of the next slot
|
|
657
|
-
const config = this.checkpointsBuilder.getConfig();
|
|
658
|
-
const nextSlotTimestampSeconds = Number(getTimestampForSlot(SlotNumber(slot + 1), config));
|
|
659
|
-
const timeoutSeconds = Math.max(1, nextSlotTimestampSeconds - Math.floor(this.dateProvider.now() / 1000));
|
|
660
|
-
|
|
661
|
-
// Wait for last block to sync by archive
|
|
662
|
-
let lastBlockHeader: BlockHeader | undefined;
|
|
663
|
-
try {
|
|
664
|
-
lastBlockHeader = await retryUntil(
|
|
665
|
-
async () => {
|
|
666
|
-
await this.blockSource.syncImmediate();
|
|
667
|
-
return this.blockSource.getBlockHeaderByArchive(proposal.archive);
|
|
668
|
-
},
|
|
669
|
-
`waiting for block with archive ${proposal.archive.toString()} for slot ${slot}`,
|
|
670
|
-
timeoutSeconds,
|
|
671
|
-
0.5,
|
|
672
|
-
);
|
|
673
|
-
} catch (err) {
|
|
674
|
-
if (err instanceof TimeoutError) {
|
|
675
|
-
this.log.warn(`Timed out waiting for block with archive matching checkpoint proposal`, proposalInfo);
|
|
676
|
-
return { isValid: false, reason: 'last_block_not_found' };
|
|
677
|
-
}
|
|
678
|
-
this.log.error(`Error fetching last block for checkpoint proposal`, err, proposalInfo);
|
|
679
|
-
return { isValid: false, reason: 'block_fetch_error' };
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
if (!lastBlockHeader) {
|
|
683
|
-
this.log.warn(`Last block not found for checkpoint proposal`, proposalInfo);
|
|
684
|
-
return { isValid: false, reason: 'last_block_not_found' };
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
// Get all full blocks for the slot and checkpoint
|
|
688
|
-
const blocks = await this.blockSource.getBlocksForSlot(slot);
|
|
689
|
-
if (blocks.length === 0) {
|
|
690
|
-
this.log.warn(`No blocks found for slot ${slot}`, proposalInfo);
|
|
691
|
-
return { isValid: false, reason: 'no_blocks_for_slot' };
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
// Ensure the last block for this slot matches the archive in the checkpoint proposal
|
|
695
|
-
if (!blocks.at(-1)?.archive.root.equals(proposal.archive)) {
|
|
696
|
-
this.log.warn(`Last block archive mismatch for checkpoint proposal`, proposalInfo);
|
|
697
|
-
return { isValid: false, reason: 'last_block_archive_mismatch' };
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
this.log.debug(`Found ${blocks.length} blocks for slot ${slot}`, {
|
|
701
|
-
...proposalInfo,
|
|
702
|
-
blockNumbers: blocks.map(b => b.number),
|
|
703
|
-
});
|
|
704
|
-
|
|
705
|
-
// Get checkpoint constants from first block
|
|
706
|
-
const firstBlock = blocks[0];
|
|
707
|
-
const constants = this.extractCheckpointConstants(firstBlock);
|
|
708
|
-
const checkpointNumber = firstBlock.checkpointNumber;
|
|
709
|
-
|
|
710
|
-
// Get L1-to-L2 messages for this checkpoint
|
|
711
|
-
const l1ToL2Messages = await this.l1ToL2MessageSource.getL1ToL2Messages(checkpointNumber);
|
|
712
|
-
|
|
713
|
-
// Collect the out hashes of all the checkpoints before this one in the same epoch
|
|
714
|
-
const epoch = getEpochAtSlot(slot, this.epochCache.getL1Constants());
|
|
715
|
-
const previousCheckpointOutHashes = (await this.blockSource.getCheckpointsDataForEpoch(epoch))
|
|
716
|
-
.filter(c => c.checkpointNumber < checkpointNumber)
|
|
717
|
-
.map(c => c.checkpointOutHash);
|
|
718
|
-
|
|
719
|
-
// Fork world state at the block before the first block
|
|
720
|
-
const parentBlockNumber = BlockNumber(firstBlock.number - 1);
|
|
721
|
-
const fork = await this.worldState.fork(parentBlockNumber);
|
|
722
|
-
|
|
723
|
-
try {
|
|
724
|
-
// Create checkpoint builder with all existing blocks
|
|
725
|
-
const checkpointBuilder = await this.checkpointsBuilder.openCheckpoint(
|
|
726
|
-
checkpointNumber,
|
|
727
|
-
constants,
|
|
728
|
-
proposal.feeAssetPriceModifier,
|
|
729
|
-
l1ToL2Messages,
|
|
730
|
-
previousCheckpointOutHashes,
|
|
731
|
-
fork,
|
|
732
|
-
blocks,
|
|
733
|
-
this.log.getBindings(),
|
|
734
|
-
);
|
|
735
|
-
|
|
736
|
-
// Complete the checkpoint to get computed values
|
|
737
|
-
const computedCheckpoint = await checkpointBuilder.completeCheckpoint();
|
|
738
|
-
|
|
739
|
-
// Compare checkpoint header with proposal
|
|
740
|
-
if (!computedCheckpoint.header.equals(proposal.checkpointHeader)) {
|
|
741
|
-
this.log.warn(`Checkpoint header mismatch`, {
|
|
742
|
-
...proposalInfo,
|
|
743
|
-
computed: computedCheckpoint.header.toInspect(),
|
|
744
|
-
proposal: proposal.checkpointHeader.toInspect(),
|
|
745
|
-
});
|
|
746
|
-
return { isValid: false, reason: 'checkpoint_header_mismatch' };
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
// Compare archive root with proposal
|
|
750
|
-
if (!computedCheckpoint.archive.root.equals(proposal.archive)) {
|
|
751
|
-
this.log.warn(`Archive root mismatch`, {
|
|
752
|
-
...proposalInfo,
|
|
753
|
-
computed: computedCheckpoint.archive.root.toString(),
|
|
754
|
-
proposal: proposal.archive.toString(),
|
|
755
|
-
});
|
|
756
|
-
return { isValid: false, reason: 'archive_mismatch' };
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
// Check that the accumulated epoch out hash matches the value in the proposal.
|
|
760
|
-
// The epoch out hash is the accumulated hash of all checkpoint out hashes in the epoch.
|
|
761
|
-
const checkpointOutHash = computedCheckpoint.getCheckpointOutHash();
|
|
762
|
-
const computedEpochOutHash = accumulateCheckpointOutHashes([...previousCheckpointOutHashes, checkpointOutHash]);
|
|
763
|
-
const proposalEpochOutHash = proposal.checkpointHeader.epochOutHash;
|
|
764
|
-
if (!computedEpochOutHash.equals(proposalEpochOutHash)) {
|
|
765
|
-
this.log.warn(`Epoch out hash mismatch`, {
|
|
766
|
-
proposalEpochOutHash: proposalEpochOutHash.toString(),
|
|
767
|
-
computedEpochOutHash: computedEpochOutHash.toString(),
|
|
768
|
-
checkpointOutHash: checkpointOutHash.toString(),
|
|
769
|
-
previousCheckpointOutHashes: previousCheckpointOutHashes.map(h => h.toString()),
|
|
770
|
-
...proposalInfo,
|
|
771
|
-
});
|
|
772
|
-
return { isValid: false, reason: 'out_hash_mismatch' };
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
// Final round of validations on the checkpoint, just in case.
|
|
776
|
-
try {
|
|
777
|
-
validateCheckpoint(computedCheckpoint, {
|
|
778
|
-
rollupManaLimit: this.checkpointsBuilder.getConfig().rollupManaLimit,
|
|
779
|
-
maxDABlockGas: this.config.validateMaxDABlockGas,
|
|
780
|
-
maxL2BlockGas: this.config.validateMaxL2BlockGas,
|
|
781
|
-
maxTxsPerBlock: this.config.validateMaxTxsPerBlock,
|
|
782
|
-
maxTxsPerCheckpoint: this.config.validateMaxTxsPerCheckpoint,
|
|
783
|
-
});
|
|
784
|
-
} catch (err) {
|
|
785
|
-
this.log.warn(`Checkpoint validation failed: ${err}`, proposalInfo);
|
|
786
|
-
return { isValid: false, reason: 'checkpoint_validation_failed' };
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
this.log.verbose(`Checkpoint proposal validation successful for slot ${slot}`, proposalInfo);
|
|
790
|
-
return { isValid: true };
|
|
791
|
-
} finally {
|
|
792
|
-
await fork.close();
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
/**
|
|
797
|
-
* Extract checkpoint global variables from a block.
|
|
798
|
-
*/
|
|
799
|
-
private extractCheckpointConstants(block: L2Block): CheckpointGlobalVariables {
|
|
800
|
-
const gv = block.header.globalVariables;
|
|
801
|
-
return {
|
|
802
|
-
chainId: gv.chainId,
|
|
803
|
-
version: gv.version,
|
|
804
|
-
slotNumber: gv.slotNumber,
|
|
805
|
-
timestamp: gv.timestamp,
|
|
806
|
-
coinbase: gv.coinbase,
|
|
807
|
-
feeRecipient: gv.feeRecipient,
|
|
808
|
-
gasFees: gv.gasFees,
|
|
809
|
-
};
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
/**
|
|
813
|
-
* Uploads blobs for a checkpoint to the filestore (fire and forget).
|
|
814
|
-
*/
|
|
815
|
-
protected async uploadBlobsForCheckpoint(proposal: CheckpointProposalCore, proposalInfo: LogData): Promise<void> {
|
|
816
|
-
try {
|
|
817
|
-
const lastBlockHeader = await this.blockSource.getBlockHeaderByArchive(proposal.archive);
|
|
818
|
-
if (!lastBlockHeader) {
|
|
819
|
-
this.log.warn(`Failed to get last block header for blob upload`, proposalInfo);
|
|
820
|
-
return;
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
const blocks = await this.blockSource.getBlocksForSlot(proposal.slotNumber);
|
|
824
|
-
if (blocks.length === 0) {
|
|
825
|
-
this.log.warn(`No blocks found for blob upload`, proposalInfo);
|
|
826
|
-
return;
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
const blobFields = blocks.flatMap(b => b.toBlobFields());
|
|
830
|
-
const blobs: Blob[] = await getBlobsPerL1Block(blobFields);
|
|
831
|
-
await this.blobClient.sendBlobsToFilestore(blobs);
|
|
832
|
-
this.log.debug(`Uploaded ${blobs.length} blobs to filestore for checkpoint at slot ${proposal.slotNumber}`, {
|
|
833
|
-
...proposalInfo,
|
|
834
|
-
numBlobs: blobs.length,
|
|
835
|
-
});
|
|
836
|
-
} catch (err) {
|
|
837
|
-
this.log.warn(`Failed to upload blobs for checkpoint: ${err}`, proposalInfo);
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
|
|
841
614
|
private slashInvalidBlock(proposal: BlockProposal) {
|
|
842
615
|
const proposer = proposal.getSender();
|
|
843
616
|
|
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxvY2tfcHJvcG9zYWxfaGFuZGxlci5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2Jsb2NrX3Byb3Bvc2FsX2hhbmRsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDckQsT0FBTyxFQUFFLFdBQVcsRUFBRSxnQkFBZ0IsRUFBYyxNQUFNLGlDQUFpQyxDQUFDO0FBRTVGLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUlwRCxPQUFPLEVBQUUsWUFBWSxFQUFTLE1BQU0seUJBQXlCLENBQUM7QUFDOUQsT0FBTyxLQUFLLEVBQUUsR0FBRyxFQUFFLE1BQU0sRUFBRSxNQUFNLFlBQVksQ0FBQztBQUM5QyxPQUFPLEVBQUUsc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