@aztec/p2p 1.2.1 → 2.0.0-nightly.20250813

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 (221) hide show
  1. package/dest/client/factory.d.ts +5 -1
  2. package/dest/client/factory.d.ts.map +1 -1
  3. package/dest/client/factory.js +29 -12
  4. package/dest/client/interface.d.ts +8 -13
  5. package/dest/client/interface.d.ts.map +1 -1
  6. package/dest/client/p2p_client.d.ts +18 -22
  7. package/dest/client/p2p_client.d.ts.map +1 -1
  8. package/dest/client/p2p_client.js +86 -83
  9. package/dest/config.d.ts +30 -1
  10. package/dest/config.d.ts.map +1 -1
  11. package/dest/config.js +34 -1
  12. package/dest/index.d.ts +1 -0
  13. package/dest/index.d.ts.map +1 -1
  14. package/dest/index.js +1 -0
  15. package/dest/mem_pools/attestation_pool/attestation_pool.d.ts +13 -1
  16. package/dest/mem_pools/attestation_pool/attestation_pool.d.ts.map +1 -1
  17. package/dest/mem_pools/attestation_pool/attestation_pool_test_suite.d.ts.map +1 -1
  18. package/dest/mem_pools/attestation_pool/attestation_pool_test_suite.js +117 -10
  19. package/dest/mem_pools/attestation_pool/kv_attestation_pool.d.ts +4 -1
  20. package/dest/mem_pools/attestation_pool/kv_attestation_pool.d.ts.map +1 -1
  21. package/dest/mem_pools/attestation_pool/kv_attestation_pool.js +22 -1
  22. package/dest/mem_pools/attestation_pool/memory_attestation_pool.d.ts +4 -1
  23. package/dest/mem_pools/attestation_pool/memory_attestation_pool.d.ts.map +1 -1
  24. package/dest/mem_pools/attestation_pool/memory_attestation_pool.js +21 -1
  25. package/dest/mem_pools/attestation_pool/mocks.d.ts +1 -2
  26. package/dest/mem_pools/attestation_pool/mocks.d.ts.map +1 -1
  27. package/dest/mem_pools/attestation_pool/mocks.js +2 -10
  28. package/dest/mem_pools/tx_pool/aztec_kv_tx_pool.d.ts +8 -3
  29. package/dest/mem_pools/tx_pool/aztec_kv_tx_pool.d.ts.map +1 -1
  30. package/dest/mem_pools/tx_pool/aztec_kv_tx_pool.js +64 -37
  31. package/dest/mem_pools/tx_pool/memory_tx_pool.d.ts +8 -3
  32. package/dest/mem_pools/tx_pool/memory_tx_pool.d.ts.map +1 -1
  33. package/dest/mem_pools/tx_pool/memory_tx_pool.js +18 -10
  34. package/dest/mem_pools/tx_pool/tx_pool.d.ts +11 -2
  35. package/dest/mem_pools/tx_pool/tx_pool.d.ts.map +1 -1
  36. package/dest/mem_pools/tx_pool/tx_pool_test_suite.d.ts.map +1 -1
  37. package/dest/mem_pools/tx_pool/tx_pool_test_suite.js +73 -44
  38. package/dest/msg_validators/attestation_validator/attestation_validator.js +1 -1
  39. package/dest/msg_validators/tx_validator/block_header_validator.d.ts.map +1 -1
  40. package/dest/msg_validators/tx_validator/block_header_validator.js +2 -2
  41. package/dest/msg_validators/tx_validator/data_validator.d.ts.map +1 -1
  42. package/dest/msg_validators/tx_validator/data_validator.js +35 -59
  43. package/dest/msg_validators/tx_validator/double_spend_validator.js +2 -2
  44. package/dest/msg_validators/tx_validator/gas_validator.js +4 -4
  45. package/dest/msg_validators/tx_validator/metadata_validator.d.ts.map +1 -1
  46. package/dest/msg_validators/tx_validator/metadata_validator.js +21 -21
  47. package/dest/msg_validators/tx_validator/phases_validator.js +3 -3
  48. package/dest/msg_validators/tx_validator/tx_proof_validator.js +3 -3
  49. package/dest/services/discv5/discV5_service.d.ts.map +1 -1
  50. package/dest/services/discv5/discV5_service.js +4 -1
  51. package/dest/services/dummy_service.d.ts +13 -3
  52. package/dest/services/dummy_service.d.ts.map +1 -1
  53. package/dest/services/dummy_service.js +26 -3
  54. package/dest/services/index.d.ts +3 -1
  55. package/dest/services/index.d.ts.map +1 -1
  56. package/dest/services/index.js +3 -1
  57. package/dest/services/libp2p/libp2p_service.d.ts +13 -20
  58. package/dest/services/libp2p/libp2p_service.d.ts.map +1 -1
  59. package/dest/services/libp2p/libp2p_service.js +123 -46
  60. package/dest/services/peer-manager/interface.d.ts +8 -1
  61. package/dest/services/peer-manager/interface.d.ts.map +1 -1
  62. package/dest/services/peer-manager/peer_manager.d.ts +70 -3
  63. package/dest/services/peer-manager/peer_manager.d.ts.map +1 -1
  64. package/dest/services/peer-manager/peer_manager.js +369 -39
  65. package/dest/services/reqresp/config.d.ts +3 -3
  66. package/dest/services/reqresp/config.d.ts.map +1 -1
  67. package/dest/services/reqresp/config.js +3 -3
  68. package/dest/services/reqresp/connection-sampler/connection_sampler.d.ts +3 -4
  69. package/dest/services/reqresp/connection-sampler/connection_sampler.d.ts.map +1 -1
  70. package/dest/services/reqresp/connection-sampler/connection_sampler.js +35 -52
  71. package/dest/services/reqresp/index.d.ts +2 -1
  72. package/dest/services/reqresp/index.d.ts.map +1 -1
  73. package/dest/services/reqresp/index.js +2 -1
  74. package/dest/services/reqresp/interface.d.ts +61 -10
  75. package/dest/services/reqresp/interface.d.ts.map +1 -1
  76. package/dest/services/reqresp/interface.js +41 -6
  77. package/dest/services/reqresp/protocols/auth.d.ts +43 -0
  78. package/dest/services/reqresp/protocols/auth.d.ts.map +1 -0
  79. package/dest/services/reqresp/protocols/auth.js +71 -0
  80. package/dest/services/reqresp/protocols/block.d.ts +5 -0
  81. package/dest/services/reqresp/protocols/block.d.ts.map +1 -1
  82. package/dest/services/reqresp/protocols/block.js +28 -5
  83. package/dest/services/reqresp/protocols/block_txs/bitvector.d.ts +30 -0
  84. package/dest/services/reqresp/protocols/block_txs/bitvector.d.ts.map +1 -0
  85. package/dest/services/reqresp/protocols/block_txs/bitvector.js +75 -0
  86. package/dest/services/reqresp/protocols/block_txs/block_txs_handler.d.ts +11 -0
  87. package/dest/services/reqresp/protocols/block_txs/block_txs_handler.d.ts.map +1 -0
  88. package/dest/services/reqresp/protocols/block_txs/block_txs_handler.js +39 -0
  89. package/dest/services/reqresp/protocols/block_txs/block_txs_reqresp.d.ts +49 -0
  90. package/dest/services/reqresp/protocols/block_txs/block_txs_reqresp.d.ts.map +1 -0
  91. package/dest/services/reqresp/protocols/block_txs/block_txs_reqresp.js +75 -0
  92. package/dest/services/reqresp/protocols/block_txs/index.d.ts +4 -0
  93. package/dest/services/reqresp/protocols/block_txs/index.d.ts.map +1 -0
  94. package/dest/services/reqresp/protocols/block_txs/index.js +3 -0
  95. package/dest/services/reqresp/protocols/goodbye.js +3 -5
  96. package/dest/services/reqresp/protocols/index.d.ts +2 -0
  97. package/dest/services/reqresp/protocols/index.d.ts.map +1 -1
  98. package/dest/services/reqresp/protocols/index.js +2 -0
  99. package/dest/services/reqresp/protocols/status.d.ts +2 -0
  100. package/dest/services/reqresp/protocols/status.d.ts.map +1 -1
  101. package/dest/services/reqresp/protocols/status.js +7 -0
  102. package/dest/services/reqresp/protocols/tx.d.ts +12 -1
  103. package/dest/services/reqresp/protocols/tx.d.ts.map +1 -1
  104. package/dest/services/reqresp/protocols/tx.js +34 -6
  105. package/dest/services/reqresp/rate-limiter/rate_limits.d.ts.map +1 -1
  106. package/dest/services/reqresp/rate-limiter/rate_limits.js +20 -0
  107. package/dest/services/reqresp/reqresp.d.ts +37 -39
  108. package/dest/services/reqresp/reqresp.d.ts.map +1 -1
  109. package/dest/services/reqresp/reqresp.js +220 -220
  110. package/dest/services/reqresp/status.d.ts +8 -3
  111. package/dest/services/reqresp/status.d.ts.map +1 -1
  112. package/dest/services/reqresp/status.js +6 -2
  113. package/dest/services/service.d.ts +10 -10
  114. package/dest/services/service.d.ts.map +1 -1
  115. package/dest/services/tx_collection/config.d.ts +25 -0
  116. package/dest/services/tx_collection/config.d.ts.map +1 -0
  117. package/dest/services/tx_collection/config.js +58 -0
  118. package/dest/services/tx_collection/fast_tx_collection.d.ts +56 -0
  119. package/dest/services/tx_collection/fast_tx_collection.d.ts.map +1 -0
  120. package/dest/services/tx_collection/fast_tx_collection.js +295 -0
  121. package/dest/services/tx_collection/index.d.ts +3 -0
  122. package/dest/services/tx_collection/index.d.ts.map +1 -0
  123. package/dest/services/tx_collection/index.js +2 -0
  124. package/dest/services/tx_collection/instrumentation.d.ts +10 -0
  125. package/dest/services/tx_collection/instrumentation.d.ts.map +1 -0
  126. package/dest/services/tx_collection/instrumentation.js +34 -0
  127. package/dest/services/tx_collection/slow_tx_collection.d.ts +54 -0
  128. package/dest/services/tx_collection/slow_tx_collection.d.ts.map +1 -0
  129. package/dest/services/tx_collection/slow_tx_collection.js +176 -0
  130. package/dest/services/tx_collection/tx_collection.d.ts +109 -0
  131. package/dest/services/tx_collection/tx_collection.d.ts.map +1 -0
  132. package/dest/services/tx_collection/tx_collection.js +127 -0
  133. package/dest/services/tx_collection/tx_collection_sink.d.ts +30 -0
  134. package/dest/services/tx_collection/tx_collection_sink.d.ts.map +1 -0
  135. package/dest/services/tx_collection/tx_collection_sink.js +81 -0
  136. package/dest/services/tx_collection/tx_source.d.ts +18 -0
  137. package/dest/services/tx_collection/tx_source.d.ts.map +1 -0
  138. package/dest/services/tx_collection/tx_source.js +31 -0
  139. package/dest/services/tx_provider.d.ts +49 -0
  140. package/dest/services/tx_provider.d.ts.map +1 -0
  141. package/dest/services/tx_provider.js +206 -0
  142. package/dest/services/{tx_collect_instrumentation.d.ts → tx_provider_instrumentation.d.ts} +2 -2
  143. package/dest/services/tx_provider_instrumentation.d.ts.map +1 -0
  144. package/dest/services/{tx_collect_instrumentation.js → tx_provider_instrumentation.js} +5 -5
  145. package/dest/test-helpers/make-test-p2p-clients.d.ts.map +1 -1
  146. package/dest/test-helpers/make-test-p2p-clients.js +4 -3
  147. package/dest/test-helpers/mock-pubsub.d.ts +2 -1
  148. package/dest/test-helpers/mock-pubsub.d.ts.map +1 -1
  149. package/dest/test-helpers/mock-pubsub.js +2 -1
  150. package/dest/test-helpers/reqresp-nodes.d.ts.map +1 -1
  151. package/dest/test-helpers/reqresp-nodes.js +8 -4
  152. package/dest/testbench/p2p_client_testbench_worker.js +11 -5
  153. package/dest/util.d.ts +1 -1
  154. package/dest/util.d.ts.map +1 -1
  155. package/package.json +14 -15
  156. package/src/client/factory.ts +87 -12
  157. package/src/client/interface.ts +19 -15
  158. package/src/client/p2p_client.ts +108 -92
  159. package/src/config.ts +52 -1
  160. package/src/index.ts +1 -0
  161. package/src/mem_pools/attestation_pool/attestation_pool.ts +15 -1
  162. package/src/mem_pools/attestation_pool/attestation_pool_test_suite.ts +155 -4
  163. package/src/mem_pools/attestation_pool/kv_attestation_pool.ts +28 -1
  164. package/src/mem_pools/attestation_pool/memory_attestation_pool.ts +28 -2
  165. package/src/mem_pools/attestation_pool/mocks.ts +1 -3
  166. package/src/mem_pools/tx_pool/aztec_kv_tx_pool.ts +59 -41
  167. package/src/mem_pools/tx_pool/memory_tx_pool.ts +19 -9
  168. package/src/mem_pools/tx_pool/tx_pool.ts +7 -2
  169. package/src/mem_pools/tx_pool/tx_pool_test_suite.ts +63 -40
  170. package/src/msg_validators/attestation_validator/attestation_validator.ts +1 -1
  171. package/src/msg_validators/tx_validator/block_header_validator.ts +2 -2
  172. package/src/msg_validators/tx_validator/data_validator.ts +36 -27
  173. package/src/msg_validators/tx_validator/double_spend_validator.ts +2 -2
  174. package/src/msg_validators/tx_validator/gas_validator.ts +4 -4
  175. package/src/msg_validators/tx_validator/metadata_validator.ts +22 -28
  176. package/src/msg_validators/tx_validator/phases_validator.ts +2 -2
  177. package/src/msg_validators/tx_validator/tx_proof_validator.ts +2 -2
  178. package/src/services/discv5/discV5_service.ts +4 -1
  179. package/src/services/dummy_service.ts +44 -4
  180. package/src/services/index.ts +3 -1
  181. package/src/services/libp2p/libp2p_service.ts +147 -55
  182. package/src/services/peer-manager/interface.ts +10 -1
  183. package/src/services/peer-manager/peer_manager.ts +441 -41
  184. package/src/services/reqresp/config.ts +3 -3
  185. package/src/services/reqresp/connection-sampler/connection_sampler.ts +38 -63
  186. package/src/services/reqresp/index.ts +2 -0
  187. package/src/services/reqresp/interface.ts +63 -17
  188. package/src/services/reqresp/protocols/auth.ts +83 -0
  189. package/src/services/reqresp/protocols/block.ts +24 -3
  190. package/src/services/reqresp/protocols/block_txs/bitvector.ts +90 -0
  191. package/src/services/reqresp/protocols/block_txs/block_txs_handler.ts +53 -0
  192. package/src/services/reqresp/protocols/block_txs/block_txs_reqresp.ts +79 -0
  193. package/src/services/reqresp/protocols/block_txs/index.ts +3 -0
  194. package/src/services/reqresp/protocols/goodbye.ts +3 -3
  195. package/src/services/reqresp/protocols/index.ts +2 -0
  196. package/src/services/reqresp/protocols/status.ts +20 -0
  197. package/src/services/reqresp/protocols/tx.ts +35 -6
  198. package/src/services/reqresp/rate-limiter/rate_limits.ts +20 -0
  199. package/src/services/reqresp/reqresp.ts +294 -264
  200. package/src/services/reqresp/status.ts +9 -3
  201. package/src/services/service.ts +23 -14
  202. package/src/services/tx_collection/config.ts +84 -0
  203. package/src/services/tx_collection/fast_tx_collection.ts +338 -0
  204. package/src/services/tx_collection/index.ts +2 -0
  205. package/src/services/tx_collection/instrumentation.ts +43 -0
  206. package/src/services/tx_collection/slow_tx_collection.ts +232 -0
  207. package/src/services/tx_collection/tx_collection.ts +214 -0
  208. package/src/services/tx_collection/tx_collection_sink.ts +98 -0
  209. package/src/services/tx_collection/tx_source.ts +37 -0
  210. package/src/services/tx_provider.ts +215 -0
  211. package/src/services/{tx_collect_instrumentation.ts → tx_provider_instrumentation.ts} +5 -5
  212. package/src/test-helpers/make-test-p2p-clients.ts +4 -2
  213. package/src/test-helpers/mock-pubsub.ts +1 -0
  214. package/src/test-helpers/reqresp-nodes.ts +7 -1
  215. package/src/testbench/p2p_client_testbench_worker.ts +9 -2
  216. package/src/util.ts +1 -1
  217. package/dest/services/tx_collect_instrumentation.d.ts.map +0 -1
  218. package/dest/services/tx_collector.d.ts +0 -23
  219. package/dest/services/tx_collector.d.ts.map +0 -1
  220. package/dest/services/tx_collector.js +0 -95
  221. package/src/services/tx_collector.ts +0 -134
@@ -1,8 +1,10 @@
1
1
  import type { EpochCacheInterface } from '@aztec/epoch-cache';
2
2
  import { type Logger } from '@aztec/foundation/log';
3
+ import { DateProvider } from '@aztec/foundation/timer';
3
4
  import type { AztecAsyncKVStore } from '@aztec/kv-store';
4
5
  import type { DataStoreConfig } from '@aztec/kv-store/config';
5
6
  import type { L2BlockSource } from '@aztec/stdlib/block';
7
+ import type { ChainConfig } from '@aztec/stdlib/config';
6
8
  import type { ContractDataSource } from '@aztec/stdlib/contract';
7
9
  import type { ClientProtocolCircuitVerifier, WorldStateSynchronizer } from '@aztec/stdlib/interfaces/server';
8
10
  import { P2PClientType } from '@aztec/stdlib/p2p';
@@ -12,15 +14,17 @@ import type { P2PConfig } from '../config.js';
12
14
  import type { AttestationPool } from '../mem_pools/attestation_pool/attestation_pool.js';
13
15
  import { type TxPool } from '../mem_pools/tx_pool/index.js';
14
16
  import { LibP2PService } from '../services/index.js';
17
+ import { type TxSource } from '../services/tx_collection/tx_source.js';
15
18
  export type P2PClientDeps<T extends P2PClientType> = {
16
19
  txPool?: TxPool;
17
20
  store?: AztecAsyncKVStore;
18
21
  attestationPool?: T extends P2PClientType.Full ? AttestationPool : undefined;
19
22
  logger?: Logger;
23
+ txCollectionNodeSources?: TxSource[];
20
24
  p2pServiceFactory?: (...args: Parameters<(typeof LibP2PService)['new']>) => Promise<LibP2PService<T>>;
21
25
  };
22
26
  export declare const P2P_STORE_NAME = "p2p";
23
27
  export declare const P2P_ARCHIVE_STORE_NAME = "p2p-archive";
24
28
  export declare const P2P_PEER_STORE_NAME = "p2p-peers";
25
- export declare const createP2PClient: <T extends P2PClientType>(clientType: T, _config: P2PConfig & DataStoreConfig, archiver: L2BlockSource & ContractDataSource, proofVerifier: ClientProtocolCircuitVerifier, worldStateSynchronizer: WorldStateSynchronizer, epochCache: EpochCacheInterface, packageVersion: string, telemetry?: TelemetryClient, deps?: P2PClientDeps<T>) => Promise<P2PClient<T>>;
29
+ export declare function createP2PClient<T extends P2PClientType>(clientType: T, inputConfig: P2PConfig & DataStoreConfig & ChainConfig, archiver: L2BlockSource & ContractDataSource, proofVerifier: ClientProtocolCircuitVerifier, worldStateSynchronizer: WorldStateSynchronizer, epochCache: EpochCacheInterface, packageVersion: string, dateProvider?: DateProvider, telemetry?: TelemetryClient, deps?: P2PClientDeps<T>): Promise<P2PClient<T>>;
26
30
  //# sourceMappingURL=factory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/client/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,6BAA6B,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC7G,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,KAAK,eAAe,EAAsB,MAAM,yBAAyB,CAAC;AAEnF,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mDAAmD,CAAC;AAGzF,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAE3E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrD,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,aAAa,IAAI;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,eAAe,CAAC,EAAE,CAAC,SAAS,aAAa,CAAC,IAAI,GAAG,eAAe,GAAG,SAAS,CAAC;IAC7E,MAAM,CAAC,EAAE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EAAE,mBAAmB,EAC/B,cAAc,EAAE,MAAM,EACtB,YAAY,GAAE,YAAiC,EAC/C,SAAS,GAAE,eAAsC,EACjD,IAAI,GAAE,aAAa,CAAC,CAAC,CAAM,yBA4E5B"}
@@ -1,4 +1,5 @@
1
1
  import { createLogger } from '@aztec/foundation/log';
2
+ import { DateProvider } from '@aztec/foundation/timer';
2
3
  import { createStore } from '@aztec/kv-store/lmdb-v2';
3
4
  import { P2PClientType } from '@aztec/stdlib/p2p';
4
5
  import { getTelemetryClient } from '@aztec/telemetry-client';
@@ -7,19 +8,22 @@ import { InMemoryAttestationPool } from '../mem_pools/attestation_pool/memory_at
7
8
  import { AztecKVTxPool } from '../mem_pools/tx_pool/index.js';
8
9
  import { DummyP2PService } from '../services/dummy_service.js';
9
10
  import { LibP2PService } from '../services/index.js';
11
+ import { TxCollection } from '../services/tx_collection/tx_collection.js';
12
+ import { createNodeRpcTxSources } from '../services/tx_collection/tx_source.js';
10
13
  import { configureP2PClientAddresses, createLibP2PPeerIdFromPrivateKey, getPeerIdPrivateKey } from '../util.js';
11
14
  export const P2P_STORE_NAME = 'p2p';
12
15
  export const P2P_ARCHIVE_STORE_NAME = 'p2p-archive';
13
16
  export const P2P_PEER_STORE_NAME = 'p2p-peers';
14
- export const createP2PClient = async (clientType, _config, archiver, proofVerifier, worldStateSynchronizer, epochCache, packageVersion, telemetry = getTelemetryClient(), deps = {})=>{
15
- let config = {
16
- ..._config,
17
- dataStoreMapSizeKB: _config.p2pStoreMapSizeKb ?? _config.dataStoreMapSizeKB
18
- };
17
+ export async function createP2PClient(clientType, inputConfig, archiver, proofVerifier, worldStateSynchronizer, epochCache, packageVersion, dateProvider = new DateProvider(), telemetry = getTelemetryClient(), deps = {}) {
18
+ const config = await configureP2PClientAddresses({
19
+ ...inputConfig,
20
+ dataStoreMapSizeKB: inputConfig.p2pStoreMapSizeKb ?? inputConfig.dataStoreMapSizeKB
21
+ });
19
22
  const logger = deps.logger ?? createLogger('p2p');
20
23
  const store = deps.store ?? await createStore(P2P_STORE_NAME, 2, config, createLogger('p2p:lmdb-v2'));
21
24
  const archive = await createStore(P2P_ARCHIVE_STORE_NAME, 1, config, createLogger('p2p-archive:lmdb-v2'));
22
25
  const peerStore = await createStore(P2P_PEER_STORE_NAME, 1, config, createLogger('p2p-peer:lmdb-v2'));
26
+ const l1Constants = await archiver.getL1Constants();
23
27
  const mempools = {
24
28
  txPool: deps.txPool ?? new AztecKVTxPool(store, archive, worldStateSynchronizer, telemetry, {
25
29
  maxTxPoolSize: config.maxTxPoolSize,
@@ -27,16 +31,29 @@ export const createP2PClient = async (clientType, _config, archiver, proofVerifi
27
31
  }),
28
32
  attestationPool: clientType === P2PClientType.Full ? deps.attestationPool ?? new InMemoryAttestationPool(telemetry) : undefined
29
33
  };
30
- if (!_config.p2pEnabled) {
34
+ const p2pService = await createP2PService(config, clientType, archiver, proofVerifier, worldStateSynchronizer, epochCache, store, peerStore, mempools, deps.p2pServiceFactory, packageVersion, logger.createChild('libp2p_service'), telemetry);
35
+ const nodeSources = [
36
+ ...createNodeRpcTxSources(config.txCollectionNodeRpcUrls, config),
37
+ ...deps.txCollectionNodeSources ?? []
38
+ ];
39
+ if (nodeSources.length > 0) {
40
+ logger.info(`Using ${nodeSources.length} node RPC sources for tx collection.`, {
41
+ nodes: nodeSources.map((n)=>n.getInfo())
42
+ });
43
+ }
44
+ const txCollection = new TxCollection(p2pService, nodeSources, l1Constants, mempools.txPool, config, dateProvider, telemetry, logger.createChild('tx-collection'));
45
+ return new P2PClient(clientType, store, archiver, mempools, p2pService, txCollection, config, dateProvider, telemetry);
46
+ }
47
+ async function createP2PService(config, clientType, archiver, proofVerifier, worldStateSynchronizer, epochCache, store, peerStore, mempools, p2pServiceFactory, packageVersion, logger, telemetry) {
48
+ if (!config.p2pEnabled) {
31
49
  logger.verbose('P2P is disabled. Using dummy P2P service.');
32
- return new P2PClient(clientType, store, archiver, mempools, new DummyP2PService(), config, telemetry);
50
+ return new DummyP2PService();
33
51
  }
34
52
  logger.verbose('P2P is enabled. Using LibP2P service.');
35
- config = await configureP2PClientAddresses(_config);
36
53
  // Create peer discovery service
37
54
  const peerIdPrivateKey = await getPeerIdPrivateKey(config, store, logger);
38
55
  const peerId = await createLibP2PPeerIdFromPrivateKey(peerIdPrivateKey.getValue());
39
- const p2pService = await (deps.p2pServiceFactory ?? LibP2PService.new)(clientType, config, peerId, {
56
+ const p2pService = await (p2pServiceFactory ?? LibP2PService.new)(clientType, config, peerId, {
40
57
  packageVersion,
41
58
  mempools,
42
59
  l2BlockSource: archiver,
@@ -45,7 +62,7 @@ export const createP2PClient = async (clientType, _config, archiver, proofVerifi
45
62
  worldStateSynchronizer,
46
63
  peerStore,
47
64
  telemetry,
48
- logger: createLogger(`${logger.module}:libp2p_service`)
65
+ logger: logger.createChild(`libp2p_service`)
49
66
  });
50
- return new P2PClient(clientType, store, archiver, mempools, p2pService, config, telemetry);
51
- };
67
+ return p2pService;
68
+ }
@@ -1,10 +1,12 @@
1
- import type { L2BlockId } from '@aztec/stdlib/block';
1
+ import type { EthAddress, L2BlockId } from '@aztec/stdlib/block';
2
2
  import type { P2PApiFull } from '@aztec/stdlib/interfaces/server';
3
3
  import type { BlockProposal, P2PClientType } from '@aztec/stdlib/p2p';
4
4
  import type { Tx, TxHash } from '@aztec/stdlib/tx';
5
5
  import type { ENR } from '@chainsafe/enr';
6
6
  import type { PeerId } from '@libp2p/interface';
7
7
  import type { P2PConfig } from '../config.js';
8
+ import type { AuthRequest, StatusMessage } from '../services/index.js';
9
+ import type { ReqRespSubProtocol, ReqRespSubProtocolHandler, ReqRespSubProtocolValidators } from '../services/reqresp/interface.js';
8
10
  import type { P2PBlockReceivedCallback } from '../services/service.js';
9
11
  /**
10
12
  * Enum defining the possible states of the p2p client.
@@ -51,12 +53,7 @@ export type P2P<T extends P2PClientType = P2PClientType.Full> = P2PApiFull<T> &
51
53
  * @param pinnedPeerId - An optional peer id that will be used to request the tx from (in addition to other random peers).
52
54
  * @returns A list of transactions or undefined if the transactions are not found.
53
55
  */
54
- requestTxsByHash(txHashes: TxHash[], pinnedPeerId: PeerId): Promise<(Tx | undefined)[]>;
55
- /**
56
- * Request a transaction from another peer by its tx hash.
57
- * @param txHash - Hash of the tx to query.
58
- */
59
- requestTxByHash(txHash: TxHash): Promise<Tx | undefined>;
56
+ requestTxsByHash(txHashes: TxHash[], pinnedPeerId: PeerId): Promise<Tx[]>;
60
57
  /**
61
58
  * Verifies the 'tx' and, if valid, adds it to local tx pool and forwards it to other peers.
62
59
  * @param tx - The transaction.
@@ -92,12 +89,6 @@ export type P2P<T extends P2PClientType = P2PClientType.Full> = P2PApiFull<T> &
92
89
  * @returns True or False for each hash
93
90
  */
94
91
  hasTxsInPool(txHashes: TxHash[]): Promise<boolean[]>;
95
- /**
96
- * Returns a transaction in the transaction pool by its hash, requesting it from the network if it is not found.
97
- * @param txHash - Hash of tx to return.
98
- * @returns A single tx or undefined.
99
- */
100
- getTxByHash(txHash: TxHash): Promise<Tx | undefined>;
101
92
  /**
102
93
  * Returns transactions in the transaction pool by hash, requesting from the network if not found.
103
94
  * @param txHashes - Hashes of tx to return.
@@ -156,5 +147,9 @@ export type P2P<T extends P2PClientType = P2PClientType.Full> = P2PApiFull<T> &
156
147
  validate(txs: Tx[]): Promise<void>;
157
148
  /** Clears the db. */
158
149
  clear(): Promise<void>;
150
+ addReqRespSubProtocol(subProtocol: ReqRespSubProtocol, handler: ReqRespSubProtocolHandler, validator?: ReqRespSubProtocolValidators[ReqRespSubProtocol]): Promise<void>;
151
+ handleAuthRequestFromPeer(authRequest: AuthRequest, peerId: PeerId): Promise<StatusMessage>;
152
+ /** If node running this P2P stack is validator, passes in validator address to P2P layer */
153
+ registerThisValidatorAddresses(address: EthAddress[]): void;
159
154
  };
160
155
  //# sourceMappingURL=interface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../src/client/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAA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C,CAAC;IAE3D,8BAA8B;IAC9B,QAAQ,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnC,qBAAqB;IACrB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB,qBAAqB,CACnB,WAAW,EAAE,kBAAkB,EAC/B,OAAO,EAAE,yBAAyB,EAClC,SAAS,CAAC,EAAE,4BAA4B,CAAC,kBAAkB,CAAC,GAC3D,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB,yBAAyB,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAE5F,4FAA4F;IAC5F,8BAA8B,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;CAC7D,CAAC"}
@@ -1,7 +1,8 @@
1
+ import { DateProvider } from '@aztec/foundation/timer';
1
2
  import type { AztecAsyncKVStore } from '@aztec/kv-store';
2
- import type { L2BlockSource, L2BlockStreamEvent, L2Tips } from '@aztec/stdlib/block';
3
+ import type { EthAddress, L2BlockSource, L2BlockStreamEvent, L2Tips } from '@aztec/stdlib/block';
3
4
  import type { ContractDataSource } from '@aztec/stdlib/contract';
4
- import type { PeerInfo } from '@aztec/stdlib/interfaces/server';
5
+ import { type PeerInfo } from '@aztec/stdlib/interfaces/server';
5
6
  import { BlockAttestation, type BlockProposal, type P2PClientType } from '@aztec/stdlib/p2p';
6
7
  import type { Tx, TxHash } from '@aztec/stdlib/tx';
7
8
  import { type TelemetryClient, WithTracer } from '@aztec/telemetry-client';
@@ -9,7 +10,11 @@ import type { ENR } from '@chainsafe/enr';
9
10
  import type { PeerId } from '@libp2p/interface';
10
11
  import { type P2PConfig } from '../config.js';
11
12
  import type { MemPools } from '../mem_pools/interface.js';
13
+ import type { AuthRequest, StatusMessage } from '../services/index.js';
14
+ import { ReqRespSubProtocol, type ReqRespSubProtocolHandler, type ReqRespSubProtocolValidators } from '../services/reqresp/interface.js';
12
15
  import type { P2PBlockReceivedCallback, P2PService } from '../services/service.js';
16
+ import { TxCollection } from '../services/tx_collection/tx_collection.js';
17
+ import { TxProvider } from '../services/tx_provider.js';
13
18
  import { type P2P, type P2PSyncState } from './interface.js';
14
19
  /**
15
20
  * The P2P client implementation.
@@ -19,6 +24,8 @@ export declare class P2PClient<T extends P2PClientType = P2PClientType.Full> ext
19
24
  private store;
20
25
  private l2BlockSource;
21
26
  private p2pService;
27
+ private txCollection;
28
+ private _dateProvider;
22
29
  private telemetry;
23
30
  private log;
24
31
  /** The JS promise that will be running to keep the client's data in sync. Can be interrupted if the client is stopped. */
@@ -38,6 +45,8 @@ export declare class P2PClient<T extends P2PClientType = P2PClientType.Full> ext
38
45
  private attestationPool;
39
46
  private config;
40
47
  private blockStream;
48
+ private txProvider;
49
+ private validatorAddresses;
41
50
  /**
42
51
  * In-memory P2P client constructor.
43
52
  * @param store - The client's instance of the KV store.
@@ -46,9 +55,11 @@ export declare class P2PClient<T extends P2PClientType = P2PClientType.Full> ext
46
55
  * @param p2pService - The concrete instance of p2p networking to use.
47
56
  * @param log - A logger.
48
57
  */
49
- constructor(_clientType: T, store: AztecAsyncKVStore, l2BlockSource: L2BlockSource & ContractDataSource, mempools: MemPools<T>, p2pService: P2PService, config?: Partial<P2PConfig>, telemetry?: TelemetryClient, log?: import("@aztec/foundation/log").Logger);
58
+ constructor(_clientType: T, store: AztecAsyncKVStore, l2BlockSource: L2BlockSource & ContractDataSource, mempools: MemPools<T>, p2pService: P2PService, txCollection: TxCollection, config?: Partial<P2PConfig>, _dateProvider?: DateProvider, telemetry?: TelemetryClient, log?: import("@aztec/foundation/log").Logger);
59
+ registerThisValidatorAddresses(addresses: EthAddress[]): void;
50
60
  clear(): Promise<void>;
51
61
  isP2PClient(): true;
62
+ getTxProvider(): TxProvider;
52
63
  getPeers(includePending?: boolean): Promise<PeerInfo[]>;
53
64
  getL2BlockHash(number: number): Promise<string | undefined>;
54
65
  updateP2PConfig(config: Partial<P2PConfig>): Promise<void>;
@@ -60,6 +71,7 @@ export declare class P2PClient<T extends P2PClientType = P2PClientType.Full> ext
60
71
  * @returns An empty promise signalling the synching process.
61
72
  */
62
73
  start(): Promise<void>;
74
+ addReqRespSubProtocol(subProtocol: ReqRespSubProtocol, handler: ReqRespSubProtocolHandler, validator: ReqRespSubProtocolValidators[ReqRespSubProtocol]): Promise<void>;
63
75
  private initBlockStream;
64
76
  /**
65
77
  * Allows consumers to stop the instance of the P2P client.
@@ -72,20 +84,10 @@ export declare class P2PClient<T extends P2PClientType = P2PClientType.Full> ext
72
84
  getAttestationsForSlot(slot: bigint, proposalId?: string): Promise<BlockAttestation[]>;
73
85
  addAttestations(attestations: BlockAttestation[]): Promise<void>;
74
86
  registerBlockProposalHandler(handler: P2PBlockReceivedCallback): void;
75
- /**
76
- * Uses the Request Response protocol to request a transaction from the network.
77
- *
78
- * If the underlying request response protocol fails, then we return undefined.
79
- * If it succeeds then we add the transaction to our transaction pool and return.
80
- *
81
- * @param txHash - The hash of the transaction to request.
82
- * @returns A promise that resolves to a transaction or undefined.
83
- */
84
- requestTxByHash(txHash: TxHash): Promise<Tx | undefined>;
85
87
  /**
86
88
  * Uses the batched Request Response protocol to request a set of transactions from the network.
87
89
  */
88
- requestTxsByHash(txHashes: TxHash[], pinnedPeerId: PeerId | undefined): Promise<(Tx | undefined)[]>;
90
+ requestTxsByHash(txHashes: TxHash[], pinnedPeerId: PeerId | undefined): Promise<Tx[]>;
89
91
  getPendingTxs(limit?: number, after?: TxHash): Promise<Tx[]>;
90
92
  getPendingTxCount(): Promise<number>;
91
93
  iteratePendingTxs(): AsyncIterableIterator<Tx>;
@@ -110,13 +112,6 @@ export declare class P2PClient<T extends P2PClientType = P2PClientType.Full> ext
110
112
  */
111
113
  getTxsByHashFromPool(txHashes: TxHash[]): Promise<(Tx | undefined)[]>;
112
114
  hasTxsInPool(txHashes: TxHash[]): Promise<boolean[]>;
113
- /**
114
- * Returns a transaction in the transaction pool by its hash.
115
- * If the transaction is not in the pool, it will be requested from the network.
116
- * @param txHash - Hash of the transaction to look for in the pool.
117
- * @returns A single tx or undefined.
118
- */
119
- getTxByHash(txHash: TxHash): Promise<Tx | undefined>;
120
115
  /**
121
116
  * Returns transactions in the transaction pool by hash.
122
117
  * If a transaction is not in the pool, it will be requested from the network.
@@ -198,7 +193,7 @@ export declare class P2PClient<T extends P2PClientType = P2PClientType.Full> ext
198
193
  */
199
194
  private handleLatestL2Blocks;
200
195
  /** Request txs for unproven blocks so the prover node has more chances to get them. */
201
- private requestMissingTxsFromUnprovenBlocks;
196
+ private startCollectingMissingTxs;
202
197
  /**
203
198
  * Handles new finalized blocks by deleting the txs and attestations in them.
204
199
  * @param blocks - A list of finalized L2 blocks.
@@ -222,5 +217,6 @@ export declare class P2PClient<T extends P2PClientType = P2PClientType.Full> ext
222
217
  * @param txHashes - Hashes of the transactions to mark as non-evictable.
223
218
  */
224
219
  markTxsAsNonEvictable(txHashes: TxHash[]): Promise<void>;
220
+ handleAuthRequestFromPeer(authRequest: AuthRequest, peerId: PeerId): Promise<StatusMessage>;
225
221
  }
226
222
  //# sourceMappingURL=p2p_client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"p2p_client.d.ts","sourceRoot":"","sources":["../../src/client/p2p_client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAsC,MAAM,iBAAiB,CAAC;AAC7F,OAAO,KAAK,EAGV,aAAa,EAEb,kBAAkB,EAClB,MAAM,EAEP,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC7F,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,k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