@aztec/validator-client 0.0.1-commit.f504929 → 0.0.1-commit.f5d02921e
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 +1 -1
- package/dest/duties/validation_service.d.ts.map +1 -1
- package/dest/duties/validation_service.js +3 -9
- 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 +963 -0
- package/dest/validator.d.ts +9 -14
- package/dest/validator.d.ts.map +1 -1
- package/dest/validator.js +58 -218
- package/package.json +19 -19
- package/src/checkpoint_builder.ts +120 -34
- package/src/config.ts +22 -6
- package/src/duties/validation_service.ts +3 -9
- 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 +1027 -0
- package/src/validator.ts +78 -246
- 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,8 +20,8 @@ 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
26
|
CreateCheckpointProposalLastBlockData,
|
|
30
27
|
ITxProvider,
|
|
@@ -32,7 +29,7 @@ import type {
|
|
|
32
29
|
ValidatorClientFullConfig,
|
|
33
30
|
WorldStateSynchronizer,
|
|
34
31
|
} from '@aztec/stdlib/interfaces/server';
|
|
35
|
-
import {
|
|
32
|
+
import type { L1ToL2MessageSource } from '@aztec/stdlib/messaging';
|
|
36
33
|
import {
|
|
37
34
|
type BlockProposal,
|
|
38
35
|
type BlockProposalOptions,
|
|
@@ -42,23 +39,27 @@ import {
|
|
|
42
39
|
type CheckpointProposalOptions,
|
|
43
40
|
} from '@aztec/stdlib/p2p';
|
|
44
41
|
import type { CheckpointHeader } from '@aztec/stdlib/rollup';
|
|
45
|
-
import type { BlockHeader,
|
|
42
|
+
import type { BlockHeader, Tx } from '@aztec/stdlib/tx';
|
|
46
43
|
import { AttestationTimeoutError } from '@aztec/stdlib/validators';
|
|
47
44
|
import { type TelemetryClient, type Tracer, getTelemetryClient } from '@aztec/telemetry-client';
|
|
48
|
-
import {
|
|
49
|
-
|
|
45
|
+
import {
|
|
46
|
+
createHASigner,
|
|
47
|
+
createLocalSignerWithProtection,
|
|
48
|
+
createSignerFromSharedDb,
|
|
49
|
+
} from '@aztec/validator-ha-signer/factory';
|
|
50
|
+
import { DutyType, type SigningContext, type SlashingProtectionDatabase } from '@aztec/validator-ha-signer/types';
|
|
50
51
|
import type { ValidatorHASigner } from '@aztec/validator-ha-signer/validator-ha-signer';
|
|
51
52
|
|
|
52
53
|
import { EventEmitter } from 'events';
|
|
53
54
|
import type { TypedDataDefinition } from 'viem';
|
|
54
55
|
|
|
55
|
-
import { BlockProposalHandler, type BlockProposalValidationFailureReason } from './block_proposal_handler.js';
|
|
56
56
|
import type { FullNodeCheckpointsBuilder } from './checkpoint_builder.js';
|
|
57
57
|
import { ValidationService } from './duties/validation_service.js';
|
|
58
58
|
import { HAKeyStore } from './key_store/ha_key_store.js';
|
|
59
59
|
import type { ExtendedValidatorKeyStore } from './key_store/interface.js';
|
|
60
60
|
import { NodeKeystoreAdapter } from './key_store/node_keystore_adapter.js';
|
|
61
61
|
import { ValidatorMetrics } from './metrics.js';
|
|
62
|
+
import { type BlockProposalValidationFailureReason, ProposalHandler } from './proposal_handler.js';
|
|
62
63
|
|
|
63
64
|
// We maintain a set of proposers who have proposed invalid blocks.
|
|
64
65
|
// Just cap the set to avoid unbounded growth.
|
|
@@ -101,14 +102,14 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
101
102
|
private keyStore: ExtendedValidatorKeyStore,
|
|
102
103
|
private epochCache: EpochCache,
|
|
103
104
|
private p2pClient: P2P,
|
|
104
|
-
private
|
|
105
|
+
private proposalHandler: ProposalHandler,
|
|
105
106
|
private blockSource: L2BlockSource,
|
|
106
107
|
private checkpointsBuilder: FullNodeCheckpointsBuilder,
|
|
107
108
|
private worldState: WorldStateSynchronizer,
|
|
108
109
|
private l1ToL2MessageSource: L1ToL2MessageSource,
|
|
109
110
|
private config: ValidatorClientFullConfig,
|
|
110
111
|
private blobClient: BlobClientInterface,
|
|
111
|
-
private
|
|
112
|
+
private slashingProtectionSigner: ValidatorHASigner,
|
|
112
113
|
private dateProvider: DateProvider = new DateProvider(),
|
|
113
114
|
telemetry: TelemetryClient = getTelemetryClient(),
|
|
114
115
|
log = createLogger('validator'),
|
|
@@ -196,13 +197,14 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
196
197
|
blobClient: BlobClientInterface,
|
|
197
198
|
dateProvider: DateProvider = new DateProvider(),
|
|
198
199
|
telemetry: TelemetryClient = getTelemetryClient(),
|
|
200
|
+
slashingProtectionDb?: SlashingProtectionDatabase,
|
|
199
201
|
) {
|
|
200
202
|
const metrics = new ValidatorMetrics(telemetry);
|
|
201
203
|
const blockProposalValidator = new BlockProposalValidator(epochCache, {
|
|
202
204
|
txsPermitted: !config.disableTransactions,
|
|
203
|
-
maxTxsPerBlock: config.
|
|
205
|
+
maxTxsPerBlock: config.validateMaxTxsPerBlock,
|
|
204
206
|
});
|
|
205
|
-
const
|
|
207
|
+
const proposalHandler = new ProposalHandler(
|
|
206
208
|
checkpointsBuilder,
|
|
207
209
|
worldState,
|
|
208
210
|
blockSource,
|
|
@@ -211,37 +213,53 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
211
213
|
blockProposalValidator,
|
|
212
214
|
epochCache,
|
|
213
215
|
config,
|
|
216
|
+
blobClient,
|
|
214
217
|
metrics,
|
|
215
218
|
dateProvider,
|
|
216
219
|
telemetry,
|
|
217
220
|
);
|
|
218
221
|
|
|
219
222
|
const nodeKeystoreAdapter = NodeKeystoreAdapter.fromKeyStoreManager(keyStoreManager);
|
|
220
|
-
let
|
|
221
|
-
|
|
222
|
-
|
|
223
|
+
let slashingProtectionSigner: ValidatorHASigner;
|
|
224
|
+
if (slashingProtectionDb) {
|
|
225
|
+
// Shared database mode: use a pre-existing database (e.g. for testing HA setups).
|
|
226
|
+
({ signer: slashingProtectionSigner } = createSignerFromSharedDb(slashingProtectionDb, config, {
|
|
227
|
+
telemetryClient: telemetry,
|
|
228
|
+
dateProvider,
|
|
229
|
+
}));
|
|
230
|
+
} else if (config.haSigningEnabled) {
|
|
231
|
+
// Multi-node HA mode: use PostgreSQL-backed distributed locking.
|
|
223
232
|
// If maxStuckDutiesAgeMs is not explicitly set, compute it from Aztec slot duration
|
|
224
233
|
const haConfig = {
|
|
225
234
|
...config,
|
|
226
235
|
maxStuckDutiesAgeMs: config.maxStuckDutiesAgeMs ?? epochCache.getL1Constants().slotDuration * 2 * 1000,
|
|
227
236
|
};
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
237
|
+
({ signer: slashingProtectionSigner } = await createHASigner(haConfig, {
|
|
238
|
+
telemetryClient: telemetry,
|
|
239
|
+
dateProvider,
|
|
240
|
+
}));
|
|
241
|
+
} else {
|
|
242
|
+
// Single-node mode: use LMDB-backed local signing protection.
|
|
243
|
+
// This prevents double-signing if the node crashes and restarts mid-proposal.
|
|
244
|
+
({ signer: slashingProtectionSigner } = await createLocalSignerWithProtection(config, {
|
|
245
|
+
telemetryClient: telemetry,
|
|
246
|
+
dateProvider,
|
|
247
|
+
}));
|
|
231
248
|
}
|
|
249
|
+
const validatorKeyStore: ExtendedValidatorKeyStore = new HAKeyStore(nodeKeystoreAdapter, slashingProtectionSigner);
|
|
232
250
|
|
|
233
251
|
const validator = new ValidatorClient(
|
|
234
252
|
validatorKeyStore,
|
|
235
253
|
epochCache,
|
|
236
254
|
p2pClient,
|
|
237
|
-
|
|
255
|
+
proposalHandler,
|
|
238
256
|
blockSource,
|
|
239
257
|
checkpointsBuilder,
|
|
240
258
|
worldState,
|
|
241
259
|
l1ToL2MessageSource,
|
|
242
260
|
config,
|
|
243
261
|
blobClient,
|
|
244
|
-
|
|
262
|
+
slashingProtectionSigner,
|
|
245
263
|
dateProvider,
|
|
246
264
|
telemetry,
|
|
247
265
|
);
|
|
@@ -255,8 +273,8 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
255
273
|
.filter(addr => !this.config.disabledValidators.some(disabled => disabled.equals(addr)));
|
|
256
274
|
}
|
|
257
275
|
|
|
258
|
-
public
|
|
259
|
-
return this.
|
|
276
|
+
public getProposalHandler() {
|
|
277
|
+
return this.proposalHandler;
|
|
260
278
|
}
|
|
261
279
|
|
|
262
280
|
public signWithAddress(addr: EthAddress, msg: TypedDataDefinition, context: SigningContext) {
|
|
@@ -280,24 +298,8 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
280
298
|
}
|
|
281
299
|
|
|
282
300
|
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
301
|
const newAdapter = NodeKeystoreAdapter.fromKeyStoreManager(newManager);
|
|
296
|
-
|
|
297
|
-
this.keyStore = new HAKeyStore(newAdapter, this.haSigner);
|
|
298
|
-
} else {
|
|
299
|
-
this.keyStore = newAdapter;
|
|
300
|
-
}
|
|
302
|
+
this.keyStore = new HAKeyStore(newAdapter, this.slashingProtectionSigner);
|
|
301
303
|
this.validationService = new ValidationService(this.keyStore, this.log.createChild('validation-service'));
|
|
302
304
|
}
|
|
303
305
|
|
|
@@ -345,7 +347,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
345
347
|
checkpoint: CheckpointProposalCore,
|
|
346
348
|
proposalSender: PeerId,
|
|
347
349
|
): Promise<CheckpointAttestation[] | undefined> => this.attestToCheckpointProposal(checkpoint, proposalSender);
|
|
348
|
-
this.p2pClient.
|
|
350
|
+
this.p2pClient.registerValidatorCheckpointProposalHandler(checkpointHandler);
|
|
349
351
|
|
|
350
352
|
// Duplicate proposal handler - triggers slashing for equivocation
|
|
351
353
|
this.p2pClient.registerDuplicateProposalCallback((info: DuplicateProposalInfo) => {
|
|
@@ -384,13 +386,12 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
384
386
|
return false;
|
|
385
387
|
}
|
|
386
388
|
|
|
387
|
-
//
|
|
389
|
+
// Log self-proposals from HA peers (same validator key on different nodes)
|
|
388
390
|
if (this.getValidatorAddresses().some(addr => addr.equals(proposer))) {
|
|
389
|
-
this.log.
|
|
391
|
+
this.log.verbose(`Processing block proposal from HA peer for slot ${slotNumber}`, {
|
|
390
392
|
proposer: proposer.toString(),
|
|
391
393
|
slotNumber,
|
|
392
394
|
});
|
|
393
|
-
return false;
|
|
394
395
|
}
|
|
395
396
|
|
|
396
397
|
// Check if we're in the committee (for metrics purposes)
|
|
@@ -406,25 +407,25 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
406
407
|
|
|
407
408
|
// Reexecute txs if we are part of the committee, or if slashing is enabled, or if we are configured to always reexecute.
|
|
408
409
|
// In fisherman mode, we always reexecute to validate proposals.
|
|
409
|
-
const {
|
|
410
|
-
this.config;
|
|
410
|
+
const { slashBroadcastedInvalidBlockPenalty, alwaysReexecuteBlockProposals, fishermanMode } = this.config;
|
|
411
411
|
const shouldReexecute =
|
|
412
412
|
fishermanMode ||
|
|
413
|
-
|
|
414
|
-
|
|
413
|
+
slashBroadcastedInvalidBlockPenalty > 0n ||
|
|
414
|
+
partOfCommittee ||
|
|
415
415
|
alwaysReexecuteBlockProposals ||
|
|
416
416
|
this.blobClient.canUpload();
|
|
417
417
|
|
|
418
|
-
const validationResult = await this.
|
|
418
|
+
const validationResult = await this.proposalHandler.handleBlockProposal(
|
|
419
419
|
proposal,
|
|
420
420
|
proposalSender,
|
|
421
421
|
!!shouldReexecute && !escapeHatchOpen,
|
|
422
422
|
);
|
|
423
423
|
|
|
424
424
|
if (!validationResult.isValid) {
|
|
425
|
-
this.log.warn(`Block proposal validation failed: ${validationResult.reason}`, proposalInfo);
|
|
426
|
-
|
|
427
425
|
const reason = validationResult.reason || 'unknown';
|
|
426
|
+
|
|
427
|
+
this.log.warn(`Block proposal validation failed: ${reason}`, proposalInfo);
|
|
428
|
+
|
|
428
429
|
// Classify failure reason: bad proposal vs node issue
|
|
429
430
|
const badProposalReasons: BlockProposalValidationFailureReason[] = [
|
|
430
431
|
'invalid_proposal',
|
|
@@ -479,70 +480,50 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
479
480
|
proposal: CheckpointProposalCore,
|
|
480
481
|
_proposalSender: PeerId,
|
|
481
482
|
): Promise<CheckpointAttestation[] | undefined> {
|
|
482
|
-
const
|
|
483
|
+
const proposalSlotNumber = proposal.slotNumber;
|
|
483
484
|
const proposer = proposal.getSender();
|
|
484
485
|
|
|
485
486
|
// 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}`);
|
|
487
|
+
if (await this.epochCache.isEscapeHatchOpenAtSlot(proposalSlotNumber)) {
|
|
488
|
+
this.log.warn(`Escape hatch open for slot ${proposalSlotNumber}, skipping checkpoint attestation handling`);
|
|
494
489
|
return undefined;
|
|
495
490
|
}
|
|
496
491
|
|
|
497
492
|
// Ignore proposals from ourselves (may happen in HA setups)
|
|
498
|
-
if (this.getValidatorAddresses().some(addr => addr.equals(proposer))) {
|
|
499
|
-
this.log.
|
|
493
|
+
if (proposer && this.getValidatorAddresses().some(addr => addr.equals(proposer))) {
|
|
494
|
+
this.log.debug(`Ignoring block proposal from self for slot ${proposalSlotNumber}`, {
|
|
500
495
|
proposer: proposer.toString(),
|
|
501
|
-
|
|
496
|
+
proposalSlotNumber,
|
|
502
497
|
});
|
|
503
498
|
return undefined;
|
|
504
499
|
}
|
|
505
500
|
|
|
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());
|
|
501
|
+
// Check that I have any address in the committee where this checkpoint will land before attesting
|
|
502
|
+
const inCommittee = await this.epochCache.filterInCommittee(proposalSlotNumber, this.getValidatorAddresses());
|
|
516
503
|
const partOfCommittee = inCommittee.length > 0;
|
|
517
504
|
|
|
518
505
|
const proposalInfo = {
|
|
519
|
-
|
|
506
|
+
proposalSlotNumber,
|
|
520
507
|
archive: proposal.archive.toString(),
|
|
521
|
-
proposer: proposer
|
|
522
|
-
txCount: proposal.txHashes.length,
|
|
508
|
+
proposer: proposer?.toString(),
|
|
523
509
|
};
|
|
524
|
-
this.log.info(`Received checkpoint proposal for slot ${
|
|
510
|
+
this.log.info(`Received checkpoint proposal for slot ${proposalSlotNumber}`, {
|
|
525
511
|
...proposalInfo,
|
|
526
|
-
txHashes: proposal.txHashes.map(t => t.toString()),
|
|
527
512
|
fishermanMode: this.config.fishermanMode || false,
|
|
528
513
|
});
|
|
529
514
|
|
|
530
|
-
// Validate the checkpoint proposal before attesting (unless skipCheckpointProposalValidation is set)
|
|
515
|
+
// Validate the checkpoint proposal before attesting (unless skipCheckpointProposalValidation is set).
|
|
516
|
+
// Uses the cached result from the all-nodes callback if available (avoids double validation).
|
|
531
517
|
if (this.config.skipCheckpointProposalValidation) {
|
|
532
|
-
this.log.warn(`Skipping checkpoint proposal validation for slot ${
|
|
518
|
+
this.log.warn(`Skipping checkpoint proposal validation for slot ${proposalSlotNumber}`, proposalInfo);
|
|
533
519
|
} else {
|
|
534
|
-
const validationResult = await this.
|
|
520
|
+
const validationResult = await this.proposalHandler.handleCheckpointProposal(proposal, proposalInfo);
|
|
535
521
|
if (!validationResult.isValid) {
|
|
536
522
|
this.log.warn(`Checkpoint proposal validation failed: ${validationResult.reason}`, proposalInfo);
|
|
537
523
|
return undefined;
|
|
538
524
|
}
|
|
539
525
|
}
|
|
540
526
|
|
|
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
527
|
// Check that I have any address in current committee before attesting
|
|
547
528
|
// In fisherman mode, we still create attestations for validation even if not in committee
|
|
548
529
|
if (!partOfCommittee && !this.config.fishermanMode) {
|
|
@@ -551,16 +532,19 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
551
532
|
}
|
|
552
533
|
|
|
553
534
|
// Provided all of the above checks pass, we can attest to the proposal
|
|
554
|
-
this.log.info(
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
535
|
+
this.log.info(
|
|
536
|
+
`${partOfCommittee ? 'Attesting to' : 'Validated'} checkpoint proposal for slot ${proposalSlotNumber}`,
|
|
537
|
+
{
|
|
538
|
+
...proposalInfo,
|
|
539
|
+
inCommittee: partOfCommittee,
|
|
540
|
+
fishermanMode: this.config.fishermanMode || false,
|
|
541
|
+
},
|
|
542
|
+
);
|
|
559
543
|
|
|
560
544
|
this.metrics.incSuccessfulAttestations(inCommittee.length);
|
|
561
545
|
|
|
562
546
|
// Track epoch participation per attester: count each (attester, epoch) pair at most once
|
|
563
|
-
const proposalEpoch = getEpochAtSlot(
|
|
547
|
+
const proposalEpoch = getEpochAtSlot(proposalSlotNumber, this.epochCache.getL1Constants());
|
|
564
548
|
for (const attester of inCommittee) {
|
|
565
549
|
const key = attester.toString();
|
|
566
550
|
const lastEpoch = this.lastAttestedEpochByAttester.get(key);
|
|
@@ -588,7 +572,7 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
588
572
|
|
|
589
573
|
if (this.config.fishermanMode) {
|
|
590
574
|
// bail out early and don't save attestations to the pool in fisherman mode
|
|
591
|
-
this.log.info(`Creating checkpoint attestations for slot ${
|
|
575
|
+
this.log.info(`Creating checkpoint attestations for slot ${proposalSlotNumber}`, {
|
|
592
576
|
...proposalInfo,
|
|
593
577
|
attestors: attestors.map(a => a.toString()),
|
|
594
578
|
});
|
|
@@ -637,158 +621,6 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
637
621
|
return attestations;
|
|
638
622
|
}
|
|
639
623
|
|
|
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
624
|
/**
|
|
793
625
|
* Uploads blobs for a checkpoint to the filestore (fire and forget).
|
|
794
626
|
*/
|
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxvY2tfcHJvcG9zYWxfaGFuZGxlci5kL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