@lodestar/beacon-node 1.42.0-dev.1d50253953 → 1.42.0-dev.2219bb0cb8

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 (494) hide show
  1. package/lib/api/impl/beacon/blocks/index.d.ts.map +1 -1
  2. package/lib/api/impl/beacon/blocks/index.js +45 -13
  3. package/lib/api/impl/beacon/blocks/index.js.map +1 -1
  4. package/lib/api/impl/beacon/pool/index.d.ts.map +1 -1
  5. package/lib/api/impl/beacon/pool/index.js +5 -1
  6. package/lib/api/impl/beacon/pool/index.js.map +1 -1
  7. package/lib/api/impl/beacon/state/index.d.ts.map +1 -1
  8. package/lib/api/impl/beacon/state/index.js +38 -40
  9. package/lib/api/impl/beacon/state/index.js.map +1 -1
  10. package/lib/api/impl/beacon/state/utils.d.ts +4 -4
  11. package/lib/api/impl/beacon/state/utils.d.ts.map +1 -1
  12. package/lib/api/impl/beacon/state/utils.js +7 -10
  13. package/lib/api/impl/beacon/state/utils.js.map +1 -1
  14. package/lib/api/impl/debug/index.js.map +1 -1
  15. package/lib/api/impl/lodestar/index.d.ts.map +1 -1
  16. package/lib/api/impl/lodestar/index.js +8 -6
  17. package/lib/api/impl/lodestar/index.js.map +1 -1
  18. package/lib/api/impl/proof/index.d.ts.map +1 -1
  19. package/lib/api/impl/proof/index.js +2 -6
  20. package/lib/api/impl/proof/index.js.map +1 -1
  21. package/lib/api/impl/validator/index.d.ts.map +1 -1
  22. package/lib/api/impl/validator/index.js +35 -29
  23. package/lib/api/impl/validator/index.js.map +1 -1
  24. package/lib/api/impl/validator/utils.d.ts +2 -2
  25. package/lib/api/impl/validator/utils.d.ts.map +1 -1
  26. package/lib/api/impl/validator/utils.js +3 -3
  27. package/lib/api/impl/validator/utils.js.map +1 -1
  28. package/lib/chain/ColumnReconstructionTracker.d.ts +2 -1
  29. package/lib/chain/ColumnReconstructionTracker.d.ts.map +1 -1
  30. package/lib/chain/ColumnReconstructionTracker.js +5 -5
  31. package/lib/chain/ColumnReconstructionTracker.js.map +1 -1
  32. package/lib/chain/GetBlobsTracker.d.ts +2 -1
  33. package/lib/chain/GetBlobsTracker.d.ts.map +1 -1
  34. package/lib/chain/GetBlobsTracker.js +14 -12
  35. package/lib/chain/GetBlobsTracker.js.map +1 -1
  36. package/lib/chain/archiveStore/archiveStore.d.ts.map +1 -1
  37. package/lib/chain/archiveStore/archiveStore.js +1 -0
  38. package/lib/chain/archiveStore/archiveStore.js.map +1 -1
  39. package/lib/chain/archiveStore/historicalState/getHistoricalState.d.ts +3 -7
  40. package/lib/chain/archiveStore/historicalState/getHistoricalState.d.ts.map +1 -1
  41. package/lib/chain/archiveStore/historicalState/getHistoricalState.js +8 -26
  42. package/lib/chain/archiveStore/historicalState/getHistoricalState.js.map +1 -1
  43. package/lib/chain/archiveStore/historicalState/historicalStateRegen.d.ts +2 -2
  44. package/lib/chain/archiveStore/historicalState/historicalStateRegen.d.ts.map +1 -1
  45. package/lib/chain/archiveStore/historicalState/historicalStateRegen.js +1 -0
  46. package/lib/chain/archiveStore/historicalState/historicalStateRegen.js.map +1 -1
  47. package/lib/chain/archiveStore/historicalState/types.d.ts +2 -0
  48. package/lib/chain/archiveStore/historicalState/types.d.ts.map +1 -1
  49. package/lib/chain/archiveStore/historicalState/types.js.map +1 -1
  50. package/lib/chain/archiveStore/historicalState/worker.js +1 -3
  51. package/lib/chain/archiveStore/historicalState/worker.js.map +1 -1
  52. package/lib/chain/archiveStore/interface.d.ts +1 -0
  53. package/lib/chain/archiveStore/interface.d.ts.map +1 -1
  54. package/lib/chain/balancesCache.d.ts +2 -2
  55. package/lib/chain/balancesCache.d.ts.map +1 -1
  56. package/lib/chain/balancesCache.js +4 -4
  57. package/lib/chain/balancesCache.js.map +1 -1
  58. package/lib/chain/blocks/blockInput/blockInput.d.ts +5 -5
  59. package/lib/chain/blocks/blockInput/blockInput.d.ts.map +1 -1
  60. package/lib/chain/blocks/blockInput/blockInput.js.map +1 -1
  61. package/lib/chain/blocks/blockInput/types.d.ts +5 -4
  62. package/lib/chain/blocks/blockInput/types.d.ts.map +1 -1
  63. package/lib/chain/blocks/blockInput/types.js +1 -0
  64. package/lib/chain/blocks/blockInput/types.js.map +1 -1
  65. package/lib/chain/blocks/importBlock.d.ts +3 -3
  66. package/lib/chain/blocks/importBlock.d.ts.map +1 -1
  67. package/lib/chain/blocks/importBlock.js +37 -23
  68. package/lib/chain/blocks/importBlock.js.map +1 -1
  69. package/lib/chain/blocks/importExecutionPayload.d.ts +10 -8
  70. package/lib/chain/blocks/importExecutionPayload.d.ts.map +1 -1
  71. package/lib/chain/blocks/importExecutionPayload.js +87 -51
  72. package/lib/chain/blocks/importExecutionPayload.js.map +1 -1
  73. package/lib/chain/blocks/index.d.ts.map +1 -1
  74. package/lib/chain/blocks/index.js +3 -2
  75. package/lib/chain/blocks/index.js.map +1 -1
  76. package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.d.ts +14 -6
  77. package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.d.ts.map +1 -1
  78. package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.js +33 -2
  79. package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.js.map +1 -1
  80. package/lib/chain/blocks/payloadEnvelopeInput/types.d.ts +2 -1
  81. package/lib/chain/blocks/payloadEnvelopeInput/types.d.ts.map +1 -1
  82. package/lib/chain/blocks/types.d.ts +21 -15
  83. package/lib/chain/blocks/types.d.ts.map +1 -1
  84. package/lib/chain/blocks/types.js.map +1 -1
  85. package/lib/chain/blocks/utils/checkpoint.d.ts +2 -2
  86. package/lib/chain/blocks/utils/checkpoint.d.ts.map +1 -1
  87. package/lib/chain/blocks/utils/checkpoint.js.map +1 -1
  88. package/lib/chain/blocks/verifyBlock.d.ts +2 -2
  89. package/lib/chain/blocks/verifyBlock.d.ts.map +1 -1
  90. package/lib/chain/blocks/verifyBlock.js +4 -4
  91. package/lib/chain/blocks/verifyBlock.js.map +1 -1
  92. package/lib/chain/blocks/verifyBlocksExecutionPayloads.d.ts +5 -5
  93. package/lib/chain/blocks/verifyBlocksExecutionPayloads.d.ts.map +1 -1
  94. package/lib/chain/blocks/verifyBlocksExecutionPayloads.js +5 -4
  95. package/lib/chain/blocks/verifyBlocksExecutionPayloads.js.map +1 -1
  96. package/lib/chain/blocks/verifyBlocksSignatures.d.ts +2 -2
  97. package/lib/chain/blocks/verifyBlocksSignatures.d.ts.map +1 -1
  98. package/lib/chain/blocks/verifyBlocksSignatures.js +4 -2
  99. package/lib/chain/blocks/verifyBlocksSignatures.js.map +1 -1
  100. package/lib/chain/blocks/verifyBlocksStateTransitionOnly.d.ts +3 -3
  101. package/lib/chain/blocks/verifyBlocksStateTransitionOnly.d.ts.map +1 -1
  102. package/lib/chain/blocks/verifyBlocksStateTransitionOnly.js +3 -3
  103. package/lib/chain/blocks/verifyBlocksStateTransitionOnly.js.map +1 -1
  104. package/lib/chain/chain.d.ts +16 -14
  105. package/lib/chain/chain.d.ts.map +1 -1
  106. package/lib/chain/chain.js +123 -66
  107. package/lib/chain/chain.js.map +1 -1
  108. package/lib/chain/emitter.d.ts +31 -9
  109. package/lib/chain/emitter.d.ts.map +1 -1
  110. package/lib/chain/emitter.js +12 -3
  111. package/lib/chain/emitter.js.map +1 -1
  112. package/lib/chain/errors/blockError.d.ts +15 -5
  113. package/lib/chain/errors/blockError.d.ts.map +1 -1
  114. package/lib/chain/errors/blockError.js +4 -0
  115. package/lib/chain/errors/blockError.js.map +1 -1
  116. package/lib/chain/errors/dataColumnSidecarError.d.ts +31 -1
  117. package/lib/chain/errors/dataColumnSidecarError.d.ts.map +1 -1
  118. package/lib/chain/errors/dataColumnSidecarError.js +7 -0
  119. package/lib/chain/errors/dataColumnSidecarError.js.map +1 -1
  120. package/lib/chain/forkChoice/index.d.ts +4 -4
  121. package/lib/chain/forkChoice/index.d.ts.map +1 -1
  122. package/lib/chain/forkChoice/index.js +30 -24
  123. package/lib/chain/forkChoice/index.js.map +1 -1
  124. package/lib/chain/initState.d.ts +2 -2
  125. package/lib/chain/initState.d.ts.map +1 -1
  126. package/lib/chain/initState.js +1 -1
  127. package/lib/chain/initState.js.map +1 -1
  128. package/lib/chain/interface.d.ts +16 -14
  129. package/lib/chain/interface.d.ts.map +1 -1
  130. package/lib/chain/interface.js.map +1 -1
  131. package/lib/chain/lightClient/index.d.ts +2 -2
  132. package/lib/chain/lightClient/index.d.ts.map +1 -1
  133. package/lib/chain/lightClient/index.js +11 -4
  134. package/lib/chain/lightClient/index.js.map +1 -1
  135. package/lib/chain/opPools/aggregatedAttestationPool.d.ts +6 -6
  136. package/lib/chain/opPools/aggregatedAttestationPool.d.ts.map +1 -1
  137. package/lib/chain/opPools/aggregatedAttestationPool.js +13 -13
  138. package/lib/chain/opPools/aggregatedAttestationPool.js.map +1 -1
  139. package/lib/chain/opPools/executionPayloadBidPool.d.ts +2 -2
  140. package/lib/chain/opPools/executionPayloadBidPool.d.ts.map +1 -1
  141. package/lib/chain/opPools/executionPayloadBidPool.js +2 -2
  142. package/lib/chain/opPools/executionPayloadBidPool.js.map +1 -1
  143. package/lib/chain/opPools/opPool.d.ts +3 -3
  144. package/lib/chain/opPools/opPool.d.ts.map +1 -1
  145. package/lib/chain/opPools/opPool.js +7 -7
  146. package/lib/chain/opPools/opPool.js.map +1 -1
  147. package/lib/chain/opPools/utils.d.ts +2 -2
  148. package/lib/chain/opPools/utils.d.ts.map +1 -1
  149. package/lib/chain/opPools/utils.js +1 -1
  150. package/lib/chain/opPools/utils.js.map +1 -1
  151. package/lib/chain/options.d.ts +1 -0
  152. package/lib/chain/options.d.ts.map +1 -1
  153. package/lib/chain/options.js +1 -0
  154. package/lib/chain/options.js.map +1 -1
  155. package/lib/chain/prepareNextSlot.d.ts +2 -2
  156. package/lib/chain/prepareNextSlot.d.ts.map +1 -1
  157. package/lib/chain/prepareNextSlot.js +10 -4
  158. package/lib/chain/prepareNextSlot.js.map +1 -1
  159. package/lib/chain/produceBlock/computeNewStateRoot.d.ts +4 -4
  160. package/lib/chain/produceBlock/computeNewStateRoot.d.ts.map +1 -1
  161. package/lib/chain/produceBlock/computeNewStateRoot.js +9 -10
  162. package/lib/chain/produceBlock/computeNewStateRoot.js.map +1 -1
  163. package/lib/chain/produceBlock/produceBlockBody.d.ts +7 -7
  164. package/lib/chain/produceBlock/produceBlockBody.d.ts.map +1 -1
  165. package/lib/chain/produceBlock/produceBlockBody.js +32 -17
  166. package/lib/chain/produceBlock/produceBlockBody.js.map +1 -1
  167. package/lib/chain/regen/interface.d.ts +13 -13
  168. package/lib/chain/regen/interface.d.ts.map +1 -1
  169. package/lib/chain/regen/queued.d.ts +14 -14
  170. package/lib/chain/regen/queued.d.ts.map +1 -1
  171. package/lib/chain/regen/queued.js.map +1 -1
  172. package/lib/chain/regen/regen.d.ts +6 -5
  173. package/lib/chain/regen/regen.d.ts.map +1 -1
  174. package/lib/chain/regen/regen.js +6 -6
  175. package/lib/chain/regen/regen.js.map +1 -1
  176. package/lib/chain/seenCache/seenGossipBlockInput.d.ts +1 -1
  177. package/lib/chain/seenCache/seenGossipBlockInput.d.ts.map +1 -1
  178. package/lib/chain/seenCache/seenGossipBlockInput.js +2 -2
  179. package/lib/chain/seenCache/seenGossipBlockInput.js.map +1 -1
  180. package/lib/chain/seenCache/seenPayloadEnvelopeInput.d.ts +1 -1
  181. package/lib/chain/seenCache/seenPayloadEnvelopeInput.d.ts.map +1 -1
  182. package/lib/chain/seenCache/seenPayloadEnvelopeInput.js +2 -2
  183. package/lib/chain/seenCache/seenPayloadEnvelopeInput.js.map +1 -1
  184. package/lib/chain/serializeState.d.ts +2 -2
  185. package/lib/chain/serializeState.d.ts.map +1 -1
  186. package/lib/chain/serializeState.js +1 -1
  187. package/lib/chain/serializeState.js.map +1 -1
  188. package/lib/chain/shufflingCache.d.ts +2 -2
  189. package/lib/chain/shufflingCache.d.ts.map +1 -1
  190. package/lib/chain/shufflingCache.js +3 -4
  191. package/lib/chain/shufflingCache.js.map +1 -1
  192. package/lib/chain/stateCache/fifoBlockStateCache.d.ts +6 -6
  193. package/lib/chain/stateCache/fifoBlockStateCache.d.ts.map +1 -1
  194. package/lib/chain/stateCache/fifoBlockStateCache.js.map +1 -1
  195. package/lib/chain/stateCache/persistentCheckpointsCache.d.ts +11 -11
  196. package/lib/chain/stateCache/persistentCheckpointsCache.d.ts.map +1 -1
  197. package/lib/chain/stateCache/persistentCheckpointsCache.js +12 -16
  198. package/lib/chain/stateCache/persistentCheckpointsCache.js.map +1 -1
  199. package/lib/chain/stateCache/types.d.ts +14 -14
  200. package/lib/chain/stateCache/types.d.ts.map +1 -1
  201. package/lib/chain/stateCache/types.js.map +1 -1
  202. package/lib/chain/validation/attesterSlashing.js +3 -3
  203. package/lib/chain/validation/attesterSlashing.js.map +1 -1
  204. package/lib/chain/validation/blobSidecar.js +1 -1
  205. package/lib/chain/validation/blobSidecar.js.map +1 -1
  206. package/lib/chain/validation/block.d.ts.map +1 -1
  207. package/lib/chain/validation/block.js +28 -6
  208. package/lib/chain/validation/block.js.map +1 -1
  209. package/lib/chain/validation/blsToExecutionChange.js +2 -2
  210. package/lib/chain/validation/blsToExecutionChange.js.map +1 -1
  211. package/lib/chain/validation/dataColumnSidecar.d.ts +11 -4
  212. package/lib/chain/validation/dataColumnSidecar.d.ts.map +1 -1
  213. package/lib/chain/validation/dataColumnSidecar.js +185 -6
  214. package/lib/chain/validation/dataColumnSidecar.js.map +1 -1
  215. package/lib/chain/validation/executionPayloadBid.d.ts.map +1 -1
  216. package/lib/chain/validation/executionPayloadBid.js +10 -7
  217. package/lib/chain/validation/executionPayloadBid.js.map +1 -1
  218. package/lib/chain/validation/executionPayloadEnvelope.d.ts.map +1 -1
  219. package/lib/chain/validation/executionPayloadEnvelope.js +7 -3
  220. package/lib/chain/validation/executionPayloadEnvelope.js.map +1 -1
  221. package/lib/chain/validation/payloadAttestationMessage.js +5 -3
  222. package/lib/chain/validation/payloadAttestationMessage.js.map +1 -1
  223. package/lib/chain/validation/proposerSlashing.js +1 -1
  224. package/lib/chain/validation/proposerSlashing.js.map +1 -1
  225. package/lib/chain/validation/signatureSets/contributionAndProof.d.ts +2 -2
  226. package/lib/chain/validation/signatureSets/contributionAndProof.d.ts.map +1 -1
  227. package/lib/chain/validation/signatureSets/contributionAndProof.js +1 -1
  228. package/lib/chain/validation/signatureSets/contributionAndProof.js.map +1 -1
  229. package/lib/chain/validation/signatureSets/syncCommittee.d.ts +2 -2
  230. package/lib/chain/validation/signatureSets/syncCommittee.d.ts.map +1 -1
  231. package/lib/chain/validation/signatureSets/syncCommittee.js +1 -1
  232. package/lib/chain/validation/signatureSets/syncCommittee.js.map +1 -1
  233. package/lib/chain/validation/signatureSets/syncCommitteeContribution.d.ts +2 -2
  234. package/lib/chain/validation/signatureSets/syncCommitteeContribution.d.ts.map +1 -1
  235. package/lib/chain/validation/signatureSets/syncCommitteeContribution.js.map +1 -1
  236. package/lib/chain/validation/signatureSets/syncCommitteeSelectionProof.d.ts +2 -2
  237. package/lib/chain/validation/signatureSets/syncCommitteeSelectionProof.d.ts.map +1 -1
  238. package/lib/chain/validation/signatureSets/syncCommitteeSelectionProof.js +1 -1
  239. package/lib/chain/validation/signatureSets/syncCommitteeSelectionProof.js.map +1 -1
  240. package/lib/chain/validation/syncCommittee.d.ts +4 -4
  241. package/lib/chain/validation/syncCommittee.d.ts.map +1 -1
  242. package/lib/chain/validation/syncCommittee.js +17 -12
  243. package/lib/chain/validation/syncCommittee.js.map +1 -1
  244. package/lib/chain/validation/syncCommitteeContributionAndProof.d.ts.map +1 -1
  245. package/lib/chain/validation/syncCommitteeContributionAndProof.js +5 -2
  246. package/lib/chain/validation/syncCommitteeContributionAndProof.js.map +1 -1
  247. package/lib/chain/validation/voluntaryExit.d.ts.map +1 -1
  248. package/lib/chain/validation/voluntaryExit.js +3 -3
  249. package/lib/chain/validation/voluntaryExit.js.map +1 -1
  250. package/lib/chain/validatorMonitor.d.ts +3 -3
  251. package/lib/chain/validatorMonitor.d.ts.map +1 -1
  252. package/lib/chain/validatorMonitor.js +11 -9
  253. package/lib/chain/validatorMonitor.js.map +1 -1
  254. package/lib/db/buckets.d.ts +2 -2
  255. package/lib/db/buckets.d.ts.map +1 -1
  256. package/lib/db/buckets.js +2 -2
  257. package/lib/db/buckets.js.map +1 -1
  258. package/lib/db/repositories/blockArchiveIndex.d.ts +2 -2
  259. package/lib/db/repositories/blockArchiveIndex.d.ts.map +1 -1
  260. package/lib/db/repositories/dataColumnSidecar.d.ts.map +1 -1
  261. package/lib/db/repositories/dataColumnSidecar.js +4 -2
  262. package/lib/db/repositories/dataColumnSidecar.js.map +1 -1
  263. package/lib/db/repositories/dataColumnSidecarArchive.d.ts.map +1 -1
  264. package/lib/db/repositories/dataColumnSidecarArchive.js +4 -2
  265. package/lib/db/repositories/dataColumnSidecarArchive.js.map +1 -1
  266. package/lib/metrics/metrics/lodestar.d.ts +32 -4
  267. package/lib/metrics/metrics/lodestar.d.ts.map +1 -1
  268. package/lib/metrics/metrics/lodestar.js +52 -15
  269. package/lib/metrics/metrics/lodestar.js.map +1 -1
  270. package/lib/network/gossip/encoding.d.ts.map +1 -1
  271. package/lib/network/gossip/encoding.js +15 -0
  272. package/lib/network/gossip/encoding.js.map +1 -1
  273. package/lib/network/interface.d.ts +7 -4
  274. package/lib/network/interface.d.ts.map +1 -1
  275. package/lib/network/libp2p/index.d.ts.map +1 -1
  276. package/lib/network/libp2p/index.js +22 -11
  277. package/lib/network/libp2p/index.js.map +1 -1
  278. package/lib/network/network.d.ts +7 -4
  279. package/lib/network/network.d.ts.map +1 -1
  280. package/lib/network/network.js +12 -3
  281. package/lib/network/network.js.map +1 -1
  282. package/lib/network/options.d.ts.map +1 -1
  283. package/lib/network/options.js +7 -2
  284. package/lib/network/options.js.map +1 -1
  285. package/lib/network/processor/extractSlotRootFns.d.ts +1 -1
  286. package/lib/network/processor/extractSlotRootFns.d.ts.map +1 -1
  287. package/lib/network/processor/extractSlotRootFns.js +25 -5
  288. package/lib/network/processor/extractSlotRootFns.js.map +1 -1
  289. package/lib/network/processor/gossipHandlers.d.ts.map +1 -1
  290. package/lib/network/processor/gossipHandlers.js +269 -80
  291. package/lib/network/processor/gossipHandlers.js.map +1 -1
  292. package/lib/network/processor/index.d.ts +22 -7
  293. package/lib/network/processor/index.d.ts.map +1 -1
  294. package/lib/network/processor/index.js +313 -80
  295. package/lib/network/processor/index.js.map +1 -1
  296. package/lib/network/reqresp/ReqRespBeaconNode.d.ts.map +1 -1
  297. package/lib/network/reqresp/ReqRespBeaconNode.js +9 -0
  298. package/lib/network/reqresp/ReqRespBeaconNode.js.map +1 -1
  299. package/lib/network/reqresp/handlers/beaconBlocksByRange.d.ts.map +1 -1
  300. package/lib/network/reqresp/handlers/beaconBlocksByRange.js +2 -1
  301. package/lib/network/reqresp/handlers/beaconBlocksByRange.js.map +1 -1
  302. package/lib/network/reqresp/handlers/beaconBlocksByRoot.d.ts.map +1 -1
  303. package/lib/network/reqresp/handlers/beaconBlocksByRoot.js +2 -0
  304. package/lib/network/reqresp/handlers/beaconBlocksByRoot.js.map +1 -1
  305. package/lib/network/reqresp/handlers/blobSidecarsByRange.d.ts +2 -2
  306. package/lib/network/reqresp/handlers/blobSidecarsByRange.d.ts.map +1 -1
  307. package/lib/network/reqresp/handlers/blobSidecarsByRange.js +7 -3
  308. package/lib/network/reqresp/handlers/blobSidecarsByRange.js.map +1 -1
  309. package/lib/network/reqresp/handlers/blobSidecarsByRoot.d.ts.map +1 -1
  310. package/lib/network/reqresp/handlers/blobSidecarsByRoot.js +6 -0
  311. package/lib/network/reqresp/handlers/blobSidecarsByRoot.js.map +1 -1
  312. package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.d.ts +2 -2
  313. package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.d.ts.map +1 -1
  314. package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.js +7 -3
  315. package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.js.map +1 -1
  316. package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRange.d.ts +8 -0
  317. package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRange.d.ts.map +1 -0
  318. package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRange.js +70 -0
  319. package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRange.js.map +1 -0
  320. package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRoot.d.ts +6 -0
  321. package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRoot.d.ts.map +1 -0
  322. package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRoot.js +23 -0
  323. package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRoot.js.map +1 -0
  324. package/lib/network/reqresp/handlers/index.d.ts.map +1 -1
  325. package/lib/network/reqresp/handlers/index.js +11 -1
  326. package/lib/network/reqresp/handlers/index.js.map +1 -1
  327. package/lib/network/reqresp/protocols.d.ts +2 -0
  328. package/lib/network/reqresp/protocols.d.ts.map +1 -1
  329. package/lib/network/reqresp/protocols.js +10 -0
  330. package/lib/network/reqresp/protocols.js.map +1 -1
  331. package/lib/network/reqresp/rateLimit.d.ts.map +1 -1
  332. package/lib/network/reqresp/rateLimit.js +8 -0
  333. package/lib/network/reqresp/rateLimit.js.map +1 -1
  334. package/lib/network/reqresp/score.d.ts.map +1 -1
  335. package/lib/network/reqresp/score.js +2 -0
  336. package/lib/network/reqresp/score.js.map +1 -1
  337. package/lib/network/reqresp/types.d.ts +10 -4
  338. package/lib/network/reqresp/types.d.ts.map +1 -1
  339. package/lib/network/reqresp/types.js +16 -4
  340. package/lib/network/reqresp/types.js.map +1 -1
  341. package/lib/node/nodejs.d.ts +2 -2
  342. package/lib/node/nodejs.d.ts.map +1 -1
  343. package/lib/node/nodejs.js +3 -3
  344. package/lib/node/nodejs.js.map +1 -1
  345. package/lib/node/notifier.d.ts.map +1 -1
  346. package/lib/node/notifier.js +3 -3
  347. package/lib/node/notifier.js.map +1 -1
  348. package/lib/sync/backfill/backfill.d.ts +2 -2
  349. package/lib/sync/backfill/backfill.d.ts.map +1 -1
  350. package/lib/sync/backfill/backfill.js +2 -2
  351. package/lib/sync/backfill/backfill.js.map +1 -1
  352. package/lib/sync/unknownBlock.d.ts +3 -9
  353. package/lib/sync/unknownBlock.d.ts.map +1 -1
  354. package/lib/sync/unknownBlock.js +10 -43
  355. package/lib/sync/unknownBlock.js.map +1 -1
  356. package/lib/sync/utils/downloadByRange.d.ts +3 -3
  357. package/lib/sync/utils/downloadByRange.d.ts.map +1 -1
  358. package/lib/sync/utils/downloadByRange.js +4 -2
  359. package/lib/sync/utils/downloadByRange.js.map +1 -1
  360. package/lib/sync/utils/downloadByRoot.d.ts +3 -3
  361. package/lib/sync/utils/downloadByRoot.d.ts.map +1 -1
  362. package/lib/sync/utils/downloadByRoot.js +10 -5
  363. package/lib/sync/utils/downloadByRoot.js.map +1 -1
  364. package/lib/util/blobs.d.ts +3 -3
  365. package/lib/util/blobs.d.ts.map +1 -1
  366. package/lib/util/blobs.js +21 -10
  367. package/lib/util/blobs.js.map +1 -1
  368. package/lib/util/dataColumns.d.ts +18 -11
  369. package/lib/util/dataColumns.d.ts.map +1 -1
  370. package/lib/util/dataColumns.js +51 -17
  371. package/lib/util/dataColumns.js.map +1 -1
  372. package/lib/util/execution.d.ts +6 -2
  373. package/lib/util/execution.d.ts.map +1 -1
  374. package/lib/util/execution.js +49 -25
  375. package/lib/util/execution.js.map +1 -1
  376. package/lib/util/sszBytes.d.ts +25 -1
  377. package/lib/util/sszBytes.d.ts.map +1 -1
  378. package/lib/util/sszBytes.js +189 -2
  379. package/lib/util/sszBytes.js.map +1 -1
  380. package/lib/util/types.d.ts +2 -0
  381. package/lib/util/types.d.ts.map +1 -1
  382. package/lib/util/types.js +1 -0
  383. package/lib/util/types.js.map +1 -1
  384. package/package.json +16 -16
  385. package/src/api/impl/beacon/blocks/index.ts +62 -16
  386. package/src/api/impl/beacon/pool/index.ts +5 -1
  387. package/src/api/impl/beacon/state/index.ts +43 -55
  388. package/src/api/impl/beacon/state/utils.ts +11 -25
  389. package/src/api/impl/debug/index.ts +2 -2
  390. package/src/api/impl/lodestar/index.ts +8 -8
  391. package/src/api/impl/proof/index.ts +2 -9
  392. package/src/api/impl/validator/index.ts +38 -43
  393. package/src/api/impl/validator/utils.ts +4 -7
  394. package/src/chain/ColumnReconstructionTracker.ts +6 -5
  395. package/src/chain/GetBlobsTracker.ts +14 -12
  396. package/src/chain/archiveStore/archiveStore.ts +1 -0
  397. package/src/chain/archiveStore/historicalState/getHistoricalState.ts +10 -39
  398. package/src/chain/archiveStore/historicalState/historicalStateRegen.ts +2 -1
  399. package/src/chain/archiveStore/historicalState/types.ts +2 -0
  400. package/src/chain/archiveStore/historicalState/worker.ts +1 -4
  401. package/src/chain/archiveStore/interface.ts +1 -0
  402. package/src/chain/balancesCache.ts +5 -11
  403. package/src/chain/blocks/blockInput/blockInput.ts +8 -8
  404. package/src/chain/blocks/blockInput/types.ts +5 -4
  405. package/src/chain/blocks/importBlock.ts +50 -31
  406. package/src/chain/blocks/importExecutionPayload.ts +98 -62
  407. package/src/chain/blocks/index.ts +3 -2
  408. package/src/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.ts +53 -12
  409. package/src/chain/blocks/payloadEnvelopeInput/types.ts +2 -1
  410. package/src/chain/blocks/types.ts +26 -15
  411. package/src/chain/blocks/utils/checkpoint.ts +2 -2
  412. package/src/chain/blocks/verifyBlock.ts +5 -10
  413. package/src/chain/blocks/verifyBlocksExecutionPayloads.ts +10 -14
  414. package/src/chain/blocks/verifyBlocksSignatures.ts +10 -3
  415. package/src/chain/blocks/verifyBlocksStateTransitionOnly.ts +6 -8
  416. package/src/chain/chain.ts +167 -98
  417. package/src/chain/emitter.ts +27 -9
  418. package/src/chain/errors/blockError.ts +11 -5
  419. package/src/chain/errors/dataColumnSidecarError.ts +32 -1
  420. package/src/chain/forkChoice/index.ts +35 -41
  421. package/src/chain/initState.ts +7 -2
  422. package/src/chain/interface.ts +21 -15
  423. package/src/chain/lightClient/index.ts +17 -18
  424. package/src/chain/opPools/aggregatedAttestationPool.ts +20 -21
  425. package/src/chain/opPools/executionPayloadBidPool.ts +3 -3
  426. package/src/chain/opPools/opPool.ts +13 -14
  427. package/src/chain/opPools/utils.ts +3 -3
  428. package/src/chain/options.ts +2 -0
  429. package/src/chain/prepareNextSlot.ts +14 -8
  430. package/src/chain/produceBlock/computeNewStateRoot.ts +13 -16
  431. package/src/chain/produceBlock/produceBlockBody.ts +51 -48
  432. package/src/chain/regen/interface.ts +13 -17
  433. package/src/chain/regen/queued.ts +16 -20
  434. package/src/chain/regen/regen.ts +16 -17
  435. package/src/chain/seenCache/seenGossipBlockInput.ts +2 -2
  436. package/src/chain/seenCache/seenPayloadEnvelopeInput.ts +2 -2
  437. package/src/chain/serializeState.ts +3 -3
  438. package/src/chain/shufflingCache.ts +5 -7
  439. package/src/chain/stateCache/fifoBlockStateCache.ts +7 -7
  440. package/src/chain/stateCache/persistentCheckpointsCache.ts +27 -42
  441. package/src/chain/stateCache/types.ts +14 -18
  442. package/src/chain/validation/attesterSlashing.ts +3 -3
  443. package/src/chain/validation/blobSidecar.ts +1 -1
  444. package/src/chain/validation/block.ts +31 -10
  445. package/src/chain/validation/blsToExecutionChange.ts +2 -2
  446. package/src/chain/validation/dataColumnSidecar.ts +231 -8
  447. package/src/chain/validation/executionPayloadBid.ts +10 -10
  448. package/src/chain/validation/executionPayloadEnvelope.ts +7 -4
  449. package/src/chain/validation/payloadAttestationMessage.ts +6 -4
  450. package/src/chain/validation/proposerSlashing.ts +1 -1
  451. package/src/chain/validation/signatureSets/contributionAndProof.ts +2 -7
  452. package/src/chain/validation/signatureSets/syncCommittee.ts +2 -7
  453. package/src/chain/validation/signatureSets/syncCommitteeContribution.ts +2 -2
  454. package/src/chain/validation/signatureSets/syncCommitteeSelectionProof.ts +2 -7
  455. package/src/chain/validation/syncCommittee.ts +25 -20
  456. package/src/chain/validation/syncCommitteeContributionAndProof.ts +9 -10
  457. package/src/chain/validation/voluntaryExit.ts +3 -8
  458. package/src/chain/validatorMonitor.ts +15 -13
  459. package/src/db/buckets.ts +2 -2
  460. package/src/db/repositories/dataColumnSidecar.ts +4 -2
  461. package/src/db/repositories/dataColumnSidecarArchive.ts +4 -2
  462. package/src/metrics/metrics/lodestar.ts +57 -19
  463. package/src/network/gossip/encoding.ts +16 -0
  464. package/src/network/interface.ts +18 -4
  465. package/src/network/libp2p/index.ts +24 -13
  466. package/src/network/network.ts +39 -8
  467. package/src/network/options.ts +7 -2
  468. package/src/network/processor/extractSlotRootFns.ts +32 -6
  469. package/src/network/processor/gossipHandlers.ts +334 -94
  470. package/src/network/processor/index.ts +395 -92
  471. package/src/network/reqresp/ReqRespBeaconNode.ts +13 -0
  472. package/src/network/reqresp/handlers/beaconBlocksByRange.ts +3 -1
  473. package/src/network/reqresp/handlers/beaconBlocksByRoot.ts +3 -0
  474. package/src/network/reqresp/handlers/blobSidecarsByRange.ts +15 -3
  475. package/src/network/reqresp/handlers/blobSidecarsByRoot.ts +11 -0
  476. package/src/network/reqresp/handlers/dataColumnSidecarsByRange.ts +19 -3
  477. package/src/network/reqresp/handlers/executionPayloadEnvelopesByRange.ts +96 -0
  478. package/src/network/reqresp/handlers/executionPayloadEnvelopesByRoot.ts +34 -0
  479. package/src/network/reqresp/handlers/index.ts +12 -0
  480. package/src/network/reqresp/protocols.ts +12 -0
  481. package/src/network/reqresp/rateLimit.ts +18 -0
  482. package/src/network/reqresp/score.ts +2 -0
  483. package/src/network/reqresp/types.ts +26 -5
  484. package/src/node/nodejs.ts +6 -5
  485. package/src/node/notifier.ts +5 -6
  486. package/src/sync/backfill/backfill.ts +3 -3
  487. package/src/sync/unknownBlock.ts +13 -53
  488. package/src/sync/utils/downloadByRange.ts +9 -7
  489. package/src/sync/utils/downloadByRoot.ts +16 -12
  490. package/src/util/blobs.ts +35 -15
  491. package/src/util/dataColumns.ts +69 -25
  492. package/src/util/execution.ts +49 -30
  493. package/src/util/sszBytes.ts +245 -3
  494. package/src/util/types.ts +6 -0
@@ -1,5 +1,5 @@
1
1
  import {SYNC_COMMITTEE_SUBNET_SIZE} from "@lodestar/params";
2
- import {CachedBeaconStateAltair, isSyncCommitteeAggregator} from "@lodestar/state-transition";
2
+ import {IBeaconStateView, isStatePostAltair, isSyncCommitteeAggregator} from "@lodestar/state-transition";
3
3
  import {ValidatorIndex, altair} from "@lodestar/types";
4
4
  import {GossipAction, SyncCommitteeError, SyncCommitteeErrorCode} from "../errors/index.js";
5
5
  import {IBeaconChain} from "../interface.js";
@@ -53,7 +53,7 @@ export async function validateSyncCommitteeGossipContributionAndProof(
53
53
  }
54
54
 
55
55
  // [REJECT] The contribution has participants -- that is, any(contribution.aggregation_bits)
56
- const syncCommitteeParticipantIndices = getContributionIndices(headState as CachedBeaconStateAltair, contribution);
56
+ const syncCommitteeParticipantIndices = getContributionIndices(headState, contribution);
57
57
  if (syncCommitteeParticipantIndices.length === 0) {
58
58
  throw new SyncCommitteeError(GossipAction.REJECT, {
59
59
  code: SyncCommitteeErrorCode.NO_PARTICIPANT,
@@ -83,12 +83,7 @@ export async function validateSyncCommitteeGossipContributionAndProof(
83
83
 
84
84
  // [REJECT] The aggregate signature is valid for the message beacon_block_root and aggregate pubkey derived from
85
85
  // the participation info in aggregation_bits for the subcommittee specified by the contribution.subcommittee_index.
86
- getSyncCommitteeContributionSignatureSet(
87
- chain.config,
88
- headState as CachedBeaconStateAltair,
89
- contribution,
90
- syncCommitteeParticipantIndices
91
- ),
86
+ getSyncCommitteeContributionSignatureSet(chain.config, headState, contribution, syncCommitteeParticipantIndices),
92
87
  ];
93
88
 
94
89
  if (!(await chain.bls.verifySignatureSets(signatureSets, {batchable: true}))) {
@@ -109,12 +104,16 @@ export async function validateSyncCommitteeGossipContributionAndProof(
109
104
  * - pubkeyCache
110
105
  */
111
106
  function getContributionIndices(
112
- state: CachedBeaconStateAltair,
107
+ state: IBeaconStateView,
113
108
  contribution: altair.SyncCommitteeContribution
114
109
  ): ValidatorIndex[] {
110
+ if (!isStatePostAltair(state)) {
111
+ throw new Error("Expected Altair state for sync committee contribution");
112
+ }
113
+
115
114
  const startIndex = contribution.subcommitteeIndex * SYNC_COMMITTEE_SUBNET_SIZE;
116
115
 
117
- const syncCommittee = state.epochCtx.getIndexedSyncCommittee(contribution.slot);
116
+ const syncCommittee = state.getIndexedSyncCommittee(contribution.slot);
118
117
  // The bits in contribution.aggregationBits select validatorIndexes in the subcommittee starting at startIndex
119
118
  const subcommitteeValidatorIndices = syncCommittee.validatorIndices.slice(
120
119
  startIndex,
@@ -1,9 +1,4 @@
1
- import {
2
- BeaconStateView,
3
- VoluntaryExitValidity,
4
- getVoluntaryExitSignatureSet,
5
- getVoluntaryExitValidity,
6
- } from "@lodestar/state-transition";
1
+ import {VoluntaryExitValidity, getVoluntaryExitSignatureSet} from "@lodestar/state-transition";
7
2
  import {phase0} from "@lodestar/types";
8
3
  import {
9
4
  GossipAction,
@@ -53,14 +48,14 @@ async function validateVoluntaryExit(
53
48
 
54
49
  // [REJECT] All of the conditions within process_voluntary_exit pass validation.
55
50
  // verifySignature = false, verified in batch below
56
- const validity = getVoluntaryExitValidity(chain.config.getForkSeq(state.slot), state, voluntaryExit, false);
51
+ const validity = state.getVoluntaryExitValidity(voluntaryExit, false);
57
52
  if (validity !== VoluntaryExitValidity.valid) {
58
53
  throw new VoluntaryExitError(GossipAction.REJECT, {
59
54
  code: voluntaryExitValidityToErrorCode(validity),
60
55
  });
61
56
  }
62
57
 
63
- const signatureSet = getVoluntaryExitSignatureSet(chain.config, new BeaconStateView(state), voluntaryExit);
58
+ const signatureSet = getVoluntaryExitSignatureSet(chain.config, state, voluntaryExit);
64
59
  if (!(await chain.bls.verifySignatureSets([signatureSet], {batchable: true, priority: prioritizeBls}))) {
65
60
  throw new VoluntaryExitError(GossipAction.REJECT, {
66
61
  code: VoluntaryExitErrorCode.INVALID_SIGNATURE,
@@ -1,14 +1,13 @@
1
1
  import {ChainForkConfig} from "@lodestar/config";
2
- import {ForkSeq, MIN_ATTESTATION_INCLUSION_DELAY, SLOTS_PER_EPOCH} from "@lodestar/params";
2
+ import {MIN_ATTESTATION_INCLUSION_DELAY, SLOTS_PER_EPOCH} from "@lodestar/params";
3
3
  import {
4
- CachedBeaconStateAllForks,
5
- CachedBeaconStateAltair,
4
+ IBeaconStateView,
6
5
  ParticipationFlags,
7
6
  computeEpochAtSlot,
8
7
  computeStartSlotAtEpoch,
9
8
  computeTimeAtSlot,
10
- getBlockRootAtSlot,
11
9
  getCurrentSlot,
10
+ isStatePostAltair,
12
11
  parseAttesterFlags,
13
12
  parseParticipationFlags,
14
13
  } from "@lodestar/state-transition";
@@ -102,7 +101,7 @@ export type ValidatorMonitor = {
102
101
  syncAggregate: altair.SyncAggregate,
103
102
  syncCommitteeIndices: Uint32Array
104
103
  ): void;
105
- onceEveryEndOfEpoch(state: CachedBeaconStateAllForks): void;
104
+ onceEveryEndOfEpoch(state: IBeaconStateView): void;
106
105
  scrapeMetrics(slotClock: Slot): void;
107
106
  /** Returns the list of validator indices currently being monitored */
108
107
  getMonitoredValidatorIndices(): ValidatorIndex[];
@@ -736,16 +735,19 @@ export function createValidatorMonitor(
736
735
  return;
737
736
  }
738
737
 
738
+ if (validators.size === 0) {
739
+ return;
740
+ }
741
+
739
742
  const rootCache = new RootHexCache(headState);
740
743
 
741
- if (config.getForkSeq(headState.slot) >= ForkSeq.altair) {
742
- const {previousEpochParticipation} = headState as CachedBeaconStateAltair;
744
+ if (isStatePostAltair(headState)) {
743
745
  const prevEpochStartSlot = computeStartSlotAtEpoch(prevEpoch);
744
- const prevEpochTargetRoot = toRootHex(getBlockRootAtSlot(headState, prevEpochStartSlot));
746
+ const prevEpochTargetRoot = toRootHex(headState.getBlockRootAtSlot(prevEpochStartSlot));
745
747
 
746
748
  // Check attestation performance
747
749
  for (const [index, validator] of validators.entries()) {
748
- const flags = parseParticipationFlags(previousEpochParticipation.get(index));
750
+ const flags = parseParticipationFlags(headState.getPreviousEpochParticipation(index));
749
751
  const attestationSummary = validator.attestations.get(prevEpoch)?.get(prevEpochTargetRoot);
750
752
  const summary = renderAttestationSummary(config, rootCache, attestationSummary, flags);
751
753
  validatorMonitorMetrics?.prevEpochAttestationSummary.inc({summary});
@@ -757,9 +759,9 @@ export function createValidatorMonitor(
757
759
  }
758
760
  }
759
761
 
760
- if (headState.epochCtx.proposersPrevEpoch !== null) {
762
+ if (headState.previousProposers !== null) {
761
763
  // proposersPrevEpoch is null on the first epoch of `headState` being generated
762
- for (const [slotIndex, validatorIndex] of headState.epochCtx.proposersPrevEpoch.entries()) {
764
+ for (const [slotIndex, validatorIndex] of headState.previousProposers.entries()) {
763
765
  const validator = validators.get(validatorIndex);
764
766
  if (validator) {
765
767
  // If expected proposer is a tracked validator
@@ -1139,12 +1141,12 @@ function renderBlockProposalSummary(
1139
1141
  export class RootHexCache {
1140
1142
  private readonly blockRootSlotCache = new Map<Slot, RootHex>();
1141
1143
 
1142
- constructor(private readonly state: CachedBeaconStateAllForks) {}
1144
+ constructor(private readonly state: IBeaconStateView) {}
1143
1145
 
1144
1146
  getBlockRootAtSlot(slot: Slot): RootHex {
1145
1147
  let root = this.blockRootSlotCache.get(slot);
1146
1148
  if (!root) {
1147
- root = toRootHex(getBlockRootAtSlot(this.state, slot));
1149
+ root = toRootHex(this.state.getBlockRootAtSlot(slot));
1148
1150
  this.blockRootSlotCache.set(slot, root);
1149
1151
  }
1150
1152
  return root;
package/src/db/buckets.ts CHANGED
@@ -67,8 +67,8 @@ export enum Bucket {
67
67
  // lightClient_bestLightClientUpdate = 55, // SyncPeriod -> LightClientUpdate // DEPRECATED on v1.5.0
68
68
  lightClient_bestLightClientUpdate = 56, // SyncPeriod -> [Slot, LightClientUpdate]
69
69
 
70
- fulu_dataColumnSidecars = 57, // FULU BeaconBlockRoot -> DataColumnSidecars
71
- fulu_dataColumnSidecarsArchive = 58, // FULU BeaconBlockSlot -> DataColumnSidecars
70
+ allForks_dataColumnSidecars = 57, // BeaconBlockRoot -> DataColumnSidecars
71
+ allForks_dataColumnSidecarsArchive = 58, // BeaconBlockSlot -> DataColumnSidecars
72
72
 
73
73
  gloas_executionPayloadEnvelope = 59, // GLOAS BeaconBlockRoot -> SignedExecutionPayloadEnvelope
74
74
  gloas_executionPayloadEnvelopeArchive = 60, // GLOAS Slot -> SignedExecutionPayloadEnvelope
@@ -18,8 +18,10 @@ type BlockRoot = Root;
18
18
  */
19
19
  export class DataColumnSidecarRepository extends PrefixedRepository<BlockRoot, ColumnIndex, DataColumnSidecar> {
20
20
  constructor(config: ChainForkConfig, db: Db) {
21
- const bucket = Bucket.fulu_dataColumnSidecars;
22
- super(config, db, bucket, ssz.fulu.DataColumnSidecar, getBucketNameByValue(bucket));
21
+ const bucket = Bucket.allForks_dataColumnSidecars;
22
+ // Type won't be used since we select it dynamically based on fork
23
+ const type = ssz.fulu.DataColumnSidecar;
24
+ super(config, db, bucket, type, getBucketNameByValue(bucket));
23
25
  }
24
26
 
25
27
  /**
@@ -16,8 +16,10 @@ const SLOT_BYTE_SIZE = 8;
16
16
  */
17
17
  export class DataColumnSidecarArchiveRepository extends PrefixedRepository<Slot, ColumnIndex, DataColumnSidecar> {
18
18
  constructor(config: ChainForkConfig, db: Db) {
19
- const bucket = Bucket.fulu_dataColumnSidecarsArchive;
20
- super(config, db, bucket, ssz.fulu.DataColumnSidecar, getBucketNameByValue(bucket));
19
+ const bucket = Bucket.allForks_dataColumnSidecarsArchive;
20
+ // Type won't be used since we select it dynamically based on fork
21
+ const type = ssz.fulu.DataColumnSidecar;
22
+ super(config, db, bucket, type, getBucketNameByValue(bucket));
21
23
  }
22
24
 
23
25
  /**
@@ -1712,33 +1712,71 @@ export function createLodestarMetrics(
1712
1712
  }),
1713
1713
  },
1714
1714
 
1715
- // reprocess gossip attestations
1716
- reprocessGossipAttestations: {
1717
- total: register.gauge({
1718
- name: "lodestar_reprocess_gossip_attestations_total",
1719
- help: "Total number of gossip attestations waiting to reprocess",
1715
+ // some gossip messages need to wait for block to be processed before they can be processed
1716
+ awaitingBlockGossipMessages: {
1717
+ queue: register.gauge<{topic: GossipType}>({
1718
+ name: "lodestar_awaiting_block_gossip_messages_total",
1719
+ help: "Total number of gossip messages waiting for block to be processed",
1720
+ labelNames: ["topic"],
1720
1721
  }),
1721
1722
  countPerSlot: register.gauge({
1722
- name: "lodestar_reprocess_gossip_attestations_per_slot_total",
1723
- help: "Total number of gossip attestations waiting to reprocess pet slot",
1723
+ name: "lodestar_awaiting_block_gossip_messages_per_slot_total",
1724
+ help: "Total number of gossip messages waiting for block to be processed per slot",
1724
1725
  }),
1725
- resolve: register.gauge({
1726
- name: "lodestar_reprocess_gossip_attestations_resolve_total",
1727
- help: "Total number of gossip attestations are reprocessed",
1726
+ resolve: register.gauge<{topic: GossipType}>({
1727
+ name: "lodestar_awaiting_block_gossip_messages_resolve_total",
1728
+ help: "Total number of gossip messages are reprocessed",
1729
+ labelNames: ["topic"],
1728
1730
  }),
1729
- waitSecBeforeResolve: register.gauge({
1730
- name: "lodestar_reprocess_gossip_attestations_wait_time_resolve_seconds",
1731
+ waitSecBeforeResolve: register.gauge<{topic: GossipType}>({
1732
+ name: "lodestar_awaiting_block_gossip_messages_wait_time_resolve_seconds",
1731
1733
  help: "Time to wait for unknown block in seconds",
1734
+ labelNames: ["topic"],
1732
1735
  }),
1733
- reject: register.gauge<{reason: ReprocessRejectReason}>({
1734
- name: "lodestar_reprocess_gossip_attestations_reject_total",
1735
- help: "Total number of attestations are rejected to reprocess",
1736
- labelNames: ["reason"],
1736
+ // having 2 labels here is not great for performance, however it's rarely happening and having the reason label is important for debugging
1737
+ reject: register.gauge<{reason: ReprocessRejectReason; topic: GossipType}>({
1738
+ name: "lodestar_awaiting_block_gossip_messages_reject_total",
1739
+ help: "Total number of gossip messages are rejected to reprocess",
1740
+ labelNames: ["reason", "topic"],
1737
1741
  }),
1738
- waitSecBeforeReject: register.gauge<{reason: ReprocessRejectReason}>({
1739
- name: "lodestar_reprocess_gossip_attestations_wait_time_reject_seconds",
1742
+ waitSecBeforeReject: register.gauge<{reason: ReprocessRejectReason; topic: GossipType}>({
1743
+ name: "lodestar_awaiting_block_gossip_messages_wait_time_reject_seconds",
1740
1744
  help: "Time to wait for unknown block before being rejected",
1741
- labelNames: ["reason"],
1745
+ labelNames: ["reason", "topic"],
1746
+ }),
1747
+ },
1748
+
1749
+ // some gossip messages need to wait for payload to be processed before they can be processed
1750
+ awaitingPayloadGossipMessages: {
1751
+ queue: register.gauge<{topic: GossipType}>({
1752
+ name: "lodestar_awaiting_payload_gossip_messages_total",
1753
+ help: "Total number of gossip messages waiting for payload to be processed",
1754
+ labelNames: ["topic"],
1755
+ }),
1756
+ countPerSlot: register.gauge({
1757
+ name: "lodestar_awaiting_payload_gossip_messages_per_slot_total",
1758
+ help: "Total number of gossip messages waiting for payload to be processed per slot",
1759
+ }),
1760
+ resolve: register.gauge<{topic: GossipType}>({
1761
+ name: "lodestar_awaiting_payload_gossip_messages_resolve_total",
1762
+ help: "Total number of gossip messages are reprocessed",
1763
+ labelNames: ["topic"],
1764
+ }),
1765
+ waitSecBeforeResolve: register.gauge<{topic: GossipType}>({
1766
+ name: "lodestar_awaiting_payload_gossip_messages_wait_time_resolve_seconds",
1767
+ help: "Time to wait for unknown payload in seconds",
1768
+ labelNames: ["topic"],
1769
+ }),
1770
+ // having 2 labels here is not great for performance, however it's rarely happening and having the reason label is important for debugging
1771
+ reject: register.gauge<{reason: ReprocessRejectReason; topic: GossipType}>({
1772
+ name: "lodestar_awaiting_payload_gossip_messages_reject_total",
1773
+ help: "Total number of gossip messages are rejected to reprocess",
1774
+ labelNames: ["reason", "topic"],
1775
+ }),
1776
+ waitSecBeforeReject: register.gauge<{reason: ReprocessRejectReason; topic: GossipType}>({
1777
+ name: "lodestar_awaiting_payload_gossip_messages_wait_time_reject_seconds",
1778
+ help: "Time to wait for unknown payload before being rejected",
1779
+ labelNames: ["reason", "topic"],
1742
1780
  }),
1743
1781
  },
1744
1782
 
@@ -24,12 +24,28 @@ const decoder = new snappyWasm.Decoder();
24
24
  // Shared buffer to convert msgId to string
25
25
  const sharedMsgIdBuf = Buffer.alloc(20);
26
26
 
27
+ // Cache topic -> seed to avoid per-message allocations on the hot path.
28
+ // Topics are a fixed set per fork (changes only at fork boundaries).
29
+ const topicSeedCache = new Map<string, bigint>();
30
+
27
31
  /**
28
32
  * The function used to generate a gossipsub message id
29
33
  * We use the first 8 bytes of SHA256(data) for content addressing
30
34
  */
31
35
  export function fastMsgIdFn(rpcMsg: RPC.Message): string {
32
36
  if (rpcMsg.data) {
37
+ if (rpcMsg.topic) {
38
+ // Use topic-derived seed to prevent cross-topic deduplication of identical messages.
39
+ // SyncCommitteeMessages are published to multiple sync_committee_{subnet} topics with
40
+ // identical data, so hashing only the data incorrectly deduplicates across subnets.
41
+ // See https://github.com/ChainSafe/lodestar/issues/8294
42
+ let topicSeed = topicSeedCache.get(rpcMsg.topic);
43
+ if (topicSeed === undefined) {
44
+ topicSeed = xxhash.h64Raw(Buffer.from(rpcMsg.topic), h64Seed);
45
+ topicSeedCache.set(rpcMsg.topic, topicSeed);
46
+ }
47
+ return xxhash.h64Raw(rpcMsg.data, topicSeed).toString(16);
48
+ }
33
49
  return xxhash.h64Raw(rpcMsg.data, h64Seed).toString(16);
34
50
  }
35
51
  return "0000000000000000";
@@ -38,7 +38,12 @@ import {
38
38
  import {BlockInputSource} from "../chain/blocks/blockInput/types.js";
39
39
  import {CustodyConfig} from "../util/dataColumns.js";
40
40
  import {PeerIdStr} from "../util/peerId.js";
41
- import {BeaconBlocksByRootRequest, BlobSidecarsByRootRequest, DataColumnSidecarsByRootRequest} from "../util/types.js";
41
+ import {
42
+ BeaconBlocksByRootRequest,
43
+ BlobSidecarsByRootRequest,
44
+ DataColumnSidecarsByRootRequest,
45
+ ExecutionPayloadEnvelopesByRootRequest,
46
+ } from "../util/types.js";
42
47
  import {INetworkCorePublic} from "./core/types.js";
43
48
  import {INetworkEventBus} from "./events.js";
44
49
  import {GossipType} from "./gossip/interface.js";
@@ -68,7 +73,8 @@ export interface INetwork extends INetworkCorePublic {
68
73
  reportPeer(peer: PeerIdStr, action: PeerAction, actionName: string): void;
69
74
  shouldAggregate(subnet: SubnetID, slot: Slot): boolean;
70
75
  reStatusPeers(peers: PeerIdStr[]): Promise<void>;
71
- searchUnknownSlotRoot(slotRoot: SlotRootHex, source: BlockInputSource, peer?: PeerIdStr): void;
76
+ searchUnknownBlock(slotRoot: SlotRootHex, source: BlockInputSource, peer?: PeerIdStr): void;
77
+ searchUnknownEnvelope(slotRoot: SlotRootHex, source: BlockInputSource, peer?: PeerIdStr): void;
72
78
  // ReqResp
73
79
  sendBeaconBlocksByRange(peerId: PeerIdStr, request: phase0.BeaconBlocksByRangeRequest): Promise<SignedBeaconBlock[]>;
74
80
  sendBeaconBlocksByRoot(peerId: PeerIdStr, request: BeaconBlocksByRootRequest): Promise<SignedBeaconBlock[]>;
@@ -77,11 +83,19 @@ export interface INetwork extends INetworkCorePublic {
77
83
  sendDataColumnSidecarsByRange(
78
84
  peerId: PeerIdStr,
79
85
  request: fulu.DataColumnSidecarsByRangeRequest
80
- ): Promise<fulu.DataColumnSidecar[]>;
86
+ ): Promise<DataColumnSidecar[]>;
81
87
  sendDataColumnSidecarsByRoot(
82
88
  peerId: PeerIdStr,
83
89
  request: DataColumnSidecarsByRootRequest
84
- ): Promise<fulu.DataColumnSidecar[]>;
90
+ ): Promise<DataColumnSidecar[]>;
91
+ sendExecutionPayloadEnvelopesByRange(
92
+ peerId: PeerIdStr,
93
+ request: gloas.ExecutionPayloadEnvelopesByRangeRequest
94
+ ): Promise<gloas.SignedExecutionPayloadEnvelope[]>;
95
+ sendExecutionPayloadEnvelopesByRoot(
96
+ peerId: PeerIdStr,
97
+ request: ExecutionPayloadEnvelopesByRootRequest
98
+ ): Promise<gloas.SignedExecutionPayloadEnvelope[]>;
85
99
 
86
100
  // Gossip
87
101
  publishBeaconBlock(signedBlock: SignedBeaconBlock): Promise<number>;
@@ -44,6 +44,8 @@ export async function createNodeJsLibp2p(
44
44
  ): Promise<Libp2p> {
45
45
  const localMultiaddrs = networkOpts.localMultiaddrs || defaultNetworkOptions.localMultiaddrs;
46
46
  const disconnectThreshold = networkOpts.disconnectThreshold ?? defaultNetworkOptions.disconnectThreshold;
47
+ const tcpEnabled = networkOpts.tcp ?? defaultNetworkOptions.tcp;
48
+ const quicEnabled = networkOpts.quic ?? defaultNetworkOptions.quic;
47
49
  const {peerStoreDir, disablePeerDiscovery} = nodeJsLibp2pOpts;
48
50
 
49
51
  let datastore: undefined | Eth2PeerDataStore = undefined;
@@ -58,7 +60,7 @@ export async function createNodeJsLibp2p(
58
60
  ...(networkOpts.bootMultiaddrs ?? defaultNetworkOptions.bootMultiaddrs ?? []),
59
61
  // Append discv5.bootEnrs to bootMultiaddrs if requested
60
62
  ...(networkOpts.connectToDiscv5Bootnodes
61
- ? await getDiscv5Multiaddrs(networkOpts.discv5?.bootEnrs ?? [], networkOpts.quic)
63
+ ? await getDiscv5Multiaddrs(networkOpts.discv5?.bootEnrs ?? [], quicEnabled)
62
64
  : []),
63
65
  ];
64
66
 
@@ -71,7 +73,7 @@ export async function createNodeJsLibp2p(
71
73
  }
72
74
  }
73
75
  const transports: Libp2pInit["transports"] = [];
74
- if (networkOpts.tcp ?? true) {
76
+ if (tcpEnabled) {
75
77
  transports.unshift(
76
78
  tcp({
77
79
  // Reject connections when the server's connection count gets high
@@ -87,17 +89,26 @@ export async function createNodeJsLibp2p(
87
89
  })
88
90
  );
89
91
  }
90
- if (networkOpts.quic) {
91
- transports.unshift(
92
- quic({
93
- handshakeTimeout: 5_000,
94
- maxIdleTimeout: 10_000,
95
- keepAliveInterval: 5_000,
96
- maxConcurrentStreamLimit: 256,
97
- maxStreamData: 10_000_000,
98
- maxConnectionData: 15_000_000,
99
- })
100
- );
92
+ if (quicEnabled) {
93
+ const quicMultiaddrs = localMultiaddrs.filter((ma) => ma.includes("/quic-v1"));
94
+ const hasIpv4Quic = quicMultiaddrs.some((ma) => ma.includes("/ip4/"));
95
+ const hasIpv6Quic = quicMultiaddrs.some((ma) => ma.includes("/ip6/"));
96
+ // Only add QUIC transport if at least one QUIC listen address is configured,
97
+ // otherwise the transport constructor will throw
98
+ if (hasIpv4Quic || hasIpv6Quic) {
99
+ transports.unshift(
100
+ quic({
101
+ handshakeTimeout: 5_000,
102
+ maxIdleTimeout: 10_000,
103
+ keepAliveInterval: 5_000,
104
+ maxConcurrentStreamLimit: 256,
105
+ maxStreamData: 10_000_000,
106
+ maxConnectionData: 15_000_000,
107
+ ipv4: hasIpv4Quic,
108
+ ipv6: hasIpv6Quic,
109
+ })
110
+ );
111
+ }
101
112
  }
102
113
 
103
114
  const noiseCrypto = {
@@ -11,7 +11,6 @@ import {computeEpochAtSlot} from "@lodestar/state-transition";
11
11
  import {
12
12
  AttesterSlashing,
13
13
  DataColumnSidecar,
14
- DataColumnSidecars,
15
14
  LightClientBootstrap,
16
15
  LightClientFinalityUpdate,
17
16
  LightClientOptimisticUpdate,
@@ -40,7 +39,12 @@ import {IClock} from "../util/clock.js";
40
39
  import {CustodyConfig} from "../util/dataColumns.js";
41
40
  import {PeerIdStr, peerIdToString} from "../util/peerId.js";
42
41
  import {promiseAllMaybeAsync} from "../util/promises.js";
43
- import {BeaconBlocksByRootRequest, BlobSidecarsByRootRequest, DataColumnSidecarsByRootRequest} from "../util/types.js";
42
+ import {
43
+ BeaconBlocksByRootRequest,
44
+ BlobSidecarsByRootRequest,
45
+ DataColumnSidecarsByRootRequest,
46
+ ExecutionPayloadEnvelopesByRootRequest,
47
+ } from "../util/types.js";
44
48
  import {INetworkCore, NetworkCore, WorkerNetworkCore} from "./core/index.js";
45
49
  import {INetworkEventBus, NetworkEvent, NetworkEventBus, NetworkEventData} from "./events.js";
46
50
  import {getActiveForkBoundaries} from "./forks.js";
@@ -161,7 +165,7 @@ export class Network implements INetwork {
161
165
  const events = new NetworkEventBus();
162
166
  const aggregatorTracker = new AggregatorTracker();
163
167
 
164
- const activeValidatorCount = chain.getHeadState().epochCtx.currentShuffling.activeIndices.length;
168
+ const activeValidatorCount = chain.getHeadState().activeValidatorCount;
165
169
  const initialStatus = chain.getStatus();
166
170
  const initialCustodyGroupCount = chain.custodyConfig.targetCustodyGroupCount;
167
171
 
@@ -277,8 +281,12 @@ export class Network implements INetwork {
277
281
  return this.core.reStatusPeers(peers);
278
282
  }
279
283
 
280
- searchUnknownSlotRoot(slotRoot: SlotRootHex, source: BlockInputSource, peer?: PeerIdStr): void {
281
- this.networkProcessor.searchUnknownSlotRoot(slotRoot, source, peer);
284
+ searchUnknownBlock(slotRoot: SlotRootHex, source: BlockInputSource, peer?: PeerIdStr): void {
285
+ this.networkProcessor.searchUnknownBlock(slotRoot, source, peer);
286
+ }
287
+
288
+ searchUnknownEnvelope(slotRoot: SlotRootHex, source: BlockInputSource, peer?: PeerIdStr): void {
289
+ this.networkProcessor.searchUnknownEnvelope(slotRoot, source, peer);
282
290
  }
283
291
 
284
292
  async reportPeer(peer: PeerIdStr, action: PeerAction, actionName: string): Promise<void> {
@@ -616,7 +624,7 @@ export class Network implements INetwork {
616
624
  async sendDataColumnSidecarsByRange(
617
625
  peerId: PeerIdStr,
618
626
  request: fulu.DataColumnSidecarsByRangeRequest
619
- ): Promise<fulu.DataColumnSidecar[]> {
627
+ ): Promise<DataColumnSidecar[]> {
620
628
  return collectMaxResponseTyped(
621
629
  this.sendReqRespRequest(peerId, ReqRespMethod.DataColumnSidecarsByRange, [Version.V1], request),
622
630
  request.count * request.columns.length,
@@ -627,7 +635,7 @@ export class Network implements INetwork {
627
635
  async sendDataColumnSidecarsByRoot(
628
636
  peerId: PeerIdStr,
629
637
  request: DataColumnSidecarsByRootRequest
630
- ): Promise<fulu.DataColumnSidecar[]> {
638
+ ): Promise<DataColumnSidecar[]> {
631
639
  return collectMaxResponseTyped(
632
640
  this.sendReqRespRequest(peerId, ReqRespMethod.DataColumnSidecarsByRoot, [Version.V1], request),
633
641
  request.reduce((total, {columns}) => total + columns.length, 0),
@@ -636,6 +644,29 @@ export class Network implements INetwork {
636
644
  );
637
645
  }
638
646
 
647
+ async sendExecutionPayloadEnvelopesByRange(
648
+ peerId: PeerIdStr,
649
+ request: gloas.ExecutionPayloadEnvelopesByRangeRequest
650
+ ): Promise<gloas.SignedExecutionPayloadEnvelope[]> {
651
+ return collectMaxResponseTyped(
652
+ this.sendReqRespRequest(peerId, ReqRespMethod.ExecutionPayloadEnvelopesByRange, [Version.V1], request),
653
+ request.count,
654
+ responseSszTypeByMethod[ReqRespMethod.ExecutionPayloadEnvelopesByRange]
655
+ );
656
+ }
657
+
658
+ async sendExecutionPayloadEnvelopesByRoot(
659
+ peerId: PeerIdStr,
660
+ request: ExecutionPayloadEnvelopesByRootRequest
661
+ ): Promise<gloas.SignedExecutionPayloadEnvelope[]> {
662
+ return collectMaxResponseTyped(
663
+ this.sendReqRespRequest(peerId, ReqRespMethod.ExecutionPayloadEnvelopesByRoot, [Version.V1], request),
664
+ request.length,
665
+ responseSszTypeByMethod[ReqRespMethod.ExecutionPayloadEnvelopesByRoot],
666
+ this.chain.serializedCache
667
+ );
668
+ }
669
+
639
670
  private sendReqRespRequest<Req>(
640
671
  peerId: PeerIdStr,
641
672
  method: ReqRespMethod,
@@ -784,7 +815,7 @@ export class Network implements INetwork {
784
815
  this.core.setTargetGroupCount(count);
785
816
  };
786
817
 
787
- private onPublishDataColumns = (sidecars: DataColumnSidecars): Promise<number[]> => {
818
+ private onPublishDataColumns = (sidecars: DataColumnSidecar[]): Promise<number[]> => {
788
819
  return promiseAllMaybeAsync(sidecars.map((sidecar) => () => this.publishDataColumnSidecar(sidecar)));
789
820
  };
790
821
 
@@ -55,7 +55,12 @@ export const defaultNetworkOptions: NetworkOptions = {
55
55
  maxPeers: 210, // Allow some room above targetPeers for new inbound peers
56
56
  targetPeers: 200,
57
57
  // In CLI usage this is typically overridden; when unset it serves as a fallback default (e.g. programmatic usage/tests)
58
- localMultiaddrs: ["/ip4/0.0.0.0/tcp/9000", "/ip6/::/tcp/9000"],
58
+ localMultiaddrs: [
59
+ "/ip4/0.0.0.0/udp/9001/quic-v1",
60
+ "/ip6/::/udp/9001/quic-v1",
61
+ "/ip4/0.0.0.0/tcp/9000",
62
+ "/ip6/::/tcp/9000",
63
+ ],
59
64
  bootMultiaddrs: [],
60
65
  /** disabled by default */
61
66
  discv5: null,
@@ -69,7 +74,7 @@ export const defaultNetworkOptions: NetworkOptions = {
69
74
  slotsToSubscribeBeforeAggregatorDuty: 2,
70
75
  // This will enable the light client server by default
71
76
  disableLightClientServer: false,
72
- quic: false,
77
+ quic: true,
73
78
  tcp: true,
74
79
  // specific option for fulu
75
80
  // - this is the same to TARGET_SUBNET_PEERS
@@ -1,23 +1,25 @@
1
- import {ForkName, isForkPostGloas} from "@lodestar/params";
1
+ import {ForkName, ForkSeq} from "@lodestar/params";
2
2
  import {SlotOptionalRoot, SlotRootHex} from "@lodestar/types";
3
3
  import {
4
4
  getBeaconBlockRootFromDataColumnSidecarSerialized,
5
- getBeaconBlockRootFromExecutionPayloadEnvelopeSerialized,
6
5
  getBlockRootFromBeaconAttestationSerialized,
6
+ getBlockRootFromPayloadAttestationMessageSerialized,
7
7
  getBlockRootFromSignedAggregateAndProofSerialized,
8
8
  getSlotFromBeaconAttestationSerialized,
9
9
  getSlotFromBlobSidecarSerialized,
10
10
  getSlotFromDataColumnSidecarSerialized,
11
11
  getSlotFromExecutionPayloadEnvelopeSerialized,
12
+ getSlotFromPayloadAttestationMessageSerialized,
12
13
  getSlotFromSignedAggregateAndProofSerialized,
13
14
  getSlotFromSignedBeaconBlockSerialized,
15
+ getSlotFromSignedExecutionPayloadBidSerialized,
14
16
  } from "../../util/sszBytes.js";
15
17
  import {GossipType} from "../gossip/index.js";
16
18
  import {ExtractSlotRootFns} from "./types.js";
17
19
 
18
20
  /**
19
21
  * Extract the slot and block root of a gossip message form serialized data.
20
- * Only applicable for beacon_attestation and beacon_aggregate_and_proof topics.
22
+ * Only do it for messages that have a slot and block root, and we want to await the block if the block root is not known.
21
23
  */
22
24
  export function createExtractBlockSlotRootFns(): ExtractSlotRootFns {
23
25
  return {
@@ -57,21 +59,45 @@ export function createExtractBlockSlotRootFns(): ExtractSlotRootFns {
57
59
  },
58
60
  [GossipType.data_column_sidecar]: (data: Uint8Array, fork: ForkName): SlotOptionalRoot | null => {
59
61
  const slot = getSlotFromDataColumnSidecarSerialized(data, fork);
62
+
60
63
  if (slot === null) {
61
64
  return null;
62
65
  }
63
66
 
64
- const root = isForkPostGloas(fork) ? getBeaconBlockRootFromDataColumnSidecarSerialized(data) : null;
67
+ if (ForkSeq[fork] < ForkSeq.gloas) {
68
+ return {slot};
69
+ }
70
+
71
+ const root = getBeaconBlockRootFromDataColumnSidecarSerialized(data);
72
+ // null root means the message is invalid here and will be ignored in gossip handler later
73
+ // returning the slot here helps check the earliest permissable slot in the network processor
65
74
  return root !== null ? {slot, root} : {slot};
66
75
  },
67
- [GossipType.execution_payload]: (data: Uint8Array): SlotRootHex | null => {
76
+ [GossipType.execution_payload]: (data: Uint8Array): SlotOptionalRoot | null => {
68
77
  const slot = getSlotFromExecutionPayloadEnvelopeSerialized(data);
69
- const root = getBeaconBlockRootFromExecutionPayloadEnvelopeSerialized(data);
78
+ // Do not extract the root here; the network processor will extract it in the 2nd round to trigger block search without awaiting.
79
+ if (slot === null) {
80
+ return null;
81
+ }
82
+ return {slot};
83
+ },
84
+ [GossipType.payload_attestation_message]: (data: Uint8Array): SlotRootHex | null => {
85
+ const slot = getSlotFromPayloadAttestationMessageSerialized(data);
86
+ const root = getBlockRootFromPayloadAttestationMessageSerialized(data);
70
87
 
71
88
  if (slot === null || root === null) {
72
89
  return null;
73
90
  }
74
91
  return {slot, root};
75
92
  },
93
+ [GossipType.execution_payload_bid]: (data: Uint8Array): SlotOptionalRoot | null => {
94
+ const slot = getSlotFromSignedExecutionPayloadBidSerialized(data);
95
+
96
+ if (slot === null) {
97
+ return null;
98
+ }
99
+
100
+ return {slot};
101
+ },
76
102
  };
77
103
  }