@lodestar/beacon-node 1.41.0-dev.9fa839a030 → 1.41.0-dev.aeab9f930d

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 (892) 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 +123 -4
  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 +6 -2
  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 +19 -2
  36. package/lib/api/impl/lightclient/index.js.map +1 -1
  37. package/lib/api/impl/lodestar/index.d.ts +1 -1
  38. package/lib/api/impl/lodestar/index.d.ts.map +1 -1
  39. package/lib/api/impl/lodestar/index.js.map +1 -1
  40. package/lib/api/impl/node/index.js.map +1 -1
  41. package/lib/api/impl/node/utils.d.ts +1 -1
  42. package/lib/api/impl/node/utils.d.ts.map +1 -1
  43. package/lib/api/impl/node/utils.js.map +1 -1
  44. package/lib/api/impl/proof/index.js.map +1 -1
  45. package/lib/api/impl/utils.js.map +1 -1
  46. package/lib/api/impl/validator/index.d.ts.map +1 -1
  47. package/lib/api/impl/validator/index.js +134 -18
  48. package/lib/api/impl/validator/index.js.map +1 -1
  49. package/lib/api/impl/validator/utils.d.ts +1 -1
  50. package/lib/api/impl/validator/utils.d.ts.map +1 -1
  51. package/lib/api/impl/validator/utils.js.map +1 -1
  52. package/lib/api/rest/activeSockets.d.ts.map +1 -1
  53. package/lib/api/rest/activeSockets.js.map +1 -1
  54. package/lib/api/rest/base.d.ts.map +1 -1
  55. package/lib/api/rest/base.js.map +1 -1
  56. package/lib/api/rest/index.d.ts.map +1 -1
  57. package/lib/api/rest/index.js.map +1 -1
  58. package/lib/api/rest/swaggerUI.js.map +1 -1
  59. package/lib/bun-wrappers/prometheus-gc-stats.js.map +1 -1
  60. package/lib/chain/ColumnReconstructionTracker.d.ts.map +1 -1
  61. package/lib/chain/ColumnReconstructionTracker.js.map +1 -1
  62. package/lib/chain/GetBlobsTracker.d.ts.map +1 -1
  63. package/lib/chain/GetBlobsTracker.js.map +1 -1
  64. package/lib/chain/archiveStore/archiveStore.d.ts +1 -0
  65. package/lib/chain/archiveStore/archiveStore.d.ts.map +1 -1
  66. package/lib/chain/archiveStore/archiveStore.js +11 -1
  67. package/lib/chain/archiveStore/archiveStore.js.map +1 -1
  68. package/lib/chain/archiveStore/historicalState/getHistoricalState.d.ts +5 -6
  69. package/lib/chain/archiveStore/historicalState/getHistoricalState.d.ts.map +1 -1
  70. package/lib/chain/archiveStore/historicalState/getHistoricalState.js +9 -10
  71. package/lib/chain/archiveStore/historicalState/getHistoricalState.js.map +1 -1
  72. package/lib/chain/archiveStore/historicalState/historicalStateRegen.d.ts.map +1 -1
  73. package/lib/chain/archiveStore/historicalState/historicalStateRegen.js.map +1 -1
  74. package/lib/chain/archiveStore/historicalState/metrics.js.map +1 -1
  75. package/lib/chain/archiveStore/historicalState/types.js +2 -1
  76. package/lib/chain/archiveStore/historicalState/types.js.map +1 -1
  77. package/lib/chain/archiveStore/historicalState/worker.js +3 -3
  78. package/lib/chain/archiveStore/historicalState/worker.js.map +1 -1
  79. package/lib/chain/archiveStore/interface.js +2 -1
  80. package/lib/chain/archiveStore/interface.js.map +1 -1
  81. package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.d.ts +1 -1
  82. package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.d.ts.map +1 -1
  83. package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.js +2 -1
  84. package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.js.map +1 -1
  85. package/lib/chain/archiveStore/utils/archiveBlocks.d.ts +3 -8
  86. package/lib/chain/archiveStore/utils/archiveBlocks.d.ts.map +1 -1
  87. package/lib/chain/archiveStore/utils/archiveBlocks.js +1 -1
  88. package/lib/chain/archiveStore/utils/archiveBlocks.js.map +1 -1
  89. package/lib/chain/archiveStore/utils/archivePayloads.d.ts +7 -0
  90. package/lib/chain/archiveStore/utils/archivePayloads.d.ts.map +1 -0
  91. package/lib/chain/archiveStore/utils/archivePayloads.js +10 -0
  92. package/lib/chain/archiveStore/utils/archivePayloads.js.map +1 -0
  93. package/lib/chain/archiveStore/utils/pruneHistory.js.map +1 -1
  94. package/lib/chain/archiveStore/utils/updateBackfillRange.js +1 -1
  95. package/lib/chain/archiveStore/utils/updateBackfillRange.js.map +1 -1
  96. package/lib/chain/balancesCache.d.ts.map +1 -1
  97. package/lib/chain/balancesCache.js.map +1 -1
  98. package/lib/chain/beaconProposerCache.d.ts.map +1 -1
  99. package/lib/chain/beaconProposerCache.js.map +1 -1
  100. package/lib/chain/blocks/blockInput/blockInput.d.ts +25 -2
  101. package/lib/chain/blocks/blockInput/blockInput.d.ts.map +1 -1
  102. package/lib/chain/blocks/blockInput/blockInput.js +71 -0
  103. package/lib/chain/blocks/blockInput/blockInput.js.map +1 -1
  104. package/lib/chain/blocks/blockInput/errors.js +2 -1
  105. package/lib/chain/blocks/blockInput/errors.js.map +1 -1
  106. package/lib/chain/blocks/blockInput/types.d.ts +18 -1
  107. package/lib/chain/blocks/blockInput/types.d.ts.map +1 -1
  108. package/lib/chain/blocks/blockInput/types.js +5 -2
  109. package/lib/chain/blocks/blockInput/types.js.map +1 -1
  110. package/lib/chain/blocks/blockInput/utils.js.map +1 -1
  111. package/lib/chain/blocks/importBlock.d.ts.map +1 -1
  112. package/lib/chain/blocks/importBlock.js +27 -6
  113. package/lib/chain/blocks/importBlock.js.map +1 -1
  114. package/lib/chain/blocks/index.d.ts.map +1 -1
  115. package/lib/chain/blocks/index.js +2 -1
  116. package/lib/chain/blocks/index.js.map +1 -1
  117. package/lib/chain/blocks/types.js +6 -3
  118. package/lib/chain/blocks/types.js.map +1 -1
  119. package/lib/chain/blocks/utils/chainSegment.js.map +1 -1
  120. package/lib/chain/blocks/utils/checkpoint.js.map +1 -1
  121. package/lib/chain/blocks/verifyBlock.js.map +1 -1
  122. package/lib/chain/blocks/verifyBlocksDataAvailability.d.ts.map +1 -1
  123. package/lib/chain/blocks/verifyBlocksDataAvailability.js +3 -0
  124. package/lib/chain/blocks/verifyBlocksDataAvailability.js.map +1 -1
  125. package/lib/chain/blocks/verifyBlocksExecutionPayloads.d.ts +4 -0
  126. package/lib/chain/blocks/verifyBlocksExecutionPayloads.d.ts.map +1 -1
  127. package/lib/chain/blocks/verifyBlocksExecutionPayloads.js +5 -1
  128. package/lib/chain/blocks/verifyBlocksExecutionPayloads.js.map +1 -1
  129. package/lib/chain/blocks/verifyBlocksSanityChecks.d.ts.map +1 -1
  130. package/lib/chain/blocks/verifyBlocksSanityChecks.js +4 -1
  131. package/lib/chain/blocks/verifyBlocksSanityChecks.js.map +1 -1
  132. package/lib/chain/blocks/verifyBlocksSignatures.js.map +1 -1
  133. package/lib/chain/blocks/verifyBlocksStateTransitionOnly.js.map +1 -1
  134. package/lib/chain/blocks/writeBlockInputToDb.d.ts +12 -3
  135. package/lib/chain/blocks/writeBlockInputToDb.d.ts.map +1 -1
  136. package/lib/chain/blocks/writeBlockInputToDb.js +92 -95
  137. package/lib/chain/blocks/writeBlockInputToDb.js.map +1 -1
  138. package/lib/chain/bls/maybeBatch.js.map +1 -1
  139. package/lib/chain/bls/multithread/index.d.ts +3 -3
  140. package/lib/chain/bls/multithread/index.d.ts.map +1 -1
  141. package/lib/chain/bls/multithread/index.js +5 -5
  142. package/lib/chain/bls/multithread/index.js.map +1 -1
  143. package/lib/chain/bls/multithread/jobItem.d.ts +2 -2
  144. package/lib/chain/bls/multithread/jobItem.d.ts.map +1 -1
  145. package/lib/chain/bls/multithread/jobItem.js +4 -3
  146. package/lib/chain/bls/multithread/jobItem.js.map +1 -1
  147. package/lib/chain/bls/multithread/types.js +2 -1
  148. package/lib/chain/bls/multithread/types.js.map +1 -1
  149. package/lib/chain/bls/multithread/utils.js.map +1 -1
  150. package/lib/chain/bls/multithread/worker.js.map +1 -1
  151. package/lib/chain/bls/singleThread.d.ts +4 -4
  152. package/lib/chain/bls/singleThread.d.ts.map +1 -1
  153. package/lib/chain/bls/singleThread.js +4 -4
  154. package/lib/chain/bls/singleThread.js.map +1 -1
  155. package/lib/chain/bls/utils.d.ts +2 -2
  156. package/lib/chain/bls/utils.d.ts.map +1 -1
  157. package/lib/chain/bls/utils.js +7 -4
  158. package/lib/chain/bls/utils.js.map +1 -1
  159. package/lib/chain/chain.d.ts +9 -12
  160. package/lib/chain/chain.d.ts.map +1 -1
  161. package/lib/chain/chain.js +45 -28
  162. package/lib/chain/chain.js.map +1 -1
  163. package/lib/chain/emitter.d.ts +6 -8
  164. package/lib/chain/emitter.d.ts.map +1 -1
  165. package/lib/chain/emitter.js +2 -1
  166. package/lib/chain/emitter.js.map +1 -1
  167. package/lib/chain/errors/attestationError.d.ts.map +1 -1
  168. package/lib/chain/errors/attestationError.js +2 -1
  169. package/lib/chain/errors/attestationError.js.map +1 -1
  170. package/lib/chain/errors/attesterSlashingError.js +2 -1
  171. package/lib/chain/errors/attesterSlashingError.js.map +1 -1
  172. package/lib/chain/errors/blobSidecarError.js +2 -1
  173. package/lib/chain/errors/blobSidecarError.js.map +1 -1
  174. package/lib/chain/errors/blockError.d.ts.map +1 -1
  175. package/lib/chain/errors/blockError.js +2 -1
  176. package/lib/chain/errors/blockError.js.map +1 -1
  177. package/lib/chain/errors/blsToExecutionChangeError.js +2 -1
  178. package/lib/chain/errors/blsToExecutionChangeError.js.map +1 -1
  179. package/lib/chain/errors/dataColumnSidecarError.js +2 -1
  180. package/lib/chain/errors/dataColumnSidecarError.js.map +1 -1
  181. package/lib/chain/errors/executionPayloadBid.d.ts +1 -1
  182. package/lib/chain/errors/executionPayloadBid.js +2 -1
  183. package/lib/chain/errors/executionPayloadBid.js.map +1 -1
  184. package/lib/chain/errors/executionPayloadEnvelope.d.ts +2 -2
  185. package/lib/chain/errors/executionPayloadEnvelope.d.ts.map +1 -1
  186. package/lib/chain/errors/executionPayloadEnvelope.js +2 -1
  187. package/lib/chain/errors/executionPayloadEnvelope.js.map +1 -1
  188. package/lib/chain/errors/gossipValidation.d.ts.map +1 -1
  189. package/lib/chain/errors/gossipValidation.js +4 -2
  190. package/lib/chain/errors/gossipValidation.js.map +1 -1
  191. package/lib/chain/errors/lightClientError.js +4 -2
  192. package/lib/chain/errors/lightClientError.js.map +1 -1
  193. package/lib/chain/errors/payloadAttestation.d.ts +1 -1
  194. package/lib/chain/errors/payloadAttestation.js +2 -1
  195. package/lib/chain/errors/payloadAttestation.js.map +1 -1
  196. package/lib/chain/errors/proposerSlashingError.js +2 -1
  197. package/lib/chain/errors/proposerSlashingError.js.map +1 -1
  198. package/lib/chain/errors/syncCommitteeError.js +2 -1
  199. package/lib/chain/errors/syncCommitteeError.js.map +1 -1
  200. package/lib/chain/errors/voluntaryExitError.js +2 -1
  201. package/lib/chain/errors/voluntaryExitError.js.map +1 -1
  202. package/lib/chain/forkChoice/index.d.ts.map +1 -1
  203. package/lib/chain/forkChoice/index.js +32 -25
  204. package/lib/chain/forkChoice/index.js.map +1 -1
  205. package/lib/chain/initState.d.ts +1 -1
  206. package/lib/chain/initState.d.ts.map +1 -1
  207. package/lib/chain/initState.js.map +1 -1
  208. package/lib/chain/interface.d.ts +4 -6
  209. package/lib/chain/interface.d.ts.map +1 -1
  210. package/lib/chain/interface.js +2 -1
  211. package/lib/chain/interface.js.map +1 -1
  212. package/lib/chain/lightClient/index.d.ts +0 -29
  213. package/lib/chain/lightClient/index.d.ts.map +1 -1
  214. package/lib/chain/lightClient/index.js +1 -1
  215. package/lib/chain/lightClient/index.js.map +1 -1
  216. package/lib/chain/lightClient/proofs.js.map +1 -1
  217. package/lib/chain/opPools/aggregatedAttestationPool.d.ts.map +1 -1
  218. package/lib/chain/opPools/aggregatedAttestationPool.js +5 -3
  219. package/lib/chain/opPools/aggregatedAttestationPool.js.map +1 -1
  220. package/lib/chain/opPools/attestationPool.d.ts.map +1 -1
  221. package/lib/chain/opPools/attestationPool.js.map +1 -1
  222. package/lib/chain/opPools/executionPayloadBidPool.d.ts.map +1 -1
  223. package/lib/chain/opPools/executionPayloadBidPool.js.map +1 -1
  224. package/lib/chain/opPools/opPool.d.ts.map +1 -1
  225. package/lib/chain/opPools/opPool.js.map +1 -1
  226. package/lib/chain/opPools/payloadAttestationPool.d.ts.map +1 -1
  227. package/lib/chain/opPools/payloadAttestationPool.js.map +1 -1
  228. package/lib/chain/opPools/syncCommitteeMessagePool.d.ts.map +1 -1
  229. package/lib/chain/opPools/syncCommitteeMessagePool.js.map +1 -1
  230. package/lib/chain/opPools/syncContributionAndProofPool.d.ts.map +1 -1
  231. package/lib/chain/opPools/syncContributionAndProofPool.js.map +1 -1
  232. package/lib/chain/opPools/types.js +4 -2
  233. package/lib/chain/opPools/types.js.map +1 -1
  234. package/lib/chain/opPools/utils.js.map +1 -1
  235. package/lib/chain/options.d.ts.map +1 -1
  236. package/lib/chain/options.js.map +1 -1
  237. package/lib/chain/prepareNextSlot.d.ts +1 -2
  238. package/lib/chain/prepareNextSlot.d.ts.map +1 -1
  239. package/lib/chain/prepareNextSlot.js +3 -3
  240. package/lib/chain/prepareNextSlot.js.map +1 -1
  241. package/lib/chain/produceBlock/computeNewStateRoot.d.ts +9 -2
  242. package/lib/chain/produceBlock/computeNewStateRoot.d.ts.map +1 -1
  243. package/lib/chain/produceBlock/computeNewStateRoot.js +25 -2
  244. package/lib/chain/produceBlock/computeNewStateRoot.js.map +1 -1
  245. package/lib/chain/produceBlock/produceBlockBody.d.ts +23 -8
  246. package/lib/chain/produceBlock/produceBlockBody.d.ts.map +1 -1
  247. package/lib/chain/produceBlock/produceBlockBody.js +115 -13
  248. package/lib/chain/produceBlock/produceBlockBody.js.map +1 -1
  249. package/lib/chain/produceBlock/validateBlobsAndKzgCommitments.js.map +1 -1
  250. package/lib/chain/regen/errors.d.ts.map +1 -1
  251. package/lib/chain/regen/errors.js +2 -1
  252. package/lib/chain/regen/errors.js.map +1 -1
  253. package/lib/chain/regen/interface.js +4 -2
  254. package/lib/chain/regen/interface.js.map +1 -1
  255. package/lib/chain/regen/queued.d.ts.map +1 -1
  256. package/lib/chain/regen/queued.js +4 -1
  257. package/lib/chain/regen/queued.js.map +1 -1
  258. package/lib/chain/regen/regen.d.ts.map +1 -1
  259. package/lib/chain/regen/regen.js +6 -2
  260. package/lib/chain/regen/regen.js.map +1 -1
  261. package/lib/chain/reprocess.d.ts.map +1 -1
  262. package/lib/chain/reprocess.js +2 -1
  263. package/lib/chain/reprocess.js.map +1 -1
  264. package/lib/chain/seenCache/seenAggregateAndProof.d.ts.map +1 -1
  265. package/lib/chain/seenCache/seenAggregateAndProof.js.map +1 -1
  266. package/lib/chain/seenCache/seenAttestationData.d.ts.map +1 -1
  267. package/lib/chain/seenCache/seenAttestationData.js +2 -1
  268. package/lib/chain/seenCache/seenAttestationData.js.map +1 -1
  269. package/lib/chain/seenCache/seenAttesters.d.ts.map +1 -1
  270. package/lib/chain/seenCache/seenAttesters.js.map +1 -1
  271. package/lib/chain/seenCache/seenBlockAttesters.d.ts.map +1 -1
  272. package/lib/chain/seenCache/seenBlockAttesters.js.map +1 -1
  273. package/lib/chain/seenCache/seenBlockProposers.d.ts.map +1 -1
  274. package/lib/chain/seenCache/seenBlockProposers.js.map +1 -1
  275. package/lib/chain/seenCache/seenCommittee.d.ts.map +1 -1
  276. package/lib/chain/seenCache/seenCommittee.js.map +1 -1
  277. package/lib/chain/seenCache/seenCommitteeContribution.d.ts.map +1 -1
  278. package/lib/chain/seenCache/seenCommitteeContribution.js.map +1 -1
  279. package/lib/chain/seenCache/seenExecutionPayloadBids.d.ts.map +1 -1
  280. package/lib/chain/seenCache/seenExecutionPayloadBids.js.map +1 -1
  281. package/lib/chain/seenCache/seenExecutionPayloadEnvelope.d.ts.map +1 -1
  282. package/lib/chain/seenCache/seenExecutionPayloadEnvelope.js.map +1 -1
  283. package/lib/chain/seenCache/seenGossipBlockInput.d.ts +7 -3
  284. package/lib/chain/seenCache/seenGossipBlockInput.d.ts.map +1 -1
  285. package/lib/chain/seenCache/seenGossipBlockInput.js +38 -16
  286. package/lib/chain/seenCache/seenGossipBlockInput.js.map +1 -1
  287. package/lib/chain/serializeState.js +1 -0
  288. package/lib/chain/serializeState.js.map +1 -1
  289. package/lib/chain/shufflingCache.d.ts.map +1 -1
  290. package/lib/chain/shufflingCache.js +2 -1
  291. package/lib/chain/shufflingCache.js.map +1 -1
  292. package/lib/chain/stateCache/datastore/db.d.ts.map +1 -1
  293. package/lib/chain/stateCache/datastore/db.js.map +1 -1
  294. package/lib/chain/stateCache/datastore/file.d.ts.map +1 -1
  295. package/lib/chain/stateCache/datastore/file.js.map +1 -1
  296. package/lib/chain/stateCache/fifoBlockStateCache.d.ts.map +1 -1
  297. package/lib/chain/stateCache/fifoBlockStateCache.js.map +1 -1
  298. package/lib/chain/stateCache/mapMetrics.d.ts.map +1 -1
  299. package/lib/chain/stateCache/mapMetrics.js.map +1 -1
  300. package/lib/chain/stateCache/persistentCheckpointsCache.d.ts +1 -41
  301. package/lib/chain/stateCache/persistentCheckpointsCache.d.ts.map +1 -1
  302. package/lib/chain/stateCache/persistentCheckpointsCache.js.map +1 -1
  303. package/lib/chain/stateCache/types.js +2 -1
  304. package/lib/chain/stateCache/types.js.map +1 -1
  305. package/lib/chain/validation/aggregateAndProof.js +1 -1
  306. package/lib/chain/validation/aggregateAndProof.js.map +1 -1
  307. package/lib/chain/validation/attestation.d.ts.map +1 -1
  308. package/lib/chain/validation/attestation.js +14 -7
  309. package/lib/chain/validation/attestation.js.map +1 -1
  310. package/lib/chain/validation/attesterSlashing.d.ts.map +1 -1
  311. package/lib/chain/validation/attesterSlashing.js +9 -2
  312. package/lib/chain/validation/attesterSlashing.js.map +1 -1
  313. package/lib/chain/validation/blobSidecar.js +2 -2
  314. package/lib/chain/validation/blobSidecar.js.map +1 -1
  315. package/lib/chain/validation/block.d.ts.map +1 -1
  316. package/lib/chain/validation/block.js +6 -3
  317. package/lib/chain/validation/block.js.map +1 -1
  318. package/lib/chain/validation/blsToExecutionChange.js.map +1 -1
  319. package/lib/chain/validation/dataColumnSidecar.d.ts +2 -2
  320. package/lib/chain/validation/dataColumnSidecar.d.ts.map +1 -1
  321. package/lib/chain/validation/dataColumnSidecar.js +1 -1
  322. package/lib/chain/validation/dataColumnSidecar.js.map +1 -1
  323. package/lib/chain/validation/executionPayloadBid.js +1 -2
  324. package/lib/chain/validation/executionPayloadBid.js.map +1 -1
  325. package/lib/chain/validation/executionPayloadEnvelope.js +4 -4
  326. package/lib/chain/validation/executionPayloadEnvelope.js.map +1 -1
  327. package/lib/chain/validation/lightClientFinalityUpdate.js.map +1 -1
  328. package/lib/chain/validation/lightClientOptimisticUpdate.js.map +1 -1
  329. package/lib/chain/validation/payloadAttestationMessage.js +9 -3
  330. package/lib/chain/validation/payloadAttestationMessage.js.map +1 -1
  331. package/lib/chain/validation/proposerSlashing.js +1 -1
  332. package/lib/chain/validation/proposerSlashing.js.map +1 -1
  333. package/lib/chain/validation/signatureSets/aggregateAndProof.js.map +1 -1
  334. package/lib/chain/validation/signatureSets/contributionAndProof.js.map +1 -1
  335. package/lib/chain/validation/signatureSets/selectionProof.js.map +1 -1
  336. package/lib/chain/validation/signatureSets/syncCommittee.js.map +1 -1
  337. package/lib/chain/validation/signatureSets/syncCommitteeContribution.js.map +1 -1
  338. package/lib/chain/validation/signatureSets/syncCommitteeSelectionProof.js.map +1 -1
  339. package/lib/chain/validation/syncCommittee.js.map +1 -1
  340. package/lib/chain/validation/syncCommitteeContributionAndProof.js +1 -1
  341. package/lib/chain/validation/syncCommitteeContributionAndProof.js.map +1 -1
  342. package/lib/chain/validation/voluntaryExit.js.map +1 -1
  343. package/lib/chain/validatorMonitor.d.ts.map +1 -1
  344. package/lib/chain/validatorMonitor.js +2 -1
  345. package/lib/chain/validatorMonitor.js.map +1 -1
  346. package/lib/constants/network.js +4 -2
  347. package/lib/constants/network.js.map +1 -1
  348. package/lib/db/beacon.d.ts +3 -1
  349. package/lib/db/beacon.d.ts.map +1 -1
  350. package/lib/db/beacon.js +5 -1
  351. package/lib/db/beacon.js.map +1 -1
  352. package/lib/db/buckets.d.ts +24 -22
  353. package/lib/db/buckets.d.ts.map +1 -1
  354. package/lib/db/buckets.js +4 -1
  355. package/lib/db/buckets.js.map +1 -1
  356. package/lib/db/index.d.ts +1 -0
  357. package/lib/db/index.d.ts.map +1 -1
  358. package/lib/db/index.js +1 -0
  359. package/lib/db/index.js.map +1 -1
  360. package/lib/db/interface.d.ts +3 -1
  361. package/lib/db/interface.d.ts.map +1 -1
  362. package/lib/db/repositories/attesterSlashing.d.ts.map +1 -1
  363. package/lib/db/repositories/attesterSlashing.js.map +1 -1
  364. package/lib/db/repositories/backfilledRanges.d.ts.map +1 -1
  365. package/lib/db/repositories/backfilledRanges.js.map +1 -1
  366. package/lib/db/repositories/blobSidecars.d.ts.map +1 -1
  367. package/lib/db/repositories/blobSidecars.js.map +1 -1
  368. package/lib/db/repositories/blobSidecarsArchive.d.ts.map +1 -1
  369. package/lib/db/repositories/blobSidecarsArchive.js.map +1 -1
  370. package/lib/db/repositories/block.d.ts.map +1 -1
  371. package/lib/db/repositories/block.js.map +1 -1
  372. package/lib/db/repositories/blockArchive.d.ts.map +1 -1
  373. package/lib/db/repositories/blockArchive.js +1 -2
  374. package/lib/db/repositories/blockArchive.js.map +1 -1
  375. package/lib/db/repositories/blockArchiveIndex.d.ts +2 -2
  376. package/lib/db/repositories/blockArchiveIndex.d.ts.map +1 -1
  377. package/lib/db/repositories/blockArchiveIndex.js.map +1 -1
  378. package/lib/db/repositories/blsToExecutionChange.d.ts.map +1 -1
  379. package/lib/db/repositories/blsToExecutionChange.js.map +1 -1
  380. package/lib/db/repositories/checkpointState.d.ts.map +1 -1
  381. package/lib/db/repositories/checkpointState.js.map +1 -1
  382. package/lib/db/repositories/dataColumnSidecar.d.ts +5 -3
  383. package/lib/db/repositories/dataColumnSidecar.d.ts.map +1 -1
  384. package/lib/db/repositories/dataColumnSidecar.js +14 -1
  385. package/lib/db/repositories/dataColumnSidecar.js.map +1 -1
  386. package/lib/db/repositories/dataColumnSidecarArchive.d.ts +5 -3
  387. package/lib/db/repositories/dataColumnSidecarArchive.d.ts.map +1 -1
  388. package/lib/db/repositories/dataColumnSidecarArchive.js +14 -1
  389. package/lib/db/repositories/dataColumnSidecarArchive.js.map +1 -1
  390. package/lib/db/repositories/executionPayloadEnvelope.d.ts +19 -0
  391. package/lib/db/repositories/executionPayloadEnvelope.d.ts.map +1 -0
  392. package/lib/db/repositories/executionPayloadEnvelope.js +22 -0
  393. package/lib/db/repositories/executionPayloadEnvelope.js.map +1 -0
  394. package/lib/db/repositories/executionPayloadEnvelopeArchive.d.ts +18 -0
  395. package/lib/db/repositories/executionPayloadEnvelopeArchive.d.ts.map +1 -0
  396. package/lib/db/repositories/executionPayloadEnvelopeArchive.js +28 -0
  397. package/lib/db/repositories/executionPayloadEnvelopeArchive.js.map +1 -0
  398. package/lib/db/repositories/index.d.ts +2 -0
  399. package/lib/db/repositories/index.d.ts.map +1 -1
  400. package/lib/db/repositories/index.js +2 -0
  401. package/lib/db/repositories/index.js.map +1 -1
  402. package/lib/db/repositories/lightclientBestUpdate.d.ts.map +1 -1
  403. package/lib/db/repositories/lightclientBestUpdate.js.map +1 -1
  404. package/lib/db/repositories/lightclientCheckpointHeader.d.ts.map +1 -1
  405. package/lib/db/repositories/lightclientCheckpointHeader.js.map +1 -1
  406. package/lib/db/repositories/lightclientSyncCommittee.d.ts.map +1 -1
  407. package/lib/db/repositories/lightclientSyncCommittee.js.map +1 -1
  408. package/lib/db/repositories/lightclientSyncCommitteeWitness.d.ts.map +1 -1
  409. package/lib/db/repositories/lightclientSyncCommitteeWitness.js.map +1 -1
  410. package/lib/db/repositories/proposerSlashing.d.ts.map +1 -1
  411. package/lib/db/repositories/proposerSlashing.js.map +1 -1
  412. package/lib/db/repositories/stateArchive.d.ts.map +1 -1
  413. package/lib/db/repositories/stateArchive.js.map +1 -1
  414. package/lib/db/repositories/stateArchiveIndex.js.map +1 -1
  415. package/lib/db/repositories/voluntaryExit.d.ts.map +1 -1
  416. package/lib/db/repositories/voluntaryExit.js.map +1 -1
  417. package/lib/execution/builder/cache.d.ts.map +1 -1
  418. package/lib/execution/builder/cache.js.map +1 -1
  419. package/lib/execution/builder/http.d.ts.map +1 -1
  420. package/lib/execution/builder/http.js +2 -1
  421. package/lib/execution/builder/http.js.map +1 -1
  422. package/lib/execution/builder/index.js.map +1 -1
  423. package/lib/execution/builder/utils.js.map +1 -1
  424. package/lib/execution/engine/disabled.d.ts.map +1 -1
  425. package/lib/execution/engine/disabled.js.map +1 -1
  426. package/lib/execution/engine/http.d.ts +1 -0
  427. package/lib/execution/engine/http.d.ts.map +1 -1
  428. package/lib/execution/engine/http.js +3 -0
  429. package/lib/execution/engine/http.js.map +1 -1
  430. package/lib/execution/engine/index.js.map +1 -1
  431. package/lib/execution/engine/interface.js +4 -2
  432. package/lib/execution/engine/interface.js.map +1 -1
  433. package/lib/execution/engine/jsonRpcHttpClient.d.ts +10 -15
  434. package/lib/execution/engine/jsonRpcHttpClient.d.ts.map +1 -1
  435. package/lib/execution/engine/jsonRpcHttpClient.js +2 -1
  436. package/lib/execution/engine/jsonRpcHttpClient.js.map +1 -1
  437. package/lib/execution/engine/jwt.js.map +1 -1
  438. package/lib/execution/engine/mock.d.ts.map +1 -1
  439. package/lib/execution/engine/mock.js.map +1 -1
  440. package/lib/execution/engine/payloadIdCache.d.ts.map +1 -1
  441. package/lib/execution/engine/payloadIdCache.js.map +1 -1
  442. package/lib/execution/engine/types.js.map +1 -1
  443. package/lib/execution/engine/utils.d.ts +1 -1
  444. package/lib/execution/engine/utils.d.ts.map +1 -1
  445. package/lib/execution/engine/utils.js.map +1 -1
  446. package/lib/metrics/metrics/beacon.d.ts +1 -0
  447. package/lib/metrics/metrics/beacon.d.ts.map +1 -1
  448. package/lib/metrics/metrics/beacon.js +5 -0
  449. package/lib/metrics/metrics/beacon.js.map +1 -1
  450. package/lib/metrics/metrics/lodestar.d.ts +16 -6
  451. package/lib/metrics/metrics/lodestar.d.ts.map +1 -1
  452. package/lib/metrics/metrics/lodestar.js +32 -10
  453. package/lib/metrics/metrics/lodestar.js.map +1 -1
  454. package/lib/metrics/metrics.d.ts.map +1 -1
  455. package/lib/metrics/metrics.js +8 -3
  456. package/lib/metrics/metrics.js.map +1 -1
  457. package/lib/metrics/nodeJsMetrics.js.map +1 -1
  458. package/lib/metrics/server/http.d.ts +1 -1
  459. package/lib/metrics/server/http.d.ts.map +1 -1
  460. package/lib/metrics/server/http.js.map +1 -1
  461. package/lib/metrics/utils/avgMinMax.d.ts.map +1 -1
  462. package/lib/metrics/utils/avgMinMax.js.map +1 -1
  463. package/lib/metrics/utils/gauge.d.ts.map +1 -1
  464. package/lib/metrics/utils/gauge.js.map +1 -1
  465. package/lib/metrics/utils/registryMetricCreator.d.ts.map +1 -1
  466. package/lib/metrics/utils/registryMetricCreator.js.map +1 -1
  467. package/lib/monitoring/clientStats.js.map +1 -1
  468. package/lib/monitoring/properties.d.ts.map +1 -1
  469. package/lib/monitoring/properties.js.map +1 -1
  470. package/lib/monitoring/service.d.ts +2 -2
  471. package/lib/monitoring/service.d.ts.map +1 -1
  472. package/lib/monitoring/service.js +3 -2
  473. package/lib/monitoring/service.js.map +1 -1
  474. package/lib/monitoring/system.d.ts.map +1 -1
  475. package/lib/monitoring/system.js.map +1 -1
  476. package/lib/monitoring/types.js +4 -2
  477. package/lib/monitoring/types.js.map +1 -1
  478. package/lib/network/core/events.d.ts +1 -3
  479. package/lib/network/core/events.d.ts.map +1 -1
  480. package/lib/network/core/events.js +4 -2
  481. package/lib/network/core/events.js.map +1 -1
  482. package/lib/network/core/metrics.d.ts +6 -7
  483. package/lib/network/core/metrics.d.ts.map +1 -1
  484. package/lib/network/core/metrics.js.map +1 -1
  485. package/lib/network/core/networkCore.d.ts +4 -4
  486. package/lib/network/core/networkCore.d.ts.map +1 -1
  487. package/lib/network/core/networkCore.js.map +1 -1
  488. package/lib/network/core/networkCoreWorker.js.map +1 -1
  489. package/lib/network/core/networkCoreWorkerHandler.d.ts +3 -3
  490. package/lib/network/core/networkCoreWorkerHandler.d.ts.map +1 -1
  491. package/lib/network/core/networkCoreWorkerHandler.js.map +1 -1
  492. package/lib/network/core/types.d.ts +2 -2
  493. package/lib/network/core/types.d.ts.map +1 -1
  494. package/lib/network/discv5/index.d.ts +1 -3
  495. package/lib/network/discv5/index.d.ts.map +1 -1
  496. package/lib/network/discv5/index.js.map +1 -1
  497. package/lib/network/discv5/utils.js +2 -1
  498. package/lib/network/discv5/utils.js.map +1 -1
  499. package/lib/network/discv5/worker.js.map +1 -1
  500. package/lib/network/events.d.ts +3 -4
  501. package/lib/network/events.d.ts.map +1 -1
  502. package/lib/network/events.js +4 -2
  503. package/lib/network/events.js.map +1 -1
  504. package/lib/network/forks.js.map +1 -1
  505. package/lib/network/gossip/encoding.d.ts +3 -3
  506. package/lib/network/gossip/encoding.d.ts.map +1 -1
  507. package/lib/network/gossip/encoding.js.map +1 -1
  508. package/lib/network/gossip/errors.d.ts.map +1 -1
  509. package/lib/network/gossip/errors.js.map +1 -1
  510. package/lib/network/gossip/gossipsub.d.ts +13 -4
  511. package/lib/network/gossip/gossipsub.d.ts.map +1 -1
  512. package/lib/network/gossip/gossipsub.js +47 -20
  513. package/lib/network/gossip/gossipsub.js.map +1 -1
  514. package/lib/network/gossip/interface.d.ts +6 -6
  515. package/lib/network/gossip/interface.d.ts.map +1 -1
  516. package/lib/network/gossip/interface.js +4 -2
  517. package/lib/network/gossip/interface.js.map +1 -1
  518. package/lib/network/gossip/metrics.d.ts +12 -14
  519. package/lib/network/gossip/metrics.d.ts.map +1 -1
  520. package/lib/network/gossip/metrics.js.map +1 -1
  521. package/lib/network/gossip/scoringParameters.d.ts +2 -2
  522. package/lib/network/gossip/scoringParameters.d.ts.map +1 -1
  523. package/lib/network/gossip/scoringParameters.js +1 -1
  524. package/lib/network/gossip/scoringParameters.js.map +1 -1
  525. package/lib/network/gossip/topic.d.ts +3166 -3169
  526. package/lib/network/gossip/topic.d.ts.map +1 -1
  527. package/lib/network/gossip/topic.js +2 -2
  528. package/lib/network/gossip/topic.js.map +1 -1
  529. package/lib/network/interface.d.ts +6 -5
  530. package/lib/network/interface.d.ts.map +1 -1
  531. package/lib/network/libp2p/error.js +2 -1
  532. package/lib/network/libp2p/error.js.map +1 -1
  533. package/lib/network/libp2p/index.d.ts +1 -1
  534. package/lib/network/libp2p/index.d.ts.map +1 -1
  535. package/lib/network/libp2p/index.js +7 -2
  536. package/lib/network/libp2p/index.js.map +1 -1
  537. package/lib/network/metadata.d.ts.map +1 -1
  538. package/lib/network/metadata.js +4 -2
  539. package/lib/network/metadata.js.map +1 -1
  540. package/lib/network/network.d.ts +6 -5
  541. package/lib/network/network.d.ts.map +1 -1
  542. package/lib/network/network.js +11 -2
  543. package/lib/network/network.js.map +1 -1
  544. package/lib/network/options.d.ts.map +1 -1
  545. package/lib/network/options.js +3 -0
  546. package/lib/network/options.js.map +1 -1
  547. package/lib/network/peers/client.js +2 -1
  548. package/lib/network/peers/client.js.map +1 -1
  549. package/lib/network/peers/datastore.d.ts +7 -8
  550. package/lib/network/peers/datastore.d.ts.map +1 -1
  551. package/lib/network/peers/datastore.js +10 -10
  552. package/lib/network/peers/datastore.js.map +1 -1
  553. package/lib/network/peers/discover.d.ts +0 -7
  554. package/lib/network/peers/discover.d.ts.map +1 -1
  555. package/lib/network/peers/discover.js +4 -2
  556. package/lib/network/peers/discover.js.map +1 -1
  557. package/lib/network/peers/peerManager.d.ts +3 -1
  558. package/lib/network/peers/peerManager.d.ts.map +1 -1
  559. package/lib/network/peers/peerManager.js +103 -53
  560. package/lib/network/peers/peerManager.js.map +1 -1
  561. package/lib/network/peers/peersData.d.ts.map +1 -1
  562. package/lib/network/peers/peersData.js +2 -1
  563. package/lib/network/peers/peersData.js.map +1 -1
  564. package/lib/network/peers/score/interface.js +4 -2
  565. package/lib/network/peers/score/interface.js.map +1 -1
  566. package/lib/network/peers/score/score.d.ts.map +1 -1
  567. package/lib/network/peers/score/score.js.map +1 -1
  568. package/lib/network/peers/score/store.d.ts.map +1 -1
  569. package/lib/network/peers/score/store.js.map +1 -1
  570. package/lib/network/peers/score/utils.js.map +1 -1
  571. package/lib/network/peers/utils/assertPeerRelevance.js +2 -1
  572. package/lib/network/peers/utils/assertPeerRelevance.js.map +1 -1
  573. package/lib/network/peers/utils/enrSubnetsDeserialize.js.map +1 -1
  574. package/lib/network/peers/utils/getConnectedPeerIds.js.map +1 -1
  575. package/lib/network/peers/utils/prioritizePeers.d.ts +3 -3
  576. package/lib/network/peers/utils/prioritizePeers.d.ts.map +1 -1
  577. package/lib/network/peers/utils/prioritizePeers.js +2 -1
  578. package/lib/network/peers/utils/prioritizePeers.js.map +1 -1
  579. package/lib/network/peers/utils/subnetMap.d.ts.map +1 -1
  580. package/lib/network/peers/utils/subnetMap.js.map +1 -1
  581. package/lib/network/processor/aggregatorTracker.d.ts.map +1 -1
  582. package/lib/network/processor/aggregatorTracker.js.map +1 -1
  583. package/lib/network/processor/extractSlotRootFns.js.map +1 -1
  584. package/lib/network/processor/gossipHandlers.d.ts.map +1 -1
  585. package/lib/network/processor/gossipHandlers.js +9 -2
  586. package/lib/network/processor/gossipHandlers.js.map +1 -1
  587. package/lib/network/processor/gossipQueues/index.js.map +1 -1
  588. package/lib/network/processor/gossipQueues/indexed.d.ts.map +1 -1
  589. package/lib/network/processor/gossipQueues/indexed.js.map +1 -1
  590. package/lib/network/processor/gossipQueues/linear.d.ts.map +1 -1
  591. package/lib/network/processor/gossipQueues/linear.js.map +1 -1
  592. package/lib/network/processor/gossipQueues/types.js +4 -2
  593. package/lib/network/processor/gossipQueues/types.js.map +1 -1
  594. package/lib/network/processor/gossipValidatorFn.js +1 -1
  595. package/lib/network/processor/gossipValidatorFn.js.map +1 -1
  596. package/lib/network/processor/index.d.ts.map +1 -1
  597. package/lib/network/processor/index.js +4 -2
  598. package/lib/network/processor/index.js.map +1 -1
  599. package/lib/network/processor/types.d.ts +1 -1
  600. package/lib/network/processor/types.d.ts.map +1 -1
  601. package/lib/network/reqresp/ReqRespBeaconNode.d.ts.map +1 -1
  602. package/lib/network/reqresp/ReqRespBeaconNode.js.map +1 -1
  603. package/lib/network/reqresp/handlers/beaconBlocksByRange.d.ts.map +1 -1
  604. package/lib/network/reqresp/handlers/beaconBlocksByRange.js +3 -2
  605. package/lib/network/reqresp/handlers/beaconBlocksByRange.js.map +1 -1
  606. package/lib/network/reqresp/handlers/beaconBlocksByRoot.js.map +1 -1
  607. package/lib/network/reqresp/handlers/blobSidecarsByRange.d.ts.map +1 -1
  608. package/lib/network/reqresp/handlers/blobSidecarsByRange.js +3 -2
  609. package/lib/network/reqresp/handlers/blobSidecarsByRange.js.map +1 -1
  610. package/lib/network/reqresp/handlers/blobSidecarsByRoot.js +1 -1
  611. package/lib/network/reqresp/handlers/blobSidecarsByRoot.js.map +1 -1
  612. package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.d.ts.map +1 -1
  613. package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.js +3 -2
  614. package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.js.map +1 -1
  615. package/lib/network/reqresp/handlers/dataColumnSidecarsByRoot.js +1 -1
  616. package/lib/network/reqresp/handlers/dataColumnSidecarsByRoot.js.map +1 -1
  617. package/lib/network/reqresp/handlers/index.js.map +1 -1
  618. package/lib/network/reqresp/handlers/lightClientBootstrap.js.map +1 -1
  619. package/lib/network/reqresp/handlers/lightClientFinalityUpdate.js.map +1 -1
  620. package/lib/network/reqresp/handlers/lightClientOptimisticUpdate.js.map +1 -1
  621. package/lib/network/reqresp/handlers/lightClientUpdatesByRange.d.ts.map +1 -1
  622. package/lib/network/reqresp/handlers/lightClientUpdatesByRange.js +7 -1
  623. package/lib/network/reqresp/handlers/lightClientUpdatesByRange.js.map +1 -1
  624. package/lib/network/reqresp/interface.js +2 -1
  625. package/lib/network/reqresp/interface.js.map +1 -1
  626. package/lib/network/reqresp/protocols.d.ts.map +1 -1
  627. package/lib/network/reqresp/protocols.js.map +1 -1
  628. package/lib/network/reqresp/rateLimit.js.map +1 -1
  629. package/lib/network/reqresp/score.d.ts.map +1 -1
  630. package/lib/network/reqresp/score.js +0 -1
  631. package/lib/network/reqresp/score.js.map +1 -1
  632. package/lib/network/reqresp/types.js +4 -2
  633. package/lib/network/reqresp/types.js.map +1 -1
  634. package/lib/network/reqresp/utils/collect.d.ts +1 -1
  635. package/lib/network/reqresp/utils/collect.js.map +1 -1
  636. package/lib/network/reqresp/utils/collectSequentialBlocksInRange.d.ts +1 -1
  637. package/lib/network/reqresp/utils/collectSequentialBlocksInRange.js +2 -1
  638. package/lib/network/reqresp/utils/collectSequentialBlocksInRange.js.map +1 -1
  639. package/lib/network/reqresp/utils/dataColumnResponseValidation.d.ts +1 -1
  640. package/lib/network/reqresp/utils/dataColumnResponseValidation.d.ts.map +1 -1
  641. package/lib/network/reqresp/utils/dataColumnResponseValidation.js.map +1 -1
  642. package/lib/network/statusCache.d.ts.map +1 -1
  643. package/lib/network/statusCache.js.map +1 -1
  644. package/lib/network/subnets/attnetsService.d.ts.map +1 -1
  645. package/lib/network/subnets/attnetsService.js +2 -1
  646. package/lib/network/subnets/attnetsService.js.map +1 -1
  647. package/lib/network/subnets/interface.js.map +1 -1
  648. package/lib/network/subnets/syncnetsService.d.ts.map +1 -1
  649. package/lib/network/subnets/syncnetsService.js.map +1 -1
  650. package/lib/network/subnets/util.js.map +1 -1
  651. package/lib/network/util.js +2 -2
  652. package/lib/network/util.js.map +1 -1
  653. package/lib/node/nodejs.d.ts +4 -6
  654. package/lib/node/nodejs.d.ts.map +1 -1
  655. package/lib/node/nodejs.js +8 -5
  656. package/lib/node/nodejs.js.map +1 -1
  657. package/lib/node/notifier.js.map +1 -1
  658. package/lib/node/utils/interop/deposits.js.map +1 -1
  659. package/lib/node/utils/interop/state.d.ts +1 -1
  660. package/lib/node/utils/interop/state.d.ts.map +1 -1
  661. package/lib/node/utils/interop/state.js.map +1 -1
  662. package/lib/node/utils/lightclient.js.map +1 -1
  663. package/lib/node/utils/state.js.map +1 -1
  664. package/lib/sync/backfill/backfill.d.ts +1 -10
  665. package/lib/sync/backfill/backfill.d.ts.map +1 -1
  666. package/lib/sync/backfill/backfill.js +6 -3
  667. package/lib/sync/backfill/backfill.js.map +1 -1
  668. package/lib/sync/backfill/errors.js +2 -1
  669. package/lib/sync/backfill/errors.js.map +1 -1
  670. package/lib/sync/backfill/verify.js.map +1 -1
  671. package/lib/sync/interface.js +2 -1
  672. package/lib/sync/interface.js.map +1 -1
  673. package/lib/sync/range/batch.d.ts.map +1 -1
  674. package/lib/sync/range/batch.js +4 -2
  675. package/lib/sync/range/batch.js.map +1 -1
  676. package/lib/sync/range/chain.d.ts +0 -10
  677. package/lib/sync/range/chain.d.ts.map +1 -1
  678. package/lib/sync/range/chain.js +2 -1
  679. package/lib/sync/range/chain.js.map +1 -1
  680. package/lib/sync/range/range.d.ts +1 -3
  681. package/lib/sync/range/range.d.ts.map +1 -1
  682. package/lib/sync/range/range.js +4 -2
  683. package/lib/sync/range/range.js.map +1 -1
  684. package/lib/sync/range/utils/batches.js.map +1 -1
  685. package/lib/sync/range/utils/chainTarget.js.map +1 -1
  686. package/lib/sync/range/utils/hashBlocks.js.map +1 -1
  687. package/lib/sync/range/utils/peerBalancer.d.ts.map +1 -1
  688. package/lib/sync/range/utils/peerBalancer.js.map +1 -1
  689. package/lib/sync/range/utils/updateChains.js.map +1 -1
  690. package/lib/sync/sync.d.ts.map +1 -1
  691. package/lib/sync/sync.js.map +1 -1
  692. package/lib/sync/types.js +4 -2
  693. package/lib/sync/types.js.map +1 -1
  694. package/lib/sync/unknownBlock.d.ts +0 -14
  695. package/lib/sync/unknownBlock.d.ts.map +1 -1
  696. package/lib/sync/unknownBlock.js.map +1 -1
  697. package/lib/sync/utils/downloadByRange.d.ts +4 -4
  698. package/lib/sync/utils/downloadByRange.d.ts.map +1 -1
  699. package/lib/sync/utils/downloadByRange.js +2 -1
  700. package/lib/sync/utils/downloadByRange.js.map +1 -1
  701. package/lib/sync/utils/downloadByRoot.d.ts +8 -8
  702. package/lib/sync/utils/downloadByRoot.d.ts.map +1 -1
  703. package/lib/sync/utils/downloadByRoot.js +2 -1
  704. package/lib/sync/utils/downloadByRoot.js.map +1 -1
  705. package/lib/sync/utils/pendingBlocksTree.js.map +1 -1
  706. package/lib/sync/utils/remoteSyncType.d.ts +1 -1
  707. package/lib/sync/utils/remoteSyncType.d.ts.map +1 -1
  708. package/lib/sync/utils/remoteSyncType.js +4 -2
  709. package/lib/sync/utils/remoteSyncType.js.map +1 -1
  710. package/lib/util/address.js.map +1 -1
  711. package/lib/util/array.d.ts.map +1 -1
  712. package/lib/util/array.js.map +1 -1
  713. package/lib/util/asyncIterableToEvents.d.ts.map +1 -1
  714. package/lib/util/asyncIterableToEvents.js +2 -1
  715. package/lib/util/asyncIterableToEvents.js.map +1 -1
  716. package/lib/util/binarySearch.d.ts.map +1 -1
  717. package/lib/util/binarySearch.js.map +1 -1
  718. package/lib/util/bitArray.js +2 -1
  719. package/lib/util/bitArray.js.map +1 -1
  720. package/lib/util/blobs.d.ts +2 -2
  721. package/lib/util/blobs.d.ts.map +1 -1
  722. package/lib/util/blobs.js.map +1 -1
  723. package/lib/util/bufferPool.d.ts.map +1 -1
  724. package/lib/util/bufferPool.js +2 -1
  725. package/lib/util/bufferPool.js.map +1 -1
  726. package/lib/util/chunkify.js.map +1 -1
  727. package/lib/util/clock.d.ts +6 -0
  728. package/lib/util/clock.d.ts.map +1 -1
  729. package/lib/util/clock.js +11 -4
  730. package/lib/util/clock.js.map +1 -1
  731. package/lib/util/dataColumns.d.ts +11 -3
  732. package/lib/util/dataColumns.d.ts.map +1 -1
  733. package/lib/util/dataColumns.js +31 -2
  734. package/lib/util/dataColumns.js.map +1 -1
  735. package/lib/util/dependentRoot.js.map +1 -1
  736. package/lib/util/enum.js.map +1 -1
  737. package/lib/util/error.js.map +1 -1
  738. package/lib/util/eventLoop.js.map +1 -1
  739. package/lib/util/execution.js +2 -1
  740. package/lib/util/execution.js.map +1 -1
  741. package/lib/util/file.js.map +1 -1
  742. package/lib/util/forkChoice.js.map +1 -1
  743. package/lib/util/forkName.js.map +1 -1
  744. package/lib/util/graffiti.js.map +1 -1
  745. package/lib/util/hex.js.map +1 -1
  746. package/lib/util/ip.js.map +1 -1
  747. package/lib/util/itTrigger.d.ts.map +1 -1
  748. package/lib/util/itTrigger.js.map +1 -1
  749. package/lib/util/map.d.ts.map +1 -1
  750. package/lib/util/map.js.map +1 -1
  751. package/lib/util/metadata.js.map +1 -1
  752. package/lib/util/multifork.d.ts +8 -0
  753. package/lib/util/multifork.d.ts.map +1 -1
  754. package/lib/util/multifork.js +37 -0
  755. package/lib/util/multifork.js.map +1 -1
  756. package/lib/util/numpy.js.map +1 -1
  757. package/lib/util/peerId.js.map +1 -1
  758. package/lib/util/profile.js +2 -1
  759. package/lib/util/profile.js.map +1 -1
  760. package/lib/util/promises.js.map +1 -1
  761. package/lib/util/queue/errors.js +2 -1
  762. package/lib/util/queue/errors.js.map +1 -1
  763. package/lib/util/queue/fnQueue.d.ts.map +1 -1
  764. package/lib/util/queue/fnQueue.js.map +1 -1
  765. package/lib/util/queue/itemQueue.d.ts.map +1 -1
  766. package/lib/util/queue/itemQueue.js.map +1 -1
  767. package/lib/util/queue/options.js +2 -1
  768. package/lib/util/queue/options.js.map +1 -1
  769. package/lib/util/serializedCache.d.ts +7 -2
  770. package/lib/util/serializedCache.d.ts.map +1 -1
  771. package/lib/util/serializedCache.js +9 -2
  772. package/lib/util/serializedCache.js.map +1 -1
  773. package/lib/util/set.d.ts.map +1 -1
  774. package/lib/util/set.js.map +1 -1
  775. package/lib/util/shuffle.js.map +1 -1
  776. package/lib/util/sortBy.js.map +1 -1
  777. package/lib/util/sszBytes.js.map +1 -1
  778. package/lib/util/time.js.map +1 -1
  779. package/lib/util/timeSeries.d.ts.map +1 -1
  780. package/lib/util/timeSeries.js.map +1 -1
  781. package/lib/util/types.d.ts.map +1 -1
  782. package/lib/util/workerEvents.d.ts +1 -1
  783. package/lib/util/workerEvents.d.ts.map +1 -1
  784. package/lib/util/workerEvents.js.map +1 -1
  785. package/lib/util/wrapError.js.map +1 -1
  786. package/package.json +41 -44
  787. package/src/api/impl/beacon/blocks/index.ts +147 -3
  788. package/src/api/impl/beacon/state/index.ts +8 -8
  789. package/src/api/impl/beacon/state/utils.ts +15 -29
  790. package/src/api/impl/debug/index.ts +9 -5
  791. package/src/api/impl/lightclient/index.ts +19 -2
  792. package/src/api/impl/node/utils.ts +3 -3
  793. package/src/api/impl/validator/index.ts +153 -17
  794. package/src/chain/archiveStore/archiveStore.ts +15 -5
  795. package/src/chain/archiveStore/historicalState/getHistoricalState.ts +10 -11
  796. package/src/chain/archiveStore/historicalState/worker.ts +3 -3
  797. package/src/chain/archiveStore/utils/archiveBlocks.ts +4 -5
  798. package/src/chain/archiveStore/utils/archivePayloads.ts +15 -0
  799. package/src/chain/archiveStore/utils/updateBackfillRange.ts +1 -1
  800. package/src/chain/blocks/blockInput/blockInput.ts +103 -3
  801. package/src/chain/blocks/blockInput/types.ts +18 -0
  802. package/src/chain/blocks/importBlock.ts +35 -7
  803. package/src/chain/blocks/index.ts +2 -1
  804. package/src/chain/blocks/verifyBlocksDataAvailability.ts +3 -0
  805. package/src/chain/blocks/verifyBlocksExecutionPayloads.ts +9 -2
  806. package/src/chain/blocks/verifyBlocksSanityChecks.ts +7 -2
  807. package/src/chain/blocks/writeBlockInputToDb.ts +105 -101
  808. package/src/chain/bls/multithread/index.ts +7 -7
  809. package/src/chain/bls/multithread/jobItem.ts +3 -3
  810. package/src/chain/bls/singleThread.ts +5 -5
  811. package/src/chain/bls/utils.ts +8 -5
  812. package/src/chain/chain.ts +82 -45
  813. package/src/chain/emitter.ts +5 -5
  814. package/src/chain/errors/executionPayloadBid.ts +1 -1
  815. package/src/chain/errors/executionPayloadEnvelope.ts +6 -2
  816. package/src/chain/errors/payloadAttestation.ts +1 -1
  817. package/src/chain/forkChoice/index.ts +39 -21
  818. package/src/chain/interface.ts +4 -11
  819. package/src/chain/lightClient/index.ts +4 -1
  820. package/src/chain/opPools/aggregatedAttestationPool.ts +1 -1
  821. package/src/chain/options.ts +1 -0
  822. package/src/chain/prepareNextSlot.ts +5 -5
  823. package/src/chain/produceBlock/computeNewStateRoot.ts +36 -3
  824. package/src/chain/produceBlock/produceBlockBody.ts +162 -13
  825. package/src/chain/regen/queued.ts +7 -2
  826. package/src/chain/regen/regen.ts +9 -3
  827. package/src/chain/seenCache/seenGossipBlockInput.ts +56 -18
  828. package/src/chain/validation/aggregateAndProof.ts +1 -1
  829. package/src/chain/validation/attestation.ts +14 -7
  830. package/src/chain/validation/attesterSlashing.ts +10 -1
  831. package/src/chain/validation/blobSidecar.ts +2 -2
  832. package/src/chain/validation/block.ts +9 -4
  833. package/src/chain/validation/dataColumnSidecar.ts +3 -6
  834. package/src/chain/validation/executionPayloadBid.ts +1 -2
  835. package/src/chain/validation/executionPayloadEnvelope.ts +4 -4
  836. package/src/chain/validation/payloadAttestationMessage.ts +10 -3
  837. package/src/chain/validation/proposerSlashing.ts +1 -1
  838. package/src/chain/validation/syncCommitteeContributionAndProof.ts +1 -1
  839. package/src/db/beacon.ts +8 -0
  840. package/src/db/buckets.ts +3 -0
  841. package/src/db/index.ts +1 -0
  842. package/src/db/interface.ts +5 -0
  843. package/src/db/repositories/blockArchive.ts +1 -2
  844. package/src/db/repositories/dataColumnSidecar.ts +18 -3
  845. package/src/db/repositories/dataColumnSidecarArchive.ts +18 -3
  846. package/src/db/repositories/executionPayloadEnvelope.ts +26 -0
  847. package/src/db/repositories/executionPayloadEnvelopeArchive.ts +32 -0
  848. package/src/db/repositories/index.ts +2 -0
  849. package/src/execution/engine/http.ts +3 -0
  850. package/src/metrics/metrics/beacon.ts +5 -0
  851. package/src/metrics/metrics/lodestar.ts +32 -10
  852. package/src/metrics/metrics.ts +8 -3
  853. package/src/monitoring/service.ts +3 -2
  854. package/src/network/core/networkCore.ts +3 -3
  855. package/src/network/core/networkCoreWorkerHandler.ts +3 -3
  856. package/src/network/core/types.ts +2 -2
  857. package/src/network/events.ts +2 -1
  858. package/src/network/gossip/encoding.ts +3 -3
  859. package/src/network/gossip/gossipsub.ts +86 -25
  860. package/src/network/gossip/interface.ts +6 -6
  861. package/src/network/gossip/scoringParameters.ts +4 -4
  862. package/src/network/gossip/topic.ts +2 -1
  863. package/src/network/interface.ts +7 -4
  864. package/src/network/libp2p/index.ts +8 -3
  865. package/src/network/network.ts +26 -7
  866. package/src/network/options.ts +3 -0
  867. package/src/network/peers/datastore.ts +13 -10
  868. package/src/network/peers/peerManager.ts +118 -54
  869. package/src/network/peers/utils/prioritizePeers.ts +3 -3
  870. package/src/network/processor/gossipHandlers.ts +19 -4
  871. package/src/network/processor/gossipValidatorFn.ts +2 -2
  872. package/src/network/processor/types.ts +1 -1
  873. package/src/network/reqresp/ReqRespBeaconNode.ts +1 -1
  874. package/src/network/reqresp/handlers/beaconBlocksByRange.ts +4 -3
  875. package/src/network/reqresp/handlers/blobSidecarsByRange.ts +3 -2
  876. package/src/network/reqresp/handlers/blobSidecarsByRoot.ts +1 -1
  877. package/src/network/reqresp/handlers/dataColumnSidecarsByRange.ts +4 -3
  878. package/src/network/reqresp/handlers/dataColumnSidecarsByRoot.ts +2 -2
  879. package/src/network/reqresp/handlers/lightClientUpdatesByRange.ts +6 -1
  880. package/src/network/reqresp/score.ts +0 -1
  881. package/src/network/reqresp/utils/collect.ts +1 -1
  882. package/src/network/reqresp/utils/collectSequentialBlocksInRange.ts +1 -1
  883. package/src/network/util.ts +2 -2
  884. package/src/node/nodejs.ts +8 -9
  885. package/src/sync/utils/downloadByRoot.ts +1 -1
  886. package/src/sync/utils/remoteSyncType.ts +1 -1
  887. package/src/util/blobs.ts +3 -3
  888. package/src/util/clock.ts +9 -4
  889. package/src/util/dataColumns.ts +37 -1
  890. package/src/util/multifork.ts +45 -0
  891. package/src/util/serializedCache.ts +10 -3
  892. package/src/util/workerEvents.ts +1 -1
@@ -95,14 +95,14 @@ export function getBeaconStateApi({
95
95
  const {state, executionOptimistic, finalized} = await getState(stateId);
96
96
  const currentEpoch = getCurrentEpoch(state);
97
97
  const {validators, balances} = state; // Get the validators sub tree once for all the loop
98
- const {pubkey2index} = chain;
98
+ const {pubkeyCache} = chain;
99
99
 
100
100
  const validatorResponses: routes.beacon.ValidatorResponse[] = [];
101
101
  if (validatorIds.length) {
102
102
  assertUniqueItems(validatorIds, "Duplicate validator IDs provided");
103
103
 
104
104
  for (const id of validatorIds) {
105
- const resp = getStateValidatorIndex(id, state, pubkey2index);
105
+ const resp = getStateValidatorIndex(id, state, pubkeyCache);
106
106
  if (resp.valid) {
107
107
  const validatorIndex = resp.validatorIndex;
108
108
  const validator = validators.getReadonly(validatorIndex);
@@ -127,7 +127,7 @@ export function getBeaconStateApi({
127
127
  if (statuses.length) {
128
128
  assertUniqueItems(statuses, "Duplicate statuses provided");
129
129
 
130
- const validatorsByStatus = filterStateValidatorsByStatus(statuses, state, pubkey2index, currentEpoch);
130
+ const validatorsByStatus = filterStateValidatorsByStatus(statuses, state, pubkeyCache, currentEpoch);
131
131
  return {
132
132
  data: validatorsByStatus,
133
133
  meta: {executionOptimistic, finalized},
@@ -154,7 +154,7 @@ export function getBeaconStateApi({
154
154
 
155
155
  async postStateValidatorIdentities({stateId, validatorIds = []}) {
156
156
  const {state, executionOptimistic, finalized} = await getState(stateId);
157
- const {pubkey2index} = chain;
157
+ const {pubkeyCache} = chain;
158
158
 
159
159
  let validatorIdentities: routes.beacon.ValidatorIdentities;
160
160
 
@@ -163,7 +163,7 @@ export function getBeaconStateApi({
163
163
 
164
164
  validatorIdentities = [];
165
165
  for (const id of validatorIds) {
166
- const resp = getStateValidatorIndex(id, state, pubkey2index);
166
+ const resp = getStateValidatorIndex(id, state, pubkeyCache);
167
167
  if (resp.valid) {
168
168
  const index = resp.validatorIndex;
169
169
  const {pubkey, activationEpoch} = state.validators.getReadonly(index);
@@ -187,9 +187,9 @@ export function getBeaconStateApi({
187
187
 
188
188
  async getStateValidator({stateId, validatorId}) {
189
189
  const {state, executionOptimistic, finalized} = await getState(stateId);
190
- const {pubkey2index} = chain;
190
+ const {pubkeyCache} = chain;
191
191
 
192
- const resp = getStateValidatorIndex(validatorId, state, pubkey2index);
192
+ const resp = getStateValidatorIndex(validatorId, state, pubkeyCache);
193
193
  if (!resp.valid) {
194
194
  throw new ApiError(resp.code, resp.reason);
195
195
  }
@@ -214,7 +214,7 @@ export function getBeaconStateApi({
214
214
 
215
215
  const balances: routes.beacon.ValidatorBalance[] = [];
216
216
  for (const id of validatorIds) {
217
- const resp = getStateValidatorIndex(id, state, chain.pubkey2index);
217
+ const resp = getStateValidatorIndex(id, state, chain.pubkeyCache);
218
218
 
219
219
  if (resp.valid) {
220
220
  balances.push({
@@ -1,9 +1,17 @@
1
- import {PubkeyIndexMap} from "@chainsafe/pubkey-index-map";
2
1
  import {routes} from "@lodestar/api";
3
2
  import {CheckpointWithHex, IForkChoice} from "@lodestar/fork-choice";
4
3
  import {GENESIS_SLOT} from "@lodestar/params";
5
- import {BeaconStateAllForks, CachedBeaconStateAllForks} from "@lodestar/state-transition";
6
- import {BLSPubkey, Epoch, RootHex, Slot, ValidatorIndex, getValidatorStatus, phase0} from "@lodestar/types";
4
+ import {BeaconStateAllForks, CachedBeaconStateAllForks, PubkeyCache} from "@lodestar/state-transition";
5
+ import {
6
+ BLSPubkey,
7
+ Epoch,
8
+ RootHex,
9
+ Slot,
10
+ ValidatorIndex,
11
+ getValidatorStatus,
12
+ mapToGeneralStatus,
13
+ phase0,
14
+ } from "@lodestar/types";
7
15
  import {fromHex} from "@lodestar/utils";
8
16
  import {IBeaconChain} from "../../../../chain/index.js";
9
17
  import {ApiError, ValidationError} from "../../errors.js";
@@ -65,28 +73,6 @@ export async function getStateResponseWithRegen(
65
73
  return res;
66
74
  }
67
75
 
68
- type GeneralValidatorStatus = "active" | "pending" | "exited" | "withdrawal";
69
-
70
- function mapToGeneralStatus(subStatus: routes.beacon.ValidatorStatus): GeneralValidatorStatus {
71
- switch (subStatus) {
72
- case "active_ongoing":
73
- case "active_exiting":
74
- case "active_slashed":
75
- return "active";
76
- case "pending_initialized":
77
- case "pending_queued":
78
- return "pending";
79
- case "exited_slashed":
80
- case "exited_unslashed":
81
- return "exited";
82
- case "withdrawal_possible":
83
- case "withdrawal_done":
84
- return "withdrawal";
85
- default:
86
- throw new Error(`Unknown substatus: ${subStatus}`);
87
- }
88
- }
89
-
90
76
  export function toValidatorResponse(
91
77
  index: ValidatorIndex,
92
78
  validator: phase0.Validator,
@@ -104,7 +90,7 @@ export function toValidatorResponse(
104
90
  export function filterStateValidatorsByStatus(
105
91
  statuses: string[],
106
92
  state: BeaconStateAllForks,
107
- pubkey2index: PubkeyIndexMap,
93
+ pubkeyCache: PubkeyCache,
108
94
  currentEpoch: Epoch
109
95
  ): routes.beacon.ValidatorResponse[] {
110
96
  const responses: routes.beacon.ValidatorResponse[] = [];
@@ -115,7 +101,7 @@ export function filterStateValidatorsByStatus(
115
101
  const validatorStatus = getValidatorStatus(validator, currentEpoch);
116
102
  const generalStatus = mapToGeneralStatus(validatorStatus);
117
103
 
118
- const resp = getStateValidatorIndex(validator.pubkey, state, pubkey2index);
104
+ const resp = getStateValidatorIndex(validator.pubkey, state, pubkeyCache);
119
105
  if (resp.valid && (statusSet.has(validatorStatus) || statusSet.has(generalStatus))) {
120
106
  responses.push(
121
107
  toValidatorResponse(resp.validatorIndex, validator, state.balances.get(resp.validatorIndex), currentEpoch)
@@ -132,7 +118,7 @@ type StateValidatorIndexResponse =
132
118
  export function getStateValidatorIndex(
133
119
  id: routes.beacon.ValidatorId | BLSPubkey,
134
120
  state: BeaconStateAllForks,
135
- pubkey2index: PubkeyIndexMap
121
+ pubkeyCache: PubkeyCache
136
122
  ): StateValidatorIndexResponse {
137
123
  if (typeof id === "string") {
138
124
  // mutate `id` and fallthrough to below
@@ -160,7 +146,7 @@ export function getStateValidatorIndex(
160
146
  }
161
147
 
162
148
  // typeof id === Uint8Array
163
- const validatorIndex = pubkey2index.get(id);
149
+ const validatorIndex = pubkeyCache.getIndex(id);
164
150
  if (validatorIndex === null) {
165
151
  return {valid: false, code: 404, reason: "Validator pubkey not found in state"};
166
152
  }
@@ -1,9 +1,10 @@
1
1
  import {routes} from "@lodestar/api";
2
2
  import {ApplicationMethods} from "@lodestar/api/server";
3
3
  import {ExecutionStatus} from "@lodestar/fork-choice";
4
- import {ZERO_HASH_HEX, isForkPostDeneb, isForkPostFulu} from "@lodestar/params";
5
- import {BeaconState, deneb, fulu, sszTypesFor} from "@lodestar/types";
4
+ import {ForkPostDeneb, ZERO_HASH_HEX, isForkPostDeneb, isForkPostFulu} from "@lodestar/params";
5
+ import {BeaconState, DataColumnSidecars, type SignedBeaconBlock, sszTypesFor} from "@lodestar/types";
6
6
  import {toRootHex} from "@lodestar/utils";
7
+ import {getBlobKzgCommitments} from "../../../util/dataColumns.js";
7
8
  import {isOptimisticBlock} from "../../../util/forkChoice.js";
8
9
  import {getStateSlotFromBytes} from "../../../util/multifork.js";
9
10
  import {getBlockResponse} from "../beacon/blocks/utils.js";
@@ -42,6 +43,7 @@ export function getDebugApi({
42
43
  validity: (() => {
43
44
  switch (node.executionStatus) {
44
45
  case ExecutionStatus.Valid:
46
+ case ExecutionStatus.PayloadSeparated:
45
47
  return "valid";
46
48
  case ExecutionStatus.Invalid:
47
49
  return "invalid";
@@ -96,10 +98,10 @@ export function getDebugApi({
96
98
  const fork = config.getForkName(block.message.slot);
97
99
  const blockRoot = sszTypesFor(fork).BeaconBlock.hashTreeRoot(block.message);
98
100
 
99
- let dataColumnSidecars: fulu.DataColumnSidecars;
101
+ let dataColumnSidecars: DataColumnSidecars;
100
102
 
101
103
  const blobCount = isForkPostDeneb(fork)
102
- ? (block.message.body as deneb.BeaconBlockBody).blobKzgCommitments.length
104
+ ? getBlobKzgCommitments(fork, block as SignedBeaconBlock<ForkPostDeneb>).length
103
105
  : 0;
104
106
 
105
107
  if (isForkPostFulu(fork) && blobCount > 0) {
@@ -115,7 +117,9 @@ export function getDebugApi({
115
117
  }
116
118
 
117
119
  return {
118
- data: indices ? dataColumnSidecars.filter(({index}) => indices.includes(index)) : dataColumnSidecars,
120
+ data: (indices
121
+ ? dataColumnSidecars.filter(({index}) => indices.includes(index))
122
+ : dataColumnSidecars) as DataColumnSidecars,
119
123
  meta: {
120
124
  executionOptimistic,
121
125
  finalized,
@@ -1,7 +1,9 @@
1
1
  import {routes} from "@lodestar/api";
2
2
  import {ApplicationMethods} from "@lodestar/api/server";
3
3
  import {MAX_REQUEST_LIGHT_CLIENT_COMMITTEE_HASHES, MAX_REQUEST_LIGHT_CLIENT_UPDATES} from "@lodestar/params";
4
+ import type {LightClientUpdate} from "@lodestar/types";
4
5
  import {fromHex} from "@lodestar/utils";
6
+ import {LightClientServerError, LightClientServerErrorCode} from "../../../chain/errors/lightClientError.js";
5
7
  import {assertLightClientServer} from "../../../node/utils/lightclient.js";
6
8
  import {ApiModules} from "../types.js";
7
9
  // TODO: Import from lightclient/server package
@@ -16,8 +18,23 @@ export function getLightclientApi({
16
18
  assertLightClientServer(lightClientServer);
17
19
 
18
20
  const maxAllowedCount = Math.min(MAX_REQUEST_LIGHT_CLIENT_UPDATES, count);
19
- const periods = Array.from({length: maxAllowedCount}, (_ignored, i) => i + startPeriod);
20
- const updates = await Promise.all(periods.map((period) => lightClientServer.getUpdate(period)));
21
+ const updates: LightClientUpdate[] = [];
22
+ for (let i = 0; i < maxAllowedCount; i++) {
23
+ try {
24
+ const update = await lightClientServer.getUpdate(startPeriod + i);
25
+ updates.push(update);
26
+ } catch (e) {
27
+ if ((e as LightClientServerError).type?.code === LightClientServerErrorCode.RESOURCE_UNAVAILABLE) {
28
+ // Period not available, if we already have results, stop to preserve
29
+ // consecutive order. If not, skip and try the next period.
30
+ if (updates.length > 0) break;
31
+ continue;
32
+ }
33
+ // Unexpected error
34
+ throw e;
35
+ }
36
+ }
37
+
21
38
  return {
22
39
  data: updates,
23
40
  meta: {versions: updates.map((update) => config.getForkName(update.attestedHeader.beacon.slot))},
@@ -1,4 +1,4 @@
1
- import {Connection, StreamStatus} from "@libp2p/interface";
1
+ import type {Connection, ConnectionStatus} from "@libp2p/interface";
2
2
  import {routes} from "@lodestar/api";
3
3
 
4
4
  /**
@@ -24,7 +24,7 @@ export function formatNodePeer(peerIdStr: string, connections: Connection[]): ro
24
24
  * - Otherwise, the first closed connection
25
25
  */
26
26
  export function getRelevantConnection(connections: Connection[]): Connection | null {
27
- const byStatus = new Map<StreamStatus, Connection>();
27
+ const byStatus = new Map<ConnectionStatus, Connection>();
28
28
  for (const conn of connections) {
29
29
  if (conn.status === "open") return conn;
30
30
  if (!byStatus.has(conn.status)) byStatus.set(conn.status, conn);
@@ -37,7 +37,7 @@ export function getRelevantConnection(connections: Connection[]): Connection | n
37
37
  * Map libp2p connection status to the API's peer state notation
38
38
  * @param status
39
39
  */
40
- function getPeerState(status: StreamStatus): routes.node.PeerState {
40
+ function getPeerState(status: ConnectionStatus): routes.node.PeerState {
41
41
  switch (status) {
42
42
  case "open":
43
43
  return "connected";
@@ -1,8 +1,8 @@
1
- import {PubkeyIndexMap} from "@chainsafe/pubkey-index-map";
2
1
  import {routes} from "@lodestar/api";
3
2
  import {ApplicationMethods} from "@lodestar/api/server";
4
- import {ExecutionStatus, ProtoBlock} from "@lodestar/fork-choice";
3
+ import {ExecutionStatus, PayloadStatus, ProtoBlock} from "@lodestar/fork-choice";
5
4
  import {
5
+ BUILDER_INDEX_SELF_BUILD,
6
6
  ForkName,
7
7
  ForkPostBellatrix,
8
8
  ForkPreGloas,
@@ -14,6 +14,7 @@ import {
14
14
  isForkPostBellatrix,
15
15
  isForkPostDeneb,
16
16
  isForkPostElectra,
17
+ isForkPostGloas,
17
18
  } from "@lodestar/params";
18
19
  import {
19
20
  CachedBeaconStateAllForks,
@@ -25,6 +26,7 @@ import {
25
26
  computeStartSlotAtEpoch,
26
27
  computeTimeAtSlot,
27
28
  createCachedBeaconState,
29
+ createPubkeyCache,
28
30
  getBlockRootAtSlot,
29
31
  getCurrentSlot,
30
32
  loadState,
@@ -45,6 +47,7 @@ import {
45
47
  Wei,
46
48
  bellatrix,
47
49
  getValidatorStatus,
50
+ gloas,
48
51
  phase0,
49
52
  ssz,
50
53
  } from "@lodestar/types";
@@ -69,7 +72,7 @@ import {
69
72
  } from "../../../chain/errors/index.js";
70
73
  import {ChainEvent, CommonBlockBody} from "../../../chain/index.js";
71
74
  import {PREPARE_NEXT_SLOT_BPS} from "../../../chain/prepareNextSlot.js";
72
- import {BlockType, ProduceFullDeneb} from "../../../chain/produceBlock/index.js";
75
+ import {BlockType, ProduceFullDeneb, ProduceFullGloas} from "../../../chain/produceBlock/index.js";
73
76
  import {RegenCaller} from "../../../chain/regen/index.js";
74
77
  import {CheckpointHex} from "../../../chain/stateCache/types.js";
75
78
  import {validateApiAggregateAndProof} from "../../../chain/validation/index.js";
@@ -386,7 +389,7 @@ export function getValidatorApi(
386
389
  */
387
390
 
388
391
  function notOnOptimisticBlockRoot(beaconBlockRoot: Root): void {
389
- const protoBeaconBlock = chain.forkChoice.getBlock(beaconBlockRoot);
392
+ const protoBeaconBlock = chain.forkChoice.getBlockDefaultStatus(beaconBlockRoot);
390
393
  if (!protoBeaconBlock) {
391
394
  throw new ApiError(404, `Block not in forkChoice, beaconBlockRoot=${toRootHex(beaconBlockRoot)}`);
392
395
  }
@@ -398,7 +401,7 @@ export function getValidatorApi(
398
401
  }
399
402
 
400
403
  function notOnOutOfRangeData(beaconBlockRoot: Root): void {
401
- const protoBeaconBlock = chain.forkChoice.getBlock(beaconBlockRoot);
404
+ const protoBeaconBlock = chain.forkChoice.getBlockDefaultStatus(beaconBlockRoot);
402
405
  if (!protoBeaconBlock) {
403
406
  throw new ApiError(404, `Block not in forkChoice, beaconBlockRoot=${toRootHex(beaconBlockRoot)}`);
404
407
  }
@@ -901,6 +904,77 @@ export function getValidatorApi(
901
904
  return {data, meta};
902
905
  },
903
906
 
907
+ async produceBlockV4({slot, randaoReveal, graffiti, feeRecipient}) {
908
+ const fork = config.getForkName(slot);
909
+
910
+ if (!isForkPostGloas(fork)) {
911
+ throw new ApiError(400, `produceBlockV4 not supported for pre-gloas fork=${fork}`);
912
+ }
913
+
914
+ notWhileSyncing();
915
+ await waitForSlot(slot);
916
+
917
+ // TODO GLOAS: support producing blocks from builder bids
918
+ const source = ProducedBlockSource.engine;
919
+
920
+ // TODO GLOAS: needs to be updated after fork choice changes are merged
921
+ const parentBlock = chain.getProposerHead(slot);
922
+ const {blockRoot: parentBlockRootHex, slot: parentSlot} = parentBlock;
923
+ const parentBlockRoot = fromHex(parentBlockRootHex);
924
+ notOnOutOfRangeData(parentBlockRoot);
925
+ metrics?.blockProductionSlotDelta.set(slot - parentSlot);
926
+ metrics?.blockProductionRequests.inc({source});
927
+
928
+ const graffitiBytes = toGraffitiBytes(
929
+ graffiti ?? getDefaultGraffiti(getLodestarClientVersion(), chain.executionEngine.clientVersion, {})
930
+ );
931
+ const commonBlockBodyPromise = chain.produceCommonBlockBody({
932
+ slot,
933
+ parentBlock,
934
+ randaoReveal,
935
+ graffiti: graffitiBytes,
936
+ });
937
+
938
+ let timer: undefined | ((opts: {source: ProducedBlockSource}) => number);
939
+ try {
940
+ timer = metrics?.blockProductionTime.startTimer();
941
+ const {block, executionPayloadValue, consensusBlockValue} = await chain.produceBlock({
942
+ slot,
943
+ parentBlock,
944
+ randaoReveal,
945
+ graffiti: graffitiBytes,
946
+ feeRecipient,
947
+ commonBlockBodyPromise,
948
+ });
949
+
950
+ metrics?.blockProductionSuccess.inc({source});
951
+ metrics?.blockProductionNumAggregated.observe({source}, block.body.attestations.length);
952
+ metrics?.blockProductionConsensusBlockValue.observe({source}, Number(formatWeiToEth(consensusBlockValue)));
953
+ metrics?.blockProductionExecutionPayloadValue.observe({source}, Number(formatWeiToEth(executionPayloadValue)));
954
+
955
+ const blockRoot = toRootHex(config.getForkTypes(slot).BeaconBlock.hashTreeRoot(block));
956
+ logger.verbose("Produced block", {
957
+ slot,
958
+ executionPayloadValue,
959
+ consensusBlockValue,
960
+ root: blockRoot,
961
+ });
962
+ if (chain.opts.persistProducedBlocks) {
963
+ void chain.persistBlock(block, "produced_engine_block");
964
+ }
965
+
966
+ return {
967
+ data: block as gloas.BeaconBlock,
968
+ meta: {
969
+ version: fork,
970
+ consensusBlockValue,
971
+ },
972
+ };
973
+ } finally {
974
+ timer?.({source});
975
+ }
976
+ },
977
+
904
978
  async produceAttestationData({committeeIndex, slot}) {
905
979
  notWhileSyncing();
906
980
 
@@ -915,8 +989,30 @@ export function getValidatorApi(
915
989
  const headBlockRoot = fromHex(headBlockRootHex);
916
990
  const fork = config.getForkName(slot);
917
991
 
992
+ const beaconBlockRoot =
993
+ slot >= headSlot
994
+ ? // When attesting to the head slot or later, always use the head of the chain.
995
+ headBlockRoot
996
+ : // Permit attesting to slots *prior* to the current head. This is desirable when
997
+ // the VC and BN are out-of-sync due to time issues or overloading.
998
+ getBlockRootAtSlot(headState, slot);
999
+
918
1000
  let index: CommitteeIndex;
919
- if (isForkPostElectra(fork)) {
1001
+ if (isForkPostGloas(fork)) {
1002
+ const canonicalBlock = chain.forkChoice.getCanonicalBlockByRoot(beaconBlockRoot);
1003
+ if (!canonicalBlock) {
1004
+ // This should never happen
1005
+ throw Error(`Block not found in fork choice for slot=${slot}, root=${toRootHex(beaconBlockRoot)}`);
1006
+ }
1007
+ // After Gloas, attestation.data.index signals payload status in fork-choice:
1008
+ // - 0 = EMPTY / not present, 1 = FULL / present
1009
+ // - same-slot attestations must always use index = 0
1010
+ if (canonicalBlock.slot !== slot) {
1011
+ index = canonicalBlock.payloadStatus === PayloadStatus.FULL ? 1 : 0;
1012
+ } else {
1013
+ index = 0;
1014
+ }
1015
+ } else if (isForkPostElectra(fork)) {
920
1016
  index = 0;
921
1017
  } else {
922
1018
  if (committeeIndex === undefined) {
@@ -925,14 +1021,6 @@ export function getValidatorApi(
925
1021
  index = committeeIndex;
926
1022
  }
927
1023
 
928
- const beaconBlockRoot =
929
- slot >= headSlot
930
- ? // When attesting to the head slot or later, always use the head of the chain.
931
- headBlockRoot
932
- : // Permit attesting to slots *prior* to the current head. This is desirable when
933
- // the VC and BN are out-of-sync due to time issues or overloading.
934
- getBlockRootAtSlot(headState, slot);
935
-
936
1024
  const targetSlot = computeStartSlotAtEpoch(attEpoch);
937
1025
  const targetRoot =
938
1026
  targetSlot >= headSlot
@@ -1049,8 +1137,7 @@ export function getValidatorApi(
1049
1137
  {
1050
1138
  config: chain.config,
1051
1139
  // Not required to compute proposers
1052
- pubkey2index: new PubkeyIndexMap(),
1053
- index2pubkey: [],
1140
+ pubkeyCache: createPubkeyCache(),
1054
1141
  },
1055
1142
  {skipSyncPubkeys: true, skipSyncCommitteeCache: true}
1056
1143
  );
@@ -1511,7 +1598,7 @@ export function getValidatorApi(
1511
1598
 
1512
1599
  const filteredRegistrations = registrations.filter((registration) => {
1513
1600
  const {pubkey} = registration.message;
1514
- const validatorIndex = chain.pubkey2index.get(pubkey);
1601
+ const validatorIndex = chain.pubkeyCache.getIndex(pubkey);
1515
1602
  if (validatorIndex === null) return false;
1516
1603
 
1517
1604
  const validator = headState.validators.getReadonly(validatorIndex);
@@ -1532,5 +1619,54 @@ export function getValidatorApi(
1532
1619
  count: filteredRegistrations.length,
1533
1620
  });
1534
1621
  },
1622
+
1623
+ async getExecutionPayloadEnvelope({slot, beaconBlockRoot}) {
1624
+ const fork = config.getForkName(slot);
1625
+
1626
+ if (!isForkPostGloas(fork)) {
1627
+ throw new ApiError(400, `getExecutionPayloadEnvelope not supported for pre-gloas fork=${fork}`);
1628
+ }
1629
+
1630
+ notWhileSyncing();
1631
+ await waitForSlot(slot);
1632
+
1633
+ const blockRootHex = toRootHex(beaconBlockRoot);
1634
+ const produceResult = chain.blockProductionCache.get(blockRootHex);
1635
+
1636
+ if (produceResult === undefined) {
1637
+ throw new ApiError(404, `No cached block production result found for block root ${blockRootHex}`);
1638
+ }
1639
+ if (!isForkPostGloas(produceResult.fork)) {
1640
+ throw Error(`Cached block production result is for pre-gloas fork=${produceResult.fork}`);
1641
+ }
1642
+ if (produceResult.type !== BlockType.Full) {
1643
+ throw Error("Cached block production result is not full block");
1644
+ }
1645
+
1646
+ const {executionPayload, executionRequests, envelopeStateRoot} = produceResult as ProduceFullGloas;
1647
+
1648
+ const envelope: gloas.ExecutionPayloadEnvelope = {
1649
+ payload: executionPayload,
1650
+ executionRequests: executionRequests,
1651
+ builderIndex: BUILDER_INDEX_SELF_BUILD,
1652
+ beaconBlockRoot,
1653
+ slot,
1654
+ stateRoot: envelopeStateRoot,
1655
+ };
1656
+
1657
+ logger.info("Produced execution payload envelope", {
1658
+ slot,
1659
+ blockRoot: blockRootHex,
1660
+ transactions: executionPayload.transactions.length,
1661
+ blockHash: toRootHex(executionPayload.blockHash),
1662
+ });
1663
+
1664
+ return {
1665
+ data: envelope,
1666
+ meta: {
1667
+ version: fork,
1668
+ },
1669
+ };
1670
+ },
1535
1671
  };
1536
1672
  }
@@ -1,5 +1,6 @@
1
- import {CheckpointWithHex} from "@lodestar/fork-choice";
1
+ import {CheckpointWithPayloadStatus} from "@lodestar/fork-choice";
2
2
  import {LoggerNode} from "@lodestar/logger/node";
3
+ import {ForkSeq} from "@lodestar/params";
3
4
  import {Checkpoint} from "@lodestar/types/phase0";
4
5
  import {callFnWhenAwait} from "@lodestar/utils";
5
6
  import {IBeaconDb} from "../../db/index.js";
@@ -13,6 +14,7 @@ import {HistoricalStateRegen} from "./historicalState/historicalStateRegen.js";
13
14
  import {ArchiveMode, ArchiveStoreOpts, StateArchiveStrategy} from "./interface.js";
14
15
  import {FrequencyStateArchiveStrategy} from "./strategies/frequencyStateArchiveStrategy.js";
15
16
  import {archiveBlocks} from "./utils/archiveBlocks.js";
17
+ import {archiveExecutionPayloadEnvelopes} from "./utils/archivePayloads.js";
16
18
  import {pruneHistory} from "./utils/pruneHistory.js";
17
19
  import {updateBackfillRange} from "./utils/updateBackfillRange.js";
18
20
 
@@ -27,6 +29,7 @@ type ArchiveStoreInitOpts = ArchiveStoreOpts & {dbName: string; anchorState: {fi
27
29
 
28
30
  export enum ArchiveStoreTask {
29
31
  ArchiveBlocks = "archive_blocks",
32
+ ArchivePayloads = "archive_payloads",
30
33
  PruneHistory = "prune_history",
31
34
  OnFinalizedCheckpoint = "on_finalized_checkpoint",
32
35
  MaybeArchiveState = "maybe_archive_state",
@@ -41,7 +44,7 @@ export enum ArchiveStoreTask {
41
44
  */
42
45
  export class ArchiveStore {
43
46
  private archiveMode: ArchiveMode;
44
- private jobQueue: JobItemQueue<[CheckpointWithHex], void>;
47
+ private jobQueue: JobItemQueue<[CheckpointWithPayloadStatus], void>;
45
48
 
46
49
  private archiveDataEpochs?: number;
47
50
  private readonly statesArchiverStrategy: StateArchiveStrategy;
@@ -64,7 +67,7 @@ export class ArchiveStore {
64
67
  this.archiveMode = opts.archiveMode;
65
68
  this.archiveDataEpochs = opts.archiveDataEpochs;
66
69
 
67
- this.jobQueue = new JobItemQueue<[CheckpointWithHex], void>(this.processFinalizedCheckpoint, {
70
+ this.jobQueue = new JobItemQueue<[CheckpointWithPayloadStatus], void>(this.processFinalizedCheckpoint, {
68
71
  maxLength: PROCESS_FINALIZED_CHECKPOINT_QUEUE_LENGTH,
69
72
  signal,
70
73
  });
@@ -165,7 +168,7 @@ export class ArchiveStore {
165
168
  //-------------------------------------------------------------------------
166
169
  // Event handlers
167
170
  //-------------------------------------------------------------------------
168
- private onFinalizedCheckpoint = (finalized: CheckpointWithHex): void => {
171
+ private onFinalizedCheckpoint = (finalized: CheckpointWithPayloadStatus): void => {
169
172
  this.jobQueue.push(finalized).catch((e) => {
170
173
  if (!isQueueErrorAborted(e)) {
171
174
  this.logger.error("Error queuing finalized checkpoint", {epoch: finalized.epoch}, e as Error);
@@ -186,9 +189,10 @@ export class ArchiveStore {
186
189
  });
187
190
  };
188
191
 
189
- private processFinalizedCheckpoint = async (finalized: CheckpointWithHex): Promise<void> => {
192
+ private processFinalizedCheckpoint = async (finalized: CheckpointWithPayloadStatus): Promise<void> => {
190
193
  try {
191
194
  const finalizedEpoch = finalized.epoch;
195
+ const finalizedFork = this.chain.config.getForkSeqAtEpoch(finalizedEpoch);
192
196
  this.logger.verbose("Start processing finalized checkpoint", {epoch: finalizedEpoch, rootHex: finalized.rootHex});
193
197
 
194
198
  let timer = this.metrics?.processFinalizedCheckpoint.durationByTask.startTimer();
@@ -206,6 +210,12 @@ export class ArchiveStore {
206
210
  );
207
211
  timer?.({source: ArchiveStoreTask.ArchiveBlocks});
208
212
 
213
+ if (finalizedFork >= ForkSeq.gloas) {
214
+ timer = this.metrics?.processFinalizedCheckpoint.durationByTask.startTimer();
215
+ await archiveExecutionPayloadEnvelopes(this.chain, finalized);
216
+ timer?.({source: ArchiveStoreTask.ArchivePayloads});
217
+ }
218
+
209
219
  if (this.opts.pruneHistory) {
210
220
  timer = this.metrics?.processFinalizedCheckpoint.durationByTask.startTimer();
211
221
  await pruneHistory(
@@ -1,10 +1,10 @@
1
- import {PubkeyIndexMap} from "@chainsafe/pubkey-index-map";
2
1
  import {BeaconConfig} from "@lodestar/config";
3
2
  import {
4
3
  BeaconStateAllForks,
5
4
  CachedBeaconStateAllForks,
6
5
  DataAvailabilityStatus,
7
6
  ExecutionPayloadStatus,
7
+ PubkeyCache,
8
8
  createCachedBeaconState,
9
9
  stateTransition,
10
10
  } from "@lodestar/state-transition";
@@ -15,16 +15,16 @@ import {HistoricalStateRegenMetrics} from "./metrics.js";
15
15
  import {RegenErrorType} from "./types.js";
16
16
 
17
17
  /**
18
- * Populate a PubkeyIndexMap with any new entries based on a BeaconState
18
+ * Populate a PubkeyCache with any new entries based on a BeaconState
19
19
  */
20
- export function syncPubkeyCache(state: BeaconStateAllForks, pubkey2index: PubkeyIndexMap): void {
20
+ export function syncPubkeyCache(state: BeaconStateAllForks, pubkeyCache: PubkeyCache): void {
21
21
  // Get the validators sub tree once for all the loop
22
22
  const validators = state.validators;
23
23
 
24
24
  const newCount = state.validators.length;
25
- for (let i = pubkey2index.size; i < newCount; i++) {
25
+ for (let i = pubkeyCache.size; i < newCount; i++) {
26
26
  const pubkey = validators.getReadonly(i).pubkey;
27
- pubkey2index.set(pubkey, i);
27
+ pubkeyCache.set(i, pubkey);
28
28
  }
29
29
  }
30
30
 
@@ -35,7 +35,7 @@ export async function getNearestState(
35
35
  slot: number,
36
36
  config: BeaconConfig,
37
37
  db: IBeaconDb,
38
- pubkey2index: PubkeyIndexMap
38
+ pubkeyCache: PubkeyCache
39
39
  ): Promise<CachedBeaconStateAllForks> {
40
40
  const stateBytesArr = await db.stateArchive.binaries({limit: 1, lte: slot, reverse: true});
41
41
  if (!stateBytesArr.length) {
@@ -44,14 +44,13 @@ export async function getNearestState(
44
44
 
45
45
  const stateBytes = stateBytesArr[0];
46
46
  const state = getStateTypeFromBytes(config, stateBytes).deserializeToViewDU(stateBytes);
47
- syncPubkeyCache(state, pubkey2index);
47
+ syncPubkeyCache(state, pubkeyCache);
48
48
 
49
49
  return createCachedBeaconState(
50
50
  state,
51
51
  {
52
52
  config,
53
- pubkey2index,
54
- index2pubkey: [],
53
+ pubkeyCache,
55
54
  },
56
55
  {
57
56
  skipSyncPubkeys: true,
@@ -66,13 +65,13 @@ export async function getHistoricalState(
66
65
  slot: number,
67
66
  config: BeaconConfig,
68
67
  db: IBeaconDb,
69
- pubkey2index: PubkeyIndexMap,
68
+ pubkeyCache: PubkeyCache,
70
69
  metrics?: HistoricalStateRegenMetrics
71
70
  ): Promise<Uint8Array> {
72
71
  const regenTimer = metrics?.regenTime.startTimer();
73
72
 
74
73
  const loadStateTimer = metrics?.loadStateTime.startTimer();
75
- let state = await getNearestState(slot, config, db, pubkey2index).catch((e) => {
74
+ let state = await getNearestState(slot, config, db, pubkeyCache).catch((e) => {
76
75
  metrics?.regenErrorCount.inc({reason: RegenErrorType.loadState});
77
76
  throw e;
78
77
  });