@aztec/stdlib 5.0.0-nightly.20260428 → 5.0.0-nightly.20260430

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.
Files changed (120) hide show
  1. package/dest/avm/avm.d.ts +300 -300
  2. package/dest/block/attestation_info.d.ts +3 -2
  3. package/dest/block/attestation_info.d.ts.map +1 -1
  4. package/dest/block/attestation_info.js +7 -5
  5. package/dest/block/block_data.d.ts +290 -1
  6. package/dest/block/block_data.d.ts.map +1 -1
  7. package/dest/block/block_data.js +14 -0
  8. package/dest/block/block_parameter.d.ts +30 -3
  9. package/dest/block/block_parameter.d.ts.map +1 -1
  10. package/dest/block/block_parameter.js +36 -2
  11. package/dest/block/l2_block_source.d.ts +39 -4
  12. package/dest/block/l2_block_source.d.ts.map +1 -1
  13. package/dest/block/proposal/attestations_and_signers.d.ts +13 -6
  14. package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
  15. package/dest/block/proposal/attestations_and_signers.js +26 -18
  16. package/dest/checkpoint/checkpoint_data.d.ts +7 -1
  17. package/dest/checkpoint/checkpoint_data.d.ts.map +1 -1
  18. package/dest/checkpoint/checkpoint_data.js +2 -0
  19. package/dest/config/chain-config.d.ts +2 -2
  20. package/dest/config/chain-config.d.ts.map +1 -1
  21. package/dest/config/chain-config.js +2 -2
  22. package/dest/config/sequencer-config.d.ts +2 -2
  23. package/dest/config/sequencer-config.d.ts.map +1 -1
  24. package/dest/config/sequencer-config.js +6 -6
  25. package/dest/ha-signing/local_config.d.ts +1 -1
  26. package/dest/ha-signing/local_config.d.ts.map +1 -1
  27. package/dest/ha-signing/local_config.js +2 -2
  28. package/dest/interfaces/archiver.d.ts +1 -1
  29. package/dest/interfaces/archiver.d.ts.map +1 -1
  30. package/dest/interfaces/archiver.js +7 -3
  31. package/dest/interfaces/aztec-node-admin.d.ts +11 -1
  32. package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
  33. package/dest/interfaces/aztec-node-admin.js +2 -1
  34. package/dest/interfaces/aztec-node.d.ts +45 -55
  35. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  36. package/dest/interfaces/aztec-node.js +18 -16
  37. package/dest/interfaces/block_response.d.ts +156 -0
  38. package/dest/interfaces/block_response.d.ts.map +1 -0
  39. package/dest/interfaces/block_response.js +24 -0
  40. package/dest/interfaces/chain_tips.d.ts +304 -0
  41. package/dest/interfaces/chain_tips.d.ts.map +1 -0
  42. package/dest/interfaces/chain_tips.js +11 -0
  43. package/dest/interfaces/checkpoint_parameter.d.ts +27 -0
  44. package/dest/interfaces/checkpoint_parameter.d.ts.map +1 -0
  45. package/dest/interfaces/checkpoint_parameter.js +20 -0
  46. package/dest/interfaces/checkpoint_response.d.ts +312 -0
  47. package/dest/interfaces/checkpoint_response.d.ts.map +1 -0
  48. package/dest/interfaces/checkpoint_response.js +26 -0
  49. package/dest/interfaces/client.d.ts +6 -1
  50. package/dest/interfaces/client.d.ts.map +1 -1
  51. package/dest/interfaces/client.js +5 -0
  52. package/dest/interfaces/configs.d.ts +7 -2
  53. package/dest/interfaces/configs.d.ts.map +1 -1
  54. package/dest/interfaces/configs.js +2 -1
  55. package/dest/interfaces/l1_publish_info.d.ts +43 -0
  56. package/dest/interfaces/l1_publish_info.d.ts.map +1 -0
  57. package/dest/interfaces/l1_publish_info.js +26 -0
  58. package/dest/interfaces/proving-job.d.ts +166 -166
  59. package/dest/interfaces/server.d.ts +6 -1
  60. package/dest/interfaces/server.d.ts.map +1 -1
  61. package/dest/interfaces/server.js +5 -0
  62. package/dest/interfaces/validator.d.ts +10 -1
  63. package/dest/interfaces/validator.d.ts.map +1 -1
  64. package/dest/interfaces/validator.js +1 -0
  65. package/dest/p2p/block_proposal.d.ts +19 -9
  66. package/dest/p2p/block_proposal.d.ts.map +1 -1
  67. package/dest/p2p/block_proposal.js +42 -32
  68. package/dest/p2p/checkpoint_attestation.d.ts +7 -3
  69. package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
  70. package/dest/p2p/checkpoint_attestation.js +15 -17
  71. package/dest/p2p/checkpoint_proposal.d.ts +15 -7
  72. package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
  73. package/dest/p2p/checkpoint_proposal.js +31 -29
  74. package/dest/p2p/consensus_payload.d.ts +18 -7
  75. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  76. package/dest/p2p/consensus_payload.js +31 -19
  77. package/dest/p2p/signature_utils.d.ts +28 -19
  78. package/dest/p2p/signature_utils.d.ts.map +1 -1
  79. package/dest/p2p/signature_utils.js +118 -21
  80. package/dest/p2p/signed_txs.d.ts +15 -13
  81. package/dest/p2p/signed_txs.d.ts.map +1 -1
  82. package/dest/p2p/signed_txs.js +26 -24
  83. package/dest/tests/mocks.d.ts +7 -1
  84. package/dest/tests/mocks.d.ts.map +1 -1
  85. package/dest/tests/mocks.js +28 -14
  86. package/dest/timetable/index.d.ts +1 -1
  87. package/dest/timetable/index.d.ts.map +1 -1
  88. package/dest/timetable/index.js +25 -11
  89. package/dest/tx/profiling.js +4 -4
  90. package/package.json +8 -8
  91. package/src/block/attestation_info.ts +11 -11
  92. package/src/block/block_data.ts +17 -0
  93. package/src/block/block_parameter.ts +35 -2
  94. package/src/block/l2_block_source.ts +43 -3
  95. package/src/block/proposal/attestations_and_signers.ts +32 -17
  96. package/src/checkpoint/checkpoint_data.ts +4 -0
  97. package/src/config/chain-config.ts +2 -3
  98. package/src/config/sequencer-config.ts +10 -6
  99. package/src/ha-signing/local_config.ts +2 -2
  100. package/src/interfaces/archiver.ts +13 -3
  101. package/src/interfaces/aztec-node-admin.ts +3 -1
  102. package/src/interfaces/aztec-node.ts +105 -95
  103. package/src/interfaces/block_response.ts +79 -0
  104. package/src/interfaces/chain_tips.ts +24 -0
  105. package/src/interfaces/checkpoint_parameter.ts +22 -0
  106. package/src/interfaces/checkpoint_response.ts +84 -0
  107. package/src/interfaces/client.ts +5 -0
  108. package/src/interfaces/configs.ts +5 -1
  109. package/src/interfaces/l1_publish_info.ts +40 -0
  110. package/src/interfaces/server.ts +5 -0
  111. package/src/interfaces/validator.ts +5 -0
  112. package/src/p2p/block_proposal.ts +84 -28
  113. package/src/p2p/checkpoint_attestation.ts +15 -20
  114. package/src/p2p/checkpoint_proposal.ts +69 -37
  115. package/src/p2p/consensus_payload.ts +50 -28
  116. package/src/p2p/signature_utils.ts +110 -25
  117. package/src/p2p/signed_txs.ts +46 -28
  118. package/src/tests/mocks.ts +46 -26
  119. package/src/timetable/index.ts +26 -11
  120. package/src/tx/profiling.ts +4 -4
@@ -162,23 +162,39 @@ class StandardCheckpointTimingModel extends BaseCheckpointTiming {
162
162
  /**
163
163
  * Checkpoint timing model for proposer pipelining.
164
164
  *
165
- * In this mode, the build work still starts in the current slot, but checkpoint
166
- * assembly and attestation collection can extend into the target slot. The extra
167
- * target-slot window getters are intended for consumers such as P2P validators
168
- * that need to validate pipelined messages against wallclock time.
165
+ * In this mode, the build work starts at the wall-clock slot boundary and the
166
+ * checkpoint proposal is broadcast early enough that attestations complete by
167
+ * the end of the build slot. L1 submission can then be sent at the boundary of
168
+ * the target slot. The extra target-slot window getters are intended for
169
+ * consumers such as P2P validators that need to validate pipelined messages
170
+ * against wallclock time.
169
171
  */
170
172
  class PipelinedCheckpointTimingModel extends BaseCheckpointTiming implements PipelinedCheckpointTiming {
171
173
  public get proposalWindowIntoTargetSlot(): number {
172
- // Allow the p2p propagation time to receive a checkpoint proposal from leader
173
- return this.p2pPropagationTime;
174
+ // Proposals no longer spill into the target slot: they are broadcast early
175
+ // enough in the build slot that attestations complete before the boundary.
176
+ // Any residual tolerance into the target slot is covered by clock disparity.
177
+ return 0;
174
178
  }
175
179
 
176
180
  public get attestationWindowIntoTargetSlot(): number {
177
- return this.aztecSlotDuration - this.l1PublishingTime;
181
+ // Straggler grace: attestations aim to complete by build-slot end. Allow a
182
+ // small window into the target slot for late arrivals (round-trip p2p).
183
+ return 2 * this.p2pPropagationTime;
184
+ }
185
+
186
+ public override get pipeliningAttestationGracePeriod(): number {
187
+ // Under the early-pipelining regime attestations complete inside the build
188
+ // slot itself, so there is no extra grace into the target slot.
189
+ return 0;
178
190
  }
179
191
 
180
192
  public get timeReservedAtEnd(): number {
181
- return this.checkpointAssembleTime + this.p2pPropagationTime;
193
+ // Reserve enough time at the end of the build slot for:
194
+ // - assembling and broadcasting the checkpoint proposal
195
+ // - round-trip p2p propagation (proposal out, attestations back)
196
+ // - validators re-executing the last block
197
+ return this.checkpointAssembleTime + 2 * this.p2pPropagationTime + (this.blockDuration ?? 0);
182
198
  }
183
199
 
184
200
  public get minimumBuildSlotWork(): number {
@@ -186,9 +202,8 @@ class PipelinedCheckpointTimingModel extends BaseCheckpointTiming implements Pip
186
202
  }
187
203
 
188
204
  public get checkpointAssemblyDeadline(): number {
189
- // Allow enough time to
190
- // - build all blocks
191
- // - receive attestations
205
+ // Allow enough time to build all blocks and receive attestations. With
206
+ // `pipeliningAttestationGracePeriod = 0` this equals `aztecSlotDuration`.
192
207
  return this.aztecSlotDuration + this.pipeliningAttestationGracePeriod;
193
208
  }
194
209
 
@@ -133,12 +133,12 @@ export class TxProfileResult {
133
133
  ],
134
134
  {
135
135
  nodeRPCCalls: {
136
- perMethod: { getBlockHeader: { times: [1] } },
136
+ perMethod: { getBlock: { times: [1] } },
137
137
  roundTrips: {
138
138
  roundTrips: 1,
139
139
  totalBlockingTime: 1,
140
140
  roundTripDurations: [1],
141
- roundTripMethods: [['getBlockHeader']],
141
+ roundTripMethods: [['getBlock']],
142
142
  },
143
143
  },
144
144
  timings: {
@@ -184,12 +184,12 @@ export class UtilityExecutionResult {
184
184
  static random(): UtilityExecutionResult {
185
185
  return new UtilityExecutionResult([Fr.random()], [], 0n, {
186
186
  nodeRPCCalls: {
187
- perMethod: { getBlockHeader: { times: [1] } },
187
+ perMethod: { getBlock: { times: [1] } },
188
188
  roundTrips: {
189
189
  roundTrips: 1,
190
190
  totalBlockingTime: 1,
191
191
  roundTripDurations: [1],
192
- roundTripMethods: [['getBlockHeader']],
192
+ roundTripMethods: [['getBlock']],
193
193
  },
194
194
  },
195
195
  timings: {