@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
|
@@ -19,16 +19,13 @@ import {
|
|
|
19
19
|
isForkPostElectra,
|
|
20
20
|
} from "@lodestar/params";
|
|
21
21
|
import {
|
|
22
|
-
CachedBeaconStateAllForks,
|
|
23
|
-
CachedBeaconStateAltair,
|
|
24
|
-
CachedBeaconStateGloas,
|
|
25
22
|
EffectiveBalanceIncrements,
|
|
23
|
+
IBeaconStateView,
|
|
26
24
|
RootCache,
|
|
27
25
|
computeEpochAtSlot,
|
|
28
26
|
computeSlotsSinceEpochStart,
|
|
29
27
|
computeStartSlotAtEpoch,
|
|
30
28
|
getAttestationParticipationStatus,
|
|
31
|
-
getBlockRootAtSlot,
|
|
32
29
|
} from "@lodestar/state-transition";
|
|
33
30
|
import {Attestation, Epoch, RootHex, Slot, electra, isElectraAttestation, phase0, ssz} from "@lodestar/types";
|
|
34
31
|
import {MapDef, assert, toRootHex} from "@lodestar/utils";
|
|
@@ -212,7 +209,7 @@ export class AggregatedAttestationPool {
|
|
|
212
209
|
fork: ForkName,
|
|
213
210
|
forkChoice: IForkChoice,
|
|
214
211
|
shufflingCache: ShufflingCache,
|
|
215
|
-
state:
|
|
212
|
+
state: IBeaconStateView
|
|
216
213
|
): Attestation[] {
|
|
217
214
|
const forkSeq = ForkSeq[fork];
|
|
218
215
|
if (forkSeq < ForkSeq.electra) {
|
|
@@ -229,10 +226,10 @@ export class AggregatedAttestationPool {
|
|
|
229
226
|
fork: ForkName,
|
|
230
227
|
forkChoice: IForkChoice,
|
|
231
228
|
shufflingCache: ShufflingCache,
|
|
232
|
-
state:
|
|
229
|
+
state: IBeaconStateView
|
|
233
230
|
): electra.Attestation[] {
|
|
234
231
|
const stateSlot = state.slot;
|
|
235
|
-
const stateEpoch = state.
|
|
232
|
+
const stateEpoch = state.epoch;
|
|
236
233
|
const statePrevEpoch = stateEpoch - 1;
|
|
237
234
|
const rootCache = new RootCache(state);
|
|
238
235
|
|
|
@@ -312,7 +309,7 @@ export class AggregatedAttestationPool {
|
|
|
312
309
|
// The committeeCountPerSlot can be precomputed once per slot
|
|
313
310
|
const getAttestationGroupResult = attestationGroup.getAttestationsForBlock(
|
|
314
311
|
fork,
|
|
315
|
-
state.
|
|
312
|
+
state.effectiveBalanceIncrements,
|
|
316
313
|
notSeenCommitteeMembers,
|
|
317
314
|
MAX_ATTESTATIONS_PER_GROUP_ELECTRA
|
|
318
315
|
);
|
|
@@ -362,9 +359,7 @@ export class AggregatedAttestationPool {
|
|
|
362
359
|
inclusionDistance,
|
|
363
360
|
stateEpoch,
|
|
364
361
|
rootCache,
|
|
365
|
-
ForkSeq[fork] >= ForkSeq.gloas
|
|
366
|
-
? (state as CachedBeaconStateGloas).executionPayloadAvailability.toBoolArray()
|
|
367
|
-
: null
|
|
362
|
+
ForkSeq[fork] >= ForkSeq.gloas ? state.executionPayloadAvailability : null
|
|
368
363
|
);
|
|
369
364
|
|
|
370
365
|
const weight =
|
|
@@ -735,13 +730,13 @@ export function aggregateConsolidation({byCommittee, attData}: AttestationsConso
|
|
|
735
730
|
}
|
|
736
731
|
|
|
737
732
|
/**
|
|
738
|
-
* Pre-compute participation from a
|
|
733
|
+
* Pre-compute participation from a IBeaconStateView, for use to check if an attestation's committee
|
|
739
734
|
* has already attested or not.
|
|
740
735
|
*/
|
|
741
736
|
export function getNotSeenValidatorsFn(
|
|
742
737
|
config: BeaconConfig,
|
|
743
738
|
shufflingCache: ShufflingCache,
|
|
744
|
-
state:
|
|
739
|
+
state: IBeaconStateView
|
|
745
740
|
): GetNotSeenValidatorsFn {
|
|
746
741
|
const stateSlot = state.slot;
|
|
747
742
|
if (config.getForkName(stateSlot) === ForkName.phase0) {
|
|
@@ -753,9 +748,8 @@ export function getNotSeenValidatorsFn(
|
|
|
753
748
|
// Attestations are sorted by inclusion distance then number of attesters.
|
|
754
749
|
// Attestations should pass the validation when processing attestations in state-transition.
|
|
755
750
|
// check for altair block already
|
|
756
|
-
const
|
|
757
|
-
const
|
|
758
|
-
const currentParticipation = altairState.currentEpochParticipation.getAll();
|
|
751
|
+
const previousParticipation = state.previousEpochParticipation;
|
|
752
|
+
const currentParticipation = state.currentEpochParticipation;
|
|
759
753
|
const stateEpoch = computeEpochAtSlot(stateSlot);
|
|
760
754
|
// this function could be called multiple times with same slot + committeeIndex
|
|
761
755
|
const cachedNotSeenValidators = new Map<string, Set<number>>();
|
|
@@ -774,7 +768,7 @@ export function getNotSeenValidatorsFn(
|
|
|
774
768
|
return notSeenCommitteeMembers.size === 0 ? null : notSeenCommitteeMembers;
|
|
775
769
|
}
|
|
776
770
|
|
|
777
|
-
const decisionRoot = state.
|
|
771
|
+
const decisionRoot = state.getShufflingDecisionRoot(computeEpochAtSlot(slot));
|
|
778
772
|
const committee = shufflingCache.getBeaconCommittee(epoch, decisionRoot, slot, committeeIndex);
|
|
779
773
|
notSeenCommitteeMembers = new Set<number>();
|
|
780
774
|
for (const [i, validatorIndex] of committee.entries()) {
|
|
@@ -804,11 +798,11 @@ export function getNotSeenValidatorsFn(
|
|
|
804
798
|
*/
|
|
805
799
|
export function getValidateAttestationDataFn(
|
|
806
800
|
forkChoice: IForkChoice,
|
|
807
|
-
state:
|
|
801
|
+
state: IBeaconStateView
|
|
808
802
|
): ValidateAttestationDataFn {
|
|
809
803
|
const cachedValidatedAttestationData = new Map<string, InvalidAttestationData | null>();
|
|
810
804
|
const {previousJustifiedCheckpoint, currentJustifiedCheckpoint} = state;
|
|
811
|
-
const stateEpoch = state.
|
|
805
|
+
const stateEpoch = state.epoch;
|
|
812
806
|
return (attData: phase0.AttestationData) => {
|
|
813
807
|
const targetEpoch = attData.target.epoch;
|
|
814
808
|
let justifiedCheckpoint: phase0.Checkpoint;
|
|
@@ -850,14 +844,14 @@ export function getValidateAttestationDataFn(
|
|
|
850
844
|
*/
|
|
851
845
|
function isValidShuffling(
|
|
852
846
|
forkChoice: IForkChoice,
|
|
853
|
-
state:
|
|
847
|
+
state: IBeaconStateView,
|
|
854
848
|
blockRootHex: RootHex,
|
|
855
849
|
targetEpoch: Epoch
|
|
856
850
|
): InvalidAttestationData | null {
|
|
857
851
|
// Otherwise the shuffling is determined by the block at the end of the target epoch
|
|
858
852
|
// minus the shuffling lookahead (usually 2). We call this the "pivot".
|
|
859
853
|
const pivotSlot = computeStartSlotAtEpoch(targetEpoch - 1) - 1;
|
|
860
|
-
const stateDependentRoot = toRootHex(getBlockRootAtSlot(
|
|
854
|
+
const stateDependentRoot = toRootHex(state.getBlockRootAtSlot(pivotSlot));
|
|
861
855
|
|
|
862
856
|
// Use fork choice's view of the block DAG to quickly evaluate whether the attestation's
|
|
863
857
|
// pivot block is the same as the current state's pivot block. If it is, then the
|
|
@@ -11,11 +11,10 @@ import {
|
|
|
11
11
|
MAX_VOLUNTARY_EXITS,
|
|
12
12
|
} from "@lodestar/params";
|
|
13
13
|
import {
|
|
14
|
-
|
|
14
|
+
IBeaconStateView,
|
|
15
15
|
computeEpochAtSlot,
|
|
16
16
|
computeStartSlotAtEpoch,
|
|
17
17
|
getAttesterSlashableIndices,
|
|
18
|
-
isValidVoluntaryExit,
|
|
19
18
|
} from "@lodestar/state-transition";
|
|
20
19
|
import {
|
|
21
20
|
AttesterSlashing,
|
|
@@ -185,7 +184,7 @@ export class OpPool {
|
|
|
185
184
|
* slashings included earlier in the block.
|
|
186
185
|
*/
|
|
187
186
|
getSlashingsAndExits(
|
|
188
|
-
state:
|
|
187
|
+
state: IBeaconStateView,
|
|
189
188
|
blockType: BlockType,
|
|
190
189
|
metrics: Metrics | null
|
|
191
190
|
): [
|
|
@@ -207,7 +206,7 @@ export class OpPool {
|
|
|
207
206
|
const endProposerSlashing = stepsMetrics?.startTimer();
|
|
208
207
|
for (const proposerSlashing of this.proposerSlashings.values()) {
|
|
209
208
|
const index = proposerSlashing.signedHeader1.message.proposerIndex;
|
|
210
|
-
const validator = state.
|
|
209
|
+
const validator = state.getValidator(index);
|
|
211
210
|
if (!validator.slashed && validator.activationEpoch <= stateEpoch && stateEpoch < validator.withdrawableEpoch) {
|
|
212
211
|
proposerSlashings.push(proposerSlashing);
|
|
213
212
|
// Set of validators to be slashed, so we don't attempt to construct invalid attester slashings.
|
|
@@ -234,7 +233,7 @@ export class OpPool {
|
|
|
234
233
|
continue attesterSlashing;
|
|
235
234
|
}
|
|
236
235
|
|
|
237
|
-
const validator = state.
|
|
236
|
+
const validator = state.getValidator(index);
|
|
238
237
|
if (isSlashableAtEpoch(validator, stateEpoch)) {
|
|
239
238
|
slashableIndices.add(index);
|
|
240
239
|
}
|
|
@@ -261,7 +260,7 @@ export class OpPool {
|
|
|
261
260
|
for (const voluntaryExit of this.voluntaryExits.values()) {
|
|
262
261
|
if (
|
|
263
262
|
!toBeSlashedIndices.has(voluntaryExit.message.validatorIndex) &&
|
|
264
|
-
isValidVoluntaryExit(
|
|
263
|
+
state.isValidVoluntaryExit(voluntaryExit, false) &&
|
|
265
264
|
// Signature validation is skipped in `isValidVoluntaryExit(,,false)` since it was already validated in gossip
|
|
266
265
|
// However we must make sure that the signature fork is the same, or it will become invalid if included through
|
|
267
266
|
// a future fork.
|
|
@@ -320,7 +319,7 @@ export class OpPool {
|
|
|
320
319
|
/**
|
|
321
320
|
* Prune all types of transactions given the latest head state
|
|
322
321
|
*/
|
|
323
|
-
pruneAll(headBlock: SignedBeaconBlock, headState:
|
|
322
|
+
pruneAll(headBlock: SignedBeaconBlock, headState: IBeaconStateView): void {
|
|
324
323
|
this.pruneAttesterSlashings(headState);
|
|
325
324
|
this.pruneProposerSlashings(headState);
|
|
326
325
|
this.pruneVoluntaryExits(headState);
|
|
@@ -330,7 +329,7 @@ export class OpPool {
|
|
|
330
329
|
/**
|
|
331
330
|
* Prune attester slashings for all slashed or withdrawn validators.
|
|
332
331
|
*/
|
|
333
|
-
private pruneAttesterSlashings(headState:
|
|
332
|
+
private pruneAttesterSlashings(headState: IBeaconStateView): void {
|
|
334
333
|
const finalizedEpoch = headState.finalizedCheckpoint.epoch;
|
|
335
334
|
attesterSlashing: for (const [key, attesterSlashing] of this.attesterSlashings.entries()) {
|
|
336
335
|
// Slashings that don't slash any validators can be dropped
|
|
@@ -342,7 +341,7 @@ export class OpPool {
|
|
|
342
341
|
//
|
|
343
342
|
// We cannot check the `slashed` field since the `head` is not finalized and
|
|
344
343
|
// a fork could un-slash someone.
|
|
345
|
-
if (headState.
|
|
344
|
+
if (headState.getValidator(index).exitEpoch > finalizedEpoch) {
|
|
346
345
|
continue attesterSlashing;
|
|
347
346
|
}
|
|
348
347
|
}
|
|
@@ -355,11 +354,11 @@ export class OpPool {
|
|
|
355
354
|
/**
|
|
356
355
|
* Prune proposer slashings for validators which are exited in the finalized epoch.
|
|
357
356
|
*/
|
|
358
|
-
private pruneProposerSlashings(headState:
|
|
357
|
+
private pruneProposerSlashings(headState: IBeaconStateView): void {
|
|
359
358
|
const finalizedEpoch = headState.finalizedCheckpoint.epoch;
|
|
360
359
|
for (const [key, proposerSlashing] of this.proposerSlashings.entries()) {
|
|
361
360
|
const index = proposerSlashing.signedHeader1.message.proposerIndex;
|
|
362
|
-
if (headState.
|
|
361
|
+
if (headState.getValidator(index).exitEpoch <= finalizedEpoch) {
|
|
363
362
|
this.proposerSlashings.delete(key);
|
|
364
363
|
}
|
|
365
364
|
}
|
|
@@ -369,7 +368,7 @@ export class OpPool {
|
|
|
369
368
|
* Call after finalizing
|
|
370
369
|
* Prune if validator has already exited at or before the finalized checkpoint of the head.
|
|
371
370
|
*/
|
|
372
|
-
private pruneVoluntaryExits(headState:
|
|
371
|
+
private pruneVoluntaryExits(headState: IBeaconStateView): void {
|
|
373
372
|
const headStateFork = this.config.getForkSeq(headState.slot);
|
|
374
373
|
const finalizedEpoch = headState.finalizedCheckpoint.epoch;
|
|
375
374
|
|
|
@@ -392,7 +391,7 @@ export class OpPool {
|
|
|
392
391
|
* In the worse case where head block is reorged, the same BlsToExecutionChange message can be re-added
|
|
393
392
|
* to opPool once gossipsub seen cache TTL passes.
|
|
394
393
|
*/
|
|
395
|
-
private pruneBlsToExecutionChanges(headBlock: SignedBeaconBlock, headState:
|
|
394
|
+
private pruneBlsToExecutionChanges(headBlock: SignedBeaconBlock, headState: IBeaconStateView): void {
|
|
396
395
|
const recentBlsToExecutionChanges =
|
|
397
396
|
this.config.getForkSeq(headBlock.message.slot) >= ForkSeq.capella
|
|
398
397
|
? (headBlock as capella.SignedBeaconBlock).message.body.blsToExecutionChanges
|
|
@@ -405,7 +404,7 @@ export class OpPool {
|
|
|
405
404
|
for (const [key, blsToExecutionChange] of this.blsToExecutionChanges.entries()) {
|
|
406
405
|
const {validatorIndex} = blsToExecutionChange.data.message;
|
|
407
406
|
if (!recentBlsToExecutionChangeIndexes.has(validatorIndex)) {
|
|
408
|
-
const validator = headState.
|
|
407
|
+
const validator = headState.getValidator(validatorIndex);
|
|
409
408
|
if (validator.withdrawalCredentials[0] !== BLS_WITHDRAWAL_PREFIX) {
|
|
410
409
|
this.blsToExecutionChanges.delete(key);
|
|
411
410
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {Signature} from "@chainsafe/blst";
|
|
2
2
|
import {BLS_WITHDRAWAL_PREFIX} from "@lodestar/params";
|
|
3
|
-
import {
|
|
3
|
+
import {IBeaconStateView} from "@lodestar/state-transition";
|
|
4
4
|
import {Slot, capella} from "@lodestar/types";
|
|
5
5
|
import {AggregateFast, AggregateFastElectra} from "./attestationPool.js";
|
|
6
6
|
|
|
@@ -38,7 +38,7 @@ export function signatureFromBytesNoCheck(signature: Uint8Array): Signature {
|
|
|
38
38
|
* can become invalid for certain forks.
|
|
39
39
|
*/
|
|
40
40
|
export function isValidBlsToExecutionChangeForBlockInclusion(
|
|
41
|
-
state:
|
|
41
|
+
state: IBeaconStateView,
|
|
42
42
|
signedBLSToExecutionChange: capella.SignedBLSToExecutionChange
|
|
43
43
|
): boolean {
|
|
44
44
|
// For each condition from https://github.com/ethereum/consensus-specs/blob/v1.6.1/specs/capella/beacon-chain.md#new-process_bls_to_execution_change
|
|
@@ -48,7 +48,7 @@ export function isValidBlsToExecutionChangeForBlockInclusion(
|
|
|
48
48
|
//
|
|
49
49
|
// 2. assert validator.withdrawal_credentials[:1] == BLS_WITHDRAWAL_PREFIX:
|
|
50
50
|
// Must be checked again, since it can already be changed by now.
|
|
51
|
-
const validator = state.
|
|
51
|
+
const validator = state.getValidator(signedBLSToExecutionChange.message.validatorIndex);
|
|
52
52
|
const {withdrawalCredentials} = validator;
|
|
53
53
|
if (withdrawalCredentials[0] !== BLS_WITHDRAWAL_PREFIX) {
|
|
54
54
|
return false;
|
package/src/chain/options.ts
CHANGED
|
@@ -47,6 +47,7 @@ export type IChainOptions = BlockProcessOpts &
|
|
|
47
47
|
minSameMessageSignatureSetsToBatch: number;
|
|
48
48
|
archiveDateEpochs?: number;
|
|
49
49
|
nHistoricalStatesFileDataStore?: boolean;
|
|
50
|
+
nativeStateView?: boolean;
|
|
50
51
|
};
|
|
51
52
|
|
|
52
53
|
export type BlockProcessOpts = {
|
|
@@ -124,6 +125,7 @@ export const defaultChainOptions: IChainOptions = {
|
|
|
124
125
|
// - users can prune the persisted checkpoint state files manually to save disc space
|
|
125
126
|
// - it helps debug easier when network is unfinalized
|
|
126
127
|
nHistoricalStatesFileDataStore: true,
|
|
128
|
+
nativeStateView: false,
|
|
127
129
|
maxBlockStates: DEFAULT_MAX_BLOCK_STATES,
|
|
128
130
|
maxCPStateEpochsInMemory: DEFAULT_MAX_CP_STATE_EPOCHS_IN_MEMORY,
|
|
129
131
|
maxCPStateEpochsOnDisk: DEFAULT_MAX_CP_STATE_ON_DISK,
|
|
@@ -3,9 +3,7 @@ import {ChainForkConfig} from "@lodestar/config";
|
|
|
3
3
|
import {PayloadStatus, getSafeExecutionBlockHash} from "@lodestar/fork-choice";
|
|
4
4
|
import {ForkPostBellatrix, ForkSeq, SLOTS_PER_EPOCH, isForkPostBellatrix} from "@lodestar/params";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
CachedBeaconStateExecutions,
|
|
8
|
-
CachedBeaconStateGloas,
|
|
6
|
+
IBeaconStateView,
|
|
9
7
|
StateHashTreeRootSource,
|
|
10
8
|
computeEpochAtSlot,
|
|
11
9
|
computeTimeAtSlot,
|
|
@@ -121,9 +119,9 @@ export class PrepareNextSlotScheduler {
|
|
|
121
119
|
);
|
|
122
120
|
|
|
123
121
|
if (isForkPostBellatrix(fork)) {
|
|
124
|
-
const proposerIndex = prepareState.
|
|
122
|
+
const proposerIndex = prepareState.getBeaconProposer(prepareSlot);
|
|
125
123
|
const feeRecipient = this.chain.beaconProposerCache.get(proposerIndex);
|
|
126
|
-
let updatedPrepareState = prepareState
|
|
124
|
+
let updatedPrepareState = prepareState;
|
|
127
125
|
let updatedHeadRoot = headRoot;
|
|
128
126
|
|
|
129
127
|
if (feeRecipient) {
|
|
@@ -140,13 +138,13 @@ export class PrepareNextSlotScheduler {
|
|
|
140
138
|
headRoot,
|
|
141
139
|
});
|
|
142
140
|
this.metrics?.weakHeadDetected.inc();
|
|
143
|
-
updatedPrepareState =
|
|
141
|
+
updatedPrepareState = await this.chain.regen.getBlockSlotState(
|
|
144
142
|
proposerHead,
|
|
145
143
|
prepareSlot,
|
|
146
144
|
// only transfer cache if epoch transition because that's the state we will use to stateTransition() the 1st block of epoch
|
|
147
145
|
{dontTransferCache: !isEpochTransition},
|
|
148
146
|
RegenCaller.predictProposerHead
|
|
149
|
-
)
|
|
147
|
+
);
|
|
150
148
|
updatedHeadRoot = proposerHeadRoot;
|
|
151
149
|
}
|
|
152
150
|
|
|
@@ -239,7 +237,7 @@ export class PrepareNextSlotScheduler {
|
|
|
239
237
|
}
|
|
240
238
|
};
|
|
241
239
|
|
|
242
|
-
computeStateHashTreeRoot(state:
|
|
240
|
+
computeStateHashTreeRoot(state: IBeaconStateView, isEpochTransition: boolean): void {
|
|
243
241
|
// cache HashObjects for faster hashTreeRoot() later, especially for computeNewStateRoot() if we need to produce a block at slot 0 of epoch
|
|
244
242
|
// see https://github.com/ChainSafe/lodestar/issues/6194
|
|
245
243
|
const hashTreeRootTimer = this.metrics?.stateHashTreeRootTime.startTimer({
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
CachedBeaconStateAllForks,
|
|
3
|
-
CachedBeaconStateGloas,
|
|
4
2
|
DataAvailabilityStatus,
|
|
5
3
|
ExecutionPayloadStatus,
|
|
6
4
|
G2_POINT_AT_INFINITY,
|
|
5
|
+
IBeaconStateView,
|
|
7
6
|
StateHashTreeRootSource,
|
|
8
|
-
stateTransition,
|
|
9
7
|
} from "@lodestar/state-transition";
|
|
10
|
-
import {processExecutionPayloadEnvelope} from "@lodestar/state-transition/block";
|
|
11
8
|
import {BeaconBlock, BlindedBeaconBlock, Gwei, Root, gloas} from "@lodestar/types";
|
|
12
9
|
import {ZERO_HASH} from "../../constants/index.js";
|
|
13
10
|
import {Metrics} from "../../metrics/index.js";
|
|
@@ -19,14 +16,13 @@ import {Metrics} from "../../metrics/index.js";
|
|
|
19
16
|
*/
|
|
20
17
|
export function computeNewStateRoot(
|
|
21
18
|
metrics: Metrics | null,
|
|
22
|
-
state:
|
|
19
|
+
state: IBeaconStateView,
|
|
23
20
|
block: BeaconBlock | BlindedBeaconBlock
|
|
24
|
-
): {newStateRoot: Root; proposerReward: Gwei; postState:
|
|
21
|
+
): {newStateRoot: Root; proposerReward: Gwei; postState: IBeaconStateView} {
|
|
25
22
|
// Set signature to zero to re-use stateTransition() function which requires the SignedBeaconBlock type
|
|
26
23
|
const blockEmptySig = {message: block, signature: ZERO_HASH};
|
|
27
24
|
|
|
28
|
-
const postState = stateTransition(
|
|
29
|
-
state,
|
|
25
|
+
const postState = state.stateTransition(
|
|
30
26
|
blockEmptySig,
|
|
31
27
|
{
|
|
32
28
|
// ExecutionPayloadStatus.valid: Assume payload valid, it has been produced by a trusted EL
|
|
@@ -64,7 +60,7 @@ export function computeNewStateRoot(
|
|
|
64
60
|
*/
|
|
65
61
|
export function computeEnvelopeStateRoot(
|
|
66
62
|
metrics: Metrics | null,
|
|
67
|
-
postBlockState:
|
|
63
|
+
postBlockState: IBeaconStateView,
|
|
68
64
|
envelope: gloas.ExecutionPayloadEnvelope
|
|
69
65
|
): Root {
|
|
70
66
|
const signedEnvelope: gloas.SignedExecutionPayloadEnvelope = {
|
|
@@ -73,7 +69,7 @@ export function computeEnvelopeStateRoot(
|
|
|
73
69
|
};
|
|
74
70
|
|
|
75
71
|
const processEnvelopeTimer = metrics?.blockPayload.executionPayloadEnvelopeProcessingTime.startTimer();
|
|
76
|
-
const postEnvelopeState = processExecutionPayloadEnvelope(
|
|
72
|
+
const postEnvelopeState = postBlockState.processExecutionPayloadEnvelope(signedEnvelope, {
|
|
77
73
|
// Signature is zero-ed (G2_POINT_AT_INFINITY), skip verification
|
|
78
74
|
verifySignature: false,
|
|
79
75
|
// State root is being computed here, the envelope doesn't have it yet
|
|
@@ -14,17 +14,7 @@ import {
|
|
|
14
14
|
isForkPostBellatrix,
|
|
15
15
|
isForkPostGloas,
|
|
16
16
|
} from "@lodestar/params";
|
|
17
|
-
import {
|
|
18
|
-
CachedBeaconStateAllForks,
|
|
19
|
-
CachedBeaconStateBellatrix,
|
|
20
|
-
CachedBeaconStateCapella,
|
|
21
|
-
CachedBeaconStateExecutions,
|
|
22
|
-
CachedBeaconStateGloas,
|
|
23
|
-
G2_POINT_AT_INFINITY,
|
|
24
|
-
computeTimeAtSlot,
|
|
25
|
-
getExpectedWithdrawals,
|
|
26
|
-
getRandaoMix,
|
|
27
|
-
} from "@lodestar/state-transition";
|
|
17
|
+
import {G2_POINT_AT_INFINITY, IBeaconStateView, computeTimeAtSlot} from "@lodestar/state-transition";
|
|
28
18
|
import {
|
|
29
19
|
BLSPubkey,
|
|
30
20
|
BLSSignature,
|
|
@@ -161,7 +151,7 @@ export type ProduceResult =
|
|
|
161
151
|
export async function produceBlockBody<T extends BlockType>(
|
|
162
152
|
this: BeaconChain,
|
|
163
153
|
blockType: T,
|
|
164
|
-
currentState:
|
|
154
|
+
currentState: IBeaconStateView,
|
|
165
155
|
blockAttr: BlockAttributes & {
|
|
166
156
|
proposerIndex: ValidatorIndex;
|
|
167
157
|
proposerPubKey: BLSPubkey;
|
|
@@ -204,7 +194,6 @@ export async function produceBlockBody<T extends BlockType>(
|
|
|
204
194
|
// TODO GLOAS: support non self-building here, the block type differentiation between
|
|
205
195
|
// full and blinded no longer makes sense in gloas, it might be a good idea to move
|
|
206
196
|
// this into a completely separate function and have pre/post gloas more separated
|
|
207
|
-
const gloasState = currentState as CachedBeaconStateGloas;
|
|
208
197
|
const safeBlockHash = getSafeExecutionBlockHash(this.forkChoice);
|
|
209
198
|
const finalizedBlockHash = this.forkChoice.getFinalizedBlock().executionPayloadBlockHash ?? ZERO_HASH_HEX;
|
|
210
199
|
const feeRecipient = requestedFeeRecipient ?? this.beaconProposerCache.getOrDefault(proposerIndex);
|
|
@@ -225,7 +214,7 @@ export async function produceBlockBody<T extends BlockType>(
|
|
|
225
214
|
parentBlockRoot,
|
|
226
215
|
safeBlockHash,
|
|
227
216
|
finalizedBlockHash ?? ZERO_HASH_HEX,
|
|
228
|
-
|
|
217
|
+
currentState,
|
|
229
218
|
feeRecipient
|
|
230
219
|
);
|
|
231
220
|
|
|
@@ -259,10 +248,10 @@ export async function produceBlockBody<T extends BlockType>(
|
|
|
259
248
|
|
|
260
249
|
// Create self-build execution payload bid
|
|
261
250
|
const bid: gloas.ExecutionPayloadBid = {
|
|
262
|
-
parentBlockHash:
|
|
251
|
+
parentBlockHash: currentState.latestBlockHash,
|
|
263
252
|
parentBlockRoot: parentBlockRoot,
|
|
264
253
|
blockHash: executionPayload.blockHash,
|
|
265
|
-
prevRandao: getRandaoMix(
|
|
254
|
+
prevRandao: currentState.getRandaoMix(currentState.epoch),
|
|
266
255
|
feeRecipient: executionPayload.feeRecipient,
|
|
267
256
|
gasLimit: BigInt(executionPayload.gasLimit),
|
|
268
257
|
builderIndex: BUILDER_INDEX_SELF_BUILD,
|
|
@@ -336,7 +325,7 @@ export async function produceBlockBody<T extends BlockType>(
|
|
|
336
325
|
parentBlockRoot,
|
|
337
326
|
safeBlockHash,
|
|
338
327
|
finalizedBlockHash ?? ZERO_HASH_HEX,
|
|
339
|
-
currentState
|
|
328
|
+
currentState,
|
|
340
329
|
executionBuilder.issueLocalFcUWithFeeRecipient
|
|
341
330
|
);
|
|
342
331
|
}
|
|
@@ -348,12 +337,7 @@ export async function produceBlockBody<T extends BlockType>(
|
|
|
348
337
|
slot: blockSlot,
|
|
349
338
|
proposerPubKey: toHex(proposerPubKey),
|
|
350
339
|
});
|
|
351
|
-
const headerRes = await prepareExecutionPayloadHeader(
|
|
352
|
-
this,
|
|
353
|
-
fork,
|
|
354
|
-
currentState as CachedBeaconStateBellatrix,
|
|
355
|
-
proposerPubKey
|
|
356
|
-
);
|
|
340
|
+
const headerRes = await prepareExecutionPayloadHeader(this, fork, currentState, proposerPubKey);
|
|
357
341
|
|
|
358
342
|
endExecutionPayloadHeader?.({
|
|
359
343
|
step: BlockProductionStep.executionPayload,
|
|
@@ -388,7 +372,7 @@ export async function produceBlockBody<T extends BlockType>(
|
|
|
388
372
|
});
|
|
389
373
|
} else {
|
|
390
374
|
const headerGasLimit = builderRes.header.gasLimit;
|
|
391
|
-
const parentGasLimit =
|
|
375
|
+
const parentGasLimit = currentState.latestExecutionPayloadHeader.gasLimit;
|
|
392
376
|
const expectedGasLimit = getExpectedGasLimit(parentGasLimit, targetGasLimit);
|
|
393
377
|
|
|
394
378
|
const lowerBound = Math.min(parentGasLimit, expectedGasLimit);
|
|
@@ -449,7 +433,7 @@ export async function produceBlockBody<T extends BlockType>(
|
|
|
449
433
|
parentBlockRoot,
|
|
450
434
|
safeBlockHash,
|
|
451
435
|
finalizedBlockHash ?? ZERO_HASH_HEX,
|
|
452
|
-
currentState
|
|
436
|
+
currentState,
|
|
453
437
|
feeRecipient
|
|
454
438
|
);
|
|
455
439
|
|
|
@@ -614,14 +598,12 @@ export async function prepareExecutionPayload(
|
|
|
614
598
|
parentBlockRoot: Root,
|
|
615
599
|
safeBlockHash: RootHex,
|
|
616
600
|
finalizedBlockHash: RootHex,
|
|
617
|
-
state:
|
|
601
|
+
state: IBeaconStateView,
|
|
618
602
|
suggestedFeeRecipient: string
|
|
619
603
|
): Promise<{prepType: PayloadPreparationType; payloadId: PayloadId}> {
|
|
620
|
-
const parentHash =
|
|
621
|
-
? (state as CachedBeaconStateGloas).latestBlockHash
|
|
622
|
-
: (state as CachedBeaconStateExecutions).latestExecutionPayloadHeader.blockHash;
|
|
604
|
+
const parentHash = state.latestBlockHash;
|
|
623
605
|
const timestamp = computeTimeAtSlot(chain.config, state.slot, state.genesisTime);
|
|
624
|
-
const prevRandao = getRandaoMix(state
|
|
606
|
+
const prevRandao = state.getRandaoMix(state.epoch);
|
|
625
607
|
|
|
626
608
|
const payloadIdCached = chain.executionEngine.payloadIdCache.get({
|
|
627
609
|
headBlockHash: toRootHex(parentHash),
|
|
@@ -684,7 +666,7 @@ async function prepareExecutionPayloadHeader(
|
|
|
684
666
|
config: ChainForkConfig;
|
|
685
667
|
},
|
|
686
668
|
fork: ForkPostBellatrix,
|
|
687
|
-
state:
|
|
669
|
+
state: IBeaconStateView,
|
|
688
670
|
proposerPubKey: BLSPubkey
|
|
689
671
|
): Promise<{
|
|
690
672
|
header: ExecutionPayloadHeader;
|
|
@@ -711,16 +693,9 @@ export function getPayloadAttributesForSSE(
|
|
|
711
693
|
prepareSlot,
|
|
712
694
|
parentBlockRoot,
|
|
713
695
|
feeRecipient,
|
|
714
|
-
}: {
|
|
715
|
-
prepareState: CachedBeaconStateExecutions | CachedBeaconStateGloas;
|
|
716
|
-
prepareSlot: Slot;
|
|
717
|
-
parentBlockRoot: Root;
|
|
718
|
-
feeRecipient: string;
|
|
719
|
-
}
|
|
696
|
+
}: {prepareState: IBeaconStateView; prepareSlot: Slot; parentBlockRoot: Root; feeRecipient: string}
|
|
720
697
|
): SSEPayloadAttributes {
|
|
721
|
-
const parentHash =
|
|
722
|
-
? (prepareState as CachedBeaconStateGloas).latestBlockHash
|
|
723
|
-
: (prepareState as CachedBeaconStateExecutions).latestExecutionPayloadHeader.blockHash;
|
|
698
|
+
const parentHash = prepareState.latestBlockHash;
|
|
724
699
|
const payloadAttributes = preparePayloadAttributes(fork, chain, {
|
|
725
700
|
prepareState,
|
|
726
701
|
prepareSlot,
|
|
@@ -736,11 +711,11 @@ export function getPayloadAttributesForSSE(
|
|
|
736
711
|
}
|
|
737
712
|
parentBlockNumber = parentBlock.executionPayloadNumber;
|
|
738
713
|
} else {
|
|
739
|
-
parentBlockNumber =
|
|
714
|
+
parentBlockNumber = prepareState.payloadBlockNumber;
|
|
740
715
|
}
|
|
741
716
|
|
|
742
717
|
const ssePayloadAttributes: SSEPayloadAttributes = {
|
|
743
|
-
proposerIndex: prepareState.
|
|
718
|
+
proposerIndex: prepareState.getBeaconProposer(prepareSlot),
|
|
744
719
|
proposalSlot: prepareSlot,
|
|
745
720
|
parentBlockNumber,
|
|
746
721
|
parentBlockRoot,
|
|
@@ -761,14 +736,14 @@ function preparePayloadAttributes(
|
|
|
761
736
|
parentBlockRoot,
|
|
762
737
|
feeRecipient,
|
|
763
738
|
}: {
|
|
764
|
-
prepareState:
|
|
739
|
+
prepareState: IBeaconStateView;
|
|
765
740
|
prepareSlot: Slot;
|
|
766
741
|
parentBlockRoot: Root;
|
|
767
742
|
feeRecipient: string;
|
|
768
743
|
}
|
|
769
744
|
): SSEPayloadAttributes["payloadAttributes"] {
|
|
770
745
|
const timestamp = computeTimeAtSlot(chain.config, prepareSlot, prepareState.genesisTime);
|
|
771
|
-
const prevRandao = getRandaoMix(prepareState
|
|
746
|
+
const prevRandao = prepareState.getRandaoMix(prepareState.epoch);
|
|
772
747
|
const payloadAttributes = {
|
|
773
748
|
timestamp,
|
|
774
749
|
prevRandao,
|
|
@@ -777,10 +752,8 @@ function preparePayloadAttributes(
|
|
|
777
752
|
|
|
778
753
|
if (ForkSeq[fork] >= ForkSeq.capella) {
|
|
779
754
|
// withdrawals logic is now fork aware as it changes on electra fork post capella
|
|
780
|
-
(payloadAttributes as capella.SSEPayloadAttributes["payloadAttributes"]).withdrawals =
|
|
781
|
-
|
|
782
|
-
prepareState as CachedBeaconStateCapella
|
|
783
|
-
).expectedWithdrawals;
|
|
755
|
+
(payloadAttributes as capella.SSEPayloadAttributes["payloadAttributes"]).withdrawals =
|
|
756
|
+
prepareState.getExpectedWithdrawals().expectedWithdrawals;
|
|
784
757
|
}
|
|
785
758
|
|
|
786
759
|
if (ForkSeq[fork] >= ForkSeq.deneb) {
|
|
@@ -793,7 +766,7 @@ function preparePayloadAttributes(
|
|
|
793
766
|
export async function produceCommonBlockBody<T extends BlockType>(
|
|
794
767
|
this: BeaconChain,
|
|
795
768
|
blockType: T,
|
|
796
|
-
currentState:
|
|
769
|
+
currentState: IBeaconStateView,
|
|
797
770
|
{randaoReveal, graffiti, slot, parentBlock}: BlockAttributes
|
|
798
771
|
): Promise<CommonBlockBody> {
|
|
799
772
|
const stepsMetrics =
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {routes} from "@lodestar/api";
|
|
2
2
|
import {ProtoBlock} from "@lodestar/fork-choice";
|
|
3
|
-
import {
|
|
3
|
+
import {IBeaconStateView} from "@lodestar/state-transition";
|
|
4
4
|
import {BeaconBlock, Epoch, RootHex, Slot, phase0} from "@lodestar/types";
|
|
5
5
|
import {CheckpointHexPayload} from "../stateCache/types.js";
|
|
6
6
|
|
|
@@ -38,21 +38,21 @@ export type StateRegenerationOpts = {
|
|
|
38
38
|
export interface IStateRegenerator extends IStateRegeneratorInternal {
|
|
39
39
|
dropCache(): void;
|
|
40
40
|
dumpCacheSummary(): routes.lodestar.StateCacheItem[];
|
|
41
|
-
getStateSync(stateRoot: RootHex):
|
|
42
|
-
getPreStateSync(block: BeaconBlock):
|
|
43
|
-
getCheckpointStateOrBytes(cp: CheckpointHexPayload): Promise<
|
|
44
|
-
getCheckpointStateSync(cp: CheckpointHexPayload):
|
|
45
|
-
getClosestHeadState(head: ProtoBlock):
|
|
41
|
+
getStateSync(stateRoot: RootHex): IBeaconStateView | null;
|
|
42
|
+
getPreStateSync(block: BeaconBlock): IBeaconStateView | null;
|
|
43
|
+
getCheckpointStateOrBytes(cp: CheckpointHexPayload): Promise<IBeaconStateView | Uint8Array | null>;
|
|
44
|
+
getCheckpointStateSync(cp: CheckpointHexPayload): IBeaconStateView | null;
|
|
45
|
+
getClosestHeadState(head: ProtoBlock): IBeaconStateView | null;
|
|
46
46
|
pruneOnCheckpoint(finalizedEpoch: Epoch, justifiedEpoch: Epoch, headStateRoot: RootHex): void;
|
|
47
47
|
pruneOnFinalized(finalizedEpoch: Epoch): void;
|
|
48
|
-
processBlockState(blockRootHex: RootHex, postState:
|
|
49
|
-
processPayloadState(payloadState:
|
|
48
|
+
processBlockState(blockRootHex: RootHex, postState: IBeaconStateView): void;
|
|
49
|
+
processPayloadState(payloadState: IBeaconStateView): void;
|
|
50
50
|
/**
|
|
51
51
|
* payloadPresent is true if this is payload state, false if block state.
|
|
52
52
|
* payloadPresent is always true for pre-gloas.
|
|
53
53
|
*/
|
|
54
|
-
addCheckpointState(cp: phase0.Checkpoint, item:
|
|
55
|
-
updateHeadState(newHead: ProtoBlock, maybeHeadState:
|
|
54
|
+
addCheckpointState(cp: phase0.Checkpoint, item: IBeaconStateView, payloadPresent: boolean): void;
|
|
55
|
+
updateHeadState(newHead: ProtoBlock, maybeHeadState: IBeaconStateView): void;
|
|
56
56
|
updatePreComputedCheckpoint(rootHex: RootHex, epoch: Epoch, payloadPresent: boolean): number | null;
|
|
57
57
|
upgradeForGloas(epoch: Epoch): void;
|
|
58
58
|
}
|
|
@@ -65,11 +65,7 @@ export interface IStateRegeneratorInternal {
|
|
|
65
65
|
* Return a valid pre-state for a beacon block
|
|
66
66
|
* This will always return a state in the latest viable epoch
|
|
67
67
|
*/
|
|
68
|
-
getPreState(
|
|
69
|
-
block: BeaconBlock,
|
|
70
|
-
opts: StateRegenerationOpts,
|
|
71
|
-
rCaller: RegenCaller
|
|
72
|
-
): Promise<CachedBeaconStateAllForks>;
|
|
68
|
+
getPreState(block: BeaconBlock, opts: StateRegenerationOpts, rCaller: RegenCaller): Promise<IBeaconStateView>;
|
|
73
69
|
|
|
74
70
|
/**
|
|
75
71
|
* Return the state of `blockRoot` processed to slot `slot`
|
|
@@ -79,10 +75,10 @@ export interface IStateRegeneratorInternal {
|
|
|
79
75
|
slot: Slot,
|
|
80
76
|
opts: StateRegenerationOpts,
|
|
81
77
|
rCaller: RegenCaller
|
|
82
|
-
): Promise<
|
|
78
|
+
): Promise<IBeaconStateView>;
|
|
83
79
|
|
|
84
80
|
/**
|
|
85
81
|
* Return the exact state with `stateRoot`
|
|
86
82
|
*/
|
|
87
|
-
getState(stateRoot: RootHex, rCaller: RegenCaller): Promise<
|
|
83
|
+
getState(stateRoot: RootHex, rCaller: RegenCaller): Promise<IBeaconStateView>;
|
|
88
84
|
}
|