@lodestar/beacon-node 1.42.0-dev.4411584fd8 → 1.42.0-dev.47afaa6bb7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/impl/beacon/blocks/index.d.ts.map +1 -1
- package/lib/api/impl/beacon/blocks/index.js +60 -29
- package/lib/api/impl/beacon/blocks/index.js.map +1 -1
- package/lib/api/impl/beacon/pool/index.d.ts.map +1 -1
- package/lib/api/impl/beacon/pool/index.js +5 -1
- package/lib/api/impl/beacon/pool/index.js.map +1 -1
- package/lib/api/impl/beacon/state/index.d.ts.map +1 -1
- package/lib/api/impl/beacon/state/index.js +38 -40
- package/lib/api/impl/beacon/state/index.js.map +1 -1
- package/lib/api/impl/beacon/state/utils.d.ts +4 -4
- package/lib/api/impl/beacon/state/utils.d.ts.map +1 -1
- package/lib/api/impl/beacon/state/utils.js +7 -10
- package/lib/api/impl/beacon/state/utils.js.map +1 -1
- package/lib/api/impl/debug/index.js.map +1 -1
- package/lib/api/impl/lodestar/index.d.ts.map +1 -1
- package/lib/api/impl/lodestar/index.js +8 -6
- package/lib/api/impl/lodestar/index.js.map +1 -1
- package/lib/api/impl/proof/index.d.ts.map +1 -1
- package/lib/api/impl/proof/index.js +2 -6
- package/lib/api/impl/proof/index.js.map +1 -1
- package/lib/api/impl/validator/index.d.ts.map +1 -1
- package/lib/api/impl/validator/index.js +35 -29
- package/lib/api/impl/validator/index.js.map +1 -1
- package/lib/api/impl/validator/utils.d.ts +2 -2
- package/lib/api/impl/validator/utils.d.ts.map +1 -1
- package/lib/api/impl/validator/utils.js +3 -3
- package/lib/api/impl/validator/utils.js.map +1 -1
- package/lib/chain/ColumnReconstructionTracker.d.ts +2 -1
- package/lib/chain/ColumnReconstructionTracker.d.ts.map +1 -1
- package/lib/chain/ColumnReconstructionTracker.js +5 -5
- package/lib/chain/ColumnReconstructionTracker.js.map +1 -1
- package/lib/chain/GetBlobsTracker.d.ts +2 -1
- package/lib/chain/GetBlobsTracker.d.ts.map +1 -1
- package/lib/chain/GetBlobsTracker.js +14 -12
- package/lib/chain/GetBlobsTracker.js.map +1 -1
- package/lib/chain/archiveStore/archiveStore.d.ts.map +1 -1
- package/lib/chain/archiveStore/archiveStore.js +1 -0
- package/lib/chain/archiveStore/archiveStore.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/getHistoricalState.d.ts +3 -7
- package/lib/chain/archiveStore/historicalState/getHistoricalState.d.ts.map +1 -1
- package/lib/chain/archiveStore/historicalState/getHistoricalState.js +8 -26
- package/lib/chain/archiveStore/historicalState/getHistoricalState.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/historicalStateRegen.d.ts +2 -2
- package/lib/chain/archiveStore/historicalState/historicalStateRegen.d.ts.map +1 -1
- package/lib/chain/archiveStore/historicalState/historicalStateRegen.js +1 -0
- package/lib/chain/archiveStore/historicalState/historicalStateRegen.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/types.d.ts +2 -0
- package/lib/chain/archiveStore/historicalState/types.d.ts.map +1 -1
- package/lib/chain/archiveStore/historicalState/types.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/worker.js +1 -3
- package/lib/chain/archiveStore/historicalState/worker.js.map +1 -1
- package/lib/chain/archiveStore/interface.d.ts +1 -0
- package/lib/chain/archiveStore/interface.d.ts.map +1 -1
- package/lib/chain/balancesCache.d.ts +2 -2
- package/lib/chain/balancesCache.d.ts.map +1 -1
- package/lib/chain/balancesCache.js +4 -4
- package/lib/chain/balancesCache.js.map +1 -1
- package/lib/chain/blocks/blockInput/blockInput.d.ts +5 -5
- package/lib/chain/blocks/blockInput/blockInput.d.ts.map +1 -1
- package/lib/chain/blocks/blockInput/blockInput.js.map +1 -1
- package/lib/chain/blocks/blockInput/types.d.ts +5 -4
- package/lib/chain/blocks/blockInput/types.d.ts.map +1 -1
- package/lib/chain/blocks/blockInput/types.js +1 -0
- package/lib/chain/blocks/blockInput/types.js.map +1 -1
- package/lib/chain/blocks/importBlock.d.ts +3 -3
- package/lib/chain/blocks/importBlock.d.ts.map +1 -1
- package/lib/chain/blocks/importBlock.js +54 -24
- package/lib/chain/blocks/importBlock.js.map +1 -1
- package/lib/chain/blocks/importExecutionPayload.d.ts +50 -0
- package/lib/chain/blocks/importExecutionPayload.d.ts.map +1 -0
- package/lib/chain/blocks/importExecutionPayload.js +195 -0
- package/lib/chain/blocks/importExecutionPayload.js.map +1 -0
- package/lib/chain/blocks/index.d.ts.map +1 -1
- package/lib/chain/blocks/index.js +3 -2
- package/lib/chain/blocks/index.js.map +1 -1
- package/lib/chain/blocks/payloadEnvelopeInput/index.d.ts +3 -0
- package/lib/chain/blocks/payloadEnvelopeInput/index.d.ts.map +1 -0
- package/lib/chain/blocks/payloadEnvelopeInput/index.js +3 -0
- package/lib/chain/blocks/payloadEnvelopeInput/index.js.map +1 -0
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.d.ts +88 -0
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.d.ts.map +1 -0
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.js +279 -0
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.js.map +1 -0
- package/lib/chain/blocks/payloadEnvelopeInput/types.d.ts +30 -0
- package/lib/chain/blocks/payloadEnvelopeInput/types.d.ts.map +1 -0
- package/lib/chain/blocks/payloadEnvelopeInput/types.js +11 -0
- package/lib/chain/blocks/payloadEnvelopeInput/types.js.map +1 -0
- package/lib/chain/blocks/payloadEnvelopeProcessor.d.ts +15 -0
- package/lib/chain/blocks/payloadEnvelopeProcessor.d.ts.map +1 -0
- package/lib/chain/blocks/payloadEnvelopeProcessor.js +46 -0
- package/lib/chain/blocks/payloadEnvelopeProcessor.js.map +1 -0
- package/lib/chain/blocks/types.d.ts +28 -15
- package/lib/chain/blocks/types.d.ts.map +1 -1
- package/lib/chain/blocks/types.js.map +1 -1
- package/lib/chain/blocks/utils/checkpoint.d.ts +2 -2
- package/lib/chain/blocks/utils/checkpoint.d.ts.map +1 -1
- package/lib/chain/blocks/utils/checkpoint.js.map +1 -1
- package/lib/chain/blocks/verifyBlock.d.ts +2 -2
- package/lib/chain/blocks/verifyBlock.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlock.js +4 -4
- package/lib/chain/blocks/verifyBlock.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksExecutionPayloads.d.ts +5 -5
- package/lib/chain/blocks/verifyBlocksExecutionPayloads.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlocksExecutionPayloads.js +5 -4
- package/lib/chain/blocks/verifyBlocksExecutionPayloads.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksSignatures.d.ts +2 -2
- package/lib/chain/blocks/verifyBlocksSignatures.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlocksSignatures.js +4 -2
- package/lib/chain/blocks/verifyBlocksSignatures.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksStateTransitionOnly.d.ts +3 -3
- package/lib/chain/blocks/verifyBlocksStateTransitionOnly.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlocksStateTransitionOnly.js +3 -3
- package/lib/chain/blocks/verifyBlocksStateTransitionOnly.js.map +1 -1
- package/lib/chain/blocks/writePayloadEnvelopeInputToDb.d.ts +12 -0
- package/lib/chain/blocks/writePayloadEnvelopeInputToDb.d.ts.map +1 -0
- package/lib/chain/blocks/writePayloadEnvelopeInputToDb.js +40 -0
- package/lib/chain/blocks/writePayloadEnvelopeInputToDb.js.map +1 -0
- package/lib/chain/chain.d.ts +22 -16
- package/lib/chain/chain.d.ts.map +1 -1
- package/lib/chain/chain.js +142 -69
- package/lib/chain/chain.js.map +1 -1
- package/lib/chain/emitter.d.ts +31 -9
- package/lib/chain/emitter.d.ts.map +1 -1
- package/lib/chain/emitter.js +12 -3
- package/lib/chain/emitter.js.map +1 -1
- package/lib/chain/errors/blockError.d.ts +10 -5
- package/lib/chain/errors/blockError.d.ts.map +1 -1
- package/lib/chain/errors/blockError.js +2 -0
- package/lib/chain/errors/blockError.js.map +1 -1
- package/lib/chain/errors/dataColumnSidecarError.d.ts +31 -1
- package/lib/chain/errors/dataColumnSidecarError.d.ts.map +1 -1
- package/lib/chain/errors/dataColumnSidecarError.js +7 -0
- package/lib/chain/errors/dataColumnSidecarError.js.map +1 -1
- package/lib/chain/errors/executionPayloadEnvelope.d.ts +12 -2
- package/lib/chain/errors/executionPayloadEnvelope.d.ts.map +1 -1
- package/lib/chain/errors/executionPayloadEnvelope.js +3 -1
- package/lib/chain/errors/executionPayloadEnvelope.js.map +1 -1
- package/lib/chain/forkChoice/index.d.ts +4 -4
- package/lib/chain/forkChoice/index.d.ts.map +1 -1
- package/lib/chain/forkChoice/index.js +30 -34
- package/lib/chain/forkChoice/index.js.map +1 -1
- package/lib/chain/initState.d.ts +2 -2
- package/lib/chain/initState.d.ts.map +1 -1
- package/lib/chain/initState.js +1 -1
- package/lib/chain/initState.js.map +1 -1
- package/lib/chain/interface.d.ts +21 -17
- package/lib/chain/interface.d.ts.map +1 -1
- package/lib/chain/lightClient/index.d.ts +2 -2
- package/lib/chain/lightClient/index.d.ts.map +1 -1
- package/lib/chain/lightClient/index.js +11 -4
- package/lib/chain/lightClient/index.js.map +1 -1
- package/lib/chain/opPools/aggregatedAttestationPool.d.ts +6 -6
- package/lib/chain/opPools/aggregatedAttestationPool.d.ts.map +1 -1
- package/lib/chain/opPools/aggregatedAttestationPool.js +13 -13
- package/lib/chain/opPools/aggregatedAttestationPool.js.map +1 -1
- package/lib/chain/opPools/executionPayloadBidPool.d.ts +2 -2
- package/lib/chain/opPools/executionPayloadBidPool.d.ts.map +1 -1
- package/lib/chain/opPools/executionPayloadBidPool.js +2 -2
- package/lib/chain/opPools/executionPayloadBidPool.js.map +1 -1
- package/lib/chain/opPools/opPool.d.ts +3 -3
- package/lib/chain/opPools/opPool.d.ts.map +1 -1
- package/lib/chain/opPools/opPool.js +7 -7
- package/lib/chain/opPools/opPool.js.map +1 -1
- package/lib/chain/opPools/utils.d.ts +2 -2
- package/lib/chain/opPools/utils.d.ts.map +1 -1
- package/lib/chain/opPools/utils.js +1 -1
- package/lib/chain/opPools/utils.js.map +1 -1
- package/lib/chain/options.d.ts +1 -0
- package/lib/chain/options.d.ts.map +1 -1
- package/lib/chain/options.js +1 -0
- package/lib/chain/options.js.map +1 -1
- package/lib/chain/prepareNextSlot.d.ts +2 -2
- package/lib/chain/prepareNextSlot.d.ts.map +1 -1
- package/lib/chain/prepareNextSlot.js +10 -4
- package/lib/chain/prepareNextSlot.js.map +1 -1
- package/lib/chain/produceBlock/computeNewStateRoot.d.ts +4 -4
- package/lib/chain/produceBlock/computeNewStateRoot.d.ts.map +1 -1
- package/lib/chain/produceBlock/computeNewStateRoot.js +14 -10
- package/lib/chain/produceBlock/computeNewStateRoot.js.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.d.ts +7 -7
- package/lib/chain/produceBlock/produceBlockBody.d.ts.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.js +32 -17
- package/lib/chain/produceBlock/produceBlockBody.js.map +1 -1
- package/lib/chain/regen/interface.d.ts +15 -13
- package/lib/chain/regen/interface.d.ts.map +1 -1
- package/lib/chain/regen/interface.js +2 -0
- package/lib/chain/regen/interface.js.map +1 -1
- package/lib/chain/regen/queued.d.ts +14 -14
- package/lib/chain/regen/queued.d.ts.map +1 -1
- package/lib/chain/regen/queued.js.map +1 -1
- package/lib/chain/regen/regen.d.ts +6 -5
- package/lib/chain/regen/regen.d.ts.map +1 -1
- package/lib/chain/regen/regen.js +6 -6
- package/lib/chain/regen/regen.js.map +1 -1
- package/lib/chain/seenCache/index.d.ts +1 -1
- package/lib/chain/seenCache/index.d.ts.map +1 -1
- package/lib/chain/seenCache/index.js +1 -1
- package/lib/chain/seenCache/index.js.map +1 -1
- package/lib/chain/seenCache/seenGossipBlockInput.d.ts +1 -1
- package/lib/chain/seenCache/seenGossipBlockInput.d.ts.map +1 -1
- package/lib/chain/seenCache/seenGossipBlockInput.js +4 -4
- package/lib/chain/seenCache/seenGossipBlockInput.js.map +1 -1
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.d.ts +38 -0
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.d.ts.map +1 -0
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.js +76 -0
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.js.map +1 -0
- package/lib/chain/serializeState.d.ts +2 -2
- package/lib/chain/serializeState.d.ts.map +1 -1
- package/lib/chain/serializeState.js +1 -1
- package/lib/chain/serializeState.js.map +1 -1
- package/lib/chain/shufflingCache.d.ts +2 -2
- package/lib/chain/shufflingCache.d.ts.map +1 -1
- package/lib/chain/shufflingCache.js +3 -4
- package/lib/chain/shufflingCache.js.map +1 -1
- package/lib/chain/stateCache/fifoBlockStateCache.d.ts +6 -6
- package/lib/chain/stateCache/fifoBlockStateCache.d.ts.map +1 -1
- package/lib/chain/stateCache/fifoBlockStateCache.js.map +1 -1
- package/lib/chain/stateCache/persistentCheckpointsCache.d.ts +11 -11
- package/lib/chain/stateCache/persistentCheckpointsCache.d.ts.map +1 -1
- package/lib/chain/stateCache/persistentCheckpointsCache.js +12 -16
- package/lib/chain/stateCache/persistentCheckpointsCache.js.map +1 -1
- package/lib/chain/stateCache/types.d.ts +14 -14
- package/lib/chain/stateCache/types.d.ts.map +1 -1
- package/lib/chain/stateCache/types.js.map +1 -1
- package/lib/chain/validation/attesterSlashing.js +3 -3
- package/lib/chain/validation/attesterSlashing.js.map +1 -1
- package/lib/chain/validation/blobSidecar.js +1 -1
- package/lib/chain/validation/blobSidecar.js.map +1 -1
- package/lib/chain/validation/block.d.ts.map +1 -1
- package/lib/chain/validation/block.js +15 -6
- package/lib/chain/validation/block.js.map +1 -1
- package/lib/chain/validation/blsToExecutionChange.js +2 -2
- package/lib/chain/validation/blsToExecutionChange.js.map +1 -1
- package/lib/chain/validation/dataColumnSidecar.d.ts +11 -4
- package/lib/chain/validation/dataColumnSidecar.d.ts.map +1 -1
- package/lib/chain/validation/dataColumnSidecar.js +185 -6
- package/lib/chain/validation/dataColumnSidecar.js.map +1 -1
- package/lib/chain/validation/executionPayloadBid.d.ts.map +1 -1
- package/lib/chain/validation/executionPayloadBid.js +10 -7
- package/lib/chain/validation/executionPayloadBid.js.map +1 -1
- package/lib/chain/validation/executionPayloadEnvelope.d.ts.map +1 -1
- package/lib/chain/validation/executionPayloadEnvelope.js +34 -19
- package/lib/chain/validation/executionPayloadEnvelope.js.map +1 -1
- package/lib/chain/validation/payloadAttestationMessage.js +5 -3
- package/lib/chain/validation/payloadAttestationMessage.js.map +1 -1
- package/lib/chain/validation/proposerSlashing.js +1 -1
- package/lib/chain/validation/proposerSlashing.js.map +1 -1
- package/lib/chain/validation/signatureSets/contributionAndProof.d.ts +2 -2
- package/lib/chain/validation/signatureSets/contributionAndProof.d.ts.map +1 -1
- package/lib/chain/validation/signatureSets/contributionAndProof.js +1 -1
- package/lib/chain/validation/signatureSets/contributionAndProof.js.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommittee.d.ts +2 -2
- package/lib/chain/validation/signatureSets/syncCommittee.d.ts.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommittee.js +1 -1
- package/lib/chain/validation/signatureSets/syncCommittee.js.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommitteeContribution.d.ts +2 -2
- package/lib/chain/validation/signatureSets/syncCommitteeContribution.d.ts.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommitteeContribution.js.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommitteeSelectionProof.d.ts +2 -2
- package/lib/chain/validation/signatureSets/syncCommitteeSelectionProof.d.ts.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommitteeSelectionProof.js +1 -1
- package/lib/chain/validation/signatureSets/syncCommitteeSelectionProof.js.map +1 -1
- package/lib/chain/validation/syncCommittee.d.ts +4 -4
- package/lib/chain/validation/syncCommittee.d.ts.map +1 -1
- package/lib/chain/validation/syncCommittee.js +17 -12
- package/lib/chain/validation/syncCommittee.js.map +1 -1
- package/lib/chain/validation/syncCommitteeContributionAndProof.d.ts.map +1 -1
- package/lib/chain/validation/syncCommitteeContributionAndProof.js +5 -2
- package/lib/chain/validation/syncCommitteeContributionAndProof.js.map +1 -1
- package/lib/chain/validation/voluntaryExit.d.ts.map +1 -1
- package/lib/chain/validation/voluntaryExit.js +3 -3
- package/lib/chain/validation/voluntaryExit.js.map +1 -1
- package/lib/chain/validatorMonitor.d.ts +5 -4
- package/lib/chain/validatorMonitor.d.ts.map +1 -1
- package/lib/chain/validatorMonitor.js +14 -9
- package/lib/chain/validatorMonitor.js.map +1 -1
- package/lib/db/buckets.d.ts +2 -2
- package/lib/db/buckets.d.ts.map +1 -1
- package/lib/db/buckets.js +2 -2
- package/lib/db/buckets.js.map +1 -1
- package/lib/db/repositories/blockArchiveIndex.d.ts +2 -2
- package/lib/db/repositories/blockArchiveIndex.d.ts.map +1 -1
- package/lib/db/repositories/dataColumnSidecar.d.ts.map +1 -1
- package/lib/db/repositories/dataColumnSidecar.js +4 -2
- package/lib/db/repositories/dataColumnSidecar.js.map +1 -1
- package/lib/db/repositories/dataColumnSidecarArchive.d.ts.map +1 -1
- package/lib/db/repositories/dataColumnSidecarArchive.js +4 -2
- package/lib/db/repositories/dataColumnSidecarArchive.js.map +1 -1
- package/lib/metrics/metrics/lodestar.d.ts +60 -4
- package/lib/metrics/metrics/lodestar.d.ts.map +1 -1
- package/lib/metrics/metrics/lodestar.js +126 -15
- package/lib/metrics/metrics/lodestar.js.map +1 -1
- package/lib/network/gossip/encoding.d.ts.map +1 -1
- package/lib/network/gossip/encoding.js +15 -0
- package/lib/network/gossip/encoding.js.map +1 -1
- package/lib/network/interface.d.ts +7 -4
- package/lib/network/interface.d.ts.map +1 -1
- package/lib/network/libp2p/index.d.ts.map +1 -1
- package/lib/network/libp2p/index.js +22 -11
- package/lib/network/libp2p/index.js.map +1 -1
- package/lib/network/network.d.ts +7 -4
- package/lib/network/network.d.ts.map +1 -1
- package/lib/network/network.js +12 -3
- package/lib/network/network.js.map +1 -1
- package/lib/network/options.d.ts.map +1 -1
- package/lib/network/options.js +7 -2
- package/lib/network/options.js.map +1 -1
- package/lib/network/processor/extractSlotRootFns.d.ts +1 -1
- package/lib/network/processor/extractSlotRootFns.d.ts.map +1 -1
- package/lib/network/processor/extractSlotRootFns.js +34 -4
- package/lib/network/processor/extractSlotRootFns.js.map +1 -1
- package/lib/network/processor/gossipHandlers.d.ts.map +1 -1
- package/lib/network/processor/gossipHandlers.js +287 -70
- package/lib/network/processor/gossipHandlers.js.map +1 -1
- package/lib/network/processor/index.d.ts +22 -7
- package/lib/network/processor/index.d.ts.map +1 -1
- package/lib/network/processor/index.js +313 -80
- package/lib/network/processor/index.js.map +1 -1
- package/lib/network/reqresp/ReqRespBeaconNode.d.ts.map +1 -1
- package/lib/network/reqresp/ReqRespBeaconNode.js +9 -0
- package/lib/network/reqresp/ReqRespBeaconNode.js.map +1 -1
- package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRange.d.ts +8 -0
- package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRange.d.ts.map +1 -0
- package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRange.js +69 -0
- package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRange.js.map +1 -0
- package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRoot.d.ts +6 -0
- package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRoot.d.ts.map +1 -0
- package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRoot.js +28 -0
- package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRoot.js.map +1 -0
- package/lib/network/reqresp/handlers/index.d.ts.map +1 -1
- package/lib/network/reqresp/handlers/index.js +11 -1
- package/lib/network/reqresp/handlers/index.js.map +1 -1
- package/lib/network/reqresp/protocols.d.ts +2 -0
- package/lib/network/reqresp/protocols.d.ts.map +1 -1
- package/lib/network/reqresp/protocols.js +10 -0
- package/lib/network/reqresp/protocols.js.map +1 -1
- package/lib/network/reqresp/rateLimit.d.ts.map +1 -1
- package/lib/network/reqresp/rateLimit.js +8 -0
- package/lib/network/reqresp/rateLimit.js.map +1 -1
- package/lib/network/reqresp/score.d.ts.map +1 -1
- package/lib/network/reqresp/score.js +2 -0
- package/lib/network/reqresp/score.js.map +1 -1
- package/lib/network/reqresp/types.d.ts +10 -4
- package/lib/network/reqresp/types.d.ts.map +1 -1
- package/lib/network/reqresp/types.js +16 -4
- package/lib/network/reqresp/types.js.map +1 -1
- package/lib/node/nodejs.d.ts +2 -2
- package/lib/node/nodejs.d.ts.map +1 -1
- package/lib/node/nodejs.js +3 -3
- package/lib/node/nodejs.js.map +1 -1
- package/lib/node/notifier.d.ts.map +1 -1
- package/lib/node/notifier.js +3 -3
- package/lib/node/notifier.js.map +1 -1
- package/lib/sync/backfill/backfill.d.ts +2 -2
- package/lib/sync/backfill/backfill.d.ts.map +1 -1
- package/lib/sync/backfill/backfill.js +2 -2
- package/lib/sync/backfill/backfill.js.map +1 -1
- package/lib/sync/unknownBlock.d.ts +3 -9
- package/lib/sync/unknownBlock.d.ts.map +1 -1
- package/lib/sync/unknownBlock.js +10 -43
- package/lib/sync/unknownBlock.js.map +1 -1
- package/lib/sync/utils/downloadByRange.d.ts +3 -3
- package/lib/sync/utils/downloadByRange.d.ts.map +1 -1
- package/lib/sync/utils/downloadByRange.js +4 -2
- package/lib/sync/utils/downloadByRange.js.map +1 -1
- package/lib/sync/utils/downloadByRoot.d.ts +3 -3
- package/lib/sync/utils/downloadByRoot.d.ts.map +1 -1
- package/lib/sync/utils/downloadByRoot.js +10 -5
- package/lib/sync/utils/downloadByRoot.js.map +1 -1
- package/lib/util/blobs.d.ts +3 -3
- package/lib/util/blobs.d.ts.map +1 -1
- package/lib/util/blobs.js +21 -10
- package/lib/util/blobs.js.map +1 -1
- package/lib/util/dataColumns.d.ts +18 -11
- package/lib/util/dataColumns.d.ts.map +1 -1
- package/lib/util/dataColumns.js +51 -17
- package/lib/util/dataColumns.js.map +1 -1
- package/lib/util/execution.d.ts +6 -2
- package/lib/util/execution.d.ts.map +1 -1
- package/lib/util/execution.js +49 -25
- package/lib/util/execution.js.map +1 -1
- package/lib/util/sszBytes.d.ts +29 -2
- package/lib/util/sszBytes.d.ts.map +1 -1
- package/lib/util/sszBytes.js +258 -14
- package/lib/util/sszBytes.js.map +1 -1
- package/lib/util/types.d.ts +2 -0
- package/lib/util/types.d.ts.map +1 -1
- package/lib/util/types.js +1 -0
- package/lib/util/types.js.map +1 -1
- package/package.json +16 -16
- package/src/api/impl/beacon/blocks/index.ts +69 -33
- package/src/api/impl/beacon/pool/index.ts +5 -1
- package/src/api/impl/beacon/state/index.ts +43 -55
- package/src/api/impl/beacon/state/utils.ts +11 -25
- package/src/api/impl/debug/index.ts +2 -2
- package/src/api/impl/lodestar/index.ts +8 -8
- package/src/api/impl/proof/index.ts +2 -9
- package/src/api/impl/validator/index.ts +38 -43
- package/src/api/impl/validator/utils.ts +4 -7
- package/src/chain/ColumnReconstructionTracker.ts +6 -5
- package/src/chain/GetBlobsTracker.ts +14 -12
- package/src/chain/archiveStore/archiveStore.ts +1 -0
- package/src/chain/archiveStore/historicalState/getHistoricalState.ts +10 -39
- package/src/chain/archiveStore/historicalState/historicalStateRegen.ts +2 -1
- package/src/chain/archiveStore/historicalState/types.ts +2 -0
- package/src/chain/archiveStore/historicalState/worker.ts +1 -4
- package/src/chain/archiveStore/interface.ts +1 -0
- package/src/chain/balancesCache.ts +5 -11
- package/src/chain/blocks/blockInput/blockInput.ts +8 -8
- package/src/chain/blocks/blockInput/types.ts +5 -4
- package/src/chain/blocks/importBlock.ts +85 -32
- package/src/chain/blocks/importExecutionPayload.ts +277 -0
- package/src/chain/blocks/index.ts +3 -2
- package/src/chain/blocks/payloadEnvelopeInput/index.ts +2 -0
- package/src/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.ts +377 -0
- package/src/chain/blocks/payloadEnvelopeInput/types.ts +34 -0
- package/src/chain/blocks/payloadEnvelopeProcessor.ts +61 -0
- package/src/chain/blocks/types.ts +34 -15
- package/src/chain/blocks/utils/checkpoint.ts +2 -2
- package/src/chain/blocks/verifyBlock.ts +5 -10
- package/src/chain/blocks/verifyBlocksExecutionPayloads.ts +10 -14
- package/src/chain/blocks/verifyBlocksSignatures.ts +10 -3
- package/src/chain/blocks/verifyBlocksStateTransitionOnly.ts +6 -8
- package/src/chain/blocks/writePayloadEnvelopeInputToDb.ts +55 -0
- package/src/chain/chain.ts +188 -101
- package/src/chain/emitter.ts +27 -9
- package/src/chain/errors/blockError.ts +8 -5
- package/src/chain/errors/dataColumnSidecarError.ts +32 -1
- package/src/chain/errors/executionPayloadEnvelope.ts +6 -2
- package/src/chain/forkChoice/index.ts +35 -51
- package/src/chain/initState.ts +7 -2
- package/src/chain/interface.ts +22 -18
- package/src/chain/lightClient/index.ts +17 -18
- package/src/chain/opPools/aggregatedAttestationPool.ts +20 -21
- package/src/chain/opPools/executionPayloadBidPool.ts +3 -3
- package/src/chain/opPools/opPool.ts +13 -14
- package/src/chain/opPools/utils.ts +3 -3
- package/src/chain/options.ts +2 -0
- package/src/chain/prepareNextSlot.ts +14 -8
- package/src/chain/produceBlock/computeNewStateRoot.ts +18 -16
- package/src/chain/produceBlock/produceBlockBody.ts +51 -48
- package/src/chain/regen/interface.ts +15 -17
- package/src/chain/regen/queued.ts +16 -20
- package/src/chain/regen/regen.ts +16 -17
- package/src/chain/seenCache/index.ts +1 -1
- package/src/chain/seenCache/seenGossipBlockInput.ts +4 -4
- package/src/chain/seenCache/seenPayloadEnvelopeInput.ts +106 -0
- package/src/chain/serializeState.ts +3 -3
- package/src/chain/shufflingCache.ts +5 -7
- package/src/chain/stateCache/fifoBlockStateCache.ts +7 -7
- package/src/chain/stateCache/persistentCheckpointsCache.ts +27 -42
- package/src/chain/stateCache/types.ts +14 -18
- package/src/chain/validation/attesterSlashing.ts +3 -3
- package/src/chain/validation/blobSidecar.ts +1 -1
- package/src/chain/validation/block.ts +16 -10
- package/src/chain/validation/blsToExecutionChange.ts +2 -2
- package/src/chain/validation/dataColumnSidecar.ts +231 -8
- package/src/chain/validation/executionPayloadBid.ts +10 -10
- package/src/chain/validation/executionPayloadEnvelope.ts +42 -26
- package/src/chain/validation/payloadAttestationMessage.ts +6 -4
- package/src/chain/validation/proposerSlashing.ts +1 -1
- package/src/chain/validation/signatureSets/contributionAndProof.ts +2 -7
- package/src/chain/validation/signatureSets/syncCommittee.ts +2 -7
- package/src/chain/validation/signatureSets/syncCommitteeContribution.ts +2 -2
- package/src/chain/validation/signatureSets/syncCommitteeSelectionProof.ts +2 -7
- package/src/chain/validation/syncCommittee.ts +25 -20
- package/src/chain/validation/syncCommitteeContributionAndProof.ts +9 -10
- package/src/chain/validation/voluntaryExit.ts +3 -8
- package/src/chain/validatorMonitor.ts +25 -13
- package/src/db/buckets.ts +2 -2
- package/src/db/repositories/dataColumnSidecar.ts +4 -2
- package/src/db/repositories/dataColumnSidecarArchive.ts +4 -2
- package/src/metrics/metrics/lodestar.ts +134 -19
- package/src/network/gossip/encoding.ts +16 -0
- package/src/network/interface.ts +18 -4
- package/src/network/libp2p/index.ts +24 -13
- package/src/network/network.ts +39 -8
- package/src/network/options.ts +7 -2
- package/src/network/processor/extractSlotRootFns.ts +43 -4
- package/src/network/processor/gossipHandlers.ts +356 -80
- package/src/network/processor/index.ts +395 -92
- package/src/network/reqresp/ReqRespBeaconNode.ts +13 -0
- package/src/network/reqresp/handlers/executionPayloadEnvelopesByRange.ts +94 -0
- package/src/network/reqresp/handlers/executionPayloadEnvelopesByRoot.ts +43 -0
- package/src/network/reqresp/handlers/index.ts +12 -0
- package/src/network/reqresp/protocols.ts +12 -0
- package/src/network/reqresp/rateLimit.ts +18 -0
- package/src/network/reqresp/score.ts +2 -0
- package/src/network/reqresp/types.ts +26 -5
- package/src/node/nodejs.ts +6 -5
- package/src/node/notifier.ts +5 -6
- package/src/sync/backfill/backfill.ts +3 -3
- package/src/sync/unknownBlock.ts +13 -53
- package/src/sync/utils/downloadByRange.ts +9 -7
- package/src/sync/utils/downloadByRoot.ts +16 -12
- package/src/util/blobs.ts +35 -15
- package/src/util/dataColumns.ts +69 -25
- package/src/util/execution.ts +49 -30
- package/src/util/sszBytes.ts +335 -13
- package/src/util/types.ts +6 -0
- package/lib/chain/seenCache/seenExecutionPayloadEnvelope.d.ts +0 -15
- package/lib/chain/seenCache/seenExecutionPayloadEnvelope.d.ts.map +0 -1
- package/lib/chain/seenCache/seenExecutionPayloadEnvelope.js +0 -28
- package/lib/chain/seenCache/seenExecutionPayloadEnvelope.js.map +0 -1
- package/src/chain/seenCache/seenExecutionPayloadEnvelope.ts +0 -34
|
@@ -617,7 +617,7 @@ type BlockInputColumnsState =
|
|
|
617
617
|
* - The block is not yet seen and all required sampled columns are seen
|
|
618
618
|
* - The block is not yet seen and all required sampled columns are not yet seen
|
|
619
619
|
*/
|
|
620
|
-
export class BlockInputColumns extends AbstractBlockInput<ForkColumnsDA, fulu.
|
|
620
|
+
export class BlockInputColumns extends AbstractBlockInput<ForkColumnsDA, fulu.DataColumnSidecar[]> {
|
|
621
621
|
type = DAType.Columns as const;
|
|
622
622
|
|
|
623
623
|
state: BlockInputColumnsState;
|
|
@@ -630,7 +630,7 @@ export class BlockInputColumns extends AbstractBlockInput<ForkColumnsDA, fulu.Da
|
|
|
630
630
|
*
|
|
631
631
|
* This is different from `dataPromise` which resolves when all data is available or could become available (e.g. through reconstruction)
|
|
632
632
|
*/
|
|
633
|
-
protected computedDataPromise = createPromise<fulu.
|
|
633
|
+
protected computedDataPromise = createPromise<fulu.DataColumnSidecar[]>();
|
|
634
634
|
|
|
635
635
|
private constructor(
|
|
636
636
|
init: BlockInputInit,
|
|
@@ -854,8 +854,8 @@ export class BlockInputColumns extends AbstractBlockInput<ForkColumnsDA, fulu.Da
|
|
|
854
854
|
return this.state.versionedHashes;
|
|
855
855
|
}
|
|
856
856
|
|
|
857
|
-
getCustodyColumns(): fulu.
|
|
858
|
-
const columns: fulu.
|
|
857
|
+
getCustodyColumns(): fulu.DataColumnSidecar[] {
|
|
858
|
+
const columns: fulu.DataColumnSidecar[] = [];
|
|
859
859
|
for (const index of this.custodyColumns) {
|
|
860
860
|
const column = this.columnsCache.get(index);
|
|
861
861
|
if (column) {
|
|
@@ -876,8 +876,8 @@ export class BlockInputColumns extends AbstractBlockInput<ForkColumnsDA, fulu.Da
|
|
|
876
876
|
return columns;
|
|
877
877
|
}
|
|
878
878
|
|
|
879
|
-
getSampledColumns(): fulu.
|
|
880
|
-
const columns: fulu.
|
|
879
|
+
getSampledColumns(): fulu.DataColumnSidecar[] {
|
|
880
|
+
const columns: fulu.DataColumnSidecar[] = [];
|
|
881
881
|
for (const index of this.sampledColumns) {
|
|
882
882
|
const column = this.columnsCache.get(index);
|
|
883
883
|
if (column) {
|
|
@@ -891,7 +891,7 @@ export class BlockInputColumns extends AbstractBlockInput<ForkColumnsDA, fulu.Da
|
|
|
891
891
|
return [...this.columnsCache.values()];
|
|
892
892
|
}
|
|
893
893
|
|
|
894
|
-
getAllColumns(): fulu.
|
|
894
|
+
getAllColumns(): fulu.DataColumnSidecar[] {
|
|
895
895
|
return this.getAllColumnsWithSource().map(({columnSidecar}) => columnSidecar);
|
|
896
896
|
}
|
|
897
897
|
|
|
@@ -919,7 +919,7 @@ export class BlockInputColumns extends AbstractBlockInput<ForkColumnsDA, fulu.Da
|
|
|
919
919
|
return this.state.hasComputedAllData;
|
|
920
920
|
}
|
|
921
921
|
|
|
922
|
-
waitForComputedAllData(timeout: number, signal?: AbortSignal): Promise<fulu.
|
|
922
|
+
waitForComputedAllData(timeout: number, signal?: AbortSignal): Promise<fulu.DataColumnSidecar[]> {
|
|
923
923
|
if (!this.state.hasComputedAllData) {
|
|
924
924
|
return withTimeout(() => this.computedDataPromise.promise, timeout, signal);
|
|
925
925
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {ForkName} from "@lodestar/params";
|
|
2
|
-
import {ColumnIndex, RootHex, SignedBeaconBlock, Slot, deneb, fulu} from "@lodestar/types";
|
|
2
|
+
import {ColumnIndex, DataColumnSidecar, RootHex, SignedBeaconBlock, Slot, deneb, fulu} from "@lodestar/types";
|
|
3
3
|
import {VersionedHashes} from "../../../execution/index.js";
|
|
4
4
|
|
|
5
5
|
export enum DAType {
|
|
@@ -9,13 +9,14 @@ export enum DAType {
|
|
|
9
9
|
NoData = "no-data",
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export type DAData = null | deneb.BlobSidecars | fulu.
|
|
12
|
+
export type DAData = null | deneb.BlobSidecars | fulu.DataColumnSidecar[];
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Represents were input originated. Blocks and Data can come from different
|
|
16
16
|
* sources so each should be labelled individually.
|
|
17
17
|
*/
|
|
18
18
|
export enum BlockInputSource {
|
|
19
|
+
network_processor = "network_processor",
|
|
19
20
|
gossip = "gossip",
|
|
20
21
|
api = "api",
|
|
21
22
|
engine = "engine",
|
|
@@ -107,9 +108,9 @@ export type MissingColumnMeta = {
|
|
|
107
108
|
export interface IDataColumnsInput {
|
|
108
109
|
readonly slot: Slot;
|
|
109
110
|
readonly blockRootHex: string;
|
|
110
|
-
getCustodyColumns():
|
|
111
|
+
getCustodyColumns(): DataColumnSidecar[];
|
|
111
112
|
hasComputedAllData(): boolean;
|
|
112
|
-
waitForComputedAllData(timeout: number, signal?: AbortSignal): Promise<
|
|
113
|
+
waitForComputedAllData(timeout: number, signal?: AbortSignal): Promise<DataColumnSidecar[]>;
|
|
113
114
|
}
|
|
114
115
|
|
|
115
116
|
/**
|
|
@@ -3,25 +3,42 @@ import {routes} from "@lodestar/api";
|
|
|
3
3
|
import {
|
|
4
4
|
AncestorStatus,
|
|
5
5
|
EpochDifference,
|
|
6
|
+
ExecutionStatus,
|
|
6
7
|
ForkChoiceError,
|
|
7
8
|
ForkChoiceErrorCode,
|
|
8
9
|
NotReorgedReason,
|
|
9
10
|
getSafeExecutionBlockHash,
|
|
10
11
|
isGloasBlock,
|
|
11
12
|
} from "@lodestar/fork-choice";
|
|
12
|
-
import {ForkPostAltair, ForkPostElectra, ForkSeq, MAX_SEED_LOOKAHEAD, SLOTS_PER_EPOCH} from "@lodestar/params";
|
|
13
13
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
ForkPostAltair,
|
|
15
|
+
ForkPostElectra,
|
|
16
|
+
ForkPostGloas,
|
|
17
|
+
ForkSeq,
|
|
18
|
+
MAX_SEED_LOOKAHEAD,
|
|
19
|
+
SLOTS_PER_EPOCH,
|
|
20
|
+
} from "@lodestar/params";
|
|
21
|
+
import {
|
|
22
|
+
IBeaconStateView,
|
|
16
23
|
RootCache,
|
|
17
24
|
computeEpochAtSlot,
|
|
18
25
|
computeStartSlotAtEpoch,
|
|
19
26
|
computeTimeAtSlot,
|
|
20
|
-
isExecutionStateType,
|
|
21
27
|
isStartSlotOfEpoch,
|
|
22
|
-
|
|
28
|
+
isStatePostAltair,
|
|
29
|
+
isStatePostBellatrix,
|
|
23
30
|
} from "@lodestar/state-transition";
|
|
24
|
-
import {
|
|
31
|
+
import {
|
|
32
|
+
Attestation,
|
|
33
|
+
BeaconBlock,
|
|
34
|
+
SignedBeaconBlock,
|
|
35
|
+
altair,
|
|
36
|
+
capella,
|
|
37
|
+
electra,
|
|
38
|
+
isGloasBeaconBlock,
|
|
39
|
+
phase0,
|
|
40
|
+
ssz,
|
|
41
|
+
} from "@lodestar/types";
|
|
25
42
|
import {isErrorAborted, toRootHex} from "@lodestar/utils";
|
|
26
43
|
import {ZERO_HASH_HEX} from "../../constants/index.js";
|
|
27
44
|
import {callInNextEventLoop} from "../../util/eventLoop.js";
|
|
@@ -70,7 +87,7 @@ export async function importBlock(
|
|
|
70
87
|
fullyVerifiedBlock: FullyVerifiedBlock,
|
|
71
88
|
opts: ImportBlockOpts
|
|
72
89
|
): Promise<void> {
|
|
73
|
-
const {blockInput,
|
|
90
|
+
const {blockInput, postBlockState, parentBlockSlot, executionStatus, dataAvailabilityStatus, indexedAttestations} =
|
|
74
91
|
fullyVerifiedBlock;
|
|
75
92
|
const block = blockInput.getBlock();
|
|
76
93
|
const source = blockInput.getBlockSource();
|
|
@@ -82,7 +99,7 @@ export async function importBlock(
|
|
|
82
99
|
const blockEpoch = computeEpochAtSlot(blockSlot);
|
|
83
100
|
const prevFinalizedEpoch = this.forkChoice.getFinalizedCheckpoint().epoch;
|
|
84
101
|
const blockDelaySec =
|
|
85
|
-
fullyVerifiedBlock.seenTimestampSec - computeTimeAtSlot(this.config, blockSlot,
|
|
102
|
+
fullyVerifiedBlock.seenTimestampSec - computeTimeAtSlot(this.config, blockSlot, postBlockState.genesisTime);
|
|
86
103
|
const recvToValLatency = Date.now() / 1000 - (opts.seenTimestampSec ?? Date.now() / 1000);
|
|
87
104
|
const fork = this.config.getForkSeq(blockSlot);
|
|
88
105
|
|
|
@@ -105,13 +122,13 @@ export async function importBlock(
|
|
|
105
122
|
// 2. Import block to fork choice
|
|
106
123
|
|
|
107
124
|
// Should compute checkpoint balances before forkchoice.onBlock
|
|
108
|
-
this.checkpointBalancesCache.processState(blockRootHex,
|
|
125
|
+
this.checkpointBalancesCache.processState(blockRootHex, postBlockState);
|
|
109
126
|
const blockSummary = this.forkChoice.onBlock(
|
|
110
127
|
block.message,
|
|
111
|
-
|
|
128
|
+
postBlockState,
|
|
112
129
|
blockDelaySec,
|
|
113
130
|
currentSlot,
|
|
114
|
-
executionStatus,
|
|
131
|
+
fork >= ForkSeq.gloas ? ExecutionStatus.PayloadSeparated : executionStatus,
|
|
115
132
|
dataAvailabilityStatus
|
|
116
133
|
);
|
|
117
134
|
|
|
@@ -121,7 +138,41 @@ export async function importBlock(
|
|
|
121
138
|
// Post-Gloas: blockSummary.payloadStatus is always PENDING, so payloadPresent = false (block state only, no payload processing yet)
|
|
122
139
|
const payloadPresent = !isGloasBlock(blockSummary);
|
|
123
140
|
// processState manages both block state and payload state variants together for memory/disk management
|
|
124
|
-
this.regen.processBlockState(blockRootHex,
|
|
141
|
+
this.regen.processBlockState(blockRootHex, postBlockState);
|
|
142
|
+
|
|
143
|
+
// For Gloas blocks, create PayloadEnvelopeInput so it's available for later payload import
|
|
144
|
+
if (fork >= ForkSeq.gloas) {
|
|
145
|
+
const payloadInput = this.seenPayloadEnvelopeInputCache.add({
|
|
146
|
+
blockRootHex,
|
|
147
|
+
block: block as SignedBeaconBlock<ForkPostGloas>,
|
|
148
|
+
forkName: blockInput.forkName,
|
|
149
|
+
sampledColumns: this.custodyConfig.sampledColumns,
|
|
150
|
+
custodyColumns: this.custodyConfig.custodyColumns,
|
|
151
|
+
timeCreatedSec: fullyVerifiedBlock.seenTimestampSec,
|
|
152
|
+
});
|
|
153
|
+
this.logger.debug("Created PayloadEnvelopeInput for block", {
|
|
154
|
+
slot: blockSlot,
|
|
155
|
+
root: blockRootHex,
|
|
156
|
+
source: source.source,
|
|
157
|
+
...(opts.seenTimestampSec !== undefined ? {recvToImport: Date.now() / 1000 - opts.seenTimestampSec} : {}),
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
// Immediately attempt fetch of data columns from execution engine as the bid contains kzg commitments
|
|
161
|
+
// which is all the information we need so there is no reason to delay until execution payload arrives
|
|
162
|
+
// TODO GLOAS: If we want EL retries after this initial attempt, add an explicit retry policy here
|
|
163
|
+
// (for example later in the slot). Do not couple retries to incoming gossip columns.
|
|
164
|
+
this.getBlobsTracker.triggerGetBlobs(payloadInput, () => {
|
|
165
|
+
// TODO GLOAS: come up with a better mechanism to trigger processExecutionPayload after data becomes available,
|
|
166
|
+
// similar to how pre-gloas uses waitForBlockAndAllData with a cutoff timeout and incompleteBlockInput event
|
|
167
|
+
this.processExecutionPayload(payloadInput, {validSignature: true}).catch((e) => {
|
|
168
|
+
this.logger.debug(
|
|
169
|
+
"Error processing execution payload after getBlobs",
|
|
170
|
+
{slot: blockSlot, root: blockRootHex},
|
|
171
|
+
e as Error
|
|
172
|
+
);
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
}
|
|
125
176
|
|
|
126
177
|
this.metrics?.importBlock.bySource.inc({source: source.source});
|
|
127
178
|
this.logger.verbose("Added block to forkchoice and state cache", {slot: blockSlot, root: blockRootHex});
|
|
@@ -140,7 +191,7 @@ export async function importBlock(
|
|
|
140
191
|
(opts.importAttestations !== AttestationImportOpt.Skip && blockEpoch >= currentEpoch - FORK_CHOICE_ATT_EPOCH_LIMIT)
|
|
141
192
|
) {
|
|
142
193
|
const attestations = block.message.body.attestations;
|
|
143
|
-
const rootCache = new RootCache(
|
|
194
|
+
const rootCache = new RootCache(postBlockState);
|
|
144
195
|
const invalidAttestationErrorsByCode = new Map<string, {error: Error; count: number}>();
|
|
145
196
|
|
|
146
197
|
const addAttestation = fork >= ForkSeq.electra ? addAttestationPostElectra : addAttestationPreElectra;
|
|
@@ -154,7 +205,7 @@ export async function importBlock(
|
|
|
154
205
|
const attDataRoot = toRootHex(ssz.phase0.AttestationData.hashTreeRoot(indexedAttestation.data));
|
|
155
206
|
addAttestation.call(
|
|
156
207
|
this,
|
|
157
|
-
|
|
208
|
+
postBlockState,
|
|
158
209
|
target,
|
|
159
210
|
attDataRoot,
|
|
160
211
|
attestation as Attestation<ForkPostElectra>,
|
|
@@ -269,7 +320,7 @@ export async function importBlock(
|
|
|
269
320
|
|
|
270
321
|
if (newHead.blockRoot !== oldHead.blockRoot) {
|
|
271
322
|
// Set head state as strong reference
|
|
272
|
-
this.regen.updateHeadState(newHead,
|
|
323
|
+
this.regen.updateHeadState(newHead, postBlockState);
|
|
273
324
|
|
|
274
325
|
try {
|
|
275
326
|
this.emitter.emit(routes.events.EventType.head, {
|
|
@@ -339,11 +390,13 @@ export async function importBlock(
|
|
|
339
390
|
// we want to import block asap so do this in the next event loop
|
|
340
391
|
callInNextEventLoop(() => {
|
|
341
392
|
try {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
393
|
+
if (isStatePostAltair(postBlockState)) {
|
|
394
|
+
this.lightClientServer?.onImportBlockHead(
|
|
395
|
+
block.message as BeaconBlock<ForkPostAltair>,
|
|
396
|
+
postBlockState,
|
|
397
|
+
parentBlockSlot
|
|
398
|
+
);
|
|
399
|
+
}
|
|
347
400
|
} catch (e) {
|
|
348
401
|
this.logger.verbose("Error lightClientServer.onImportBlock", {slot: blockSlot}, e as Error);
|
|
349
402
|
}
|
|
@@ -362,11 +415,11 @@ export async function importBlock(
|
|
|
362
415
|
// and the block is weak and can potentially be reorged out.
|
|
363
416
|
let shouldOverrideFcu = false;
|
|
364
417
|
|
|
365
|
-
if (blockSlot >= currentSlot &&
|
|
418
|
+
if (blockSlot >= currentSlot && isStatePostBellatrix(postBlockState) && postBlockState.isExecutionStateType) {
|
|
366
419
|
let notOverrideFcuReason = NotReorgedReason.Unknown;
|
|
367
420
|
const proposalSlot = blockSlot + 1;
|
|
368
421
|
try {
|
|
369
|
-
const proposerIndex =
|
|
422
|
+
const proposerIndex = postBlockState.getBeaconProposer(proposalSlot);
|
|
370
423
|
const feeRecipient = this.beaconProposerCache.get(proposerIndex);
|
|
371
424
|
|
|
372
425
|
if (feeRecipient) {
|
|
@@ -446,20 +499,20 @@ export async function importBlock(
|
|
|
446
499
|
}
|
|
447
500
|
}
|
|
448
501
|
|
|
449
|
-
if (!isStateValidatorsNodesPopulated(
|
|
450
|
-
this.logger.verbose("After importBlock caching postState without SSZ cache", {slot:
|
|
502
|
+
if (!postBlockState.isStateValidatorsNodesPopulated()) {
|
|
503
|
+
this.logger.verbose("After importBlock caching postState without SSZ cache", {slot: postBlockState.slot});
|
|
451
504
|
}
|
|
452
505
|
|
|
453
506
|
// Cache shufflings when crossing an epoch boundary
|
|
454
507
|
const parentEpoch = computeEpochAtSlot(parentBlockSlot);
|
|
455
508
|
if (parentEpoch < blockEpoch) {
|
|
456
|
-
this.shufflingCache.processState(
|
|
509
|
+
this.shufflingCache.processState(postBlockState);
|
|
457
510
|
this.logger.verbose("Processed shuffling for next epoch", {parentEpoch, blockEpoch, slot: blockSlot});
|
|
458
511
|
}
|
|
459
512
|
|
|
460
513
|
if (blockSlot % SLOTS_PER_EPOCH === 0) {
|
|
461
514
|
// Cache state to preserve epoch transition work
|
|
462
|
-
const checkpointState =
|
|
515
|
+
const checkpointState = postBlockState;
|
|
463
516
|
const cp = getCheckpointFromState(checkpointState);
|
|
464
517
|
this.regen.addCheckpointState(cp, checkpointState, payloadPresent);
|
|
465
518
|
// consumers should not mutate state ever
|
|
@@ -468,7 +521,7 @@ export async function importBlock(
|
|
|
468
521
|
// Note: in-lined code from previos handler of ChainEvent.checkpoint
|
|
469
522
|
this.logger.verbose("Checkpoint processed", toCheckpointHexPayload(cp, payloadPresent));
|
|
470
523
|
|
|
471
|
-
const activeValidatorsCount = checkpointState.
|
|
524
|
+
const activeValidatorsCount = checkpointState.activeValidatorCount;
|
|
472
525
|
this.metrics?.currentActiveValidators.set(activeValidatorsCount);
|
|
473
526
|
this.metrics?.currentValidators.set({status: "active"}, activeValidatorsCount);
|
|
474
527
|
|
|
@@ -549,11 +602,11 @@ export async function importBlock(
|
|
|
549
602
|
this.metrics?.parentBlockDistance.observe(blockSlot - parentBlockSlot);
|
|
550
603
|
this.metrics?.proposerBalanceDeltaAny.observe(fullyVerifiedBlock.proposerBalanceDelta);
|
|
551
604
|
this.validatorMonitor?.registerImportedBlock(block.message, fullyVerifiedBlock);
|
|
552
|
-
if (
|
|
605
|
+
if (isStatePostAltair(fullyVerifiedBlock.postBlockState)) {
|
|
553
606
|
this.validatorMonitor?.registerSyncAggregateInBlock(
|
|
554
607
|
blockEpoch,
|
|
555
608
|
(block as altair.SignedBeaconBlock).message.body.syncAggregate,
|
|
556
|
-
fullyVerifiedBlock.
|
|
609
|
+
fullyVerifiedBlock.postBlockState.currentSyncCommitteeIndexed.validatorIndices
|
|
557
610
|
);
|
|
558
611
|
}
|
|
559
612
|
|
|
@@ -595,7 +648,7 @@ export async function importBlock(
|
|
|
595
648
|
export function addAttestationPreElectra(
|
|
596
649
|
this: BeaconChain,
|
|
597
650
|
// added to have the same signature as addAttestationPostElectra
|
|
598
|
-
_:
|
|
651
|
+
_: IBeaconStateView,
|
|
599
652
|
target: phase0.Checkpoint,
|
|
600
653
|
attDataRoot: string,
|
|
601
654
|
attestation: Attestation,
|
|
@@ -612,7 +665,7 @@ export function addAttestationPreElectra(
|
|
|
612
665
|
|
|
613
666
|
export function addAttestationPostElectra(
|
|
614
667
|
this: BeaconChain,
|
|
615
|
-
|
|
668
|
+
state: IBeaconStateView,
|
|
616
669
|
target: phase0.Checkpoint,
|
|
617
670
|
attDataRoot: string,
|
|
618
671
|
attestation: Attestation<ForkPostElectra>,
|
|
@@ -630,7 +683,7 @@ export function addAttestationPostElectra(
|
|
|
630
683
|
} else {
|
|
631
684
|
const attSlot = attestation.data.slot;
|
|
632
685
|
const attEpoch = computeEpochAtSlot(attSlot);
|
|
633
|
-
const decisionRoot =
|
|
686
|
+
const decisionRoot = state.getShufflingDecisionRoot(attEpoch);
|
|
634
687
|
const committees = this.shufflingCache.getBeaconCommittees(attEpoch, decisionRoot, attSlot, committeeIndices);
|
|
635
688
|
const aggregationBools = attestation.aggregationBits.toBoolArray();
|
|
636
689
|
let offset = 0;
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import {routes} from "@lodestar/api";
|
|
2
|
+
import {ExecutionStatus, PayloadExecutionStatus} from "@lodestar/fork-choice";
|
|
3
|
+
import {SLOTS_PER_EPOCH} from "@lodestar/params";
|
|
4
|
+
import {getExecutionPayloadEnvelopeSignatureSet, isStatePostGloas} from "@lodestar/state-transition";
|
|
5
|
+
import {byteArrayEquals, fromHex, toRootHex} from "@lodestar/utils";
|
|
6
|
+
import {ExecutionPayloadStatus} from "../../execution/index.js";
|
|
7
|
+
import {isQueueErrorAborted} from "../../util/queue/index.js";
|
|
8
|
+
import {BeaconChain} from "../chain.js";
|
|
9
|
+
import {RegenCaller} from "../regen/interface.js";
|
|
10
|
+
import {PayloadEnvelopeInput} from "../seenCache/seenPayloadEnvelopeInput.js";
|
|
11
|
+
import {ImportPayloadOpts} from "./types.js";
|
|
12
|
+
|
|
13
|
+
const EVENTSTREAM_EMIT_RECENT_EXECUTION_PAYLOAD_SLOTS = 64;
|
|
14
|
+
|
|
15
|
+
export enum PayloadErrorCode {
|
|
16
|
+
EXECUTION_ENGINE_INVALID = "PAYLOAD_ERROR_EXECUTION_ENGINE_INVALID",
|
|
17
|
+
EXECUTION_ENGINE_ERROR = "PAYLOAD_ERROR_EXECUTION_ENGINE_ERROR",
|
|
18
|
+
BLOCK_NOT_IN_FORK_CHOICE = "PAYLOAD_ERROR_BLOCK_NOT_IN_FORK_CHOICE",
|
|
19
|
+
STATE_TRANSITION_ERROR = "PAYLOAD_ERROR_STATE_TRANSITION_ERROR",
|
|
20
|
+
INVALID_SIGNATURE = "PAYLOAD_ERROR_INVALID_SIGNATURE",
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type PayloadErrorType =
|
|
24
|
+
| {
|
|
25
|
+
code: PayloadErrorCode.EXECUTION_ENGINE_INVALID;
|
|
26
|
+
execStatus: ExecutionPayloadStatus;
|
|
27
|
+
errorMessage: string;
|
|
28
|
+
}
|
|
29
|
+
| {
|
|
30
|
+
code: PayloadErrorCode.EXECUTION_ENGINE_ERROR;
|
|
31
|
+
execStatus: ExecutionPayloadStatus;
|
|
32
|
+
errorMessage: string;
|
|
33
|
+
}
|
|
34
|
+
| {
|
|
35
|
+
code: PayloadErrorCode.BLOCK_NOT_IN_FORK_CHOICE;
|
|
36
|
+
blockRootHex: string;
|
|
37
|
+
}
|
|
38
|
+
| {
|
|
39
|
+
code: PayloadErrorCode.STATE_TRANSITION_ERROR;
|
|
40
|
+
message: string;
|
|
41
|
+
}
|
|
42
|
+
| {
|
|
43
|
+
code: PayloadErrorCode.INVALID_SIGNATURE;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export class PayloadError extends Error {
|
|
47
|
+
type: PayloadErrorType;
|
|
48
|
+
|
|
49
|
+
constructor(type: PayloadErrorType, message?: string) {
|
|
50
|
+
super(message ?? type.code);
|
|
51
|
+
this.type = type;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function toForkChoiceExecutionStatus(status: ExecutionPayloadStatus): PayloadExecutionStatus {
|
|
56
|
+
switch (status) {
|
|
57
|
+
case ExecutionPayloadStatus.VALID:
|
|
58
|
+
return ExecutionStatus.Valid;
|
|
59
|
+
// TODO GLOAS: Handle optimistic import for payload
|
|
60
|
+
case ExecutionPayloadStatus.SYNCING:
|
|
61
|
+
case ExecutionPayloadStatus.ACCEPTED:
|
|
62
|
+
return ExecutionStatus.Syncing;
|
|
63
|
+
default:
|
|
64
|
+
throw new Error(`Unexpected execution payload status for fork choice: ${status}`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Import an execution payload envelope after all data is available.
|
|
70
|
+
*
|
|
71
|
+
* This function:
|
|
72
|
+
* 1. Emits `execution_payload_available` if payload is for current slot
|
|
73
|
+
* 2. Gets the ProtoBlock from fork choice
|
|
74
|
+
* 3. Applies write-queue backpressure (waitForSpace) early, before verification
|
|
75
|
+
* 4. Regenerates the block state
|
|
76
|
+
* 5. Runs EL verification (notifyNewPayload) in parallel with signature verification and processExecutionPayloadEnvelope
|
|
77
|
+
* 6. Persists verified payload envelope to hot DB
|
|
78
|
+
* 7. Updates fork choice
|
|
79
|
+
* 8. Caches the post-execution payload state
|
|
80
|
+
* 9. Records metrics for column sources
|
|
81
|
+
* 10. Emits `execution_payload` for recent enough payloads after successful import
|
|
82
|
+
*
|
|
83
|
+
*/
|
|
84
|
+
export async function importExecutionPayload(
|
|
85
|
+
this: BeaconChain,
|
|
86
|
+
payloadInput: PayloadEnvelopeInput,
|
|
87
|
+
opts: ImportPayloadOpts = {}
|
|
88
|
+
): Promise<void> {
|
|
89
|
+
const signedEnvelope = payloadInput.getPayloadEnvelope();
|
|
90
|
+
const envelope = signedEnvelope.message;
|
|
91
|
+
const blockRootHex = payloadInput.blockRootHex;
|
|
92
|
+
const blockHashHex = payloadInput.getBlockHashHex();
|
|
93
|
+
const fork = this.config.getForkName(envelope.slot);
|
|
94
|
+
|
|
95
|
+
// 1. Emit `execution_payload_available` event at the start of import. At this point the payload input
|
|
96
|
+
// is already complete, so the payload and required data are available for payload attestation.
|
|
97
|
+
// This event is only about availability, not validity of the execution payload, hence we can emit
|
|
98
|
+
// it before getting a response from the execution client on whether the payload is valid or not.
|
|
99
|
+
if (this.clock.currentSlot - envelope.slot < EVENTSTREAM_EMIT_RECENT_EXECUTION_PAYLOAD_SLOTS) {
|
|
100
|
+
this.emitter.emit(routes.events.EventType.executionPayloadAvailable, {
|
|
101
|
+
slot: envelope.slot,
|
|
102
|
+
blockRoot: blockRootHex,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// 2. Get ProtoBlock for parent root lookup
|
|
107
|
+
const protoBlock = this.forkChoice.getBlockHexDefaultStatus(blockRootHex);
|
|
108
|
+
if (!protoBlock) {
|
|
109
|
+
throw new PayloadError({
|
|
110
|
+
code: PayloadErrorCode.BLOCK_NOT_IN_FORK_CHOICE,
|
|
111
|
+
blockRootHex,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// 3. Apply backpressure from the write queue early, before doing verification work.
|
|
116
|
+
// The actual DB write is deferred until after verification succeeds.
|
|
117
|
+
await this.unfinalizedPayloadEnvelopeWrites.waitForSpace();
|
|
118
|
+
|
|
119
|
+
// 4. Get pre-state for processExecutionPayloadEnvelope
|
|
120
|
+
// We need the block state (post-block, pre-payload) to process the envelope
|
|
121
|
+
const blockState = await this.regen.getBlockSlotState(
|
|
122
|
+
protoBlock,
|
|
123
|
+
protoBlock.slot,
|
|
124
|
+
{dontTransferCache: true},
|
|
125
|
+
RegenCaller.processBlock
|
|
126
|
+
);
|
|
127
|
+
if (!isStatePostGloas(blockState)) {
|
|
128
|
+
throw new PayloadError({
|
|
129
|
+
code: PayloadErrorCode.STATE_TRANSITION_ERROR,
|
|
130
|
+
message: `Expected gloas+ block state for payload import, got fork=${blockState.forkName}`,
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// 5. Run verification steps in parallel
|
|
135
|
+
// Note: No data availability check needed here - importExecutionPayload is only
|
|
136
|
+
// called when payloadInput.isComplete() is true, so all data is already available.
|
|
137
|
+
const [execResult, signatureValid, postPayloadResult] = await Promise.all([
|
|
138
|
+
this.executionEngine.notifyNewPayload(
|
|
139
|
+
fork,
|
|
140
|
+
envelope.payload,
|
|
141
|
+
payloadInput.getVersionedHashes(),
|
|
142
|
+
fromHex(protoBlock.parentRoot),
|
|
143
|
+
envelope.executionRequests
|
|
144
|
+
),
|
|
145
|
+
|
|
146
|
+
opts.validSignature === true
|
|
147
|
+
? Promise.resolve(true)
|
|
148
|
+
: (async () => {
|
|
149
|
+
const signatureSet = getExecutionPayloadEnvelopeSignatureSet(
|
|
150
|
+
this.config,
|
|
151
|
+
this.pubkeyCache,
|
|
152
|
+
blockState,
|
|
153
|
+
signedEnvelope,
|
|
154
|
+
payloadInput.proposerIndex
|
|
155
|
+
);
|
|
156
|
+
return this.bls.verifySignatureSets([signatureSet]);
|
|
157
|
+
})(),
|
|
158
|
+
|
|
159
|
+
// Signature verified separately above.
|
|
160
|
+
// State root check is done separately below with better error typing (matching block pipeline pattern).
|
|
161
|
+
(async () => {
|
|
162
|
+
try {
|
|
163
|
+
return {
|
|
164
|
+
postPayloadState: blockState.processExecutionPayloadEnvelope(signedEnvelope, {
|
|
165
|
+
verifySignature: false,
|
|
166
|
+
verifyStateRoot: false,
|
|
167
|
+
}),
|
|
168
|
+
};
|
|
169
|
+
} catch (e) {
|
|
170
|
+
throw new PayloadError(
|
|
171
|
+
{
|
|
172
|
+
code: PayloadErrorCode.STATE_TRANSITION_ERROR,
|
|
173
|
+
message: (e as Error).message,
|
|
174
|
+
},
|
|
175
|
+
`State transition error: ${(e as Error).message}`
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
})(),
|
|
179
|
+
]);
|
|
180
|
+
|
|
181
|
+
// 5a. Check signature verification result
|
|
182
|
+
if (!signatureValid) {
|
|
183
|
+
throw new PayloadError({code: PayloadErrorCode.INVALID_SIGNATURE});
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// 5b. Handle EL response
|
|
187
|
+
switch (execResult.status) {
|
|
188
|
+
case ExecutionPayloadStatus.VALID:
|
|
189
|
+
break;
|
|
190
|
+
|
|
191
|
+
case ExecutionPayloadStatus.INVALID:
|
|
192
|
+
throw new PayloadError({
|
|
193
|
+
code: PayloadErrorCode.EXECUTION_ENGINE_INVALID,
|
|
194
|
+
execStatus: execResult.status,
|
|
195
|
+
errorMessage: execResult.validationError ?? "",
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
case ExecutionPayloadStatus.ACCEPTED:
|
|
199
|
+
case ExecutionPayloadStatus.SYNCING:
|
|
200
|
+
break;
|
|
201
|
+
|
|
202
|
+
case ExecutionPayloadStatus.INVALID_BLOCK_HASH:
|
|
203
|
+
case ExecutionPayloadStatus.ELERROR:
|
|
204
|
+
case ExecutionPayloadStatus.UNAVAILABLE:
|
|
205
|
+
throw new PayloadError({
|
|
206
|
+
code: PayloadErrorCode.EXECUTION_ENGINE_ERROR,
|
|
207
|
+
execStatus: execResult.status,
|
|
208
|
+
errorMessage: execResult.validationError ?? "",
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// 5c. Verify envelope state root matches post-state
|
|
213
|
+
const postPayloadState = postPayloadResult.postPayloadState;
|
|
214
|
+
const postPayloadStateRoot = postPayloadState.hashTreeRoot();
|
|
215
|
+
if (!byteArrayEquals(envelope.stateRoot, postPayloadStateRoot)) {
|
|
216
|
+
throw new PayloadError({
|
|
217
|
+
code: PayloadErrorCode.STATE_TRANSITION_ERROR,
|
|
218
|
+
message: `Envelope state root mismatch expected=${toRootHex(envelope.stateRoot)} actual=${toRootHex(postPayloadStateRoot)}`,
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// 6. Persist payload envelope to hot DB (performed asynchronously to avoid blocking)
|
|
223
|
+
this.unfinalizedPayloadEnvelopeWrites.push(payloadInput).catch((e) => {
|
|
224
|
+
if (!isQueueErrorAborted(e)) {
|
|
225
|
+
this.logger.error(
|
|
226
|
+
"Error pushing payload envelope to unfinalized write queue",
|
|
227
|
+
{slot: envelope.slot, blockRoot: blockRootHex},
|
|
228
|
+
e as Error
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
// 7. Update fork choice
|
|
234
|
+
this.forkChoice.onExecutionPayload(
|
|
235
|
+
blockRootHex,
|
|
236
|
+
blockHashHex,
|
|
237
|
+
envelope.payload.blockNumber,
|
|
238
|
+
toRootHex(postPayloadStateRoot),
|
|
239
|
+
toForkChoiceExecutionStatus(execResult.status)
|
|
240
|
+
);
|
|
241
|
+
|
|
242
|
+
// 8. Cache payload state
|
|
243
|
+
this.regen.processPayloadState(postPayloadState);
|
|
244
|
+
if (postPayloadState.slot % SLOTS_PER_EPOCH === 0) {
|
|
245
|
+
const {checkpoint} = postPayloadState.computeAnchorCheckpoint();
|
|
246
|
+
this.regen.addCheckpointState(checkpoint, postPayloadState, true);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// 9. Record metrics for payload envelope and column sources
|
|
250
|
+
this.metrics?.importPayload.bySource.inc({source: payloadInput.getPayloadEnvelopeSource().source});
|
|
251
|
+
for (const {source} of payloadInput.getSampledColumnsWithSource()) {
|
|
252
|
+
this.metrics?.importPayload.columnsBySource.inc({source});
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
const stateRootHex = toRootHex(envelope.stateRoot);
|
|
256
|
+
|
|
257
|
+
// 10. Emit event after payload is fully verified and imported to fork choice, only for recent enough payloads
|
|
258
|
+
if (this.clock.currentSlot - envelope.slot < EVENTSTREAM_EMIT_RECENT_EXECUTION_PAYLOAD_SLOTS) {
|
|
259
|
+
this.emitter.emit(routes.events.EventType.executionPayload, {
|
|
260
|
+
slot: envelope.slot,
|
|
261
|
+
builderIndex: envelope.builderIndex,
|
|
262
|
+
blockHash: blockHashHex,
|
|
263
|
+
blockRoot: blockRootHex,
|
|
264
|
+
stateRoot: stateRootHex,
|
|
265
|
+
// TODO GLOAS: revisit once we support optimistic import
|
|
266
|
+
executionOptimistic: false,
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
this.logger.verbose("Execution payload imported", {
|
|
271
|
+
slot: envelope.slot,
|
|
272
|
+
builderIndex: envelope.builderIndex,
|
|
273
|
+
blockRoot: blockRootHex,
|
|
274
|
+
blockHash: blockHashHex,
|
|
275
|
+
stateRoot: stateRootHex,
|
|
276
|
+
});
|
|
277
|
+
}
|
|
@@ -88,7 +88,8 @@ export async function processBlocks(
|
|
|
88
88
|
const fullyVerifiedBlocks = relevantBlocks.map(
|
|
89
89
|
(block, i): FullyVerifiedBlock => ({
|
|
90
90
|
blockInput: block,
|
|
91
|
-
|
|
91
|
+
postBlockState: postStates[i],
|
|
92
|
+
postPayloadState: null,
|
|
92
93
|
parentBlockSlot: parentSlots[i],
|
|
93
94
|
executionStatus: executionStatuses[i],
|
|
94
95
|
// start supporting optimistic syncing/processing
|
|
@@ -126,7 +127,7 @@ export async function processBlocks(
|
|
|
126
127
|
const {state} = err.type;
|
|
127
128
|
const forkTypes = this.config.getForkTypes(blockSlot);
|
|
128
129
|
this.persistInvalidSszValue(forkTypes.SignedBeaconBlock, signedBlock, `${blockSlot}_invalid_signature`);
|
|
129
|
-
this.
|
|
130
|
+
this.persistInvalidSszBytes("BeaconState", state.serialize(), `${state.slot}_invalid_signature`);
|
|
130
131
|
} else if (err.type.code === BlockErrorCode.INVALID_STATE_ROOT) {
|
|
131
132
|
const {signedBlock} = err;
|
|
132
133
|
const blockSlot = signedBlock.message.slot;
|