@aztec/validator-client 0.0.1-commit.1142ef1 → 0.0.1-commit.125b3452
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 +96 -24
- package/dest/block_proposal_handler.d.ts +12 -11
- package/dest/block_proposal_handler.d.ts.map +1 -1
- package/dest/block_proposal_handler.js +132 -77
- package/dest/checkpoint_builder.d.ts +32 -25
- package/dest/checkpoint_builder.d.ts.map +1 -1
- package/dest/checkpoint_builder.js +144 -49
- package/dest/config.d.ts +1 -1
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +33 -14
- package/dest/duties/validation_service.d.ts +20 -7
- package/dest/duties/validation_service.d.ts.map +1 -1
- package/dest/duties/validation_service.js +69 -22
- package/dest/factory.d.ts +2 -2
- package/dest/factory.d.ts.map +1 -1
- package/dest/factory.js +3 -2
- package/dest/index.d.ts +1 -2
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +0 -1
- package/dest/key_store/ha_key_store.d.ts +99 -0
- package/dest/key_store/ha_key_store.d.ts.map +1 -0
- package/dest/key_store/ha_key_store.js +208 -0
- package/dest/key_store/index.d.ts +2 -1
- package/dest/key_store/index.d.ts.map +1 -1
- package/dest/key_store/index.js +1 -0
- package/dest/key_store/interface.d.ts +36 -6
- package/dest/key_store/interface.d.ts.map +1 -1
- package/dest/key_store/local_key_store.d.ts +10 -5
- package/dest/key_store/local_key_store.d.ts.map +1 -1
- package/dest/key_store/local_key_store.js +8 -4
- package/dest/key_store/node_keystore_adapter.d.ts +18 -5
- package/dest/key_store/node_keystore_adapter.d.ts.map +1 -1
- package/dest/key_store/node_keystore_adapter.js +18 -4
- package/dest/key_store/web3signer_key_store.d.ts +10 -5
- package/dest/key_store/web3signer_key_store.d.ts.map +1 -1
- package/dest/key_store/web3signer_key_store.js +8 -4
- package/dest/metrics.d.ts +12 -3
- package/dest/metrics.d.ts.map +1 -1
- package/dest/metrics.js +46 -5
- package/dest/validator.d.ts +45 -18
- package/dest/validator.d.ts.map +1 -1
- package/dest/validator.js +263 -99
- package/package.json +21 -17
- package/src/block_proposal_handler.ts +163 -95
- package/src/checkpoint_builder.ts +206 -61
- package/src/config.ts +32 -13
- package/src/duties/validation_service.ts +94 -25
- package/src/factory.ts +2 -0
- package/src/index.ts +0 -1
- package/src/key_store/ha_key_store.ts +269 -0
- package/src/key_store/index.ts +1 -0
- package/src/key_store/interface.ts +44 -5
- package/src/key_store/local_key_store.ts +13 -4
- package/src/key_store/node_keystore_adapter.ts +27 -4
- package/src/key_store/web3signer_key_store.ts +17 -4
- package/src/metrics.ts +63 -6
- package/src/validator.ts +329 -118
- package/dest/tx_validator/index.d.ts +0 -3
- package/dest/tx_validator/index.d.ts.map +0 -1
- package/dest/tx_validator/index.js +0 -2
- package/dest/tx_validator/nullifier_cache.d.ts +0 -14
- package/dest/tx_validator/nullifier_cache.d.ts.map +0 -1
- package/dest/tx_validator/nullifier_cache.js +0 -24
- package/dest/tx_validator/tx_validator_factory.d.ts +0 -18
- package/dest/tx_validator/tx_validator_factory.d.ts.map +0 -1
- package/dest/tx_validator/tx_validator_factory.js +0 -53
- package/src/tx_validator/index.ts +0 -2
- package/src/tx_validator/nullifier_cache.ts +0 -30
- package/src/tx_validator/tx_validator_factory.ts +0 -133
|
@@ -65,14 +65,17 @@ function _ts_dispose_resources(env) {
|
|
|
65
65
|
}
|
|
66
66
|
import { INITIAL_L2_BLOCK_NUM } from '@aztec/constants';
|
|
67
67
|
import { BlockNumber, CheckpointNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
68
|
+
import { pick } from '@aztec/foundation/collection';
|
|
68
69
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
69
70
|
import { TimeoutError } from '@aztec/foundation/error';
|
|
70
71
|
import { createLogger } from '@aztec/foundation/log';
|
|
71
72
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
72
73
|
import { DateProvider, Timer } from '@aztec/foundation/timer';
|
|
73
|
-
import { getTimestampForSlot } from '@aztec/stdlib/epoch-helpers';
|
|
74
|
+
import { getEpochAtSlot, getTimestampForSlot } from '@aztec/stdlib/epoch-helpers';
|
|
75
|
+
import { Gas } from '@aztec/stdlib/gas';
|
|
74
76
|
import { computeInHashFromL1ToL2Messages } from '@aztec/stdlib/messaging';
|
|
75
|
-
import {
|
|
77
|
+
import { MerkleTreeId } from '@aztec/stdlib/trees';
|
|
78
|
+
import { ReExFailedTxsError, ReExInitialStateMismatchError, ReExStateMismatchError, ReExTimeoutError, TransactionsNotAvailableError } from '@aztec/stdlib/validators';
|
|
76
79
|
import { getTelemetryClient } from '@aztec/telemetry-client';
|
|
77
80
|
export class BlockProposalHandler {
|
|
78
81
|
checkpointsBuilder;
|
|
@@ -81,18 +84,20 @@ export class BlockProposalHandler {
|
|
|
81
84
|
l1ToL2MessageSource;
|
|
82
85
|
txProvider;
|
|
83
86
|
blockProposalValidator;
|
|
87
|
+
epochCache;
|
|
84
88
|
config;
|
|
85
89
|
metrics;
|
|
86
90
|
dateProvider;
|
|
87
91
|
log;
|
|
88
92
|
tracer;
|
|
89
|
-
constructor(checkpointsBuilder, worldState, blockSource, l1ToL2MessageSource, txProvider, blockProposalValidator, config, metrics, dateProvider = new DateProvider(), telemetry = getTelemetryClient(), log = createLogger('validator:block-proposal-handler')){
|
|
93
|
+
constructor(checkpointsBuilder, worldState, blockSource, l1ToL2MessageSource, txProvider, blockProposalValidator, epochCache, config, metrics, dateProvider = new DateProvider(), telemetry = getTelemetryClient(), log = createLogger('validator:block-proposal-handler')){
|
|
90
94
|
this.checkpointsBuilder = checkpointsBuilder;
|
|
91
95
|
this.worldState = worldState;
|
|
92
96
|
this.blockSource = blockSource;
|
|
93
97
|
this.l1ToL2MessageSource = l1ToL2MessageSource;
|
|
94
98
|
this.txProvider = txProvider;
|
|
95
99
|
this.blockProposalValidator = blockProposalValidator;
|
|
100
|
+
this.epochCache = epochCache;
|
|
96
101
|
this.config = config;
|
|
97
102
|
this.metrics = metrics;
|
|
98
103
|
this.dateProvider = dateProvider;
|
|
@@ -102,23 +107,27 @@ export class BlockProposalHandler {
|
|
|
102
107
|
}
|
|
103
108
|
this.tracer = telemetry.getTracer('BlockProposalHandler');
|
|
104
109
|
}
|
|
105
|
-
|
|
106
|
-
// Non-validator handler that re-executes for monitoring but does not attest.
|
|
110
|
+
register(p2pClient, shouldReexecute) {
|
|
111
|
+
// Non-validator handler that processes or re-executes for monitoring but does not attest.
|
|
107
112
|
// Returns boolean indicating whether the proposal was valid.
|
|
108
113
|
const handler = async (proposal, proposalSender)=>{
|
|
109
114
|
try {
|
|
110
|
-
const
|
|
115
|
+
const { slotNumber, blockNumber } = proposal;
|
|
116
|
+
const result = await this.handleBlockProposal(proposal, proposalSender, shouldReexecute);
|
|
111
117
|
if (result.isValid) {
|
|
112
|
-
this.log.info(`Non-validator
|
|
118
|
+
this.log.info(`Non-validator block proposal ${blockNumber} at slot ${slotNumber} handled`, {
|
|
113
119
|
blockNumber: result.blockNumber,
|
|
120
|
+
slotNumber,
|
|
114
121
|
reexecutionTimeMs: result.reexecutionResult?.reexecutionTimeMs,
|
|
115
122
|
totalManaUsed: result.reexecutionResult?.totalManaUsed,
|
|
116
|
-
numTxs: result.reexecutionResult?.block?.body?.txEffects?.length ?? 0
|
|
123
|
+
numTxs: result.reexecutionResult?.block?.body?.txEffects?.length ?? 0,
|
|
124
|
+
reexecuted: shouldReexecute
|
|
117
125
|
});
|
|
118
126
|
return true;
|
|
119
127
|
} else {
|
|
120
|
-
this.log.warn(`Non-validator
|
|
128
|
+
this.log.warn(`Non-validator block proposal ${blockNumber} at slot ${slotNumber} failed processing with ${result.reason}`, {
|
|
121
129
|
blockNumber: result.blockNumber,
|
|
130
|
+
slotNumber,
|
|
122
131
|
reason: result.reason
|
|
123
132
|
});
|
|
124
133
|
return false;
|
|
@@ -145,7 +154,9 @@ export class BlockProposalHandler {
|
|
|
145
154
|
}
|
|
146
155
|
const proposalInfo = {
|
|
147
156
|
...proposal.toBlockInfo(),
|
|
148
|
-
proposer: proposer.toString()
|
|
157
|
+
proposer: proposer.toString(),
|
|
158
|
+
blockNumber: undefined,
|
|
159
|
+
checkpointNumber: undefined
|
|
149
160
|
};
|
|
150
161
|
this.log.info(`Processing proposal for slot ${slotNumber}`, {
|
|
151
162
|
...proposalInfo,
|
|
@@ -153,27 +164,42 @@ export class BlockProposalHandler {
|
|
|
153
164
|
});
|
|
154
165
|
// Check that the proposal is from the current proposer, or the next proposer
|
|
155
166
|
// This should have been handled by the p2p layer, but we double check here out of caution
|
|
156
|
-
const
|
|
157
|
-
if (
|
|
167
|
+
const validationResult = await this.blockProposalValidator.validate(proposal);
|
|
168
|
+
if (validationResult.result !== 'accept') {
|
|
158
169
|
this.log.warn(`Proposal is not valid, skipping processing`, proposalInfo);
|
|
159
170
|
return {
|
|
160
171
|
isValid: false,
|
|
161
172
|
reason: 'invalid_proposal'
|
|
162
173
|
};
|
|
163
174
|
}
|
|
164
|
-
//
|
|
165
|
-
|
|
166
|
-
|
|
175
|
+
// Ensure the block source is synced before checking for existing blocks,
|
|
176
|
+
// since a pending checkpoint prune may remove blocks we'd otherwise find.
|
|
177
|
+
// This affects mostly the block_number_already_exists check, since a pending
|
|
178
|
+
// checkpoint prune could remove a block that would conflict with this proposal.
|
|
179
|
+
// TODO(@Maddiaa0): This may break staggered slots.
|
|
180
|
+
const blockSourceSync = await this.waitForBlockSourceSync(slotNumber);
|
|
181
|
+
if (!blockSourceSync) {
|
|
182
|
+
this.log.warn(`Block source is not synced, skipping processing`, proposalInfo);
|
|
183
|
+
return {
|
|
184
|
+
isValid: false,
|
|
185
|
+
reason: 'block_source_not_synced'
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
// Check that the parent proposal is a block we know, otherwise reexecution would fail.
|
|
189
|
+
// If we don't find it immediately, we keep retrying for a while; it may be we still
|
|
190
|
+
// need to process other block proposals to get to it.
|
|
191
|
+
const parentBlock = await this.getParentBlock(proposal);
|
|
192
|
+
if (parentBlock === undefined) {
|
|
167
193
|
this.log.warn(`Parent block for proposal not found, skipping processing`, proposalInfo);
|
|
168
194
|
return {
|
|
169
195
|
isValid: false,
|
|
170
196
|
reason: 'parent_block_not_found'
|
|
171
197
|
};
|
|
172
198
|
}
|
|
173
|
-
// Check that the parent block's slot is
|
|
174
|
-
if (
|
|
175
|
-
this.log.warn(`Parent block slot is greater than
|
|
176
|
-
parentBlockSlot:
|
|
199
|
+
// Check that the parent block's slot is not greater than the proposal's slot.
|
|
200
|
+
if (parentBlock !== 'genesis' && parentBlock.header.getSlot() > slotNumber) {
|
|
201
|
+
this.log.warn(`Parent block slot is greater than proposal slot, skipping processing`, {
|
|
202
|
+
parentBlockSlot: parentBlock.header.getSlot().toString(),
|
|
177
203
|
proposalSlot: slotNumber.toString(),
|
|
178
204
|
...proposalInfo
|
|
179
205
|
});
|
|
@@ -183,7 +209,8 @@ export class BlockProposalHandler {
|
|
|
183
209
|
};
|
|
184
210
|
}
|
|
185
211
|
// Compute the block number based on the parent block
|
|
186
|
-
const blockNumber =
|
|
212
|
+
const blockNumber = parentBlock === 'genesis' ? BlockNumber(INITIAL_L2_BLOCK_NUM) : BlockNumber(parentBlock.header.getBlockNumber() + 1);
|
|
213
|
+
proposalInfo.blockNumber = blockNumber;
|
|
187
214
|
// Check that this block number does not exist already
|
|
188
215
|
const existingBlock = await this.blockSource.getBlockHeader(blockNumber);
|
|
189
216
|
if (existingBlock) {
|
|
@@ -200,8 +227,16 @@ export class BlockProposalHandler {
|
|
|
200
227
|
pinnedPeer: proposalSender,
|
|
201
228
|
deadline: this.getReexecutionDeadline(slotNumber, config)
|
|
202
229
|
});
|
|
230
|
+
// If reexecution is disabled, bail. We were just interested in triggering tx collection.
|
|
231
|
+
if (!shouldReexecute) {
|
|
232
|
+
this.log.info(`Received valid block ${blockNumber} proposal at index ${proposal.indexWithinCheckpoint} on slot ${slotNumber}`, proposalInfo);
|
|
233
|
+
return {
|
|
234
|
+
isValid: true,
|
|
235
|
+
blockNumber
|
|
236
|
+
};
|
|
237
|
+
}
|
|
203
238
|
// Compute the checkpoint number for this block and validate checkpoint consistency
|
|
204
|
-
const checkpointResult =
|
|
239
|
+
const checkpointResult = this.computeCheckpointNumber(proposal, parentBlock, proposalInfo);
|
|
205
240
|
if (checkpointResult.reason) {
|
|
206
241
|
return {
|
|
207
242
|
isValid: false,
|
|
@@ -210,6 +245,7 @@ export class BlockProposalHandler {
|
|
|
210
245
|
};
|
|
211
246
|
}
|
|
212
247
|
const checkpointNumber = checkpointResult.checkpointNumber;
|
|
248
|
+
proposalInfo.checkpointNumber = checkpointNumber;
|
|
213
249
|
// Check that I have the same set of l1ToL2Messages as the proposal
|
|
214
250
|
const l1ToL2Messages = await this.l1ToL2MessageSource.getL1ToL2Messages(checkpointNumber);
|
|
215
251
|
const computedInHash = computeInHashFromL1ToL2Messages(l1ToL2Messages);
|
|
@@ -238,29 +274,32 @@ export class BlockProposalHandler {
|
|
|
238
274
|
reason: 'txs_not_available'
|
|
239
275
|
};
|
|
240
276
|
}
|
|
277
|
+
// Collect the out hashes of all the checkpoints before this one in the same epoch
|
|
278
|
+
const epoch = getEpochAtSlot(slotNumber, this.epochCache.getL1Constants());
|
|
279
|
+
const previousCheckpointOutHashes = (await this.blockSource.getCheckpointsDataForEpoch(epoch)).filter((c)=>c.checkpointNumber < checkpointNumber).map((c)=>c.checkpointOutHash);
|
|
241
280
|
// Try re-executing the transactions in the proposal if needed
|
|
242
281
|
let reexecutionResult;
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
};
|
|
256
|
-
}
|
|
282
|
+
try {
|
|
283
|
+
this.log.verbose(`Re-executing transactions in the proposal`, proposalInfo);
|
|
284
|
+
reexecutionResult = await this.reexecuteTransactions(proposal, blockNumber, checkpointNumber, txs, l1ToL2Messages, previousCheckpointOutHashes);
|
|
285
|
+
} catch (error) {
|
|
286
|
+
this.log.error(`Error reexecuting txs while processing block proposal`, error, proposalInfo);
|
|
287
|
+
const reason = this.getReexecuteFailureReason(error);
|
|
288
|
+
return {
|
|
289
|
+
isValid: false,
|
|
290
|
+
blockNumber,
|
|
291
|
+
reason,
|
|
292
|
+
reexecutionResult
|
|
293
|
+
};
|
|
257
294
|
}
|
|
258
295
|
// If we succeeded, push this block into the archiver (unless disabled)
|
|
259
|
-
// TODO(palla/mbps): Change default to false once block sync is stable.
|
|
260
296
|
if (reexecutionResult?.block && this.config.skipPushProposedBlocksToArchiver === false) {
|
|
261
297
|
await this.blockSource.addBlock(reexecutionResult?.block);
|
|
262
298
|
}
|
|
263
|
-
this.log.info(`Successfully
|
|
299
|
+
this.log.info(`Successfully re-executed block ${blockNumber} proposal at index ${proposal.indexWithinCheckpoint} on slot ${slotNumber}`, {
|
|
300
|
+
...proposalInfo,
|
|
301
|
+
...pick(reexecutionResult, 'reexecutionTimeMs', 'totalManaUsed')
|
|
302
|
+
});
|
|
264
303
|
return {
|
|
265
304
|
isValid: true,
|
|
266
305
|
blockNumber,
|
|
@@ -279,7 +318,7 @@ export class BlockProposalHandler {
|
|
|
279
318
|
const currentTime = this.dateProvider.now();
|
|
280
319
|
const timeoutDurationMs = deadline.getTime() - currentTime;
|
|
281
320
|
try {
|
|
282
|
-
return await this.blockSource.
|
|
321
|
+
return await this.blockSource.getBlockDataByArchive(parentArchive) ?? (timeoutDurationMs <= 0 ? undefined : await retryUntil(()=>this.blockSource.syncImmediate().then(()=>this.blockSource.getBlockDataByArchive(parentArchive)), 'force archiver sync', timeoutDurationMs / 1000, 0.5));
|
|
283
322
|
} catch (err) {
|
|
284
323
|
if (err instanceof TimeoutError) {
|
|
285
324
|
this.log.debug(`Timed out getting parent block by archive root`, {
|
|
@@ -293,8 +332,8 @@ export class BlockProposalHandler {
|
|
|
293
332
|
return undefined;
|
|
294
333
|
}
|
|
295
334
|
}
|
|
296
|
-
|
|
297
|
-
if (
|
|
335
|
+
computeCheckpointNumber(proposal, parentBlock, proposalInfo) {
|
|
336
|
+
if (parentBlock === 'genesis') {
|
|
298
337
|
// First block is in checkpoint 1
|
|
299
338
|
if (proposal.indexWithinCheckpoint !== 0) {
|
|
300
339
|
this.log.warn(`First block proposal has non-zero indexWithinCheckpoint`, proposalInfo);
|
|
@@ -306,20 +345,9 @@ export class BlockProposalHandler {
|
|
|
306
345
|
checkpointNumber: CheckpointNumber.INITIAL
|
|
307
346
|
};
|
|
308
347
|
}
|
|
309
|
-
// Get the parent block to find its checkpoint number
|
|
310
|
-
// TODO(palla/mbps): The block header should include the checkpoint number to avoid this lookup,
|
|
311
|
-
// or at least the L2BlockSource should return a different struct that includes it.
|
|
312
|
-
const parentBlockNumber = parentBlockHeader.getBlockNumber();
|
|
313
|
-
const parentBlock = await this.blockSource.getL2BlockNew(parentBlockNumber);
|
|
314
|
-
if (!parentBlock) {
|
|
315
|
-
this.log.warn(`Parent block ${parentBlockNumber} not found in archiver`, proposalInfo);
|
|
316
|
-
return {
|
|
317
|
-
reason: 'invalid_proposal'
|
|
318
|
-
};
|
|
319
|
-
}
|
|
320
348
|
if (proposal.indexWithinCheckpoint === 0) {
|
|
321
349
|
// If this is the first block in a new checkpoint, increment the checkpoint number
|
|
322
|
-
if (!(proposal.blockHeader.getSlot() >
|
|
350
|
+
if (!(proposal.blockHeader.getSlot() > parentBlock.header.getSlot())) {
|
|
323
351
|
this.log.warn(`Slot should be greater than parent block slot for first block in checkpoint`, proposalInfo);
|
|
324
352
|
return {
|
|
325
353
|
reason: 'invalid_proposal'
|
|
@@ -336,7 +364,7 @@ export class BlockProposalHandler {
|
|
|
336
364
|
reason: 'invalid_proposal'
|
|
337
365
|
};
|
|
338
366
|
}
|
|
339
|
-
if (proposal.blockHeader.getSlot() !==
|
|
367
|
+
if (proposal.blockHeader.getSlot() !== parentBlock.header.getSlot()) {
|
|
340
368
|
this.log.warn(`Slot should be equal to parent block slot for non-first block in checkpoint`, proposalInfo);
|
|
341
369
|
return {
|
|
342
370
|
reason: 'invalid_proposal'
|
|
@@ -434,26 +462,39 @@ export class BlockProposalHandler {
|
|
|
434
462
|
}
|
|
435
463
|
getReexecutionDeadline(slot, config) {
|
|
436
464
|
const nextSlotTimestampSeconds = Number(getTimestampForSlot(SlotNumber(slot + 1), config));
|
|
437
|
-
|
|
438
|
-
return new Date(nextSlotTimestampSeconds * 1000 - msNeededForPropagationAndPublishing);
|
|
465
|
+
return new Date(nextSlotTimestampSeconds * 1000);
|
|
439
466
|
}
|
|
440
|
-
/**
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
467
|
+
/** Waits for the block source to sync L1 data up to at least the slot before the given one. */ async waitForBlockSourceSync(slot) {
|
|
468
|
+
const deadline = this.getReexecutionDeadline(slot, this.checkpointsBuilder.getConfig());
|
|
469
|
+
const timeoutMs = deadline.getTime() - this.dateProvider.now();
|
|
470
|
+
if (slot === 0) {
|
|
471
|
+
return true;
|
|
472
|
+
}
|
|
473
|
+
// Make a quick check before triggering an archiver sync
|
|
474
|
+
const syncedSlot = await this.blockSource.getSyncedL2SlotNumber();
|
|
475
|
+
if (syncedSlot !== undefined && syncedSlot + 1 >= slot) {
|
|
476
|
+
return true;
|
|
477
|
+
}
|
|
478
|
+
try {
|
|
479
|
+
// Trigger an immediate sync of the block source, and wait until it reports being synced to the required slot
|
|
480
|
+
return await retryUntil(async ()=>{
|
|
481
|
+
await this.blockSource.syncImmediate();
|
|
482
|
+
const syncedSlot = await this.blockSource.getSyncedL2SlotNumber();
|
|
483
|
+
return syncedSlot !== undefined && syncedSlot + 1 >= slot;
|
|
484
|
+
}, 'wait for block source sync', timeoutMs / 1000, 0.5);
|
|
485
|
+
} catch (err) {
|
|
486
|
+
if (err instanceof TimeoutError) {
|
|
487
|
+
this.log.warn(`Timed out waiting for block source to sync to slot ${slot}`);
|
|
488
|
+
return false;
|
|
489
|
+
} else {
|
|
490
|
+
throw err;
|
|
449
491
|
}
|
|
450
|
-
blocks.unshift(block);
|
|
451
|
-
currentBlockNumber = BlockNumber(currentBlockNumber - 1);
|
|
452
492
|
}
|
|
453
|
-
return blocks;
|
|
454
493
|
}
|
|
455
494
|
getReexecuteFailureReason(err) {
|
|
456
|
-
if (err instanceof
|
|
495
|
+
if (err instanceof ReExInitialStateMismatchError) {
|
|
496
|
+
return 'initial_state_mismatch';
|
|
497
|
+
} else if (err instanceof ReExStateMismatchError) {
|
|
457
498
|
return 'state_mismatch';
|
|
458
499
|
} else if (err instanceof ReExFailedTxsError) {
|
|
459
500
|
return 'failed_txs';
|
|
@@ -463,7 +504,7 @@ export class BlockProposalHandler {
|
|
|
463
504
|
return 'unknown_error';
|
|
464
505
|
}
|
|
465
506
|
}
|
|
466
|
-
async reexecuteTransactions(proposal, blockNumber, checkpointNumber, txs, l1ToL2Messages) {
|
|
507
|
+
async reexecuteTransactions(proposal, blockNumber, checkpointNumber, txs, l1ToL2Messages, previousCheckpointOutHashes) {
|
|
467
508
|
const env = {
|
|
468
509
|
stack: [],
|
|
469
510
|
error: void 0,
|
|
@@ -480,34 +521,47 @@ export class BlockProposalHandler {
|
|
|
480
521
|
const timer = new Timer();
|
|
481
522
|
const slot = proposal.slotNumber;
|
|
482
523
|
const config = this.checkpointsBuilder.getConfig();
|
|
483
|
-
// Get prior blocks in this checkpoint (same slot
|
|
484
|
-
const
|
|
524
|
+
// Get prior blocks in this checkpoint (same slot before current block)
|
|
525
|
+
const allBlocksInSlot = await this.blockSource.getBlocksForSlot(slot);
|
|
526
|
+
const priorBlocks = allBlocksInSlot.filter((b)=>b.number < blockNumber && b.header.getSlot() === slot);
|
|
485
527
|
// Fork before the block to be built
|
|
486
528
|
const parentBlockNumber = BlockNumber(blockNumber - 1);
|
|
487
|
-
|
|
488
|
-
|
|
529
|
+
await this.worldState.syncImmediate(parentBlockNumber);
|
|
530
|
+
const fork = _ts_add_disposable_resource(env, await this.worldState.fork(parentBlockNumber), true);
|
|
531
|
+
// Verify the fork's archive root matches the proposal's expected last archive.
|
|
532
|
+
// If they don't match, our world state synced to a different chain and reexecution would fail.
|
|
533
|
+
const forkArchiveRoot = new Fr((await fork.getTreeInfo(MerkleTreeId.ARCHIVE)).root);
|
|
534
|
+
if (!forkArchiveRoot.equals(proposal.blockHeader.lastArchive.root)) {
|
|
535
|
+
throw new ReExInitialStateMismatchError(proposal.blockHeader.lastArchive.root, forkArchiveRoot);
|
|
536
|
+
}
|
|
537
|
+
// Build checkpoint constants from proposal (excludes blockNumber which is per-block)
|
|
489
538
|
const constants = {
|
|
490
539
|
chainId: new Fr(config.l1ChainId),
|
|
491
540
|
version: new Fr(config.rollupVersion),
|
|
492
541
|
slotNumber: slot,
|
|
542
|
+
timestamp: blockHeader.globalVariables.timestamp,
|
|
493
543
|
coinbase: blockHeader.globalVariables.coinbase,
|
|
494
544
|
feeRecipient: blockHeader.globalVariables.feeRecipient,
|
|
495
545
|
gasFees: blockHeader.globalVariables.gasFees
|
|
496
546
|
};
|
|
497
547
|
// Create checkpoint builder with prior blocks
|
|
498
|
-
const checkpointBuilder = await this.checkpointsBuilder.openCheckpoint(checkpointNumber, constants, l1ToL2Messages, fork, priorBlocks);
|
|
548
|
+
const checkpointBuilder = await this.checkpointsBuilder.openCheckpoint(checkpointNumber, constants, 0n, l1ToL2Messages, previousCheckpointOutHashes, fork, priorBlocks, this.log.getBindings());
|
|
499
549
|
// Build the new block
|
|
500
550
|
const deadline = this.getReexecutionDeadline(slot, config);
|
|
551
|
+
const maxBlockGas = this.config.validateMaxL2BlockGas !== undefined || this.config.validateMaxDABlockGas !== undefined ? new Gas(this.config.validateMaxDABlockGas ?? Infinity, this.config.validateMaxL2BlockGas ?? Infinity) : undefined;
|
|
501
552
|
const result = await checkpointBuilder.buildBlock(txs, blockNumber, blockHeader.globalVariables.timestamp, {
|
|
502
553
|
deadline,
|
|
503
|
-
expectedEndState: blockHeader.state
|
|
554
|
+
expectedEndState: blockHeader.state,
|
|
555
|
+
maxTransactions: this.config.validateMaxTxsPerBlock,
|
|
556
|
+
maxBlockGas
|
|
504
557
|
});
|
|
505
558
|
const { block, failedTxs } = result;
|
|
506
559
|
const numFailedTxs = failedTxs.length;
|
|
507
|
-
this.log.verbose(`
|
|
560
|
+
this.log.verbose(`Block proposal ${blockNumber} at slot ${slot} transaction re-execution complete`, {
|
|
508
561
|
numFailedTxs,
|
|
509
562
|
numProposalTxs: txHashes.length,
|
|
510
563
|
numProcessedTxs: block.body.txEffects.length,
|
|
564
|
+
blockNumber,
|
|
511
565
|
slot
|
|
512
566
|
});
|
|
513
567
|
if (numFailedTxs > 0) {
|
|
@@ -545,7 +599,8 @@ export class BlockProposalHandler {
|
|
|
545
599
|
env.error = e;
|
|
546
600
|
env.hasError = true;
|
|
547
601
|
} finally{
|
|
548
|
-
_ts_dispose_resources(env);
|
|
602
|
+
const result = _ts_dispose_resources(env);
|
|
603
|
+
if (result) await result;
|
|
549
604
|
}
|
|
550
605
|
}
|
|
551
606
|
}
|
|
@@ -1,70 +1,77 @@
|
|
|
1
1
|
import { BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-types';
|
|
2
2
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
|
-
import {
|
|
3
|
+
import { type LoggerBindings } from '@aztec/foundation/log';
|
|
4
|
+
import { DateProvider } from '@aztec/foundation/timer';
|
|
4
5
|
import { LightweightCheckpointBuilder } from '@aztec/prover-client/light';
|
|
5
6
|
import { PublicProcessor } from '@aztec/simulator/server';
|
|
6
|
-
import {
|
|
7
|
+
import { L2Block } from '@aztec/stdlib/block';
|
|
7
8
|
import { Checkpoint } from '@aztec/stdlib/checkpoint';
|
|
8
9
|
import type { ContractDataSource } from '@aztec/stdlib/contract';
|
|
9
|
-
import {
|
|
10
|
-
import { type FullNodeBlockBuilderConfig, type MerkleTreeWriteOperations, type PublicProcessorLimits } from '@aztec/stdlib/interfaces/server';
|
|
11
|
-
import { type
|
|
10
|
+
import type { L1RollupConstants } from '@aztec/stdlib/epoch-helpers';
|
|
11
|
+
import { type BuildBlockInCheckpointResult, type FullNodeBlockBuilderConfig, type ICheckpointBlockBuilder, type ICheckpointsBuilder, type MerkleTreeWriteOperations, type PublicProcessorLimits, type WorldStateSynchronizer } from '@aztec/stdlib/interfaces/server';
|
|
12
|
+
import { type DebugLogStore } from '@aztec/stdlib/logs';
|
|
13
|
+
import { type CheckpointGlobalVariables, GlobalVariables, StateReference, Tx } from '@aztec/stdlib/tx';
|
|
12
14
|
import { type TelemetryClient } from '@aztec/telemetry-client';
|
|
13
|
-
export
|
|
14
|
-
block: L2BlockNew;
|
|
15
|
-
publicGas: Gas;
|
|
16
|
-
publicProcessorDuration: number;
|
|
17
|
-
numTxs: number;
|
|
18
|
-
failedTxs: FailedTx[];
|
|
19
|
-
blockBuildingTimer: Timer;
|
|
20
|
-
usedTxs: Tx[];
|
|
21
|
-
}
|
|
15
|
+
export type { BuildBlockInCheckpointResult } from '@aztec/stdlib/interfaces/server';
|
|
22
16
|
/**
|
|
23
17
|
* Builder for a single checkpoint. Handles building blocks within the checkpoint
|
|
24
18
|
* and completing it.
|
|
25
19
|
*/
|
|
26
|
-
export declare class CheckpointBuilder {
|
|
20
|
+
export declare class CheckpointBuilder implements ICheckpointBlockBuilder {
|
|
27
21
|
private checkpointBuilder;
|
|
28
22
|
private fork;
|
|
29
23
|
private config;
|
|
30
24
|
private contractDataSource;
|
|
31
25
|
private dateProvider;
|
|
32
26
|
private telemetryClient;
|
|
33
|
-
|
|
27
|
+
private debugLogStore;
|
|
28
|
+
private log;
|
|
29
|
+
constructor(checkpointBuilder: LightweightCheckpointBuilder, fork: MerkleTreeWriteOperations, config: FullNodeBlockBuilderConfig, contractDataSource: ContractDataSource, dateProvider: DateProvider, telemetryClient: TelemetryClient, bindings?: LoggerBindings, debugLogStore?: DebugLogStore);
|
|
34
30
|
getConstantData(): CheckpointGlobalVariables;
|
|
35
31
|
/**
|
|
36
32
|
* Builds a single block within this checkpoint.
|
|
33
|
+
* Automatically caps gas and blob field limits based on checkpoint-level budgets and prior blocks.
|
|
37
34
|
*/
|
|
38
|
-
buildBlock(pendingTxs: Iterable<Tx> | AsyncIterable<Tx>, blockNumber: BlockNumber, timestamp: bigint, opts
|
|
35
|
+
buildBlock(pendingTxs: Iterable<Tx> | AsyncIterable<Tx>, blockNumber: BlockNumber, timestamp: bigint, opts?: PublicProcessorLimits & {
|
|
39
36
|
expectedEndState?: StateReference;
|
|
37
|
+
minValidTxs?: number;
|
|
40
38
|
}): Promise<BuildBlockInCheckpointResult>;
|
|
41
39
|
/** Completes the checkpoint and returns it. */
|
|
42
40
|
completeCheckpoint(): Promise<Checkpoint>;
|
|
43
41
|
/** Gets the checkpoint currently in progress. */
|
|
44
42
|
getCheckpoint(): Promise<Checkpoint>;
|
|
43
|
+
/**
|
|
44
|
+
* Caps per-block gas and blob field limits by remaining checkpoint-level budgets.
|
|
45
|
+
* Computes remaining L2 gas (mana), DA gas, and blob fields from blocks already added to the checkpoint,
|
|
46
|
+
* then returns opts with maxBlockGas and maxBlobFields capped accordingly.
|
|
47
|
+
*/
|
|
48
|
+
protected capLimitsByCheckpointBudgets(opts: PublicProcessorLimits): Pick<PublicProcessorLimits, 'maxBlockGas' | 'maxBlobFields' | 'maxTransactions'>;
|
|
45
49
|
protected makeBlockBuilderDeps(globalVariables: GlobalVariables, fork: MerkleTreeWriteOperations): Promise<{
|
|
46
50
|
processor: PublicProcessor;
|
|
47
51
|
validator: import("@aztec/stdlib/interfaces/server").PublicProcessorValidator;
|
|
48
52
|
}>;
|
|
49
53
|
}
|
|
50
|
-
/**
|
|
51
|
-
|
|
52
|
-
*/
|
|
53
|
-
export declare class FullNodeCheckpointsBuilder {
|
|
54
|
+
/** Factory for creating checkpoint builders. */
|
|
55
|
+
export declare class FullNodeCheckpointsBuilder implements ICheckpointsBuilder {
|
|
54
56
|
private config;
|
|
57
|
+
private worldState;
|
|
55
58
|
private contractDataSource;
|
|
56
59
|
private dateProvider;
|
|
57
60
|
private telemetryClient;
|
|
58
|
-
|
|
61
|
+
private debugLogStore;
|
|
62
|
+
private log;
|
|
63
|
+
constructor(config: FullNodeBlockBuilderConfig & Pick<L1RollupConstants, 'l1GenesisTime' | 'slotDuration'>, worldState: WorldStateSynchronizer, contractDataSource: ContractDataSource, dateProvider: DateProvider, telemetryClient?: TelemetryClient, debugLogStore?: DebugLogStore);
|
|
59
64
|
getConfig(): FullNodeBlockBuilderConfig;
|
|
60
65
|
updateConfig(config: Partial<FullNodeBlockBuilderConfig>): void;
|
|
61
66
|
/**
|
|
62
67
|
* Starts a new checkpoint and returns a CheckpointBuilder to build blocks within it.
|
|
63
68
|
*/
|
|
64
|
-
startCheckpoint(checkpointNumber: CheckpointNumber, constants: CheckpointGlobalVariables, l1ToL2Messages: Fr[], fork: MerkleTreeWriteOperations): Promise<CheckpointBuilder>;
|
|
69
|
+
startCheckpoint(checkpointNumber: CheckpointNumber, constants: CheckpointGlobalVariables, feeAssetPriceModifier: bigint, l1ToL2Messages: Fr[], previousCheckpointOutHashes: Fr[], fork: MerkleTreeWriteOperations, bindings?: LoggerBindings): Promise<CheckpointBuilder>;
|
|
65
70
|
/**
|
|
66
71
|
* Opens a checkpoint, either starting fresh or resuming from existing blocks.
|
|
67
72
|
*/
|
|
68
|
-
openCheckpoint(checkpointNumber: CheckpointNumber, constants: CheckpointGlobalVariables, l1ToL2Messages: Fr[], fork: MerkleTreeWriteOperations, existingBlocks?:
|
|
73
|
+
openCheckpoint(checkpointNumber: CheckpointNumber, constants: CheckpointGlobalVariables, feeAssetPriceModifier: bigint, l1ToL2Messages: Fr[], previousCheckpointOutHashes: Fr[], fork: MerkleTreeWriteOperations, existingBlocks?: L2Block[], bindings?: LoggerBindings): Promise<CheckpointBuilder>;
|
|
74
|
+
/** Returns a fork of the world state at the given block number. */
|
|
75
|
+
getFork(blockNumber: BlockNumber): Promise<MerkleTreeWriteOperations>;
|
|
69
76
|
}
|
|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