@aztec/validator-client 0.0.1-commit.ef17749e1 → 0.0.1-commit.f1b29a41e
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 +9 -12
- package/dest/checkpoint_builder.d.ts +10 -7
- package/dest/checkpoint_builder.d.ts.map +1 -1
- package/dest/checkpoint_builder.js +64 -41
- package/dest/config.d.ts +1 -1
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +0 -5
- package/dest/duties/validation_service.js +1 -1
- 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/{block_proposal_handler.js → proposal_handler.js} +425 -13
- package/dest/validator.d.ts +8 -13
- package/dest/validator.d.ts.map +1 -1
- package/dest/validator.js +43 -215
- package/package.json +19 -19
- package/src/checkpoint_builder.ts +79 -52
- package/src/config.ts +0 -5
- package/src/duties/validation_service.ts +1 -1
- 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/{block_proposal_handler.ts → proposal_handler.ts} +487 -14
- package/src/validator.ts +60 -234
- package/dest/block_proposal_handler.d.ts +0 -63
- package/dest/block_proposal_handler.d.ts.map +0 -1
|
@@ -63,7 +63,9 @@ function _ts_dispose_resources(env) {
|
|
|
63
63
|
return next();
|
|
64
64
|
})(env);
|
|
65
65
|
}
|
|
66
|
+
import { encodeCheckpointBlobDataFromBlocks, getBlobsPerL1Block } from '@aztec/blob-lib';
|
|
66
67
|
import { INITIAL_L2_BLOCK_NUM } from '@aztec/constants';
|
|
68
|
+
import { validateFeeAssetPriceModifier } from '@aztec/ethereum/contracts';
|
|
67
69
|
import { BlockNumber, CheckpointNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
68
70
|
import { pick } from '@aztec/foundation/collection';
|
|
69
71
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
@@ -71,12 +73,14 @@ import { TimeoutError } from '@aztec/foundation/error';
|
|
|
71
73
|
import { createLogger } from '@aztec/foundation/log';
|
|
72
74
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
73
75
|
import { DateProvider, Timer } from '@aztec/foundation/timer';
|
|
76
|
+
import { validateCheckpoint } from '@aztec/stdlib/checkpoint';
|
|
74
77
|
import { getEpochAtSlot, getTimestampForSlot } from '@aztec/stdlib/epoch-helpers';
|
|
75
78
|
import { Gas } from '@aztec/stdlib/gas';
|
|
76
|
-
import { computeInHashFromL1ToL2Messages } from '@aztec/stdlib/messaging';
|
|
77
|
-
import {
|
|
79
|
+
import { accumulateCheckpointOutHashes, computeInHashFromL1ToL2Messages } from '@aztec/stdlib/messaging';
|
|
80
|
+
import { MerkleTreeId } from '@aztec/stdlib/trees';
|
|
81
|
+
import { ReExFailedTxsError, ReExInitialStateMismatchError, ReExStateMismatchError, ReExTimeoutError, TransactionsNotAvailableError } from '@aztec/stdlib/validators';
|
|
78
82
|
import { getTelemetryClient } from '@aztec/telemetry-client';
|
|
79
|
-
export class
|
|
83
|
+
/** Handles block and checkpoint proposals for both validator and non-validator nodes. */ export class ProposalHandler {
|
|
80
84
|
checkpointsBuilder;
|
|
81
85
|
worldState;
|
|
82
86
|
blockSource;
|
|
@@ -85,11 +89,15 @@ export class BlockProposalHandler {
|
|
|
85
89
|
blockProposalValidator;
|
|
86
90
|
epochCache;
|
|
87
91
|
config;
|
|
92
|
+
blobClient;
|
|
88
93
|
metrics;
|
|
89
94
|
dateProvider;
|
|
90
95
|
log;
|
|
91
96
|
tracer;
|
|
92
|
-
|
|
97
|
+
/** Cached last checkpoint validation result to avoid double-validation on validator nodes. */ lastCheckpointValidationResult;
|
|
98
|
+
/** Archiver reference for setting proposed checkpoints (pipelining). Set via register(). */ archiver;
|
|
99
|
+
/** Returns current validator addresses for own-proposal detection. Set via register(). */ getOwnValidatorAddresses;
|
|
100
|
+
constructor(checkpointsBuilder, worldState, blockSource, l1ToL2MessageSource, txProvider, blockProposalValidator, epochCache, config, blobClient, metrics, dateProvider = new DateProvider(), telemetry = getTelemetryClient(), log = createLogger('validator:proposal-handler')){
|
|
93
101
|
this.checkpointsBuilder = checkpointsBuilder;
|
|
94
102
|
this.worldState = worldState;
|
|
95
103
|
this.blockSource = blockSource;
|
|
@@ -98,18 +106,27 @@ export class BlockProposalHandler {
|
|
|
98
106
|
this.blockProposalValidator = blockProposalValidator;
|
|
99
107
|
this.epochCache = epochCache;
|
|
100
108
|
this.config = config;
|
|
109
|
+
this.blobClient = blobClient;
|
|
101
110
|
this.metrics = metrics;
|
|
102
111
|
this.dateProvider = dateProvider;
|
|
103
112
|
this.log = log;
|
|
104
113
|
if (config.fishermanMode) {
|
|
105
114
|
this.log = this.log.createChild('[FISHERMAN]');
|
|
106
115
|
}
|
|
107
|
-
this.tracer = telemetry.getTracer('
|
|
116
|
+
this.tracer = telemetry.getTracer('ProposalHandler');
|
|
108
117
|
}
|
|
109
|
-
|
|
118
|
+
/**
|
|
119
|
+
* Registers handlers for block and checkpoint proposals on the p2p client.
|
|
120
|
+
* Block proposals are registered for non-validator nodes (validators register their own enhanced handler).
|
|
121
|
+
* The all-nodes checkpoint proposal handler is always registered for validation, caching, and pipelining.
|
|
122
|
+
* @param archiver - Archiver reference for setting proposed checkpoints (pipelining)
|
|
123
|
+
* @param getOwnValidatorAddresses - Returns current validator addresses for own-proposal detection
|
|
124
|
+
*/ register(p2pClient, shouldReexecute, archiver, getOwnValidatorAddresses) {
|
|
125
|
+
this.archiver = archiver;
|
|
126
|
+
this.getOwnValidatorAddresses = getOwnValidatorAddresses;
|
|
110
127
|
// Non-validator handler that processes or re-executes for monitoring but does not attest.
|
|
111
128
|
// Returns boolean indicating whether the proposal was valid.
|
|
112
|
-
const
|
|
129
|
+
const blockHandler = async (proposal, proposalSender)=>{
|
|
113
130
|
try {
|
|
114
131
|
const { slotNumber, blockNumber } = proposal;
|
|
115
132
|
const result = await this.handleBlockProposal(proposal, proposalSender, shouldReexecute);
|
|
@@ -136,7 +153,40 @@ export class BlockProposalHandler {
|
|
|
136
153
|
return false;
|
|
137
154
|
}
|
|
138
155
|
};
|
|
139
|
-
p2pClient.registerBlockProposalHandler(
|
|
156
|
+
p2pClient.registerBlockProposalHandler(blockHandler);
|
|
157
|
+
// All-nodes checkpoint proposal handler: validates, caches, and sets proposed checkpoint for pipelining.
|
|
158
|
+
// Runs for all nodes (validators and non-validators). Validators get the cached result in the
|
|
159
|
+
// validator-specific callback (attestToCheckpointProposal) which runs after this one.
|
|
160
|
+
const checkpointHandler = async (proposal, _sender)=>{
|
|
161
|
+
try {
|
|
162
|
+
const proposalInfo = {
|
|
163
|
+
slot: proposal.slotNumber,
|
|
164
|
+
archive: proposal.archive.toString(),
|
|
165
|
+
proposer: proposal.getSender()?.toString()
|
|
166
|
+
};
|
|
167
|
+
// For own proposals, skip validation — the proposer already built and validated the checkpoint
|
|
168
|
+
const proposer = proposal.getSender();
|
|
169
|
+
const ownAddresses = this.getOwnValidatorAddresses?.();
|
|
170
|
+
const isOwnProposal = proposer && ownAddresses?.some((addr)=>addr === proposer.toString());
|
|
171
|
+
if (isOwnProposal) {
|
|
172
|
+
this.log.debug(`Skipping validation for own checkpoint proposal at slot ${proposal.slotNumber}`);
|
|
173
|
+
if (this.archiver && this.epochCache.isProposerPipeliningEnabled()) {
|
|
174
|
+
await this.setProposedCheckpointFromBlocks(proposal);
|
|
175
|
+
}
|
|
176
|
+
return undefined;
|
|
177
|
+
}
|
|
178
|
+
const result = await this.handleCheckpointProposal(proposal, proposalInfo);
|
|
179
|
+
if (result.isValid && this.archiver && this.epochCache.isProposerPipeliningEnabled()) {
|
|
180
|
+
await this.setProposedCheckpointFromValidation(proposal);
|
|
181
|
+
}
|
|
182
|
+
} catch (err) {
|
|
183
|
+
this.log.warn(`Error handling checkpoint proposal for slot ${proposal.slotNumber}`, {
|
|
184
|
+
err
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
return undefined;
|
|
188
|
+
};
|
|
189
|
+
p2pClient.registerAllNodesCheckpointProposalHandler(checkpointHandler);
|
|
140
190
|
return this;
|
|
141
191
|
}
|
|
142
192
|
async handleBlockProposal(proposal, proposalSender, shouldReexecute) {
|
|
@@ -153,7 +203,9 @@ export class BlockProposalHandler {
|
|
|
153
203
|
}
|
|
154
204
|
const proposalInfo = {
|
|
155
205
|
...proposal.toBlockInfo(),
|
|
156
|
-
proposer: proposer.toString()
|
|
206
|
+
proposer: proposer.toString(),
|
|
207
|
+
blockNumber: undefined,
|
|
208
|
+
checkpointNumber: undefined
|
|
157
209
|
};
|
|
158
210
|
this.log.info(`Processing proposal for slot ${slotNumber}`, {
|
|
159
211
|
...proposalInfo,
|
|
@@ -169,7 +221,26 @@ export class BlockProposalHandler {
|
|
|
169
221
|
reason: 'invalid_proposal'
|
|
170
222
|
};
|
|
171
223
|
}
|
|
172
|
-
//
|
|
224
|
+
// Ensure the block source is synced before checking for existing blocks,
|
|
225
|
+
// since a proposed checkpoint prune may remove blocks we'd otherwise find.
|
|
226
|
+
// This affects mostly the block_number_already_exists check, since a pending
|
|
227
|
+
// checkpoint prune could remove a block that would conflict with this proposal.
|
|
228
|
+
// When pipelining is enabled, the proposer builds ahead of L1 submission, so the
|
|
229
|
+
// block source won't have synced to the proposed slot yet. Skip the sync wait to
|
|
230
|
+
// avoid eating into the attestation window.
|
|
231
|
+
if (!this.epochCache.isProposerPipeliningEnabled()) {
|
|
232
|
+
const blockSourceSync = await this.waitForBlockSourceSync(slotNumber);
|
|
233
|
+
if (!blockSourceSync) {
|
|
234
|
+
this.log.warn(`Block source is not synced, skipping processing`, proposalInfo);
|
|
235
|
+
return {
|
|
236
|
+
isValid: false,
|
|
237
|
+
reason: 'block_source_not_synced'
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
// Check that the parent proposal is a block we know, otherwise reexecution would fail.
|
|
242
|
+
// If we don't find it immediately, we keep retrying for a while; it may be we still
|
|
243
|
+
// need to process other block proposals to get to it.
|
|
173
244
|
const parentBlock = await this.getParentBlock(proposal);
|
|
174
245
|
if (parentBlock === undefined) {
|
|
175
246
|
this.log.warn(`Parent block for proposal not found, skipping processing`, proposalInfo);
|
|
@@ -192,6 +263,7 @@ export class BlockProposalHandler {
|
|
|
192
263
|
}
|
|
193
264
|
// Compute the block number based on the parent block
|
|
194
265
|
const blockNumber = parentBlock === 'genesis' ? BlockNumber(INITIAL_L2_BLOCK_NUM) : BlockNumber(parentBlock.header.getBlockNumber() + 1);
|
|
266
|
+
proposalInfo.blockNumber = blockNumber;
|
|
195
267
|
// Check that this block number does not exist already
|
|
196
268
|
const existingBlock = await this.blockSource.getBlockHeader(blockNumber);
|
|
197
269
|
if (existingBlock) {
|
|
@@ -208,7 +280,7 @@ export class BlockProposalHandler {
|
|
|
208
280
|
pinnedPeer: proposalSender,
|
|
209
281
|
deadline: this.getReexecutionDeadline(slotNumber, config)
|
|
210
282
|
});
|
|
211
|
-
// If reexecution is disabled, bail. We
|
|
283
|
+
// If reexecution is disabled, bail. We were just interested in triggering tx collection.
|
|
212
284
|
if (!shouldReexecute) {
|
|
213
285
|
this.log.info(`Received valid block ${blockNumber} proposal at index ${proposal.indexWithinCheckpoint} on slot ${slotNumber}`, proposalInfo);
|
|
214
286
|
return {
|
|
@@ -226,6 +298,7 @@ export class BlockProposalHandler {
|
|
|
226
298
|
};
|
|
227
299
|
}
|
|
228
300
|
const checkpointNumber = checkpointResult.checkpointNumber;
|
|
301
|
+
proposalInfo.checkpointNumber = checkpointNumber;
|
|
229
302
|
// Check that I have the same set of l1ToL2Messages as the proposal
|
|
230
303
|
const l1ToL2Messages = await this.l1ToL2MessageSource.getL1ToL2Messages(checkpointNumber);
|
|
231
304
|
const computedInHash = computeInHashFromL1ToL2Messages(l1ToL2Messages);
|
|
@@ -274,7 +347,7 @@ export class BlockProposalHandler {
|
|
|
274
347
|
}
|
|
275
348
|
// If we succeeded, push this block into the archiver (unless disabled)
|
|
276
349
|
if (reexecutionResult?.block && this.config.skipPushProposedBlocksToArchiver === false) {
|
|
277
|
-
await this.blockSource.addBlock(reexecutionResult
|
|
350
|
+
await this.blockSource.addBlock(reexecutionResult.block);
|
|
278
351
|
}
|
|
279
352
|
this.log.info(`Successfully re-executed block ${blockNumber} proposal at index ${proposal.indexWithinCheckpoint} on slot ${slotNumber}`, {
|
|
280
353
|
...proposalInfo,
|
|
@@ -444,8 +517,39 @@ export class BlockProposalHandler {
|
|
|
444
517
|
const nextSlotTimestampSeconds = Number(getTimestampForSlot(SlotNumber(slot + 1), config));
|
|
445
518
|
return new Date(nextSlotTimestampSeconds * 1000);
|
|
446
519
|
}
|
|
520
|
+
/** Waits for the block source to sync L1 data up to at least the slot before the given one. */ async waitForBlockSourceSync(slot) {
|
|
521
|
+
const deadline = this.getReexecutionDeadline(slot, this.checkpointsBuilder.getConfig());
|
|
522
|
+
const timeoutMs = deadline.getTime() - this.dateProvider.now();
|
|
523
|
+
if (slot === 0) {
|
|
524
|
+
return true;
|
|
525
|
+
}
|
|
526
|
+
// Make a quick check before triggering an archiver sync
|
|
527
|
+
const syncedSlot = await this.blockSource.getSyncedL2SlotNumber();
|
|
528
|
+
if (syncedSlot !== undefined && syncedSlot + 1 >= slot) {
|
|
529
|
+
return true;
|
|
530
|
+
}
|
|
531
|
+
try {
|
|
532
|
+
// Trigger an immediate sync of the block source, and wait until it reports being synced to the required slot
|
|
533
|
+
return await retryUntil(async ()=>{
|
|
534
|
+
await this.blockSource.syncImmediate();
|
|
535
|
+
const syncedSlot = await this.blockSource.getSyncedL2SlotNumber();
|
|
536
|
+
return syncedSlot !== undefined && syncedSlot + 1 >= slot;
|
|
537
|
+
}, 'wait for block source sync', timeoutMs / 1000, 0.5);
|
|
538
|
+
} catch (err) {
|
|
539
|
+
if (err instanceof TimeoutError) {
|
|
540
|
+
this.log.warn(`Timed out waiting for block source to sync to slot ${slot}`);
|
|
541
|
+
return false;
|
|
542
|
+
} else {
|
|
543
|
+
throw err;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}
|
|
447
547
|
getReexecuteFailureReason(err) {
|
|
448
|
-
if (err instanceof
|
|
548
|
+
if (err instanceof TransactionsNotAvailableError) {
|
|
549
|
+
return 'txs_not_available';
|
|
550
|
+
} else if (err instanceof ReExInitialStateMismatchError) {
|
|
551
|
+
return 'initial_state_mismatch';
|
|
552
|
+
} else if (err instanceof ReExStateMismatchError) {
|
|
449
553
|
return 'state_mismatch';
|
|
450
554
|
} else if (err instanceof ReExFailedTxsError) {
|
|
451
555
|
return 'failed_txs';
|
|
@@ -479,6 +583,12 @@ export class BlockProposalHandler {
|
|
|
479
583
|
const parentBlockNumber = BlockNumber(blockNumber - 1);
|
|
480
584
|
await this.worldState.syncImmediate(parentBlockNumber);
|
|
481
585
|
const fork = _ts_add_disposable_resource(env, await this.worldState.fork(parentBlockNumber), true);
|
|
586
|
+
// Verify the fork's archive root matches the proposal's expected last archive.
|
|
587
|
+
// If they don't match, our world state synced to a different chain and reexecution would fail.
|
|
588
|
+
const forkArchiveRoot = new Fr((await fork.getTreeInfo(MerkleTreeId.ARCHIVE)).root);
|
|
589
|
+
if (!forkArchiveRoot.equals(proposal.blockHeader.lastArchive.root)) {
|
|
590
|
+
throw new ReExInitialStateMismatchError(proposal.blockHeader.lastArchive.root, forkArchiveRoot);
|
|
591
|
+
}
|
|
482
592
|
// Build checkpoint constants from proposal (excludes blockNumber which is per-block)
|
|
483
593
|
const constants = {
|
|
484
594
|
chainId: new Fr(config.l1ChainId),
|
|
@@ -495,6 +605,8 @@ export class BlockProposalHandler {
|
|
|
495
605
|
const deadline = this.getReexecutionDeadline(slot, config);
|
|
496
606
|
const maxBlockGas = this.config.validateMaxL2BlockGas !== undefined || this.config.validateMaxDABlockGas !== undefined ? new Gas(this.config.validateMaxDABlockGas ?? Infinity, this.config.validateMaxL2BlockGas ?? Infinity) : undefined;
|
|
497
607
|
const result = await checkpointBuilder.buildBlock(txs, blockNumber, blockHeader.globalVariables.timestamp, {
|
|
608
|
+
isBuildingProposal: false,
|
|
609
|
+
minValidTxs: 0,
|
|
498
610
|
deadline,
|
|
499
611
|
expectedEndState: blockHeader.state,
|
|
500
612
|
maxTransactions: this.config.validateMaxTxsPerBlock,
|
|
@@ -548,4 +660,304 @@ export class BlockProposalHandler {
|
|
|
548
660
|
if (result) await result;
|
|
549
661
|
}
|
|
550
662
|
}
|
|
663
|
+
/**
|
|
664
|
+
* Validates a checkpoint proposal, caches the result, and uploads blobs if configured.
|
|
665
|
+
* Returns a cached result if the same proposal (archive + slot) was already validated.
|
|
666
|
+
* Used by both the all-nodes callback (via register) and the validator client (via delegation).
|
|
667
|
+
*/ async handleCheckpointProposal(proposal, proposalInfo) {
|
|
668
|
+
const slot = proposal.slotNumber;
|
|
669
|
+
// Check cache: same archive+slot means we already validated this proposal
|
|
670
|
+
if (this.lastCheckpointValidationResult && this.lastCheckpointValidationResult.archive.equals(proposal.archive) && this.lastCheckpointValidationResult.slotNumber === slot) {
|
|
671
|
+
this.log.debug(`Returning cached validation result for checkpoint proposal at slot ${slot}`, proposalInfo);
|
|
672
|
+
return this.lastCheckpointValidationResult.result;
|
|
673
|
+
}
|
|
674
|
+
const proposer = proposal.getSender();
|
|
675
|
+
if (!proposer) {
|
|
676
|
+
this.log.warn(`Received checkpoint proposal with invalid signature for slot ${proposal.slotNumber}`);
|
|
677
|
+
const result = {
|
|
678
|
+
isValid: false,
|
|
679
|
+
reason: 'invalid_signature'
|
|
680
|
+
};
|
|
681
|
+
this.lastCheckpointValidationResult = {
|
|
682
|
+
archive: proposal.archive,
|
|
683
|
+
slotNumber: slot,
|
|
684
|
+
result
|
|
685
|
+
};
|
|
686
|
+
return result;
|
|
687
|
+
}
|
|
688
|
+
if (!validateFeeAssetPriceModifier(proposal.feeAssetPriceModifier)) {
|
|
689
|
+
this.log.warn(`Received checkpoint proposal with invalid feeAssetPriceModifier ${proposal.feeAssetPriceModifier} for slot ${proposal.slotNumber}`);
|
|
690
|
+
const result = {
|
|
691
|
+
isValid: false,
|
|
692
|
+
reason: 'invalid_fee_asset_price_modifier'
|
|
693
|
+
};
|
|
694
|
+
this.lastCheckpointValidationResult = {
|
|
695
|
+
archive: proposal.archive,
|
|
696
|
+
slotNumber: slot,
|
|
697
|
+
result
|
|
698
|
+
};
|
|
699
|
+
return result;
|
|
700
|
+
}
|
|
701
|
+
const result = await this.validateCheckpointProposal(proposal, proposalInfo);
|
|
702
|
+
this.lastCheckpointValidationResult = {
|
|
703
|
+
archive: proposal.archive,
|
|
704
|
+
slotNumber: slot,
|
|
705
|
+
result
|
|
706
|
+
};
|
|
707
|
+
// Upload blobs to filestore if validation passed (fire and forget)
|
|
708
|
+
if (result.isValid) {
|
|
709
|
+
this.tryUploadBlobsForCheckpoint(proposal, proposalInfo);
|
|
710
|
+
}
|
|
711
|
+
return result;
|
|
712
|
+
}
|
|
713
|
+
/**
|
|
714
|
+
* Validates a checkpoint proposal by building the full checkpoint and comparing it with the proposal.
|
|
715
|
+
* @returns Validation result with isValid flag and reason if invalid.
|
|
716
|
+
*/ async validateCheckpointProposal(proposal, proposalInfo) {
|
|
717
|
+
const env = {
|
|
718
|
+
stack: [],
|
|
719
|
+
error: void 0,
|
|
720
|
+
hasError: false
|
|
721
|
+
};
|
|
722
|
+
try {
|
|
723
|
+
const slot = proposal.slotNumber;
|
|
724
|
+
// Timeout block syncing at the start of the next slot
|
|
725
|
+
const config = this.checkpointsBuilder.getConfig();
|
|
726
|
+
const nextSlotTimestampSeconds = Number(getTimestampForSlot(SlotNumber(slot + 1), config));
|
|
727
|
+
const timeoutSeconds = Math.max(1, nextSlotTimestampSeconds - Math.floor(this.dateProvider.now() / 1000));
|
|
728
|
+
// Wait for last block to sync by archive
|
|
729
|
+
let lastBlockHeader;
|
|
730
|
+
try {
|
|
731
|
+
lastBlockHeader = await retryUntil(async ()=>{
|
|
732
|
+
await this.blockSource.syncImmediate();
|
|
733
|
+
return this.blockSource.getBlockHeaderByArchive(proposal.archive);
|
|
734
|
+
}, `waiting for block with archive ${proposal.archive.toString()} for slot ${slot}`, timeoutSeconds, 0.5);
|
|
735
|
+
} catch (err) {
|
|
736
|
+
if (err instanceof TimeoutError) {
|
|
737
|
+
this.log.warn(`Timed out waiting for block with archive matching checkpoint proposal`, proposalInfo);
|
|
738
|
+
return {
|
|
739
|
+
isValid: false,
|
|
740
|
+
reason: 'last_block_not_found'
|
|
741
|
+
};
|
|
742
|
+
}
|
|
743
|
+
this.log.error(`Error fetching last block for checkpoint proposal`, err, proposalInfo);
|
|
744
|
+
return {
|
|
745
|
+
isValid: false,
|
|
746
|
+
reason: 'block_fetch_error'
|
|
747
|
+
};
|
|
748
|
+
}
|
|
749
|
+
if (!lastBlockHeader) {
|
|
750
|
+
this.log.warn(`Last block not found for checkpoint proposal`, proposalInfo);
|
|
751
|
+
return {
|
|
752
|
+
isValid: false,
|
|
753
|
+
reason: 'last_block_not_found'
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
// Get all full blocks for the slot and checkpoint
|
|
757
|
+
const blocks = await this.blockSource.getBlocksForSlot(slot);
|
|
758
|
+
if (blocks.length === 0) {
|
|
759
|
+
this.log.warn(`No blocks found for slot ${slot}`, proposalInfo);
|
|
760
|
+
return {
|
|
761
|
+
isValid: false,
|
|
762
|
+
reason: 'no_blocks_for_slot'
|
|
763
|
+
};
|
|
764
|
+
}
|
|
765
|
+
// Ensure the last block for this slot matches the archive in the checkpoint proposal
|
|
766
|
+
if (!blocks.at(-1)?.archive.root.equals(proposal.archive)) {
|
|
767
|
+
this.log.warn(`Last block archive mismatch for checkpoint proposal`, proposalInfo);
|
|
768
|
+
return {
|
|
769
|
+
isValid: false,
|
|
770
|
+
reason: 'last_block_archive_mismatch'
|
|
771
|
+
};
|
|
772
|
+
}
|
|
773
|
+
this.log.debug(`Found ${blocks.length} blocks for slot ${slot}`, {
|
|
774
|
+
...proposalInfo,
|
|
775
|
+
blockNumbers: blocks.map((b)=>b.number)
|
|
776
|
+
});
|
|
777
|
+
// Get checkpoint constants from first block
|
|
778
|
+
const firstBlock = blocks[0];
|
|
779
|
+
const constants = this.extractCheckpointConstants(firstBlock);
|
|
780
|
+
const checkpointNumber = firstBlock.checkpointNumber;
|
|
781
|
+
// Get L1-to-L2 messages for this checkpoint
|
|
782
|
+
const l1ToL2Messages = await this.l1ToL2MessageSource.getL1ToL2Messages(checkpointNumber);
|
|
783
|
+
// Collect the out hashes of all the checkpoints before this one in the same epoch
|
|
784
|
+
const epoch = getEpochAtSlot(slot, this.epochCache.getL1Constants());
|
|
785
|
+
const previousCheckpointOutHashes = (await this.blockSource.getCheckpointsDataForEpoch(epoch)).filter((c)=>c.checkpointNumber < checkpointNumber).map((c)=>c.checkpointOutHash);
|
|
786
|
+
// Fork world state at the block before the first block
|
|
787
|
+
const parentBlockNumber = BlockNumber(firstBlock.number - 1);
|
|
788
|
+
const fork = _ts_add_disposable_resource(env, await this.checkpointsBuilder.getFork(parentBlockNumber), true);
|
|
789
|
+
// Create checkpoint builder with all existing blocks
|
|
790
|
+
const checkpointBuilder = await this.checkpointsBuilder.openCheckpoint(checkpointNumber, constants, proposal.feeAssetPriceModifier, l1ToL2Messages, previousCheckpointOutHashes, fork, blocks, this.log.getBindings());
|
|
791
|
+
// Complete the checkpoint to get computed values
|
|
792
|
+
const computedCheckpoint = await checkpointBuilder.completeCheckpoint();
|
|
793
|
+
// Compare checkpoint header with proposal
|
|
794
|
+
if (!computedCheckpoint.header.equals(proposal.checkpointHeader)) {
|
|
795
|
+
this.log.warn(`Checkpoint header mismatch`, {
|
|
796
|
+
...proposalInfo,
|
|
797
|
+
computed: computedCheckpoint.header.toInspect(),
|
|
798
|
+
proposal: proposal.checkpointHeader.toInspect()
|
|
799
|
+
});
|
|
800
|
+
return {
|
|
801
|
+
isValid: false,
|
|
802
|
+
reason: 'checkpoint_header_mismatch'
|
|
803
|
+
};
|
|
804
|
+
}
|
|
805
|
+
// Compare archive root with proposal
|
|
806
|
+
if (!computedCheckpoint.archive.root.equals(proposal.archive)) {
|
|
807
|
+
this.log.warn(`Archive root mismatch`, {
|
|
808
|
+
...proposalInfo,
|
|
809
|
+
computed: computedCheckpoint.archive.root.toString(),
|
|
810
|
+
proposal: proposal.archive.toString()
|
|
811
|
+
});
|
|
812
|
+
return {
|
|
813
|
+
isValid: false,
|
|
814
|
+
reason: 'archive_mismatch'
|
|
815
|
+
};
|
|
816
|
+
}
|
|
817
|
+
// Check that the accumulated epoch out hash matches the value in the proposal.
|
|
818
|
+
// The epoch out hash is the accumulated hash of all checkpoint out hashes in the epoch.
|
|
819
|
+
const checkpointOutHash = computedCheckpoint.getCheckpointOutHash();
|
|
820
|
+
const computedEpochOutHash = accumulateCheckpointOutHashes([
|
|
821
|
+
...previousCheckpointOutHashes,
|
|
822
|
+
checkpointOutHash
|
|
823
|
+
]);
|
|
824
|
+
const proposalEpochOutHash = proposal.checkpointHeader.epochOutHash;
|
|
825
|
+
if (!computedEpochOutHash.equals(proposalEpochOutHash)) {
|
|
826
|
+
this.log.warn(`Epoch out hash mismatch`, {
|
|
827
|
+
proposalEpochOutHash: proposalEpochOutHash.toString(),
|
|
828
|
+
computedEpochOutHash: computedEpochOutHash.toString(),
|
|
829
|
+
checkpointOutHash: checkpointOutHash.toString(),
|
|
830
|
+
previousCheckpointOutHashes: previousCheckpointOutHashes.map((h)=>h.toString()),
|
|
831
|
+
...proposalInfo
|
|
832
|
+
});
|
|
833
|
+
return {
|
|
834
|
+
isValid: false,
|
|
835
|
+
reason: 'out_hash_mismatch'
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
// Final round of validations on the checkpoint, just in case.
|
|
839
|
+
try {
|
|
840
|
+
validateCheckpoint(computedCheckpoint, {
|
|
841
|
+
rollupManaLimit: this.checkpointsBuilder.getConfig().rollupManaLimit,
|
|
842
|
+
maxDABlockGas: this.config.validateMaxDABlockGas,
|
|
843
|
+
maxL2BlockGas: this.config.validateMaxL2BlockGas,
|
|
844
|
+
maxTxsPerBlock: this.config.validateMaxTxsPerBlock,
|
|
845
|
+
maxTxsPerCheckpoint: this.config.validateMaxTxsPerCheckpoint
|
|
846
|
+
});
|
|
847
|
+
} catch (err) {
|
|
848
|
+
this.log.warn(`Checkpoint validation failed: ${err}`, proposalInfo);
|
|
849
|
+
return {
|
|
850
|
+
isValid: false,
|
|
851
|
+
reason: 'checkpoint_validation_failed'
|
|
852
|
+
};
|
|
853
|
+
}
|
|
854
|
+
this.log.verbose(`Checkpoint proposal validation successful for slot ${slot}`, proposalInfo);
|
|
855
|
+
return {
|
|
856
|
+
isValid: true
|
|
857
|
+
};
|
|
858
|
+
} catch (e) {
|
|
859
|
+
env.error = e;
|
|
860
|
+
env.hasError = true;
|
|
861
|
+
} finally{
|
|
862
|
+
const result = _ts_dispose_resources(env);
|
|
863
|
+
if (result) await result;
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
/** Extracts checkpoint global variables from a block. */ extractCheckpointConstants(block) {
|
|
867
|
+
const gv = block.header.globalVariables;
|
|
868
|
+
return {
|
|
869
|
+
chainId: gv.chainId,
|
|
870
|
+
version: gv.version,
|
|
871
|
+
slotNumber: gv.slotNumber,
|
|
872
|
+
timestamp: gv.timestamp,
|
|
873
|
+
coinbase: gv.coinbase,
|
|
874
|
+
feeRecipient: gv.feeRecipient,
|
|
875
|
+
gasFees: gv.gasFees
|
|
876
|
+
};
|
|
877
|
+
}
|
|
878
|
+
/** Triggers blob upload for a checkpoint if the blob client can upload (fire and forget). */ tryUploadBlobsForCheckpoint(proposal, proposalInfo) {
|
|
879
|
+
if (this.blobClient.canUpload()) {
|
|
880
|
+
void this.uploadBlobsForCheckpoint(proposal, proposalInfo);
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
/** Uploads blobs for a checkpoint to the filestore. */ async uploadBlobsForCheckpoint(proposal, proposalInfo) {
|
|
884
|
+
try {
|
|
885
|
+
const lastBlockHeader = await this.blockSource.getBlockHeaderByArchive(proposal.archive);
|
|
886
|
+
if (!lastBlockHeader) {
|
|
887
|
+
this.log.warn(`Failed to get last block header for blob upload`, proposalInfo);
|
|
888
|
+
return;
|
|
889
|
+
}
|
|
890
|
+
const blocks = await this.blockSource.getBlocksForSlot(proposal.slotNumber);
|
|
891
|
+
if (blocks.length === 0) {
|
|
892
|
+
this.log.warn(`No blocks found for blob upload`, proposalInfo);
|
|
893
|
+
return;
|
|
894
|
+
}
|
|
895
|
+
const blockBlobData = blocks.map((b)=>b.toBlockBlobData());
|
|
896
|
+
const blobFields = encodeCheckpointBlobDataFromBlocks(blockBlobData);
|
|
897
|
+
const blobs = await getBlobsPerL1Block(blobFields);
|
|
898
|
+
await this.blobClient.sendBlobsToFilestore(blobs);
|
|
899
|
+
this.log.debug(`Uploaded ${blobs.length} blobs to filestore for checkpoint at slot ${proposal.slotNumber}`, {
|
|
900
|
+
...proposalInfo,
|
|
901
|
+
numBlobs: blobs.length
|
|
902
|
+
});
|
|
903
|
+
} catch (err) {
|
|
904
|
+
this.log.warn(`Failed to upload blobs for checkpoint: ${err}`, proposalInfo);
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
/**
|
|
908
|
+
* Derives proposed checkpoint data from validated blocks and sets it on the archiver.
|
|
909
|
+
* Used after successful validation of a foreign proposal.
|
|
910
|
+
* Does not retry since we already waited for the block during validation.
|
|
911
|
+
*/ async setProposedCheckpointFromValidation(proposal) {
|
|
912
|
+
if (!this.archiver) {
|
|
913
|
+
return;
|
|
914
|
+
}
|
|
915
|
+
const blockData = await this.blockSource.getBlockDataByArchive(proposal.archive);
|
|
916
|
+
if (!blockData) {
|
|
917
|
+
this.log.debug(`Block data not found for checkpoint proposal archive, cannot set proposed checkpoint`, {
|
|
918
|
+
archive: proposal.archive.toString()
|
|
919
|
+
});
|
|
920
|
+
return;
|
|
921
|
+
}
|
|
922
|
+
await this.archiver.setProposedCheckpoint({
|
|
923
|
+
header: proposal.checkpointHeader,
|
|
924
|
+
checkpointNumber: blockData.checkpointNumber,
|
|
925
|
+
startBlock: BlockNumber(blockData.header.getBlockNumber() - blockData.indexWithinCheckpoint),
|
|
926
|
+
blockCount: blockData.indexWithinCheckpoint + 1,
|
|
927
|
+
totalManaUsed: proposal.checkpointHeader.totalManaUsed.toBigInt(),
|
|
928
|
+
feeAssetPriceModifier: proposal.feeAssetPriceModifier
|
|
929
|
+
});
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* Sets proposed checkpoint from blocks for own proposals (skips full validation).
|
|
933
|
+
* Retries fetching block data since the checkpoint proposal often arrives before the last block
|
|
934
|
+
* finishes re-execution.
|
|
935
|
+
*/ async setProposedCheckpointFromBlocks(proposal) {
|
|
936
|
+
if (!this.archiver) {
|
|
937
|
+
return;
|
|
938
|
+
}
|
|
939
|
+
let blockData = await this.blockSource.getBlockDataByArchive(proposal.archive);
|
|
940
|
+
if (!blockData) {
|
|
941
|
+
// The checkpoint proposal often arrives before the last block finishes re-execution.
|
|
942
|
+
// Retry until we find the data or give up at the end of the slot.
|
|
943
|
+
const nextSlot = this.epochCache.getSlotNow() + 1;
|
|
944
|
+
const timeOfNextSlot = getTimestampForSlot(SlotNumber(nextSlot), await this.archiver.getL1Constants());
|
|
945
|
+
const timeoutSeconds = Math.max(1, Number(timeOfNextSlot) - Math.floor(this.dateProvider.now() / 1000));
|
|
946
|
+
blockData = await retryUntil(()=>this.blockSource.getBlockDataByArchive(proposal.archive), 'block data for own checkpoint proposal', timeoutSeconds, 0.25).catch(()=>undefined);
|
|
947
|
+
}
|
|
948
|
+
if (blockData) {
|
|
949
|
+
await this.archiver.setProposedCheckpoint({
|
|
950
|
+
header: proposal.checkpointHeader,
|
|
951
|
+
checkpointNumber: blockData.checkpointNumber,
|
|
952
|
+
startBlock: BlockNumber(blockData.header.getBlockNumber() - blockData.indexWithinCheckpoint),
|
|
953
|
+
blockCount: blockData.indexWithinCheckpoint + 1,
|
|
954
|
+
totalManaUsed: proposal.checkpointHeader.totalManaUsed.toBigInt(),
|
|
955
|
+
feeAssetPriceModifier: proposal.feeAssetPriceModifier
|
|
956
|
+
});
|
|
957
|
+
} else {
|
|
958
|
+
this.log.debug(`Block data not found for own checkpoint proposal archive, cannot set proposed checkpoint`, {
|
|
959
|
+
archive: proposal.archive.toString()
|
|
960
|
+
});
|
|
961
|
+
}
|
|
962
|
+
}
|
|
551
963
|
}
|
package/dest/validator.d.ts
CHANGED
|
@@ -12,17 +12,17 @@ import { type Watcher, type WatcherEmitter } from '@aztec/slasher';
|
|
|
12
12
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
13
13
|
import type { CommitteeAttestationsAndSigners, L2BlockSink, L2BlockSource } from '@aztec/stdlib/block';
|
|
14
14
|
import type { CreateCheckpointProposalLastBlockData, ITxProvider, Validator, ValidatorClientFullConfig, WorldStateSynchronizer } from '@aztec/stdlib/interfaces/server';
|
|
15
|
-
import {
|
|
15
|
+
import type { L1ToL2MessageSource } from '@aztec/stdlib/messaging';
|
|
16
16
|
import { type BlockProposal, type BlockProposalOptions, type CheckpointAttestation, CheckpointProposal, type CheckpointProposalCore, type CheckpointProposalOptions } from '@aztec/stdlib/p2p';
|
|
17
17
|
import type { CheckpointHeader } from '@aztec/stdlib/rollup';
|
|
18
18
|
import type { BlockHeader, Tx } from '@aztec/stdlib/tx';
|
|
19
19
|
import { type TelemetryClient, type Tracer } from '@aztec/telemetry-client';
|
|
20
|
-
import { type SigningContext } from '@aztec/validator-ha-signer/types';
|
|
20
|
+
import { type SigningContext, type SlashingProtectionDatabase } from '@aztec/validator-ha-signer/types';
|
|
21
21
|
import type { ValidatorHASigner } from '@aztec/validator-ha-signer/validator-ha-signer';
|
|
22
22
|
import type { TypedDataDefinition } from 'viem';
|
|
23
|
-
import { BlockProposalHandler } from './block_proposal_handler.js';
|
|
24
23
|
import type { FullNodeCheckpointsBuilder } from './checkpoint_builder.js';
|
|
25
24
|
import type { ExtendedValidatorKeyStore } from './key_store/interface.js';
|
|
25
|
+
import { ProposalHandler } from './proposal_handler.js';
|
|
26
26
|
declare const ValidatorClient_base: new () => WatcherEmitter;
|
|
27
27
|
/**
|
|
28
28
|
* Validator Client
|
|
@@ -31,7 +31,7 @@ export declare class ValidatorClient extends ValidatorClient_base implements Val
|
|
|
31
31
|
private keyStore;
|
|
32
32
|
private epochCache;
|
|
33
33
|
private p2pClient;
|
|
34
|
-
private
|
|
34
|
+
private proposalHandler;
|
|
35
35
|
private blockSource;
|
|
36
36
|
private checkpointsBuilder;
|
|
37
37
|
private worldState;
|
|
@@ -56,12 +56,12 @@ export declare class ValidatorClient extends ValidatorClient_base implements Val
|
|
|
56
56
|
private proposersOfInvalidBlocks;
|
|
57
57
|
/** Tracks the last checkpoint proposal we attested to, to prevent equivocation. */
|
|
58
58
|
private lastAttestedProposal?;
|
|
59
|
-
protected constructor(keyStore: ExtendedValidatorKeyStore, epochCache: EpochCache, p2pClient: P2P,
|
|
59
|
+
protected constructor(keyStore: ExtendedValidatorKeyStore, epochCache: EpochCache, p2pClient: P2P, proposalHandler: ProposalHandler, blockSource: L2BlockSource, checkpointsBuilder: FullNodeCheckpointsBuilder, worldState: WorldStateSynchronizer, l1ToL2MessageSource: L1ToL2MessageSource, config: ValidatorClientFullConfig, blobClient: BlobClientInterface, slashingProtectionSigner: ValidatorHASigner, dateProvider?: DateProvider, telemetry?: TelemetryClient, log?: Logger);
|
|
60
60
|
static validateKeyStoreConfiguration(keyStoreManager: KeystoreManager, logger?: Logger): void;
|
|
61
61
|
private handleEpochCommitteeUpdate;
|
|
62
|
-
static new(config: ValidatorClientFullConfig, checkpointsBuilder: FullNodeCheckpointsBuilder, worldState: WorldStateSynchronizer, epochCache: EpochCache, p2pClient: P2P, blockSource: L2BlockSource & L2BlockSink, l1ToL2MessageSource: L1ToL2MessageSource, txProvider: ITxProvider, keyStoreManager: KeystoreManager, blobClient: BlobClientInterface, dateProvider?: DateProvider, telemetry?: TelemetryClient): Promise<ValidatorClient>;
|
|
62
|
+
static new(config: ValidatorClientFullConfig, checkpointsBuilder: FullNodeCheckpointsBuilder, worldState: WorldStateSynchronizer, epochCache: EpochCache, p2pClient: P2P, blockSource: L2BlockSource & L2BlockSink, l1ToL2MessageSource: L1ToL2MessageSource, txProvider: ITxProvider, keyStoreManager: KeystoreManager, blobClient: BlobClientInterface, dateProvider?: DateProvider, telemetry?: TelemetryClient, slashingProtectionDb?: SlashingProtectionDatabase): Promise<ValidatorClient>;
|
|
63
63
|
getValidatorAddresses(): EthAddress[];
|
|
64
|
-
|
|
64
|
+
getProposalHandler(): ProposalHandler;
|
|
65
65
|
signWithAddress(addr: EthAddress, msg: TypedDataDefinition, context: SigningContext): Promise<Signature>;
|
|
66
66
|
getCoinbaseForAttestor(attestor: EthAddress): EthAddress;
|
|
67
67
|
getFeeRecipientForAttestor(attestor: EthAddress): AztecAddress;
|
|
@@ -91,11 +91,6 @@ export declare class ValidatorClient extends ValidatorClient_base implements Val
|
|
|
91
91
|
*/
|
|
92
92
|
private shouldAttestToSlot;
|
|
93
93
|
private createCheckpointAttestationsFromProposal;
|
|
94
|
-
private validateCheckpointProposal;
|
|
95
|
-
/**
|
|
96
|
-
* Extract checkpoint global variables from a block.
|
|
97
|
-
*/
|
|
98
|
-
private extractCheckpointConstants;
|
|
99
94
|
/**
|
|
100
95
|
* Uploads blobs for a checkpoint to the filestore (fire and forget).
|
|
101
96
|
*/
|
|
@@ -120,4 +115,4 @@ export declare class ValidatorClient extends ValidatorClient_base implements Val
|
|
|
120
115
|
private handleAuthRequest;
|
|
121
116
|
}
|
|
122
117
|
export {};
|
|
123
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
118
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdG9yLmQudHMiLCJzb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