@lodestar/beacon-node 1.41.0-dev.253ed58dd1 → 1.41.0-dev.26ed5ad353

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 (846) hide show
  1. package/lib/api/impl/api.js.map +1 -1
  2. package/lib/api/impl/beacon/blocks/index.d.ts +1 -1
  3. package/lib/api/impl/beacon/blocks/index.d.ts.map +1 -1
  4. package/lib/api/impl/beacon/blocks/index.js +12 -2
  5. package/lib/api/impl/beacon/blocks/index.js.map +1 -1
  6. package/lib/api/impl/beacon/blocks/utils.js.map +1 -1
  7. package/lib/api/impl/beacon/index.js.map +1 -1
  8. package/lib/api/impl/beacon/pool/index.d.ts +1 -1
  9. package/lib/api/impl/beacon/pool/index.d.ts.map +1 -1
  10. package/lib/api/impl/beacon/pool/index.js.map +1 -1
  11. package/lib/api/impl/beacon/rewards/index.d.ts +1 -1
  12. package/lib/api/impl/beacon/rewards/index.d.ts.map +1 -1
  13. package/lib/api/impl/beacon/rewards/index.js.map +1 -1
  14. package/lib/api/impl/beacon/state/index.d.ts +1 -1
  15. package/lib/api/impl/beacon/state/index.d.ts.map +1 -1
  16. package/lib/api/impl/beacon/state/index.js +8 -8
  17. package/lib/api/impl/beacon/state/index.js.map +1 -1
  18. package/lib/api/impl/beacon/state/utils.d.ts +3 -4
  19. package/lib/api/impl/beacon/state/utils.d.ts.map +1 -1
  20. package/lib/api/impl/beacon/state/utils.js +5 -24
  21. package/lib/api/impl/beacon/state/utils.js.map +1 -1
  22. package/lib/api/impl/config/constants.js.map +1 -1
  23. package/lib/api/impl/config/index.js.map +1 -1
  24. package/lib/api/impl/debug/index.d.ts +1 -1
  25. package/lib/api/impl/debug/index.d.ts.map +1 -1
  26. package/lib/api/impl/debug/index.js +1 -0
  27. package/lib/api/impl/debug/index.js.map +1 -1
  28. package/lib/api/impl/errors.d.ts.map +1 -1
  29. package/lib/api/impl/errors.js.map +1 -1
  30. package/lib/api/impl/events/index.d.ts +1 -1
  31. package/lib/api/impl/events/index.d.ts.map +1 -1
  32. package/lib/api/impl/events/index.js.map +1 -1
  33. package/lib/api/impl/lightclient/index.d.ts +1 -1
  34. package/lib/api/impl/lightclient/index.d.ts.map +1 -1
  35. package/lib/api/impl/lightclient/index.js.map +1 -1
  36. package/lib/api/impl/lodestar/index.d.ts +1 -1
  37. package/lib/api/impl/lodestar/index.d.ts.map +1 -1
  38. package/lib/api/impl/lodestar/index.js.map +1 -1
  39. package/lib/api/impl/node/index.js.map +1 -1
  40. package/lib/api/impl/node/utils.d.ts +1 -1
  41. package/lib/api/impl/node/utils.d.ts.map +1 -1
  42. package/lib/api/impl/node/utils.js.map +1 -1
  43. package/lib/api/impl/proof/index.js.map +1 -1
  44. package/lib/api/impl/utils.js.map +1 -1
  45. package/lib/api/impl/validator/index.d.ts.map +1 -1
  46. package/lib/api/impl/validator/index.js +33 -17
  47. package/lib/api/impl/validator/index.js.map +1 -1
  48. package/lib/api/impl/validator/utils.d.ts +1 -1
  49. package/lib/api/impl/validator/utils.d.ts.map +1 -1
  50. package/lib/api/impl/validator/utils.js.map +1 -1
  51. package/lib/api/rest/activeSockets.d.ts.map +1 -1
  52. package/lib/api/rest/activeSockets.js.map +1 -1
  53. package/lib/api/rest/base.d.ts.map +1 -1
  54. package/lib/api/rest/base.js.map +1 -1
  55. package/lib/api/rest/index.d.ts.map +1 -1
  56. package/lib/api/rest/index.js.map +1 -1
  57. package/lib/api/rest/swaggerUI.js.map +1 -1
  58. package/lib/bun-wrappers/prometheus-gc-stats.js.map +1 -1
  59. package/lib/chain/ColumnReconstructionTracker.d.ts.map +1 -1
  60. package/lib/chain/ColumnReconstructionTracker.js.map +1 -1
  61. package/lib/chain/GetBlobsTracker.d.ts.map +1 -1
  62. package/lib/chain/GetBlobsTracker.js.map +1 -1
  63. package/lib/chain/archiveStore/archiveStore.d.ts.map +1 -1
  64. package/lib/chain/archiveStore/archiveStore.js +2 -1
  65. package/lib/chain/archiveStore/archiveStore.js.map +1 -1
  66. package/lib/chain/archiveStore/historicalState/getHistoricalState.d.ts +5 -6
  67. package/lib/chain/archiveStore/historicalState/getHistoricalState.d.ts.map +1 -1
  68. package/lib/chain/archiveStore/historicalState/getHistoricalState.js +9 -10
  69. package/lib/chain/archiveStore/historicalState/getHistoricalState.js.map +1 -1
  70. package/lib/chain/archiveStore/historicalState/historicalStateRegen.d.ts.map +1 -1
  71. package/lib/chain/archiveStore/historicalState/historicalStateRegen.js.map +1 -1
  72. package/lib/chain/archiveStore/historicalState/metrics.js.map +1 -1
  73. package/lib/chain/archiveStore/historicalState/types.js +2 -1
  74. package/lib/chain/archiveStore/historicalState/types.js.map +1 -1
  75. package/lib/chain/archiveStore/historicalState/worker.js +3 -3
  76. package/lib/chain/archiveStore/historicalState/worker.js.map +1 -1
  77. package/lib/chain/archiveStore/interface.js +2 -1
  78. package/lib/chain/archiveStore/interface.js.map +1 -1
  79. package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.d.ts +1 -1
  80. package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.d.ts.map +1 -1
  81. package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.js +2 -1
  82. package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.js.map +1 -1
  83. package/lib/chain/archiveStore/utils/archiveBlocks.d.ts +3 -8
  84. package/lib/chain/archiveStore/utils/archiveBlocks.d.ts.map +1 -1
  85. package/lib/chain/archiveStore/utils/archiveBlocks.js +1 -1
  86. package/lib/chain/archiveStore/utils/archiveBlocks.js.map +1 -1
  87. package/lib/chain/archiveStore/utils/archivePayloads.js.map +1 -1
  88. package/lib/chain/archiveStore/utils/pruneHistory.js.map +1 -1
  89. package/lib/chain/archiveStore/utils/updateBackfillRange.js +1 -1
  90. package/lib/chain/archiveStore/utils/updateBackfillRange.js.map +1 -1
  91. package/lib/chain/balancesCache.d.ts.map +1 -1
  92. package/lib/chain/balancesCache.js.map +1 -1
  93. package/lib/chain/beaconProposerCache.d.ts.map +1 -1
  94. package/lib/chain/beaconProposerCache.js.map +1 -1
  95. package/lib/chain/blocks/blockInput/blockInput.d.ts +25 -2
  96. package/lib/chain/blocks/blockInput/blockInput.d.ts.map +1 -1
  97. package/lib/chain/blocks/blockInput/blockInput.js +71 -0
  98. package/lib/chain/blocks/blockInput/blockInput.js.map +1 -1
  99. package/lib/chain/blocks/blockInput/errors.js +2 -1
  100. package/lib/chain/blocks/blockInput/errors.js.map +1 -1
  101. package/lib/chain/blocks/blockInput/types.d.ts +18 -1
  102. package/lib/chain/blocks/blockInput/types.d.ts.map +1 -1
  103. package/lib/chain/blocks/blockInput/types.js +5 -2
  104. package/lib/chain/blocks/blockInput/types.js.map +1 -1
  105. package/lib/chain/blocks/blockInput/utils.js.map +1 -1
  106. package/lib/chain/blocks/importBlock.d.ts.map +1 -1
  107. package/lib/chain/blocks/importBlock.js +28 -5
  108. package/lib/chain/blocks/importBlock.js.map +1 -1
  109. package/lib/chain/blocks/index.d.ts.map +1 -1
  110. package/lib/chain/blocks/index.js.map +1 -1
  111. package/lib/chain/blocks/types.js +6 -3
  112. package/lib/chain/blocks/types.js.map +1 -1
  113. package/lib/chain/blocks/utils/chainSegment.js.map +1 -1
  114. package/lib/chain/blocks/utils/checkpoint.js.map +1 -1
  115. package/lib/chain/blocks/verifyBlock.js.map +1 -1
  116. package/lib/chain/blocks/verifyBlocksDataAvailability.d.ts.map +1 -1
  117. package/lib/chain/blocks/verifyBlocksDataAvailability.js +3 -0
  118. package/lib/chain/blocks/verifyBlocksDataAvailability.js.map +1 -1
  119. package/lib/chain/blocks/verifyBlocksExecutionPayloads.d.ts +4 -0
  120. package/lib/chain/blocks/verifyBlocksExecutionPayloads.d.ts.map +1 -1
  121. package/lib/chain/blocks/verifyBlocksExecutionPayloads.js +5 -1
  122. package/lib/chain/blocks/verifyBlocksExecutionPayloads.js.map +1 -1
  123. package/lib/chain/blocks/verifyBlocksSanityChecks.d.ts.map +1 -1
  124. package/lib/chain/blocks/verifyBlocksSanityChecks.js +4 -1
  125. package/lib/chain/blocks/verifyBlocksSanityChecks.js.map +1 -1
  126. package/lib/chain/blocks/verifyBlocksSignatures.js.map +1 -1
  127. package/lib/chain/blocks/verifyBlocksStateTransitionOnly.js.map +1 -1
  128. package/lib/chain/blocks/writeBlockInputToDb.d.ts +12 -3
  129. package/lib/chain/blocks/writeBlockInputToDb.d.ts.map +1 -1
  130. package/lib/chain/blocks/writeBlockInputToDb.js +92 -98
  131. package/lib/chain/blocks/writeBlockInputToDb.js.map +1 -1
  132. package/lib/chain/bls/maybeBatch.js.map +1 -1
  133. package/lib/chain/bls/multithread/index.d.ts +3 -3
  134. package/lib/chain/bls/multithread/index.d.ts.map +1 -1
  135. package/lib/chain/bls/multithread/index.js +5 -5
  136. package/lib/chain/bls/multithread/index.js.map +1 -1
  137. package/lib/chain/bls/multithread/jobItem.d.ts +2 -2
  138. package/lib/chain/bls/multithread/jobItem.d.ts.map +1 -1
  139. package/lib/chain/bls/multithread/jobItem.js +4 -3
  140. package/lib/chain/bls/multithread/jobItem.js.map +1 -1
  141. package/lib/chain/bls/multithread/types.js +2 -1
  142. package/lib/chain/bls/multithread/types.js.map +1 -1
  143. package/lib/chain/bls/multithread/utils.js.map +1 -1
  144. package/lib/chain/bls/multithread/worker.js.map +1 -1
  145. package/lib/chain/bls/singleThread.d.ts +4 -4
  146. package/lib/chain/bls/singleThread.d.ts.map +1 -1
  147. package/lib/chain/bls/singleThread.js +4 -4
  148. package/lib/chain/bls/singleThread.js.map +1 -1
  149. package/lib/chain/bls/utils.d.ts +2 -2
  150. package/lib/chain/bls/utils.d.ts.map +1 -1
  151. package/lib/chain/bls/utils.js +7 -4
  152. package/lib/chain/bls/utils.js.map +1 -1
  153. package/lib/chain/chain.d.ts +7 -10
  154. package/lib/chain/chain.d.ts.map +1 -1
  155. package/lib/chain/chain.js +25 -24
  156. package/lib/chain/chain.js.map +1 -1
  157. package/lib/chain/emitter.d.ts +4 -6
  158. package/lib/chain/emitter.d.ts.map +1 -1
  159. package/lib/chain/emitter.js +2 -1
  160. package/lib/chain/emitter.js.map +1 -1
  161. package/lib/chain/errors/attestationError.d.ts.map +1 -1
  162. package/lib/chain/errors/attestationError.js +2 -1
  163. package/lib/chain/errors/attestationError.js.map +1 -1
  164. package/lib/chain/errors/attesterSlashingError.js +2 -1
  165. package/lib/chain/errors/attesterSlashingError.js.map +1 -1
  166. package/lib/chain/errors/blobSidecarError.js +2 -1
  167. package/lib/chain/errors/blobSidecarError.js.map +1 -1
  168. package/lib/chain/errors/blockError.d.ts.map +1 -1
  169. package/lib/chain/errors/blockError.js +2 -1
  170. package/lib/chain/errors/blockError.js.map +1 -1
  171. package/lib/chain/errors/blsToExecutionChangeError.js +2 -1
  172. package/lib/chain/errors/blsToExecutionChangeError.js.map +1 -1
  173. package/lib/chain/errors/dataColumnSidecarError.js +2 -1
  174. package/lib/chain/errors/dataColumnSidecarError.js.map +1 -1
  175. package/lib/chain/errors/executionPayloadBid.d.ts +1 -1
  176. package/lib/chain/errors/executionPayloadBid.js +2 -1
  177. package/lib/chain/errors/executionPayloadBid.js.map +1 -1
  178. package/lib/chain/errors/executionPayloadEnvelope.d.ts +2 -2
  179. package/lib/chain/errors/executionPayloadEnvelope.d.ts.map +1 -1
  180. package/lib/chain/errors/executionPayloadEnvelope.js +2 -1
  181. package/lib/chain/errors/executionPayloadEnvelope.js.map +1 -1
  182. package/lib/chain/errors/gossipValidation.d.ts.map +1 -1
  183. package/lib/chain/errors/gossipValidation.js +4 -2
  184. package/lib/chain/errors/gossipValidation.js.map +1 -1
  185. package/lib/chain/errors/lightClientError.js +4 -2
  186. package/lib/chain/errors/lightClientError.js.map +1 -1
  187. package/lib/chain/errors/payloadAttestation.d.ts +1 -1
  188. package/lib/chain/errors/payloadAttestation.js +2 -1
  189. package/lib/chain/errors/payloadAttestation.js.map +1 -1
  190. package/lib/chain/errors/proposerSlashingError.js +2 -1
  191. package/lib/chain/errors/proposerSlashingError.js.map +1 -1
  192. package/lib/chain/errors/syncCommitteeError.js +2 -1
  193. package/lib/chain/errors/syncCommitteeError.js.map +1 -1
  194. package/lib/chain/errors/voluntaryExitError.js +2 -1
  195. package/lib/chain/errors/voluntaryExitError.js.map +1 -1
  196. package/lib/chain/forkChoice/index.d.ts.map +1 -1
  197. package/lib/chain/forkChoice/index.js +32 -25
  198. package/lib/chain/forkChoice/index.js.map +1 -1
  199. package/lib/chain/initState.d.ts +1 -1
  200. package/lib/chain/initState.d.ts.map +1 -1
  201. package/lib/chain/initState.js.map +1 -1
  202. package/lib/chain/interface.d.ts +2 -4
  203. package/lib/chain/interface.d.ts.map +1 -1
  204. package/lib/chain/interface.js +2 -1
  205. package/lib/chain/interface.js.map +1 -1
  206. package/lib/chain/lightClient/index.d.ts +0 -29
  207. package/lib/chain/lightClient/index.d.ts.map +1 -1
  208. package/lib/chain/lightClient/index.js.map +1 -1
  209. package/lib/chain/lightClient/proofs.js.map +1 -1
  210. package/lib/chain/opPools/aggregatedAttestationPool.d.ts.map +1 -1
  211. package/lib/chain/opPools/aggregatedAttestationPool.js +5 -3
  212. package/lib/chain/opPools/aggregatedAttestationPool.js.map +1 -1
  213. package/lib/chain/opPools/attestationPool.d.ts.map +1 -1
  214. package/lib/chain/opPools/attestationPool.js.map +1 -1
  215. package/lib/chain/opPools/executionPayloadBidPool.d.ts.map +1 -1
  216. package/lib/chain/opPools/executionPayloadBidPool.js.map +1 -1
  217. package/lib/chain/opPools/opPool.d.ts.map +1 -1
  218. package/lib/chain/opPools/opPool.js.map +1 -1
  219. package/lib/chain/opPools/payloadAttestationPool.d.ts.map +1 -1
  220. package/lib/chain/opPools/payloadAttestationPool.js.map +1 -1
  221. package/lib/chain/opPools/syncCommitteeMessagePool.d.ts.map +1 -1
  222. package/lib/chain/opPools/syncCommitteeMessagePool.js.map +1 -1
  223. package/lib/chain/opPools/syncContributionAndProofPool.d.ts.map +1 -1
  224. package/lib/chain/opPools/syncContributionAndProofPool.js.map +1 -1
  225. package/lib/chain/opPools/types.js +4 -2
  226. package/lib/chain/opPools/types.js.map +1 -1
  227. package/lib/chain/opPools/utils.js.map +1 -1
  228. package/lib/chain/prepareNextSlot.d.ts +1 -2
  229. package/lib/chain/prepareNextSlot.d.ts.map +1 -1
  230. package/lib/chain/prepareNextSlot.js.map +1 -1
  231. package/lib/chain/produceBlock/computeNewStateRoot.d.ts +0 -1
  232. package/lib/chain/produceBlock/computeNewStateRoot.d.ts.map +1 -1
  233. package/lib/chain/produceBlock/computeNewStateRoot.js +4 -3
  234. package/lib/chain/produceBlock/computeNewStateRoot.js.map +1 -1
  235. package/lib/chain/produceBlock/produceBlockBody.d.ts +1 -1
  236. package/lib/chain/produceBlock/produceBlockBody.d.ts.map +1 -1
  237. package/lib/chain/produceBlock/produceBlockBody.js +24 -7
  238. package/lib/chain/produceBlock/produceBlockBody.js.map +1 -1
  239. package/lib/chain/produceBlock/validateBlobsAndKzgCommitments.js.map +1 -1
  240. package/lib/chain/regen/errors.d.ts.map +1 -1
  241. package/lib/chain/regen/errors.js +2 -1
  242. package/lib/chain/regen/errors.js.map +1 -1
  243. package/lib/chain/regen/interface.js +4 -2
  244. package/lib/chain/regen/interface.js.map +1 -1
  245. package/lib/chain/regen/queued.d.ts.map +1 -1
  246. package/lib/chain/regen/queued.js +4 -1
  247. package/lib/chain/regen/queued.js.map +1 -1
  248. package/lib/chain/regen/regen.d.ts.map +1 -1
  249. package/lib/chain/regen/regen.js +6 -2
  250. package/lib/chain/regen/regen.js.map +1 -1
  251. package/lib/chain/reprocess.d.ts.map +1 -1
  252. package/lib/chain/reprocess.js +2 -1
  253. package/lib/chain/reprocess.js.map +1 -1
  254. package/lib/chain/seenCache/seenAggregateAndProof.d.ts.map +1 -1
  255. package/lib/chain/seenCache/seenAggregateAndProof.js.map +1 -1
  256. package/lib/chain/seenCache/seenAttestationData.d.ts.map +1 -1
  257. package/lib/chain/seenCache/seenAttestationData.js +2 -1
  258. package/lib/chain/seenCache/seenAttestationData.js.map +1 -1
  259. package/lib/chain/seenCache/seenAttesters.d.ts.map +1 -1
  260. package/lib/chain/seenCache/seenAttesters.js.map +1 -1
  261. package/lib/chain/seenCache/seenBlockAttesters.d.ts.map +1 -1
  262. package/lib/chain/seenCache/seenBlockAttesters.js.map +1 -1
  263. package/lib/chain/seenCache/seenBlockProposers.d.ts.map +1 -1
  264. package/lib/chain/seenCache/seenBlockProposers.js.map +1 -1
  265. package/lib/chain/seenCache/seenCommittee.d.ts.map +1 -1
  266. package/lib/chain/seenCache/seenCommittee.js.map +1 -1
  267. package/lib/chain/seenCache/seenCommitteeContribution.d.ts.map +1 -1
  268. package/lib/chain/seenCache/seenCommitteeContribution.js.map +1 -1
  269. package/lib/chain/seenCache/seenExecutionPayloadBids.d.ts.map +1 -1
  270. package/lib/chain/seenCache/seenExecutionPayloadBids.js.map +1 -1
  271. package/lib/chain/seenCache/seenExecutionPayloadEnvelope.d.ts.map +1 -1
  272. package/lib/chain/seenCache/seenExecutionPayloadEnvelope.js.map +1 -1
  273. package/lib/chain/seenCache/seenGossipBlockInput.d.ts +7 -3
  274. package/lib/chain/seenCache/seenGossipBlockInput.d.ts.map +1 -1
  275. package/lib/chain/seenCache/seenGossipBlockInput.js +38 -16
  276. package/lib/chain/seenCache/seenGossipBlockInput.js.map +1 -1
  277. package/lib/chain/serializeState.js +1 -0
  278. package/lib/chain/serializeState.js.map +1 -1
  279. package/lib/chain/shufflingCache.d.ts.map +1 -1
  280. package/lib/chain/shufflingCache.js +2 -1
  281. package/lib/chain/shufflingCache.js.map +1 -1
  282. package/lib/chain/stateCache/datastore/db.d.ts.map +1 -1
  283. package/lib/chain/stateCache/datastore/db.js.map +1 -1
  284. package/lib/chain/stateCache/datastore/file.d.ts.map +1 -1
  285. package/lib/chain/stateCache/datastore/file.js.map +1 -1
  286. package/lib/chain/stateCache/fifoBlockStateCache.d.ts.map +1 -1
  287. package/lib/chain/stateCache/fifoBlockStateCache.js.map +1 -1
  288. package/lib/chain/stateCache/mapMetrics.d.ts.map +1 -1
  289. package/lib/chain/stateCache/mapMetrics.js.map +1 -1
  290. package/lib/chain/stateCache/persistentCheckpointsCache.d.ts +1 -41
  291. package/lib/chain/stateCache/persistentCheckpointsCache.d.ts.map +1 -1
  292. package/lib/chain/stateCache/persistentCheckpointsCache.js.map +1 -1
  293. package/lib/chain/stateCache/types.js +2 -1
  294. package/lib/chain/stateCache/types.js.map +1 -1
  295. package/lib/chain/validation/aggregateAndProof.js +1 -1
  296. package/lib/chain/validation/aggregateAndProof.js.map +1 -1
  297. package/lib/chain/validation/attestation.d.ts.map +1 -1
  298. package/lib/chain/validation/attestation.js +14 -7
  299. package/lib/chain/validation/attestation.js.map +1 -1
  300. package/lib/chain/validation/attesterSlashing.d.ts.map +1 -1
  301. package/lib/chain/validation/attesterSlashing.js +9 -2
  302. package/lib/chain/validation/attesterSlashing.js.map +1 -1
  303. package/lib/chain/validation/blobSidecar.js +2 -2
  304. package/lib/chain/validation/blobSidecar.js.map +1 -1
  305. package/lib/chain/validation/block.d.ts.map +1 -1
  306. package/lib/chain/validation/block.js +6 -3
  307. package/lib/chain/validation/block.js.map +1 -1
  308. package/lib/chain/validation/blsToExecutionChange.js.map +1 -1
  309. package/lib/chain/validation/dataColumnSidecar.d.ts +2 -1
  310. package/lib/chain/validation/dataColumnSidecar.d.ts.map +1 -1
  311. package/lib/chain/validation/dataColumnSidecar.js +125 -108
  312. package/lib/chain/validation/dataColumnSidecar.js.map +1 -1
  313. package/lib/chain/validation/executionPayloadBid.js +1 -2
  314. package/lib/chain/validation/executionPayloadBid.js.map +1 -1
  315. package/lib/chain/validation/executionPayloadEnvelope.js +4 -4
  316. package/lib/chain/validation/executionPayloadEnvelope.js.map +1 -1
  317. package/lib/chain/validation/lightClientFinalityUpdate.js.map +1 -1
  318. package/lib/chain/validation/lightClientOptimisticUpdate.js.map +1 -1
  319. package/lib/chain/validation/payloadAttestationMessage.js +9 -3
  320. package/lib/chain/validation/payloadAttestationMessage.js.map +1 -1
  321. package/lib/chain/validation/proposerSlashing.js +1 -1
  322. package/lib/chain/validation/proposerSlashing.js.map +1 -1
  323. package/lib/chain/validation/signatureSets/aggregateAndProof.js.map +1 -1
  324. package/lib/chain/validation/signatureSets/contributionAndProof.js.map +1 -1
  325. package/lib/chain/validation/signatureSets/selectionProof.js.map +1 -1
  326. package/lib/chain/validation/signatureSets/syncCommittee.js.map +1 -1
  327. package/lib/chain/validation/signatureSets/syncCommitteeContribution.js.map +1 -1
  328. package/lib/chain/validation/signatureSets/syncCommitteeSelectionProof.js.map +1 -1
  329. package/lib/chain/validation/syncCommittee.js.map +1 -1
  330. package/lib/chain/validation/syncCommitteeContributionAndProof.js +1 -1
  331. package/lib/chain/validation/syncCommitteeContributionAndProof.js.map +1 -1
  332. package/lib/chain/validation/voluntaryExit.js.map +1 -1
  333. package/lib/chain/validatorMonitor.d.ts.map +1 -1
  334. package/lib/chain/validatorMonitor.js +2 -1
  335. package/lib/chain/validatorMonitor.js.map +1 -1
  336. package/lib/constants/network.js +4 -2
  337. package/lib/constants/network.js.map +1 -1
  338. package/lib/db/beacon.d.ts.map +1 -1
  339. package/lib/db/beacon.js.map +1 -1
  340. package/lib/db/buckets.d.ts +23 -23
  341. package/lib/db/buckets.d.ts.map +1 -1
  342. package/lib/db/buckets.js +2 -1
  343. package/lib/db/buckets.js.map +1 -1
  344. package/lib/db/index.d.ts +1 -0
  345. package/lib/db/index.d.ts.map +1 -1
  346. package/lib/db/index.js +1 -0
  347. package/lib/db/index.js.map +1 -1
  348. package/lib/db/repositories/attesterSlashing.d.ts.map +1 -1
  349. package/lib/db/repositories/attesterSlashing.js.map +1 -1
  350. package/lib/db/repositories/backfilledRanges.d.ts.map +1 -1
  351. package/lib/db/repositories/backfilledRanges.js.map +1 -1
  352. package/lib/db/repositories/blobSidecars.d.ts.map +1 -1
  353. package/lib/db/repositories/blobSidecars.js.map +1 -1
  354. package/lib/db/repositories/blobSidecarsArchive.d.ts.map +1 -1
  355. package/lib/db/repositories/blobSidecarsArchive.js.map +1 -1
  356. package/lib/db/repositories/block.d.ts.map +1 -1
  357. package/lib/db/repositories/block.js.map +1 -1
  358. package/lib/db/repositories/blockArchive.d.ts.map +1 -1
  359. package/lib/db/repositories/blockArchive.js +1 -2
  360. package/lib/db/repositories/blockArchive.js.map +1 -1
  361. package/lib/db/repositories/blockArchiveIndex.d.ts +2 -2
  362. package/lib/db/repositories/blockArchiveIndex.js.map +1 -1
  363. package/lib/db/repositories/blsToExecutionChange.d.ts.map +1 -1
  364. package/lib/db/repositories/blsToExecutionChange.js.map +1 -1
  365. package/lib/db/repositories/checkpointState.d.ts.map +1 -1
  366. package/lib/db/repositories/checkpointState.js.map +1 -1
  367. package/lib/db/repositories/dataColumnSidecar.d.ts.map +1 -1
  368. package/lib/db/repositories/dataColumnSidecar.js.map +1 -1
  369. package/lib/db/repositories/dataColumnSidecarArchive.d.ts.map +1 -1
  370. package/lib/db/repositories/dataColumnSidecarArchive.js.map +1 -1
  371. package/lib/db/repositories/executionPayloadEnvelope.d.ts.map +1 -1
  372. package/lib/db/repositories/executionPayloadEnvelope.js.map +1 -1
  373. package/lib/db/repositories/executionPayloadEnvelopeArchive.d.ts.map +1 -1
  374. package/lib/db/repositories/executionPayloadEnvelopeArchive.js.map +1 -1
  375. package/lib/db/repositories/lightclientBestUpdate.d.ts.map +1 -1
  376. package/lib/db/repositories/lightclientBestUpdate.js.map +1 -1
  377. package/lib/db/repositories/lightclientCheckpointHeader.d.ts.map +1 -1
  378. package/lib/db/repositories/lightclientCheckpointHeader.js.map +1 -1
  379. package/lib/db/repositories/lightclientSyncCommittee.d.ts.map +1 -1
  380. package/lib/db/repositories/lightclientSyncCommittee.js.map +1 -1
  381. package/lib/db/repositories/lightclientSyncCommitteeWitness.d.ts.map +1 -1
  382. package/lib/db/repositories/lightclientSyncCommitteeWitness.js.map +1 -1
  383. package/lib/db/repositories/proposerSlashing.d.ts.map +1 -1
  384. package/lib/db/repositories/proposerSlashing.js.map +1 -1
  385. package/lib/db/repositories/stateArchive.d.ts.map +1 -1
  386. package/lib/db/repositories/stateArchive.js.map +1 -1
  387. package/lib/db/repositories/stateArchiveIndex.js.map +1 -1
  388. package/lib/db/repositories/voluntaryExit.d.ts.map +1 -1
  389. package/lib/db/repositories/voluntaryExit.js.map +1 -1
  390. package/lib/execution/builder/cache.d.ts.map +1 -1
  391. package/lib/execution/builder/cache.js.map +1 -1
  392. package/lib/execution/builder/http.d.ts.map +1 -1
  393. package/lib/execution/builder/http.js +2 -1
  394. package/lib/execution/builder/http.js.map +1 -1
  395. package/lib/execution/builder/index.js.map +1 -1
  396. package/lib/execution/builder/utils.js.map +1 -1
  397. package/lib/execution/engine/disabled.d.ts.map +1 -1
  398. package/lib/execution/engine/disabled.js.map +1 -1
  399. package/lib/execution/engine/http.d.ts +1 -0
  400. package/lib/execution/engine/http.d.ts.map +1 -1
  401. package/lib/execution/engine/http.js +3 -0
  402. package/lib/execution/engine/http.js.map +1 -1
  403. package/lib/execution/engine/index.js.map +1 -1
  404. package/lib/execution/engine/interface.js +4 -2
  405. package/lib/execution/engine/interface.js.map +1 -1
  406. package/lib/execution/engine/jsonRpcHttpClient.d.ts +10 -15
  407. package/lib/execution/engine/jsonRpcHttpClient.d.ts.map +1 -1
  408. package/lib/execution/engine/jsonRpcHttpClient.js +2 -1
  409. package/lib/execution/engine/jsonRpcHttpClient.js.map +1 -1
  410. package/lib/execution/engine/jwt.js.map +1 -1
  411. package/lib/execution/engine/mock.d.ts.map +1 -1
  412. package/lib/execution/engine/mock.js.map +1 -1
  413. package/lib/execution/engine/payloadIdCache.d.ts.map +1 -1
  414. package/lib/execution/engine/payloadIdCache.js.map +1 -1
  415. package/lib/execution/engine/types.js.map +1 -1
  416. package/lib/execution/engine/utils.d.ts +1 -1
  417. package/lib/execution/engine/utils.d.ts.map +1 -1
  418. package/lib/execution/engine/utils.js.map +1 -1
  419. package/lib/metrics/metrics/beacon.d.ts +2 -1
  420. package/lib/metrics/metrics/beacon.d.ts.map +1 -1
  421. package/lib/metrics/metrics/beacon.js +9 -3
  422. package/lib/metrics/metrics/beacon.js.map +1 -1
  423. package/lib/metrics/metrics/lodestar.d.ts +16 -11
  424. package/lib/metrics/metrics/lodestar.d.ts.map +1 -1
  425. package/lib/metrics/metrics/lodestar.js +39 -24
  426. package/lib/metrics/metrics/lodestar.js.map +1 -1
  427. package/lib/metrics/metrics.js.map +1 -1
  428. package/lib/metrics/nodeJsMetrics.js.map +1 -1
  429. package/lib/metrics/server/http.d.ts +1 -1
  430. package/lib/metrics/server/http.d.ts.map +1 -1
  431. package/lib/metrics/server/http.js.map +1 -1
  432. package/lib/metrics/utils/avgMinMax.d.ts.map +1 -1
  433. package/lib/metrics/utils/avgMinMax.js.map +1 -1
  434. package/lib/metrics/utils/gauge.d.ts.map +1 -1
  435. package/lib/metrics/utils/gauge.js.map +1 -1
  436. package/lib/metrics/utils/registryMetricCreator.d.ts.map +1 -1
  437. package/lib/metrics/utils/registryMetricCreator.js.map +1 -1
  438. package/lib/monitoring/clientStats.js.map +1 -1
  439. package/lib/monitoring/properties.d.ts.map +1 -1
  440. package/lib/monitoring/properties.js.map +1 -1
  441. package/lib/monitoring/service.d.ts +2 -2
  442. package/lib/monitoring/service.d.ts.map +1 -1
  443. package/lib/monitoring/service.js +3 -2
  444. package/lib/monitoring/service.js.map +1 -1
  445. package/lib/monitoring/system.d.ts.map +1 -1
  446. package/lib/monitoring/system.js.map +1 -1
  447. package/lib/monitoring/types.js +4 -2
  448. package/lib/monitoring/types.js.map +1 -1
  449. package/lib/network/core/events.d.ts +1 -3
  450. package/lib/network/core/events.d.ts.map +1 -1
  451. package/lib/network/core/events.js +4 -2
  452. package/lib/network/core/events.js.map +1 -1
  453. package/lib/network/core/metrics.d.ts +6 -7
  454. package/lib/network/core/metrics.d.ts.map +1 -1
  455. package/lib/network/core/metrics.js.map +1 -1
  456. package/lib/network/core/networkCore.d.ts +4 -4
  457. package/lib/network/core/networkCore.d.ts.map +1 -1
  458. package/lib/network/core/networkCore.js.map +1 -1
  459. package/lib/network/core/networkCoreWorker.js.map +1 -1
  460. package/lib/network/core/networkCoreWorkerHandler.d.ts +3 -3
  461. package/lib/network/core/networkCoreWorkerHandler.d.ts.map +1 -1
  462. package/lib/network/core/networkCoreWorkerHandler.js.map +1 -1
  463. package/lib/network/core/types.d.ts +2 -2
  464. package/lib/network/core/types.d.ts.map +1 -1
  465. package/lib/network/discv5/index.d.ts +1 -3
  466. package/lib/network/discv5/index.d.ts.map +1 -1
  467. package/lib/network/discv5/index.js.map +1 -1
  468. package/lib/network/discv5/utils.d.ts +1 -1
  469. package/lib/network/discv5/utils.d.ts.map +1 -1
  470. package/lib/network/discv5/utils.js +7 -5
  471. package/lib/network/discv5/utils.js.map +1 -1
  472. package/lib/network/discv5/worker.js.map +1 -1
  473. package/lib/network/events.d.ts +3 -4
  474. package/lib/network/events.d.ts.map +1 -1
  475. package/lib/network/events.js +4 -2
  476. package/lib/network/events.js.map +1 -1
  477. package/lib/network/forks.js.map +1 -1
  478. package/lib/network/gossip/encoding.d.ts +3 -3
  479. package/lib/network/gossip/encoding.d.ts.map +1 -1
  480. package/lib/network/gossip/encoding.js.map +1 -1
  481. package/lib/network/gossip/errors.d.ts.map +1 -1
  482. package/lib/network/gossip/errors.js.map +1 -1
  483. package/lib/network/gossip/gossipsub.d.ts +13 -4
  484. package/lib/network/gossip/gossipsub.d.ts.map +1 -1
  485. package/lib/network/gossip/gossipsub.js +56 -26
  486. package/lib/network/gossip/gossipsub.js.map +1 -1
  487. package/lib/network/gossip/interface.d.ts +3 -3
  488. package/lib/network/gossip/interface.d.ts.map +1 -1
  489. package/lib/network/gossip/interface.js +4 -2
  490. package/lib/network/gossip/interface.js.map +1 -1
  491. package/lib/network/gossip/metrics.d.ts +12 -14
  492. package/lib/network/gossip/metrics.d.ts.map +1 -1
  493. package/lib/network/gossip/metrics.js.map +1 -1
  494. package/lib/network/gossip/scoringParameters.d.ts +2 -2
  495. package/lib/network/gossip/scoringParameters.d.ts.map +1 -1
  496. package/lib/network/gossip/scoringParameters.js +1 -1
  497. package/lib/network/gossip/scoringParameters.js.map +1 -1
  498. package/lib/network/gossip/topic.d.ts +2867 -2920
  499. package/lib/network/gossip/topic.d.ts.map +1 -1
  500. package/lib/network/gossip/topic.js.map +1 -1
  501. package/lib/network/interface.d.ts +3 -3
  502. package/lib/network/interface.d.ts.map +1 -1
  503. package/lib/network/libp2p/error.js +2 -1
  504. package/lib/network/libp2p/error.js.map +1 -1
  505. package/lib/network/libp2p/index.d.ts +2 -2
  506. package/lib/network/libp2p/index.d.ts.map +1 -1
  507. package/lib/network/libp2p/index.js +42 -19
  508. package/lib/network/libp2p/index.js.map +1 -1
  509. package/lib/network/metadata.d.ts +1 -0
  510. package/lib/network/metadata.d.ts.map +1 -1
  511. package/lib/network/metadata.js +5 -2
  512. package/lib/network/metadata.js.map +1 -1
  513. package/lib/network/network.d.ts +3 -3
  514. package/lib/network/network.d.ts.map +1 -1
  515. package/lib/network/network.js +1 -1
  516. package/lib/network/network.js.map +1 -1
  517. package/lib/network/options.d.ts +2 -0
  518. package/lib/network/options.d.ts.map +1 -1
  519. package/lib/network/options.js +6 -0
  520. package/lib/network/options.js.map +1 -1
  521. package/lib/network/peers/client.js +2 -1
  522. package/lib/network/peers/client.js.map +1 -1
  523. package/lib/network/peers/datastore.d.ts +7 -8
  524. package/lib/network/peers/datastore.d.ts.map +1 -1
  525. package/lib/network/peers/datastore.js +10 -10
  526. package/lib/network/peers/datastore.js.map +1 -1
  527. package/lib/network/peers/discover.d.ts +2 -7
  528. package/lib/network/peers/discover.d.ts.map +1 -1
  529. package/lib/network/peers/discover.js +45 -12
  530. package/lib/network/peers/discover.js.map +1 -1
  531. package/lib/network/peers/peerManager.d.ts +3 -1
  532. package/lib/network/peers/peerManager.d.ts.map +1 -1
  533. package/lib/network/peers/peerManager.js +103 -53
  534. package/lib/network/peers/peerManager.js.map +1 -1
  535. package/lib/network/peers/peersData.d.ts.map +1 -1
  536. package/lib/network/peers/peersData.js +2 -1
  537. package/lib/network/peers/peersData.js.map +1 -1
  538. package/lib/network/peers/score/interface.js +4 -2
  539. package/lib/network/peers/score/interface.js.map +1 -1
  540. package/lib/network/peers/score/score.d.ts.map +1 -1
  541. package/lib/network/peers/score/score.js.map +1 -1
  542. package/lib/network/peers/score/store.d.ts.map +1 -1
  543. package/lib/network/peers/score/store.js.map +1 -1
  544. package/lib/network/peers/score/utils.js.map +1 -1
  545. package/lib/network/peers/utils/assertPeerRelevance.js +2 -1
  546. package/lib/network/peers/utils/assertPeerRelevance.js.map +1 -1
  547. package/lib/network/peers/utils/enrSubnetsDeserialize.js.map +1 -1
  548. package/lib/network/peers/utils/getConnectedPeerIds.js.map +1 -1
  549. package/lib/network/peers/utils/prioritizePeers.d.ts +3 -3
  550. package/lib/network/peers/utils/prioritizePeers.d.ts.map +1 -1
  551. package/lib/network/peers/utils/prioritizePeers.js +2 -1
  552. package/lib/network/peers/utils/prioritizePeers.js.map +1 -1
  553. package/lib/network/peers/utils/subnetMap.d.ts.map +1 -1
  554. package/lib/network/peers/utils/subnetMap.js.map +1 -1
  555. package/lib/network/processor/aggregatorTracker.d.ts.map +1 -1
  556. package/lib/network/processor/aggregatorTracker.js.map +1 -1
  557. package/lib/network/processor/extractSlotRootFns.js.map +1 -1
  558. package/lib/network/processor/gossipHandlers.d.ts.map +1 -1
  559. package/lib/network/processor/gossipHandlers.js +4 -1
  560. package/lib/network/processor/gossipHandlers.js.map +1 -1
  561. package/lib/network/processor/gossipQueues/index.js.map +1 -1
  562. package/lib/network/processor/gossipQueues/indexed.d.ts.map +1 -1
  563. package/lib/network/processor/gossipQueues/indexed.js.map +1 -1
  564. package/lib/network/processor/gossipQueues/linear.d.ts.map +1 -1
  565. package/lib/network/processor/gossipQueues/linear.js.map +1 -1
  566. package/lib/network/processor/gossipQueues/types.js +4 -2
  567. package/lib/network/processor/gossipQueues/types.js.map +1 -1
  568. package/lib/network/processor/gossipValidatorFn.js +1 -1
  569. package/lib/network/processor/gossipValidatorFn.js.map +1 -1
  570. package/lib/network/processor/index.d.ts.map +1 -1
  571. package/lib/network/processor/index.js +4 -2
  572. package/lib/network/processor/index.js.map +1 -1
  573. package/lib/network/processor/types.d.ts +1 -1
  574. package/lib/network/processor/types.d.ts.map +1 -1
  575. package/lib/network/reqresp/ReqRespBeaconNode.d.ts.map +1 -1
  576. package/lib/network/reqresp/ReqRespBeaconNode.js.map +1 -1
  577. package/lib/network/reqresp/handlers/beaconBlocksByRange.d.ts.map +1 -1
  578. package/lib/network/reqresp/handlers/beaconBlocksByRange.js +3 -2
  579. package/lib/network/reqresp/handlers/beaconBlocksByRange.js.map +1 -1
  580. package/lib/network/reqresp/handlers/beaconBlocksByRoot.js.map +1 -1
  581. package/lib/network/reqresp/handlers/blobSidecarsByRange.d.ts.map +1 -1
  582. package/lib/network/reqresp/handlers/blobSidecarsByRange.js +3 -2
  583. package/lib/network/reqresp/handlers/blobSidecarsByRange.js.map +1 -1
  584. package/lib/network/reqresp/handlers/blobSidecarsByRoot.js +1 -1
  585. package/lib/network/reqresp/handlers/blobSidecarsByRoot.js.map +1 -1
  586. package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.d.ts.map +1 -1
  587. package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.js +3 -2
  588. package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.js.map +1 -1
  589. package/lib/network/reqresp/handlers/dataColumnSidecarsByRoot.js +1 -1
  590. package/lib/network/reqresp/handlers/dataColumnSidecarsByRoot.js.map +1 -1
  591. package/lib/network/reqresp/handlers/index.js.map +1 -1
  592. package/lib/network/reqresp/handlers/lightClientBootstrap.js.map +1 -1
  593. package/lib/network/reqresp/handlers/lightClientFinalityUpdate.js.map +1 -1
  594. package/lib/network/reqresp/handlers/lightClientOptimisticUpdate.js.map +1 -1
  595. package/lib/network/reqresp/handlers/lightClientUpdatesByRange.js.map +1 -1
  596. package/lib/network/reqresp/interface.js +2 -1
  597. package/lib/network/reqresp/interface.js.map +1 -1
  598. package/lib/network/reqresp/protocols.d.ts.map +1 -1
  599. package/lib/network/reqresp/protocols.js.map +1 -1
  600. package/lib/network/reqresp/rateLimit.js.map +1 -1
  601. package/lib/network/reqresp/score.d.ts.map +1 -1
  602. package/lib/network/reqresp/score.js +0 -1
  603. package/lib/network/reqresp/score.js.map +1 -1
  604. package/lib/network/reqresp/types.js +4 -2
  605. package/lib/network/reqresp/types.js.map +1 -1
  606. package/lib/network/reqresp/utils/collect.d.ts +1 -1
  607. package/lib/network/reqresp/utils/collect.js.map +1 -1
  608. package/lib/network/reqresp/utils/collectSequentialBlocksInRange.d.ts +1 -1
  609. package/lib/network/reqresp/utils/collectSequentialBlocksInRange.js +2 -1
  610. package/lib/network/reqresp/utils/collectSequentialBlocksInRange.js.map +1 -1
  611. package/lib/network/reqresp/utils/dataColumnResponseValidation.d.ts +1 -1
  612. package/lib/network/reqresp/utils/dataColumnResponseValidation.d.ts.map +1 -1
  613. package/lib/network/reqresp/utils/dataColumnResponseValidation.js.map +1 -1
  614. package/lib/network/statusCache.d.ts.map +1 -1
  615. package/lib/network/statusCache.js.map +1 -1
  616. package/lib/network/subnets/attnetsService.d.ts.map +1 -1
  617. package/lib/network/subnets/attnetsService.js +2 -1
  618. package/lib/network/subnets/attnetsService.js.map +1 -1
  619. package/lib/network/subnets/interface.js.map +1 -1
  620. package/lib/network/subnets/syncnetsService.d.ts.map +1 -1
  621. package/lib/network/subnets/syncnetsService.js.map +1 -1
  622. package/lib/network/subnets/util.js.map +1 -1
  623. package/lib/network/util.js +2 -2
  624. package/lib/network/util.js.map +1 -1
  625. package/lib/node/nodejs.d.ts +4 -6
  626. package/lib/node/nodejs.d.ts.map +1 -1
  627. package/lib/node/nodejs.js +8 -5
  628. package/lib/node/nodejs.js.map +1 -1
  629. package/lib/node/notifier.js.map +1 -1
  630. package/lib/node/utils/interop/deposits.js.map +1 -1
  631. package/lib/node/utils/interop/state.d.ts +1 -1
  632. package/lib/node/utils/interop/state.d.ts.map +1 -1
  633. package/lib/node/utils/interop/state.js.map +1 -1
  634. package/lib/node/utils/lightclient.js.map +1 -1
  635. package/lib/node/utils/state.js.map +1 -1
  636. package/lib/sync/backfill/backfill.d.ts +1 -10
  637. package/lib/sync/backfill/backfill.d.ts.map +1 -1
  638. package/lib/sync/backfill/backfill.js +6 -3
  639. package/lib/sync/backfill/backfill.js.map +1 -1
  640. package/lib/sync/backfill/errors.js +2 -1
  641. package/lib/sync/backfill/errors.js.map +1 -1
  642. package/lib/sync/backfill/verify.js.map +1 -1
  643. package/lib/sync/interface.js +2 -1
  644. package/lib/sync/interface.js.map +1 -1
  645. package/lib/sync/range/batch.d.ts.map +1 -1
  646. package/lib/sync/range/batch.js +4 -2
  647. package/lib/sync/range/batch.js.map +1 -1
  648. package/lib/sync/range/chain.d.ts +0 -10
  649. package/lib/sync/range/chain.d.ts.map +1 -1
  650. package/lib/sync/range/chain.js +2 -1
  651. package/lib/sync/range/chain.js.map +1 -1
  652. package/lib/sync/range/range.d.ts +1 -3
  653. package/lib/sync/range/range.d.ts.map +1 -1
  654. package/lib/sync/range/range.js +5 -2
  655. package/lib/sync/range/range.js.map +1 -1
  656. package/lib/sync/range/utils/batches.js.map +1 -1
  657. package/lib/sync/range/utils/chainTarget.js.map +1 -1
  658. package/lib/sync/range/utils/hashBlocks.js.map +1 -1
  659. package/lib/sync/range/utils/peerBalancer.d.ts.map +1 -1
  660. package/lib/sync/range/utils/peerBalancer.js.map +1 -1
  661. package/lib/sync/range/utils/updateChains.js.map +1 -1
  662. package/lib/sync/sync.d.ts.map +1 -1
  663. package/lib/sync/sync.js.map +1 -1
  664. package/lib/sync/types.js +4 -2
  665. package/lib/sync/types.js.map +1 -1
  666. package/lib/sync/unknownBlock.d.ts +0 -14
  667. package/lib/sync/unknownBlock.d.ts.map +1 -1
  668. package/lib/sync/unknownBlock.js.map +1 -1
  669. package/lib/sync/utils/downloadByRange.d.ts +8 -5
  670. package/lib/sync/utils/downloadByRange.d.ts.map +1 -1
  671. package/lib/sync/utils/downloadByRange.js +8 -6
  672. package/lib/sync/utils/downloadByRange.js.map +1 -1
  673. package/lib/sync/utils/downloadByRoot.d.ts +8 -8
  674. package/lib/sync/utils/downloadByRoot.d.ts.map +1 -1
  675. package/lib/sync/utils/downloadByRoot.js +3 -2
  676. package/lib/sync/utils/downloadByRoot.js.map +1 -1
  677. package/lib/sync/utils/pendingBlocksTree.js.map +1 -1
  678. package/lib/sync/utils/remoteSyncType.d.ts +1 -1
  679. package/lib/sync/utils/remoteSyncType.d.ts.map +1 -1
  680. package/lib/sync/utils/remoteSyncType.js +4 -2
  681. package/lib/sync/utils/remoteSyncType.js.map +1 -1
  682. package/lib/util/address.js.map +1 -1
  683. package/lib/util/array.d.ts.map +1 -1
  684. package/lib/util/array.js.map +1 -1
  685. package/lib/util/asyncIterableToEvents.d.ts.map +1 -1
  686. package/lib/util/asyncIterableToEvents.js +2 -1
  687. package/lib/util/asyncIterableToEvents.js.map +1 -1
  688. package/lib/util/binarySearch.d.ts.map +1 -1
  689. package/lib/util/binarySearch.js.map +1 -1
  690. package/lib/util/bitArray.js +2 -1
  691. package/lib/util/bitArray.js.map +1 -1
  692. package/lib/util/blobs.js.map +1 -1
  693. package/lib/util/bufferPool.d.ts.map +1 -1
  694. package/lib/util/bufferPool.js +2 -1
  695. package/lib/util/bufferPool.js.map +1 -1
  696. package/lib/util/chunkify.js.map +1 -1
  697. package/lib/util/clock.d.ts +6 -0
  698. package/lib/util/clock.d.ts.map +1 -1
  699. package/lib/util/clock.js +11 -4
  700. package/lib/util/clock.js.map +1 -1
  701. package/lib/util/dataColumns.d.ts.map +1 -1
  702. package/lib/util/dataColumns.js +9 -3
  703. package/lib/util/dataColumns.js.map +1 -1
  704. package/lib/util/dependentRoot.js.map +1 -1
  705. package/lib/util/enum.js.map +1 -1
  706. package/lib/util/error.js.map +1 -1
  707. package/lib/util/eventLoop.js.map +1 -1
  708. package/lib/util/execution.d.ts.map +1 -1
  709. package/lib/util/execution.js +19 -9
  710. package/lib/util/execution.js.map +1 -1
  711. package/lib/util/file.js.map +1 -1
  712. package/lib/util/forkChoice.js.map +1 -1
  713. package/lib/util/forkName.js.map +1 -1
  714. package/lib/util/graffiti.js.map +1 -1
  715. package/lib/util/hex.js.map +1 -1
  716. package/lib/util/ip.js.map +1 -1
  717. package/lib/util/itTrigger.d.ts.map +1 -1
  718. package/lib/util/itTrigger.js.map +1 -1
  719. package/lib/util/map.d.ts.map +1 -1
  720. package/lib/util/map.js.map +1 -1
  721. package/lib/util/metadata.js.map +1 -1
  722. package/lib/util/multifork.js.map +1 -1
  723. package/lib/util/numpy.js.map +1 -1
  724. package/lib/util/peerId.js.map +1 -1
  725. package/lib/util/profile.js +2 -1
  726. package/lib/util/profile.js.map +1 -1
  727. package/lib/util/promises.js.map +1 -1
  728. package/lib/util/queue/errors.js +2 -1
  729. package/lib/util/queue/errors.js.map +1 -1
  730. package/lib/util/queue/fnQueue.d.ts.map +1 -1
  731. package/lib/util/queue/fnQueue.js.map +1 -1
  732. package/lib/util/queue/itemQueue.d.ts.map +1 -1
  733. package/lib/util/queue/itemQueue.js.map +1 -1
  734. package/lib/util/queue/options.js +2 -1
  735. package/lib/util/queue/options.js.map +1 -1
  736. package/lib/util/serializedCache.d.ts +4 -4
  737. package/lib/util/serializedCache.d.ts.map +1 -1
  738. package/lib/util/serializedCache.js +6 -4
  739. package/lib/util/serializedCache.js.map +1 -1
  740. package/lib/util/set.d.ts.map +1 -1
  741. package/lib/util/set.js.map +1 -1
  742. package/lib/util/shuffle.js.map +1 -1
  743. package/lib/util/sortBy.js.map +1 -1
  744. package/lib/util/sszBytes.js.map +1 -1
  745. package/lib/util/time.js.map +1 -1
  746. package/lib/util/timeSeries.d.ts.map +1 -1
  747. package/lib/util/timeSeries.js.map +1 -1
  748. package/lib/util/types.d.ts.map +1 -1
  749. package/lib/util/workerEvents.d.ts +1 -1
  750. package/lib/util/workerEvents.d.ts.map +1 -1
  751. package/lib/util/workerEvents.js.map +1 -1
  752. package/lib/util/wrapError.js.map +1 -1
  753. package/package.json +42 -44
  754. package/src/api/impl/beacon/blocks/index.ts +14 -2
  755. package/src/api/impl/beacon/state/index.ts +8 -8
  756. package/src/api/impl/beacon/state/utils.ts +15 -29
  757. package/src/api/impl/debug/index.ts +1 -0
  758. package/src/api/impl/node/utils.ts +3 -3
  759. package/src/api/impl/validator/index.ts +29 -16
  760. package/src/chain/archiveStore/archiveStore.ts +5 -5
  761. package/src/chain/archiveStore/historicalState/getHistoricalState.ts +10 -11
  762. package/src/chain/archiveStore/historicalState/worker.ts +3 -3
  763. package/src/chain/archiveStore/utils/archiveBlocks.ts +4 -5
  764. package/src/chain/archiveStore/utils/updateBackfillRange.ts +1 -1
  765. package/src/chain/blocks/blockInput/blockInput.ts +103 -3
  766. package/src/chain/blocks/blockInput/types.ts +18 -0
  767. package/src/chain/blocks/importBlock.ts +36 -5
  768. package/src/chain/blocks/verifyBlocksDataAvailability.ts +3 -0
  769. package/src/chain/blocks/verifyBlocksExecutionPayloads.ts +9 -2
  770. package/src/chain/blocks/verifyBlocksSanityChecks.ts +7 -2
  771. package/src/chain/blocks/writeBlockInputToDb.ts +105 -104
  772. package/src/chain/bls/multithread/index.ts +7 -7
  773. package/src/chain/bls/multithread/jobItem.ts +3 -3
  774. package/src/chain/bls/singleThread.ts +5 -5
  775. package/src/chain/bls/utils.ts +8 -5
  776. package/src/chain/chain.ts +45 -36
  777. package/src/chain/emitter.ts +3 -3
  778. package/src/chain/errors/executionPayloadBid.ts +1 -1
  779. package/src/chain/errors/executionPayloadEnvelope.ts +6 -2
  780. package/src/chain/errors/payloadAttestation.ts +1 -1
  781. package/src/chain/forkChoice/index.ts +39 -21
  782. package/src/chain/interface.ts +2 -9
  783. package/src/chain/opPools/aggregatedAttestationPool.ts +1 -1
  784. package/src/chain/produceBlock/computeNewStateRoot.ts +4 -3
  785. package/src/chain/produceBlock/produceBlockBody.ts +18 -5
  786. package/src/chain/regen/queued.ts +7 -2
  787. package/src/chain/regen/regen.ts +9 -3
  788. package/src/chain/seenCache/seenGossipBlockInput.ts +56 -18
  789. package/src/chain/validation/aggregateAndProof.ts +1 -1
  790. package/src/chain/validation/attestation.ts +14 -7
  791. package/src/chain/validation/attesterSlashing.ts +10 -1
  792. package/src/chain/validation/blobSidecar.ts +2 -2
  793. package/src/chain/validation/block.ts +9 -4
  794. package/src/chain/validation/dataColumnSidecar.ts +147 -127
  795. package/src/chain/validation/executionPayloadBid.ts +1 -2
  796. package/src/chain/validation/executionPayloadEnvelope.ts +4 -4
  797. package/src/chain/validation/payloadAttestationMessage.ts +10 -3
  798. package/src/chain/validation/proposerSlashing.ts +1 -1
  799. package/src/chain/validation/syncCommitteeContributionAndProof.ts +1 -1
  800. package/src/db/index.ts +1 -0
  801. package/src/db/repositories/blockArchive.ts +1 -2
  802. package/src/execution/engine/http.ts +3 -0
  803. package/src/metrics/metrics/beacon.ts +9 -3
  804. package/src/metrics/metrics/lodestar.ts +39 -24
  805. package/src/monitoring/service.ts +3 -2
  806. package/src/network/core/networkCore.ts +3 -3
  807. package/src/network/core/networkCoreWorkerHandler.ts +3 -3
  808. package/src/network/core/types.ts +2 -2
  809. package/src/network/discv5/utils.ts +5 -4
  810. package/src/network/events.ts +2 -1
  811. package/src/network/gossip/encoding.ts +3 -3
  812. package/src/network/gossip/gossipsub.ts +98 -32
  813. package/src/network/gossip/interface.ts +3 -3
  814. package/src/network/gossip/scoringParameters.ts +4 -4
  815. package/src/network/interface.ts +3 -3
  816. package/src/network/libp2p/index.ts +48 -21
  817. package/src/network/metadata.ts +1 -0
  818. package/src/network/network.ts +5 -4
  819. package/src/network/options.ts +8 -1
  820. package/src/network/peers/datastore.ts +13 -10
  821. package/src/network/peers/discover.ts +46 -11
  822. package/src/network/peers/peerManager.ts +118 -54
  823. package/src/network/peers/utils/prioritizePeers.ts +3 -3
  824. package/src/network/processor/gossipHandlers.ts +12 -3
  825. package/src/network/processor/gossipValidatorFn.ts +2 -2
  826. package/src/network/processor/types.ts +1 -1
  827. package/src/network/reqresp/ReqRespBeaconNode.ts +1 -1
  828. package/src/network/reqresp/handlers/beaconBlocksByRange.ts +4 -3
  829. package/src/network/reqresp/handlers/blobSidecarsByRange.ts +3 -2
  830. package/src/network/reqresp/handlers/blobSidecarsByRoot.ts +1 -1
  831. package/src/network/reqresp/handlers/dataColumnSidecarsByRange.ts +4 -3
  832. package/src/network/reqresp/handlers/dataColumnSidecarsByRoot.ts +2 -2
  833. package/src/network/reqresp/score.ts +0 -1
  834. package/src/network/reqresp/utils/collect.ts +1 -1
  835. package/src/network/reqresp/utils/collectSequentialBlocksInRange.ts +1 -1
  836. package/src/network/util.ts +2 -2
  837. package/src/node/nodejs.ts +8 -9
  838. package/src/sync/range/range.ts +1 -0
  839. package/src/sync/utils/downloadByRange.ts +12 -3
  840. package/src/sync/utils/downloadByRoot.ts +2 -2
  841. package/src/sync/utils/remoteSyncType.ts +1 -1
  842. package/src/util/clock.ts +9 -4
  843. package/src/util/dataColumns.ts +6 -2
  844. package/src/util/execution.ts +23 -12
  845. package/src/util/serializedCache.ts +7 -5
  846. package/src/util/workerEvents.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  import {PublicKey, Signature, aggregatePublicKeys, aggregateSignatures, verify} from "@chainsafe/blst";
2
- import {ISignatureSet, Index2PubkeyCache} from "@lodestar/state-transition";
2
+ import {ISignatureSet, PubkeyCache} from "@lodestar/state-transition";
3
3
  import {Metrics} from "../../metrics/index.js";
4
4
  import {IBlsVerifier} from "./interface.js";
5
5
  import {verifySignatureSetsMaybeBatch} from "./maybeBatch.js";
@@ -7,18 +7,18 @@ import {getAggregatedPubkey, getAggregatedPubkeysCount} from "./utils.js";
7
7
 
8
8
  export class BlsSingleThreadVerifier implements IBlsVerifier {
9
9
  private readonly metrics: Metrics | null;
10
- private readonly index2pubkey: Index2PubkeyCache;
10
+ private readonly pubkeyCache: PubkeyCache;
11
11
 
12
- constructor({metrics = null, index2pubkey}: {metrics: Metrics | null; index2pubkey: Index2PubkeyCache}) {
12
+ constructor({metrics = null, pubkeyCache}: {metrics: Metrics | null; pubkeyCache: PubkeyCache}) {
13
13
  this.metrics = metrics;
14
- this.index2pubkey = index2pubkey;
14
+ this.pubkeyCache = pubkeyCache;
15
15
  }
16
16
 
17
17
  async verifySignatureSets(sets: ISignatureSet[]): Promise<boolean> {
18
18
  this.metrics?.bls.aggregatedPubkeys.inc(getAggregatedPubkeysCount(sets));
19
19
 
20
20
  const setsAggregated = sets.map((set) => ({
21
- publicKey: getAggregatedPubkey(set, this.index2pubkey, this.metrics),
21
+ publicKey: getAggregatedPubkey(set, this.pubkeyCache, this.metrics),
22
22
  message: set.signingRoot,
23
23
  signature: set.signature,
24
24
  }));
@@ -1,22 +1,25 @@
1
1
  import {PublicKey, aggregatePublicKeys} from "@chainsafe/blst";
2
- import {ISignatureSet, Index2PubkeyCache, SignatureSetType} from "@lodestar/state-transition";
2
+ import {ISignatureSet, PubkeyCache, SignatureSetType} from "@lodestar/state-transition";
3
3
  import {Metrics} from "../../metrics/metrics.js";
4
4
 
5
5
  export function getAggregatedPubkey(
6
6
  signatureSet: ISignatureSet,
7
- index2pubkey: Index2PubkeyCache,
7
+ pubkeyCache: PubkeyCache,
8
8
  metrics: Metrics | null = null
9
9
  ): PublicKey {
10
10
  switch (signatureSet.type) {
11
11
  case SignatureSetType.single:
12
12
  return signatureSet.pubkey;
13
13
 
14
- case SignatureSetType.indexed:
15
- return index2pubkey[signatureSet.index];
14
+ case SignatureSetType.indexed: {
15
+ return pubkeyCache.getOrThrow(signatureSet.index);
16
+ }
16
17
 
17
18
  case SignatureSetType.aggregate: {
18
19
  const timer = metrics?.blsThreadPool.pubkeysAggregationMainThreadDuration.startTimer();
19
- const pubkeys = signatureSet.indices.map((i) => index2pubkey[i]);
20
+ const pubkeys = signatureSet.indices.map((i) => {
21
+ return pubkeyCache.getOrThrow(i);
22
+ });
20
23
  const aggregated = aggregatePublicKeys(pubkeys);
21
24
  timer?.();
22
25
  return aggregated;
@@ -1,9 +1,14 @@
1
1
  import path from "node:path";
2
2
  import {PrivateKey} from "@libp2p/interface";
3
- import {PubkeyIndexMap} from "@chainsafe/pubkey-index-map";
4
3
  import {CompositeTypeAny, TreeView, Type} from "@chainsafe/ssz";
5
4
  import {BeaconConfig} from "@lodestar/config";
6
- import {CheckpointWithHex, IForkChoice, ProtoBlock, UpdateHeadOpt} from "@lodestar/fork-choice";
5
+ import {
6
+ CheckpointWithHex,
7
+ CheckpointWithPayloadStatus,
8
+ IForkChoice,
9
+ ProtoBlock,
10
+ UpdateHeadOpt,
11
+ } from "@lodestar/fork-choice";
7
12
  import {LoggerNode} from "@lodestar/logger/node";
8
13
  import {
9
14
  BUILDER_INDEX_SELF_BUILD,
@@ -21,7 +26,7 @@ import {
21
26
  CachedBeaconStateGloas,
22
27
  EffectiveBalanceIncrements,
23
28
  EpochShuffling,
24
- Index2PubkeyCache,
29
+ PubkeyCache,
25
30
  computeAnchorCheckpoint,
26
31
  computeAttestationsRewards,
27
32
  computeBlockRewards,
@@ -59,7 +64,7 @@ import {Logger, fromHex, gweiToWei, isErrorAborted, pruneSetToMax, sleep, toRoot
59
64
  import {ProcessShutdownCallback} from "@lodestar/validator";
60
65
  import {GENESIS_EPOCH, ZERO_HASH} from "../constants/index.js";
61
66
  import {IBeaconDb} from "../db/index.js";
62
- import {BLOB_SIDECARS_IN_WRAPPER_INDEX} from "../db/repositories/blobSidecars.ts";
67
+ import {BLOB_SIDECARS_IN_WRAPPER_INDEX} from "../db/repositories/blobSidecars.js";
63
68
  import {BuilderStatus} from "../execution/builder/http.js";
64
69
  import {IExecutionBuilder, IExecutionEngine} from "../execution/index.js";
65
70
  import {Metrics} from "../metrics/index.js";
@@ -70,15 +75,15 @@ import {CustodyConfig, getValidatorsCustodyRequirement} from "../util/dataColumn
70
75
  import {callInNextEventLoop} from "../util/eventLoop.js";
71
76
  import {ensureDir, writeIfNotExist} from "../util/file.js";
72
77
  import {isOptimisticBlock} from "../util/forkChoice.js";
73
- import {JobItemQueue} from "../util/queue/itemQueue.ts";
78
+ import {JobItemQueue} from "../util/queue/itemQueue.js";
74
79
  import {SerializedCache} from "../util/serializedCache.js";
75
- import {getSlotFromSignedBeaconBlockSerialized} from "../util/sszBytes.ts";
80
+ import {getSlotFromSignedBeaconBlockSerialized} from "../util/sszBytes.js";
76
81
  import {ArchiveStore} from "./archiveStore/archiveStore.js";
77
82
  import {CheckpointBalancesCache} from "./balancesCache.js";
78
83
  import {BeaconProposerCache} from "./beaconProposerCache.js";
79
84
  import {IBlockInput, isBlockInputBlobs, isBlockInputColumns} from "./blocks/blockInput/index.js";
80
85
  import {BlockProcessor, ImportBlockOpts} from "./blocks/index.js";
81
- import {persistBlockInputs} from "./blocks/writeBlockInputToDb.ts";
86
+ import {persistBlockInput} from "./blocks/writeBlockInputToDb.js";
82
87
  import {BlsMultiThreadWorkerPool, BlsSingleThreadVerifier, IBlsVerifier} from "./bls/index.js";
83
88
  import {ColumnReconstructionTracker} from "./ColumnReconstructionTracker.js";
84
89
  import {ChainEvent, ChainEventEmitter} from "./emitter.js";
@@ -165,7 +170,7 @@ export class BeaconChain implements IBeaconChain {
165
170
  readonly lightClientServer?: LightClientServer;
166
171
  readonly reprocessController: ReprocessController;
167
172
  readonly archiveStore: ArchiveStore;
168
- readonly unfinalizedBlockWrites: JobItemQueue<[IBlockInput[]], void>;
173
+ readonly unfinalizedBlockWrites: JobItemQueue<[IBlockInput], void>;
169
174
 
170
175
  // Ops pool
171
176
  readonly attestationPool: AttestationPool;
@@ -192,8 +197,7 @@ export class BeaconChain implements IBeaconChain {
192
197
  readonly seenBlockAttesters = new SeenBlockAttesters();
193
198
 
194
199
  // Global state caches
195
- readonly pubkey2index: PubkeyIndexMap;
196
- readonly index2pubkey: Index2PubkeyCache;
200
+ readonly pubkeyCache: PubkeyCache;
197
201
 
198
202
  readonly beaconProposerCache: BeaconProposerCache;
199
203
  readonly checkpointBalancesCache: CheckpointBalancesCache;
@@ -239,8 +243,7 @@ export class BeaconChain implements IBeaconChain {
239
243
  {
240
244
  privateKey,
241
245
  config,
242
- pubkey2index,
243
- index2pubkey,
246
+ pubkeyCache,
244
247
  db,
245
248
  dbName,
246
249
  dataDir,
@@ -256,8 +259,7 @@ export class BeaconChain implements IBeaconChain {
256
259
  }: {
257
260
  privateKey: PrivateKey;
258
261
  config: BeaconConfig;
259
- pubkey2index: PubkeyIndexMap;
260
- index2pubkey: Index2PubkeyCache;
262
+ pubkeyCache: PubkeyCache;
261
263
  db: IBeaconDb;
262
264
  dbName: string;
263
265
  dataDir: string;
@@ -289,8 +291,8 @@ export class BeaconChain implements IBeaconChain {
289
291
  const emitter = new ChainEventEmitter();
290
292
  // by default, verify signatures on both main threads and worker threads
291
293
  const bls = opts.blsVerifyAllMainThread
292
- ? new BlsSingleThreadVerifier({metrics, index2pubkey})
293
- : new BlsMultiThreadWorkerPool(opts, {logger, metrics, index2pubkey});
294
+ ? new BlsSingleThreadVerifier({metrics, pubkeyCache})
295
+ : new BlsMultiThreadWorkerPool(opts, {logger, metrics, pubkeyCache});
294
296
 
295
297
  if (!clock) clock = new Clock({config, genesisTime: this.genesisTime, signal});
296
298
 
@@ -309,7 +311,9 @@ export class BeaconChain implements IBeaconChain {
309
311
 
310
312
  const nodeId = computeNodeIdFromPrivateKey(privateKey);
311
313
  const initialCustodyGroupCount = opts.initialCustodyGroupCount ?? config.CUSTODY_REQUIREMENT;
312
- this.metrics?.peerDas.targetCustodyGroupCount.set(initialCustodyGroupCount);
314
+ this.metrics?.peerDas.custodyGroupCount.set(initialCustodyGroupCount);
315
+ // TODO: backfill not implemented yet
316
+ this.metrics?.peerDas.custodyGroupsBackfilled.set(0);
313
317
  this.custodyConfig = new CustodyConfig({
314
318
  nodeId,
315
319
  config,
@@ -318,12 +322,14 @@ export class BeaconChain implements IBeaconChain {
318
322
 
319
323
  this.beaconProposerCache = new BeaconProposerCache(opts);
320
324
  this.checkpointBalancesCache = new CheckpointBalancesCache();
325
+ this.serializedCache = new SerializedCache();
321
326
  this.seenBlockInputCache = new SeenBlockInput({
322
327
  config,
323
328
  custodyConfig: this.custodyConfig,
324
329
  clock,
325
330
  chainEvents: emitter,
326
331
  signal,
332
+ serializedCache: this.serializedCache,
327
333
  metrics,
328
334
  logger,
329
335
  });
@@ -346,8 +352,7 @@ export class BeaconChain implements IBeaconChain {
346
352
  ]);
347
353
 
348
354
  // Global cache of validators pubkey/index mapping
349
- this.pubkey2index = pubkey2index;
350
- this.index2pubkey = index2pubkey;
355
+ this.pubkeyCache = pubkeyCache;
351
356
 
352
357
  const fileDataStore = opts.nHistoricalStatesFileDataStore ?? true;
353
358
  const blockStateCache = new FIFOBlockStateCache(this.opts, {metrics});
@@ -411,8 +416,6 @@ export class BeaconChain implements IBeaconChain {
411
416
  this.bls = bls;
412
417
  this.emitter = emitter;
413
418
 
414
- this.serializedCache = new SerializedCache();
415
-
416
419
  this.getBlobsTracker = new GetBlobsTracker({
417
420
  logger,
418
421
  executionEngine: this.executionEngine,
@@ -434,7 +437,7 @@ export class BeaconChain implements IBeaconChain {
434
437
  );
435
438
 
436
439
  this.unfinalizedBlockWrites = new JobItemQueue(
437
- persistBlockInputs.bind(this),
440
+ persistBlockInput.bind(this),
438
441
  {
439
442
  maxLength: DEFAULT_MAX_PENDING_UNFINALIZED_BLOCK_WRITES,
440
443
  signal,
@@ -605,7 +608,7 @@ export class BeaconChain implements IBeaconChain {
605
608
  ): Promise<{state: CachedBeaconStateAllForks | Uint8Array; executionOptimistic: boolean; finalized: boolean} | null> {
606
609
  if (opts?.allowRegen) {
607
610
  const state = await this.regen.getState(stateRoot, RegenCaller.restApi);
608
- const block = this.forkChoice.getBlock(state.latestBlockHeader.hashTreeRoot());
611
+ const block = this.forkChoice.getBlockDefaultStatus(state.latestBlockHeader.hashTreeRoot());
609
612
  const finalizedEpoch = this.forkChoice.getFinalizedCheckpoint().epoch;
610
613
  return {
611
614
  state,
@@ -621,7 +624,7 @@ export class BeaconChain implements IBeaconChain {
621
624
  // TODO: This is very inneficient for debug requests of serialized content, since it deserializes to serialize again
622
625
  const cachedStateCtx = this.regen.getStateSync(stateRoot);
623
626
  if (cachedStateCtx) {
624
- const block = this.forkChoice.getBlock(cachedStateCtx.latestBlockHeader.hashTreeRoot());
627
+ const block = this.forkChoice.getBlockDefaultStatus(cachedStateCtx.latestBlockHeader.hashTreeRoot());
625
628
  const finalizedEpoch = this.forkChoice.getFinalizedCheckpoint().epoch;
626
629
  return {
627
630
  state: cachedStateCtx,
@@ -655,7 +658,7 @@ export class BeaconChain implements IBeaconChain {
655
658
  // finalized or justified checkpoint states maynot be available with PersistentCheckpointStateCache, use getCheckpointStateOrBytes() api to get Uint8Array
656
659
  const cachedStateCtx = this.regen.getCheckpointStateSync(checkpoint);
657
660
  if (cachedStateCtx) {
658
- const block = this.forkChoice.getBlock(cachedStateCtx.latestBlockHeader.hashTreeRoot());
661
+ const block = this.forkChoice.getBlockDefaultStatus(cachedStateCtx.latestBlockHeader.hashTreeRoot());
659
662
  const finalizedEpoch = this.forkChoice.getFinalizedCheckpoint().epoch;
660
663
  return {
661
664
  state: cachedStateCtx,
@@ -672,7 +675,7 @@ export class BeaconChain implements IBeaconChain {
672
675
  ): Promise<{state: CachedBeaconStateAllForks | Uint8Array; executionOptimistic: boolean; finalized: boolean} | null> {
673
676
  const cachedStateCtx = await this.regen.getCheckpointStateOrBytes(checkpoint);
674
677
  if (cachedStateCtx) {
675
- const block = this.forkChoice.getBlock(checkpoint.root);
678
+ const block = this.forkChoice.getBlockDefaultStatus(checkpoint.root);
676
679
  const finalizedEpoch = this.forkChoice.getFinalizedCheckpoint().epoch;
677
680
  return {
678
681
  state: cachedStateCtx,
@@ -716,7 +719,7 @@ export class BeaconChain implements IBeaconChain {
716
719
  async getBlockByRoot(
717
720
  root: string
718
721
  ): Promise<{block: SignedBeaconBlock; executionOptimistic: boolean; finalized: boolean} | null> {
719
- const block = this.forkChoice.getBlockHex(root);
722
+ const block = this.forkChoice.getBlockHexDefaultStatus(root);
720
723
  if (block) {
721
724
  // Block found in fork-choice.
722
725
  // It may be in the block input cache, awaiting full DA reconstruction, check there first
@@ -740,7 +743,7 @@ export class BeaconChain implements IBeaconChain {
740
743
  async getSerializedBlockByRoot(
741
744
  root: string
742
745
  ): Promise<{block: Uint8Array; executionOptimistic: boolean; finalized: boolean; slot: Slot} | null> {
743
- const block = this.forkChoice.getBlockHex(root);
746
+ const block = this.forkChoice.getBlockHexDefaultStatus(root);
744
747
  if (block) {
745
748
  // Block found in fork-choice.
746
749
  // It may be in the block input cache, awaiting full DA reconstruction, check there first
@@ -920,7 +923,7 @@ export class BeaconChain implements IBeaconChain {
920
923
  RegenCaller.produceBlock
921
924
  );
922
925
  const proposerIndex = state.epochCtx.getBeaconProposer(slot);
923
- const proposerPubKey = this.index2pubkey[proposerIndex].toBytes();
926
+ const proposerPubKey = this.pubkeyCache.getOrThrow(proposerIndex).toBytes();
924
927
 
925
928
  const {body, produceResult, executionPayloadValue, shouldOverrideBuilder} = await produceBlockBody.call(
926
929
  this,
@@ -1191,7 +1194,7 @@ export class BeaconChain implements IBeaconChain {
1191
1194
  * @param blockState state that declares justified checkpoint `checkpoint`
1192
1195
  */
1193
1196
  private justifiedBalancesGetter(
1194
- checkpoint: CheckpointWithHex,
1197
+ checkpoint: CheckpointWithPayloadStatus,
1195
1198
  blockState: CachedBeaconStateAllForks
1196
1199
  ): EffectiveBalanceIncrements {
1197
1200
  this.metrics?.balancesCache.requests.inc();
@@ -1230,7 +1233,7 @@ export class BeaconChain implements IBeaconChain {
1230
1233
  * @param blockState state that declares justified checkpoint `checkpoint`
1231
1234
  */
1232
1235
  private closestJustifiedBalancesStateToCheckpoint(
1233
- checkpoint: CheckpointWithHex,
1236
+ checkpoint: CheckpointWithPayloadStatus,
1234
1237
  blockState: CachedBeaconStateAllForks
1235
1238
  ): {state: CachedBeaconStateAllForks; stateId: string; shouldWarn: boolean} {
1236
1239
  const state = this.regen.getCheckpointStateSync(checkpoint);
@@ -1244,7 +1247,10 @@ export class BeaconChain implements IBeaconChain {
1244
1247
  }
1245
1248
 
1246
1249
  // Find a state in the same branch of checkpoint at same epoch. Balances should exactly the same
1247
- for (const descendantBlock of this.forkChoice.forwardIterateDescendants(checkpoint.rootHex)) {
1250
+ for (const descendantBlock of this.forkChoice.forwardIterateDescendants(
1251
+ checkpoint.rootHex,
1252
+ checkpoint.payloadStatus
1253
+ )) {
1248
1254
  if (computeEpochAtSlot(descendantBlock.slot) === checkpoint.epoch) {
1249
1255
  const descendantBlockState = this.regen.getStateSync(descendantBlock.stateRoot);
1250
1256
  if (descendantBlockState) {
@@ -1260,7 +1266,10 @@ export class BeaconChain implements IBeaconChain {
1260
1266
 
1261
1267
  // Find a state in the same branch of checkpoint at a latter epoch. Balances are not the same, but should be close
1262
1268
  // Note: must call .forwardIterateDescendants() again since nodes are not sorted
1263
- for (const descendantBlock of this.forkChoice.forwardIterateDescendants(checkpoint.rootHex)) {
1269
+ for (const descendantBlock of this.forkChoice.forwardIterateDescendants(
1270
+ checkpoint.rootHex,
1271
+ checkpoint.payloadStatus
1272
+ )) {
1264
1273
  if (computeEpochAtSlot(descendantBlock.slot) > checkpoint.epoch) {
1265
1274
  const descendantBlockState = this.regen.getStateSync(descendantBlock.stateRoot);
1266
1275
  if (descendantBlockState) {
@@ -1466,7 +1475,7 @@ export class BeaconChain implements IBeaconChain {
1466
1475
  // Only update if target is increased
1467
1476
  if (targetCustodyGroupCount > this.custodyConfig.targetCustodyGroupCount) {
1468
1477
  this.custodyConfig.updateTargetCustodyGroupCount(targetCustodyGroupCount);
1469
- this.metrics?.peerDas.targetCustodyGroupCount.set(targetCustodyGroupCount);
1478
+ this.metrics?.peerDas.custodyGroupCount.set(targetCustodyGroupCount);
1470
1479
  this.logger.verbose("Updated target custody group count", {
1471
1480
  finalizedEpoch: finalizedCheckpoint.epoch,
1472
1481
  validatorCount: validatorIndices.length,
@@ -1536,7 +1545,7 @@ export class BeaconChain implements IBeaconChain {
1536
1545
  throw Error(`State is not in cache for slot ${slot}`);
1537
1546
  }
1538
1547
 
1539
- const rewards = await computeAttestationsRewards(this.config, this.pubkey2index, cachedState, validatorIds);
1548
+ const rewards = await computeAttestationsRewards(this.config, this.pubkeyCache, cachedState, validatorIds);
1540
1549
 
1541
1550
  return {rewards, executionOptimistic, finalized};
1542
1551
  }
@@ -1553,6 +1562,6 @@ export class BeaconChain implements IBeaconChain {
1553
1562
 
1554
1563
  preState = processSlots(preState, block.slot); // Dial preState's slot to block.slot
1555
1564
 
1556
- return computeSyncCommitteeRewards(this.config, this.index2pubkey, block, preState, validatorIds);
1565
+ return computeSyncCommitteeRewards(this.config, this.pubkeyCache, block, preState, validatorIds);
1557
1566
  }
1558
1567
  }
@@ -1,7 +1,7 @@
1
1
  import {EventEmitter} from "node:events";
2
2
  import {StrictEventEmitter} from "strict-event-emitter-types";
3
3
  import {routes} from "@lodestar/api";
4
- import {CheckpointWithHex} from "@lodestar/fork-choice";
4
+ import {CheckpointWithPayloadStatus} from "@lodestar/fork-choice";
5
5
  import {CachedBeaconStateAllForks} from "@lodestar/state-transition";
6
6
  import {DataColumnSidecars, RootHex, deneb, phase0} from "@lodestar/types";
7
7
  import {PeerIdStr} from "../util/peerId.js";
@@ -83,8 +83,8 @@ export type ChainEventData = {
83
83
  export type IChainEvents = ApiEvents & {
84
84
  [ChainEvent.checkpoint]: (checkpoint: phase0.Checkpoint, state: CachedBeaconStateAllForks) => void;
85
85
 
86
- [ChainEvent.forkChoiceJustified]: (checkpoint: CheckpointWithHex) => void;
87
- [ChainEvent.forkChoiceFinalized]: (checkpoint: CheckpointWithHex) => void;
86
+ [ChainEvent.forkChoiceJustified]: (checkpoint: CheckpointWithPayloadStatus) => void;
87
+ [ChainEvent.forkChoiceFinalized]: (checkpoint: CheckpointWithPayloadStatus) => void;
88
88
 
89
89
  [ChainEvent.updateTargetCustodyGroupCount]: (targetGroupCount: number) => void;
90
90
 
@@ -1,5 +1,5 @@
1
1
  import {BuilderIndex, RootHex, Slot} from "@lodestar/types";
2
- import {GossipActionError} from "./gossipValidation.ts";
2
+ import {GossipActionError} from "./gossipValidation.js";
3
3
 
4
4
  export enum ExecutionPayloadBidErrorCode {
5
5
  BUILDER_NOT_ELIGIBLE = "EXECUTION_PAYLOAD_BID_ERROR_BUILDER_NOT_ELIGIBLE",
@@ -25,9 +25,13 @@ export type ExecutionPayloadEnvelopeErrorType =
25
25
  | {
26
26
  code: ExecutionPayloadEnvelopeErrorCode.BUILDER_INDEX_MISMATCH;
27
27
  envelopeBuilderIndex: BuilderIndex;
28
- bidBuilderIndex: BuilderIndex;
28
+ bidBuilderIndex: BuilderIndex | null;
29
+ }
30
+ | {
31
+ code: ExecutionPayloadEnvelopeErrorCode.BLOCK_HASH_MISMATCH;
32
+ envelopeBlockHash: RootHex;
33
+ bidBlockHash: RootHex | null;
29
34
  }
30
- | {code: ExecutionPayloadEnvelopeErrorCode.BLOCK_HASH_MISMATCH; envelopeBlockHash: RootHex; bidBlockHash: RootHex}
31
35
  | {code: ExecutionPayloadEnvelopeErrorCode.INVALID_SIGNATURE}
32
36
  | {code: ExecutionPayloadEnvelopeErrorCode.CACHE_FAIL; blockRoot: RootHex};
33
37
 
@@ -1,5 +1,5 @@
1
1
  import {RootHex, Slot, ValidatorIndex} from "@lodestar/types";
2
- import {GossipActionError} from "./gossipValidation.ts";
2
+ import {GossipActionError} from "./gossipValidation.js";
3
3
 
4
4
  export enum PayloadAttestationErrorCode {
5
5
  NOT_CURRENT_SLOT = "PAYLOAD_ATTESTATION_ERROR_NOT_CURRENT_SLOT",
@@ -4,9 +4,11 @@ import {
4
4
  ForkChoice,
5
5
  ForkChoiceStore,
6
6
  JustifiedBalancesGetter,
7
+ PayloadStatus,
7
8
  ProtoArray,
8
9
  ProtoBlock,
9
10
  ForkChoiceOpts as RawForkChoiceOpts,
11
+ getCheckpointPayloadStatus,
10
12
  } from "@lodestar/fork-choice";
11
13
  import {ZERO_HASH_HEX} from "@lodestar/params";
12
14
  import {
@@ -104,6 +106,14 @@ export function initializeForkChoiceFromFinalizedState(
104
106
  // production code use ForkChoice constructor directly
105
107
  const forkchoiceConstructor = opts.forkchoiceConstructor ?? ForkChoice;
106
108
 
109
+ const isForkPostGloas = (state as CachedBeaconStateGloas).latestBlockHash !== undefined;
110
+
111
+ // Determine justified checkpoint payload status
112
+ const justifiedPayloadStatus = getCheckpointPayloadStatus(state, justifiedCheckpoint.epoch);
113
+
114
+ // Determine finalized checkpoint payload status
115
+ const finalizedPayloadStatus = getCheckpointPayloadStatus(state, finalizedCheckpoint.epoch);
116
+
107
117
  return new forkchoiceConstructor(
108
118
  config,
109
119
 
@@ -113,6 +123,8 @@ export function initializeForkChoiceFromFinalizedState(
113
123
  finalizedCheckpoint,
114
124
  justifiedBalances,
115
125
  justifiedBalancesGetter,
126
+ justifiedPayloadStatus,
127
+ finalizedPayloadStatus,
116
128
  {
117
129
  onJustified: (cp) => emitter.emit(ChainEvent.forkChoiceJustified, cp),
118
130
  onFinalized: (cp) => emitter.emit(ChainEvent.forkChoiceFinalized, cp),
@@ -145,15 +157,12 @@ export function initializeForkChoiceFromFinalizedState(
145
157
  : {executionPayloadBlockHash: null, executionStatus: ExecutionStatus.PreMerge}),
146
158
 
147
159
  dataAvailabilityStatus: DataAvailabilityStatus.PreData,
148
- ...(computeEpochAtSlot(blockHeader.slot) < state.config.GLOAS_FORK_EPOCH
149
- ? {
150
- builderIndex: undefined,
151
- blockHashHex: undefined,
152
- }
153
- : {
154
- builderIndex: (state as CachedBeaconStateGloas).latestExecutionPayloadBid.builderIndex,
155
- blockHashHex: toRootHex((state as CachedBeaconStateGloas).latestExecutionPayloadBid.blockHash),
156
- }),
160
+ payloadStatus: isForkPostGloas ? PayloadStatus.PENDING : PayloadStatus.FULL, // TODO GLOAS: Post-gloas how do we know if the checkpoint payload is FULL or EMPTY?
161
+ builderIndex: isForkPostGloas ? (state as CachedBeaconStateGloas).latestExecutionPayloadBid.builderIndex : null,
162
+ blockHashFromBid: isForkPostGloas
163
+ ? toRootHex((state as CachedBeaconStateGloas).latestExecutionPayloadBid.blockHash)
164
+ : null,
165
+ parentBlockHash: isForkPostGloas ? toRootHex((state as CachedBeaconStateGloas).latestBlockHash) : null,
157
166
  },
158
167
  currentSlot
159
168
  ),
@@ -196,12 +205,22 @@ export function initializeForkChoiceFromUnfinalizedState(
196
205
 
197
206
  // this is not the justified state, but there is no other ways to get justified balances
198
207
  const justifiedBalances = getEffectiveBalanceIncrementsZeroInactive(unfinalizedState);
208
+
209
+ const isForkPostGloas = (unfinalizedState as CachedBeaconStateGloas).latestBlockHash !== undefined;
210
+
211
+ // For unfinalized state, use getCheckpointPayloadStatus to determine the correct status.
212
+ // It checks state.execution_payload_availability to determine EMPTY vs FULL.
213
+ const justifiedPayloadStatus = getCheckpointPayloadStatus(unfinalizedState, justifiedCheckpoint.epoch);
214
+ const finalizedPayloadStatus = getCheckpointPayloadStatus(unfinalizedState, finalizedCheckpoint.epoch);
215
+
199
216
  const store = new ForkChoiceStore(
200
217
  currentSlot,
201
218
  justifiedCheckpoint,
202
219
  finalizedCheckpoint,
203
220
  justifiedBalances,
204
221
  justifiedBalancesGetter,
222
+ justifiedPayloadStatus,
223
+ finalizedPayloadStatus,
205
224
  {
206
225
  onJustified: (cp) => emitter.emit(ChainEvent.forkChoiceJustified, cp),
207
226
  onFinalized: (cp) => emitter.emit(ChainEvent.forkChoiceFinalized, cp),
@@ -235,15 +254,14 @@ export function initializeForkChoiceFromUnfinalizedState(
235
254
  : {executionPayloadBlockHash: null, executionStatus: ExecutionStatus.PreMerge}),
236
255
 
237
256
  dataAvailabilityStatus: DataAvailabilityStatus.PreData,
238
- ...(computeEpochAtSlot(blockHeader.slot) < unfinalizedState.config.GLOAS_FORK_EPOCH
239
- ? {
240
- builderIndex: undefined,
241
- blockHashHex: undefined,
242
- }
243
- : {
244
- builderIndex: (unfinalizedState as CachedBeaconStateGloas).latestExecutionPayloadBid.builderIndex,
245
- blockHashHex: toRootHex((unfinalizedState as CachedBeaconStateGloas).latestExecutionPayloadBid.blockHash),
246
- }),
257
+ payloadStatus: isForkPostGloas ? PayloadStatus.PENDING : PayloadStatus.FULL, // TODO GLOAS: Post-gloas how do we know if the checkpoint payload is FULL or EMPTY?
258
+ builderIndex: isForkPostGloas
259
+ ? (unfinalizedState as CachedBeaconStateGloas).latestExecutionPayloadBid.builderIndex
260
+ : null,
261
+ blockHashFromBid: isForkPostGloas
262
+ ? toRootHex((unfinalizedState as CachedBeaconStateGloas).latestExecutionPayloadBid.blockHash)
263
+ : null,
264
+ parentBlockHash: isForkPostGloas ? toRootHex((unfinalizedState as CachedBeaconStateGloas).latestBlockHash) : null,
247
265
  };
248
266
 
249
267
  const parentSlot = blockHeader.slot - 1;
@@ -285,9 +303,9 @@ export function initializeForkChoiceFromUnfinalizedState(
285
303
  };
286
304
 
287
305
  const protoArray = ProtoArray.initialize(finalizedBlock, currentSlot);
288
- protoArray.onBlock(justifiedBlock, currentSlot);
289
- protoArray.onBlock(parentBlock, currentSlot);
290
- protoArray.onBlock(headBlock, currentSlot);
306
+ protoArray.onBlock(justifiedBlock, currentSlot, null);
307
+ protoArray.onBlock(parentBlock, currentSlot, null);
308
+ protoArray.onBlock(headBlock, currentSlot, null);
291
309
 
292
310
  logger?.verbose("Initialized protoArray successfully", {...logCtx, length: protoArray.length()});
293
311
 
@@ -1,13 +1,7 @@
1
- import {PubkeyIndexMap} from "@chainsafe/pubkey-index-map";
2
1
  import {CompositeTypeAny, TreeView, Type} from "@chainsafe/ssz";
3
2
  import {BeaconConfig} from "@lodestar/config";
4
3
  import {CheckpointWithHex, IForkChoice, ProtoBlock} from "@lodestar/fork-choice";
5
- import {
6
- BeaconStateAllForks,
7
- CachedBeaconStateAllForks,
8
- EpochShuffling,
9
- Index2PubkeyCache,
10
- } from "@lodestar/state-transition";
4
+ import {BeaconStateAllForks, CachedBeaconStateAllForks, EpochShuffling, PubkeyCache} from "@lodestar/state-transition";
11
5
  import {
12
6
  BeaconBlock,
13
7
  BlindedBeaconBlock,
@@ -117,8 +111,7 @@ export interface IBeaconChain {
117
111
  readonly regen: IStateRegenerator;
118
112
  readonly lightClientServer?: LightClientServer;
119
113
  readonly reprocessController: ReprocessController;
120
- readonly pubkey2index: PubkeyIndexMap;
121
- readonly index2pubkey: Index2PubkeyCache;
114
+ readonly pubkeyCache: PubkeyCache;
122
115
  readonly archiveStore: IArchiveStore;
123
116
 
124
117
  // Ops pool
@@ -864,7 +864,7 @@ function isValidShuffling(
864
864
  // attestation's shuffling is the same as the current state's.
865
865
  // To account for skipped slots, find the first block at *or before* the pivot slot.
866
866
  const beaconBlockRootHex = blockRootHex;
867
- const beaconBlock = forkChoice.getBlockHex(beaconBlockRootHex);
867
+ const beaconBlock = forkChoice.getBlockHexDefaultStatus(beaconBlockRootHex);
868
868
  if (!beaconBlock) {
869
869
  return InvalidAttestationData.BlockNotInForkChoice;
870
870
  }
@@ -61,7 +61,6 @@ export function computeNewStateRoot(
61
61
  * Compute the state root after processing an execution payload envelope.
62
62
  * Similar to `computeNewStateRoot` but for payload envelope processing.
63
63
  *
64
- * The `postBlockState` is mutated in place, callers must ensure it is not needed afterward.
65
64
  */
66
65
  export function computeEnvelopeStateRoot(
67
66
  metrics: Metrics | null,
@@ -74,13 +73,15 @@ export function computeEnvelopeStateRoot(
74
73
  };
75
74
 
76
75
  const processEnvelopeTimer = metrics?.blockPayload.executionPayloadEnvelopeProcessingTime.startTimer();
77
- processExecutionPayloadEnvelope(postBlockState, signedEnvelope, false);
76
+ const postEnvelopeState = processExecutionPayloadEnvelope(postBlockState, signedEnvelope, false, {
77
+ dontTransferCache: true,
78
+ });
78
79
  processEnvelopeTimer?.();
79
80
 
80
81
  const hashTreeRootTimer = metrics?.stateHashTreeRootTime.startTimer({
81
82
  source: StateHashTreeRootSource.computeEnvelopeStateRoot,
82
83
  });
83
- const stateRoot = postBlockState.hashTreeRoot();
84
+ const stateRoot = postEnvelopeState.hashTreeRoot();
84
85
  hashTreeRootTimer?.();
85
86
 
86
87
  return stateRoot;
@@ -4,6 +4,7 @@ import {
4
4
  BUILDER_INDEX_SELF_BUILD,
5
5
  ForkName,
6
6
  ForkPostBellatrix,
7
+ ForkPostCapella,
7
8
  ForkPostDeneb,
8
9
  ForkPostFulu,
9
10
  ForkPostGloas,
@@ -510,9 +511,16 @@ export async function produceBlockBody<T extends BlockType>(
510
511
  // NOTE: Even though the fulu.BlobsBundle type is superficially the same as deneb.BlobsBundle, it is NOT.
511
512
  // In fulu, proofs are _cell_ proofs, vs in deneb they are _blob_ proofs.
512
513
 
514
+ const timer = this?.metrics?.peerDas.dataColumnSidecarComputationTime.startTimer();
513
515
  const cells = blobsBundle.blobs.map((blob) => kzg.computeCells(blob));
516
+ timer?.();
514
517
  if (this.opts.sanityCheckExecutionEngineBlobs) {
515
- await validateCellsAndKzgCommitments(blobsBundle.commitments, blobsBundle.proofs, cells);
518
+ const validationTimer = this.metrics?.peerDas.kzgVerificationDataColumnBatchTime.startTimer();
519
+ try {
520
+ await validateCellsAndKzgCommitments(blobsBundle.commitments, blobsBundle.proofs, cells);
521
+ } finally {
522
+ validationTimer?.();
523
+ }
516
524
  }
517
525
 
518
526
  (blockBody as deneb.BeaconBlockBody).blobKzgCommitments = blobsBundle.commitments;
@@ -567,8 +575,14 @@ export async function produceBlockBody<T extends BlockType>(
567
575
  });
568
576
  }
569
577
 
570
- if (ForkSeq[fork] >= ForkSeq.capella) {
571
- const {blsToExecutionChanges, executionPayload} = blockBody as capella.BeaconBlockBody;
578
+ if (ForkSeq[fork] >= ForkSeq.gloas) {
579
+ const {blsToExecutionChanges, payloadAttestations} = blockBody as BeaconBlockBody<ForkPostGloas>;
580
+ Object.assign(logMeta, {
581
+ blsToExecutionChanges: blsToExecutionChanges.length,
582
+ payloadAttestations: payloadAttestations.length,
583
+ });
584
+ } else if (ForkSeq[fork] >= ForkSeq.capella) {
585
+ const {blsToExecutionChanges, executionPayload} = blockBody as BeaconBlockBody<ForkPostCapella & ForkPreGloas>;
572
586
  Object.assign(logMeta, {
573
587
  blsToExecutionChanges: blsToExecutionChanges.length,
574
588
  });
@@ -716,8 +730,7 @@ export function getPayloadAttributesForSSE(
716
730
 
717
731
  let parentBlockNumber: number;
718
732
  if (isForkPostGloas(fork)) {
719
- // TODO GLOAS: revisit this after fork choice changes are merged
720
- const parentBlock = chain.forkChoice.getBlock(parentBlockRoot);
733
+ const parentBlock = chain.forkChoice.getBlockHexAndBlockHash(toRootHex(parentBlockRoot), toRootHex(parentHash));
721
734
  if (parentBlock?.executionPayloadBlockHash == null) {
722
735
  throw Error(`Parent block not found in fork choice root=${toRootHex(parentBlockRoot)}`);
723
736
  }
@@ -1,7 +1,7 @@
1
1
  import {routes} from "@lodestar/api";
2
2
  import {IForkChoice, ProtoBlock} from "@lodestar/fork-choice";
3
3
  import {CachedBeaconStateAllForks, computeEpochAtSlot} from "@lodestar/state-transition";
4
- import {BeaconBlock, Epoch, RootHex, Slot, phase0} from "@lodestar/types";
4
+ import {BeaconBlock, Epoch, RootHex, Slot, isGloasBeaconBlock, phase0} from "@lodestar/types";
5
5
  import {Logger, toRootHex} from "@lodestar/utils";
6
6
  import {Metrics} from "../../metrics/index.js";
7
7
  import {JobItemQueue} from "../../util/queue/index.js";
@@ -88,7 +88,12 @@ export class QueuedStateRegenerator implements IStateRegenerator {
88
88
  */
89
89
  getPreStateSync(block: BeaconBlock): CachedBeaconStateAllForks | null {
90
90
  const parentRoot = toRootHex(block.parentRoot);
91
- const parentBlock = this.forkChoice.getBlockHex(parentRoot);
91
+ const parentBlock = isGloasBeaconBlock(block)
92
+ ? this.forkChoice.getBlockHexAndBlockHash(
93
+ parentRoot,
94
+ toRootHex(block.body.signedExecutionPayloadBid.message.parentBlockHash)
95
+ )
96
+ : this.forkChoice.getBlockHexDefaultStatus(parentRoot);
92
97
  if (!parentBlock) {
93
98
  throw new RegenError({
94
99
  code: RegenErrorCode.BLOCK_NOT_IN_FORKCHOICE,