@lodestar/state-transition 1.35.0-dev.fcf8d024ea → 1.35.0-dev.feed916580

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 (237) hide show
  1. package/lib/cache/types.d.ts +2 -2
  2. package/lib/util/genesis.js +3 -0
  3. package/lib/util/genesis.js.map +1 -1
  4. package/lib/util/slot.d.ts +1 -0
  5. package/lib/util/slot.js +5 -1
  6. package/lib/util/slot.js.map +1 -1
  7. package/package.json +11 -13
  8. package/lib/block/externalData.d.ts.map +0 -1
  9. package/lib/block/index.d.ts.map +0 -1
  10. package/lib/block/initiateValidatorExit.d.ts.map +0 -1
  11. package/lib/block/isValidIndexedAttestation.d.ts.map +0 -1
  12. package/lib/block/processAttestationPhase0.d.ts.map +0 -1
  13. package/lib/block/processAttestations.d.ts.map +0 -1
  14. package/lib/block/processAttestationsAltair.d.ts.map +0 -1
  15. package/lib/block/processAttesterSlashing.d.ts.map +0 -1
  16. package/lib/block/processBlobKzgCommitments.d.ts.map +0 -1
  17. package/lib/block/processBlockHeader.d.ts.map +0 -1
  18. package/lib/block/processBlsToExecutionChange.d.ts.map +0 -1
  19. package/lib/block/processConsolidationRequest.d.ts.map +0 -1
  20. package/lib/block/processDeposit.d.ts.map +0 -1
  21. package/lib/block/processDepositRequest.d.ts.map +0 -1
  22. package/lib/block/processEth1Data.d.ts.map +0 -1
  23. package/lib/block/processExecutionPayload.d.ts.map +0 -1
  24. package/lib/block/processOperations.d.ts.map +0 -1
  25. package/lib/block/processProposerSlashing.d.ts.map +0 -1
  26. package/lib/block/processRandao.d.ts.map +0 -1
  27. package/lib/block/processSyncCommittee.d.ts.map +0 -1
  28. package/lib/block/processVoluntaryExit.d.ts.map +0 -1
  29. package/lib/block/processWithdrawalRequest.d.ts.map +0 -1
  30. package/lib/block/processWithdrawals.d.ts.map +0 -1
  31. package/lib/block/slashValidator.d.ts.map +0 -1
  32. package/lib/block/types.d.ts.map +0 -1
  33. package/lib/cache/effectiveBalanceIncrements.d.ts.map +0 -1
  34. package/lib/cache/epochCache.d.ts.map +0 -1
  35. package/lib/cache/epochTransitionCache.d.ts.map +0 -1
  36. package/lib/cache/pubkeyCache.d.ts.map +0 -1
  37. package/lib/cache/rewardCache.d.ts.map +0 -1
  38. package/lib/cache/stateCache.d.ts.map +0 -1
  39. package/lib/cache/syncCommitteeCache.d.ts.map +0 -1
  40. package/lib/cache/types.d.ts.map +0 -1
  41. package/lib/constants/constants.d.ts.map +0 -1
  42. package/lib/constants/index.d.ts.map +0 -1
  43. package/lib/epoch/computeUnrealizedCheckpoints.d.ts.map +0 -1
  44. package/lib/epoch/getAttestationDeltas.d.ts.map +0 -1
  45. package/lib/epoch/getRewardsAndPenalties.d.ts.map +0 -1
  46. package/lib/epoch/index.d.ts.map +0 -1
  47. package/lib/epoch/processEffectiveBalanceUpdates.d.ts.map +0 -1
  48. package/lib/epoch/processEth1DataReset.d.ts.map +0 -1
  49. package/lib/epoch/processHistoricalRootsUpdate.d.ts.map +0 -1
  50. package/lib/epoch/processHistoricalSummariesUpdate.d.ts.map +0 -1
  51. package/lib/epoch/processInactivityUpdates.d.ts.map +0 -1
  52. package/lib/epoch/processJustificationAndFinalization.d.ts.map +0 -1
  53. package/lib/epoch/processParticipationFlagUpdates.d.ts.map +0 -1
  54. package/lib/epoch/processParticipationRecordUpdates.d.ts.map +0 -1
  55. package/lib/epoch/processPendingAttestations.d.ts.map +0 -1
  56. package/lib/epoch/processPendingConsolidations.d.ts.map +0 -1
  57. package/lib/epoch/processPendingDeposits.d.ts.map +0 -1
  58. package/lib/epoch/processProposerLookahead.d.ts.map +0 -1
  59. package/lib/epoch/processRandaoMixesReset.d.ts.map +0 -1
  60. package/lib/epoch/processRegistryUpdates.d.ts.map +0 -1
  61. package/lib/epoch/processRewardsAndPenalties.d.ts.map +0 -1
  62. package/lib/epoch/processSlashings.d.ts.map +0 -1
  63. package/lib/epoch/processSlashingsReset.d.ts.map +0 -1
  64. package/lib/epoch/processSyncCommitteeUpdates.d.ts.map +0 -1
  65. package/lib/index.d.ts.map +0 -1
  66. package/lib/metrics.d.ts.map +0 -1
  67. package/lib/signatureSets/attesterSlashings.d.ts.map +0 -1
  68. package/lib/signatureSets/blsToExecutionChange.d.ts.map +0 -1
  69. package/lib/signatureSets/index.d.ts.map +0 -1
  70. package/lib/signatureSets/indexedAttestation.d.ts.map +0 -1
  71. package/lib/signatureSets/proposer.d.ts.map +0 -1
  72. package/lib/signatureSets/proposerSlashings.d.ts.map +0 -1
  73. package/lib/signatureSets/randao.d.ts.map +0 -1
  74. package/lib/signatureSets/voluntaryExits.d.ts.map +0 -1
  75. package/lib/slot/index.d.ts.map +0 -1
  76. package/lib/slot/upgradeStateToAltair.d.ts.map +0 -1
  77. package/lib/slot/upgradeStateToBellatrix.d.ts.map +0 -1
  78. package/lib/slot/upgradeStateToCapella.d.ts.map +0 -1
  79. package/lib/slot/upgradeStateToDeneb.d.ts.map +0 -1
  80. package/lib/slot/upgradeStateToElectra.d.ts.map +0 -1
  81. package/lib/slot/upgradeStateToFulu.d.ts.map +0 -1
  82. package/lib/slot/upgradeStateToGloas.d.ts.map +0 -1
  83. package/lib/stateTransition.d.ts.map +0 -1
  84. package/lib/types.d.ts.map +0 -1
  85. package/lib/util/aggregator.d.ts.map +0 -1
  86. package/lib/util/altair.d.ts.map +0 -1
  87. package/lib/util/array.d.ts.map +0 -1
  88. package/lib/util/attestation.d.ts.map +0 -1
  89. package/lib/util/attesterStatus.d.ts.map +0 -1
  90. package/lib/util/balance.d.ts.map +0 -1
  91. package/lib/util/blindedBlock.d.ts.map +0 -1
  92. package/lib/util/blockRoot.d.ts.map +0 -1
  93. package/lib/util/calculateCommitteeAssignments.d.ts.map +0 -1
  94. package/lib/util/capella.d.ts.map +0 -1
  95. package/lib/util/computeAnchorCheckpoint.d.ts.map +0 -1
  96. package/lib/util/deposit.d.ts.map +0 -1
  97. package/lib/util/domain.d.ts.map +0 -1
  98. package/lib/util/electra.d.ts.map +0 -1
  99. package/lib/util/epoch.d.ts.map +0 -1
  100. package/lib/util/epochShuffling.d.ts.map +0 -1
  101. package/lib/util/execution.d.ts.map +0 -1
  102. package/lib/util/finality.d.ts.map +0 -1
  103. package/lib/util/fulu.d.ts.map +0 -1
  104. package/lib/util/genesis.d.ts.map +0 -1
  105. package/lib/util/index.d.ts.map +0 -1
  106. package/lib/util/interop.d.ts.map +0 -1
  107. package/lib/util/loadState/findModifiedInactivityScores.d.ts.map +0 -1
  108. package/lib/util/loadState/findModifiedValidators.d.ts.map +0 -1
  109. package/lib/util/loadState/index.d.ts.map +0 -1
  110. package/lib/util/loadState/loadState.d.ts.map +0 -1
  111. package/lib/util/loadState/loadValidator.d.ts.map +0 -1
  112. package/lib/util/rootCache.d.ts.map +0 -1
  113. package/lib/util/seed.d.ts.map +0 -1
  114. package/lib/util/shufflingDecisionRoot.d.ts.map +0 -1
  115. package/lib/util/signatureSets.d.ts.map +0 -1
  116. package/lib/util/signingRoot.d.ts.map +0 -1
  117. package/lib/util/slot.d.ts.map +0 -1
  118. package/lib/util/sszBytes.d.ts.map +0 -1
  119. package/lib/util/syncCommittee.d.ts.map +0 -1
  120. package/lib/util/targetUnslashedBalance.d.ts.map +0 -1
  121. package/lib/util/validator.d.ts.map +0 -1
  122. package/lib/util/weakSubjectivity.d.ts.map +0 -1
  123. package/src/block/externalData.ts +0 -26
  124. package/src/block/index.ts +0 -81
  125. package/src/block/initiateValidatorExit.ts +0 -62
  126. package/src/block/isValidIndexedAttestation.ts +0 -70
  127. package/src/block/processAttestationPhase0.ts +0 -158
  128. package/src/block/processAttestations.ts +0 -25
  129. package/src/block/processAttestationsAltair.ts +0 -184
  130. package/src/block/processAttesterSlashing.ts +0 -59
  131. package/src/block/processBlobKzgCommitments.ts +0 -21
  132. package/src/block/processBlockHeader.ts +0 -54
  133. package/src/block/processBlsToExecutionChange.ts +0 -78
  134. package/src/block/processConsolidationRequest.ts +0 -147
  135. package/src/block/processDeposit.ts +0 -166
  136. package/src/block/processDepositRequest.ts +0 -19
  137. package/src/block/processEth1Data.ts +0 -86
  138. package/src/block/processExecutionPayload.ts +0 -84
  139. package/src/block/processOperations.ts +0 -83
  140. package/src/block/processProposerSlashing.ts +0 -66
  141. package/src/block/processRandao.ts +0 -27
  142. package/src/block/processSyncCommittee.ts +0 -117
  143. package/src/block/processVoluntaryExit.ts +0 -55
  144. package/src/block/processWithdrawalRequest.ts +0 -98
  145. package/src/block/processWithdrawals.ts +0 -207
  146. package/src/block/slashValidator.ts +0 -98
  147. package/src/block/types.ts +0 -9
  148. package/src/cache/effectiveBalanceIncrements.ts +0 -39
  149. package/src/cache/epochCache.ts +0 -1213
  150. package/src/cache/epochTransitionCache.ts +0 -542
  151. package/src/cache/pubkeyCache.ts +0 -33
  152. package/src/cache/rewardCache.ts +0 -19
  153. package/src/cache/stateCache.ts +0 -268
  154. package/src/cache/syncCommitteeCache.ts +0 -96
  155. package/src/cache/types.ts +0 -18
  156. package/src/constants/constants.ts +0 -12
  157. package/src/constants/index.ts +0 -1
  158. package/src/epoch/computeUnrealizedCheckpoints.ts +0 -55
  159. package/src/epoch/getAttestationDeltas.ts +0 -169
  160. package/src/epoch/getRewardsAndPenalties.ts +0 -137
  161. package/src/epoch/index.ts +0 -202
  162. package/src/epoch/processEffectiveBalanceUpdates.ts +0 -111
  163. package/src/epoch/processEth1DataReset.ts +0 -17
  164. package/src/epoch/processHistoricalRootsUpdate.ts +0 -25
  165. package/src/epoch/processHistoricalSummariesUpdate.ts +0 -23
  166. package/src/epoch/processInactivityUpdates.ts +0 -60
  167. package/src/epoch/processJustificationAndFinalization.ts +0 -90
  168. package/src/epoch/processParticipationFlagUpdates.ts +0 -27
  169. package/src/epoch/processParticipationRecordUpdates.ts +0 -14
  170. package/src/epoch/processPendingAttestations.ts +0 -75
  171. package/src/epoch/processPendingConsolidations.ts +0 -59
  172. package/src/epoch/processPendingDeposits.ts +0 -136
  173. package/src/epoch/processProposerLookahead.ts +0 -39
  174. package/src/epoch/processRandaoMixesReset.ts +0 -18
  175. package/src/epoch/processRegistryUpdates.ts +0 -65
  176. package/src/epoch/processRewardsAndPenalties.ts +0 -58
  177. package/src/epoch/processSlashings.ts +0 -97
  178. package/src/epoch/processSlashingsReset.ts +0 -20
  179. package/src/epoch/processSyncCommitteeUpdates.ts +0 -44
  180. package/src/index.ts +0 -67
  181. package/src/metrics.ts +0 -169
  182. package/src/signatureSets/attesterSlashings.ts +0 -39
  183. package/src/signatureSets/blsToExecutionChange.ts +0 -43
  184. package/src/signatureSets/index.ts +0 -73
  185. package/src/signatureSets/indexedAttestation.ts +0 -51
  186. package/src/signatureSets/proposer.ts +0 -47
  187. package/src/signatureSets/proposerSlashings.ts +0 -41
  188. package/src/signatureSets/randao.ts +0 -31
  189. package/src/signatureSets/voluntaryExits.ts +0 -44
  190. package/src/slot/index.ts +0 -32
  191. package/src/slot/upgradeStateToAltair.ts +0 -149
  192. package/src/slot/upgradeStateToBellatrix.ts +0 -63
  193. package/src/slot/upgradeStateToCapella.ts +0 -71
  194. package/src/slot/upgradeStateToDeneb.ts +0 -40
  195. package/src/slot/upgradeStateToElectra.ts +0 -126
  196. package/src/slot/upgradeStateToFulu.ts +0 -31
  197. package/src/slot/upgradeStateToGloas.ts +0 -29
  198. package/src/stateTransition.ts +0 -305
  199. package/src/types.ts +0 -26
  200. package/src/util/aggregator.ts +0 -33
  201. package/src/util/altair.ts +0 -13
  202. package/src/util/array.ts +0 -53
  203. package/src/util/attestation.ts +0 -36
  204. package/src/util/attesterStatus.ts +0 -83
  205. package/src/util/balance.ts +0 -83
  206. package/src/util/blindedBlock.ts +0 -144
  207. package/src/util/blockRoot.ts +0 -72
  208. package/src/util/calculateCommitteeAssignments.ts +0 -43
  209. package/src/util/capella.ts +0 -8
  210. package/src/util/computeAnchorCheckpoint.ts +0 -38
  211. package/src/util/deposit.ts +0 -22
  212. package/src/util/domain.ts +0 -31
  213. package/src/util/electra.ts +0 -68
  214. package/src/util/epoch.ts +0 -135
  215. package/src/util/epochShuffling.ts +0 -185
  216. package/src/util/execution.ts +0 -177
  217. package/src/util/finality.ts +0 -17
  218. package/src/util/fulu.ts +0 -43
  219. package/src/util/genesis.ts +0 -340
  220. package/src/util/index.ts +0 -29
  221. package/src/util/interop.ts +0 -22
  222. package/src/util/loadState/findModifiedInactivityScores.ts +0 -47
  223. package/src/util/loadState/findModifiedValidators.ts +0 -46
  224. package/src/util/loadState/index.ts +0 -2
  225. package/src/util/loadState/loadState.ts +0 -225
  226. package/src/util/loadState/loadValidator.ts +0 -77
  227. package/src/util/rootCache.ts +0 -37
  228. package/src/util/seed.ts +0 -381
  229. package/src/util/shufflingDecisionRoot.ts +0 -78
  230. package/src/util/signatureSets.ts +0 -65
  231. package/src/util/signingRoot.ts +0 -13
  232. package/src/util/slot.ts +0 -22
  233. package/src/util/sszBytes.ts +0 -52
  234. package/src/util/syncCommittee.ts +0 -69
  235. package/src/util/targetUnslashedBalance.ts +0 -30
  236. package/src/util/validator.ts +0 -105
  237. package/src/util/weakSubjectivity.ts +0 -186
@@ -1 +0,0 @@
1
- {"version":3,"file":"capella.d.ts","sourceRoot":"","sources":["../../src/util/capella.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,qBAAqB,EAAE,UAAU,GAAG,OAAO,CAEtF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"computeAnchorCheckpoint.d.ts","sourceRoot":"","sources":["../../src/util/computeAnchorCheckpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAC,MAAM,EAAM,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAC,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAIhD,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,eAAe,EACvB,WAAW,EAAE,mBAAmB,GAC/B;IAAC,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC,iBAAiB,CAAA;CAAC,CA2BxE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"deposit.d.ts","sourceRoot":"","sources":["../../src/util/deposit.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAE,MAAM,EAAC,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAC,yBAAyB,EAA2B,MAAM,aAAa,CAAC;AAEhF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,yBAAyB,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,GAAG,SAAS,CAiB3G"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"domain.d.ts","sourceRoot":"","sources":["../../src/util/domain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAM,MAAM,iBAAiB,CAAC;AAG9E;;GAEG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,oBAAoB,EAAE,IAAI,GAAG,UAAU,CAMlH;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAEvE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,cAAc,EAAE,OAAO,EAAE,qBAAqB,EAAE,IAAI,GAAG,UAAU,CAMpG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"electra.d.ts","sourceRoot":"","sources":["../../src/util/electra.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,cAAc,EAAM,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EAAC,wBAAwB,EAAC,MAAM,aAAa,CAAC;AAGrD,wBAAgB,kCAAkC,CAAC,qBAAqB,EAAE,UAAU,GAAG,OAAO,CAE7F;AAED,wBAAgB,gCAAgC,CAAC,qBAAqB,EAAE,UAAU,GAAG,OAAO,CAI3F;AAED,wBAAgB,4B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BAAgB,GAAG,sBAAsB,CAErG;AAED,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,eAAe,GAAG,sBAAsB,GAC7C,gBAAgB,GAAG,sBAAsB,CAU3C;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,gBAAgB,GAAG,sBAAsB,GACjD,OAAO,IAAI,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,sBAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAK1F;AAED,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,OAAO,CAAC,6BAA6B,GAC7C,OAAO,IAAI,OAAO,CAAC,sBAAsB,CAE3C;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,GAAG,sBAAsB,CAuChH"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"finality.d.ts","sourceRoot":"","sources":["../../src/util/finality.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,yBAAyB,EAAC,MAAM,aAAa,CAAC;AAEtD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,yBAAyB,GAAG,MAAM,CAGzE;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAE5E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"fulu.d.ts","sourceRoot":"","sources":["../../src/util/fulu.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAC,wBAAwB,EAAC,MAAM,aAAa,CAAC;AAKrD;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,wBAAwB,GAAG,cAAc,EAAE,CA+B7F"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"genesis.d.ts","sourceRoot":"","sources":["../../src/util/genesis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAE,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;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,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"interop.d.ts","sourceRoot":"","sources":["../../src/util/interop.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAS1C,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,EAAE,CAIrE;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAIzD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"findModifiedInactivityScores.d.ts","sourceRoot":"","sources":["../../../src/util/loadState/findModifiedInactivityScores.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,qBAAqB,EAAE,UAAU,EACjC,sBAAsB,EAAE,UAAU,EAClC,kBAAkB,EAAE,MAAM,EAAE,EAC5B,eAAe,SAAI,GAClB,IAAI,CAiCN"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"findModifiedValidators.d.ts","sourceRoot":"","sources":["../../../src/util/loadState/findModifiedValidators.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,eAAe,EAAE,UAAU,EAC3B,gBAAgB,EAAE,UAAU,EAC5B,kBAAkB,EAAE,MAAM,EAAE,EAC5B,eAAe,SAAI,GAClB,IAAI,CA8BN"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/util/loadState/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,sBAAsB,EAAC,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAC,kCAAkC,EAAC,MAAM,oBAAoB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"loadState.d.ts","sourceRoot":"","sources":["../../../src/util/loadState/loadState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EAAC,mBAAmB,EAAoB,MAAM,gBAAgB,CAAC;AAMtE,KAAK,kBAAkB,GAAG;IAAC,KAAK,EAAE,mBAAmB,CAAC;IAAC,kBAAkB,EAAE,MAAM,EAAE,CAAA;CAAC,CAAC;AAErF;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,eAAe,EACvB,SAAS,EAAE,mBAAmB,EAC9B,UAAU,EAAE,UAAU,EACtB,mBAAmB,CAAC,EAAE,UAAU,GAC/B,kBAAkB,CA0CpB;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,UAAU,GACrB;IAAC,KAAK,EAAE,mBAAmB,CAAC;IAAC,eAAe,EAAE,UAAU,CAAA;CAAC,CAW3D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"loadValidator.d.ts","sourceRoot":"","sources":["../../../src/util/loadState/loadValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAC,eAAe,EAAC,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAC,cAAc,EAAoC,GAAG,EAAC,MAAM,iBAAiB,CAAC;AAGtF;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,aAAa,EAAE,eAAe,CAAC,OAAO,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,EAC3D,iBAAiB,EAAE,UAAU,GAC5B,eAAe,CAAC,OAAO,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAU9C;AAuBD;;GAEG;AACH,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,eAAe,EACvB,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE,cAAc,EAAE,GACjC,MAAM,EAAE,CAuBV"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"rootCache.d.ts","sourceRoot":"","sources":["../../src/util/rootCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAC,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAC,yBAAyB,EAAC,MAAM,aAAa,CAAC;AAGtD;;;GAGG;AACH,qBAAa,SAAS;IAMR,OAAO,CAAC,QAAQ,CAAC,KAAK;IALlC,QAAQ,CAAC,0BAA0B,EAAE,MAAM,CAAC,UAAU,CAAC;IACvD,QAAQ,CAAC,2BAA2B,EAAE,MAAM,CAAC,UAAU,CAAC;IACxD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAA0B;IAC9D,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAyB;gBAE/B,KAAK,EAAE,yBAAyB;IAK7D,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAShC,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;CAQrC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"seed.d.ts","sourceRoot":"","sources":["../../src/util/seed.ts"],"names":[],"mappings":"AAKA,OAAO,EAKL,OAAO,EAOR,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAE3E,OAAO,EAAC,0BAA0B,EAAC,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAC,mBAAmB,EAAE,yBAAyB,EAAC,MAAM,aAAa,CAAC;AAG3E;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,OAAO,EACb,SAAS,EAAE,UAAU,EACrB,SAAS,EAAE;IAAC,KAAK,EAAE,KAAK,CAAC;IAAC,aAAa,EAAE,WAAW,CAAA;CAAC,EACrD,0BAA0B,EAAE,0BAA0B,GACrD,MAAM,EAAE,CAeV;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,OA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;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,GAAG,UAAU,CAIpG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"shufflingDecisionRoot.d.ts","sourceRoot":"","sources":["../../src/util/shufflingDecisionRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,IAAI,EAAO,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAC,yBAAyB,EAAC,MAAM,aAAa,CAAC;AAItD;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,yBAAyB,GAAG,IAAI,GAAG,IAAI,CAM3F;AAWD;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,yBAAyB,EAAE,cAAc,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,CAMlH"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"signatureSets.d.ts","sourceRoot":"","sources":["../../src/util/signatureSets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAyC,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAC,IAAI,EAAC,MAAM,iBAAiB,CAAC;AAErC,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC;IAC9B,MAAM,EAAE,SAAS,CAAC;IAClB,WAAW,EAAE,IAAI,CAAC;IAClB,SAAS,EAAE,UAAU,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,gBAAgB,CAAC,SAAS,CAAC;IACjC,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,WAAW,EAAE,IAAI,CAAC;IAClB,SAAS,EAAE,UAAU,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG,sBAAsB,CAAC;AAExE,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,aAAa,GAAG,OAAO,CAcvE;AAED,wBAAgB,sCAAsC,CACpD,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,IAAI,EACjB,SAAS,EAAE,UAAU,GACpB,kBAAkB,CAOpB;AAED,wBAAgB,yCAAyC,CACvD,OAAO,EAAE,SAAS,EAAE,EACpB,WAAW,EAAE,IAAI,EACjB,SAAS,EAAE,UAAU,GACpB,sBAAsB,CAOxB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"signingRoot.d.ts","sourceRoot":"","sources":["../../src/util/signingRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAC,MAAM,EAAc,MAAM,iBAAiB,CAAC;AAEpD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAM7F"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"slot.d.ts","sourceRoot":"","sources":["../../src/util/slot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAC,KAAK,EAAE,IAAI,EAAE,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAGzD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,GAAG,IAAI,CAGxF;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,GAAG,IAAI,CAElF;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAG3E;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,GAAG,WAAW,CAExG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"sszBytes.d.ts","sourceRoot":"","sources":["../../src/util/sszBytes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAC,OAAO,EAAE,OAAO,EAAC,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAC,WAAW,EAAE,IAAI,EAAC,MAAM,iBAAiB,CAAC;AAQlD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAcxC,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAGzF;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,UAAU,GAAG,WAAW,CAAC,OAAO,EAAE,aAAa,CAAC,CAGrH;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAE7D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"syncCommittee.d.ts","sourceRoot":"","sources":["../../src/util/syncCommittee.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,OAAO,EAKR,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AAEvC,OAAO,EAAC,0BAA0B,EAAC,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAC,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAGhD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,mBAAmB,EAC1B,sBAAsB,EAAE,WAAW,EACnC,0BAA0B,EAAE,0BAA0B,GACrD;IAAC,OAAO,EAAE,WAAW,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC,aAAa,CAAA;CAAC,CAgB7D;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,4BAA4B,EAAE,MAAM,GAAG,MAAM,CAUzF;AAED;;;IAGI;AACJ,wBAAgB,6BAA6B,CAAC,2BAA2B,EAAE,MAAM,GAAG,MAAM,CAKzF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"targetUnslashedBalance.d.ts","sourceRoot":"","sources":["../../src/util/targetUnslashedBalance.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,EAAE,MAAM,EAAC,MAAM,iBAAiB,CAAC;AAM9C;;;;;;GAMG;AACH,wBAAgB,mCAAmC,CACjD,aAAa,EAAE,MAAM,EAAE,EACvB,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,MAAM,CAAC,SAAS,EAAE,GAC7B,MAAM,CAWR"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../src/util/validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAEL,OAAO,EAGR,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAC,KAAK,EAAE,cAAc,EAAE,MAAM,EAAC,MAAM,iBAAiB,CAAC;AAE9D,OAAO,EAAC,mBAAmB,EAAE,wBAAwB,EAAE,UAAU,EAAC,MAAM,aAAa,CAAC;AAGtF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAEpF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAEvF;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,KAAK,GAAG,WAAW,CAW/F;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,GAAG,MA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,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,mBAAmB,GAAG,MAAM,CA6BzG;AAED,wBAAgB,mDAAmD,CACjE,oBAAoB,EAAE,MAAM,EAC5B,uBAAuB,EAAE,MAAM,EAC/B,UAAU,EAAE,MAAM,EAClB,uBAAuB,EAAE,MAAM,GAC9B,MAAM,CAuBR;AAED,wBAAgB,oDAAoD,CAClE,uBAAuB,EAAE,MAAM,EAE/B,iBAAiB,EAAE,MAAM,EACzB,uBAAuB,EAAE,MAAM,GAC9B,MAAM,CAOR;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,CAMnE;AAED,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,mBAAmB,EAC5B,YAAY,EAAE,UAAU,GACvB,OAAO,CAOT;AAED,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,mBAAmB,EAC5B,YAAY,EAAE,UAAU,GACvB,IAAI,CAgBN"}
@@ -1,26 +0,0 @@
1
- /**
2
- * Should emulate the return value of `ExecutionEngine.notifyNewPayload()`, such that:
3
- *
4
- * Returns ``True`` iff ``execution_payload`` is valid with respect to ``self.execution_state``.
5
- *
6
- * Note: `processExecutionPayload()` depends on process_randao function call as it retrieves the most recent randao
7
- * mix from the state. Implementations that are considering parallel processing of execution payload with respect to
8
- * beacon chain state transition function should work around this dependency.
9
- */
10
- export enum ExecutionPayloadStatus {
11
- preMerge = "preMerge",
12
- invalid = "invalid",
13
- valid = "valid",
14
- }
15
-
16
- export enum DataAvailabilityStatus {
17
- PreData = "PreData",
18
- /* validator activities can't be performed on out of range data */
19
- OutOfRange = "OutOfRange",
20
- Available = "Available",
21
- }
22
-
23
- export interface BlockExternalData {
24
- executionPayloadStatus: ExecutionPayloadStatus;
25
- dataAvailabilityStatus: DataAvailabilityStatus;
26
- }
@@ -1,81 +0,0 @@
1
- import {ForkSeq} from "@lodestar/params";
2
- import {BeaconBlock, BlindedBeaconBlock, altair, capella} from "@lodestar/types";
3
- import {BeaconStateTransitionMetrics} from "../metrics.js";
4
- import {CachedBeaconStateAllForks, CachedBeaconStateBellatrix, CachedBeaconStateCapella} from "../types.js";
5
- import {getFullOrBlindedPayload, isExecutionEnabled} from "../util/execution.js";
6
- import {BlockExternalData, DataAvailabilityStatus} from "./externalData.js";
7
- import {processBlobKzgCommitments} from "./processBlobKzgCommitments.js";
8
- import {processBlockHeader} from "./processBlockHeader.js";
9
- import {processEth1Data} from "./processEth1Data.js";
10
- import {processExecutionPayload} from "./processExecutionPayload.js";
11
- import {processOperations} from "./processOperations.js";
12
- import {processRandao} from "./processRandao.js";
13
- import {processSyncAggregate} from "./processSyncCommittee.js";
14
- import {processWithdrawals} from "./processWithdrawals.js";
15
- import {ProcessBlockOpts, ProposerRewardType} from "./types.js";
16
-
17
- // Spec tests
18
- export {
19
- processBlockHeader,
20
- processExecutionPayload,
21
- processRandao,
22
- processEth1Data,
23
- processSyncAggregate,
24
- processWithdrawals,
25
- };
26
-
27
- export * from "./externalData.js";
28
- export * from "./initiateValidatorExit.js";
29
- export * from "./isValidIndexedAttestation.js";
30
- export * from "./processOperations.js";
31
-
32
- export function processBlock(
33
- fork: ForkSeq,
34
- state: CachedBeaconStateAllForks,
35
- block: BeaconBlock | BlindedBeaconBlock,
36
- externalData: BlockExternalData & ProcessBlockOpts,
37
- opts?: ProcessBlockOpts,
38
- metrics?: BeaconStateTransitionMetrics | null
39
- ): void {
40
- const {verifySignatures = true} = opts ?? {};
41
-
42
- processBlockHeader(state, block);
43
-
44
- // The call to the process_execution_payload must happen before the call to the process_randao as the former depends
45
- // on the randao_mix computed with the reveal of the previous block.
46
- if (fork >= ForkSeq.bellatrix && isExecutionEnabled(state as CachedBeaconStateBellatrix, block)) {
47
- const fullOrBlindedPayload = getFullOrBlindedPayload(block);
48
- // TODO Deneb: Allow to disable withdrawals for interop testing
49
- // https://github.com/ethereum/consensus-specs/blob/b62c9e877990242d63aa17a2a59a49bc649a2f2e/specs/eip4844/beacon-chain.md#disabling-withdrawals
50
- if (fork >= ForkSeq.capella) {
51
- processWithdrawals(
52
- fork,
53
- state as CachedBeaconStateCapella,
54
- fullOrBlindedPayload as capella.FullOrBlindedExecutionPayload
55
- );
56
- }
57
-
58
- processExecutionPayload(fork, state as CachedBeaconStateBellatrix, block.body, externalData);
59
- }
60
-
61
- processRandao(state, block, verifySignatures);
62
- processEth1Data(state, block.body.eth1Data);
63
- processOperations(fork, state, block.body, opts, metrics);
64
- if (fork >= ForkSeq.altair) {
65
- processSyncAggregate(state, block as altair.BeaconBlock, verifySignatures);
66
- }
67
-
68
- if (fork >= ForkSeq.deneb) {
69
- processBlobKzgCommitments(externalData);
70
- // Only throw PreData so beacon can also sync/process blocks optimistically
71
- // and let forkChoice handle it
72
- if (externalData.dataAvailabilityStatus === DataAvailabilityStatus.PreData) {
73
- throw Error("dataAvailabilityStatus.PreData");
74
- }
75
- }
76
-
77
- const rewards = state.proposerRewards;
78
- metrics?.proposerRewards.set({type: ProposerRewardType.attestation}, rewards.attestations);
79
- metrics?.proposerRewards.set({type: ProposerRewardType.syncAggregate}, rewards.syncAggregate);
80
- metrics?.proposerRewards.set({type: ProposerRewardType.slashing}, rewards.slashing);
81
- }
@@ -1,62 +0,0 @@
1
- import {CompositeViewDU} from "@chainsafe/ssz";
2
- import {FAR_FUTURE_EPOCH, ForkSeq} from "@lodestar/params";
3
- import {ssz} from "@lodestar/types";
4
- import {CachedBeaconStateAllForks, CachedBeaconStateElectra} from "../types.js";
5
- import {computeExitEpochAndUpdateChurn} from "../util/epoch.js";
6
-
7
- /**
8
- * Initiate the exit of the validator with index ``index``.
9
- *
10
- * NOTE: This function takes a `validator` as argument instead of the validator index.
11
- * SSZ TreeViews have a dangerous edge case that may break the code here in a non-obvious way.
12
- * When running `state.validators[i]` you get a SubTree of that validator with a hook to the state.
13
- * Then, when a property of `validator` is set it propagates the changes upwards to the parent tree up to the state.
14
- * This means that `validator` will propagate its new state along with the current state of its parent tree up to
15
- * the state, potentially overwriting changes done in other SubTrees before.
16
- * ```ts
17
- * // default state.validators, all zeroes
18
- * const validatorsA = state.validators
19
- * const validatorsB = state.validators
20
- * validatorsA[0].exitEpoch = 9
21
- * validatorsB[0].exitEpoch = 9 // Setting a value in validatorsB will overwrite all changes from validatorsA
22
- * // validatorsA[0].exitEpoch is 0
23
- * // validatorsB[0].exitEpoch is 9
24
- * ```
25
- * Forcing consumers to pass the SubTree of `validator` directly mitigates this issue.
26
- */
27
- export function initiateValidatorExit(
28
- fork: ForkSeq,
29
- state: CachedBeaconStateAllForks,
30
- validator: CompositeViewDU<typeof ssz.phase0.Validator>
31
- ): void {
32
- const {config, epochCtx} = state;
33
-
34
- // return if validator already initiated exit
35
- if (validator.exitEpoch !== FAR_FUTURE_EPOCH) {
36
- return;
37
- }
38
-
39
- if (fork < ForkSeq.electra) {
40
- // Limits the number of validators that can exit on each epoch.
41
- // Expects all state.validators to follow this rule, i.e. no validator.exitEpoch is greater than exitQueueEpoch.
42
- // If there the churnLimit is reached at this current exitQueueEpoch, advance epoch and reset churn.
43
- if (epochCtx.exitQueueChurn >= epochCtx.churnLimit) {
44
- epochCtx.exitQueueEpoch += 1;
45
- epochCtx.exitQueueChurn = 1; // = 1 to account for this validator with exitQueueEpoch
46
- } else {
47
- // Add this validator to the current exitQueueEpoch churn
48
- epochCtx.exitQueueChurn += 1;
49
- }
50
-
51
- // set validator exit epoch
52
- validator.exitEpoch = epochCtx.exitQueueEpoch;
53
- } else {
54
- // set validator exit epoch
55
- // Note we don't use epochCtx.exitQueueChurn and exitQueueEpoch anymore
56
- validator.exitEpoch = computeExitEpochAndUpdateChurn(
57
- state as CachedBeaconStateElectra,
58
- BigInt(validator.effectiveBalance)
59
- );
60
- }
61
- validator.withdrawableEpoch = validator.exitEpoch + config.MIN_VALIDATOR_WITHDRAWABILITY_DELAY;
62
- }
@@ -1,70 +0,0 @@
1
- import {ForkSeq, MAX_COMMITTEES_PER_SLOT, MAX_VALIDATORS_PER_COMMITTEE} from "@lodestar/params";
2
- import {IndexedAttestation, IndexedAttestationBigint} from "@lodestar/types";
3
- import {getIndexedAttestationBigintSignatureSet, getIndexedAttestationSignatureSet} from "../signatureSets/index.js";
4
- import {CachedBeaconStateAllForks} from "../types.js";
5
- import {verifySignatureSet} from "../util/index.js";
6
-
7
- /**
8
- * Check if `indexedAttestation` has sorted and unique indices and a valid aggregate signature.
9
- */
10
- export function isValidIndexedAttestation(
11
- state: CachedBeaconStateAllForks,
12
- indexedAttestation: IndexedAttestation,
13
- verifySignature: boolean
14
- ): boolean {
15
- if (!isValidIndexedAttestationIndices(state, indexedAttestation.attestingIndices)) {
16
- return false;
17
- }
18
-
19
- if (verifySignature) {
20
- return verifySignatureSet(getIndexedAttestationSignatureSet(state, indexedAttestation));
21
- }
22
- return true;
23
- }
24
-
25
- export function isValidIndexedAttestationBigint(
26
- state: CachedBeaconStateAllForks,
27
- indexedAttestation: IndexedAttestationBigint,
28
- verifySignature: boolean
29
- ): boolean {
30
- if (!isValidIndexedAttestationIndices(state, indexedAttestation.attestingIndices)) {
31
- return false;
32
- }
33
-
34
- if (verifySignature) {
35
- return verifySignatureSet(getIndexedAttestationBigintSignatureSet(state, indexedAttestation));
36
- }
37
- return true;
38
- }
39
-
40
- /**
41
- * Check if `indexedAttestation` has sorted and unique indices and a valid aggregate signature.
42
- */
43
- export function isValidIndexedAttestationIndices(state: CachedBeaconStateAllForks, indices: number[]): boolean {
44
- // verify max number of indices
45
- const maxIndices =
46
- state.config.getForkSeq(state.slot) >= ForkSeq.electra
47
- ? MAX_VALIDATORS_PER_COMMITTEE * MAX_COMMITTEES_PER_SLOT
48
- : MAX_VALIDATORS_PER_COMMITTEE;
49
- if (!(indices.length > 0 && indices.length <= maxIndices)) {
50
- return false;
51
- }
52
-
53
- // verify indices are sorted and unique.
54
- // Just check if they are monotonically increasing,
55
- // instead of creating a set and sorting it. Should be (O(n)) instead of O(n log(n))
56
- let prev = -1;
57
- for (const index of indices) {
58
- if (index <= prev) return false;
59
- prev = index;
60
- }
61
-
62
- // check if indices are out of bounds, by checking the highest index (since it is sorted)
63
- // TODO - SLOW CODE - Does this .length check the tree and is expensive?
64
- const lastIndex = indices.at(-1);
65
- if (lastIndex && lastIndex >= state.validators.length) {
66
- return false;
67
- }
68
-
69
- return true;
70
- }
@@ -1,158 +0,0 @@
1
- import {ForkSeq, MIN_ATTESTATION_INCLUSION_DELAY, SLOTS_PER_EPOCH} from "@lodestar/params";
2
- import {Attestation, Slot, electra, phase0, ssz} from "@lodestar/types";
3
- import {assert, toRootHex} from "@lodestar/utils";
4
- import {CachedBeaconStateAllForks, CachedBeaconStatePhase0} from "../types.js";
5
- import {computeEndSlotAtEpoch, computeEpochAtSlot} from "../util/index.js";
6
- import {isValidIndexedAttestation} from "./index.js";
7
-
8
- /**
9
- * Process an Attestation operation. Validates an attestation and appends it to state.currentEpochAttestations or
10
- * state.previousEpochAttestations to be processed in bulk at the epoch transition.
11
- *
12
- * PERF: Work depends on number of Attestation per block. On mainnet the average is 89.7 / block, with 87.8 participant
13
- * true bits on average. See `packages/state-transition/test/perf/analyzeBlocks.ts`
14
- */
15
- export function processAttestationPhase0(
16
- state: CachedBeaconStatePhase0,
17
- attestation: phase0.Attestation,
18
- verifySignature = true
19
- ): void {
20
- const {epochCtx} = state;
21
- const slot = state.slot;
22
- const data = attestation.data;
23
-
24
- validateAttestation(ForkSeq.phase0, state, attestation);
25
-
26
- const pendingAttestation = ssz.phase0.PendingAttestation.toViewDU({
27
- data: data,
28
- aggregationBits: attestation.aggregationBits,
29
- inclusionDelay: slot - data.slot,
30
- proposerIndex: epochCtx.getBeaconProposer(slot),
31
- });
32
-
33
- if (data.target.epoch === epochCtx.epoch) {
34
- if (!ssz.phase0.Checkpoint.equals(data.source, state.currentJustifiedCheckpoint)) {
35
- throw new Error(
36
- `Attestation source does not equal current justified checkpoint: source=${checkpointToStr(
37
- data.source
38
- )} currentJustifiedCheckpoint=${checkpointToStr(state.currentJustifiedCheckpoint)}`
39
- );
40
- }
41
- state.currentEpochAttestations.push(pendingAttestation);
42
- } else {
43
- if (!ssz.phase0.Checkpoint.equals(data.source, state.previousJustifiedCheckpoint)) {
44
- throw new Error(
45
- `Attestation source does not equal previous justified checkpoint: source=${checkpointToStr(
46
- data.source
47
- )} previousJustifiedCheckpoint=${checkpointToStr(state.previousJustifiedCheckpoint)}`
48
- );
49
- }
50
- state.previousEpochAttestations.push(pendingAttestation);
51
- }
52
-
53
- if (!isValidIndexedAttestation(state, epochCtx.getIndexedAttestation(ForkSeq.phase0, attestation), verifySignature)) {
54
- throw new Error("Attestation is not valid");
55
- }
56
- }
57
-
58
- export function validateAttestation(fork: ForkSeq, state: CachedBeaconStateAllForks, attestation: Attestation): void {
59
- const {epochCtx} = state;
60
- const slot = state.slot;
61
- const data = attestation.data;
62
- const computedEpoch = computeEpochAtSlot(data.slot);
63
- const committeeCount = epochCtx.getCommitteeCountPerSlot(computedEpoch);
64
-
65
- if (!(data.target.epoch === epochCtx.previousShuffling.epoch || data.target.epoch === epochCtx.epoch)) {
66
- throw new Error(
67
- "Attestation target epoch not in previous or current epoch: " +
68
- `targetEpoch=${data.target.epoch} currentEpoch=${epochCtx.epoch}`
69
- );
70
- }
71
- if (!(data.target.epoch === computedEpoch)) {
72
- throw new Error(
73
- "Attestation target epoch does not match epoch computed from slot: " +
74
- `targetEpoch=${data.target.epoch} computedEpoch=${computedEpoch}`
75
- );
76
- }
77
-
78
- // post deneb, the attestations are valid till end of next epoch
79
- if (!(data.slot + MIN_ATTESTATION_INCLUSION_DELAY <= slot && isTimelyTarget(fork, slot - data.slot))) {
80
- const windowStart = data.slot + MIN_ATTESTATION_INCLUSION_DELAY;
81
- const windowEnd = fork >= ForkSeq.deneb ? computeEndSlotAtEpoch(computedEpoch + 1) : data.slot + SLOTS_PER_EPOCH;
82
-
83
- throw new Error(
84
- `Attestation slot not within inclusion window: slot=${data.slot} window=${windowStart}..${windowEnd}`
85
- );
86
- }
87
-
88
- if (fork >= ForkSeq.electra) {
89
- assert.equal(data.index, 0, `AttestationData.index must be zero: index=${data.index}`);
90
- const attestationElectra = attestation as electra.Attestation;
91
- const committeeIndices = attestationElectra.committeeBits.getTrueBitIndexes();
92
-
93
- const lastCommitteeIndex = committeeIndices.at(-1);
94
- if (lastCommitteeIndex === undefined) {
95
- throw Error("Attestation should have at least one committee bit set");
96
- }
97
-
98
- if (lastCommitteeIndex >= committeeCount) {
99
- throw new Error(
100
- `Attestation committee index exceeds committee count: lastCommitteeIndex=${lastCommitteeIndex} numCommittees=${committeeCount}`
101
- );
102
- }
103
-
104
- const validatorsByCommittee = epochCtx.getBeaconCommittees(data.slot, committeeIndices);
105
- const aggregationBitsArray = attestationElectra.aggregationBits.toBoolArray();
106
-
107
- // Total number of attestation participants of every committee specified
108
- let committeeOffset = 0;
109
- for (const committeeValidators of validatorsByCommittee) {
110
- const committeeAggregationBits = aggregationBitsArray.slice(
111
- committeeOffset,
112
- committeeOffset + committeeValidators.length
113
- );
114
-
115
- // Assert aggregation bits in this committee have at least one true bit
116
- if (committeeAggregationBits.every((bit) => !bit)) {
117
- throw new Error("Every committee in aggregation bits must have at least one attester");
118
- }
119
-
120
- committeeOffset += committeeValidators.length;
121
- }
122
-
123
- // Bitfield length matches total number of participants
124
- assert.equal(
125
- attestationElectra.aggregationBits.bitLen,
126
- committeeOffset,
127
- `Attestation aggregation bits length does not match total number of committee participants aggregationBitsLength=${attestation.aggregationBits.bitLen} participantCount=${committeeOffset}`
128
- );
129
- } else {
130
- if (!(data.index < committeeCount)) {
131
- throw new Error(
132
- "Attestation committee index not within current committee count: " +
133
- `committeeIndex=${data.index} committeeCount=${committeeCount}`
134
- );
135
- }
136
-
137
- const committee = epochCtx.getBeaconCommittee(data.slot, data.index);
138
- if (attestation.aggregationBits.bitLen !== committee.length) {
139
- throw new Error(
140
- "Attestation aggregation bits length does not match committee length: " +
141
- `aggregationBitsLength=${attestation.aggregationBits.bitLen} committeeLength=${committee.length}`
142
- );
143
- }
144
- }
145
- }
146
-
147
- // Modified https://github.com/ethereum/consensus-specs/pull/3360
148
- export function isTimelyTarget(fork: ForkSeq, inclusionDistance: Slot): boolean {
149
- // post deneb attestation is valid till end of next epoch for target
150
- if (fork >= ForkSeq.deneb) {
151
- return true;
152
- }
153
- return inclusionDistance <= SLOTS_PER_EPOCH;
154
- }
155
-
156
- export function checkpointToStr(checkpoint: phase0.Checkpoint): string {
157
- return `${toRootHex(checkpoint.root)}:${checkpoint.epoch}`;
158
- }
@@ -1,25 +0,0 @@
1
- import {ForkSeq} from "@lodestar/params";
2
- import {Attestation} from "@lodestar/types";
3
- import {BeaconStateTransitionMetrics} from "../metrics.js";
4
- import {CachedBeaconStateAllForks, CachedBeaconStateAltair, CachedBeaconStatePhase0} from "../types.js";
5
- import {processAttestationPhase0} from "./processAttestationPhase0.js";
6
- import {processAttestationsAltair} from "./processAttestationsAltair.js";
7
-
8
- /**
9
- * TODO
10
- */
11
- export function processAttestations(
12
- fork: ForkSeq,
13
- state: CachedBeaconStateAllForks,
14
- attestations: Attestation[],
15
- verifySignatures = true,
16
- metrics?: BeaconStateTransitionMetrics | null
17
- ): void {
18
- if (fork === ForkSeq.phase0) {
19
- for (const attestation of attestations) {
20
- processAttestationPhase0(state as CachedBeaconStatePhase0, attestation, verifySignatures);
21
- }
22
- } else {
23
- processAttestationsAltair(fork, state as CachedBeaconStateAltair, attestations, verifySignatures, metrics);
24
- }
25
- }