@lodestar/beacon-node 1.51.0-dev.1b1888604e → 1.51.0-dev.1b22218e60

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 (642) hide show
  1. package/lib/api/impl/api.js +1 -1
  2. package/lib/api/impl/api.js.map +1 -1
  3. package/lib/api/impl/beacon/blocks/index.d.ts +2 -1
  4. package/lib/api/impl/beacon/blocks/index.d.ts.map +1 -1
  5. package/lib/api/impl/beacon/blocks/index.js +48 -95
  6. package/lib/api/impl/beacon/blocks/index.js.map +1 -1
  7. package/lib/api/impl/beacon/index.d.ts +2 -1
  8. package/lib/api/impl/beacon/index.d.ts.map +1 -1
  9. package/lib/api/impl/beacon/index.js +2 -2
  10. package/lib/api/impl/beacon/index.js.map +1 -1
  11. package/lib/api/impl/beacon/pool/index.d.ts.map +1 -1
  12. package/lib/api/impl/beacon/pool/index.js +22 -2
  13. package/lib/api/impl/beacon/pool/index.js.map +1 -1
  14. package/lib/api/impl/beacon/state/index.d.ts.map +1 -1
  15. package/lib/api/impl/beacon/state/index.js +8 -2
  16. package/lib/api/impl/beacon/state/index.js.map +1 -1
  17. package/lib/api/impl/beacon/state/utils.d.ts +3 -2
  18. package/lib/api/impl/beacon/state/utils.d.ts.map +1 -1
  19. package/lib/api/impl/beacon/state/utils.js +17 -9
  20. package/lib/api/impl/beacon/state/utils.js.map +1 -1
  21. package/lib/api/impl/debug/index.d.ts.map +1 -1
  22. package/lib/api/impl/debug/index.js +3 -0
  23. package/lib/api/impl/debug/index.js.map +1 -1
  24. package/lib/api/impl/validator/index.d.ts +6 -0
  25. package/lib/api/impl/validator/index.d.ts.map +1 -1
  26. package/lib/api/impl/validator/index.js +142 -34
  27. package/lib/api/impl/validator/index.js.map +1 -1
  28. package/lib/api/options.d.ts +2 -0
  29. package/lib/api/options.d.ts.map +1 -1
  30. package/lib/api/options.js +1 -0
  31. package/lib/api/options.js.map +1 -1
  32. package/lib/chain/GetBlobsTracker.d.ts +13 -2
  33. package/lib/chain/GetBlobsTracker.d.ts.map +1 -1
  34. package/lib/chain/GetBlobsTracker.js +69 -35
  35. package/lib/chain/GetBlobsTracker.js.map +1 -1
  36. package/lib/chain/archiveStore/archiveStore.d.ts.map +1 -1
  37. package/lib/chain/archiveStore/archiveStore.js +1 -0
  38. package/lib/chain/archiveStore/archiveStore.js.map +1 -1
  39. package/lib/chain/archiveStore/utils/archiveBlocks.d.ts +4 -0
  40. package/lib/chain/archiveStore/utils/archiveBlocks.d.ts.map +1 -1
  41. package/lib/chain/archiveStore/utils/archiveBlocks.js +61 -97
  42. package/lib/chain/archiveStore/utils/archiveBlocks.js.map +1 -1
  43. package/lib/chain/blocks/blockInput/blockInput.d.ts +11 -56
  44. package/lib/chain/blocks/blockInput/blockInput.d.ts.map +1 -1
  45. package/lib/chain/blocks/blockInput/blockInput.js +5 -241
  46. package/lib/chain/blocks/blockInput/blockInput.js.map +1 -1
  47. package/lib/chain/blocks/blockInput/errors.d.ts +2 -4
  48. package/lib/chain/blocks/blockInput/errors.d.ts.map +1 -1
  49. package/lib/chain/blocks/blockInput/errors.js.map +1 -1
  50. package/lib/chain/blocks/blockInput/types.d.ts +2 -18
  51. package/lib/chain/blocks/blockInput/types.d.ts.map +1 -1
  52. package/lib/chain/blocks/blockInput/types.js +0 -1
  53. package/lib/chain/blocks/blockInput/types.js.map +1 -1
  54. package/lib/chain/blocks/importBlock.d.ts.map +1 -1
  55. package/lib/chain/blocks/importBlock.js +42 -57
  56. package/lib/chain/blocks/importBlock.js.map +1 -1
  57. package/lib/chain/blocks/importExecutionPayload.d.ts +10 -11
  58. package/lib/chain/blocks/importExecutionPayload.d.ts.map +1 -1
  59. package/lib/chain/blocks/importExecutionPayload.js +82 -20
  60. package/lib/chain/blocks/importExecutionPayload.js.map +1 -1
  61. package/lib/chain/blocks/index.d.ts.map +1 -1
  62. package/lib/chain/blocks/index.js +4 -4
  63. package/lib/chain/blocks/index.js.map +1 -1
  64. package/lib/chain/blocks/payloadEnvelopeProcessor.d.ts +12 -9
  65. package/lib/chain/blocks/payloadEnvelopeProcessor.d.ts.map +1 -1
  66. package/lib/chain/blocks/payloadEnvelopeProcessor.js +24 -19
  67. package/lib/chain/blocks/payloadEnvelopeProcessor.js.map +1 -1
  68. package/lib/chain/blocks/types.d.ts +7 -19
  69. package/lib/chain/blocks/types.d.ts.map +1 -1
  70. package/lib/chain/blocks/types.js +5 -24
  71. package/lib/chain/blocks/types.js.map +1 -1
  72. package/lib/chain/blocks/verifyBlock.d.ts.map +1 -1
  73. package/lib/chain/blocks/verifyBlock.js +18 -7
  74. package/lib/chain/blocks/verifyBlock.js.map +1 -1
  75. package/lib/chain/blocks/verifyBlocksDataAvailability.d.ts.map +1 -1
  76. package/lib/chain/blocks/verifyBlocksDataAvailability.js +14 -2
  77. package/lib/chain/blocks/verifyBlocksDataAvailability.js.map +1 -1
  78. package/lib/chain/blocks/verifyBlocksExecutionPayloads.d.ts +1 -1
  79. package/lib/chain/blocks/verifyBlocksExecutionPayloads.d.ts.map +1 -1
  80. package/lib/chain/blocks/verifyBlocksExecutionPayloads.js +7 -3
  81. package/lib/chain/blocks/verifyBlocksExecutionPayloads.js.map +1 -1
  82. package/lib/chain/blocks/verifyBlocksSanityChecks.d.ts.map +1 -1
  83. package/lib/chain/blocks/verifyBlocksSanityChecks.js +4 -0
  84. package/lib/chain/blocks/verifyBlocksSanityChecks.js.map +1 -1
  85. package/lib/chain/blocks/verifyBlocksSignatures.d.ts.map +1 -1
  86. package/lib/chain/blocks/verifyBlocksSignatures.js +10 -5
  87. package/lib/chain/blocks/verifyBlocksSignatures.js.map +1 -1
  88. package/lib/chain/blocks/verifyPayloadsDataAvailability.d.ts +3 -3
  89. package/lib/chain/blocks/verifyPayloadsDataAvailability.d.ts.map +1 -1
  90. package/lib/chain/blocks/verifyPayloadsDataAvailability.js +11 -6
  91. package/lib/chain/blocks/verifyPayloadsDataAvailability.js.map +1 -1
  92. package/lib/chain/blocks/writeBlockInputToDb.d.ts +0 -2
  93. package/lib/chain/blocks/writeBlockInputToDb.d.ts.map +1 -1
  94. package/lib/chain/blocks/writeBlockInputToDb.js +6 -24
  95. package/lib/chain/blocks/writeBlockInputToDb.js.map +1 -1
  96. package/lib/chain/bls/interface.d.ts +2 -0
  97. package/lib/chain/bls/interface.d.ts.map +1 -1
  98. package/lib/chain/bls/multithread/index.d.ts +1 -1
  99. package/lib/chain/bls/multithread/index.d.ts.map +1 -1
  100. package/lib/chain/bls/multithread/index.js +50 -22
  101. package/lib/chain/bls/multithread/index.js.map +1 -1
  102. package/lib/chain/bls/multithread/types.d.ts +1 -1
  103. package/lib/chain/bls/multithread/types.d.ts.map +1 -1
  104. package/lib/chain/bls/multithread/worker.js +1 -1
  105. package/lib/chain/bls/multithread/worker.js.map +1 -1
  106. package/lib/chain/bls/singleThread.js +1 -1
  107. package/lib/chain/bls/singleThread.js.map +1 -1
  108. package/lib/chain/bls/utils.js +1 -1
  109. package/lib/chain/bls/utils.js.map +1 -1
  110. package/lib/chain/chain.d.ts +26 -4
  111. package/lib/chain/chain.d.ts.map +1 -1
  112. package/lib/chain/chain.js +127 -43
  113. package/lib/chain/chain.js.map +1 -1
  114. package/lib/chain/emitter.d.ts +7 -7
  115. package/lib/chain/emitter.d.ts.map +1 -1
  116. package/lib/chain/emitter.js +5 -5
  117. package/lib/chain/emitter.js.map +1 -1
  118. package/lib/chain/errors/blockError.d.ts +1 -1
  119. package/lib/chain/errors/blockError.d.ts.map +1 -1
  120. package/lib/chain/errors/blockError.js +1 -1
  121. package/lib/chain/errors/blockError.js.map +1 -1
  122. package/lib/chain/errors/executionPayloadBid.d.ts +11 -1
  123. package/lib/chain/errors/executionPayloadBid.d.ts.map +1 -1
  124. package/lib/chain/errors/executionPayloadBid.js +2 -0
  125. package/lib/chain/errors/executionPayloadBid.js.map +1 -1
  126. package/lib/chain/errors/executionPayloadEnvelope.d.ts +7 -0
  127. package/lib/chain/errors/executionPayloadEnvelope.d.ts.map +1 -1
  128. package/lib/chain/errors/executionPayloadEnvelope.js +1 -0
  129. package/lib/chain/errors/executionPayloadEnvelope.js.map +1 -1
  130. package/lib/chain/errors/inclusionList.d.ts +60 -0
  131. package/lib/chain/errors/inclusionList.d.ts.map +1 -0
  132. package/lib/chain/errors/inclusionList.js +19 -0
  133. package/lib/chain/errors/inclusionList.js.map +1 -0
  134. package/lib/chain/errors/index.d.ts +1 -1
  135. package/lib/chain/errors/index.d.ts.map +1 -1
  136. package/lib/chain/errors/index.js +1 -1
  137. package/lib/chain/errors/index.js.map +1 -1
  138. package/lib/chain/forkChoice/index.d.ts +11 -1
  139. package/lib/chain/forkChoice/index.d.ts.map +1 -1
  140. package/lib/chain/forkChoice/index.js +11 -0
  141. package/lib/chain/forkChoice/index.js.map +1 -1
  142. package/lib/chain/forkChoiceExecutionEngine.d.ts +51 -0
  143. package/lib/chain/forkChoiceExecutionEngine.d.ts.map +1 -0
  144. package/lib/chain/forkChoiceExecutionEngine.js +117 -0
  145. package/lib/chain/forkChoiceExecutionEngine.js.map +1 -0
  146. package/lib/chain/interface.d.ts +10 -7
  147. package/lib/chain/interface.d.ts.map +1 -1
  148. package/lib/chain/interface.js.map +1 -1
  149. package/lib/chain/opPools/aggregatedAttestationPool.d.ts +17 -4
  150. package/lib/chain/opPools/aggregatedAttestationPool.d.ts.map +1 -1
  151. package/lib/chain/opPools/aggregatedAttestationPool.js +199 -46
  152. package/lib/chain/opPools/aggregatedAttestationPool.js.map +1 -1
  153. package/lib/chain/opPools/attestationPool.d.ts +1 -1
  154. package/lib/chain/opPools/attestationPool.d.ts.map +1 -1
  155. package/lib/chain/opPools/attestationPool.js +15 -4
  156. package/lib/chain/opPools/attestationPool.js.map +1 -1
  157. package/lib/chain/opPools/inclusionListStore.d.ts +63 -0
  158. package/lib/chain/opPools/inclusionListStore.d.ts.map +1 -0
  159. package/lib/chain/opPools/inclusionListStore.js +171 -0
  160. package/lib/chain/opPools/inclusionListStore.js.map +1 -0
  161. package/lib/chain/opPools/index.d.ts +2 -0
  162. package/lib/chain/opPools/index.d.ts.map +1 -1
  163. package/lib/chain/opPools/index.js +2 -0
  164. package/lib/chain/opPools/index.js.map +1 -1
  165. package/lib/chain/opPools/payloadAttestationPool.d.ts.map +1 -1
  166. package/lib/chain/opPools/payloadAttestationPool.js +17 -7
  167. package/lib/chain/opPools/payloadAttestationPool.js.map +1 -1
  168. package/lib/chain/opPools/singleAttestationPool.d.ts +77 -0
  169. package/lib/chain/opPools/singleAttestationPool.d.ts.map +1 -0
  170. package/lib/chain/opPools/singleAttestationPool.js +209 -0
  171. package/lib/chain/opPools/singleAttestationPool.js.map +1 -0
  172. package/lib/chain/opPools/syncCommitteeMessagePool.d.ts.map +1 -1
  173. package/lib/chain/opPools/syncCommitteeMessagePool.js +9 -3
  174. package/lib/chain/opPools/syncCommitteeMessagePool.js.map +1 -1
  175. package/lib/chain/opPools/syncContributionAndProofPool.d.ts.map +1 -1
  176. package/lib/chain/opPools/syncContributionAndProofPool.js +11 -3
  177. package/lib/chain/opPools/syncContributionAndProofPool.js.map +1 -1
  178. package/lib/chain/opPools/utils.d.ts +1 -1
  179. package/lib/chain/opPools/utils.d.ts.map +1 -1
  180. package/lib/chain/opPools/utils.js +1 -1
  181. package/lib/chain/opPools/utils.js.map +1 -1
  182. package/lib/chain/options.d.ts +5 -3
  183. package/lib/chain/options.d.ts.map +1 -1
  184. package/lib/chain/options.js +0 -1
  185. package/lib/chain/options.js.map +1 -1
  186. package/lib/chain/produceBlock/produceBlockBody.d.ts +6 -3
  187. package/lib/chain/produceBlock/produceBlockBody.d.ts.map +1 -1
  188. package/lib/chain/produceBlock/produceBlockBody.js +32 -11
  189. package/lib/chain/produceBlock/produceBlockBody.js.map +1 -1
  190. package/lib/chain/proposerTracker.d.ts +31 -0
  191. package/lib/chain/proposerTracker.d.ts.map +1 -0
  192. package/lib/chain/proposerTracker.js +75 -0
  193. package/lib/chain/proposerTracker.js.map +1 -0
  194. package/lib/chain/regen/interface.d.ts +2 -2
  195. package/lib/chain/regen/interface.d.ts.map +1 -1
  196. package/lib/chain/regen/interface.js +1 -1
  197. package/lib/chain/regen/interface.js.map +1 -1
  198. package/lib/chain/regen/queued.d.ts +1 -1
  199. package/lib/chain/regen/queued.d.ts.map +1 -1
  200. package/lib/chain/regen/queued.js +5 -3
  201. package/lib/chain/regen/queued.js.map +1 -1
  202. package/lib/chain/seenCache/seenGossipBlockInput.d.ts +7 -14
  203. package/lib/chain/seenCache/seenGossipBlockInput.d.ts.map +1 -1
  204. package/lib/chain/seenCache/seenGossipBlockInput.js +6 -65
  205. package/lib/chain/seenCache/seenGossipBlockInput.js.map +1 -1
  206. package/lib/chain/validation/aggregateAndProof.js +1 -1
  207. package/lib/chain/validation/aggregateAndProof.js.map +1 -1
  208. package/lib/chain/validation/attestation.js +1 -1
  209. package/lib/chain/validation/attestation.js.map +1 -1
  210. package/lib/chain/validation/executionPayloadBid.d.ts +0 -15
  211. package/lib/chain/validation/executionPayloadBid.d.ts.map +1 -1
  212. package/lib/chain/validation/executionPayloadBid.js +37 -158
  213. package/lib/chain/validation/executionPayloadBid.js.map +1 -1
  214. package/lib/chain/validation/executionPayloadEnvelope.d.ts +6 -0
  215. package/lib/chain/validation/executionPayloadEnvelope.d.ts.map +1 -1
  216. package/lib/chain/validation/executionPayloadEnvelope.js +53 -0
  217. package/lib/chain/validation/executionPayloadEnvelope.js.map +1 -1
  218. package/lib/chain/validation/inclusionList.d.ts +14 -0
  219. package/lib/chain/validation/inclusionList.d.ts.map +1 -0
  220. package/lib/chain/validation/inclusionList.js +150 -0
  221. package/lib/chain/validation/inclusionList.js.map +1 -0
  222. package/lib/chain/validation/index.d.ts +1 -0
  223. package/lib/chain/validation/index.d.ts.map +1 -1
  224. package/lib/chain/validation/index.js +1 -0
  225. package/lib/chain/validation/index.js.map +1 -1
  226. package/lib/chain/validation/syncCommittee.d.ts.map +1 -1
  227. package/lib/chain/validation/syncCommittee.js +16 -10
  228. package/lib/chain/validation/syncCommittee.js.map +1 -1
  229. package/lib/chain/validation/syncCommitteeContributionAndProof.d.ts.map +1 -1
  230. package/lib/chain/validation/syncCommitteeContributionAndProof.js +11 -0
  231. package/lib/chain/validation/syncCommitteeContributionAndProof.js.map +1 -1
  232. package/lib/chain/validatorMonitor.d.ts +1 -2
  233. package/lib/chain/validatorMonitor.d.ts.map +1 -1
  234. package/lib/chain/validatorMonitor.js +0 -3
  235. package/lib/chain/validatorMonitor.js.map +1 -1
  236. package/lib/db/beacon.d.ts +7 -0
  237. package/lib/db/beacon.d.ts.map +1 -1
  238. package/lib/db/beacon.js +34 -0
  239. package/lib/db/beacon.js.map +1 -1
  240. package/lib/db/dataColumnStore.d.ts +1 -1
  241. package/lib/db/dataColumnStore.d.ts.map +1 -1
  242. package/lib/db/dataColumnStore.js +1 -4
  243. package/lib/db/dataColumnStore.js.map +1 -1
  244. package/lib/db/flatFileStore/flatFileStore.js +5 -5
  245. package/lib/db/flatFileStore/flatFileStore.js.map +1 -1
  246. package/lib/db/flatFileStore/slotIndex.d.ts.map +1 -1
  247. package/lib/db/flatFileStore/slotIndex.js +2 -2
  248. package/lib/db/flatFileStore/slotIndex.js.map +1 -1
  249. package/lib/db/interface.d.ts +1 -0
  250. package/lib/db/interface.d.ts.map +1 -1
  251. package/lib/db/repositories/blobSidecars.d.ts +0 -1
  252. package/lib/db/repositories/blobSidecars.d.ts.map +1 -1
  253. package/lib/db/repositories/blobSidecars.js +0 -1
  254. package/lib/db/repositories/blobSidecars.js.map +1 -1
  255. package/lib/db/repositories/dataColumnSidecarArchive.d.ts +6 -0
  256. package/lib/db/repositories/dataColumnSidecarArchive.d.ts.map +1 -1
  257. package/lib/db/repositories/dataColumnSidecarArchive.js +19 -0
  258. package/lib/db/repositories/dataColumnSidecarArchive.js.map +1 -1
  259. package/lib/execution/builder/apiClient.d.ts +14 -8
  260. package/lib/execution/builder/apiClient.d.ts.map +1 -1
  261. package/lib/execution/builder/apiClient.js +12 -10
  262. package/lib/execution/builder/apiClient.js.map +1 -1
  263. package/lib/execution/builder/http.d.ts +2 -0
  264. package/lib/execution/builder/http.d.ts.map +1 -1
  265. package/lib/execution/builder/http.js +2 -0
  266. package/lib/execution/builder/http.js.map +1 -1
  267. package/lib/execution/builder/validateBid.d.ts.map +1 -1
  268. package/lib/execution/builder/validateBid.js +14 -1
  269. package/lib/execution/builder/validateBid.js.map +1 -1
  270. package/lib/execution/engine/blobVersionedHashes.d.ts +1 -1
  271. package/lib/execution/engine/blobVersionedHashes.d.ts.map +1 -1
  272. package/lib/execution/engine/blobVersionedHashes.js.map +1 -1
  273. package/lib/execution/engine/disabled.d.ts +1 -0
  274. package/lib/execution/engine/disabled.d.ts.map +1 -1
  275. package/lib/execution/engine/disabled.js +3 -0
  276. package/lib/execution/engine/disabled.js.map +1 -1
  277. package/lib/execution/engine/http.d.ts +12 -8
  278. package/lib/execution/engine/http.d.ts.map +1 -1
  279. package/lib/execution/engine/http.js +35 -14
  280. package/lib/execution/engine/http.js.map +1 -1
  281. package/lib/execution/engine/index.d.ts +1 -1
  282. package/lib/execution/engine/index.d.ts.map +1 -1
  283. package/lib/execution/engine/index.js +1 -1
  284. package/lib/execution/engine/index.js.map +1 -1
  285. package/lib/execution/engine/interface.d.ts +29 -8
  286. package/lib/execution/engine/interface.d.ts.map +1 -1
  287. package/lib/execution/engine/interface.js.map +1 -1
  288. package/lib/execution/engine/jsonRpcTransport.d.ts +5 -6
  289. package/lib/execution/engine/jsonRpcTransport.d.ts.map +1 -1
  290. package/lib/execution/engine/jsonRpcTransport.js +34 -20
  291. package/lib/execution/engine/jsonRpcTransport.js.map +1 -1
  292. package/lib/execution/engine/mock.d.ts +1 -1
  293. package/lib/execution/engine/mock.d.ts.map +1 -1
  294. package/lib/execution/engine/mock.js +31 -11
  295. package/lib/execution/engine/mock.js.map +1 -1
  296. package/lib/execution/engine/payloadIdCache.d.ts +5 -3
  297. package/lib/execution/engine/payloadIdCache.d.ts.map +1 -1
  298. package/lib/execution/engine/payloadIdCache.js +15 -4
  299. package/lib/execution/engine/payloadIdCache.js.map +1 -1
  300. package/lib/execution/engine/restTransport.d.ts +4 -5
  301. package/lib/execution/engine/restTransport.d.ts.map +1 -1
  302. package/lib/execution/engine/restTransport.js +4 -15
  303. package/lib/execution/engine/restTransport.js.map +1 -1
  304. package/lib/execution/engine/sszTypes.d.ts +38 -47
  305. package/lib/execution/engine/sszTypes.d.ts.map +1 -1
  306. package/lib/execution/engine/sszTypes.js +0 -5
  307. package/lib/execution/engine/sszTypes.js.map +1 -1
  308. package/lib/execution/engine/transport.d.ts +4 -14
  309. package/lib/execution/engine/transport.d.ts.map +1 -1
  310. package/lib/execution/engine/types.d.ts +25 -9
  311. package/lib/execution/engine/types.d.ts.map +1 -1
  312. package/lib/execution/engine/types.js +19 -14
  313. package/lib/execution/engine/types.js.map +1 -1
  314. package/lib/execution/engine/utils.d.ts.map +1 -1
  315. package/lib/execution/engine/utils.js +3 -2
  316. package/lib/execution/engine/utils.js.map +1 -1
  317. package/lib/index.d.ts +1 -0
  318. package/lib/index.d.ts.map +1 -1
  319. package/lib/index.js +2 -0
  320. package/lib/index.js.map +1 -1
  321. package/lib/metrics/metrics/beacon.d.ts +16 -9
  322. package/lib/metrics/metrics/beacon.d.ts.map +1 -1
  323. package/lib/metrics/metrics/beacon.js +35 -30
  324. package/lib/metrics/metrics/beacon.js.map +1 -1
  325. package/lib/metrics/metrics/lodestar.d.ts +42 -8
  326. package/lib/metrics/metrics/lodestar.d.ts.map +1 -1
  327. package/lib/metrics/metrics/lodestar.js +104 -18
  328. package/lib/metrics/metrics/lodestar.js.map +1 -1
  329. package/lib/metrics/server/http.js +5 -5
  330. package/lib/metrics/server/http.js.map +1 -1
  331. package/lib/monitoring/service.js +1 -1
  332. package/lib/monitoring/service.js.map +1 -1
  333. package/lib/network/core/networkCore.d.ts +4 -1
  334. package/lib/network/core/networkCore.d.ts.map +1 -1
  335. package/lib/network/core/networkCore.js +7 -0
  336. package/lib/network/core/networkCore.js.map +1 -1
  337. package/lib/network/core/networkCoreWorker.js +2 -0
  338. package/lib/network/core/networkCoreWorker.js.map +1 -1
  339. package/lib/network/core/networkCoreWorkerHandler.d.ts +4 -1
  340. package/lib/network/core/networkCoreWorkerHandler.d.ts.map +1 -1
  341. package/lib/network/core/networkCoreWorkerHandler.js +6 -0
  342. package/lib/network/core/networkCoreWorkerHandler.js.map +1 -1
  343. package/lib/network/core/types.d.ts +6 -1
  344. package/lib/network/core/types.d.ts.map +1 -1
  345. package/lib/network/gossip/gossipsub.d.ts +1 -0
  346. package/lib/network/gossip/gossipsub.d.ts.map +1 -1
  347. package/lib/network/gossip/gossipsub.js +10 -0
  348. package/lib/network/gossip/gossipsub.js.map +1 -1
  349. package/lib/network/gossip/interface.d.ts +8 -9
  350. package/lib/network/gossip/interface.d.ts.map +1 -1
  351. package/lib/network/gossip/interface.js +1 -1
  352. package/lib/network/gossip/interface.js.map +1 -1
  353. package/lib/network/gossip/topic.d.ts +13 -21
  354. package/lib/network/gossip/topic.d.ts.map +1 -1
  355. package/lib/network/gossip/topic.js +13 -24
  356. package/lib/network/gossip/topic.js.map +1 -1
  357. package/lib/network/interface.d.ts +5 -5
  358. package/lib/network/interface.d.ts.map +1 -1
  359. package/lib/network/libp2p/index.d.ts.map +1 -1
  360. package/lib/network/libp2p/index.js +5 -1
  361. package/lib/network/libp2p/index.js.map +1 -1
  362. package/lib/network/network.d.ts +9 -7
  363. package/lib/network/network.d.ts.map +1 -1
  364. package/lib/network/network.js +58 -35
  365. package/lib/network/network.js.map +1 -1
  366. package/lib/network/options.d.ts +2 -0
  367. package/lib/network/options.d.ts.map +1 -1
  368. package/lib/network/options.js +2 -0
  369. package/lib/network/options.js.map +1 -1
  370. package/lib/network/peers/peerManager.d.ts +2 -1
  371. package/lib/network/peers/peerManager.d.ts.map +1 -1
  372. package/lib/network/peers/peerManager.js +28 -1
  373. package/lib/network/peers/peerManager.js.map +1 -1
  374. package/lib/network/peers/utils/assertPeerRelevance.d.ts +9 -1
  375. package/lib/network/peers/utils/assertPeerRelevance.d.ts.map +1 -1
  376. package/lib/network/peers/utils/assertPeerRelevance.js +32 -21
  377. package/lib/network/peers/utils/assertPeerRelevance.js.map +1 -1
  378. package/lib/network/peers/utils/prioritizePeers.d.ts +4 -1
  379. package/lib/network/peers/utils/prioritizePeers.d.ts.map +1 -1
  380. package/lib/network/peers/utils/prioritizePeers.js +8 -16
  381. package/lib/network/peers/utils/prioritizePeers.js.map +1 -1
  382. package/lib/network/peers/utils/subnetMap.d.ts +5 -2
  383. package/lib/network/peers/utils/subnetMap.d.ts.map +1 -1
  384. package/lib/network/peers/utils/subnetMap.js +6 -3
  385. package/lib/network/peers/utils/subnetMap.js.map +1 -1
  386. package/lib/network/processor/extractSlotRootFns.d.ts.map +1 -1
  387. package/lib/network/processor/extractSlotRootFns.js +1 -8
  388. package/lib/network/processor/extractSlotRootFns.js.map +1 -1
  389. package/lib/network/processor/gossipHandlers.d.ts.map +1 -1
  390. package/lib/network/processor/gossipHandlers.js +118 -149
  391. package/lib/network/processor/gossipHandlers.js.map +1 -1
  392. package/lib/network/processor/gossipQueues/index.js +6 -6
  393. package/lib/network/processor/gossipQueues/index.js.map +1 -1
  394. package/lib/network/processor/gossipValidatorFn.js +5 -5
  395. package/lib/network/processor/gossipValidatorFn.js.map +1 -1
  396. package/lib/network/processor/index.d.ts +6 -0
  397. package/lib/network/processor/index.d.ts.map +1 -1
  398. package/lib/network/processor/index.js +56 -29
  399. package/lib/network/processor/index.js.map +1 -1
  400. package/lib/network/reqresp/ReqRespBeaconNode.js +6 -3
  401. package/lib/network/reqresp/ReqRespBeaconNode.js.map +1 -1
  402. package/lib/network/reqresp/handlers/beaconBlocksByRange.d.ts +2 -2
  403. package/lib/network/reqresp/handlers/beaconBlocksByRange.d.ts.map +1 -1
  404. package/lib/network/reqresp/handlers/inclusionListsByIndices.d.ts +10 -0
  405. package/lib/network/reqresp/handlers/inclusionListsByIndices.d.ts.map +1 -0
  406. package/lib/network/reqresp/handlers/inclusionListsByIndices.js +30 -0
  407. package/lib/network/reqresp/handlers/inclusionListsByIndices.js.map +1 -0
  408. package/lib/network/reqresp/handlers/index.d.ts.map +1 -1
  409. package/lib/network/reqresp/handlers/index.js +6 -12
  410. package/lib/network/reqresp/handlers/index.js.map +1 -1
  411. package/lib/network/reqresp/protocols.d.ts +1 -2
  412. package/lib/network/reqresp/protocols.d.ts.map +1 -1
  413. package/lib/network/reqresp/protocols.js +5 -10
  414. package/lib/network/reqresp/protocols.js.map +1 -1
  415. package/lib/network/reqresp/rateLimit.d.ts.map +1 -1
  416. package/lib/network/reqresp/rateLimit.js +5 -17
  417. package/lib/network/reqresp/rateLimit.js.map +1 -1
  418. package/lib/network/reqresp/types.d.ts +6 -9
  419. package/lib/network/reqresp/types.d.ts.map +1 -1
  420. package/lib/network/reqresp/types.js +4 -7
  421. package/lib/network/reqresp/types.js.map +1 -1
  422. package/lib/network/subnets/attnetsService.d.ts +35 -5
  423. package/lib/network/subnets/attnetsService.d.ts.map +1 -1
  424. package/lib/network/subnets/attnetsService.js +84 -6
  425. package/lib/network/subnets/attnetsService.js.map +1 -1
  426. package/lib/network/subnets/interface.d.ts +7 -0
  427. package/lib/network/subnets/interface.d.ts.map +1 -1
  428. package/lib/network/subnets/interface.js.map +1 -1
  429. package/lib/node/nodejs.d.ts +3 -1
  430. package/lib/node/nodejs.d.ts.map +1 -1
  431. package/lib/node/nodejs.js +47 -21
  432. package/lib/node/nodejs.js.map +1 -1
  433. package/lib/node/options.d.ts +3 -1
  434. package/lib/node/options.d.ts.map +1 -1
  435. package/lib/node/options.js +4 -2
  436. package/lib/node/options.js.map +1 -1
  437. package/lib/sync/interface.d.ts.map +1 -1
  438. package/lib/sync/interface.js.map +1 -1
  439. package/lib/sync/range/batch.d.ts +2 -3
  440. package/lib/sync/range/batch.d.ts.map +1 -1
  441. package/lib/sync/range/batch.js +9 -22
  442. package/lib/sync/range/batch.js.map +1 -1
  443. package/lib/sync/range/chain.d.ts.map +1 -1
  444. package/lib/sync/range/chain.js +2 -15
  445. package/lib/sync/range/chain.js.map +1 -1
  446. package/lib/sync/sync.d.ts +15 -0
  447. package/lib/sync/sync.d.ts.map +1 -1
  448. package/lib/sync/sync.js +103 -25
  449. package/lib/sync/sync.js.map +1 -1
  450. package/lib/sync/unknownBlock.d.ts.map +1 -1
  451. package/lib/sync/unknownBlock.js +43 -25
  452. package/lib/sync/unknownBlock.js.map +1 -1
  453. package/lib/sync/utils/downloadByRange.d.ts +6 -34
  454. package/lib/sync/utils/downloadByRange.d.ts.map +1 -1
  455. package/lib/sync/utils/downloadByRange.js +24 -128
  456. package/lib/sync/utils/downloadByRange.js.map +1 -1
  457. package/lib/sync/utils/downloadByRoot.d.ts +2 -18
  458. package/lib/sync/utils/downloadByRoot.d.ts.map +1 -1
  459. package/lib/sync/utils/downloadByRoot.js +14 -99
  460. package/lib/sync/utils/downloadByRoot.js.map +1 -1
  461. package/lib/util/blobs.d.ts +1 -7
  462. package/lib/util/blobs.d.ts.map +1 -1
  463. package/lib/util/blobs.js +0 -19
  464. package/lib/util/blobs.js.map +1 -1
  465. package/lib/util/execution.d.ts +3 -4
  466. package/lib/util/execution.d.ts.map +1 -1
  467. package/lib/util/execution.js +1 -73
  468. package/lib/util/execution.js.map +1 -1
  469. package/lib/util/file.d.ts.map +1 -1
  470. package/lib/util/file.js +8 -9
  471. package/lib/util/file.js.map +1 -1
  472. package/lib/util/queue/itemQueue.js +1 -1
  473. package/lib/util/queue/itemQueue.js.map +1 -1
  474. package/lib/util/sszBytes.d.ts +5 -1
  475. package/lib/util/sszBytes.d.ts.map +1 -1
  476. package/lib/util/sszBytes.js +36 -19
  477. package/lib/util/sszBytes.js.map +1 -1
  478. package/lib/util/types.d.ts +0 -5
  479. package/lib/util/types.d.ts.map +1 -1
  480. package/lib/util/types.js +1 -2
  481. package/lib/util/types.js.map +1 -1
  482. package/package.json +31 -32
  483. package/src/api/impl/api.ts +1 -1
  484. package/src/api/impl/beacon/blocks/index.ts +81 -126
  485. package/src/api/impl/beacon/index.ts +3 -1
  486. package/src/api/impl/beacon/pool/index.ts +31 -1
  487. package/src/api/impl/beacon/state/index.ts +10 -1
  488. package/src/api/impl/beacon/state/utils.ts +20 -10
  489. package/src/api/impl/debug/index.ts +4 -0
  490. package/src/api/impl/validator/index.ts +177 -38
  491. package/src/api/options.ts +3 -0
  492. package/src/chain/GetBlobsTracker.ts +82 -52
  493. package/src/chain/archiveStore/archiveStore.ts +1 -0
  494. package/src/chain/archiveStore/utils/archiveBlocks.ts +76 -130
  495. package/src/chain/blocks/blockInput/blockInput.ts +11 -343
  496. package/src/chain/blocks/blockInput/errors.ts +1 -2
  497. package/src/chain/blocks/blockInput/types.ts +2 -20
  498. package/src/chain/blocks/importBlock.ts +58 -77
  499. package/src/chain/blocks/importExecutionPayload.ts +123 -36
  500. package/src/chain/blocks/index.ts +11 -4
  501. package/src/chain/blocks/payloadEnvelopeProcessor.ts +35 -24
  502. package/src/chain/blocks/types.ts +8 -29
  503. package/src/chain/blocks/verifyBlock.ts +31 -16
  504. package/src/chain/blocks/verifyBlocksDataAvailability.ts +16 -2
  505. package/src/chain/blocks/verifyBlocksExecutionPayloads.ts +9 -6
  506. package/src/chain/blocks/verifyBlocksSanityChecks.ts +4 -1
  507. package/src/chain/blocks/verifyBlocksSignatures.ts +10 -5
  508. package/src/chain/blocks/verifyPayloadsDataAvailability.ts +14 -6
  509. package/src/chain/blocks/writeBlockInputToDb.ts +6 -29
  510. package/src/chain/bls/interface.ts +2 -0
  511. package/src/chain/bls/multithread/index.ts +48 -24
  512. package/src/chain/bls/multithread/types.ts +1 -1
  513. package/src/chain/bls/multithread/worker.ts +1 -5
  514. package/src/chain/bls/singleThread.ts +1 -1
  515. package/src/chain/bls/utils.ts +1 -1
  516. package/src/chain/chain.ts +144 -42
  517. package/src/chain/emitter.ts +8 -8
  518. package/src/chain/errors/blockError.ts +1 -1
  519. package/src/chain/errors/executionPayloadBid.ts +12 -0
  520. package/src/chain/errors/executionPayloadEnvelope.ts +8 -0
  521. package/src/chain/errors/inclusionList.ts +38 -0
  522. package/src/chain/errors/index.ts +1 -1
  523. package/src/chain/forkChoice/index.ts +11 -0
  524. package/src/chain/forkChoiceExecutionEngine.ts +183 -0
  525. package/src/chain/interface.ts +11 -6
  526. package/src/chain/opPools/aggregatedAttestationPool.ts +246 -43
  527. package/src/chain/opPools/attestationPool.ts +16 -4
  528. package/src/chain/opPools/inclusionListStore.ts +208 -0
  529. package/src/chain/opPools/index.ts +2 -0
  530. package/src/chain/opPools/payloadAttestationPool.ts +18 -7
  531. package/src/chain/opPools/singleAttestationPool.ts +287 -0
  532. package/src/chain/opPools/syncCommitteeMessagePool.ts +10 -3
  533. package/src/chain/opPools/syncContributionAndProofPool.ts +13 -3
  534. package/src/chain/opPools/utils.ts +1 -1
  535. package/src/chain/options.ts +5 -4
  536. package/src/chain/produceBlock/produceBlockBody.ts +67 -22
  537. package/src/chain/proposerTracker.ts +94 -0
  538. package/src/chain/regen/interface.ts +2 -2
  539. package/src/chain/regen/queued.ts +6 -4
  540. package/src/chain/seenCache/seenGossipBlockInput.ts +9 -93
  541. package/src/chain/validation/aggregateAndProof.ts +1 -1
  542. package/src/chain/validation/attestation.ts +1 -1
  543. package/src/chain/validation/executionPayloadBid.ts +54 -183
  544. package/src/chain/validation/executionPayloadEnvelope.ts +68 -1
  545. package/src/chain/validation/inclusionList.ts +192 -0
  546. package/src/chain/validation/index.ts +1 -0
  547. package/src/chain/validation/syncCommittee.ts +31 -15
  548. package/src/chain/validation/syncCommitteeContributionAndProof.ts +13 -0
  549. package/src/chain/validatorMonitor.ts +0 -6
  550. package/src/db/beacon.ts +44 -0
  551. package/src/db/dataColumnStore.ts +2 -4
  552. package/src/db/flatFileStore/flatFileStore.ts +7 -7
  553. package/src/db/flatFileStore/slotIndex.ts +4 -3
  554. package/src/db/interface.ts +2 -0
  555. package/src/db/repositories/blobSidecars.ts +0 -1
  556. package/src/db/repositories/dataColumnSidecarArchive.ts +20 -0
  557. package/src/execution/builder/apiClient.ts +16 -13
  558. package/src/execution/builder/http.ts +4 -0
  559. package/src/execution/builder/validateBid.ts +23 -2
  560. package/src/execution/engine/blobVersionedHashes.ts +1 -1
  561. package/src/execution/engine/disabled.ts +4 -0
  562. package/src/execution/engine/http.ts +59 -47
  563. package/src/execution/engine/index.ts +1 -1
  564. package/src/execution/engine/interface.ts +46 -13
  565. package/src/execution/engine/jsonRpcTransport.ts +56 -31
  566. package/src/execution/engine/mock.ts +32 -14
  567. package/src/execution/engine/payloadIdCache.ts +24 -6
  568. package/src/execution/engine/restTransport.ts +18 -23
  569. package/src/execution/engine/sszTypes.ts +0 -9
  570. package/src/execution/engine/transport.ts +13 -17
  571. package/src/execution/engine/types.ts +44 -24
  572. package/src/execution/engine/utils.ts +4 -2
  573. package/src/index.ts +2 -0
  574. package/src/metrics/metrics/beacon.ts +37 -30
  575. package/src/metrics/metrics/lodestar.ts +106 -18
  576. package/src/metrics/server/http.ts +5 -5
  577. package/src/monitoring/service.ts +1 -1
  578. package/src/network/core/networkCore.ts +11 -1
  579. package/src/network/core/networkCoreWorker.ts +2 -0
  580. package/src/network/core/networkCoreWorkerHandler.ts +8 -1
  581. package/src/network/core/types.ts +6 -1
  582. package/src/network/gossip/gossipsub.ts +11 -0
  583. package/src/network/gossip/interface.ts +5 -5
  584. package/src/network/gossip/topic.ts +14 -25
  585. package/src/network/interface.ts +4 -5
  586. package/src/network/libp2p/index.ts +5 -1
  587. package/src/network/network.ts +66 -58
  588. package/src/network/options.ts +4 -0
  589. package/src/network/peers/peerManager.ts +28 -3
  590. package/src/network/peers/utils/assertPeerRelevance.ts +39 -23
  591. package/src/network/peers/utils/prioritizePeers.ts +14 -22
  592. package/src/network/peers/utils/subnetMap.ts +6 -3
  593. package/src/network/processor/extractSlotRootFns.ts +0 -9
  594. package/src/network/processor/gossipHandlers.ts +150 -183
  595. package/src/network/processor/gossipQueues/index.ts +6 -6
  596. package/src/network/processor/gossipValidatorFn.ts +5 -5
  597. package/src/network/processor/index.ts +48 -27
  598. package/src/network/processor/types.ts +1 -1
  599. package/src/network/reqresp/ReqRespBeaconNode.ts +7 -7
  600. package/src/network/reqresp/handlers/beaconBlocksByRange.ts +2 -2
  601. package/src/network/reqresp/handlers/inclusionListsByIndices.ts +44 -0
  602. package/src/network/reqresp/handlers/index.ts +5 -17
  603. package/src/network/reqresp/protocols.ts +6 -12
  604. package/src/network/reqresp/rateLimit.ts +5 -17
  605. package/src/network/reqresp/types.ts +6 -13
  606. package/src/network/subnets/attnetsService.ts +94 -6
  607. package/src/network/subnets/interface.ts +7 -0
  608. package/src/node/nodejs.ts +58 -22
  609. package/src/node/options.ts +9 -6
  610. package/src/sync/interface.ts +1 -0
  611. package/src/sync/range/batch.ts +9 -21
  612. package/src/sync/range/chain.ts +2 -14
  613. package/src/sync/sync.ts +108 -26
  614. package/src/sync/unknownBlock.ts +48 -36
  615. package/src/sync/utils/downloadByRange.ts +31 -230
  616. package/src/sync/utils/downloadByRoot.ts +15 -142
  617. package/src/util/blobs.ts +0 -34
  618. package/src/util/execution.ts +8 -102
  619. package/src/util/file.ts +8 -9
  620. package/src/util/queue/itemQueue.ts +1 -1
  621. package/src/util/sszBytes.ts +42 -24
  622. package/src/util/types.ts +1 -8
  623. package/lib/chain/errors/blobSidecarError.d.ts +0 -108
  624. package/lib/chain/errors/blobSidecarError.d.ts.map +0 -1
  625. package/lib/chain/errors/blobSidecarError.js +0 -38
  626. package/lib/chain/errors/blobSidecarError.js.map +0 -1
  627. package/lib/chain/validation/blobSidecar.d.ts +0 -16
  628. package/lib/chain/validation/blobSidecar.d.ts.map +0 -1
  629. package/lib/chain/validation/blobSidecar.js +0 -276
  630. package/lib/chain/validation/blobSidecar.js.map +0 -1
  631. package/lib/network/reqresp/handlers/blobSidecarsByRange.d.ts +0 -9
  632. package/lib/network/reqresp/handlers/blobSidecarsByRange.d.ts.map +0 -1
  633. package/lib/network/reqresp/handlers/blobSidecarsByRange.js +0 -91
  634. package/lib/network/reqresp/handlers/blobSidecarsByRange.js.map +0 -1
  635. package/lib/network/reqresp/handlers/blobSidecarsByRoot.d.ts +0 -5
  636. package/lib/network/reqresp/handlers/blobSidecarsByRoot.d.ts.map +0 -1
  637. package/lib/network/reqresp/handlers/blobSidecarsByRoot.js +0 -46
  638. package/lib/network/reqresp/handlers/blobSidecarsByRoot.js.map +0 -1
  639. package/src/chain/errors/blobSidecarError.ts +0 -70
  640. package/src/chain/validation/blobSidecar.ts +0 -357
  641. package/src/network/reqresp/handlers/blobSidecarsByRange.ts +0 -133
  642. package/src/network/reqresp/handlers/blobSidecarsByRoot.ts +0 -69
@@ -1,4 +1,4 @@
1
- import {Type} from "@chainsafe/ssz";
1
+ import {SerializedList, Type} from "@chainsafe/ssz";
2
2
  import {
3
3
  BUILDER_DEPOSIT_REQUEST_TYPE,
4
4
  BUILDER_EXIT_REQUEST_TYPE,
@@ -9,6 +9,7 @@ import {
9
9
  DEPOSIT_REQUEST_TYPE,
10
10
  FIELD_ELEMENTS_PER_BLOB,
11
11
  ForkName,
12
+ ForkPostElectra,
12
13
  ForkSeq,
13
14
  WITHDRAWAL_REQUEST_TYPE,
14
15
  } from "@lodestar/params";
@@ -23,8 +24,8 @@ import {
23
24
  deneb,
24
25
  gloas,
25
26
  ssz,
27
+ sszTypesFor,
26
28
  } from "@lodestar/types";
27
- import {BlobAndProof} from "@lodestar/types/deneb";
28
29
  import {BlobAndProofV2} from "@lodestar/types/fulu";
29
30
  import {
30
31
  ExecutionPayloadStatus,
@@ -54,6 +55,7 @@ export type EngineApiRpcParamTypes = {
54
55
  engine_newPayloadV3: [ExecutionPayloadRpc, VersionedHashesRpc, DATA];
55
56
  engine_newPayloadV4: [ExecutionPayloadRpc, VersionedHashesRpc, DATA, ExecutionRequestsRpc];
56
57
  engine_newPayloadV5: [ExecutionPayloadRpc, VersionedHashesRpc, DATA, ExecutionRequestsRpc];
58
+ engine_newPayloadV6: [ExecutionPayloadRpc, VersionedHashesRpc, DATA, ExecutionRequestsRpc, InclusionListRpc];
57
59
  /**
58
60
  * 1. Object - Payload validity status with respect to the consensus rules:
59
61
  * - blockHash: DATA, 32 Bytes - block hash value of the payload
@@ -75,6 +77,10 @@ export type EngineApiRpcParamTypes = {
75
77
  forkChoiceData: {headBlockHash: DATA; safeBlockHash: DATA; finalizedBlockHash: DATA},
76
78
  payloadAttributes?: PayloadAttributesRpc,
77
79
  ];
80
+ engine_forkchoiceUpdatedV5: [
81
+ forkChoiceData: {headBlockHash: DATA; safeBlockHash: DATA; finalizedBlockHash: DATA},
82
+ payloadAttributes?: PayloadAttributesRpc,
83
+ ];
78
84
  /**
79
85
  * 1. payloadId: QUANTITY, 64 Bits - Identifier of the payload building process
80
86
  */
@@ -95,14 +101,17 @@ export type EngineApiRpcParamTypes = {
95
101
  */
96
102
  engine_getClientVersionV1: [ClientVersionRpc];
97
103
 
98
- engine_getBlobsV1: [DATA[]];
99
104
  engine_getBlobsV2: [DATA[]];
105
+
106
+ engine_getInclusionListV1: [];
100
107
  };
101
108
 
102
109
  export type PayloadStatus = {
103
110
  status: ExecutionPayloadStatus;
104
111
  latestValidHash: DATA | null;
105
112
  validationError: string | null;
113
+ /** PayloadStatusV2: whether a VALID payload satisfied the inclusion list constraints, null otherwise */
114
+ inclusionListSatisfied?: boolean | null;
106
115
  };
107
116
 
108
117
  export type EngineApiRpcReturnTypes = {
@@ -115,6 +124,7 @@ export type EngineApiRpcReturnTypes = {
115
124
  engine_newPayloadV3: PayloadStatus;
116
125
  engine_newPayloadV4: PayloadStatus;
117
126
  engine_newPayloadV5: PayloadStatus;
127
+ engine_newPayloadV6: PayloadStatus;
118
128
  engine_forkchoiceUpdatedV1: {
119
129
  payloadStatus: PayloadStatus;
120
130
  payloadId: QUANTITY | null;
@@ -131,6 +141,10 @@ export type EngineApiRpcReturnTypes = {
131
141
  payloadStatus: PayloadStatus;
132
142
  payloadId: QUANTITY | null;
133
143
  };
144
+ engine_forkchoiceUpdatedV5: {
145
+ payloadStatus: PayloadStatus;
146
+ payloadId: QUANTITY | null;
147
+ };
134
148
  /**
135
149
  * payloadId | Error: QUANTITY, 64 Bits - Identifier of the payload building process
136
150
  */
@@ -145,8 +159,9 @@ export type EngineApiRpcReturnTypes = {
145
159
 
146
160
  engine_getClientVersionV1: ClientVersionRpc[];
147
161
 
148
- engine_getBlobsV1: (BlobAndProofRpc | null)[];
149
162
  engine_getBlobsV2: BlobAndProofV2Rpc[] | null;
163
+
164
+ engine_getInclusionListV1: InclusionListRpc;
150
165
  };
151
166
 
152
167
  type ExecutionPayloadRpcWithValue = {
@@ -165,7 +180,7 @@ export type ExecutionPayloadBodyRpc = {
165
180
  };
166
181
 
167
182
  export type ExecutionPayloadBody = {
168
- transactions: bellatrix.Transaction[];
183
+ transactions: bellatrix.Transactions;
169
184
  withdrawals: capella.Withdrawals | null;
170
185
  };
171
186
 
@@ -230,11 +245,6 @@ export type ConsolidationRequestsRpc = DATA;
230
245
  export type BuilderDepositRequestsRpc = DATA;
231
246
  export type BuilderExitRequestsRpc = DATA;
232
247
 
233
- export type BlobAndProofRpc = {
234
- blob: DATA;
235
- proof: DATA;
236
- };
237
-
238
248
  export type BlobAndProofV2Rpc = {
239
249
  blob: DATA;
240
250
  proofs: DATA[];
@@ -261,8 +271,13 @@ export type PayloadAttributesRpc = {
261
271
  slotNumber?: QUANTITY;
262
272
  /** QUANTITY, 64 Bits - target value for the gasLimit field of the new payload (GLOAS, execution-apis#796) */
263
273
  targetGasLimit?: QUANTITY;
274
+ /** Array of DATA - transactions that the built payload must include (PayloadAttributesV5, HEZE) */
275
+ inclusionListTransactions?: InclusionListRpc;
264
276
  };
265
277
 
278
+ /** Array of DATA - array of transaction objects */
279
+ export type InclusionListRpc = DATA[];
280
+
266
281
  export type ClientVersionRpc = {
267
282
  /** ClientCode */
268
283
  code: string;
@@ -295,7 +310,7 @@ export function serializeExecutionPayload(fork: ForkName, data: ExecutionPayload
295
310
  extraData: bytesToData(data.extraData),
296
311
  baseFeePerGas: numToQuantity(data.baseFeePerGas),
297
312
  blockHash: bytesToData(data.blockHash),
298
- transactions: data.transactions.map((tran) => bytesToData(tran)),
313
+ transactions: Array.from(data.transactions, (tran) => bytesToData(tran)),
299
314
  };
300
315
 
301
316
  // Capella adds withdrawals to the ExecutionPayload
@@ -379,7 +394,7 @@ export function parseExecutionPayload(
379
394
  extraData: dataToBytes(data.extraData, null),
380
395
  baseFeePerGas: quantityToBigint(data.baseFeePerGas),
381
396
  blockHash: dataToBytes(data.blockHash, 32),
382
- transactions: data.transactions.map((tran) => dataToBytes(tran, null)),
397
+ transactions: SerializedList.fromArray(data.transactions.map((tran) => dataToBytes(tran, null))),
383
398
  };
384
399
 
385
400
  if (ForkSeq[fork] >= ForkSeq.capella) {
@@ -442,6 +457,9 @@ export function serializePayloadAttributes(data: PayloadAttributes): PayloadAttr
442
457
  parentBeaconBlockRoot: data.parentBeaconBlockRoot ? bytesToData(data.parentBeaconBlockRoot) : undefined,
443
458
  slotNumber: data.slotNumber !== undefined ? numToQuantity(data.slotNumber) : undefined,
444
459
  targetGasLimit: data.targetGasLimit !== undefined ? numToQuantity(data.targetGasLimit) : undefined,
460
+ inclusionListTransactions: data.inclusionListTransactions
461
+ ? serializeInclusionList(data.inclusionListTransactions)
462
+ : undefined,
445
463
  };
446
464
  }
447
465
 
@@ -449,6 +467,14 @@ export function serializeBeaconBlockRoot(data: Root): DATA {
449
467
  return bytesToData(data);
450
468
  }
451
469
 
470
+ export function serializeInclusionList(data: bellatrix.Transactions): InclusionListRpc {
471
+ return Array.from(data, (transaction) => bytesToData(transaction));
472
+ }
473
+
474
+ export function deserializeInclusionList(data: InclusionListRpc): bellatrix.Transactions {
475
+ return SerializedList.fromArray(data.map((transaction) => dataToBytes(transaction, null)));
476
+ }
477
+
452
478
  export function deserializePayloadAttributes(data: PayloadAttributesRpc): PayloadAttributes {
453
479
  return {
454
480
  timestamp: quantityToNum(data.timestamp),
@@ -460,6 +486,9 @@ export function deserializePayloadAttributes(data: PayloadAttributesRpc): Payloa
460
486
  parentBeaconBlockRoot: data.parentBeaconBlockRoot ? dataToBytes(data.parentBeaconBlockRoot, 32) : undefined,
461
487
  slotNumber: data.slotNumber !== undefined ? quantityToNum(data.slotNumber) : undefined,
462
488
  targetGasLimit: data.targetGasLimit !== undefined ? quantityToBigint(data.targetGasLimit) : undefined,
489
+ inclusionListTransactions: data.inclusionListTransactions
490
+ ? deserializeInclusionList(data.inclusionListTransactions)
491
+ : undefined,
463
492
  };
464
493
  }
465
494
 
@@ -593,7 +622,7 @@ export function deserializeExecutionRequestsFromBytes(fork: ForkName, serialized
593
622
 
594
623
  switch (currentRequestType) {
595
624
  case DEPOSIT_REQUEST_TYPE: {
596
- result.deposits = ssz.electra.DepositRequests.deserialize(requests);
625
+ result.deposits = sszTypesFor(fork as ForkPostElectra).DepositRequests.deserialize(requests);
597
626
  break;
598
627
  }
599
628
  case WITHDRAWAL_REQUEST_TYPE: {
@@ -635,7 +664,7 @@ export function deserializeExecutionRequests(fork: ForkName, serialized: Executi
635
664
  export function deserializeExecutionPayloadBody(data: ExecutionPayloadBodyRpc | null): ExecutionPayloadBody | null {
636
665
  return data
637
666
  ? {
638
- transactions: data.transactions.map((tran) => dataToBytes(tran, null)),
667
+ transactions: SerializedList.fromArray(data.transactions.map((tran) => dataToBytes(tran, null))),
639
668
  withdrawals: data.withdrawals ? data.withdrawals.map(deserializeWithdrawal) : null,
640
669
  }
641
670
  : null;
@@ -658,21 +687,12 @@ export function serializeExecutionPayloadBodyV2(data: ExecutionPayloadBodyV2 | n
658
687
  export function serializeExecutionPayloadBody(data: ExecutionPayloadBody | null): ExecutionPayloadBodyRpc | null {
659
688
  return data
660
689
  ? {
661
- transactions: data.transactions.map((tran) => bytesToData(tran)),
690
+ transactions: Array.from(data.transactions, (tran) => bytesToData(tran)),
662
691
  withdrawals: data.withdrawals ? data.withdrawals.map(serializeWithdrawal) : null,
663
692
  }
664
693
  : null;
665
694
  }
666
695
 
667
- export function deserializeBlobAndProofs(data: BlobAndProofRpc | null): BlobAndProof | null {
668
- return data
669
- ? {
670
- blob: dataToBytes(data.blob, BLOB_BYTES),
671
- proof: dataToBytes(data.proof, PROOF_BYTES),
672
- }
673
- : null;
674
- }
675
-
676
696
  export function deserializeBlobAndProofsV2(data: BlobAndProofV2Rpc): BlobAndProofV2 {
677
697
  return {
678
698
  blob: dataToBytes(data.blob, BLOB_BYTES),
@@ -169,14 +169,16 @@ function getExecutionEngineStateForPayloadStatus(payloadStatus: ExecutionPayload
169
169
  return ExecutionEngineState.SYNCED;
170
170
 
171
171
  case ExecutionPayloadStatus.ELERROR:
172
- case ExecutionPayloadStatus.INVALID:
173
172
  case ExecutionPayloadStatus.SYNCING:
174
- case ExecutionPayloadStatus.INVALID_BLOCK_HASH:
175
173
  return ExecutionEngineState.SYNCING;
176
174
 
177
175
  case ExecutionPayloadStatus.UNAVAILABLE:
178
176
  return ExecutionEngineState.OFFLINE;
179
177
 
178
+ case ExecutionPayloadStatus.INVALID:
179
+ case ExecutionPayloadStatus.INVALID_BLOCK_HASH:
180
+ return ExecutionEngineState.ONLINE;
181
+
180
182
  default:
181
183
  // In case we can't determine the state, we assume it stays in old state
182
184
  // This assumption is better than considering offline, because the offline state may trigger some notifications
package/src/index.ts CHANGED
@@ -6,6 +6,8 @@ export {persistAnchorState} from "./chain/index.js";
6
6
  export {DbCPStateDatastore} from "./chain/stateCache/datastore/db.js";
7
7
  export {FileCPStateDatastore} from "./chain/stateCache/datastore/file.js";
8
8
  export {BeaconDb, type IBeaconDb} from "./db/index.js";
9
+ // Export execution engine to make it usable by builder
10
+ export {ExecutionPayloadStatus, initializeExecutionEngine} from "./execution/index.js";
9
11
  // Export metrics utilities to de-duplicate validator metrics
10
12
  export {
11
13
  type HttpMetricsServer,
@@ -1,5 +1,6 @@
1
1
  import {ProducedBlockSource} from "@lodestar/types";
2
2
  import {BlockSelectionResult} from "../../api/impl/validator/index.js";
3
+ import {InclusionListSource} from "../../chain/blocks/types.js";
3
4
  import {BlockProductionStep, PayloadPreparationType} from "../../chain/produceBlock/index.js";
4
5
  import {RegistryMetricCreator} from "../utils/registryMetricCreator.js";
5
6
 
@@ -185,36 +186,6 @@ export function createBeaconMetrics(register: RegistryMetricCreator) {
185
186
  }),
186
187
  },
187
188
 
188
- blobs: {
189
- getBlobsV1Requests: register.gauge({
190
- name: "beacon_get_blobs_v1_calls_total",
191
- help: "Number of getBlobsV1 requests that get made",
192
- }),
193
- getBlobsV1RequestedBlobCount: register.gauge({
194
- name: "beacon_get_blobs_v1_requested_blobs_count_total",
195
- help: "Number of versioned hashes that get sent in getBlobsV1 request",
196
- }),
197
- getBlobsV1Error: register.gauge({
198
- name: "beacon_get_blobs_v1_response_error_total",
199
- help: "Number of getBlobsV1 calls that errored ",
200
- }),
201
- getBlobsV1Miss: register.gauge({
202
- name: "beacon_get_blobs_v1_missing_blob_response_total",
203
- help: "Number of getBlobsV1 misses where a versioned hash returns a null",
204
- }),
205
- getBlobsV1Hit: register.gauge({
206
- name: "beacon_get_blobs_v1_blob_returned_response_total",
207
- help: "Number of getBlobsV1 hits where a versioned hash returns blob",
208
- }),
209
- getBlobsV1HitButArrivedWhileWaiting: register.gauge({
210
- name: "beacon_get_blobs_v1_blob_returned_but_arrived_during_response_total",
211
- help: "Number of getBlobsV1 hits where a versioned hash returns blob but the blob already arrived via gossip",
212
- }),
213
- getBlobsV1HitUseful: register.gauge({
214
- name: "beacon_get_blobs_v1_blob_useful_response_total",
215
- help: "Number of getBlobsV1 hits where a versioned hash returns blob and the blob is needed so call is useful",
216
- }),
217
- },
218
189
  payloadEnvelopeReconstruction: {
219
190
  envelopes: register.counter<{result: "success" | "unavailable" | "mismatch"}>({
220
191
  name: "beacon_payload_envelope_reconstruction_envelopes_total",
@@ -432,5 +403,41 @@ export function createBeaconMetrics(register: RegistryMetricCreator) {
432
403
  name: "beacon_weak_head_detected_total",
433
404
  help: "Detected current head block is weak. May reorg it out when proposing next slot. See proposer boost reorg for more",
434
405
  }),
406
+
407
+ // HEZE:EIP-7805
408
+ inclusionListsReceived: register.counter<{source: InclusionListSource}>({
409
+ name: "beacon_inclusion_lists_received_total",
410
+ help: "Total number of received inclusion lists",
411
+ labelNames: ["source"],
412
+ }),
413
+ inclusionListsValid: register.counter<{source: InclusionListSource}>({
414
+ name: "beacon_inclusion_lists_valid_total",
415
+ help: "Total number of valid inclusion lists",
416
+ labelNames: ["source"],
417
+ }),
418
+ inclusionListsValidSize: register.counter({
419
+ name: "beacon_inclusion_lists_valid_size_bytes_total",
420
+ help: "Total size of valid inclusion lists in bytes",
421
+ }),
422
+ inclusionListTransactionsReceived: register.counter<{source: InclusionListSource}>({
423
+ name: "beacon_inclusion_list_transactions_received_total",
424
+ help: "Total number of transactions in received inclusion lists",
425
+ labelNames: ["source"],
426
+ }),
427
+ inclusionListsPublished: register.counter({
428
+ name: "beacon_inclusion_lists_published_total",
429
+ help: "Total number of published inclusion lists",
430
+ }),
431
+ inclusionListsValidationTime: register.histogram<{source: InclusionListSource}>({
432
+ name: "beacon_inclusion_lists_validation_time_seconds",
433
+ help: "Time taken to validate inclusion lists",
434
+ buckets: [0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5],
435
+ labelNames: ["source"],
436
+ }),
437
+ inclusionListArrivalTime: register.histogram({
438
+ name: "beacon_inclusion_lists_arrival_time_seconds",
439
+ help: "Inclusion list arrival time since the beginning of slot",
440
+ buckets: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
441
+ }),
435
442
  };
436
443
  }
@@ -16,6 +16,7 @@ import {
16
16
  type InvalidAttestationData,
17
17
  ScannedSlotsTerminationReason,
18
18
  } from "../../chain/opPools/aggregatedAttestationPool.js";
19
+ import {InclusionListInsertOutcome} from "../../chain/opPools/inclusionListStore.js";
19
20
  import {InsertOutcome} from "../../chain/opPools/types.js";
20
21
  import {RegenCaller, RegenFnName} from "../../chain/regen/interface.js";
21
22
  import {ReprocessStatus} from "../../chain/reprocess.js";
@@ -644,6 +645,11 @@ export function createLodestarMetrics(
644
645
  help: "Count of peers by sync type [FullySynced, Advanced, Behind]",
645
646
  labelNames: ["syncType"],
646
647
  }),
648
+ syncPeerFinalizedCheckpointMismatch: register.counter<{reason: string}>({
649
+ name: "lodestar_sync_peer_finalized_checkpoint_mismatch_total",
650
+ help: "Total behind peers whose Status finalized checkpoint is not in our chain, by reason",
651
+ labelNames: ["reason"],
652
+ }),
647
653
  syncSwitchGossipSubscriptions: register.gauge<{action: string}>({
648
654
  name: "lodestar_sync_switch_gossip_subscriptions",
649
655
  help: "Sync switched gossip subscriptions on/off",
@@ -1007,6 +1013,11 @@ export function createLodestarMetrics(
1007
1013
  help: "Time elapsed between block received and fully verified state, signatures and payload",
1008
1014
  buckets: [0.05, 0.1, 0.3, 0.5, 0.7, 1, 1.3, 1.6, 2, 2.5, 3, 3.5, 4],
1009
1015
  }),
1016
+ receivedToConsensusVerifiedTime: register.histogram({
1017
+ name: "lodestar_gossip_block_received_to_consensus_verified_seconds",
1018
+ help: "Time from gossip block arrival until both the state transition and all block signature verifications are complete, excluding execution payload verification",
1019
+ buckets: [0.01, 0.015, 0.02, 0.025, 0.03, 0.04, 0.5, 1],
1020
+ }),
1010
1021
  verifiedToBlobsAvailabiltyTime: register.histogram<{numBlobs: number}>({
1011
1022
  name: "lodestar_gossip_block_verified_to_blobs_availability_time",
1012
1023
  help: "Time elapsed between block verified and blobs became available",
@@ -1043,10 +1054,6 @@ export function createLodestarMetrics(
1043
1054
  help: "Time elapsed for blob validation",
1044
1055
  buckets: [0.05, 0.1, 0.2, 0.5, 1, 1.5, 2, 4],
1045
1056
  }),
1046
- publishedFromEngine: register.counter({
1047
- name: "lodestar_gossip_blob_published_from_engine_total",
1048
- help: "Total number of blobs retrieved from execution engine and published to gossip",
1049
- }),
1050
1057
  },
1051
1058
  // Gossip execution payload envelope
1052
1059
  gossipExecutionPayloadEnvelope: {
@@ -1168,11 +1175,6 @@ export function createLodestarMetrics(
1168
1175
  help: "Total number of imported blocks by source",
1169
1176
  labelNames: ["source"],
1170
1177
  }),
1171
- blobsBySource: register.gauge<{blobsSource: BlockInputSource}>({
1172
- name: "lodestar_import_blobs_by_source_total",
1173
- help: "Total number of imported blobs by source",
1174
- labelNames: ["blobsSource"],
1175
- }),
1176
1178
  notOverrideFcuReason: register.counter<{reason: NotReorgedReason}>({
1177
1179
  name: "lodestar_import_block_not_override_fcu_reason_total",
1178
1180
  help: "Reason why the fcu call is not suppressed during block import",
@@ -1202,11 +1204,31 @@ export function createLodestarMetrics(
1202
1204
  help: "The total result of calling notifyForkchoiceUpdate execution engine api",
1203
1205
  labelNames: ["result"],
1204
1206
  }),
1207
+ getInclusionListV1Requests: register.counter({
1208
+ name: "lodestar_execution_engine_get_inclusion_list_v1_requests_total",
1209
+ help: "Total number of engine_getInclusionListV1 requests",
1210
+ }),
1211
+ getInclusionListV1RequestsDuration: register.histogram({
1212
+ name: "lodestar_execution_engine_get_inclusion_list_v1_duration_seconds",
1213
+ help: "Duration of engine_getInclusionListV1 requests",
1214
+ buckets: [0.05, 0.1, 0.25, 0.5, 1],
1215
+ }),
1205
1216
  engineApiRequests: register.counter<{transport: string}>({
1206
1217
  name: "lodestar_execution_engine_api_requests_total",
1207
1218
  help: "Total engine API requests by transport",
1208
1219
  labelNames: ["transport"],
1209
1220
  }),
1221
+ inclusionListStore: {
1222
+ size: register.gauge({
1223
+ name: "lodestar_inclusion_list_store_size",
1224
+ help: "Current number of inclusion lists retained in the InclusionListStore",
1225
+ }),
1226
+ insertOutcome: register.counter<{insertOutcome: InclusionListInsertOutcome}>({
1227
+ name: "lodestar_inclusion_list_store_insert_outcome_total",
1228
+ help: "Total number of InclusionListStore insertions by outcome",
1229
+ labelNames: ["insertOutcome"],
1230
+ }),
1231
+ },
1210
1232
  opPool: {
1211
1233
  aggregatedAttestationPool: {
1212
1234
  size: register.gauge({
@@ -1316,8 +1338,67 @@ export function createLodestarMetrics(
1316
1338
  name: "lodestar_oppool_aggregated_attestation_pool_packed_attestations_missing_shuffling_committees_total",
1317
1339
  help: "Total number of committees skipped due to missing shuffling when producing packed attestations",
1318
1340
  }),
1341
+ attestationValue: register.counter<{source: "aggregate" | "single"}>({
1342
+ name: "lodestar_oppool_packed_attestation_value_total",
1343
+ help: "Sum of new seen effective balance increments times participation flag weight of packed attestations, by source",
1344
+ labelNames: ["source"],
1345
+ }),
1346
+ blockNewSeenAttesters: register.gauge({
1347
+ name: "lodestar_oppool_packed_attestations_block_new_seen_attesters",
1348
+ help: "Total number of new seen attesters across all packed attestations of the last produced block",
1349
+ }),
1350
+ singlesValueRatio: register.histogram({
1351
+ name: "lodestar_oppool_packed_attestations_singles_value_ratio",
1352
+ help: "Ratio of attestation value contributed by single attestations per produced block",
1353
+ buckets: [0, 0.001, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1],
1354
+ }),
1355
+ singlesNewSeenAttesters: register.histogram({
1356
+ name: "lodestar_oppool_packed_attestations_singles_new_seen_attesters",
1357
+ help: "Number of attesters newly included only thanks to single attestations per produced block",
1358
+ buckets: [0, 1, 5, 10, 25, 50, 100, 250, 500, 1000, 1024],
1359
+ }),
1360
+ singlesNewSeenAttestersByInclusionDistance: register.gauge<{inclusionDistance: number}>({
1361
+ name: "lodestar_oppool_packed_attestations_singles_new_seen_attesters_by_inclusion_distance",
1362
+ help: "Number of attesters newly included only thanks to single attestations in the last produced block, by inclusion distance",
1363
+ labelNames: ["inclusionDistance"],
1364
+ }),
1365
+ singlesNewSeenEffectiveBalance: register.histogram({
1366
+ name: "lodestar_oppool_packed_attestations_singles_new_seen_effective_balance",
1367
+ help: "Effective balance increments of attesters newly included only thanks to single attestations per produced block",
1368
+ buckets: [0, 32, 160, 320, 800, 1600, 3200, 8000, 32000],
1369
+ }),
1370
+ singlesOnlyConsolidations: register.histogram({
1371
+ name: "lodestar_oppool_packed_attestations_singles_only_consolidations",
1372
+ help: "Number of packed attestations built only from single attestations per produced block",
1373
+ buckets: [0, 1, 2, 4, 8],
1374
+ }),
1375
+ singlesFoldedCommittees: register.histogram({
1376
+ name: "lodestar_oppool_packed_attestations_singles_folded_committees",
1377
+ help: "Number of committees in packed attestations that received single attestations per produced block",
1378
+ buckets: [0, 1, 2, 4, 8, 16, 32, 64],
1379
+ }),
1319
1380
  },
1320
1381
  },
1382
+ singleAttestationPool: {
1383
+ size: register.gauge({
1384
+ name: "lodestar_oppool_single_attestation_pool_size",
1385
+ help: "Current number of single attestations in the SingleAttestationPool",
1386
+ }),
1387
+ gossipInsertOutcome: register.counter<{insertOutcome: InsertOutcome}>({
1388
+ name: "lodestar_oppool_single_attestation_pool_gossip_insert_outcome_total",
1389
+ help: "Total number of InsertOutcome as a result of adding a single attestation from gossip to the SingleAttestationPool",
1390
+ labelNames: ["insertOutcome"],
1391
+ }),
1392
+ apiInsertOutcome: register.counter<{insertOutcome: InsertOutcome}>({
1393
+ name: "lodestar_oppool_single_attestation_pool_api_insert_outcome_total",
1394
+ help: "Total number of InsertOutcome as a result of adding a single attestation from api to the SingleAttestationPool",
1395
+ labelNames: ["insertOutcome"],
1396
+ }),
1397
+ deletedByBlock: register.counter({
1398
+ name: "lodestar_oppool_single_attestation_pool_deleted_by_block_total",
1399
+ help: "Total number of single attestations deleted because a canonical block includes them",
1400
+ }),
1401
+ },
1321
1402
  attestationPool: {
1322
1403
  size: register.gauge({
1323
1404
  name: "lodestar_oppool_attestation_pool_size",
@@ -1453,6 +1534,11 @@ export function createLodestarMetrics(
1453
1534
  help: "Total number of InsertOutcome as a result of adding an execution payload bid from gossip to the pool",
1454
1535
  labelNames: ["insertOutcome"],
1455
1536
  }),
1537
+ apiInsertOutcome: register.counter<{insertOutcome: InsertOutcome}>({
1538
+ name: "lodestar_oppool_execution_payload_bid_pool_api_insert_outcome_total",
1539
+ help: "Total number of InsertOutcome as a result of adding an execution payload bid from api to the pool",
1540
+ labelNames: ["insertOutcome"],
1541
+ }),
1456
1542
  apiValidationTime: register.histogram({
1457
1543
  name: "lodestar_api_execution_payload_bid_validation_time_seconds",
1458
1544
  help: "Time elapsed for signed execution payload bid validation - api path",
@@ -1461,6 +1547,17 @@ export function createLodestarMetrics(
1461
1547
  },
1462
1548
  },
1463
1549
 
1550
+ proposerTracker: {
1551
+ proposalSlots: register.gauge({
1552
+ name: "lodestar_proposer_tracker_proposal_slots",
1553
+ help: "Current number of upcoming block proposals of connected validators tracked by the ProposerTracker",
1554
+ }),
1555
+ collectableSlot: register.gauge({
1556
+ name: "lodestar_proposer_tracker_collectable_slot",
1557
+ help: "1 if single attestations of the clock slot are collected for an upcoming local proposal, 0 otherwise",
1558
+ }),
1559
+ },
1560
+
1464
1561
  chain: {
1465
1562
  blacklistedBlocks: register.gauge({
1466
1563
  name: "lodestar_blacklisted_blocks_total",
@@ -1757,11 +1854,6 @@ export function createLodestarMetrics(
1757
1854
  help: "Total number of duplicate blocks that pass validation and attempt to be cached but are known",
1758
1855
  labelNames: ["source"],
1759
1856
  }),
1760
- duplicateBlobCount: register.counter<{source: BlockInputSource}>({
1761
- name: "lodestar_seen_block_input_cache_duplicate_blob_total",
1762
- help: "Total number of duplicate blobs that pass validation and attempt to be cached but are known",
1763
- labelNames: ["source"],
1764
- }),
1765
1857
  duplicateColumnCount: register.counter<{source: BlockInputSource}>({
1766
1858
  name: "lodestar_seen_block_input_cache_duplicate_column_total",
1767
1859
  help: "Total number of duplicate columns that pass validation and attempt to be cached but are known",
@@ -1771,10 +1863,6 @@ export function createLodestarMetrics(
1771
1863
  name: "lodestar_seen_block_input_cache_items_created_by_block_total",
1772
1864
  help: "Number of BlockInputs created via a block being seen first",
1773
1865
  }),
1774
- createdByBlob: register.counter({
1775
- name: "lodestar_seen_block_input_cache_items_created_by_blob_total",
1776
- help: "Number of BlockInputs created via a blob being seen first",
1777
- }),
1778
1866
  createdByColumn: register.counter({
1779
1867
  name: "lodestar_seen_block_input_cache_items_created_by_column_total",
1780
1868
  help: "Number of BlockInputs created via a data column being seen first",
@@ -44,16 +44,16 @@ export async function getHttpMetricsServer(
44
44
  ): Promise<void> {
45
45
  if (req.method === "GET" && req.url && req.url.includes("/metrics")) {
46
46
  const timer = scrapeTimeMetric.startTimer();
47
- const metricsRes = await Promise.all([wrapError(register.metrics()), getOtherMetrics()]);
48
- timer({status: metricsRes[0].err ? RequestStatus.error : RequestStatus.success});
47
+ const metricsRes = await wrapError(Promise.all([register.metrics(), getOtherMetrics()]));
48
+ timer({status: metricsRes.err ? RequestStatus.error : RequestStatus.success});
49
49
 
50
50
  // Ensure we only writeHead once
51
- if (metricsRes[0].err) {
52
- res.writeHead(500, {"content-type": "text/plain"}).end(metricsRes[0].err.stack);
51
+ if (metricsRes.err) {
52
+ res.writeHead(500, {"content-type": "text/plain"}).end(metricsRes.err.stack);
53
53
  } else {
54
54
  // Get scrape time metrics
55
55
  const httpServerMetrics = await httpServerRegister.metrics();
56
- const metrics = [metricsRes[0].result, httpServerMetrics, ...metricsRes[1]];
56
+ const metrics = [metricsRes.result[0], httpServerMetrics, ...metricsRes.result[1]];
57
57
  const metricsStr = metrics.join("\n\n");
58
58
  res.writeHead(200, {"content-type": register.contentType}).end(metricsStr);
59
59
  }
@@ -101,7 +101,7 @@ export class MonitoringService {
101
101
  if (this.monitoringInterval) {
102
102
  clearTimeout(this.monitoringInterval);
103
103
  }
104
- if (this.pendingRequest) {
104
+ if (this.pendingRequest !== undefined) {
105
105
  this.fetchAbortController?.abort(FetchAbortReason.Close);
106
106
  await this.pendingRequest;
107
107
  }
@@ -8,8 +8,9 @@ import {BeaconConfig, ForkBoundary} from "@lodestar/config";
8
8
  import type {LoggerNode} from "@lodestar/logger/node";
9
9
  import {isForkPostFulu} from "@lodestar/params";
10
10
  import {ResponseIncoming} from "@lodestar/reqresp";
11
- import {Epoch, Status, fulu, sszTypesFor} from "@lodestar/types";
11
+ import {Epoch, Slot, Status, fulu, sszTypesFor} from "@lodestar/types";
12
12
  import {formatNodePeer} from "../../api/impl/node/utils.js";
13
+ import {GoodByeReasonCode} from "../../constants/index.js";
13
14
  import {RegistryMetricCreator} from "../../metrics/index.js";
14
15
  import {ClockEvent, IClock} from "../../util/clock.js";
15
16
  import {CustodyConfig} from "../../util/dataColumns.js";
@@ -332,6 +333,10 @@ export class NetworkCore implements INetworkCore {
332
333
  this.peerManager.reStatusPeers(peers);
333
334
  }
334
335
 
336
+ async goodbyeAndDisconnect(peer: PeerIdStr, reason: GoodByeReasonCode): Promise<void> {
337
+ await this.peerManager.goodbyeAndDisconnect(peerIdFromString(peer), reason);
338
+ }
339
+
335
340
  /**
336
341
  * Request att subnets up `toSlot`. Network will ensure to mantain some peers for each
337
342
  */
@@ -340,6 +345,11 @@ export class NetworkCore implements INetworkCore {
340
345
  if (subscriptions.length > 0) this.peerManager.onCommitteeSubscriptions();
341
346
  }
342
347
 
348
+ async addLocalProposalSlots(slots: Slot[]): Promise<void> {
349
+ // no peerManager.onCommitteeSubscriptions(): the extra subscription relies on connected peers, no discovery
350
+ this.attnetsService.addLocalProposalSlots(slots);
351
+ }
352
+
343
353
  async prepareSyncCommitteeSubnets(subscriptions: CommitteeSubscription[]): Promise<void> {
344
354
  this.syncnetsService.addCommitteeSubscriptions(subscriptions);
345
355
  if (subscriptions.length > 0) this.peerManager.onCommitteeSubscriptions();
@@ -136,8 +136,10 @@ const libp2pWorkerApi: NetworkWorkerApi = {
136
136
 
137
137
  prepareBeaconCommitteeSubnets: (subscriptions) => core.prepareBeaconCommitteeSubnets(subscriptions),
138
138
  prepareSyncCommitteeSubnets: (subscriptions) => core.prepareSyncCommitteeSubnets(subscriptions),
139
+ addLocalProposalSlots: (slots) => core.addLocalProposalSlots(slots),
139
140
  reportPeer: (peer, action, actionName) => core.reportPeer(peer, action, actionName),
140
141
  reStatusPeers: (peers) => core.reStatusPeers(peers),
142
+ goodbyeAndDisconnect: (peer, reason) => core.goodbyeAndDisconnect(peer, reason),
141
143
  subscribeGossipCoreTopics: () => core.subscribeGossipCoreTopics(),
142
144
  unsubscribeGossipCoreTopics: () => core.unsubscribeGossipCoreTopics(),
143
145
 
@@ -9,8 +9,9 @@ import {routes} from "@lodestar/api";
9
9
  import {BeaconConfig, chainConfigToJson} from "@lodestar/config";
10
10
  import type {LoggerNode} from "@lodestar/logger/node";
11
11
  import {ResponseIncoming, ResponseOutgoing} from "@lodestar/reqresp";
12
- import {Status} from "@lodestar/types";
12
+ import {Slot, Status} from "@lodestar/types";
13
13
  import {withTimeout} from "@lodestar/utils";
14
+ import {GoodByeReasonCode} from "../../constants/index.js";
14
15
  import {Metrics} from "../../metrics/index.js";
15
16
  import {AsyncIterableBridgeCaller, AsyncIterableBridgeHandler} from "../../util/asyncIterableToEvents.js";
16
17
  import {PeerIdStr, peerIdFromString} from "../../util/peerId.js";
@@ -205,6 +206,9 @@ export class WorkerNetworkCore implements INetworkCore {
205
206
  reStatusPeers(peers: PeerIdStr[]): Promise<void> {
206
207
  return this.getApi().reStatusPeers(peers);
207
208
  }
209
+ goodbyeAndDisconnect(peer: PeerIdStr, reason: GoodByeReasonCode): Promise<void> {
210
+ return this.getApi().goodbyeAndDisconnect(peer, reason);
211
+ }
208
212
  reportPeer(peer: PeerIdStr, action: PeerAction, actionName: string): Promise<void> {
209
213
  return this.getApi().reportPeer(peer, action, actionName);
210
214
  }
@@ -216,6 +220,9 @@ export class WorkerNetworkCore implements INetworkCore {
216
220
  prepareSyncCommitteeSubnets(subscriptions: CommitteeSubscription[]): Promise<void> {
217
221
  return this.getApi().prepareSyncCommitteeSubnets(subscriptions);
218
222
  }
223
+ addLocalProposalSlots(slots: Slot[]): Promise<void> {
224
+ return this.getApi().addLocalProposalSlots(slots);
225
+ }
219
226
  subscribeGossipCoreTopics(): Promise<void> {
220
227
  return this.getApi().subscribeGossipCoreTopics();
221
228
  }