@lodestar/beacon-node 1.46.0-dev.4c86702f24 → 1.46.0-dev.5e77d154c5

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 (597) 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.map +1 -1
  5. package/lib/api/impl/beacon/blocks/utils.js.map +1 -1
  6. package/lib/api/impl/beacon/index.js.map +1 -1
  7. package/lib/api/impl/beacon/pool/index.d.ts +1 -1
  8. package/lib/api/impl/beacon/pool/index.d.ts.map +1 -1
  9. package/lib/api/impl/beacon/pool/index.js.map +1 -1
  10. package/lib/api/impl/beacon/rewards/index.d.ts +1 -1
  11. package/lib/api/impl/beacon/rewards/index.d.ts.map +1 -1
  12. package/lib/api/impl/beacon/rewards/index.js.map +1 -1
  13. package/lib/api/impl/beacon/state/index.d.ts +1 -1
  14. package/lib/api/impl/beacon/state/index.d.ts.map +1 -1
  15. package/lib/api/impl/beacon/state/index.js.map +1 -1
  16. package/lib/api/impl/beacon/state/utils.js.map +1 -1
  17. package/lib/api/impl/config/constants.d.ts +2 -0
  18. package/lib/api/impl/config/constants.d.ts.map +1 -1
  19. package/lib/api/impl/config/constants.js +4 -1
  20. package/lib/api/impl/config/constants.js.map +1 -1
  21. package/lib/api/impl/config/index.js.map +1 -1
  22. package/lib/api/impl/debug/index.d.ts +1 -1
  23. package/lib/api/impl/debug/index.d.ts.map +1 -1
  24. package/lib/api/impl/debug/index.js.map +1 -1
  25. package/lib/api/impl/errors.js.map +1 -1
  26. package/lib/api/impl/events/index.d.ts +1 -1
  27. package/lib/api/impl/events/index.d.ts.map +1 -1
  28. package/lib/api/impl/events/index.js.map +1 -1
  29. package/lib/api/impl/lightclient/index.d.ts +1 -1
  30. package/lib/api/impl/lightclient/index.d.ts.map +1 -1
  31. package/lib/api/impl/lightclient/index.js.map +1 -1
  32. package/lib/api/impl/lodestar/attesterSlashing.js.map +1 -1
  33. package/lib/api/impl/lodestar/index.d.ts +1 -1
  34. package/lib/api/impl/lodestar/index.d.ts.map +1 -1
  35. package/lib/api/impl/lodestar/index.js.map +1 -1
  36. package/lib/api/impl/node/index.js.map +1 -1
  37. package/lib/api/impl/node/utils.js.map +1 -1
  38. package/lib/api/impl/proof/index.js.map +1 -1
  39. package/lib/api/impl/utils.js.map +1 -1
  40. package/lib/api/impl/validator/index.d.ts.map +1 -1
  41. package/lib/api/impl/validator/index.js +7 -8
  42. package/lib/api/impl/validator/index.js.map +1 -1
  43. package/lib/api/impl/validator/utils.d.ts +1 -1
  44. package/lib/api/impl/validator/utils.d.ts.map +1 -1
  45. package/lib/api/impl/validator/utils.js.map +1 -1
  46. package/lib/api/rest/activeSockets.js.map +1 -1
  47. package/lib/api/rest/base.js.map +1 -1
  48. package/lib/api/rest/index.js.map +1 -1
  49. package/lib/api/rest/swaggerUI.js.map +1 -1
  50. package/lib/chain/ColumnReconstructionTracker.js.map +1 -1
  51. package/lib/chain/GetBlobsTracker.js.map +1 -1
  52. package/lib/chain/archiveStore/archiveStore.d.ts.map +1 -1
  53. package/lib/chain/archiveStore/archiveStore.js +18 -5
  54. package/lib/chain/archiveStore/archiveStore.js.map +1 -1
  55. package/lib/chain/archiveStore/historicalState/getHistoricalState.js.map +1 -1
  56. package/lib/chain/archiveStore/historicalState/historicalStateRegen.js.map +1 -1
  57. package/lib/chain/archiveStore/historicalState/metrics.js.map +1 -1
  58. package/lib/chain/archiveStore/historicalState/types.js +1 -2
  59. package/lib/chain/archiveStore/historicalState/types.js.map +1 -1
  60. package/lib/chain/archiveStore/historicalState/worker.js.map +1 -1
  61. package/lib/chain/archiveStore/interface.js +1 -2
  62. package/lib/chain/archiveStore/interface.js.map +1 -1
  63. package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.d.ts.map +1 -1
  64. package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.js +1 -2
  65. package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.js.map +1 -1
  66. package/lib/chain/archiveStore/utils/archiveBlocks.js.map +1 -1
  67. package/lib/chain/archiveStore/utils/pruneHistory.js.map +1 -1
  68. package/lib/chain/archiveStore/utils/updateBackfillRange.js.map +1 -1
  69. package/lib/chain/balancesCache.js.map +1 -1
  70. package/lib/chain/beaconProposerCache.js.map +1 -1
  71. package/lib/chain/blocks/blockInput/blockInput.d.ts.map +1 -1
  72. package/lib/chain/blocks/blockInput/blockInput.js.map +1 -1
  73. package/lib/chain/blocks/blockInput/errors.js +1 -2
  74. package/lib/chain/blocks/blockInput/errors.js.map +1 -1
  75. package/lib/chain/blocks/blockInput/types.js +2 -4
  76. package/lib/chain/blocks/blockInput/types.js.map +1 -1
  77. package/lib/chain/blocks/blockInput/utils.js.map +1 -1
  78. package/lib/chain/blocks/importBlock.js.map +1 -1
  79. package/lib/chain/blocks/importExecutionPayload.js +1 -2
  80. package/lib/chain/blocks/importExecutionPayload.js.map +1 -1
  81. package/lib/chain/blocks/index.js.map +1 -1
  82. package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.js.map +1 -1
  83. package/lib/chain/blocks/payloadEnvelopeInput/types.js +1 -2
  84. package/lib/chain/blocks/payloadEnvelopeInput/types.js.map +1 -1
  85. package/lib/chain/blocks/payloadEnvelopeProcessor.js.map +1 -1
  86. package/lib/chain/blocks/types.js +3 -6
  87. package/lib/chain/blocks/types.js.map +1 -1
  88. package/lib/chain/blocks/utils/chainSegment.js.map +1 -1
  89. package/lib/chain/blocks/utils/checkpoint.js.map +1 -1
  90. package/lib/chain/blocks/verifyBlock.js.map +1 -1
  91. package/lib/chain/blocks/verifyBlocksDataAvailability.js.map +1 -1
  92. package/lib/chain/blocks/verifyBlocksExecutionPayloads.js.map +1 -1
  93. package/lib/chain/blocks/verifyBlocksSanityChecks.js.map +1 -1
  94. package/lib/chain/blocks/verifyBlocksSignatures.js.map +1 -1
  95. package/lib/chain/blocks/verifyBlocksStateTransitionOnly.js.map +1 -1
  96. package/lib/chain/blocks/verifyExecutionPayloadEnvelope.js +1 -1
  97. package/lib/chain/blocks/verifyExecutionPayloadEnvelope.js.map +1 -1
  98. package/lib/chain/blocks/verifyPayloadsDataAvailability.js.map +1 -1
  99. package/lib/chain/blocks/writeBlockInputToDb.js.map +1 -1
  100. package/lib/chain/blocks/writePayloadEnvelopeInputToDb.js.map +1 -1
  101. package/lib/chain/bls/maybeBatch.js.map +1 -1
  102. package/lib/chain/bls/multithread/index.js.map +1 -1
  103. package/lib/chain/bls/multithread/jobItem.js +1 -2
  104. package/lib/chain/bls/multithread/jobItem.js.map +1 -1
  105. package/lib/chain/bls/multithread/types.js +1 -2
  106. package/lib/chain/bls/multithread/types.js.map +1 -1
  107. package/lib/chain/bls/multithread/utils.js.map +1 -1
  108. package/lib/chain/bls/multithread/worker.js.map +1 -1
  109. package/lib/chain/bls/singleThread.js.map +1 -1
  110. package/lib/chain/bls/utils.js.map +1 -1
  111. package/lib/chain/builderCircuitBreaker.js.map +1 -1
  112. package/lib/chain/chain.d.ts +2 -2
  113. package/lib/chain/chain.d.ts.map +1 -1
  114. package/lib/chain/chain.js.map +1 -1
  115. package/lib/chain/emitter.d.ts +1 -1
  116. package/lib/chain/emitter.d.ts.map +1 -1
  117. package/lib/chain/emitter.js +1 -2
  118. package/lib/chain/emitter.js.map +1 -1
  119. package/lib/chain/errors/attestationError.js +1 -2
  120. package/lib/chain/errors/attestationError.js.map +1 -1
  121. package/lib/chain/errors/attesterSlashingError.js +1 -2
  122. package/lib/chain/errors/attesterSlashingError.js.map +1 -1
  123. package/lib/chain/errors/blobSidecarError.js +1 -2
  124. package/lib/chain/errors/blobSidecarError.js.map +1 -1
  125. package/lib/chain/errors/blockError.js +1 -2
  126. package/lib/chain/errors/blockError.js.map +1 -1
  127. package/lib/chain/errors/blsToExecutionChangeError.js +1 -2
  128. package/lib/chain/errors/blsToExecutionChangeError.js.map +1 -1
  129. package/lib/chain/errors/dataColumnSidecarError.js +1 -2
  130. package/lib/chain/errors/dataColumnSidecarError.js.map +1 -1
  131. package/lib/chain/errors/executionPayloadBid.d.ts +11 -4
  132. package/lib/chain/errors/executionPayloadBid.d.ts.map +1 -1
  133. package/lib/chain/errors/executionPayloadBid.js +2 -2
  134. package/lib/chain/errors/executionPayloadBid.js.map +1 -1
  135. package/lib/chain/errors/executionPayloadEnvelope.js +1 -2
  136. package/lib/chain/errors/executionPayloadEnvelope.js.map +1 -1
  137. package/lib/chain/errors/gossipValidation.js +2 -4
  138. package/lib/chain/errors/gossipValidation.js.map +1 -1
  139. package/lib/chain/errors/lightClientError.js +2 -4
  140. package/lib/chain/errors/lightClientError.js.map +1 -1
  141. package/lib/chain/errors/payloadAttestation.js +1 -2
  142. package/lib/chain/errors/payloadAttestation.js.map +1 -1
  143. package/lib/chain/errors/proposerPreferences.js +1 -2
  144. package/lib/chain/errors/proposerPreferences.js.map +1 -1
  145. package/lib/chain/errors/proposerSlashingError.js +1 -2
  146. package/lib/chain/errors/proposerSlashingError.js.map +1 -1
  147. package/lib/chain/errors/syncCommitteeError.js +1 -2
  148. package/lib/chain/errors/syncCommitteeError.js.map +1 -1
  149. package/lib/chain/errors/voluntaryExitError.js +1 -2
  150. package/lib/chain/errors/voluntaryExitError.js.map +1 -1
  151. package/lib/chain/forkChoice/index.js +1 -2
  152. package/lib/chain/forkChoice/index.js.map +1 -1
  153. package/lib/chain/initState.d.ts +1 -1
  154. package/lib/chain/initState.d.ts.map +1 -1
  155. package/lib/chain/initState.js.map +1 -1
  156. package/lib/chain/interface.js +1 -2
  157. package/lib/chain/interface.js.map +1 -1
  158. package/lib/chain/lightClient/index.d.ts +29 -0
  159. package/lib/chain/lightClient/index.d.ts.map +1 -1
  160. package/lib/chain/lightClient/index.js.map +1 -1
  161. package/lib/chain/lightClient/proofs.js.map +1 -1
  162. package/lib/chain/opPools/aggregatedAttestationPool.d.ts.map +1 -1
  163. package/lib/chain/opPools/aggregatedAttestationPool.js +5 -6
  164. package/lib/chain/opPools/aggregatedAttestationPool.js.map +1 -1
  165. package/lib/chain/opPools/attestationPool.js.map +1 -1
  166. package/lib/chain/opPools/executionPayloadBidPool.js.map +1 -1
  167. package/lib/chain/opPools/opPool.js.map +1 -1
  168. package/lib/chain/opPools/payloadAttestationPool.js.map +1 -1
  169. package/lib/chain/opPools/proposerPreferencesPool.js.map +1 -1
  170. package/lib/chain/opPools/syncCommitteeMessagePool.js.map +1 -1
  171. package/lib/chain/opPools/syncContributionAndProofPool.js.map +1 -1
  172. package/lib/chain/opPools/types.js +2 -4
  173. package/lib/chain/opPools/types.js.map +1 -1
  174. package/lib/chain/opPools/utils.js.map +1 -1
  175. package/lib/chain/prepareNextSlot.d.ts +2 -1
  176. package/lib/chain/prepareNextSlot.d.ts.map +1 -1
  177. package/lib/chain/prepareNextSlot.js +34 -24
  178. package/lib/chain/prepareNextSlot.js.map +1 -1
  179. package/lib/chain/produceBlock/computeNewStateRoot.js.map +1 -1
  180. package/lib/chain/produceBlock/produceBlockBody.d.ts +1 -1
  181. package/lib/chain/produceBlock/produceBlockBody.d.ts.map +1 -1
  182. package/lib/chain/produceBlock/produceBlockBody.js +17 -11
  183. package/lib/chain/produceBlock/produceBlockBody.js.map +1 -1
  184. package/lib/chain/produceBlock/validateBlobsAndKzgCommitments.js.map +1 -1
  185. package/lib/chain/regen/errors.js +1 -2
  186. package/lib/chain/regen/errors.js.map +1 -1
  187. package/lib/chain/regen/interface.js +2 -4
  188. package/lib/chain/regen/interface.js.map +1 -1
  189. package/lib/chain/regen/queued.js.map +1 -1
  190. package/lib/chain/regen/regen.js.map +1 -1
  191. package/lib/chain/reprocess.js +1 -2
  192. package/lib/chain/reprocess.js.map +1 -1
  193. package/lib/chain/seenCache/seenAggregateAndProof.js.map +1 -1
  194. package/lib/chain/seenCache/seenAttestationData.js +1 -2
  195. package/lib/chain/seenCache/seenAttestationData.js.map +1 -1
  196. package/lib/chain/seenCache/seenAttesters.js.map +1 -1
  197. package/lib/chain/seenCache/seenBlockAttesters.js.map +1 -1
  198. package/lib/chain/seenCache/seenBlockProposers.js.map +1 -1
  199. package/lib/chain/seenCache/seenCommittee.js.map +1 -1
  200. package/lib/chain/seenCache/seenCommitteeContribution.js.map +1 -1
  201. package/lib/chain/seenCache/seenExecutionPayloadBids.d.ts +6 -5
  202. package/lib/chain/seenCache/seenExecutionPayloadBids.d.ts.map +1 -1
  203. package/lib/chain/seenCache/seenExecutionPayloadBids.js +16 -8
  204. package/lib/chain/seenCache/seenExecutionPayloadBids.js.map +1 -1
  205. package/lib/chain/seenCache/seenGossipBlockInput.d.ts +3 -3
  206. package/lib/chain/seenCache/seenGossipBlockInput.d.ts.map +1 -1
  207. package/lib/chain/seenCache/seenGossipBlockInput.js.map +1 -1
  208. package/lib/chain/seenCache/seenPayloadEnvelopeInput.d.ts +1 -1
  209. package/lib/chain/seenCache/seenPayloadEnvelopeInput.d.ts.map +1 -1
  210. package/lib/chain/seenCache/seenPayloadEnvelopeInput.js.map +1 -1
  211. package/lib/chain/serializeState.js.map +1 -1
  212. package/lib/chain/shufflingCache.js +1 -2
  213. package/lib/chain/shufflingCache.js.map +1 -1
  214. package/lib/chain/stateCache/datastore/db.js.map +1 -1
  215. package/lib/chain/stateCache/datastore/file.js.map +1 -1
  216. package/lib/chain/stateCache/fifoBlockStateCache.js.map +1 -1
  217. package/lib/chain/stateCache/mapMetrics.js.map +1 -1
  218. package/lib/chain/stateCache/persistentCheckpointsCache.d.ts +45 -1
  219. package/lib/chain/stateCache/persistentCheckpointsCache.d.ts.map +1 -1
  220. package/lib/chain/stateCache/persistentCheckpointsCache.js.map +1 -1
  221. package/lib/chain/stateCache/types.js +1 -2
  222. package/lib/chain/stateCache/types.js.map +1 -1
  223. package/lib/chain/validation/aggregateAndProof.js.map +1 -1
  224. package/lib/chain/validation/attestation.js.map +1 -1
  225. package/lib/chain/validation/attesterSlashing.js.map +1 -1
  226. package/lib/chain/validation/blobSidecar.js +1 -1
  227. package/lib/chain/validation/blobSidecar.js.map +1 -1
  228. package/lib/chain/validation/block.js.map +1 -1
  229. package/lib/chain/validation/blsToExecutionChange.js.map +1 -1
  230. package/lib/chain/validation/dataColumnSidecar.d.ts.map +1 -1
  231. package/lib/chain/validation/dataColumnSidecar.js +21 -16
  232. package/lib/chain/validation/dataColumnSidecar.js.map +1 -1
  233. package/lib/chain/validation/executionPayloadBid.d.ts +0 -5
  234. package/lib/chain/validation/executionPayloadBid.d.ts.map +1 -1
  235. package/lib/chain/validation/executionPayloadBid.js +74 -26
  236. package/lib/chain/validation/executionPayloadBid.js.map +1 -1
  237. package/lib/chain/validation/executionPayloadEnvelope.js.map +1 -1
  238. package/lib/chain/validation/lightClientFinalityUpdate.js.map +1 -1
  239. package/lib/chain/validation/lightClientOptimisticUpdate.js.map +1 -1
  240. package/lib/chain/validation/payloadAttestationMessage.js.map +1 -1
  241. package/lib/chain/validation/proposerPreferences.js.map +1 -1
  242. package/lib/chain/validation/proposerSlashing.js.map +1 -1
  243. package/lib/chain/validation/signatureSets/aggregateAndProof.js.map +1 -1
  244. package/lib/chain/validation/signatureSets/contributionAndProof.js.map +1 -1
  245. package/lib/chain/validation/signatureSets/selectionProof.js.map +1 -1
  246. package/lib/chain/validation/signatureSets/syncCommittee.js.map +1 -1
  247. package/lib/chain/validation/signatureSets/syncCommitteeContribution.js.map +1 -1
  248. package/lib/chain/validation/signatureSets/syncCommitteeSelectionProof.js.map +1 -1
  249. package/lib/chain/validation/syncCommittee.js.map +1 -1
  250. package/lib/chain/validation/syncCommitteeContributionAndProof.js.map +1 -1
  251. package/lib/chain/validation/voluntaryExit.js.map +1 -1
  252. package/lib/chain/validatorMonitor.js +2 -3
  253. package/lib/chain/validatorMonitor.js.map +1 -1
  254. package/lib/constants/network.js +2 -4
  255. package/lib/constants/network.js.map +1 -1
  256. package/lib/db/beacon.js.map +1 -1
  257. package/lib/db/buckets.d.ts +23 -23
  258. package/lib/db/buckets.d.ts.map +1 -1
  259. package/lib/db/buckets.js +1 -2
  260. package/lib/db/buckets.js.map +1 -1
  261. package/lib/db/repositories/attesterSlashing.js.map +1 -1
  262. package/lib/db/repositories/backfilledRanges.js.map +1 -1
  263. package/lib/db/repositories/blobSidecars.js.map +1 -1
  264. package/lib/db/repositories/blobSidecarsArchive.js.map +1 -1
  265. package/lib/db/repositories/block.js.map +1 -1
  266. package/lib/db/repositories/blockArchive.js.map +1 -1
  267. package/lib/db/repositories/blockArchiveIndex.js.map +1 -1
  268. package/lib/db/repositories/blsToExecutionChange.js.map +1 -1
  269. package/lib/db/repositories/checkpointState.js.map +1 -1
  270. package/lib/db/repositories/dataColumnSidecar.js.map +1 -1
  271. package/lib/db/repositories/dataColumnSidecarArchive.js.map +1 -1
  272. package/lib/db/repositories/executionPayloadEnvelope.js.map +1 -1
  273. package/lib/db/repositories/executionPayloadEnvelopeArchive.js.map +1 -1
  274. package/lib/db/repositories/lightclientBestUpdate.js.map +1 -1
  275. package/lib/db/repositories/lightclientCheckpointHeader.js.map +1 -1
  276. package/lib/db/repositories/lightclientSyncCommittee.js.map +1 -1
  277. package/lib/db/repositories/lightclientSyncCommitteeWitness.js.map +1 -1
  278. package/lib/db/repositories/proposerSlashing.js.map +1 -1
  279. package/lib/db/repositories/stateArchive.js.map +1 -1
  280. package/lib/db/repositories/stateArchiveIndex.js.map +1 -1
  281. package/lib/db/repositories/voluntaryExit.js.map +1 -1
  282. package/lib/execution/builder/cache.js.map +1 -1
  283. package/lib/execution/builder/http.js +1 -2
  284. package/lib/execution/builder/http.js.map +1 -1
  285. package/lib/execution/builder/index.js.map +1 -1
  286. package/lib/execution/engine/disabled.js.map +1 -1
  287. package/lib/execution/engine/http.d.ts.map +1 -1
  288. package/lib/execution/engine/http.js.map +1 -1
  289. package/lib/execution/engine/index.js.map +1 -1
  290. package/lib/execution/engine/interface.d.ts +1 -1
  291. package/lib/execution/engine/interface.js +2 -4
  292. package/lib/execution/engine/interface.js.map +1 -1
  293. package/lib/execution/engine/jsonRpcHttpClient.d.ts +13 -10
  294. package/lib/execution/engine/jsonRpcHttpClient.d.ts.map +1 -1
  295. package/lib/execution/engine/jsonRpcHttpClient.js +1 -2
  296. package/lib/execution/engine/jsonRpcHttpClient.js.map +1 -1
  297. package/lib/execution/engine/jwt.js.map +1 -1
  298. package/lib/execution/engine/mock.js.map +1 -1
  299. package/lib/execution/engine/payloadIdCache.js.map +1 -1
  300. package/lib/execution/engine/types.js +1 -1
  301. package/lib/execution/engine/types.js.map +1 -1
  302. package/lib/execution/engine/utils.d.ts +1 -1
  303. package/lib/execution/engine/utils.d.ts.map +1 -1
  304. package/lib/execution/engine/utils.js.map +1 -1
  305. package/lib/metrics/metrics/beacon.d.ts.map +1 -1
  306. package/lib/metrics/metrics/beacon.js.map +1 -1
  307. package/lib/metrics/metrics/lodestar.d.ts +2 -2
  308. package/lib/metrics/metrics/lodestar.d.ts.map +1 -1
  309. package/lib/metrics/metrics/lodestar.js +1 -1
  310. package/lib/metrics/metrics/lodestar.js.map +1 -1
  311. package/lib/metrics/metrics.js.map +1 -1
  312. package/lib/metrics/nodeJsMetrics.js.map +1 -1
  313. package/lib/metrics/server/http.d.ts +1 -1
  314. package/lib/metrics/server/http.d.ts.map +1 -1
  315. package/lib/metrics/server/http.js.map +1 -1
  316. package/lib/metrics/utils/avgMinMax.js.map +1 -1
  317. package/lib/metrics/utils/gauge.js.map +1 -1
  318. package/lib/metrics/utils/registryMetricCreator.js.map +1 -1
  319. package/lib/monitoring/clientStats.js.map +1 -1
  320. package/lib/monitoring/properties.js.map +1 -1
  321. package/lib/monitoring/service.js.map +1 -1
  322. package/lib/monitoring/system.d.ts.map +1 -1
  323. package/lib/monitoring/system.js.map +1 -1
  324. package/lib/monitoring/types.js +2 -4
  325. package/lib/monitoring/types.js.map +1 -1
  326. package/lib/network/core/events.d.ts.map +1 -1
  327. package/lib/network/core/events.js +2 -4
  328. package/lib/network/core/events.js.map +1 -1
  329. package/lib/network/core/metrics.d.ts +7 -6
  330. package/lib/network/core/metrics.d.ts.map +1 -1
  331. package/lib/network/core/metrics.js.map +1 -1
  332. package/lib/network/core/networkCore.d.ts +1 -1
  333. package/lib/network/core/networkCore.d.ts.map +1 -1
  334. package/lib/network/core/networkCore.js.map +1 -1
  335. package/lib/network/core/networkCoreWorker.js.map +1 -1
  336. package/lib/network/core/networkCoreWorkerHandler.js.map +1 -1
  337. package/lib/network/discv5/index.d.ts +1 -1
  338. package/lib/network/discv5/index.d.ts.map +1 -1
  339. package/lib/network/discv5/index.js.map +1 -1
  340. package/lib/network/discv5/utils.js +1 -2
  341. package/lib/network/discv5/utils.js.map +1 -1
  342. package/lib/network/discv5/worker.js.map +1 -1
  343. package/lib/network/events.d.ts.map +1 -1
  344. package/lib/network/events.js +2 -4
  345. package/lib/network/events.js.map +1 -1
  346. package/lib/network/forks.js.map +1 -1
  347. package/lib/network/gossip/encoding.js.map +1 -1
  348. package/lib/network/gossip/errors.js.map +1 -1
  349. package/lib/network/gossip/gossipsub.js.map +1 -1
  350. package/lib/network/gossip/interface.js +2 -4
  351. package/lib/network/gossip/interface.js.map +1 -1
  352. package/lib/network/gossip/metrics.d.ts +14 -12
  353. package/lib/network/gossip/metrics.d.ts.map +1 -1
  354. package/lib/network/gossip/metrics.js.map +1 -1
  355. package/lib/network/gossip/scoringParameters.d.ts +1 -1
  356. package/lib/network/gossip/scoringParameters.d.ts.map +1 -1
  357. package/lib/network/gossip/scoringParameters.js.map +1 -1
  358. package/lib/network/gossip/topic.d.ts +671 -26
  359. package/lib/network/gossip/topic.d.ts.map +1 -1
  360. package/lib/network/gossip/topic.js +3 -3
  361. package/lib/network/gossip/topic.js.map +1 -1
  362. package/lib/network/libp2p/error.js +1 -2
  363. package/lib/network/libp2p/error.js.map +1 -1
  364. package/lib/network/libp2p/index.js.map +1 -1
  365. package/lib/network/metadata.js +2 -4
  366. package/lib/network/metadata.js.map +1 -1
  367. package/lib/network/network.d.ts +1 -1
  368. package/lib/network/network.d.ts.map +1 -1
  369. package/lib/network/network.js.map +1 -1
  370. package/lib/network/peers/client.js +1 -2
  371. package/lib/network/peers/client.js.map +1 -1
  372. package/lib/network/peers/datastore.d.ts +3 -0
  373. package/lib/network/peers/datastore.d.ts.map +1 -1
  374. package/lib/network/peers/datastore.js.map +1 -1
  375. package/lib/network/peers/discover.d.ts +7 -0
  376. package/lib/network/peers/discover.d.ts.map +1 -1
  377. package/lib/network/peers/discover.js +2 -4
  378. package/lib/network/peers/discover.js.map +1 -1
  379. package/lib/network/peers/peerManager.d.ts +1 -0
  380. package/lib/network/peers/peerManager.d.ts.map +1 -1
  381. package/lib/network/peers/peerManager.js.map +1 -1
  382. package/lib/network/peers/peersData.js +1 -2
  383. package/lib/network/peers/peersData.js.map +1 -1
  384. package/lib/network/peers/score/interface.js +2 -4
  385. package/lib/network/peers/score/interface.js.map +1 -1
  386. package/lib/network/peers/score/score.js.map +1 -1
  387. package/lib/network/peers/score/store.js.map +1 -1
  388. package/lib/network/peers/score/utils.js.map +1 -1
  389. package/lib/network/peers/utils/assertPeerRelevance.js +1 -2
  390. package/lib/network/peers/utils/assertPeerRelevance.js.map +1 -1
  391. package/lib/network/peers/utils/enrSubnetsDeserialize.js.map +1 -1
  392. package/lib/network/peers/utils/getConnectedPeerIds.js.map +1 -1
  393. package/lib/network/peers/utils/prioritizePeers.js +1 -2
  394. package/lib/network/peers/utils/prioritizePeers.js.map +1 -1
  395. package/lib/network/peers/utils/subnetMap.js.map +1 -1
  396. package/lib/network/processor/aggregatorTracker.js.map +1 -1
  397. package/lib/network/processor/extractSlotRootFns.js.map +1 -1
  398. package/lib/network/processor/gossipHandlers.js.map +1 -1
  399. package/lib/network/processor/gossipQueues/index.js.map +1 -1
  400. package/lib/network/processor/gossipQueues/indexed.js.map +1 -1
  401. package/lib/network/processor/gossipQueues/linear.js.map +1 -1
  402. package/lib/network/processor/gossipQueues/types.js +2 -4
  403. package/lib/network/processor/gossipQueues/types.js.map +1 -1
  404. package/lib/network/processor/gossipValidatorFn.js.map +1 -1
  405. package/lib/network/processor/index.d.ts.map +1 -1
  406. package/lib/network/processor/index.js +4 -5
  407. package/lib/network/processor/index.js.map +1 -1
  408. package/lib/network/reqresp/ReqRespBeaconNode.js.map +1 -1
  409. package/lib/network/reqresp/handlers/beaconBlocksByHead.js.map +1 -1
  410. package/lib/network/reqresp/handlers/beaconBlocksByRange.js.map +1 -1
  411. package/lib/network/reqresp/handlers/beaconBlocksByRoot.js.map +1 -1
  412. package/lib/network/reqresp/handlers/blobSidecarsByRange.js.map +1 -1
  413. package/lib/network/reqresp/handlers/blobSidecarsByRoot.js.map +1 -1
  414. package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.js.map +1 -1
  415. package/lib/network/reqresp/handlers/dataColumnSidecarsByRoot.js.map +1 -1
  416. package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRange.js.map +1 -1
  417. package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRoot.js.map +1 -1
  418. package/lib/network/reqresp/handlers/index.js.map +1 -1
  419. package/lib/network/reqresp/handlers/lightClientBootstrap.js.map +1 -1
  420. package/lib/network/reqresp/handlers/lightClientFinalityUpdate.js +1 -1
  421. package/lib/network/reqresp/handlers/lightClientFinalityUpdate.js.map +1 -1
  422. package/lib/network/reqresp/handlers/lightClientOptimisticUpdate.js +1 -1
  423. package/lib/network/reqresp/handlers/lightClientOptimisticUpdate.js.map +1 -1
  424. package/lib/network/reqresp/handlers/lightClientUpdatesByRange.d.ts.map +1 -1
  425. package/lib/network/reqresp/handlers/lightClientUpdatesByRange.js +6 -2
  426. package/lib/network/reqresp/handlers/lightClientUpdatesByRange.js.map +1 -1
  427. package/lib/network/reqresp/interface.js +1 -2
  428. package/lib/network/reqresp/interface.js.map +1 -1
  429. package/lib/network/reqresp/protocols.d.ts.map +1 -1
  430. package/lib/network/reqresp/protocols.js +35 -9
  431. package/lib/network/reqresp/protocols.js.map +1 -1
  432. package/lib/network/reqresp/rateLimit.js +1 -1
  433. package/lib/network/reqresp/rateLimit.js.map +1 -1
  434. package/lib/network/reqresp/score.js.map +1 -1
  435. package/lib/network/reqresp/types.js +2 -4
  436. package/lib/network/reqresp/types.js.map +1 -1
  437. package/lib/network/reqresp/utils/collect.js.map +1 -1
  438. package/lib/network/reqresp/utils/collectSequentialBlocksInRange.js +1 -2
  439. package/lib/network/reqresp/utils/collectSequentialBlocksInRange.js.map +1 -1
  440. package/lib/network/reqresp/utils/dataColumnResponseValidation.d.ts +1 -1
  441. package/lib/network/reqresp/utils/dataColumnResponseValidation.d.ts.map +1 -1
  442. package/lib/network/reqresp/utils/dataColumnResponseValidation.js.map +1 -1
  443. package/lib/network/statusCache.js.map +1 -1
  444. package/lib/network/subnets/attnetsService.js +1 -2
  445. package/lib/network/subnets/attnetsService.js.map +1 -1
  446. package/lib/network/subnets/interface.js.map +1 -1
  447. package/lib/network/subnets/syncnetsService.d.ts.map +1 -1
  448. package/lib/network/subnets/syncnetsService.js.map +1 -1
  449. package/lib/network/subnets/util.js.map +1 -1
  450. package/lib/network/util.js.map +1 -1
  451. package/lib/node/nodejs.d.ts +2 -2
  452. package/lib/node/nodejs.d.ts.map +1 -1
  453. package/lib/node/nodejs.js +1 -2
  454. package/lib/node/nodejs.js.map +1 -1
  455. package/lib/node/notifier.js.map +1 -1
  456. package/lib/node/utils/interop/deposits.js.map +1 -1
  457. package/lib/node/utils/interop/state.d.ts +1 -1
  458. package/lib/node/utils/interop/state.d.ts.map +1 -1
  459. package/lib/node/utils/interop/state.js.map +1 -1
  460. package/lib/node/utils/lightclient.js.map +1 -1
  461. package/lib/node/utils/state.js.map +1 -1
  462. package/lib/sync/backfill/backfill.d.ts +7 -0
  463. package/lib/sync/backfill/backfill.d.ts.map +1 -1
  464. package/lib/sync/backfill/backfill.js +3 -6
  465. package/lib/sync/backfill/backfill.js.map +1 -1
  466. package/lib/sync/backfill/errors.js +1 -2
  467. package/lib/sync/backfill/errors.js.map +1 -1
  468. package/lib/sync/backfill/verify.js.map +1 -1
  469. package/lib/sync/constants.d.ts +6 -5
  470. package/lib/sync/constants.d.ts.map +1 -1
  471. package/lib/sync/constants.js +6 -5
  472. package/lib/sync/constants.js.map +1 -1
  473. package/lib/sync/interface.js +1 -2
  474. package/lib/sync/interface.js.map +1 -1
  475. package/lib/sync/range/batch.d.ts +10 -1
  476. package/lib/sync/range/batch.d.ts.map +1 -1
  477. package/lib/sync/range/batch.js +44 -16
  478. package/lib/sync/range/batch.js.map +1 -1
  479. package/lib/sync/range/chain.d.ts +10 -0
  480. package/lib/sync/range/chain.d.ts.map +1 -1
  481. package/lib/sync/range/chain.js +31 -17
  482. package/lib/sync/range/chain.js.map +1 -1
  483. package/lib/sync/range/range.d.ts.map +1 -1
  484. package/lib/sync/range/range.js +2 -4
  485. package/lib/sync/range/range.js.map +1 -1
  486. package/lib/sync/range/utils/batches.d.ts +18 -0
  487. package/lib/sync/range/utils/batches.d.ts.map +1 -1
  488. package/lib/sync/range/utils/batches.js +38 -0
  489. package/lib/sync/range/utils/batches.js.map +1 -1
  490. package/lib/sync/range/utils/chainTarget.js.map +1 -1
  491. package/lib/sync/range/utils/hashBlocks.js.map +1 -1
  492. package/lib/sync/range/utils/peerBalancer.js.map +1 -1
  493. package/lib/sync/range/utils/updateChains.js.map +1 -1
  494. package/lib/sync/sync.js.map +1 -1
  495. package/lib/sync/types.js +3 -6
  496. package/lib/sync/types.js.map +1 -1
  497. package/lib/sync/unknownBlock.d.ts +23 -0
  498. package/lib/sync/unknownBlock.d.ts.map +1 -1
  499. package/lib/sync/unknownBlock.js.map +1 -1
  500. package/lib/sync/utils/downloadByRange.d.ts +4 -4
  501. package/lib/sync/utils/downloadByRange.d.ts.map +1 -1
  502. package/lib/sync/utils/downloadByRange.js +1 -2
  503. package/lib/sync/utils/downloadByRange.js.map +1 -1
  504. package/lib/sync/utils/downloadByRoot.d.ts +7 -7
  505. package/lib/sync/utils/downloadByRoot.d.ts.map +1 -1
  506. package/lib/sync/utils/downloadByRoot.js +1 -2
  507. package/lib/sync/utils/downloadByRoot.js.map +1 -1
  508. package/lib/sync/utils/pendingBlocksTree.js.map +1 -1
  509. package/lib/sync/utils/rateLimit.js.map +1 -1
  510. package/lib/sync/utils/remoteSyncType.d.ts.map +1 -1
  511. package/lib/sync/utils/remoteSyncType.js +2 -4
  512. package/lib/sync/utils/remoteSyncType.js.map +1 -1
  513. package/lib/util/address.js.map +1 -1
  514. package/lib/util/array.js.map +1 -1
  515. package/lib/util/asyncIterableToEvents.js +1 -2
  516. package/lib/util/asyncIterableToEvents.js.map +1 -1
  517. package/lib/util/binarySearch.js.map +1 -1
  518. package/lib/util/bitArray.js +1 -2
  519. package/lib/util/bitArray.js.map +1 -1
  520. package/lib/util/blobs.js.map +1 -1
  521. package/lib/util/bufferPool.js +1 -2
  522. package/lib/util/bufferPool.js.map +1 -1
  523. package/lib/util/chunkify.js.map +1 -1
  524. package/lib/util/clock.js +1 -2
  525. package/lib/util/clock.js.map +1 -1
  526. package/lib/util/dataColumns.js +2 -4
  527. package/lib/util/dataColumns.js.map +1 -1
  528. package/lib/util/dependentRoot.js.map +1 -1
  529. package/lib/util/enum.js.map +1 -1
  530. package/lib/util/error.js.map +1 -1
  531. package/lib/util/eventLoop.js.map +1 -1
  532. package/lib/util/execution.js +1 -2
  533. package/lib/util/execution.js.map +1 -1
  534. package/lib/util/file.js.map +1 -1
  535. package/lib/util/forkChoice.js.map +1 -1
  536. package/lib/util/forkName.js.map +1 -1
  537. package/lib/util/graffiti.js.map +1 -1
  538. package/lib/util/hex.js.map +1 -1
  539. package/lib/util/ip.js.map +1 -1
  540. package/lib/util/itTrigger.js.map +1 -1
  541. package/lib/util/map.js.map +1 -1
  542. package/lib/util/metadata.js.map +1 -1
  543. package/lib/util/multifork.js.map +1 -1
  544. package/lib/util/numpy.js.map +1 -1
  545. package/lib/util/peerId.js.map +1 -1
  546. package/lib/util/profile.js +1 -2
  547. package/lib/util/profile.js.map +1 -1
  548. package/lib/util/promises.js.map +1 -1
  549. package/lib/util/queue/errors.js +1 -2
  550. package/lib/util/queue/errors.js.map +1 -1
  551. package/lib/util/queue/fnQueue.js.map +1 -1
  552. package/lib/util/queue/itemQueue.d.ts.map +1 -1
  553. package/lib/util/queue/itemQueue.js.map +1 -1
  554. package/lib/util/queue/options.js +1 -2
  555. package/lib/util/queue/options.js.map +1 -1
  556. package/lib/util/serializedCache.js.map +1 -1
  557. package/lib/util/set.js.map +1 -1
  558. package/lib/util/shuffle.js.map +1 -1
  559. package/lib/util/sortBy.js.map +1 -1
  560. package/lib/util/sszBytes.js +1 -1
  561. package/lib/util/sszBytes.js.map +1 -1
  562. package/lib/util/time.js.map +1 -1
  563. package/lib/util/timeSeries.js.map +1 -1
  564. package/lib/util/types.d.ts.map +1 -1
  565. package/lib/util/workerEvents.d.ts +1 -1
  566. package/lib/util/workerEvents.d.ts.map +1 -1
  567. package/lib/util/workerEvents.js.map +1 -1
  568. package/lib/util/wrapError.js.map +1 -1
  569. package/package.json +16 -16
  570. package/src/api/impl/config/constants.ts +6 -0
  571. package/src/api/impl/validator/index.ts +5 -4
  572. package/src/chain/archiveStore/archiveStore.ts +20 -3
  573. package/src/chain/blocks/verifyExecutionPayloadEnvelope.ts +1 -1
  574. package/src/chain/errors/executionPayloadBid.ts +12 -4
  575. package/src/chain/opPools/aggregatedAttestationPool.ts +4 -2
  576. package/src/chain/prepareNextSlot.ts +59 -34
  577. package/src/chain/produceBlock/produceBlockBody.ts +17 -5
  578. package/src/chain/seenCache/seenExecutionPayloadBids.ts +22 -9
  579. package/src/chain/validation/blobSidecar.ts +1 -1
  580. package/src/chain/validation/dataColumnSidecar.ts +27 -17
  581. package/src/chain/validation/executionPayloadBid.ts +91 -27
  582. package/src/chain/validatorMonitor.ts +1 -1
  583. package/src/execution/engine/interface.ts +1 -1
  584. package/src/execution/engine/types.ts +1 -1
  585. package/src/metrics/metrics/lodestar.ts +1 -1
  586. package/src/network/gossip/topic.ts +4 -2
  587. package/src/network/processor/index.ts +2 -1
  588. package/src/network/reqresp/handlers/lightClientFinalityUpdate.ts +1 -1
  589. package/src/network/reqresp/handlers/lightClientOptimisticUpdate.ts +1 -1
  590. package/src/network/reqresp/handlers/lightClientUpdatesByRange.ts +6 -2
  591. package/src/network/reqresp/protocols.ts +39 -11
  592. package/src/network/reqresp/rateLimit.ts +1 -1
  593. package/src/sync/constants.ts +6 -5
  594. package/src/sync/range/batch.ts +50 -12
  595. package/src/sync/range/chain.ts +36 -16
  596. package/src/sync/range/utils/batches.ts +44 -0
  597. package/src/util/sszBytes.ts +1 -1
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "bugs": {
12
12
  "url": "https://github.com/ChainSafe/lodestar/issues"
13
13
  },
14
- "version": "1.46.0-dev.4c86702f24",
14
+ "version": "1.46.0-dev.5e77d154c5",
15
15
  "type": "module",
16
16
  "exports": {
17
17
  ".": {
@@ -77,11 +77,11 @@
77
77
  ],
78
78
  "scripts": {
79
79
  "clean": "rm -rf lib && rm -f *.tsbuildinfo",
80
- "build": "tsgo -p tsconfig.build.json",
80
+ "build": "tsc -p tsconfig.build.json",
81
81
  "build:watch": "pnpm run build --watch",
82
82
  "build:release": "pnpm clean && pnpm run build",
83
83
  "check-build": "node -e \"(async function() { await import('./lib/index.js') })()\"",
84
- "check-types": "tsgo",
84
+ "check-types": "tsc",
85
85
  "lint": "biome check src/ test/",
86
86
  "lint:fix": "pnpm run lint --write",
87
87
  "test": "pnpm test:unit && pnpm test:e2e",
@@ -126,17 +126,17 @@
126
126
  "@libp2p/peer-id": "^6.0.4",
127
127
  "@libp2p/prometheus-metrics": "^5.0.14",
128
128
  "@libp2p/tcp": "^11.0.13",
129
- "@lodestar/api": "^1.46.0-dev.4c86702f24",
130
- "@lodestar/config": "^1.46.0-dev.4c86702f24",
131
- "@lodestar/db": "^1.46.0-dev.4c86702f24",
132
- "@lodestar/fork-choice": "^1.46.0-dev.4c86702f24",
133
- "@lodestar/logger": "^1.46.0-dev.4c86702f24",
134
- "@lodestar/params": "^1.46.0-dev.4c86702f24",
135
- "@lodestar/reqresp": "^1.46.0-dev.4c86702f24",
136
- "@lodestar/state-transition": "^1.46.0-dev.4c86702f24",
137
- "@lodestar/types": "^1.46.0-dev.4c86702f24",
138
- "@lodestar/utils": "^1.46.0-dev.4c86702f24",
139
- "@lodestar/validator": "^1.46.0-dev.4c86702f24",
129
+ "@lodestar/api": "^1.46.0-dev.5e77d154c5",
130
+ "@lodestar/config": "^1.46.0-dev.5e77d154c5",
131
+ "@lodestar/db": "^1.46.0-dev.5e77d154c5",
132
+ "@lodestar/fork-choice": "^1.46.0-dev.5e77d154c5",
133
+ "@lodestar/logger": "^1.46.0-dev.5e77d154c5",
134
+ "@lodestar/params": "^1.46.0-dev.5e77d154c5",
135
+ "@lodestar/reqresp": "^1.46.0-dev.5e77d154c5",
136
+ "@lodestar/state-transition": "^1.46.0-dev.5e77d154c5",
137
+ "@lodestar/types": "^1.46.0-dev.5e77d154c5",
138
+ "@lodestar/utils": "^1.46.0-dev.5e77d154c5",
139
+ "@lodestar/validator": "^1.46.0-dev.5e77d154c5",
140
140
  "@multiformats/multiaddr": "^13.0.1",
141
141
  "datastore-core": "^11.0.2",
142
142
  "datastore-level": "^12.0.2",
@@ -158,7 +158,7 @@
158
158
  "@libp2p/interface-internal": "^3.0.13",
159
159
  "@libp2p/logger": "^6.2.2",
160
160
  "@libp2p/utils": "^7.0.13",
161
- "@lodestar/spec-test-util": "^1.46.0-dev.4c86702f24",
161
+ "@lodestar/spec-test-util": "^1.46.0-dev.5e77d154c5",
162
162
  "@types/js-yaml": "^4.0.5",
163
163
  "@types/qs": "^6.9.7",
164
164
  "@types/tmp": "^0.2.3",
@@ -175,5 +175,5 @@
175
175
  "beacon",
176
176
  "blockchain"
177
177
  ],
178
- "gitHead": "f3ea5e32becacc19c1b203b6a355a196e9d70635"
178
+ "gitHead": "06901e757968d25e5810ed5cd4a5ed8144a2f149"
179
179
  }
@@ -12,6 +12,7 @@ import {
12
12
  BUILDER_PAYMENT_THRESHOLD_DENOMINATOR,
13
13
  BUILDER_PAYMENT_THRESHOLD_NUMERATOR,
14
14
  BUILDER_WITHDRAWAL_PREFIX,
15
+ BYTES_PER_FIELD_ELEMENT,
15
16
  COMPOUNDING_WITHDRAWAL_PREFIX,
16
17
  CONSOLIDATION_REQUEST_TYPE,
17
18
  DEPOSIT_CONTRACT_TREE_DEPTH,
@@ -26,6 +27,7 @@ import {
26
27
  DOMAIN_BUILDER_DEPOSIT,
27
28
  DOMAIN_CONTRIBUTION_AND_PROOF,
28
29
  DOMAIN_DEPOSIT,
30
+ DOMAIN_INCLUSION_LIST_COMMITTEE,
29
31
  DOMAIN_PROPOSER_PREFERENCES,
30
32
  DOMAIN_PTC_ATTESTER,
31
33
  DOMAIN_RANDAO,
@@ -131,6 +133,7 @@ export const specConstants = {
131
133
  // Deneb types
132
134
  BLOB_TX_TYPE: toHexByte(BLOB_TX_TYPE),
133
135
  VERSIONED_HASH_VERSION_KZG: toHexByte(VERSIONED_HASH_VERSION_KZG),
136
+ BYTES_PER_FIELD_ELEMENT,
134
137
 
135
138
  // electra
136
139
  UNSET_DEPOSIT_REQUESTS_START_INDEX,
@@ -148,6 +151,9 @@ export const specConstants = {
148
151
  DOMAIN_BUILDER_DEPOSIT,
149
152
  BUILDER_DEPOSIT_REQUEST_TYPE: toHexByte(BUILDER_DEPOSIT_REQUEST_TYPE),
150
153
  BUILDER_EXIT_REQUEST_TYPE: toHexByte(BUILDER_EXIT_REQUEST_TYPE),
154
+
155
+ // heze
156
+ DOMAIN_INCLUSION_LIST_COMMITTEE,
151
157
  };
152
158
 
153
159
  /** Convert single-byte numbers to hex strings for API spec compliance */
@@ -342,9 +342,10 @@ export function getValidatorApi(
342
342
  * 3. ProduceBlock if the parentRoot (chain's current head is optimistic). However this doesn't
343
343
  * need to be checked/aborted here as assembleBody would call EL's api for the latest
344
344
  * executionStatus of the parentRoot. If still not validated, produceBlock will throw error.
345
- *
346
- * TODO/PENDING: SyncCommitteeSignatures should also be aborted, the best way to address this
347
- * is still in flux and will be updated as and when other CL's figure this out.
345
+ * 4. SyncCommitteeSignature (base sync committee message) is aborted in the validator client
346
+ * (see SyncCommitteeService) when the head root it would sign is optimistic, since it is
347
+ * produced from the head root without a beacon-node produce endpoint to gate here. Spec:
348
+ * https://github.com/ethereum/consensus-specs/blob/v1.6.1/sync/optimistic.md#participating-in-sync-committees
348
349
  */
349
350
 
350
351
  function notOnOptimisticBlockRoot(beaconBlockRoot: Root): void {
@@ -1808,7 +1809,7 @@ export function getValidatorApi(
1808
1809
  const filteredRegistrations = registrations.filter((registration) => {
1809
1810
  const {pubkey} = registration.message;
1810
1811
  const validatorIndex = chain.pubkeyCache.getIndex(pubkey);
1811
- if (validatorIndex === null) return false;
1812
+ if (validatorIndex === null || validatorIndex >= headState.validatorCount) return false;
1812
1813
 
1813
1814
  const validator = headState.getValidator(validatorIndex);
1814
1815
  const status = getValidatorStatus(validator, currentEpoch);
@@ -4,6 +4,7 @@ import {Checkpoint} from "@lodestar/types/phase0";
4
4
  import {callFnWhenAwait} from "@lodestar/utils";
5
5
  import {IBeaconDb} from "../../db/index.js";
6
6
  import {Metrics} from "../../metrics/metrics.js";
7
+ import {callInNextEventLoop} from "../../util/eventLoop.js";
7
8
  import {isOptimisticBlock} from "../../util/forkChoice.js";
8
9
  import {JobItemQueue, isQueueErrorAborted} from "../../util/queue/index.js";
9
10
  import {ChainEvent} from "../emitter.js";
@@ -166,9 +167,25 @@ export class ArchiveStore {
166
167
  // Event handlers
167
168
  //-------------------------------------------------------------------------
168
169
  private onFinalizedCheckpoint = (finalized: CheckpointWithHex): void => {
169
- this.jobQueue.push(finalized).catch((e) => {
170
- if (!isQueueErrorAborted(e)) {
171
- this.logger.error("Error queuing finalized checkpoint", {epoch: finalized.epoch}, e as Error);
170
+ // Decouple finalized-checkpoint processing from block import. This handler runs synchronously
171
+ // inside the `ChainEvent.forkChoiceFinalized` emit from `forkChoice.onBlock()` during
172
+ // `importBlock()`; deferring the work to the next event-loop tick keeps any failure here off the
173
+ // import call stack, so it can't abort `importBlock()` before `regen.processState()` caches the
174
+ // head post-state — the deep-sync wedge this PR fixes (#9716).
175
+ //
176
+ // `jobQueue.push()` can throw synchronously (queue aborted / full) or reject asynchronously;
177
+ // awaiting it inside the deferred callback funnels both failure modes into the one catch.
178
+ callInNextEventLoop(async () => {
179
+ try {
180
+ await this.jobQueue.push(finalized);
181
+ } catch (e) {
182
+ if (!isQueueErrorAborted(e)) {
183
+ this.logger.error(
184
+ "Error queuing finalized checkpoint",
185
+ {epoch: finalized.epoch, rootHex: finalized.rootHex},
186
+ e as Error
187
+ );
188
+ }
172
189
  }
173
190
  });
174
191
  };
@@ -61,7 +61,7 @@ export function verifyExecutionPayloadEnvelope(
61
61
  `Prev randao mismatch between bid and payload bid=${toHex(bid.prevRandao)} payload=${toHex(payload.prevRandao)}`
62
62
  );
63
63
  }
64
- if (bid.gasLimit !== payload.gasLimit) {
64
+ if (bid.gasLimit !== BigInt(payload.gasLimit)) {
65
65
  throw new Error(`Gas limit mismatch between payload and bid payload=${payload.gasLimit} bid=${bid.gasLimit}`);
66
66
  }
67
67
  if (!byteArrayEquals(bid.blockHash, payload.blockHash)) {
@@ -5,6 +5,7 @@ export enum ExecutionPayloadBidErrorCode {
5
5
  BUILDER_NOT_ELIGIBLE = "EXECUTION_PAYLOAD_BID_ERROR_BUILDER_NOT_ELIGIBLE",
6
6
  INVALID_BUILDER_VERSION = "EXECUTION_PAYLOAD_BID_ERROR_INVALID_BUILDER_VERSION",
7
7
  NON_ZERO_EXECUTION_PAYMENT = "EXECUTION_PAYLOAD_BID_ERROR_NON_ZERO_EXECUTION_PAYMENT",
8
+ INCOMPATIBLE_WITH_HEAD = "EXECUTION_PAYLOAD_BID_ERROR_INCOMPATIBLE_WITH_HEAD",
8
9
  BID_ALREADY_KNOWN = "EXECUTION_PAYLOAD_BID_ERROR_BID_ALREADY_KNOWN",
9
10
  BID_TOO_LOW = "EXECUTION_PAYLOAD_BID_ERROR_BID_TOO_LOW",
10
11
  BID_TOO_HIGH = "EXECUTION_PAYLOAD_BID_ERROR_BID_TOO_HIGH",
@@ -31,7 +32,14 @@ export type ExecutionPayloadBidErrorType =
31
32
  | {
32
33
  code: ExecutionPayloadBidErrorCode.NON_ZERO_EXECUTION_PAYMENT;
33
34
  builderIndex: BuilderIndex;
34
- executionPayment: number;
35
+ executionPayment: bigint;
36
+ }
37
+ | {
38
+ code: ExecutionPayloadBidErrorCode.INCOMPATIBLE_WITH_HEAD;
39
+ slot: Slot;
40
+ parentBlockRoot: RootHex;
41
+ parentBlockHash: RootHex;
42
+ headBlockRoot: RootHex;
35
43
  }
36
44
  | {
37
45
  code: ExecutionPayloadBidErrorCode.BID_ALREADY_KNOWN;
@@ -73,9 +81,9 @@ export type ExecutionPayloadBidErrorType =
73
81
  | {
74
82
  code: ExecutionPayloadBidErrorCode.PROPOSER_PREFERENCES_GAS_LIMIT_MISMATCH;
75
83
  builderIndex: BuilderIndex;
76
- bidGasLimit: number;
77
- parentGasLimit: number;
78
- targetGasLimit: number;
84
+ bidGasLimit: bigint;
85
+ parentGasLimit: bigint;
86
+ targetGasLimit: bigint;
79
87
  };
80
88
 
81
89
  export class ExecutionPayloadBidError extends GossipActionError<ExecutionPayloadBidErrorType> {}
@@ -234,6 +234,7 @@ export class AggregatedAttestationPool {
234
234
  const stateEpoch = state.epoch;
235
235
  const statePrevEpoch = stateEpoch - 1;
236
236
  const rootCache = new RootCache(state);
237
+ const gloasState = isStatePostGloas(state) ? state : null;
237
238
 
238
239
  const notSeenValidatorsFn = getNotSeenValidatorsFn(this.config, shufflingCache, state);
239
240
  const validateAttestationDataFn = getValidateAttestationDataFn(forkChoice, state);
@@ -361,7 +362,8 @@ export class AggregatedAttestationPool {
361
362
  inclusionDistance,
362
363
  stateEpoch,
363
364
  rootCache,
364
- isStatePostGloas(state) ? state.executionPayloadAvailability : null
365
+ gloasState?.executionPayloadAvailability ?? null,
366
+ gloasState?.latestExecutionPayloadBid.slot ?? null
365
367
  );
366
368
 
367
369
  const weight =
@@ -431,7 +433,7 @@ export class AggregatedAttestationPool {
431
433
  );
432
434
  } else {
433
435
  const attestationGroupsByIndex = this.attestationGroupByIndexByDataHexBySlot.get(bySlot);
434
- if (!attestationGroupsByIndex) throw Error(`No attestations for slot ${bySlot}`);
436
+ if (!attestationGroupsByIndex) return [];
435
437
  attestationGroupsArr = Array.from(attestationGroupsByIndex.values());
436
438
  }
437
439
 
@@ -1,7 +1,14 @@
1
1
  import {routes} from "@lodestar/api";
2
2
  import {ChainForkConfig} from "@lodestar/config";
3
3
  import {getSafeExecutionBlockHash} from "@lodestar/fork-choice";
4
- import {ForkPostBellatrix, ForkSeq, SLOTS_PER_EPOCH, isForkPostBellatrix, isForkPostGloas} from "@lodestar/params";
4
+ import {
5
+ ForkPostBellatrix,
6
+ ForkSeq,
7
+ SLOTS_PER_EPOCH,
8
+ isForkPostBellatrix,
9
+ isForkPostFulu,
10
+ isForkPostGloas,
11
+ } from "@lodestar/params";
5
12
  import {
6
13
  IBeaconStateView,
7
14
  IBeaconStateViewBellatrix,
@@ -11,7 +18,7 @@ import {
11
18
  isStatePostBellatrix,
12
19
  isStatePostGloas,
13
20
  } from "@lodestar/state-transition";
14
- import {Bytes32, Slot} from "@lodestar/types";
21
+ import {Bytes32, Slot, ValidatorIndex} from "@lodestar/types";
15
22
  import {Logger, fromHex, isErrorAborted, sleep} from "@lodestar/utils";
16
23
  import {GENESIS_SLOT, ZERO_HASH_HEX} from "../constants/constants.js";
17
24
  import {BuilderStatus} from "../execution/builder/http.js";
@@ -111,29 +118,36 @@ export class PrepareNextSlotScheduler {
111
118
  : null;
112
119
  const start = Date.now();
113
120
  // No need to wait for this or the clock drift
114
- // Pre Bellatrix: we only do precompute state transition for the last slot of epoch
115
- // For Bellatrix, we always do the `processSlots()` to prepare payload for the next slot
116
- const prepareState = await this.chain.regen.getBlockSlotState(
117
- headBlock,
118
- prepareSlot,
119
- // the slot 0 of next epoch will likely use this Previous Root Checkpoint state for state transition so we transfer cache here
120
- // the resulting state with cache will be cached in Checkpoint State Cache which is used for the upcoming block processing
121
- // for other slots dontTransferCached=true because we don't run state transition on this state
122
- {dontTransferCache: !isEpochTransition},
123
- RegenCaller.precomputeEpoch
124
- );
125
-
126
121
  if (isForkPostBellatrix(fork)) {
127
- const proposerIndex = prepareState.getBeaconProposer(prepareSlot);
122
+ let preparedState: IBeaconStateView | undefined;
123
+
124
+ const getProposerIndex = async (): Promise<ValidatorIndex> => {
125
+ if (isForkPostFulu(fork)) {
126
+ // getBeaconProposer covers the current + next epoch; should not throw
127
+ // PROPOSER_EPOCH_MISMATCH here due to the PREPARE_EPOCH_LIMIT check above.
128
+ return this.chain.getHeadState().getBeaconProposer(prepareSlot);
129
+ }
130
+ // the slot 0 of next epoch will likely use this Previous Root Checkpoint state for state transition so we transfer cache here
131
+ // the resulting state with cache will be cached in Checkpoint State Cache which is used for the upcoming block processing
132
+ // for other slots dontTransferCached=true because we don't run state transition on this state
133
+ preparedState = await this.chain.regen.getBlockSlotState(
134
+ headBlock,
135
+ prepareSlot,
136
+ {dontTransferCache: !isEpochTransition},
137
+ RegenCaller.precomputeEpoch
138
+ );
139
+ return preparedState.getBeaconProposer(prepareSlot);
140
+ };
141
+
142
+ const proposerIndex = await getProposerIndex();
128
143
  const feeRecipient = this.chain.beaconProposerCache.get(proposerIndex);
129
- let updatedPrepareState = prepareState;
130
144
 
131
145
  if (feeRecipient) {
132
146
  // If we are proposing next slot, we need to predict if we can proposer-boost-reorg or not
133
147
  const proposerHead = this.chain.predictProposerHead(clockSlot);
134
148
  const {slot: proposerHeadSlot, blockRoot: proposerHeadRoot} = proposerHead;
135
149
 
136
- // If we predict we can reorg, update prepareState with proposer head block
150
+ // If we predict we can reorg, we build on the proposer head (parent) block instead
137
151
  if (proposerHeadRoot !== headRoot || proposerHeadSlot !== headSlot) {
138
152
  this.logger.verbose("Weak head detected. May build on parent block instead", {
139
153
  proposerHeadSlot,
@@ -142,13 +156,6 @@ export class PrepareNextSlotScheduler {
142
156
  headRoot,
143
157
  });
144
158
  this.metrics?.weakHeadDetected.inc();
145
- updatedPrepareState = await this.chain.regen.getBlockSlotState(
146
- proposerHead,
147
- prepareSlot,
148
- // only transfer cache if epoch transition because that's the state we will use to stateTransition() the 1st block of epoch
149
- {dontTransferCache: !isEpochTransition},
150
- RegenCaller.predictProposerHead
151
- );
152
159
  updatedHead = proposerHead;
153
160
  }
154
161
 
@@ -165,30 +172,41 @@ export class PrepareNextSlotScheduler {
165
172
  }
166
173
  }
167
174
 
168
- if (!isStatePostBellatrix(updatedPrepareState)) {
175
+ // post-fulu we'll always reach here because preparedState is undefined
176
+ if (preparedState === undefined || updatedHead !== headBlock) {
177
+ preparedState = await this.chain.regen.getBlockSlotState(
178
+ updatedHead,
179
+ prepareSlot,
180
+ // only transfer cache if epoch transition because that's the state we will use to stateTransition() the 1st block of epoch
181
+ {dontTransferCache: !isEpochTransition},
182
+ updatedHead === headBlock ? RegenCaller.precomputeEpoch : RegenCaller.predictProposerHead
183
+ );
184
+ }
185
+
186
+ if (!isStatePostBellatrix(preparedState)) {
169
187
  throw new Error("Expected Bellatrix state for payload attributes");
170
188
  }
171
189
 
172
190
  let parentBlockHash: Bytes32;
173
191
  // Apply parent payload once here as it's reused by EL prep and SSE emit below
174
- let stateAfterParentPayload: IBeaconStateViewBellatrix = updatedPrepareState;
175
- if (isStatePostGloas(updatedPrepareState)) {
176
- // Spec: should_build_on_full(store, head) see produceBlockBody.ts for context.
192
+ let stateAfterParentPayload: IBeaconStateViewBellatrix = preparedState;
193
+ if (isStatePostGloas(preparedState)) {
194
+ // Spec: should_build_on_full(store, head, slot) - see produceBlockBody.ts for context.
177
195
  if (this.chain.forkChoice.shouldBuildOnFull(updatedHead, prepareSlot)) {
178
- parentBlockHash = updatedPrepareState.latestExecutionPayloadBid.blockHash;
196
+ parentBlockHash = preparedState.latestExecutionPayloadBid.blockHash;
179
197
  // Skip applying parent payload unless we're proposing the next slot or have to emit payload_attributes events
180
198
  if (feeRecipient !== undefined || this.chain.opts.emitPayloadAttributes === true) {
181
199
  const parentExecutionRequests = await this.chain.getParentExecutionRequests(
182
200
  updatedHead.slot,
183
201
  updatedHead.blockRoot
184
202
  );
185
- stateAfterParentPayload = updatedPrepareState.withParentPayloadApplied(parentExecutionRequests);
203
+ stateAfterParentPayload = preparedState.withParentPayloadApplied(parentExecutionRequests);
186
204
  }
187
205
  } else {
188
- parentBlockHash = updatedPrepareState.latestExecutionPayloadBid.parentBlockHash;
206
+ parentBlockHash = preparedState.latestExecutionPayloadBid.parentBlockHash;
189
207
  }
190
208
  } else {
191
- parentBlockHash = updatedPrepareState.latestExecutionPayloadHeader.blockHash;
209
+ parentBlockHash = preparedState.latestExecutionPayloadHeader.blockHash;
192
210
  }
193
211
 
194
212
  if (feeRecipient) {
@@ -221,7 +239,7 @@ export class PrepareNextSlotScheduler {
221
239
  });
222
240
  }
223
241
 
224
- this.computeStateHashTreeRoot(updatedPrepareState, isEpochTransition);
242
+ this.computeStateHashTreeRoot(preparedState, isEpochTransition);
225
243
 
226
244
  // If emitPayloadAttributes is true emit a SSE payloadAttributes event for
227
245
  // every slot. Without the flag, only emit the event if we are proposing in the next slot.
@@ -239,7 +257,14 @@ export class PrepareNextSlotScheduler {
239
257
  this.chain.emitter.emit(routes.events.EventType.payloadAttributes, {data, version: fork});
240
258
  }
241
259
  } else {
242
- this.computeStateHashTreeRoot(prepareState, isEpochTransition);
260
+ // Pre-bellatrix only reaches here at an epoch transition to precompute the next epoch state
261
+ const preparedState = await this.chain.regen.getBlockSlotState(
262
+ headBlock,
263
+ prepareSlot,
264
+ {dontTransferCache: !isEpochTransition},
265
+ RegenCaller.precomputeEpoch
266
+ );
267
+ this.computeStateHashTreeRoot(preparedState, isEpochTransition);
243
268
  }
244
269
 
245
270
  // assuming there is no reorg, it caches the checkpoint state & helps avoid doing a full state transition in the next slot
@@ -1,3 +1,4 @@
1
+ import {BitArray} from "@chainsafe/ssz";
1
2
  import {ChainForkConfig} from "@lodestar/config";
2
3
  import {IForkChoice, ProtoBlock, getSafeExecutionBlockHash} from "@lodestar/fork-choice";
3
4
  import {
@@ -10,6 +11,7 @@ import {
10
11
  ForkPostGloas,
11
12
  ForkPreGloas,
12
13
  ForkSeq,
14
+ INCLUSION_LIST_COMMITTEE_SIZE,
13
15
  isForkPostAltair,
14
16
  isForkPostBellatrix,
15
17
  isForkPostGloas,
@@ -49,6 +51,7 @@ import {
49
51
  electra,
50
52
  fulu,
51
53
  gloas,
54
+ heze,
52
55
  ssz,
53
56
  } from "@lodestar/types";
54
57
  import {GWEI_TO_WEI, Logger, byteArrayEquals, fromHex, sleep, toHex, toPubkeyHex, toRootHex} from "@lodestar/utils";
@@ -276,7 +279,7 @@ export async function produceBlockBody<T extends BlockType>(
276
279
  let parentExecutionRequests: gloas.ExecutionRequests;
277
280
  // Apply parent payload once here as it's reused by EL prep and voluntary exit filtering below
278
281
  let stateAfterParentPayload: IBeaconStateViewBellatrix = currentState;
279
- // Spec: should_build_on_full(store, head). `parentBlock` is the proposer's head
282
+ // Spec: should_build_on_full(store, head, slot). `parentBlock` is the proposer's head
280
283
  // (set by chain.getProposerHead(slot)). Returns false when the PTC majority signalled
281
284
  // the blob data is not available or the payload was not timely, forcing a build on EMPTY (reorg).
282
285
  const isBuildingOnFull = this.forkChoice.shouldBuildOnFull(parentBlock, blockSlot);
@@ -345,14 +348,18 @@ export async function produceBlockBody<T extends BlockType>(
345
348
  blockHash: executionPayload.blockHash,
346
349
  prevRandao: currentState.getRandaoMix(currentState.epoch),
347
350
  feeRecipient: executionPayload.feeRecipient,
348
- gasLimit: executionPayload.gasLimit,
351
+ gasLimit: BigInt(executionPayload.gasLimit),
349
352
  builderIndex: BUILDER_INDEX_SELF_BUILD,
350
353
  slot: blockSlot,
351
354
  value: 0,
352
- executionPayment: 0,
355
+ executionPayment: 0n,
353
356
  blobKzgCommitments: blobsBundle.commitments,
354
357
  executionRequestsRoot: ssz.gloas.ExecutionRequests.hashTreeRoot(executionRequests as gloas.ExecutionRequests),
355
358
  };
359
+ if (ForkSeq[fork] >= ForkSeq.heze) {
360
+ // TODO HEZE: populate from inclusion list pool once IL aggregation is wired up.
361
+ (bid as heze.ExecutionPayloadBid).inclusionListBits = BitArray.fromBitLen(INCLUSION_LIST_COMMITTEE_SIZE);
362
+ }
356
363
  const signedBid: gloas.SignedExecutionPayloadBid = {
357
364
  message: bid,
358
365
  signature: G2_POINT_AT_INFINITY,
@@ -927,6 +934,11 @@ function preparePayloadAttributes(
927
934
  );
928
935
  }
929
936
 
937
+ if (ForkSeq[fork] >= ForkSeq.heze) {
938
+ // TODO HEZE: populate from inclusion list pool once IL aggregation is wired up.
939
+ (payloadAttributes as heze.SSEPayloadAttributes["payloadAttributes"]).inclusionListTransactions = [];
940
+ }
941
+
930
942
  return payloadAttributes;
931
943
  }
932
944
 
@@ -949,7 +961,7 @@ function getProposerTargetGasLimit(
949
961
  prepareSlot: Slot,
950
962
  parentBlockRoot: Root,
951
963
  parentBlockHash: Bytes32
952
- ): number {
964
+ ): bigint {
953
965
  const parentBlockRootHex = toRootHex(parentBlockRoot);
954
966
  const parentBlock = chain.forkChoice.getBlockHexDefaultStatus(parentBlockRootHex);
955
967
  const dependentRootHex = (() => {
@@ -979,7 +991,7 @@ function getProposerTargetGasLimit(
979
991
  `Cannot resolve parent payload gas_limit for proposer targetGasLimit fallback parentBlockRoot=${parentBlockRootHex} parentBlockHash=${toRootHex(parentBlockHash)}`
980
992
  );
981
993
  }
982
- return parentPayloadVariant.executionPayloadGasLimit;
994
+ return BigInt(parentPayloadVariant.executionPayloadGasLimit);
983
995
  }
984
996
 
985
997
  export async function produceCommonBlockBody<T extends BlockType>(
@@ -1,4 +1,4 @@
1
- import {BuilderIndex, Slot} from "@lodestar/types";
1
+ import {BuilderIndex, RootHex, Slot} from "@lodestar/types";
2
2
  import {MapDef} from "@lodestar/utils";
3
3
 
4
4
  /**
@@ -7,29 +7,42 @@ import {MapDef} from "@lodestar/utils";
7
7
  const SLOTS_RETAINED = 2;
8
8
 
9
9
  /**
10
- * Tracks execution payload bids we've already seen per (slot, builder).
10
+ * Tracks execution payload bids we've already seen per
11
+ * (slot, builder, parent block hash, parent block root).
11
12
  */
12
13
  export class SeenExecutionPayloadBids {
13
- private readonly builderIndexesBySlot = new MapDef<Slot, Set<BuilderIndex>>(() => new Set<BuilderIndex>());
14
+ private readonly branchesByBuilderBySlot = new MapDef<Slot, MapDef<BuilderIndex, Set<string>>>(
15
+ () => new MapDef<BuilderIndex, Set<string>>(() => new Set<string>())
16
+ );
14
17
  private lowestPermissibleSlot: Slot = 0;
15
18
 
16
- isKnown(slot: Slot, builderIndex: BuilderIndex): boolean {
17
- return this.builderIndexesBySlot.get(slot)?.has(builderIndex) === true;
19
+ isKnown(slot: Slot, builderIndex: BuilderIndex, parentBlockHash: RootHex, parentBlockRoot: RootHex): boolean {
20
+ return (
21
+ this.branchesByBuilderBySlot.get(slot)?.get(builderIndex)?.has(branchKey(parentBlockHash, parentBlockRoot)) ===
22
+ true
23
+ );
18
24
  }
19
25
 
20
- add(slot: Slot, builderIndex: BuilderIndex): void {
26
+ add(slot: Slot, builderIndex: BuilderIndex, parentBlockHash: RootHex, parentBlockRoot: RootHex): void {
21
27
  if (slot < this.lowestPermissibleSlot) {
22
28
  throw Error(`slot ${slot} < lowestPermissibleSlot ${this.lowestPermissibleSlot}`);
23
29
  }
24
- this.builderIndexesBySlot.getOrDefault(slot).add(builderIndex);
30
+ this.branchesByBuilderBySlot
31
+ .getOrDefault(slot)
32
+ .getOrDefault(builderIndex)
33
+ .add(branchKey(parentBlockHash, parentBlockRoot));
25
34
  }
26
35
 
27
36
  prune(currentSlot: Slot): void {
28
37
  this.lowestPermissibleSlot = Math.max(currentSlot - SLOTS_RETAINED, 0);
29
- for (const slot of this.builderIndexesBySlot.keys()) {
38
+ for (const slot of this.branchesByBuilderBySlot.keys()) {
30
39
  if (slot < this.lowestPermissibleSlot) {
31
- this.builderIndexesBySlot.delete(slot);
40
+ this.branchesByBuilderBySlot.delete(slot);
32
41
  }
33
42
  }
34
43
  }
35
44
  }
45
+
46
+ function branchKey(parentBlockHash: RootHex, parentBlockRoot: RootHex): string {
47
+ return `${parentBlockHash}:${parentBlockRoot}`;
48
+ }
@@ -111,7 +111,7 @@ export async function validateGossipBlobSidecar(
111
111
 
112
112
  // [REJECT] The blob is from a higher slot than its parent.
113
113
  if (parentBlock.slot >= blobSlot) {
114
- throw new BlobSidecarGossipError(GossipAction.IGNORE, {
114
+ throw new BlobSidecarGossipError(GossipAction.REJECT, {
115
115
  code: BlobSidecarErrorCode.NOT_LATER_THAN_PARENT,
116
116
  parentSlot: parentBlock.slot,
117
117
  slot: blobSlot,
@@ -2,15 +2,16 @@ import {ChainConfig, ChainForkConfig} from "@lodestar/config";
2
2
  import {
3
3
  KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH,
4
4
  KZG_COMMITMENTS_SUBTREE_INDEX,
5
+ MIN_SEED_LOOKAHEAD,
5
6
  NUMBER_OF_COLUMNS,
7
+ isForkPostFulu,
6
8
  } from "@lodestar/params";
7
9
  import {
8
10
  computeEpochAtSlot,
9
11
  computeStartSlotAtEpoch,
10
12
  getBlockHeaderProposerSignatureSetByHeaderSlot,
11
- getBlockHeaderProposerSignatureSetByParentStateSlot,
12
13
  } from "@lodestar/state-transition";
13
- import {DataColumnSidecar, Root, Slot, SubnetID, fulu, gloas, ssz} from "@lodestar/types";
14
+ import {DataColumnSidecar, Root, Slot, SubnetID, ValidatorIndex, fulu, gloas, ssz} from "@lodestar/types";
14
15
  import {byteArrayEquals, toRootHex, verifyMerkleBranch} from "@lodestar/utils";
15
16
  import {BeaconMetrics} from "../../metrics/metrics/beacon.js";
16
17
  import {Metrics} from "../../metrics/metrics.js";
@@ -104,19 +105,23 @@ export async function validateGossipFuluDataColumnSidecar(
104
105
  });
105
106
  }
106
107
 
107
- // getBlockSlotState also checks for whether the current finalized checkpoint is an ancestor of the block.
108
- // As a result, we throw an IGNORE (whereas the spec says we should REJECT for this scenario).
109
- // this is something we should change this in the future to make the code airtight to the spec.
110
108
  // 7) [REJECT] The sidecar's block's parent passes validation.
111
- const blockState = await chain.regen
112
- .getBlockSlotState(parentBlock, blockHeader.slot, {dontTransferCache: true}, RegenCaller.validateGossipDataColumn)
113
- .catch(() => {
114
- throw new DataColumnSidecarGossipError(GossipAction.IGNORE, {
115
- code: DataColumnSidecarErrorCode.PARENT_UNKNOWN,
116
- parentRoot,
117
- slot: blockHeader.slot,
118
- });
119
- });
109
+ // Post-fulu, we can use parent state to get expected proposer index thanks to proposer lookahead
110
+ const parentEpoch = computeEpochAtSlot(parentBlock.slot);
111
+ const blockEpoch = computeEpochAtSlot(blockHeader.slot);
112
+ const getProposerIndex = async (): Promise<ValidatorIndex> => {
113
+ if (isForkPostFulu(chain.config.getForkName(parentBlock.slot)) && blockEpoch - parentEpoch <= MIN_SEED_LOOKAHEAD) {
114
+ const parentState = await chain.regen.getState(parentBlock.stateRoot, RegenCaller.validateGossipDataColumn);
115
+ return parentState.getBeaconProposer(blockHeader.slot);
116
+ }
117
+ const blockState = await chain.regen.getBlockSlotState(
118
+ parentBlock,
119
+ blockHeader.slot,
120
+ {dontTransferCache: true},
121
+ RegenCaller.validateGossipDataColumn
122
+ );
123
+ return blockState.getBeaconProposer(blockHeader.slot);
124
+ };
120
125
 
121
126
  // 13) [REJECT] The sidecar is proposed by the expected proposer_index for the block's slot in the context of the current
122
127
  // shuffling (defined by block_header.parent_root/block_header.slot). If the proposer_index cannot
@@ -124,7 +129,13 @@ export async function validateGossipFuluDataColumnSidecar(
124
129
  // while proposers for the block's branch are calculated -- in such a case do not REJECT, instead IGNORE
125
130
  // this message.
126
131
  const proposerIndex = blockHeader.proposerIndex;
127
- const expectedProposerIndex = blockState.getBeaconProposer(blockHeader.slot);
132
+ const expectedProposerIndex = await getProposerIndex().catch(() => {
133
+ throw new DataColumnSidecarGossipError(GossipAction.IGNORE, {
134
+ code: DataColumnSidecarErrorCode.PARENT_UNKNOWN,
135
+ parentRoot,
136
+ slot: blockHeader.slot,
137
+ });
138
+ });
128
139
 
129
140
  if (proposerIndex !== expectedProposerIndex) {
130
141
  throw new DataColumnSidecarGossipError(GossipAction.REJECT, {
@@ -137,9 +148,8 @@ export async function validateGossipFuluDataColumnSidecar(
137
148
  // 5) [REJECT] The proposer signature of sidecar.signed_block_header, is valid with respect to the block_header.proposer_index pubkey.
138
149
  const signature = dataColumnSidecar.signedBlockHeader.signature;
139
150
  if (!chain.seenBlockInputCache.isVerifiedProposerSignature(blockHeader.slot, blockRootHex, signature)) {
140
- const signatureSet = getBlockHeaderProposerSignatureSetByParentStateSlot(
151
+ const signatureSet = getBlockHeaderProposerSignatureSetByHeaderSlot(
141
152
  chain.config,
142
- blockState.slot,
143
153
  dataColumnSidecar.signedBlockHeader
144
154
  );
145
155