@lodestar/beacon-node 1.42.0-dev.5f2fffc2ce → 1.42.0-dev.6fa48cb5f2
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.
- package/lib/api/impl/beacon/blocks/index.d.ts.map +1 -1
- package/lib/api/impl/beacon/blocks/index.js +36 -17
- package/lib/api/impl/beacon/blocks/index.js.map +1 -1
- package/lib/api/impl/beacon/pool/index.js +1 -1
- package/lib/api/impl/beacon/pool/index.js.map +1 -1
- package/lib/api/impl/beacon/state/index.d.ts.map +1 -1
- package/lib/api/impl/beacon/state/index.js +27 -32
- package/lib/api/impl/beacon/state/index.js.map +1 -1
- package/lib/api/impl/beacon/state/utils.d.ts +4 -4
- package/lib/api/impl/beacon/state/utils.d.ts.map +1 -1
- package/lib/api/impl/beacon/state/utils.js +7 -10
- package/lib/api/impl/beacon/state/utils.js.map +1 -1
- package/lib/api/impl/lodestar/index.d.ts.map +1 -1
- package/lib/api/impl/lodestar/index.js +4 -6
- package/lib/api/impl/lodestar/index.js.map +1 -1
- package/lib/api/impl/proof/index.d.ts.map +1 -1
- package/lib/api/impl/proof/index.js +2 -6
- package/lib/api/impl/proof/index.js.map +1 -1
- package/lib/api/impl/validator/index.d.ts.map +1 -1
- package/lib/api/impl/validator/index.js +27 -27
- package/lib/api/impl/validator/index.js.map +1 -1
- package/lib/api/impl/validator/utils.d.ts +2 -2
- package/lib/api/impl/validator/utils.d.ts.map +1 -1
- package/lib/api/impl/validator/utils.js +3 -3
- package/lib/api/impl/validator/utils.js.map +1 -1
- package/lib/chain/archiveStore/archiveStore.d.ts.map +1 -1
- package/lib/chain/archiveStore/archiveStore.js +1 -0
- package/lib/chain/archiveStore/archiveStore.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/getHistoricalState.d.ts +3 -7
- package/lib/chain/archiveStore/historicalState/getHistoricalState.d.ts.map +1 -1
- package/lib/chain/archiveStore/historicalState/getHistoricalState.js +8 -26
- package/lib/chain/archiveStore/historicalState/getHistoricalState.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/historicalStateRegen.d.ts +2 -2
- package/lib/chain/archiveStore/historicalState/historicalStateRegen.d.ts.map +1 -1
- package/lib/chain/archiveStore/historicalState/historicalStateRegen.js +1 -0
- package/lib/chain/archiveStore/historicalState/historicalStateRegen.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/types.d.ts +2 -0
- package/lib/chain/archiveStore/historicalState/types.d.ts.map +1 -1
- package/lib/chain/archiveStore/historicalState/types.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/worker.js +1 -3
- package/lib/chain/archiveStore/historicalState/worker.js.map +1 -1
- package/lib/chain/archiveStore/interface.d.ts +1 -0
- package/lib/chain/archiveStore/interface.d.ts.map +1 -1
- package/lib/chain/balancesCache.d.ts +2 -2
- package/lib/chain/balancesCache.d.ts.map +1 -1
- package/lib/chain/balancesCache.js +4 -4
- package/lib/chain/balancesCache.js.map +1 -1
- package/lib/chain/blocks/blockInput/types.d.ts +4 -3
- package/lib/chain/blocks/blockInput/types.d.ts.map +1 -1
- package/lib/chain/blocks/blockInput/types.js +1 -0
- package/lib/chain/blocks/blockInput/types.js.map +1 -1
- package/lib/chain/blocks/importBlock.d.ts +3 -3
- package/lib/chain/blocks/importBlock.d.ts.map +1 -1
- package/lib/chain/blocks/importBlock.js +27 -11
- package/lib/chain/blocks/importBlock.js.map +1 -1
- package/lib/chain/blocks/importExecutionPayload.d.ts +48 -0
- package/lib/chain/blocks/importExecutionPayload.d.ts.map +1 -0
- package/lib/chain/blocks/importExecutionPayload.js +158 -0
- package/lib/chain/blocks/importExecutionPayload.js.map +1 -0
- package/lib/chain/blocks/index.js +1 -1
- package/lib/chain/blocks/index.js.map +1 -1
- package/lib/chain/blocks/payloadEnvelopeInput/index.d.ts +3 -0
- package/lib/chain/blocks/payloadEnvelopeInput/index.d.ts.map +1 -0
- package/lib/chain/blocks/payloadEnvelopeInput/index.js +3 -0
- package/lib/chain/blocks/payloadEnvelopeInput/index.js.map +1 -0
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.d.ts +80 -0
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.d.ts.map +1 -0
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.js +248 -0
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.js.map +1 -0
- package/lib/chain/blocks/payloadEnvelopeInput/types.d.ts +29 -0
- package/lib/chain/blocks/payloadEnvelopeInput/types.d.ts.map +1 -0
- package/lib/chain/blocks/payloadEnvelopeInput/types.js +11 -0
- package/lib/chain/blocks/payloadEnvelopeInput/types.js.map +1 -0
- package/lib/chain/blocks/payloadEnvelopeProcessor.d.ts +15 -0
- package/lib/chain/blocks/payloadEnvelopeProcessor.d.ts.map +1 -0
- package/lib/chain/blocks/payloadEnvelopeProcessor.js +46 -0
- package/lib/chain/blocks/payloadEnvelopeProcessor.js.map +1 -0
- package/lib/chain/blocks/types.d.ts +9 -2
- package/lib/chain/blocks/types.d.ts.map +1 -1
- package/lib/chain/blocks/types.js.map +1 -1
- package/lib/chain/blocks/utils/checkpoint.d.ts +2 -2
- package/lib/chain/blocks/utils/checkpoint.d.ts.map +1 -1
- package/lib/chain/blocks/utils/checkpoint.js.map +1 -1
- package/lib/chain/blocks/verifyBlock.d.ts +2 -2
- package/lib/chain/blocks/verifyBlock.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlock.js +4 -4
- package/lib/chain/blocks/verifyBlock.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksExecutionPayloads.d.ts +3 -3
- package/lib/chain/blocks/verifyBlocksExecutionPayloads.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlocksExecutionPayloads.js +3 -3
- package/lib/chain/blocks/verifyBlocksExecutionPayloads.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksSignatures.d.ts +2 -2
- package/lib/chain/blocks/verifyBlocksSignatures.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlocksSignatures.js +1 -1
- package/lib/chain/blocks/verifyBlocksSignatures.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksStateTransitionOnly.d.ts +3 -3
- package/lib/chain/blocks/verifyBlocksStateTransitionOnly.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlocksStateTransitionOnly.js +3 -3
- package/lib/chain/blocks/verifyBlocksStateTransitionOnly.js.map +1 -1
- package/lib/chain/blocks/writePayloadEnvelopeInputToDb.d.ts +12 -0
- package/lib/chain/blocks/writePayloadEnvelopeInputToDb.d.ts.map +1 -0
- package/lib/chain/blocks/writePayloadEnvelopeInputToDb.js +40 -0
- package/lib/chain/blocks/writePayloadEnvelopeInputToDb.js.map +1 -0
- package/lib/chain/chain.d.ts +19 -14
- package/lib/chain/chain.d.ts.map +1 -1
- package/lib/chain/chain.js +75 -42
- package/lib/chain/chain.js.map +1 -1
- package/lib/chain/emitter.d.ts +2 -2
- package/lib/chain/emitter.d.ts.map +1 -1
- package/lib/chain/errors/blockError.d.ts +4 -4
- package/lib/chain/errors/blockError.d.ts.map +1 -1
- package/lib/chain/errors/executionPayloadEnvelope.d.ts +12 -2
- package/lib/chain/errors/executionPayloadEnvelope.d.ts.map +1 -1
- package/lib/chain/errors/executionPayloadEnvelope.js +3 -1
- package/lib/chain/errors/executionPayloadEnvelope.js.map +1 -1
- package/lib/chain/forkChoice/index.d.ts +4 -4
- package/lib/chain/forkChoice/index.d.ts.map +1 -1
- package/lib/chain/forkChoice/index.js +27 -33
- package/lib/chain/forkChoice/index.js.map +1 -1
- package/lib/chain/initState.d.ts +2 -2
- package/lib/chain/initState.d.ts.map +1 -1
- package/lib/chain/initState.js +1 -1
- package/lib/chain/initState.js.map +1 -1
- package/lib/chain/interface.d.ts +17 -15
- package/lib/chain/interface.d.ts.map +1 -1
- package/lib/chain/lightClient/index.d.ts +2 -2
- package/lib/chain/lightClient/index.d.ts.map +1 -1
- package/lib/chain/lightClient/index.js +4 -4
- package/lib/chain/lightClient/index.js.map +1 -1
- package/lib/chain/opPools/aggregatedAttestationPool.d.ts +6 -6
- package/lib/chain/opPools/aggregatedAttestationPool.d.ts.map +1 -1
- package/lib/chain/opPools/aggregatedAttestationPool.js +10 -13
- package/lib/chain/opPools/aggregatedAttestationPool.js.map +1 -1
- package/lib/chain/opPools/opPool.d.ts +3 -3
- package/lib/chain/opPools/opPool.d.ts.map +1 -1
- package/lib/chain/opPools/opPool.js +7 -7
- package/lib/chain/opPools/opPool.js.map +1 -1
- package/lib/chain/opPools/utils.d.ts +2 -2
- package/lib/chain/opPools/utils.d.ts.map +1 -1
- package/lib/chain/opPools/utils.js +2 -2
- package/lib/chain/opPools/utils.js.map +1 -1
- package/lib/chain/options.d.ts +1 -0
- package/lib/chain/options.d.ts.map +1 -1
- package/lib/chain/options.js +1 -0
- package/lib/chain/options.js.map +1 -1
- package/lib/chain/prepareNextSlot.d.ts +2 -2
- package/lib/chain/prepareNextSlot.d.ts.map +1 -1
- package/lib/chain/prepareNextSlot.js +3 -3
- package/lib/chain/prepareNextSlot.js.map +1 -1
- package/lib/chain/produceBlock/computeNewStateRoot.d.ts +4 -4
- package/lib/chain/produceBlock/computeNewStateRoot.d.ts.map +1 -1
- package/lib/chain/produceBlock/computeNewStateRoot.js +8 -4
- package/lib/chain/produceBlock/computeNewStateRoot.js.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.d.ts +5 -5
- package/lib/chain/produceBlock/produceBlockBody.d.ts.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.js +13 -17
- package/lib/chain/produceBlock/produceBlockBody.js.map +1 -1
- package/lib/chain/regen/interface.d.ts +15 -13
- package/lib/chain/regen/interface.d.ts.map +1 -1
- package/lib/chain/regen/interface.js +2 -0
- package/lib/chain/regen/interface.js.map +1 -1
- package/lib/chain/regen/queued.d.ts +14 -14
- package/lib/chain/regen/queued.d.ts.map +1 -1
- package/lib/chain/regen/queued.js.map +1 -1
- package/lib/chain/regen/regen.d.ts +6 -5
- package/lib/chain/regen/regen.d.ts.map +1 -1
- package/lib/chain/regen/regen.js +6 -6
- package/lib/chain/regen/regen.js.map +1 -1
- package/lib/chain/seenCache/index.d.ts +1 -1
- package/lib/chain/seenCache/index.d.ts.map +1 -1
- package/lib/chain/seenCache/index.js +1 -1
- package/lib/chain/seenCache/index.js.map +1 -1
- package/lib/chain/seenCache/seenGossipBlockInput.js +2 -2
- package/lib/chain/seenCache/seenGossipBlockInput.js.map +1 -1
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.d.ts +38 -0
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.d.ts.map +1 -0
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.js +76 -0
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.js.map +1 -0
- package/lib/chain/serializeState.d.ts +2 -2
- package/lib/chain/serializeState.d.ts.map +1 -1
- package/lib/chain/serializeState.js +1 -1
- package/lib/chain/serializeState.js.map +1 -1
- package/lib/chain/shufflingCache.d.ts +2 -2
- package/lib/chain/shufflingCache.d.ts.map +1 -1
- package/lib/chain/shufflingCache.js +3 -4
- package/lib/chain/shufflingCache.js.map +1 -1
- package/lib/chain/stateCache/fifoBlockStateCache.d.ts +6 -6
- package/lib/chain/stateCache/fifoBlockStateCache.d.ts.map +1 -1
- package/lib/chain/stateCache/fifoBlockStateCache.js.map +1 -1
- package/lib/chain/stateCache/persistentCheckpointsCache.d.ts +11 -11
- package/lib/chain/stateCache/persistentCheckpointsCache.d.ts.map +1 -1
- package/lib/chain/stateCache/persistentCheckpointsCache.js +12 -16
- package/lib/chain/stateCache/persistentCheckpointsCache.js.map +1 -1
- package/lib/chain/stateCache/types.d.ts +14 -14
- package/lib/chain/stateCache/types.d.ts.map +1 -1
- package/lib/chain/stateCache/types.js.map +1 -1
- package/lib/chain/validation/attesterSlashing.js +3 -3
- package/lib/chain/validation/attesterSlashing.js.map +1 -1
- package/lib/chain/validation/blobSidecar.js +1 -1
- package/lib/chain/validation/blobSidecar.js.map +1 -1
- package/lib/chain/validation/block.d.ts.map +1 -1
- package/lib/chain/validation/block.js +3 -3
- package/lib/chain/validation/block.js.map +1 -1
- package/lib/chain/validation/blsToExecutionChange.js +2 -2
- package/lib/chain/validation/blsToExecutionChange.js.map +1 -1
- package/lib/chain/validation/dataColumnSidecar.js +1 -1
- package/lib/chain/validation/dataColumnSidecar.js.map +1 -1
- package/lib/chain/validation/executionPayloadBid.d.ts.map +1 -1
- package/lib/chain/validation/executionPayloadBid.js +4 -4
- package/lib/chain/validation/executionPayloadBid.js.map +1 -1
- package/lib/chain/validation/executionPayloadEnvelope.d.ts.map +1 -1
- package/lib/chain/validation/executionPayloadEnvelope.js +29 -19
- package/lib/chain/validation/executionPayloadEnvelope.js.map +1 -1
- package/lib/chain/validation/lightClientFinalityUpdate.js +1 -1
- package/lib/chain/validation/lightClientFinalityUpdate.js.map +1 -1
- package/lib/chain/validation/lightClientOptimisticUpdate.js +1 -1
- package/lib/chain/validation/lightClientOptimisticUpdate.js.map +1 -1
- package/lib/chain/validation/payloadAttestationMessage.d.ts.map +1 -1
- package/lib/chain/validation/payloadAttestationMessage.js +1 -2
- package/lib/chain/validation/payloadAttestationMessage.js.map +1 -1
- package/lib/chain/validation/proposerSlashing.js +1 -1
- package/lib/chain/validation/proposerSlashing.js.map +1 -1
- package/lib/chain/validation/signatureSets/contributionAndProof.d.ts +2 -2
- package/lib/chain/validation/signatureSets/contributionAndProof.d.ts.map +1 -1
- package/lib/chain/validation/signatureSets/contributionAndProof.js +1 -1
- package/lib/chain/validation/signatureSets/contributionAndProof.js.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommittee.d.ts +2 -2
- package/lib/chain/validation/signatureSets/syncCommittee.d.ts.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommittee.js +1 -1
- package/lib/chain/validation/signatureSets/syncCommittee.js.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommitteeContribution.d.ts +2 -2
- package/lib/chain/validation/signatureSets/syncCommitteeContribution.d.ts.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommitteeContribution.js.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommitteeSelectionProof.d.ts +2 -2
- package/lib/chain/validation/signatureSets/syncCommitteeSelectionProof.d.ts.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommitteeSelectionProof.js +1 -1
- package/lib/chain/validation/signatureSets/syncCommitteeSelectionProof.js.map +1 -1
- package/lib/chain/validation/syncCommittee.d.ts +4 -4
- package/lib/chain/validation/syncCommittee.d.ts.map +1 -1
- package/lib/chain/validation/syncCommittee.js +13 -12
- package/lib/chain/validation/syncCommittee.js.map +1 -1
- package/lib/chain/validation/syncCommitteeContributionAndProof.d.ts.map +1 -1
- package/lib/chain/validation/syncCommitteeContributionAndProof.js +1 -1
- package/lib/chain/validation/syncCommitteeContributionAndProof.js.map +1 -1
- package/lib/chain/validation/voluntaryExit.d.ts.map +1 -1
- package/lib/chain/validation/voluntaryExit.js +3 -3
- package/lib/chain/validation/voluntaryExit.js.map +1 -1
- package/lib/chain/validatorMonitor.d.ts +5 -4
- package/lib/chain/validatorMonitor.d.ts.map +1 -1
- package/lib/chain/validatorMonitor.js +13 -8
- package/lib/chain/validatorMonitor.js.map +1 -1
- package/lib/execution/engine/interface.d.ts +2 -2
- package/lib/metrics/metrics/lodestar.d.ts +40 -4
- package/lib/metrics/metrics/lodestar.d.ts.map +1 -1
- package/lib/metrics/metrics/lodestar.js +93 -15
- package/lib/metrics/metrics/lodestar.js.map +1 -1
- package/lib/network/gossip/encoding.d.ts.map +1 -1
- package/lib/network/gossip/encoding.js +15 -0
- package/lib/network/gossip/encoding.js.map +1 -1
- package/lib/network/gossip/topic.d.ts +727 -0
- package/lib/network/gossip/topic.d.ts.map +1 -1
- package/lib/network/interface.d.ts +4 -2
- package/lib/network/interface.d.ts.map +1 -1
- package/lib/network/libp2p/index.d.ts.map +1 -1
- package/lib/network/libp2p/index.js +5 -0
- package/lib/network/libp2p/index.js.map +1 -1
- package/lib/network/network.d.ts +4 -2
- package/lib/network/network.d.ts.map +1 -1
- package/lib/network/network.js +11 -5
- package/lib/network/network.js.map +1 -1
- package/lib/network/processor/extractSlotRootFns.d.ts +1 -1
- package/lib/network/processor/extractSlotRootFns.d.ts.map +1 -1
- package/lib/network/processor/extractSlotRootFns.js +15 -5
- package/lib/network/processor/extractSlotRootFns.js.map +1 -1
- package/lib/network/processor/gossipHandlers.d.ts.map +1 -1
- package/lib/network/processor/gossipHandlers.js +39 -9
- package/lib/network/processor/gossipHandlers.js.map +1 -1
- package/lib/network/processor/index.d.ts +12 -7
- package/lib/network/processor/index.d.ts.map +1 -1
- package/lib/network/processor/index.js +99 -78
- package/lib/network/processor/index.js.map +1 -1
- package/lib/network/reqresp/ReqRespBeaconNode.d.ts +1 -1
- package/lib/network/reqresp/ReqRespBeaconNode.d.ts.map +1 -1
- package/lib/network/reqresp/ReqRespBeaconNode.js +10 -1
- package/lib/network/reqresp/ReqRespBeaconNode.js.map +1 -1
- package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRange.d.ts +8 -0
- package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRange.d.ts.map +1 -0
- package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRange.js +69 -0
- package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRange.js.map +1 -0
- package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRoot.d.ts +6 -0
- package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRoot.d.ts.map +1 -0
- package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRoot.js +28 -0
- package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRoot.js.map +1 -0
- package/lib/network/reqresp/handlers/index.d.ts.map +1 -1
- package/lib/network/reqresp/handlers/index.js +11 -1
- package/lib/network/reqresp/handlers/index.js.map +1 -1
- package/lib/network/reqresp/protocols.d.ts +2 -0
- package/lib/network/reqresp/protocols.d.ts.map +1 -1
- package/lib/network/reqresp/protocols.js +10 -0
- package/lib/network/reqresp/protocols.js.map +1 -1
- package/lib/network/reqresp/rateLimit.d.ts.map +1 -1
- package/lib/network/reqresp/rateLimit.js +8 -0
- package/lib/network/reqresp/rateLimit.js.map +1 -1
- package/lib/network/reqresp/score.d.ts.map +1 -1
- package/lib/network/reqresp/score.js +2 -0
- package/lib/network/reqresp/score.js.map +1 -1
- package/lib/network/reqresp/types.d.ts +8 -2
- package/lib/network/reqresp/types.d.ts.map +1 -1
- package/lib/network/reqresp/types.js +7 -1
- package/lib/network/reqresp/types.js.map +1 -1
- package/lib/node/nodejs.d.ts +2 -2
- package/lib/node/nodejs.d.ts.map +1 -1
- package/lib/node/nodejs.js +1 -4
- package/lib/node/nodejs.js.map +1 -1
- package/lib/node/notifier.d.ts.map +1 -1
- package/lib/node/notifier.js +3 -3
- package/lib/node/notifier.js.map +1 -1
- package/lib/sync/backfill/backfill.d.ts +3 -3
- package/lib/sync/backfill/backfill.d.ts.map +1 -1
- package/lib/sync/backfill/backfill.js +3 -3
- package/lib/sync/backfill/backfill.js.map +1 -1
- package/lib/sync/constants.d.ts +1 -1
- package/lib/sync/constants.js +1 -1
- package/lib/sync/unknownBlock.d.ts +3 -9
- package/lib/sync/unknownBlock.d.ts.map +1 -1
- package/lib/sync/unknownBlock.js +8 -41
- package/lib/sync/unknownBlock.js.map +1 -1
- package/lib/util/sszBytes.d.ts +4 -1
- package/lib/util/sszBytes.d.ts.map +1 -1
- package/lib/util/sszBytes.js +69 -12
- package/lib/util/sszBytes.js.map +1 -1
- package/lib/util/types.d.ts +2 -0
- package/lib/util/types.d.ts.map +1 -1
- package/lib/util/types.js +1 -0
- package/lib/util/types.js.map +1 -1
- package/package.json +16 -16
- package/src/api/impl/beacon/blocks/index.ts +37 -18
- package/src/api/impl/beacon/pool/index.ts +1 -1
- package/src/api/impl/beacon/state/index.ts +29 -41
- package/src/api/impl/beacon/state/utils.ts +11 -25
- package/src/api/impl/lodestar/index.ts +4 -8
- package/src/api/impl/proof/index.ts +2 -9
- package/src/api/impl/validator/index.ts +29 -41
- package/src/api/impl/validator/utils.ts +4 -7
- package/src/chain/archiveStore/archiveStore.ts +1 -0
- package/src/chain/archiveStore/historicalState/getHistoricalState.ts +10 -39
- package/src/chain/archiveStore/historicalState/historicalStateRegen.ts +2 -1
- package/src/chain/archiveStore/historicalState/types.ts +2 -0
- package/src/chain/archiveStore/historicalState/worker.ts +1 -4
- package/src/chain/archiveStore/interface.ts +1 -0
- package/src/chain/balancesCache.ts +5 -11
- package/src/chain/blocks/blockInput/types.ts +4 -3
- package/src/chain/blocks/importBlock.ts +47 -16
- package/src/chain/blocks/importExecutionPayload.ts +236 -0
- package/src/chain/blocks/index.ts +1 -1
- package/src/chain/blocks/payloadEnvelopeInput/index.ts +2 -0
- package/src/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.ts +336 -0
- package/src/chain/blocks/payloadEnvelopeInput/types.ts +33 -0
- package/src/chain/blocks/payloadEnvelopeProcessor.ts +61 -0
- package/src/chain/blocks/types.ts +10 -2
- package/src/chain/blocks/utils/checkpoint.ts +2 -2
- package/src/chain/blocks/verifyBlock.ts +5 -10
- package/src/chain/blocks/verifyBlocksExecutionPayloads.ts +5 -10
- package/src/chain/blocks/verifyBlocksSignatures.ts +3 -3
- package/src/chain/blocks/verifyBlocksStateTransitionOnly.ts +6 -8
- package/src/chain/blocks/writePayloadEnvelopeInputToDb.ts +55 -0
- package/src/chain/chain.ts +112 -70
- package/src/chain/emitter.ts +2 -2
- package/src/chain/errors/blockError.ts +4 -4
- package/src/chain/errors/executionPayloadEnvelope.ts +6 -2
- package/src/chain/forkChoice/index.ts +33 -52
- package/src/chain/initState.ts +7 -2
- package/src/chain/interface.ts +18 -16
- package/src/chain/lightClient/index.ts +9 -22
- package/src/chain/opPools/aggregatedAttestationPool.ts +15 -21
- package/src/chain/opPools/opPool.ts +13 -14
- package/src/chain/opPools/utils.ts +4 -4
- package/src/chain/options.ts +2 -0
- package/src/chain/prepareNextSlot.ts +6 -8
- package/src/chain/produceBlock/computeNewStateRoot.ts +11 -10
- package/src/chain/produceBlock/produceBlockBody.ts +23 -50
- package/src/chain/regen/interface.ts +15 -17
- package/src/chain/regen/queued.ts +16 -20
- package/src/chain/regen/regen.ts +16 -17
- package/src/chain/seenCache/index.ts +1 -1
- package/src/chain/seenCache/seenGossipBlockInput.ts +2 -2
- package/src/chain/seenCache/seenPayloadEnvelopeInput.ts +106 -0
- package/src/chain/serializeState.ts +3 -3
- package/src/chain/shufflingCache.ts +5 -7
- package/src/chain/stateCache/fifoBlockStateCache.ts +7 -7
- package/src/chain/stateCache/persistentCheckpointsCache.ts +27 -42
- package/src/chain/stateCache/types.ts +14 -18
- package/src/chain/validation/attesterSlashing.ts +3 -3
- package/src/chain/validation/blobSidecar.ts +1 -1
- package/src/chain/validation/block.ts +2 -4
- package/src/chain/validation/blsToExecutionChange.ts +2 -2
- package/src/chain/validation/dataColumnSidecar.ts +1 -1
- package/src/chain/validation/executionPayloadBid.ts +3 -7
- package/src/chain/validation/executionPayloadEnvelope.ts +36 -29
- package/src/chain/validation/lightClientFinalityUpdate.ts +1 -1
- package/src/chain/validation/lightClientOptimisticUpdate.ts +1 -1
- package/src/chain/validation/payloadAttestationMessage.ts +2 -4
- package/src/chain/validation/proposerSlashing.ts +1 -1
- package/src/chain/validation/signatureSets/contributionAndProof.ts +2 -7
- package/src/chain/validation/signatureSets/syncCommittee.ts +2 -7
- package/src/chain/validation/signatureSets/syncCommitteeContribution.ts +2 -2
- package/src/chain/validation/signatureSets/syncCommitteeSelectionProof.ts +2 -7
- package/src/chain/validation/syncCommittee.ts +21 -20
- package/src/chain/validation/syncCommitteeContributionAndProof.ts +5 -10
- package/src/chain/validation/voluntaryExit.ts +3 -8
- package/src/chain/validatorMonitor.ts +23 -12
- package/src/execution/engine/interface.ts +2 -2
- package/src/metrics/metrics/lodestar.ts +100 -19
- package/src/network/gossip/encoding.ts +16 -0
- package/src/network/interface.ts +15 -2
- package/src/network/libp2p/index.ts +5 -0
- package/src/network/network.ts +34 -6
- package/src/network/processor/extractSlotRootFns.ts +19 -6
- package/src/network/processor/gossipHandlers.ts +45 -8
- package/src/network/processor/index.ts +110 -89
- package/src/network/reqresp/ReqRespBeaconNode.ts +14 -1
- package/src/network/reqresp/handlers/executionPayloadEnvelopesByRange.ts +94 -0
- package/src/network/reqresp/handlers/executionPayloadEnvelopesByRoot.ts +43 -0
- package/src/network/reqresp/handlers/index.ts +12 -0
- package/src/network/reqresp/protocols.ts +12 -0
- package/src/network/reqresp/rateLimit.ts +18 -0
- package/src/network/reqresp/score.ts +2 -0
- package/src/network/reqresp/types.ts +13 -0
- package/src/node/nodejs.ts +3 -5
- package/src/node/notifier.ts +4 -10
- package/src/sync/backfill/backfill.ts +4 -4
- package/src/sync/constants.ts +1 -1
- package/src/sync/unknownBlock.ts +10 -50
- package/src/util/sszBytes.ts +90 -10
- package/src/util/types.ts +6 -0
- package/lib/chain/seenCache/seenExecutionPayloadEnvelope.d.ts +0 -15
- package/lib/chain/seenCache/seenExecutionPayloadEnvelope.d.ts.map +0 -1
- package/lib/chain/seenCache/seenExecutionPayloadEnvelope.js +0 -28
- package/lib/chain/seenCache/seenExecutionPayloadEnvelope.js.map +0 -1
- package/src/chain/seenCache/seenExecutionPayloadEnvelope.ts +0 -34
|
@@ -176,7 +176,7 @@ export async function validateGossipBlobSidecar(
|
|
|
176
176
|
// MAY be queued for later processing while proposers for the block's branch are calculated -- in such
|
|
177
177
|
// a case _do not_ `REJECT`, instead `IGNORE` this message.
|
|
178
178
|
const proposerIndex = blobSidecar.signedBlockHeader.message.proposerIndex;
|
|
179
|
-
if (blockState.
|
|
179
|
+
if (blockState.getBeaconProposer(blobSlot) !== proposerIndex) {
|
|
180
180
|
throw new BlobSidecarGossipError(GossipAction.REJECT, {
|
|
181
181
|
code: BlobSidecarErrorCode.INCORRECT_PROPOSER,
|
|
182
182
|
proposerIndex,
|
|
@@ -6,8 +6,6 @@ import {
|
|
|
6
6
|
computeTimeAtSlot,
|
|
7
7
|
getBlockProposerSignatureSet,
|
|
8
8
|
isExecutionBlockBodyType,
|
|
9
|
-
isExecutionEnabled,
|
|
10
|
-
isExecutionStateType,
|
|
11
9
|
} from "@lodestar/state-transition";
|
|
12
10
|
import {SignedBeaconBlock, deneb, gloas, isGloasBeaconBlock} from "@lodestar/types";
|
|
13
11
|
import {byteArrayEquals, sleep, toRootHex} from "@lodestar/utils";
|
|
@@ -176,7 +174,7 @@ export async function validateGossipBlock(
|
|
|
176
174
|
if (isForkPostBellatrix(fork) && !isForkPostGloas(fork)) {
|
|
177
175
|
if (!isExecutionBlockBodyType(block.body)) throw Error("Not execution block body type");
|
|
178
176
|
const executionPayload = block.body.executionPayload;
|
|
179
|
-
if (isExecutionStateType
|
|
177
|
+
if (blockState.isExecutionStateType && blockState.isExecutionEnabled(block)) {
|
|
180
178
|
const expectedTimestamp = computeTimeAtSlot(config, blockSlot, chain.genesisTime);
|
|
181
179
|
if (executionPayload.timestamp !== computeTimeAtSlot(config, blockSlot, chain.genesisTime)) {
|
|
182
180
|
throw new BlockGossipError(GossipAction.REJECT, {
|
|
@@ -206,7 +204,7 @@ export async function validateGossipBlock(
|
|
|
206
204
|
// shuffling (defined by parent_root/slot). If the proposer_index cannot immediately be verified against the expected
|
|
207
205
|
// shuffling, the block MAY be queued for later processing while proposers for the block's branch are calculated --
|
|
208
206
|
// in such a case do not REJECT, instead IGNORE this message.
|
|
209
|
-
if (blockState.
|
|
207
|
+
if (blockState.getBeaconProposer(blockSlot) !== proposerIndex) {
|
|
210
208
|
throw new BlockGossipError(GossipAction.REJECT, {code: BlockErrorCode.INCORRECT_PROPOSER, proposerIndex});
|
|
211
209
|
}
|
|
212
210
|
|
|
@@ -39,12 +39,12 @@ async function validateBlsToExecutionChange(
|
|
|
39
39
|
const state = chain.getHeadState();
|
|
40
40
|
const {config} = chain;
|
|
41
41
|
const addressChange = blsToExecutionChange.message;
|
|
42
|
-
if (addressChange.validatorIndex >= state.
|
|
42
|
+
if (addressChange.validatorIndex >= state.validatorCount) {
|
|
43
43
|
throw new BlsToExecutionChangeError(GossipAction.REJECT, {
|
|
44
44
|
code: BlsToExecutionChangeErrorCode.INVALID,
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
const validator = state.
|
|
47
|
+
const validator = state.getValidator(addressChange.validatorIndex);
|
|
48
48
|
// [REJECT] All of the conditions within process_bls_to_execution_change pass validation.
|
|
49
49
|
// verifySignature = false, verified in batch below
|
|
50
50
|
const {valid} = isValidBlsToExecutionChange(config, validator, blsToExecutionChange, false);
|
|
@@ -122,7 +122,7 @@ export async function validateGossipDataColumnSidecar(
|
|
|
122
122
|
// while proposers for the block's branch are calculated -- in such a case do not REJECT, instead IGNORE
|
|
123
123
|
// this message.
|
|
124
124
|
const proposerIndex = blockHeader.proposerIndex;
|
|
125
|
-
const expectedProposerIndex = blockState.
|
|
125
|
+
const expectedProposerIndex = blockState.getBeaconProposer(blockHeader.slot);
|
|
126
126
|
|
|
127
127
|
if (proposerIndex !== expectedProposerIndex) {
|
|
128
128
|
throw new DataColumnSidecarGossipError(GossipAction.REJECT, {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import {PublicKey} from "@chainsafe/blst";
|
|
2
2
|
import {
|
|
3
|
-
CachedBeaconStateGloas,
|
|
4
|
-
canBuilderCoverBid,
|
|
5
3
|
createSingleSignatureSetFromComponents,
|
|
6
4
|
getExecutionPayloadBidSigningRoot,
|
|
7
5
|
isActiveBuilder,
|
|
@@ -33,9 +31,7 @@ async function validateExecutionPayloadBid(
|
|
|
33
31
|
const bid = signedExecutionPayloadBid.message;
|
|
34
32
|
const parentBlockRootHex = toRootHex(bid.parentBlockRoot);
|
|
35
33
|
const parentBlockHashHex = toRootHex(bid.parentBlockHash);
|
|
36
|
-
const state =
|
|
37
|
-
RegenCaller.validateGossipExecutionPayloadBid
|
|
38
|
-
)) as CachedBeaconStateGloas;
|
|
34
|
+
const state = await chain.getHeadStateAtCurrentEpoch(RegenCaller.validateGossipExecutionPayloadBid);
|
|
39
35
|
|
|
40
36
|
// [IGNORE] `bid.slot` is the current slot or the next slot.
|
|
41
37
|
const currentSlot = chain.clock.currentSlot;
|
|
@@ -53,7 +49,7 @@ async function validateExecutionPayloadBid(
|
|
|
53
49
|
|
|
54
50
|
// [REJECT] `bid.builder_index` is a valid/active builder index -- i.e.
|
|
55
51
|
// `is_active_builder(state, bid.builder_index)` returns `True`.
|
|
56
|
-
const builder = state.
|
|
52
|
+
const builder = state.getBuilder(bid.builderIndex);
|
|
57
53
|
if (!isActiveBuilder(builder, state.finalizedCheckpoint.epoch)) {
|
|
58
54
|
throw new ExecutionPayloadBidError(GossipAction.REJECT, {
|
|
59
55
|
code: ExecutionPayloadBidErrorCode.BUILDER_NOT_ELIGIBLE,
|
|
@@ -99,7 +95,7 @@ async function validateExecutionPayloadBid(
|
|
|
99
95
|
}
|
|
100
96
|
// [IGNORE] `bid.value` is less or equal than the builder's excess balance --
|
|
101
97
|
// i.e. `can_builder_cover_bid(state, builder_index, amount)` returns `True`.
|
|
102
|
-
if (!canBuilderCoverBid(
|
|
98
|
+
if (!state.canBuilderCoverBid(bid.builderIndex, bid.value)) {
|
|
103
99
|
throw new ExecutionPayloadBidError(GossipAction.IGNORE, {
|
|
104
100
|
code: ExecutionPayloadBidErrorCode.BID_TOO_HIGH,
|
|
105
101
|
bidValue: bid.value,
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
CachedBeaconStateGloas,
|
|
4
|
-
computeStartSlotAtEpoch,
|
|
5
|
-
createSingleSignatureSetFromComponents,
|
|
6
|
-
getExecutionPayloadEnvelopeSigningRoot,
|
|
7
|
-
} from "@lodestar/state-transition";
|
|
1
|
+
import {PayloadStatus} from "@lodestar/fork-choice";
|
|
2
|
+
import {computeStartSlotAtEpoch, getExecutionPayloadEnvelopeSignatureSet} from "@lodestar/state-transition";
|
|
8
3
|
import {gloas} from "@lodestar/types";
|
|
9
4
|
import {toRootHex} from "@lodestar/utils";
|
|
10
5
|
import {ExecutionPayloadEnvelopeError, ExecutionPayloadEnvelopeErrorCode, GossipAction} from "../errors/index.js";
|
|
11
6
|
import {IBeaconChain} from "../index.js";
|
|
7
|
+
import {RegenCaller} from "../regen/index.js";
|
|
12
8
|
|
|
13
9
|
export async function validateApiExecutionPayloadEnvelope(
|
|
14
10
|
chain: IBeaconChain,
|
|
@@ -47,7 +43,9 @@ async function validateExecutionPayloadEnvelope(
|
|
|
47
43
|
|
|
48
44
|
// [IGNORE] The node has not seen another valid
|
|
49
45
|
// `SignedExecutionPayloadEnvelope` for this block root from this builder.
|
|
50
|
-
|
|
46
|
+
const envelopeBlock = chain.forkChoice.getBlockHex(blockRootHex, PayloadStatus.FULL);
|
|
47
|
+
const payloadInput = chain.seenPayloadEnvelopeInputCache.get(blockRootHex);
|
|
48
|
+
if (envelopeBlock || payloadInput?.hasPayloadEnvelope()) {
|
|
51
49
|
throw new ExecutionPayloadEnvelopeError(GossipAction.IGNORE, {
|
|
52
50
|
code: ExecutionPayloadEnvelopeErrorCode.ENVELOPE_ALREADY_KNOWN,
|
|
53
51
|
blockRoot: blockRootHex,
|
|
@@ -55,6 +53,14 @@ async function validateExecutionPayloadEnvelope(
|
|
|
55
53
|
});
|
|
56
54
|
}
|
|
57
55
|
|
|
56
|
+
if (!payloadInput) {
|
|
57
|
+
// PayloadEnvelopeInput should have been created during block import
|
|
58
|
+
throw new ExecutionPayloadEnvelopeError(GossipAction.IGNORE, {
|
|
59
|
+
code: ExecutionPayloadEnvelopeErrorCode.PAYLOAD_ENVELOPE_INPUT_MISSING,
|
|
60
|
+
blockRoot: blockRootHex,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
58
64
|
// [IGNORE] The envelope is from a slot greater than or equal to the latest finalized slot -- i.e. validate that `envelope.slot >= compute_start_slot_at_epoch(store.finalized_checkpoint.epoch)`
|
|
59
65
|
const finalizedCheckpoint = chain.forkChoice.getFinalizedCheckpoint();
|
|
60
66
|
const finalizedSlot = computeStartSlotAtEpoch(finalizedCheckpoint.epoch);
|
|
@@ -79,45 +85,46 @@ async function validateExecutionPayloadEnvelope(
|
|
|
79
85
|
});
|
|
80
86
|
}
|
|
81
87
|
|
|
82
|
-
if (block.builderIndex == null || block.blockHashFromBid == null) {
|
|
83
|
-
// This indicates this block is a pre-gloas block which is wrong
|
|
84
|
-
throw new ExecutionPayloadEnvelopeError(GossipAction.IGNORE, {
|
|
85
|
-
code: ExecutionPayloadEnvelopeErrorCode.CACHE_FAIL,
|
|
86
|
-
blockRoot: blockRootHex,
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
|
|
90
88
|
// [REJECT] `envelope.builder_index == bid.builder_index`
|
|
91
|
-
if (envelope.builderIndex !==
|
|
89
|
+
if (envelope.builderIndex !== payloadInput.getBuilderIndex()) {
|
|
92
90
|
throw new ExecutionPayloadEnvelopeError(GossipAction.REJECT, {
|
|
93
91
|
code: ExecutionPayloadEnvelopeErrorCode.BUILDER_INDEX_MISMATCH,
|
|
94
92
|
envelopeBuilderIndex: envelope.builderIndex,
|
|
95
|
-
bidBuilderIndex:
|
|
93
|
+
bidBuilderIndex: payloadInput.getBuilderIndex(),
|
|
96
94
|
});
|
|
97
95
|
}
|
|
98
96
|
|
|
99
97
|
// [REJECT] `payload.block_hash == bid.block_hash`
|
|
100
|
-
if (toRootHex(payload.blockHash) !==
|
|
98
|
+
if (toRootHex(payload.blockHash) !== payloadInput.getBlockHashHex()) {
|
|
101
99
|
throw new ExecutionPayloadEnvelopeError(GossipAction.REJECT, {
|
|
102
100
|
code: ExecutionPayloadEnvelopeErrorCode.BLOCK_HASH_MISMATCH,
|
|
103
101
|
envelopeBlockHash: toRootHex(payload.blockHash),
|
|
104
|
-
bidBlockHash:
|
|
102
|
+
bidBlockHash: payloadInput.getBlockHashHex(),
|
|
105
103
|
});
|
|
106
104
|
}
|
|
107
105
|
|
|
108
|
-
//
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
106
|
+
// Get the post block state which is the pre-payload state to verify the builder's signature.
|
|
107
|
+
const blockState = await chain.regen
|
|
108
|
+
.getState(block.stateRoot, RegenCaller.validateGossipPayloadEnvelope)
|
|
109
|
+
.catch(() => {
|
|
110
|
+
throw new ExecutionPayloadEnvelopeError(GossipAction.IGNORE, {
|
|
111
|
+
code: ExecutionPayloadEnvelopeErrorCode.UNKNOWN_BLOCK_STATE,
|
|
112
|
+
blockRoot: blockRootHex,
|
|
113
|
+
slot: envelope.slot,
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
const signatureSet = getExecutionPayloadEnvelopeSignatureSet(
|
|
118
|
+
chain.config,
|
|
119
|
+
chain.pubkeyCache,
|
|
120
|
+
blockState,
|
|
121
|
+
executionPayloadEnvelope,
|
|
122
|
+
payloadInput.proposerIndex
|
|
114
123
|
);
|
|
115
124
|
|
|
116
|
-
if (!(await chain.bls.verifySignatureSets([signatureSet]))) {
|
|
125
|
+
if (!(await chain.bls.verifySignatureSets([signatureSet], {verifyOnMainThread: true}))) {
|
|
117
126
|
throw new ExecutionPayloadEnvelopeError(GossipAction.REJECT, {
|
|
118
127
|
code: ExecutionPayloadEnvelopeErrorCode.INVALID_SIGNATURE,
|
|
119
128
|
});
|
|
120
129
|
}
|
|
121
|
-
|
|
122
|
-
chain.seenExecutionPayloadEnvelopes.add(blockRootHex, envelope.slot);
|
|
123
130
|
}
|
|
@@ -6,7 +6,7 @@ import {LightClientError, LightClientErrorCode} from "../errors/lightClientError
|
|
|
6
6
|
import {IBeaconChain} from "../interface.js";
|
|
7
7
|
import {updateReceivedTooEarly} from "./lightClientOptimisticUpdate.js";
|
|
8
8
|
|
|
9
|
-
// https://github.com/ethereum/consensus-specs/blob/
|
|
9
|
+
// https://github.com/ethereum/consensus-specs/blob/v1.6.1/specs/altair/light-client/p2p-interface.md#light_client_finality_update
|
|
10
10
|
export function validateLightClientFinalityUpdate(
|
|
11
11
|
config: ChainForkConfig,
|
|
12
12
|
chain: IBeaconChain,
|
|
@@ -6,7 +6,7 @@ import {GossipAction} from "../errors/index.js";
|
|
|
6
6
|
import {LightClientError, LightClientErrorCode} from "../errors/lightClientError.js";
|
|
7
7
|
import {IBeaconChain} from "../interface.js";
|
|
8
8
|
|
|
9
|
-
// https://github.com/ethereum/consensus-specs/blob/
|
|
9
|
+
// https://github.com/ethereum/consensus-specs/blob/v1.6.1/specs/altair/light-client/p2p-interface.md#light_client_optimistic_update
|
|
10
10
|
export function validateLightClientOptimisticUpdate(
|
|
11
11
|
config: ChainForkConfig,
|
|
12
12
|
chain: IBeaconChain,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
CachedBeaconStateGloas,
|
|
3
2
|
computeEpochAtSlot,
|
|
4
3
|
createSingleSignatureSetFromComponents,
|
|
5
4
|
getPayloadAttestationDataSigningRoot,
|
|
@@ -66,7 +65,7 @@ async function validatePayloadAttestationMessage(
|
|
|
66
65
|
});
|
|
67
66
|
}
|
|
68
67
|
|
|
69
|
-
const state = chain.getHeadState()
|
|
68
|
+
const state = chain.getHeadState();
|
|
70
69
|
|
|
71
70
|
// [REJECT] The message's block `data.beacon_block_root` passes validation.
|
|
72
71
|
// TODO GLOAS: implement this. Technically if we cannot get proto block from fork choice,
|
|
@@ -75,8 +74,7 @@ async function validatePayloadAttestationMessage(
|
|
|
75
74
|
// [REJECT] The message's validator index is within the payload committee in
|
|
76
75
|
// `get_ptc(state, data.slot)`. The `state` is the head state corresponding to
|
|
77
76
|
// processing the block up to the current slot as determined by the fork choice.
|
|
78
|
-
const
|
|
79
|
-
const validatorCommitteeIndex = ptc.indexOf(validatorIndex);
|
|
77
|
+
const validatorCommitteeIndex = state.getIndexInPayloadTimelinessCommittee(validatorIndex, data.slot);
|
|
80
78
|
|
|
81
79
|
if (validatorCommitteeIndex === -1) {
|
|
82
80
|
throw new PayloadAttestationError(GossipAction.REJECT, {
|
|
@@ -35,7 +35,7 @@ async function validateProposerSlashing(
|
|
|
35
35
|
|
|
36
36
|
// [REJECT] All of the conditions within process_proposer_slashing pass validation.
|
|
37
37
|
try {
|
|
38
|
-
const proposer = state.
|
|
38
|
+
const proposer = state.getValidator(proposerSlashing.signedHeader1.message.proposerIndex);
|
|
39
39
|
// verifySignature = false, verified in batch below
|
|
40
40
|
assertValidProposerSlashing(chain.config, chain.pubkeyCache, state.slot, proposerSlashing, proposer, false);
|
|
41
41
|
} catch (e) {
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import {BeaconConfig} from "@lodestar/config";
|
|
2
2
|
import {DOMAIN_CONTRIBUTION_AND_PROOF} from "@lodestar/params";
|
|
3
|
-
import {
|
|
4
|
-
CachedBeaconStateAllForks,
|
|
5
|
-
ISignatureSet,
|
|
6
|
-
SignatureSetType,
|
|
7
|
-
computeSigningRoot,
|
|
8
|
-
} from "@lodestar/state-transition";
|
|
3
|
+
import {IBeaconStateView, ISignatureSet, SignatureSetType, computeSigningRoot} from "@lodestar/state-transition";
|
|
9
4
|
import {altair, ssz} from "@lodestar/types";
|
|
10
5
|
|
|
11
6
|
export function getContributionAndProofSignatureSet(
|
|
12
7
|
config: BeaconConfig,
|
|
13
|
-
state:
|
|
8
|
+
state: IBeaconStateView,
|
|
14
9
|
signedContributionAndProof: altair.SignedContributionAndProof
|
|
15
10
|
): ISignatureSet {
|
|
16
11
|
const domain = config.getDomain(
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import {BeaconConfig} from "@lodestar/config";
|
|
2
2
|
import {DOMAIN_SYNC_COMMITTEE} from "@lodestar/params";
|
|
3
|
-
import {
|
|
4
|
-
CachedBeaconStateAllForks,
|
|
5
|
-
ISignatureSet,
|
|
6
|
-
SignatureSetType,
|
|
7
|
-
computeSigningRoot,
|
|
8
|
-
} from "@lodestar/state-transition";
|
|
3
|
+
import {IBeaconStateView, ISignatureSet, SignatureSetType, computeSigningRoot} from "@lodestar/state-transition";
|
|
9
4
|
import {altair, ssz} from "@lodestar/types";
|
|
10
5
|
|
|
11
6
|
export function getSyncCommitteeSignatureSet(
|
|
12
7
|
config: BeaconConfig,
|
|
13
|
-
state:
|
|
8
|
+
state: IBeaconStateView,
|
|
14
9
|
syncCommittee: altair.SyncCommitteeMessage
|
|
15
10
|
): ISignatureSet {
|
|
16
11
|
const domain = config.getDomain(state.slot, DOMAIN_SYNC_COMMITTEE, syncCommittee.slot);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {BeaconConfig} from "@lodestar/config";
|
|
2
2
|
import {DOMAIN_SYNC_COMMITTEE} from "@lodestar/params";
|
|
3
|
-
import {
|
|
3
|
+
import {IBeaconStateView, ISignatureSet, SignatureSetType, computeSigningRoot} from "@lodestar/state-transition";
|
|
4
4
|
import {altair, ssz} from "@lodestar/types";
|
|
5
5
|
|
|
6
6
|
export function getSyncCommitteeContributionSignatureSet(
|
|
7
7
|
config: BeaconConfig,
|
|
8
|
-
state:
|
|
8
|
+
state: IBeaconStateView,
|
|
9
9
|
contribution: altair.SyncCommitteeContribution,
|
|
10
10
|
participantIndices: number[]
|
|
11
11
|
): ISignatureSet {
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import {BeaconConfig} from "@lodestar/config";
|
|
2
2
|
import {DOMAIN_SYNC_COMMITTEE_SELECTION_PROOF} from "@lodestar/params";
|
|
3
|
-
import {
|
|
4
|
-
CachedBeaconStateAllForks,
|
|
5
|
-
ISignatureSet,
|
|
6
|
-
SignatureSetType,
|
|
7
|
-
computeSigningRoot,
|
|
8
|
-
} from "@lodestar/state-transition";
|
|
3
|
+
import {IBeaconStateView, ISignatureSet, SignatureSetType, computeSigningRoot} from "@lodestar/state-transition";
|
|
9
4
|
import {altair, ssz} from "@lodestar/types";
|
|
10
5
|
|
|
11
6
|
export function getSyncCommitteeSelectionProofSignatureSet(
|
|
12
7
|
config: BeaconConfig,
|
|
13
|
-
state:
|
|
8
|
+
state: IBeaconStateView,
|
|
14
9
|
contributionAndProof: altair.ContributionAndProof
|
|
15
10
|
): ISignatureSet {
|
|
16
11
|
const slot = contributionAndProof.contribution.slot;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {SYNC_COMMITTEE_SUBNET_COUNT, SYNC_COMMITTEE_SUBNET_SIZE} from "@lodestar/params";
|
|
2
|
-
import {
|
|
2
|
+
import {IBeaconStateView} from "@lodestar/state-transition";
|
|
3
3
|
import {SubnetID, altair} from "@lodestar/types";
|
|
4
4
|
import {toRootHex} from "@lodestar/utils";
|
|
5
5
|
import {GossipAction, SyncCommitteeError, SyncCommitteeErrorCode} from "../errors/index.js";
|
|
@@ -15,12 +15,12 @@ export async function validateGossipSyncCommittee(
|
|
|
15
15
|
chain: IBeaconChain,
|
|
16
16
|
syncCommittee: altair.SyncCommitteeMessage,
|
|
17
17
|
subnet: SubnetID
|
|
18
|
-
): Promise<{
|
|
18
|
+
): Promise<{indicesInSubcommittee: IndexInSubcommittee[]}> {
|
|
19
19
|
const {slot, validatorIndex, beaconBlockRoot} = syncCommittee;
|
|
20
20
|
const messageRoot = toRootHex(beaconBlockRoot);
|
|
21
21
|
|
|
22
22
|
const headState = chain.getHeadState();
|
|
23
|
-
const
|
|
23
|
+
const indicesInSubcommittee = validateGossipSyncCommitteeExceptSig(chain, headState, subnet, syncCommittee);
|
|
24
24
|
|
|
25
25
|
// [IGNORE] The signature's slot is for the current slot, i.e. sync_committee_signature.slot == current_slot.
|
|
26
26
|
// > Checked in validateGossipSyncCommitteeExceptSig()
|
|
@@ -68,12 +68,12 @@ export async function validateGossipSyncCommittee(
|
|
|
68
68
|
// Register this valid item as seen
|
|
69
69
|
chain.seenSyncCommitteeMessages.add(slot, subnet, validatorIndex, messageRoot);
|
|
70
70
|
|
|
71
|
-
return {
|
|
71
|
+
return {indicesInSubcommittee};
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
export async function validateApiSyncCommittee(
|
|
75
75
|
chain: IBeaconChain,
|
|
76
|
-
headState:
|
|
76
|
+
headState: IBeaconStateView,
|
|
77
77
|
syncCommittee: altair.SyncCommitteeMessage
|
|
78
78
|
): Promise<void> {
|
|
79
79
|
const prioritizeBls = true;
|
|
@@ -85,7 +85,7 @@ export async function validateApiSyncCommittee(
|
|
|
85
85
|
*/
|
|
86
86
|
async function validateSyncCommitteeSigOnly(
|
|
87
87
|
chain: IBeaconChain,
|
|
88
|
-
headState:
|
|
88
|
+
headState: IBeaconStateView,
|
|
89
89
|
syncCommittee: altair.SyncCommitteeMessage,
|
|
90
90
|
prioritizeBls = false
|
|
91
91
|
): Promise<void> {
|
|
@@ -102,10 +102,10 @@ async function validateSyncCommitteeSigOnly(
|
|
|
102
102
|
*/
|
|
103
103
|
export function validateGossipSyncCommitteeExceptSig(
|
|
104
104
|
chain: IBeaconChain,
|
|
105
|
-
headState:
|
|
105
|
+
headState: IBeaconStateView,
|
|
106
106
|
subnet: SubnetID,
|
|
107
107
|
data: Pick<altair.SyncCommitteeMessage, "slot" | "validatorIndex">
|
|
108
|
-
): IndexInSubcommittee {
|
|
108
|
+
): IndexInSubcommittee[] {
|
|
109
109
|
const {slot, validatorIndex} = data;
|
|
110
110
|
// [IGNORE] The signature's slot is for the current slot, i.e. sync_committee_signature.slot == current_slot.
|
|
111
111
|
// (with a MAXIMUM_GOSSIP_CLOCK_DISPARITY allowance)
|
|
@@ -127,39 +127,40 @@ export function validateGossipSyncCommitteeExceptSig(
|
|
|
127
127
|
|
|
128
128
|
// [REJECT] The subnet_id is valid for the given validator, i.e. subnet_id in compute_subnets_for_sync_committee(state, sync_committee_signature.validator_index).
|
|
129
129
|
// Note this validation implies the validator is part of the broader current sync committee along with the correct subcommittee.
|
|
130
|
-
const
|
|
131
|
-
if (
|
|
130
|
+
const indicesInSubcommittee = getIndicesInSubcommittee(headState, subnet, data);
|
|
131
|
+
if (indicesInSubcommittee === null) {
|
|
132
132
|
throw new SyncCommitteeError(GossipAction.REJECT, {
|
|
133
133
|
code: SyncCommitteeErrorCode.VALIDATOR_NOT_IN_SYNC_COMMITTEE,
|
|
134
134
|
validatorIndex,
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
return
|
|
138
|
+
return indicesInSubcommittee;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
/**
|
|
142
|
-
* Returns
|
|
143
|
-
* Returns `null` if not part of the sync committee or not part of the given `subnet
|
|
142
|
+
* Returns all IndexInSubcommittee positions of the given `subnet`.
|
|
143
|
+
* Returns `null` if not part of the sync committee or not part of the given `subnet`.
|
|
144
|
+
* A validator may appear multiple times in the same subcommittee.
|
|
144
145
|
*/
|
|
145
|
-
function
|
|
146
|
-
headState:
|
|
146
|
+
function getIndicesInSubcommittee(
|
|
147
|
+
headState: IBeaconStateView,
|
|
147
148
|
subnet: SubnetID,
|
|
148
149
|
data: Pick<altair.SyncCommitteeMessage, "slot" | "validatorIndex">
|
|
149
|
-
): IndexInSubcommittee | null {
|
|
150
|
-
const syncCommittee = headState.
|
|
150
|
+
): IndexInSubcommittee[] | null {
|
|
151
|
+
const syncCommittee = headState.getIndexedSyncCommittee(data.slot);
|
|
151
152
|
const indexesInCommittee = syncCommittee.validatorIndexMap.get(data.validatorIndex);
|
|
152
153
|
if (indexesInCommittee === undefined) {
|
|
153
154
|
// Not part of the sync committee
|
|
154
155
|
return null;
|
|
155
156
|
}
|
|
156
157
|
|
|
158
|
+
const indices: IndexInSubcommittee[] = [];
|
|
157
159
|
for (const indexInCommittee of indexesInCommittee) {
|
|
158
160
|
if (Math.floor(indexInCommittee / SYNC_COMMITTEE_SUBNET_SIZE) === subnet) {
|
|
159
|
-
|
|
161
|
+
indices.push(indexInCommittee % SYNC_COMMITTEE_SUBNET_SIZE);
|
|
160
162
|
}
|
|
161
163
|
}
|
|
162
164
|
|
|
163
|
-
|
|
164
|
-
return null;
|
|
165
|
+
return indices.length > 0 ? indices : null;
|
|
165
166
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {SYNC_COMMITTEE_SUBNET_SIZE} from "@lodestar/params";
|
|
2
|
-
import {
|
|
2
|
+
import {IBeaconStateView, isSyncCommitteeAggregator} from "@lodestar/state-transition";
|
|
3
3
|
import {ValidatorIndex, altair} from "@lodestar/types";
|
|
4
4
|
import {GossipAction, SyncCommitteeError, SyncCommitteeErrorCode} from "../errors/index.js";
|
|
5
5
|
import {IBeaconChain} from "../interface.js";
|
|
@@ -53,7 +53,7 @@ export async function validateSyncCommitteeGossipContributionAndProof(
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
// [REJECT] The contribution has participants -- that is, any(contribution.aggregation_bits)
|
|
56
|
-
const syncCommitteeParticipantIndices = getContributionIndices(headState
|
|
56
|
+
const syncCommitteeParticipantIndices = getContributionIndices(headState, contribution);
|
|
57
57
|
if (syncCommitteeParticipantIndices.length === 0) {
|
|
58
58
|
throw new SyncCommitteeError(GossipAction.REJECT, {
|
|
59
59
|
code: SyncCommitteeErrorCode.NO_PARTICIPANT,
|
|
@@ -83,12 +83,7 @@ export async function validateSyncCommitteeGossipContributionAndProof(
|
|
|
83
83
|
|
|
84
84
|
// [REJECT] The aggregate signature is valid for the message beacon_block_root and aggregate pubkey derived from
|
|
85
85
|
// the participation info in aggregation_bits for the subcommittee specified by the contribution.subcommittee_index.
|
|
86
|
-
getSyncCommitteeContributionSignatureSet(
|
|
87
|
-
chain.config,
|
|
88
|
-
headState as CachedBeaconStateAltair,
|
|
89
|
-
contribution,
|
|
90
|
-
syncCommitteeParticipantIndices
|
|
91
|
-
),
|
|
86
|
+
getSyncCommitteeContributionSignatureSet(chain.config, headState, contribution, syncCommitteeParticipantIndices),
|
|
92
87
|
];
|
|
93
88
|
|
|
94
89
|
if (!(await chain.bls.verifySignatureSets(signatureSets, {batchable: true}))) {
|
|
@@ -109,12 +104,12 @@ export async function validateSyncCommitteeGossipContributionAndProof(
|
|
|
109
104
|
* - pubkeyCache
|
|
110
105
|
*/
|
|
111
106
|
function getContributionIndices(
|
|
112
|
-
state:
|
|
107
|
+
state: IBeaconStateView,
|
|
113
108
|
contribution: altair.SyncCommitteeContribution
|
|
114
109
|
): ValidatorIndex[] {
|
|
115
110
|
const startIndex = contribution.subcommitteeIndex * SYNC_COMMITTEE_SUBNET_SIZE;
|
|
116
111
|
|
|
117
|
-
const syncCommittee = state.
|
|
112
|
+
const syncCommittee = state.getIndexedSyncCommittee(contribution.slot);
|
|
118
113
|
// The bits in contribution.aggregationBits select validatorIndexes in the subcommittee starting at startIndex
|
|
119
114
|
const subcommitteeValidatorIndices = syncCommittee.validatorIndices.slice(
|
|
120
115
|
startIndex,
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BeaconStateView,
|
|
3
|
-
VoluntaryExitValidity,
|
|
4
|
-
getVoluntaryExitSignatureSet,
|
|
5
|
-
getVoluntaryExitValidity,
|
|
6
|
-
} from "@lodestar/state-transition";
|
|
1
|
+
import {VoluntaryExitValidity, getVoluntaryExitSignatureSet} from "@lodestar/state-transition";
|
|
7
2
|
import {phase0} from "@lodestar/types";
|
|
8
3
|
import {
|
|
9
4
|
GossipAction,
|
|
@@ -53,14 +48,14 @@ async function validateVoluntaryExit(
|
|
|
53
48
|
|
|
54
49
|
// [REJECT] All of the conditions within process_voluntary_exit pass validation.
|
|
55
50
|
// verifySignature = false, verified in batch below
|
|
56
|
-
const validity = getVoluntaryExitValidity(
|
|
51
|
+
const validity = state.getVoluntaryExitValidity(voluntaryExit, false);
|
|
57
52
|
if (validity !== VoluntaryExitValidity.valid) {
|
|
58
53
|
throw new VoluntaryExitError(GossipAction.REJECT, {
|
|
59
54
|
code: voluntaryExitValidityToErrorCode(validity),
|
|
60
55
|
});
|
|
61
56
|
}
|
|
62
57
|
|
|
63
|
-
const signatureSet = getVoluntaryExitSignatureSet(chain.config,
|
|
58
|
+
const signatureSet = getVoluntaryExitSignatureSet(chain.config, state, voluntaryExit);
|
|
64
59
|
if (!(await chain.bls.verifySignatureSets([signatureSet], {batchable: true, priority: prioritizeBls}))) {
|
|
65
60
|
throw new VoluntaryExitError(GossipAction.REJECT, {
|
|
66
61
|
code: VoluntaryExitErrorCode.INVALID_SIGNATURE,
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import {ChainForkConfig} from "@lodestar/config";
|
|
2
2
|
import {ForkSeq, MIN_ATTESTATION_INCLUSION_DELAY, SLOTS_PER_EPOCH} from "@lodestar/params";
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
CachedBeaconStateAltair,
|
|
4
|
+
IBeaconStateView,
|
|
6
5
|
ParticipationFlags,
|
|
7
6
|
computeEpochAtSlot,
|
|
8
7
|
computeStartSlotAtEpoch,
|
|
9
8
|
computeTimeAtSlot,
|
|
10
|
-
getBlockRootAtSlot,
|
|
11
9
|
getCurrentSlot,
|
|
12
10
|
parseAttesterFlags,
|
|
13
11
|
parseParticipationFlags,
|
|
@@ -23,6 +21,7 @@ import {
|
|
|
23
21
|
ValidatorIndex,
|
|
24
22
|
altair,
|
|
25
23
|
deneb,
|
|
24
|
+
gloas,
|
|
26
25
|
} from "@lodestar/types";
|
|
27
26
|
import {LogData, LogHandler, LogLevel, Logger, MapDef, MapDefMax, prettyPrintIndices, toRootHex} from "@lodestar/utils";
|
|
28
27
|
import {GENESIS_SLOT} from "../constants/constants.js";
|
|
@@ -61,6 +60,11 @@ export type ValidatorMonitor = {
|
|
|
61
60
|
): void;
|
|
62
61
|
registerBeaconBlock(src: OpSource, delaySec: Seconds, block: BeaconBlock): void;
|
|
63
62
|
registerBlobSidecar(src: OpSource, seenTimestampSec: Seconds, blob: deneb.BlobSidecar): void;
|
|
63
|
+
registerExecutionPayloadEnvelope(
|
|
64
|
+
src: OpSource,
|
|
65
|
+
delaySec: Seconds,
|
|
66
|
+
envelope: gloas.SignedExecutionPayloadEnvelope
|
|
67
|
+
): void;
|
|
64
68
|
registerImportedBlock(block: BeaconBlock, data: {proposerBalanceDelta: number}): void;
|
|
65
69
|
onPoolSubmitUnaggregatedAttestation(
|
|
66
70
|
seenTimestampSec: number,
|
|
@@ -96,7 +100,7 @@ export type ValidatorMonitor = {
|
|
|
96
100
|
syncAggregate: altair.SyncAggregate,
|
|
97
101
|
syncCommitteeIndices: Uint32Array
|
|
98
102
|
): void;
|
|
99
|
-
onceEveryEndOfEpoch(state:
|
|
103
|
+
onceEveryEndOfEpoch(state: IBeaconStateView): void;
|
|
100
104
|
scrapeMetrics(slotClock: Slot): void;
|
|
101
105
|
/** Returns the list of validator indices currently being monitored */
|
|
102
106
|
getMonitoredValidatorIndices(): ValidatorIndex[];
|
|
@@ -450,6 +454,10 @@ export function createValidatorMonitor(
|
|
|
450
454
|
//TODO: freetheblobs
|
|
451
455
|
},
|
|
452
456
|
|
|
457
|
+
registerExecutionPayloadEnvelope(_src, _delaySec, _envelope) {
|
|
458
|
+
// TODO GLOAS: implement execution payload envelope monitoring
|
|
459
|
+
},
|
|
460
|
+
|
|
453
461
|
registerImportedBlock(block, {proposerBalanceDelta}) {
|
|
454
462
|
const validator = validators.get(block.proposerIndex);
|
|
455
463
|
if (validator) {
|
|
@@ -726,16 +734,19 @@ export function createValidatorMonitor(
|
|
|
726
734
|
return;
|
|
727
735
|
}
|
|
728
736
|
|
|
737
|
+
if (validators.size === 0) {
|
|
738
|
+
return;
|
|
739
|
+
}
|
|
740
|
+
|
|
729
741
|
const rootCache = new RootHexCache(headState);
|
|
730
742
|
|
|
731
743
|
if (config.getForkSeq(headState.slot) >= ForkSeq.altair) {
|
|
732
|
-
const {previousEpochParticipation} = headState as CachedBeaconStateAltair;
|
|
733
744
|
const prevEpochStartSlot = computeStartSlotAtEpoch(prevEpoch);
|
|
734
|
-
const prevEpochTargetRoot = toRootHex(getBlockRootAtSlot(
|
|
745
|
+
const prevEpochTargetRoot = toRootHex(headState.getBlockRootAtSlot(prevEpochStartSlot));
|
|
735
746
|
|
|
736
747
|
// Check attestation performance
|
|
737
748
|
for (const [index, validator] of validators.entries()) {
|
|
738
|
-
const flags = parseParticipationFlags(
|
|
749
|
+
const flags = parseParticipationFlags(headState.getPreviousEpochParticipation(index));
|
|
739
750
|
const attestationSummary = validator.attestations.get(prevEpoch)?.get(prevEpochTargetRoot);
|
|
740
751
|
const summary = renderAttestationSummary(config, rootCache, attestationSummary, flags);
|
|
741
752
|
validatorMonitorMetrics?.prevEpochAttestationSummary.inc({summary});
|
|
@@ -747,9 +758,9 @@ export function createValidatorMonitor(
|
|
|
747
758
|
}
|
|
748
759
|
}
|
|
749
760
|
|
|
750
|
-
if (headState.
|
|
761
|
+
if (headState.previousProposers !== null) {
|
|
751
762
|
// proposersPrevEpoch is null on the first epoch of `headState` being generated
|
|
752
|
-
for (const [slotIndex, validatorIndex] of headState.
|
|
763
|
+
for (const [slotIndex, validatorIndex] of headState.previousProposers.entries()) {
|
|
753
764
|
const validator = validators.get(validatorIndex);
|
|
754
765
|
if (validator) {
|
|
755
766
|
// If expected proposer is a tracked validator
|
|
@@ -889,7 +900,7 @@ function renderAttestationSummary(
|
|
|
889
900
|
summary: AttestationSummary | undefined,
|
|
890
901
|
flags: ParticipationFlags
|
|
891
902
|
): string {
|
|
892
|
-
// Reference https://github.com/ethereum/consensus-specs/blob/
|
|
903
|
+
// Reference https://github.com/ethereum/consensus-specs/blob/v1.6.1/specs/altair/beacon-chain.md#get_attestation_participation_flag_indices
|
|
893
904
|
//
|
|
894
905
|
// is_matching_source = data.source == justified_checkpoint
|
|
895
906
|
// is_matching_target = is_matching_source and data.target.root == get_block_root(state, data.target.epoch)
|
|
@@ -1129,12 +1140,12 @@ function renderBlockProposalSummary(
|
|
|
1129
1140
|
export class RootHexCache {
|
|
1130
1141
|
private readonly blockRootSlotCache = new Map<Slot, RootHex>();
|
|
1131
1142
|
|
|
1132
|
-
constructor(private readonly state:
|
|
1143
|
+
constructor(private readonly state: IBeaconStateView) {}
|
|
1133
1144
|
|
|
1134
1145
|
getBlockRootAtSlot(slot: Slot): RootHex {
|
|
1135
1146
|
let root = this.blockRootSlotCache.get(slot);
|
|
1136
1147
|
if (!root) {
|
|
1137
|
-
root = toRootHex(
|
|
1148
|
+
root = toRootHex(this.state.getBlockRootAtSlot(slot));
|
|
1138
1149
|
this.blockRootSlotCache.set(slot, root);
|
|
1139
1150
|
}
|
|
1140
1151
|
return root;
|