@aztec/p2p 0.0.1-commit.f2ce05ee → 0.0.1-commit.f5d02921e

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 (423) hide show
  1. package/README.md +129 -3
  2. package/dest/client/factory.d.ts +9 -9
  3. package/dest/client/factory.d.ts.map +1 -1
  4. package/dest/client/factory.js +52 -14
  5. package/dest/client/interface.d.ts +47 -34
  6. package/dest/client/interface.d.ts.map +1 -1
  7. package/dest/client/p2p_client.d.ts +39 -51
  8. package/dest/client/p2p_client.d.ts.map +1 -1
  9. package/dest/client/p2p_client.js +164 -224
  10. package/dest/client/test/tx_proposal_collector/proposal_tx_collector_worker.js +20 -10
  11. package/dest/config.d.ts +52 -16
  12. package/dest/config.d.ts.map +1 -1
  13. package/dest/config.js +100 -37
  14. package/dest/errors/p2p-service.error.d.ts +9 -0
  15. package/dest/errors/p2p-service.error.d.ts.map +1 -0
  16. package/dest/errors/p2p-service.error.js +10 -0
  17. package/dest/errors/tx-pool.error.d.ts +8 -0
  18. package/dest/errors/tx-pool.error.d.ts.map +1 -0
  19. package/dest/errors/tx-pool.error.js +9 -0
  20. package/dest/index.d.ts +2 -2
  21. package/dest/index.d.ts.map +1 -1
  22. package/dest/index.js +1 -1
  23. package/dest/mem_pools/attestation_pool/attestation_pool.d.ts +21 -12
  24. package/dest/mem_pools/attestation_pool/attestation_pool.d.ts.map +1 -1
  25. package/dest/mem_pools/attestation_pool/attestation_pool.js +75 -40
  26. package/dest/mem_pools/attestation_pool/attestation_pool_test_suite.d.ts +1 -1
  27. package/dest/mem_pools/attestation_pool/attestation_pool_test_suite.d.ts.map +1 -1
  28. package/dest/mem_pools/attestation_pool/attestation_pool_test_suite.js +57 -57
  29. package/dest/mem_pools/attestation_pool/index.d.ts +2 -2
  30. package/dest/mem_pools/attestation_pool/index.d.ts.map +1 -1
  31. package/dest/mem_pools/attestation_pool/index.js +1 -1
  32. package/dest/mem_pools/attestation_pool/mocks.d.ts +2 -2
  33. package/dest/mem_pools/attestation_pool/mocks.d.ts.map +1 -1
  34. package/dest/mem_pools/attestation_pool/mocks.js +2 -2
  35. package/dest/mem_pools/index.d.ts +2 -2
  36. package/dest/mem_pools/index.d.ts.map +1 -1
  37. package/dest/mem_pools/instrumentation.d.ts +4 -2
  38. package/dest/mem_pools/instrumentation.d.ts.map +1 -1
  39. package/dest/mem_pools/instrumentation.js +16 -14
  40. package/dest/mem_pools/interface.d.ts +3 -3
  41. package/dest/mem_pools/interface.d.ts.map +1 -1
  42. package/dest/mem_pools/tx_pool_v2/deleted_pool.d.ts +104 -0
  43. package/dest/mem_pools/tx_pool_v2/deleted_pool.d.ts.map +1 -0
  44. package/dest/mem_pools/tx_pool_v2/deleted_pool.js +251 -0
  45. package/dest/mem_pools/tx_pool_v2/eviction/eviction_manager.d.ts +3 -3
  46. package/dest/mem_pools/tx_pool_v2/eviction/eviction_manager.d.ts.map +1 -1
  47. package/dest/mem_pools/tx_pool_v2/eviction/eviction_manager.js +18 -9
  48. package/dest/mem_pools/tx_pool_v2/eviction/fee_payer_balance_eviction_rule.d.ts +1 -1
  49. package/dest/mem_pools/tx_pool_v2/eviction/fee_payer_balance_eviction_rule.d.ts.map +1 -1
  50. package/dest/mem_pools/tx_pool_v2/eviction/fee_payer_balance_eviction_rule.js +7 -3
  51. package/dest/mem_pools/tx_pool_v2/eviction/fee_payer_balance_pre_add_rule.d.ts +3 -3
  52. package/dest/mem_pools/tx_pool_v2/eviction/fee_payer_balance_pre_add_rule.d.ts.map +1 -1
  53. package/dest/mem_pools/tx_pool_v2/eviction/fee_payer_balance_pre_add_rule.js +12 -4
  54. package/dest/mem_pools/tx_pool_v2/eviction/index.d.ts +2 -2
  55. package/dest/mem_pools/tx_pool_v2/eviction/index.d.ts.map +1 -1
  56. package/dest/mem_pools/tx_pool_v2/eviction/index.js +1 -1
  57. package/dest/mem_pools/tx_pool_v2/eviction/interfaces.d.ts +54 -5
  58. package/dest/mem_pools/tx_pool_v2/eviction/interfaces.d.ts.map +1 -1
  59. package/dest/mem_pools/tx_pool_v2/eviction/interfaces.js +8 -0
  60. package/dest/mem_pools/tx_pool_v2/eviction/invalid_txs_after_mining_rule.js +7 -5
  61. package/dest/mem_pools/tx_pool_v2/eviction/invalid_txs_after_reorg_rule.js +7 -5
  62. package/dest/mem_pools/tx_pool_v2/eviction/low_priority_eviction_rule.d.ts +2 -2
  63. package/dest/mem_pools/tx_pool_v2/eviction/low_priority_eviction_rule.d.ts.map +1 -1
  64. package/dest/mem_pools/tx_pool_v2/eviction/low_priority_eviction_rule.js +14 -6
  65. package/dest/mem_pools/tx_pool_v2/eviction/low_priority_pre_add_rule.d.ts +4 -4
  66. package/dest/mem_pools/tx_pool_v2/eviction/low_priority_pre_add_rule.d.ts.map +1 -1
  67. package/dest/mem_pools/tx_pool_v2/eviction/low_priority_pre_add_rule.js +16 -4
  68. package/dest/mem_pools/tx_pool_v2/eviction/nullifier_conflict_rule.d.ts +3 -3
  69. package/dest/mem_pools/tx_pool_v2/eviction/nullifier_conflict_rule.d.ts.map +1 -1
  70. package/dest/mem_pools/tx_pool_v2/eviction/nullifier_conflict_rule.js +3 -3
  71. package/dest/mem_pools/tx_pool_v2/index.d.ts +3 -2
  72. package/dest/mem_pools/tx_pool_v2/index.d.ts.map +1 -1
  73. package/dest/mem_pools/tx_pool_v2/index.js +2 -1
  74. package/dest/mem_pools/tx_pool_v2/instrumentation.d.ts +15 -0
  75. package/dest/mem_pools/tx_pool_v2/instrumentation.d.ts.map +1 -0
  76. package/dest/mem_pools/tx_pool_v2/instrumentation.js +43 -0
  77. package/dest/mem_pools/tx_pool_v2/interfaces.d.ts +30 -12
  78. package/dest/mem_pools/tx_pool_v2/interfaces.d.ts.map +1 -1
  79. package/dest/mem_pools/tx_pool_v2/interfaces.js +5 -1
  80. package/dest/mem_pools/tx_pool_v2/tx_metadata.d.ts +78 -15
  81. package/dest/mem_pools/tx_pool_v2/tx_metadata.d.ts.map +1 -1
  82. package/dest/mem_pools/tx_pool_v2/tx_metadata.js +144 -19
  83. package/dest/mem_pools/tx_pool_v2/tx_pool_indices.d.ts +12 -3
  84. package/dest/mem_pools/tx_pool_v2/tx_pool_indices.d.ts.map +1 -1
  85. package/dest/mem_pools/tx_pool_v2/tx_pool_indices.js +50 -45
  86. package/dest/mem_pools/tx_pool_v2/tx_pool_v2.d.ts +12 -5
  87. package/dest/mem_pools/tx_pool_v2/tx_pool_v2.d.ts.map +1 -1
  88. package/dest/mem_pools/tx_pool_v2/tx_pool_v2.js +17 -6
  89. package/dest/mem_pools/tx_pool_v2/tx_pool_v2_impl.d.ts +14 -5
  90. package/dest/mem_pools/tx_pool_v2/tx_pool_v2_impl.d.ts.map +1 -1
  91. package/dest/mem_pools/tx_pool_v2/tx_pool_v2_impl.js +364 -189
  92. package/dest/msg_validators/attestation_validator/attestation_validator.d.ts +1 -1
  93. package/dest/msg_validators/attestation_validator/attestation_validator.d.ts.map +1 -1
  94. package/dest/msg_validators/attestation_validator/attestation_validator.js +5 -4
  95. package/dest/msg_validators/clock_tolerance.d.ts +1 -1
  96. package/dest/msg_validators/clock_tolerance.d.ts.map +1 -1
  97. package/dest/msg_validators/clock_tolerance.js +4 -3
  98. package/dest/msg_validators/proposal_validator/block_proposal_validator.d.ts +6 -4
  99. package/dest/msg_validators/proposal_validator/block_proposal_validator.d.ts.map +1 -1
  100. package/dest/msg_validators/proposal_validator/block_proposal_validator.js +10 -2
  101. package/dest/msg_validators/proposal_validator/checkpoint_proposal_validator.d.ts +6 -4
  102. package/dest/msg_validators/proposal_validator/checkpoint_proposal_validator.d.ts.map +1 -1
  103. package/dest/msg_validators/proposal_validator/checkpoint_proposal_validator.js +16 -2
  104. package/dest/msg_validators/proposal_validator/proposal_validator.d.ts +13 -8
  105. package/dest/msg_validators/proposal_validator/proposal_validator.d.ts.map +1 -1
  106. package/dest/msg_validators/proposal_validator/proposal_validator.js +53 -41
  107. package/dest/msg_validators/tx_validator/aggregate_tx_validator.d.ts +4 -4
  108. package/dest/msg_validators/tx_validator/aggregate_tx_validator.d.ts.map +1 -1
  109. package/dest/msg_validators/tx_validator/aggregate_tx_validator.js +3 -3
  110. package/dest/msg_validators/tx_validator/allowed_public_setup.d.ts +2 -1
  111. package/dest/msg_validators/tx_validator/allowed_public_setup.d.ts.map +1 -1
  112. package/dest/msg_validators/tx_validator/allowed_public_setup.js +24 -20
  113. package/dest/msg_validators/tx_validator/allowed_setup_helpers.d.ts +17 -0
  114. package/dest/msg_validators/tx_validator/allowed_setup_helpers.d.ts.map +1 -0
  115. package/dest/msg_validators/tx_validator/allowed_setup_helpers.js +24 -0
  116. package/dest/msg_validators/tx_validator/block_header_validator.d.ts +16 -3
  117. package/dest/msg_validators/tx_validator/block_header_validator.d.ts.map +1 -1
  118. package/dest/msg_validators/tx_validator/block_header_validator.js +1 -1
  119. package/dest/msg_validators/tx_validator/contract_instance_validator.d.ts +9 -0
  120. package/dest/msg_validators/tx_validator/contract_instance_validator.d.ts.map +1 -0
  121. package/dest/msg_validators/tx_validator/contract_instance_validator.js +48 -0
  122. package/dest/msg_validators/tx_validator/data_validator.d.ts +1 -1
  123. package/dest/msg_validators/tx_validator/data_validator.d.ts.map +1 -1
  124. package/dest/msg_validators/tx_validator/data_validator.js +35 -2
  125. package/dest/msg_validators/tx_validator/double_spend_validator.d.ts +13 -3
  126. package/dest/msg_validators/tx_validator/double_spend_validator.d.ts.map +1 -1
  127. package/dest/msg_validators/tx_validator/double_spend_validator.js +4 -4
  128. package/dest/msg_validators/tx_validator/factory.d.ts +133 -6
  129. package/dest/msg_validators/tx_validator/factory.d.ts.map +1 -1
  130. package/dest/msg_validators/tx_validator/factory.js +247 -60
  131. package/dest/msg_validators/tx_validator/fee_payer_balance.d.ts +1 -1
  132. package/dest/msg_validators/tx_validator/fee_payer_balance.d.ts.map +1 -1
  133. package/dest/msg_validators/tx_validator/fee_payer_balance.js +6 -2
  134. package/dest/msg_validators/tx_validator/gas_validator.d.ts +67 -3
  135. package/dest/msg_validators/tx_validator/gas_validator.d.ts.map +1 -1
  136. package/dest/msg_validators/tx_validator/gas_validator.js +104 -37
  137. package/dest/msg_validators/tx_validator/index.d.ts +3 -1
  138. package/dest/msg_validators/tx_validator/index.d.ts.map +1 -1
  139. package/dest/msg_validators/tx_validator/index.js +2 -0
  140. package/dest/msg_validators/tx_validator/metadata_validator.d.ts +1 -1
  141. package/dest/msg_validators/tx_validator/metadata_validator.d.ts.map +1 -1
  142. package/dest/msg_validators/tx_validator/metadata_validator.js +4 -4
  143. package/dest/msg_validators/tx_validator/nullifier_cache.d.ts +14 -0
  144. package/dest/msg_validators/tx_validator/nullifier_cache.d.ts.map +1 -0
  145. package/dest/msg_validators/tx_validator/nullifier_cache.js +24 -0
  146. package/dest/msg_validators/tx_validator/phases_validator.d.ts +22 -2
  147. package/dest/msg_validators/tx_validator/phases_validator.d.ts.map +1 -1
  148. package/dest/msg_validators/tx_validator/phases_validator.js +72 -24
  149. package/dest/msg_validators/tx_validator/timestamp_validator.d.ts +20 -4
  150. package/dest/msg_validators/tx_validator/timestamp_validator.d.ts.map +1 -1
  151. package/dest/msg_validators/tx_validator/timestamp_validator.js +6 -6
  152. package/dest/services/dummy_service.d.ts +12 -6
  153. package/dest/services/dummy_service.d.ts.map +1 -1
  154. package/dest/services/dummy_service.js +12 -5
  155. package/dest/services/encoding.d.ts +7 -3
  156. package/dest/services/encoding.d.ts.map +1 -1
  157. package/dest/services/encoding.js +18 -11
  158. package/dest/services/gossipsub/topic_score_params.d.ts +18 -6
  159. package/dest/services/gossipsub/topic_score_params.d.ts.map +1 -1
  160. package/dest/services/gossipsub/topic_score_params.js +32 -10
  161. package/dest/services/libp2p/libp2p_service.d.ts +37 -23
  162. package/dest/services/libp2p/libp2p_service.d.ts.map +1 -1
  163. package/dest/services/libp2p/libp2p_service.js +274 -173
  164. package/dest/services/peer-manager/metrics.d.ts +3 -1
  165. package/dest/services/peer-manager/metrics.d.ts.map +1 -1
  166. package/dest/services/peer-manager/metrics.js +6 -0
  167. package/dest/services/peer-manager/peer_manager.d.ts +6 -2
  168. package/dest/services/peer-manager/peer_manager.d.ts.map +1 -1
  169. package/dest/services/peer-manager/peer_manager.js +24 -9
  170. package/dest/services/peer-manager/peer_scoring.d.ts +5 -2
  171. package/dest/services/peer-manager/peer_scoring.d.ts.map +1 -1
  172. package/dest/services/peer-manager/peer_scoring.js +28 -10
  173. package/dest/services/reqresp/batch-tx-requester/batch_tx_requester.d.ts +12 -8
  174. package/dest/services/reqresp/batch-tx-requester/batch_tx_requester.d.ts.map +1 -1
  175. package/dest/services/reqresp/batch-tx-requester/batch_tx_requester.js +83 -106
  176. package/dest/services/reqresp/batch-tx-requester/interface.d.ts +4 -7
  177. package/dest/services/reqresp/batch-tx-requester/interface.d.ts.map +1 -1
  178. package/dest/services/reqresp/batch-tx-requester/missing_txs.d.ts +11 -13
  179. package/dest/services/reqresp/batch-tx-requester/missing_txs.d.ts.map +1 -1
  180. package/dest/services/reqresp/batch-tx-requester/missing_txs.js +31 -46
  181. package/dest/services/reqresp/batch-tx-requester/peer_collection.d.ts +19 -11
  182. package/dest/services/reqresp/batch-tx-requester/peer_collection.d.ts.map +1 -1
  183. package/dest/services/reqresp/batch-tx-requester/peer_collection.js +52 -15
  184. package/dest/services/reqresp/batch-tx-requester/tx_validator.js +2 -2
  185. package/dest/services/reqresp/interface.d.ts +10 -1
  186. package/dest/services/reqresp/interface.d.ts.map +1 -1
  187. package/dest/services/reqresp/interface.js +15 -1
  188. package/dest/services/reqresp/protocols/block_txs/block_txs_handler.d.ts +3 -3
  189. package/dest/services/reqresp/protocols/block_txs/block_txs_handler.d.ts.map +1 -1
  190. package/dest/services/reqresp/protocols/block_txs/block_txs_reqresp.d.ts +7 -1
  191. package/dest/services/reqresp/protocols/block_txs/block_txs_reqresp.d.ts.map +1 -1
  192. package/dest/services/reqresp/protocols/block_txs/block_txs_reqresp.js +15 -0
  193. package/dest/services/reqresp/protocols/tx.d.ts +7 -1
  194. package/dest/services/reqresp/protocols/tx.d.ts.map +1 -1
  195. package/dest/services/reqresp/protocols/tx.js +20 -0
  196. package/dest/services/reqresp/rate-limiter/rate_limiter.d.ts +5 -4
  197. package/dest/services/reqresp/rate-limiter/rate_limiter.d.ts.map +1 -1
  198. package/dest/services/reqresp/rate-limiter/rate_limiter.js +10 -8
  199. package/dest/services/reqresp/reqresp.d.ts +1 -1
  200. package/dest/services/reqresp/reqresp.d.ts.map +1 -1
  201. package/dest/services/reqresp/reqresp.js +30 -14
  202. package/dest/services/service.d.ts +26 -4
  203. package/dest/services/service.d.ts.map +1 -1
  204. package/dest/services/tx_collection/config.d.ts +19 -1
  205. package/dest/services/tx_collection/config.d.ts.map +1 -1
  206. package/dest/services/tx_collection/config.js +46 -0
  207. package/dest/services/tx_collection/fast_tx_collection.d.ts +3 -4
  208. package/dest/services/tx_collection/fast_tx_collection.d.ts.map +1 -1
  209. package/dest/services/tx_collection/fast_tx_collection.js +80 -76
  210. package/dest/services/tx_collection/file_store_tx_collection.d.ts +53 -0
  211. package/dest/services/tx_collection/file_store_tx_collection.d.ts.map +1 -0
  212. package/dest/services/tx_collection/file_store_tx_collection.js +167 -0
  213. package/dest/services/tx_collection/file_store_tx_source.d.ts +38 -0
  214. package/dest/services/tx_collection/file_store_tx_source.d.ts.map +1 -0
  215. package/dest/services/tx_collection/file_store_tx_source.js +100 -0
  216. package/dest/services/tx_collection/index.d.ts +2 -1
  217. package/dest/services/tx_collection/index.d.ts.map +1 -1
  218. package/dest/services/tx_collection/index.js +1 -0
  219. package/dest/services/tx_collection/instrumentation.d.ts +1 -1
  220. package/dest/services/tx_collection/instrumentation.d.ts.map +1 -1
  221. package/dest/services/tx_collection/instrumentation.js +2 -1
  222. package/dest/services/tx_collection/proposal_tx_collector.d.ts +7 -7
  223. package/dest/services/tx_collection/proposal_tx_collector.d.ts.map +1 -1
  224. package/dest/services/tx_collection/proposal_tx_collector.js +5 -4
  225. package/dest/services/tx_collection/request_tracker.d.ts +53 -0
  226. package/dest/services/tx_collection/request_tracker.d.ts.map +1 -0
  227. package/dest/services/tx_collection/request_tracker.js +84 -0
  228. package/dest/services/tx_collection/slow_tx_collection.d.ts +7 -3
  229. package/dest/services/tx_collection/slow_tx_collection.d.ts.map +1 -1
  230. package/dest/services/tx_collection/slow_tx_collection.js +60 -26
  231. package/dest/services/tx_collection/tx_collection.d.ts +23 -13
  232. package/dest/services/tx_collection/tx_collection.d.ts.map +1 -1
  233. package/dest/services/tx_collection/tx_collection.js +75 -3
  234. package/dest/services/tx_collection/tx_collection_sink.d.ts +18 -8
  235. package/dest/services/tx_collection/tx_collection_sink.d.ts.map +1 -1
  236. package/dest/services/tx_collection/tx_collection_sink.js +26 -29
  237. package/dest/services/tx_collection/tx_source.d.ts +13 -7
  238. package/dest/services/tx_collection/tx_source.d.ts.map +1 -1
  239. package/dest/services/tx_collection/tx_source.js +26 -7
  240. package/dest/services/tx_file_store/config.d.ts +1 -3
  241. package/dest/services/tx_file_store/config.d.ts.map +1 -1
  242. package/dest/services/tx_file_store/config.js +0 -4
  243. package/dest/services/tx_file_store/tx_file_store.d.ts +4 -3
  244. package/dest/services/tx_file_store/tx_file_store.d.ts.map +1 -1
  245. package/dest/services/tx_file_store/tx_file_store.js +9 -6
  246. package/dest/services/tx_provider.d.ts +4 -4
  247. package/dest/services/tx_provider.d.ts.map +1 -1
  248. package/dest/services/tx_provider.js +9 -8
  249. package/dest/test-helpers/make-test-p2p-clients.d.ts +7 -8
  250. package/dest/test-helpers/make-test-p2p-clients.d.ts.map +1 -1
  251. package/dest/test-helpers/make-test-p2p-clients.js +1 -2
  252. package/dest/test-helpers/mock-pubsub.d.ts +30 -4
  253. package/dest/test-helpers/mock-pubsub.d.ts.map +1 -1
  254. package/dest/test-helpers/mock-pubsub.js +105 -4
  255. package/dest/test-helpers/reqresp-nodes.d.ts +2 -3
  256. package/dest/test-helpers/reqresp-nodes.d.ts.map +1 -1
  257. package/dest/test-helpers/reqresp-nodes.js +2 -2
  258. package/dest/test-helpers/testbench-utils.d.ts +35 -24
  259. package/dest/test-helpers/testbench-utils.d.ts.map +1 -1
  260. package/dest/test-helpers/testbench-utils.js +115 -38
  261. package/dest/testbench/p2p_client_testbench_worker.d.ts +2 -2
  262. package/dest/testbench/p2p_client_testbench_worker.d.ts.map +1 -1
  263. package/dest/testbench/p2p_client_testbench_worker.js +57 -27
  264. package/dest/testbench/worker_client_manager.d.ts +3 -1
  265. package/dest/testbench/worker_client_manager.d.ts.map +1 -1
  266. package/dest/testbench/worker_client_manager.js +6 -3
  267. package/dest/util.d.ts +3 -3
  268. package/dest/util.d.ts.map +1 -1
  269. package/package.json +14 -14
  270. package/src/client/factory.ts +102 -25
  271. package/src/client/interface.ts +52 -34
  272. package/src/client/p2p_client.ts +190 -266
  273. package/src/client/test/tx_proposal_collector/proposal_tx_collector_worker.ts +33 -14
  274. package/src/config.ts +149 -43
  275. package/src/errors/p2p-service.error.ts +11 -0
  276. package/src/errors/tx-pool.error.ts +12 -0
  277. package/src/index.ts +1 -1
  278. package/src/mem_pools/attestation_pool/attestation_pool.ts +104 -50
  279. package/src/mem_pools/attestation_pool/attestation_pool_test_suite.ts +61 -57
  280. package/src/mem_pools/attestation_pool/index.ts +3 -3
  281. package/src/mem_pools/attestation_pool/mocks.ts +2 -1
  282. package/src/mem_pools/index.ts +1 -1
  283. package/src/mem_pools/instrumentation.ts +17 -13
  284. package/src/mem_pools/interface.ts +2 -2
  285. package/src/mem_pools/tx_pool_v2/README.md +85 -11
  286. package/src/mem_pools/tx_pool_v2/deleted_pool.ts +321 -0
  287. package/src/mem_pools/tx_pool_v2/eviction/eviction_manager.ts +21 -8
  288. package/src/mem_pools/tx_pool_v2/eviction/fee_payer_balance_eviction_rule.ts +7 -3
  289. package/src/mem_pools/tx_pool_v2/eviction/fee_payer_balance_pre_add_rule.ts +18 -4
  290. package/src/mem_pools/tx_pool_v2/eviction/index.ts +4 -0
  291. package/src/mem_pools/tx_pool_v2/eviction/interfaces.ts +59 -4
  292. package/src/mem_pools/tx_pool_v2/eviction/invalid_txs_after_mining_rule.ts +5 -5
  293. package/src/mem_pools/tx_pool_v2/eviction/invalid_txs_after_reorg_rule.ts +5 -5
  294. package/src/mem_pools/tx_pool_v2/eviction/low_priority_eviction_rule.ts +14 -9
  295. package/src/mem_pools/tx_pool_v2/eviction/low_priority_pre_add_rule.ts +33 -6
  296. package/src/mem_pools/tx_pool_v2/eviction/nullifier_conflict_rule.ts +4 -3
  297. package/src/mem_pools/tx_pool_v2/index.ts +2 -1
  298. package/src/mem_pools/tx_pool_v2/instrumentation.ts +69 -0
  299. package/src/mem_pools/tx_pool_v2/interfaces.ts +32 -12
  300. package/src/mem_pools/tx_pool_v2/tx_metadata.ts +209 -27
  301. package/src/mem_pools/tx_pool_v2/tx_pool_indices.ts +58 -45
  302. package/src/mem_pools/tx_pool_v2/tx_pool_v2.ts +34 -8
  303. package/src/mem_pools/tx_pool_v2/tx_pool_v2_impl.ts +410 -187
  304. package/src/msg_validators/attestation_validator/README.md +49 -0
  305. package/src/msg_validators/attestation_validator/attestation_validator.ts +5 -4
  306. package/src/msg_validators/clock_tolerance.ts +4 -3
  307. package/src/msg_validators/proposal_validator/README.md +123 -0
  308. package/src/msg_validators/proposal_validator/block_proposal_validator.ts +14 -4
  309. package/src/msg_validators/proposal_validator/checkpoint_proposal_validator.ts +20 -7
  310. package/src/msg_validators/proposal_validator/proposal_validator.ts +69 -45
  311. package/src/msg_validators/tx_validator/README.md +119 -0
  312. package/src/msg_validators/tx_validator/aggregate_tx_validator.ts +5 -5
  313. package/src/msg_validators/tx_validator/allowed_public_setup.ts +22 -27
  314. package/src/msg_validators/tx_validator/allowed_setup_helpers.ts +31 -0
  315. package/src/msg_validators/tx_validator/block_header_validator.ts +15 -3
  316. package/src/msg_validators/tx_validator/contract_instance_validator.ts +56 -0
  317. package/src/msg_validators/tx_validator/data_validator.ts +42 -1
  318. package/src/msg_validators/tx_validator/double_spend_validator.ts +11 -6
  319. package/src/msg_validators/tx_validator/factory.ts +394 -78
  320. package/src/msg_validators/tx_validator/fee_payer_balance.ts +6 -2
  321. package/src/msg_validators/tx_validator/gas_validator.ts +123 -27
  322. package/src/msg_validators/tx_validator/index.ts +2 -0
  323. package/src/msg_validators/tx_validator/metadata_validator.ts +12 -4
  324. package/src/msg_validators/tx_validator/nullifier_cache.ts +30 -0
  325. package/src/msg_validators/tx_validator/phases_validator.ts +82 -27
  326. package/src/msg_validators/tx_validator/timestamp_validator.ts +23 -18
  327. package/src/services/dummy_service.ts +18 -7
  328. package/src/services/encoding.ts +18 -10
  329. package/src/services/gossipsub/README.md +29 -14
  330. package/src/services/gossipsub/topic_score_params.ts +49 -13
  331. package/src/services/libp2p/libp2p_service.ts +288 -198
  332. package/src/services/peer-manager/metrics.ts +7 -0
  333. package/src/services/peer-manager/peer_manager.ts +28 -9
  334. package/src/services/peer-manager/peer_scoring.ts +21 -5
  335. package/src/services/reqresp/README.md +229 -0
  336. package/src/services/reqresp/batch-tx-requester/README.md +46 -7
  337. package/src/services/reqresp/batch-tx-requester/batch_tx_requester.ts +79 -112
  338. package/src/services/reqresp/batch-tx-requester/interface.ts +3 -6
  339. package/src/services/reqresp/batch-tx-requester/missing_txs.ts +30 -71
  340. package/src/services/reqresp/batch-tx-requester/peer_collection.ts +68 -24
  341. package/src/services/reqresp/batch-tx-requester/tx_validator.ts +2 -2
  342. package/src/services/reqresp/interface.ts +26 -1
  343. package/src/services/reqresp/protocols/block_txs/block_txs_handler.ts +2 -2
  344. package/src/services/reqresp/protocols/block_txs/block_txs_reqresp.ts +17 -0
  345. package/src/services/reqresp/protocols/tx.ts +22 -0
  346. package/src/services/reqresp/rate-limiter/rate_limiter.ts +13 -9
  347. package/src/services/reqresp/reqresp.ts +35 -15
  348. package/src/services/service.ts +37 -3
  349. package/src/services/tx_collection/config.ts +68 -0
  350. package/src/services/tx_collection/fast_tx_collection.ts +83 -76
  351. package/src/services/tx_collection/file_store_tx_collection.ts +202 -0
  352. package/src/services/tx_collection/file_store_tx_source.ts +129 -0
  353. package/src/services/tx_collection/index.ts +1 -0
  354. package/src/services/tx_collection/instrumentation.ts +7 -1
  355. package/src/services/tx_collection/proposal_tx_collector.ts +9 -13
  356. package/src/services/tx_collection/request_tracker.ts +127 -0
  357. package/src/services/tx_collection/slow_tx_collection.ts +66 -33
  358. package/src/services/tx_collection/tx_collection.ts +114 -19
  359. package/src/services/tx_collection/tx_collection_sink.ts +30 -34
  360. package/src/services/tx_collection/tx_source.ts +28 -8
  361. package/src/services/tx_file_store/config.ts +0 -6
  362. package/src/services/tx_file_store/tx_file_store.ts +10 -8
  363. package/src/services/tx_provider.ts +10 -9
  364. package/src/test-helpers/make-test-p2p-clients.ts +4 -6
  365. package/src/test-helpers/mock-pubsub.ts +146 -9
  366. package/src/test-helpers/reqresp-nodes.ts +3 -6
  367. package/src/test-helpers/testbench-utils.ts +137 -43
  368. package/src/testbench/p2p_client_testbench_worker.ts +63 -30
  369. package/src/testbench/worker_client_manager.ts +13 -6
  370. package/src/util.ts +8 -2
  371. package/dest/mem_pools/tx_pool/aztec_kv_tx_pool.d.ts +0 -125
  372. package/dest/mem_pools/tx_pool/aztec_kv_tx_pool.d.ts.map +0 -1
  373. package/dest/mem_pools/tx_pool/aztec_kv_tx_pool.js +0 -596
  374. package/dest/mem_pools/tx_pool/eviction/eviction_manager.d.ts +0 -32
  375. package/dest/mem_pools/tx_pool/eviction/eviction_manager.d.ts.map +0 -1
  376. package/dest/mem_pools/tx_pool/eviction/eviction_manager.js +0 -112
  377. package/dest/mem_pools/tx_pool/eviction/eviction_strategy.d.ts +0 -157
  378. package/dest/mem_pools/tx_pool/eviction/eviction_strategy.d.ts.map +0 -1
  379. package/dest/mem_pools/tx_pool/eviction/eviction_strategy.js +0 -52
  380. package/dest/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.d.ts +0 -16
  381. package/dest/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.d.ts.map +0 -1
  382. package/dest/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.js +0 -122
  383. package/dest/mem_pools/tx_pool/eviction/invalid_txs_after_mining_rule.d.ts +0 -17
  384. package/dest/mem_pools/tx_pool/eviction/invalid_txs_after_mining_rule.d.ts.map +0 -1
  385. package/dest/mem_pools/tx_pool/eviction/invalid_txs_after_mining_rule.js +0 -84
  386. package/dest/mem_pools/tx_pool/eviction/invalid_txs_after_reorg_rule.d.ts +0 -19
  387. package/dest/mem_pools/tx_pool/eviction/invalid_txs_after_reorg_rule.d.ts.map +0 -1
  388. package/dest/mem_pools/tx_pool/eviction/invalid_txs_after_reorg_rule.js +0 -78
  389. package/dest/mem_pools/tx_pool/eviction/low_priority_eviction_rule.d.ts +0 -26
  390. package/dest/mem_pools/tx_pool/eviction/low_priority_eviction_rule.d.ts.map +0 -1
  391. package/dest/mem_pools/tx_pool/eviction/low_priority_eviction_rule.js +0 -84
  392. package/dest/mem_pools/tx_pool/eviction/nullifier_conflict_pre_add_rule.d.ts +0 -25
  393. package/dest/mem_pools/tx_pool/eviction/nullifier_conflict_pre_add_rule.d.ts.map +0 -1
  394. package/dest/mem_pools/tx_pool/eviction/nullifier_conflict_pre_add_rule.js +0 -57
  395. package/dest/mem_pools/tx_pool/index.d.ts +0 -3
  396. package/dest/mem_pools/tx_pool/index.d.ts.map +0 -1
  397. package/dest/mem_pools/tx_pool/index.js +0 -2
  398. package/dest/mem_pools/tx_pool/priority.d.ts +0 -12
  399. package/dest/mem_pools/tx_pool/priority.d.ts.map +0 -1
  400. package/dest/mem_pools/tx_pool/priority.js +0 -15
  401. package/dest/mem_pools/tx_pool/tx_pool.d.ts +0 -127
  402. package/dest/mem_pools/tx_pool/tx_pool.d.ts.map +0 -1
  403. package/dest/mem_pools/tx_pool/tx_pool.js +0 -3
  404. package/dest/mem_pools/tx_pool/tx_pool_test_suite.d.ts +0 -7
  405. package/dest/mem_pools/tx_pool/tx_pool_test_suite.d.ts.map +0 -1
  406. package/dest/mem_pools/tx_pool/tx_pool_test_suite.js +0 -400
  407. package/dest/msg_validators/proposal_validator/proposal_validator_test_suite.d.ts +0 -23
  408. package/dest/msg_validators/proposal_validator/proposal_validator_test_suite.d.ts.map +0 -1
  409. package/dest/msg_validators/proposal_validator/proposal_validator_test_suite.js +0 -212
  410. package/src/mem_pools/tx_pool/README.md +0 -270
  411. package/src/mem_pools/tx_pool/aztec_kv_tx_pool.ts +0 -746
  412. package/src/mem_pools/tx_pool/eviction/eviction_manager.ts +0 -132
  413. package/src/mem_pools/tx_pool/eviction/eviction_strategy.ts +0 -208
  414. package/src/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.ts +0 -162
  415. package/src/mem_pools/tx_pool/eviction/invalid_txs_after_mining_rule.ts +0 -104
  416. package/src/mem_pools/tx_pool/eviction/invalid_txs_after_reorg_rule.ts +0 -93
  417. package/src/mem_pools/tx_pool/eviction/low_priority_eviction_rule.ts +0 -106
  418. package/src/mem_pools/tx_pool/eviction/nullifier_conflict_pre_add_rule.ts +0 -75
  419. package/src/mem_pools/tx_pool/index.ts +0 -2
  420. package/src/mem_pools/tx_pool/priority.ts +0 -20
  421. package/src/mem_pools/tx_pool/tx_pool.ts +0 -141
  422. package/src/mem_pools/tx_pool/tx_pool_test_suite.ts +0 -319
  423. package/src/msg_validators/proposal_validator/proposal_validator_test_suite.ts +0 -230
@@ -1,11 +1,10 @@
1
1
  import { times } from '@aztec/foundation/collection';
2
- import { AbortError, TimeoutError } from '@aztec/foundation/error';
3
2
  import { createLogger } from '@aztec/foundation/log';
4
- import { promiseWithResolvers } from '@aztec/foundation/promise';
5
3
  import { sleep } from '@aztec/foundation/sleep';
6
4
  import { DateProvider, elapsed } from '@aztec/foundation/timer';
7
5
  import { TxHash } from '@aztec/stdlib/tx';
8
6
  import { BatchTxRequesterCollector, SendBatchRequestCollector } from './proposal_tx_collector.js';
7
+ import { RequestTracker } from './request_tracker.js';
9
8
  export class FastTxCollection {
10
9
  nodes;
11
10
  txCollectionSink;
@@ -27,7 +26,9 @@ export class FastTxCollection {
27
26
  this.missingTxsCollector = missingTxsCollector ?? (missingTxsCollectorType === 'old' ? new SendBatchRequestCollector(p2pService) : new BatchTxRequesterCollector(p2pService, log, dateProvider, undefined, batchTxRequesterConfig));
28
27
  }
29
28
  async stop() {
30
- this.requests.forEach((request)=>request.promise.reject(new AbortError(`Stopped collection service`)));
29
+ this.requests.forEach((request)=>{
30
+ request.requestTracker.cancel();
31
+ });
31
32
  await Promise.resolve();
32
33
  }
33
34
  getFastCollectionRequests() {
@@ -48,85 +49,66 @@ export class FastTxCollection {
48
49
  } : {
49
50
  ...input.block.toBlockInfo()
50
51
  };
51
- // This promise is used to await for the collection to finish during the main collectFast method.
52
- // It gets resolved in `foundTxs` when all txs have been collected, or rejected if the request is aborted or hits the deadline.
53
- const promise = promiseWithResolvers();
54
- setTimeout(()=>promise.reject(new TimeoutError(`Timed out while collecting txs`)), timeout);
55
52
  const request = {
56
53
  ...input,
57
54
  blockInfo,
58
- promise,
59
- foundTxs: new Map(),
60
- missingTxHashes: new Set(txHashes.map((t)=>t.toString())),
61
- deadline: opts.deadline
55
+ requestTracker: RequestTracker.create(txHashes, opts.deadline, this.dateProvider)
62
56
  };
63
57
  const [duration] = await elapsed(()=>this.collectFast(request, {
64
58
  ...opts
65
59
  }));
66
- this.log.verbose(`Collected ${request.foundTxs.size} txs out of ${txHashes.length} for ${input.type} at slot ${blockInfo.slotNumber}`, {
60
+ this.log.verbose(`Collected ${request.requestTracker.collectedTxs.length} txs out of ${txHashes.length} for ${input.type} at slot ${blockInfo.slotNumber}`, {
67
61
  ...blockInfo,
68
62
  duration,
69
63
  requestType: input.type,
70
64
  missingTxs: [
71
- ...request.missingTxHashes
65
+ ...request.requestTracker.missingTxHashes
72
66
  ]
73
67
  });
74
- return [
75
- ...request.foundTxs.values()
76
- ];
68
+ return request.requestTracker.collectedTxs;
77
69
  }
78
70
  async collectFast(request, opts) {
79
71
  this.requests.add(request);
80
72
  const { blockInfo } = request;
81
- this.log.debug(`Starting fast collection of ${request.missingTxHashes.size} txs for ${request.type} at slot ${blockInfo.slotNumber}`, {
73
+ this.log.debug(`Starting fast collection of ${request.requestTracker.numberOfMissingTxs} txs for ${request.type} at slot ${blockInfo.slotNumber}`, {
82
74
  ...blockInfo,
83
75
  requestType: request.type,
84
- deadline: opts.deadline
76
+ deadline: request.requestTracker.deadline
85
77
  });
86
78
  try {
87
79
  // Start blasting all nodes for the txs. We give them a little time to respond before we start reqresp.
88
- // And keep an eye on the request promise to ensure we don't wait longer than the deadline or return as soon
89
- // as we have collected all txs, whatever the source.
90
- const nodeCollectionPromise = this.collectFastFromNodes(request, opts);
80
+ // We race against the cancellation token to exit as soon as all txs are collected, the deadline expires,
81
+ // or the request is externally cancelled.
82
+ const nodeCollectionPromise = this.collectFastFromNodes(request);
91
83
  const waitBeforeReqResp = sleep(this.config.txCollectionFastNodesTimeoutBeforeReqRespMs);
92
84
  await Promise.race([
93
- request.promise.promise,
85
+ request.requestTracker.cancellationToken,
94
86
  waitBeforeReqResp
95
87
  ]);
96
- // If we have collected all txs, we can stop here
97
- if (request.missingTxHashes.size === 0) {
98
- this.log.debug(`All txs collected for slot ${blockInfo.slotNumber} without reqresp`, blockInfo);
88
+ // If we have collected all txs or the request was cancelled, we can stop here.
89
+ // Wait for node collection to settle so inner tasks finish before we return.
90
+ if (request.requestTracker.checkCancelled()) {
91
+ if (request.requestTracker.allFetched()) {
92
+ this.log.debug(`All txs collected for slot ${blockInfo.slotNumber} without reqresp`, blockInfo);
93
+ }
94
+ await nodeCollectionPromise;
99
95
  return;
100
96
  }
101
97
  // Start blasting reqresp for the remaining txs. Note that node collection keeps running in parallel.
102
98
  // We stop when we have collected all txs, timed out, or both node collection and reqresp have given up.
103
- const collectionPromise = Promise.allSettled([
99
+ // Inner tasks observe requestTracker.checkCancelled() and stop themselves, so this settles shortly after cancellation.
100
+ await Promise.allSettled([
104
101
  this.collectFastViaReqResp(request, opts),
105
102
  nodeCollectionPromise
106
103
  ]);
107
- await Promise.race([
108
- collectionPromise,
109
- request.promise.promise
110
- ]);
111
104
  } catch (err) {
112
- // Log and swallow all errors
113
- const logCtx = {
105
+ this.log.error(`Error collecting txs for ${request.type} for slot ${blockInfo.slotNumber}`, err, {
114
106
  ...blockInfo,
115
- errorMessage: err instanceof Error ? err.message : undefined,
116
- missingTxs: [
117
- ...request.missingTxHashes
118
- ].map((txHash)=>txHash.toString())
119
- };
120
- if (err instanceof Error && err.name === 'TimeoutError') {
121
- this.log.warn(`Timed out collecting txs for ${request.type} at slot ${blockInfo.slotNumber}`, logCtx);
122
- } else if (err instanceof Error && err.name === 'AbortError') {
123
- this.log.warn(`Aborted collecting txs for ${request.type} at slot ${blockInfo.slotNumber}`, logCtx);
124
- } else {
125
- this.log.error(`Error collecting txs for ${request.type} for slot ${blockInfo.slotNumber}`, err, logCtx);
126
- }
107
+ missingTxs: request.requestTracker.missingTxHashes.values().map((txHash)=>txHash.toString())
108
+ });
127
109
  } finally{
128
110
  // Ensure no unresolved promises and remove the request from the set
129
- request.promise.resolve();
111
+ request.requestTracker.cancel();
130
112
  this.requests.delete(request);
131
113
  }
132
114
  }
@@ -135,23 +117,23 @@ export class FastTxCollection {
135
117
  * in parallel to each node. We keep track of the number of attempts made to collect each tx, so we can prioritize
136
118
  * the txs that have been requested less often whenever we need to send a new batch of requests. We ensure that no
137
119
  * tx is requested more than once at the same time to the same node.
138
- */ async collectFastFromNodes(request, opts) {
120
+ */ async collectFastFromNodes(request) {
139
121
  if (this.nodes.length === 0) {
140
122
  return;
141
123
  }
142
124
  // Keep a shared priority queue of all txs pending to be requested, sorted by the number of attempts made to collect them.
143
125
  const attemptsPerTx = [
144
- ...request.missingTxHashes
126
+ ...request.requestTracker.missingTxHashes
145
127
  ].map((txHash)=>({
146
128
  txHash,
147
129
  attempts: 0,
148
130
  found: false
149
131
  }));
150
132
  // Returns once we have finished all node loops. Each loop finishes when the deadline is hit, or all txs have been collected.
151
- await Promise.allSettled(this.nodes.map((node)=>this.collectFastFromNode(request, node, attemptsPerTx, opts)));
133
+ await Promise.allSettled(this.nodes.map((node)=>this.collectFastFromNode(request, node, attemptsPerTx)));
152
134
  }
153
- async collectFastFromNode(request, node, attemptsPerTx, opts) {
154
- const notFinished = ()=>this.dateProvider.now() <= +opts.deadline && request.missingTxHashes.size > 0 && this.requests.has(request);
135
+ async collectFastFromNode(request, node, attemptsPerTx) {
136
+ const notFinished = ()=>!request.requestTracker.checkCancelled();
155
137
  const maxParallelRequests = this.config.txCollectionFastMaxParallelRequestsPerNode;
156
138
  const maxBatchSize = this.config.txCollectionNodeRpcMaxBatchSize;
157
139
  const activeRequestsToThisNode = new Set(); // Track the txs being actively requested to this node
@@ -165,7 +147,7 @@ export class FastTxCollection {
165
147
  const txToRequest = attemptsPerTx[index++];
166
148
  if (!txToRequest) {
167
149
  break;
168
- } else if (!request.missingTxHashes.has(txToRequest.txHash)) {
150
+ } else if (!request.requestTracker.isMissing(txToRequest.txHash)) {
169
151
  // Mark as found if it was found somewhere else, we'll then remove it from the array.
170
152
  // We don't delete it now since 'array.splice' is pretty expensive, so we do it after sorting.
171
153
  txToRequest.found = true;
@@ -189,20 +171,30 @@ export class FastTxCollection {
189
171
  if (batch.length === 0) {
190
172
  return;
191
173
  }
174
+ const txHashes = batch.map(({ txHash })=>txHash);
192
175
  // Collect this batch from the node
193
- await this.txCollectionSink.collect((txHashes)=>node.getTxsByHash(txHashes), batch.map(({ txHash })=>TxHash.fromString(txHash)), {
176
+ await this.txCollectionSink.collect(async ()=>{
177
+ const result = await node.getTxsByHash(txHashes.map(TxHash.fromString));
178
+ for (const tx of result.validTxs){
179
+ request.requestTracker.markFetched(tx);
180
+ }
181
+ return result;
182
+ }, txHashes, {
194
183
  description: `fast ${node.getInfo()}`,
195
184
  node: node.getInfo(),
196
185
  method: 'fast-node-rpc',
197
186
  ...request.blockInfo
198
- });
187
+ }, this.getAddContext(request));
199
188
  // Clear from the active requests the txs we just requested
200
189
  for (const requestedTx of batch){
201
190
  activeRequestsToThisNode.delete(requestedTx.txHash);
202
191
  }
203
- // Sleep a bit until hitting the node again (or not, depending on config)
192
+ // Sleep a bit until hitting the node again, but wake up immediately on cancellation
204
193
  if (notFinished()) {
205
- await sleep(this.config.txCollectionFastNodeIntervalMs);
194
+ await Promise.race([
195
+ sleep(this.config.txCollectionFastNodeIntervalMs),
196
+ request.requestTracker.cancellationToken
197
+ ]);
206
198
  }
207
199
  }
208
200
  };
@@ -210,50 +202,67 @@ export class FastTxCollection {
210
202
  await Promise.all(times(maxParallelRequests, processBatch));
211
203
  }
212
204
  async collectFastViaReqResp(request, opts) {
213
- const timeoutMs = +request.deadline - this.dateProvider.now();
214
205
  const pinnedPeer = opts.pinnedPeer;
215
206
  const blockInfo = request.blockInfo;
216
207
  const slotNumber = blockInfo.slotNumber;
217
- if (timeoutMs < 100) {
208
+ if (request.requestTracker.timeoutMs < 100) {
218
209
  this.log.warn(`Not initiating fast reqresp for txs for ${request.type} at slot ${blockInfo.slotNumber} due to timeout`, {
219
- timeoutMs,
210
+ timeoutMs: request.requestTracker.timeoutMs,
220
211
  ...blockInfo
221
212
  });
222
213
  return;
223
214
  }
224
- this.log.debug(`Starting fast reqresp for ${request.missingTxHashes.size} txs for ${request.type} at slot ${blockInfo.slotNumber}`, {
215
+ this.log.debug(`Starting fast reqresp for ${request.requestTracker.numberOfMissingTxs} txs for ${request.type} at slot ${blockInfo.slotNumber}`, {
225
216
  ...blockInfo,
226
- timeoutMs,
217
+ timeoutMs: request.requestTracker.timeoutMs,
227
218
  pinnedPeer
228
219
  });
229
220
  try {
230
- await this.txCollectionSink.collect(async (txHashes)=>{
221
+ await this.txCollectionSink.collect(async ()=>{
222
+ let result;
231
223
  if (request.type === 'proposal') {
232
- return await this.missingTxsCollector.collectTxs(txHashes, request.blockProposal, pinnedPeer, timeoutMs);
224
+ result = await this.missingTxsCollector.collectTxs(request.requestTracker, request.blockProposal, pinnedPeer);
233
225
  } else if (request.type === 'block') {
234
226
  const blockTxsSource = {
235
227
  txHashes: request.block.body.txEffects.map((e)=>e.txHash),
236
228
  archive: request.block.archive.root
237
229
  };
238
- return await this.missingTxsCollector.collectTxs(txHashes, blockTxsSource, pinnedPeer, timeoutMs);
230
+ result = await this.missingTxsCollector.collectTxs(request.requestTracker, blockTxsSource, pinnedPeer);
239
231
  } else {
240
232
  throw new Error(`Unknown request type: ${request.type}`);
241
233
  }
242
- }, Array.from(request.missingTxHashes).map((txHash)=>TxHash.fromString(txHash)), {
234
+ return {
235
+ validTxs: result,
236
+ invalidTxHashes: []
237
+ };
238
+ }, Array.from(request.requestTracker.missingTxHashes), {
243
239
  description: `reqresp for slot ${slotNumber}`,
244
240
  method: 'fast-req-resp',
245
241
  ...opts,
246
242
  ...request.blockInfo
247
- });
243
+ }, this.getAddContext(request));
248
244
  } catch (err) {
249
245
  this.log.error(`Error sending fast reqresp request for txs`, err, {
250
246
  txs: [
251
- ...request.missingTxHashes
247
+ ...request.requestTracker.missingTxHashes
252
248
  ],
253
249
  ...blockInfo
254
250
  });
255
251
  }
256
252
  }
253
+ /** Returns the TxAddContext for the given request, used by the sink to add txs to the pool correctly. */ getAddContext(request) {
254
+ if (request.type === 'proposal') {
255
+ return {
256
+ type: 'proposal',
257
+ blockHeader: request.blockProposal.blockHeader
258
+ };
259
+ } else {
260
+ return {
261
+ type: 'mined',
262
+ block: request.block
263
+ };
264
+ }
265
+ }
257
266
  /**
258
267
  * Handle txs by marking them as found for the requests that are waiting for them, and resolves the request if all its txs have been found.
259
268
  * Called internally and from the main tx collection manager whenever the tx pool emits a tx-added event.
@@ -262,21 +271,18 @@ export class FastTxCollection {
262
271
  for (const tx of txs){
263
272
  const txHash = tx.txHash.toString();
264
273
  // Remove the tx hash from the missing set, and add it to the found set.
265
- if (request.missingTxHashes.has(txHash)) {
266
- request.missingTxHashes.delete(txHash);
267
- request.foundTxs.set(txHash, tx);
274
+ if (request.requestTracker.markFetched(tx)) {
268
275
  this.log.trace(`Found tx ${txHash} for fast collection request`, {
269
276
  ...request.blockInfo,
270
277
  txHash: tx.txHash.toString(),
271
278
  type: request.type
272
279
  });
273
- // If we found all txs for this request, we resolve the promise
274
- if (request.missingTxHashes.size === 0) {
280
+ if (request.requestTracker.allFetched()) {
275
281
  this.log.trace(`All txs found for fast collection request`, {
276
282
  ...request.blockInfo,
277
283
  type: request.type
278
284
  });
279
- request.promise.resolve();
285
+ break;
280
286
  }
281
287
  }
282
288
  }
@@ -288,8 +294,7 @@ export class FastTxCollection {
288
294
  */ stopCollectingForBlocksUpTo(blockNumber) {
289
295
  for (const request of this.requests){
290
296
  if (request.blockInfo.blockNumber <= blockNumber) {
291
- request.promise.reject(new AbortError(`Stopped collecting txs up to block ${blockNumber}`));
292
- this.requests.delete(request);
297
+ request.requestTracker.cancel();
293
298
  }
294
299
  }
295
300
  }
@@ -299,8 +304,7 @@ export class FastTxCollection {
299
304
  */ stopCollectingForBlocksAfter(blockNumber) {
300
305
  for (const request of this.requests){
301
306
  if (request.blockInfo.blockNumber > blockNumber) {
302
- request.promise.reject(new AbortError(`Stopped collecting txs after block ${blockNumber}`));
303
- this.requests.delete(request);
307
+ request.requestTracker.cancel();
304
308
  }
305
309
  }
306
310
  }
@@ -0,0 +1,53 @@
1
+ import { type Logger } from '@aztec/foundation/log';
2
+ import { DateProvider } from '@aztec/foundation/timer';
3
+ import { Tx, TxHash } from '@aztec/stdlib/tx';
4
+ import type { FileStoreTxSource } from './file_store_tx_source.js';
5
+ import type { TxAddContext, TxCollectionSink } from './tx_collection_sink.js';
6
+ /** Configuration for a FileStoreTxCollection instance. */
7
+ export type FileStoreCollectionConfig = {
8
+ workerCount: number;
9
+ backoffBaseMs: number;
10
+ backoffMaxMs: number;
11
+ };
12
+ /**
13
+ * Collects txs from file stores as a fallback after P2P methods have been tried.
14
+ * Uses a shared worker pool that pulls entries with priority (fewest attempts first),
15
+ * retries with round-robin across sources, and applies exponential backoff between
16
+ * full cycles through all sources.
17
+ */
18
+ export declare class FileStoreTxCollection {
19
+ private readonly sources;
20
+ private readonly txCollectionSink;
21
+ private readonly config;
22
+ private readonly dateProvider;
23
+ private readonly log;
24
+ /** Map from tx hash string to entry for all pending downloads. */
25
+ private entries;
26
+ /** Worker promises for the shared worker pool. */
27
+ private workers;
28
+ /** Whether the worker pool is running. */
29
+ private running;
30
+ /** Signal used to wake sleeping workers when new entries arrive or stop is called. */
31
+ private wakeSignal;
32
+ constructor(sources: FileStoreTxSource[], txCollectionSink: TxCollectionSink, config: FileStoreCollectionConfig, dateProvider?: DateProvider, log?: Logger);
33
+ /** Starts the shared worker pool. */
34
+ start(): void;
35
+ /** Stops all workers and clears state. */
36
+ stop(): Promise<void>;
37
+ /** Adds entries to the shared map and wakes workers. */
38
+ startCollecting(txHashes: TxHash[], context: TxAddContext, deadline: Date): void;
39
+ /** Removes entries for txs that have been found elsewhere. */
40
+ foundTxs(txs: Tx[]): void;
41
+ /** Clears all pending entries. */
42
+ clearPending(): void;
43
+ private workerLoop;
44
+ /** Single-pass scan: removes expired entries, finds the best ready entry, or computes sleep time. */
45
+ private getNextAction;
46
+ /** Computes backoff for an entry. Backoff applies after a full cycle through all sources. */
47
+ private getBackoffMs;
48
+ /** Resolves the current wake signal and creates a new one. */
49
+ private wake;
50
+ private waitForWake;
51
+ private sleepOrWake;
52
+ }
53
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsZV9zdG9yZV90eF9jb2xsZWN0aW9uLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvc2VydmljZXMvdHhfY29sbGVjdGlvbi9maWxlX3N0b3JlX3R4X2NvbGxlY3Rpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEtBQUssTUFBTSxFQUFnQixNQUFNLHVCQUF1QixDQUFDO0FBR2xFLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUN2RCxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBRTlDLE9BQU8sS0FBSyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDbkUsT0FBTyxLQUFLLEVBQUUsWUFBWSxFQUFFLGdCQUFnQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFFOUUsMERBQTBEO0FBQzFELE1BQU0sTUFBTSx5QkFBeUIsR0FBRztJQUN0QyxXQUFXLEVBQUUsTUFBTSxDQUFDO0lBQ3BCLGFBQWEsRUFBRSxNQUFNLENBQUM7SUFDdEIsWUFBWSxFQUFFLE1BQU0sQ0FBQztDQUN0QixDQUFDO0FBV0Y7Ozs7O0dBS0c7QUFDSCxxQkFBYSxxQkFBcUI7SUFjOUIsT0FBTyxDQUFDLFFBQVEsQ0FBQyxPQUFPO0lBQ3hCLE9BQU8sQ0FBQyxRQUFRLENBQUMsZ0JBQWdCO0lBQ2pDLE9BQU8sQ0FBQyxRQUFRLENBQUMsTUFBTTtJQUN2QixPQUFPLENBQUMsUUFBUSxDQUFDLFlBQVk7SUFDN0IsT0FBTyxDQUFDLFFBQVEsQ0FBQyxHQUFHO0lBakJ0QixrRUFBa0U7SUFDbEUsT0FBTyxDQUFDLE9BQU8sQ0FBdUM7SUFFdEQsa0RBQWtEO0lBQ2xELE9BQU8sQ0FBQyxPQUFPLENBQXVCO0lBRXRDLDBDQUEwQztJQUMxQyxPQUFPLENBQUMsT0FBTyxDQUFTO0lBRXhCLHNGQUFzRjtJQUN0RixPQUFPLENBQUMsVUFBVSxDQUE2QjtJQUUvQyxZQUNtQixPQUFPLEVBQUUsaUJBQWlCLEVBQUUsRUFDNUIsZ0JBQWdCLEVBQUUsZ0JBQWdCLEVBQ2xDLE1BQU0sRUFBRSx5QkFBeUIsRUFDakMsWUFBWSxHQUFFLFlBQWlDLEVBQy9DLEdBQUcsR0FBRSxNQUFxRCxFQUc1RTtJQUVELHFDQUFxQztJQUM5QixLQUFLLElBQUksSUFBSSxDQVNuQjtJQUVELDBDQUEwQztJQUM3QixJQUFJLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxDQU1qQztJQUVELHdEQUF3RDtJQUNqRCxlQUFlLENBQUMsUUFBUSxFQUFFLE1BQU0sRUFBRSxFQUFFLE9BQU8sRUFBRSxZQUFZLEVBQUUsUUFBUSxFQUFFLElBQUksR0FBRyxJQUFJLENBc0J0RjtJQUVELDhEQUE4RDtJQUN2RCxRQUFRLENBQUMsR0FBRyxFQUFFLEVBQUUsRUFBRSxHQUFHLElBQUksQ0FJL0I7SUFFRCxrQ0FBa0M7SUFDM0IsWUFBWSxJQUFJLElBQUksQ0FFMUI7WUFFYSxVQUFVO0lBa0N4QixxR0FBcUc7SUFDckcsT0FBTyxDQUFDLGFBQWE7SUE4QnJCLDZGQUE2RjtJQUM3RixPQUFPLENBQUMsWUFBWTtJQVFwQiw4REFBOEQ7SUFDOUQsT0FBTyxDQUFDLElBQUk7WUFNRSxXQUFXO1lBS1gsV0FBVztDQUcxQiJ9
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file_store_tx_collection.d.ts","sourceRoot":"","sources":["../../../src/services/tx_collection/file_store_tx_collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAGlE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE9E,0DAA0D;AAC1D,MAAM,MAAM,yBAAyB,GAAG;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAWF;;;;;GAKG;AACH,qBAAa,qBAAqB;IAc9B,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,GAAG;IAjBtB,kEAAkE;IAClE,OAAO,CAAC,OAAO,CAAuC;IAEtD,kDAAkD;IAClD,OAAO,CAAC,OAAO,CAAuB;IAEtC,0CAA0C;IAC1C,OAAO,CAAC,OAAO,CAAS;IAExB,sFAAsF;IACtF,OAAO,CAAC,UAAU,CAA6B;IAE/C,YACmB,OAAO,EAAE,iBAAiB,EAAE,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,yBAAyB,EACjC,YAAY,GAAE,YAAiC,EAC/C,GAAG,GAAE,MAAqD,EAG5E;IAED,qCAAqC;IAC9B,KAAK,IAAI,IAAI,CASnB;IAED,0CAA0C;IAC7B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAMjC;IAED,wDAAwD;IACjD,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,GAAG,IAAI,CAsBtF;IAED,8DAA8D;IACvD,QAAQ,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,IAAI,CAI/B;IAED,kCAAkC;IAC3B,YAAY,IAAI,IAAI,CAE1B;YAEa,UAAU;IAkCxB,qGAAqG;IACrG,OAAO,CAAC,aAAa;IA8BrB,6FAA6F;IAC7F,OAAO,CAAC,YAAY;IAQpB,8DAA8D;IAC9D,OAAO,CAAC,IAAI;YAME,WAAW;YAKX,WAAW;CAG1B"}
@@ -0,0 +1,167 @@
1
+ import { createLogger } from '@aztec/foundation/log';
2
+ import { promiseWithResolvers } from '@aztec/foundation/promise';
3
+ import { sleep } from '@aztec/foundation/sleep';
4
+ import { DateProvider } from '@aztec/foundation/timer';
5
+ import { TxHash } from '@aztec/stdlib/tx';
6
+ /**
7
+ * Collects txs from file stores as a fallback after P2P methods have been tried.
8
+ * Uses a shared worker pool that pulls entries with priority (fewest attempts first),
9
+ * retries with round-robin across sources, and applies exponential backoff between
10
+ * full cycles through all sources.
11
+ */ export class FileStoreTxCollection {
12
+ sources;
13
+ txCollectionSink;
14
+ config;
15
+ dateProvider;
16
+ log;
17
+ /** Map from tx hash string to entry for all pending downloads. */ entries;
18
+ /** Worker promises for the shared worker pool. */ workers;
19
+ /** Whether the worker pool is running. */ running;
20
+ /** Signal used to wake sleeping workers when new entries arrive or stop is called. */ wakeSignal;
21
+ constructor(sources, txCollectionSink, config, dateProvider = new DateProvider(), log = createLogger('p2p:file_store_tx_collection')){
22
+ this.sources = sources;
23
+ this.txCollectionSink = txCollectionSink;
24
+ this.config = config;
25
+ this.dateProvider = dateProvider;
26
+ this.log = log;
27
+ this.entries = new Map();
28
+ this.workers = [];
29
+ this.running = false;
30
+ this.wakeSignal = promiseWithResolvers();
31
+ }
32
+ /** Starts the shared worker pool. */ start() {
33
+ if (this.sources.length === 0) {
34
+ this.log.debug('No file store sources configured');
35
+ return;
36
+ }
37
+ this.running = true;
38
+ for(let i = 0; i < this.config.workerCount; i++){
39
+ this.workers.push(this.workerLoop());
40
+ }
41
+ }
42
+ /** Stops all workers and clears state. */ async stop() {
43
+ this.running = false;
44
+ this.wake();
45
+ await Promise.all(this.workers);
46
+ this.workers = [];
47
+ this.entries.clear();
48
+ }
49
+ /** Adds entries to the shared map and wakes workers. */ startCollecting(txHashes, context, deadline) {
50
+ if (this.sources.length === 0 || txHashes.length === 0) {
51
+ return;
52
+ }
53
+ if (+deadline <= this.dateProvider.now()) {
54
+ return;
55
+ }
56
+ for (const txHash of txHashes){
57
+ const hashStr = txHash.toString();
58
+ if (!this.entries.has(hashStr)) {
59
+ this.entries.set(hashStr, {
60
+ txHash: hashStr,
61
+ context,
62
+ deadline,
63
+ attempts: 0,
64
+ lastAttemptTime: 0,
65
+ nextSourceIndex: Math.floor(Math.random() * this.sources.length)
66
+ });
67
+ }
68
+ }
69
+ this.wake();
70
+ }
71
+ /** Removes entries for txs that have been found elsewhere. */ foundTxs(txs) {
72
+ for (const tx of txs){
73
+ this.entries.delete(tx.getTxHash().toString());
74
+ }
75
+ }
76
+ /** Clears all pending entries. */ clearPending() {
77
+ this.entries.clear();
78
+ }
79
+ async workerLoop() {
80
+ while(this.running){
81
+ const action = this.getNextAction();
82
+ if (action.type === 'sleep') {
83
+ await action.promise;
84
+ continue;
85
+ }
86
+ const entry = action.entry;
87
+ const source = this.sources[entry.nextSourceIndex % this.sources.length];
88
+ entry.nextSourceIndex++;
89
+ entry.attempts++;
90
+ entry.lastAttemptTime = this.dateProvider.now();
91
+ try {
92
+ const result = await this.txCollectionSink.collect(()=>source.getTxsByHash([
93
+ TxHash.fromString(entry.txHash)
94
+ ]), [
95
+ entry.txHash
96
+ ], {
97
+ description: `file-store ${source.getInfo()}`,
98
+ method: 'file-store',
99
+ fileStore: source.getInfo()
100
+ }, entry.context);
101
+ if (result.txs.length > 0) {
102
+ this.entries.delete(entry.txHash);
103
+ }
104
+ } catch (err) {
105
+ this.log.trace(`Error downloading tx ${entry.txHash} from ${source.getInfo()}`, {
106
+ err
107
+ });
108
+ }
109
+ }
110
+ }
111
+ /** Single-pass scan: removes expired entries, finds the best ready entry, or computes sleep time. */ getNextAction() {
112
+ const now = this.dateProvider.now();
113
+ let best;
114
+ let earliestReadyAt = Infinity;
115
+ for (const [key, entry] of this.entries){
116
+ if (+entry.deadline <= now) {
117
+ this.entries.delete(key);
118
+ continue;
119
+ }
120
+ const backoffMs = this.getBackoffMs(entry);
121
+ const readyAt = entry.lastAttemptTime + backoffMs;
122
+ if (readyAt > now) {
123
+ earliestReadyAt = Math.min(earliestReadyAt, readyAt);
124
+ continue;
125
+ }
126
+ if (!best || entry.attempts < best.attempts) {
127
+ best = entry;
128
+ }
129
+ }
130
+ if (best) {
131
+ return {
132
+ type: 'process',
133
+ entry: best
134
+ };
135
+ }
136
+ if (earliestReadyAt < Infinity) {
137
+ return {
138
+ type: 'sleep',
139
+ promise: this.sleepOrWake(earliestReadyAt - now)
140
+ };
141
+ }
142
+ return {
143
+ type: 'sleep',
144
+ promise: this.waitForWake()
145
+ };
146
+ }
147
+ /** Computes backoff for an entry. Backoff applies after a full cycle through all sources. */ getBackoffMs(entry) {
148
+ const fullCycles = Math.floor(entry.attempts / this.sources.length);
149
+ if (fullCycles === 0) {
150
+ return 0;
151
+ }
152
+ return Math.min(this.config.backoffBaseMs * Math.pow(2, fullCycles - 1), this.config.backoffMaxMs);
153
+ }
154
+ /** Resolves the current wake signal and creates a new one. */ wake() {
155
+ this.wakeSignal.resolve();
156
+ this.wakeSignal = promiseWithResolvers();
157
+ }
158
+ /** Waits until the wake signal is resolved. */ async waitForWake() {
159
+ await this.wakeSignal.promise;
160
+ }
161
+ /** Sleeps for the given duration or until the wake signal is resolved. */ async sleepOrWake(ms) {
162
+ await Promise.race([
163
+ sleep(ms),
164
+ this.wakeSignal.promise
165
+ ]);
166
+ }
167
+ }
@@ -0,0 +1,38 @@
1
+ import { type Logger } from '@aztec/foundation/log';
2
+ import { type TxHash, type TxValidator } from '@aztec/stdlib/tx';
3
+ import { type TelemetryClient } from '@aztec/telemetry-client';
4
+ import type { TxSource, TxSourceCollectionResult } from './tx_source.js';
5
+ /** TxSource implementation that downloads txs from a file store. */
6
+ export declare class FileStoreTxSource implements TxSource {
7
+ private readonly fileStore;
8
+ private readonly baseUrl;
9
+ private readonly basePath;
10
+ private readonly txValidator;
11
+ private readonly log;
12
+ private downloadsSuccess;
13
+ private downloadsFailed;
14
+ private downloadDuration;
15
+ private downloadSize;
16
+ private constructor();
17
+ /**
18
+ * Creates a FileStoreTxSource from a URL.
19
+ * @param url - The file store URL (s3://, gs://, file://, http://, https://).
20
+ * @param basePath - Base path for tx files within the store.
21
+ * @param log - Optional logger.
22
+ * @param telemetry - Optional telemetry client.
23
+ * @returns The FileStoreTxSource instance, or undefined if creation fails.
24
+ */
25
+ static create(url: string, basePath: string, txValidator: TxValidator, log?: Logger, telemetry?: TelemetryClient): Promise<FileStoreTxSource | undefined>;
26
+ getInfo(): string;
27
+ getTxsByHash(txHashes: TxHash[]): Promise<TxSourceCollectionResult>;
28
+ }
29
+ /**
30
+ * Creates FileStoreTxSource instances from URLs.
31
+ * @param urls - Array of file store URLs.
32
+ * @param basePath - Base path for tx files within each store.
33
+ * @param log - Optional logger.
34
+ * @param telemetry - Optional telemetry client.
35
+ * @returns Array of successfully created FileStoreTxSource instances.
36
+ */
37
+ export declare function createFileStoreTxSources(urls: string[], basePath: string, txValidator: TxValidator, log?: Logger, telemetry?: TelemetryClient): Promise<FileStoreTxSource[]>;
38
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsZV9zdG9yZV90eF9zb3VyY2UuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zZXJ2aWNlcy90eF9jb2xsZWN0aW9uL2ZpbGVfc3RvcmVfdHhfc291cmNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxLQUFLLE1BQU0sRUFBZ0IsTUFBTSx1QkFBdUIsQ0FBQztBQUdsRSxPQUFPLEVBQU0sS0FBSyxNQUFNLEVBQUUsS0FBSyxXQUFXLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUNyRSxPQUFPLEVBR0wsS0FBSyxlQUFlLEVBR3JCLE1BQU0seUJBQXlCLENBQUM7QUFFakMsT0FBTyxLQUFLLEVBQUUsUUFBUSxFQUFFLHdCQUF3QixFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFFekUsb0VBQW9FO0FBQ3BFLHFCQUFhLGlCQUFrQixZQUFXLFFBQVE7SUFPOUMsT0FBTyxDQUFDLFFBQVEsQ0FBQyxTQUFTO0lBQzFCLE9BQU8sQ0FBQyxRQUFRLENBQUMsT0FBTztJQUN4QixPQUFPLENBQUMsUUFBUSxDQUFDLFFBQVE7SUFDekIsT0FBTyxDQUFDLFFBQVEsQ0FBQyxXQUFXO0lBQzVCLE9BQU8sQ0FBQyxRQUFRLENBQUMsR0FBRztJQVZ0QixPQUFPLENBQUMsZ0JBQWdCLENBQWdCO0lBQ3hDLE9BQU8sQ0FBQyxlQUFlLENBQWdCO0lBQ3ZDLE9BQU8sQ0FBQyxnQkFBZ0IsQ0FBWTtJQUNwQyxPQUFPLENBQUMsWUFBWSxDQUFZO0lBRWhDLE9BQU8sZUFhTjtJQUVEOzs7Ozs7O09BT0c7SUFDSCxPQUFvQixNQUFNLENBQ3hCLEdBQUcsRUFBRSxNQUFNLEVBQ1gsUUFBUSxFQUFFLE1BQU0sRUFDaEIsV0FBVyxFQUFFLFdBQVcsRUFDeEIsR0FBRyxHQUFFLE1BQWlELEVBQ3RELFNBQVMsR0FBRSxlQUFzQyxHQUNoRCxPQUFPLENBQUMsaUJBQWlCLEdBQUcsU0FBUyxDQUFDLENBWXhDO0lBRU0sT0FBTyxJQUFJLE1BQU0sQ0FFdkI7SUFFWSxZQUFZLENBQUMsUUFBUSxFQUFFLE1BQU0sRUFBRSxHQUFHLE9BQU8sQ0FBQyx3QkFBd0IsQ0FBQyxDQXFDL0U7Q0FDRjtBQUVEOzs7Ozs7O0dBT0c7QUFDSCx3QkFBc0Isd0JBQXdCLENBQzVDLElBQUksRUFBRSxNQUFNLEVBQUUsRUFDZCxRQUFRLEVBQUUsTUFBTSxFQUNoQixXQUFXLEVBQUUsV0FBVyxFQUN4QixHQUFHLEdBQUUsTUFBaUQsRUFDdEQsU0FBUyxHQUFFLGVBQXNDLEdBQ2hELE9BQU8sQ0FBQyxpQkFBaUIsRUFBRSxDQUFDLENBSzlCIn0=
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file_store_tx_source.d.ts","sourceRoot":"","sources":["../../../src/services/tx_collection/file_store_tx_source.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAGlE,OAAO,EAAM,KAAK,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAGL,KAAK,eAAe,EAGrB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,QAAQ,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAEzE,oEAAoE;AACpE,qBAAa,iBAAkB,YAAW,QAAQ;IAO9C,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,GAAG;IAVtB,OAAO,CAAC,gBAAgB,CAAgB;IACxC,OAAO,CAAC,eAAe,CAAgB;IACvC,OAAO,CAAC,gBAAgB,CAAY;IACpC,OAAO,CAAC,YAAY,CAAY;IAEhC,OAAO,eAaN;IAED;;;;;;;OAOG;IACH,OAAoB,MAAM,CACxB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,WAAW,EACxB,GAAG,GAAE,MAAiD,EACtD,SAAS,GAAE,eAAsC,GAChD,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAYxC;IAEM,OAAO,IAAI,MAAM,CAEvB;IAEY,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAqC/E;CACF;AAED;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,MAAM,EAAE,EACd,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,WAAW,EACxB,GAAG,GAAE,MAAiD,EACtD,SAAS,GAAE,eAAsC,GAChD,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAK9B"}