@lodestar/beacon-node 1.51.0-dev.1b1888604e → 1.51.0-dev.1b22218e60
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/api.js +1 -1
- package/lib/api/impl/api.js.map +1 -1
- package/lib/api/impl/beacon/blocks/index.d.ts +2 -1
- package/lib/api/impl/beacon/blocks/index.d.ts.map +1 -1
- package/lib/api/impl/beacon/blocks/index.js +48 -95
- package/lib/api/impl/beacon/blocks/index.js.map +1 -1
- package/lib/api/impl/beacon/index.d.ts +2 -1
- package/lib/api/impl/beacon/index.d.ts.map +1 -1
- package/lib/api/impl/beacon/index.js +2 -2
- package/lib/api/impl/beacon/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 +22 -2
- 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 +8 -2
- package/lib/api/impl/beacon/state/index.js.map +1 -1
- package/lib/api/impl/beacon/state/utils.d.ts +3 -2
- package/lib/api/impl/beacon/state/utils.d.ts.map +1 -1
- package/lib/api/impl/beacon/state/utils.js +17 -9
- package/lib/api/impl/beacon/state/utils.js.map +1 -1
- package/lib/api/impl/debug/index.d.ts.map +1 -1
- package/lib/api/impl/debug/index.js +3 -0
- package/lib/api/impl/debug/index.js.map +1 -1
- package/lib/api/impl/validator/index.d.ts +6 -0
- package/lib/api/impl/validator/index.d.ts.map +1 -1
- package/lib/api/impl/validator/index.js +142 -34
- package/lib/api/impl/validator/index.js.map +1 -1
- package/lib/api/options.d.ts +2 -0
- package/lib/api/options.d.ts.map +1 -1
- package/lib/api/options.js +1 -0
- package/lib/api/options.js.map +1 -1
- package/lib/chain/GetBlobsTracker.d.ts +13 -2
- package/lib/chain/GetBlobsTracker.d.ts.map +1 -1
- package/lib/chain/GetBlobsTracker.js +69 -35
- 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/utils/archiveBlocks.d.ts +4 -0
- package/lib/chain/archiveStore/utils/archiveBlocks.d.ts.map +1 -1
- package/lib/chain/archiveStore/utils/archiveBlocks.js +61 -97
- package/lib/chain/archiveStore/utils/archiveBlocks.js.map +1 -1
- package/lib/chain/blocks/blockInput/blockInput.d.ts +11 -56
- package/lib/chain/blocks/blockInput/blockInput.d.ts.map +1 -1
- package/lib/chain/blocks/blockInput/blockInput.js +5 -241
- package/lib/chain/blocks/blockInput/blockInput.js.map +1 -1
- package/lib/chain/blocks/blockInput/errors.d.ts +2 -4
- package/lib/chain/blocks/blockInput/errors.d.ts.map +1 -1
- package/lib/chain/blocks/blockInput/errors.js.map +1 -1
- package/lib/chain/blocks/blockInput/types.d.ts +2 -18
- package/lib/chain/blocks/blockInput/types.d.ts.map +1 -1
- package/lib/chain/blocks/blockInput/types.js +0 -1
- package/lib/chain/blocks/blockInput/types.js.map +1 -1
- package/lib/chain/blocks/importBlock.d.ts.map +1 -1
- package/lib/chain/blocks/importBlock.js +42 -57
- package/lib/chain/blocks/importBlock.js.map +1 -1
- package/lib/chain/blocks/importExecutionPayload.d.ts +10 -11
- package/lib/chain/blocks/importExecutionPayload.d.ts.map +1 -1
- package/lib/chain/blocks/importExecutionPayload.js +82 -20
- package/lib/chain/blocks/importExecutionPayload.js.map +1 -1
- package/lib/chain/blocks/index.d.ts.map +1 -1
- package/lib/chain/blocks/index.js +4 -4
- package/lib/chain/blocks/index.js.map +1 -1
- package/lib/chain/blocks/payloadEnvelopeProcessor.d.ts +12 -9
- package/lib/chain/blocks/payloadEnvelopeProcessor.d.ts.map +1 -1
- package/lib/chain/blocks/payloadEnvelopeProcessor.js +24 -19
- package/lib/chain/blocks/payloadEnvelopeProcessor.js.map +1 -1
- package/lib/chain/blocks/types.d.ts +7 -19
- package/lib/chain/blocks/types.d.ts.map +1 -1
- package/lib/chain/blocks/types.js +5 -24
- package/lib/chain/blocks/types.js.map +1 -1
- package/lib/chain/blocks/verifyBlock.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlock.js +18 -7
- package/lib/chain/blocks/verifyBlock.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksDataAvailability.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlocksDataAvailability.js +14 -2
- package/lib/chain/blocks/verifyBlocksDataAvailability.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksExecutionPayloads.d.ts +1 -1
- package/lib/chain/blocks/verifyBlocksExecutionPayloads.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlocksExecutionPayloads.js +7 -3
- package/lib/chain/blocks/verifyBlocksExecutionPayloads.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksSanityChecks.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlocksSanityChecks.js +4 -0
- package/lib/chain/blocks/verifyBlocksSanityChecks.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksSignatures.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlocksSignatures.js +10 -5
- package/lib/chain/blocks/verifyBlocksSignatures.js.map +1 -1
- package/lib/chain/blocks/verifyPayloadsDataAvailability.d.ts +3 -3
- package/lib/chain/blocks/verifyPayloadsDataAvailability.d.ts.map +1 -1
- package/lib/chain/blocks/verifyPayloadsDataAvailability.js +11 -6
- package/lib/chain/blocks/verifyPayloadsDataAvailability.js.map +1 -1
- package/lib/chain/blocks/writeBlockInputToDb.d.ts +0 -2
- package/lib/chain/blocks/writeBlockInputToDb.d.ts.map +1 -1
- package/lib/chain/blocks/writeBlockInputToDb.js +6 -24
- package/lib/chain/blocks/writeBlockInputToDb.js.map +1 -1
- package/lib/chain/bls/interface.d.ts +2 -0
- package/lib/chain/bls/interface.d.ts.map +1 -1
- package/lib/chain/bls/multithread/index.d.ts +1 -1
- package/lib/chain/bls/multithread/index.d.ts.map +1 -1
- package/lib/chain/bls/multithread/index.js +50 -22
- package/lib/chain/bls/multithread/index.js.map +1 -1
- package/lib/chain/bls/multithread/types.d.ts +1 -1
- package/lib/chain/bls/multithread/types.d.ts.map +1 -1
- package/lib/chain/bls/multithread/worker.js +1 -1
- package/lib/chain/bls/multithread/worker.js.map +1 -1
- package/lib/chain/bls/singleThread.js +1 -1
- package/lib/chain/bls/singleThread.js.map +1 -1
- package/lib/chain/bls/utils.js +1 -1
- package/lib/chain/bls/utils.js.map +1 -1
- package/lib/chain/chain.d.ts +26 -4
- package/lib/chain/chain.d.ts.map +1 -1
- package/lib/chain/chain.js +127 -43
- package/lib/chain/chain.js.map +1 -1
- package/lib/chain/emitter.d.ts +7 -7
- package/lib/chain/emitter.d.ts.map +1 -1
- package/lib/chain/emitter.js +5 -5
- package/lib/chain/emitter.js.map +1 -1
- package/lib/chain/errors/blockError.d.ts +1 -1
- package/lib/chain/errors/blockError.d.ts.map +1 -1
- package/lib/chain/errors/blockError.js +1 -1
- package/lib/chain/errors/blockError.js.map +1 -1
- package/lib/chain/errors/executionPayloadBid.d.ts +11 -1
- package/lib/chain/errors/executionPayloadBid.d.ts.map +1 -1
- package/lib/chain/errors/executionPayloadBid.js +2 -0
- package/lib/chain/errors/executionPayloadBid.js.map +1 -1
- package/lib/chain/errors/executionPayloadEnvelope.d.ts +7 -0
- package/lib/chain/errors/executionPayloadEnvelope.d.ts.map +1 -1
- package/lib/chain/errors/executionPayloadEnvelope.js +1 -0
- package/lib/chain/errors/executionPayloadEnvelope.js.map +1 -1
- package/lib/chain/errors/inclusionList.d.ts +60 -0
- package/lib/chain/errors/inclusionList.d.ts.map +1 -0
- package/lib/chain/errors/inclusionList.js +19 -0
- package/lib/chain/errors/inclusionList.js.map +1 -0
- package/lib/chain/errors/index.d.ts +1 -1
- package/lib/chain/errors/index.d.ts.map +1 -1
- package/lib/chain/errors/index.js +1 -1
- package/lib/chain/errors/index.js.map +1 -1
- package/lib/chain/forkChoice/index.d.ts +11 -1
- package/lib/chain/forkChoice/index.d.ts.map +1 -1
- package/lib/chain/forkChoice/index.js +11 -0
- package/lib/chain/forkChoice/index.js.map +1 -1
- package/lib/chain/forkChoiceExecutionEngine.d.ts +51 -0
- package/lib/chain/forkChoiceExecutionEngine.d.ts.map +1 -0
- package/lib/chain/forkChoiceExecutionEngine.js +117 -0
- package/lib/chain/forkChoiceExecutionEngine.js.map +1 -0
- package/lib/chain/interface.d.ts +10 -7
- package/lib/chain/interface.d.ts.map +1 -1
- package/lib/chain/interface.js.map +1 -1
- package/lib/chain/opPools/aggregatedAttestationPool.d.ts +17 -4
- package/lib/chain/opPools/aggregatedAttestationPool.d.ts.map +1 -1
- package/lib/chain/opPools/aggregatedAttestationPool.js +199 -46
- package/lib/chain/opPools/aggregatedAttestationPool.js.map +1 -1
- package/lib/chain/opPools/attestationPool.d.ts +1 -1
- package/lib/chain/opPools/attestationPool.d.ts.map +1 -1
- package/lib/chain/opPools/attestationPool.js +15 -4
- package/lib/chain/opPools/attestationPool.js.map +1 -1
- package/lib/chain/opPools/inclusionListStore.d.ts +63 -0
- package/lib/chain/opPools/inclusionListStore.d.ts.map +1 -0
- package/lib/chain/opPools/inclusionListStore.js +171 -0
- package/lib/chain/opPools/inclusionListStore.js.map +1 -0
- package/lib/chain/opPools/index.d.ts +2 -0
- package/lib/chain/opPools/index.d.ts.map +1 -1
- package/lib/chain/opPools/index.js +2 -0
- package/lib/chain/opPools/index.js.map +1 -1
- package/lib/chain/opPools/payloadAttestationPool.d.ts.map +1 -1
- package/lib/chain/opPools/payloadAttestationPool.js +17 -7
- package/lib/chain/opPools/payloadAttestationPool.js.map +1 -1
- package/lib/chain/opPools/singleAttestationPool.d.ts +77 -0
- package/lib/chain/opPools/singleAttestationPool.d.ts.map +1 -0
- package/lib/chain/opPools/singleAttestationPool.js +209 -0
- package/lib/chain/opPools/singleAttestationPool.js.map +1 -0
- package/lib/chain/opPools/syncCommitteeMessagePool.d.ts.map +1 -1
- package/lib/chain/opPools/syncCommitteeMessagePool.js +9 -3
- package/lib/chain/opPools/syncCommitteeMessagePool.js.map +1 -1
- package/lib/chain/opPools/syncContributionAndProofPool.d.ts.map +1 -1
- package/lib/chain/opPools/syncContributionAndProofPool.js +11 -3
- package/lib/chain/opPools/syncContributionAndProofPool.js.map +1 -1
- package/lib/chain/opPools/utils.d.ts +1 -1
- 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 +5 -3
- package/lib/chain/options.d.ts.map +1 -1
- package/lib/chain/options.js +0 -1
- package/lib/chain/options.js.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.d.ts +6 -3
- package/lib/chain/produceBlock/produceBlockBody.d.ts.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.js +32 -11
- package/lib/chain/produceBlock/produceBlockBody.js.map +1 -1
- package/lib/chain/proposerTracker.d.ts +31 -0
- package/lib/chain/proposerTracker.d.ts.map +1 -0
- package/lib/chain/proposerTracker.js +75 -0
- package/lib/chain/proposerTracker.js.map +1 -0
- package/lib/chain/regen/interface.d.ts +2 -2
- package/lib/chain/regen/interface.d.ts.map +1 -1
- package/lib/chain/regen/interface.js +1 -1
- package/lib/chain/regen/interface.js.map +1 -1
- package/lib/chain/regen/queued.d.ts +1 -1
- package/lib/chain/regen/queued.d.ts.map +1 -1
- package/lib/chain/regen/queued.js +5 -3
- package/lib/chain/regen/queued.js.map +1 -1
- package/lib/chain/seenCache/seenGossipBlockInput.d.ts +7 -14
- package/lib/chain/seenCache/seenGossipBlockInput.d.ts.map +1 -1
- package/lib/chain/seenCache/seenGossipBlockInput.js +6 -65
- package/lib/chain/seenCache/seenGossipBlockInput.js.map +1 -1
- package/lib/chain/validation/aggregateAndProof.js +1 -1
- package/lib/chain/validation/aggregateAndProof.js.map +1 -1
- package/lib/chain/validation/attestation.js +1 -1
- package/lib/chain/validation/attestation.js.map +1 -1
- package/lib/chain/validation/executionPayloadBid.d.ts +0 -15
- package/lib/chain/validation/executionPayloadBid.d.ts.map +1 -1
- package/lib/chain/validation/executionPayloadBid.js +37 -158
- package/lib/chain/validation/executionPayloadBid.js.map +1 -1
- package/lib/chain/validation/executionPayloadEnvelope.d.ts +6 -0
- package/lib/chain/validation/executionPayloadEnvelope.d.ts.map +1 -1
- package/lib/chain/validation/executionPayloadEnvelope.js +53 -0
- package/lib/chain/validation/executionPayloadEnvelope.js.map +1 -1
- package/lib/chain/validation/inclusionList.d.ts +14 -0
- package/lib/chain/validation/inclusionList.d.ts.map +1 -0
- package/lib/chain/validation/inclusionList.js +150 -0
- package/lib/chain/validation/inclusionList.js.map +1 -0
- package/lib/chain/validation/index.d.ts +1 -0
- package/lib/chain/validation/index.d.ts.map +1 -1
- package/lib/chain/validation/index.js +1 -0
- package/lib/chain/validation/index.js.map +1 -1
- package/lib/chain/validation/syncCommittee.d.ts.map +1 -1
- package/lib/chain/validation/syncCommittee.js +16 -10
- 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 +11 -0
- package/lib/chain/validation/syncCommitteeContributionAndProof.js.map +1 -1
- package/lib/chain/validatorMonitor.d.ts +1 -2
- package/lib/chain/validatorMonitor.d.ts.map +1 -1
- package/lib/chain/validatorMonitor.js +0 -3
- package/lib/chain/validatorMonitor.js.map +1 -1
- package/lib/db/beacon.d.ts +7 -0
- package/lib/db/beacon.d.ts.map +1 -1
- package/lib/db/beacon.js +34 -0
- package/lib/db/beacon.js.map +1 -1
- package/lib/db/dataColumnStore.d.ts +1 -1
- package/lib/db/dataColumnStore.d.ts.map +1 -1
- package/lib/db/dataColumnStore.js +1 -4
- package/lib/db/dataColumnStore.js.map +1 -1
- package/lib/db/flatFileStore/flatFileStore.js +5 -5
- package/lib/db/flatFileStore/flatFileStore.js.map +1 -1
- package/lib/db/flatFileStore/slotIndex.d.ts.map +1 -1
- package/lib/db/flatFileStore/slotIndex.js +2 -2
- package/lib/db/flatFileStore/slotIndex.js.map +1 -1
- package/lib/db/interface.d.ts +1 -0
- package/lib/db/interface.d.ts.map +1 -1
- package/lib/db/repositories/blobSidecars.d.ts +0 -1
- package/lib/db/repositories/blobSidecars.d.ts.map +1 -1
- package/lib/db/repositories/blobSidecars.js +0 -1
- package/lib/db/repositories/blobSidecars.js.map +1 -1
- package/lib/db/repositories/dataColumnSidecarArchive.d.ts +6 -0
- package/lib/db/repositories/dataColumnSidecarArchive.d.ts.map +1 -1
- package/lib/db/repositories/dataColumnSidecarArchive.js +19 -0
- package/lib/db/repositories/dataColumnSidecarArchive.js.map +1 -1
- package/lib/execution/builder/apiClient.d.ts +14 -8
- package/lib/execution/builder/apiClient.d.ts.map +1 -1
- package/lib/execution/builder/apiClient.js +12 -10
- package/lib/execution/builder/apiClient.js.map +1 -1
- package/lib/execution/builder/http.d.ts +2 -0
- package/lib/execution/builder/http.d.ts.map +1 -1
- package/lib/execution/builder/http.js +2 -0
- package/lib/execution/builder/http.js.map +1 -1
- package/lib/execution/builder/validateBid.d.ts.map +1 -1
- package/lib/execution/builder/validateBid.js +14 -1
- package/lib/execution/builder/validateBid.js.map +1 -1
- package/lib/execution/engine/blobVersionedHashes.d.ts +1 -1
- package/lib/execution/engine/blobVersionedHashes.d.ts.map +1 -1
- package/lib/execution/engine/blobVersionedHashes.js.map +1 -1
- package/lib/execution/engine/disabled.d.ts +1 -0
- package/lib/execution/engine/disabled.d.ts.map +1 -1
- package/lib/execution/engine/disabled.js +3 -0
- package/lib/execution/engine/disabled.js.map +1 -1
- package/lib/execution/engine/http.d.ts +12 -8
- package/lib/execution/engine/http.d.ts.map +1 -1
- package/lib/execution/engine/http.js +35 -14
- package/lib/execution/engine/http.js.map +1 -1
- package/lib/execution/engine/index.d.ts +1 -1
- package/lib/execution/engine/index.d.ts.map +1 -1
- package/lib/execution/engine/index.js +1 -1
- package/lib/execution/engine/index.js.map +1 -1
- package/lib/execution/engine/interface.d.ts +29 -8
- package/lib/execution/engine/interface.d.ts.map +1 -1
- package/lib/execution/engine/interface.js.map +1 -1
- package/lib/execution/engine/jsonRpcTransport.d.ts +5 -6
- package/lib/execution/engine/jsonRpcTransport.d.ts.map +1 -1
- package/lib/execution/engine/jsonRpcTransport.js +34 -20
- package/lib/execution/engine/jsonRpcTransport.js.map +1 -1
- package/lib/execution/engine/mock.d.ts +1 -1
- package/lib/execution/engine/mock.d.ts.map +1 -1
- package/lib/execution/engine/mock.js +31 -11
- package/lib/execution/engine/mock.js.map +1 -1
- package/lib/execution/engine/payloadIdCache.d.ts +5 -3
- package/lib/execution/engine/payloadIdCache.d.ts.map +1 -1
- package/lib/execution/engine/payloadIdCache.js +15 -4
- package/lib/execution/engine/payloadIdCache.js.map +1 -1
- package/lib/execution/engine/restTransport.d.ts +4 -5
- package/lib/execution/engine/restTransport.d.ts.map +1 -1
- package/lib/execution/engine/restTransport.js +4 -15
- package/lib/execution/engine/restTransport.js.map +1 -1
- package/lib/execution/engine/sszTypes.d.ts +38 -47
- package/lib/execution/engine/sszTypes.d.ts.map +1 -1
- package/lib/execution/engine/sszTypes.js +0 -5
- package/lib/execution/engine/sszTypes.js.map +1 -1
- package/lib/execution/engine/transport.d.ts +4 -14
- package/lib/execution/engine/transport.d.ts.map +1 -1
- package/lib/execution/engine/types.d.ts +25 -9
- package/lib/execution/engine/types.d.ts.map +1 -1
- package/lib/execution/engine/types.js +19 -14
- package/lib/execution/engine/types.js.map +1 -1
- package/lib/execution/engine/utils.d.ts.map +1 -1
- package/lib/execution/engine/utils.js +3 -2
- package/lib/execution/engine/utils.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/metrics/metrics/beacon.d.ts +16 -9
- package/lib/metrics/metrics/beacon.d.ts.map +1 -1
- package/lib/metrics/metrics/beacon.js +35 -30
- package/lib/metrics/metrics/beacon.js.map +1 -1
- package/lib/metrics/metrics/lodestar.d.ts +42 -8
- package/lib/metrics/metrics/lodestar.d.ts.map +1 -1
- package/lib/metrics/metrics/lodestar.js +104 -18
- package/lib/metrics/metrics/lodestar.js.map +1 -1
- package/lib/metrics/server/http.js +5 -5
- package/lib/metrics/server/http.js.map +1 -1
- package/lib/monitoring/service.js +1 -1
- package/lib/monitoring/service.js.map +1 -1
- package/lib/network/core/networkCore.d.ts +4 -1
- package/lib/network/core/networkCore.d.ts.map +1 -1
- package/lib/network/core/networkCore.js +7 -0
- package/lib/network/core/networkCore.js.map +1 -1
- package/lib/network/core/networkCoreWorker.js +2 -0
- package/lib/network/core/networkCoreWorker.js.map +1 -1
- package/lib/network/core/networkCoreWorkerHandler.d.ts +4 -1
- package/lib/network/core/networkCoreWorkerHandler.d.ts.map +1 -1
- package/lib/network/core/networkCoreWorkerHandler.js +6 -0
- package/lib/network/core/networkCoreWorkerHandler.js.map +1 -1
- package/lib/network/core/types.d.ts +6 -1
- package/lib/network/core/types.d.ts.map +1 -1
- package/lib/network/gossip/gossipsub.d.ts +1 -0
- package/lib/network/gossip/gossipsub.d.ts.map +1 -1
- package/lib/network/gossip/gossipsub.js +10 -0
- package/lib/network/gossip/gossipsub.js.map +1 -1
- package/lib/network/gossip/interface.d.ts +8 -9
- package/lib/network/gossip/interface.d.ts.map +1 -1
- package/lib/network/gossip/interface.js +1 -1
- package/lib/network/gossip/interface.js.map +1 -1
- package/lib/network/gossip/topic.d.ts +13 -21
- package/lib/network/gossip/topic.d.ts.map +1 -1
- package/lib/network/gossip/topic.js +13 -24
- package/lib/network/gossip/topic.js.map +1 -1
- package/lib/network/interface.d.ts +5 -5
- 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 +5 -1
- package/lib/network/libp2p/index.js.map +1 -1
- package/lib/network/network.d.ts +9 -7
- package/lib/network/network.d.ts.map +1 -1
- package/lib/network/network.js +58 -35
- package/lib/network/network.js.map +1 -1
- package/lib/network/options.d.ts +2 -0
- package/lib/network/options.d.ts.map +1 -1
- package/lib/network/options.js +2 -0
- package/lib/network/options.js.map +1 -1
- package/lib/network/peers/peerManager.d.ts +2 -1
- package/lib/network/peers/peerManager.d.ts.map +1 -1
- package/lib/network/peers/peerManager.js +28 -1
- package/lib/network/peers/peerManager.js.map +1 -1
- package/lib/network/peers/utils/assertPeerRelevance.d.ts +9 -1
- package/lib/network/peers/utils/assertPeerRelevance.d.ts.map +1 -1
- package/lib/network/peers/utils/assertPeerRelevance.js +32 -21
- package/lib/network/peers/utils/assertPeerRelevance.js.map +1 -1
- package/lib/network/peers/utils/prioritizePeers.d.ts +4 -1
- package/lib/network/peers/utils/prioritizePeers.d.ts.map +1 -1
- package/lib/network/peers/utils/prioritizePeers.js +8 -16
- package/lib/network/peers/utils/prioritizePeers.js.map +1 -1
- package/lib/network/peers/utils/subnetMap.d.ts +5 -2
- package/lib/network/peers/utils/subnetMap.d.ts.map +1 -1
- package/lib/network/peers/utils/subnetMap.js +6 -3
- package/lib/network/peers/utils/subnetMap.js.map +1 -1
- package/lib/network/processor/extractSlotRootFns.d.ts.map +1 -1
- package/lib/network/processor/extractSlotRootFns.js +1 -8
- 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 +118 -149
- package/lib/network/processor/gossipHandlers.js.map +1 -1
- package/lib/network/processor/gossipQueues/index.js +6 -6
- package/lib/network/processor/gossipQueues/index.js.map +1 -1
- package/lib/network/processor/gossipValidatorFn.js +5 -5
- package/lib/network/processor/gossipValidatorFn.js.map +1 -1
- package/lib/network/processor/index.d.ts +6 -0
- package/lib/network/processor/index.d.ts.map +1 -1
- package/lib/network/processor/index.js +56 -29
- package/lib/network/processor/index.js.map +1 -1
- package/lib/network/reqresp/ReqRespBeaconNode.js +6 -3
- package/lib/network/reqresp/ReqRespBeaconNode.js.map +1 -1
- package/lib/network/reqresp/handlers/beaconBlocksByRange.d.ts +2 -2
- package/lib/network/reqresp/handlers/beaconBlocksByRange.d.ts.map +1 -1
- package/lib/network/reqresp/handlers/inclusionListsByIndices.d.ts +10 -0
- package/lib/network/reqresp/handlers/inclusionListsByIndices.d.ts.map +1 -0
- package/lib/network/reqresp/handlers/inclusionListsByIndices.js +30 -0
- package/lib/network/reqresp/handlers/inclusionListsByIndices.js.map +1 -0
- package/lib/network/reqresp/handlers/index.d.ts.map +1 -1
- package/lib/network/reqresp/handlers/index.js +6 -12
- package/lib/network/reqresp/handlers/index.js.map +1 -1
- package/lib/network/reqresp/protocols.d.ts +1 -2
- package/lib/network/reqresp/protocols.d.ts.map +1 -1
- package/lib/network/reqresp/protocols.js +5 -10
- 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 +5 -17
- package/lib/network/reqresp/rateLimit.js.map +1 -1
- package/lib/network/reqresp/types.d.ts +6 -9
- package/lib/network/reqresp/types.d.ts.map +1 -1
- package/lib/network/reqresp/types.js +4 -7
- package/lib/network/reqresp/types.js.map +1 -1
- package/lib/network/subnets/attnetsService.d.ts +35 -5
- package/lib/network/subnets/attnetsService.d.ts.map +1 -1
- package/lib/network/subnets/attnetsService.js +84 -6
- package/lib/network/subnets/attnetsService.js.map +1 -1
- package/lib/network/subnets/interface.d.ts +7 -0
- package/lib/network/subnets/interface.d.ts.map +1 -1
- package/lib/network/subnets/interface.js.map +1 -1
- package/lib/node/nodejs.d.ts +3 -1
- package/lib/node/nodejs.d.ts.map +1 -1
- package/lib/node/nodejs.js +47 -21
- package/lib/node/nodejs.js.map +1 -1
- package/lib/node/options.d.ts +3 -1
- package/lib/node/options.d.ts.map +1 -1
- package/lib/node/options.js +4 -2
- package/lib/node/options.js.map +1 -1
- package/lib/sync/interface.d.ts.map +1 -1
- package/lib/sync/interface.js.map +1 -1
- package/lib/sync/range/batch.d.ts +2 -3
- package/lib/sync/range/batch.d.ts.map +1 -1
- package/lib/sync/range/batch.js +9 -22
- package/lib/sync/range/batch.js.map +1 -1
- package/lib/sync/range/chain.d.ts.map +1 -1
- package/lib/sync/range/chain.js +2 -15
- package/lib/sync/range/chain.js.map +1 -1
- package/lib/sync/sync.d.ts +15 -0
- package/lib/sync/sync.d.ts.map +1 -1
- package/lib/sync/sync.js +103 -25
- package/lib/sync/sync.js.map +1 -1
- package/lib/sync/unknownBlock.d.ts.map +1 -1
- package/lib/sync/unknownBlock.js +43 -25
- package/lib/sync/unknownBlock.js.map +1 -1
- package/lib/sync/utils/downloadByRange.d.ts +6 -34
- package/lib/sync/utils/downloadByRange.d.ts.map +1 -1
- package/lib/sync/utils/downloadByRange.js +24 -128
- package/lib/sync/utils/downloadByRange.js.map +1 -1
- package/lib/sync/utils/downloadByRoot.d.ts +2 -18
- package/lib/sync/utils/downloadByRoot.d.ts.map +1 -1
- package/lib/sync/utils/downloadByRoot.js +14 -99
- package/lib/sync/utils/downloadByRoot.js.map +1 -1
- package/lib/util/blobs.d.ts +1 -7
- package/lib/util/blobs.d.ts.map +1 -1
- package/lib/util/blobs.js +0 -19
- package/lib/util/blobs.js.map +1 -1
- package/lib/util/execution.d.ts +3 -4
- package/lib/util/execution.d.ts.map +1 -1
- package/lib/util/execution.js +1 -73
- package/lib/util/execution.js.map +1 -1
- package/lib/util/file.d.ts.map +1 -1
- package/lib/util/file.js +8 -9
- package/lib/util/file.js.map +1 -1
- package/lib/util/queue/itemQueue.js +1 -1
- package/lib/util/queue/itemQueue.js.map +1 -1
- package/lib/util/sszBytes.d.ts +5 -1
- package/lib/util/sszBytes.d.ts.map +1 -1
- package/lib/util/sszBytes.js +36 -19
- package/lib/util/sszBytes.js.map +1 -1
- package/lib/util/types.d.ts +0 -5
- package/lib/util/types.d.ts.map +1 -1
- package/lib/util/types.js +1 -2
- package/lib/util/types.js.map +1 -1
- package/package.json +31 -32
- package/src/api/impl/api.ts +1 -1
- package/src/api/impl/beacon/blocks/index.ts +81 -126
- package/src/api/impl/beacon/index.ts +3 -1
- package/src/api/impl/beacon/pool/index.ts +31 -1
- package/src/api/impl/beacon/state/index.ts +10 -1
- package/src/api/impl/beacon/state/utils.ts +20 -10
- package/src/api/impl/debug/index.ts +4 -0
- package/src/api/impl/validator/index.ts +177 -38
- package/src/api/options.ts +3 -0
- package/src/chain/GetBlobsTracker.ts +82 -52
- package/src/chain/archiveStore/archiveStore.ts +1 -0
- package/src/chain/archiveStore/utils/archiveBlocks.ts +76 -130
- package/src/chain/blocks/blockInput/blockInput.ts +11 -343
- package/src/chain/blocks/blockInput/errors.ts +1 -2
- package/src/chain/blocks/blockInput/types.ts +2 -20
- package/src/chain/blocks/importBlock.ts +58 -77
- package/src/chain/blocks/importExecutionPayload.ts +123 -36
- package/src/chain/blocks/index.ts +11 -4
- package/src/chain/blocks/payloadEnvelopeProcessor.ts +35 -24
- package/src/chain/blocks/types.ts +8 -29
- package/src/chain/blocks/verifyBlock.ts +31 -16
- package/src/chain/blocks/verifyBlocksDataAvailability.ts +16 -2
- package/src/chain/blocks/verifyBlocksExecutionPayloads.ts +9 -6
- package/src/chain/blocks/verifyBlocksSanityChecks.ts +4 -1
- package/src/chain/blocks/verifyBlocksSignatures.ts +10 -5
- package/src/chain/blocks/verifyPayloadsDataAvailability.ts +14 -6
- package/src/chain/blocks/writeBlockInputToDb.ts +6 -29
- package/src/chain/bls/interface.ts +2 -0
- package/src/chain/bls/multithread/index.ts +48 -24
- package/src/chain/bls/multithread/types.ts +1 -1
- package/src/chain/bls/multithread/worker.ts +1 -5
- package/src/chain/bls/singleThread.ts +1 -1
- package/src/chain/bls/utils.ts +1 -1
- package/src/chain/chain.ts +144 -42
- package/src/chain/emitter.ts +8 -8
- package/src/chain/errors/blockError.ts +1 -1
- package/src/chain/errors/executionPayloadBid.ts +12 -0
- package/src/chain/errors/executionPayloadEnvelope.ts +8 -0
- package/src/chain/errors/inclusionList.ts +38 -0
- package/src/chain/errors/index.ts +1 -1
- package/src/chain/forkChoice/index.ts +11 -0
- package/src/chain/forkChoiceExecutionEngine.ts +183 -0
- package/src/chain/interface.ts +11 -6
- package/src/chain/opPools/aggregatedAttestationPool.ts +246 -43
- package/src/chain/opPools/attestationPool.ts +16 -4
- package/src/chain/opPools/inclusionListStore.ts +208 -0
- package/src/chain/opPools/index.ts +2 -0
- package/src/chain/opPools/payloadAttestationPool.ts +18 -7
- package/src/chain/opPools/singleAttestationPool.ts +287 -0
- package/src/chain/opPools/syncCommitteeMessagePool.ts +10 -3
- package/src/chain/opPools/syncContributionAndProofPool.ts +13 -3
- package/src/chain/opPools/utils.ts +1 -1
- package/src/chain/options.ts +5 -4
- package/src/chain/produceBlock/produceBlockBody.ts +67 -22
- package/src/chain/proposerTracker.ts +94 -0
- package/src/chain/regen/interface.ts +2 -2
- package/src/chain/regen/queued.ts +6 -4
- package/src/chain/seenCache/seenGossipBlockInput.ts +9 -93
- package/src/chain/validation/aggregateAndProof.ts +1 -1
- package/src/chain/validation/attestation.ts +1 -1
- package/src/chain/validation/executionPayloadBid.ts +54 -183
- package/src/chain/validation/executionPayloadEnvelope.ts +68 -1
- package/src/chain/validation/inclusionList.ts +192 -0
- package/src/chain/validation/index.ts +1 -0
- package/src/chain/validation/syncCommittee.ts +31 -15
- package/src/chain/validation/syncCommitteeContributionAndProof.ts +13 -0
- package/src/chain/validatorMonitor.ts +0 -6
- package/src/db/beacon.ts +44 -0
- package/src/db/dataColumnStore.ts +2 -4
- package/src/db/flatFileStore/flatFileStore.ts +7 -7
- package/src/db/flatFileStore/slotIndex.ts +4 -3
- package/src/db/interface.ts +2 -0
- package/src/db/repositories/blobSidecars.ts +0 -1
- package/src/db/repositories/dataColumnSidecarArchive.ts +20 -0
- package/src/execution/builder/apiClient.ts +16 -13
- package/src/execution/builder/http.ts +4 -0
- package/src/execution/builder/validateBid.ts +23 -2
- package/src/execution/engine/blobVersionedHashes.ts +1 -1
- package/src/execution/engine/disabled.ts +4 -0
- package/src/execution/engine/http.ts +59 -47
- package/src/execution/engine/index.ts +1 -1
- package/src/execution/engine/interface.ts +46 -13
- package/src/execution/engine/jsonRpcTransport.ts +56 -31
- package/src/execution/engine/mock.ts +32 -14
- package/src/execution/engine/payloadIdCache.ts +24 -6
- package/src/execution/engine/restTransport.ts +18 -23
- package/src/execution/engine/sszTypes.ts +0 -9
- package/src/execution/engine/transport.ts +13 -17
- package/src/execution/engine/types.ts +44 -24
- package/src/execution/engine/utils.ts +4 -2
- package/src/index.ts +2 -0
- package/src/metrics/metrics/beacon.ts +37 -30
- package/src/metrics/metrics/lodestar.ts +106 -18
- package/src/metrics/server/http.ts +5 -5
- package/src/monitoring/service.ts +1 -1
- package/src/network/core/networkCore.ts +11 -1
- package/src/network/core/networkCoreWorker.ts +2 -0
- package/src/network/core/networkCoreWorkerHandler.ts +8 -1
- package/src/network/core/types.ts +6 -1
- package/src/network/gossip/gossipsub.ts +11 -0
- package/src/network/gossip/interface.ts +5 -5
- package/src/network/gossip/topic.ts +14 -25
- package/src/network/interface.ts +4 -5
- package/src/network/libp2p/index.ts +5 -1
- package/src/network/network.ts +66 -58
- package/src/network/options.ts +4 -0
- package/src/network/peers/peerManager.ts +28 -3
- package/src/network/peers/utils/assertPeerRelevance.ts +39 -23
- package/src/network/peers/utils/prioritizePeers.ts +14 -22
- package/src/network/peers/utils/subnetMap.ts +6 -3
- package/src/network/processor/extractSlotRootFns.ts +0 -9
- package/src/network/processor/gossipHandlers.ts +150 -183
- package/src/network/processor/gossipQueues/index.ts +6 -6
- package/src/network/processor/gossipValidatorFn.ts +5 -5
- package/src/network/processor/index.ts +48 -27
- package/src/network/processor/types.ts +1 -1
- package/src/network/reqresp/ReqRespBeaconNode.ts +7 -7
- package/src/network/reqresp/handlers/beaconBlocksByRange.ts +2 -2
- package/src/network/reqresp/handlers/inclusionListsByIndices.ts +44 -0
- package/src/network/reqresp/handlers/index.ts +5 -17
- package/src/network/reqresp/protocols.ts +6 -12
- package/src/network/reqresp/rateLimit.ts +5 -17
- package/src/network/reqresp/types.ts +6 -13
- package/src/network/subnets/attnetsService.ts +94 -6
- package/src/network/subnets/interface.ts +7 -0
- package/src/node/nodejs.ts +58 -22
- package/src/node/options.ts +9 -6
- package/src/sync/interface.ts +1 -0
- package/src/sync/range/batch.ts +9 -21
- package/src/sync/range/chain.ts +2 -14
- package/src/sync/sync.ts +108 -26
- package/src/sync/unknownBlock.ts +48 -36
- package/src/sync/utils/downloadByRange.ts +31 -230
- package/src/sync/utils/downloadByRoot.ts +15 -142
- package/src/util/blobs.ts +0 -34
- package/src/util/execution.ts +8 -102
- package/src/util/file.ts +8 -9
- package/src/util/queue/itemQueue.ts +1 -1
- package/src/util/sszBytes.ts +42 -24
- package/src/util/types.ts +1 -8
- package/lib/chain/errors/blobSidecarError.d.ts +0 -108
- package/lib/chain/errors/blobSidecarError.d.ts.map +0 -1
- package/lib/chain/errors/blobSidecarError.js +0 -38
- package/lib/chain/errors/blobSidecarError.js.map +0 -1
- package/lib/chain/validation/blobSidecar.d.ts +0 -16
- package/lib/chain/validation/blobSidecar.d.ts.map +0 -1
- package/lib/chain/validation/blobSidecar.js +0 -276
- package/lib/chain/validation/blobSidecar.js.map +0 -1
- package/lib/network/reqresp/handlers/blobSidecarsByRange.d.ts +0 -9
- package/lib/network/reqresp/handlers/blobSidecarsByRange.d.ts.map +0 -1
- package/lib/network/reqresp/handlers/blobSidecarsByRange.js +0 -91
- package/lib/network/reqresp/handlers/blobSidecarsByRange.js.map +0 -1
- package/lib/network/reqresp/handlers/blobSidecarsByRoot.d.ts +0 -5
- package/lib/network/reqresp/handlers/blobSidecarsByRoot.d.ts.map +0 -1
- package/lib/network/reqresp/handlers/blobSidecarsByRoot.js +0 -46
- package/lib/network/reqresp/handlers/blobSidecarsByRoot.js.map +0 -1
- package/src/chain/errors/blobSidecarError.ts +0 -70
- package/src/chain/validation/blobSidecar.ts +0 -357
- package/src/network/reqresp/handlers/blobSidecarsByRange.ts +0 -133
- package/src/network/reqresp/handlers/blobSidecarsByRoot.ts +0 -69
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import {ForkName} from "@lodestar/params";
|
|
2
|
-
import {ColumnIndex, DataColumnSidecar, RootHex, SignedBeaconBlock, Slot,
|
|
2
|
+
import {ColumnIndex, DataColumnSidecar, RootHex, SignedBeaconBlock, Slot, fulu} from "@lodestar/types";
|
|
3
3
|
import {VersionedHashes} from "../../../execution/index.js";
|
|
4
4
|
|
|
5
5
|
export enum DAType {
|
|
6
6
|
PreData = "pre-data",
|
|
7
|
-
Blobs = "blobs",
|
|
8
7
|
Columns = "columns",
|
|
9
8
|
NoData = "no-data",
|
|
10
9
|
}
|
|
11
10
|
|
|
12
|
-
export type DAData = null |
|
|
11
|
+
export type DAData = null | fulu.DataColumnSidecar[];
|
|
13
12
|
|
|
14
13
|
/**
|
|
15
14
|
* Represents were input originated. Blocks and Data can come from different
|
|
@@ -37,11 +36,6 @@ export type LogMetaBasic = {
|
|
|
37
36
|
timeCreatedSec: number;
|
|
38
37
|
};
|
|
39
38
|
|
|
40
|
-
export type LogMetaBlobs = LogMetaBasic & {
|
|
41
|
-
expectedBlobs: number | string;
|
|
42
|
-
receivedBlobs: number;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
39
|
export type LogMetaColumns = LogMetaBasic & {
|
|
46
40
|
expectedColumns: number;
|
|
47
41
|
receivedColumns: number;
|
|
@@ -55,8 +49,6 @@ export type SourceMeta = {
|
|
|
55
49
|
|
|
56
50
|
export type BlockWithSource = SourceMeta & {block: SignedBeaconBlock; blockRootHex: RootHex};
|
|
57
51
|
|
|
58
|
-
export type BlobWithSource = SourceMeta & {blobSidecar: deneb.BlobSidecar};
|
|
59
|
-
|
|
60
52
|
export type ColumnWithSource = SourceMeta & {columnSidecar: fulu.DataColumnSidecar};
|
|
61
53
|
|
|
62
54
|
export type BlockHeaderMeta = {
|
|
@@ -82,20 +74,10 @@ export type AddBlock<F extends ForkName = ForkName> = SourceMeta & {
|
|
|
82
74
|
blockRootHex: string;
|
|
83
75
|
};
|
|
84
76
|
|
|
85
|
-
export type AddBlob = BlobWithSource & {
|
|
86
|
-
blockRootHex: RootHex;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
77
|
export type AddColumn = ColumnWithSource & {
|
|
90
78
|
blockRootHex: RootHex;
|
|
91
79
|
};
|
|
92
80
|
|
|
93
|
-
export type BlobMeta = {
|
|
94
|
-
index: number;
|
|
95
|
-
blockRoot: Uint8Array;
|
|
96
|
-
versionedHash: Uint8Array;
|
|
97
|
-
};
|
|
98
|
-
|
|
99
81
|
export type MissingColumnMeta = {
|
|
100
82
|
missing: ColumnIndex[];
|
|
101
83
|
versionedHashes: VersionedHashes;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {BitArray} from "@chainsafe/ssz";
|
|
2
2
|
import {routes} from "@lodestar/api";
|
|
3
3
|
import {
|
|
4
|
-
AncestorStatus,
|
|
5
|
-
ExecutionStatus,
|
|
6
4
|
ForkChoiceError,
|
|
7
5
|
ForkChoiceErrorCode,
|
|
6
|
+
InvalidBlockCode,
|
|
8
7
|
NotReorgedReason,
|
|
8
|
+
ProtoBlock,
|
|
9
9
|
getFinalizedExecutionBlockHash,
|
|
10
10
|
getSafeExecutionBlockHash,
|
|
11
11
|
} from "@lodestar/fork-choice";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
IBeaconStateView,
|
|
22
22
|
RootCache,
|
|
23
23
|
computeEpochAtSlot,
|
|
24
|
-
|
|
24
|
+
computeTimeAtSlotMs,
|
|
25
25
|
getBeaconCommittees,
|
|
26
26
|
isStatePostAltair,
|
|
27
27
|
isStatePostBellatrix,
|
|
@@ -43,11 +43,13 @@ import {callInNextEventLoop} from "../../util/eventLoop.js";
|
|
|
43
43
|
import {isOptimisticBlock} from "../../util/forkChoice.js";
|
|
44
44
|
import {isQueueErrorAborted} from "../../util/queue/index.js";
|
|
45
45
|
import type {BeaconChain} from "../chain.js";
|
|
46
|
-
import {ChainEvent
|
|
46
|
+
import {ChainEvent} from "../emitter.js";
|
|
47
|
+
import {BlockError, BlockErrorCode} from "../errors/index.js";
|
|
47
48
|
import {ForkchoiceCaller} from "../forkChoice/index.js";
|
|
49
|
+
import {IncludedAttesters} from "../opPools/singleAttestationPool.js";
|
|
48
50
|
import {REPROCESS_MIN_TIME_TO_NEXT_SLOT_BPS} from "../reprocess.js";
|
|
49
51
|
import {toCheckpointHex} from "../stateCache/persistentCheckpointsCache.js";
|
|
50
|
-
import {
|
|
52
|
+
import {isBlockInputColumns} from "./blockInput/blockInput.js";
|
|
51
53
|
import {AttestationImportOpt, FullyVerifiedBlock, ImportBlockOpts} from "./types.js";
|
|
52
54
|
import {getCheckpointFromState} from "./utils/checkpoint.js";
|
|
53
55
|
|
|
@@ -94,8 +96,8 @@ export async function importBlock(
|
|
|
94
96
|
fullyVerifiedBlock: FullyVerifiedBlock,
|
|
95
97
|
opts: ImportBlockOpts
|
|
96
98
|
): Promise<void> {
|
|
97
|
-
const {blockInput, postState, parentBlockSlot, dataAvailabilityStatus, indexedAttestations} =
|
|
98
|
-
|
|
99
|
+
const {blockInput, postState, parentBlockSlot, executionStatus, dataAvailabilityStatus, indexedAttestations} =
|
|
100
|
+
fullyVerifiedBlock;
|
|
99
101
|
const block = blockInput.getBlock();
|
|
100
102
|
const source = blockInput.getBlockSource();
|
|
101
103
|
const {slot: blockSlot} = block.message;
|
|
@@ -105,8 +107,9 @@ export async function importBlock(
|
|
|
105
107
|
const currentEpoch = computeEpochAtSlot(currentSlot);
|
|
106
108
|
const blockEpoch = computeEpochAtSlot(blockSlot);
|
|
107
109
|
const prevFinalizedEpoch = this.forkChoice.getFinalizedCheckpoint().epoch;
|
|
108
|
-
const
|
|
109
|
-
fullyVerifiedBlock.seenTimestampSec
|
|
110
|
+
const receiveDelayMs =
|
|
111
|
+
Math.round(fullyVerifiedBlock.seenTimestampSec * 1000) -
|
|
112
|
+
computeTimeAtSlotMs(this.config, blockSlot, postState.genesisTime * 1000);
|
|
110
113
|
const recvToValLatency = Date.now() / 1000 - (opts.seenTimestampSec ?? Date.now() / 1000);
|
|
111
114
|
const fork = this.config.getForkSeq(blockSlot);
|
|
112
115
|
|
|
@@ -130,35 +133,30 @@ export async function importBlock(
|
|
|
130
133
|
|
|
131
134
|
// Should compute checkpoint balances before forkchoice.onBlock
|
|
132
135
|
this.checkpointBalancesCache.processState(blockRootHex, postState);
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
136
|
+
const importDelayMs = this.clock.msFromSlot(blockSlot);
|
|
137
|
+
let blockSummary: ProtoBlock;
|
|
138
|
+
try {
|
|
139
|
+
blockSummary = this.forkChoice.onBlock(
|
|
140
|
+
block.message,
|
|
141
|
+
postState,
|
|
142
|
+
receiveDelayMs,
|
|
143
|
+
importDelayMs,
|
|
144
|
+
currentSlot,
|
|
145
|
+
executionStatus,
|
|
146
|
+
dataAvailabilityStatus
|
|
147
|
+
);
|
|
148
|
+
} catch (e) {
|
|
149
|
+
// The parent can be invalidated by a forkchoiceUpdated verdict after verifyBlocksSanityChecks passed
|
|
150
|
+
if (
|
|
151
|
+
e instanceof ForkChoiceError &&
|
|
152
|
+
e.type.code === ForkChoiceErrorCode.INVALID_BLOCK &&
|
|
153
|
+
e.type.err.code === InvalidBlockCode.PARENT_EXECUTION_INVALID
|
|
154
|
+
) {
|
|
155
|
+
throw new BlockError(block, {code: BlockErrorCode.PARENT_EXECUTION_INVALID, parentRoot: e.type.err.root});
|
|
147
156
|
}
|
|
148
|
-
|
|
157
|
+
throw e;
|
|
149
158
|
}
|
|
150
159
|
|
|
151
|
-
const importDelaySec = this.clock.secFromSlot(blockSlot);
|
|
152
|
-
const blockSummary = this.forkChoice.onBlock(
|
|
153
|
-
block.message,
|
|
154
|
-
postState,
|
|
155
|
-
receiveDelaySec,
|
|
156
|
-
importDelaySec,
|
|
157
|
-
currentSlot,
|
|
158
|
-
executionStatus,
|
|
159
|
-
dataAvailabilityStatus
|
|
160
|
-
);
|
|
161
|
-
|
|
162
160
|
// This adds the state necessary to process the next block
|
|
163
161
|
// Some block event handlers require state being in state cache so need to do this before emitting EventType.block
|
|
164
162
|
this.regen.processState(blockRootHex, postState);
|
|
@@ -175,6 +173,9 @@ export async function importBlock(
|
|
|
175
173
|
// Only process attestations of blocks with relevant attestations for the fork-choice:
|
|
176
174
|
// If current epoch is N, and block is epoch X, block may include attestations for epoch X or X - 1.
|
|
177
175
|
// The latest block that is useful is at epoch N - 1 which may include attestations for epoch N - 1 or N - 2.
|
|
176
|
+
// the pool is empty outside the slots before a local block proposal, nothing to prune then
|
|
177
|
+
const pruneSingleAttestations = fork >= ForkSeq.electra && !this.singleAttestationPool.isEmpty();
|
|
178
|
+
const includedAttesters: IncludedAttesters[] = [];
|
|
178
179
|
if (importsBlockAttestations(opts, blockEpoch, currentEpoch)) {
|
|
179
180
|
const attestations = block.message.body.attestations;
|
|
180
181
|
const rootCache = new RootCache(postState);
|
|
@@ -189,6 +190,14 @@ export async function importBlock(
|
|
|
189
190
|
const {target, beaconBlockRoot} = attestation.data;
|
|
190
191
|
|
|
191
192
|
const attDataRoot = toRootHex(ssz.phase0.AttestationData.hashTreeRoot(indexedAttestation.data));
|
|
193
|
+
// the block includes these attesters even if fork choice below rejects the vote
|
|
194
|
+
if (pruneSingleAttestations) {
|
|
195
|
+
includedAttesters.push({
|
|
196
|
+
slot: attestation.data.slot,
|
|
197
|
+
attDataRootHex: attDataRoot,
|
|
198
|
+
attestingIndices: indexedAttestation.attestingIndices,
|
|
199
|
+
});
|
|
200
|
+
}
|
|
192
201
|
addAttestation.call(
|
|
193
202
|
this,
|
|
194
203
|
postState,
|
|
@@ -320,19 +329,19 @@ export async function importBlock(
|
|
|
320
329
|
});
|
|
321
330
|
}
|
|
322
331
|
|
|
332
|
+
// only a block that becomes head prunes, not a side-branch import
|
|
333
|
+
if (pruneSingleAttestations && newHead.blockRoot === blockRootHex) {
|
|
334
|
+
callInNextEventLoop(() => {
|
|
335
|
+
const deleted = this.singleAttestationPool.onHead(blockRootHex, newHead.parentRoot, includedAttesters);
|
|
336
|
+
this.metrics?.opPool.singleAttestationPool.deletedByBlock.inc(deleted);
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
|
|
323
340
|
if (newHead.blockRoot !== oldHead.blockRoot) {
|
|
324
|
-
|
|
325
|
-
this.regen.updateHeadState(newHead, postState);
|
|
341
|
+
this.onHeadChanged(oldHead, newHead, postState);
|
|
326
342
|
|
|
327
343
|
const delaySec = this.clock.secFromSlot(newHead.slot);
|
|
328
|
-
this.logger.verbose("New chain head", {
|
|
329
|
-
slot: newHead.slot,
|
|
330
|
-
root: newHead.blockRoot,
|
|
331
|
-
delaySec,
|
|
332
|
-
});
|
|
333
|
-
|
|
334
344
|
if (this.metrics) {
|
|
335
|
-
this.metrics.headSlot.set(newHead.slot);
|
|
336
345
|
// Only track "recent" blocks. Otherwise sync can distort this metrics heavily.
|
|
337
346
|
// We want to track recent blocks coming from gossip, unknown block sync, and API.
|
|
338
347
|
const headFork = this.config.getForkName(newHead.slot);
|
|
@@ -345,32 +354,6 @@ export async function importBlock(
|
|
|
345
354
|
}
|
|
346
355
|
}
|
|
347
356
|
|
|
348
|
-
this.onNewHead(newHead);
|
|
349
|
-
|
|
350
|
-
this.metrics?.forkChoice.changedHead.inc();
|
|
351
|
-
|
|
352
|
-
const ancestorResult = this.forkChoice.getCommonAncestorDepth(oldHead, newHead);
|
|
353
|
-
if (ancestorResult.code === AncestorStatus.CommonAncestor) {
|
|
354
|
-
// CommonAncestor = chain reorg, old head and new head not direct descendants
|
|
355
|
-
|
|
356
|
-
const forkChoiceReorgEventData: ReorgEventData = {
|
|
357
|
-
depth: ancestorResult.depth,
|
|
358
|
-
epoch: computeEpochAtSlot(newHead.slot),
|
|
359
|
-
slot: newHead.slot,
|
|
360
|
-
newHeadBlock: newHead.blockRoot,
|
|
361
|
-
oldHeadBlock: oldHead.blockRoot,
|
|
362
|
-
newHeadState: newHead.stateRoot,
|
|
363
|
-
oldHeadState: oldHead.stateRoot,
|
|
364
|
-
executionOptimistic: isOptimisticBlock(newHead),
|
|
365
|
-
};
|
|
366
|
-
|
|
367
|
-
this.emitter.emit(routes.events.EventType.chainReorg, forkChoiceReorgEventData);
|
|
368
|
-
this.logger.verbose("Chain reorg", forkChoiceReorgEventData);
|
|
369
|
-
|
|
370
|
-
this.metrics?.forkChoice.reorg.inc();
|
|
371
|
-
this.metrics?.forkChoice.reorgDistance.observe(ancestorResult.depth);
|
|
372
|
-
}
|
|
373
|
-
|
|
374
357
|
// Lightclient server support (only after altair)
|
|
375
358
|
// - Persist state witness
|
|
376
359
|
// - Use block's syncAggregate
|
|
@@ -417,7 +400,7 @@ export async function importBlock(
|
|
|
417
400
|
// 4) Block meets the criteria of being re-orged out (this is also checked inside the function)
|
|
418
401
|
const result = this.forkChoice.shouldOverrideForkChoiceUpdate(
|
|
419
402
|
blockSummary,
|
|
420
|
-
this.clock.
|
|
403
|
+
this.clock.msFromSlot(currentSlot),
|
|
421
404
|
currentSlot
|
|
422
405
|
);
|
|
423
406
|
shouldOverrideFcu = result.shouldOverrideFcu;
|
|
@@ -458,7 +441,8 @@ export async function importBlock(
|
|
|
458
441
|
* - `headBlockHash !== null` -> Pre BELLATRIX_EPOCH
|
|
459
442
|
* - `headBlockHash !== ZERO_HASH` -> Pre TTD
|
|
460
443
|
*/
|
|
461
|
-
const
|
|
444
|
+
const fcuHead = this.forkChoice.getHead();
|
|
445
|
+
const headBlockHash = fcuHead.executionPayloadBlockHash ?? ZERO_HASH_HEX;
|
|
462
446
|
/**
|
|
463
447
|
* After BELLATRIX_EPOCH and TTD it's okay to send a zero hash block hash for the finalized block. This will happen if
|
|
464
448
|
* the current finalized block does not contain any execution payload at all (pre MERGE_EPOCH) or if it contains a
|
|
@@ -469,7 +453,8 @@ export async function importBlock(
|
|
|
469
453
|
if (headBlockHash !== ZERO_HASH_HEX) {
|
|
470
454
|
this.executionEngine
|
|
471
455
|
.notifyForkchoiceUpdate(
|
|
472
|
-
this.config.getForkName(
|
|
456
|
+
this.config.getForkName(fcuHead.slot),
|
|
457
|
+
fcuHead.blockRoot,
|
|
473
458
|
headBlockHash,
|
|
474
459
|
safeBlockHash,
|
|
475
460
|
finalizedBlockHash
|
|
@@ -595,10 +580,6 @@ export async function importBlock(
|
|
|
595
580
|
for (const {source} of blockInput.getSampledColumnsWithSource()) {
|
|
596
581
|
this.metrics?.dataColumns.bySource.inc({source});
|
|
597
582
|
}
|
|
598
|
-
} else if (isBlockInputBlobs(blockInput)) {
|
|
599
|
-
for (const {source} of blockInput.getAllBlobsWithSource()) {
|
|
600
|
-
this.metrics?.importBlock.blobsBySource.inc({blobsSource: source});
|
|
601
|
-
}
|
|
602
583
|
}
|
|
603
584
|
|
|
604
585
|
const reprocessGuardSec =
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
+
import {SerializedList} from "@chainsafe/ssz";
|
|
1
2
|
import {routes} from "@lodestar/api";
|
|
2
3
|
import {
|
|
3
4
|
ExecutionStatus,
|
|
5
|
+
ForkChoiceError,
|
|
6
|
+
ForkChoiceErrorCode,
|
|
7
|
+
InvalidBlockCode,
|
|
4
8
|
PayloadExecutionStatus,
|
|
5
9
|
getFinalizedExecutionBlockHash,
|
|
6
10
|
getSafeExecutionBlockHash,
|
|
7
11
|
} from "@lodestar/fork-choice";
|
|
8
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
DataAvailabilityStatus,
|
|
14
|
+
computeEpochAtSlot,
|
|
15
|
+
isStatePostGloas,
|
|
16
|
+
isStatePostHeze,
|
|
17
|
+
} from "@lodestar/state-transition";
|
|
18
|
+
import {RootHex, bellatrix} from "@lodestar/types";
|
|
9
19
|
import {isErrorAborted} from "@lodestar/utils";
|
|
10
20
|
import {ExecutionPayloadStatus} from "../../execution/index.js";
|
|
21
|
+
import {getShufflingDependentRoot} from "../../util/dependentRoot.js";
|
|
11
22
|
import {isQueueErrorAborted} from "../../util/queue/index.js";
|
|
12
23
|
import {BeaconChain} from "../chain.js";
|
|
13
24
|
import {RegenCaller} from "../regen/interface.js";
|
|
@@ -18,7 +29,6 @@ import {
|
|
|
18
29
|
verifyExecutionPayloadEnvelope,
|
|
19
30
|
verifyExecutionPayloadEnvelopeSignature,
|
|
20
31
|
} from "./verifyExecutionPayloadEnvelope.js";
|
|
21
|
-
import {verifyPayloadsDataAvailability} from "./verifyPayloadsDataAvailability.js";
|
|
22
32
|
|
|
23
33
|
const EVENTSTREAM_EMIT_RECENT_EXECUTION_PAYLOAD_SLOTS = 64;
|
|
24
34
|
|
|
@@ -26,9 +36,11 @@ export enum PayloadErrorCode {
|
|
|
26
36
|
EXECUTION_ENGINE_INVALID = "PAYLOAD_ERROR_EXECUTION_ENGINE_INVALID",
|
|
27
37
|
EXECUTION_ENGINE_ERROR = "PAYLOAD_ERROR_EXECUTION_ENGINE_ERROR",
|
|
28
38
|
BLOCK_NOT_IN_FORK_CHOICE = "PAYLOAD_ERROR_BLOCK_NOT_IN_FORK_CHOICE",
|
|
39
|
+
BLOCK_EXECUTION_INVALID = "PAYLOAD_ERROR_BLOCK_EXECUTION_INVALID",
|
|
29
40
|
MISS_BLOCK_STATE = "PAYLOAD_ERROR_MISS_BLOCK_STATE",
|
|
30
41
|
ENVELOPE_VERIFICATION_ERROR = "PAYLOAD_ERROR_ENVELOPE_VERIFICATION_ERROR",
|
|
31
42
|
INVALID_SIGNATURE = "PAYLOAD_ERROR_INVALID_SIGNATURE",
|
|
43
|
+
DATA_UNAVAILABLE = "PAYLOAD_ERROR_DATA_UNAVAILABLE",
|
|
32
44
|
}
|
|
33
45
|
|
|
34
46
|
export type PayloadErrorType =
|
|
@@ -46,6 +58,10 @@ export type PayloadErrorType =
|
|
|
46
58
|
code: PayloadErrorCode.BLOCK_NOT_IN_FORK_CHOICE;
|
|
47
59
|
blockRootHex: string;
|
|
48
60
|
}
|
|
61
|
+
| {
|
|
62
|
+
code: PayloadErrorCode.BLOCK_EXECUTION_INVALID;
|
|
63
|
+
blockRootHex: string;
|
|
64
|
+
}
|
|
49
65
|
| {
|
|
50
66
|
code: PayloadErrorCode.MISS_BLOCK_STATE;
|
|
51
67
|
blockRootHex: string;
|
|
@@ -56,6 +72,9 @@ export type PayloadErrorType =
|
|
|
56
72
|
}
|
|
57
73
|
| {
|
|
58
74
|
code: PayloadErrorCode.INVALID_SIGNATURE;
|
|
75
|
+
}
|
|
76
|
+
| {
|
|
77
|
+
code: PayloadErrorCode.DATA_UNAVAILABLE;
|
|
59
78
|
};
|
|
60
79
|
|
|
61
80
|
export class PayloadError extends Error {
|
|
@@ -87,7 +106,8 @@ function toForkChoiceExecutionStatus(status: ExecutionPayloadStatus): PayloadExe
|
|
|
87
106
|
* are applied on the next block via processParentExecutionPayload.
|
|
88
107
|
*
|
|
89
108
|
* The DA wait must have run upstream (range sync awaits DA in `verifyBlocksInEpoch` for the
|
|
90
|
-
* whole segment; gossip / API path
|
|
109
|
+
* whole segment; the gossip / API / unknown-payload sync path waits in `PayloadEnvelopeProcessor`
|
|
110
|
+
* before the import is queued).
|
|
91
111
|
*
|
|
92
112
|
* Steps:
|
|
93
113
|
* 1. Emit `execution_payload_available` event for payload attestation
|
|
@@ -132,6 +152,13 @@ export async function importExecutionPayload(
|
|
|
132
152
|
blockRootHex,
|
|
133
153
|
});
|
|
134
154
|
}
|
|
155
|
+
// The payload chain this block builds on was invalidated, a VALID verdict here would contradict it
|
|
156
|
+
if (protoBlock.executionStatus === ExecutionStatus.Invalid) {
|
|
157
|
+
throw new PayloadError(payloadInput, {
|
|
158
|
+
code: PayloadErrorCode.BLOCK_EXECUTION_INVALID,
|
|
159
|
+
blockRootHex,
|
|
160
|
+
});
|
|
161
|
+
}
|
|
135
162
|
|
|
136
163
|
// 3. Regenerate state for envelope verification
|
|
137
164
|
const blockState = await this.regen
|
|
@@ -172,6 +199,37 @@ export async function importExecutionPayload(
|
|
|
172
199
|
);
|
|
173
200
|
}
|
|
174
201
|
|
|
202
|
+
// Timely inclusion lists of the preceding slot, keyed by that slot's dependent root on the block's branch and
|
|
203
|
+
// resolved from the parent, which is at or before that slot. Gossip validation only accepts lists whose dependent
|
|
204
|
+
// block is in fork choice, so a dependent root fork choice cannot resolve (below the anchor after checkpoint sync)
|
|
205
|
+
// keys no stored list
|
|
206
|
+
let inclusionListTransactions: bellatrix.Transactions | undefined;
|
|
207
|
+
if (isStatePostHeze(blockState)) {
|
|
208
|
+
const inclusionListSlot = protoBlock.slot - 1;
|
|
209
|
+
let dependentRoot: RootHex | null = null;
|
|
210
|
+
const parentBlock = this.forkChoice.getBlockHexDefaultStatus(protoBlock.parentRoot);
|
|
211
|
+
if (parentBlock !== null) {
|
|
212
|
+
try {
|
|
213
|
+
dependentRoot = getShufflingDependentRoot(
|
|
214
|
+
this.forkChoice,
|
|
215
|
+
computeEpochAtSlot(inclusionListSlot),
|
|
216
|
+
computeEpochAtSlot(parentBlock.slot),
|
|
217
|
+
parentBlock
|
|
218
|
+
);
|
|
219
|
+
} catch (e) {
|
|
220
|
+
this.logger.debug(
|
|
221
|
+
"Inclusion list dependent root not in fork choice, importing payload without lists",
|
|
222
|
+
{slot, root: blockRootHex},
|
|
223
|
+
e as Error
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
inclusionListTransactions =
|
|
228
|
+
dependentRoot === null
|
|
229
|
+
? SerializedList.empty()
|
|
230
|
+
: this.inclusionListStore.getInclusionListTransactions(inclusionListSlot, dependentRoot, true);
|
|
231
|
+
}
|
|
232
|
+
|
|
175
233
|
// 4a. Run EL and signature verification in parallel
|
|
176
234
|
const logCtx = {slot, root: blockRootHex, executionBlock: envelope.payload.blockNumber};
|
|
177
235
|
this.logger.debug("Call engine api newPayload", logCtx);
|
|
@@ -182,7 +240,8 @@ export async function importExecutionPayload(
|
|
|
182
240
|
envelope.payload,
|
|
183
241
|
payloadInput.getVersionedHashes(),
|
|
184
242
|
envelope.parentBeaconBlockRoot,
|
|
185
|
-
envelope.executionRequests
|
|
243
|
+
envelope.executionRequests,
|
|
244
|
+
inclusionListTransactions
|
|
186
245
|
),
|
|
187
246
|
|
|
188
247
|
opts.validSignature === true
|
|
@@ -250,27 +309,73 @@ export async function importExecutionPayload(
|
|
|
250
309
|
}
|
|
251
310
|
});
|
|
252
311
|
|
|
312
|
+
// A VALID payload that does not satisfy the inclusion list constraints is still imported, fork choice
|
|
313
|
+
// only records the verdict so should_extend_payload moves the head to the EMPTY variant, which the next
|
|
314
|
+
// proposer builds on.
|
|
315
|
+
// Recorded before the payload enters fork choice. A VALID response must carry a verdict, an
|
|
316
|
+
// optimistically imported payload counts as satisfied until the engine validates it, anything else as
|
|
317
|
+
// unsatisfied. A VALID response without a verdict violates the engine API, it is logged and treated as
|
|
318
|
+
// satisfied so a non-compliant engine does not orphan every payload
|
|
319
|
+
if (inclusionListTransactions !== undefined) {
|
|
320
|
+
if (execResult.status === ExecutionPayloadStatus.VALID && execResult.inclusionListSatisfied == null) {
|
|
321
|
+
this.logger.warn("Execution engine reported no inclusion list verdict, not enforcing inclusion lists", logCtx);
|
|
322
|
+
}
|
|
323
|
+
const satisfied =
|
|
324
|
+
execResult.status === ExecutionPayloadStatus.VALID
|
|
325
|
+
? (execResult.inclusionListSatisfied ?? true)
|
|
326
|
+
: execResult.status === ExecutionPayloadStatus.SYNCING || execResult.status === ExecutionPayloadStatus.ACCEPTED;
|
|
327
|
+
this.forkChoice.recordPayloadInclusionListSatisfaction(blockRootHex, satisfied);
|
|
328
|
+
if (!satisfied) {
|
|
329
|
+
this.logger.verbose("Payload did not satisfy inclusion list constraints", {
|
|
330
|
+
...logCtx,
|
|
331
|
+
blockHash: blockHashHex,
|
|
332
|
+
status: execResult.status,
|
|
333
|
+
inclusionListTransactions: inclusionListTransactions.length,
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
253
338
|
// 6. Update fork choice, transitions the block's PENDING variant to FULL
|
|
254
339
|
const execStatus = toForkChoiceExecutionStatus(execResult.status);
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
340
|
+
try {
|
|
341
|
+
this.forkChoice.onExecutionPayload(
|
|
342
|
+
blockRootHex,
|
|
343
|
+
blockHashHex,
|
|
344
|
+
envelope.payload.blockNumber,
|
|
345
|
+
envelope.payload.gasLimit,
|
|
346
|
+
execStatus,
|
|
347
|
+
dataAvailabilityStatus
|
|
348
|
+
);
|
|
349
|
+
} catch (e) {
|
|
350
|
+
// The payload chain can be invalidated by a forkchoiceUpdated verdict while the engine was awaited
|
|
351
|
+
if (
|
|
352
|
+
e instanceof ForkChoiceError &&
|
|
353
|
+
e.type.code === ForkChoiceErrorCode.INVALID_BLOCK &&
|
|
354
|
+
e.type.err.code === InvalidBlockCode.PARENT_EXECUTION_INVALID
|
|
355
|
+
) {
|
|
356
|
+
throw new PayloadError(payloadInput, {code: PayloadErrorCode.BLOCK_EXECUTION_INVALID, blockRootHex});
|
|
357
|
+
}
|
|
358
|
+
throw e;
|
|
359
|
+
}
|
|
263
360
|
|
|
264
361
|
// 7. Queue notifyForkchoiceUpdate to engine api
|
|
265
362
|
const head = this.forkChoice.getHead();
|
|
266
|
-
if (
|
|
363
|
+
if (
|
|
364
|
+
!this.opts.disableImportExecutionFcU &&
|
|
365
|
+
blockRootHex === head.blockRoot &&
|
|
366
|
+
// Skip a payload that does not satisfy the inclusion list constraints, fork choice keeps the EMPTY
|
|
367
|
+
// variant as head and the next prepare fcU keeps the engine on the parent payload
|
|
368
|
+
this.forkChoice.isPayloadInclusionListSatisfied(blockRootHex)
|
|
369
|
+
) {
|
|
267
370
|
const safeBlockHash = getSafeExecutionBlockHash(this.forkChoice, this.logger);
|
|
268
371
|
const finalizedBlockHash = getFinalizedExecutionBlockHash(this.forkChoice);
|
|
269
|
-
this.executionEngine
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
372
|
+
this.executionEngine
|
|
373
|
+
.notifyForkchoiceUpdate(fork, blockRootHex, blockHashHex, safeBlockHash, finalizedBlockHash)
|
|
374
|
+
.catch((e) => {
|
|
375
|
+
if (!isErrorAborted(e) && !isQueueErrorAborted(e)) {
|
|
376
|
+
this.logger.error("Error pushing notifyForkchoiceUpdate()", {blockHashHex, finalizedBlockHash}, e);
|
|
377
|
+
}
|
|
378
|
+
});
|
|
274
379
|
}
|
|
275
380
|
|
|
276
381
|
// 8. Record metrics for payload envelope and column sources
|
|
@@ -302,21 +407,3 @@ export async function importExecutionPayload(
|
|
|
302
407
|
delaySec,
|
|
303
408
|
});
|
|
304
409
|
}
|
|
305
|
-
|
|
306
|
-
/**
|
|
307
|
-
* Process an execution payload envelope end-to-end: wait for DA, then import.
|
|
308
|
-
*
|
|
309
|
-
* Used by the PayloadEnvelopeProcessor queue (gossip / API / unknown-payload sync) — i.e.
|
|
310
|
-
* callers that have NOT already awaited DA themselves. Range sync's inline dispatch in
|
|
311
|
-
* processBlocks skips this wrapper and calls `importExecutionPayload` directly, since
|
|
312
|
-
* `verifyBlocksInEpoch` already awaited DA for the segment.
|
|
313
|
-
*/
|
|
314
|
-
export async function processExecutionPayload(
|
|
315
|
-
this: BeaconChain,
|
|
316
|
-
payloadInput: PayloadEnvelopeInput,
|
|
317
|
-
signal: AbortSignal,
|
|
318
|
-
opts: ImportPayloadOpts = {}
|
|
319
|
-
): Promise<void> {
|
|
320
|
-
const {dataAvailabilityStatuses} = await verifyPayloadsDataAvailability([payloadInput], signal);
|
|
321
|
-
await importExecutionPayload.call(this, payloadInput, dataAvailabilityStatuses[0], opts);
|
|
322
|
-
}
|
|
@@ -7,7 +7,7 @@ import {nextEventLoop} from "../../util/eventLoop.js";
|
|
|
7
7
|
import {JobItemQueue, isQueueErrorAborted} from "../../util/queue/index.js";
|
|
8
8
|
import type {BeaconChain} from "../chain.js";
|
|
9
9
|
import {BlockError, BlockErrorCode, isBlockErrorAborted} from "../errors/index.js";
|
|
10
|
-
import {ForkchoiceCaller} from "../forkChoice/index.js";
|
|
10
|
+
import {ExecutionInvalidSource, ForkchoiceCaller} from "../forkChoice/index.js";
|
|
11
11
|
import {BlockProcessOpts} from "../options.js";
|
|
12
12
|
import {IBlockInput} from "./blockInput/types.js";
|
|
13
13
|
import {importBlock, importsBlockAttestations} from "./importBlock.js";
|
|
@@ -123,7 +123,10 @@ export async function processBlocks(
|
|
|
123
123
|
// and we need to further propagate
|
|
124
124
|
if (segmentExecStatus.execAborted !== null) {
|
|
125
125
|
if (segmentExecStatus.invalidSegmentLVH !== undefined) {
|
|
126
|
-
this.
|
|
126
|
+
this.executionEngine.invalidateExecutionPayloads(
|
|
127
|
+
segmentExecStatus.invalidSegmentLVH,
|
|
128
|
+
ExecutionInvalidSource.blockSegment
|
|
129
|
+
);
|
|
127
130
|
}
|
|
128
131
|
throw segmentExecStatus.execAborted.execError;
|
|
129
132
|
}
|
|
@@ -147,7 +150,7 @@ export async function processBlocks(
|
|
|
147
150
|
proposerBalanceDelta: proposerBalanceDeltas[i],
|
|
148
151
|
indexedAttestations: indexedAttestationsByBlock[i],
|
|
149
152
|
// TODO: Make this param mandatory and capture in gossip
|
|
150
|
-
seenTimestampSec: opts.seenTimestampSec ??
|
|
153
|
+
seenTimestampSec: opts.seenTimestampSec ?? Date.now() / 1000,
|
|
151
154
|
});
|
|
152
155
|
}
|
|
153
156
|
|
|
@@ -292,7 +295,11 @@ async function importPayloadEnvelopesOfKnownBlocks(
|
|
|
292
295
|
return result;
|
|
293
296
|
}
|
|
294
297
|
|
|
295
|
-
const {dataAvailabilityStatuses} = await verifyPayloadsDataAvailability(
|
|
298
|
+
const {dataAvailabilityStatuses} = await verifyPayloadsDataAvailability(
|
|
299
|
+
this.config,
|
|
300
|
+
payloadInputs,
|
|
301
|
+
new AbortController().signal
|
|
302
|
+
);
|
|
296
303
|
for (let i = 0; i < payloadInputs.length; i++) {
|
|
297
304
|
this.logger.debug("Importing payload envelope of known block", {
|
|
298
305
|
slot: payloadInputs[i].slot,
|