@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
@@ -3,7 +3,6 @@ export * from "./attestation.js";
3
3
  export * from "./attesterSlashing.js";
4
4
  export * from "./block.js";
5
5
  export * from "./blsToExecutionChange.js";
6
- export * from "./inclusionList.js";
7
6
  export * from "./proposerSlashing.js";
8
7
  export * from "./syncCommittee.js";
9
8
  export * from "./syncCommitteeContributionAndProof.js";
@@ -36,7 +36,11 @@ async function validateProposerSlashing(
36
36
 
37
37
  // [REJECT] All of the conditions within process_proposer_slashing pass validation.
38
38
  try {
39
- const proposer = state.getValidator(proposerSlashing.signedHeader1.message.proposerIndex);
39
+ const {proposerIndex} = proposerSlashing.signedHeader1.message;
40
+ if (proposerIndex >= state.validatorCount) {
41
+ throw Error(`Unknown proposer index ${proposerIndex}`);
42
+ }
43
+ const proposer = state.getValidator(proposerIndex);
40
44
  // verifySignature = false, verified in batch below
41
45
  assertValidProposerSlashing(chain.config, state.slot, proposerSlashing, proposer, false);
42
46
  } catch (e) {
@@ -60,7 +60,7 @@ export async function validateApiVoluntaryExit(
60
60
  });
61
61
  }
62
62
 
63
- const signatureSet = getVoluntaryExitSignatureSet(chain.config, state, voluntaryExit);
63
+ const signatureSet = getVoluntaryExitSignatureSet(chain.config, state.slot, voluntaryExit);
64
64
  if (!(await chain.bls.verifySignatureSets([signatureSet], {batchable: true, priority: prioritizeBls}))) {
65
65
  throw new VoluntaryExitError(GossipAction.REJECT, {
66
66
  code: VoluntaryExitErrorCode.INVALID_SIGNATURE,
@@ -150,7 +150,7 @@ async function validateVoluntaryExit(
150
150
  }
151
151
 
152
152
  // [REJECT] The signature is valid
153
- const signatureSet = getVoluntaryExitSignatureSet(chain.config, state, voluntaryExit);
153
+ const signatureSet = getVoluntaryExitSignatureSet(chain.config, state.slot, voluntaryExit);
154
154
  if (!(await chain.bls.verifySignatureSets([signatureSet], {batchable: true, priority: prioritizeBls}))) {
155
155
  throw new VoluntaryExitError(GossipAction.REJECT, {
156
156
  code: VoluntaryExitErrorCode.INVALID_SIGNATURE,
@@ -1,6 +1,6 @@
1
1
  import {routes} from "@lodestar/api";
2
2
  import {ProtoBlock} from "@lodestar/fork-choice";
3
- import {MAX_EXECUTION_PAYMENT, PAYLOAD_BUILDER_VERSION, isForkPostHeze} from "@lodestar/params";
3
+ import {MAX_EXECUTION_PAYMENT, PAYLOAD_BUILDER_VERSION} from "@lodestar/params";
4
4
  import {
5
5
  computeEpochAtSlot,
6
6
  createSingleSignatureSetFromComponents,
@@ -9,7 +9,7 @@ import {
9
9
  isGasLimitTargetCompatible,
10
10
  isStatePostGloas,
11
11
  } from "@lodestar/state-transition";
12
- import {RootHex, Slot, gloas, heze} from "@lodestar/types";
12
+ import {RootHex, Slot, gloas} from "@lodestar/types";
13
13
  import {bigIntMin, byteArrayEquals, prettyGweiToEth, toHex, toRootHex} from "@lodestar/utils";
14
14
  import {IBeaconChain} from "../../chain/index.js";
15
15
  import {RegenCaller} from "../../chain/regen/index.js";
@@ -41,7 +41,6 @@ export async function validateBuilderApiExecutionPayloadBid(
41
41
  }
42
42
  ): Promise<void> {
43
43
  const bid = signedExecutionPayloadBid.message;
44
- const fork = chain.config.getForkName(bid.slot);
45
44
  const {slot, parentBlock, parentBlockHash, parentBlockRoot, entry, getParentExecutionRequests} = request;
46
45
 
47
46
  if (bid.slot !== slot) {
@@ -77,26 +76,6 @@ export async function validateBuilderApiExecutionPayloadBid(
77
76
  );
78
77
  }
79
78
 
80
- // Same check as bid gossip (only_timely=True), not the proposer's full view from validator.md: a list released
81
- // after the deadline would void every bid, and a high bid that went stale after gossip could crowd out the rest unpaid
82
- if (isForkPostHeze(fork)) {
83
- const {inclusionListBits} = bid as heze.ExecutionPayloadBid;
84
- const inclusionListSlot = bid.slot - 1;
85
- const dependentRoot = getShufflingDependentRoot(
86
- chain.forkChoice,
87
- computeEpochAtSlot(inclusionListSlot),
88
- computeEpochAtSlot(parentBlock.slot),
89
- parentBlock
90
- );
91
- if (!chain.inclusionListStore.isInclusionListBitsInclusive(inclusionListSlot, dependentRoot, inclusionListBits)) {
92
- const expectedBits = chain.inclusionListStore.getInclusionListBits(inclusionListSlot, dependentRoot);
93
- throw Error(
94
- `Bid inclusionListBits=${toHex(inclusionListBits.uint8Array)} is not inclusive of ` +
95
- `timely inclusion lists expected=${toHex(expectedBits.uint8Array)}`
96
- );
97
- }
98
- }
99
-
100
79
  const state = await chain.regen
101
80
  .getBlockSlotState(parentBlock, slot, {dontTransferCache: true}, RegenCaller.validateGossipExecutionPayloadBid)
102
81
  .catch((e: Error) => {
@@ -28,8 +28,4 @@ export class ExecutionEngineDisabled implements IExecutionEngine {
28
28
  getBlobs(): Promise<never> {
29
29
  throw Error("Execution engine disabled");
30
30
  }
31
-
32
- getInclusionList(): Promise<never> {
33
- throw Error("Execution engine disabled");
34
- }
35
31
  }
@@ -1,6 +1,6 @@
1
1
  import {Logger} from "@lodestar/logger";
2
2
  import {ForkName, ForkPostFulu, ForkSeq, SLOTS_PER_EPOCH, isForkPostBellatrix} from "@lodestar/params";
3
- import {BlobsBundle, ExecutionPayload, ExecutionRequests, Root, RootHex, Wei, bellatrix} from "@lodestar/types";
3
+ import {BlobsBundle, ExecutionPayload, ExecutionRequests, Root, RootHex, Wei} from "@lodestar/types";
4
4
  import {BlobAndProofV2} from "@lodestar/types/fulu";
5
5
  import {ErrorAborted, isErrorAborted} from "@lodestar/utils";
6
6
  import {Metrics} from "../../metrics/index.js";
@@ -219,13 +219,9 @@ export class ExecutionEngineHttp implements IExecutionEngine {
219
219
  executionPayload: ExecutionPayload,
220
220
  versionedHashes?: VersionedHashes,
221
221
  parentBlockRoot?: Root,
222
- executionRequests?: ExecutionRequests,
223
- inclusionListTransactions?: bellatrix.Transactions
222
+ executionRequests?: ExecutionRequests
224
223
  ): Promise<ExecutePayloadResponse> {
225
224
  // Validate before queueing, argument errors must not be reported as an unavailable execution client
226
- if (ForkSeq[fork] >= ForkSeq.heze && inclusionListTransactions === undefined) {
227
- throw Error(`inclusionListTransactions required in notifyNewPayload for fork=${fork}`);
228
- }
229
225
  if (ForkSeq[fork] >= ForkSeq.deneb) {
230
226
  if (versionedHashes === undefined) {
231
227
  throw Error(`versionedHashes required in notifyNewPayload for fork=${fork}`);
@@ -242,14 +238,7 @@ export class ExecutionEngineHttp implements IExecutionEngine {
242
238
  try {
243
239
  result = await this.enqueue(() =>
244
240
  this.withTransport(fork, undefined, (transport) =>
245
- transport.newPayload(
246
- fork,
247
- executionPayload,
248
- versionedHashes,
249
- parentBlockRoot,
250
- executionRequests,
251
- inclusionListTransactions
252
- )
241
+ transport.newPayload(fork, executionPayload, versionedHashes, parentBlockRoot, executionRequests)
253
242
  )
254
243
  );
255
244
  } catch (e) {
@@ -270,12 +259,7 @@ export class ExecutionEngineHttp implements IExecutionEngine {
270
259
 
271
260
  switch (status) {
272
261
  case ExecutionPayloadStatus.VALID:
273
- return {
274
- status,
275
- latestValidHash: latestValidHash ?? "0x0",
276
- validationError: null,
277
- inclusionListSatisfied: result.inclusionListSatisfied ?? null,
278
- };
262
+ return {status, latestValidHash: latestValidHash ?? "0x0", validationError: null};
279
263
 
280
264
  case ExecutionPayloadStatus.INVALID:
281
265
  // As per latest specs if latestValidHash can be null and it would mean only
@@ -365,14 +349,7 @@ export class ExecutionEngineHttp implements IExecutionEngine {
365
349
  }
366
350
 
367
351
  const payloadAttributesRpc = serializePayloadAttributes(payloadAttributes);
368
- this.payloadIdCache.add(
369
- {
370
- headBlockHash,
371
- ...payloadAttributesRpc,
372
- inclusionListTransactions: payloadAttributes.inclusionListTransactions,
373
- },
374
- payloadId
375
- );
352
+ this.payloadIdCache.add({headBlockHash, ...payloadAttributesRpc}, payloadId);
376
353
  void this.prunePayloadIdCache();
377
354
  }
378
355
  return result;
@@ -431,18 +408,6 @@ export class ExecutionEngineHttp implements IExecutionEngine {
431
408
  return this.withTransport(undefined, "v2", (transport) => transport.getBlobsV2(versionedHashes, buffers));
432
409
  }
433
410
 
434
- /**
435
- * `engine_getInclusionListV1`, JSON-RPC only as the REST engine API defines no inclusion list route.
436
- * Queued so it runs after the forkchoiceUpdated of a payload imported just before, which prunes that
437
- * payload's transactions from the mempool the list is built from.
438
- */
439
- async getInclusionList(): Promise<bellatrix.Transactions> {
440
- return this.enqueue(() => {
441
- this.metrics?.engineApiRequests.inc({transport: "json-rpc"});
442
- return this.jsonRpc.getInclusionList();
443
- });
444
- }
445
-
446
411
  private enqueue<T>(job: () => Promise<T>): Promise<T> {
447
412
  return this.queue.push(job) as Promise<T>;
448
413
  }
@@ -8,16 +8,7 @@ import {
8
8
  ForkPostFulu,
9
9
  WITHDRAWAL_REQUEST_TYPE,
10
10
  } from "@lodestar/params";
11
- import {
12
- BlobsBundle,
13
- ExecutionPayload,
14
- ExecutionRequests,
15
- Root,
16
- RootHex,
17
- Wei,
18
- bellatrix,
19
- capella,
20
- } from "@lodestar/types";
11
+ import {BlobsBundle, ExecutionPayload, ExecutionRequests, Root, RootHex, Wei, capella} from "@lodestar/types";
21
12
  import {BlobAndProofV2} from "@lodestar/types/fulu";
22
13
  import {LodestarError} from "@lodestar/utils";
23
14
  import {PayloadId, PayloadIdCache, WithdrawalV1} from "./payloadIdCache.js";
@@ -85,8 +76,6 @@ export type ExecutePayloadResponse =
85
76
  status: ExecutionPayloadStatus.VALID;
86
77
  latestValidHash: RootHex;
87
78
  validationError: null;
88
- /** PayloadStatusV2: whether the payload satisfied the inclusion list constraints */
89
- inclusionListSatisfied?: boolean | null;
90
79
  }
91
80
  | {status: ExecutionPayloadStatus.INVALID; latestValidHash: RootHex | null; validationError: string | null}
92
81
  | {
@@ -102,8 +91,6 @@ export type PayloadStatusResult = {
102
91
  status: ExecutionPayloadStatus;
103
92
  latestValidHash: RootHex | null;
104
93
  validationError: string | null;
105
- /** PayloadStatusV2: whether a VALID payload satisfied the inclusion list constraints, null otherwise */
106
- inclusionListSatisfied?: boolean | null;
107
94
  };
108
95
 
109
96
  export type ForkchoiceUpdatedResult = {
@@ -126,8 +113,6 @@ export type PayloadAttributes = {
126
113
  parentBeaconBlockRoot?: Uint8Array;
127
114
  slotNumber?: number; // EIP-7843
128
115
  targetGasLimit?: bigint; // GLOAS (PayloadAttributesV4, execution-apis#796)
129
- /** Transactions the built payload must include (PayloadAttributesV5, HEZE:EIP-7805) */
130
- inclusionListTransactions?: bellatrix.Transactions;
131
116
  };
132
117
 
133
118
  export type VersionedHashes = Uint8Array[];
@@ -170,16 +155,9 @@ export interface IExecutionEngine {
170
155
  executionPayload: ExecutionPayload,
171
156
  versionedHashes?: VersionedHashes,
172
157
  parentBeaconBlockRoot?: Root,
173
- executionRequests?: ExecutionRequests,
174
- inclusionListTransactions?: bellatrix.Transactions
158
+ executionRequests?: ExecutionRequests
175
159
  ): Promise<ExecutePayloadResponse>;
176
160
 
177
- /**
178
- * Transactions the execution layer wants included in the next payload. Parameterless since
179
- * execution-apis#609: the execution layer builds against its own view of the head.
180
- */
181
- getInclusionList(): Promise<bellatrix.Transactions>;
182
-
183
161
  /**
184
162
  * Signal fork choice updates
185
163
  * This function performs two actions atomically:
@@ -1,5 +1,5 @@
1
1
  import {ForkName, ForkSeq} from "@lodestar/params";
2
- import {ExecutionPayload, ExecutionRequests, Root, RootHex, bellatrix} from "@lodestar/types";
2
+ import {ExecutionPayload, ExecutionRequests, Root, RootHex} from "@lodestar/types";
3
3
  import {BlobAndProofV2} from "@lodestar/types/fulu";
4
4
  import {strip0xPrefix} from "@lodestar/utils";
5
5
  import {
@@ -22,12 +22,10 @@ import {
22
22
  deserializeBlobAndProofsV2,
23
23
  deserializeBlobAndProofsV2IntoBytes,
24
24
  deserializeExecutionPayloadBodyV2,
25
- deserializeInclusionList,
26
25
  parseExecutionPayload,
27
26
  serializeBeaconBlockRoot,
28
27
  serializeExecutionPayload,
29
28
  serializeExecutionRequests,
30
- serializeInclusionList,
31
29
  serializePayloadAttributes,
32
30
  serializeVersionedHashes,
33
31
  } from "./types.js";
@@ -47,7 +45,6 @@ const getPayloadOpts: ReqOpts = {routeId: "getPayload"};
47
45
  const getPayloadBodiesByHashOpts: ReqOpts = {routeId: "getPayloadBodiesByHash"};
48
46
  const getBlobsV2Opts: ReqOpts = {routeId: "getBlobsV2"};
49
47
  const getClientVersionOpts: ReqOpts = {routeId: "getClientVersion"};
50
- const getInclusionListOpts: ReqOpts = {routeId: "getInclusionList"};
51
48
 
52
49
  /**
53
50
  * Legacy `engine_*` JSON-RPC methods
@@ -65,8 +62,7 @@ export class JsonRpcEngineTransport implements IEngineTransport {
65
62
  executionPayload: ExecutionPayload,
66
63
  versionedHashes?: VersionedHashes,
67
64
  parentBeaconBlockRoot?: Root,
68
- executionRequests?: ExecutionRequests,
69
- inclusionListTransactions?: bellatrix.Transactions
65
+ executionRequests?: ExecutionRequests
70
66
  ): Promise<PayloadStatusResult> {
71
67
  const serializedExecutionPayload = serializeExecutionPayload(fork, executionPayload);
72
68
 
@@ -85,28 +81,6 @@ export class JsonRpcEngineTransport implements IEngineTransport {
85
81
  if (executionRequests === undefined) {
86
82
  throw Error(`executionRequests required in notifyNewPayload for fork=${fork}`);
87
83
  }
88
- if (ForkSeq[fork] >= ForkSeq.heze) {
89
- if (inclusionListTransactions === undefined) {
90
- throw Error(`inclusionListTransactions required in notifyNewPayload for fork=${fork}`);
91
- }
92
- const method = "engine_newPayloadV6";
93
- return this.rpc.fetchWithRetries<
94
- EngineApiRpcReturnTypes[typeof method],
95
- EngineApiRpcParamTypes[typeof method]
96
- >(
97
- {
98
- method,
99
- params: [
100
- serializedExecutionPayload,
101
- serializedVersionedHashes,
102
- serializedParentBeaconBlockRoot,
103
- serializeExecutionRequests(fork, executionRequests),
104
- serializeInclusionList(inclusionListTransactions),
105
- ],
106
- },
107
- notifyNewPayloadOpts
108
- );
109
- }
110
84
  const method = ForkSeq[fork] >= ForkSeq.gloas ? "engine_newPayloadV5" : "engine_newPayloadV4";
111
85
  return this.rpc.fetchWithRetries<EngineApiRpcReturnTypes[typeof method], EngineApiRpcParamTypes[typeof method]>(
112
86
  {
@@ -145,15 +119,13 @@ export class JsonRpcEngineTransport implements IEngineTransport {
145
119
  signal?: AbortSignal
146
120
  ): Promise<ForkchoiceUpdatedResult> {
147
121
  const method =
148
- ForkSeq[fork] >= ForkSeq.heze
149
- ? "engine_forkchoiceUpdatedV5"
150
- : ForkSeq[fork] >= ForkSeq.gloas
151
- ? "engine_forkchoiceUpdatedV4"
152
- : ForkSeq[fork] >= ForkSeq.deneb
153
- ? "engine_forkchoiceUpdatedV3"
154
- : ForkSeq[fork] >= ForkSeq.capella
155
- ? "engine_forkchoiceUpdatedV2"
156
- : "engine_forkchoiceUpdatedV1";
122
+ ForkSeq[fork] >= ForkSeq.gloas
123
+ ? "engine_forkchoiceUpdatedV4"
124
+ : ForkSeq[fork] >= ForkSeq.deneb
125
+ ? "engine_forkchoiceUpdatedV3"
126
+ : ForkSeq[fork] >= ForkSeq.capella
127
+ ? "engine_forkchoiceUpdatedV2"
128
+ : "engine_forkchoiceUpdatedV1";
157
129
  const payloadAttributesRpc = payloadAttributes ? serializePayloadAttributes(payloadAttributes) : undefined;
158
130
  // If we are just fcUing and not asking execution for payload, retry is not required
159
131
  // and we can move on, as the next fcU will be issued soon on the new slot
@@ -264,13 +236,4 @@ export class JsonRpcEngineTransport implements IEngineTransport {
264
236
  return {code, name: cv.name, version: cv.version, commit: strip0xPrefix(cv.commit)};
265
237
  });
266
238
  }
267
-
268
- async getInclusionList(): Promise<bellatrix.Transactions> {
269
- const method = "engine_getInclusionListV1";
270
- const response = await this.rpc.fetchWithRetries<
271
- EngineApiRpcReturnTypes[typeof method],
272
- EngineApiRpcParamTypes[typeof method]
273
- >({method, params: []}, getInclusionListOpts);
274
- return deserializeInclusionList(response);
275
- }
276
239
  }
@@ -140,12 +140,10 @@ export class ExecutionEngineMockBackend implements JsonRpcBackend {
140
140
  engine_newPayloadV3: this.notifyNewPayload.bind(this),
141
141
  engine_newPayloadV4: this.notifyNewPayload.bind(this),
142
142
  engine_newPayloadV5: this.notifyNewPayload.bind(this),
143
- engine_newPayloadV6: this.notifyNewPayload.bind(this),
144
143
  engine_forkchoiceUpdatedV1: this.notifyForkchoiceUpdate.bind(this),
145
144
  engine_forkchoiceUpdatedV2: this.notifyForkchoiceUpdate.bind(this),
146
145
  engine_forkchoiceUpdatedV3: this.notifyForkchoiceUpdate.bind(this),
147
146
  engine_forkchoiceUpdatedV4: this.notifyForkchoiceUpdate.bind(this),
148
- engine_forkchoiceUpdatedV5: this.notifyForkchoiceUpdate.bind(this),
149
147
  engine_getPayloadV1: this.getPayloadV1.bind(this),
150
148
  engine_getPayloadV2: this.getPayloadV5.bind(this),
151
149
  engine_getPayloadV3: this.getPayloadV5.bind(this),
@@ -155,7 +153,6 @@ export class ExecutionEngineMockBackend implements JsonRpcBackend {
155
153
  engine_getPayloadBodiesByHashV2: this.getPayloadBodiesByHashV2.bind(this),
156
154
  engine_getClientVersionV1: this.getClientVersionV1.bind(this),
157
155
  engine_getBlobsV2: this.getBlobsV2.bind(this),
158
- engine_getInclusionListV1: this.getInclusionList.bind(this),
159
156
  };
160
157
  }
161
158
 
@@ -239,13 +236,7 @@ export class ExecutionEngineMockBackend implements JsonRpcBackend {
239
236
  // IF the payload has been fully validated while processing the call
240
237
  // RETURN payload status from the Payload validation process
241
238
  // If validation succeeds, the response MUST contain {status: VALID, latestValidHash: payload.blockHash}
242
- // The mock does not check inclusion list constraints, so every payload satisfies them (PayloadStatusV2)
243
- return {
244
- status: ExecutionPayloadStatus.VALID,
245
- latestValidHash: blockHash,
246
- validationError: null,
247
- inclusionListSatisfied: true,
248
- };
239
+ return {status: ExecutionPayloadStatus.VALID, latestValidHash: blockHash, validationError: null};
249
240
  }
250
241
 
251
242
  /**
@@ -424,12 +415,7 @@ export class ExecutionEngineMockBackend implements JsonRpcBackend {
424
415
  // IF the payload is deemed VALID and the build process has begun
425
416
  // {payloadStatus: {status: VALID, latestValidHash: forkchoiceState.headBlockHash, validationError: null}, payloadId: buildProcessId}
426
417
  return {
427
- payloadStatus: {
428
- status: ExecutionPayloadStatus.VALID,
429
- latestValidHash: null,
430
- validationError: null,
431
- inclusionListSatisfied: true,
432
- },
418
+ payloadStatus: {status: ExecutionPayloadStatus.VALID, latestValidHash: null, validationError: null},
433
419
  payloadId: String(payloadId as number),
434
420
  };
435
421
  }
@@ -438,12 +424,7 @@ export class ExecutionEngineMockBackend implements JsonRpcBackend {
438
424
  // IF the payload is deemed VALID and a build process hasn't been started
439
425
  // {payloadStatus: {status: VALID, latestValidHash: forkchoiceState.headBlockHash, validationError: null}, payloadId: null}
440
426
  return {
441
- payloadStatus: {
442
- status: ExecutionPayloadStatus.VALID,
443
- latestValidHash: null,
444
- validationError: null,
445
- inclusionListSatisfied: true,
446
- },
427
+ payloadStatus: {status: ExecutionPayloadStatus.VALID, latestValidHash: null, validationError: null},
447
428
  payloadId: null,
448
429
  };
449
430
  }
@@ -506,10 +487,6 @@ export class ExecutionEngineMockBackend implements JsonRpcBackend {
506
487
  return null;
507
488
  }
508
489
 
509
- private getInclusionList(): EngineApiRpcReturnTypes["engine_getInclusionListV1"] {
510
- return [];
511
- }
512
-
513
490
  private timestampToFork(timestamp: number): ForkPostBellatrix {
514
491
  if (timestamp >= this.gloasForkTimestamp) return ForkName.gloas;
515
492
  if (timestamp >= this.fuluForkTimestamp) return ForkName.fulu;
@@ -1,6 +1,4 @@
1
- import {byteArrayEquals} from "@chainsafe/ssz";
2
1
  import {SLOTS_PER_EPOCH} from "@lodestar/params";
3
- import {bellatrix} from "@lodestar/types";
4
2
  import {pruneSetToMax} from "@lodestar/utils";
5
3
  import {PayloadAttributesRpc} from "./types.js";
6
4
  import {DATA, QUANTITY} from "./utils.js";
@@ -22,15 +20,10 @@ export type WithdrawalV1 = {
22
20
  amount: QUANTITY;
23
21
  };
24
22
 
25
- type FcuAttributes = {headBlockHash: DATA} & Omit<PayloadAttributesRpc, "withdrawals" | "inclusionListTransactions"> & {
26
- inclusionListTransactions?: bellatrix.Transactions;
27
- };
23
+ type FcuAttributes = {headBlockHash: DATA} & Omit<PayloadAttributesRpc, "withdrawals">;
28
24
 
29
25
  export class PayloadIdCache {
30
- private readonly payloadIdByFcuAttributes = new Map<
31
- string,
32
- PreparedPayloadId & {fullKey: string; inclusionListTransactions?: bellatrix.Transactions}
33
- >();
26
+ private readonly payloadIdByFcuAttributes = new Map<string, PreparedPayloadId & {fullKey: string}>();
34
27
 
35
28
  getFullKey({headBlockHash, timestamp, prevRandao, suggestedFeeRecipient}: FcuAttributes): string {
36
29
  return `${headBlockHash}-${timestamp}-${prevRandao}-${suggestedFeeRecipient}`;
@@ -47,13 +40,7 @@ export class PayloadIdCache {
47
40
  add(fcuAttributes: FcuAttributes, payloadId: PayloadId): void {
48
41
  const key = this.getKey(fcuAttributes);
49
42
  const fullKey = this.getFullKey(fcuAttributes);
50
- const {inclusionListTransactions} = fcuAttributes;
51
- this.payloadIdByFcuAttributes.set(key, {
52
- payloadId,
53
- preparedAtMs: performance.now(),
54
- fullKey,
55
- inclusionListTransactions,
56
- });
43
+ this.payloadIdByFcuAttributes.set(key, {payloadId, preparedAtMs: performance.now(), fullKey});
57
44
  }
58
45
 
59
46
  prune(): void {
@@ -65,16 +52,8 @@ export class PayloadIdCache {
65
52
  const key = this.getKey(fcuAttributes);
66
53
  const fullKey = this.getFullKey(fcuAttributes);
67
54
  const payloadInfo = this.payloadIdByFcuAttributes.get(key);
68
- return payloadInfo?.fullKey === fullKey &&
69
- isSameInclusionList(payloadInfo.inclusionListTransactions, fcuAttributes.inclusionListTransactions)
55
+ return payloadInfo?.fullKey === fullKey
70
56
  ? {payloadId: payloadInfo.payloadId, preparedAtMs: payloadInfo.preparedAtMs}
71
57
  : undefined;
72
58
  }
73
59
  }
74
-
75
- function isSameInclusionList(a?: bellatrix.Transactions, b?: bellatrix.Transactions): boolean {
76
- if (a === undefined || b === undefined) {
77
- return a === b;
78
- }
79
- return byteArrayEquals(a.bytes, b.bytes);
80
- }
@@ -1,16 +1,6 @@
1
1
  import {Type} from "@chainsafe/ssz";
2
2
  import {CELLS_PER_EXT_BLOB, ForkName, ForkSeq, isForkPostBellatrix} from "@lodestar/params";
3
- import {
4
- ExecutionPayload,
5
- ExecutionRequests,
6
- Root,
7
- RootHex,
8
- bellatrix,
9
- capella,
10
- deneb,
11
- electra,
12
- gloas,
13
- } from "@lodestar/types";
3
+ import {ExecutionPayload, ExecutionRequests, Root, RootHex, capella, deneb, electra, gloas} from "@lodestar/types";
14
4
  import {BlobAndProofV2} from "@lodestar/types/fulu";
15
5
  import {EndTimer, LodestarError, fromHex, strip0xPrefix, toHex, toRootHex} from "@lodestar/utils";
16
6
  import {isValidBlobVersionedHashes} from "./blobVersionedHashes.js";
@@ -446,10 +436,6 @@ export class RestEngineTransport implements IEngineTransport {
446
436
  };
447
437
  });
448
438
  }
449
-
450
- getInclusionList(): Promise<bellatrix.Transactions> {
451
- throw Error("engine_getInclusionListV1 is not available over the REST engine API");
452
- }
453
439
  }
454
440
 
455
441
  function toPayloadAttributesBellatrix(attributes: PayloadAttributes) {
@@ -1,5 +1,5 @@
1
1
  import {ForkName} from "@lodestar/params";
2
- import {BlobsBundle, ExecutionPayload, ExecutionRequests, Root, RootHex, Wei, bellatrix} from "@lodestar/types";
2
+ import {BlobsBundle, ExecutionPayload, ExecutionRequests, Root, RootHex, Wei} from "@lodestar/types";
3
3
  import {BlobAndProofV2} from "@lodestar/types/fulu";
4
4
  import {
5
5
  ClientVersion,
@@ -33,8 +33,7 @@ export interface IEngineTransport {
33
33
  executionPayload: ExecutionPayload,
34
34
  versionedHashes?: VersionedHashes,
35
35
  parentBeaconBlockRoot?: Root,
36
- executionRequests?: ExecutionRequests,
37
- inclusionListTransactions?: bellatrix.Transactions
36
+ executionRequests?: ExecutionRequests
38
37
  ): Promise<PayloadStatusResult>;
39
38
 
40
39
  forkchoiceUpdated(
@@ -53,6 +52,4 @@ export interface IEngineTransport {
53
52
  getBlobsV2(versionedHashes: VersionedHashes, buffers?: Uint8Array[]): Promise<BlobAndProofV2[] | null>;
54
53
 
55
54
  getClientVersion(clientVersion: ClientVersion): Promise<ClientVersion[]>;
56
-
57
- getInclusionList(): Promise<bellatrix.Transactions>;
58
55
  }
@@ -55,7 +55,6 @@ export type EngineApiRpcParamTypes = {
55
55
  engine_newPayloadV3: [ExecutionPayloadRpc, VersionedHashesRpc, DATA];
56
56
  engine_newPayloadV4: [ExecutionPayloadRpc, VersionedHashesRpc, DATA, ExecutionRequestsRpc];
57
57
  engine_newPayloadV5: [ExecutionPayloadRpc, VersionedHashesRpc, DATA, ExecutionRequestsRpc];
58
- engine_newPayloadV6: [ExecutionPayloadRpc, VersionedHashesRpc, DATA, ExecutionRequestsRpc, InclusionListRpc];
59
58
  /**
60
59
  * 1. Object - Payload validity status with respect to the consensus rules:
61
60
  * - blockHash: DATA, 32 Bytes - block hash value of the payload
@@ -77,10 +76,6 @@ export type EngineApiRpcParamTypes = {
77
76
  forkChoiceData: {headBlockHash: DATA; safeBlockHash: DATA; finalizedBlockHash: DATA},
78
77
  payloadAttributes?: PayloadAttributesRpc,
79
78
  ];
80
- engine_forkchoiceUpdatedV5: [
81
- forkChoiceData: {headBlockHash: DATA; safeBlockHash: DATA; finalizedBlockHash: DATA},
82
- payloadAttributes?: PayloadAttributesRpc,
83
- ];
84
79
  /**
85
80
  * 1. payloadId: QUANTITY, 64 Bits - Identifier of the payload building process
86
81
  */
@@ -102,16 +97,12 @@ export type EngineApiRpcParamTypes = {
102
97
  engine_getClientVersionV1: [ClientVersionRpc];
103
98
 
104
99
  engine_getBlobsV2: [DATA[]];
105
-
106
- engine_getInclusionListV1: [];
107
100
  };
108
101
 
109
102
  export type PayloadStatus = {
110
103
  status: ExecutionPayloadStatus;
111
104
  latestValidHash: DATA | null;
112
105
  validationError: string | null;
113
- /** PayloadStatusV2: whether a VALID payload satisfied the inclusion list constraints, null otherwise */
114
- inclusionListSatisfied?: boolean | null;
115
106
  };
116
107
 
117
108
  export type EngineApiRpcReturnTypes = {
@@ -124,7 +115,6 @@ export type EngineApiRpcReturnTypes = {
124
115
  engine_newPayloadV3: PayloadStatus;
125
116
  engine_newPayloadV4: PayloadStatus;
126
117
  engine_newPayloadV5: PayloadStatus;
127
- engine_newPayloadV6: PayloadStatus;
128
118
  engine_forkchoiceUpdatedV1: {
129
119
  payloadStatus: PayloadStatus;
130
120
  payloadId: QUANTITY | null;
@@ -141,10 +131,6 @@ export type EngineApiRpcReturnTypes = {
141
131
  payloadStatus: PayloadStatus;
142
132
  payloadId: QUANTITY | null;
143
133
  };
144
- engine_forkchoiceUpdatedV5: {
145
- payloadStatus: PayloadStatus;
146
- payloadId: QUANTITY | null;
147
- };
148
134
  /**
149
135
  * payloadId | Error: QUANTITY, 64 Bits - Identifier of the payload building process
150
136
  */
@@ -160,8 +146,6 @@ export type EngineApiRpcReturnTypes = {
160
146
  engine_getClientVersionV1: ClientVersionRpc[];
161
147
 
162
148
  engine_getBlobsV2: BlobAndProofV2Rpc[] | null;
163
-
164
- engine_getInclusionListV1: InclusionListRpc;
165
149
  };
166
150
 
167
151
  type ExecutionPayloadRpcWithValue = {
@@ -271,13 +255,8 @@ export type PayloadAttributesRpc = {
271
255
  slotNumber?: QUANTITY;
272
256
  /** QUANTITY, 64 Bits - target value for the gasLimit field of the new payload (GLOAS, execution-apis#796) */
273
257
  targetGasLimit?: QUANTITY;
274
- /** Array of DATA - transactions that the built payload must include (PayloadAttributesV5, HEZE) */
275
- inclusionListTransactions?: InclusionListRpc;
276
258
  };
277
259
 
278
- /** Array of DATA - array of transaction objects */
279
- export type InclusionListRpc = DATA[];
280
-
281
260
  export type ClientVersionRpc = {
282
261
  /** ClientCode */
283
262
  code: string;
@@ -457,9 +436,6 @@ export function serializePayloadAttributes(data: PayloadAttributes): PayloadAttr
457
436
  parentBeaconBlockRoot: data.parentBeaconBlockRoot ? bytesToData(data.parentBeaconBlockRoot) : undefined,
458
437
  slotNumber: data.slotNumber !== undefined ? numToQuantity(data.slotNumber) : undefined,
459
438
  targetGasLimit: data.targetGasLimit !== undefined ? numToQuantity(data.targetGasLimit) : undefined,
460
- inclusionListTransactions: data.inclusionListTransactions
461
- ? serializeInclusionList(data.inclusionListTransactions)
462
- : undefined,
463
439
  };
464
440
  }
465
441
 
@@ -467,14 +443,6 @@ export function serializeBeaconBlockRoot(data: Root): DATA {
467
443
  return bytesToData(data);
468
444
  }
469
445
 
470
- export function serializeInclusionList(data: bellatrix.Transactions): InclusionListRpc {
471
- return Array.from(data, (transaction) => bytesToData(transaction));
472
- }
473
-
474
- export function deserializeInclusionList(data: InclusionListRpc): bellatrix.Transactions {
475
- return SerializedList.fromArray(data.map((transaction) => dataToBytes(transaction, null)));
476
- }
477
-
478
446
  export function deserializePayloadAttributes(data: PayloadAttributesRpc): PayloadAttributes {
479
447
  return {
480
448
  timestamp: quantityToNum(data.timestamp),
@@ -486,9 +454,6 @@ export function deserializePayloadAttributes(data: PayloadAttributesRpc): Payloa
486
454
  parentBeaconBlockRoot: data.parentBeaconBlockRoot ? dataToBytes(data.parentBeaconBlockRoot, 32) : undefined,
487
455
  slotNumber: data.slotNumber !== undefined ? quantityToNum(data.slotNumber) : undefined,
488
456
  targetGasLimit: data.targetGasLimit !== undefined ? quantityToBigint(data.targetGasLimit) : undefined,
489
- inclusionListTransactions: data.inclusionListTransactions
490
- ? deserializeInclusionList(data.inclusionListTransactions)
491
- : undefined,
492
457
  };
493
458
  }
494
459
 
package/src/index.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  // Export generic RestApi server for CLI
2
2
 
3
+ export {ServiceNotReady} from "./api/impl/errors.js";
3
4
  export type {RestApiServerMetrics, RestApiServerModules, RestApiServerOpts} from "./api/rest/base.js";
4
5
  export {RestApiServer} from "./api/rest/base.js";
5
6
  export {persistAnchorState} from "./chain/index.js";