@aztec/sequencer-client 0.0.0-test.1 → 0.0.1-commit.b655e406
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 +25 -25
- package/dest/client/sequencer-client.d.ts.map +1 -1
- package/dest/client/sequencer-client.js +65 -51
- package/dest/config.d.ts +6 -14
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +50 -54
- package/dest/global_variable_builder/global_builder.d.ts +11 -6
- package/dest/global_variable_builder/global_builder.d.ts.map +1 -1
- package/dest/global_variable_builder/global_builder.js +39 -34
- package/dest/index.d.ts +1 -2
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +1 -2
- package/dest/publisher/config.d.ts +6 -8
- package/dest/publisher/config.d.ts.map +1 -1
- package/dest/publisher/config.js +19 -17
- package/dest/publisher/index.d.ts +2 -0
- package/dest/publisher/index.d.ts.map +1 -1
- package/dest/publisher/index.js +3 -0
- package/dest/publisher/sequencer-publisher-factory.d.ts +43 -0
- package/dest/publisher/sequencer-publisher-factory.d.ts.map +1 -0
- package/dest/publisher/sequencer-publisher-factory.js +51 -0
- package/dest/publisher/sequencer-publisher-metrics.d.ts +2 -1
- package/dest/publisher/sequencer-publisher-metrics.d.ts.map +1 -1
- package/dest/publisher/sequencer-publisher-metrics.js +37 -2
- package/dest/publisher/sequencer-publisher.d.ts +102 -69
- package/dest/publisher/sequencer-publisher.d.ts.map +1 -1
- package/dest/publisher/sequencer-publisher.js +606 -212
- package/dest/sequencer/block_builder.d.ts +27 -0
- package/dest/sequencer/block_builder.d.ts.map +1 -0
- package/dest/sequencer/block_builder.js +130 -0
- package/dest/sequencer/config.d.ts +5 -0
- package/dest/sequencer/config.d.ts.map +1 -1
- package/dest/sequencer/errors.d.ts +11 -0
- package/dest/sequencer/errors.d.ts.map +1 -0
- package/dest/sequencer/errors.js +15 -0
- package/dest/sequencer/index.d.ts +1 -1
- package/dest/sequencer/index.d.ts.map +1 -1
- package/dest/sequencer/index.js +1 -1
- package/dest/sequencer/metrics.d.ts +18 -11
- package/dest/sequencer/metrics.d.ts.map +1 -1
- package/dest/sequencer/metrics.js +84 -50
- package/dest/sequencer/sequencer.d.ts +120 -81
- package/dest/sequencer/sequencer.d.ts.map +1 -1
- package/dest/sequencer/sequencer.js +589 -359
- package/dest/sequencer/timetable.d.ts +32 -20
- package/dest/sequencer/timetable.d.ts.map +1 -1
- package/dest/sequencer/timetable.js +57 -30
- package/dest/sequencer/utils.d.ts +11 -35
- package/dest/sequencer/utils.d.ts.map +1 -1
- package/dest/sequencer/utils.js +9 -47
- package/dest/test/index.d.ts +7 -0
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/index.js +0 -4
- package/dest/tx_validator/nullifier_cache.d.ts +0 -2
- package/dest/tx_validator/nullifier_cache.d.ts.map +1 -1
- package/dest/tx_validator/tx_validator_factory.d.ts +9 -10
- package/dest/tx_validator/tx_validator_factory.d.ts.map +1 -1
- package/dest/tx_validator/tx_validator_factory.js +27 -24
- package/package.json +42 -43
- package/src/client/sequencer-client.ts +94 -84
- package/src/config.ts +57 -61
- package/src/global_variable_builder/global_builder.ts +44 -23
- package/src/index.ts +6 -2
- package/src/publisher/config.ts +26 -24
- package/src/publisher/index.ts +4 -0
- package/src/publisher/sequencer-publisher-factory.ts +90 -0
- package/src/publisher/sequencer-publisher-metrics.ts +24 -2
- package/src/publisher/sequencer-publisher.ts +729 -235
- package/src/sequencer/block_builder.ts +218 -0
- package/src/sequencer/config.ts +7 -0
- package/src/sequencer/errors.ts +21 -0
- package/src/sequencer/index.ts +1 -1
- package/src/sequencer/metrics.ts +109 -55
- package/src/sequencer/sequencer.ts +766 -415
- package/src/sequencer/timetable.ts +98 -33
- package/src/sequencer/utils.ts +17 -58
- package/src/test/index.ts +11 -4
- package/src/tx_validator/tx_validator_factory.ts +44 -32
- package/dest/sequencer/allowed.d.ts +0 -3
- package/dest/sequencer/allowed.d.ts.map +0 -1
- package/dest/sequencer/allowed.js +0 -27
- package/dest/slasher/factory.d.ts +0 -7
- package/dest/slasher/factory.d.ts.map +0 -1
- package/dest/slasher/factory.js +0 -8
- package/dest/slasher/index.d.ts +0 -3
- package/dest/slasher/index.d.ts.map +0 -1
- package/dest/slasher/index.js +0 -2
- package/dest/slasher/slasher_client.d.ts +0 -75
- package/dest/slasher/slasher_client.d.ts.map +0 -1
- package/dest/slasher/slasher_client.js +0 -132
- package/dest/tx_validator/archive_cache.d.ts +0 -14
- package/dest/tx_validator/archive_cache.d.ts.map +0 -1
- package/dest/tx_validator/archive_cache.js +0 -22
- package/dest/tx_validator/gas_validator.d.ts +0 -14
- package/dest/tx_validator/gas_validator.d.ts.map +0 -1
- package/dest/tx_validator/gas_validator.js +0 -78
- package/dest/tx_validator/phases_validator.d.ts +0 -12
- package/dest/tx_validator/phases_validator.d.ts.map +0 -1
- package/dest/tx_validator/phases_validator.js +0 -80
- package/dest/tx_validator/test_utils.d.ts +0 -23
- package/dest/tx_validator/test_utils.d.ts.map +0 -1
- package/dest/tx_validator/test_utils.js +0 -26
- package/src/sequencer/allowed.ts +0 -36
- package/src/slasher/factory.ts +0 -15
- package/src/slasher/index.ts +0 -2
- package/src/slasher/slasher_client.ts +0 -193
- package/src/tx_validator/archive_cache.ts +0 -28
- package/src/tx_validator/gas_validator.ts +0 -101
- package/src/tx_validator/phases_validator.ts +0 -98
- package/src/tx_validator/test_utils.ts +0 -48
|
@@ -1,31 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import type
|
|
1
|
+
import { L2Block } from '@aztec/aztec.js/block';
|
|
2
|
+
import type { EpochCache } from '@aztec/epoch-cache';
|
|
3
|
+
import { type RollupContract } from '@aztec/ethereum';
|
|
4
4
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
5
|
-
import
|
|
5
|
+
import { Signature } from '@aztec/foundation/eth-signature';
|
|
6
6
|
import { Fr } from '@aztec/foundation/fields';
|
|
7
|
-
import { type DateProvider
|
|
7
|
+
import { type DateProvider } from '@aztec/foundation/timer';
|
|
8
|
+
import { type TypedEventEmitter } from '@aztec/foundation/types';
|
|
8
9
|
import type { P2P } from '@aztec/p2p';
|
|
9
|
-
import type {
|
|
10
|
-
import type
|
|
11
|
-
import {
|
|
12
|
-
import type
|
|
13
|
-
import type { ContractDataSource } from '@aztec/stdlib/contract';
|
|
14
|
-
import type { L1RollupConstants } from '@aztec/stdlib/epoch-helpers';
|
|
15
|
-
import { Gas } from '@aztec/stdlib/gas';
|
|
16
|
-
import { type WorldStateSynchronizer } from '@aztec/stdlib/interfaces/server';
|
|
10
|
+
import type { SlasherClientInterface } from '@aztec/slasher';
|
|
11
|
+
import { CommitteeAttestation, CommitteeAttestationsAndSigners, type L2BlockSource, type ValidateBlockResult } from '@aztec/stdlib/block';
|
|
12
|
+
import { type L1RollupConstants } from '@aztec/stdlib/epoch-helpers';
|
|
13
|
+
import { type IFullNodeBlockBuilder, type PublicProcessorLimits, type WorldStateSynchronizer } from '@aztec/stdlib/interfaces/server';
|
|
17
14
|
import type { L1ToL2MessageSource } from '@aztec/stdlib/messaging';
|
|
18
|
-
import {
|
|
15
|
+
import { Tx } from '@aztec/stdlib/tx';
|
|
19
16
|
import { type TelemetryClient, type Tracer } from '@aztec/telemetry-client';
|
|
20
17
|
import type { ValidatorClient } from '@aztec/validator-client';
|
|
21
18
|
import type { GlobalVariableBuilder } from '../global_variable_builder/global_builder.js';
|
|
22
|
-
import {
|
|
23
|
-
import type {
|
|
19
|
+
import type { SequencerPublisherFactory } from '../publisher/sequencer-publisher-factory.js';
|
|
20
|
+
import type { Action, InvalidateBlockRequest, SequencerPublisher } from '../publisher/sequencer-publisher.js';
|
|
24
21
|
import type { SequencerConfig } from './config.js';
|
|
25
22
|
import { SequencerTimetable } from './timetable.js';
|
|
26
|
-
import { SequencerState } from './utils.js';
|
|
23
|
+
import { SequencerState, type SequencerStateWithSlot } from './utils.js';
|
|
27
24
|
export { SequencerState };
|
|
28
25
|
type SequencerRollupConstants = Pick<L1RollupConstants, 'ethereumSlotDuration' | 'l1GenesisTime' | 'slotDuration'>;
|
|
26
|
+
export type SequencerEvents = {
|
|
27
|
+
['state-changed']: (args: {
|
|
28
|
+
oldState: SequencerState;
|
|
29
|
+
newState: SequencerState;
|
|
30
|
+
secondsIntoSlot?: number;
|
|
31
|
+
slotNumber?: bigint;
|
|
32
|
+
}) => void;
|
|
33
|
+
['proposer-rollup-check-failed']: (args: {
|
|
34
|
+
reason: string;
|
|
35
|
+
}) => void;
|
|
36
|
+
['tx-count-check-failed']: (args: {
|
|
37
|
+
minTxs: number;
|
|
38
|
+
availableTxs: number;
|
|
39
|
+
}) => void;
|
|
40
|
+
['block-build-failed']: (args: {
|
|
41
|
+
reason: string;
|
|
42
|
+
}) => void;
|
|
43
|
+
['block-publish-failed']: (args: {
|
|
44
|
+
successfulActions?: Action[];
|
|
45
|
+
failedActions?: Action[];
|
|
46
|
+
sentActions?: Action[];
|
|
47
|
+
expiredActions?: Action[];
|
|
48
|
+
}) => void;
|
|
49
|
+
['block-published']: (args: {
|
|
50
|
+
blockNumber: number;
|
|
51
|
+
slot: number;
|
|
52
|
+
}) => void;
|
|
53
|
+
};
|
|
54
|
+
declare const Sequencer_base: new () => TypedEventEmitter<SequencerEvents>;
|
|
29
55
|
/**
|
|
30
56
|
* Sequencer client
|
|
31
57
|
* - Wins a period of time to become the sequencer (depending on finalized protocol).
|
|
@@ -35,59 +61,60 @@ type SequencerRollupConstants = Pick<L1RollupConstants, 'ethereumSlotDuration' |
|
|
|
35
61
|
* - Receives results to those proofs from the network (repeats as necessary) (not for this milestone).
|
|
36
62
|
* - Publishes L1 tx(s) to the rollup contract via RollupPublisher.
|
|
37
63
|
*/
|
|
38
|
-
export declare class Sequencer {
|
|
39
|
-
protected
|
|
64
|
+
export declare class Sequencer extends Sequencer_base {
|
|
65
|
+
protected publisherFactory: SequencerPublisherFactory;
|
|
40
66
|
protected validatorClient: ValidatorClient | undefined;
|
|
41
67
|
protected globalsBuilder: GlobalVariableBuilder;
|
|
42
68
|
protected p2pClient: P2P;
|
|
43
69
|
protected worldState: WorldStateSynchronizer;
|
|
44
|
-
protected slasherClient:
|
|
45
|
-
protected blockBuilderFactory: BlockBuilderFactory;
|
|
70
|
+
protected slasherClient: SlasherClientInterface | undefined;
|
|
46
71
|
protected l2BlockSource: L2BlockSource;
|
|
47
72
|
protected l1ToL2MessageSource: L1ToL2MessageSource;
|
|
48
|
-
protected
|
|
49
|
-
protected contractDataSource: ContractDataSource;
|
|
73
|
+
protected blockBuilder: IFullNodeBlockBuilder;
|
|
50
74
|
protected l1Constants: SequencerRollupConstants;
|
|
51
75
|
protected dateProvider: DateProvider;
|
|
76
|
+
protected epochCache: EpochCache;
|
|
77
|
+
protected rollupContract: RollupContract;
|
|
52
78
|
protected config: SequencerConfig;
|
|
53
|
-
protected
|
|
79
|
+
protected telemetry: TelemetryClient;
|
|
80
|
+
protected log: import("@aztec/foundation/log").Logger;
|
|
54
81
|
private runningPromise?;
|
|
55
82
|
private pollingIntervalMs;
|
|
56
83
|
private maxTxsPerBlock;
|
|
57
84
|
private minTxsPerBlock;
|
|
58
85
|
private maxL1TxInclusionTimeIntoSlot;
|
|
59
|
-
private _coinbase;
|
|
60
|
-
private _feeRecipient;
|
|
61
86
|
private state;
|
|
62
|
-
private allowedInSetup;
|
|
63
87
|
private maxBlockSizeInBytes;
|
|
64
88
|
private maxBlockGas;
|
|
65
89
|
private metrics;
|
|
66
|
-
private
|
|
90
|
+
private lastBlockPublished;
|
|
91
|
+
private governanceProposerPayload;
|
|
92
|
+
/** The last slot for which we attempted to vote when sync failed, to prevent duplicate attempts. */
|
|
93
|
+
private lastSlotForVoteWhenSyncFailed;
|
|
67
94
|
/** The maximum number of seconds that the sequencer can be into a slot to transition to a particular state. */
|
|
68
95
|
protected timetable: SequencerTimetable;
|
|
69
96
|
protected enforceTimeTable: boolean;
|
|
70
|
-
|
|
71
|
-
|
|
97
|
+
protected publisher: SequencerPublisher | undefined;
|
|
98
|
+
constructor(publisherFactory: SequencerPublisherFactory, validatorClient: ValidatorClient | undefined, // During migration the validator client can be inactive
|
|
99
|
+
globalsBuilder: GlobalVariableBuilder, p2pClient: P2P, worldState: WorldStateSynchronizer, slasherClient: SlasherClientInterface | undefined, l2BlockSource: L2BlockSource, l1ToL2MessageSource: L1ToL2MessageSource, blockBuilder: IFullNodeBlockBuilder, l1Constants: SequencerRollupConstants, dateProvider: DateProvider, epochCache: EpochCache, rollupContract: RollupContract, config: SequencerConfig, telemetry?: TelemetryClient, log?: import("@aztec/foundation/log").Logger);
|
|
72
100
|
get tracer(): Tracer;
|
|
101
|
+
getValidatorAddresses(): EthAddress[] | undefined;
|
|
102
|
+
getConfig(): SequencerConfig;
|
|
73
103
|
/**
|
|
74
|
-
* Updates sequencer config.
|
|
104
|
+
* Updates sequencer config by the defined values in the config on input.
|
|
75
105
|
* @param config - New parameters.
|
|
76
106
|
*/
|
|
77
|
-
updateConfig(config: SequencerConfig):
|
|
107
|
+
updateConfig(config: SequencerConfig): void;
|
|
78
108
|
private setTimeTable;
|
|
109
|
+
init(): Promise<void>;
|
|
79
110
|
/**
|
|
80
111
|
* Starts the sequencer and moves to IDLE state.
|
|
81
112
|
*/
|
|
82
|
-
start():
|
|
113
|
+
start(): void;
|
|
83
114
|
/**
|
|
84
115
|
* Stops the sequencer from processing txs and moves to STOPPED state.
|
|
85
116
|
*/
|
|
86
117
|
stop(): Promise<void>;
|
|
87
|
-
/**
|
|
88
|
-
* Starts a previously stopped sequencer.
|
|
89
|
-
*/
|
|
90
|
-
restart(): void;
|
|
91
118
|
/**
|
|
92
119
|
* Returns the current state of the sequencer.
|
|
93
120
|
* @returns An object with a state entry with one of SequencerState.
|
|
@@ -95,8 +122,6 @@ export declare class Sequencer {
|
|
|
95
122
|
status(): {
|
|
96
123
|
state: SequencerState;
|
|
97
124
|
};
|
|
98
|
-
/** Forces the sequencer to bypass all time and tx count checks for the next block and build anyway. */
|
|
99
|
-
flush(): void;
|
|
100
125
|
/**
|
|
101
126
|
* @notice Performs most of the sequencer duties:
|
|
102
127
|
* - Checks if we are up to date
|
|
@@ -105,47 +130,24 @@ export declare class Sequencer {
|
|
|
105
130
|
* - Submit block
|
|
106
131
|
* - If our block for some reason is not included, revert the state
|
|
107
132
|
*/
|
|
108
|
-
protected doRealWork(): Promise<void>;
|
|
109
133
|
protected work(): Promise<void>;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
* @param tipArchive - The archive of the previous block.
|
|
114
|
-
* @param proposalBlockNumber - The block number of the proposal.
|
|
115
|
-
* @returns The slot number if we can propose at the next block, otherwise undefined.
|
|
116
|
-
*/
|
|
117
|
-
slotForProposal(tipArchive: Buffer, proposalBlockNumber: bigint): Promise<bigint | undefined>;
|
|
134
|
+
/** Tries building a block proposal, and if successful, enqueues it for publishing. */
|
|
135
|
+
private tryBuildBlockAndEnqueuePublish;
|
|
136
|
+
protected safeWork(): Promise<void>;
|
|
118
137
|
/**
|
|
119
138
|
* Sets the sequencer state and checks if we have enough time left in the slot to transition to the new state.
|
|
120
139
|
* @param proposedState - The new state to transition to.
|
|
121
|
-
* @param
|
|
140
|
+
* @param slotNumber - The current slot number.
|
|
122
141
|
* @param force - Whether to force the transition even if the sequencer is stopped.
|
|
123
|
-
*
|
|
124
|
-
* @dev If the `currentSlotNumber` doesn't matter (e.g. transitioning to IDLE), pass in `0n`;
|
|
125
|
-
* it is only used to check if we have enough time left in the slot to transition to the new state.
|
|
126
|
-
*/
|
|
127
|
-
setState(proposedState: SequencerState, currentSlotNumber: bigint, force?: boolean): void;
|
|
128
|
-
/**
|
|
129
|
-
* Build a block
|
|
130
|
-
*
|
|
131
|
-
* Shared between the sequencer and the validator for re-execution
|
|
132
|
-
*
|
|
133
|
-
* @param pendingTxs - The pending transactions to construct the block from
|
|
134
|
-
* @param newGlobalVariables - The global variables for the new block
|
|
135
|
-
* @param historicalHeader - The historical header of the parent
|
|
136
|
-
* @param opts - Whether to just validate the block as a validator, as opposed to building it as a proposal
|
|
137
142
|
*/
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}):
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
numFailedTxs: number;
|
|
147
|
-
blockBuildingTimer: Timer;
|
|
148
|
-
}>;
|
|
143
|
+
setState(proposedState: SequencerStateWithSlot, slotNumber: bigint, opts?: {
|
|
144
|
+
force?: boolean;
|
|
145
|
+
}): void;
|
|
146
|
+
setState(proposedState: Exclude<SequencerState, SequencerStateWithSlot>, slotNumber?: undefined, opts?: {
|
|
147
|
+
force?: boolean;
|
|
148
|
+
}): void;
|
|
149
|
+
private dropFailedTxsFromP2P;
|
|
150
|
+
protected getBlockBuilderOptions(slot: number): PublicProcessorLimits;
|
|
149
151
|
/**
|
|
150
152
|
* @notice Build and propose a block to the chain
|
|
151
153
|
*
|
|
@@ -154,27 +156,64 @@ export declare class Sequencer {
|
|
|
154
156
|
*
|
|
155
157
|
* @param pendingTxs - Iterable of pending transactions to construct the block from
|
|
156
158
|
* @param proposalHeader - The partial header constructed for the proposal
|
|
159
|
+
* @param newGlobalVariables - The global variables for the new block
|
|
160
|
+
* @param proposerAddress - The address of the proposer
|
|
157
161
|
*/
|
|
158
162
|
private buildBlockAndEnqueuePublish;
|
|
159
|
-
protected collectAttestations(block: L2Block,
|
|
163
|
+
protected collectAttestations(block: L2Block, txs: Tx[], proposerAddress: EthAddress | undefined): Promise<CommitteeAttestation[] | undefined>;
|
|
160
164
|
/**
|
|
161
165
|
* Publishes the L2Block to the rollup contract.
|
|
162
166
|
* @param block - The L2Block to be published.
|
|
163
167
|
*/
|
|
164
|
-
protected enqueuePublishL2Block(block: L2Block,
|
|
168
|
+
protected enqueuePublishL2Block(block: L2Block, attestationsAndSigners: CommitteeAttestationsAndSigners, attestationsAndSignersSignature: Signature, invalidateBlock: InvalidateBlockRequest | undefined, publisher: SequencerPublisher): Promise<void>;
|
|
165
169
|
/**
|
|
166
170
|
* Returns whether all dependencies have caught up.
|
|
167
171
|
* We don't check against the previous block submitted since it may have been reorg'd out.
|
|
168
|
-
* @returns Boolean indicating if our dependencies are synced to the latest block.
|
|
169
172
|
*/
|
|
170
|
-
protected
|
|
173
|
+
protected checkSync(args: {
|
|
174
|
+
ts: bigint;
|
|
175
|
+
slot: bigint;
|
|
176
|
+
}): Promise<{
|
|
177
|
+
block?: L2Block;
|
|
171
178
|
blockNumber: number;
|
|
172
179
|
archive: Fr;
|
|
180
|
+
l1Timestamp: bigint;
|
|
181
|
+
pendingChainValidationStatus: ValidateBlockResult;
|
|
173
182
|
} | undefined>;
|
|
174
|
-
|
|
183
|
+
/**
|
|
184
|
+
* Enqueues governance and slashing votes with the publisher. Does not block.
|
|
185
|
+
* @param publisher - The publisher to enqueue votes with
|
|
186
|
+
* @param attestorAddress - The attestor address to use for signing
|
|
187
|
+
* @param slot - The slot number
|
|
188
|
+
* @param timestamp - The timestamp for the votes
|
|
189
|
+
* @param context - Optional context for logging (e.g., block number)
|
|
190
|
+
* @returns A tuple of [governanceEnqueued, slashingEnqueued]
|
|
191
|
+
*/
|
|
192
|
+
protected enqueueGovernanceAndSlashingVotes(publisher: SequencerPublisher, attestorAddress: EthAddress, slot: bigint, timestamp: bigint): [Promise<boolean> | undefined, Promise<boolean> | undefined];
|
|
193
|
+
/**
|
|
194
|
+
* Checks if we are the proposer for the next slot.
|
|
195
|
+
* @returns True if we can propose, and the proposer address (undefined if anyone can propose)
|
|
196
|
+
*/
|
|
197
|
+
protected checkCanPropose(slot: bigint): Promise<[boolean, EthAddress | undefined]>;
|
|
198
|
+
/**
|
|
199
|
+
* Tries to vote on slashing actions and governance when the sync check fails but we're past the max time for initializing a proposal.
|
|
200
|
+
* This allows the sequencer to participate in governance/slashing votes even when it cannot build blocks.
|
|
201
|
+
*/
|
|
202
|
+
protected tryVoteWhenSyncFails(args: {
|
|
203
|
+
slot: bigint;
|
|
204
|
+
ts: bigint;
|
|
205
|
+
}): Promise<void>;
|
|
206
|
+
/**
|
|
207
|
+
* Considers invalidating a block if the pending chain is invalid. Depends on how long the invalid block
|
|
208
|
+
* has been there without being invalidated and whether the sequencer is in the committee or not. We always
|
|
209
|
+
* have the proposer try to invalidate, but if they fail, the sequencers in the committee are expected to try,
|
|
210
|
+
* and if they fail, any sequencer will try as well.
|
|
211
|
+
*/
|
|
212
|
+
protected considerInvalidatingBlock(syncedTo: NonNullable<Awaited<ReturnType<Sequencer['checkSync']>>>, currentSlot: bigint): Promise<void>;
|
|
213
|
+
private getSlotStartBuildTimestamp;
|
|
175
214
|
private getSecondsIntoSlot;
|
|
176
215
|
get aztecSlotDuration(): number;
|
|
177
|
-
get
|
|
178
|
-
|
|
216
|
+
get maxL2BlockGas(): number | undefined;
|
|
217
|
+
getSlasherClient(): SlasherClientInterface | undefined;
|
|
179
218
|
}
|
|
180
219
|
//# sourceMappingURL=sequencer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequencer.d.ts","sourceRoot":"","sources":["../../src/sequencer/sequencer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sequencer.d.ts","sourceRoot":"","sources":["../../src/sequencer/sequencer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAwC,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAG5F,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAG9C,OAAO,EAAE,KAAK,YAAY,EAAS,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,KAAK,iBAAiB,EAAY,MAAM,yBAAyB,CAAC;AAC3E,OAAO,KAAK,EAAE,GAAG,EAAE,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