@aztec/sequencer-client 0.0.1-commit.fce3e4f → 0.0.1-commit.ffe5b04ea
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 +32 -16
- package/dest/client/sequencer-client.d.ts.map +1 -1
- package/dest/client/sequencer-client.js +118 -28
- package/dest/config.d.ts +33 -8
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +99 -44
- package/dest/global_variable_builder/global_builder.d.ts +20 -13
- package/dest/global_variable_builder/global_builder.d.ts.map +1 -1
- package/dest/global_variable_builder/global_builder.js +51 -41
- package/dest/index.d.ts +2 -3
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +1 -2
- package/dest/publisher/config.d.ts +41 -20
- package/dest/publisher/config.d.ts.map +1 -1
- package/dest/publisher/config.js +109 -39
- 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 +15 -6
- package/dest/publisher/sequencer-publisher-factory.d.ts.map +1 -1
- package/dest/publisher/sequencer-publisher-factory.js +28 -3
- package/dest/publisher/sequencer-publisher-metrics.d.ts +3 -3
- package/dest/publisher/sequencer-publisher-metrics.d.ts.map +1 -1
- package/dest/publisher/sequencer-publisher-metrics.js +23 -86
- package/dest/publisher/sequencer-publisher.d.ts +73 -47
- package/dest/publisher/sequencer-publisher.d.ts.map +1 -1
- package/dest/publisher/sequencer-publisher.js +888 -146
- package/dest/sequencer/checkpoint_proposal_job.d.ts +100 -0
- package/dest/sequencer/checkpoint_proposal_job.d.ts.map +1 -0
- package/dest/sequencer/checkpoint_proposal_job.js +1244 -0
- package/dest/sequencer/checkpoint_voter.d.ts +35 -0
- package/dest/sequencer/checkpoint_voter.d.ts.map +1 -0
- package/dest/sequencer/checkpoint_voter.js +109 -0
- package/dest/sequencer/config.d.ts +3 -2
- package/dest/sequencer/config.d.ts.map +1 -1
- package/dest/sequencer/events.d.ts +46 -0
- package/dest/sequencer/events.d.ts.map +1 -0
- package/dest/sequencer/events.js +1 -0
- package/dest/sequencer/index.d.ts +4 -2
- package/dest/sequencer/index.d.ts.map +1 -1
- package/dest/sequencer/index.js +3 -1
- package/dest/sequencer/metrics.d.ts +38 -6
- package/dest/sequencer/metrics.d.ts.map +1 -1
- package/dest/sequencer/metrics.js +216 -72
- package/dest/sequencer/sequencer.d.ts +122 -133
- package/dest/sequencer/sequencer.d.ts.map +1 -1
- package/dest/sequencer/sequencer.js +717 -625
- package/dest/sequencer/timetable.d.ts +54 -16
- package/dest/sequencer/timetable.d.ts.map +1 -1
- package/dest/sequencer/timetable.js +147 -62
- package/dest/sequencer/types.d.ts +6 -0
- package/dest/sequencer/types.d.ts.map +1 -0
- package/dest/sequencer/types.js +1 -0
- package/dest/sequencer/utils.d.ts +14 -8
- package/dest/sequencer/utils.d.ts.map +1 -1
- package/dest/sequencer/utils.js +7 -4
- package/dest/test/index.d.ts +6 -7
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/mock_checkpoint_builder.d.ts +95 -0
- package/dest/test/mock_checkpoint_builder.d.ts.map +1 -0
- package/dest/test/mock_checkpoint_builder.js +231 -0
- package/dest/test/utils.d.ts +53 -0
- package/dest/test/utils.d.ts.map +1 -0
- package/dest/test/utils.js +104 -0
- package/package.json +32 -30
- package/src/client/sequencer-client.ts +158 -52
- package/src/config.ts +114 -54
- package/src/global_variable_builder/global_builder.ts +65 -61
- package/src/index.ts +1 -7
- package/src/publisher/config.ts +131 -50
- 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 +43 -10
- package/src/publisher/sequencer-publisher-metrics.ts +19 -71
- package/src/publisher/sequencer-publisher.ts +587 -191
- package/src/sequencer/README.md +531 -0
- package/src/sequencer/checkpoint_proposal_job.ts +960 -0
- package/src/sequencer/checkpoint_voter.ts +130 -0
- package/src/sequencer/config.ts +2 -1
- package/src/sequencer/events.ts +27 -0
- package/src/sequencer/index.ts +3 -1
- package/src/sequencer/metrics.ts +268 -82
- package/src/sequencer/sequencer.ts +464 -831
- package/src/sequencer/timetable.ts +178 -83
- package/src/sequencer/types.ts +9 -0
- package/src/sequencer/utils.ts +18 -9
- package/src/test/index.ts +5 -6
- package/src/test/mock_checkpoint_builder.ts +323 -0
- package/src/test/utils.ts +167 -0
- package/dest/sequencer/block_builder.d.ts +0 -27
- package/dest/sequencer/block_builder.d.ts.map +0 -1
- package/dest/sequencer/block_builder.js +0 -134
- 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 -17
- package/dest/tx_validator/tx_validator_factory.d.ts.map +0 -1
- package/dest/tx_validator/tx_validator_factory.js +0 -53
- package/src/sequencer/block_builder.ts +0 -222
- package/src/tx_validator/nullifier_cache.ts +0 -30
- package/src/tx_validator/tx_validator_factory.ts +0 -132
|
@@ -1,50 +1,88 @@
|
|
|
1
|
+
import type { Logger } from '@aztec/foundation/log';
|
|
1
2
|
import type { SequencerMetrics } from './metrics.js';
|
|
2
3
|
import { SequencerState } from './utils.js';
|
|
3
4
|
export declare class SequencerTimetable {
|
|
4
5
|
private readonly metrics?;
|
|
5
|
-
private readonly log
|
|
6
|
+
private readonly log?;
|
|
6
7
|
/**
|
|
7
8
|
* How late into the slot can we be to start working. Computed as the total time needed for assembling and publishing a block,
|
|
8
9
|
* assuming an execution time equal to `minExecutionTime`, subtracted from the slot duration. This means that, if the proposer
|
|
9
10
|
* starts building at this time, and all times hold, it will have at least `minExecutionTime` to execute txs for the block.
|
|
10
11
|
*/
|
|
11
12
|
readonly initializeDeadline: number;
|
|
13
|
+
/**
|
|
14
|
+
* Fixed time offset (in seconds) when the first sub-slot starts, used as baseline for all block deadlines.
|
|
15
|
+
* This is an estimate of how long initialization (sync + proposer check) typically takes.
|
|
16
|
+
* If actual initialization takes longer/shorter, blocks just get less/more time accordingly.
|
|
17
|
+
*/
|
|
18
|
+
readonly initializationOffset: number;
|
|
19
|
+
/**
|
|
20
|
+
* Total time needed to finalize and publish a checkpoint, including:
|
|
21
|
+
* - Assembling the checkpoint
|
|
22
|
+
* - Round-trip p2p propagation for the checkpoint proposal and its corresponding attestations
|
|
23
|
+
* - Publishing to L1
|
|
24
|
+
*/
|
|
25
|
+
readonly checkpointFinalizationTime: number;
|
|
12
26
|
/**
|
|
13
27
|
* How long it takes to get a published block into L1. L1 builders typically accept txs up to 4 seconds into their slot,
|
|
14
28
|
* but we'll timeout sooner to give it more time to propagate (remember we also have blobs!). Still, when working in anvil,
|
|
15
29
|
* we can just post in the very last second of the L1 slot and still expect the tx to be accepted.
|
|
16
30
|
*/
|
|
17
31
|
readonly l1PublishingTime: number;
|
|
18
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* What's the minimum time we want to leave available for execution and reexecution (used to derive init deadline)
|
|
34
|
+
* Defaults to half of the block duration if set, otherwise a constant.
|
|
35
|
+
*/
|
|
19
36
|
readonly minExecutionTime: number;
|
|
20
37
|
/** How long it takes to get ready to start building */
|
|
21
|
-
readonly
|
|
38
|
+
readonly checkpointInitializationTime: number;
|
|
22
39
|
/** How long it takes to for proposals and attestations to travel across the p2p layer (one-way) */
|
|
23
|
-
readonly
|
|
24
|
-
/** How much time we spend
|
|
25
|
-
readonly
|
|
40
|
+
readonly p2pPropagationTime: number;
|
|
41
|
+
/** How much time we spend assembling a checkpoint after building the last block */
|
|
42
|
+
readonly checkpointAssembleTime: number;
|
|
26
43
|
/** Ethereum slot duration in seconds */
|
|
27
44
|
readonly ethereumSlotDuration: number;
|
|
28
45
|
/** Aztec slot duration in seconds (must be multiple of ethereum slot duration) */
|
|
29
46
|
readonly aztecSlotDuration: number;
|
|
30
|
-
/** How late into an L1 slot we can send a tx to make sure it gets included in the immediate next block. Complement of l1PublishingTime. */
|
|
31
|
-
readonly maxL1TxInclusionTimeIntoSlot: number;
|
|
32
47
|
/** Whether assertTimeLeft will throw if not enough time. */
|
|
33
48
|
readonly enforce: boolean;
|
|
49
|
+
/** Duration per block when building multiple blocks per slot (undefined = single block per slot) */
|
|
50
|
+
readonly blockDuration: number | undefined;
|
|
51
|
+
/** Maximum number of blocks that can be built in this slot configuration */
|
|
52
|
+
readonly maxNumberOfBlocks: number;
|
|
34
53
|
constructor(opts: {
|
|
35
54
|
ethereumSlotDuration: number;
|
|
36
55
|
aztecSlotDuration: number;
|
|
37
|
-
|
|
38
|
-
|
|
56
|
+
l1PublishingTime: number;
|
|
57
|
+
p2pPropagationTime?: number;
|
|
58
|
+
blockDurationMs?: number;
|
|
39
59
|
enforce: boolean;
|
|
40
|
-
}, metrics?: SequencerMetrics | undefined, log?:
|
|
41
|
-
private get afterBlockBuildingTimeNeededWithoutReexec();
|
|
42
|
-
getBlockProposalExecTimeEnd(secondsIntoSlot: number): number;
|
|
43
|
-
private get afterBlockReexecTimeNeeded();
|
|
44
|
-
getValidatorReexecTimeEnd(secondsIntoSlot?: number): number;
|
|
60
|
+
}, metrics?: SequencerMetrics | undefined, log?: Logger | undefined);
|
|
45
61
|
getMaxAllowedTime(state: Extract<SequencerState, SequencerState.STOPPED | SequencerState.IDLE | SequencerState.SYNCHRONIZING>): undefined;
|
|
46
62
|
getMaxAllowedTime(state: Exclude<SequencerState, SequencerState.STOPPED | SequencerState.IDLE | SequencerState.SYNCHRONIZING>): number;
|
|
47
63
|
getMaxAllowedTime(state: SequencerState): number | undefined;
|
|
48
64
|
assertTimeLeft(newState: SequencerState, secondsIntoSlot: number): void;
|
|
65
|
+
/**
|
|
66
|
+
* Determines if we can start building the next block and returns its deadline.
|
|
67
|
+
*
|
|
68
|
+
* The timetable divides the slot into fixed sub-slots. This method finds the next
|
|
69
|
+
* available sub-slot that has enough time remaining to build a block.
|
|
70
|
+
*
|
|
71
|
+
* @param secondsIntoSlot - Current time (seconds into the slot)
|
|
72
|
+
* @returns Object with canStart flag, deadline, and whether this is the last block
|
|
73
|
+
*/
|
|
74
|
+
canStartNextBlock(secondsIntoSlot: number): {
|
|
75
|
+
canStart: true;
|
|
76
|
+
deadline: undefined;
|
|
77
|
+
isLastBlock: true;
|
|
78
|
+
} | {
|
|
79
|
+
canStart: false;
|
|
80
|
+
deadline: undefined;
|
|
81
|
+
isLastBlock: false;
|
|
82
|
+
} | {
|
|
83
|
+
canStart: boolean;
|
|
84
|
+
deadline: number;
|
|
85
|
+
isLastBlock: boolean;
|
|
86
|
+
};
|
|
49
87
|
}
|
|
50
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
88
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZXRhYmxlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2VxdWVuY2VyL3RpbWV0YWJsZS50cyJdLCJuY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SSxDQUFDO1FBQUMsUUFBUSxFQUFFLFNBQVMsQ0FBQztRQUFDLFdBQVcsRUFBRSxJQUFJLENBQUE7S0FBRSxHQUMxRDtRQUFFLFFBQVEsRUFBRSxLQUFLLENBQUM7UUFBQyxRQUFRLEVBQUUsU0FBUyxDQUFDO1FBQUMsV0FBVyxFQUFFLEtBQUssQ0FBQTtLQUFFLEdBQzVEO1FBQUUsUUFBUSxFQUFFLE9BQU8sQ0FBQztRQUFDLFFBQVEsRUFBRSxNQUFNLENBQUM7UUFBQyxXQUFXLEVBQUUsT0FBTyxDQUFBO0tBQUUsQ0F3RGhFO0NBQ0YifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timetable.d.ts","sourceRoot":"","sources":["../../src/sequencer/timetable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"timetable.d.ts","sourceRoot":"","sources":["../../src/sequencer/timetable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AASpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,qBAAa,kBAAkB;IAqE3B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;IACzB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC;IArEvB;;;;OAIG;IACH,SAAgB,kBAAkB,EAAE,MAAM,CAAC;IAE3C;;;;OAIG;IACH,SAAgB,oBAAoB,EAAE,MAAM,CAAC;IAE7C;;;;;OAKG;IACH,SAAgB,0BAA0B,EAAE,MAAM,CAAC;IAEnD;;;;OAIG;IACH,SAAgB,gBAAgB,EAAE,MAAM,CAAC;IAEzC;;;OAGG;IACH,SAAgB,gBAAgB,EAAE,MAAM,CAAsB;IAE9D,uDAAuD;IACvD,SAAgB,4BAA4B,EAAE,MAAM,CAAkC;IAEtF,mGAAmG;IACnG,SAAgB,kBAAk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EAAE,IAAI,CAAA;KAAE,GAC1D;QAAE,QAAQ,EAAE,KAAK,CAAC;QAAC,QAAQ,EAAE,SAAS,CAAC;QAAC,WAAW,EAAE,KAAK,CAAA;KAAE,GAC5D;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,OAAO,CAAA;KAAE,CAwDhE;CACF"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DEFAULT_ATTESTATION_PROPAGATION_TIME } from '../config.js';
|
|
1
|
+
import { CHECKPOINT_ASSEMBLE_TIME, CHECKPOINT_INITIALIZATION_TIME, DEFAULT_P2P_PROPAGATION_TIME, MIN_EXECUTION_TIME } from '@aztec/stdlib/timetable';
|
|
3
2
|
import { SequencerTooSlowError } from './errors.js';
|
|
4
3
|
import { SequencerState } from './utils.js';
|
|
5
|
-
const MIN_EXECUTION_TIME = 1;
|
|
6
|
-
const BLOCK_PREPARE_TIME = 1;
|
|
7
|
-
const BLOCK_VALIDATION_TIME = 1;
|
|
8
4
|
export class SequencerTimetable {
|
|
9
5
|
metrics;
|
|
10
6
|
log;
|
|
@@ -14,85 +10,94 @@ export class SequencerTimetable {
|
|
|
14
10
|
* starts building at this time, and all times hold, it will have at least `minExecutionTime` to execute txs for the block.
|
|
15
11
|
*/ initializeDeadline;
|
|
16
12
|
/**
|
|
13
|
+
* Fixed time offset (in seconds) when the first sub-slot starts, used as baseline for all block deadlines.
|
|
14
|
+
* This is an estimate of how long initialization (sync + proposer check) typically takes.
|
|
15
|
+
* If actual initialization takes longer/shorter, blocks just get less/more time accordingly.
|
|
16
|
+
*/ initializationOffset;
|
|
17
|
+
/**
|
|
18
|
+
* Total time needed to finalize and publish a checkpoint, including:
|
|
19
|
+
* - Assembling the checkpoint
|
|
20
|
+
* - Round-trip p2p propagation for the checkpoint proposal and its corresponding attestations
|
|
21
|
+
* - Publishing to L1
|
|
22
|
+
*/ checkpointFinalizationTime;
|
|
23
|
+
/**
|
|
17
24
|
* How long it takes to get a published block into L1. L1 builders typically accept txs up to 4 seconds into their slot,
|
|
18
25
|
* but we'll timeout sooner to give it more time to propagate (remember we also have blobs!). Still, when working in anvil,
|
|
19
26
|
* we can just post in the very last second of the L1 slot and still expect the tx to be accepted.
|
|
20
27
|
*/ l1PublishingTime;
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
/**
|
|
29
|
+
* What's the minimum time we want to leave available for execution and reexecution (used to derive init deadline)
|
|
30
|
+
* Defaults to half of the block duration if set, otherwise a constant.
|
|
31
|
+
*/ minExecutionTime;
|
|
32
|
+
/** How long it takes to get ready to start building */ checkpointInitializationTime;
|
|
33
|
+
/** How long it takes to for proposals and attestations to travel across the p2p layer (one-way) */ p2pPropagationTime;
|
|
34
|
+
/** How much time we spend assembling a checkpoint after building the last block */ checkpointAssembleTime;
|
|
25
35
|
/** Ethereum slot duration in seconds */ ethereumSlotDuration;
|
|
26
36
|
/** Aztec slot duration in seconds (must be multiple of ethereum slot duration) */ aztecSlotDuration;
|
|
27
|
-
/** How late into an L1 slot we can send a tx to make sure it gets included in the immediate next block. Complement of l1PublishingTime. */ maxL1TxInclusionTimeIntoSlot;
|
|
28
37
|
/** Whether assertTimeLeft will throw if not enough time. */ enforce;
|
|
29
|
-
|
|
38
|
+
/** Duration per block when building multiple blocks per slot (undefined = single block per slot) */ blockDuration;
|
|
39
|
+
/** Maximum number of blocks that can be built in this slot configuration */ maxNumberOfBlocks;
|
|
40
|
+
constructor(opts, metrics, log){
|
|
30
41
|
this.metrics = metrics;
|
|
31
42
|
this.log = log;
|
|
32
43
|
this.minExecutionTime = MIN_EXECUTION_TIME;
|
|
33
|
-
this.
|
|
34
|
-
this.
|
|
44
|
+
this.checkpointInitializationTime = CHECKPOINT_INITIALIZATION_TIME;
|
|
45
|
+
this.checkpointAssembleTime = CHECKPOINT_ASSEMBLE_TIME;
|
|
35
46
|
this.ethereumSlotDuration = opts.ethereumSlotDuration;
|
|
36
47
|
this.aztecSlotDuration = opts.aztecSlotDuration;
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
48
|
+
this.l1PublishingTime = opts.l1PublishingTime;
|
|
49
|
+
this.p2pPropagationTime = opts.p2pPropagationTime ?? DEFAULT_P2P_PROPAGATION_TIME;
|
|
50
|
+
this.blockDuration = opts.blockDurationMs ? opts.blockDurationMs / 1000 : undefined;
|
|
40
51
|
this.enforce = opts.enforce;
|
|
41
52
|
// Assume zero-cost propagation time and faster runs in test environments where L1 slot duration is shortened
|
|
42
53
|
if (this.ethereumSlotDuration < 8) {
|
|
43
|
-
this.
|
|
44
|
-
this.
|
|
45
|
-
this.
|
|
54
|
+
this.p2pPropagationTime = 0;
|
|
55
|
+
this.checkpointAssembleTime = 0.5;
|
|
56
|
+
this.checkpointInitializationTime = 0.5;
|
|
57
|
+
this.minExecutionTime = 1;
|
|
46
58
|
}
|
|
47
|
-
|
|
48
|
-
|
|
59
|
+
// Min execution time cannot be less than the block duration if set
|
|
60
|
+
if (this.blockDuration !== undefined && this.minExecutionTime > this.blockDuration) {
|
|
61
|
+
this.minExecutionTime = this.blockDuration;
|
|
62
|
+
}
|
|
63
|
+
// Calculate initialization offset - estimate of time needed for sync + proposer check
|
|
64
|
+
// This is the baseline for all sub-slot deadlines
|
|
65
|
+
this.initializationOffset = this.checkpointInitializationTime;
|
|
66
|
+
// Calculate total checkpoint finalization time (assembly + attestations + L1 publishing)
|
|
67
|
+
this.checkpointFinalizationTime = this.checkpointAssembleTime + this.p2pPropagationTime * 2 + // Round-trip propagation
|
|
68
|
+
this.l1PublishingTime; // L1 publishing
|
|
69
|
+
// Calculate maximum number of blocks that fit in this slot
|
|
70
|
+
if (!this.blockDuration) {
|
|
71
|
+
this.maxNumberOfBlocks = 1; // Single block per slot
|
|
72
|
+
} else {
|
|
73
|
+
const timeReservedAtEnd = this.blockDuration + // Last sub-slot for validator re-execution
|
|
74
|
+
this.checkpointFinalizationTime; // Checkpoint finalization
|
|
75
|
+
const timeAvailableForBlocks = this.aztecSlotDuration - this.initializationOffset - timeReservedAtEnd;
|
|
76
|
+
this.maxNumberOfBlocks = Math.floor(timeAvailableForBlocks / this.blockDuration);
|
|
77
|
+
}
|
|
78
|
+
// Minimum work to do within a slot for building a block with the minimum time for execution and publishing its checkpoint
|
|
79
|
+
const minWorkToDo = this.initializationOffset + this.minExecutionTime * 2 + // Execution and reexecution
|
|
80
|
+
this.checkpointFinalizationTime;
|
|
81
|
+
const initializeDeadline = this.aztecSlotDuration - minWorkToDo;
|
|
49
82
|
this.initializeDeadline = initializeDeadline;
|
|
50
|
-
this.log
|
|
83
|
+
this.log?.info(`Sequencer timetable initialized with ${this.maxNumberOfBlocks} blocks per slot (${this.enforce ? 'enforced' : 'not enforced'})`, {
|
|
51
84
|
ethereumSlotDuration: this.ethereumSlotDuration,
|
|
52
85
|
aztecSlotDuration: this.aztecSlotDuration,
|
|
53
|
-
maxL1TxInclusionTimeIntoSlot: this.maxL1TxInclusionTimeIntoSlot,
|
|
54
86
|
l1PublishingTime: this.l1PublishingTime,
|
|
55
87
|
minExecutionTime: this.minExecutionTime,
|
|
56
|
-
blockPrepareTime: this.
|
|
57
|
-
|
|
58
|
-
|
|
88
|
+
blockPrepareTime: this.checkpointInitializationTime,
|
|
89
|
+
p2pPropagationTime: this.p2pPropagationTime,
|
|
90
|
+
blockAssembleTime: this.checkpointAssembleTime,
|
|
59
91
|
initializeDeadline: this.initializeDeadline,
|
|
60
92
|
enforce: this.enforce,
|
|
61
|
-
|
|
93
|
+
minWorkToDo,
|
|
94
|
+
blockDuration: this.blockDuration,
|
|
95
|
+
maxNumberOfBlocks: this.maxNumberOfBlocks
|
|
62
96
|
});
|
|
63
97
|
if (initializeDeadline <= 0) {
|
|
64
|
-
throw new Error(`Block proposal initialize deadline cannot be negative (got ${initializeDeadline} from total time needed ${
|
|
98
|
+
throw new Error(`Block proposal initialize deadline cannot be negative (got ${initializeDeadline} from total time needed ${minWorkToDo} and a slot duration of ${this.aztecSlotDuration}).`);
|
|
65
99
|
}
|
|
66
100
|
}
|
|
67
|
-
get afterBlockBuildingTimeNeededWithoutReexec() {
|
|
68
|
-
return this.blockValidationTime + this.attestationPropagationTime * 2 + this.l1PublishingTime;
|
|
69
|
-
}
|
|
70
|
-
getBlockProposalExecTimeEnd(secondsIntoSlot) {
|
|
71
|
-
// We are N seconds into the slot. We need to account for `afterBlockBuildingTimeNeededWithoutReexec` seconds,
|
|
72
|
-
// send then split the remaining time between the re-execution and the block building.
|
|
73
|
-
const maxAllowed = this.aztecSlotDuration - this.afterBlockBuildingTimeNeededWithoutReexec;
|
|
74
|
-
const available = maxAllowed - secondsIntoSlot;
|
|
75
|
-
const executionTimeEnd = secondsIntoSlot + available / 2;
|
|
76
|
-
this.log.debug(`Block proposal execution time deadline is ${executionTimeEnd}`, {
|
|
77
|
-
secondsIntoSlot,
|
|
78
|
-
maxAllowed,
|
|
79
|
-
available,
|
|
80
|
-
executionTimeEnd
|
|
81
|
-
});
|
|
82
|
-
return executionTimeEnd;
|
|
83
|
-
}
|
|
84
|
-
get afterBlockReexecTimeNeeded() {
|
|
85
|
-
return this.attestationPropagationTime + this.l1PublishingTime;
|
|
86
|
-
}
|
|
87
|
-
getValidatorReexecTimeEnd(secondsIntoSlot) {
|
|
88
|
-
// We need to leave for `afterBlockReexecTimeNeeded` seconds available.
|
|
89
|
-
const validationTimeEnd = this.aztecSlotDuration - this.afterBlockReexecTimeNeeded;
|
|
90
|
-
this.log.debug(`Validator re-execution time deadline is ${validationTimeEnd}`, {
|
|
91
|
-
secondsIntoSlot,
|
|
92
|
-
validationTimeEnd
|
|
93
|
-
});
|
|
94
|
-
return validationTimeEnd;
|
|
95
|
-
}
|
|
96
101
|
getMaxAllowedTime(state) {
|
|
97
102
|
switch(state){
|
|
98
103
|
case SequencerState.STOPPED:
|
|
@@ -101,13 +106,16 @@ export class SequencerTimetable {
|
|
|
101
106
|
case SequencerState.SYNCHRONIZING:
|
|
102
107
|
return; // We don't really care about times for this states
|
|
103
108
|
case SequencerState.PROPOSER_CHECK:
|
|
104
|
-
case SequencerState.
|
|
109
|
+
case SequencerState.INITIALIZING_CHECKPOINT:
|
|
105
110
|
return this.initializeDeadline;
|
|
111
|
+
case SequencerState.WAITING_FOR_TXS:
|
|
106
112
|
case SequencerState.CREATING_BLOCK:
|
|
107
|
-
|
|
113
|
+
case SequencerState.WAITING_UNTIL_NEXT_BLOCK:
|
|
114
|
+
return this.initializeDeadline + this.checkpointInitializationTime;
|
|
115
|
+
case SequencerState.ASSEMBLING_CHECKPOINT:
|
|
108
116
|
case SequencerState.COLLECTING_ATTESTATIONS:
|
|
109
|
-
return this.aztecSlotDuration - this.l1PublishingTime - 2 * this.
|
|
110
|
-
case SequencerState.
|
|
117
|
+
return this.aztecSlotDuration - this.l1PublishingTime - 2 * this.p2pPropagationTime;
|
|
118
|
+
case SequencerState.PUBLISHING_CHECKPOINT:
|
|
111
119
|
return this.aztecSlotDuration - this.l1PublishingTime;
|
|
112
120
|
default:
|
|
113
121
|
{
|
|
@@ -129,9 +137,86 @@ export class SequencerTimetable {
|
|
|
129
137
|
throw new SequencerTooSlowError(newState, maxAllowedTime, secondsIntoSlot);
|
|
130
138
|
}
|
|
131
139
|
this.metrics?.recordStateTransitionBufferMs(Math.floor(bufferSeconds * 1000), newState);
|
|
132
|
-
this.log
|
|
140
|
+
this.log?.trace(`Enough time to transition to ${newState}`, {
|
|
133
141
|
maxAllowedTime,
|
|
134
142
|
secondsIntoSlot
|
|
135
143
|
});
|
|
136
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* Determines if we can start building the next block and returns its deadline.
|
|
147
|
+
*
|
|
148
|
+
* The timetable divides the slot into fixed sub-slots. This method finds the next
|
|
149
|
+
* available sub-slot that has enough time remaining to build a block.
|
|
150
|
+
*
|
|
151
|
+
* @param secondsIntoSlot - Current time (seconds into the slot)
|
|
152
|
+
* @returns Object with canStart flag, deadline, and whether this is the last block
|
|
153
|
+
*/ canStartNextBlock(secondsIntoSlot) {
|
|
154
|
+
// When timetable enforcement is disabled, always allow starting,
|
|
155
|
+
// and build a single block with no deadline. This is here just to
|
|
156
|
+
// satisfy a subset of e2e tests and the sandbox that assume that the
|
|
157
|
+
// sequencer is permanently mining every tx sent.
|
|
158
|
+
if (!this.enforce) {
|
|
159
|
+
return {
|
|
160
|
+
canStart: true,
|
|
161
|
+
deadline: undefined,
|
|
162
|
+
isLastBlock: true
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
// If no block duration is set, then we're in single-block mode, which
|
|
166
|
+
// is handled for backwards compatibility towards another subset of e2e tests.
|
|
167
|
+
if (this.blockDuration === undefined) {
|
|
168
|
+
// In single block mode, execution and re-execution happen sequentially, so we need to
|
|
169
|
+
// split the available time between them. After building, we need time for attestations and L1.
|
|
170
|
+
const maxAllowed = this.aztecSlotDuration - this.checkpointFinalizationTime;
|
|
171
|
+
const available = (maxAllowed - secondsIntoSlot) / 2; // Split remaining time: half for execution, half for re-execution
|
|
172
|
+
const canStart = available >= this.minExecutionTime;
|
|
173
|
+
const deadline = secondsIntoSlot + available;
|
|
174
|
+
this.log?.verbose(`${canStart ? 'Can' : 'Cannot'} start single-block checkpoint at ${secondsIntoSlot}s into slot`, {
|
|
175
|
+
secondsIntoSlot,
|
|
176
|
+
maxAllowed,
|
|
177
|
+
available,
|
|
178
|
+
deadline
|
|
179
|
+
});
|
|
180
|
+
return {
|
|
181
|
+
canStart,
|
|
182
|
+
deadline,
|
|
183
|
+
isLastBlock: true
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
// Otherwise, we're in multi-block-per-slot mode, the default when running in production
|
|
187
|
+
// Find the next available sub-slot that has enough time remaining
|
|
188
|
+
for(let subSlot = 1; subSlot <= this.maxNumberOfBlocks; subSlot++){
|
|
189
|
+
// Calculate end for this sub-slot
|
|
190
|
+
const deadline = this.initializationOffset + subSlot * this.blockDuration;
|
|
191
|
+
// Check if we have enough time to build a block with this deadline
|
|
192
|
+
const timeUntilDeadline = deadline - secondsIntoSlot;
|
|
193
|
+
if (timeUntilDeadline >= this.minExecutionTime) {
|
|
194
|
+
// Found an available sub-slot! Is this the last one?
|
|
195
|
+
const isLastBlock = subSlot === this.maxNumberOfBlocks;
|
|
196
|
+
this.log?.verbose(`Can start ${isLastBlock ? 'last block' : 'block'} in sub-slot ${subSlot} with deadline ${deadline}s`, {
|
|
197
|
+
secondsIntoSlot,
|
|
198
|
+
deadline,
|
|
199
|
+
timeUntilDeadline,
|
|
200
|
+
subSlot,
|
|
201
|
+
maxBlocks: this.maxNumberOfBlocks
|
|
202
|
+
});
|
|
203
|
+
return {
|
|
204
|
+
canStart: true,
|
|
205
|
+
deadline,
|
|
206
|
+
isLastBlock
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
// No sub-slots available with enough time
|
|
211
|
+
this.log?.verbose(`No time left to start any more blocks`, {
|
|
212
|
+
secondsIntoSlot,
|
|
213
|
+
maxBlocks: this.maxNumberOfBlocks,
|
|
214
|
+
initializationOffset: this.initializationOffset
|
|
215
|
+
});
|
|
216
|
+
return {
|
|
217
|
+
canStart: false,
|
|
218
|
+
deadline: undefined,
|
|
219
|
+
isLastBlock: false
|
|
220
|
+
};
|
|
221
|
+
}
|
|
137
222
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { L1RollupConstants } from '@aztec/stdlib/epoch-helpers';
|
|
2
|
+
export type SequencerRollupConstants = Pick<L1RollupConstants, 'ethereumSlotDuration' | 'l1GenesisTime' | 'slotDuration'> & {
|
|
3
|
+
/** Total L2 gas (mana) allowed per checkpoint. Fetched from L1 getManaLimit(). */
|
|
4
|
+
rollupManaLimit: number;
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zZXF1ZW5jZXIvdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUVyRSxNQUFNLE1BQU0sd0JBQXdCLEdBQUcsSUFBSSxDQUN6QyxpQkFBaUIsRUFDakIsc0JBQXNCLEdBQUcsZUFBZSxHQUFHLGNBQWMsQ0FDMUQsR0FBRztJQUNGLGtGQUFrRjtJQUNsRixlQUFlLEVBQUUsTUFBTSxDQUFDO0NBQ3pCLENBQUMifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/sequencer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,iBAAiB,EACjB,sBAAsB,GAAG,eAAe,GAAG,cAAc,CAC1D,GAAG;IACF,kFAAkF;IAClF,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -9,16 +9,22 @@ export declare enum SequencerState {
|
|
|
9
9
|
SYNCHRONIZING = "SYNCHRONIZING",
|
|
10
10
|
/** Checking if we are the proposer for the current slot. */
|
|
11
11
|
PROPOSER_CHECK = "PROPOSER_CHECK",
|
|
12
|
-
/** Initializing the
|
|
13
|
-
|
|
14
|
-
/**
|
|
12
|
+
/** Initializing the checkpoint proposal. */
|
|
13
|
+
INITIALIZING_CHECKPOINT = "INITIALIZING_CHECKPOINT",
|
|
14
|
+
/** Waiting for transactions to arrive in the pool. */
|
|
15
|
+
WAITING_FOR_TXS = "WAITING_FOR_TXS",
|
|
16
|
+
/** Creating a new L2 block. Includes processing public function calls. */
|
|
15
17
|
CREATING_BLOCK = "CREATING_BLOCK",
|
|
16
|
-
/**
|
|
18
|
+
/** Waiting until the next block can be created. */
|
|
19
|
+
WAITING_UNTIL_NEXT_BLOCK = "WAITING_UNTIL_NEXT_BLOCK",
|
|
20
|
+
/** Assembling and broadcasting the checkpoint. */
|
|
21
|
+
ASSEMBLING_CHECKPOINT = "ASSEMBLING_CHECKPOINT",
|
|
22
|
+
/** Collecting attestations from its peers. */
|
|
17
23
|
COLLECTING_ATTESTATIONS = "COLLECTING_ATTESTATIONS",
|
|
18
|
-
/** Sending the tx to L1 with the L2
|
|
19
|
-
|
|
24
|
+
/** Sending the tx to L1 with the L2 checkpoint data and awaiting it to be mined.. */
|
|
25
|
+
PUBLISHING_CHECKPOINT = "PUBLISHING_CHECKPOINT"
|
|
20
26
|
}
|
|
21
|
-
export type SequencerStateWithSlot = SequencerState.
|
|
27
|
+
export type SequencerStateWithSlot = SequencerState.INITIALIZING_CHECKPOINT | SequencerState.WAITING_FOR_TXS | SequencerState.CREATING_BLOCK | SequencerState.WAITING_UNTIL_NEXT_BLOCK | SequencerState.COLLECTING_ATTESTATIONS | SequencerState.PUBLISHING_CHECKPOINT | SequencerState.PROPOSER_CHECK | SequencerState.ASSEMBLING_CHECKPOINT;
|
|
22
28
|
export type SequencerStateCallback = () => SequencerState;
|
|
23
29
|
export declare function sequencerStateToNumber(state: SequencerState): number;
|
|
24
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zZXF1ZW5jZXIvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsb0JBQVksY0FBYztJQUN4QixxRUFBcUU7SUFDckUsT0FBTyxZQUFZO0lBQ25CLGdFQUFnRTtJQUNoRSxRQUFRLGFBQWE7SUFDckIscURBQXFEO0lBQ3JELElBQUksU0FBUztJQUNiLHVDQU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
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/sequencer/utils.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,qEAAqE;IACrE,OAAO,YAAY;IACnB,gEAAgE;IAChE,QAAQ,aAAa;IACrB,qDAAqD;IACrD,IAAI,SAAS;IACb,uCAAuC;IACvC,aAAa,kBAAkB;IAC/B,4DAA4D;IAC5D,cAAc,mBAAmB;IACjC,4CAA4C;IAC5C,uBAAuB,4BAA4B;IACnD,sDAAsD;IACtD,eAAe,oBAAoB;IACnC,0EAA0E;IAC1E,cAAc,mBAAmB;IACjC,mDAAmD;IACnD,wBAAwB,6BAA6B;IACrD,kDAAkD;IAClD,qBAAqB,0BAA0B;IAC/C,8CAA8C;IAC9C,uBAAuB,4BAA4B;IACnD,qFAAqF;IACrF,qBAAqB,0BAA0B;CAChD;AAED,MAAM,MAAM,sBAAsB,GAC9B,cAAc,CAAC,uBAAuB,GACtC,cAAc,CAAC,eAAe,GAC9B,cAAc,CAAC,cAAc,GAC7B,cAAc,CAAC,wBAAwB,GACvC,cAAc,CAAC,uBAAuB,GACtC,cAAc,CAAC,qBAAqB,GACpC,cAAc,CAAC,cAAc,GAC7B,cAAc,CAAC,qBAAqB,CAAC;AAEzC,MAAM,MAAM,sBAAsB,GAAG,MAAM,cAAc,CAAC;AAE1D,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAEpE"}
|
package/dest/sequencer/utils.js
CHANGED
|
@@ -4,10 +4,13 @@ export var SequencerState = /*#__PURE__*/ function(SequencerState) {
|
|
|
4
4
|
/** Sequencer is awaiting the next call to work(). */ SequencerState["IDLE"] = "IDLE";
|
|
5
5
|
/** Synchronizing with the L2 chain. */ SequencerState["SYNCHRONIZING"] = "SYNCHRONIZING";
|
|
6
6
|
/** Checking if we are the proposer for the current slot. */ SequencerState["PROPOSER_CHECK"] = "PROPOSER_CHECK";
|
|
7
|
-
/** Initializing the
|
|
8
|
-
/**
|
|
9
|
-
/**
|
|
10
|
-
/**
|
|
7
|
+
/** Initializing the checkpoint proposal. */ SequencerState["INITIALIZING_CHECKPOINT"] = "INITIALIZING_CHECKPOINT";
|
|
8
|
+
/** Waiting for transactions to arrive in the pool. */ SequencerState["WAITING_FOR_TXS"] = "WAITING_FOR_TXS";
|
|
9
|
+
/** Creating a new L2 block. Includes processing public function calls. */ SequencerState["CREATING_BLOCK"] = "CREATING_BLOCK";
|
|
10
|
+
/** Waiting until the next block can be created. */ SequencerState["WAITING_UNTIL_NEXT_BLOCK"] = "WAITING_UNTIL_NEXT_BLOCK";
|
|
11
|
+
/** Assembling and broadcasting the checkpoint. */ SequencerState["ASSEMBLING_CHECKPOINT"] = "ASSEMBLING_CHECKPOINT";
|
|
12
|
+
/** Collecting attestations from its peers. */ SequencerState["COLLECTING_ATTESTATIONS"] = "COLLECTING_ATTESTATIONS";
|
|
13
|
+
/** Sending the tx to L1 with the L2 checkpoint data and awaiting it to be mined.. */ SequencerState["PUBLISHING_CHECKPOINT"] = "PUBLISHING_CHECKPOINT";
|
|
11
14
|
return SequencerState;
|
|
12
15
|
}({});
|
|
13
16
|
export function sequencerStateToNumber(state) {
|
package/dest/test/index.d.ts
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { L1TxUtils } from '@aztec/ethereum/l1-tx-utils';
|
|
2
|
+
import type { PublisherManager } from '@aztec/ethereum/publisher-manager';
|
|
3
3
|
import type { PublicProcessorFactory } from '@aztec/simulator/server';
|
|
4
|
-
import type { ValidatorClient } from '@aztec/validator-client';
|
|
4
|
+
import type { FullNodeCheckpointsBuilder, ValidatorClient } from '@aztec/validator-client';
|
|
5
5
|
import { SequencerClient } from '../client/sequencer-client.js';
|
|
6
6
|
import type { SequencerPublisherFactory } from '../publisher/sequencer-publisher-factory.js';
|
|
7
|
-
import type { SequencerPublisher } from '../publisher/sequencer-publisher.js';
|
|
8
7
|
import { Sequencer } from '../sequencer/sequencer.js';
|
|
9
8
|
import type { SequencerTimetable } from '../sequencer/timetable.js';
|
|
10
9
|
declare class TestSequencer_ extends Sequencer {
|
|
11
10
|
publicProcessorFactory: PublicProcessorFactory;
|
|
12
11
|
timetable: SequencerTimetable;
|
|
13
|
-
publisher: SequencerPublisher;
|
|
14
12
|
publisherFactory: SequencerPublisherFactory;
|
|
15
13
|
validatorClient: ValidatorClient;
|
|
14
|
+
checkpointsBuilder: FullNodeCheckpointsBuilder;
|
|
16
15
|
}
|
|
17
16
|
export type TestSequencer = TestSequencer_;
|
|
18
17
|
declare class TestSequencerClient_ extends SequencerClient {
|
|
19
18
|
sequencer: TestSequencer;
|
|
20
|
-
publisherManager: PublisherManager<
|
|
19
|
+
publisherManager: PublisherManager<L1TxUtils>;
|
|
21
20
|
}
|
|
22
21
|
export type TestSequencerClient = TestSequencerClient_;
|
|
23
22
|
export {};
|
|
24
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90ZXN0L2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQzdELE9BQU8sS0FBSyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sbUNBQW1DLENBQUM7QUFDMUUsT0FBTyxLQUFLLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUN0RSxPQUFPLEtBQUssRUFBRSwwQkFBMEIsRUFBRSxlQUFlLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUUzRixPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sK0JBQStCLENBQUM7QUFDaEUsT0FBTyxLQUFLLEVBQUUseUJBQXlCLEVBQUUsTUFBTSw2Q0FBNkMsQ0FBQztBQUM3RixPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDdEQsT0FBTyxLQUFLLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUVwRSxjQUFNLGNBQWUsU0FBUSxTQUFTO0lBQ3JCLHNCQUFzQixFQUFFLHNCQUFzQixDQUFDO0lBQy9DLFNBQVMsRUFBRSxrQkFBa0IsQ0FBQztJQUM5QixnQkFBZ0IsRUFBRSx5QkFBeUIsQ0FBQztJQUM1QyxlQUFlLEVBQUUsZUFBZSxDQUFDO0lBQ2pDLGtCQUFrQixFQUFFLDBCQUEwQixDQUFDO0NBQy9EO0FBRUQsTUFBTSxNQUFNLGFBQWEsR0FBRyxjQUFjLENBQUM7QUFFM0MsY0FBTSxvQkFBcUIsU0FBUSxlQUFlO0lBQ2pDLFNBQVMsRUFBRSxhQUFhLENBQUM7SUFDekIsZ0JBQWdCLEVBQUUsZ0JBQWdCLENBQUMsU0FBUyxDQUFDLENBQUM7Q0FDOUQ7QUFFRCxNQUFNLE1BQU0sbUJBQW1CLEdBQUcsb0JBQW9CLENBQUMifQ==
|
package/dest/test/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE3F,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,cAAM,cAAe,SAAQ,SAAS;IACrB,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C,SAAS,EAAE,kBAAkB,CAAC;IAC9B,gBAAgB,EAAE,yBAAyB,CAAC;IAC5C,eAAe,EAAE,eAAe,CAAC;IACjC,kBAAkB,EAAE,0BAA0B,CAAC;CAC/D;AAED,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC;AAE3C,cAAM,oBAAqB,SAAQ,eAAe;IACjC,SAAS,EAAE,aAAa,CAAC;IACzB,gBAAgB,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;CAC9D;AAED,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { type BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
|
+
import { L2Block } from '@aztec/stdlib/block';
|
|
4
|
+
import { Checkpoint } from '@aztec/stdlib/checkpoint';
|
|
5
|
+
import type { FullNodeBlockBuilderConfig, ICheckpointBlockBuilder, ICheckpointsBuilder, MerkleTreeWriteOperations, PublicProcessorLimits } from '@aztec/stdlib/interfaces/server';
|
|
6
|
+
import type { CheckpointGlobalVariables, Tx } from '@aztec/stdlib/tx';
|
|
7
|
+
import type { BuildBlockInCheckpointResult } from '@aztec/validator-client';
|
|
8
|
+
/**
|
|
9
|
+
* A fake CheckpointBuilder for testing that implements the same interface as the real one.
|
|
10
|
+
* Can be seeded with blocks to return sequentially on each `buildBlock` call.
|
|
11
|
+
*/
|
|
12
|
+
export declare class MockCheckpointBuilder implements ICheckpointBlockBuilder {
|
|
13
|
+
private readonly constants;
|
|
14
|
+
private readonly checkpointNumber;
|
|
15
|
+
private blocks;
|
|
16
|
+
private builtBlocks;
|
|
17
|
+
private usedTxsPerBlock;
|
|
18
|
+
private blockIndex;
|
|
19
|
+
/** Optional function to dynamically provide the block (alternative to seedBlocks) */
|
|
20
|
+
private blockProvider;
|
|
21
|
+
/** Track calls for assertions */
|
|
22
|
+
buildBlockCalls: Array<{
|
|
23
|
+
blockNumber: BlockNumber;
|
|
24
|
+
timestamp: bigint;
|
|
25
|
+
opts: PublicProcessorLimits;
|
|
26
|
+
}>;
|
|
27
|
+
/** Track all consumed transaction hashes across buildBlock calls */
|
|
28
|
+
consumedTxHashes: Set<string>;
|
|
29
|
+
completeCheckpointCalled: boolean;
|
|
30
|
+
getCheckpointCalled: boolean;
|
|
31
|
+
/** Set to an error to make buildBlock throw on next call */
|
|
32
|
+
errorOnBuild: Error | undefined;
|
|
33
|
+
constructor(constants: CheckpointGlobalVariables, checkpointNumber: CheckpointNumber);
|
|
34
|
+
/** Seed the builder with blocks to return on successive buildBlock calls */
|
|
35
|
+
seedBlocks(blocks: L2Block[], usedTxsPerBlock?: Tx[][]): this;
|
|
36
|
+
/**
|
|
37
|
+
* Set a function that provides blocks dynamically.
|
|
38
|
+
* Useful for tests where the block is determined at call time (e.g., sequencer tests).
|
|
39
|
+
*/
|
|
40
|
+
setBlockProvider(provider: () => L2Block): this;
|
|
41
|
+
getConstantData(): CheckpointGlobalVariables;
|
|
42
|
+
buildBlock(pendingTxs: Iterable<Tx> | AsyncIterable<Tx>, blockNumber: BlockNumber, timestamp: bigint, opts: PublicProcessorLimits): Promise<BuildBlockInCheckpointResult>;
|
|
43
|
+
completeCheckpoint(): Promise<Checkpoint>;
|
|
44
|
+
getCheckpoint(): Promise<Checkpoint>;
|
|
45
|
+
private buildCheckpoint;
|
|
46
|
+
/** Resets per-checkpoint state (built blocks, consumed txs) while preserving config (blockProvider, seeded blocks). */
|
|
47
|
+
resetCheckpointState(): void;
|
|
48
|
+
/** Reset for reuse in another test */
|
|
49
|
+
reset(): void;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* A fake CheckpointsBuilder (factory) for testing that implements the same interface
|
|
53
|
+
* as FullNodeCheckpointsBuilder. Returns MockCheckpointBuilder instances.
|
|
54
|
+
* Does NOT use jest mocks - this is a proper test double.
|
|
55
|
+
*/
|
|
56
|
+
export declare class MockCheckpointsBuilder implements ICheckpointsBuilder {
|
|
57
|
+
private checkpointBuilder;
|
|
58
|
+
/** Track calls for assertions */
|
|
59
|
+
startCheckpointCalls: Array<{
|
|
60
|
+
checkpointNumber: CheckpointNumber;
|
|
61
|
+
constants: CheckpointGlobalVariables;
|
|
62
|
+
l1ToL2Messages: Fr[];
|
|
63
|
+
previousCheckpointOutHashes: Fr[];
|
|
64
|
+
feeAssetPriceModifier: bigint;
|
|
65
|
+
}>;
|
|
66
|
+
openCheckpointCalls: Array<{
|
|
67
|
+
checkpointNumber: CheckpointNumber;
|
|
68
|
+
constants: CheckpointGlobalVariables;
|
|
69
|
+
l1ToL2Messages: Fr[];
|
|
70
|
+
previousCheckpointOutHashes: Fr[];
|
|
71
|
+
existingBlocks: L2Block[];
|
|
72
|
+
feeAssetPriceModifier: bigint;
|
|
73
|
+
}>;
|
|
74
|
+
updateConfigCalls: Array<Partial<FullNodeBlockBuilderConfig>>;
|
|
75
|
+
/**
|
|
76
|
+
* Set the MockCheckpointBuilder to return from startCheckpoint.
|
|
77
|
+
* Must be called before startCheckpoint is invoked.
|
|
78
|
+
*/
|
|
79
|
+
setCheckpointBuilder(builder: MockCheckpointBuilder): this;
|
|
80
|
+
/**
|
|
81
|
+
* Creates a new MockCheckpointBuilder with the given constants.
|
|
82
|
+
* Convenience method that creates and sets the builder in one call.
|
|
83
|
+
*/
|
|
84
|
+
createCheckpointBuilder(constants: CheckpointGlobalVariables, checkpointNumber: CheckpointNumber): MockCheckpointBuilder;
|
|
85
|
+
/** Get the current checkpoint builder (for assertions) */
|
|
86
|
+
getCheckpointBuilder(): MockCheckpointBuilder | undefined;
|
|
87
|
+
getConfig(): FullNodeBlockBuilderConfig;
|
|
88
|
+
updateConfig(config: Partial<FullNodeBlockBuilderConfig>): void;
|
|
89
|
+
startCheckpoint(checkpointNumber: CheckpointNumber, constants: CheckpointGlobalVariables, feeAssetPriceModifier: bigint, l1ToL2Messages: Fr[], previousCheckpointOutHashes: Fr[], _fork: MerkleTreeWriteOperations): Promise<ICheckpointBlockBuilder>;
|
|
90
|
+
openCheckpoint(checkpointNumber: CheckpointNumber, constants: CheckpointGlobalVariables, feeAssetPriceModifier: bigint, l1ToL2Messages: Fr[], previousCheckpointOutHashes: Fr[], _fork: MerkleTreeWriteOperations, existingBlocks?: L2Block[]): Promise<ICheckpointBlockBuilder>;
|
|
91
|
+
getFork(_blockNumber: BlockNumber): Promise<MerkleTreeWriteOperations>;
|
|
92
|
+
/** Reset for reuse in another test */
|
|
93
|
+
reset(): void;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9ja19jaGVja3BvaW50X2J1aWxkZXIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90ZXN0L21vY2tfY2hlY2twb2ludF9idWlsZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxLQUFLLFdBQVcsRUFBRSxnQkFBZ0IsRUFBeUIsTUFBTSxpQ0FBaUMsQ0FBQztBQUM1RyxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFFcEQsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQzlDLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUN0RCxPQUFPLEtBQUssRUFDViwwQkF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