@lodestar/beacon-node 1.42.0-dev.4411584fd8 → 1.42.0-dev.47afaa6bb7
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 +60 -29
- package/lib/api/impl/beacon/blocks/index.js.map +1 -1
- package/lib/api/impl/beacon/pool/index.d.ts.map +1 -1
- package/lib/api/impl/beacon/pool/index.js +5 -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 +38 -40
- 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/debug/index.js.map +1 -1
- package/lib/api/impl/lodestar/index.d.ts.map +1 -1
- package/lib/api/impl/lodestar/index.js +8 -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 +35 -29
- 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/ColumnReconstructionTracker.d.ts +2 -1
- package/lib/chain/ColumnReconstructionTracker.d.ts.map +1 -1
- package/lib/chain/ColumnReconstructionTracker.js +5 -5
- package/lib/chain/ColumnReconstructionTracker.js.map +1 -1
- package/lib/chain/GetBlobsTracker.d.ts +2 -1
- package/lib/chain/GetBlobsTracker.d.ts.map +1 -1
- package/lib/chain/GetBlobsTracker.js +14 -12
- package/lib/chain/GetBlobsTracker.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/blockInput.d.ts +5 -5
- package/lib/chain/blocks/blockInput/blockInput.d.ts.map +1 -1
- package/lib/chain/blocks/blockInput/blockInput.js.map +1 -1
- package/lib/chain/blocks/blockInput/types.d.ts +5 -4
- 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 +54 -24
- package/lib/chain/blocks/importBlock.js.map +1 -1
- package/lib/chain/blocks/importExecutionPayload.d.ts +50 -0
- package/lib/chain/blocks/importExecutionPayload.d.ts.map +1 -0
- package/lib/chain/blocks/importExecutionPayload.js +195 -0
- package/lib/chain/blocks/importExecutionPayload.js.map +1 -0
- package/lib/chain/blocks/index.d.ts.map +1 -1
- package/lib/chain/blocks/index.js +3 -2
- 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 +88 -0
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.d.ts.map +1 -0
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.js +279 -0
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.js.map +1 -0
- package/lib/chain/blocks/payloadEnvelopeInput/types.d.ts +30 -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 +28 -15
- 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 +5 -5
- package/lib/chain/blocks/verifyBlocksExecutionPayloads.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlocksExecutionPayloads.js +5 -4
- 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 +4 -2
- 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 +22 -16
- package/lib/chain/chain.d.ts.map +1 -1
- package/lib/chain/chain.js +142 -69
- package/lib/chain/chain.js.map +1 -1
- package/lib/chain/emitter.d.ts +31 -9
- package/lib/chain/emitter.d.ts.map +1 -1
- package/lib/chain/emitter.js +12 -3
- package/lib/chain/emitter.js.map +1 -1
- package/lib/chain/errors/blockError.d.ts +10 -5
- package/lib/chain/errors/blockError.d.ts.map +1 -1
- package/lib/chain/errors/blockError.js +2 -0
- package/lib/chain/errors/blockError.js.map +1 -1
- package/lib/chain/errors/dataColumnSidecarError.d.ts +31 -1
- package/lib/chain/errors/dataColumnSidecarError.d.ts.map +1 -1
- package/lib/chain/errors/dataColumnSidecarError.js +7 -0
- package/lib/chain/errors/dataColumnSidecarError.js.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 +30 -34
- 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 +21 -17
- 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 +11 -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 +13 -13
- package/lib/chain/opPools/aggregatedAttestationPool.js.map +1 -1
- package/lib/chain/opPools/executionPayloadBidPool.d.ts +2 -2
- package/lib/chain/opPools/executionPayloadBidPool.d.ts.map +1 -1
- package/lib/chain/opPools/executionPayloadBidPool.js +2 -2
- package/lib/chain/opPools/executionPayloadBidPool.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 +1 -1
- 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 +10 -4
- 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 +14 -10
- package/lib/chain/produceBlock/computeNewStateRoot.js.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.d.ts +7 -7
- package/lib/chain/produceBlock/produceBlockBody.d.ts.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.js +32 -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.d.ts +1 -1
- package/lib/chain/seenCache/seenGossipBlockInput.d.ts.map +1 -1
- package/lib/chain/seenCache/seenGossipBlockInput.js +4 -4
- 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 +15 -6
- 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.d.ts +11 -4
- package/lib/chain/validation/dataColumnSidecar.d.ts.map +1 -1
- package/lib/chain/validation/dataColumnSidecar.js +185 -6
- 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 +10 -7
- 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 +34 -19
- package/lib/chain/validation/executionPayloadEnvelope.js.map +1 -1
- package/lib/chain/validation/payloadAttestationMessage.js +5 -3
- 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 +17 -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 +5 -2
- 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 +14 -9
- package/lib/chain/validatorMonitor.js.map +1 -1
- package/lib/db/buckets.d.ts +2 -2
- package/lib/db/buckets.d.ts.map +1 -1
- package/lib/db/buckets.js +2 -2
- package/lib/db/buckets.js.map +1 -1
- package/lib/db/repositories/blockArchiveIndex.d.ts +2 -2
- package/lib/db/repositories/blockArchiveIndex.d.ts.map +1 -1
- package/lib/db/repositories/dataColumnSidecar.d.ts.map +1 -1
- package/lib/db/repositories/dataColumnSidecar.js +4 -2
- package/lib/db/repositories/dataColumnSidecar.js.map +1 -1
- package/lib/db/repositories/dataColumnSidecarArchive.d.ts.map +1 -1
- package/lib/db/repositories/dataColumnSidecarArchive.js +4 -2
- package/lib/db/repositories/dataColumnSidecarArchive.js.map +1 -1
- package/lib/metrics/metrics/lodestar.d.ts +60 -4
- package/lib/metrics/metrics/lodestar.d.ts.map +1 -1
- package/lib/metrics/metrics/lodestar.js +126 -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/interface.d.ts +7 -4
- 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 +22 -11
- package/lib/network/libp2p/index.js.map +1 -1
- package/lib/network/network.d.ts +7 -4
- package/lib/network/network.d.ts.map +1 -1
- package/lib/network/network.js +12 -3
- package/lib/network/network.js.map +1 -1
- package/lib/network/options.d.ts.map +1 -1
- package/lib/network/options.js +7 -2
- package/lib/network/options.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 +34 -4
- 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 +287 -70
- package/lib/network/processor/gossipHandlers.js.map +1 -1
- package/lib/network/processor/index.d.ts +22 -7
- package/lib/network/processor/index.d.ts.map +1 -1
- package/lib/network/processor/index.js +313 -80
- package/lib/network/processor/index.js.map +1 -1
- package/lib/network/reqresp/ReqRespBeaconNode.d.ts.map +1 -1
- package/lib/network/reqresp/ReqRespBeaconNode.js +9 -0
- 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 +10 -4
- package/lib/network/reqresp/types.d.ts.map +1 -1
- package/lib/network/reqresp/types.js +16 -4
- 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 +3 -3
- 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 +2 -2
- package/lib/sync/backfill/backfill.d.ts.map +1 -1
- package/lib/sync/backfill/backfill.js +2 -2
- package/lib/sync/backfill/backfill.js.map +1 -1
- package/lib/sync/unknownBlock.d.ts +3 -9
- package/lib/sync/unknownBlock.d.ts.map +1 -1
- package/lib/sync/unknownBlock.js +10 -43
- package/lib/sync/unknownBlock.js.map +1 -1
- package/lib/sync/utils/downloadByRange.d.ts +3 -3
- package/lib/sync/utils/downloadByRange.d.ts.map +1 -1
- package/lib/sync/utils/downloadByRange.js +4 -2
- package/lib/sync/utils/downloadByRange.js.map +1 -1
- package/lib/sync/utils/downloadByRoot.d.ts +3 -3
- package/lib/sync/utils/downloadByRoot.d.ts.map +1 -1
- package/lib/sync/utils/downloadByRoot.js +10 -5
- package/lib/sync/utils/downloadByRoot.js.map +1 -1
- package/lib/util/blobs.d.ts +3 -3
- package/lib/util/blobs.d.ts.map +1 -1
- package/lib/util/blobs.js +21 -10
- package/lib/util/blobs.js.map +1 -1
- package/lib/util/dataColumns.d.ts +18 -11
- package/lib/util/dataColumns.d.ts.map +1 -1
- package/lib/util/dataColumns.js +51 -17
- package/lib/util/dataColumns.js.map +1 -1
- package/lib/util/execution.d.ts +6 -2
- package/lib/util/execution.d.ts.map +1 -1
- package/lib/util/execution.js +49 -25
- package/lib/util/execution.js.map +1 -1
- package/lib/util/sszBytes.d.ts +29 -2
- package/lib/util/sszBytes.d.ts.map +1 -1
- package/lib/util/sszBytes.js +258 -14
- 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 +69 -33
- package/src/api/impl/beacon/pool/index.ts +5 -1
- package/src/api/impl/beacon/state/index.ts +43 -55
- package/src/api/impl/beacon/state/utils.ts +11 -25
- package/src/api/impl/debug/index.ts +2 -2
- package/src/api/impl/lodestar/index.ts +8 -8
- package/src/api/impl/proof/index.ts +2 -9
- package/src/api/impl/validator/index.ts +38 -43
- package/src/api/impl/validator/utils.ts +4 -7
- package/src/chain/ColumnReconstructionTracker.ts +6 -5
- package/src/chain/GetBlobsTracker.ts +14 -12
- 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/blockInput.ts +8 -8
- package/src/chain/blocks/blockInput/types.ts +5 -4
- package/src/chain/blocks/importBlock.ts +85 -32
- package/src/chain/blocks/importExecutionPayload.ts +277 -0
- package/src/chain/blocks/index.ts +3 -2
- package/src/chain/blocks/payloadEnvelopeInput/index.ts +2 -0
- package/src/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.ts +377 -0
- package/src/chain/blocks/payloadEnvelopeInput/types.ts +34 -0
- package/src/chain/blocks/payloadEnvelopeProcessor.ts +61 -0
- package/src/chain/blocks/types.ts +34 -15
- package/src/chain/blocks/utils/checkpoint.ts +2 -2
- package/src/chain/blocks/verifyBlock.ts +5 -10
- package/src/chain/blocks/verifyBlocksExecutionPayloads.ts +10 -14
- package/src/chain/blocks/verifyBlocksSignatures.ts +10 -3
- package/src/chain/blocks/verifyBlocksStateTransitionOnly.ts +6 -8
- package/src/chain/blocks/writePayloadEnvelopeInputToDb.ts +55 -0
- package/src/chain/chain.ts +188 -101
- package/src/chain/emitter.ts +27 -9
- package/src/chain/errors/blockError.ts +8 -5
- package/src/chain/errors/dataColumnSidecarError.ts +32 -1
- package/src/chain/errors/executionPayloadEnvelope.ts +6 -2
- package/src/chain/forkChoice/index.ts +35 -51
- package/src/chain/initState.ts +7 -2
- package/src/chain/interface.ts +22 -18
- package/src/chain/lightClient/index.ts +17 -18
- package/src/chain/opPools/aggregatedAttestationPool.ts +20 -21
- package/src/chain/opPools/executionPayloadBidPool.ts +3 -3
- package/src/chain/opPools/opPool.ts +13 -14
- package/src/chain/opPools/utils.ts +3 -3
- package/src/chain/options.ts +2 -0
- package/src/chain/prepareNextSlot.ts +14 -8
- package/src/chain/produceBlock/computeNewStateRoot.ts +18 -16
- package/src/chain/produceBlock/produceBlockBody.ts +51 -48
- 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 +4 -4
- 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 +16 -10
- package/src/chain/validation/blsToExecutionChange.ts +2 -2
- package/src/chain/validation/dataColumnSidecar.ts +231 -8
- package/src/chain/validation/executionPayloadBid.ts +10 -10
- package/src/chain/validation/executionPayloadEnvelope.ts +42 -26
- package/src/chain/validation/payloadAttestationMessage.ts +6 -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 +25 -20
- package/src/chain/validation/syncCommitteeContributionAndProof.ts +9 -10
- package/src/chain/validation/voluntaryExit.ts +3 -8
- package/src/chain/validatorMonitor.ts +25 -13
- package/src/db/buckets.ts +2 -2
- package/src/db/repositories/dataColumnSidecar.ts +4 -2
- package/src/db/repositories/dataColumnSidecarArchive.ts +4 -2
- package/src/metrics/metrics/lodestar.ts +134 -19
- package/src/network/gossip/encoding.ts +16 -0
- package/src/network/interface.ts +18 -4
- package/src/network/libp2p/index.ts +24 -13
- package/src/network/network.ts +39 -8
- package/src/network/options.ts +7 -2
- package/src/network/processor/extractSlotRootFns.ts +43 -4
- package/src/network/processor/gossipHandlers.ts +356 -80
- package/src/network/processor/index.ts +395 -92
- package/src/network/reqresp/ReqRespBeaconNode.ts +13 -0
- 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 +26 -5
- package/src/node/nodejs.ts +6 -5
- package/src/node/notifier.ts +5 -6
- package/src/sync/backfill/backfill.ts +3 -3
- package/src/sync/unknownBlock.ts +13 -53
- package/src/sync/utils/downloadByRange.ts +9 -7
- package/src/sync/utils/downloadByRoot.ts +16 -12
- package/src/util/blobs.ts +35 -15
- package/src/util/dataColumns.ts +69 -25
- package/src/util/execution.ts +49 -30
- package/src/util/sszBytes.ts +335 -13
- 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
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
} from "@lodestar/types";
|
|
36
36
|
import {fromHex, sleep, toHex, toRootHex} from "@lodestar/utils";
|
|
37
37
|
import {BlockInputSource, isBlockInputBlobs, isBlockInputColumns} from "../../../../chain/blocks/blockInput/index.js";
|
|
38
|
+
import {PayloadEnvelopeInputSource} from "../../../../chain/blocks/payloadEnvelopeInput/index.js";
|
|
38
39
|
import {ImportBlockOpts} from "../../../../chain/blocks/types.js";
|
|
39
40
|
import {verifyBlocksInEpoch} from "../../../../chain/blocks/verifyBlock.js";
|
|
40
41
|
import {BeaconChain} from "../../../../chain/chain.js";
|
|
@@ -48,6 +49,7 @@ import {
|
|
|
48
49
|
ProduceFullGloas,
|
|
49
50
|
} from "../../../../chain/produceBlock/index.js";
|
|
50
51
|
import {validateGossipBlock} from "../../../../chain/validation/block.js";
|
|
52
|
+
import {validateApiExecutionPayloadEnvelope} from "../../../../chain/validation/executionPayloadEnvelope.js";
|
|
51
53
|
import {OpSource} from "../../../../chain/validatorMonitor.js";
|
|
52
54
|
import {
|
|
53
55
|
computePreFuluKzgCommitmentsInclusionProof,
|
|
@@ -55,7 +57,11 @@ import {
|
|
|
55
57
|
kzgCommitmentToVersionedHash,
|
|
56
58
|
reconstructBlobs,
|
|
57
59
|
} from "../../../../util/blobs.js";
|
|
58
|
-
import {
|
|
60
|
+
import {
|
|
61
|
+
getBlobKzgCommitments,
|
|
62
|
+
getDataColumnSidecarsFromBlock,
|
|
63
|
+
getGloasDataColumnSidecars,
|
|
64
|
+
} from "../../../../util/dataColumns.js";
|
|
59
65
|
import {isOptimisticBlock} from "../../../../util/forkChoice.js";
|
|
60
66
|
import {kzg} from "../../../../util/kzg.js";
|
|
61
67
|
import {promiseAllMaybeAsync} from "../../../../util/promises.js";
|
|
@@ -97,17 +103,20 @@ export function getBeaconBlockApi({
|
|
|
97
103
|
const fork = config.getForkName(slot);
|
|
98
104
|
const blockRoot = toRootHex(chain.config.getForkTypes(slot).BeaconBlock.hashTreeRoot(signedBlock.message));
|
|
99
105
|
|
|
100
|
-
// TODO GLOAS: handle new BlockInput type
|
|
101
106
|
const blockForImport = chain.seenBlockInputCache.getByBlock({
|
|
102
107
|
block: signedBlock,
|
|
103
108
|
source: BlockInputSource.api,
|
|
104
109
|
seenTimestampSec,
|
|
105
110
|
blockRootHex: blockRoot,
|
|
106
111
|
});
|
|
107
|
-
let blobSidecars: deneb.BlobSidecars, dataColumnSidecars: fulu.
|
|
112
|
+
let blobSidecars: deneb.BlobSidecars, dataColumnSidecars: fulu.DataColumnSidecar[];
|
|
108
113
|
|
|
109
114
|
if (isDenebBlockContents(signedBlockContents)) {
|
|
110
|
-
if (
|
|
115
|
+
if (isForkPostGloas(fork)) {
|
|
116
|
+
// After gloas, data columns are not published with the block but when publishing the execution payload envelope
|
|
117
|
+
blobSidecars = [];
|
|
118
|
+
dataColumnSidecars = [];
|
|
119
|
+
} else if (isForkPostFulu(fork)) {
|
|
111
120
|
const timer = metrics?.peerDas.dataColumnSidecarComputationTime.startTimer();
|
|
112
121
|
// If the block was produced by this node, we will already have computed cells
|
|
113
122
|
// Otherwise, we will compute them from the blobs in this function
|
|
@@ -122,7 +131,7 @@ export function getBeaconBlockApi({
|
|
|
122
131
|
config,
|
|
123
132
|
signedBlock as SignedBeaconBlock<ForkPostFulu>,
|
|
124
133
|
cellsAndProofs
|
|
125
|
-
);
|
|
134
|
+
) as fulu.DataColumnSidecar[];
|
|
126
135
|
timer?.();
|
|
127
136
|
blobSidecars = [];
|
|
128
137
|
} else if (isForkPostDeneb(fork)) {
|
|
@@ -208,7 +217,7 @@ export function getBeaconBlockApi({
|
|
|
208
217
|
if (!blockLocallyProduced) {
|
|
209
218
|
const parentBlock = chain.forkChoice.getBlockDefaultStatus(signedBlock.message.parentRoot);
|
|
210
219
|
if (parentBlock === null) {
|
|
211
|
-
chain.emitter.emit(ChainEvent.
|
|
220
|
+
chain.emitter.emit(ChainEvent.blockUnknownParent, {
|
|
212
221
|
blockInput: blockForImport,
|
|
213
222
|
peer: IDENTITY_PEER_ID,
|
|
214
223
|
source: BlockInputSource.api,
|
|
@@ -303,7 +312,7 @@ export function getBeaconBlockApi({
|
|
|
303
312
|
.processBlock(blockForImport, opts)
|
|
304
313
|
.catch((e) => {
|
|
305
314
|
if (e instanceof BlockError && e.type.code === BlockErrorCode.PARENT_UNKNOWN) {
|
|
306
|
-
chain.emitter.emit(ChainEvent.
|
|
315
|
+
chain.emitter.emit(ChainEvent.blockUnknownParent, {
|
|
307
316
|
blockInput: blockForImport,
|
|
308
317
|
peer: IDENTITY_PEER_ID,
|
|
309
318
|
source: BlockInputSource.api,
|
|
@@ -605,7 +614,7 @@ export function getBeaconBlockApi({
|
|
|
605
614
|
if (slot < head.slot && head.slot <= slot + SLOTS_PER_HISTORICAL_ROOT) {
|
|
606
615
|
const state = chain.getHeadState();
|
|
607
616
|
return {
|
|
608
|
-
data: {root: state.
|
|
617
|
+
data: {root: state.getBlockRootAtSlot(slot)},
|
|
609
618
|
meta: {
|
|
610
619
|
executionOptimistic: isOptimisticBlock(head),
|
|
611
620
|
finalized: computeEpochAtSlot(slot) <= chain.forkChoice.getFinalizedCheckpoint().epoch,
|
|
@@ -645,6 +654,8 @@ export function getBeaconBlockApi({
|
|
|
645
654
|
const slot = envelope.slot;
|
|
646
655
|
const fork = config.getForkName(slot);
|
|
647
656
|
const blockRootHex = toRootHex(envelope.beaconBlockRoot);
|
|
657
|
+
const blockHashHex = toRootHex(envelope.payload.blockHash);
|
|
658
|
+
const stateRootHex = toRootHex(envelope.stateRoot);
|
|
648
659
|
|
|
649
660
|
if (!isForkPostGloas(fork)) {
|
|
650
661
|
throw new ApiError(400, `publishExecutionPayloadEnvelope not supported for pre-gloas fork=${fork}`);
|
|
@@ -659,8 +670,10 @@ export function getBeaconBlockApi({
|
|
|
659
670
|
throw new ApiError(400, `Envelope slot ${slot} does not match block slot ${block.slot}`);
|
|
660
671
|
}
|
|
661
672
|
|
|
673
|
+
await validateApiExecutionPayloadEnvelope(chain, signedExecutionPayloadEnvelope);
|
|
674
|
+
|
|
662
675
|
const isSelfBuild = envelope.builderIndex === BUILDER_INDEX_SELF_BUILD;
|
|
663
|
-
let dataColumnSidecars: gloas.
|
|
676
|
+
let dataColumnSidecars: gloas.DataColumnSidecar[] = [];
|
|
664
677
|
|
|
665
678
|
if (isSelfBuild) {
|
|
666
679
|
// For self-builds, construct and publish data column sidecars from cached block production data
|
|
@@ -676,6 +689,7 @@ export function getBeaconBlockApi({
|
|
|
676
689
|
}
|
|
677
690
|
|
|
678
691
|
if (cachedResult.cells && cachedResult.blobsBundle.commitments.length > 0) {
|
|
692
|
+
const timer = metrics?.peerDas.dataColumnSidecarComputationTime.startTimer();
|
|
679
693
|
const cellsAndProofs = cachedResult.cells.map((rowCells, rowIndex) => ({
|
|
680
694
|
cells: rowCells,
|
|
681
695
|
proofs: cachedResult.blobsBundle.proofs.slice(
|
|
@@ -684,54 +698,80 @@ export function getBeaconBlockApi({
|
|
|
684
698
|
),
|
|
685
699
|
}));
|
|
686
700
|
|
|
687
|
-
dataColumnSidecars =
|
|
701
|
+
dataColumnSidecars = getGloasDataColumnSidecars(slot, envelope.beaconBlockRoot, cellsAndProofs);
|
|
702
|
+
timer?.();
|
|
688
703
|
}
|
|
689
704
|
} else {
|
|
690
705
|
// TODO GLOAS: will this api be used by builders or only for self-building?
|
|
691
706
|
}
|
|
692
707
|
|
|
693
|
-
//
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
708
|
+
// If called near a slot boundary (e.g. late in slot N-1), hold briefly so gossip aligns with slot N.
|
|
709
|
+
const msToBlockSlot = computeTimeAtSlot(config, slot, chain.genesisTime) * 1000 - Date.now();
|
|
710
|
+
if (msToBlockSlot <= MAX_API_CLOCK_DISPARITY_MS && msToBlockSlot > 0) {
|
|
711
|
+
await sleep(msToBlockSlot);
|
|
712
|
+
}
|
|
697
713
|
|
|
698
|
-
// TODO GLOAS:
|
|
699
|
-
//
|
|
714
|
+
// TODO GLOAS: if block and payload are submitted in parallel, payloadInput may not yet exist.
|
|
715
|
+
// A queuing mechanism is needed to handle this case. See https://github.com/ChainSafe/lodestar/issues/8915
|
|
716
|
+
const payloadInput = chain.seenPayloadEnvelopeInputCache.get(blockRootHex);
|
|
717
|
+
if (!payloadInput) {
|
|
718
|
+
throw new ApiError(404, `PayloadEnvelopeInput not found for block root ${blockRootHex}`);
|
|
719
|
+
}
|
|
700
720
|
|
|
701
|
-
|
|
702
|
-
|
|
721
|
+
payloadInput.addPayloadEnvelope({
|
|
722
|
+
envelope: signedExecutionPayloadEnvelope,
|
|
723
|
+
source: PayloadEnvelopeInputSource.api,
|
|
724
|
+
seenTimestampSec,
|
|
725
|
+
peerIdStr: undefined,
|
|
726
|
+
});
|
|
703
727
|
|
|
704
|
-
|
|
705
|
-
|
|
728
|
+
if (dataColumnSidecars.length > 0) {
|
|
729
|
+
for (const columnSidecar of dataColumnSidecars) {
|
|
730
|
+
payloadInput.addColumn({
|
|
731
|
+
columnSidecar,
|
|
732
|
+
source: PayloadEnvelopeInputSource.api,
|
|
733
|
+
seenTimestampSec,
|
|
734
|
+
peerIdStr: undefined,
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
}
|
|
706
738
|
|
|
707
739
|
const valLogMeta = {
|
|
708
740
|
slot,
|
|
709
741
|
blockRoot: blockRootHex,
|
|
742
|
+
blockHash: blockHashHex,
|
|
743
|
+
stateRoot: stateRootHex,
|
|
710
744
|
builderIndex: envelope.builderIndex,
|
|
711
745
|
isSelfBuild,
|
|
712
746
|
dataColumns: dataColumnSidecars.length,
|
|
713
747
|
};
|
|
714
748
|
|
|
715
|
-
// If called near a slot boundary (e.g. late in slot N-1), hold briefly so gossip aligns with slot N.
|
|
716
|
-
const msToBlockSlot = computeTimeAtSlot(config, slot, chain.genesisTime) * 1000 - Date.now();
|
|
717
|
-
if (msToBlockSlot <= MAX_API_CLOCK_DISPARITY_MS && msToBlockSlot > 0) {
|
|
718
|
-
await sleep(msToBlockSlot);
|
|
719
|
-
}
|
|
720
|
-
|
|
721
749
|
const delaySec = seenTimestampSec - computeTimeAtSlot(config, slot, chain.genesisTime);
|
|
722
750
|
metrics?.gossipExecutionPayloadEnvelope.elapsedTimeTillReceived.observe({source: OpSource.api}, delaySec);
|
|
751
|
+
chain.validatorMonitor?.registerExecutionPayloadEnvelope(OpSource.api, delaySec, signedExecutionPayloadEnvelope);
|
|
723
752
|
|
|
724
753
|
chain.logger.info("Publishing execution payload envelope", valLogMeta);
|
|
725
754
|
|
|
726
|
-
// Publish envelope and data columns
|
|
727
755
|
const publishPromises = [
|
|
728
756
|
// Gossip the signed execution payload envelope first
|
|
729
757
|
() => network.publishSignedExecutionPayloadEnvelope(signedExecutionPayloadEnvelope),
|
|
730
758
|
// For self-builds, publish all data column sidecars
|
|
731
759
|
...dataColumnSidecars.map((dataColumnSidecar) => () => network.publishDataColumnSidecar(dataColumnSidecar)),
|
|
760
|
+
// Import execution payload. Signature already verified above
|
|
761
|
+
() => chain.processExecutionPayload(payloadInput, {validSignature: true}),
|
|
732
762
|
];
|
|
733
763
|
|
|
734
|
-
const
|
|
764
|
+
const publishPromise = promiseAllMaybeAsync<number | void>(publishPromises);
|
|
765
|
+
|
|
766
|
+
chain.emitter.emit(routes.events.EventType.executionPayloadGossip, {
|
|
767
|
+
slot,
|
|
768
|
+
builderIndex: envelope.builderIndex,
|
|
769
|
+
blockHash: blockHashHex,
|
|
770
|
+
blockRoot: blockRootHex,
|
|
771
|
+
stateRoot: stateRootHex,
|
|
772
|
+
});
|
|
773
|
+
|
|
774
|
+
const sentPeersArr = await publishPromise;
|
|
735
775
|
|
|
736
776
|
// Track metrics for data column publishing
|
|
737
777
|
if (dataColumnSidecars.length > 0) {
|
|
@@ -755,15 +795,11 @@ export function getBeaconBlockApi({
|
|
|
755
795
|
metrics?.dataColumns.bySource.inc({source: BlockInputSource.api}, dataColumnSidecars.length);
|
|
756
796
|
|
|
757
797
|
if (chain.emitter.listenerCount(routes.events.EventType.dataColumnSidecar)) {
|
|
758
|
-
// TODO GLOAS: revisit this, we likely don't wanna emit KZG commitments anymore
|
|
759
|
-
const cachedResult = chain.blockProductionCache.get(blockRootHex) as ProduceFullGloas | undefined;
|
|
760
|
-
const kzgCommitments = cachedResult?.blobsBundle.commitments.map(toHex) ?? [];
|
|
761
798
|
for (const dataColumnSidecar of dataColumnSidecars) {
|
|
762
799
|
chain.emitter.emit(routes.events.EventType.dataColumnSidecar, {
|
|
763
800
|
blockRoot: blockRootHex,
|
|
764
801
|
slot,
|
|
765
802
|
index: dataColumnSidecar.index,
|
|
766
|
-
kzgCommitments,
|
|
767
803
|
});
|
|
768
804
|
}
|
|
769
805
|
}
|
|
@@ -887,7 +923,7 @@ export function getBeaconBlockApi({
|
|
|
887
923
|
);
|
|
888
924
|
}
|
|
889
925
|
|
|
890
|
-
const blobKzgCommitments = (block
|
|
926
|
+
const blobKzgCommitments = getBlobKzgCommitments(fork, block as SignedBeaconBlock<ForkPostFulu>);
|
|
891
927
|
const blobCount = blobKzgCommitments.length;
|
|
892
928
|
|
|
893
929
|
if (blobCount > 0) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {routes} from "@lodestar/api";
|
|
2
2
|
import {ApplicationMethods} from "@lodestar/api/server";
|
|
3
3
|
import {ForkPostElectra, ForkPreElectra, SYNC_COMMITTEE_SUBNET_SIZE, isForkPostElectra} from "@lodestar/params";
|
|
4
|
+
import {isStatePostAltair} from "@lodestar/state-transition";
|
|
4
5
|
import {Attestation, Epoch, SingleAttestation, isElectraAttestation, ssz, sszTypesFor} from "@lodestar/types";
|
|
5
6
|
import {
|
|
6
7
|
AttestationError,
|
|
@@ -249,13 +250,16 @@ export function getBeaconPoolApi({
|
|
|
249
250
|
|
|
250
251
|
// TODO: Fetch states at signature slots
|
|
251
252
|
const state = chain.getHeadState();
|
|
253
|
+
if (!isStatePostAltair(state)) {
|
|
254
|
+
throw new ApiError(400, "Sync committee pool is not supported before Altair");
|
|
255
|
+
}
|
|
252
256
|
|
|
253
257
|
const failures: FailureList = [];
|
|
254
258
|
|
|
255
259
|
await Promise.all(
|
|
256
260
|
signatures.map(async (signature, i) => {
|
|
257
261
|
try {
|
|
258
|
-
const synCommittee = state.
|
|
262
|
+
const synCommittee = state.getIndexedSyncCommittee(signature.slot);
|
|
259
263
|
const indexesInCommittee = synCommittee.validatorIndexMap.get(signature.validatorIndex);
|
|
260
264
|
if (indexesInCommittee === undefined || indexesInCommittee.length === 0) {
|
|
261
265
|
return; // Not a sync committee member
|
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
import {routes} from "@lodestar/api";
|
|
2
2
|
import {ApplicationMethods} from "@lodestar/api/server";
|
|
3
|
+
import {EPOCHS_PER_HISTORICAL_VECTOR, SLOTS_PER_EPOCH, SYNC_COMMITTEE_SUBNET_SIZE} from "@lodestar/params";
|
|
3
4
|
import {
|
|
4
|
-
|
|
5
|
-
SLOTS_PER_EPOCH,
|
|
6
|
-
SYNC_COMMITTEE_SUBNET_SIZE,
|
|
7
|
-
isForkPostElectra,
|
|
8
|
-
isForkPostFulu,
|
|
9
|
-
} from "@lodestar/params";
|
|
10
|
-
import {
|
|
11
|
-
BeaconStateAllForks,
|
|
12
|
-
BeaconStateElectra,
|
|
13
|
-
BeaconStateFulu,
|
|
14
|
-
CachedBeaconStateAltair,
|
|
5
|
+
IBeaconStateView,
|
|
15
6
|
computeEpochAtSlot,
|
|
16
7
|
computeStartSlotAtEpoch,
|
|
17
8
|
getCurrentEpoch,
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
isStatePostAltair,
|
|
10
|
+
isStatePostElectra,
|
|
11
|
+
isStatePostFulu,
|
|
20
12
|
} from "@lodestar/state-transition";
|
|
21
|
-
import {ValidatorIndex, getValidatorStatus} from "@lodestar/types";
|
|
13
|
+
import {ValidatorIndex, getValidatorStatus, ssz} from "@lodestar/types";
|
|
22
14
|
import {ApiError} from "../../errors.js";
|
|
23
15
|
import {ApiModules} from "../../types.js";
|
|
24
16
|
import {assertUniqueItems} from "../../utils.js";
|
|
@@ -35,11 +27,11 @@ export function getBeaconStateApi({
|
|
|
35
27
|
}: Pick<ApiModules, "chain" | "config">): ApplicationMethods<routes.beacon.state.Endpoints> {
|
|
36
28
|
async function getState(
|
|
37
29
|
stateId: routes.beacon.StateId
|
|
38
|
-
): Promise<{state:
|
|
30
|
+
): Promise<{state: IBeaconStateView; executionOptimistic: boolean; finalized: boolean}> {
|
|
39
31
|
const {state, executionOptimistic, finalized} = await getStateResponseWithRegen(chain, stateId);
|
|
40
32
|
|
|
41
33
|
return {
|
|
42
|
-
state: state instanceof Uint8Array ?
|
|
34
|
+
state: state instanceof Uint8Array ? chain.getHeadState().loadOtherState(state) : state,
|
|
43
35
|
executionOptimistic,
|
|
44
36
|
finalized,
|
|
45
37
|
};
|
|
@@ -71,7 +63,7 @@ export function getBeaconStateApi({
|
|
|
71
63
|
throw new ApiError(400, "Requested epoch is out of range");
|
|
72
64
|
}
|
|
73
65
|
|
|
74
|
-
const randao = getRandaoMix(
|
|
66
|
+
const randao = state.getRandaoMix(usedEpoch);
|
|
75
67
|
|
|
76
68
|
return {
|
|
77
69
|
data: {randao},
|
|
@@ -94,7 +86,6 @@ export function getBeaconStateApi({
|
|
|
94
86
|
async getStateValidators({stateId, validatorIds = [], statuses = []}) {
|
|
95
87
|
const {state, executionOptimistic, finalized} = await getState(stateId);
|
|
96
88
|
const currentEpoch = getCurrentEpoch(state);
|
|
97
|
-
const {validators, balances} = state; // Get the validators sub tree once for all the loop
|
|
98
89
|
const {pubkeyCache} = chain;
|
|
99
90
|
|
|
100
91
|
const validatorResponses: routes.beacon.ValidatorResponse[] = [];
|
|
@@ -105,14 +96,14 @@ export function getBeaconStateApi({
|
|
|
105
96
|
const resp = getStateValidatorIndex(id, state, pubkeyCache);
|
|
106
97
|
if (resp.valid) {
|
|
107
98
|
const validatorIndex = resp.validatorIndex;
|
|
108
|
-
const validator =
|
|
99
|
+
const validator = state.getValidator(validatorIndex);
|
|
109
100
|
if (statuses.length && !statuses.includes(getValidatorStatus(validator, currentEpoch))) {
|
|
110
101
|
continue;
|
|
111
102
|
}
|
|
112
103
|
const validatorResponse = toValidatorResponse(
|
|
113
104
|
validatorIndex,
|
|
114
105
|
validator,
|
|
115
|
-
|
|
106
|
+
state.getBalance(validatorIndex),
|
|
116
107
|
currentEpoch
|
|
117
108
|
);
|
|
118
109
|
validatorResponses.push(validatorResponse);
|
|
@@ -135,8 +126,8 @@ export function getBeaconStateApi({
|
|
|
135
126
|
}
|
|
136
127
|
|
|
137
128
|
// TODO: This loops over the entire state, it's a DOS vector
|
|
138
|
-
const validatorsArr = state.
|
|
139
|
-
const balancesArr = state.
|
|
129
|
+
const validatorsArr = state.getAllValidators();
|
|
130
|
+
const balancesArr = state.getAllBalances();
|
|
140
131
|
const resp: routes.beacon.ValidatorResponse[] = [];
|
|
141
132
|
for (let i = 0; i < validatorsArr.length; i++) {
|
|
142
133
|
resp.push(toValidatorResponse(i, validatorsArr[i], balancesArr[i], currentEpoch));
|
|
@@ -166,12 +157,12 @@ export function getBeaconStateApi({
|
|
|
166
157
|
const resp = getStateValidatorIndex(id, state, pubkeyCache);
|
|
167
158
|
if (resp.valid) {
|
|
168
159
|
const index = resp.validatorIndex;
|
|
169
|
-
const {pubkey, activationEpoch} = state.
|
|
160
|
+
const {pubkey, activationEpoch} = state.getValidator(index);
|
|
170
161
|
validatorIdentities.push({index, pubkey, activationEpoch});
|
|
171
162
|
}
|
|
172
163
|
}
|
|
173
164
|
} else {
|
|
174
|
-
const validatorsArr = state.
|
|
165
|
+
const validatorsArr = state.getAllValidators();
|
|
175
166
|
validatorIdentities = new Array(validatorsArr.length) as routes.beacon.ValidatorIdentities;
|
|
176
167
|
for (let i = 0; i < validatorsArr.length; i++) {
|
|
177
168
|
const {pubkey, activationEpoch} = validatorsArr[i];
|
|
@@ -198,8 +189,8 @@ export function getBeaconStateApi({
|
|
|
198
189
|
return {
|
|
199
190
|
data: toValidatorResponse(
|
|
200
191
|
validatorIndex,
|
|
201
|
-
state.
|
|
202
|
-
state.
|
|
192
|
+
state.getValidator(validatorIndex),
|
|
193
|
+
state.getBalance(validatorIndex),
|
|
203
194
|
getCurrentEpoch(state)
|
|
204
195
|
),
|
|
205
196
|
meta: {executionOptimistic, finalized},
|
|
@@ -219,7 +210,7 @@ export function getBeaconStateApi({
|
|
|
219
210
|
if (resp.valid) {
|
|
220
211
|
balances.push({
|
|
221
212
|
index: resp.validatorIndex,
|
|
222
|
-
balance: state.
|
|
213
|
+
balance: state.getBalance(resp.validatorIndex),
|
|
223
214
|
});
|
|
224
215
|
}
|
|
225
216
|
}
|
|
@@ -230,7 +221,7 @@ export function getBeaconStateApi({
|
|
|
230
221
|
}
|
|
231
222
|
|
|
232
223
|
// TODO: This loops over the entire state, it's a DOS vector
|
|
233
|
-
const balancesArr = state.
|
|
224
|
+
const balancesArr = state.getAllBalances();
|
|
234
225
|
const resp: routes.beacon.ValidatorBalance[] = [];
|
|
235
226
|
for (let i = 0; i < balancesArr.length; i++) {
|
|
236
227
|
resp.push({index: i, balance: balancesArr[i]});
|
|
@@ -248,11 +239,6 @@ export function getBeaconStateApi({
|
|
|
248
239
|
async getEpochCommittees({stateId, ...filters}) {
|
|
249
240
|
const {state, executionOptimistic, finalized} = await getState(stateId);
|
|
250
241
|
|
|
251
|
-
const stateCached = state as CachedBeaconStateAltair;
|
|
252
|
-
if (stateCached.epochCtx === undefined) {
|
|
253
|
-
throw new ApiError(400, `No cached state available for stateId: ${stateId}`);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
242
|
const stateEpoch = computeEpochAtSlot(state.slot);
|
|
257
243
|
const epoch = filters.epoch ?? stateEpoch;
|
|
258
244
|
const startSlot = computeStartSlotAtEpoch(epoch);
|
|
@@ -266,7 +252,7 @@ export function getBeaconStateApi({
|
|
|
266
252
|
throw new ApiError(400, `Slot ${filters.slot} is not in epoch ${epoch}`);
|
|
267
253
|
}
|
|
268
254
|
|
|
269
|
-
const decisionRoot =
|
|
255
|
+
const decisionRoot = state.getShufflingDecisionRoot(epoch);
|
|
270
256
|
const shuffling = await chain.shufflingCache.get(epoch, decisionRoot);
|
|
271
257
|
if (!shuffling) {
|
|
272
258
|
throw new ApiError(
|
|
@@ -314,13 +300,11 @@ export function getBeaconStateApi({
|
|
|
314
300
|
if (stateEpoch < config.ALTAIR_FORK_EPOCH) {
|
|
315
301
|
throw new ApiError(400, "Requested state before ALTAIR_FORK_EPOCH");
|
|
316
302
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
if (stateCached.epochCtx === undefined) {
|
|
320
|
-
throw new ApiError(400, `No cached state available for stateId: ${stateId}`);
|
|
303
|
+
if (!isStatePostAltair(state)) {
|
|
304
|
+
throw new Error("Expected Altair state for sync committee lookup");
|
|
321
305
|
}
|
|
322
306
|
|
|
323
|
-
const syncCommitteeCache =
|
|
307
|
+
const syncCommitteeCache = state.getIndexedSyncCommitteeAtEpoch(epoch ?? stateEpoch);
|
|
324
308
|
const validatorIndices = new Array<ValidatorIndex>(...syncCommitteeCache.validatorIndices);
|
|
325
309
|
|
|
326
310
|
// Subcommittee assignments of the current sync committee
|
|
@@ -340,64 +324,68 @@ export function getBeaconStateApi({
|
|
|
340
324
|
|
|
341
325
|
async getPendingDeposits({stateId}, context) {
|
|
342
326
|
const {state, executionOptimistic, finalized} = await getState(stateId);
|
|
343
|
-
const fork =
|
|
327
|
+
const fork = state.forkName;
|
|
344
328
|
|
|
345
|
-
if (!
|
|
329
|
+
if (!isStatePostElectra(state)) {
|
|
346
330
|
throw new ApiError(400, `Cannot retrieve pending deposits for pre-electra state fork=${fork}`);
|
|
347
331
|
}
|
|
348
332
|
|
|
349
|
-
const
|
|
333
|
+
const pendingDeposits = state.pendingDeposits;
|
|
350
334
|
|
|
351
335
|
return {
|
|
352
|
-
data: context?.returnBytes ?
|
|
336
|
+
data: context?.returnBytes ? ssz.electra.PendingDeposits.serialize(pendingDeposits) : pendingDeposits,
|
|
353
337
|
meta: {executionOptimistic, finalized, version: fork},
|
|
354
338
|
};
|
|
355
339
|
},
|
|
356
340
|
|
|
357
341
|
async getPendingPartialWithdrawals({stateId}, context) {
|
|
358
342
|
const {state, executionOptimistic, finalized} = await getState(stateId);
|
|
359
|
-
const fork =
|
|
343
|
+
const fork = state.forkName;
|
|
360
344
|
|
|
361
|
-
if (!
|
|
345
|
+
if (!isStatePostElectra(state)) {
|
|
362
346
|
throw new ApiError(400, `Cannot retrieve pending partial withdrawals for pre-electra state fork=${fork}`);
|
|
363
347
|
}
|
|
364
348
|
|
|
365
|
-
const
|
|
349
|
+
const pendingPartialWithdrawals = state.pendingPartialWithdrawals;
|
|
366
350
|
|
|
367
351
|
return {
|
|
368
|
-
data: context?.returnBytes
|
|
352
|
+
data: context?.returnBytes
|
|
353
|
+
? ssz.electra.PendingPartialWithdrawals.serialize(pendingPartialWithdrawals)
|
|
354
|
+
: pendingPartialWithdrawals,
|
|
369
355
|
meta: {executionOptimistic, finalized, version: fork},
|
|
370
356
|
};
|
|
371
357
|
},
|
|
372
358
|
|
|
373
359
|
async getPendingConsolidations({stateId}, context) {
|
|
374
360
|
const {state, executionOptimistic, finalized} = await getState(stateId);
|
|
375
|
-
const fork =
|
|
361
|
+
const fork = state.forkName;
|
|
376
362
|
|
|
377
|
-
if (!
|
|
363
|
+
if (!isStatePostElectra(state)) {
|
|
378
364
|
throw new ApiError(400, `Cannot retrieve pending consolidations for pre-electra state fork=${fork}`);
|
|
379
365
|
}
|
|
380
366
|
|
|
381
|
-
const
|
|
367
|
+
const pendingConsolidations = state.pendingConsolidations;
|
|
382
368
|
|
|
383
369
|
return {
|
|
384
|
-
data: context?.returnBytes
|
|
370
|
+
data: context?.returnBytes
|
|
371
|
+
? ssz.electra.PendingConsolidations.serialize(pendingConsolidations)
|
|
372
|
+
: pendingConsolidations,
|
|
385
373
|
meta: {executionOptimistic, finalized, version: fork},
|
|
386
374
|
};
|
|
387
375
|
},
|
|
388
376
|
|
|
389
377
|
async getProposerLookahead({stateId}, context) {
|
|
390
378
|
const {state, executionOptimistic, finalized} = await getState(stateId);
|
|
391
|
-
const fork =
|
|
379
|
+
const fork = state.forkName;
|
|
392
380
|
|
|
393
|
-
if (!
|
|
381
|
+
if (!isStatePostFulu(state)) {
|
|
394
382
|
throw new ApiError(400, `Cannot retrieve proposer lookahead for pre-fulu state fork=${fork}`);
|
|
395
383
|
}
|
|
396
384
|
|
|
397
|
-
const
|
|
385
|
+
const proposerLookahead = state.proposerLookahead;
|
|
398
386
|
|
|
399
387
|
return {
|
|
400
|
-
data: context?.returnBytes ?
|
|
388
|
+
data: context?.returnBytes ? ssz.fulu.ProposerLookahead.serialize(proposerLookahead) : proposerLookahead,
|
|
401
389
|
meta: {executionOptimistic, finalized, version: fork},
|
|
402
390
|
};
|
|
403
391
|
},
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import {routes} from "@lodestar/api";
|
|
2
2
|
import {CheckpointWithPayloadStatus, IForkChoice} from "@lodestar/fork-choice";
|
|
3
3
|
import {GENESIS_SLOT} from "@lodestar/params";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
BLSPubkey,
|
|
7
|
-
Epoch,
|
|
8
|
-
RootHex,
|
|
9
|
-
Slot,
|
|
10
|
-
ValidatorIndex,
|
|
11
|
-
getValidatorStatus,
|
|
12
|
-
mapToGeneralStatus,
|
|
13
|
-
phase0,
|
|
14
|
-
} from "@lodestar/types";
|
|
4
|
+
import {IBeaconStateView, PubkeyCache} from "@lodestar/state-transition";
|
|
5
|
+
import {BLSPubkey, Epoch, RootHex, Slot, ValidatorIndex, getValidatorStatus, phase0} from "@lodestar/types";
|
|
15
6
|
import {fromHex} from "@lodestar/utils";
|
|
16
7
|
import {IBeaconChain} from "../../../../chain/index.js";
|
|
17
8
|
import {ApiError, ValidationError} from "../../errors.js";
|
|
@@ -52,7 +43,7 @@ export function resolveStateId(
|
|
|
52
43
|
export async function getStateResponseWithRegen(
|
|
53
44
|
chain: IBeaconChain,
|
|
54
45
|
inStateId: routes.beacon.StateId
|
|
55
|
-
): Promise<{state:
|
|
46
|
+
): Promise<{state: IBeaconStateView | Uint8Array; executionOptimistic: boolean; finalized: boolean}> {
|
|
56
47
|
const stateId = resolveStateId(chain.forkChoice, inStateId);
|
|
57
48
|
|
|
58
49
|
const res =
|
|
@@ -89,22 +80,17 @@ export function toValidatorResponse(
|
|
|
89
80
|
|
|
90
81
|
export function filterStateValidatorsByStatus(
|
|
91
82
|
statuses: string[],
|
|
92
|
-
state:
|
|
83
|
+
state: IBeaconStateView,
|
|
93
84
|
pubkeyCache: PubkeyCache,
|
|
94
85
|
currentEpoch: Epoch
|
|
95
86
|
): routes.beacon.ValidatorResponse[] {
|
|
96
87
|
const responses: routes.beacon.ValidatorResponse[] = [];
|
|
97
|
-
const
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
for (const validator of validatorsArr) {
|
|
101
|
-
const validatorStatus = getValidatorStatus(validator, currentEpoch);
|
|
102
|
-
const generalStatus = mapToGeneralStatus(validatorStatus);
|
|
103
|
-
|
|
88
|
+
const validators = state.getValidatorsByStatus(new Set(statuses), currentEpoch);
|
|
89
|
+
for (const validator of validators) {
|
|
104
90
|
const resp = getStateValidatorIndex(validator.pubkey, state, pubkeyCache);
|
|
105
|
-
if (resp.valid
|
|
91
|
+
if (resp.valid) {
|
|
106
92
|
responses.push(
|
|
107
|
-
toValidatorResponse(resp.validatorIndex, validator, state.
|
|
93
|
+
toValidatorResponse(resp.validatorIndex, validator, state.getBalance(resp.validatorIndex), currentEpoch)
|
|
108
94
|
);
|
|
109
95
|
}
|
|
110
96
|
}
|
|
@@ -117,7 +103,7 @@ type StateValidatorIndexResponse =
|
|
|
117
103
|
|
|
118
104
|
export function getStateValidatorIndex(
|
|
119
105
|
id: routes.beacon.ValidatorId | BLSPubkey,
|
|
120
|
-
state:
|
|
106
|
+
state: IBeaconStateView,
|
|
121
107
|
pubkeyCache: PubkeyCache
|
|
122
108
|
): StateValidatorIndexResponse {
|
|
123
109
|
if (typeof id === "string") {
|
|
@@ -139,7 +125,7 @@ export function getStateValidatorIndex(
|
|
|
139
125
|
if (!Number.isSafeInteger(validatorIndex)) {
|
|
140
126
|
return {valid: false, code: 400, reason: "Invalid validator index"};
|
|
141
127
|
}
|
|
142
|
-
if (validatorIndex >= state.
|
|
128
|
+
if (validatorIndex >= state.validatorCount) {
|
|
143
129
|
return {valid: false, code: 404, reason: "Validator index from future state"};
|
|
144
130
|
}
|
|
145
131
|
return {valid: true, validatorIndex};
|
|
@@ -150,7 +136,7 @@ export function getStateValidatorIndex(
|
|
|
150
136
|
if (validatorIndex === null) {
|
|
151
137
|
return {valid: false, code: 404, reason: "Validator pubkey not found in state"};
|
|
152
138
|
}
|
|
153
|
-
if (validatorIndex >= state.
|
|
139
|
+
if (validatorIndex >= state.validatorCount) {
|
|
154
140
|
return {valid: false, code: 404, reason: "Validator pubkey from future state"};
|
|
155
141
|
}
|
|
156
142
|
return {valid: true, validatorIndex};
|
|
@@ -2,7 +2,7 @@ import {routes} from "@lodestar/api";
|
|
|
2
2
|
import {ApplicationMethods} from "@lodestar/api/server";
|
|
3
3
|
import {ExecutionStatus} from "@lodestar/fork-choice";
|
|
4
4
|
import {ForkPostDeneb, ZERO_HASH_HEX, isForkPostDeneb, isForkPostFulu} from "@lodestar/params";
|
|
5
|
-
import {BeaconState, DataColumnSidecars, type SignedBeaconBlock, sszTypesFor} from "@lodestar/types";
|
|
5
|
+
import {BeaconState, DataColumnSidecar, DataColumnSidecars, type SignedBeaconBlock, sszTypesFor} from "@lodestar/types";
|
|
6
6
|
import {toRootHex} from "@lodestar/utils";
|
|
7
7
|
import {getBlobKzgCommitments} from "../../../util/dataColumns.js";
|
|
8
8
|
import {isOptimisticBlock} from "../../../util/forkChoice.js";
|
|
@@ -98,7 +98,7 @@ export function getDebugApi({
|
|
|
98
98
|
const fork = config.getForkName(block.message.slot);
|
|
99
99
|
const blockRoot = sszTypesFor(fork).BeaconBlock.hashTreeRoot(block.message);
|
|
100
100
|
|
|
101
|
-
let dataColumnSidecars:
|
|
101
|
+
let dataColumnSidecars: DataColumnSidecar[];
|
|
102
102
|
|
|
103
103
|
const blobCount = isForkPostDeneb(fork)
|
|
104
104
|
? getBlobKzgCommitments(fork, block as SignedBeaconBlock<ForkPostDeneb>).length
|