@aztec/sequencer-client 0.0.1-commit.96bb3f7 → 0.0.1-commit.96dac018d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/client/sequencer-client.d.ts +12 -7
- package/dest/client/sequencer-client.d.ts.map +1 -1
- package/dest/client/sequencer-client.js +15 -4
- package/dest/config.d.ts +3 -4
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +17 -14
- package/dest/global_variable_builder/global_builder.d.ts +2 -4
- package/dest/global_variable_builder/global_builder.d.ts.map +1 -1
- package/dest/global_variable_builder/global_builder.js +2 -2
- package/dest/index.d.ts +2 -2
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +1 -1
- package/dest/publisher/config.d.ts +35 -17
- package/dest/publisher/config.d.ts.map +1 -1
- package/dest/publisher/config.js +106 -42
- package/dest/publisher/index.d.ts +2 -1
- package/dest/publisher/index.d.ts.map +1 -1
- package/dest/publisher/l1_tx_failed_store/factory.d.ts +11 -0
- package/dest/publisher/l1_tx_failed_store/factory.d.ts.map +1 -0
- package/dest/publisher/l1_tx_failed_store/factory.js +22 -0
- package/dest/publisher/l1_tx_failed_store/failed_tx_store.d.ts +59 -0
- package/dest/publisher/l1_tx_failed_store/failed_tx_store.d.ts.map +1 -0
- package/dest/publisher/l1_tx_failed_store/failed_tx_store.js +1 -0
- package/dest/publisher/l1_tx_failed_store/file_store_failed_tx_store.d.ts +15 -0
- package/dest/publisher/l1_tx_failed_store/file_store_failed_tx_store.d.ts.map +1 -0
- package/dest/publisher/l1_tx_failed_store/file_store_failed_tx_store.js +34 -0
- package/dest/publisher/l1_tx_failed_store/index.d.ts +4 -0
- package/dest/publisher/l1_tx_failed_store/index.d.ts.map +1 -0
- package/dest/publisher/l1_tx_failed_store/index.js +2 -0
- package/dest/publisher/sequencer-publisher-factory.d.ts +11 -3
- package/dest/publisher/sequencer-publisher-factory.d.ts.map +1 -1
- package/dest/publisher/sequencer-publisher-factory.js +13 -2
- package/dest/publisher/sequencer-publisher-metrics.d.ts +1 -1
- package/dest/publisher/sequencer-publisher-metrics.d.ts.map +1 -1
- package/dest/publisher/sequencer-publisher-metrics.js +12 -4
- package/dest/publisher/sequencer-publisher.d.ts +22 -8
- package/dest/publisher/sequencer-publisher.d.ts.map +1 -1
- package/dest/publisher/sequencer-publisher.js +297 -47
- package/dest/sequencer/checkpoint_proposal_job.d.ts +34 -9
- package/dest/sequencer/checkpoint_proposal_job.d.ts.map +1 -1
- package/dest/sequencer/checkpoint_proposal_job.js +171 -41
- package/dest/sequencer/checkpoint_voter.d.ts +3 -2
- package/dest/sequencer/checkpoint_voter.d.ts.map +1 -1
- package/dest/sequencer/checkpoint_voter.js +34 -10
- package/dest/sequencer/index.d.ts +1 -2
- package/dest/sequencer/index.d.ts.map +1 -1
- package/dest/sequencer/index.js +0 -1
- package/dest/sequencer/metrics.d.ts +17 -5
- package/dest/sequencer/metrics.d.ts.map +1 -1
- package/dest/sequencer/metrics.js +111 -30
- package/dest/sequencer/sequencer.d.ts +31 -13
- package/dest/sequencer/sequencer.d.ts.map +1 -1
- package/dest/sequencer/sequencer.js +95 -36
- package/dest/sequencer/timetable.d.ts +1 -4
- package/dest/sequencer/timetable.d.ts.map +1 -1
- package/dest/sequencer/timetable.js +1 -4
- package/dest/test/index.d.ts +3 -5
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/mock_checkpoint_builder.d.ts +19 -13
- package/dest/test/mock_checkpoint_builder.d.ts.map +1 -1
- package/dest/test/mock_checkpoint_builder.js +31 -11
- package/dest/test/utils.d.ts +8 -8
- package/dest/test/utils.d.ts.map +1 -1
- package/dest/test/utils.js +12 -11
- package/package.json +30 -28
- package/src/client/sequencer-client.ts +25 -7
- package/src/config.ts +27 -22
- package/src/global_variable_builder/global_builder.ts +3 -3
- package/src/index.ts +1 -6
- package/src/publisher/config.ts +121 -43
- package/src/publisher/index.ts +3 -0
- package/src/publisher/l1_tx_failed_store/factory.ts +32 -0
- package/src/publisher/l1_tx_failed_store/failed_tx_store.ts +55 -0
- package/src/publisher/l1_tx_failed_store/file_store_failed_tx_store.ts +46 -0
- package/src/publisher/l1_tx_failed_store/index.ts +3 -0
- package/src/publisher/sequencer-publisher-factory.ts +23 -6
- package/src/publisher/sequencer-publisher-metrics.ts +7 -3
- package/src/publisher/sequencer-publisher.ts +274 -53
- package/src/sequencer/checkpoint_proposal_job.ts +243 -59
- package/src/sequencer/checkpoint_voter.ts +32 -7
- package/src/sequencer/index.ts +0 -1
- package/src/sequencer/metrics.ts +124 -32
- package/src/sequencer/sequencer.ts +118 -38
- package/src/sequencer/timetable.ts +6 -5
- package/src/test/index.ts +2 -4
- package/src/test/mock_checkpoint_builder.ts +75 -34
- package/src/test/utils.ts +24 -14
- package/dest/sequencer/block_builder.d.ts +0 -26
- package/dest/sequencer/block_builder.d.ts.map +0 -1
- package/dest/sequencer/block_builder.js +0 -129
- package/src/sequencer/block_builder.ts +0 -216
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import type { EpochCache } from '@aztec/epoch-cache';
|
|
2
|
-
import { BlockNumber, CheckpointNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
import { BlockNumber, CheckpointNumber, EpochNumber, IndexWithinCheckpoint, SlotNumber } from '@aztec/foundation/branded-types';
|
|
3
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
|
-
import type
|
|
4
|
+
import { type Logger, type LoggerBindings } from '@aztec/foundation/log';
|
|
5
5
|
import { type DateProvider } from '@aztec/foundation/timer';
|
|
6
6
|
import { type TypedEventEmitter } from '@aztec/foundation/types';
|
|
7
7
|
import type { P2P } from '@aztec/p2p';
|
|
8
8
|
import type { SlasherClientInterface } from '@aztec/slasher';
|
|
9
|
-
import { type L2BlockSink } from '@aztec/stdlib/block';
|
|
9
|
+
import { L2Block, type L2BlockSink, type L2BlockSource } from '@aztec/stdlib/block';
|
|
10
10
|
import type { Checkpoint } from '@aztec/stdlib/checkpoint';
|
|
11
|
-
import type
|
|
11
|
+
import { type ResolvedSequencerConfig, type WorldStateSynchronizer } from '@aztec/stdlib/interfaces/server';
|
|
12
12
|
import { type L1ToL2MessageSource } from '@aztec/stdlib/messaging';
|
|
13
|
+
import { Tx } from '@aztec/stdlib/tx';
|
|
13
14
|
import { type Traceable, type Tracer } from '@aztec/telemetry-client';
|
|
14
|
-
import { type FullNodeCheckpointsBuilder, type ValidatorClient } from '@aztec/validator-client';
|
|
15
|
+
import { CheckpointBuilder, type FullNodeCheckpointsBuilder, type ValidatorClient } from '@aztec/validator-client';
|
|
15
16
|
import type { GlobalVariableBuilder } from '../global_variable_builder/global_builder.js';
|
|
16
17
|
import type { InvalidateCheckpointRequest, SequencerPublisher } from '../publisher/sequencer-publisher.js';
|
|
17
18
|
import type { SequencerEvents } from './events.js';
|
|
@@ -26,6 +27,7 @@ import { SequencerState } from './utils.js';
|
|
|
26
27
|
* the Sequencer once the check for being the proposer for the slot has succeeded.
|
|
27
28
|
*/
|
|
28
29
|
export declare class CheckpointProposalJob implements Traceable {
|
|
30
|
+
private readonly epoch;
|
|
29
31
|
private readonly slot;
|
|
30
32
|
private readonly checkpointNumber;
|
|
31
33
|
private readonly syncedToBlockNumber;
|
|
@@ -38,6 +40,7 @@ export declare class CheckpointProposalJob implements Traceable {
|
|
|
38
40
|
private readonly p2pClient;
|
|
39
41
|
private readonly worldState;
|
|
40
42
|
private readonly l1ToL2MessageSource;
|
|
43
|
+
private readonly l2BlockSource;
|
|
41
44
|
private readonly checkpointsBuilder;
|
|
42
45
|
private readonly blockSink;
|
|
43
46
|
private readonly l1Constants;
|
|
@@ -49,9 +52,9 @@ export declare class CheckpointProposalJob implements Traceable {
|
|
|
49
52
|
private readonly metrics;
|
|
50
53
|
private readonly eventEmitter;
|
|
51
54
|
private readonly setStateFn;
|
|
52
|
-
protected readonly log: Logger;
|
|
53
55
|
readonly tracer: Tracer;
|
|
54
|
-
|
|
56
|
+
protected readonly log: Logger;
|
|
57
|
+
constructor(epoch: EpochNumber, slot: SlotNumber, checkpointNumber: CheckpointNumber, syncedToBlockNumber: BlockNumber, proposer: EthAddress | undefined, publisher: SequencerPublisher, attestorAddress: EthAddress, invalidateCheckpoint: InvalidateCheckpointRequest | undefined, validatorClient: ValidatorClient, globalsBuilder: GlobalVariableBuilder, p2pClient: P2P, worldState: WorldStateSynchronizer, l1ToL2MessageSource: L1ToL2MessageSource, l2BlockSource: L2BlockSource, checkpointsBuilder: FullNodeCheckpointsBuilder, blockSink: L2BlockSink, l1Constants: SequencerRollupConstants, config: ResolvedSequencerConfig, timetable: SequencerTimetable, slasherClient: SlasherClientInterface | undefined, epochCache: EpochCache, dateProvider: DateProvider, metrics: SequencerMetrics, eventEmitter: TypedEventEmitter<SequencerEvents>, setStateFn: (state: SequencerState, slot?: SlotNumber) => void, tracer: Tracer, bindings?: LoggerBindings);
|
|
55
58
|
/**
|
|
56
59
|
* Executes the checkpoint proposal job.
|
|
57
60
|
* Returns the published checkpoint if successful, undefined otherwise.
|
|
@@ -60,7 +63,23 @@ export declare class CheckpointProposalJob implements Traceable {
|
|
|
60
63
|
private proposeCheckpoint;
|
|
61
64
|
private buildBlocksForCheckpoint;
|
|
62
65
|
private waitUntilNextSubslot;
|
|
63
|
-
|
|
66
|
+
/** Builds a single block. Called from the main block building loop. */
|
|
67
|
+
protected buildSingleBlock(checkpointBuilder: CheckpointBuilder, opts: {
|
|
68
|
+
forceCreate?: boolean;
|
|
69
|
+
blockTimestamp: bigint;
|
|
70
|
+
blockNumber: BlockNumber;
|
|
71
|
+
indexWithinCheckpoint: IndexWithinCheckpoint;
|
|
72
|
+
buildDeadline: Date | undefined;
|
|
73
|
+
txHashesAlreadyIncluded: Set<string>;
|
|
74
|
+
remainingBlobFields: number;
|
|
75
|
+
}): Promise<{
|
|
76
|
+
block: L2Block;
|
|
77
|
+
usedTxs: Tx[];
|
|
78
|
+
remainingBlobFields: number;
|
|
79
|
+
} | {
|
|
80
|
+
error: Error;
|
|
81
|
+
} | undefined>;
|
|
82
|
+
private buildSingleBlockWithCheckpointBuilder;
|
|
64
83
|
private waitForMinTxs;
|
|
65
84
|
private waitForAttestations;
|
|
66
85
|
/** Breaks the attestations before publishing based on attack configs */
|
|
@@ -68,10 +87,16 @@ export declare class CheckpointProposalJob implements Traceable {
|
|
|
68
87
|
private dropFailedTxsFromP2P;
|
|
69
88
|
private syncProposedBlockToArchiver;
|
|
70
89
|
private handleCheckpointEndAsFisherman;
|
|
90
|
+
/**
|
|
91
|
+
* Helper to handle HA double-signing errors. Returns true if the error was handled (caller should yield).
|
|
92
|
+
*/
|
|
93
|
+
private handleHASigningError;
|
|
71
94
|
/** Waits until a specific time within the current slot */
|
|
72
95
|
protected waitUntilTimeInSlot(targetSecondsIntoSlot: number): Promise<void>;
|
|
96
|
+
/** Waits the polling interval for transactions. Extracted for test overriding. */
|
|
97
|
+
protected waitForTxsPollingInterval(): Promise<void>;
|
|
73
98
|
private getSlotStartBuildTimestamp;
|
|
74
99
|
private getSecondsIntoSlot;
|
|
75
100
|
getPublisher(): SequencerPublisher;
|
|
76
101
|
}
|
|
77
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
102
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2twb2ludF9wcm9wb3NhbF9qb2IuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zZXF1ZW5jZXIvY2hlY2twb2ludF9wcm9wb3NhbF9qb2IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDckQsT0FBTyxFQUNMLFdBQVcsRUFDWCxnQkFBZ0IsRUFDaEIsV0FBVyxFQUNYLHFCQUFxQixFQUNyQixVQUFVLEVBQ1gsTUFBTSxpQ0FBaUMsQ0FBQztBQUd6QyxPQUFPLEVBQUUsVUFBVSxF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FLEVBQUUsQ0FBQztRQUFDLG1CQUFtQixFQUFFLE1BQU0sQ0FBQTtLQUFFLEdBQUc7UUFBRSxLQUFLLEVBQUUsS0FBSyxDQUFBO0tBQUUsR0FBRyxTQUFTLENBQUMsQ0ErR3hHO1lBR2EscUNBQXFDO1lBc0JyQyxhQUFhO1lBMkNiLG1CQUFtQjtJQTJFakMsd0VBQXdFO0lBQ3hFLE9BQU8sQ0FBQyxzQkFBc0I7WUE4Q2hCLG9CQUFvQjtZQWVwQiwyQkFBMkI7WUFnQjNCLDhCQUE4QjtJQXdCNUM7O09BRUc7SUFDSCxPQUFPLENBQUMsb0JBQW9CO0lBbUI1QiwwREFBMEQ7SUFDMUQsVUFDZ0IsbUJBQW1CLENBQUMscUJBQXFCLEVBQUUsTUFBTSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FJaEY7SUFFRCxrRkFBa0Y7SUFDbEYsVUFBZ0IseUJBQXlCLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxDQUV6RDtJQUVELE9BQU8sQ0FBQywwQkFBMEI7SUFJbEMsT0FBTyxDQUFDLGtCQUFrQjtJQUtuQixZQUFZLHVCQUVsQjtDQUNGIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkpoint_proposal_job.d.ts","sourceRoot":"","sources":["../../src/sequencer/checkpoint_proposal_job.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"checkpoint_proposal_job.d.ts","sourceRoot":"","sources":["../../src/sequencer/checkpoint_proposal_job.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,qBAAqB,EACrB,UAAU,EACX,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,cAAc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,CAAA;KAAE,GAAG;QAAE,KAAK,EAAE,KAAK,CAAA;KAAE,GAAG,SAAS,CAAC,CA+GxG;YAGa,qCAAqC;YAsBrC,aAAa;YA2Cb,mBAAmB;IA2EjC,wEAAwE;IACxE,OAAO,CAAC,sBAAsB;YA8ChB,oBAAoB;YAepB,2BAA2B;YAgB3B,8BAA8B;IAwB5C;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAmB5B,0DAA0D;IAC1D,UACgB,mBAAmB,CAAC,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIhF;IAED,kFAAkF;IAClF,UAAgB,yBAAyB,IAAI,OAAO,CAAC,IAAI,CAAC,CAEzD;IAED,OAAO,CAAC,0BAA0B;IAIlC,OAAO,CAAC,kBAAkB;IAKnB,YAAY,uBAElB;CACF"}
|
|
@@ -436,21 +436,25 @@ function _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass) {
|
|
|
436
436
|
return (_apply_decs_2203_r = applyDecs2203RFactory())(targetClass, memberDecs, classDecs, parentClass);
|
|
437
437
|
}
|
|
438
438
|
var _dec, _dec1, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _initProto;
|
|
439
|
+
import { NUM_CHECKPOINT_END_MARKER_FIELDS, getNumBlockEndBlobFields } from '@aztec/blob-lib/encoding';
|
|
439
440
|
import { BLOBS_PER_CHECKPOINT, FIELDS_PER_BLOB } from '@aztec/constants';
|
|
440
|
-
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
441
|
+
import { BlockNumber, IndexWithinCheckpoint } from '@aztec/foundation/branded-types';
|
|
441
442
|
import { randomInt } from '@aztec/foundation/crypto/random';
|
|
442
443
|
import { Signature } from '@aztec/foundation/eth-signature';
|
|
443
444
|
import { filter } from '@aztec/foundation/iterator';
|
|
445
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
444
446
|
import { sleep, sleepUntil } from '@aztec/foundation/sleep';
|
|
445
447
|
import { Timer } from '@aztec/foundation/timer';
|
|
446
|
-
import { unfreeze } from '@aztec/foundation/types';
|
|
448
|
+
import { isErrorClass, unfreeze } from '@aztec/foundation/types';
|
|
447
449
|
import { CommitteeAttestationsAndSigners, MaliciousCommitteeAttestationsAndSigners } from '@aztec/stdlib/block';
|
|
448
450
|
import { getSlotStartBuildTimestamp } from '@aztec/stdlib/epoch-helpers';
|
|
449
451
|
import { Gas } from '@aztec/stdlib/gas';
|
|
452
|
+
import { NoValidTxsError } from '@aztec/stdlib/interfaces/server';
|
|
450
453
|
import { computeInHashFromL1ToL2Messages } from '@aztec/stdlib/messaging';
|
|
451
|
-
import { orderAttestations } from '@aztec/stdlib/p2p';
|
|
454
|
+
import { orderAttestations, trimAttestations } from '@aztec/stdlib/p2p';
|
|
452
455
|
import { AttestationTimeoutError } from '@aztec/stdlib/validators';
|
|
453
456
|
import { Attributes, trackSpan } from '@aztec/telemetry-client';
|
|
457
|
+
import { DutyAlreadySignedError, SlashingProtectionError } from '@aztec/validator-ha-signer/errors';
|
|
454
458
|
import { CheckpointVoter } from './checkpoint_voter.js';
|
|
455
459
|
import { SequencerInterruptedError } from './errors.js';
|
|
456
460
|
import { SequencerState } from './utils.js';
|
|
@@ -468,6 +472,7 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
468
472
|
* as well as enqueueing votes for slashing and governance proposals. This class is created from
|
|
469
473
|
* the Sequencer once the check for being the proposer for the slot has succeeded.
|
|
470
474
|
*/ export class CheckpointProposalJob {
|
|
475
|
+
epoch;
|
|
471
476
|
slot;
|
|
472
477
|
checkpointNumber;
|
|
473
478
|
syncedToBlockNumber;
|
|
@@ -480,6 +485,7 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
480
485
|
p2pClient;
|
|
481
486
|
worldState;
|
|
482
487
|
l1ToL2MessageSource;
|
|
488
|
+
l2BlockSource;
|
|
483
489
|
checkpointsBuilder;
|
|
484
490
|
blockSink;
|
|
485
491
|
l1Constants;
|
|
@@ -491,7 +497,6 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
491
497
|
metrics;
|
|
492
498
|
eventEmitter;
|
|
493
499
|
setStateFn;
|
|
494
|
-
log;
|
|
495
500
|
tracer;
|
|
496
501
|
static{
|
|
497
502
|
({ e: [_initProto] } = _apply_decs_2203_r(this, [
|
|
@@ -537,8 +542,10 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
537
542
|
]
|
|
538
543
|
], []));
|
|
539
544
|
}
|
|
540
|
-
|
|
541
|
-
|
|
545
|
+
log;
|
|
546
|
+
constructor(epoch, slot, checkpointNumber, syncedToBlockNumber, // TODO(palla/mbps): Can we remove the proposer in favor of attestorAddress? Need to check fisherman-node flows.
|
|
547
|
+
proposer, publisher, attestorAddress, invalidateCheckpoint, validatorClient, globalsBuilder, p2pClient, worldState, l1ToL2MessageSource, l2BlockSource, checkpointsBuilder, blockSink, l1Constants, config, timetable, slasherClient, epochCache, dateProvider, metrics, eventEmitter, setStateFn, tracer, bindings){
|
|
548
|
+
this.epoch = epoch;
|
|
542
549
|
this.slot = slot;
|
|
543
550
|
this.checkpointNumber = checkpointNumber;
|
|
544
551
|
this.syncedToBlockNumber = syncedToBlockNumber;
|
|
@@ -551,6 +558,7 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
551
558
|
this.p2pClient = p2pClient;
|
|
552
559
|
this.worldState = worldState;
|
|
553
560
|
this.l1ToL2MessageSource = l1ToL2MessageSource;
|
|
561
|
+
this.l2BlockSource = l2BlockSource;
|
|
554
562
|
this.checkpointsBuilder = checkpointsBuilder;
|
|
555
563
|
this.blockSink = blockSink;
|
|
556
564
|
this.l1Constants = l1Constants;
|
|
@@ -562,9 +570,12 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
562
570
|
this.metrics = metrics;
|
|
563
571
|
this.eventEmitter = eventEmitter;
|
|
564
572
|
this.setStateFn = setStateFn;
|
|
565
|
-
this.log = log;
|
|
566
573
|
this.tracer = tracer;
|
|
567
574
|
_initProto(this);
|
|
575
|
+
this.log = createLogger('sequencer:checkpoint-proposal', {
|
|
576
|
+
...bindings,
|
|
577
|
+
instanceId: `slot-${slot}`
|
|
578
|
+
});
|
|
568
579
|
}
|
|
569
580
|
/**
|
|
570
581
|
* Executes the checkpoint proposal job.
|
|
@@ -579,7 +590,7 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
579
590
|
// Wait until the voting promises have resolved, so all requests are enqueued (not sent)
|
|
580
591
|
await Promise.all(votesPromises);
|
|
581
592
|
if (checkpoint) {
|
|
582
|
-
this.metrics.
|
|
593
|
+
this.metrics.recordCheckpointProposalSuccess();
|
|
583
594
|
}
|
|
584
595
|
// Do not post anything to L1 if we are fishermen, but do perform L1 fee analysis
|
|
585
596
|
if (this.config.fishermanMode) {
|
|
@@ -628,11 +639,15 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
628
639
|
// Collect L1 to L2 messages for the checkpoint and compute their hash
|
|
629
640
|
const l1ToL2Messages = await this.l1ToL2MessageSource.getL1ToL2Messages(this.checkpointNumber);
|
|
630
641
|
const inHash = computeInHashFromL1ToL2Messages(l1ToL2Messages);
|
|
642
|
+
// Collect the out hashes of all the checkpoints before this one in the same epoch
|
|
643
|
+
const previousCheckpointOutHashes = (await this.l2BlockSource.getCheckpointsDataForEpoch(this.epoch)).filter((c)=>c.checkpointNumber < this.checkpointNumber).map((c)=>c.checkpointOutHash);
|
|
644
|
+
// Get the fee asset price modifier from the oracle
|
|
645
|
+
const feeAssetPriceModifier = await this.publisher.getFeeAssetPriceModifier();
|
|
631
646
|
const fork = _ts_add_disposable_resource(env, await this.worldState.fork(this.syncedToBlockNumber, {
|
|
632
647
|
closeDelayMs: 12_000
|
|
633
|
-
}),
|
|
648
|
+
}), true);
|
|
634
649
|
// Create checkpoint builder for the entire slot
|
|
635
|
-
const checkpointBuilder = await this.checkpointsBuilder.startCheckpoint(this.checkpointNumber, checkpointGlobalVariables, l1ToL2Messages, fork);
|
|
650
|
+
const checkpointBuilder = await this.checkpointsBuilder.startCheckpoint(this.checkpointNumber, checkpointGlobalVariables, feeAssetPriceModifier, l1ToL2Messages, previousCheckpointOutHashes, fork, this.log.getBindings());
|
|
636
651
|
// Options for the validator client when creating block and checkpoint proposals
|
|
637
652
|
const blockProposalOptions = {
|
|
638
653
|
publishFullTxs: !!this.config.publishTxsWithProposals,
|
|
@@ -642,8 +657,23 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
642
657
|
publishFullTxs: !!this.config.publishTxsWithProposals,
|
|
643
658
|
broadcastInvalidCheckpointProposal: this.config.broadcastInvalidBlockProposal
|
|
644
659
|
};
|
|
645
|
-
|
|
646
|
-
|
|
660
|
+
let blocksInCheckpoint = [];
|
|
661
|
+
let blockPendingBroadcast = undefined;
|
|
662
|
+
const checkpointBuildTimer = new Timer();
|
|
663
|
+
try {
|
|
664
|
+
// Main loop: build blocks for the checkpoint
|
|
665
|
+
const result = await this.buildBlocksForCheckpoint(checkpointBuilder, checkpointGlobalVariables.timestamp, inHash, blockProposalOptions);
|
|
666
|
+
blocksInCheckpoint = result.blocksInCheckpoint;
|
|
667
|
+
blockPendingBroadcast = result.blockPendingBroadcast;
|
|
668
|
+
} catch (err) {
|
|
669
|
+
// These errors are expected in HA mode, so we yield and let another HA node handle the slot
|
|
670
|
+
// The only distinction between the 2 errors is SlashingProtectionError throws when the payload is different,
|
|
671
|
+
// which is normal for block building (may have picked different txs)
|
|
672
|
+
if (this.handleHASigningError(err, 'Block proposal')) {
|
|
673
|
+
return undefined;
|
|
674
|
+
}
|
|
675
|
+
throw err;
|
|
676
|
+
}
|
|
647
677
|
if (blocksInCheckpoint.length === 0) {
|
|
648
678
|
this.log.warn(`No blocks were built for slot ${this.slot}`, {
|
|
649
679
|
slot: this.slot
|
|
@@ -653,10 +683,21 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
653
683
|
});
|
|
654
684
|
return undefined;
|
|
655
685
|
}
|
|
686
|
+
const minBlocksForCheckpoint = this.config.minBlocksForCheckpoint;
|
|
687
|
+
if (minBlocksForCheckpoint !== undefined && blocksInCheckpoint.length < minBlocksForCheckpoint) {
|
|
688
|
+
this.log.warn(`Checkpoint has fewer blocks than minimum (${blocksInCheckpoint.length} < ${minBlocksForCheckpoint}), skipping proposal`, {
|
|
689
|
+
slot: this.slot,
|
|
690
|
+
blocksBuilt: blocksInCheckpoint.length,
|
|
691
|
+
minBlocksForCheckpoint
|
|
692
|
+
});
|
|
693
|
+
return undefined;
|
|
694
|
+
}
|
|
656
695
|
// Assemble and broadcast the checkpoint proposal, including the last block that was not
|
|
657
696
|
// broadcasted yet, and wait to collect the committee attestations.
|
|
658
697
|
this.setStateFn(SequencerState.ASSEMBLING_CHECKPOINT, this.slot);
|
|
659
698
|
const checkpoint = await checkpointBuilder.completeCheckpoint();
|
|
699
|
+
// Record checkpoint-level build metrics
|
|
700
|
+
this.metrics.recordCheckpointBuild(checkpointBuildTimer.ms(), blocksInCheckpoint.length, checkpoint.getStats().txCount, Number(checkpoint.header.totalManaUsed.toBigInt()));
|
|
660
701
|
// Do not collect attestations nor publish to L1 in fisherman mode
|
|
661
702
|
if (this.config.fishermanMode) {
|
|
662
703
|
this.log.info(`Built checkpoint for slot ${this.slot} with ${blocksInCheckpoint.length} blocks. ` + `Skipping proposal in fisherman mode.`, {
|
|
@@ -674,7 +715,7 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
674
715
|
txs: blockPendingBroadcast.txs
|
|
675
716
|
};
|
|
676
717
|
// Create the checkpoint proposal and broadcast it
|
|
677
|
-
const proposal = await this.validatorClient.createCheckpointProposal(checkpoint.header, checkpoint.archive.root, lastBlock, this.proposer, checkpointProposalOptions);
|
|
718
|
+
const proposal = await this.validatorClient.createCheckpointProposal(checkpoint.header, checkpoint.archive.root, feeAssetPriceModifier, lastBlock, this.proposer, checkpointProposalOptions);
|
|
678
719
|
const blockProposedAt = this.dateProvider.now();
|
|
679
720
|
await this.p2pClient.broadcastCheckpointProposal(proposal);
|
|
680
721
|
this.setStateFn(SequencerState.COLLECTING_ATTESTATIONS, this.slot);
|
|
@@ -683,12 +724,30 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
683
724
|
this.metrics.recordCheckpointAttestationDelay(blockAttestedAt - blockProposedAt);
|
|
684
725
|
// Proposer must sign over the attestations before pushing them to L1
|
|
685
726
|
const signer = this.proposer ?? this.publisher.getSenderAddress();
|
|
686
|
-
|
|
727
|
+
let attestationsSignature;
|
|
728
|
+
try {
|
|
729
|
+
attestationsSignature = await this.validatorClient.signAttestationsAndSigners(attestations, signer, this.slot, this.checkpointNumber);
|
|
730
|
+
} catch (err) {
|
|
731
|
+
// We shouldn't really get here since we yield to another HA node
|
|
732
|
+
// as soon as we see these errors when creating block or checkpoint proposals.
|
|
733
|
+
if (this.handleHASigningError(err, 'Attestations signature')) {
|
|
734
|
+
return undefined;
|
|
735
|
+
}
|
|
736
|
+
throw err;
|
|
737
|
+
}
|
|
687
738
|
// Enqueue publishing the checkpoint to L1
|
|
688
739
|
this.setStateFn(SequencerState.PUBLISHING_CHECKPOINT, this.slot);
|
|
689
740
|
const aztecSlotDuration = this.l1Constants.slotDuration;
|
|
690
741
|
const slotStartBuildTimestamp = this.getSlotStartBuildTimestamp();
|
|
691
742
|
const txTimeoutAt = new Date((slotStartBuildTimestamp + aztecSlotDuration) * 1000);
|
|
743
|
+
// If we have been configured to potentially skip publishing checkpoint then roll the dice here
|
|
744
|
+
if (this.config.skipPublishingCheckpointsPercent !== undefined && this.config.skipPublishingCheckpointsPercent > 0) {
|
|
745
|
+
const result = Math.max(0, randomInt(100));
|
|
746
|
+
if (result < this.config.skipPublishingCheckpointsPercent) {
|
|
747
|
+
this.log.warn(`Skipping publishing proposal for checkpoint ${checkpoint.number}. Configured percentage: ${this.config.skipPublishingCheckpointsPercent}, generated value: ${result}`);
|
|
748
|
+
return checkpoint;
|
|
749
|
+
}
|
|
750
|
+
}
|
|
692
751
|
await this.publisher.enqueueProposeCheckpoint(checkpoint, attestations, attestationsSignature, {
|
|
693
752
|
txTimeoutAt,
|
|
694
753
|
forcePendingCheckpointNumber: this.invalidateCheckpoint?.forcePendingCheckpointNumber
|
|
@@ -698,9 +757,14 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
698
757
|
env.error = e;
|
|
699
758
|
env.hasError = true;
|
|
700
759
|
} finally{
|
|
701
|
-
_ts_dispose_resources(env);
|
|
760
|
+
const result = _ts_dispose_resources(env);
|
|
761
|
+
if (result) await result;
|
|
702
762
|
}
|
|
703
763
|
} catch (err) {
|
|
764
|
+
if (err && (err instanceof DutyAlreadySignedError || err instanceof SlashingProtectionError)) {
|
|
765
|
+
// swallow this error. It's already been logged by a function deeper in the stack
|
|
766
|
+
return undefined;
|
|
767
|
+
}
|
|
704
768
|
this.log.error(`Error building checkpoint at slot ${this.slot}`, err);
|
|
705
769
|
return undefined;
|
|
706
770
|
}
|
|
@@ -711,11 +775,13 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
711
775
|
const blocksInCheckpoint = [];
|
|
712
776
|
const txHashesAlreadyIncluded = new Set();
|
|
713
777
|
const initialBlockNumber = BlockNumber(this.syncedToBlockNumber + 1);
|
|
778
|
+
// Remaining blob fields available for blocks (checkpoint end marker already subtracted)
|
|
779
|
+
let remainingBlobFields = BLOBS_PER_CHECKPOINT * FIELDS_PER_BLOB - NUM_CHECKPOINT_END_MARKER_FIELDS;
|
|
714
780
|
// Last block in the checkpoint will usually be flagged as pending broadcast, so we send it along with the checkpoint proposal
|
|
715
781
|
let blockPendingBroadcast = undefined;
|
|
716
782
|
while(true){
|
|
717
783
|
const blocksBuilt = blocksInCheckpoint.length;
|
|
718
|
-
const indexWithinCheckpoint = blocksBuilt;
|
|
784
|
+
const indexWithinCheckpoint = IndexWithinCheckpoint(blocksBuilt);
|
|
719
785
|
const blockNumber = BlockNumber(initialBlockNumber + blocksBuilt);
|
|
720
786
|
const secondsIntoSlot = this.getSecondsIntoSlot();
|
|
721
787
|
const timingInfo = this.timetable.canStartNextBlock(secondsIntoSlot);
|
|
@@ -736,8 +802,10 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
736
802
|
buildDeadline: timingInfo.deadline ? new Date((this.getSlotStartBuildTimestamp() + timingInfo.deadline) * 1000) : undefined,
|
|
737
803
|
blockNumber,
|
|
738
804
|
indexWithinCheckpoint,
|
|
739
|
-
txHashesAlreadyIncluded
|
|
805
|
+
txHashesAlreadyIncluded,
|
|
806
|
+
remainingBlobFields
|
|
740
807
|
});
|
|
808
|
+
// TODO(palla/mbps): Review these conditions. We may want to keep trying in some scenarios.
|
|
741
809
|
if (!buildResult && timingInfo.isLastBlock) {
|
|
742
810
|
break;
|
|
743
811
|
} else if (!buildResult && timingInfo.deadline !== undefined) {
|
|
@@ -757,12 +825,21 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
757
825
|
}
|
|
758
826
|
break;
|
|
759
827
|
}
|
|
760
|
-
const { block, usedTxs } = buildResult;
|
|
828
|
+
const { block, usedTxs, remainingBlobFields: newRemainingBlobFields } = buildResult;
|
|
761
829
|
blocksInCheckpoint.push(block);
|
|
830
|
+
// Update remaining blob fields for the next block
|
|
831
|
+
remainingBlobFields = newRemainingBlobFields;
|
|
762
832
|
// Sync the proposed block to the archiver to make it available
|
|
763
833
|
// Note that the checkpoint builder uses its own fork so it should not need to wait for this syncing
|
|
764
834
|
// Eventually we should refactor the checkpoint builder to not need a separate long-lived fork
|
|
765
|
-
|
|
835
|
+
// Fire and forget - don't block the critical path, but log errors
|
|
836
|
+
this.syncProposedBlockToArchiver(block).catch((err)=>{
|
|
837
|
+
this.log.error(`Failed to sync proposed block ${block.number} to archiver`, {
|
|
838
|
+
blockNumber: block.number,
|
|
839
|
+
err
|
|
840
|
+
});
|
|
841
|
+
});
|
|
842
|
+
usedTxs.forEach((tx)=>txHashesAlreadyIncluded.add(tx.txHash.toString()));
|
|
766
843
|
// If this is the last block, exit the loop now so we start collecting attestations
|
|
767
844
|
if (timingInfo.isLastBlock) {
|
|
768
845
|
this.log.verbose(`Completed final block ${blockNumber} for slot ${this.slot}`, {
|
|
@@ -802,7 +879,7 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
802
879
|
await this.waitUntilTimeInSlot(nextSubslotStart);
|
|
803
880
|
}
|
|
804
881
|
/** Builds a single block. Called from the main block building loop. */ async buildSingleBlock(checkpointBuilder, opts) {
|
|
805
|
-
const { blockTimestamp, forceCreate, blockNumber, indexWithinCheckpoint, buildDeadline, txHashesAlreadyIncluded } = opts;
|
|
882
|
+
const { blockTimestamp, forceCreate, blockNumber, indexWithinCheckpoint, buildDeadline, txHashesAlreadyIncluded, remainingBlobFields } = opts;
|
|
806
883
|
this.log.verbose(`Preparing block ${blockNumber} index ${indexWithinCheckpoint} at checkpoint ${this.checkpointNumber} for slot ${this.slot}`, {
|
|
807
884
|
...checkpointBuilder.getConstantData(),
|
|
808
885
|
...opts
|
|
@@ -827,50 +904,53 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
827
904
|
}
|
|
828
905
|
// Create iterator to pending txs. We filter out txs already included in previous blocks in the checkpoint
|
|
829
906
|
// just in case p2p failed to sync the provisional block and didn't get to remove those txs from the mempool yet.
|
|
830
|
-
const pendingTxs = filter(this.p2pClient.
|
|
907
|
+
const pendingTxs = filter(this.p2pClient.iterateEligiblePendingTxs(), (tx)=>!txHashesAlreadyIncluded.has(tx.txHash.toString()));
|
|
831
908
|
this.log.debug(`Building block ${blockNumber} at index ${indexWithinCheckpoint} for slot ${this.slot} with ${availableTxs} available txs`, {
|
|
832
909
|
slot: this.slot,
|
|
833
910
|
blockNumber,
|
|
834
911
|
indexWithinCheckpoint
|
|
835
912
|
});
|
|
836
913
|
this.setStateFn(SequencerState.CREATING_BLOCK, this.slot);
|
|
914
|
+
// Calculate blob fields limit for txs (remaining capacity - this block's end overhead)
|
|
915
|
+
const blockEndOverhead = getNumBlockEndBlobFields(indexWithinCheckpoint === 0);
|
|
916
|
+
const maxBlobFieldsForTxs = remainingBlobFields - blockEndOverhead;
|
|
837
917
|
const blockBuilderOptions = {
|
|
838
918
|
maxTransactions: this.config.maxTxsPerBlock,
|
|
839
919
|
maxBlockSize: this.config.maxBlockSizeInBytes,
|
|
840
920
|
maxBlockGas: new Gas(this.config.maxDABlockGas, this.config.maxL2BlockGas),
|
|
841
|
-
maxBlobFields:
|
|
921
|
+
maxBlobFields: maxBlobFieldsForTxs,
|
|
842
922
|
deadline: buildDeadline
|
|
843
923
|
};
|
|
844
924
|
// Actually build the block by executing txs
|
|
845
|
-
const
|
|
846
|
-
const { publicGas, block, publicProcessorDuration, numTxs, blockBuildingTimer, usedTxs, failedTxs } = await checkpointBuilder.buildBlock(pendingTxs, blockNumber, blockTimestamp, blockBuilderOptions);
|
|
847
|
-
const blockBuildDuration = workTimer.ms();
|
|
925
|
+
const buildResult = await this.buildSingleBlockWithCheckpointBuilder(checkpointBuilder, pendingTxs, blockNumber, blockTimestamp, blockBuilderOptions);
|
|
848
926
|
// If any txs failed during execution, drop them from the mempool so we don't pick them up again
|
|
849
|
-
await this.dropFailedTxsFromP2P(failedTxs);
|
|
927
|
+
await this.dropFailedTxsFromP2P(buildResult.failedTxs);
|
|
850
928
|
// Check if we have created a block with enough txs. If there were invalid txs in the pool, or if execution took
|
|
851
929
|
// too long, then we may not get to minTxsPerBlock after executing public functions.
|
|
852
930
|
const minValidTxs = this.config.minValidTxsPerBlock ?? minTxs;
|
|
853
|
-
|
|
854
|
-
|
|
931
|
+
const numTxs = buildResult.status === 'no-valid-txs' ? 0 : buildResult.numTxs;
|
|
932
|
+
if (buildResult.status === 'no-valid-txs' || !forceCreate && numTxs < minValidTxs) {
|
|
933
|
+
this.log.warn(`Block ${blockNumber} at index ${indexWithinCheckpoint} on slot ${this.slot} has too few valid txs to be proposed`, {
|
|
855
934
|
slot: this.slot,
|
|
856
935
|
blockNumber,
|
|
857
936
|
numTxs,
|
|
858
|
-
indexWithinCheckpoint
|
|
937
|
+
indexWithinCheckpoint,
|
|
938
|
+
minValidTxs,
|
|
939
|
+
buildResult: buildResult.status
|
|
859
940
|
});
|
|
860
|
-
this.eventEmitter.emit('block-
|
|
861
|
-
|
|
862
|
-
availableTxs: numTxs,
|
|
941
|
+
this.eventEmitter.emit('block-build-failed', {
|
|
942
|
+
reason: `Insufficient valid txs`,
|
|
863
943
|
slot: this.slot
|
|
864
944
|
});
|
|
865
945
|
this.metrics.recordBlockProposalFailed('insufficient_valid_txs');
|
|
866
946
|
return undefined;
|
|
867
947
|
}
|
|
868
948
|
// Block creation succeeded, emit stats and metrics
|
|
949
|
+
const { publicGas, block, publicProcessorDuration, usedTxs, usedTxBlobFields, blockBuildDuration } = buildResult;
|
|
869
950
|
const blockStats = {
|
|
870
951
|
eventName: 'l2-block-built',
|
|
871
952
|
duration: blockBuildDuration,
|
|
872
953
|
publicProcessDuration: publicProcessorDuration,
|
|
873
|
-
rollupCircuitsDuration: blockBuildingTimer.ms(),
|
|
874
954
|
...block.getStats()
|
|
875
955
|
};
|
|
876
956
|
const blockHash = await block.hash();
|
|
@@ -889,7 +969,8 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
889
969
|
this.metrics.recordBuiltBlock(blockBuildDuration, publicGas.l2Gas);
|
|
890
970
|
return {
|
|
891
971
|
block,
|
|
892
|
-
usedTxs
|
|
972
|
+
usedTxs,
|
|
973
|
+
remainingBlobFields: maxBlobFieldsForTxs - usedTxBlobFields
|
|
893
974
|
};
|
|
894
975
|
} catch (err) {
|
|
895
976
|
this.eventEmitter.emit('block-build-failed', {
|
|
@@ -907,9 +988,30 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
907
988
|
};
|
|
908
989
|
}
|
|
909
990
|
}
|
|
991
|
+
/** Uses the checkpoint builder to build a block, catching specific txs */ async buildSingleBlockWithCheckpointBuilder(checkpointBuilder, pendingTxs, blockNumber, blockTimestamp, blockBuilderOptions) {
|
|
992
|
+
try {
|
|
993
|
+
const workTimer = new Timer();
|
|
994
|
+
const result = await checkpointBuilder.buildBlock(pendingTxs, blockNumber, blockTimestamp, blockBuilderOptions);
|
|
995
|
+
const blockBuildDuration = workTimer.ms();
|
|
996
|
+
return {
|
|
997
|
+
...result,
|
|
998
|
+
blockBuildDuration,
|
|
999
|
+
status: 'success'
|
|
1000
|
+
};
|
|
1001
|
+
} catch (err) {
|
|
1002
|
+
if (isErrorClass(err, NoValidTxsError)) {
|
|
1003
|
+
return {
|
|
1004
|
+
failedTxs: err.failedTxs,
|
|
1005
|
+
status: 'no-valid-txs'
|
|
1006
|
+
};
|
|
1007
|
+
}
|
|
1008
|
+
throw err;
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
910
1011
|
/** Waits until minTxs are available on the pool for building a block. */ async waitForMinTxs(opts) {
|
|
911
|
-
const minTxs = this.config.minTxsPerBlock;
|
|
912
1012
|
const { indexWithinCheckpoint, blockNumber, buildDeadline, forceCreate } = opts;
|
|
1013
|
+
// We only allow a block with 0 txs in the first block of the checkpoint
|
|
1014
|
+
const minTxs = indexWithinCheckpoint > 0 && this.config.minTxsPerBlock === 0 ? 1 : this.config.minTxsPerBlock;
|
|
913
1015
|
// Deadline is undefined if we are not enforcing the timetable, meaning we'll exit immediately when out of time
|
|
914
1016
|
const startBuildingDeadline = buildDeadline ? new Date(buildDeadline.getTime() - this.timetable.minExecutionTime * 1000) : undefined;
|
|
915
1017
|
let availableTxs = await this.p2pClient.getPendingTxCount();
|
|
@@ -929,7 +1031,7 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
929
1031
|
slot: this.slot,
|
|
930
1032
|
indexWithinCheckpoint
|
|
931
1033
|
});
|
|
932
|
-
await
|
|
1034
|
+
await this.waitForTxsPollingInterval();
|
|
933
1035
|
availableTxs = await this.p2pClient.getPendingTxCount();
|
|
934
1036
|
}
|
|
935
1037
|
return {
|
|
@@ -964,15 +1066,21 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
964
1066
|
return new CommitteeAttestationsAndSigners(orderAttestations(attestations ?? [], committee));
|
|
965
1067
|
}
|
|
966
1068
|
const attestationTimeAllowed = this.config.enforceTimeTable ? this.timetable.getMaxAllowedTime(SequencerState.PUBLISHING_CHECKPOINT) : this.l1Constants.slotDuration;
|
|
967
|
-
const attestationDeadline = new Date(this.
|
|
1069
|
+
const attestationDeadline = new Date((this.getSlotStartBuildTimestamp() + attestationTimeAllowed) * 1000);
|
|
968
1070
|
this.metrics.recordRequiredAttestations(numberOfRequiredAttestations, attestationTimeAllowed);
|
|
969
1071
|
const collectAttestationsTimer = new Timer();
|
|
970
1072
|
let collectedAttestationsCount = 0;
|
|
971
1073
|
try {
|
|
972
1074
|
const attestations = await this.validatorClient.collectAttestations(proposal, numberOfRequiredAttestations, attestationDeadline);
|
|
973
1075
|
collectedAttestationsCount = attestations.length;
|
|
1076
|
+
// Trim attestations to minimum required to save L1 calldata gas
|
|
1077
|
+
const localAddresses = this.validatorClient.getValidatorAddresses();
|
|
1078
|
+
const trimmed = trimAttestations(attestations, numberOfRequiredAttestations, this.attestorAddress, localAddresses);
|
|
1079
|
+
if (trimmed.length < attestations.length) {
|
|
1080
|
+
this.log.debug(`Trimmed attestations from ${attestations.length} to ${trimmed.length} for L1 submission`);
|
|
1081
|
+
}
|
|
974
1082
|
// Rollup contract requires that the signatures are provided in the order of the committee
|
|
975
|
-
const sorted = orderAttestations(
|
|
1083
|
+
const sorted = orderAttestations(trimmed, committee);
|
|
976
1084
|
// Manipulate the attestations if we've been configured to do so
|
|
977
1085
|
if (this.config.injectFakeAttestation || this.config.shuffleAttestationOrdering) {
|
|
978
1086
|
return this.manipulateAttestations(proposal.slotNumber, epoch, seed, committee, sorted);
|
|
@@ -1031,14 +1139,13 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
1031
1139
|
const failedTxData = failedTxs.map((fail)=>fail.tx);
|
|
1032
1140
|
const failedTxHashes = failedTxData.map((tx)=>tx.getTxHash());
|
|
1033
1141
|
this.log.verbose(`Dropping failed txs ${failedTxHashes.join(', ')}`);
|
|
1034
|
-
await this.p2pClient.
|
|
1142
|
+
await this.p2pClient.handleFailedExecution(failedTxHashes);
|
|
1035
1143
|
}
|
|
1036
1144
|
/**
|
|
1037
1145
|
* Adds the proposed block to the archiver so it's available via P2P.
|
|
1038
1146
|
* Gossip doesn't echo messages back to the sender, so the proposer's archiver/world-state
|
|
1039
1147
|
* would never receive its own block without this explicit sync.
|
|
1040
1148
|
*/ async syncProposedBlockToArchiver(block) {
|
|
1041
|
-
// TODO(palla/mbps): Change default to false once block sync is stable.
|
|
1042
1149
|
if (this.config.skipPushProposedBlocksToArchiver !== false) {
|
|
1043
1150
|
this.log.warn(`Skipping push of proposed block ${block.number} to archiver`, {
|
|
1044
1151
|
blockNumber: block.number,
|
|
@@ -1067,15 +1174,38 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
1067
1174
|
slot: this.slot,
|
|
1068
1175
|
feeAnalysisId: feeAnalysis?.id
|
|
1069
1176
|
});
|
|
1070
|
-
this.metrics.
|
|
1177
|
+
this.metrics.recordCheckpointProposalFailed('block_build_failed');
|
|
1071
1178
|
}
|
|
1072
1179
|
this.publisher.clearPendingRequests();
|
|
1073
1180
|
}
|
|
1181
|
+
/**
|
|
1182
|
+
* Helper to handle HA double-signing errors. Returns true if the error was handled (caller should yield).
|
|
1183
|
+
*/ handleHASigningError(err, errorContext) {
|
|
1184
|
+
if (err instanceof DutyAlreadySignedError) {
|
|
1185
|
+
this.log.info(`${errorContext} for slot ${this.slot} already signed by another HA node, yielding`, {
|
|
1186
|
+
slot: this.slot,
|
|
1187
|
+
signedByNode: err.signedByNode
|
|
1188
|
+
});
|
|
1189
|
+
return true;
|
|
1190
|
+
}
|
|
1191
|
+
if (err instanceof SlashingProtectionError) {
|
|
1192
|
+
this.log.info(`${errorContext} for slot ${this.slot} blocked by slashing protection, yielding`, {
|
|
1193
|
+
slot: this.slot,
|
|
1194
|
+
existingMessageHash: err.existingMessageHash,
|
|
1195
|
+
attemptedMessageHash: err.attemptedMessageHash
|
|
1196
|
+
});
|
|
1197
|
+
return true;
|
|
1198
|
+
}
|
|
1199
|
+
return false;
|
|
1200
|
+
}
|
|
1074
1201
|
/** Waits until a specific time within the current slot */ async waitUntilTimeInSlot(targetSecondsIntoSlot) {
|
|
1075
1202
|
const slotStartTimestamp = this.getSlotStartBuildTimestamp();
|
|
1076
1203
|
const targetTimestamp = slotStartTimestamp + targetSecondsIntoSlot;
|
|
1077
1204
|
await sleepUntil(new Date(targetTimestamp * 1000), this.dateProvider.nowAsDate());
|
|
1078
1205
|
}
|
|
1206
|
+
/** Waits the polling interval for transactions. Extracted for test overriding. */ async waitForTxsPollingInterval() {
|
|
1207
|
+
await sleep(TXS_POLLING_MS);
|
|
1208
|
+
}
|
|
1079
1209
|
getSlotStartBuildTimestamp() {
|
|
1080
1210
|
return getSlotStartBuildTimestamp(this.slot, this.l1Constants);
|
|
1081
1211
|
}
|
|
@@ -21,7 +21,8 @@ export declare class CheckpointVoter {
|
|
|
21
21
|
private readonly metrics;
|
|
22
22
|
private readonly log;
|
|
23
23
|
private slotTimestamp;
|
|
24
|
-
private
|
|
24
|
+
private governanceSigner;
|
|
25
|
+
private slashingSigner;
|
|
25
26
|
constructor(slot: SlotNumber, publisher: SequencerPublisher, attestorAddress: EthAddress, validatorClient: ValidatorClient, slasherClient: SlasherClientInterface | undefined, l1Constants: SequencerRollupConstants, config: ResolvedSequencerConfig, metrics: SequencerMetrics, log: Logger);
|
|
26
27
|
/**
|
|
27
28
|
* Enqueues governance and slashing votes with the publisher.
|
|
@@ -31,4 +32,4 @@ export declare class CheckpointVoter {
|
|
|
31
32
|
private enqueueGovernanceVote;
|
|
32
33
|
private enqueueSlashingVote;
|
|
33
34
|
}
|
|
34
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2twb2ludF92b3Rlci5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3NlcXVlbmNlci9jaGVja3BvaW50X3ZvdGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLFVBQVUsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQ2xFLE9BQU8sS0FBSyxFQUFFLFVBQVUsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBQ2hFLE9BQU8sS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQ3BELE9BQU8sS0FBSyxFQUFFLHNCQUFzQixFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFFN0QsT0FBTyxLQUFLLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUMvRSxPQUFPLEtBQUssRUFBRSxlQUFlLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQU0vRCxPQUFPLEtBQUssRUFBRSxrQkFBa0IsRUFBRSxNQUFNLHFDQUFxQyxDQUFDO0FBQz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