@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
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import {routes} from "@lodestar/api";
|
|
2
2
|
import {BeaconConfig, ChainForkConfig} from "@lodestar/config";
|
|
3
|
+
import {PayloadStatus} from "@lodestar/fork-choice";
|
|
3
4
|
import {
|
|
4
5
|
ForkName,
|
|
5
6
|
ForkPostDeneb,
|
|
6
7
|
ForkPostElectra,
|
|
8
|
+
ForkPostGloas,
|
|
7
9
|
ForkPreElectra,
|
|
8
10
|
ForkSeq,
|
|
9
11
|
NUMBER_OF_COLUMNS,
|
|
10
12
|
isForkPostElectra,
|
|
13
|
+
isForkPostGloas,
|
|
11
14
|
} from "@lodestar/params";
|
|
12
15
|
import {computeTimeAtSlot} from "@lodestar/state-transition";
|
|
13
16
|
import {
|
|
@@ -19,6 +22,8 @@ import {
|
|
|
19
22
|
UintNum64,
|
|
20
23
|
deneb,
|
|
21
24
|
fulu,
|
|
25
|
+
gloas,
|
|
26
|
+
isGloasDataColumnSidecar,
|
|
22
27
|
ssz,
|
|
23
28
|
sszTypesFor,
|
|
24
29
|
} from "@lodestar/types";
|
|
@@ -30,6 +35,7 @@ import {
|
|
|
30
35
|
IBlockInput,
|
|
31
36
|
isBlockInputColumns,
|
|
32
37
|
} from "../../chain/blocks/blockInput/index.js";
|
|
38
|
+
import {PayloadEnvelopeInput, PayloadEnvelopeInputSource} from "../../chain/blocks/payloadEnvelopeInput/index.js";
|
|
33
39
|
import {BlobSidecarValidation} from "../../chain/blocks/types.js";
|
|
34
40
|
import {ChainEvent} from "../../chain/emitter.js";
|
|
35
41
|
import {
|
|
@@ -42,13 +48,18 @@ import {
|
|
|
42
48
|
BlockGossipError,
|
|
43
49
|
DataColumnSidecarErrorCode,
|
|
44
50
|
DataColumnSidecarGossipError,
|
|
51
|
+
ExecutionPayloadEnvelopeError,
|
|
52
|
+
ExecutionPayloadEnvelopeErrorCode,
|
|
45
53
|
GossipAction,
|
|
46
54
|
GossipActionError,
|
|
47
55
|
SyncCommitteeError,
|
|
48
56
|
} from "../../chain/errors/index.js";
|
|
49
57
|
import {IBeaconChain} from "../../chain/interface.js";
|
|
50
58
|
import {validateGossipBlobSidecar} from "../../chain/validation/blobSidecar.js";
|
|
51
|
-
import {
|
|
59
|
+
import {
|
|
60
|
+
validateGossipFuluDataColumnSidecar,
|
|
61
|
+
validateGossipGloasDataColumnSidecar,
|
|
62
|
+
} from "../../chain/validation/dataColumnSidecar.js";
|
|
52
63
|
import {validateGossipExecutionPayloadBid} from "../../chain/validation/executionPayloadBid.js";
|
|
53
64
|
import {validateGossipExecutionPayloadEnvelope} from "../../chain/validation/executionPayloadEnvelope.js";
|
|
54
65
|
import {
|
|
@@ -71,7 +82,7 @@ import {validateGossipPayloadAttestationMessage} from "../../chain/validation/pa
|
|
|
71
82
|
import {OpSource} from "../../chain/validatorMonitor.js";
|
|
72
83
|
import {Metrics} from "../../metrics/index.js";
|
|
73
84
|
import {kzgCommitmentToVersionedHash} from "../../util/blobs.js";
|
|
74
|
-
import {getBlobKzgCommitments} from "../../util/dataColumns.js";
|
|
85
|
+
import {getBlobKzgCommitments, getDataColumnSidecarSlot} from "../../util/dataColumns.js";
|
|
75
86
|
import {INetworkCore} from "../core/index.js";
|
|
76
87
|
import {NetworkEventBus} from "../events.js";
|
|
77
88
|
import {
|
|
@@ -158,16 +169,19 @@ function getSequentialHandlers(modules: ValidatorFnsModules, options: GossipHand
|
|
|
158
169
|
|
|
159
170
|
logger.debug("Received gossip block", {...logCtx});
|
|
160
171
|
|
|
161
|
-
|
|
172
|
+
// optimistically add gossip block to the seen cache
|
|
173
|
+
// if validation fails, we will NOT forward this gossip block to peers
|
|
174
|
+
// - if PARENT_UNKNOWN error, blockInput will then be queued inside BlockInputSync. If the gossip block is really invalid, it will be pruned there
|
|
175
|
+
// - if other validator errors, blockInput will stay in the seen cache and will be pruned on finalization
|
|
176
|
+
const blockInput = chain.seenBlockInputCache.getByBlock({
|
|
177
|
+
block: signedBlock,
|
|
178
|
+
blockRootHex,
|
|
179
|
+
source: BlockInputSource.gossip,
|
|
180
|
+
seenTimestampSec,
|
|
181
|
+
peerIdStr,
|
|
182
|
+
});
|
|
162
183
|
try {
|
|
163
184
|
await validateGossipBlock(config, chain, signedBlock, fork);
|
|
164
|
-
blockInput = chain.seenBlockInputCache.getByBlock({
|
|
165
|
-
block: signedBlock,
|
|
166
|
-
blockRootHex,
|
|
167
|
-
source: BlockInputSource.gossip,
|
|
168
|
-
seenTimestampSec,
|
|
169
|
-
peerIdStr,
|
|
170
|
-
});
|
|
171
185
|
const blockInputMeta = blockInput.getLogMeta();
|
|
172
186
|
|
|
173
187
|
const recvToValidation = Date.now() / 1000 - seenTimestampSec;
|
|
@@ -183,9 +197,9 @@ function getSequentialHandlers(modules: ValidatorFnsModules, options: GossipHand
|
|
|
183
197
|
return blockInput;
|
|
184
198
|
} catch (e) {
|
|
185
199
|
if (e instanceof BlockGossipError) {
|
|
200
|
+
logger.debug("Gossip block has error", {slot, root: blockShortHex, code: e.type.code});
|
|
186
201
|
if (e.type.code === BlockErrorCode.PARENT_UNKNOWN && blockInput) {
|
|
187
|
-
|
|
188
|
-
chain.emitter.emit(ChainEvent.unknownParent, {
|
|
202
|
+
chain.emitter.emit(ChainEvent.blockUnknownParent, {
|
|
189
203
|
blockInput,
|
|
190
204
|
peer: peerIdStr,
|
|
191
205
|
source: BlockInputSource.gossip,
|
|
@@ -321,7 +335,7 @@ function getSequentialHandlers(modules: ValidatorFnsModules, options: GossipHand
|
|
|
321
335
|
const blockInput = chain.seenBlockInputCache.get(blockRootHex);
|
|
322
336
|
if (blockInput && isBlockInputColumns(blockInput) && blockInput.hasColumn(dataColumnSidecar.index)) {
|
|
323
337
|
metrics?.peerDas.dataColumnSidecarProcessingSkip.inc();
|
|
324
|
-
logger.debug("Already have column sidecar, skipping processing", {
|
|
338
|
+
logger.debug("Already have column sidecar in BlockInput, skipping processing", {
|
|
325
339
|
...blockInput.getLogMeta(),
|
|
326
340
|
index: dataColumnSidecar.index,
|
|
327
341
|
});
|
|
@@ -336,10 +350,11 @@ function getSequentialHandlers(modules: ValidatorFnsModules, options: GossipHand
|
|
|
336
350
|
const verificationTimer = metrics?.peerDas.dataColumnSidecarGossipVerificationTime.startTimer();
|
|
337
351
|
|
|
338
352
|
const delaySec = chain.clock.secFromSlot(slot, seenTimestampSec);
|
|
353
|
+
const secFromSlot = chain.clock.secFromSlot(slot);
|
|
339
354
|
const recvToValLatency = Date.now() / 1000 - seenTimestampSec;
|
|
340
355
|
|
|
341
356
|
try {
|
|
342
|
-
await
|
|
357
|
+
await validateGossipFuluDataColumnSidecar(chain, dataColumnSidecar, gossipSubnet, metrics);
|
|
343
358
|
const blockInput = chain.seenBlockInputCache.getByColumn({
|
|
344
359
|
blockRootHex,
|
|
345
360
|
columnSidecar: dataColumnSidecar,
|
|
@@ -369,6 +384,7 @@ function getSequentialHandlers(modules: ValidatorFnsModules, options: GossipHand
|
|
|
369
384
|
currentSlot: chain.clock.currentSlot,
|
|
370
385
|
peerId: peerIdStr,
|
|
371
386
|
delaySec,
|
|
387
|
+
secFromSlot,
|
|
372
388
|
gossipSubnet,
|
|
373
389
|
columnIndex: dataColumnSidecar.index,
|
|
374
390
|
recvToValLatency,
|
|
@@ -398,6 +414,131 @@ function getSequentialHandlers(modules: ValidatorFnsModules, options: GossipHand
|
|
|
398
414
|
}
|
|
399
415
|
}
|
|
400
416
|
|
|
417
|
+
async function validatePayloadDataColumn(
|
|
418
|
+
dataColumnSidecar: gloas.DataColumnSidecar,
|
|
419
|
+
gossipSubnet: SubnetID,
|
|
420
|
+
peerIdStr: string,
|
|
421
|
+
seenTimestampSec: number
|
|
422
|
+
): Promise<PayloadEnvelopeInput> {
|
|
423
|
+
metrics?.peerDas.dataColumnSidecarProcessingRequests.inc();
|
|
424
|
+
const slot = dataColumnSidecar.slot;
|
|
425
|
+
const blockRootHex = toRootHex(dataColumnSidecar.beaconBlockRoot);
|
|
426
|
+
|
|
427
|
+
// check to see if payload has already been processed and PayloadEnvelopeInput has been deleted (column received via reqresp or other means)
|
|
428
|
+
if (chain.forkChoice.getBlockHex(blockRootHex, PayloadStatus.FULL) !== null) {
|
|
429
|
+
metrics?.peerDas.dataColumnSidecarProcessingSkip.inc();
|
|
430
|
+
logger.debug("Already processed payload for column sidecar, skipping processing", {
|
|
431
|
+
slot,
|
|
432
|
+
blockRoot: blockRootHex,
|
|
433
|
+
index: dataColumnSidecar.index,
|
|
434
|
+
});
|
|
435
|
+
throw new DataColumnSidecarGossipError(GossipAction.IGNORE, {
|
|
436
|
+
code: DataColumnSidecarErrorCode.ALREADY_KNOWN,
|
|
437
|
+
columnIndex: dataColumnSidecar.index,
|
|
438
|
+
slot,
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
const payloadInput = chain.seenPayloadEnvelopeInputCache.get(blockRootHex);
|
|
443
|
+
|
|
444
|
+
if (!payloadInput) {
|
|
445
|
+
// This should not happen for gossip because the network processor queues `data_column_sidecar`
|
|
446
|
+
// until block import creates the corresponding PayloadEnvelopeInput.
|
|
447
|
+
throw new DataColumnSidecarGossipError(GossipAction.IGNORE, {
|
|
448
|
+
code: DataColumnSidecarErrorCode.PAYLOAD_ENVELOPE_INPUT_MISSING,
|
|
449
|
+
slot,
|
|
450
|
+
blockRoot: blockRootHex,
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
// [IGNORE] The sidecar is the first sidecar for the tuple
|
|
455
|
+
// (sidecar.beacon_block_root, sidecar.index) with valid kzg proof.
|
|
456
|
+
if (payloadInput.hasColumn(dataColumnSidecar.index)) {
|
|
457
|
+
metrics?.peerDas.dataColumnSidecarProcessingSkip.inc();
|
|
458
|
+
logger.debug("Already have column sidecar in PayloadEnvelopeInput, skipping processing", {
|
|
459
|
+
...payloadInput.getLogMeta(),
|
|
460
|
+
index: dataColumnSidecar.index,
|
|
461
|
+
});
|
|
462
|
+
throw new DataColumnSidecarGossipError(GossipAction.IGNORE, {
|
|
463
|
+
code: DataColumnSidecarErrorCode.ALREADY_KNOWN,
|
|
464
|
+
columnIndex: dataColumnSidecar.index,
|
|
465
|
+
slot,
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
const verificationTimer = metrics?.peerDas.dataColumnSidecarGossipVerificationTime.startTimer();
|
|
470
|
+
|
|
471
|
+
const delaySec = chain.clock.secFromSlot(slot, seenTimestampSec);
|
|
472
|
+
const secFromSlot = chain.clock.secFromSlot(slot);
|
|
473
|
+
const recvToValLatency = Date.now() / 1000 - seenTimestampSec;
|
|
474
|
+
|
|
475
|
+
try {
|
|
476
|
+
await validateGossipGloasDataColumnSidecar(chain, payloadInput, dataColumnSidecar, gossipSubnet, metrics);
|
|
477
|
+
|
|
478
|
+
const addedColumn = payloadInput.addColumn({
|
|
479
|
+
columnSidecar: dataColumnSidecar,
|
|
480
|
+
source: PayloadEnvelopeInputSource.gossip,
|
|
481
|
+
seenTimestampSec,
|
|
482
|
+
peerIdStr,
|
|
483
|
+
});
|
|
484
|
+
|
|
485
|
+
if (!addedColumn) {
|
|
486
|
+
metrics?.peerDas.dataColumnSidecarProcessingSkip.inc();
|
|
487
|
+
logger.debug("Already have column sidecar in PayloadEnvelopeInput, skipping processing", {
|
|
488
|
+
...payloadInput.getLogMeta(),
|
|
489
|
+
index: dataColumnSidecar.index,
|
|
490
|
+
});
|
|
491
|
+
throw new DataColumnSidecarGossipError(GossipAction.IGNORE, {
|
|
492
|
+
code: DataColumnSidecarErrorCode.ALREADY_KNOWN,
|
|
493
|
+
columnIndex: dataColumnSidecar.index,
|
|
494
|
+
slot,
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
const recvToValidation = Date.now() / 1000 - seenTimestampSec;
|
|
499
|
+
const validationTime = recvToValidation - recvToValLatency;
|
|
500
|
+
|
|
501
|
+
metrics?.peerDas.dataColumnSidecarProcessingSuccesses.inc();
|
|
502
|
+
metrics?.gossipBlob.recvToValidation.observe(recvToValidation);
|
|
503
|
+
metrics?.gossipBlob.validationTime.observe(validationTime);
|
|
504
|
+
|
|
505
|
+
if (chain.emitter.listenerCount(routes.events.EventType.dataColumnSidecar)) {
|
|
506
|
+
chain.emitter.emit(routes.events.EventType.dataColumnSidecar, {
|
|
507
|
+
blockRoot: blockRootHex,
|
|
508
|
+
slot,
|
|
509
|
+
index: dataColumnSidecar.index,
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
logger.debug("Received gossip dataColumn", {
|
|
514
|
+
...payloadInput.getLogMeta(),
|
|
515
|
+
currentSlot: chain.clock.currentSlot,
|
|
516
|
+
peerId: peerIdStr,
|
|
517
|
+
delaySec,
|
|
518
|
+
secFromSlot,
|
|
519
|
+
gossipSubnet,
|
|
520
|
+
columnIndex: dataColumnSidecar.index,
|
|
521
|
+
recvToValLatency,
|
|
522
|
+
recvToValidation,
|
|
523
|
+
validationTime,
|
|
524
|
+
});
|
|
525
|
+
|
|
526
|
+
return payloadInput;
|
|
527
|
+
} catch (e) {
|
|
528
|
+
if (e instanceof DataColumnSidecarGossipError && e.action === GossipAction.REJECT) {
|
|
529
|
+
chain.persistInvalidSszValue(
|
|
530
|
+
sszTypesFor(payloadInput.forkName as ForkPostGloas).DataColumnSidecar,
|
|
531
|
+
dataColumnSidecar,
|
|
532
|
+
`gossip_reject_slot_${slot}_index_${dataColumnSidecar.index}`
|
|
533
|
+
);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
throw e;
|
|
537
|
+
} finally {
|
|
538
|
+
verificationTimer?.();
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
|
|
401
542
|
function handleValidBeaconBlock(blockInput: IBlockInput, peerIdStr: string, seenTimestampSec: number): void {
|
|
402
543
|
const signedBlock = blockInput.getBlock();
|
|
403
544
|
const slot = signedBlock.message.slot;
|
|
@@ -551,70 +692,136 @@ function getSequentialHandlers(modules: ValidatorFnsModules, options: GossipHand
|
|
|
551
692
|
peerIdStr,
|
|
552
693
|
seenTimestampSec,
|
|
553
694
|
}: GossipHandlerParamGeneric<GossipType.data_column_sidecar>) => {
|
|
695
|
+
const {fork} = topic.boundary;
|
|
554
696
|
const {serializedData} = gossipData;
|
|
555
|
-
|
|
556
|
-
const
|
|
557
|
-
const dataColumnSlot = dataColumnSidecar.signedBlockHeader.message.slot;
|
|
697
|
+
const dataColumnSidecar = sszDeserialize(topic, serializedData);
|
|
698
|
+
const dataColumnSlot = getDataColumnSidecarSlot(dataColumnSidecar);
|
|
558
699
|
const index = dataColumnSidecar.index;
|
|
559
|
-
|
|
560
|
-
if (config.getForkSeq(dataColumnSlot) < ForkSeq.fulu) {
|
|
561
|
-
throw new GossipActionError(GossipAction.REJECT, {code: "PRE_FULU_BLOCK"});
|
|
562
|
-
}
|
|
563
700
|
const delaySec = chain.clock.secFromSlot(dataColumnSlot, seenTimestampSec);
|
|
564
|
-
const blockInput = await validateBeaconDataColumn(
|
|
565
|
-
dataColumnSidecar,
|
|
566
|
-
serializedData,
|
|
567
|
-
topic.subnet,
|
|
568
|
-
peerIdStr,
|
|
569
|
-
seenTimestampSec
|
|
570
|
-
);
|
|
571
|
-
chain.serializedCache.set(dataColumnSidecar, serializedData);
|
|
572
|
-
const blockInputMeta = blockInput.getLogMeta();
|
|
573
|
-
const {receivedColumns} = blockInputMeta;
|
|
574
|
-
// it's not helpful to track every single column received
|
|
575
|
-
// instead of that, track 1st, 8th, 16th 32th, 64th, and 128th column
|
|
576
|
-
switch (receivedColumns) {
|
|
577
|
-
case 1:
|
|
578
|
-
case config.SAMPLES_PER_SLOT:
|
|
579
|
-
case 2 * config.SAMPLES_PER_SLOT:
|
|
580
|
-
case NUMBER_OF_COLUMNS / 4:
|
|
581
|
-
case NUMBER_OF_COLUMNS / 2:
|
|
582
|
-
case NUMBER_OF_COLUMNS:
|
|
583
|
-
metrics?.dataColumns.elapsedTimeTillReceived.observe({receivedOrder: receivedColumns}, delaySec);
|
|
584
|
-
break;
|
|
585
|
-
}
|
|
586
701
|
|
|
587
|
-
if (
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
702
|
+
if (isForkPostGloas(fork)) {
|
|
703
|
+
if (!isGloasDataColumnSidecar(dataColumnSidecar)) {
|
|
704
|
+
throw new DataColumnSidecarGossipError(GossipAction.REJECT, {
|
|
705
|
+
code: DataColumnSidecarErrorCode.INCORRECT_TYPE,
|
|
706
|
+
slot: dataColumnSlot,
|
|
707
|
+
columnIndex: index,
|
|
708
|
+
fork,
|
|
709
|
+
});
|
|
593
710
|
}
|
|
594
|
-
}
|
|
595
711
|
|
|
596
|
-
|
|
597
|
-
const
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
712
|
+
// After gloas, data columns are tracked in PayloadEnvelopeInput
|
|
713
|
+
const payloadInput = await validatePayloadDataColumn(
|
|
714
|
+
dataColumnSidecar,
|
|
715
|
+
topic.subnet,
|
|
716
|
+
peerIdStr,
|
|
717
|
+
seenTimestampSec
|
|
718
|
+
);
|
|
719
|
+
chain.serializedCache.set(dataColumnSidecar, serializedData);
|
|
720
|
+
|
|
721
|
+
const payloadInputMeta = payloadInput.getLogMeta();
|
|
722
|
+
const {receivedColumns} = payloadInputMeta;
|
|
723
|
+
// it's not helpful to track every single column received
|
|
724
|
+
// instead of that, track 1st, 8th, 16th 32th, 64th, and 128th column
|
|
725
|
+
switch (receivedColumns) {
|
|
726
|
+
case 1:
|
|
727
|
+
case config.SAMPLES_PER_SLOT:
|
|
728
|
+
case 2 * config.SAMPLES_PER_SLOT:
|
|
729
|
+
case NUMBER_OF_COLUMNS / 4:
|
|
730
|
+
case NUMBER_OF_COLUMNS / 2:
|
|
731
|
+
case NUMBER_OF_COLUMNS:
|
|
732
|
+
metrics?.dataColumns.elapsedTimeTillReceived.observe({receivedOrder: receivedColumns}, delaySec);
|
|
733
|
+
break;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
if (!payloadInput.hasComputedAllData()) {
|
|
737
|
+
// if we've received at least half of the columns, trigger reconstruction of the rest
|
|
738
|
+
if (receivedColumns >= NUMBER_OF_COLUMNS / 2) {
|
|
739
|
+
chain.columnReconstructionTracker.triggerColumnReconstruction(payloadInput);
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
chain.logger.debug("Received gossip data column, payload envelope input not yet complete", {
|
|
743
|
+
dataColumnIndex: index,
|
|
744
|
+
...payloadInputMeta,
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
chain.processExecutionPayload(payloadInput, {validSignature: true}).catch((e) => {
|
|
605
749
|
chain.logger.debug(
|
|
606
|
-
"
|
|
607
|
-
{
|
|
608
|
-
|
|
609
|
-
...blockInputMeta,
|
|
610
|
-
}
|
|
750
|
+
"Error processing execution payload from gossip data column",
|
|
751
|
+
{slot: dataColumnSlot, root: payloadInput.blockRootHex},
|
|
752
|
+
e as Error
|
|
611
753
|
);
|
|
612
|
-
chain.emitter.emit(ChainEvent.incompleteBlockInput, {
|
|
613
|
-
blockInput,
|
|
614
|
-
peer: peerIdStr,
|
|
615
|
-
source: BlockInputSource.gossip,
|
|
616
|
-
});
|
|
617
754
|
});
|
|
755
|
+
} else {
|
|
756
|
+
if (config.getForkSeq(dataColumnSlot) < ForkSeq.fulu) {
|
|
757
|
+
throw new GossipActionError(GossipAction.REJECT, {code: "PRE_FULU_BLOCK"});
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
if (isGloasDataColumnSidecar(dataColumnSidecar)) {
|
|
761
|
+
throw new DataColumnSidecarGossipError(GossipAction.REJECT, {
|
|
762
|
+
code: DataColumnSidecarErrorCode.INCORRECT_TYPE,
|
|
763
|
+
slot: dataColumnSlot,
|
|
764
|
+
columnIndex: index,
|
|
765
|
+
fork,
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
// Before gloas, data columns are tracked in BlockInput
|
|
770
|
+
const blockInput = await validateBeaconDataColumn(
|
|
771
|
+
dataColumnSidecar,
|
|
772
|
+
serializedData,
|
|
773
|
+
topic.subnet,
|
|
774
|
+
peerIdStr,
|
|
775
|
+
seenTimestampSec
|
|
776
|
+
);
|
|
777
|
+
chain.serializedCache.set(dataColumnSidecar, serializedData);
|
|
778
|
+
const blockInputMeta = blockInput.getLogMeta();
|
|
779
|
+
const {receivedColumns} = blockInputMeta;
|
|
780
|
+
// it's not helpful to track every single column received
|
|
781
|
+
// instead of that, track 1st, 8th, 16th 32th, 64th, and 128th column
|
|
782
|
+
switch (receivedColumns) {
|
|
783
|
+
case 1:
|
|
784
|
+
case config.SAMPLES_PER_SLOT:
|
|
785
|
+
case 2 * config.SAMPLES_PER_SLOT:
|
|
786
|
+
case NUMBER_OF_COLUMNS / 4:
|
|
787
|
+
case NUMBER_OF_COLUMNS / 2:
|
|
788
|
+
case NUMBER_OF_COLUMNS:
|
|
789
|
+
metrics?.dataColumns.elapsedTimeTillReceived.observe({receivedOrder: receivedColumns}, delaySec);
|
|
790
|
+
break;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
if (!blockInput.hasComputedAllData()) {
|
|
794
|
+
// immediately attempt fetch of data columns from execution engine
|
|
795
|
+
chain.getBlobsTracker.triggerGetBlobs(blockInput);
|
|
796
|
+
// if we've received at least half of the columns, trigger reconstruction of the rest
|
|
797
|
+
if (blockInput.columnCount >= NUMBER_OF_COLUMNS / 2) {
|
|
798
|
+
chain.columnReconstructionTracker.triggerColumnReconstruction(blockInput);
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
if (!blockInput.hasBlockAndAllData()) {
|
|
803
|
+
const cutoffTimeMs = getCutoffTimeMs(chain, dataColumnSlot, BLOCK_AVAILABILITY_CUTOFF_MS);
|
|
804
|
+
chain.logger.debug("Received gossip data column, waiting for full data availability", {
|
|
805
|
+
msToWait: cutoffTimeMs,
|
|
806
|
+
dataColumnIndex: index,
|
|
807
|
+
...blockInputMeta,
|
|
808
|
+
});
|
|
809
|
+
// do not await here to not delay gossip validation
|
|
810
|
+
blockInput.waitForBlockAndAllData(cutoffTimeMs).catch((_e) => {
|
|
811
|
+
chain.logger.debug(
|
|
812
|
+
"Waited for data after receiving gossip column. Cut-off reached so attempting to fetch remainder of BlockInput",
|
|
813
|
+
{
|
|
814
|
+
dataColumnIndex: index,
|
|
815
|
+
...blockInputMeta,
|
|
816
|
+
}
|
|
817
|
+
);
|
|
818
|
+
chain.emitter.emit(ChainEvent.incompleteBlockInput, {
|
|
819
|
+
blockInput,
|
|
820
|
+
peer: peerIdStr,
|
|
821
|
+
source: BlockInputSource.gossip,
|
|
822
|
+
});
|
|
823
|
+
});
|
|
824
|
+
}
|
|
618
825
|
}
|
|
619
826
|
},
|
|
620
827
|
|
|
@@ -767,9 +974,9 @@ function getSequentialHandlers(modules: ValidatorFnsModules, options: GossipHand
|
|
|
767
974
|
const {serializedData} = gossipData;
|
|
768
975
|
const syncCommittee = sszDeserialize(topic, serializedData);
|
|
769
976
|
const {subnet} = topic;
|
|
770
|
-
let
|
|
977
|
+
let indicesInSubcommittee: number[] = [0];
|
|
771
978
|
try {
|
|
772
|
-
|
|
979
|
+
indicesInSubcommittee = (await validateGossipSyncCommittee(chain, syncCommittee, subnet)).indicesInSubcommittee;
|
|
773
980
|
} catch (e) {
|
|
774
981
|
if (e instanceof SyncCommitteeError && e.action === GossipAction.REJECT) {
|
|
775
982
|
chain.persistInvalidSszValue(ssz.altair.SyncCommitteeMessage, syncCommittee, "gossip_reject");
|
|
@@ -777,11 +984,12 @@ function getSequentialHandlers(modules: ValidatorFnsModules, options: GossipHand
|
|
|
777
984
|
throw e;
|
|
778
985
|
}
|
|
779
986
|
|
|
780
|
-
// Handler
|
|
781
|
-
|
|
987
|
+
// Handler — add for ALL positions this validator holds in the subcommittee
|
|
782
988
|
try {
|
|
783
|
-
const
|
|
784
|
-
|
|
989
|
+
for (const indexInSubcommittee of indicesInSubcommittee) {
|
|
990
|
+
const insertOutcome = chain.syncCommitteeMessagePool.add(subnet, syncCommittee, indexInSubcommittee);
|
|
991
|
+
metrics?.opPool.syncCommitteeMessagePoolInsertOutcome.inc({insertOutcome});
|
|
992
|
+
}
|
|
785
993
|
} catch (e) {
|
|
786
994
|
logger.debug("Error adding to syncCommittee pool", {subnet}, e as Error);
|
|
787
995
|
}
|
|
@@ -826,17 +1034,80 @@ function getSequentialHandlers(modules: ValidatorFnsModules, options: GossipHand
|
|
|
826
1034
|
[GossipType.execution_payload]: async ({
|
|
827
1035
|
gossipData,
|
|
828
1036
|
topic,
|
|
1037
|
+
peerIdStr,
|
|
829
1038
|
seenTimestampSec,
|
|
830
1039
|
}: GossipHandlerParamGeneric<GossipType.execution_payload>) => {
|
|
831
1040
|
const {serializedData} = gossipData;
|
|
832
|
-
const
|
|
833
|
-
|
|
1041
|
+
const signedEnvelope = sszDeserialize(topic, serializedData);
|
|
1042
|
+
const envelope = signedEnvelope.message;
|
|
834
1043
|
|
|
835
|
-
|
|
1044
|
+
// TODO GLOAS: consider optimistically create PayloadEnvelopeInput here similar to how we do that for beacon_block
|
|
1045
|
+
// so that UnknownBlockSync can handle backward sync
|
|
1046
|
+
// the problem now is we cannot create a PayloadEnvelopeInput without the beacon block being known, we need at least the proposer index
|
|
1047
|
+
// we can achieve that by looking into the EpochCache
|
|
1048
|
+
try {
|
|
1049
|
+
await validateGossipExecutionPayloadEnvelope(chain, signedEnvelope);
|
|
1050
|
+
} catch (e) {
|
|
1051
|
+
if (e instanceof ExecutionPayloadEnvelopeError) {
|
|
1052
|
+
const {slot, beaconBlockRoot} = signedEnvelope.message;
|
|
1053
|
+
logger.debug("Gossip envelope has error", {slot, root: toRootHex(beaconBlockRoot), code: e.type.code});
|
|
1054
|
+
if (e.type.code === ExecutionPayloadEnvelopeErrorCode.BLOCK_ROOT_UNKNOWN) {
|
|
1055
|
+
// TODO GLOAS: UnknownBlockSync to handle this
|
|
1056
|
+
chain.emitter.emit(ChainEvent.envelopeUnknownBlock, {
|
|
1057
|
+
envelope: signedEnvelope,
|
|
1058
|
+
peer: peerIdStr,
|
|
1059
|
+
source: BlockInputSource.gossip,
|
|
1060
|
+
});
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
if (e.action === GossipAction.REJECT) {
|
|
1064
|
+
chain.persistInvalidSszValue(
|
|
1065
|
+
ssz.gloas.SignedExecutionPayloadEnvelope,
|
|
1066
|
+
signedEnvelope,
|
|
1067
|
+
`gossip_reject_slot_${slot}`
|
|
1068
|
+
);
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
throw e;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
const slot = envelope.slot;
|
|
836
1076
|
const delaySec = seenTimestampSec - computeTimeAtSlot(config, slot, chain.genesisTime);
|
|
837
1077
|
metrics?.gossipExecutionPayloadEnvelope.elapsedTimeTillReceived.observe({source: OpSource.gossip}, delaySec);
|
|
1078
|
+
chain.validatorMonitor?.registerExecutionPayloadEnvelope(OpSource.gossip, delaySec, signedEnvelope);
|
|
1079
|
+
|
|
1080
|
+
const blockRootHex = toRootHex(envelope.beaconBlockRoot);
|
|
1081
|
+
const payloadInput = chain.seenPayloadEnvelopeInputCache.get(blockRootHex);
|
|
1082
|
+
|
|
1083
|
+
if (!payloadInput) {
|
|
1084
|
+
// This shouldn't happen because beacon block should have been imported and thus payload input should have been created.
|
|
1085
|
+
throw new ExecutionPayloadEnvelopeError(GossipAction.IGNORE, {
|
|
1086
|
+
code: ExecutionPayloadEnvelopeErrorCode.PAYLOAD_ENVELOPE_INPUT_MISSING,
|
|
1087
|
+
blockRoot: blockRootHex,
|
|
1088
|
+
});
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
chain.serializedCache.set(signedEnvelope, serializedData);
|
|
838
1092
|
|
|
839
|
-
|
|
1093
|
+
payloadInput.addPayloadEnvelope({
|
|
1094
|
+
envelope: signedEnvelope,
|
|
1095
|
+
source: PayloadEnvelopeInputSource.gossip,
|
|
1096
|
+
seenTimestampSec,
|
|
1097
|
+
peerIdStr,
|
|
1098
|
+
});
|
|
1099
|
+
|
|
1100
|
+
chain.emitter.emit(routes.events.EventType.executionPayloadGossip, {
|
|
1101
|
+
slot,
|
|
1102
|
+
builderIndex: envelope.builderIndex,
|
|
1103
|
+
blockHash: toRootHex(envelope.payload.blockHash),
|
|
1104
|
+
blockRoot: blockRootHex,
|
|
1105
|
+
stateRoot: toRootHex(envelope.stateRoot),
|
|
1106
|
+
});
|
|
1107
|
+
|
|
1108
|
+
chain.processExecutionPayload(payloadInput, {validSignature: true}).catch((e) => {
|
|
1109
|
+
chain.logger.debug("Error processing execution payload from gossip", {slot, root: blockRootHex}, e as Error);
|
|
1110
|
+
});
|
|
840
1111
|
},
|
|
841
1112
|
[GossipType.payload_attestation_message]: async ({
|
|
842
1113
|
gossipData,
|
|
@@ -877,6 +1148,11 @@ function getSequentialHandlers(modules: ValidatorFnsModules, options: GossipHand
|
|
|
877
1148
|
} catch (e) {
|
|
878
1149
|
logger.error("Error adding to executionPayloadBid pool", {}, e as Error);
|
|
879
1150
|
}
|
|
1151
|
+
|
|
1152
|
+
chain.emitter.emit(routes.events.EventType.executionPayloadBid, {
|
|
1153
|
+
version: config.getForkName(executionPayloadBid.message.slot),
|
|
1154
|
+
data: executionPayloadBid,
|
|
1155
|
+
});
|
|
880
1156
|
},
|
|
881
1157
|
};
|
|
882
1158
|
}
|
|
@@ -1007,7 +1283,7 @@ export async function validateGossipFnRetryUnknownRoot<T>(
|
|
|
1007
1283
|
if (unknownBlockRootRetries === 0) {
|
|
1008
1284
|
// Trigger unknown block root search here
|
|
1009
1285
|
const rootHex = toRootHex(blockRoot);
|
|
1010
|
-
network.
|
|
1286
|
+
network.searchUnknownBlock({slot, root: rootHex}, BlockInputSource.gossip);
|
|
1011
1287
|
}
|
|
1012
1288
|
|
|
1013
1289
|
if (unknownBlockRootRetries++ < MAX_UNKNOWN_BLOCK_ROOT_RETRIES) {
|