@aztec/stdlib 5.0.0-nightly.20260601 → 5.0.0-nightly.20260611
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/abi/contract_artifact.d.ts +14 -1
- package/dest/abi/contract_artifact.d.ts.map +1 -1
- package/dest/abi/contract_artifact.js +17 -0
- package/dest/aztec-address/index.d.ts +4 -3
- package/dest/aztec-address/index.d.ts.map +1 -1
- package/dest/aztec-address/index.js +5 -2
- package/dest/block/l2_block_source.d.ts +12 -6
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/checkpoint/checkpoint.js +2 -2
- package/dest/checkpoint/validate.d.ts +11 -3
- package/dest/checkpoint/validate.d.ts.map +1 -1
- package/dest/checkpoint/validate.js +9 -6
- package/dest/config/index.d.ts +1 -2
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +0 -1
- package/dest/config/sequencer-config.d.ts +2 -2
- package/dest/config/sequencer-config.d.ts.map +1 -1
- package/dest/config/sequencer-config.js +19 -1
- package/dest/deserialization/index.d.ts +35 -3
- package/dest/deserialization/index.d.ts.map +1 -1
- package/dest/deserialization/index.js +32 -1
- package/dest/gas/gas.d.ts +4 -3
- package/dest/gas/gas.d.ts.map +1 -1
- package/dest/gas/gas.js +6 -3
- package/dest/gas/gas_fees.d.ts +4 -3
- package/dest/gas/gas_fees.d.ts.map +1 -1
- package/dest/gas/gas_fees.js +7 -3
- package/dest/gas/gas_settings.d.ts +4 -3
- package/dest/gas/gas_settings.d.ts.map +1 -1
- package/dest/gas/gas_settings.js +6 -3
- package/dest/interfaces/archiver.d.ts +7 -9
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +11 -5
- package/dest/interfaces/aztec-node-admin.d.ts +6 -3
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.d.ts +51 -13
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +25 -6
- package/dest/interfaces/block_response.d.ts +5 -5
- package/dest/interfaces/block_response.d.ts.map +1 -1
- package/dest/interfaces/checkpoint_response.d.ts +5 -5
- package/dest/interfaces/checkpoint_response.d.ts.map +1 -1
- package/dest/interfaces/configs.d.ts +17 -5
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +3 -1
- package/dest/interfaces/p2p.d.ts +8 -3
- package/dest/interfaces/p2p.d.ts.map +1 -1
- package/dest/interfaces/p2p.js +3 -1
- package/dest/interfaces/prover-client.d.ts +2 -3
- package/dest/interfaces/prover-client.d.ts.map +1 -1
- package/dest/interfaces/prover-node.d.ts +8 -3
- package/dest/interfaces/prover-node.d.ts.map +1 -1
- package/dest/interfaces/prover-node.js +9 -7
- package/dest/interfaces/server.d.ts +1 -2
- package/dest/interfaces/server.d.ts.map +1 -1
- package/dest/interfaces/server.js +0 -1
- package/dest/interfaces/validator.d.ts +9 -2
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +3 -1
- package/dest/kernel/log_hash.d.ts +6 -2
- package/dest/kernel/log_hash.d.ts.map +1 -1
- package/dest/kernel/log_hash.js +21 -9
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +8 -5
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +22 -7
- package/dest/kernel/private_to_avm_accumulated_data.d.ts +6 -4
- package/dest/kernel/private_to_avm_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_avm_accumulated_data.js +11 -5
- package/dest/kernel/private_to_public_accumulated_data.d.ts +4 -3
- package/dest/kernel/private_to_public_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_public_accumulated_data.js +6 -3
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +4 -3
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.js +7 -3
- package/dest/kernel/private_to_rollup_accumulated_data.d.ts +4 -3
- package/dest/kernel/private_to_rollup_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_rollup_accumulated_data.js +6 -3
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +4 -3
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.js +7 -3
- package/dest/kernel/public_call_request.d.ts +8 -5
- package/dest/kernel/public_call_request.d.ts.map +1 -1
- package/dest/kernel/public_call_request.js +16 -7
- package/dest/logs/app_tagging_secret_kind.d.ts +2 -1
- package/dest/logs/app_tagging_secret_kind.d.ts.map +1 -1
- package/dest/logs/app_tagging_secret_kind.js +13 -0
- package/dest/logs/contract_class_log.d.ts +5 -3
- package/dest/logs/contract_class_log.d.ts.map +1 -1
- package/dest/logs/contract_class_log.js +11 -9
- package/dest/logs/log_result.d.ts +3 -3
- package/dest/logs/log_result.d.ts.map +1 -1
- package/dest/logs/message_context.d.ts +3 -2
- package/dest/logs/message_context.d.ts.map +1 -1
- package/dest/logs/message_context.js +4 -0
- package/dest/logs/private_log.d.ts +3 -2
- package/dest/logs/private_log.d.ts.map +1 -1
- package/dest/logs/private_log.js +6 -3
- package/dest/messaging/l2_to_l1_membership.d.ts +11 -4
- package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_membership.js +22 -7
- package/dest/messaging/l2_to_l1_message.d.ts +6 -2
- package/dest/messaging/l2_to_l1_message.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_message.js +21 -12
- package/dest/proofs/chonk_proof.d.ts +6 -4
- package/dest/proofs/chonk_proof.d.ts.map +1 -1
- package/dest/proofs/chonk_proof.js +20 -18
- package/dest/timetable/budgets.d.ts +55 -0
- package/dest/timetable/budgets.d.ts.map +1 -0
- package/dest/timetable/budgets.js +55 -0
- package/dest/timetable/consensus_timetable.d.ts +72 -0
- package/dest/timetable/consensus_timetable.d.ts.map +1 -0
- package/dest/timetable/consensus_timetable.js +91 -0
- package/dest/timetable/index.d.ts +4 -87
- package/dest/timetable/index.d.ts.map +1 -1
- package/dest/timetable/index.js +3 -243
- package/dest/timetable/proposer_timetable.d.ts +112 -0
- package/dest/timetable/proposer_timetable.d.ts.map +1 -0
- package/dest/timetable/proposer_timetable.js +161 -0
- package/dest/trees/append_only_tree_snapshot.d.ts +4 -3
- package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
- package/dest/trees/append_only_tree_snapshot.js +6 -3
- package/dest/tx/block_header.d.ts +4 -3
- package/dest/tx/block_header.d.ts.map +1 -1
- package/dest/tx/block_header.js +6 -3
- package/dest/tx/global_variables.d.ts +4 -3
- package/dest/tx/global_variables.d.ts.map +1 -1
- package/dest/tx/global_variables.js +8 -12
- package/dest/tx/hashed_values.d.ts +4 -3
- package/dest/tx/hashed_values.d.ts.map +1 -1
- package/dest/tx/hashed_values.js +6 -3
- package/dest/tx/indexed_tx_effect.d.ts +5 -2
- package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
- package/dest/tx/indexed_tx_effect.js +8 -4
- package/dest/tx/partial_state_reference.d.ts +4 -3
- package/dest/tx/partial_state_reference.d.ts.map +1 -1
- package/dest/tx/partial_state_reference.js +6 -3
- package/dest/tx/public_call_request_with_calldata.d.ts +4 -3
- package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
- package/dest/tx/public_call_request_with_calldata.js +6 -3
- package/dest/tx/state_reference.d.ts +4 -3
- package/dest/tx/state_reference.d.ts.map +1 -1
- package/dest/tx/state_reference.js +6 -4
- package/dest/tx/tree_snapshots.d.ts +4 -3
- package/dest/tx/tree_snapshots.d.ts.map +1 -1
- package/dest/tx/tree_snapshots.js +6 -4
- package/dest/tx/tx.d.ts +20 -3
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +44 -13
- package/dest/tx/tx_constant_data.d.ts +4 -3
- package/dest/tx/tx_constant_data.d.ts.map +1 -1
- package/dest/tx/tx_constant_data.js +6 -3
- package/dest/tx/tx_context.d.ts +4 -3
- package/dest/tx/tx_context.d.ts.map +1 -1
- package/dest/tx/tx_context.js +6 -6
- package/dest/tx/tx_hash.d.ts +5 -3
- package/dest/tx/tx_hash.d.ts.map +1 -1
- package/dest/tx/tx_hash.js +13 -5
- package/dest/tx/tx_receipt.d.ts +143 -60
- package/dest/tx/tx_receipt.d.ts.map +1 -1
- package/dest/tx/tx_receipt.js +141 -45
- package/dest/types/shared.d.ts +4 -3
- package/dest/types/shared.d.ts.map +1 -1
- package/dest/types/shared.js +6 -3
- package/package.json +8 -8
- package/src/abi/contract_artifact.ts +19 -0
- package/src/aztec-address/index.ts +8 -3
- package/src/block/l2_block_source.ts +15 -5
- package/src/checkpoint/checkpoint.ts +2 -2
- package/src/checkpoint/validate.ts +16 -6
- package/src/config/index.ts +0 -1
- package/src/config/sequencer-config.ts +30 -1
- package/src/deserialization/index.ts +35 -2
- package/src/gas/gas.ts +8 -3
- package/src/gas/gas_fees.ts +9 -9
- package/src/gas/gas_settings.ts +8 -3
- package/src/interfaces/archiver.ts +15 -10
- package/src/interfaces/aztec-node.ts +83 -15
- package/src/interfaces/block_response.ts +4 -4
- package/src/interfaces/checkpoint_response.ts +4 -4
- package/src/interfaces/configs.ts +18 -4
- package/src/interfaces/p2p.ts +9 -2
- package/src/interfaces/prover-client.ts +1 -3
- package/src/interfaces/prover-node.ts +13 -6
- package/src/interfaces/server.ts +0 -1
- package/src/interfaces/validator.ts +12 -1
- package/src/kernel/log_hash.ts +29 -9
- package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +29 -14
- package/src/kernel/private_to_avm_accumulated_data.ts +16 -5
- package/src/kernel/private_to_public_accumulated_data.ts +9 -3
- package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +10 -4
- package/src/kernel/private_to_rollup_accumulated_data.ts +8 -3
- package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +9 -9
- package/src/kernel/public_call_request.ts +22 -7
- package/src/logs/app_tagging_secret_kind.ts +15 -0
- package/src/logs/contract_class_log.ts +15 -5
- package/src/logs/log_result.ts +2 -2
- package/src/logs/message_context.ts +5 -1
- package/src/logs/private_log.ts +9 -3
- package/src/messaging/l2_to_l1_membership.ts +28 -11
- package/src/messaging/l2_to_l1_message.ts +29 -9
- package/src/proofs/chonk_proof.ts +24 -11
- package/src/timetable/README.md +601 -0
- package/src/timetable/budgets.ts +84 -0
- package/src/timetable/consensus_timetable.ts +132 -0
- package/src/timetable/index.ts +3 -361
- package/src/timetable/proposer_timetable.ts +214 -0
- package/src/timetable/timetable-example.svg +108 -0
- package/src/trees/append_only_tree_snapshot.ts +8 -3
- package/src/tx/block_header.ts +8 -3
- package/src/tx/global_variables.ts +10 -18
- package/src/tx/hashed_values.ts +8 -3
- package/src/tx/indexed_tx_effect.ts +17 -4
- package/src/tx/partial_state_reference.ts +8 -3
- package/src/tx/public_call_request_with_calldata.ts +8 -3
- package/src/tx/state_reference.ts +9 -4
- package/src/tx/tree_snapshots.ts +9 -4
- package/src/tx/tx.ts +58 -11
- package/src/tx/tx_constant_data.ts +8 -3
- package/src/tx/tx_context.ts +8 -3
- package/src/tx/tx_hash.ts +20 -5
- package/src/tx/tx_receipt.ts +263 -71
- package/src/types/shared.ts +8 -3
- package/dest/config/pipelining-config.d.ts +0 -15
- package/dest/config/pipelining-config.d.ts.map +0 -1
- package/dest/config/pipelining-config.js +0 -18
- package/dest/interfaces/epoch-prover.d.ts +0 -57
- package/dest/interfaces/epoch-prover.d.ts.map +0 -1
- package/dest/interfaces/epoch-prover.js +0 -1
- package/src/config/pipelining-config.ts +0 -31
- package/src/interfaces/epoch-prover.ts +0 -72
package/dest/timetable/index.js
CHANGED
|
@@ -1,243 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* The sequencer slot is divided into phases:
|
|
6
|
-
* 1. Checkpoint initialization (sync + proposer check)
|
|
7
|
-
* 2. Block building (execution)
|
|
8
|
-
* 3. Checkpoint assembly
|
|
9
|
-
* 4. P2P propagation for proposal and attestations (round-trip)
|
|
10
|
-
* 5. L1 publishing
|
|
11
|
-
*/ /** Time budget for checkpoint initialization (sync + proposer check) in seconds */ export const CHECKPOINT_INITIALIZATION_TIME = 1;
|
|
12
|
-
/** Time budget for assembling a checkpoint after building the last block in seconds */ export const CHECKPOINT_ASSEMBLE_TIME = 1;
|
|
13
|
-
/** Default one-way P2P propagation time for proposals and attestations in seconds */ export const DEFAULT_P2P_PROPAGATION_TIME = 2;
|
|
14
|
-
/** Default L1 publishing time (matches Ethereum slot duration on mainnet) in seconds */ export const DEFAULT_L1_PUBLISHING_TIME = 12;
|
|
15
|
-
/** Minimum execution time for building a block in seconds */ export const MIN_EXECUTION_TIME = 2;
|
|
16
|
-
/**
|
|
17
|
-
* Shared base for checkpoint timing implementations.
|
|
18
|
-
*
|
|
19
|
-
* This class owns the common inputs and formulas used by both pipelined and
|
|
20
|
-
* non-pipelined scheduling. Variant-specific deadline math is delegated to the
|
|
21
|
-
* concrete subclasses below.
|
|
22
|
-
*/ class BaseCheckpointTiming {
|
|
23
|
-
aztecSlotDuration;
|
|
24
|
-
blockDuration;
|
|
25
|
-
checkpointAssembleTime;
|
|
26
|
-
checkpointInitializationTime;
|
|
27
|
-
l1PublishingTime;
|
|
28
|
-
minExecutionTime;
|
|
29
|
-
p2pPropagationTime;
|
|
30
|
-
constructor(opts){
|
|
31
|
-
this.aztecSlotDuration = opts.aztecSlotDuration;
|
|
32
|
-
this.blockDuration = opts.blockDuration;
|
|
33
|
-
this.checkpointAssembleTime = opts.checkpointAssembleTime ?? CHECKPOINT_ASSEMBLE_TIME;
|
|
34
|
-
this.checkpointInitializationTime = opts.checkpointInitializationTime ?? CHECKPOINT_INITIALIZATION_TIME;
|
|
35
|
-
this.l1PublishingTime = opts.l1PublishingTime ?? DEFAULT_L1_PUBLISHING_TIME;
|
|
36
|
-
this.minExecutionTime = opts.minExecutionTime ?? MIN_EXECUTION_TIME;
|
|
37
|
-
this.p2pPropagationTime = opts.p2pPropagationTime ?? DEFAULT_P2P_PROPAGATION_TIME;
|
|
38
|
-
}
|
|
39
|
-
get checkpointFinalizationTime() {
|
|
40
|
-
// Allow enough time to
|
|
41
|
-
// - build the checkpoint
|
|
42
|
-
// - Round-trip over p2p
|
|
43
|
-
// - Publish to L1
|
|
44
|
-
return this.checkpointAssembleTime + this.p2pPropagationTime * 2 + this.l1PublishingTime;
|
|
45
|
-
}
|
|
46
|
-
get pipeliningAttestationGracePeriod() {
|
|
47
|
-
// Allow enough time to
|
|
48
|
-
// - build the block
|
|
49
|
-
// - pass it back over p2p
|
|
50
|
-
return (this.blockDuration ?? 0) + this.p2pPropagationTime;
|
|
51
|
-
}
|
|
52
|
-
get initializeDeadline() {
|
|
53
|
-
return this.aztecSlotDuration - this.minimumBuildSlotWork;
|
|
54
|
-
}
|
|
55
|
-
get checkpointAttestationStartDeadline() {
|
|
56
|
-
return this.checkpointAssemblyDeadline;
|
|
57
|
-
}
|
|
58
|
-
calculateMaxBlocksPerSlot() {
|
|
59
|
-
if (!this.blockDuration) {
|
|
60
|
-
return 1;
|
|
61
|
-
}
|
|
62
|
-
const timeAvailableForBlocks = this.aztecSlotDuration - this.checkpointInitializationTime - this.timeReservedAtEnd;
|
|
63
|
-
return Math.floor(timeAvailableForBlocks / this.blockDuration);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Checkpoint timing model for the non-pipelined sequencer flow.
|
|
68
|
-
*
|
|
69
|
-
* In this mode, checkpoint assembly, attestation collection, and L1 publishing
|
|
70
|
-
* must all complete within the current Aztec slot.
|
|
71
|
-
*/ class StandardCheckpointTimingModel extends BaseCheckpointTiming {
|
|
72
|
-
get timeReservedAtEnd() {
|
|
73
|
-
return (this.blockDuration ?? 0) + this.checkpointFinalizationTime;
|
|
74
|
-
}
|
|
75
|
-
get minimumBuildSlotWork() {
|
|
76
|
-
return this.checkpointInitializationTime + this.minExecutionTime * 2 + this.checkpointFinalizationTime;
|
|
77
|
-
}
|
|
78
|
-
get checkpointAssemblyDeadline() {
|
|
79
|
-
return this.aztecSlotDuration - this.l1PublishingTime - 2 * this.p2pPropagationTime;
|
|
80
|
-
}
|
|
81
|
-
get checkpointAttestationDeadline() {
|
|
82
|
-
return this.aztecSlotDuration - this.l1PublishingTime;
|
|
83
|
-
}
|
|
84
|
-
get checkpointPublishingDeadline() {
|
|
85
|
-
return this.aztecSlotDuration - this.l1PublishingTime;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Checkpoint timing model for proposer pipelining.
|
|
90
|
-
*
|
|
91
|
-
* In this mode, the build work starts at the wall-clock slot boundary and the
|
|
92
|
-
* checkpoint proposal is broadcast early enough that attestations complete by
|
|
93
|
-
* the end of the build slot. L1 submission can then be sent at the boundary of
|
|
94
|
-
* the target slot. The extra target-slot window getters are intended for
|
|
95
|
-
* consumers such as P2P validators that need to validate pipelined messages
|
|
96
|
-
* against wallclock time.
|
|
97
|
-
*/ class PipelinedCheckpointTimingModel extends BaseCheckpointTiming {
|
|
98
|
-
get proposalWindowIntoTargetSlot() {
|
|
99
|
-
// Proposals no longer spill into the target slot: they are broadcast early
|
|
100
|
-
// enough in the build slot that attestations complete before the boundary.
|
|
101
|
-
// Any residual tolerance into the target slot is covered by clock disparity.
|
|
102
|
-
return 0;
|
|
103
|
-
}
|
|
104
|
-
get attestationWindowIntoTargetSlot() {
|
|
105
|
-
// Straggler grace: attestations aim to complete by build-slot end. Allow a
|
|
106
|
-
// small window into the target slot for late arrivals (round-trip p2p).
|
|
107
|
-
return 2 * this.p2pPropagationTime;
|
|
108
|
-
}
|
|
109
|
-
get pipeliningAttestationGracePeriod() {
|
|
110
|
-
// Under the early-pipelining regime attestations complete inside the build
|
|
111
|
-
// slot itself, so there is no extra grace into the target slot.
|
|
112
|
-
return 0;
|
|
113
|
-
}
|
|
114
|
-
get timeReservedAtEnd() {
|
|
115
|
-
// Reserve enough time at the end of the build slot for:
|
|
116
|
-
// - assembling and broadcasting the checkpoint proposal
|
|
117
|
-
// - round-trip p2p propagation (proposal out, attestations back)
|
|
118
|
-
// - validators re-executing the last block
|
|
119
|
-
return this.checkpointAssembleTime + 2 * this.p2pPropagationTime + (this.blockDuration ?? 0);
|
|
120
|
-
}
|
|
121
|
-
get minimumBuildSlotWork() {
|
|
122
|
-
return this.checkpointInitializationTime + this.minExecutionTime * 2;
|
|
123
|
-
}
|
|
124
|
-
get checkpointAssemblyDeadline() {
|
|
125
|
-
// Allow enough time to build all blocks and receive attestations. With
|
|
126
|
-
// `pipeliningAttestationGracePeriod = 0` this equals `aztecSlotDuration`.
|
|
127
|
-
return this.aztecSlotDuration + this.pipeliningAttestationGracePeriod;
|
|
128
|
-
}
|
|
129
|
-
get checkpointAttestationDeadline() {
|
|
130
|
-
// Allowed to be into the next wallclock slot minus the allocated l1 publishing time
|
|
131
|
-
return this.aztecSlotDuration * 2 - this.l1PublishingTime;
|
|
132
|
-
}
|
|
133
|
-
get checkpointPublishingDeadline() {
|
|
134
|
-
// Allowed to be into the next wallclock slot minus the allocated l1 Publishing time
|
|
135
|
-
return this.aztecSlotDuration * 2 - this.l1PublishingTime;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Creates a checkpoint timing model for the requested scheduling mode.
|
|
140
|
-
*
|
|
141
|
-
* Most callers should use this factory and depend only on the shared
|
|
142
|
-
* `CheckpointTiming` interface. The returned implementation is selected from
|
|
143
|
-
* `opts.pipelining`.
|
|
144
|
-
*/ export function createCheckpointTimingModel(opts) {
|
|
145
|
-
validateCheckpointTimingConfig(opts);
|
|
146
|
-
const normalizedOpts = normalizeCheckpointTimingConfig(opts);
|
|
147
|
-
const timing = normalizedOpts.pipelining ? new PipelinedCheckpointTimingModel(normalizedOpts) : new StandardCheckpointTimingModel(normalizedOpts);
|
|
148
|
-
validateCheckpointTimingModel(timing);
|
|
149
|
-
return timing;
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Creates a pipelined checkpoint timing model with target-slot window accessors.
|
|
153
|
-
*
|
|
154
|
-
* Use this when the caller specifically needs the pipelined-only timing surface,
|
|
155
|
-
* such as proposal or attestation acceptance windows into the target slot.
|
|
156
|
-
*/ export function createPipelinedCheckpointTimingModel(opts) {
|
|
157
|
-
validateCheckpointTimingConfig(opts);
|
|
158
|
-
const normalizedOpts = normalizeCheckpointTimingConfig(opts);
|
|
159
|
-
const timing = new PipelinedCheckpointTimingModel(normalizedOpts);
|
|
160
|
-
validateCheckpointTimingModel(timing);
|
|
161
|
-
return timing;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Calculates the maximum number of blocks that can be built in a slot.
|
|
165
|
-
* Used by both the sequencer timetable and p2p gossipsub scoring.
|
|
166
|
-
*
|
|
167
|
-
* @param aztecSlotDurationSec - Aztec slot duration in seconds
|
|
168
|
-
* @param blockDurationSec - Duration per block in seconds (undefined = single block mode)
|
|
169
|
-
* @param opts - Optional overrides for timing constants
|
|
170
|
-
* @returns Maximum number of blocks per slot
|
|
171
|
-
*/ export function calculateMaxBlocksPerSlot(aztecSlotDurationSec, blockDurationSec, opts = {}) {
|
|
172
|
-
return createCheckpointTimingModel({
|
|
173
|
-
aztecSlotDuration: aztecSlotDurationSec,
|
|
174
|
-
blockDuration: blockDurationSec,
|
|
175
|
-
checkpointAssembleTime: opts.checkpointAssembleTime,
|
|
176
|
-
checkpointInitializationTime: opts.checkpointInitializationTime,
|
|
177
|
-
l1PublishingTime: opts.l1PublishingTime,
|
|
178
|
-
p2pPropagationTime: opts.p2pPropagationTime,
|
|
179
|
-
pipelining: opts.pipelining
|
|
180
|
-
}).calculateMaxBlocksPerSlot();
|
|
181
|
-
}
|
|
182
|
-
function assertNonNegative(name, value) {
|
|
183
|
-
if (value < 0) {
|
|
184
|
-
throw new Error(`${name} must be non-negative (got ${value})`);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
function validateCheckpointTimingConfig(opts) {
|
|
188
|
-
if (opts.aztecSlotDuration <= 0) {
|
|
189
|
-
throw new Error(`aztecSlotDuration must be positive (got ${opts.aztecSlotDuration})`);
|
|
190
|
-
}
|
|
191
|
-
if (opts.ethereumSlotDuration !== undefined && opts.ethereumSlotDuration <= 0) {
|
|
192
|
-
throw new Error(`ethereumSlotDuration must be positive when provided (got ${opts.ethereumSlotDuration})`);
|
|
193
|
-
}
|
|
194
|
-
if (opts.blockDuration !== undefined && opts.blockDuration <= 0) {
|
|
195
|
-
throw new Error(`blockDuration must be positive when provided (got ${opts.blockDuration})`);
|
|
196
|
-
}
|
|
197
|
-
if (opts.minExecutionTime !== undefined && opts.minExecutionTime <= 0) {
|
|
198
|
-
throw new Error(`minExecutionTime must be positive when provided (got ${opts.minExecutionTime})`);
|
|
199
|
-
}
|
|
200
|
-
if (opts.checkpointAssembleTime !== undefined) {
|
|
201
|
-
assertNonNegative('checkpointAssembleTime', opts.checkpointAssembleTime);
|
|
202
|
-
}
|
|
203
|
-
if (opts.checkpointInitializationTime !== undefined) {
|
|
204
|
-
assertNonNegative('checkpointInitializationTime', opts.checkpointInitializationTime);
|
|
205
|
-
}
|
|
206
|
-
if (opts.l1PublishingTime !== undefined) {
|
|
207
|
-
assertNonNegative('l1PublishingTime', opts.l1PublishingTime);
|
|
208
|
-
}
|
|
209
|
-
if (opts.p2pPropagationTime !== undefined) {
|
|
210
|
-
assertNonNegative('p2pPropagationTime', opts.p2pPropagationTime);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
function normalizeCheckpointTimingConfig(opts) {
|
|
214
|
-
let checkpointAssembleTime = opts.checkpointAssembleTime ?? CHECKPOINT_ASSEMBLE_TIME;
|
|
215
|
-
let checkpointInitializationTime = opts.checkpointInitializationTime ?? CHECKPOINT_INITIALIZATION_TIME;
|
|
216
|
-
let minExecutionTime = opts.minExecutionTime ?? MIN_EXECUTION_TIME;
|
|
217
|
-
let p2pPropagationTime = opts.p2pPropagationTime ?? DEFAULT_P2P_PROPAGATION_TIME;
|
|
218
|
-
if (opts.ethereumSlotDuration !== undefined && opts.ethereumSlotDuration < 8) {
|
|
219
|
-
p2pPropagationTime = 0;
|
|
220
|
-
checkpointAssembleTime = 0.5;
|
|
221
|
-
checkpointInitializationTime = 0.5;
|
|
222
|
-
minExecutionTime = 1;
|
|
223
|
-
}
|
|
224
|
-
if (opts.blockDuration !== undefined && minExecutionTime > opts.blockDuration) {
|
|
225
|
-
minExecutionTime = opts.blockDuration;
|
|
226
|
-
}
|
|
227
|
-
return {
|
|
228
|
-
...opts,
|
|
229
|
-
checkpointAssembleTime,
|
|
230
|
-
checkpointInitializationTime,
|
|
231
|
-
minExecutionTime,
|
|
232
|
-
p2pPropagationTime
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
function validateCheckpointTimingModel(model) {
|
|
236
|
-
if (model.blockDuration === undefined) {
|
|
237
|
-
return;
|
|
238
|
-
}
|
|
239
|
-
const timeAvailableForBlocks = model.aztecSlotDuration - model.checkpointInitializationTime - model.timeReservedAtEnd;
|
|
240
|
-
if (timeAvailableForBlocks < model.blockDuration) {
|
|
241
|
-
throw new Error(`Invalid timing configuration: only ${timeAvailableForBlocks}s available for block building, which is less than one blockDuration (${model.blockDuration}s).`);
|
|
242
|
-
}
|
|
243
|
-
}
|
|
1
|
+
export * from './budgets.js';
|
|
2
|
+
export * from './consensus_timetable.js';
|
|
3
|
+
export * from './proposer_timetable.js';
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { SlotNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
import { ConsensusTimetable, type SlotTimingConstants } from './consensus_timetable.js';
|
|
3
|
+
/** Result of selecting the next block sub-slot to build. */
|
|
4
|
+
export type SubslotSelection = {
|
|
5
|
+
canStart: true;
|
|
6
|
+
index: number;
|
|
7
|
+
deadline: undefined;
|
|
8
|
+
isLastBlock: true;
|
|
9
|
+
} | {
|
|
10
|
+
canStart: false;
|
|
11
|
+
index: undefined;
|
|
12
|
+
deadline: undefined;
|
|
13
|
+
isLastBlock: false;
|
|
14
|
+
} | {
|
|
15
|
+
canStart: true;
|
|
16
|
+
index: number;
|
|
17
|
+
deadline: number;
|
|
18
|
+
isLastBlock: boolean;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Proposer ideal/happy-path schedule and block sub-slot timetable.
|
|
22
|
+
*
|
|
23
|
+
* Composes a {@link ConsensusTimetable} and adds the operational budgets that only the proposer needs
|
|
24
|
+
* (`min_block_duration`, `p2p_propagation_time`, `checkpoint_proposal_prepare_time`). Used by the
|
|
25
|
+
* sequencer and checkpoint-proposal job. All getters take a target slot and return an absolute
|
|
26
|
+
* wall-clock timestamp in seconds (or sub-slot deadlines in seconds for {@link selectNextSubslot}).
|
|
27
|
+
*
|
|
28
|
+
* The single hard deadline {@link getAttestationDeadline} is inherited from the composed
|
|
29
|
+
* {@link ConsensusTimetable}, so the proposer uses one object.
|
|
30
|
+
*/
|
|
31
|
+
export declare class ProposerTimetable extends ConsensusTimetable {
|
|
32
|
+
/** Minimum block-building time (`min_block_duration`) in seconds. */
|
|
33
|
+
readonly minBlockDuration: number;
|
|
34
|
+
/** One-way proposal/attestation propagation budget (`p2p_propagation_time`) in seconds. */
|
|
35
|
+
readonly p2pPropagationTime: number;
|
|
36
|
+
/** Local checkpoint proposal preparation budget (`checkpoint_proposal_prepare_time`) in seconds. */
|
|
37
|
+
readonly checkpointProposalPrepareTime: number;
|
|
38
|
+
/** Proposer initialization budget (`checkpoint_proposal_init_time`) reserved before the first sub-slot, in seconds. */
|
|
39
|
+
readonly checkpointProposalInitTime: number;
|
|
40
|
+
/** Whether the proposer enforces sub-slot/start deadlines (false keeps the single-mined-block test mode). */
|
|
41
|
+
readonly enforce: boolean;
|
|
42
|
+
/** Maximum number of full-duration block sub-slots derivable from this timing config. */
|
|
43
|
+
readonly maxBlocksPerCheckpoint: number;
|
|
44
|
+
constructor(opts: {
|
|
45
|
+
l1Constants: SlotTimingConstants;
|
|
46
|
+
blockDuration: number | undefined;
|
|
47
|
+
minBlockDuration: number;
|
|
48
|
+
p2pPropagationTime: number;
|
|
49
|
+
checkpointProposalPrepareTime: number;
|
|
50
|
+
checkpointProposalInitTime: number;
|
|
51
|
+
checkpointProposalSyncGrace?: number;
|
|
52
|
+
enforce: boolean;
|
|
53
|
+
});
|
|
54
|
+
/**
|
|
55
|
+
* Computes the maximum number of full-duration block sub-slots in a checkpoint from the already-resolved
|
|
56
|
+
* budgets. Derived from the spec's `max_blocks_per_checkpoint = floor((last_block_build_time -
|
|
57
|
+
* first_subslot_start) / D)`, where the first sub-slot starts one `checkpoint_proposal_init_time` (`init`)
|
|
58
|
+
* after `build_frame_start`, so it simplifies to `floor((S - init - D - 2P - prepCp) / D)`. Single-block
|
|
59
|
+
* mode (`blockDuration` undefined) returns 1.
|
|
60
|
+
*/
|
|
61
|
+
private computeMaxBlocksPerCheckpoint;
|
|
62
|
+
/**
|
|
63
|
+
* Ideal time the last block must finish building by to make the ideal L1 publish path:
|
|
64
|
+
* `target_slot_start - E - D - 2P - prepCp` (= `checkpoint_proposal_send_time - prepCp`). Single value;
|
|
65
|
+
* the proposer sizes block production around the ideal L1-publish path only. In single-block mode
|
|
66
|
+
* (`blockDuration` undefined) the `D` term drops out, since the single block is itself the final block.
|
|
67
|
+
*/
|
|
68
|
+
getLastBlockBuildTime(slot: SlotNumber): number;
|
|
69
|
+
/**
|
|
70
|
+
* Latest start at which the proposer can still squeeze in a minimum-duration block.
|
|
71
|
+
*
|
|
72
|
+
* Multi-block mode: `last_block_build_time - min_block_duration`, an ideal-derived cutoff
|
|
73
|
+
* intentionally earlier (by `P`) than the consensus receive gate would strictly allow, and
|
|
74
|
+
* conservatively no later than the final sub-slot's start cutoff in {@link selectNextSubslot}.
|
|
75
|
+
*
|
|
76
|
+
* Single-block mode (`blockDuration` undefined): `attestation_deadline - 2 * min_block_duration`,
|
|
77
|
+
* matching {@link selectNextSubslot}'s single-block branch (which needs `min_block_duration` for
|
|
78
|
+
* execution and another for re-execution before the attestation deadline). This keeps the build-entry
|
|
79
|
+
* start gate from abandoning a slot that {@link selectNextSubslot} would still allow to start.
|
|
80
|
+
*/
|
|
81
|
+
getBuildStartDeadline(slot: SlotNumber): number;
|
|
82
|
+
/** Ideal L1 publish/send time: `target_slot_start - E`. Also the ideal attestation-receipt target. */
|
|
83
|
+
getL1PublishIdealTime(slot: SlotNumber): number;
|
|
84
|
+
/**
|
|
85
|
+
* Build deadline for sub-slot `k` (zero-based): `build_frame_start + init + (k + 1) * D`.
|
|
86
|
+
*
|
|
87
|
+
* The `init` (`checkpoint_proposal_init_time`) offset reserves the proposer's sync/proposer-check/init
|
|
88
|
+
* budget at the start of the build frame, so the first sub-slot still has its full duration once the
|
|
89
|
+
* prologue finishes rather than being eaten by it.
|
|
90
|
+
*/
|
|
91
|
+
getBlockBuildDeadline(slot: SlotNumber, blockIndex: number): number;
|
|
92
|
+
/** Latest time to keep waiting for txs for sub-slot `k`: `block_build_deadline(k) - min_block_duration`. */
|
|
93
|
+
getWaitForTxsDeadline(slot: SlotNumber, blockIndex: number): number;
|
|
94
|
+
/** Maximum number of full-duration block sub-slots for this timing config. */
|
|
95
|
+
getMaxBlocksPerCheckpoint(): number;
|
|
96
|
+
/**
|
|
97
|
+
* Selects the next block sub-slot to build for the target slot given the current wall-clock time.
|
|
98
|
+
*
|
|
99
|
+
* Scans sub-slots in order and picks the first whose build deadline is at least `min_block_duration`
|
|
100
|
+
* in the future. Sub-slots with insufficient remaining headroom are skipped.
|
|
101
|
+
*
|
|
102
|
+
* When enforcement is disabled, always allows building a single block with no deadline (test/sandbox
|
|
103
|
+
* mode). In single-block mode (`blockDuration === undefined`) enforced, splits the remaining time
|
|
104
|
+
* between execution and re-execution against the attestation deadline.
|
|
105
|
+
*
|
|
106
|
+
* @param slot - Target slot the checkpoint commits to.
|
|
107
|
+
* @param now - Current wall-clock time in seconds.
|
|
108
|
+
*/
|
|
109
|
+
selectNextSubslot(slot: SlotNumber, now: number): SubslotSelection;
|
|
110
|
+
private requireBlockDurationForSchedule;
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvcG9zZXJfdGltZXRhYmxlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdGltZXRhYmxlL3Byb3Bvc2VyX3RpbWV0YWJsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxVQUFVLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUdsRSxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsS0FBSyxtQkFBbUIsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBRXhGLDREQUE0RDtBQUM1RCxNQUFNLE1BQU0sZ0JBQWdCLEdBQ3hCO0lBQUUsUUFBUSxFQUFFLElBQUksQ0FBQztJQUFDLEtBQUssRUFBRSxNQUFNLENBQUM7SUFBQyxRQUFRLEVBQUUsU0FBUyxDQUFDO0lBQUMsV0FBVyxFQUFFLElBQUksQ0FBQTtDQUFFLEdBQ3pFO0lBQUUsUUFBUSxFQUFFLEtBQUssQ0FBQztJQUFDLEtBQUssRUFBRSxTQUFTLENBQUM7SUFBQyxRQUFRLEVBQUUsU0FBUyxDQUFDO0lBQUMsV0FBVyxFQUFFLEtBQUssQ0FBQTtDQUFFLEdBQzlFO0lBQUUsUUFBUSxFQUFFLElBQUksQ0FBQztJQUFDLEtBQUssRUFBRSxNQUFNLENBQUM7SUFBQyxRQUFRLEVBQUUsTUFBTSxDQUFDO0lBQUMsV0FBVyxFQUFFLE9BQU8sQ0FBQTtDQUFFLENBQUM7QUFFOUU7Ozs7Ozs7Ozs7R0FVRztBQUNILHFCQUFhLGlCQUFrQixTQUFRLGtCQUFrQjtJQ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iB,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,GAAG,gBAAgB,CA0BxE;IAED,OAAO,CAAC,+BAA+B;CAMxC"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { getDefaultCheckpointProposalSyncGrace, resolveTimingBudgets } from './budgets.js';
|
|
2
|
+
import { ConsensusTimetable } from './consensus_timetable.js';
|
|
3
|
+
/**
|
|
4
|
+
* Proposer ideal/happy-path schedule and block sub-slot timetable.
|
|
5
|
+
*
|
|
6
|
+
* Composes a {@link ConsensusTimetable} and adds the operational budgets that only the proposer needs
|
|
7
|
+
* (`min_block_duration`, `p2p_propagation_time`, `checkpoint_proposal_prepare_time`). Used by the
|
|
8
|
+
* sequencer and checkpoint-proposal job. All getters take a target slot and return an absolute
|
|
9
|
+
* wall-clock timestamp in seconds (or sub-slot deadlines in seconds for {@link selectNextSubslot}).
|
|
10
|
+
*
|
|
11
|
+
* The single hard deadline {@link getAttestationDeadline} is inherited from the composed
|
|
12
|
+
* {@link ConsensusTimetable}, so the proposer uses one object.
|
|
13
|
+
*/ export class ProposerTimetable extends ConsensusTimetable {
|
|
14
|
+
/** Minimum block-building time (`min_block_duration`) in seconds. */ minBlockDuration;
|
|
15
|
+
/** One-way proposal/attestation propagation budget (`p2p_propagation_time`) in seconds. */ p2pPropagationTime;
|
|
16
|
+
/** Local checkpoint proposal preparation budget (`checkpoint_proposal_prepare_time`) in seconds. */ checkpointProposalPrepareTime;
|
|
17
|
+
/** Proposer initialization budget (`checkpoint_proposal_init_time`) reserved before the first sub-slot, in seconds. */ checkpointProposalInitTime;
|
|
18
|
+
/** Whether the proposer enforces sub-slot/start deadlines (false keeps the single-mined-block test mode). */ enforce;
|
|
19
|
+
/** Maximum number of full-duration block sub-slots derivable from this timing config. */ maxBlocksPerCheckpoint;
|
|
20
|
+
constructor(opts){
|
|
21
|
+
super({
|
|
22
|
+
l1Constants: opts.l1Constants,
|
|
23
|
+
blockDuration: opts.blockDuration,
|
|
24
|
+
checkpointProposalSyncGrace: opts.checkpointProposalSyncGrace ?? getDefaultCheckpointProposalSyncGrace(opts.blockDuration)
|
|
25
|
+
});
|
|
26
|
+
// Resolve operational budgets, applying the fast local/e2e profile for low ethereum slot durations so a
|
|
27
|
+
// fast network does not inherit the conservative production budgets (which would shrink the build window).
|
|
28
|
+
const budgets = resolveTimingBudgets(this.ethereumSlotDuration, {
|
|
29
|
+
minBlockDuration: opts.minBlockDuration,
|
|
30
|
+
p2pPropagationTime: opts.p2pPropagationTime,
|
|
31
|
+
checkpointProposalPrepareTime: opts.checkpointProposalPrepareTime,
|
|
32
|
+
checkpointProposalInitTime: opts.checkpointProposalInitTime
|
|
33
|
+
});
|
|
34
|
+
this.p2pPropagationTime = budgets.p2pPropagationTime;
|
|
35
|
+
this.checkpointProposalPrepareTime = budgets.checkpointProposalPrepareTime;
|
|
36
|
+
this.checkpointProposalInitTime = budgets.checkpointProposalInitTime;
|
|
37
|
+
this.enforce = opts.enforce;
|
|
38
|
+
// Clamp min block duration to the block duration so a single sub-slot is always startable.
|
|
39
|
+
this.minBlockDuration = this.blockDuration !== undefined ? Math.min(budgets.minBlockDuration, this.blockDuration) : budgets.minBlockDuration;
|
|
40
|
+
this.maxBlocksPerCheckpoint = this.computeMaxBlocksPerCheckpoint();
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Computes the maximum number of full-duration block sub-slots in a checkpoint from the already-resolved
|
|
44
|
+
* budgets. Derived from the spec's `max_blocks_per_checkpoint = floor((last_block_build_time -
|
|
45
|
+
* first_subslot_start) / D)`, where the first sub-slot starts one `checkpoint_proposal_init_time` (`init`)
|
|
46
|
+
* after `build_frame_start`, so it simplifies to `floor((S - init - D - 2P - prepCp) / D)`. Single-block
|
|
47
|
+
* mode (`blockDuration` undefined) returns 1.
|
|
48
|
+
*/ computeMaxBlocksPerCheckpoint() {
|
|
49
|
+
if (this.blockDuration === undefined) {
|
|
50
|
+
return 1;
|
|
51
|
+
}
|
|
52
|
+
// last_block_build_time - (build_frame_start + init) = S - init - D - 2P - prepCp.
|
|
53
|
+
const timeAvailableForBlocks = this.aztecSlotDuration - this.checkpointProposalInitTime - this.blockDuration - 2 * this.p2pPropagationTime - this.checkpointProposalPrepareTime;
|
|
54
|
+
return Math.floor(timeAvailableForBlocks / this.blockDuration);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Ideal time the last block must finish building by to make the ideal L1 publish path:
|
|
58
|
+
* `target_slot_start - E - D - 2P - prepCp` (= `checkpoint_proposal_send_time - prepCp`). Single value;
|
|
59
|
+
* the proposer sizes block production around the ideal L1-publish path only. In single-block mode
|
|
60
|
+
* (`blockDuration` undefined) the `D` term drops out, since the single block is itself the final block.
|
|
61
|
+
*/ getLastBlockBuildTime(slot) {
|
|
62
|
+
return this.getTargetSlotStart(slot) - this.ethereumSlotDuration - (this.blockDuration ?? 0) - 2 * this.p2pPropagationTime - this.checkpointProposalPrepareTime;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Latest start at which the proposer can still squeeze in a minimum-duration block.
|
|
66
|
+
*
|
|
67
|
+
* Multi-block mode: `last_block_build_time - min_block_duration`, an ideal-derived cutoff
|
|
68
|
+
* intentionally earlier (by `P`) than the consensus receive gate would strictly allow, and
|
|
69
|
+
* conservatively no later than the final sub-slot's start cutoff in {@link selectNextSubslot}.
|
|
70
|
+
*
|
|
71
|
+
* Single-block mode (`blockDuration` undefined): `attestation_deadline - 2 * min_block_duration`,
|
|
72
|
+
* matching {@link selectNextSubslot}'s single-block branch (which needs `min_block_duration` for
|
|
73
|
+
* execution and another for re-execution before the attestation deadline). This keeps the build-entry
|
|
74
|
+
* start gate from abandoning a slot that {@link selectNextSubslot} would still allow to start.
|
|
75
|
+
*/ getBuildStartDeadline(slot) {
|
|
76
|
+
return this.blockDuration === undefined ? this.getAttestationDeadline(slot) - 2 * this.minBlockDuration : this.getLastBlockBuildTime(slot) - this.minBlockDuration;
|
|
77
|
+
}
|
|
78
|
+
/** Ideal L1 publish/send time: `target_slot_start - E`. Also the ideal attestation-receipt target. */ getL1PublishIdealTime(slot) {
|
|
79
|
+
return this.getTargetSlotStart(slot) - this.ethereumSlotDuration;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Build deadline for sub-slot `k` (zero-based): `build_frame_start + init + (k + 1) * D`.
|
|
83
|
+
*
|
|
84
|
+
* The `init` (`checkpoint_proposal_init_time`) offset reserves the proposer's sync/proposer-check/init
|
|
85
|
+
* budget at the start of the build frame, so the first sub-slot still has its full duration once the
|
|
86
|
+
* prologue finishes rather than being eaten by it.
|
|
87
|
+
*/ getBlockBuildDeadline(slot, blockIndex) {
|
|
88
|
+
return this.getBuildFrameStart(slot) + this.checkpointProposalInitTime + (blockIndex + 1) * this.requireBlockDurationForSchedule();
|
|
89
|
+
}
|
|
90
|
+
/** Latest time to keep waiting for txs for sub-slot `k`: `block_build_deadline(k) - min_block_duration`. */ getWaitForTxsDeadline(slot, blockIndex) {
|
|
91
|
+
return this.getBlockBuildDeadline(slot, blockIndex) - this.minBlockDuration;
|
|
92
|
+
}
|
|
93
|
+
/** Maximum number of full-duration block sub-slots for this timing config. */ getMaxBlocksPerCheckpoint() {
|
|
94
|
+
return this.maxBlocksPerCheckpoint;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Selects the next block sub-slot to build for the target slot given the current wall-clock time.
|
|
98
|
+
*
|
|
99
|
+
* Scans sub-slots in order and picks the first whose build deadline is at least `min_block_duration`
|
|
100
|
+
* in the future. Sub-slots with insufficient remaining headroom are skipped.
|
|
101
|
+
*
|
|
102
|
+
* When enforcement is disabled, always allows building a single block with no deadline (test/sandbox
|
|
103
|
+
* mode). In single-block mode (`blockDuration === undefined`) enforced, splits the remaining time
|
|
104
|
+
* between execution and re-execution against the attestation deadline.
|
|
105
|
+
*
|
|
106
|
+
* @param slot - Target slot the checkpoint commits to.
|
|
107
|
+
* @param now - Current wall-clock time in seconds.
|
|
108
|
+
*/ selectNextSubslot(slot, now) {
|
|
109
|
+
if (!this.enforce) {
|
|
110
|
+
return {
|
|
111
|
+
canStart: true,
|
|
112
|
+
index: 0,
|
|
113
|
+
deadline: undefined,
|
|
114
|
+
isLastBlock: true
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
if (this.blockDuration === undefined) {
|
|
118
|
+
// Single-block enforced mode: execution and re-execution run sequentially, so split the time
|
|
119
|
+
// remaining until the attestation deadline in half.
|
|
120
|
+
const maxAllowed = this.getAttestationDeadline(slot);
|
|
121
|
+
const available = (maxAllowed - now) / 2;
|
|
122
|
+
const canStart = available >= this.minBlockDuration;
|
|
123
|
+
return canStart ? {
|
|
124
|
+
canStart: true,
|
|
125
|
+
index: 0,
|
|
126
|
+
deadline: now + available,
|
|
127
|
+
isLastBlock: true
|
|
128
|
+
} : {
|
|
129
|
+
canStart: false,
|
|
130
|
+
index: undefined,
|
|
131
|
+
deadline: undefined,
|
|
132
|
+
isLastBlock: false
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
const maxBlocks = this.maxBlocksPerCheckpoint;
|
|
136
|
+
for(let index = 0; index < maxBlocks; index++){
|
|
137
|
+
const deadline = this.getBlockBuildDeadline(slot, index);
|
|
138
|
+
if (deadline - now >= this.minBlockDuration) {
|
|
139
|
+
const isLastBlock = index === maxBlocks - 1;
|
|
140
|
+
return {
|
|
141
|
+
canStart: true,
|
|
142
|
+
index,
|
|
143
|
+
deadline,
|
|
144
|
+
isLastBlock
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return {
|
|
149
|
+
canStart: false,
|
|
150
|
+
index: undefined,
|
|
151
|
+
deadline: undefined,
|
|
152
|
+
isLastBlock: false
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
requireBlockDurationForSchedule() {
|
|
156
|
+
if (this.blockDuration === undefined) {
|
|
157
|
+
throw new Error('blockDuration is required for sub-slot scheduling');
|
|
158
|
+
}
|
|
159
|
+
return this.blockDuration;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
-
import { BufferReader, FieldReader } from '@aztec/foundation/serialize';
|
|
2
|
+
import { BufferReader, BufferSink, FieldReader } from '@aztec/foundation/serialize';
|
|
3
3
|
import { inspect } from 'util';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import type { UInt32 } from '../types/shared.js';
|
|
@@ -46,7 +46,8 @@ export declare class AppendOnlyTreeSnapshot {
|
|
|
46
46
|
nextAvailableLeafIndex: number;
|
|
47
47
|
}>>;
|
|
48
48
|
getSize(): number;
|
|
49
|
-
toBuffer(): Buffer
|
|
49
|
+
toBuffer(): Buffer;
|
|
50
|
+
toBuffer(sink: BufferSink): void;
|
|
50
51
|
toFields(): Fr[];
|
|
51
52
|
toString(): string;
|
|
52
53
|
static fromBuffer(buffer: Buffer | BufferReader): AppendOnlyTreeSnapshot;
|
|
@@ -67,4 +68,4 @@ export declare class AppendOnlyTreeSnapshot {
|
|
|
67
68
|
equals(other: this): boolean;
|
|
68
69
|
static random(): AppendOnlyTreeSnapshot;
|
|
69
70
|
}
|
|
70
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
71
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwZW5kX29ubHlfdHJlZV9zbmFwc2hvdC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3RyZWVzL2FwcGVuZF9vbmx5X3RyZWVfc25hcHNob3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBRXBELE9BQU8sRUFBRSxZQUFZLEVBQUUsVUFBVSxFQUFFLFdBQVcsRUFBbUIsTUFBTSw2QkFBNkIsQ0FBQztBQUdyRyxPQUF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lBQ0gsTUFBTSxDQUFDLGVBQWUsQ0FBQyxHQUFHLEVBQUUsR0FBRyxHQUFHLHNCQUFzQixDQUV2RDtJQUVELE9BQU8sSUFBSSxPQUFPLENBRWpCO0lBRUQsQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDLFdBSWY7SUFFTSxNQUFNLENBQUMsS0FBSyxFQUFFLElBQUksV0FFeEI7SUFFRCxNQUFNLENBQUMsTUFBTSwyQkFFWjtDQUNGIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"append_only_tree_snapshot.d.ts","sourceRoot":"","sources":["../../src/trees/append_only_tree_snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"append_only_tree_snapshot.d.ts","sourceRoot":"","sources":["../../src/trees/append_only_tree_snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAmB,MAAM,6BAA6B,CAAC;AAGrG,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;;;GAIG;AACH,qBAAa,sBAAsB;IAE/B;;OAEG;IACI,IAAI,EAAE,EAAE;IACf;;;;;;;;OAQG;IACI,sBAAsB,EAAE,MAAM;IAdvC;IACE;;OAEG;IACI,IAAI,EAAE,EAAE;IACf;;;;;;;;OAQG;IACI,sBAAsB,EAAE,MAAM,EACnC;IAEJ,MAAM,KAAK,MAAM;;;;;;QAOhB;IAED,OAAO,WAEN;IAED,QAAQ,IAAI,MAAM,CAAC;IACnB,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IAQjC,QAAQ,IAAI,EAAE,EAAE,CAEf;IAED,QAAQ,IAAI,MAAM,CAEjB;IAED,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,sBAAsB,CAGvE;IAED,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,sBAAsB,CAErD;IAED,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW,GAAG,sBAAsB,CAIpE;IAED,KAAK,IAAI,CAAC,KAAK,MAAM,EAAE,EAAE,MAAM,CAAC,CAE/B;IAED,MAAM,CAAC,KAAK,2BAEX;IAED;;;;;;OAMG;IACH,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,GAAG,GAAG,sBAAsB,CAEvD;IAED,OAAO,IAAI,OAAO,CAEjB;IAED,CAAC,OAAO,CAAC,MAAM,CAAC,WAIf;IAEM,MAAM,CAAC,KAAK,EAAE,IAAI,WAExB;IAED,MAAM,CAAC,MAAM,2BAEZ;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _computedKey;
|
|
2
2
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
3
|
import { schemas } from '@aztec/foundation/schemas';
|
|
4
|
-
import { BufferReader, FieldReader,
|
|
4
|
+
import { BufferReader, BufferSink, FieldReader, serializeToSink } from '@aztec/foundation/serialize';
|
|
5
5
|
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
6
6
|
import { inspect } from 'util';
|
|
7
7
|
import { z } from 'zod';
|
|
@@ -36,8 +36,11 @@ _computedKey = inspect.custom;
|
|
|
36
36
|
getSize() {
|
|
37
37
|
return this.root.size + 4;
|
|
38
38
|
}
|
|
39
|
-
toBuffer() {
|
|
40
|
-
|
|
39
|
+
toBuffer(sink) {
|
|
40
|
+
if (!sink) {
|
|
41
|
+
return BufferSink.serialize(this);
|
|
42
|
+
}
|
|
43
|
+
serializeToSink(sink, this.root, this.nextAvailableLeafIndex);
|
|
41
44
|
}
|
|
42
45
|
toFields() {
|
|
43
46
|
return [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BlockNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
2
2
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
3
|
import { type ZodFor } from '@aztec/foundation/schemas';
|
|
4
|
-
import { BufferReader, FieldReader } from '@aztec/foundation/serialize';
|
|
4
|
+
import { BufferReader, BufferSink, FieldReader } from '@aztec/foundation/serialize';
|
|
5
5
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
6
6
|
import { inspect } from 'util';
|
|
7
7
|
import { BlockHash } from '../block/block_hash.js';
|
|
@@ -48,7 +48,8 @@ export declare class BlockHeader {
|
|
|
48
48
|
getSlot(): SlotNumber;
|
|
49
49
|
getBlockNumber(): BlockNumber;
|
|
50
50
|
getSize(): number;
|
|
51
|
-
toBuffer(): Buffer
|
|
51
|
+
toBuffer(): Buffer;
|
|
52
|
+
toBuffer(sink: BufferSink): void;
|
|
52
53
|
toFields(): Fr[];
|
|
53
54
|
clone(): BlockHeader;
|
|
54
55
|
static fromBuffer(buffer: Buffer | BufferReader): BlockHeader;
|
|
@@ -93,4 +94,4 @@ export declare class BlockHeader {
|
|
|
93
94
|
[inspect.custom](): string;
|
|
94
95
|
equals(other: this): boolean;
|
|
95
96
|
}
|
|
96
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
97
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxvY2tfaGVhZGVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHgvYmxvY2tfaGVhZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxXQUFXLEVBQUUsVUFBVSxFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFHMUUsT0FBTyxFQUFFLEVBQUU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FHLEVBQUUsTUFBTSxHQUFHLFdBQVcsQ0FFMUM7SUFFRCxJQUFJLElBQUksT0FBTyxDQUFDLFNBQVMsQ0FBQyxDQU96QjtJQUVELHNFQUFzRTtJQUN0RSxPQUFPLENBQUMsTUFBTSxFQUFFLFNBQVMsUUFFeEI7SUFFRCxnR0FBZ0c7SUFDaEcsYUFBYSxJQUFJLE9BQU8sQ0FBQyxTQUFTLENBQUMsQ0FHbEM7SUFFRCxNQUFNLENBQUMsTUFBTSxDQUFDLFNBQVMsR0FBRSxPQUFPLENBQUMsUUFBUSxDQUFDLFdBQVcsQ0FBQyxDQUFDLEdBQUcsT0FBTyxDQUFDLFFBQVEsQ0FBQyxlQUFlLENBQUMsQ0FBTSxHQUFHLFdBQVcsQ0FVOUc7SUFFRCxTQUFTOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O01BU1I7SUFFRCxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUMsV0FZZjtJQUVNLE1BQU0sQ0FBQyxLQUFLLEVBQUUsSUFBSSxHQUFHLE9BQU8sQ0FTbEM7Q0FDRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_header.d.ts","sourceRoot":"","sources":["../../src/tx/block_header.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAG1E,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"block_header.d.ts","sourceRoot":"","sources":["../../src/tx/block_header.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAG1E,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,KAAK,MAAM,EAAW,MA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