@aztec/p2p 0.0.1-commit.4d3c002 → 0.0.1-commit.4d9804df

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 (340) hide show
  1. package/README.md +7 -6
  2. package/dest/bootstrap/bootstrap.d.ts +1 -1
  3. package/dest/bootstrap/bootstrap.d.ts.map +1 -1
  4. package/dest/bootstrap/bootstrap.js +22 -6
  5. package/dest/client/factory.d.ts +4 -3
  6. package/dest/client/factory.d.ts.map +1 -1
  7. package/dest/client/factory.js +33 -24
  8. package/dest/client/interface.d.ts +40 -10
  9. package/dest/client/interface.d.ts.map +1 -1
  10. package/dest/client/p2p_client.d.ts +32 -18
  11. package/dest/client/p2p_client.d.ts.map +1 -1
  12. package/dest/client/p2p_client.js +97 -51
  13. package/dest/config.d.ts +143 -107
  14. package/dest/config.d.ts.map +1 -1
  15. package/dest/config.js +72 -26
  16. package/dest/errors/reqresp.error.d.ts +9 -16
  17. package/dest/errors/reqresp.error.d.ts.map +1 -1
  18. package/dest/errors/reqresp.error.js +10 -17
  19. package/dest/mem_pools/attestation_pool/attestation_pool.d.ts +98 -56
  20. package/dest/mem_pools/attestation_pool/attestation_pool.d.ts.map +1 -1
  21. package/dest/mem_pools/attestation_pool/attestation_pool.js +270 -198
  22. package/dest/mem_pools/attestation_pool/attestation_pool_test_suite.d.ts +1 -1
  23. package/dest/mem_pools/attestation_pool/attestation_pool_test_suite.d.ts.map +1 -1
  24. package/dest/mem_pools/attestation_pool/attestation_pool_test_suite.js +218 -59
  25. package/dest/mem_pools/attestation_pool/mocks.d.ts +1 -1
  26. package/dest/mem_pools/attestation_pool/mocks.d.ts.map +1 -1
  27. package/dest/mem_pools/attestation_pool/mocks.js +6 -4
  28. package/dest/mem_pools/instrumentation.d.ts +9 -4
  29. package/dest/mem_pools/instrumentation.d.ts.map +1 -1
  30. package/dest/mem_pools/instrumentation.js +28 -9
  31. package/dest/mem_pools/tx_pool_v2/archive/tx_archive.d.ts +1 -5
  32. package/dest/mem_pools/tx_pool_v2/archive/tx_archive.d.ts.map +1 -1
  33. package/dest/mem_pools/tx_pool_v2/archive/tx_archive.js +1 -7
  34. package/dest/mem_pools/tx_pool_v2/deleted_pool.d.ts +3 -3
  35. package/dest/mem_pools/tx_pool_v2/deleted_pool.d.ts.map +1 -1
  36. package/dest/mem_pools/tx_pool_v2/deleted_pool.js +6 -6
  37. package/dest/mem_pools/tx_pool_v2/eviction/fee_payer_balance_eviction_rule.js +1 -1
  38. package/dest/mem_pools/tx_pool_v2/eviction/index.d.ts +2 -1
  39. package/dest/mem_pools/tx_pool_v2/eviction/index.d.ts.map +1 -1
  40. package/dest/mem_pools/tx_pool_v2/eviction/index.js +1 -0
  41. package/dest/mem_pools/tx_pool_v2/eviction/insufficient_fee_per_gas_eviction_rule.d.ts +16 -0
  42. package/dest/mem_pools/tx_pool_v2/eviction/insufficient_fee_per_gas_eviction_rule.d.ts.map +1 -0
  43. package/dest/mem_pools/tx_pool_v2/eviction/insufficient_fee_per_gas_eviction_rule.js +62 -0
  44. package/dest/mem_pools/tx_pool_v2/eviction/invalid_txs_after_reorg_rule.js +2 -2
  45. package/dest/mem_pools/tx_pool_v2/interfaces.d.ts +33 -5
  46. package/dest/mem_pools/tx_pool_v2/interfaces.d.ts.map +1 -1
  47. package/dest/mem_pools/tx_pool_v2/interfaces.js +2 -1
  48. package/dest/mem_pools/tx_pool_v2/tx_metadata.d.ts +5 -2
  49. package/dest/mem_pools/tx_pool_v2/tx_metadata.d.ts.map +1 -1
  50. package/dest/mem_pools/tx_pool_v2/tx_metadata.js +8 -5
  51. package/dest/mem_pools/tx_pool_v2/tx_pool_indices.d.ts +15 -1
  52. package/dest/mem_pools/tx_pool_v2/tx_pool_indices.d.ts.map +1 -1
  53. package/dest/mem_pools/tx_pool_v2/tx_pool_indices.js +31 -0
  54. package/dest/mem_pools/tx_pool_v2/tx_pool_v2.d.ts +9 -3
  55. package/dest/mem_pools/tx_pool_v2/tx_pool_v2.d.ts.map +1 -1
  56. package/dest/mem_pools/tx_pool_v2/tx_pool_v2.js +19 -8
  57. package/dest/mem_pools/tx_pool_v2/tx_pool_v2_impl.d.ts +17 -4
  58. package/dest/mem_pools/tx_pool_v2/tx_pool_v2_impl.d.ts.map +1 -1
  59. package/dest/mem_pools/tx_pool_v2/tx_pool_v2_impl.js +208 -118
  60. package/dest/msg_validators/attestation_validator/attestation_validator.d.ts +10 -3
  61. package/dest/msg_validators/attestation_validator/attestation_validator.d.ts.map +1 -1
  62. package/dest/msg_validators/attestation_validator/attestation_validator.js +38 -16
  63. package/dest/msg_validators/attestation_validator/fisherman_attestation_validator.d.ts +7 -3
  64. package/dest/msg_validators/attestation_validator/fisherman_attestation_validator.d.ts.map +1 -1
  65. package/dest/msg_validators/attestation_validator/fisherman_attestation_validator.js +4 -5
  66. package/dest/msg_validators/proposal_validator/block_proposal_validator.d.ts +8 -3
  67. package/dest/msg_validators/proposal_validator/block_proposal_validator.d.ts.map +1 -1
  68. package/dest/msg_validators/proposal_validator/block_proposal_validator.js +2 -2
  69. package/dest/msg_validators/proposal_validator/checkpoint_proposal_validator.d.ts +8 -3
  70. package/dest/msg_validators/proposal_validator/checkpoint_proposal_validator.d.ts.map +1 -1
  71. package/dest/msg_validators/proposal_validator/checkpoint_proposal_validator.js +8 -2
  72. package/dest/msg_validators/proposal_validator/proposal_validator.d.ts +25 -3
  73. package/dest/msg_validators/proposal_validator/proposal_validator.d.ts.map +1 -1
  74. package/dest/msg_validators/proposal_validator/proposal_validator.js +85 -15
  75. package/dest/msg_validators/tx_validator/aggregate_tx_validator.d.ts +1 -1
  76. package/dest/msg_validators/tx_validator/aggregate_tx_validator.d.ts.map +1 -1
  77. package/dest/msg_validators/tx_validator/aggregate_tx_validator.js +8 -15
  78. package/dest/msg_validators/tx_validator/allowed_public_setup.js +3 -3
  79. package/dest/msg_validators/tx_validator/archive_cache.js +1 -1
  80. package/dest/msg_validators/tx_validator/cached_tx_validator.d.ts +15 -0
  81. package/dest/msg_validators/tx_validator/cached_tx_validator.d.ts.map +1 -0
  82. package/dest/msg_validators/tx_validator/cached_tx_validator.js +19 -0
  83. package/dest/msg_validators/tx_validator/data_validator.d.ts +2 -1
  84. package/dest/msg_validators/tx_validator/data_validator.d.ts.map +1 -1
  85. package/dest/msg_validators/tx_validator/data_validator.js +1 -0
  86. package/dest/msg_validators/tx_validator/factory.d.ts +14 -15
  87. package/dest/msg_validators/tx_validator/factory.d.ts.map +1 -1
  88. package/dest/msg_validators/tx_validator/factory.js +29 -16
  89. package/dest/msg_validators/tx_validator/gas_validator.d.ts +47 -10
  90. package/dest/msg_validators/tx_validator/gas_validator.d.ts.map +1 -1
  91. package/dest/msg_validators/tx_validator/gas_validator.js +65 -48
  92. package/dest/msg_validators/tx_validator/index.d.ts +3 -1
  93. package/dest/msg_validators/tx_validator/index.d.ts.map +1 -1
  94. package/dest/msg_validators/tx_validator/index.js +2 -0
  95. package/dest/msg_validators/tx_validator/phases_validator.js +2 -2
  96. package/dest/msg_validators/tx_validator/tx_proof_validator.d.ts +2 -1
  97. package/dest/msg_validators/tx_validator/tx_proof_validator.d.ts.map +1 -1
  98. package/dest/msg_validators/tx_validator/tx_proof_validator.js +2 -0
  99. package/dest/msg_validators/tx_validator/tx_validation_cache.d.ts +48 -0
  100. package/dest/msg_validators/tx_validator/tx_validation_cache.d.ts.map +1 -0
  101. package/dest/msg_validators/tx_validator/tx_validation_cache.js +68 -0
  102. package/dest/services/data_store.d.ts +1 -1
  103. package/dest/services/data_store.d.ts.map +1 -1
  104. package/dest/services/data_store.js +5 -5
  105. package/dest/services/discv5/discV5_service.d.ts +13 -2
  106. package/dest/services/discv5/discV5_service.d.ts.map +1 -1
  107. package/dest/services/discv5/discV5_service.js +117 -24
  108. package/dest/services/discv5/persisted_enr_store.d.ts +38 -0
  109. package/dest/services/discv5/persisted_enr_store.d.ts.map +1 -0
  110. package/dest/services/discv5/persisted_enr_store.js +145 -0
  111. package/dest/services/dummy_service.d.ts +15 -17
  112. package/dest/services/dummy_service.d.ts.map +1 -1
  113. package/dest/services/dummy_service.js +13 -18
  114. package/dest/services/encoding.d.ts +19 -6
  115. package/dest/services/encoding.d.ts.map +1 -1
  116. package/dest/services/encoding.js +25 -15
  117. package/dest/services/gossipsub/topic_score_params.d.ts +6 -12
  118. package/dest/services/gossipsub/topic_score_params.d.ts.map +1 -1
  119. package/dest/services/gossipsub/topic_score_params.js +4 -14
  120. package/dest/services/libp2p/instrumentation.d.ts +3 -1
  121. package/dest/services/libp2p/instrumentation.d.ts.map +1 -1
  122. package/dest/services/libp2p/instrumentation.js +14 -0
  123. package/dest/services/libp2p/libp2p_service.d.ts +31 -38
  124. package/dest/services/libp2p/libp2p_service.d.ts.map +1 -1
  125. package/dest/services/libp2p/libp2p_service.js +268 -248
  126. package/dest/services/peer-manager/peer_manager.d.ts +15 -2
  127. package/dest/services/peer-manager/peer_manager.d.ts.map +1 -1
  128. package/dest/services/peer-manager/peer_manager.js +59 -17
  129. package/dest/services/peer-manager/peer_scoring.d.ts +30 -1
  130. package/dest/services/peer-manager/peer_scoring.d.ts.map +1 -1
  131. package/dest/services/peer-manager/peer_scoring.js +74 -3
  132. package/dest/services/reqresp/batch-tx-requester/batch_tx_requester.d.ts +1 -8
  133. package/dest/services/reqresp/batch-tx-requester/batch_tx_requester.d.ts.map +1 -1
  134. package/dest/services/reqresp/batch-tx-requester/batch_tx_requester.js +35 -44
  135. package/dest/services/reqresp/batch-tx-requester/interface.d.ts +8 -5
  136. package/dest/services/reqresp/batch-tx-requester/interface.d.ts.map +1 -1
  137. package/dest/services/reqresp/batch-tx-requester/tx_validator.d.ts +5 -14
  138. package/dest/services/reqresp/batch-tx-requester/tx_validator.d.ts.map +1 -1
  139. package/dest/services/reqresp/batch-tx-requester/tx_validator.js +6 -20
  140. package/dest/services/reqresp/config.d.ts +15 -3
  141. package/dest/services/reqresp/config.d.ts.map +1 -1
  142. package/dest/services/reqresp/config.js +11 -0
  143. package/dest/services/reqresp/interface.d.ts +16 -18
  144. package/dest/services/reqresp/interface.d.ts.map +1 -1
  145. package/dest/services/reqresp/interface.js +10 -20
  146. package/dest/services/reqresp/metrics.d.ts +1 -1
  147. package/dest/services/reqresp/metrics.d.ts.map +1 -1
  148. package/dest/services/reqresp/metrics.js +0 -1
  149. package/dest/services/reqresp/protocols/block_txs/bitvector.d.ts +4 -3
  150. package/dest/services/reqresp/protocols/block_txs/bitvector.d.ts.map +1 -1
  151. package/dest/services/reqresp/protocols/block_txs/bitvector.js +3 -2
  152. package/dest/services/reqresp/protocols/block_txs/block_txs_handler.d.ts +1 -1
  153. package/dest/services/reqresp/protocols/block_txs/block_txs_handler.d.ts.map +1 -1
  154. package/dest/services/reqresp/protocols/block_txs/block_txs_handler.js +31 -28
  155. package/dest/services/reqresp/protocols/block_txs/block_txs_reqresp.d.ts +12 -7
  156. package/dest/services/reqresp/protocols/block_txs/block_txs_reqresp.d.ts.map +1 -1
  157. package/dest/services/reqresp/protocols/block_txs/block_txs_reqresp.js +42 -24
  158. package/dest/services/reqresp/protocols/index.d.ts +1 -2
  159. package/dest/services/reqresp/protocols/index.d.ts.map +1 -1
  160. package/dest/services/reqresp/protocols/index.js +0 -1
  161. package/dest/services/reqresp/protocols/tx.d.ts +1 -1
  162. package/dest/services/reqresp/protocols/tx.d.ts.map +1 -1
  163. package/dest/services/reqresp/protocols/tx.js +1 -3
  164. package/dest/services/reqresp/rate-limiter/rate_limits.d.ts +1 -1
  165. package/dest/services/reqresp/rate-limiter/rate_limits.d.ts.map +1 -1
  166. package/dest/services/reqresp/rate-limiter/rate_limits.js +3 -13
  167. package/dest/services/reqresp/reqresp.d.ts +7 -29
  168. package/dest/services/reqresp/reqresp.d.ts.map +1 -1
  169. package/dest/services/reqresp/reqresp.js +59 -209
  170. package/dest/services/service.d.ts +21 -13
  171. package/dest/services/service.d.ts.map +1 -1
  172. package/dest/services/tx_collection/config.d.ts +2 -23
  173. package/dest/services/tx_collection/config.d.ts.map +1 -1
  174. package/dest/services/tx_collection/config.js +2 -55
  175. package/dest/services/tx_collection/file_store_tx_collection.d.ts +12 -28
  176. package/dest/services/tx_collection/file_store_tx_collection.d.ts.map +1 -1
  177. package/dest/services/tx_collection/file_store_tx_collection.js +43 -83
  178. package/dest/services/tx_collection/index.d.ts +2 -3
  179. package/dest/services/tx_collection/index.d.ts.map +1 -1
  180. package/dest/services/tx_collection/index.js +0 -1
  181. package/dest/services/tx_collection/instrumentation.d.ts +1 -1
  182. package/dest/services/tx_collection/instrumentation.d.ts.map +1 -1
  183. package/dest/services/tx_collection/instrumentation.js +0 -2
  184. package/dest/services/tx_collection/tx_collection.d.ts +35 -51
  185. package/dest/services/tx_collection/tx_collection.d.ts.map +1 -1
  186. package/dest/services/tx_collection/tx_collection.js +275 -119
  187. package/dest/services/tx_collection/tx_collection_sink.d.ts +1 -1
  188. package/dest/services/tx_collection/tx_collection_sink.js +2 -2
  189. package/dest/services/tx_collection/tx_source.d.ts +1 -1
  190. package/dest/services/tx_collection/tx_source.d.ts.map +1 -1
  191. package/dest/services/tx_collection/tx_source.js +4 -1
  192. package/dest/services/tx_file_store/tx_file_store.d.ts +1 -3
  193. package/dest/services/tx_file_store/tx_file_store.d.ts.map +1 -1
  194. package/dest/services/tx_file_store/tx_file_store.js +4 -14
  195. package/dest/services/tx_provider.d.ts +3 -1
  196. package/dest/services/tx_provider.d.ts.map +1 -1
  197. package/dest/services/tx_provider.js +3 -0
  198. package/dest/test-helpers/make-test-p2p-clients.d.ts +1 -1
  199. package/dest/test-helpers/make-test-p2p-clients.d.ts.map +1 -1
  200. package/dest/test-helpers/make-test-p2p-clients.js +5 -2
  201. package/dest/test-helpers/mock-pubsub.d.ts +16 -9
  202. package/dest/test-helpers/mock-pubsub.d.ts.map +1 -1
  203. package/dest/test-helpers/mock-pubsub.js +36 -43
  204. package/dest/test-helpers/reqresp-nodes.d.ts +4 -5
  205. package/dest/test-helpers/reqresp-nodes.d.ts.map +1 -1
  206. package/dest/test-helpers/reqresp-nodes.js +11 -17
  207. package/dest/test-helpers/test_tx_provider.d.ts +3 -1
  208. package/dest/test-helpers/test_tx_provider.d.ts.map +1 -1
  209. package/dest/test-helpers/test_tx_provider.js +3 -0
  210. package/dest/test-helpers/testbench-utils.d.ts +15 -14
  211. package/dest/test-helpers/testbench-utils.d.ts.map +1 -1
  212. package/dest/test-helpers/testbench-utils.js +28 -13
  213. package/dest/testbench/p2p_client_testbench_worker.d.ts +3 -5
  214. package/dest/testbench/p2p_client_testbench_worker.d.ts.map +1 -1
  215. package/dest/testbench/p2p_client_testbench_worker.js +60 -27
  216. package/dest/testbench/worker_client_manager.d.ts +10 -6
  217. package/dest/testbench/worker_client_manager.d.ts.map +1 -1
  218. package/dest/testbench/worker_client_manager.js +51 -8
  219. package/dest/util.d.ts +7 -6
  220. package/dest/util.d.ts.map +1 -1
  221. package/dest/util.js +39 -10
  222. package/dest/versioning.d.ts +3 -6
  223. package/dest/versioning.d.ts.map +1 -1
  224. package/dest/versioning.js +3 -24
  225. package/package.json +16 -16
  226. package/src/bootstrap/bootstrap.ts +17 -3
  227. package/src/client/factory.ts +49 -25
  228. package/src/client/interface.ts +35 -16
  229. package/src/client/p2p_client.ts +116 -85
  230. package/src/client/test/{tx_proposal_collector/README.md → p2p_client.batch_tx_requester.bench.README.md} +23 -53
  231. package/src/config.ts +146 -34
  232. package/src/errors/reqresp.error.ts +13 -19
  233. package/src/mem_pools/attestation_pool/attestation_pool.ts +325 -242
  234. package/src/mem_pools/attestation_pool/attestation_pool_test_suite.ts +238 -63
  235. package/src/mem_pools/attestation_pool/mocks.ts +13 -8
  236. package/src/mem_pools/instrumentation.ts +18 -12
  237. package/src/mem_pools/tx_pool_v2/archive/tx_archive.ts +1 -9
  238. package/src/mem_pools/tx_pool_v2/deleted_pool.ts +7 -7
  239. package/src/mem_pools/tx_pool_v2/eviction/fee_payer_balance_eviction_rule.ts +1 -1
  240. package/src/mem_pools/tx_pool_v2/eviction/index.ts +1 -0
  241. package/src/mem_pools/tx_pool_v2/eviction/insufficient_fee_per_gas_eviction_rule.ts +65 -0
  242. package/src/mem_pools/tx_pool_v2/eviction/invalid_txs_after_reorg_rule.ts +3 -3
  243. package/src/mem_pools/tx_pool_v2/interfaces.ts +31 -4
  244. package/src/mem_pools/tx_pool_v2/tx_metadata.ts +13 -7
  245. package/src/mem_pools/tx_pool_v2/tx_pool_indices.ts +35 -0
  246. package/src/mem_pools/tx_pool_v2/tx_pool_v2.ts +22 -8
  247. package/src/mem_pools/tx_pool_v2/tx_pool_v2_impl.ts +233 -123
  248. package/src/msg_validators/attestation_validator/attestation_validator.ts +46 -15
  249. package/src/msg_validators/attestation_validator/fisherman_attestation_validator.ts +15 -7
  250. package/src/msg_validators/proposal_validator/block_proposal_validator.ts +15 -3
  251. package/src/msg_validators/proposal_validator/checkpoint_proposal_validator.ts +26 -3
  252. package/src/msg_validators/proposal_validator/proposal_validator.ts +94 -12
  253. package/src/msg_validators/tx_validator/README.md +13 -3
  254. package/src/msg_validators/tx_validator/aggregate_tx_validator.ts +3 -12
  255. package/src/msg_validators/tx_validator/allowed_public_setup.ts +3 -3
  256. package/src/msg_validators/tx_validator/archive_cache.ts +1 -1
  257. package/src/msg_validators/tx_validator/cached_tx_validator.ts +31 -0
  258. package/src/msg_validators/tx_validator/data_validator.ts +2 -0
  259. package/src/msg_validators/tx_validator/factory.ts +37 -20
  260. package/src/msg_validators/tx_validator/gas_validator.ts +99 -54
  261. package/src/msg_validators/tx_validator/index.ts +2 -0
  262. package/src/msg_validators/tx_validator/phases_validator.ts +2 -2
  263. package/src/msg_validators/tx_validator/tx_proof_validator.ts +2 -0
  264. package/src/msg_validators/tx_validator/tx_validation_cache.ts +101 -0
  265. package/src/services/data_store.ts +5 -13
  266. package/src/services/discv5/discV5_service.ts +124 -15
  267. package/src/services/discv5/persisted_enr_store.ts +158 -0
  268. package/src/services/dummy_service.ts +19 -43
  269. package/src/services/encoding.ts +28 -20
  270. package/src/services/gossipsub/README.md +33 -11
  271. package/src/services/gossipsub/topic_score_params.ts +9 -18
  272. package/src/services/libp2p/instrumentation.ts +14 -0
  273. package/src/services/libp2p/libp2p_service.ts +311 -271
  274. package/src/services/peer-manager/peer_manager.ts +63 -16
  275. package/src/services/peer-manager/peer_scoring.ts +81 -3
  276. package/src/services/reqresp/README.md +2 -37
  277. package/src/services/reqresp/batch-tx-requester/batch_tx_requester.ts +39 -52
  278. package/src/services/reqresp/batch-tx-requester/interface.ts +11 -4
  279. package/src/services/reqresp/batch-tx-requester/tx_validator.ts +12 -25
  280. package/src/services/reqresp/config.ts +19 -2
  281. package/src/services/reqresp/interface.ts +21 -47
  282. package/src/services/reqresp/metrics.ts +0 -1
  283. package/src/services/reqresp/protocols/block_txs/bitvector.ts +3 -2
  284. package/src/services/reqresp/protocols/block_txs/block_txs_handler.ts +34 -30
  285. package/src/services/reqresp/protocols/block_txs/block_txs_reqresp.ts +47 -20
  286. package/src/services/reqresp/protocols/index.ts +0 -1
  287. package/src/services/reqresp/protocols/tx.ts +1 -3
  288. package/src/services/reqresp/rate-limiter/rate_limits.ts +3 -13
  289. package/src/services/reqresp/reqresp.ts +69 -252
  290. package/src/services/service.ts +25 -30
  291. package/src/services/tx_collection/config.ts +3 -80
  292. package/src/services/tx_collection/file_store_tx_collection.ts +54 -103
  293. package/src/services/tx_collection/index.ts +1 -6
  294. package/src/services/tx_collection/instrumentation.ts +1 -7
  295. package/src/services/tx_collection/tx_collection.ts +330 -173
  296. package/src/services/tx_collection/tx_collection_sink.ts +2 -2
  297. package/src/services/tx_collection/tx_source.ts +2 -1
  298. package/src/services/tx_file_store/tx_file_store.ts +5 -17
  299. package/src/services/tx_provider.ts +5 -0
  300. package/src/test-helpers/make-test-p2p-clients.ts +3 -0
  301. package/src/test-helpers/mock-pubsub.ts +39 -60
  302. package/src/test-helpers/reqresp-nodes.ts +8 -22
  303. package/src/test-helpers/test_tx_provider.ts +5 -0
  304. package/src/test-helpers/testbench-utils.ts +35 -26
  305. package/src/testbench/p2p_client_testbench_worker.ts +68 -44
  306. package/src/testbench/worker_client_manager.ts +59 -19
  307. package/src/util.ts +34 -12
  308. package/src/versioning.ts +3 -33
  309. package/dest/client/test/tx_proposal_collector/proposal_tx_collector_worker.d.ts +0 -2
  310. package/dest/client/test/tx_proposal_collector/proposal_tx_collector_worker.d.ts.map +0 -1
  311. package/dest/client/test/tx_proposal_collector/proposal_tx_collector_worker.js +0 -315
  312. package/dest/client/test/tx_proposal_collector/proposal_tx_collector_worker_protocol.d.ts +0 -73
  313. package/dest/client/test/tx_proposal_collector/proposal_tx_collector_worker_protocol.d.ts.map +0 -1
  314. package/dest/client/test/tx_proposal_collector/proposal_tx_collector_worker_protocol.js +0 -8
  315. package/dest/msg_validators/clock_tolerance.d.ts +0 -21
  316. package/dest/msg_validators/clock_tolerance.d.ts.map +0 -1
  317. package/dest/msg_validators/clock_tolerance.js +0 -38
  318. package/dest/services/reqresp/connection-sampler/batch_connection_sampler.d.ts +0 -64
  319. package/dest/services/reqresp/connection-sampler/batch_connection_sampler.d.ts.map +0 -1
  320. package/dest/services/reqresp/connection-sampler/batch_connection_sampler.js +0 -151
  321. package/dest/services/reqresp/protocols/block.d.ts +0 -9
  322. package/dest/services/reqresp/protocols/block.d.ts.map +0 -1
  323. package/dest/services/reqresp/protocols/block.js +0 -32
  324. package/dest/services/tx_collection/fast_tx_collection.d.ts +0 -51
  325. package/dest/services/tx_collection/fast_tx_collection.d.ts.map +0 -1
  326. package/dest/services/tx_collection/fast_tx_collection.js +0 -311
  327. package/dest/services/tx_collection/proposal_tx_collector.d.ts +0 -48
  328. package/dest/services/tx_collection/proposal_tx_collector.d.ts.map +0 -1
  329. package/dest/services/tx_collection/proposal_tx_collector.js +0 -50
  330. package/dest/services/tx_collection/slow_tx_collection.d.ts +0 -57
  331. package/dest/services/tx_collection/slow_tx_collection.d.ts.map +0 -1
  332. package/dest/services/tx_collection/slow_tx_collection.js +0 -211
  333. package/src/client/test/tx_proposal_collector/proposal_tx_collector_worker.ts +0 -355
  334. package/src/client/test/tx_proposal_collector/proposal_tx_collector_worker_protocol.ts +0 -43
  335. package/src/msg_validators/clock_tolerance.ts +0 -52
  336. package/src/services/reqresp/connection-sampler/batch_connection_sampler.ts +0 -161
  337. package/src/services/reqresp/protocols/block.ts +0 -37
  338. package/src/services/tx_collection/fast_tx_collection.ts +0 -361
  339. package/src/services/tx_collection/proposal_tx_collector.ts +0 -108
  340. package/src/services/tx_collection/slow_tx_collection.ts +0 -266
@@ -1 +1 @@
1
- {"version":3,"file":"p2p_client.d.ts","sourceRoot":"","sources":["../../src/client/p2p_client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAoB,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAG5F,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAuB,MAAM,iBAAiB,CAAC;AAE9E,OAAO,EAEL,KAAK,UAAU,EAGf,KAAK,aAAa,EAElB,KAAK,kBAAkB,EACvB,KAAK,MAAM,EAEZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,KAAK,QAAQ,EAAW,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,KAAK,aAAa,EAAE,qBAAqB,EAAE,KAAK,kBAAkB,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACvH,OAAO,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAc,KAAK,eAAe,EAAE,UAAU,EAAiC,MAAM,yBAAyB,CAAC;AAEtH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OA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AI,OAAO,CAAC,YAAY,CAAC,CAW9C;YAOa,iBAAiB;YAWjB,oBAAoB;YAkBpB,oBAAoB;YA2CpB,uBAAuB;YAiBvB,mBAAmB;YASnB,YAAY;YAuBZ,uBAAuB;YAQvB,qBAAqB;IA2BnC;;;OAGG;IACH,OAAO,CAAC,eAAe;IAMhB,kCAAkC,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAElE;IAED;;;;;;OAMG;IACI,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAEjF;IAED;;;;OAIG;IACU,cAAc,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAEjE;IAEM,yBAAyB,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAEjG;CACF"}
@@ -371,13 +371,12 @@ function _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass) {
371
371
  return (_apply_decs_2203_r = applyDecs2203RFactory())(targetClass, memberDecs, classDecs, parentClass);
372
372
  }
373
373
  var _dec, _dec1, _initProto;
374
- import { GENESIS_BLOCK_HEADER_HASH } from '@aztec/constants';
375
374
  import { BlockNumber, CheckpointNumber, SlotNumber } from '@aztec/foundation/branded-types';
376
375
  import { createLogger } from '@aztec/foundation/log';
377
- import { RunningPromise } from '@aztec/foundation/promise';
378
376
  import { DateProvider } from '@aztec/foundation/timer';
379
377
  import { L2TipsKVStore } from '@aztec/kv-store/stores';
380
- import { L2BlockStream } from '@aztec/stdlib/block';
378
+ import { EventDrivenL2BlockStream } from '@aztec/stdlib/block';
379
+ import { getTimestampForSlot } from '@aztec/stdlib/epoch-helpers';
381
380
  import { tryStop } from '@aztec/stdlib/interfaces/server';
382
381
  import { Attributes, WithTracer, getTelemetryClient, trackSpan } from '@aztec/telemetry-client';
383
382
  import { getP2PDefaultConfig } from '../config.js';
@@ -435,8 +434,7 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
435
434
  txProvider;
436
435
  validatorAddresses;
437
436
  /** Tracks the last slot for which we called prepareForSlot */ lastSlotProcessed;
438
- /** Polls for slot changes and calls prepareForSlot on the tx pool */ slotMonitor;
439
- constructor(store, l2BlockSource, mempools, p2pService, txCollection, txFileStore, epochCache, config = {}, _dateProvider = new DateProvider(), telemetry = getTelemetryClient(), log = createLogger('p2p')){
437
+ constructor(store, l2BlockSource, mempools, p2pService, txCollection, txFileStore, epochCache, config = {}, _dateProvider = new DateProvider(), telemetry = getTelemetryClient(), log = createLogger('p2p'), initialBlockHash){
440
438
  super(telemetry, 'P2PClient'), this.store = store, this.l2BlockSource = l2BlockSource, this.p2pService = p2pService, this.txCollection = txCollection, this.txFileStore = txFileStore, this.epochCache = epochCache, this._dateProvider = _dateProvider, this.telemetry = telemetry, this.log = log, this.currentState = (_initProto(this), P2PClientState.IDLE), this.syncPromise = Promise.resolve(), this.syncResolve = undefined, this.latestBlockNumberAtStart = -1, this.provenBlockNumberAtStart = -1, this.finalizedBlockNumberAtStart = -1, this.validatorAddresses = [], this.lastSlotProcessed = SlotNumber.ZERO;
441
439
  this.config = {
442
440
  ...getP2PDefaultConfig(),
@@ -445,7 +443,7 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
445
443
  this.txPool = mempools.txPool;
446
444
  this.attestationPool = mempools.attestationPool;
447
445
  this.txProvider = new TxProvider(this.txCollection, this.txPool, this, this.log.createChild('tx-provider'), this.telemetry);
448
- this.l2Tips = new L2TipsKVStore(store, 'p2p_client');
446
+ this.l2Tips = new L2TipsKVStore(store, 'p2p_client', initialBlockHash);
449
447
  this.synchedLatestSlot = store.openSingleton('p2p_pool_last_l2_slot');
450
448
  }
451
449
  registerThisValidatorAddresses(addresses) {
@@ -491,7 +489,10 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
491
489
  const from = BlockNumber(oldFinalizedBlockNum + 1);
492
490
  const limit = event.block.number - from + 1;
493
491
  if (limit > 0) {
494
- const oldBlocks = await this.l2BlockSource.getBlocks(from, limit);
492
+ const oldBlocks = await this.l2BlockSource.getBlocksData({
493
+ from,
494
+ limit
495
+ });
495
496
  await this.handleFinalizedL2Blocks(oldBlocks);
496
497
  }
497
498
  break;
@@ -501,10 +502,12 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
501
502
  break;
502
503
  case 'chain-pruned':
503
504
  this.txCollection.stopCollectingForBlocksAfter(event.block.number);
504
- await this.handlePruneL2Blocks(event.block, event.checkpoint);
505
+ await this.handlePruneL2Blocks(event.block, event.checkpointed.checkpoint);
505
506
  break;
506
507
  case 'chain-checkpointed':
507
508
  break;
509
+ case 'chain-proposed':
510
+ break;
508
511
  default:
509
512
  {
510
513
  const _ = event;
@@ -572,21 +575,21 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
572
575
  syncedFinalizedBlock
573
576
  });
574
577
  }
578
+ // Should never happen: all branches above call initBlockStream()
579
+ if (!this.blockStream) {
580
+ throw new Error('Block stream not initialized');
581
+ }
575
582
  this.blockStream.start();
576
- await this.txCollection.start();
577
583
  this.txFileStore?.start();
578
- // Start slot monitor to call prepareForSlot when the slot changes
579
- this.slotMonitor = new RunningPromise(()=>this.maybeCallPrepareForSlot(), this.log, this.config.slotCheckIntervalMS);
580
- this.slotMonitor.start();
581
584
  return this.syncPromise;
582
585
  }
583
- addReqRespSubProtocol(subProtocol, handler, validator) {
584
- return this.p2pService.addReqRespSubProtocol(subProtocol, handler, validator);
586
+ addReqRespSubProtocol(subProtocol, handler) {
587
+ return this.p2pService.addReqRespSubProtocol(subProtocol, handler);
585
588
  }
586
589
  initBlockStream(startingBlock) {
587
590
  if (!this.blockStream) {
588
591
  const { blockRequestBatchSize: batchSize, blockCheckIntervalMS: pollIntervalMS } = this.config;
589
- this.blockStream = new L2BlockStream(this.l2BlockSource, this, this, createLogger(`${this.log.module}:l2-block-stream`), {
592
+ this.blockStream = new EventDrivenL2BlockStream(this.l2BlockSource, this, this, createLogger(`${this.log.module}:l2-block-stream`), {
590
593
  batchSize,
591
594
  pollIntervalMS,
592
595
  startingBlock
@@ -598,8 +601,6 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
598
601
  * 'ready' will now return 'false' and the running promise that keeps the client synced is interrupted.
599
602
  */ async stop() {
600
603
  this.log.debug('Stopping p2p client...');
601
- await this.slotMonitor?.stop();
602
- this.log.debug('Stopped slot monitor');
603
604
  await tryStop(this.txCollection);
604
605
  this.log.debug('Stopped tx collection service');
605
606
  await this.txFileStore?.stop();
@@ -616,6 +617,10 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
616
617
  }
617
618
  /** Triggers a sync to the archiver. Used for testing. */ async sync() {
618
619
  this.initBlockStream();
620
+ // Should never happen: initBlockStream() creates blockStream if absent
621
+ if (!this.blockStream) {
622
+ throw new Error('Block stream not initialized');
623
+ }
619
624
  await this.blockStream.sync();
620
625
  }
621
626
  async broadcastProposal(proposal) {
@@ -642,23 +647,40 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
642
647
  // Store our own last-block proposal so we can respond to req/resp requests for it.
643
648
  await this.attestationPool.tryAddBlockProposal(blockProposal);
644
649
  }
645
- // Gossipsub doesn't deliver own messages, so fire the all-nodes handler locally
646
- await this.p2pService.notifyOwnCheckpointProposal(proposal.toCore());
650
+ const checkpointCore = proposal.toCore();
651
+ const { count } = await this.attestationPool.tryAddCheckpointProposal(checkpointCore);
652
+ if (count > 1) {
653
+ if (this.config.broadcastEquivocatedProposals) {
654
+ this.log.warn(`Broadcasting equivocated checkpoint proposal for slot ${proposal.slotNumber}`, {
655
+ slot: proposal.slotNumber,
656
+ archive: proposal.archive.toString(),
657
+ count
658
+ });
659
+ } else {
660
+ throw new Error(`Attempted to broadcast a duplicate checkpoint proposal for slot ${proposal.slotNumber}`);
661
+ }
662
+ }
647
663
  return this.p2pService.propagate(proposal);
648
664
  }
649
665
  async broadcastCheckpointAttestations(attestations) {
650
666
  this.log.verbose(`Broadcasting ${attestations.length} checkpoint attestations to peers`);
651
667
  await Promise.all(attestations.map((att)=>this.p2pService.propagate(att)));
652
668
  }
653
- async getCheckpointAttestationsForSlot(slot, proposalId) {
654
- return await (proposalId ? this.attestationPool.getCheckpointAttestationsForSlotAndProposal(slot, proposalId) : this.attestationPool.getCheckpointAttestationsForSlot(slot));
669
+ async getCheckpointAttestationsForSlot(slot, proposalPayloadHash) {
670
+ return await (proposalPayloadHash ? this.attestationPool.getCheckpointAttestationsForSlotAndProposal(slot, proposalPayloadHash) : this.attestationPool.getCheckpointAttestationsForSlot(slot));
655
671
  }
656
672
  addOwnCheckpointAttestations(attestations) {
657
673
  return this.attestationPool.addOwnCheckpointAttestations(attestations);
658
674
  }
675
+ getProposalsForSlot(slot) {
676
+ return this.attestationPool.getProposalsForSlot(slot);
677
+ }
659
678
  hasBlockProposalsForSlot(slot) {
660
679
  return this.attestationPool.hasBlockProposalsForSlot(slot);
661
680
  }
681
+ hasCheckpointProposalForSlot(slot) {
682
+ return this.attestationPool.hasCheckpointProposalForSlot(slot);
683
+ }
662
684
  // REVIEW: https://github.com/AztecProtocol/aztec-packages/issues/7963
663
685
  // ^ This pattern is not my favorite (md)
664
686
  registerBlockProposalHandler(handler) {
@@ -673,10 +695,16 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
673
695
  registerDuplicateProposalCallback(callback) {
674
696
  this.p2pService.registerDuplicateProposalCallback(callback);
675
697
  }
698
+ registerOversizedProposalCallback(callback) {
699
+ this.p2pService.registerOversizedProposalCallback(callback);
700
+ }
676
701
  registerDuplicateAttestationCallback(callback) {
677
702
  this.p2pService.registerDuplicateAttestationCallback(callback);
678
703
  }
679
- async getPendingTxs(limit, after) {
704
+ registerCheckpointAttestationCallback(callback) {
705
+ this.p2pService.registerCheckpointAttestationCallback(callback);
706
+ }
707
+ async getPendingTxs(limit, after, options) {
680
708
  if (limit !== undefined && limit <= 0) {
681
709
  throw new TypeError('limit must be greater than 0');
682
710
  }
@@ -691,23 +719,30 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
691
719
  }
692
720
  const endIndex = limit !== undefined ? startIndex + limit : undefined;
693
721
  txHashes = txHashes.slice(startIndex, endIndex);
694
- const maybeTxs = await Promise.all(txHashes.map((txHash)=>this.txPool.getTxByHash(txHash)));
722
+ // This is a public-facing API (exposed via both the node and the p2p RPC), so proofs are opt-in.
723
+ const includeProof = !!options?.includeProof;
724
+ const maybeTxs = await Promise.all(txHashes.map((txHash)=>this.txPool.getTxByHash(txHash, {
725
+ includeProof
726
+ })));
695
727
  return maybeTxs.filter((tx)=>!!tx);
696
728
  }
697
729
  getPendingTxCount() {
698
730
  return this.txPool.getPendingTxCount();
699
731
  }
700
- async *iteratePendingTxs() {
732
+ hasEligiblePendingTxs(minCount) {
733
+ return this.txPool.hasEligiblePendingTxs(minCount);
734
+ }
735
+ async *iteratePendingTxs(opts) {
701
736
  for (const txHash of (await this.txPool.getPendingTxHashes())){
702
- const tx = await this.txPool.getTxByHash(txHash);
737
+ const tx = await this.txPool.getTxByHash(txHash, opts);
703
738
  if (tx) {
704
739
  yield tx;
705
740
  }
706
741
  }
707
742
  }
708
- async *iterateEligiblePendingTxs() {
743
+ async *iterateEligiblePendingTxs(opts) {
709
744
  for (const txHash of (await this.txPool.getEligiblePendingTxHashes())){
710
- const tx = await this.txPool.getTxByHash(txHash);
745
+ const tx = await this.txPool.getTxByHash(txHash, opts);
711
746
  if (tx) {
712
747
  yield tx;
713
748
  }
@@ -716,16 +751,18 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
716
751
  /**
717
752
  * Returns a transaction in the transaction pool by its hash.
718
753
  * @param txHash - Hash of the transaction to look for in the pool.
754
+ * @param opts - Set `includeProof: false` to skip loading the tx proof from the DB.
719
755
  * @returns A single tx or undefined.
720
- */ getTxByHashFromPool(txHash) {
721
- return this.txPool.getTxByHash(txHash);
756
+ */ getTxByHashFromPool(txHash, opts) {
757
+ return this.txPool.getTxByHash(txHash, opts);
722
758
  }
723
759
  /**
724
760
  * Returns transactions in the transaction pool by hash.
725
761
  * @param txHashes - Hashes of the transactions to look for.
762
+ * @param opts - Set `includeProof: false` to skip loading tx proofs from the DB.
726
763
  * @returns The txs found, in the same order as the requested hashes. If a tx is not found, it will be undefined.
727
- */ getTxsByHashFromPool(txHashes) {
728
- return this.txPool.getTxsByHash(txHashes);
764
+ */ getTxsByHashFromPool(txHashes, opts) {
765
+ return this.txPool.getTxsByHash(txHashes, opts);
729
766
  }
730
767
  hasTxsInPool(txHashes) {
731
768
  return this.txPool.hasTxs(txHashes);
@@ -813,7 +850,9 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
813
850
  * @returns Information about p2p client status: state & syncedToBlockNum.
814
851
  */ async getStatus() {
815
852
  const blockNumber = await this.getSyncedLatestBlockNum();
816
- const blockHash = blockNumber === 0 ? GENESIS_BLOCK_HEADER_HASH.toString() : await this.l2BlockSource.getBlockHeader(blockNumber).then((header)=>header?.hash()).then((hash)=>hash?.toString());
853
+ const blockHash = await this.l2BlockSource.getBlockData({
854
+ number: blockNumber
855
+ }).then((data)=>data?.header.hash()).then((hash)=>hash?.toString());
817
856
  return {
818
857
  state: this.currentState,
819
858
  syncedToL2Block: {
@@ -839,13 +878,17 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
839
878
  if (!blocks.length) {
840
879
  return;
841
880
  }
842
- await this.handleMinedBlocks(blocks);
843
- await this.maybeCallPrepareForSlot();
844
- await this.startCollectingMissingTxs(blocks);
845
881
  const lastBlock = blocks.at(-1);
846
- await this.synchedLatestSlot.set(BigInt(lastBlock.header.getSlot()));
882
+ const lastSlot = lastBlock.header.getSlot();
883
+ // Mark txs mined before releasing protections: a block landing at this slot supersedes any
884
+ // protection for txs it includes, so mined-marking must run first to keep just-landed txs from
885
+ // being unprotected into pending where they could be evicted before they are recorded as mined.
886
+ await this.handleMinedBlocks(blocks);
887
+ await this.maybeCallPrepareForSlot(lastSlot);
888
+ await this.collectingMissingTxs(blocks);
889
+ await this.synchedLatestSlot.set(BigInt(lastSlot));
847
890
  }
848
- /** Request txs for unproven blocks so the prover node has more chances to get them. */ async startCollectingMissingTxs(blocks) {
891
+ /** Request txs for unproven blocks so the prover node can prove. */ async collectingMissingTxs(blocks) {
849
892
  try {
850
893
  // TODO(#15435): If the archiver has lagged behind L1, the reported proven block number may
851
894
  // be much lower than the actual one, and it does not update until the pending chain is
@@ -853,7 +896,9 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
853
896
  // are already proven, but the archiver has not yet updated its state. Until this is properly
854
897
  // fixed, it is mitigated by the expiration date of collection requests, which depends on
855
898
  // the slot number of the block.
856
- const provenBlockNumber = await this.l2BlockSource.getProvenBlockNumber();
899
+ const provenBlockNumber = await this.l2BlockSource.getBlockNumber({
900
+ tag: 'proven'
901
+ }) ?? BlockNumber.ZERO;
857
902
  const unprovenBlocks = blocks.filter((block)=>block.number > provenBlockNumber);
858
903
  for (const block of unprovenBlocks){
859
904
  const txHashes = block.body.txEffects.map((txEffect)=>txEffect.txHash);
@@ -864,7 +909,19 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
864
909
  blockNumber: block.number,
865
910
  blockHash: await block.hash().then((h)=>h.toString())
866
911
  });
867
- this.txCollection.startCollecting(block, missingTxHashes);
912
+ // Both `slashDataWithholdingToleranceSlots` and `p2pMissingTxCollectionDeadlineSlots`
913
+ // count *full slots after the block slot* — value N means collection runs until
914
+ // `slotStart(block.slot + N + 1)`. Take the larger of the two so collection never
915
+ // gives up before the data-withholding slash verdict is rendered.
916
+ const blockSlot = block.header.getSlot();
917
+ const toleranceSlots = this.config.slashDataWithholdingToleranceSlots;
918
+ const configuredSlots = this.config.p2pMissingTxCollectionDeadlineSlots ?? 0;
919
+ const deadlineSlot = SlotNumber(blockSlot + Math.max(toleranceSlots, configuredSlots) + 1);
920
+ const deadlineSeconds = getTimestampForSlot(deadlineSlot, this.epochCache.getL1Constants());
921
+ const deadline = new Date(Number(deadlineSeconds) * 1000);
922
+ await this.txCollection.collectFastForBlock(block, missingTxHashes, {
923
+ deadline
924
+ });
868
925
  }
869
926
  }
870
927
  } catch (err) {
@@ -919,18 +976,7 @@ _dec = trackSpan('p2pClient.broadcastProposal', async (proposal)=>({
919
976
  }
920
977
  return isEpochPrune;
921
978
  }
922
- /** Checks if the slot has changed and calls prepareForSlot if so. */ async maybeCallPrepareForSlot() {
923
- // If we have a proposed checkpoint available, we want to prepare the target slot - otherwise we prepare the current slot
924
- const l2Tips = await this.l2Tips.getL2Tips();
925
- const hasProposedCheckpoint = l2Tips.proposedCheckpoint.checkpoint.number > l2Tips.checkpointed.checkpoint.number;
926
- let slot;
927
- if (this.epochCache.isProposerPipeliningEnabled() && hasProposedCheckpoint) {
928
- const { targetSlot } = this.epochCache.getTargetAndNextSlot();
929
- slot = targetSlot;
930
- } else {
931
- const { currentSlot } = this.epochCache.getCurrentAndNextSlot();
932
- slot = currentSlot;
933
- }
979
+ /** Calls prepareForSlot for the given slot if it advances past the last slot we prepared for. */ async maybeCallPrepareForSlot(slot) {
934
980
  if (slot <= this.lastSlotProcessed) {
935
981
  return;
936
982
  }