@lodestar/beacon-node 1.42.0-dev.d73eccfa56 → 1.42.0-dev.e8407e9657
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.js +1 -1
- package/lib/api/impl/beacon/pool/index.js.map +1 -1
- package/lib/api/impl/beacon/state/index.d.ts.map +1 -1
- package/lib/api/impl/beacon/state/index.js +27 -32
- package/lib/api/impl/beacon/state/index.js.map +1 -1
- package/lib/api/impl/beacon/state/utils.d.ts +4 -4
- package/lib/api/impl/beacon/state/utils.d.ts.map +1 -1
- package/lib/api/impl/beacon/state/utils.js +7 -10
- package/lib/api/impl/beacon/state/utils.js.map +1 -1
- package/lib/api/impl/debug/index.js.map +1 -1
- package/lib/api/impl/lodestar/index.d.ts.map +1 -1
- package/lib/api/impl/lodestar/index.js +4 -6
- package/lib/api/impl/lodestar/index.js.map +1 -1
- package/lib/api/impl/proof/index.d.ts.map +1 -1
- package/lib/api/impl/proof/index.js +2 -6
- package/lib/api/impl/proof/index.js.map +1 -1
- package/lib/api/impl/validator/index.d.ts.map +1 -1
- package/lib/api/impl/validator/index.js +27 -27
- package/lib/api/impl/validator/index.js.map +1 -1
- package/lib/api/impl/validator/utils.d.ts +2 -2
- package/lib/api/impl/validator/utils.d.ts.map +1 -1
- package/lib/api/impl/validator/utils.js +3 -3
- package/lib/api/impl/validator/utils.js.map +1 -1
- package/lib/chain/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 +34 -22
- 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 +78 -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 +4 -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 +1 -1
- package/lib/chain/blocks/verifyBlocksSignatures.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksStateTransitionOnly.d.ts +3 -3
- package/lib/chain/blocks/verifyBlocksStateTransitionOnly.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlocksStateTransitionOnly.js +3 -3
- package/lib/chain/blocks/verifyBlocksStateTransitionOnly.js.map +1 -1
- package/lib/chain/chain.d.ts +15 -14
- package/lib/chain/chain.d.ts.map +1 -1
- package/lib/chain/chain.js +102 -59
- 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 +27 -23
- 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 +4 -4
- package/lib/chain/lightClient/index.js.map +1 -1
- package/lib/chain/opPools/aggregatedAttestationPool.d.ts +6 -6
- package/lib/chain/opPools/aggregatedAttestationPool.d.ts.map +1 -1
- package/lib/chain/opPools/aggregatedAttestationPool.js +10 -13
- package/lib/chain/opPools/aggregatedAttestationPool.js.map +1 -1
- package/lib/chain/opPools/opPool.d.ts +3 -3
- package/lib/chain/opPools/opPool.d.ts.map +1 -1
- package/lib/chain/opPools/opPool.js +7 -7
- package/lib/chain/opPools/opPool.js.map +1 -1
- package/lib/chain/opPools/utils.d.ts +2 -2
- package/lib/chain/opPools/utils.d.ts.map +1 -1
- package/lib/chain/opPools/utils.js +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 +3 -3
- package/lib/chain/prepareNextSlot.js.map +1 -1
- package/lib/chain/produceBlock/computeNewStateRoot.d.ts +4 -4
- package/lib/chain/produceBlock/computeNewStateRoot.d.ts.map +1 -1
- package/lib/chain/produceBlock/computeNewStateRoot.js +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 +12 -16
- 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/attestation.js +3 -3
- package/lib/chain/validation/attestation.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 +4 -4
- package/lib/chain/validation/executionPayloadBid.js.map +1 -1
- package/lib/chain/validation/executionPayloadEnvelope.d.ts.map +1 -1
- package/lib/chain/validation/executionPayloadEnvelope.js +2 -3
- package/lib/chain/validation/executionPayloadEnvelope.js.map +1 -1
- package/lib/chain/validation/payloadAttestationMessage.d.ts.map +1 -1
- package/lib/chain/validation/payloadAttestationMessage.js +1 -2
- package/lib/chain/validation/payloadAttestationMessage.js.map +1 -1
- package/lib/chain/validation/proposerSlashing.js +1 -1
- package/lib/chain/validation/proposerSlashing.js.map +1 -1
- package/lib/chain/validation/signatureSets/contributionAndProof.d.ts +2 -2
- package/lib/chain/validation/signatureSets/contributionAndProof.d.ts.map +1 -1
- package/lib/chain/validation/signatureSets/contributionAndProof.js +1 -1
- package/lib/chain/validation/signatureSets/contributionAndProof.js.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommittee.d.ts +2 -2
- package/lib/chain/validation/signatureSets/syncCommittee.d.ts.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommittee.js +1 -1
- package/lib/chain/validation/signatureSets/syncCommittee.js.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommitteeContribution.d.ts +2 -2
- package/lib/chain/validation/signatureSets/syncCommitteeContribution.d.ts.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommitteeContribution.js.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommitteeSelectionProof.d.ts +2 -2
- package/lib/chain/validation/signatureSets/syncCommitteeSelectionProof.d.ts.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommitteeSelectionProof.js +1 -1
- package/lib/chain/validation/signatureSets/syncCommitteeSelectionProof.js.map +1 -1
- package/lib/chain/validation/syncCommittee.d.ts +4 -4
- package/lib/chain/validation/syncCommittee.d.ts.map +1 -1
- package/lib/chain/validation/syncCommittee.js +13 -12
- package/lib/chain/validation/syncCommittee.js.map +1 -1
- package/lib/chain/validation/syncCommitteeContributionAndProof.d.ts.map +1 -1
- package/lib/chain/validation/syncCommitteeContributionAndProof.js +1 -1
- package/lib/chain/validation/syncCommitteeContributionAndProof.js.map +1 -1
- package/lib/chain/validation/voluntaryExit.d.ts.map +1 -1
- package/lib/chain/validation/voluntaryExit.js +3 -3
- package/lib/chain/validation/voluntaryExit.js.map +1 -1
- package/lib/chain/validatorMonitor.d.ts +3 -3
- package/lib/chain/validatorMonitor.d.ts.map +1 -1
- package/lib/chain/validatorMonitor.js +9 -7
- 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/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 +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 +265 -80
- 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 +311 -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 +1 -4
- package/lib/node/nodejs.js.map +1 -1
- package/lib/node/notifier.d.ts.map +1 -1
- package/lib/node/notifier.js +3 -3
- package/lib/node/notifier.js.map +1 -1
- package/lib/sync/backfill/backfill.d.ts +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 +19 -2
- package/lib/util/sszBytes.d.ts.map +1 -1
- package/lib/util/sszBytes.js +173 -3
- 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 +1 -1
- package/src/api/impl/beacon/state/index.ts +29 -41
- package/src/api/impl/beacon/state/utils.ts +11 -25
- package/src/api/impl/debug/index.ts +2 -2
- package/src/api/impl/lodestar/index.ts +4 -8
- package/src/api/impl/proof/index.ts +2 -9
- package/src/api/impl/validator/index.ts +29 -41
- package/src/api/impl/validator/utils.ts +4 -7
- package/src/chain/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 +41 -26
- package/src/chain/blocks/importExecutionPayload.ts +89 -63
- 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 +9 -14
- package/src/chain/blocks/verifyBlocksSignatures.ts +3 -3
- package/src/chain/blocks/verifyBlocksStateTransitionOnly.ts +6 -8
- package/src/chain/chain.ts +138 -91
- 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 +33 -42
- package/src/chain/initState.ts +7 -2
- package/src/chain/interface.ts +16 -15
- package/src/chain/lightClient/index.ts +9 -22
- package/src/chain/opPools/aggregatedAttestationPool.ts +15 -21
- package/src/chain/opPools/opPool.ts +13 -14
- package/src/chain/opPools/utils.ts +3 -3
- package/src/chain/options.ts +2 -0
- package/src/chain/prepareNextSlot.ts +6 -8
- package/src/chain/produceBlock/computeNewStateRoot.ts +6 -10
- package/src/chain/produceBlock/produceBlockBody.ts +22 -49
- 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/attestation.ts +3 -3
- package/src/chain/validation/attesterSlashing.ts +3 -3
- package/src/chain/validation/blobSidecar.ts +1 -1
- package/src/chain/validation/block.ts +2 -4
- package/src/chain/validation/blsToExecutionChange.ts +2 -2
- package/src/chain/validation/dataColumnSidecar.ts +231 -8
- package/src/chain/validation/executionPayloadBid.ts +3 -7
- package/src/chain/validation/executionPayloadEnvelope.ts +2 -8
- package/src/chain/validation/payloadAttestationMessage.ts +2 -4
- package/src/chain/validation/proposerSlashing.ts +1 -1
- package/src/chain/validation/signatureSets/contributionAndProof.ts +2 -7
- package/src/chain/validation/signatureSets/syncCommittee.ts +2 -7
- package/src/chain/validation/signatureSets/syncCommitteeContribution.ts +2 -2
- package/src/chain/validation/signatureSets/syncCommitteeSelectionProof.ts +2 -7
- package/src/chain/validation/syncCommittee.ts +21 -20
- package/src/chain/validation/syncCommitteeContributionAndProof.ts +5 -10
- package/src/chain/validation/voluntaryExit.ts +3 -8
- package/src/chain/validatorMonitor.ts +12 -11
- 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/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 +32 -6
- package/src/network/processor/gossipHandlers.ts +329 -94
- package/src/network/processor/index.ts +393 -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 +3 -5
- package/src/node/notifier.ts +4 -10
- 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 +223 -7
- package/src/util/types.ts +6 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {routes} from "@lodestar/api";
|
|
2
|
-
import {
|
|
2
|
+
import {IBeaconStateView} from "@lodestar/state-transition";
|
|
3
3
|
import {Epoch, RootHex, phase0} from "@lodestar/types";
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -24,13 +24,13 @@ export type CheckpointHexPayload = {epoch: Epoch; rootHex: RootHex; payloadPrese
|
|
|
24
24
|
* The cache key is state root
|
|
25
25
|
*/
|
|
26
26
|
export interface BlockStateCache {
|
|
27
|
-
get(rootHex: RootHex):
|
|
28
|
-
add(item:
|
|
29
|
-
setHeadState(item:
|
|
27
|
+
get(rootHex: RootHex): IBeaconStateView | null;
|
|
28
|
+
add(item: IBeaconStateView): void;
|
|
29
|
+
setHeadState(item: IBeaconStateView | null): void;
|
|
30
30
|
/**
|
|
31
31
|
* Get a seed state for state reload.
|
|
32
32
|
*/
|
|
33
|
-
getSeedState():
|
|
33
|
+
getSeedState(): IBeaconStateView;
|
|
34
34
|
clear(): void;
|
|
35
35
|
size: number;
|
|
36
36
|
prune(headStateRootHex: RootHex): void;
|
|
@@ -39,7 +39,7 @@ export interface BlockStateCache {
|
|
|
39
39
|
upgradeToGloas(): void;
|
|
40
40
|
dumpSummary(): routes.lodestar.StateCacheItem[];
|
|
41
41
|
/** Expose beacon states stored in cache. Use with caution */
|
|
42
|
-
getStates(): IterableIterator<
|
|
42
|
+
getStates(): IterableIterator<IBeaconStateView>;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
/**
|
|
@@ -65,24 +65,20 @@ export interface BlockStateCache {
|
|
|
65
65
|
*/
|
|
66
66
|
export interface CheckpointStateCache {
|
|
67
67
|
init?: () => Promise<void>;
|
|
68
|
-
getOrReload(cp: CheckpointHexPayload): Promise<
|
|
69
|
-
getStateOrBytes(cp: CheckpointHexPayload): Promise<
|
|
70
|
-
get(cpOrKey: CheckpointHexPayload | string):
|
|
71
|
-
add(cp: phase0.Checkpoint, state:
|
|
72
|
-
getLatest(rootHex: RootHex, maxEpoch: Epoch, payloadPresent: boolean):
|
|
73
|
-
getOrReloadLatest(
|
|
74
|
-
rootHex: RootHex,
|
|
75
|
-
maxEpoch: Epoch,
|
|
76
|
-
payloadPresent: boolean
|
|
77
|
-
): Promise<CachedBeaconStateAllForks | null>;
|
|
68
|
+
getOrReload(cp: CheckpointHexPayload): Promise<IBeaconStateView | null>;
|
|
69
|
+
getStateOrBytes(cp: CheckpointHexPayload): Promise<IBeaconStateView | Uint8Array | null>;
|
|
70
|
+
get(cpOrKey: CheckpointHexPayload | string): IBeaconStateView | null;
|
|
71
|
+
add(cp: phase0.Checkpoint, state: IBeaconStateView, payloadPresent: boolean): void;
|
|
72
|
+
getLatest(rootHex: RootHex, maxEpoch: Epoch, payloadPresent: boolean): IBeaconStateView | null;
|
|
73
|
+
getOrReloadLatest(rootHex: RootHex, maxEpoch: Epoch, payloadPresent: boolean): Promise<IBeaconStateView | null>;
|
|
78
74
|
updatePreComputedCheckpoint(rootHex: RootHex, epoch: Epoch, payloadPresent: boolean): number | null;
|
|
79
75
|
prune(finalizedEpoch: Epoch, justifiedEpoch: Epoch): void;
|
|
80
76
|
pruneFinalized(finalizedEpoch: Epoch): void;
|
|
81
|
-
processState(blockRootHex: RootHex, state:
|
|
77
|
+
processState(blockRootHex: RootHex, state: IBeaconStateView): Promise<number>;
|
|
82
78
|
clear(): void;
|
|
83
79
|
dumpSummary(): routes.lodestar.StateCacheItem[];
|
|
84
80
|
/** Expose beacon states stored in cache. Use with caution */
|
|
85
|
-
getStates(): IterableIterator<
|
|
81
|
+
getStates(): IterableIterator<IBeaconStateView>;
|
|
86
82
|
}
|
|
87
83
|
|
|
88
84
|
export enum CacheItemType {
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
getAttDataFromSignedAggregateAndProofElectra,
|
|
45
45
|
getAttDataFromSignedAggregateAndProofPhase0,
|
|
46
46
|
getAttesterIndexFromSingleAttestationSerialized,
|
|
47
|
-
|
|
47
|
+
getIndexFromSingleAttestationSerialized,
|
|
48
48
|
getSignatureFromAttestationSerialized,
|
|
49
49
|
getSignatureFromSingleAttestationSerialized,
|
|
50
50
|
} from "../../util/sszBytes.js";
|
|
@@ -882,12 +882,12 @@ export function getCommitteeIndexFromAttestationOrBytes(
|
|
|
882
882
|
|
|
883
883
|
if (isForkPostElectra(fork)) {
|
|
884
884
|
if (isGossipAttestation) {
|
|
885
|
-
return
|
|
885
|
+
return getIndexFromSingleAttestationSerialized(ForkName.electra, attestationOrBytes.serializedData);
|
|
886
886
|
}
|
|
887
887
|
return (attestationOrBytes.attestation as SingleAttestation<ForkPostElectra>).committeeIndex;
|
|
888
888
|
}
|
|
889
889
|
if (isGossipAttestation) {
|
|
890
|
-
return
|
|
890
|
+
return getIndexFromSingleAttestationSerialized(ForkName.phase0, attestationOrBytes.serializedData);
|
|
891
891
|
}
|
|
892
892
|
return (attestationOrBytes.attestation as SingleAttestation<ForkPreElectra>).data.index;
|
|
893
893
|
}
|
|
@@ -48,7 +48,7 @@ export async function validateAttesterSlashing(
|
|
|
48
48
|
chain.config,
|
|
49
49
|
chain.pubkeyCache,
|
|
50
50
|
state.slot,
|
|
51
|
-
state.
|
|
51
|
+
state.validatorCount,
|
|
52
52
|
attesterSlashing,
|
|
53
53
|
false
|
|
54
54
|
);
|
|
@@ -59,8 +59,8 @@ export async function validateAttesterSlashing(
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
const currentEpoch = state.
|
|
63
|
-
if (!intersectingIndices.some((index) => isSlashableValidator(state.
|
|
62
|
+
const currentEpoch = state.epoch;
|
|
63
|
+
if (!intersectingIndices.some((index) => isSlashableValidator(state.getValidator(index), currentEpoch))) {
|
|
64
64
|
throw new AttesterSlashingError(GossipAction.REJECT, {
|
|
65
65
|
code: AttesterSlashingErrorCode.INVALID,
|
|
66
66
|
error: Error("AttesterSlashing has no slashable validators"),
|
|
@@ -176,7 +176,7 @@ export async function validateGossipBlobSidecar(
|
|
|
176
176
|
// MAY be queued for later processing while proposers for the block's branch are calculated -- in such
|
|
177
177
|
// a case _do not_ `REJECT`, instead `IGNORE` this message.
|
|
178
178
|
const proposerIndex = blobSidecar.signedBlockHeader.message.proposerIndex;
|
|
179
|
-
if (blockState.
|
|
179
|
+
if (blockState.getBeaconProposer(blobSlot) !== proposerIndex) {
|
|
180
180
|
throw new BlobSidecarGossipError(GossipAction.REJECT, {
|
|
181
181
|
code: BlobSidecarErrorCode.INCORRECT_PROPOSER,
|
|
182
182
|
proposerIndex,
|
|
@@ -6,8 +6,6 @@ import {
|
|
|
6
6
|
computeTimeAtSlot,
|
|
7
7
|
getBlockProposerSignatureSet,
|
|
8
8
|
isExecutionBlockBodyType,
|
|
9
|
-
isExecutionEnabled,
|
|
10
|
-
isExecutionStateType,
|
|
11
9
|
} from "@lodestar/state-transition";
|
|
12
10
|
import {SignedBeaconBlock, deneb, gloas, isGloasBeaconBlock} from "@lodestar/types";
|
|
13
11
|
import {byteArrayEquals, sleep, toRootHex} from "@lodestar/utils";
|
|
@@ -176,7 +174,7 @@ export async function validateGossipBlock(
|
|
|
176
174
|
if (isForkPostBellatrix(fork) && !isForkPostGloas(fork)) {
|
|
177
175
|
if (!isExecutionBlockBodyType(block.body)) throw Error("Not execution block body type");
|
|
178
176
|
const executionPayload = block.body.executionPayload;
|
|
179
|
-
if (isExecutionStateType
|
|
177
|
+
if (blockState.isExecutionStateType && blockState.isExecutionEnabled(block)) {
|
|
180
178
|
const expectedTimestamp = computeTimeAtSlot(config, blockSlot, chain.genesisTime);
|
|
181
179
|
if (executionPayload.timestamp !== computeTimeAtSlot(config, blockSlot, chain.genesisTime)) {
|
|
182
180
|
throw new BlockGossipError(GossipAction.REJECT, {
|
|
@@ -206,7 +204,7 @@ export async function validateGossipBlock(
|
|
|
206
204
|
// shuffling (defined by parent_root/slot). If the proposer_index cannot immediately be verified against the expected
|
|
207
205
|
// shuffling, the block MAY be queued for later processing while proposers for the block's branch are calculated --
|
|
208
206
|
// in such a case do not REJECT, instead IGNORE this message.
|
|
209
|
-
if (blockState.
|
|
207
|
+
if (blockState.getBeaconProposer(blockSlot) !== proposerIndex) {
|
|
210
208
|
throw new BlockGossipError(GossipAction.REJECT, {code: BlockErrorCode.INCORRECT_PROPOSER, proposerIndex});
|
|
211
209
|
}
|
|
212
210
|
|
|
@@ -39,12 +39,12 @@ async function validateBlsToExecutionChange(
|
|
|
39
39
|
const state = chain.getHeadState();
|
|
40
40
|
const {config} = chain;
|
|
41
41
|
const addressChange = blsToExecutionChange.message;
|
|
42
|
-
if (addressChange.validatorIndex >= state.
|
|
42
|
+
if (addressChange.validatorIndex >= state.validatorCount) {
|
|
43
43
|
throw new BlsToExecutionChangeError(GossipAction.REJECT, {
|
|
44
44
|
code: BlsToExecutionChangeErrorCode.INVALID,
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
const validator = state.
|
|
47
|
+
const validator = state.getValidator(addressChange.validatorIndex);
|
|
48
48
|
// [REJECT] All of the conditions within process_bls_to_execution_change pass validation.
|
|
49
49
|
// verifySignature = false, verified in batch below
|
|
50
50
|
const {valid} = isValidBlsToExecutionChange(config, validator, blsToExecutionChange, false);
|
|
@@ -10,11 +10,13 @@ import {
|
|
|
10
10
|
getBlockHeaderProposerSignatureSetByHeaderSlot,
|
|
11
11
|
getBlockHeaderProposerSignatureSetByParentStateSlot,
|
|
12
12
|
} from "@lodestar/state-transition";
|
|
13
|
-
import {DataColumnSidecar, Root, Slot, SubnetID, fulu, ssz} from "@lodestar/types";
|
|
13
|
+
import {DataColumnSidecar, Root, Slot, SubnetID, fulu, gloas, ssz} from "@lodestar/types";
|
|
14
14
|
import {byteArrayEquals, toRootHex, verifyMerkleBranch} from "@lodestar/utils";
|
|
15
15
|
import {BeaconMetrics} from "../../metrics/metrics/beacon.js";
|
|
16
16
|
import {Metrics} from "../../metrics/metrics.js";
|
|
17
|
+
import {getDataColumnSidecarSlot} from "../../util/dataColumns.js";
|
|
17
18
|
import {kzg} from "../../util/kzg.js";
|
|
19
|
+
import {PayloadEnvelopeInput} from "../blocks/payloadEnvelopeInput/index.js";
|
|
18
20
|
import {
|
|
19
21
|
DataColumnSidecarErrorCode,
|
|
20
22
|
DataColumnSidecarGossipError,
|
|
@@ -26,7 +28,7 @@ import {RegenCaller} from "../regen/interface.js";
|
|
|
26
28
|
|
|
27
29
|
// SPEC FUNCTION
|
|
28
30
|
// https://github.com/ethereum/consensus-specs/blob/v1.6.0-alpha.4/specs/fulu/p2p-interface.md#data_column_sidecar_subnet_id
|
|
29
|
-
export async function
|
|
31
|
+
export async function validateGossipFuluDataColumnSidecar(
|
|
30
32
|
chain: IBeaconChain,
|
|
31
33
|
dataColumnSidecar: fulu.DataColumnSidecar,
|
|
32
34
|
gossipSubnet: SubnetID,
|
|
@@ -36,7 +38,7 @@ export async function validateGossipDataColumnSidecar(
|
|
|
36
38
|
const blockRootHex = toRootHex(ssz.phase0.BeaconBlockHeader.hashTreeRoot(blockHeader));
|
|
37
39
|
|
|
38
40
|
// 1) [REJECT] The sidecar is valid as verified by verify_data_column_sidecar
|
|
39
|
-
|
|
41
|
+
verifyFuluDataColumnSidecar(chain.config, dataColumnSidecar);
|
|
40
42
|
|
|
41
43
|
// 2) [REJECT] The sidecar is for the correct subnet -- i.e. compute_subnet_for_data_column_sidecar(sidecar.index) == subnet_id
|
|
42
44
|
if (computeSubnetForDataColumnSidecar(chain.config, dataColumnSidecar) !== gossipSubnet) {
|
|
@@ -122,7 +124,7 @@ export async function validateGossipDataColumnSidecar(
|
|
|
122
124
|
// while proposers for the block's branch are calculated -- in such a case do not REJECT, instead IGNORE
|
|
123
125
|
// this message.
|
|
124
126
|
const proposerIndex = blockHeader.proposerIndex;
|
|
125
|
-
const expectedProposerIndex = blockState.
|
|
127
|
+
const expectedProposerIndex = blockState.getBeaconProposer(blockHeader.slot);
|
|
126
128
|
|
|
127
129
|
if (proposerIndex !== expectedProposerIndex) {
|
|
128
130
|
throw new DataColumnSidecarGossipError(GossipAction.REJECT, {
|
|
@@ -203,11 +205,75 @@ export async function validateGossipDataColumnSidecar(
|
|
|
203
205
|
// -- Handled in seenGossipBlockInput
|
|
204
206
|
}
|
|
205
207
|
|
|
208
|
+
// SPEC FUNCTION
|
|
209
|
+
// https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.3/specs/gloas/p2p-interface.md#data_column_sidecar_subnet_id
|
|
210
|
+
export async function validateGossipGloasDataColumnSidecar(
|
|
211
|
+
chain: IBeaconChain,
|
|
212
|
+
payloadInput: PayloadEnvelopeInput,
|
|
213
|
+
dataColumnSidecar: gloas.DataColumnSidecar,
|
|
214
|
+
gossipSubnet: SubnetID,
|
|
215
|
+
metrics: Metrics | null
|
|
216
|
+
): Promise<void> {
|
|
217
|
+
const blockRootHex = toRootHex(dataColumnSidecar.beaconBlockRoot);
|
|
218
|
+
const block = chain.forkChoice.getBlockHexDefaultStatus(blockRootHex);
|
|
219
|
+
|
|
220
|
+
// [IGNORE] A valid block for the sidecar's `slot` has been seen.
|
|
221
|
+
if (block === null) {
|
|
222
|
+
throw new DataColumnSidecarGossipError(GossipAction.IGNORE, {
|
|
223
|
+
code: DataColumnSidecarErrorCode.BLOCK_UNKNOWN,
|
|
224
|
+
blockRoot: blockRootHex,
|
|
225
|
+
slot: dataColumnSidecar.slot,
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// [REJECT] The sidecar slot matches the slot of the block with root beacon_block_root.
|
|
230
|
+
if (block.slot !== dataColumnSidecar.slot) {
|
|
231
|
+
throw new DataColumnSidecarGossipError(GossipAction.REJECT, {
|
|
232
|
+
code: DataColumnSidecarErrorCode.INCORRECT_SIDECAR_SLOT,
|
|
233
|
+
columnIndex: dataColumnSidecar.index,
|
|
234
|
+
expected: block.slot,
|
|
235
|
+
actual: dataColumnSidecar.slot,
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// [REJECT] The sidecar must pass verify_data_column_sidecar against the block commitments
|
|
240
|
+
const kzgCommitments = payloadInput.getBlobKzgCommitments();
|
|
241
|
+
verifyGloasDataColumnSidecar(dataColumnSidecar, kzgCommitments);
|
|
242
|
+
|
|
243
|
+
// [REJECT] The sidecar must be on the correct subnet
|
|
244
|
+
if (computeSubnetForDataColumnSidecar(chain.config, dataColumnSidecar) !== gossipSubnet) {
|
|
245
|
+
throw new DataColumnSidecarGossipError(GossipAction.REJECT, {
|
|
246
|
+
code: DataColumnSidecarErrorCode.INVALID_SUBNET,
|
|
247
|
+
columnIndex: dataColumnSidecar.index,
|
|
248
|
+
gossipSubnet,
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// [REJECT] The sidecar kzg proofs must verify
|
|
253
|
+
const kzgProofTimer = metrics?.peerDas.dataColumnSidecarKzgProofsVerificationTime.startTimer();
|
|
254
|
+
try {
|
|
255
|
+
await verifyDataColumnSidecarKzgProofs(
|
|
256
|
+
kzgCommitments,
|
|
257
|
+
Array.from({length: dataColumnSidecar.column.length}, () => dataColumnSidecar.index),
|
|
258
|
+
dataColumnSidecar.column,
|
|
259
|
+
dataColumnSidecar.kzgProofs
|
|
260
|
+
);
|
|
261
|
+
} catch {
|
|
262
|
+
throw new DataColumnSidecarGossipError(GossipAction.REJECT, {
|
|
263
|
+
code: DataColumnSidecarErrorCode.INVALID_KZG_PROOF,
|
|
264
|
+
slot: dataColumnSidecar.slot,
|
|
265
|
+
columnIndex: dataColumnSidecar.index,
|
|
266
|
+
});
|
|
267
|
+
} finally {
|
|
268
|
+
kzgProofTimer?.();
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
206
272
|
/**
|
|
207
273
|
* SPEC FUNCTION
|
|
208
274
|
* https://github.com/ethereum/consensus-specs/blob/v1.6.0-alpha.4/specs/fulu/p2p-interface.md#verify_data_column_sidecar
|
|
209
275
|
*/
|
|
210
|
-
function
|
|
276
|
+
function verifyFuluDataColumnSidecar(config: ChainForkConfig, dataColumnSidecar: fulu.DataColumnSidecar): void {
|
|
211
277
|
if (dataColumnSidecar.index >= NUMBER_OF_COLUMNS) {
|
|
212
278
|
throw new DataColumnSidecarGossipError(GossipAction.REJECT, {
|
|
213
279
|
code: DataColumnSidecarErrorCode.INVALID_INDEX,
|
|
@@ -250,6 +316,41 @@ function verifyDataColumnSidecar(config: ChainForkConfig, dataColumnSidecar: ful
|
|
|
250
316
|
}
|
|
251
317
|
}
|
|
252
318
|
|
|
319
|
+
/**
|
|
320
|
+
* SPEC FUNCTION
|
|
321
|
+
* https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.3/specs/gloas/p2p-interface.md#modified-verify_data_column_sidecar
|
|
322
|
+
*/
|
|
323
|
+
function verifyGloasDataColumnSidecar(dataColumnSidecar: gloas.DataColumnSidecar, kzgCommitments: Uint8Array[]): void {
|
|
324
|
+
const slot = getDataColumnSidecarSlot(dataColumnSidecar);
|
|
325
|
+
if (dataColumnSidecar.index >= NUMBER_OF_COLUMNS) {
|
|
326
|
+
throw new DataColumnSidecarGossipError(GossipAction.REJECT, {
|
|
327
|
+
code: DataColumnSidecarErrorCode.INVALID_INDEX,
|
|
328
|
+
slot,
|
|
329
|
+
columnIndex: dataColumnSidecar.index,
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
if (dataColumnSidecar.column.length === 0) {
|
|
334
|
+
throw new DataColumnSidecarGossipError(GossipAction.REJECT, {
|
|
335
|
+
code: DataColumnSidecarErrorCode.NO_COMMITMENTS,
|
|
336
|
+
slot,
|
|
337
|
+
columnIndex: dataColumnSidecar.index,
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
if (
|
|
342
|
+
dataColumnSidecar.column.length !== kzgCommitments.length ||
|
|
343
|
+
dataColumnSidecar.column.length !== dataColumnSidecar.kzgProofs.length
|
|
344
|
+
) {
|
|
345
|
+
throw new DataColumnSidecarGossipError(GossipAction.REJECT, {
|
|
346
|
+
code: DataColumnSidecarErrorCode.MISMATCHED_LENGTHS,
|
|
347
|
+
columnLength: dataColumnSidecar.column.length,
|
|
348
|
+
commitmentsLength: kzgCommitments.length,
|
|
349
|
+
proofsLength: dataColumnSidecar.kzgProofs.length,
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
253
354
|
/**
|
|
254
355
|
* SPEC FUNCTION
|
|
255
356
|
* https://github.com/ethereum/consensus-specs/blob/v1.6.0-alpha.4/specs/fulu/p2p-interface.md#verify_data_column_sidecar_kzg_proofs
|
|
@@ -287,19 +388,19 @@ export function verifyDataColumnSidecarInclusionProof(dataColumnSidecar: fulu.Da
|
|
|
287
388
|
}
|
|
288
389
|
|
|
289
390
|
/**
|
|
290
|
-
* Validate a subset of data column sidecars
|
|
391
|
+
* Validate a subset of fulu data column sidecars against a block
|
|
291
392
|
*
|
|
292
393
|
* Requires the block to be known to the node
|
|
293
394
|
*
|
|
294
395
|
* NOTE: chain is optional to skip signature verification. Helpful for testing purposes and so that can control whether
|
|
295
396
|
* signature gets checked depending on the reqresp method that is being checked
|
|
296
397
|
*/
|
|
297
|
-
export async function
|
|
398
|
+
export async function validateFuluBlockDataColumnSidecars(
|
|
298
399
|
chain: IBeaconChain | null,
|
|
299
400
|
blockSlot: Slot,
|
|
300
401
|
blockRoot: Root,
|
|
301
402
|
blockBlobCount: number,
|
|
302
|
-
dataColumnSidecars: fulu.
|
|
403
|
+
dataColumnSidecars: fulu.DataColumnSidecar[],
|
|
303
404
|
metrics?: BeaconMetrics["peerDas"] | null
|
|
304
405
|
): Promise<void> {
|
|
305
406
|
metrics?.dataColumnSidecarProcessingRequests.inc(dataColumnSidecars.length);
|
|
@@ -467,6 +568,128 @@ export async function validateBlockDataColumnSidecars(
|
|
|
467
568
|
"DataColumnSidecar has invalid KZG proof batch"
|
|
468
569
|
);
|
|
469
570
|
}
|
|
571
|
+
|
|
572
|
+
metrics?.dataColumnSidecarProcessingSuccesses.inc();
|
|
573
|
+
} finally {
|
|
574
|
+
verificationTimer?.();
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* Validate a subset of gloas data column sidecars against a block
|
|
580
|
+
* Gloas sidecars don't carry signed block headers, kzg commitments, or inclusion proofs
|
|
581
|
+
*/
|
|
582
|
+
export async function validateGloasBlockDataColumnSidecars(
|
|
583
|
+
blockSlot: Slot,
|
|
584
|
+
blockRoot: Root,
|
|
585
|
+
blockKzgCommitments: Uint8Array[],
|
|
586
|
+
dataColumnSidecars: gloas.DataColumnSidecar[],
|
|
587
|
+
metrics?: BeaconMetrics["peerDas"] | null
|
|
588
|
+
): Promise<void> {
|
|
589
|
+
metrics?.dataColumnSidecarProcessingRequests.inc(dataColumnSidecars.length);
|
|
590
|
+
const verificationTimer = metrics?.dataColumnSidecarGossipVerificationTime.startTimer();
|
|
591
|
+
try {
|
|
592
|
+
if (dataColumnSidecars.length === 0) {
|
|
593
|
+
return;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
if (blockKzgCommitments.length === 0) {
|
|
597
|
+
throw new DataColumnSidecarValidationError(
|
|
598
|
+
{
|
|
599
|
+
code: DataColumnSidecarErrorCode.INCORRECT_SIDECAR_COUNT,
|
|
600
|
+
slot: blockSlot,
|
|
601
|
+
expected: 0,
|
|
602
|
+
actual: dataColumnSidecars.length,
|
|
603
|
+
},
|
|
604
|
+
"Block has no blob commitments but data column sidecars were provided"
|
|
605
|
+
);
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
const commitments: Uint8Array[] = [];
|
|
609
|
+
const cellIndices: number[] = [];
|
|
610
|
+
const cells: Uint8Array[] = [];
|
|
611
|
+
const proofs: Uint8Array[] = [];
|
|
612
|
+
for (const columnSidecar of dataColumnSidecars) {
|
|
613
|
+
if (columnSidecar.slot !== blockSlot) {
|
|
614
|
+
throw new DataColumnSidecarValidationError({
|
|
615
|
+
code: DataColumnSidecarErrorCode.INCORRECT_SIDECAR_SLOT,
|
|
616
|
+
columnIndex: columnSidecar.index,
|
|
617
|
+
expected: blockSlot,
|
|
618
|
+
actual: columnSidecar.slot,
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
if (!byteArrayEquals(columnSidecar.beaconBlockRoot, blockRoot)) {
|
|
623
|
+
throw new DataColumnSidecarValidationError({
|
|
624
|
+
code: DataColumnSidecarErrorCode.INCORRECT_BLOCK,
|
|
625
|
+
slot: blockSlot,
|
|
626
|
+
columnIndex: columnSidecar.index,
|
|
627
|
+
expected: toRootHex(blockRoot),
|
|
628
|
+
actual: toRootHex(columnSidecar.beaconBlockRoot),
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
if (columnSidecar.index >= NUMBER_OF_COLUMNS) {
|
|
633
|
+
throw new DataColumnSidecarValidationError(
|
|
634
|
+
{
|
|
635
|
+
code: DataColumnSidecarErrorCode.INVALID_INDEX,
|
|
636
|
+
slot: blockSlot,
|
|
637
|
+
columnIndex: columnSidecar.index,
|
|
638
|
+
},
|
|
639
|
+
"DataColumnSidecar has invalid index"
|
|
640
|
+
);
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
if (columnSidecar.column.length !== blockKzgCommitments.length) {
|
|
644
|
+
throw new DataColumnSidecarValidationError({
|
|
645
|
+
code: DataColumnSidecarErrorCode.INCORRECT_CELL_COUNT,
|
|
646
|
+
slot: blockSlot,
|
|
647
|
+
columnIndex: columnSidecar.index,
|
|
648
|
+
expected: blockKzgCommitments.length,
|
|
649
|
+
actual: columnSidecar.column.length,
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
if (columnSidecar.column.length !== columnSidecar.kzgProofs.length) {
|
|
654
|
+
throw new DataColumnSidecarValidationError({
|
|
655
|
+
code: DataColumnSidecarErrorCode.INCORRECT_KZG_PROOF_COUNT,
|
|
656
|
+
slot: blockSlot,
|
|
657
|
+
columnIndex: columnSidecar.index,
|
|
658
|
+
expected: columnSidecar.column.length,
|
|
659
|
+
actual: columnSidecar.kzgProofs.length,
|
|
660
|
+
});
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
commitments.push(...blockKzgCommitments);
|
|
664
|
+
cellIndices.push(...Array.from({length: columnSidecar.column.length}, () => columnSidecar.index));
|
|
665
|
+
cells.push(...columnSidecar.column);
|
|
666
|
+
proofs.push(...columnSidecar.kzgProofs);
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
let reason: string | undefined;
|
|
670
|
+
// batch verification for the cases: downloadByRange and downloadByRoot
|
|
671
|
+
const kzgVerificationTimer = metrics?.kzgVerificationDataColumnBatchTime.startTimer();
|
|
672
|
+
try {
|
|
673
|
+
const valid = await kzg.asyncVerifyCellKzgProofBatch(commitments, cellIndices, cells, proofs);
|
|
674
|
+
if (!valid) {
|
|
675
|
+
reason = "Invalid KZG proof batch";
|
|
676
|
+
}
|
|
677
|
+
} catch (e) {
|
|
678
|
+
reason = (e as Error).message;
|
|
679
|
+
} finally {
|
|
680
|
+
kzgVerificationTimer?.();
|
|
681
|
+
}
|
|
682
|
+
if (reason !== undefined) {
|
|
683
|
+
throw new DataColumnSidecarValidationError(
|
|
684
|
+
{
|
|
685
|
+
code: DataColumnSidecarErrorCode.INVALID_KZG_PROOF_BATCH,
|
|
686
|
+
slot: blockSlot,
|
|
687
|
+
reason,
|
|
688
|
+
},
|
|
689
|
+
"DataColumnSidecar has invalid KZG proof batch"
|
|
690
|
+
);
|
|
691
|
+
}
|
|
692
|
+
|
|
470
693
|
metrics?.dataColumnSidecarProcessingSuccesses.inc();
|
|
471
694
|
} finally {
|
|
472
695
|
verificationTimer?.();
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import {PublicKey} from "@chainsafe/blst";
|
|
2
2
|
import {
|
|
3
|
-
CachedBeaconStateGloas,
|
|
4
|
-
canBuilderCoverBid,
|
|
5
3
|
createSingleSignatureSetFromComponents,
|
|
6
4
|
getExecutionPayloadBidSigningRoot,
|
|
7
5
|
isActiveBuilder,
|
|
@@ -33,9 +31,7 @@ async function validateExecutionPayloadBid(
|
|
|
33
31
|
const bid = signedExecutionPayloadBid.message;
|
|
34
32
|
const parentBlockRootHex = toRootHex(bid.parentBlockRoot);
|
|
35
33
|
const parentBlockHashHex = toRootHex(bid.parentBlockHash);
|
|
36
|
-
const state =
|
|
37
|
-
RegenCaller.validateGossipExecutionPayloadBid
|
|
38
|
-
)) as CachedBeaconStateGloas;
|
|
34
|
+
const state = await chain.getHeadStateAtCurrentEpoch(RegenCaller.validateGossipExecutionPayloadBid);
|
|
39
35
|
|
|
40
36
|
// [IGNORE] `bid.slot` is the current slot or the next slot.
|
|
41
37
|
const currentSlot = chain.clock.currentSlot;
|
|
@@ -53,7 +49,7 @@ async function validateExecutionPayloadBid(
|
|
|
53
49
|
|
|
54
50
|
// [REJECT] `bid.builder_index` is a valid/active builder index -- i.e.
|
|
55
51
|
// `is_active_builder(state, bid.builder_index)` returns `True`.
|
|
56
|
-
const builder = state.
|
|
52
|
+
const builder = state.getBuilder(bid.builderIndex);
|
|
57
53
|
if (!isActiveBuilder(builder, state.finalizedCheckpoint.epoch)) {
|
|
58
54
|
throw new ExecutionPayloadBidError(GossipAction.REJECT, {
|
|
59
55
|
code: ExecutionPayloadBidErrorCode.BUILDER_NOT_ELIGIBLE,
|
|
@@ -99,7 +95,7 @@ async function validateExecutionPayloadBid(
|
|
|
99
95
|
}
|
|
100
96
|
// [IGNORE] `bid.value` is less or equal than the builder's excess balance --
|
|
101
97
|
// i.e. `can_builder_cover_bid(state, builder_index, amount)` returns `True`.
|
|
102
|
-
if (!canBuilderCoverBid(
|
|
98
|
+
if (!state.canBuilderCoverBid(bid.builderIndex, bid.value)) {
|
|
103
99
|
throw new ExecutionPayloadBidError(GossipAction.IGNORE, {
|
|
104
100
|
code: ExecutionPayloadBidErrorCode.BID_TOO_HIGH,
|
|
105
101
|
bidValue: bid.value,
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import {PayloadStatus} from "@lodestar/fork-choice";
|
|
2
|
-
import {
|
|
3
|
-
BeaconStateView,
|
|
4
|
-
CachedBeaconStateGloas,
|
|
5
|
-
computeStartSlotAtEpoch,
|
|
6
|
-
getExecutionPayloadEnvelopeSignatureSet,
|
|
7
|
-
} from "@lodestar/state-transition";
|
|
2
|
+
import {computeStartSlotAtEpoch, getExecutionPayloadEnvelopeSignatureSet} from "@lodestar/state-transition";
|
|
8
3
|
import {gloas} from "@lodestar/types";
|
|
9
4
|
import {toRootHex} from "@lodestar/utils";
|
|
10
5
|
import {ExecutionPayloadEnvelopeError, ExecutionPayloadEnvelopeErrorCode, GossipAction} from "../errors/index.js";
|
|
@@ -119,11 +114,10 @@ async function validateExecutionPayloadEnvelope(
|
|
|
119
114
|
});
|
|
120
115
|
});
|
|
121
116
|
|
|
122
|
-
const state = blockState as CachedBeaconStateGloas;
|
|
123
117
|
const signatureSet = getExecutionPayloadEnvelopeSignatureSet(
|
|
124
118
|
chain.config,
|
|
125
119
|
chain.pubkeyCache,
|
|
126
|
-
|
|
120
|
+
blockState,
|
|
127
121
|
executionPayloadEnvelope,
|
|
128
122
|
payloadInput.proposerIndex
|
|
129
123
|
);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
CachedBeaconStateGloas,
|
|
3
2
|
computeEpochAtSlot,
|
|
4
3
|
createSingleSignatureSetFromComponents,
|
|
5
4
|
getPayloadAttestationDataSigningRoot,
|
|
@@ -66,7 +65,7 @@ async function validatePayloadAttestationMessage(
|
|
|
66
65
|
});
|
|
67
66
|
}
|
|
68
67
|
|
|
69
|
-
const state = chain.getHeadState()
|
|
68
|
+
const state = chain.getHeadState();
|
|
70
69
|
|
|
71
70
|
// [REJECT] The message's block `data.beacon_block_root` passes validation.
|
|
72
71
|
// TODO GLOAS: implement this. Technically if we cannot get proto block from fork choice,
|
|
@@ -75,8 +74,7 @@ async function validatePayloadAttestationMessage(
|
|
|
75
74
|
// [REJECT] The message's validator index is within the payload committee in
|
|
76
75
|
// `get_ptc(state, data.slot)`. The `state` is the head state corresponding to
|
|
77
76
|
// processing the block up to the current slot as determined by the fork choice.
|
|
78
|
-
const
|
|
79
|
-
const validatorCommitteeIndex = ptc.indexOf(validatorIndex);
|
|
77
|
+
const validatorCommitteeIndex = state.getIndexInPayloadTimelinessCommittee(validatorIndex, data.slot);
|
|
80
78
|
|
|
81
79
|
if (validatorCommitteeIndex === -1) {
|
|
82
80
|
throw new PayloadAttestationError(GossipAction.REJECT, {
|
|
@@ -35,7 +35,7 @@ async function validateProposerSlashing(
|
|
|
35
35
|
|
|
36
36
|
// [REJECT] All of the conditions within process_proposer_slashing pass validation.
|
|
37
37
|
try {
|
|
38
|
-
const proposer = state.
|
|
38
|
+
const proposer = state.getValidator(proposerSlashing.signedHeader1.message.proposerIndex);
|
|
39
39
|
// verifySignature = false, verified in batch below
|
|
40
40
|
assertValidProposerSlashing(chain.config, chain.pubkeyCache, state.slot, proposerSlashing, proposer, false);
|
|
41
41
|
} catch (e) {
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import {BeaconConfig} from "@lodestar/config";
|
|
2
2
|
import {DOMAIN_CONTRIBUTION_AND_PROOF} from "@lodestar/params";
|
|
3
|
-
import {
|
|
4
|
-
CachedBeaconStateAllForks,
|
|
5
|
-
ISignatureSet,
|
|
6
|
-
SignatureSetType,
|
|
7
|
-
computeSigningRoot,
|
|
8
|
-
} from "@lodestar/state-transition";
|
|
3
|
+
import {IBeaconStateView, ISignatureSet, SignatureSetType, computeSigningRoot} from "@lodestar/state-transition";
|
|
9
4
|
import {altair, ssz} from "@lodestar/types";
|
|
10
5
|
|
|
11
6
|
export function getContributionAndProofSignatureSet(
|
|
12
7
|
config: BeaconConfig,
|
|
13
|
-
state:
|
|
8
|
+
state: IBeaconStateView,
|
|
14
9
|
signedContributionAndProof: altair.SignedContributionAndProof
|
|
15
10
|
): ISignatureSet {
|
|
16
11
|
const domain = config.getDomain(
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import {BeaconConfig} from "@lodestar/config";
|
|
2
2
|
import {DOMAIN_SYNC_COMMITTEE} from "@lodestar/params";
|
|
3
|
-
import {
|
|
4
|
-
CachedBeaconStateAllForks,
|
|
5
|
-
ISignatureSet,
|
|
6
|
-
SignatureSetType,
|
|
7
|
-
computeSigningRoot,
|
|
8
|
-
} from "@lodestar/state-transition";
|
|
3
|
+
import {IBeaconStateView, ISignatureSet, SignatureSetType, computeSigningRoot} from "@lodestar/state-transition";
|
|
9
4
|
import {altair, ssz} from "@lodestar/types";
|
|
10
5
|
|
|
11
6
|
export function getSyncCommitteeSignatureSet(
|
|
12
7
|
config: BeaconConfig,
|
|
13
|
-
state:
|
|
8
|
+
state: IBeaconStateView,
|
|
14
9
|
syncCommittee: altair.SyncCommitteeMessage
|
|
15
10
|
): ISignatureSet {
|
|
16
11
|
const domain = config.getDomain(state.slot, DOMAIN_SYNC_COMMITTEE, syncCommittee.slot);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {BeaconConfig} from "@lodestar/config";
|
|
2
2
|
import {DOMAIN_SYNC_COMMITTEE} from "@lodestar/params";
|
|
3
|
-
import {
|
|
3
|
+
import {IBeaconStateView, ISignatureSet, SignatureSetType, computeSigningRoot} from "@lodestar/state-transition";
|
|
4
4
|
import {altair, ssz} from "@lodestar/types";
|
|
5
5
|
|
|
6
6
|
export function getSyncCommitteeContributionSignatureSet(
|
|
7
7
|
config: BeaconConfig,
|
|
8
|
-
state:
|
|
8
|
+
state: IBeaconStateView,
|
|
9
9
|
contribution: altair.SyncCommitteeContribution,
|
|
10
10
|
participantIndices: number[]
|
|
11
11
|
): ISignatureSet {
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import {BeaconConfig} from "@lodestar/config";
|
|
2
2
|
import {DOMAIN_SYNC_COMMITTEE_SELECTION_PROOF} from "@lodestar/params";
|
|
3
|
-
import {
|
|
4
|
-
CachedBeaconStateAllForks,
|
|
5
|
-
ISignatureSet,
|
|
6
|
-
SignatureSetType,
|
|
7
|
-
computeSigningRoot,
|
|
8
|
-
} from "@lodestar/state-transition";
|
|
3
|
+
import {IBeaconStateView, ISignatureSet, SignatureSetType, computeSigningRoot} from "@lodestar/state-transition";
|
|
9
4
|
import {altair, ssz} from "@lodestar/types";
|
|
10
5
|
|
|
11
6
|
export function getSyncCommitteeSelectionProofSignatureSet(
|
|
12
7
|
config: BeaconConfig,
|
|
13
|
-
state:
|
|
8
|
+
state: IBeaconStateView,
|
|
14
9
|
contributionAndProof: altair.ContributionAndProof
|
|
15
10
|
): ISignatureSet {
|
|
16
11
|
const slot = contributionAndProof.contribution.slot;
|