@lodestar/beacon-node 1.42.0-dev.c35b4283f1 → 1.42.0-dev.c58e92512e
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 +25 -13
- 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 +33 -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/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 +37 -23
- package/lib/chain/blocks/importBlock.js.map +1 -1
- package/lib/chain/blocks/importExecutionPayload.d.ts +10 -8
- package/lib/chain/blocks/importExecutionPayload.d.ts.map +1 -1
- package/lib/chain/blocks/importExecutionPayload.js +87 -51
- package/lib/chain/blocks/importExecutionPayload.js.map +1 -1
- 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/payloadEnvelopeInput.d.ts +14 -6
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.d.ts.map +1 -1
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.js +33 -2
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.js.map +1 -1
- package/lib/chain/blocks/payloadEnvelopeInput/types.d.ts +2 -1
- package/lib/chain/blocks/payloadEnvelopeInput/types.d.ts.map +1 -1
- package/lib/chain/blocks/types.d.ts +21 -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/chain.d.ts +15 -14
- package/lib/chain/chain.d.ts.map +1 -1
- package/lib/chain/chain.js +110 -62
- 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 +4 -4
- package/lib/chain/errors/blockError.d.ts.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/forkChoice/index.d.ts +4 -4
- package/lib/chain/forkChoice/index.d.ts.map +1 -1
- package/lib/chain/forkChoice/index.js +30 -24
- 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 +15 -14
- 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 +3 -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 +32 -17
- package/lib/chain/produceBlock/produceBlockBody.js.map +1 -1
- package/lib/chain/regen/interface.d.ts +13 -13
- package/lib/chain/regen/interface.d.ts.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/seenGossipBlockInput.d.ts +1 -1
- package/lib/chain/seenCache/seenGossipBlockInput.d.ts.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 +1 -1
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.d.ts.map +1 -1
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.js +2 -2
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.js.map +1 -1
- 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.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 +7 -3
- 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 +3 -3
- package/lib/chain/validation/syncCommittee.d.ts.map +1 -1
- package/lib/chain/validation/syncCommittee.js +5 -1
- 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 +3 -3
- package/lib/chain/validatorMonitor.d.ts.map +1 -1
- package/lib/chain/validatorMonitor.js +11 -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 +32 -4
- package/lib/metrics/metrics/lodestar.d.ts.map +1 -1
- package/lib/metrics/metrics/lodestar.js +52 -15
- package/lib/metrics/metrics/lodestar.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 +25 -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 +261 -74
- 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 +1 -1
- package/lib/sync/unknownBlock.js +3 -3
- 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 +25 -1
- package/lib/util/sszBytes.d.ts.map +1 -1
- package/lib/util/sszBytes.js +189 -2
- 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 +33 -16
- 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 +36 -41
- 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 +50 -31
- package/src/chain/blocks/importExecutionPayload.ts +98 -62
- package/src/chain/blocks/index.ts +3 -2
- package/src/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.ts +53 -12
- package/src/chain/blocks/payloadEnvelopeInput/types.ts +2 -1
- package/src/chain/blocks/types.ts +26 -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/chain.ts +148 -95
- package/src/chain/emitter.ts +27 -9
- package/src/chain/errors/blockError.ts +4 -4
- package/src/chain/errors/dataColumnSidecarError.ts +32 -1
- package/src/chain/forkChoice/index.ts +35 -41
- package/src/chain/initState.ts +7 -2
- package/src/chain/interface.ts +16 -15
- 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 +7 -10
- package/src/chain/produceBlock/produceBlockBody.ts +49 -46
- package/src/chain/regen/interface.ts +13 -17
- package/src/chain/regen/queued.ts +16 -20
- package/src/chain/regen/regen.ts +16 -17
- package/src/chain/seenCache/seenGossipBlockInput.ts +2 -2
- package/src/chain/seenCache/seenPayloadEnvelopeInput.ts +2 -2
- 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 +3 -4
- 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 +7 -4
- 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 +10 -6
- package/src/chain/validation/syncCommitteeContributionAndProof.ts +9 -10
- package/src/chain/validation/voluntaryExit.ts +3 -8
- package/src/chain/validatorMonitor.ts +15 -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 +57 -19
- 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 +32 -6
- package/src/network/processor/gossipHandlers.ts +326 -87
- 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 +4 -4
- 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 +245 -3
- package/src/util/types.ts +6 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import {ChainConfig} from "@lodestar/config";
|
|
2
|
+
import {PayloadStatus} from "@lodestar/fork-choice";
|
|
3
|
+
import {GENESIS_SLOT} from "@lodestar/params";
|
|
4
|
+
import {RespStatus, ResponseError, ResponseOutgoing} from "@lodestar/reqresp";
|
|
5
|
+
import {computeEpochAtSlot} from "@lodestar/state-transition";
|
|
6
|
+
import {gloas} from "@lodestar/types";
|
|
7
|
+
import {IBeaconChain} from "../../../chain/index.js";
|
|
8
|
+
import {IBeaconDb} from "../../../db/index.js";
|
|
9
|
+
|
|
10
|
+
export async function* onExecutionPayloadEnvelopesByRange(
|
|
11
|
+
request: gloas.ExecutionPayloadEnvelopesByRangeRequest,
|
|
12
|
+
chain: IBeaconChain,
|
|
13
|
+
db: IBeaconDb
|
|
14
|
+
): AsyncIterable<ResponseOutgoing> {
|
|
15
|
+
const {startSlot, count} = validateExecutionPayloadEnvelopesByRangeRequest(chain.config, request);
|
|
16
|
+
const endSlot = startSlot + count;
|
|
17
|
+
|
|
18
|
+
if (startSlot < chain.earliestAvailableSlot) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const finalized = db.executionPayloadEnvelopeArchive;
|
|
23
|
+
const finalizedSlot = chain.forkChoice.getFinalizedCheckpointSlot();
|
|
24
|
+
|
|
25
|
+
// Finalized range of envelopes
|
|
26
|
+
if (startSlot <= finalizedSlot) {
|
|
27
|
+
for await (const {key, value: envelopeBytes} of finalized.binaryEntriesStream({
|
|
28
|
+
gte: startSlot,
|
|
29
|
+
lt: endSlot,
|
|
30
|
+
})) {
|
|
31
|
+
const slot = finalized.decodeKey(key);
|
|
32
|
+
yield {
|
|
33
|
+
data: envelopeBytes,
|
|
34
|
+
boundary: chain.config.getForkBoundaryAtEpoch(computeEpochAtSlot(slot)),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Non-finalized range of envelopes
|
|
40
|
+
if (endSlot > finalizedSlot) {
|
|
41
|
+
const headBlock = chain.forkChoice.getHead();
|
|
42
|
+
const headRoot = headBlock.blockRoot;
|
|
43
|
+
const headChain = chain.forkChoice.getAllAncestorBlocks(headRoot, headBlock.payloadStatus);
|
|
44
|
+
|
|
45
|
+
// Iterate head chain with ascending block numbers
|
|
46
|
+
for (let i = headChain.length - 1; i >= 0; i--) {
|
|
47
|
+
const block = headChain[i];
|
|
48
|
+
|
|
49
|
+
if (block.slot >= startSlot && block.slot < endSlot) {
|
|
50
|
+
// Skip EMPTY blocks
|
|
51
|
+
if (block.payloadStatus !== PayloadStatus.FULL) {
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const envelopeBytes = await chain.getSerializedExecutionPayloadEnvelope(block.slot, block.blockRoot);
|
|
56
|
+
if (!envelopeBytes) {
|
|
57
|
+
throw new ResponseError(
|
|
58
|
+
RespStatus.SERVER_ERROR,
|
|
59
|
+
`No envelope for root ${block.blockRoot} slot ${block.slot}, startSlot=${startSlot} endSlot=${endSlot} finalizedSlot=${finalizedSlot}`
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
yield {
|
|
64
|
+
data: envelopeBytes,
|
|
65
|
+
boundary: chain.config.getForkBoundaryAtEpoch(computeEpochAtSlot(block.slot)),
|
|
66
|
+
};
|
|
67
|
+
} else if (block.slot >= endSlot) {
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function validateExecutionPayloadEnvelopesByRangeRequest(
|
|
75
|
+
config: ChainConfig,
|
|
76
|
+
request: gloas.ExecutionPayloadEnvelopesByRangeRequest
|
|
77
|
+
): gloas.ExecutionPayloadEnvelopesByRangeRequest {
|
|
78
|
+
const {startSlot} = request;
|
|
79
|
+
let {count} = request;
|
|
80
|
+
|
|
81
|
+
if (count < 1) {
|
|
82
|
+
throw new ResponseError(RespStatus.INVALID_REQUEST, "count < 1");
|
|
83
|
+
}
|
|
84
|
+
// TODO: validate against MIN_EPOCHS_FOR_BLOCK_REQUESTS
|
|
85
|
+
if (startSlot < GENESIS_SLOT) {
|
|
86
|
+
throw new ResponseError(RespStatus.INVALID_REQUEST, "startSlot < genesis");
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (count > config.MAX_REQUEST_BLOCKS_DENEB) {
|
|
90
|
+
count = config.MAX_REQUEST_BLOCKS_DENEB;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {startSlot, count};
|
|
94
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {ResponseOutgoing} from "@lodestar/reqresp";
|
|
2
|
+
import {computeEpochAtSlot} from "@lodestar/state-transition";
|
|
3
|
+
import {toRootHex} from "@lodestar/utils";
|
|
4
|
+
import {IBeaconChain} from "../../../chain/index.js";
|
|
5
|
+
import {IBeaconDb} from "../../../db/index.js";
|
|
6
|
+
import {ExecutionPayloadEnvelopesByRootRequest} from "../../../util/types.js";
|
|
7
|
+
|
|
8
|
+
export async function* onExecutionPayloadEnvelopesByRoot(
|
|
9
|
+
requestBody: ExecutionPayloadEnvelopesByRootRequest,
|
|
10
|
+
chain: IBeaconChain,
|
|
11
|
+
db: IBeaconDb
|
|
12
|
+
): AsyncIterable<ResponseOutgoing> {
|
|
13
|
+
// Spec: [max(GLOAS_FORK_EPOCH, current_epoch - MIN_EPOCHS_FOR_BLOCK_REQUESTS), current_epoch]
|
|
14
|
+
const currentEpoch = chain.clock.currentEpoch;
|
|
15
|
+
const minimumRequestEpoch = Math.max(
|
|
16
|
+
currentEpoch - chain.config.MIN_EPOCHS_FOR_BLOCK_REQUESTS,
|
|
17
|
+
chain.config.GLOAS_FORK_EPOCH
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
for (const root of requestBody) {
|
|
21
|
+
const rootHex = toRootHex(root);
|
|
22
|
+
const block = chain.forkChoice.getBlockHexDefaultStatus(rootHex);
|
|
23
|
+
// If the block is not in fork choice, it may be finalized. Attempt to find its slot in block archive
|
|
24
|
+
const slot = block ? block.slot : await db.blockArchive.getSlotByRoot(root);
|
|
25
|
+
|
|
26
|
+
if (slot === null) {
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const requestedEpoch = computeEpochAtSlot(slot);
|
|
31
|
+
if (requestedEpoch < minimumRequestEpoch) {
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const envelopeBytes = await chain.getSerializedExecutionPayloadEnvelope(slot, rootHex);
|
|
36
|
+
if (envelopeBytes) {
|
|
37
|
+
yield {
|
|
38
|
+
data: envelopeBytes,
|
|
39
|
+
boundary: chain.config.getForkBoundaryAtEpoch(requestedEpoch),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
BeaconBlocksByRootRequestType,
|
|
7
7
|
BlobSidecarsByRootRequestType,
|
|
8
8
|
DataColumnSidecarsByRootRequestType,
|
|
9
|
+
ExecutionPayloadEnvelopesByRootRequestType,
|
|
9
10
|
} from "../../../util/types.js";
|
|
10
11
|
import {GetReqRespHandlerFn, ReqRespMethod} from "../types.js";
|
|
11
12
|
import {onBeaconBlocksByRange} from "./beaconBlocksByRange.js";
|
|
@@ -14,6 +15,8 @@ import {onBlobSidecarsByRange} from "./blobSidecarsByRange.js";
|
|
|
14
15
|
import {onBlobSidecarsByRoot} from "./blobSidecarsByRoot.js";
|
|
15
16
|
import {onDataColumnSidecarsByRange} from "./dataColumnSidecarsByRange.js";
|
|
16
17
|
import {onDataColumnSidecarsByRoot} from "./dataColumnSidecarsByRoot.js";
|
|
18
|
+
import {onExecutionPayloadEnvelopesByRange} from "./executionPayloadEnvelopesByRange.js";
|
|
19
|
+
import {onExecutionPayloadEnvelopesByRoot} from "./executionPayloadEnvelopesByRoot.js";
|
|
17
20
|
import {onLightClientBootstrap} from "./lightClientBootstrap.js";
|
|
18
21
|
import {onLightClientFinalityUpdate} from "./lightClientFinalityUpdate.js";
|
|
19
22
|
import {onLightClientOptimisticUpdate} from "./lightClientOptimisticUpdate.js";
|
|
@@ -62,6 +65,15 @@ export function getReqRespHandlers({db, chain}: {db: IBeaconDb; chain: IBeaconCh
|
|
|
62
65
|
return onDataColumnSidecarsByRoot(body, chain, db, peerId, peerClient);
|
|
63
66
|
},
|
|
64
67
|
|
|
68
|
+
[ReqRespMethod.ExecutionPayloadEnvelopesByRoot]: (req) => {
|
|
69
|
+
const body = ExecutionPayloadEnvelopesByRootRequestType(chain.config).deserialize(req.data);
|
|
70
|
+
return onExecutionPayloadEnvelopesByRoot(body, chain, db);
|
|
71
|
+
},
|
|
72
|
+
[ReqRespMethod.ExecutionPayloadEnvelopesByRange]: (req) => {
|
|
73
|
+
const body = ssz.gloas.ExecutionPayloadEnvelopesByRangeRequest.deserialize(req.data);
|
|
74
|
+
return onExecutionPayloadEnvelopesByRange(body, chain, db);
|
|
75
|
+
},
|
|
76
|
+
|
|
65
77
|
[ReqRespMethod.LightClientBootstrap]: (req) => {
|
|
66
78
|
const body = ssz.Root.deserialize(req.data);
|
|
67
79
|
return onLightClientBootstrap(body, chain);
|
|
@@ -94,6 +94,18 @@ export const DataColumnSidecarsByRoot = toProtocol({
|
|
|
94
94
|
contextBytesType: ContextBytesType.ForkDigest,
|
|
95
95
|
});
|
|
96
96
|
|
|
97
|
+
export const ExecutionPayloadEnvelopesByRoot = toProtocol({
|
|
98
|
+
method: ReqRespMethod.ExecutionPayloadEnvelopesByRoot,
|
|
99
|
+
version: Version.V1,
|
|
100
|
+
contextBytesType: ContextBytesType.ForkDigest,
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
export const ExecutionPayloadEnvelopesByRange = toProtocol({
|
|
104
|
+
method: ReqRespMethod.ExecutionPayloadEnvelopesByRange,
|
|
105
|
+
version: Version.V1,
|
|
106
|
+
contextBytesType: ContextBytesType.ForkDigest,
|
|
107
|
+
});
|
|
108
|
+
|
|
97
109
|
export const LightClientBootstrap = toProtocol({
|
|
98
110
|
method: ReqRespMethod.LightClientBootstrap,
|
|
99
111
|
version: Version.V1,
|
|
@@ -73,6 +73,24 @@ export const rateLimitQuotas: (fork: ForkName, config: BeaconConfig) => Record<R
|
|
|
73
73
|
req.reduce((total, item) => total + item.columns.length, 0)
|
|
74
74
|
),
|
|
75
75
|
},
|
|
76
|
+
[ReqRespMethod.ExecutionPayloadEnvelopesByRoot]: {
|
|
77
|
+
byPeer: {quota: config.MAX_REQUEST_PAYLOADS, quotaTimeMs: 10_000},
|
|
78
|
+
getRequestCount: getRequestCountFn(
|
|
79
|
+
fork,
|
|
80
|
+
config,
|
|
81
|
+
ReqRespMethod.ExecutionPayloadEnvelopesByRoot,
|
|
82
|
+
(req) => req.length
|
|
83
|
+
),
|
|
84
|
+
},
|
|
85
|
+
[ReqRespMethod.ExecutionPayloadEnvelopesByRange]: {
|
|
86
|
+
byPeer: {quota: config.MAX_REQUEST_BLOCKS_DENEB, quotaTimeMs: 10_000},
|
|
87
|
+
getRequestCount: getRequestCountFn(
|
|
88
|
+
fork,
|
|
89
|
+
config,
|
|
90
|
+
ReqRespMethod.ExecutionPayloadEnvelopesByRange,
|
|
91
|
+
(req) => req.count
|
|
92
|
+
),
|
|
93
|
+
},
|
|
76
94
|
[ReqRespMethod.LightClientBootstrap]: {
|
|
77
95
|
// As similar in the nature of `Status` protocol so we use the same rate limits.
|
|
78
96
|
byPeer: {quota: 5, quotaTimeMs: 15_000},
|
|
@@ -46,6 +46,8 @@ export function onOutgoingReqRespError(e: RequestError, method: ReqRespMethod):
|
|
|
46
46
|
return PeerAction.LowToleranceError;
|
|
47
47
|
case ReqRespMethod.BeaconBlocksByRange:
|
|
48
48
|
case ReqRespMethod.BeaconBlocksByRoot:
|
|
49
|
+
case ReqRespMethod.ExecutionPayloadEnvelopesByRoot:
|
|
50
|
+
case ReqRespMethod.ExecutionPayloadEnvelopesByRange:
|
|
49
51
|
return PeerAction.MidToleranceError;
|
|
50
52
|
default:
|
|
51
53
|
return null;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {Type} from "@chainsafe/ssz";
|
|
2
2
|
import {BeaconConfig} from "@lodestar/config";
|
|
3
|
-
import {ForkName, ForkPostAltair, isForkPostAltair} from "@lodestar/params";
|
|
3
|
+
import {ForkName, ForkPostAltair, ForkPostFulu, isForkPostAltair, isForkPostFulu} from "@lodestar/params";
|
|
4
4
|
import {Protocol, ProtocolHandler, ReqRespRequest} from "@lodestar/reqresp";
|
|
5
5
|
import {
|
|
6
|
+
DataColumnSidecar,
|
|
6
7
|
LightClientBootstrap,
|
|
7
8
|
LightClientFinalityUpdate,
|
|
8
9
|
LightClientOptimisticUpdate,
|
|
@@ -14,6 +15,7 @@ import {
|
|
|
14
15
|
altair,
|
|
15
16
|
deneb,
|
|
16
17
|
fulu,
|
|
18
|
+
gloas,
|
|
17
19
|
phase0,
|
|
18
20
|
ssz,
|
|
19
21
|
sszTypesFor,
|
|
@@ -25,6 +27,8 @@ import {
|
|
|
25
27
|
BlobSidecarsByRootRequestType,
|
|
26
28
|
DataColumnSidecarsByRootRequest,
|
|
27
29
|
DataColumnSidecarsByRootRequestType,
|
|
30
|
+
ExecutionPayloadEnvelopesByRootRequest,
|
|
31
|
+
ExecutionPayloadEnvelopesByRootRequestType,
|
|
28
32
|
} from "../../util/types.js";
|
|
29
33
|
|
|
30
34
|
export type ProtocolNoHandler = Omit<Protocol, "handler">;
|
|
@@ -42,6 +46,8 @@ export enum ReqRespMethod {
|
|
|
42
46
|
BlobSidecarsByRoot = "blob_sidecars_by_root",
|
|
43
47
|
DataColumnSidecarsByRange = "data_column_sidecars_by_range",
|
|
44
48
|
DataColumnSidecarsByRoot = "data_column_sidecars_by_root",
|
|
49
|
+
ExecutionPayloadEnvelopesByRoot = "execution_payload_envelopes_by_root",
|
|
50
|
+
ExecutionPayloadEnvelopesByRange = "execution_payload_envelopes_by_range",
|
|
45
51
|
LightClientBootstrap = "light_client_bootstrap",
|
|
46
52
|
LightClientUpdatesByRange = "light_client_updates_by_range",
|
|
47
53
|
LightClientFinalityUpdate = "light_client_finality_update",
|
|
@@ -60,6 +66,8 @@ export type RequestBodyByMethod = {
|
|
|
60
66
|
[ReqRespMethod.BlobSidecarsByRoot]: BlobSidecarsByRootRequest;
|
|
61
67
|
[ReqRespMethod.DataColumnSidecarsByRange]: fulu.DataColumnSidecarsByRangeRequest;
|
|
62
68
|
[ReqRespMethod.DataColumnSidecarsByRoot]: DataColumnSidecarsByRootRequest;
|
|
69
|
+
[ReqRespMethod.ExecutionPayloadEnvelopesByRoot]: ExecutionPayloadEnvelopesByRootRequest;
|
|
70
|
+
[ReqRespMethod.ExecutionPayloadEnvelopesByRange]: gloas.ExecutionPayloadEnvelopesByRangeRequest;
|
|
63
71
|
[ReqRespMethod.LightClientBootstrap]: Root;
|
|
64
72
|
[ReqRespMethod.LightClientUpdatesByRange]: altair.LightClientUpdatesByRange;
|
|
65
73
|
[ReqRespMethod.LightClientFinalityUpdate]: null;
|
|
@@ -76,8 +84,10 @@ type ResponseBodyByMethod = {
|
|
|
76
84
|
[ReqRespMethod.BeaconBlocksByRoot]: SignedBeaconBlock;
|
|
77
85
|
[ReqRespMethod.BlobSidecarsByRange]: deneb.BlobSidecar;
|
|
78
86
|
[ReqRespMethod.BlobSidecarsByRoot]: deneb.BlobSidecar;
|
|
79
|
-
[ReqRespMethod.DataColumnSidecarsByRange]:
|
|
80
|
-
[ReqRespMethod.DataColumnSidecarsByRoot]:
|
|
87
|
+
[ReqRespMethod.DataColumnSidecarsByRange]: DataColumnSidecar;
|
|
88
|
+
[ReqRespMethod.DataColumnSidecarsByRoot]: DataColumnSidecar;
|
|
89
|
+
[ReqRespMethod.ExecutionPayloadEnvelopesByRoot]: gloas.SignedExecutionPayloadEnvelope;
|
|
90
|
+
[ReqRespMethod.ExecutionPayloadEnvelopesByRange]: gloas.SignedExecutionPayloadEnvelope;
|
|
81
91
|
|
|
82
92
|
[ReqRespMethod.LightClientBootstrap]: LightClientBootstrap;
|
|
83
93
|
[ReqRespMethod.LightClientUpdatesByRange]: LightClientUpdate;
|
|
@@ -105,6 +115,8 @@ export const requestSszTypeByMethod: (
|
|
|
105
115
|
[ReqRespMethod.BlobSidecarsByRoot]: BlobSidecarsByRootRequestType(fork, config),
|
|
106
116
|
[ReqRespMethod.DataColumnSidecarsByRange]: ssz.fulu.DataColumnSidecarsByRangeRequest,
|
|
107
117
|
[ReqRespMethod.DataColumnSidecarsByRoot]: DataColumnSidecarsByRootRequestType(config),
|
|
118
|
+
[ReqRespMethod.ExecutionPayloadEnvelopesByRoot]: ExecutionPayloadEnvelopesByRootRequestType(config),
|
|
119
|
+
[ReqRespMethod.ExecutionPayloadEnvelopesByRange]: ssz.gloas.ExecutionPayloadEnvelopesByRangeRequest,
|
|
108
120
|
|
|
109
121
|
[ReqRespMethod.LightClientBootstrap]: ssz.Root,
|
|
110
122
|
[ReqRespMethod.LightClientUpdatesByRange]: ssz.altair.LightClientUpdatesByRange,
|
|
@@ -135,8 +147,10 @@ export const responseSszTypeByMethod: {[K in ReqRespMethod]: ResponseTypeGetter<
|
|
|
135
147
|
[ReqRespMethod.LightClientBootstrap]: (fork) => sszTypesFor(onlyPostAltairFork(fork)).LightClientBootstrap,
|
|
136
148
|
[ReqRespMethod.LightClientUpdatesByRange]: (fork) => sszTypesFor(onlyPostAltairFork(fork)).LightClientUpdate,
|
|
137
149
|
[ReqRespMethod.LightClientFinalityUpdate]: (fork) => sszTypesFor(onlyPostAltairFork(fork)).LightClientFinalityUpdate,
|
|
138
|
-
[ReqRespMethod.DataColumnSidecarsByRange]: () =>
|
|
139
|
-
[ReqRespMethod.DataColumnSidecarsByRoot]: () =>
|
|
150
|
+
[ReqRespMethod.DataColumnSidecarsByRange]: (fork) => sszTypesFor(onlyPostFuluFork(fork)).DataColumnSidecar,
|
|
151
|
+
[ReqRespMethod.DataColumnSidecarsByRoot]: (fork) => sszTypesFor(onlyPostFuluFork(fork)).DataColumnSidecar,
|
|
152
|
+
[ReqRespMethod.ExecutionPayloadEnvelopesByRoot]: () => ssz.gloas.SignedExecutionPayloadEnvelope,
|
|
153
|
+
[ReqRespMethod.ExecutionPayloadEnvelopesByRange]: () => ssz.gloas.SignedExecutionPayloadEnvelope,
|
|
140
154
|
[ReqRespMethod.LightClientOptimisticUpdate]: (fork) =>
|
|
141
155
|
sszTypesFor(onlyPostAltairFork(fork)).LightClientOptimisticUpdate,
|
|
142
156
|
};
|
|
@@ -148,6 +162,13 @@ function onlyPostAltairFork(fork: ForkName): ForkPostAltair {
|
|
|
148
162
|
throw Error(`Not a post-altair fork ${fork}`);
|
|
149
163
|
}
|
|
150
164
|
|
|
165
|
+
function onlyPostFuluFork(fork: ForkName): ForkPostFulu {
|
|
166
|
+
if (isForkPostFulu(fork)) {
|
|
167
|
+
return fork;
|
|
168
|
+
}
|
|
169
|
+
throw Error(`Not a post-fulu fork ${fork}`);
|
|
170
|
+
}
|
|
171
|
+
|
|
151
172
|
export type RequestTypedContainer = {
|
|
152
173
|
[K in ReqRespMethod]: {method: K; body: RequestBodyByMethod[K]};
|
|
153
174
|
}[ReqRespMethod];
|
package/src/node/nodejs.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {BeaconApiMethods} from "@lodestar/api/beacon/server";
|
|
|
6
6
|
import {BeaconConfig} from "@lodestar/config";
|
|
7
7
|
import type {LoggerNode} from "@lodestar/logger/node";
|
|
8
8
|
import {ZERO_HASH_HEX} from "@lodestar/params";
|
|
9
|
-
import {
|
|
9
|
+
import {IBeaconStateView, PubkeyCache, isStatePostBellatrix} from "@lodestar/state-transition";
|
|
10
10
|
import {phase0} from "@lodestar/types";
|
|
11
11
|
import {sleep, toRootHex} from "@lodestar/utils";
|
|
12
12
|
import {ProcessShutdownCallback} from "@lodestar/validator";
|
|
@@ -53,7 +53,7 @@ export type BeaconNodeInitModules = {
|
|
|
53
53
|
privateKey: PrivateKey;
|
|
54
54
|
dataDir: string;
|
|
55
55
|
peerStoreDir?: string;
|
|
56
|
-
anchorState:
|
|
56
|
+
anchorState: IBeaconStateView;
|
|
57
57
|
isAnchorStateFinalized: boolean;
|
|
58
58
|
wsCheckpoint?: phase0.Checkpoint;
|
|
59
59
|
metricsRegistries?: Registry[];
|
|
@@ -221,9 +221,10 @@ export class BeaconNode {
|
|
|
221
221
|
|
|
222
222
|
let executionEngineOpts = opts.executionEngine;
|
|
223
223
|
if (opts.executionEngine.mode === "mock") {
|
|
224
|
-
const eth1BlockHash =
|
|
225
|
-
|
|
226
|
-
|
|
224
|
+
const eth1BlockHash =
|
|
225
|
+
isStatePostBellatrix(anchorState) && anchorState.isExecutionStateType
|
|
226
|
+
? toRootHex(anchorState.latestBlockHash)
|
|
227
|
+
: undefined;
|
|
227
228
|
executionEngineOpts = {
|
|
228
229
|
...opts.executionEngine,
|
|
229
230
|
genesisBlockHash: ZERO_HASH_HEX,
|
package/src/node/notifier.ts
CHANGED
|
@@ -2,11 +2,10 @@ import {BeaconConfig} from "@lodestar/config";
|
|
|
2
2
|
import {ExecutionStatus, ProtoBlock} from "@lodestar/fork-choice";
|
|
3
3
|
import {EPOCHS_PER_SYNC_COMMITTEE_PERIOD, SLOTS_PER_EPOCH} from "@lodestar/params";
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
IBeaconStateView,
|
|
6
6
|
computeEpochAtSlot,
|
|
7
7
|
computeStartSlotAtEpoch,
|
|
8
|
-
|
|
9
|
-
isMergeTransitionComplete,
|
|
8
|
+
isStatePostBellatrix,
|
|
10
9
|
} from "@lodestar/state-transition";
|
|
11
10
|
import {Epoch} from "@lodestar/types";
|
|
12
11
|
import {ErrorAborted, Logger, prettyBytes, prettyBytesShort, sleep} from "@lodestar/utils";
|
|
@@ -161,7 +160,7 @@ function timeToNextHalfSlot(config: BeaconConfig, chain: IBeaconChain, isFirstTi
|
|
|
161
160
|
function getHeadExecutionInfo(
|
|
162
161
|
config: BeaconConfig,
|
|
163
162
|
clockEpoch: Epoch,
|
|
164
|
-
headState:
|
|
163
|
+
headState: IBeaconStateView,
|
|
165
164
|
headInfo: ProtoBlock
|
|
166
165
|
): string[] {
|
|
167
166
|
if (clockEpoch < config.BELLATRIX_FORK_EPOCH) {
|
|
@@ -171,8 +170,8 @@ function getHeadExecutionInfo(
|
|
|
171
170
|
const executionStatusStr = headInfo.executionStatus.toLowerCase();
|
|
172
171
|
|
|
173
172
|
// Add execution status to notifier only if head is on/post bellatrix
|
|
174
|
-
if (
|
|
175
|
-
if (isMergeTransitionComplete
|
|
173
|
+
if (isStatePostBellatrix(headState) && headState.isExecutionStateType) {
|
|
174
|
+
if (headState.isMergeTransitionComplete) {
|
|
176
175
|
const executionPayloadHashInfo =
|
|
177
176
|
headInfo.executionStatus !== ExecutionStatus.PreMerge ? headInfo.executionPayloadBlockHash : "empty";
|
|
178
177
|
const executionPayloadNumberInfo =
|
|
@@ -2,7 +2,7 @@ import {EventEmitter} from "node:events";
|
|
|
2
2
|
import {StrictEventEmitter} from "strict-event-emitter-types";
|
|
3
3
|
import {BeaconConfig, ChainForkConfig} from "@lodestar/config";
|
|
4
4
|
import {SLOTS_PER_EPOCH} from "@lodestar/params";
|
|
5
|
-
import {
|
|
5
|
+
import {IBeaconStateView, blockToHeader} from "@lodestar/state-transition";
|
|
6
6
|
import {Root, SignedBeaconBlock, Slot, phase0, ssz} from "@lodestar/types";
|
|
7
7
|
import {ErrorAborted, Logger, byteArrayEquals, sleep, toRootHex} from "@lodestar/utils";
|
|
8
8
|
import {IBeaconChain} from "../../chain/index.js";
|
|
@@ -29,7 +29,7 @@ export type BackfillSyncModules = {
|
|
|
29
29
|
config: BeaconConfig;
|
|
30
30
|
logger: Logger;
|
|
31
31
|
metrics: Metrics | null;
|
|
32
|
-
anchorState:
|
|
32
|
+
anchorState: IBeaconStateView;
|
|
33
33
|
wsCheckpoint?: phase0.Checkpoint;
|
|
34
34
|
signal: AbortSignal;
|
|
35
35
|
};
|
|
@@ -231,7 +231,7 @@ export class BackfillSync extends (EventEmitter as {new (): BackfillSyncEmitter}
|
|
|
231
231
|
): Promise<T> {
|
|
232
232
|
const {config, anchorState, db, wsCheckpoint, logger} = modules;
|
|
233
233
|
|
|
234
|
-
const {checkpoint: anchorCp} = computeAnchorCheckpoint(
|
|
234
|
+
const {checkpoint: anchorCp} = anchorState.computeAnchorCheckpoint();
|
|
235
235
|
const anchorSlot = anchorState.latestBlockHeader.slot;
|
|
236
236
|
const syncAnchor = {
|
|
237
237
|
anchorBlock: null,
|
package/src/sync/unknownBlock.ts
CHANGED
|
@@ -64,7 +64,7 @@ enum FetchResult {
|
|
|
64
64
|
*
|
|
65
65
|
* - publishBlock
|
|
66
66
|
* - gossipHandlers
|
|
67
|
-
* -
|
|
67
|
+
* - searchUnknownBlock
|
|
68
68
|
* = produceSyncCommitteeContribution
|
|
69
69
|
* = validateGossipFnRetryUnknownRoot
|
|
70
70
|
* * submitPoolAttestationsV2
|
|
@@ -115,7 +115,7 @@ export class BlockInputSync {
|
|
|
115
115
|
this.logger.verbose("BlockInputSync enabled.");
|
|
116
116
|
this.chain.emitter.on(ChainEvent.unknownBlockRoot, this.onUnknownBlockRoot);
|
|
117
117
|
this.chain.emitter.on(ChainEvent.incompleteBlockInput, this.onIncompleteBlockInput);
|
|
118
|
-
this.chain.emitter.on(ChainEvent.
|
|
118
|
+
this.chain.emitter.on(ChainEvent.blockUnknownParent, this.onUnknownParent);
|
|
119
119
|
this.network.events.on(NetworkEvent.peerConnected, this.onPeerConnected);
|
|
120
120
|
this.network.events.on(NetworkEvent.peerDisconnected, this.onPeerDisconnected);
|
|
121
121
|
this.subscribedToNetworkEvents = true;
|
|
@@ -126,7 +126,7 @@ export class BlockInputSync {
|
|
|
126
126
|
this.logger.verbose("BlockInputSync disabled.");
|
|
127
127
|
this.chain.emitter.off(ChainEvent.unknownBlockRoot, this.onUnknownBlockRoot);
|
|
128
128
|
this.chain.emitter.off(ChainEvent.incompleteBlockInput, this.onIncompleteBlockInput);
|
|
129
|
-
this.chain.emitter.off(ChainEvent.
|
|
129
|
+
this.chain.emitter.off(ChainEvent.blockUnknownParent, this.onUnknownParent);
|
|
130
130
|
this.network.events.off(NetworkEvent.peerConnected, this.onPeerConnected);
|
|
131
131
|
this.network.events.off(NetworkEvent.peerDisconnected, this.onPeerDisconnected);
|
|
132
132
|
this.subscribedToNetworkEvents = false;
|
|
@@ -171,7 +171,7 @@ export class BlockInputSync {
|
|
|
171
171
|
/**
|
|
172
172
|
* Process an unknownBlockParent event and register the block in `pendingBlocks` Map.
|
|
173
173
|
*/
|
|
174
|
-
private onUnknownParent = (data: ChainEventData[ChainEvent.
|
|
174
|
+
private onUnknownParent = (data: ChainEventData[ChainEvent.blockUnknownParent]): void => {
|
|
175
175
|
try {
|
|
176
176
|
this.addByRootHex(data.blockInput.parentRootHex, data.peer);
|
|
177
177
|
this.addByBlockInput(data.blockInput, data.peer);
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "../../chain/blocks/blockInput/index.js";
|
|
12
12
|
import {SeenBlockInput} from "../../chain/seenCache/seenGossipBlockInput.js";
|
|
13
13
|
import {validateBlockBlobSidecars} from "../../chain/validation/blobSidecar.js";
|
|
14
|
-
import {
|
|
14
|
+
import {validateFuluBlockDataColumnSidecars} from "../../chain/validation/dataColumnSidecar.js";
|
|
15
15
|
import {BeaconMetrics} from "../../metrics/metrics/beacon.js";
|
|
16
16
|
import {INetwork} from "../../network/index.js";
|
|
17
17
|
import {getBlobKzgCommitments} from "../../util/dataColumns.js";
|
|
@@ -27,7 +27,7 @@ export type DownloadByRangeRequests = {
|
|
|
27
27
|
export type DownloadByRangeResponses = {
|
|
28
28
|
blocks?: SignedBeaconBlock[];
|
|
29
29
|
blobSidecars?: deneb.BlobSidecars;
|
|
30
|
-
columnSidecars?: fulu.
|
|
30
|
+
columnSidecars?: fulu.DataColumnSidecar[];
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
export type DownloadAndCacheByRangeProps = DownloadByRangeRequests & {
|
|
@@ -58,7 +58,7 @@ export type ValidatedBlobSidecars = {
|
|
|
58
58
|
|
|
59
59
|
export type ValidatedColumnSidecars = {
|
|
60
60
|
blockRoot: Uint8Array;
|
|
61
|
-
columnSidecars: fulu.
|
|
61
|
+
columnSidecars: fulu.DataColumnSidecar[];
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
export type ValidatedResponses = {
|
|
@@ -245,7 +245,7 @@ export async function requestByRange({
|
|
|
245
245
|
}): Promise<DownloadByRangeResponses> {
|
|
246
246
|
let blocks: undefined | SignedBeaconBlock[];
|
|
247
247
|
let blobSidecars: undefined | deneb.BlobSidecars;
|
|
248
|
-
let columnSidecars: undefined | fulu.
|
|
248
|
+
let columnSidecars: undefined | fulu.DataColumnSidecar[];
|
|
249
249
|
|
|
250
250
|
const requests: Promise<unknown>[] = [];
|
|
251
251
|
|
|
@@ -268,7 +268,7 @@ export async function requestByRange({
|
|
|
268
268
|
if (columnsRequest) {
|
|
269
269
|
requests.push(
|
|
270
270
|
network.sendDataColumnSidecarsByRange(peerIdStr, columnsRequest).then((columnResponse) => {
|
|
271
|
-
columnSidecars = columnResponse;
|
|
271
|
+
columnSidecars = columnResponse as fulu.DataColumnSidecar[];
|
|
272
272
|
})
|
|
273
273
|
);
|
|
274
274
|
}
|
|
@@ -615,11 +615,13 @@ export async function validateColumnsByRangeResponse(
|
|
|
615
615
|
config: ChainForkConfig,
|
|
616
616
|
request: fulu.DataColumnSidecarsByRangeRequest,
|
|
617
617
|
blocks: ValidatedBlock[],
|
|
618
|
-
columnSidecars: fulu.
|
|
618
|
+
columnSidecars: fulu.DataColumnSidecar[],
|
|
619
619
|
peerDasMetrics?: BeaconMetrics["peerDas"] | null
|
|
620
620
|
): Promise<WarnResult<ValidatedColumnSidecars[], DownloadByRangeError>> {
|
|
621
621
|
const warnings: DownloadByRangeError[] = [];
|
|
622
622
|
|
|
623
|
+
// TODO GLOAS: Extend by range column sync to support gloas.DataColumnSidecar and
|
|
624
|
+
// validate against the block bid commitments instead of the fulu signed header shape
|
|
623
625
|
const seenColumns = new Map<Slot, Map<number, fulu.DataColumnSidecar>>();
|
|
624
626
|
let currentSlot = -1;
|
|
625
627
|
let currentIndex = -1;
|
|
@@ -767,7 +769,7 @@ export async function validateColumnsByRangeResponse(
|
|
|
767
769
|
}
|
|
768
770
|
|
|
769
771
|
validationPromises.push(
|
|
770
|
-
|
|
772
|
+
validateFuluBlockDataColumnSidecars(
|
|
771
773
|
null, // do not pass chain here so we do not validate header signature
|
|
772
774
|
slot,
|
|
773
775
|
blockRoot,
|
|
@@ -8,7 +8,7 @@ import {BlockInputSource, IBlockInput} from "../../chain/blocks/blockInput/types
|
|
|
8
8
|
import {ChainEventEmitter} from "../../chain/emitter.js";
|
|
9
9
|
import {IBeaconChain} from "../../chain/interface.js";
|
|
10
10
|
import {validateBlockBlobSidecars} from "../../chain/validation/blobSidecar.js";
|
|
11
|
-
import {
|
|
11
|
+
import {validateFuluBlockDataColumnSidecars} from "../../chain/validation/dataColumnSidecar.js";
|
|
12
12
|
import {INetwork} from "../../network/interface.js";
|
|
13
13
|
import {PeerSyncMeta} from "../../network/peers/peersData.js";
|
|
14
14
|
import {prettyPrintPeerIdStr} from "../../network/util.js";
|
|
@@ -52,7 +52,7 @@ export type FetchByRootAndValidateColumnsProps = FetchByRootCoreProps & {
|
|
|
52
52
|
export type FetchByRootResponses = {
|
|
53
53
|
block: SignedBeaconBlock;
|
|
54
54
|
blobSidecars?: deneb.BlobSidecars;
|
|
55
|
-
columnSidecars?: fulu.
|
|
55
|
+
columnSidecars?: fulu.DataColumnSidecar[];
|
|
56
56
|
};
|
|
57
57
|
|
|
58
58
|
export type DownloadByRootProps = FetchByRootCoreProps & {
|
|
@@ -213,7 +213,7 @@ export async function fetchByRoot({
|
|
|
213
213
|
}: FetchByRootProps): Promise<WarnResult<FetchByRootResponses, DownloadByRootError>> {
|
|
214
214
|
let block: SignedBeaconBlock;
|
|
215
215
|
let blobSidecars: deneb.BlobSidecars | undefined;
|
|
216
|
-
let columnSidecarResult: WarnResult<fulu.
|
|
216
|
+
let columnSidecarResult: WarnResult<fulu.DataColumnSidecar[], DownloadByRootError> | undefined;
|
|
217
217
|
const {peerId: peerIdStr} = peerMeta;
|
|
218
218
|
|
|
219
219
|
if (isPendingBlockInput(cacheItem)) {
|
|
@@ -376,7 +376,7 @@ export async function fetchAndValidateColumns({
|
|
|
376
376
|
block,
|
|
377
377
|
blockRoot,
|
|
378
378
|
missing,
|
|
379
|
-
}: FetchByRootAndValidateColumnsProps): Promise<WarnResult<fulu.
|
|
379
|
+
}: FetchByRootAndValidateColumnsProps): Promise<WarnResult<fulu.DataColumnSidecar[], DownloadByRootError>> {
|
|
380
380
|
const {peerId: peerIdStr} = peerMeta;
|
|
381
381
|
const slot = block.message.slot;
|
|
382
382
|
const blobCount = getBlobKzgCommitments(forkName, block).length;
|
|
@@ -387,9 +387,11 @@ export async function fetchAndValidateColumns({
|
|
|
387
387
|
const blockRootHex = toRootHex(blockRoot);
|
|
388
388
|
const peerColumns = new Set(peerMeta.custodyColumns ?? []);
|
|
389
389
|
const requestedColumns = missing.filter((c) => peerColumns.has(c));
|
|
390
|
-
|
|
390
|
+
// TODO GLOAS: Extend by root column sync to support gloas.DataColumnSidecar and
|
|
391
|
+
// validate against block bid commitments instead of the fulu signed header shape
|
|
392
|
+
const columnSidecars = (await network.sendDataColumnSidecarsByRoot(peerIdStr, [
|
|
391
393
|
{blockRoot, columns: requestedColumns},
|
|
392
|
-
]);
|
|
394
|
+
])) as fulu.DataColumnSidecar[];
|
|
393
395
|
|
|
394
396
|
const warnings: DownloadByRootError[] = [];
|
|
395
397
|
|
|
@@ -440,7 +442,8 @@ export async function fetchAndValidateColumns({
|
|
|
440
442
|
);
|
|
441
443
|
}
|
|
442
444
|
|
|
443
|
-
|
|
445
|
+
// TODO GLOAS: Swap to fork-aware column validation once post-gloas by-root sync is implemented
|
|
446
|
+
await validateFuluBlockDataColumnSidecars(chain, slot, blockRoot, blobCount, columnSidecars, chain?.metrics?.peerDas);
|
|
444
447
|
|
|
445
448
|
return {result: columnSidecars, warnings: warnings.length > 0 ? warnings : null};
|
|
446
449
|
}
|
|
@@ -451,11 +454,12 @@ export async function fetchColumnsByRoot({
|
|
|
451
454
|
peerMeta,
|
|
452
455
|
blockRoot,
|
|
453
456
|
missing,
|
|
454
|
-
}: Pick<
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
457
|
+
}: Pick<FetchByRootAndValidateColumnsProps, "network" | "peerMeta" | "blockRoot" | "missing">): Promise<
|
|
458
|
+
fulu.DataColumnSidecar[]
|
|
459
|
+
> {
|
|
460
|
+
return (await network.sendDataColumnSidecarsByRoot(peerMeta.peerId, [
|
|
461
|
+
{blockRoot, columns: missing},
|
|
462
|
+
])) as fulu.DataColumnSidecar[];
|
|
459
463
|
}
|
|
460
464
|
|
|
461
465
|
export enum DownloadByRootErrorCode {
|