@lodestar/beacon-node 2.1.0-dev.475f7d67bc → 2.1.0-dev.4b0199a2eb

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 (378) hide show
  1. package/lib/api/impl/beacon/blocks/index.d.ts.map +1 -1
  2. package/lib/api/impl/beacon/blocks/index.js +1 -3
  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 +8 -0
  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 +3 -2
  9. package/lib/api/impl/beacon/state/index.js.map +1 -1
  10. package/lib/api/impl/beacon/state/utils.js +1 -1
  11. package/lib/api/impl/beacon/state/utils.js.map +1 -1
  12. package/lib/api/impl/config/constants.d.ts +0 -1
  13. package/lib/api/impl/config/constants.d.ts.map +1 -1
  14. package/lib/api/impl/config/constants.js +1 -3
  15. package/lib/api/impl/config/constants.js.map +1 -1
  16. package/lib/api/impl/debug/index.d.ts.map +1 -1
  17. package/lib/api/impl/debug/index.js +0 -3
  18. package/lib/api/impl/debug/index.js.map +1 -1
  19. package/lib/api/impl/errors.d.ts +7 -0
  20. package/lib/api/impl/errors.d.ts.map +1 -1
  21. package/lib/api/impl/errors.js +9 -0
  22. package/lib/api/impl/errors.js.map +1 -1
  23. package/lib/api/impl/validator/index.d.ts.map +1 -1
  24. package/lib/api/impl/validator/index.js +4 -94
  25. package/lib/api/impl/validator/index.js.map +1 -1
  26. package/lib/api/rest/base.d.ts.map +1 -1
  27. package/lib/api/rest/base.js +6 -3
  28. package/lib/api/rest/base.js.map +1 -1
  29. package/lib/chain/ColumnReconstructionTracker.d.ts +3 -0
  30. package/lib/chain/ColumnReconstructionTracker.d.ts.map +1 -1
  31. package/lib/chain/ColumnReconstructionTracker.js +3 -1
  32. package/lib/chain/ColumnReconstructionTracker.js.map +1 -1
  33. package/lib/chain/GetBlobsTracker.d.ts +3 -0
  34. package/lib/chain/GetBlobsTracker.d.ts.map +1 -1
  35. package/lib/chain/GetBlobsTracker.js +3 -1
  36. package/lib/chain/GetBlobsTracker.js.map +1 -1
  37. package/lib/chain/blocks/importBlock.d.ts.map +1 -1
  38. package/lib/chain/blocks/importBlock.js +14 -5
  39. package/lib/chain/blocks/importBlock.js.map +1 -1
  40. package/lib/chain/blocks/importExecutionPayload.d.ts.map +1 -1
  41. package/lib/chain/blocks/importExecutionPayload.js +7 -56
  42. package/lib/chain/blocks/importExecutionPayload.js.map +1 -1
  43. package/lib/chain/blocks/payloadEnvelopeInput/types.d.ts +2 -1
  44. package/lib/chain/blocks/payloadEnvelopeInput/types.d.ts.map +1 -1
  45. package/lib/chain/blocks/types.d.ts +0 -4
  46. package/lib/chain/blocks/types.d.ts.map +1 -1
  47. package/lib/chain/blocks/types.js +0 -5
  48. package/lib/chain/blocks/types.js.map +1 -1
  49. package/lib/chain/chain.d.ts +3 -3
  50. package/lib/chain/chain.d.ts.map +1 -1
  51. package/lib/chain/chain.js +30 -10
  52. package/lib/chain/chain.js.map +1 -1
  53. package/lib/chain/errors/dataColumnSidecarError.d.ts +7 -0
  54. package/lib/chain/errors/dataColumnSidecarError.d.ts.map +1 -1
  55. package/lib/chain/errors/dataColumnSidecarError.js +1 -0
  56. package/lib/chain/errors/dataColumnSidecarError.js.map +1 -1
  57. package/lib/chain/errors/executionPayloadBid.d.ts +0 -15
  58. package/lib/chain/errors/executionPayloadBid.d.ts.map +1 -1
  59. package/lib/chain/errors/executionPayloadBid.js +0 -3
  60. package/lib/chain/errors/executionPayloadBid.js.map +1 -1
  61. package/lib/chain/errors/index.d.ts +0 -1
  62. package/lib/chain/errors/index.d.ts.map +1 -1
  63. package/lib/chain/errors/index.js +0 -1
  64. package/lib/chain/errors/index.js.map +1 -1
  65. package/lib/chain/forkChoice/index.d.ts +11 -2
  66. package/lib/chain/forkChoice/index.d.ts.map +1 -1
  67. package/lib/chain/forkChoice/index.js +180 -13
  68. package/lib/chain/forkChoice/index.js.map +1 -1
  69. package/lib/chain/forkChoiceExecutionEngine.d.ts +1 -2
  70. package/lib/chain/forkChoiceExecutionEngine.d.ts.map +1 -1
  71. package/lib/chain/forkChoiceExecutionEngine.js +0 -3
  72. package/lib/chain/forkChoiceExecutionEngine.js.map +1 -1
  73. package/lib/chain/interface.d.ts +3 -3
  74. package/lib/chain/interface.d.ts.map +1 -1
  75. package/lib/chain/interface.js.map +1 -1
  76. package/lib/chain/opPools/index.d.ts +0 -1
  77. package/lib/chain/opPools/index.d.ts.map +1 -1
  78. package/lib/chain/opPools/index.js +0 -1
  79. package/lib/chain/opPools/index.js.map +1 -1
  80. package/lib/chain/opPools/opPool.d.ts +9 -3
  81. package/lib/chain/opPools/opPool.d.ts.map +1 -1
  82. package/lib/chain/opPools/opPool.js +22 -16
  83. package/lib/chain/opPools/opPool.js.map +1 -1
  84. package/lib/chain/options.d.ts.map +1 -1
  85. package/lib/chain/options.js +1 -3
  86. package/lib/chain/options.js.map +1 -1
  87. package/lib/chain/produceBlock/produceBlockBody.d.ts +1 -3
  88. package/lib/chain/produceBlock/produceBlockBody.d.ts.map +1 -1
  89. package/lib/chain/produceBlock/produceBlockBody.js +3 -33
  90. package/lib/chain/produceBlock/produceBlockBody.js.map +1 -1
  91. package/lib/chain/regen/interface.d.ts +0 -1
  92. package/lib/chain/regen/interface.d.ts.map +1 -1
  93. package/lib/chain/regen/interface.js +0 -1
  94. package/lib/chain/regen/interface.js.map +1 -1
  95. package/lib/chain/seenCache/index.d.ts +1 -0
  96. package/lib/chain/seenCache/index.d.ts.map +1 -1
  97. package/lib/chain/seenCache/index.js +1 -0
  98. package/lib/chain/seenCache/index.js.map +1 -1
  99. package/lib/chain/seenCache/seenBlockProposers.d.ts +3 -0
  100. package/lib/chain/seenCache/seenBlockProposers.d.ts.map +1 -1
  101. package/lib/chain/seenCache/seenBlockProposers.js +6 -2
  102. package/lib/chain/seenCache/seenBlockProposers.js.map +1 -1
  103. package/lib/chain/seenCache/seenDataColumnSidecars.d.ts +17 -0
  104. package/lib/chain/seenCache/seenDataColumnSidecars.d.ts.map +1 -0
  105. package/lib/chain/seenCache/seenDataColumnSidecars.js +61 -0
  106. package/lib/chain/seenCache/seenDataColumnSidecars.js.map +1 -0
  107. package/lib/chain/seenCache/seenGossipBlockInput.js +1 -1
  108. package/lib/chain/seenCache/seenGossipBlockInput.js.map +1 -1
  109. package/lib/chain/seenCache/seenPayloadEnvelopeInput.d.ts +11 -2
  110. package/lib/chain/seenCache/seenPayloadEnvelopeInput.d.ts.map +1 -1
  111. package/lib/chain/seenCache/seenPayloadEnvelopeInput.js +28 -2
  112. package/lib/chain/seenCache/seenPayloadEnvelopeInput.js.map +1 -1
  113. package/lib/chain/validation/attestation.d.ts.map +1 -1
  114. package/lib/chain/validation/attestation.js +4 -2
  115. package/lib/chain/validation/attestation.js.map +1 -1
  116. package/lib/chain/validation/block.d.ts.map +1 -1
  117. package/lib/chain/validation/block.js +20 -7
  118. package/lib/chain/validation/block.js.map +1 -1
  119. package/lib/chain/validation/dataColumnSidecar.js +1 -1
  120. package/lib/chain/validation/dataColumnSidecar.js.map +1 -1
  121. package/lib/chain/validation/executionPayloadBid.d.ts.map +1 -1
  122. package/lib/chain/validation/executionPayloadBid.js +1 -34
  123. package/lib/chain/validation/executionPayloadBid.js.map +1 -1
  124. package/lib/chain/validation/index.d.ts +0 -1
  125. package/lib/chain/validation/index.d.ts.map +1 -1
  126. package/lib/chain/validation/index.js +0 -1
  127. package/lib/chain/validation/index.js.map +1 -1
  128. package/lib/chain/validation/proposerSlashing.js +5 -1
  129. package/lib/chain/validation/proposerSlashing.js.map +1 -1
  130. package/lib/chain/validation/voluntaryExit.js +2 -2
  131. package/lib/chain/validation/voluntaryExit.js.map +1 -1
  132. package/lib/execution/builder/validateBid.d.ts.map +1 -1
  133. package/lib/execution/builder/validateBid.js +1 -14
  134. package/lib/execution/builder/validateBid.js.map +1 -1
  135. package/lib/execution/engine/disabled.d.ts +0 -1
  136. package/lib/execution/engine/disabled.d.ts.map +1 -1
  137. package/lib/execution/engine/disabled.js +0 -3
  138. package/lib/execution/engine/disabled.js.map +1 -1
  139. package/lib/execution/engine/http.d.ts +2 -8
  140. package/lib/execution/engine/http.d.ts.map +1 -1
  141. package/lib/execution/engine/http.js +4 -27
  142. package/lib/execution/engine/http.js.map +1 -1
  143. package/lib/execution/engine/interface.d.ts +2 -13
  144. package/lib/execution/engine/interface.d.ts.map +1 -1
  145. package/lib/execution/engine/interface.js.map +1 -1
  146. package/lib/execution/engine/jsonRpcTransport.d.ts +2 -3
  147. package/lib/execution/engine/jsonRpcTransport.d.ts.map +1 -1
  148. package/lib/execution/engine/jsonRpcTransport.js +9 -33
  149. package/lib/execution/engine/jsonRpcTransport.js.map +1 -1
  150. package/lib/execution/engine/mock.d.ts +0 -1
  151. package/lib/execution/engine/mock.d.ts.map +1 -1
  152. package/lib/execution/engine/mock.js +3 -25
  153. package/lib/execution/engine/mock.js.map +1 -1
  154. package/lib/execution/engine/payloadIdCache.d.ts +1 -4
  155. package/lib/execution/engine/payloadIdCache.d.ts.map +1 -1
  156. package/lib/execution/engine/payloadIdCache.js +2 -16
  157. package/lib/execution/engine/payloadIdCache.js.map +1 -1
  158. package/lib/execution/engine/restTransport.d.ts +1 -2
  159. package/lib/execution/engine/restTransport.d.ts.map +1 -1
  160. package/lib/execution/engine/restTransport.js +0 -3
  161. package/lib/execution/engine/restTransport.js.map +1 -1
  162. package/lib/execution/engine/transport.d.ts +2 -3
  163. package/lib/execution/engine/transport.d.ts.map +1 -1
  164. package/lib/execution/engine/types.d.ts +0 -24
  165. package/lib/execution/engine/types.d.ts.map +1 -1
  166. package/lib/execution/engine/types.js +0 -12
  167. package/lib/execution/engine/types.js.map +1 -1
  168. package/lib/index.d.ts +1 -0
  169. package/lib/index.d.ts.map +1 -1
  170. package/lib/index.js +1 -0
  171. package/lib/index.js.map +1 -1
  172. package/lib/metrics/metrics/beacon.d.ts +0 -16
  173. package/lib/metrics/metrics/beacon.d.ts.map +1 -1
  174. package/lib/metrics/metrics/beacon.js +0 -35
  175. package/lib/metrics/metrics/beacon.js.map +1 -1
  176. package/lib/metrics/metrics/lodestar.d.ts +0 -9
  177. package/lib/metrics/metrics/lodestar.d.ts.map +1 -1
  178. package/lib/metrics/metrics/lodestar.js +0 -20
  179. package/lib/metrics/metrics/lodestar.js.map +1 -1
  180. package/lib/network/core/networkCore.d.ts +1 -3
  181. package/lib/network/core/networkCore.d.ts.map +1 -1
  182. package/lib/network/core/networkCore.js +1 -3
  183. package/lib/network/core/networkCore.js.map +1 -1
  184. package/lib/network/forks.d.ts +2 -2
  185. package/lib/network/forks.d.ts.map +1 -1
  186. package/lib/network/forks.js +3 -3
  187. package/lib/network/forks.js.map +1 -1
  188. package/lib/network/gossip/interface.d.ts +2 -8
  189. package/lib/network/gossip/interface.d.ts.map +1 -1
  190. package/lib/network/gossip/interface.js +0 -1
  191. package/lib/network/gossip/interface.js.map +1 -1
  192. package/lib/network/gossip/scoringParameters.js +19 -14
  193. package/lib/network/gossip/scoringParameters.js.map +1 -1
  194. package/lib/network/gossip/topic.d.ts +17 -29
  195. package/lib/network/gossip/topic.d.ts.map +1 -1
  196. package/lib/network/gossip/topic.js +1 -13
  197. package/lib/network/gossip/topic.js.map +1 -1
  198. package/lib/network/interface.d.ts +1 -2
  199. package/lib/network/interface.d.ts.map +1 -1
  200. package/lib/network/network.d.ts +2 -8
  201. package/lib/network/network.d.ts.map +1 -1
  202. package/lib/network/network.js +16 -45
  203. package/lib/network/network.js.map +1 -1
  204. package/lib/network/options.d.ts +0 -1
  205. package/lib/network/options.d.ts.map +1 -1
  206. package/lib/network/options.js +0 -1
  207. package/lib/network/options.js.map +1 -1
  208. package/lib/network/peers/discover.d.ts +1 -0
  209. package/lib/network/peers/discover.d.ts.map +1 -1
  210. package/lib/network/peers/discover.js +44 -48
  211. package/lib/network/peers/discover.js.map +1 -1
  212. package/lib/network/peers/score/store.d.ts.map +1 -1
  213. package/lib/network/peers/score/store.js +1 -2
  214. package/lib/network/peers/score/store.js.map +1 -1
  215. package/lib/network/processor/gossipHandlers.d.ts.map +1 -1
  216. package/lib/network/processor/gossipHandlers.js +85 -57
  217. package/lib/network/processor/gossipHandlers.js.map +1 -1
  218. package/lib/network/processor/gossipQueues/index.d.ts.map +1 -1
  219. package/lib/network/processor/gossipQueues/index.js +0 -6
  220. package/lib/network/processor/gossipQueues/index.js.map +1 -1
  221. package/lib/network/processor/gossipValidatorFn.d.ts.map +1 -1
  222. package/lib/network/processor/gossipValidatorFn.js +1 -5
  223. package/lib/network/processor/gossipValidatorFn.js.map +1 -1
  224. package/lib/network/processor/index.d.ts.map +1 -1
  225. package/lib/network/processor/index.js +0 -1
  226. package/lib/network/processor/index.js.map +1 -1
  227. package/lib/network/reqresp/ReqRespBeaconNode.d.ts.map +1 -1
  228. package/lib/network/reqresp/ReqRespBeaconNode.js +0 -6
  229. package/lib/network/reqresp/ReqRespBeaconNode.js.map +1 -1
  230. package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.d.ts.map +1 -1
  231. package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.js +3 -1
  232. package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.js.map +1 -1
  233. package/lib/network/reqresp/handlers/index.d.ts.map +1 -1
  234. package/lib/network/reqresp/handlers/index.js +0 -5
  235. package/lib/network/reqresp/handlers/index.js.map +1 -1
  236. package/lib/network/reqresp/protocols.d.ts +0 -1
  237. package/lib/network/reqresp/protocols.d.ts.map +1 -1
  238. package/lib/network/reqresp/protocols.js +0 -5
  239. package/lib/network/reqresp/protocols.js.map +1 -1
  240. package/lib/network/reqresp/rateLimit.d.ts.map +1 -1
  241. package/lib/network/reqresp/rateLimit.js +0 -4
  242. package/lib/network/reqresp/rateLimit.js.map +1 -1
  243. package/lib/network/reqresp/types.d.ts +2 -5
  244. package/lib/network/reqresp/types.d.ts.map +1 -1
  245. package/lib/network/reqresp/types.js +0 -3
  246. package/lib/network/reqresp/types.js.map +1 -1
  247. package/lib/sync/range/chain.d.ts.map +1 -1
  248. package/lib/sync/range/chain.js +1 -0
  249. package/lib/sync/range/chain.js.map +1 -1
  250. package/lib/sync/range/range.d.ts.map +1 -1
  251. package/lib/sync/range/range.js +5 -1
  252. package/lib/sync/range/range.js.map +1 -1
  253. package/lib/sync/unknownBlock.d.ts.map +1 -1
  254. package/lib/sync/unknownBlock.js +14 -1
  255. package/lib/sync/unknownBlock.js.map +1 -1
  256. package/lib/sync/utils/downloadByRange.d.ts +6 -0
  257. package/lib/sync/utils/downloadByRange.d.ts.map +1 -1
  258. package/lib/sync/utils/downloadByRange.js +17 -8
  259. package/lib/sync/utils/downloadByRange.js.map +1 -1
  260. package/lib/sync/utils/downloadByRoot.d.ts.map +1 -1
  261. package/lib/sync/utils/downloadByRoot.js +1 -1
  262. package/lib/sync/utils/downloadByRoot.js.map +1 -1
  263. package/lib/sync/utils/pendingBlocksTree.d.ts.map +1 -1
  264. package/lib/sync/utils/pendingBlocksTree.js +6 -1
  265. package/lib/sync/utils/pendingBlocksTree.js.map +1 -1
  266. package/lib/util/dataColumns.d.ts +2 -1
  267. package/lib/util/dataColumns.d.ts.map +1 -1
  268. package/lib/util/dataColumns.js +7 -2
  269. package/lib/util/dataColumns.js.map +1 -1
  270. package/lib/util/execution.d.ts +2 -1
  271. package/lib/util/execution.d.ts.map +1 -1
  272. package/lib/util/execution.js +7 -2
  273. package/lib/util/execution.js.map +1 -1
  274. package/lib/util/sszBytes.d.ts.map +1 -1
  275. package/lib/util/sszBytes.js +6 -4
  276. package/lib/util/sszBytes.js.map +1 -1
  277. package/package.json +18 -21
  278. package/src/api/impl/beacon/blocks/index.ts +1 -5
  279. package/src/api/impl/beacon/pool/index.ts +11 -0
  280. package/src/api/impl/beacon/state/index.ts +3 -7
  281. package/src/api/impl/beacon/state/utils.ts +1 -1
  282. package/src/api/impl/config/constants.ts +0 -4
  283. package/src/api/impl/debug/index.ts +0 -4
  284. package/src/api/impl/errors.ts +10 -0
  285. package/src/api/impl/validator/index.ts +2 -123
  286. package/src/api/rest/base.ts +9 -3
  287. package/src/chain/ColumnReconstructionTracker.ts +5 -1
  288. package/src/chain/GetBlobsTracker.ts +5 -0
  289. package/src/chain/blocks/importBlock.ts +14 -7
  290. package/src/chain/blocks/importExecutionPayload.ts +7 -74
  291. package/src/chain/blocks/payloadEnvelopeInput/types.ts +8 -1
  292. package/src/chain/blocks/types.ts +0 -5
  293. package/src/chain/chain.ts +34 -9
  294. package/src/chain/errors/dataColumnSidecarError.ts +8 -0
  295. package/src/chain/errors/executionPayloadBid.ts +0 -18
  296. package/src/chain/errors/index.ts +0 -1
  297. package/src/chain/forkChoice/index.ts +233 -13
  298. package/src/chain/forkChoiceExecutionEngine.ts +1 -5
  299. package/src/chain/interface.ts +2 -2
  300. package/src/chain/opPools/index.ts +0 -1
  301. package/src/chain/opPools/opPool.ts +27 -16
  302. package/src/chain/options.ts +1 -3
  303. package/src/chain/produceBlock/produceBlockBody.ts +12 -66
  304. package/src/chain/regen/interface.ts +0 -1
  305. package/src/chain/seenCache/index.ts +1 -0
  306. package/src/chain/seenCache/seenBlockProposers.ts +12 -2
  307. package/src/chain/seenCache/seenDataColumnSidecars.ts +69 -0
  308. package/src/chain/seenCache/seenGossipBlockInput.ts +1 -1
  309. package/src/chain/seenCache/seenPayloadEnvelopeInput.ts +28 -2
  310. package/src/chain/validation/attestation.ts +4 -2
  311. package/src/chain/validation/block.ts +19 -7
  312. package/src/chain/validation/dataColumnSidecar.ts +1 -1
  313. package/src/chain/validation/executionPayloadBid.ts +2 -49
  314. package/src/chain/validation/index.ts +0 -1
  315. package/src/chain/validation/proposerSlashing.ts +5 -1
  316. package/src/chain/validation/voluntaryExit.ts +2 -2
  317. package/src/execution/builder/validateBid.ts +2 -23
  318. package/src/execution/engine/disabled.ts +0 -4
  319. package/src/execution/engine/http.ts +5 -40
  320. package/src/execution/engine/interface.ts +2 -24
  321. package/src/execution/engine/jsonRpcTransport.ts +9 -46
  322. package/src/execution/engine/mock.ts +3 -26
  323. package/src/execution/engine/payloadIdCache.ts +4 -25
  324. package/src/execution/engine/restTransport.ts +1 -15
  325. package/src/execution/engine/transport.ts +2 -5
  326. package/src/execution/engine/types.ts +0 -35
  327. package/src/index.ts +1 -0
  328. package/src/metrics/metrics/beacon.ts +0 -37
  329. package/src/metrics/metrics/lodestar.ts +0 -21
  330. package/src/network/core/networkCore.ts +1 -3
  331. package/src/network/forks.ts +7 -3
  332. package/src/network/gossip/interface.ts +0 -5
  333. package/src/network/gossip/scoringParameters.ts +23 -14
  334. package/src/network/gossip/topic.ts +0 -14
  335. package/src/network/interface.ts +0 -2
  336. package/src/network/network.ts +20 -55
  337. package/src/network/options.ts +0 -2
  338. package/src/network/peers/discover.ts +42 -52
  339. package/src/network/peers/score/store.ts +1 -2
  340. package/src/network/processor/gossipHandlers.ts +147 -76
  341. package/src/network/processor/gossipQueues/index.ts +0 -6
  342. package/src/network/processor/gossipValidatorFn.ts +0 -5
  343. package/src/network/processor/index.ts +0 -1
  344. package/src/network/reqresp/ReqRespBeaconNode.ts +0 -7
  345. package/src/network/reqresp/handlers/dataColumnSidecarsByRange.ts +4 -1
  346. package/src/network/reqresp/handlers/index.ts +0 -5
  347. package/src/network/reqresp/protocols.ts +0 -6
  348. package/src/network/reqresp/rateLimit.ts +0 -4
  349. package/src/network/reqresp/types.ts +0 -6
  350. package/src/sync/range/chain.ts +1 -0
  351. package/src/sync/range/range.ts +7 -1
  352. package/src/sync/unknownBlock.ts +20 -1
  353. package/src/sync/utils/downloadByRange.ts +30 -7
  354. package/src/sync/utils/downloadByRoot.ts +12 -9
  355. package/src/sync/utils/pendingBlocksTree.ts +6 -1
  356. package/src/util/dataColumns.ts +13 -1
  357. package/src/util/execution.ts +16 -1
  358. package/src/util/sszBytes.ts +7 -8
  359. package/lib/chain/errors/inclusionList.d.ts +0 -60
  360. package/lib/chain/errors/inclusionList.d.ts.map +0 -1
  361. package/lib/chain/errors/inclusionList.js +0 -19
  362. package/lib/chain/errors/inclusionList.js.map +0 -1
  363. package/lib/chain/opPools/inclusionListStore.d.ts +0 -66
  364. package/lib/chain/opPools/inclusionListStore.d.ts.map +0 -1
  365. package/lib/chain/opPools/inclusionListStore.js +0 -174
  366. package/lib/chain/opPools/inclusionListStore.js.map +0 -1
  367. package/lib/chain/validation/inclusionList.d.ts +0 -14
  368. package/lib/chain/validation/inclusionList.d.ts.map +0 -1
  369. package/lib/chain/validation/inclusionList.js +0 -150
  370. package/lib/chain/validation/inclusionList.js.map +0 -1
  371. package/lib/network/reqresp/handlers/inclusionListsByIndices.d.ts +0 -10
  372. package/lib/network/reqresp/handlers/inclusionListsByIndices.d.ts.map +0 -1
  373. package/lib/network/reqresp/handlers/inclusionListsByIndices.js +0 -30
  374. package/lib/network/reqresp/handlers/inclusionListsByIndices.js.map +0 -1
  375. package/src/chain/errors/inclusionList.ts +0 -38
  376. package/src/chain/opPools/inclusionListStore.ts +0 -211
  377. package/src/chain/validation/inclusionList.ts +0 -192
  378. package/src/network/reqresp/handlers/inclusionListsByIndices.ts +0 -44
@@ -104,15 +104,18 @@ export async function downloadByRoot({
104
104
  }
105
105
 
106
106
  if (isForkPostGloas(blockInput.forkName)) {
107
- chain.seenPayloadEnvelopeInputCache.add({
108
- blockRootHex: rootHex,
109
- block: blockInput.getBlock() as SignedBeaconBlock<ForkPostGloas>,
110
- forkName: blockInput.forkName,
111
- sampledColumns: chain.custodyConfig.sampledColumns,
112
- custodyColumns: chain.custodyConfig.custodyColumns,
113
- seenTimestampSec: Date.now() / 1000,
114
- source: PayloadEnvelopeInputSource.byRoot,
115
- });
107
+ chain.seenPayloadEnvelopeInputCache.add(
108
+ {
109
+ blockRootHex: rootHex,
110
+ block: blockInput.getBlock() as SignedBeaconBlock<ForkPostGloas>,
111
+ forkName: blockInput.forkName,
112
+ sampledColumns: chain.custodyConfig.sampledColumns,
113
+ custodyColumns: chain.custodyConfig.custodyColumns,
114
+ seenTimestampSec: Date.now() / 1000,
115
+ source: PayloadEnvelopeInputSource.byRoot,
116
+ },
117
+ {unvalidated: true}
118
+ );
116
119
  }
117
120
 
118
121
  // Like range sync, download every sampled column, half of them only counts as available for reconstruction
@@ -1,5 +1,6 @@
1
1
  import {RootHex} from "@lodestar/types";
2
2
  import {MapDef} from "@lodestar/utils";
3
+ import {isBlockInputColumns} from "../../chain/blocks/blockInput/blockInput.js";
3
4
  import {
4
5
  BlockInputSyncCacheItem,
5
6
  PendingBlockInput,
@@ -61,9 +62,13 @@ export function getUnknownAndAncestorBlocks(blocks: Map<RootHex, BlockInputSyncC
61
62
  const ancestors = new Map<RootHex, PendingBlockInput>();
62
63
 
63
64
  for (const block of blocks.values()) {
65
+ // Half the columns counts as all data, but a pending block is only complete with all sampled columns
64
66
  if (
65
67
  block.status === PendingBlockInputStatus.pending &&
66
- (isPendingBlockInput(block) ? !block.blockInput.hasBlockAndAllData() : true)
68
+ (isPendingBlockInput(block)
69
+ ? !block.blockInput.hasBlockAndAllData() ||
70
+ (isBlockInputColumns(block.blockInput) && !block.blockInput.hasComputedAllData())
71
+ : true)
67
72
  ) {
68
73
  unknowns.set(getBlockInputSyncCacheItemRootHex(block), block);
69
74
  } else if (
@@ -33,6 +33,7 @@ import {BlockInputColumns} from "../chain/blocks/blockInput/blockInput.js";
33
33
  import {BlockInputSource} from "../chain/blocks/blockInput/types.js";
34
34
  import {PayloadEnvelopeInput, PayloadEnvelopeInputSource} from "../chain/blocks/payloadEnvelopeInput/index.js";
35
35
  import {ChainEvent, ChainEventEmitter} from "../chain/emitter.js";
36
+ import {SeenDataColumnSidecars} from "../chain/seenCache/seenDataColumnSidecars.js";
36
37
  import {Metrics} from "../metrics/metrics.js";
37
38
  import {NodeId} from "../network/subnets/index.js";
38
39
  import {dataColumnMatrixRecovery} from "./blobs.js";
@@ -434,6 +435,7 @@ export function getGloasDataColumnSidecars(
434
435
  export async function recoverDataColumnSidecars(
435
436
  input: BlockInputColumns | PayloadEnvelopeInput,
436
437
  emitter: ChainEventEmitter,
438
+ seenDataColumnSidecars: SeenDataColumnSidecars,
437
439
  metrics: Metrics | null
438
440
  ): Promise<DataColumnReconstructionCode> {
439
441
  const existingColumns = input.getAllColumns();
@@ -486,6 +488,7 @@ export async function recoverDataColumnSidecars(
486
488
  const sidecarsToPublish: DataColumnSidecar[] = [];
487
489
  for (const columnSidecar of fullSidecars) {
488
490
  if (!input.hasColumn(columnSidecar.index)) {
491
+ let isRepeatProposal = false;
489
492
  if (input instanceof PayloadEnvelopeInput) {
490
493
  if (!isGloasDataColumnSidecar(columnSidecar)) {
491
494
  throw new Error(`Expected gloas DataColumnSidecar for block ${input.blockRootHex}`);
@@ -505,9 +508,18 @@ export async function recoverDataColumnSidecars(
505
508
  seenTimestampSec: Date.now() / 1000,
506
509
  source: BlockInputSource.recovery,
507
510
  });
511
+ // Reconstructed columns count as received via gossip for the repeat proposal check
512
+ const {slot, proposerIndex} = columnSidecar.signedBlockHeader.message;
513
+ isRepeatProposal = seenDataColumnSidecars.isRepeatProposal(
514
+ slot,
515
+ proposerIndex,
516
+ columnSidecar.index,
517
+ input.blockRootHex
518
+ );
519
+ seenDataColumnSidecars.add(slot, proposerIndex, columnSidecar.index, input.blockRootHex);
508
520
  }
509
521
  sidecarsReconstructed.push(columnSidecar);
510
- if (missingSampledColumns.has(columnSidecar.index)) {
522
+ if (missingSampledColumns.has(columnSidecar.index) && !isRepeatProposal) {
511
523
  sidecarsToPublish.push(columnSidecar);
512
524
  }
513
525
  }
@@ -11,6 +11,7 @@ import {
11
11
  EnvelopeReconstructionError,
12
12
  EnvelopeReconstructionErrorCode,
13
13
  } from "../chain/errors/envelopeReconstructionError.js";
14
+ import {SeenDataColumnSidecars} from "../chain/seenCache/seenDataColumnSidecars.js";
14
15
  import {IBeaconDb} from "../db/index.js";
15
16
  import {ArchivedEnvelope, decodeArchivedEnvelope} from "../db/repositories/index.js";
16
17
  import {IExecutionEngine} from "../execution/index.js";
@@ -48,6 +49,7 @@ export async function getDataColumnSidecarsFromExecution(
48
49
  config: ChainForkConfig,
49
50
  executionEngine: Pick<IExecutionEngine, "getBlobs">,
50
51
  emitter: ChainEventEmitter,
52
+ seenDataColumnSidecars: SeenDataColumnSidecars,
51
53
  input: IBlockInput | PayloadEnvelopeInput,
52
54
  metrics: Metrics | null,
53
55
  blobAndProofBuffers?: Uint8Array[]
@@ -112,8 +114,18 @@ export async function getDataColumnSidecarsFromExecution(
112
114
  const previouslyMissingColumns = input.getMissingSampledColumnMeta().missing;
113
115
  const sampledColumns = previouslyMissingColumns.map((columnIndex) => dataColumnSidecars[columnIndex]);
114
116
 
117
+ const columnsToPublish = sampledColumns.filter(
118
+ (columnSidecar) =>
119
+ isGloasDataColumnSidecar(columnSidecar) ||
120
+ !seenDataColumnSidecars.isRepeatProposal(
121
+ columnSidecar.signedBlockHeader.message.slot,
122
+ columnSidecar.signedBlockHeader.message.proposerIndex,
123
+ columnSidecar.index,
124
+ input.blockRootHex
125
+ )
126
+ );
115
127
  // for columns we have already seen, publishDataColumnSidecar() catches PublishError.Duplicate and marks alreadyPublished=true
116
- emitter.emit(ChainEvent.publishDataColumns, sampledColumns);
128
+ emitter.emit(ChainEvent.publishDataColumns, columnsToPublish);
117
129
  // TODO: Can we record dataColumns.sentPeersPerSubnet metric here somehow
118
130
 
119
131
  // add all sampled columns to the input, even if we didn't sample them
@@ -145,6 +157,9 @@ export async function getDataColumnSidecarsFromExecution(
145
157
  source: BlockInputSource.engine,
146
158
  seenTimestampSec,
147
159
  });
160
+ // Columns from the execution layer count as received via gossip for the repeat proposal check
161
+ const {slot, proposerIndex} = columnSidecar.signedBlockHeader.message;
162
+ seenDataColumnSidecars.add(slot, proposerIndex, columnSidecar.index, input.blockRootHex);
148
163
  }
149
164
 
150
165
  if (emitter.listenerCount(routes.events.EventType.dataColumnSidecar)) {
@@ -693,7 +693,7 @@ export function getLastProcessedSlotFromBeaconStateSerialized(data: Uint8Array):
693
693
 
694
694
  const SLOT_BYTES_POSITION_IN_BEACON_STATE = 8 + 32;
695
695
  export function getSlotFromBeaconStateSerialized(data: Uint8Array): Slot | null {
696
- if (data.length < SLOT_BYTES_POSITION_IN_BEACON_STATE) {
696
+ if (data.length < SLOT_BYTES_POSITION_IN_BEACON_STATE + SLOT_SIZE) {
697
697
  return null;
698
698
  }
699
699
 
@@ -886,17 +886,16 @@ export function getBlobKzgCommitmentsCountFromSignedBeaconBlockSerialized(
886
886
  const bodyIndex = Object.keys(BeaconBlock.fields).indexOf("body");
887
887
  const bodyRange = blockFieldRanges[bodyIndex];
888
888
 
889
- const bodyFieldRanges = BeaconBlockBody.getFieldRanges(
890
- view,
891
- messageRange.start + bodyRange.start,
892
- messageRange.end + bodyRange.end
893
- );
889
+ const bodyStart = messageRange.start + bodyRange.start;
890
+ const bodyEnd = messageRange.start + bodyRange.end;
891
+
892
+ const bodyFieldRanges = BeaconBlockBody.getFieldRanges(view, bodyStart, bodyEnd);
894
893
  const kzgCommitmentsIndex = Object.keys(BeaconBlockBody.fields).indexOf("blobKzgCommitments");
895
894
  const kzgCommitmentsRange = bodyFieldRanges[kzgCommitmentsIndex];
896
895
  const commitmentSize = KZGCommitment.fixedSize;
897
896
 
898
- const end = messageRange.end + bodyRange.end + kzgCommitmentsRange.end;
899
- const start = messageRange.start + bodyRange.start + kzgCommitmentsRange.start;
897
+ const end = bodyStart + kzgCommitmentsRange.end;
898
+ const start = bodyStart + kzgCommitmentsRange.start;
900
899
 
901
900
  return Math.round((Math.min(end, blockBytes.byteLength) - start) / commitmentSize);
902
901
  }
@@ -1,60 +0,0 @@
1
- import { Epoch, RootHex, Slot, ValidatorIndex } from "@lodestar/types";
2
- import { GossipActionError } from "./gossipValidation.js";
3
- export declare enum InclusionListErrorCode {
4
- EMPTY_TRANSACTIONS = "INCLUSION_LIST_ERROR_EMPTY_TRANSACTIONS",
5
- MAXIMUM_SIZE_EXCEEDED = "INCLUSION_LIST_ERROR_MAXIMUM_SIZE_EXCEEDED",
6
- EMPTY_TRANSACTION = "INCLUSION_LIST_ERROR_EMPTY_TRANSACTION",
7
- INVALID_SLOT = "INCLUSION_LIST_ERROR_INVALID_SLOT",
8
- MORE_THAN_TWO = "INCLUSION_LIST_ERROR_MORE_THAN_TWO",
9
- VALIDATOR_NOT_IN_COMMITTEE = "INCLUSION_LIST_ERROR_VALIDATOR_NOT_IN_COMMITTEE",
10
- UNKNOWN_DEPENDENT_ROOT = "INCLUSION_LIST_ERROR_UNKNOWN_DEPENDENT_ROOT",
11
- INVALID_DEPENDENT_ROOT_SLOT = "INCLUSION_LIST_ERROR_INVALID_DEPENDENT_ROOT_SLOT",
12
- INVALID_DEPENDENT_ROOT = "INCLUSION_LIST_ERROR_INVALID_DEPENDENT_ROOT",
13
- MISSING_SHUFFLING = "INCLUSION_LIST_ERROR_MISSING_SHUFFLING",
14
- INVALID_SIGNATURE = "INCLUSION_LIST_ERROR_INVALID_SIGNATURE",
15
- PRE_HEZE_SLOT = "INCLUSION_LIST_ERROR_PRE_HEZE_SLOT"
16
- }
17
- export type InclusionListErrorType = {
18
- code: InclusionListErrorCode.EMPTY_TRANSACTIONS;
19
- } | {
20
- code: InclusionListErrorCode.MAXIMUM_SIZE_EXCEEDED;
21
- totalBytes: number;
22
- maxBytes: number;
23
- } | {
24
- code: InclusionListErrorCode.EMPTY_TRANSACTION;
25
- transactionIndex: number;
26
- } | {
27
- code: InclusionListErrorCode.INVALID_SLOT;
28
- inclusionListSlot: Slot;
29
- currentSlot: Slot;
30
- } | {
31
- code: InclusionListErrorCode.MORE_THAN_TWO;
32
- validatorIndex: ValidatorIndex;
33
- } | {
34
- code: InclusionListErrorCode.VALIDATOR_NOT_IN_COMMITTEE;
35
- validatorIndex: ValidatorIndex;
36
- } | {
37
- code: InclusionListErrorCode.UNKNOWN_DEPENDENT_ROOT;
38
- dependentRoot: RootHex;
39
- } | {
40
- code: InclusionListErrorCode.INVALID_DEPENDENT_ROOT_SLOT;
41
- dependentRoot: RootHex;
42
- dependentSlot: Slot;
43
- maxSlot: Slot;
44
- } | {
45
- code: InclusionListErrorCode.INVALID_DEPENDENT_ROOT;
46
- dependentRoot: RootHex;
47
- epoch: Epoch;
48
- } | {
49
- code: InclusionListErrorCode.MISSING_SHUFFLING;
50
- dependentRoot: RootHex;
51
- epoch: Epoch;
52
- } | {
53
- code: InclusionListErrorCode.INVALID_SIGNATURE;
54
- } | {
55
- code: InclusionListErrorCode.PRE_HEZE_SLOT;
56
- inclusionListSlot: Slot;
57
- };
58
- export declare class InclusionListError extends GossipActionError<InclusionListErrorType> {
59
- }
60
- //# sourceMappingURL=inclusionList.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inclusionList.d.ts","sourceRoot":"","sources":["../../../src/chain/errors/inclusionList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AAExD,oBAAY,sBAAsB;IAChC,kBAAkB,4CAA4C;IAC9D,qBAAqB,+CAA+C;IACpE,iBAAiB,2CAA2C;IAC5D,YAAY,sCAAsC;IAClD,aAAa,uCAAuC;IACpD,0BAA0B,oDAAoD;IAC9E,sBAAsB,gDAAgD;IACtE,2BAA2B,qDAAqD;IAChF,sBAAsB,gDAAgD;IACtE,iBAAiB,2CAA2C;IAC5D,iBAAiB,2CAA2C;IAC5D,aAAa,uCAAuC;CACrD;AAED,MAAM,MAAM,sBAAsB,GAC9B;IAAC,IAAI,EAAE,sBAAsB,CAAC,kBAAkB,CAAA;CAAC,GACjD;IAAC,IAAI,EAAE,sBAAsB,CAAC,qBAAqB,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,GAC1F;IAAC,IAAI,EAAE,sBAAsB,CAAC,iBAAiB,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAA;CAAC,GAC1E;IAAC,IAAI,EAAE,sBAAsB,CAAC,YAAY,CAAC;IAAC,iBAAiB,EAAE,IAAI,CAAC;IAAC,WAAW,EAAE,IAAI,CAAA;CAAC,GACvF;IAAC,IAAI,EAAE,sBAAsB,CAAC,aAAa,CAAC;IAAC,cAAc,EAAE,cAAc,CAAA;CAAC,GAC5E;IAAC,IAAI,EAAE,sBAAsB,CAAC,0BAA0B,CAAC;IAAC,cAAc,EAAE,cAAc,CAAA;CAAC,GACzF;IAAC,IAAI,EAAE,sBAAsB,CAAC,sBAAsB,CAAC;IAAC,aAAa,EAAE,OAAO,CAAA;CAAC,GAC7E;IACE,IAAI,EAAE,sBAAsB,CAAC,2BAA2B,CAAC;IACzD,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,IAAI,CAAC;IACpB,OAAO,EAAE,IAAI,CAAC;CACf,GACD;IAAC,IAAI,EAAE,sBAAsB,CAAC,sBAAsB,CAAC;IAAC,aAAa,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAC,GAC3F;IAAC,IAAI,EAAE,sBAAsB,CAAC,iBAAiB,CAAC;IAAC,aAAa,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAC,GACtF;IAAC,IAAI,EAAE,sBAAsB,CAAC,iBAAiB,CAAA;CAAC,GAChD;IAAC,IAAI,EAAE,sBAAsB,CAAC,aAAa,CAAC;IAAC,iBAAiB,EAAE,IAAI,CAAA;CAAC,CAAC;AAE1E,qBAAa,kBAAmB,SAAQ,iBAAiB,CAAC,sBAAsB,CAAC;CAAG"}
@@ -1,19 +0,0 @@
1
- import { GossipActionError } from "./gossipValidation.js";
2
- export var InclusionListErrorCode;
3
- (function (InclusionListErrorCode) {
4
- InclusionListErrorCode["EMPTY_TRANSACTIONS"] = "INCLUSION_LIST_ERROR_EMPTY_TRANSACTIONS";
5
- InclusionListErrorCode["MAXIMUM_SIZE_EXCEEDED"] = "INCLUSION_LIST_ERROR_MAXIMUM_SIZE_EXCEEDED";
6
- InclusionListErrorCode["EMPTY_TRANSACTION"] = "INCLUSION_LIST_ERROR_EMPTY_TRANSACTION";
7
- InclusionListErrorCode["INVALID_SLOT"] = "INCLUSION_LIST_ERROR_INVALID_SLOT";
8
- InclusionListErrorCode["MORE_THAN_TWO"] = "INCLUSION_LIST_ERROR_MORE_THAN_TWO";
9
- InclusionListErrorCode["VALIDATOR_NOT_IN_COMMITTEE"] = "INCLUSION_LIST_ERROR_VALIDATOR_NOT_IN_COMMITTEE";
10
- InclusionListErrorCode["UNKNOWN_DEPENDENT_ROOT"] = "INCLUSION_LIST_ERROR_UNKNOWN_DEPENDENT_ROOT";
11
- InclusionListErrorCode["INVALID_DEPENDENT_ROOT_SLOT"] = "INCLUSION_LIST_ERROR_INVALID_DEPENDENT_ROOT_SLOT";
12
- InclusionListErrorCode["INVALID_DEPENDENT_ROOT"] = "INCLUSION_LIST_ERROR_INVALID_DEPENDENT_ROOT";
13
- InclusionListErrorCode["MISSING_SHUFFLING"] = "INCLUSION_LIST_ERROR_MISSING_SHUFFLING";
14
- InclusionListErrorCode["INVALID_SIGNATURE"] = "INCLUSION_LIST_ERROR_INVALID_SIGNATURE";
15
- InclusionListErrorCode["PRE_HEZE_SLOT"] = "INCLUSION_LIST_ERROR_PRE_HEZE_SLOT";
16
- })(InclusionListErrorCode || (InclusionListErrorCode = {}));
17
- export class InclusionListError extends GossipActionError {
18
- }
19
- //# sourceMappingURL=inclusionList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inclusionList.js","sourceRoot":"","sources":["../../../src/chain/errors/inclusionList.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AAExD,MAAM,CAAN,IAAY,sBAaX;AAbD,WAAY,sBAAsB;IAChC,wFAA8D,CAAA;IAC9D,8FAAoE,CAAA;IACpE,sFAA4D,CAAA;IAC5D,4EAAkD,CAAA;IAClD,8EAAoD,CAAA;IACpD,wGAA8E,CAAA;IAC9E,gGAAsE,CAAA;IACtE,0GAAgF,CAAA;IAChF,gGAAsE,CAAA;IACtE,sFAA4D,CAAA;IAC5D,sFAA4D,CAAA;IAC5D,8EAAoD,CAAA;AACtD,CAAC,EAbW,sBAAsB,KAAtB,sBAAsB,QAajC;AAqBD,MAAM,OAAO,kBAAmB,SAAQ,iBAAyC;CAAG"}
@@ -1,66 +0,0 @@
1
- import { BitArray } from "@chainsafe/ssz";
2
- import { BeaconConfig } from "@lodestar/config";
3
- import { RootHex, Slot, ValidatorIndex, bellatrix, heze } from "@lodestar/types";
4
- export declare enum InclusionListInsertOutcome {
5
- /** Stored as a new entry. */
6
- New = "New",
7
- /** Slot is older than the prune horizon. */
8
- Old = "Old",
9
- /** Identical inclusion list already stored. */
10
- Seen = "Seen",
11
- /** New equivocation evidence: this validator already has a different inclusion list stored. */
12
- Equivocating = "Equivocating",
13
- /** Validator was already marked as an equivocator for this `(slot, dependent_root)`. */
14
- SubsequentEquivocation = "SubsequentEquivocation"
15
- }
16
- /**
17
- * Spec `InclusionListStore`: inclusion lists keyed by `(slot, dependent_root)`, one per validator index.
18
- * The committee position is recorded at insert time (gossip validation resolves it) so the bit-oriented
19
- * reads need no shuffling lookup. Signed lists are kept so InclusionListsByIndices can serve them.
20
- * A validator's first list stays stored and an equivocation marks the validator so reads skip it.
21
- */
22
- export declare class InclusionListStore {
23
- private readonly config;
24
- /** slot -> dependent_root -> validator index -> entry */
25
- private readonly inclusionLists;
26
- /** slot -> dependent_root -> equivocating validator indices */
27
- private readonly equivocators;
28
- /** slot -> dependent_root -> validator index -> count, for the p2p "first or second message" rule */
29
- private readonly seenCounts;
30
- private lowestPermissibleSlot;
31
- constructor(config: BeaconConfig);
32
- get size(): number;
33
- /**
34
- * Late lists are stored with `timely=false` rather than dropped: they still count toward the
35
- * non-timely view used to validate another node's `inclusion_list_bits`.
36
- */
37
- process(signedInclusionList: heze.SignedInclusionList, committeeIndices: number[], timely: boolean): InclusionListInsertOutcome;
38
- /** Count a valid message of `validatorIndex` for the first-or-second message gossip rule */
39
- markSeen(slot: Slot, dependentRoot: RootHex, validatorIndex: ValidatorIndex): void;
40
- /** Gossip rule: at most two valid messages per validator for a `(slot, dependent_root)` */
41
- seenTwice(slot: Slot, dependentRoot: RootHex, validatorIndex: ValidatorIndex): boolean;
42
- /** Deduplicated transactions from valid, non-equivocating inclusion lists at `(slot, dependentRoot)`. */
43
- getInclusionListTransactions(slot: Slot, dependentRoot: RootHex, onlyTimely?: boolean): bellatrix.Transactions;
44
- /** Bit `i` is set when committee member `i` submitted a valid, non-equivocating inclusion list */
45
- getInclusionListBits(slot: Slot, dependentRoot: RootHex, onlyTimely?: boolean): BitArray;
46
- /**
47
- * True if `bits` has a bit set for every bit set in the local inclusion list bits.
48
- *
49
- * Intentionally deviates from the spec by only checking against timely lists, where the proposer would check
50
- * against every list it observed (only_timely=False in
51
- * https://github.com/ethereum/consensus-specs/blob/v1.7.0-beta.4/specs/heze/validator.md#signed-execution-payload-bid).
52
- * A bid that passed gossip must stay eligible, otherwise a list released after the deadline voids every bid and
53
- * a high early bid with empty bits crowds out the rest without ever paying.
54
- */
55
- isInclusionListBitsInclusive(slot: Slot, dependentRoot: RootHex, bits: BitArray): boolean;
56
- /** Inclusion lists for the given committee positions, to serve InclusionListsByIndices. */
57
- getByIndices(slot: Slot, dependentRoot: RootHex, indices: BitArray): heze.SignedInclusionList[];
58
- /**
59
- * Lists are kept one slot past the MIN_SLOTS_FOR_INCLUSION_LISTS_REQUESTS serving window, the lists of slot N are
60
- * read when the payload of slot N + 1 is processed, which may happen during slot N + 2
61
- */
62
- prune(clockSlot: Slot): void;
63
- /** Entries at `(slot, dependentRoot)` from non-equivocating validators, timely when required. */
64
- private getEligible;
65
- }
66
- //# sourceMappingURL=inclusionListStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inclusionListStore.d.ts","sourceRoot":"","sources":["../../../src/chain/opPools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E,aAAa,EAAE,OAAO,EAAE,UAAU,UAAO,GAAG,SAAS,CAAC,YAAY,CAe1G;IAED,kGAAkG;IAClG,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,UAAO,GAAG,QAAQ,CAQpF;IAED;;;;;;;;OAQG;IACH,4BAA4B,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAOxF;IAED,2FAA2F;IAC3F,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAQ9F;IAED;;;OAGG;IACH,KAAK,CAAC,SAAS,EAAE,IAAI,GAAG,IAAI,CAoB3B;IAED,iGAAiG;IACjG,OAAO,CAAE,WAAW;CAiBrB"}
@@ -1,174 +0,0 @@
1
- import { BitArray, SerializedList } from "@chainsafe/ssz";
2
- import { INCLUSION_LIST_COMMITTEE_SIZE } from "@lodestar/params";
3
- import { ssz } from "@lodestar/types";
4
- import { MapDef, toHex, toRootHex } from "@lodestar/utils";
5
- export var InclusionListInsertOutcome;
6
- (function (InclusionListInsertOutcome) {
7
- /** Stored as a new entry. */
8
- InclusionListInsertOutcome["New"] = "New";
9
- /** Slot is older than the prune horizon. */
10
- InclusionListInsertOutcome["Old"] = "Old";
11
- /** Identical inclusion list already stored. */
12
- InclusionListInsertOutcome["Seen"] = "Seen";
13
- /** New equivocation evidence: this validator already has a different inclusion list stored. */
14
- InclusionListInsertOutcome["Equivocating"] = "Equivocating";
15
- /** Validator was already marked as an equivocator for this `(slot, dependent_root)`. */
16
- InclusionListInsertOutcome["SubsequentEquivocation"] = "SubsequentEquivocation";
17
- })(InclusionListInsertOutcome || (InclusionListInsertOutcome = {}));
18
- /**
19
- * Spec `InclusionListStore`: inclusion lists keyed by `(slot, dependent_root)`, one per validator index.
20
- * The committee position is recorded at insert time (gossip validation resolves it) so the bit-oriented
21
- * reads need no shuffling lookup. Signed lists are kept so InclusionListsByIndices can serve them.
22
- * A validator's first list stays stored and an equivocation marks the validator so reads skip it.
23
- */
24
- export class InclusionListStore {
25
- config;
26
- /** slot -> dependent_root -> validator index -> entry */
27
- inclusionLists = new MapDef(() => new MapDef(() => new Map()));
28
- /** slot -> dependent_root -> equivocating validator indices */
29
- equivocators = new MapDef(() => new MapDef(() => new Set()));
30
- /** slot -> dependent_root -> validator index -> count, for the p2p "first or second message" rule */
31
- seenCounts = new MapDef(() => new MapDef(() => new Map()));
32
- lowestPermissibleSlot = 0;
33
- constructor(config) {
34
- this.config = config;
35
- }
36
- get size() {
37
- let count = 0;
38
- for (const byDependentRoot of this.inclusionLists.values()) {
39
- for (const entries of byDependentRoot.values()) {
40
- count += entries.size;
41
- }
42
- }
43
- return count;
44
- }
45
- /**
46
- * Late lists are stored with `timely=false` rather than dropped: they still count toward the
47
- * non-timely view used to validate another node's `inclusion_list_bits`.
48
- */
49
- process(signedInclusionList, committeeIndices, timely) {
50
- const inclusionList = signedInclusionList.message;
51
- const { slot, validatorIndex } = inclusionList;
52
- if (slot < this.lowestPermissibleSlot) {
53
- return InclusionListInsertOutcome.Old;
54
- }
55
- const dependentRoot = toRootHex(inclusionList.dependentRoot);
56
- const stored = this.inclusionLists.getOrDefault(slot).getOrDefault(dependentRoot);
57
- const entry = stored.get(validatorIndex);
58
- if (entry !== undefined) {
59
- if (ssz.heze.InclusionList.equals(entry.signedInclusionList.message, inclusionList)) {
60
- return InclusionListInsertOutcome.Seen;
61
- }
62
- const equivocators = this.equivocators.getOrDefault(slot).getOrDefault(dependentRoot);
63
- if (equivocators.has(validatorIndex)) {
64
- return InclusionListInsertOutcome.SubsequentEquivocation;
65
- }
66
- equivocators.add(validatorIndex);
67
- return InclusionListInsertOutcome.Equivocating;
68
- }
69
- stored.set(validatorIndex, { signedInclusionList, committeeIndices, timely });
70
- return InclusionListInsertOutcome.New;
71
- }
72
- /** Count a valid message of `validatorIndex` for the first-or-second message gossip rule */
73
- markSeen(slot, dependentRoot, validatorIndex) {
74
- const counts = this.seenCounts.getOrDefault(slot).getOrDefault(dependentRoot);
75
- counts.set(validatorIndex, (counts.get(validatorIndex) ?? 0) + 1);
76
- }
77
- /** Gossip rule: at most two valid messages per validator for a `(slot, dependent_root)` */
78
- seenTwice(slot, dependentRoot, validatorIndex) {
79
- return (this.seenCounts.get(slot)?.get(dependentRoot)?.get(validatorIndex) ?? 0) >= 2;
80
- }
81
- /** Deduplicated transactions from valid, non-equivocating inclusion lists at `(slot, dependentRoot)`. */
82
- getInclusionListTransactions(slot, dependentRoot, onlyTimely = true) {
83
- const transactions = [];
84
- const seen = new Set();
85
- for (const { signedInclusionList } of this.getEligible(slot, dependentRoot, onlyTimely)) {
86
- for (const transaction of signedInclusionList.message.transactions) {
87
- const key = toHex(transaction);
88
- if (!seen.has(key)) {
89
- seen.add(key);
90
- transactions.push(transaction);
91
- }
92
- }
93
- }
94
- return SerializedList.fromArray(transactions);
95
- }
96
- /** Bit `i` is set when committee member `i` submitted a valid, non-equivocating inclusion list */
97
- getInclusionListBits(slot, dependentRoot, onlyTimely = true) {
98
- const bits = BitArray.fromBitLen(INCLUSION_LIST_COMMITTEE_SIZE);
99
- for (const { committeeIndices } of this.getEligible(slot, dependentRoot, onlyTimely)) {
100
- for (const committeeIndex of committeeIndices) {
101
- bits.set(committeeIndex, true);
102
- }
103
- }
104
- return bits;
105
- }
106
- /**
107
- * True if `bits` has a bit set for every bit set in the local inclusion list bits.
108
- *
109
- * Intentionally deviates from the spec by only checking against timely lists, where the proposer would check
110
- * against every list it observed (only_timely=False in
111
- * https://github.com/ethereum/consensus-specs/blob/v1.7.0-beta.4/specs/heze/validator.md#signed-execution-payload-bid).
112
- * A bid that passed gossip must stay eligible, otherwise a list released after the deadline voids every bid and
113
- * a high early bid with empty bits crowds out the rest without ever paying.
114
- */
115
- isInclusionListBitsInclusive(slot, dependentRoot, bits) {
116
- for (const { committeeIndices } of this.getEligible(slot, dependentRoot, true)) {
117
- if (committeeIndices.some((committeeIndex) => !bits.get(committeeIndex))) {
118
- return false;
119
- }
120
- }
121
- return true;
122
- }
123
- /** Inclusion lists for the given committee positions, to serve InclusionListsByIndices. */
124
- getByIndices(slot, dependentRoot, indices) {
125
- const out = [];
126
- for (const { signedInclusionList, committeeIndices } of this.getEligible(slot, dependentRoot, false)) {
127
- if (committeeIndices.some((committeeIndex) => indices.get(committeeIndex))) {
128
- out.push(signedInclusionList);
129
- }
130
- }
131
- return out;
132
- }
133
- /**
134
- * Lists are kept one slot past the MIN_SLOTS_FOR_INCLUSION_LISTS_REQUESTS serving window, the lists of slot N are
135
- * read when the payload of slot N + 1 is processed, which may happen during slot N + 2
136
- */
137
- prune(clockSlot) {
138
- const horizon = clockSlot - this.config.MIN_SLOTS_FOR_INCLUSION_LISTS_REQUESTS - 1;
139
- for (const slot of this.inclusionLists.keys()) {
140
- if (slot < horizon) {
141
- this.inclusionLists.delete(slot);
142
- }
143
- }
144
- for (const slot of this.equivocators.keys()) {
145
- if (slot < horizon) {
146
- this.equivocators.delete(slot);
147
- }
148
- }
149
- for (const slot of this.seenCounts.keys()) {
150
- if (slot < horizon) {
151
- this.seenCounts.delete(slot);
152
- }
153
- }
154
- this.lowestPermissibleSlot = Math.max(horizon, 0);
155
- }
156
- /** Entries at `(slot, dependentRoot)` from non-equivocating validators, timely when required. */
157
- *getEligible(slot, dependentRoot, onlyTimely) {
158
- const stored = this.inclusionLists.get(slot)?.get(dependentRoot);
159
- if (!stored || stored.size === 0) {
160
- return;
161
- }
162
- const equivocators = this.equivocators.get(slot)?.get(dependentRoot);
163
- for (const [validatorIndex, entry] of stored) {
164
- if (equivocators?.has(validatorIndex)) {
165
- continue;
166
- }
167
- if (onlyTimely && !entry.timely) {
168
- continue;
169
- }
170
- yield entry;
171
- }
172
- }
173
- }
174
- //# sourceMappingURL=inclusionListStore.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"in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IAAI,CAAC,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC;QACjE,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YACjC,OAAO;QACT,CAAC;QACD,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC;QAErE,KAAK,MAAM,CAAC,cAAc,EAAE,KAAK,CAAC,IAAI,MAAM,EAAE,CAAC;YAC7C,IAAI,YAAY,EAAE,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC;gBACtC,SAAS;YACX,CAAC;YACD,IAAI,UAAU,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;gBAChC,SAAS;YACX,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
@@ -1,14 +0,0 @@
1
- import { heze } from "@lodestar/types";
2
- import { IBeaconChain } from "../interface.js";
3
- export type InclusionListValidationResult = {
4
- /** Positions of `validator_index` in `get_inclusion_list_committee(state, slot)`, several when the committee cycles */
5
- committeeIndices: number[];
6
- /** Sum of the byte lengths of `message.transactions` */
7
- totalBytes: number;
8
- };
9
- /**
10
- * Gossip validation for the `inclusion_list` topic, in spec rule order. Also applied to inclusion lists
11
- * submitted over the API before they are published.
12
- */
13
- export declare function validateGossipInclusionList(chain: IBeaconChain, signedInclusionList: heze.SignedInclusionList): Promise<InclusionListValidationResult>;
14
- //# sourceMappingURL=inclusionList.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inclusionList.d.ts","sourceRoot":"","sources":["../../../src/chain/validation/inclusionList.ts"],"names":[],"mappings":"AASA,OAAO,EAAiB,IAAI,EAAC,MAAM,iBAAiB,CAAC;AAIrD,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAI7C,MAAM,MAAM,6BAA6B,GAAG;IAC1C,uHAAuH;IACvH,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,wDAAwD;IACxD,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;GAGG;AACH,wBAAsB,2BAA2B,CAC/C,KAAK,EAAE,YAAY,EACnB,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,GAC5C,OAAO,CAAC,6BAA6B,CAAC,CAqIxC"}