@lodestar/beacon-node 1.51.0 → 1.52.0-dev.03eb33e6f1
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 +99 -127
- 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 +25 -3
- package/lib/api/impl/beacon/pool/index.js.map +1 -1
- package/lib/api/impl/beacon/state/utils.d.ts +1 -1
- package/lib/api/impl/beacon/state/utils.d.ts.map +1 -1
- package/lib/api/impl/beacon/state/utils.js +2 -1
- 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 +6 -2
- 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 +55 -32
- package/lib/api/impl/validator/index.js.map +1 -1
- package/lib/chain/ColumnReconstructionTracker.d.ts +4 -0
- package/lib/chain/ColumnReconstructionTracker.d.ts.map +1 -1
- package/lib/chain/ColumnReconstructionTracker.js +4 -0
- package/lib/chain/ColumnReconstructionTracker.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 +4 -4
- package/lib/chain/archiveStore/archiveStore.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/getHistoricalState.d.ts.map +1 -1
- package/lib/chain/archiveStore/historicalState/getHistoricalState.js +7 -0
- package/lib/chain/archiveStore/historicalState/getHistoricalState.js.map +1 -1
- package/lib/chain/archiveStore/utils/archiveBlocks.d.ts +12 -0
- package/lib/chain/archiveStore/utils/archiveBlocks.d.ts.map +1 -1
- package/lib/chain/archiveStore/utils/archiveBlocks.js +17 -2
- package/lib/chain/archiveStore/utils/archiveBlocks.js.map +1 -1
- package/lib/chain/archiveStore/utils/pruneHistory.d.ts +9 -2
- package/lib/chain/archiveStore/utils/pruneHistory.d.ts.map +1 -1
- package/lib/chain/archiveStore/utils/pruneHistory.js +19 -7
- package/lib/chain/archiveStore/utils/pruneHistory.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 +8 -242
- 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 +36 -53
- package/lib/chain/blocks/importBlock.js.map +1 -1
- package/lib/chain/blocks/importExecutionPayload.d.ts +11 -12
- package/lib/chain/blocks/importExecutionPayload.d.ts.map +1 -1
- package/lib/chain/blocks/importExecutionPayload.js +56 -22
- 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 +5 -19
- package/lib/chain/blocks/index.js.map +1 -1
- package/lib/chain/blocks/payloadEnvelopeProcessor.d.ts +10 -7
- package/lib/chain/blocks/payloadEnvelopeProcessor.d.ts.map +1 -1
- package/lib/chain/blocks/payloadEnvelopeProcessor.js +22 -17
- package/lib/chain/blocks/payloadEnvelopeProcessor.js.map +1 -1
- package/lib/chain/blocks/types.d.ts +4 -20
- package/lib/chain/blocks/types.d.ts.map +1 -1
- package/lib/chain/blocks/types.js +0 -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 +29 -14
- package/lib/chain/blocks/verifyBlock.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksDataAvailability.d.ts +2 -2
- package/lib/chain/blocks/verifyBlocksDataAvailability.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlocksDataAvailability.js +17 -5
- 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 +14 -8
- 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 +2 -2
- package/lib/chain/blocks/verifyBlocksSignatures.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlocksSignatures.js +12 -6
- package/lib/chain/blocks/verifyBlocksSignatures.js.map +1 -1
- package/lib/chain/blocks/verifyPayloadsDataAvailability.d.ts +2 -2
- package/lib/chain/blocks/verifyPayloadsDataAvailability.d.ts.map +1 -1
- package/lib/chain/blocks/verifyPayloadsDataAvailability.js +12 -7
- 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 +2 -2
- package/lib/chain/bls/utils.js.map +1 -1
- package/lib/chain/chain.d.ts +31 -9
- package/lib/chain/chain.d.ts.map +1 -1
- package/lib/chain/chain.js +193 -64
- 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/attestationError.d.ts +15 -1
- package/lib/chain/errors/attestationError.d.ts.map +1 -1
- package/lib/chain/errors/attestationError.js +8 -0
- package/lib/chain/errors/attestationError.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 +3 -2
- package/lib/chain/errors/executionPayloadBid.d.ts.map +1 -1
- package/lib/chain/errors/executionPayloadBid.js +1 -1
- package/lib/chain/errors/executionPayloadBid.js.map +1 -1
- package/lib/chain/errors/executionPayloadEnvelope.d.ts +55 -0
- package/lib/chain/errors/executionPayloadEnvelope.d.ts.map +1 -1
- package/lib/chain/errors/executionPayloadEnvelope.js +8 -0
- package/lib/chain/errors/executionPayloadEnvelope.js.map +1 -1
- package/lib/chain/errors/index.d.ts +0 -1
- package/lib/chain/errors/index.d.ts.map +1 -1
- package/lib/chain/errors/index.js +0 -1
- package/lib/chain/errors/index.js.map +1 -1
- package/lib/chain/forkChoice/index.d.ts +8 -1
- package/lib/chain/forkChoice/index.d.ts.map +1 -1
- package/lib/chain/forkChoice/index.js +8 -0
- package/lib/chain/forkChoice/index.js.map +1 -1
- package/lib/chain/forkChoiceExecutionEngine.d.ts +53 -0
- package/lib/chain/forkChoiceExecutionEngine.d.ts.map +1 -0
- package/lib/chain/forkChoiceExecutionEngine.js +140 -0
- package/lib/chain/forkChoiceExecutionEngine.js.map +1 -0
- package/lib/chain/interface.d.ts +10 -8
- package/lib/chain/interface.d.ts.map +1 -1
- package/lib/chain/interface.js.map +1 -1
- package/lib/chain/lightClient/index.d.ts +13 -6
- package/lib/chain/lightClient/index.d.ts.map +1 -1
- package/lib/chain/lightClient/index.js +95 -115
- package/lib/chain/lightClient/index.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 +4 -1
- package/lib/chain/opPools/inclusionListStore.d.ts.map +1 -1
- package/lib/chain/opPools/inclusionListStore.js +5 -2
- package/lib/chain/opPools/inclusionListStore.js.map +1 -1
- package/lib/chain/opPools/index.d.ts +1 -0
- package/lib/chain/opPools/index.d.ts.map +1 -1
- package/lib/chain/opPools/index.js +1 -0
- package/lib/chain/opPools/index.js.map +1 -1
- package/lib/chain/opPools/opPool.js +6 -6
- package/lib/chain/opPools/opPool.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 +2 -3
- package/lib/chain/options.js.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.d.ts +3 -2
- package/lib/chain/produceBlock/produceBlockBody.d.ts.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.js +3 -2
- 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 +1 -1
- package/lib/chain/regen/interface.d.ts.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/seenAttesters.d.ts +1 -0
- package/lib/chain/seenCache/seenAttesters.d.ts.map +1 -1
- package/lib/chain/seenCache/seenAttesters.js +1 -1
- package/lib/chain/seenCache/seenAttesters.js.map +1 -1
- package/lib/chain/seenCache/seenBlockAttesters.d.ts +8 -2
- package/lib/chain/seenCache/seenBlockAttesters.d.ts.map +1 -1
- package/lib/chain/seenCache/seenBlockAttesters.js +43 -6
- package/lib/chain/seenCache/seenBlockAttesters.js.map +1 -1
- package/lib/chain/seenCache/seenExecutionPayloadBids.d.ts +13 -4
- package/lib/chain/seenCache/seenExecutionPayloadBids.d.ts.map +1 -1
- package/lib/chain/seenCache/seenExecutionPayloadBids.js +13 -12
- package/lib/chain/seenCache/seenExecutionPayloadBids.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/shufflingCache.d.ts +5 -0
- package/lib/chain/shufflingCache.d.ts.map +1 -1
- package/lib/chain/shufflingCache.js +39 -1
- package/lib/chain/shufflingCache.js.map +1 -1
- package/lib/chain/validation/aggregateAndProof.d.ts.map +1 -1
- package/lib/chain/validation/aggregateAndProof.js +38 -10
- package/lib/chain/validation/aggregateAndProof.js.map +1 -1
- package/lib/chain/validation/attestation.d.ts.map +1 -1
- package/lib/chain/validation/attestation.js +33 -17
- package/lib/chain/validation/attestation.js.map +1 -1
- package/lib/chain/validation/block.d.ts.map +1 -1
- package/lib/chain/validation/block.js +9 -1
- package/lib/chain/validation/block.js.map +1 -1
- package/lib/chain/validation/dataColumnSidecar.d.ts.map +1 -1
- package/lib/chain/validation/dataColumnSidecar.js +8 -1
- 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 +36 -46
- 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 +132 -4
- package/lib/chain/validation/executionPayloadEnvelope.js.map +1 -1
- package/lib/chain/validation/payloadAttestationMessage.js +9 -0
- package/lib/chain/validation/payloadAttestationMessage.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/dataColumnStore.d.ts +3 -2
- package/lib/db/dataColumnStore.d.ts.map +1 -1
- package/lib/db/dataColumnStore.js +3 -3
- package/lib/db/dataColumnStore.js.map +1 -1
- package/lib/db/flatFileStore/flatFileStore.d.ts +1 -1
- package/lib/db/flatFileStore/flatFileStore.d.ts.map +1 -1
- package/lib/db/flatFileStore/flatFileStore.js +10 -9
- package/lib/db/flatFileStore/flatFileStore.js.map +1 -1
- package/lib/db/flatFileStore/interface.d.ts +2 -1
- package/lib/db/flatFileStore/interface.d.ts.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/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 +2 -1
- package/lib/db/repositories/dataColumnSidecarArchive.d.ts.map +1 -1
- package/lib/db/repositories/dataColumnSidecarArchive.js +14 -4
- 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/engine/http.d.ts +4 -6
- package/lib/execution/engine/http.d.ts.map +1 -1
- package/lib/execution/engine/http.js +8 -10
- 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 +18 -6
- 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 +2 -4
- package/lib/execution/engine/jsonRpcTransport.d.ts.map +1 -1
- package/lib/execution/engine/jsonRpcTransport.js +2 -12
- package/lib/execution/engine/jsonRpcTransport.js.map +1 -1
- package/lib/execution/engine/mock.d.ts +0 -1
- package/lib/execution/engine/mock.d.ts.map +1 -1
- package/lib/execution/engine/mock.js +0 -4
- package/lib/execution/engine/mock.js.map +1 -1
- package/lib/execution/engine/restTransport.d.ts +2 -4
- package/lib/execution/engine/restTransport.d.ts.map +1 -1
- package/lib/execution/engine/restTransport.js +1 -15
- package/lib/execution/engine/restTransport.js.map +1 -1
- package/lib/execution/engine/sszTypes.d.ts +0 -9
- 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 +1 -14
- package/lib/execution/engine/transport.d.ts.map +1 -1
- package/lib/execution/engine/types.d.ts +0 -8
- package/lib/execution/engine/types.d.ts.map +1 -1
- package/lib/execution/engine/types.js +2 -10
- 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 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/metrics/metrics/beacon.d.ts +4 -9
- package/lib/metrics/metrics/beacon.d.ts.map +1 -1
- package/lib/metrics/metrics/beacon.js +11 -32
- package/lib/metrics/metrics/beacon.js.map +1 -1
- package/lib/metrics/metrics/lodestar.d.ts +32 -8
- package/lib/metrics/metrics/lodestar.d.ts.map +1 -1
- package/lib/metrics/metrics/lodestar.js +116 -46
- 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 +23 -6
- package/lib/network/gossip/gossipsub.js.map +1 -1
- package/lib/network/gossip/interface.d.ts +1 -8
- package/lib/network/gossip/interface.d.ts.map +1 -1
- package/lib/network/gossip/interface.js +0 -1
- package/lib/network/gossip/interface.js.map +1 -1
- package/lib/network/gossip/topic.d.ts +1 -23
- package/lib/network/gossip/topic.d.ts.map +1 -1
- package/lib/network/gossip/topic.js +0 -36
- package/lib/network/gossip/topic.js.map +1 -1
- package/lib/network/interface.d.ts +4 -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 +73 -46
- 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 +72 -138
- package/lib/network/processor/gossipHandlers.js.map +1 -1
- package/lib/network/processor/gossipQueues/index.d.ts.map +1 -1
- package/lib/network/processor/gossipQueues/index.js +0 -6
- package/lib/network/processor/gossipQueues/index.js.map +1 -1
- package/lib/network/processor/gossipValidatorFn.d.ts.map +1 -1
- package/lib/network/processor/gossipValidatorFn.js +4 -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 +33 -6
- 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 +0 -3
- package/lib/network/reqresp/ReqRespBeaconNode.js.map +1 -1
- package/lib/network/reqresp/handlers/beaconBlocksByHead.js +1 -1
- package/lib/network/reqresp/handlers/beaconBlocksByHead.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/index.d.ts.map +1 -1
- package/lib/network/reqresp/handlers/index.js +1 -12
- package/lib/network/reqresp/handlers/index.js.map +1 -1
- package/lib/network/reqresp/protocols.d.ts +0 -2
- package/lib/network/reqresp/protocols.d.ts.map +1 -1
- package/lib/network/reqresp/protocols.js +0 -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 +1 -17
- package/lib/network/reqresp/rateLimit.js.map +1 -1
- package/lib/network/reqresp/types.d.ts +2 -8
- package/lib/network/reqresp/types.d.ts.map +1 -1
- package/lib/network/reqresp/types.js +1 -7
- package/lib/network/reqresp/types.js.map +1 -1
- package/lib/network/reqresp/utils/collect.d.ts +4 -4
- package/lib/network/reqresp/utils/collect.d.ts.map +1 -1
- package/lib/network/reqresp/utils/collect.js +9 -8
- package/lib/network/reqresp/utils/collect.js.map +1 -1
- package/lib/network/reqresp/utils/collectSequentialBlocksInRange.d.ts +1 -1
- package/lib/network/reqresp/utils/collectSequentialBlocksInRange.d.ts.map +1 -1
- package/lib/network/reqresp/utils/collectSequentialBlocksInRange.js +2 -2
- package/lib/network/reqresp/utils/collectSequentialBlocksInRange.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 +38 -20
- 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 +8 -3
- package/lib/sync/range/batch.d.ts.map +1 -1
- package/lib/sync/range/batch.js +26 -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 +10 -16
- package/lib/sync/range/chain.js.map +1 -1
- package/lib/sync/range/range.d.ts.map +1 -1
- package/lib/sync/range/range.js +43 -3
- package/lib/sync/range/range.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/types.d.ts +12 -1
- package/lib/sync/types.d.ts.map +1 -1
- package/lib/sync/types.js +2 -0
- package/lib/sync/types.js.map +1 -1
- package/lib/sync/unknownBlock.d.ts +28 -1
- package/lib/sync/unknownBlock.d.ts.map +1 -1
- package/lib/sync/unknownBlock.js +257 -31
- package/lib/sync/unknownBlock.js.map +1 -1
- package/lib/sync/utils/downloadByRange.d.ts +20 -35
- package/lib/sync/utils/downloadByRange.d.ts.map +1 -1
- package/lib/sync/utils/downloadByRange.js +36 -130
- package/lib/sync/utils/downloadByRange.js.map +1 -1
- package/lib/sync/utils/downloadByRoot.d.ts +23 -17
- package/lib/sync/utils/downloadByRoot.d.ts.map +1 -1
- package/lib/sync/utils/downloadByRoot.js +57 -100
- package/lib/sync/utils/downloadByRoot.js.map +1 -1
- package/lib/util/bitArray.d.ts +6 -6
- package/lib/util/bitArray.d.ts.map +1 -1
- package/lib/util/bitArray.js +25 -50
- package/lib/util/bitArray.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/eventLoop.d.ts +5 -0
- package/lib/util/eventLoop.d.ts.map +1 -1
- package/lib/util/eventLoop.js +7 -0
- package/lib/util/eventLoop.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 +27 -28
- package/src/api/impl/beacon/blocks/index.ts +133 -156
- package/src/api/impl/beacon/pool/index.ts +40 -8
- package/src/api/impl/beacon/state/utils.ts +3 -2
- package/src/api/impl/debug/index.ts +6 -2
- package/src/api/impl/validator/index.ts +62 -36
- package/src/chain/ColumnReconstructionTracker.ts +5 -0
- package/src/chain/GetBlobsTracker.ts +82 -52
- package/src/chain/archiveStore/archiveStore.ts +6 -4
- package/src/chain/archiveStore/historicalState/getHistoricalState.ts +9 -0
- package/src/chain/archiveStore/utils/archiveBlocks.ts +21 -2
- package/src/chain/archiveStore/utils/pruneHistory.ts +24 -9
- package/src/chain/blocks/blockInput/blockInput.ts +15 -344
- package/src/chain/blocks/blockInput/errors.ts +1 -2
- package/src/chain/blocks/blockInput/types.ts +2 -20
- package/src/chain/blocks/importBlock.ts +56 -72
- package/src/chain/blocks/importExecutionPayload.ts +85 -38
- package/src/chain/blocks/index.ts +8 -33
- package/src/chain/blocks/payloadEnvelopeProcessor.ts +33 -22
- package/src/chain/blocks/types.ts +5 -31
- package/src/chain/blocks/verifyBlock.ts +47 -26
- package/src/chain/blocks/verifyBlocksDataAvailability.ts +20 -6
- package/src/chain/blocks/verifyBlocksExecutionPayloads.ts +16 -10
- package/src/chain/blocks/verifyBlocksSanityChecks.ts +4 -1
- package/src/chain/blocks/verifyBlocksSignatures.ts +13 -5
- package/src/chain/blocks/verifyPayloadsDataAvailability.ts +16 -8
- 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 +2 -2
- package/src/chain/chain.ts +243 -81
- package/src/chain/emitter.ts +8 -8
- package/src/chain/errors/attestationError.ts +11 -1
- package/src/chain/errors/blockError.ts +1 -1
- package/src/chain/errors/executionPayloadBid.ts +3 -2
- package/src/chain/errors/executionPayloadEnvelope.ts +58 -0
- package/src/chain/errors/index.ts +0 -1
- package/src/chain/forkChoice/index.ts +8 -0
- package/src/chain/forkChoiceExecutionEngine.ts +216 -0
- package/src/chain/interface.ts +10 -7
- package/src/chain/lightClient/index.ts +108 -142
- package/src/chain/opPools/aggregatedAttestationPool.ts +246 -43
- package/src/chain/opPools/attestationPool.ts +16 -4
- package/src/chain/opPools/inclusionListStore.ts +5 -2
- package/src/chain/opPools/index.ts +1 -0
- package/src/chain/opPools/opPool.ts +6 -6
- 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 +7 -6
- package/src/chain/produceBlock/produceBlockBody.ts +7 -3
- package/src/chain/proposerTracker.ts +94 -0
- package/src/chain/regen/interface.ts +1 -1
- package/src/chain/regen/queued.ts +6 -4
- package/src/chain/seenCache/seenAttesters.ts +1 -1
- package/src/chain/seenCache/seenBlockAttesters.ts +48 -6
- package/src/chain/seenCache/seenExecutionPayloadBids.ts +35 -15
- package/src/chain/seenCache/seenGossipBlockInput.ts +9 -93
- package/src/chain/shufflingCache.ts +40 -1
- package/src/chain/validation/aggregateAndProof.ts +44 -15
- package/src/chain/validation/attestation.ts +32 -21
- package/src/chain/validation/block.ts +9 -1
- package/src/chain/validation/dataColumnSidecar.ts +7 -1
- package/src/chain/validation/executionPayloadBid.ts +47 -48
- package/src/chain/validation/executionPayloadEnvelope.ts +155 -4
- package/src/chain/validation/payloadAttestationMessage.ts +10 -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/dataColumnStore.ts +5 -4
- package/src/db/flatFileStore/flatFileStore.ts +12 -11
- package/src/db/flatFileStore/interface.ts +2 -1
- package/src/db/flatFileStore/slotIndex.ts +4 -3
- package/src/db/repositories/blobSidecars.ts +0 -1
- package/src/db/repositories/dataColumnSidecarArchive.ts +14 -4
- package/src/execution/builder/apiClient.ts +16 -13
- package/src/execution/builder/http.ts +4 -0
- package/src/execution/engine/http.ts +19 -42
- package/src/execution/engine/index.ts +1 -1
- package/src/execution/engine/interface.ts +19 -10
- package/src/execution/engine/jsonRpcTransport.ts +10 -22
- package/src/execution/engine/mock.ts +0 -7
- package/src/execution/engine/restTransport.ts +3 -22
- package/src/execution/engine/sszTypes.ts +0 -9
- package/src/execution/engine/transport.ts +8 -17
- package/src/execution/engine/types.ts +3 -18
- package/src/execution/engine/utils.ts +4 -2
- package/src/index.ts +1 -1
- package/src/metrics/metrics/beacon.ts +11 -32
- package/src/metrics/metrics/lodestar.ts +117 -46
- 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 +24 -6
- package/src/network/gossip/interface.ts +0 -5
- package/src/network/gossip/topic.ts +1 -39
- package/src/network/interface.ts +2 -5
- package/src/network/libp2p/index.ts +5 -1
- package/src/network/network.ts +88 -69
- 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 +91 -178
- package/src/network/processor/gossipQueues/index.ts +0 -6
- package/src/network/processor/gossipValidatorFn.ts +4 -5
- package/src/network/processor/index.ts +32 -6
- package/src/network/reqresp/ReqRespBeaconNode.ts +0 -7
- package/src/network/reqresp/handlers/beaconBlocksByHead.ts +1 -1
- package/src/network/reqresp/handlers/beaconBlocksByRange.ts +2 -2
- package/src/network/reqresp/handlers/index.ts +0 -17
- package/src/network/reqresp/protocols.ts +0 -12
- package/src/network/reqresp/rateLimit.ts +1 -17
- package/src/network/reqresp/types.ts +0 -13
- package/src/network/reqresp/utils/collect.ts +16 -8
- package/src/network/reqresp/utils/collectSequentialBlocksInRange.ts +3 -2
- package/src/network/subnets/attnetsService.ts +94 -6
- package/src/network/subnets/interface.ts +7 -0
- package/src/node/nodejs.ts +40 -21
- package/src/node/options.ts +9 -6
- package/src/sync/interface.ts +1 -0
- package/src/sync/range/batch.ts +29 -21
- package/src/sync/range/chain.ts +10 -14
- package/src/sync/range/range.ts +56 -3
- package/src/sync/sync.ts +108 -26
- package/src/sync/types.ts +11 -0
- package/src/sync/unknownBlock.ts +296 -32
- package/src/sync/utils/downloadByRange.ts +60 -233
- package/src/sync/utils/downloadByRoot.ts +78 -139
- package/src/util/bitArray.ts +22 -43
- package/src/util/blobs.ts +0 -34
- package/src/util/eventLoop.ts +8 -0
- 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
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"bugs": {
|
|
12
12
|
"url": "https://github.com/ChainSafe/lodestar/issues"
|
|
13
13
|
},
|
|
14
|
-
"version": "1.
|
|
14
|
+
"version": "1.52.0-dev.03eb33e6f1",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"lint:fix": "pnpm run lint --write",
|
|
87
87
|
"test": "pnpm test:unit && pnpm test:e2e",
|
|
88
88
|
"test:unit": "vitest run --project unit --project unit-minimal",
|
|
89
|
-
"test:e2e": "vitest run --project e2e --project e2e-mainnet",
|
|
89
|
+
"test:e2e": "vitest run --project e2e --project e2e-sync --project e2e-mainnet",
|
|
90
90
|
"test:sim": "vitest run test/sim/**/*.test.ts",
|
|
91
91
|
"test:sim:blobs": "vitest run test/sim/4844-interop.test.ts",
|
|
92
92
|
"download-spec-tests": "node --import tsx test/spec/downloadTests.ts",
|
|
@@ -104,12 +104,11 @@
|
|
|
104
104
|
"@chainsafe/discv5": "^12.0.2",
|
|
105
105
|
"@chainsafe/enr": "^6.0.2",
|
|
106
106
|
"@chainsafe/libp2p-noise": "^17.0.0",
|
|
107
|
-
"@chainsafe/libp2p-quic": "^2.1.
|
|
108
|
-
"@chainsafe/lodestar-z": "catalog:",
|
|
107
|
+
"@chainsafe/libp2p-quic": "^2.1.6",
|
|
109
108
|
"@chainsafe/persistent-merkle-tree": "^1.3.1",
|
|
110
109
|
"@chainsafe/prometheus-gc-stats": "^1.0.0",
|
|
111
110
|
"@chainsafe/snappy-wasm": "^0.5.2",
|
|
112
|
-
"@chainsafe/ssz": "^1.9.
|
|
111
|
+
"@chainsafe/ssz": "^1.9.1",
|
|
113
112
|
"@chainsafe/threads": "^1.11.3",
|
|
114
113
|
"@crate-crypto/node-eth-kzg": "0.9.1",
|
|
115
114
|
"@fastify/bearer-auth": "^10.0.1",
|
|
@@ -117,27 +116,28 @@
|
|
|
117
116
|
"@fastify/swagger": "^9.0.0",
|
|
118
117
|
"@fastify/swagger-ui": "^5.0.1",
|
|
119
118
|
"@libp2p/bootstrap": "^12.0.34",
|
|
120
|
-
"@libp2p/crypto": "^5.
|
|
121
|
-
"@libp2p/gossipsub": "^17.
|
|
122
|
-
"@libp2p/identify": "^4.1.
|
|
119
|
+
"@libp2p/crypto": "^5.2.0",
|
|
120
|
+
"@libp2p/gossipsub": "^17.2.2",
|
|
121
|
+
"@libp2p/identify": "^4.1.19",
|
|
123
122
|
"@libp2p/interface": "^3.4.0",
|
|
124
123
|
"@libp2p/mdns": "^12.0.34",
|
|
125
124
|
"@libp2p/mplex": "^12.0.34",
|
|
126
|
-
"@libp2p/peer-id": "^6.0.
|
|
125
|
+
"@libp2p/peer-id": "^6.0.18",
|
|
127
126
|
"@libp2p/prometheus-metrics": "^5.0.31",
|
|
128
127
|
"@libp2p/tcp": "^11.0.30",
|
|
129
|
-
"@libp2p/utils": "^7.4.
|
|
130
|
-
"@lodestar/api": "^1.
|
|
131
|
-
"@lodestar/config": "^1.
|
|
132
|
-
"@lodestar/db": "^1.
|
|
133
|
-
"@lodestar/fork-choice": "^1.
|
|
134
|
-
"@lodestar/logger": "^1.
|
|
135
|
-
"@lodestar/
|
|
136
|
-
"@lodestar/
|
|
137
|
-
"@lodestar/
|
|
138
|
-
"@lodestar/
|
|
139
|
-
"@lodestar/
|
|
140
|
-
"@lodestar/
|
|
128
|
+
"@libp2p/utils": "^7.4.6",
|
|
129
|
+
"@lodestar/api": "^1.52.0-dev.03eb33e6f1",
|
|
130
|
+
"@lodestar/config": "^1.52.0-dev.03eb33e6f1",
|
|
131
|
+
"@lodestar/db": "^1.52.0-dev.03eb33e6f1",
|
|
132
|
+
"@lodestar/fork-choice": "^1.52.0-dev.03eb33e6f1",
|
|
133
|
+
"@lodestar/logger": "^1.52.0-dev.03eb33e6f1",
|
|
134
|
+
"@lodestar/native": "^1.52.0-dev.03eb33e6f1",
|
|
135
|
+
"@lodestar/params": "^1.52.0-dev.03eb33e6f1",
|
|
136
|
+
"@lodestar/reqresp": "^1.52.0-dev.03eb33e6f1",
|
|
137
|
+
"@lodestar/state-transition": "^1.52.0-dev.03eb33e6f1",
|
|
138
|
+
"@lodestar/types": "^1.52.0-dev.03eb33e6f1",
|
|
139
|
+
"@lodestar/utils": "^1.52.0-dev.03eb33e6f1",
|
|
140
|
+
"@lodestar/validator": "^1.52.0-dev.03eb33e6f1",
|
|
141
141
|
"@multiformats/multiaddr": "^13.0.1",
|
|
142
142
|
"datastore-core": "^12.0.1",
|
|
143
143
|
"datastore-level": "^13.0.1",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"fastify": "^5.8.1",
|
|
146
146
|
"interface-datastore": "^10.0.1",
|
|
147
147
|
"jwt-simple": "0.5.6",
|
|
148
|
-
"libp2p": "3.
|
|
148
|
+
"libp2p": "3.5.2",
|
|
149
149
|
"multiformats": "^13.4.2",
|
|
150
150
|
"prom-client": "^15.1.0",
|
|
151
151
|
"qs": "^6.14.2",
|
|
@@ -157,16 +157,15 @@
|
|
|
157
157
|
},
|
|
158
158
|
"devDependencies": {
|
|
159
159
|
"@ethereumjs/rlp": "^4.0.1",
|
|
160
|
-
"@libp2p/interface-internal": "^3.2.
|
|
161
|
-
"@libp2p/logger": "^6.2.
|
|
162
|
-
"@lodestar/spec-test-util": "^1.
|
|
163
|
-
"@lodestar/test-utils": "^1.
|
|
160
|
+
"@libp2p/interface-internal": "^3.2.3",
|
|
161
|
+
"@libp2p/logger": "^6.2.16",
|
|
162
|
+
"@lodestar/spec-test-util": "^1.52.0-dev.03eb33e6f1",
|
|
163
|
+
"@lodestar/test-utils": "^1.52.0-dev.03eb33e6f1",
|
|
164
164
|
"@types/js-yaml": "^4.0.5",
|
|
165
165
|
"@types/qs": "^6.9.7",
|
|
166
166
|
"@types/tmp": "^0.2.3",
|
|
167
167
|
"dotenv": "^16.4.5",
|
|
168
168
|
"js-yaml": "^4.1.0",
|
|
169
|
-
"rimraf": "^4.4.1",
|
|
170
169
|
"tmp": "^0.2.1"
|
|
171
170
|
},
|
|
172
171
|
"keywords": [
|
|
@@ -175,5 +174,5 @@
|
|
|
175
174
|
"beacon",
|
|
176
175
|
"blockchain"
|
|
177
176
|
],
|
|
178
|
-
"gitHead": "
|
|
177
|
+
"gitHead": "11e3b6378736b9620b5f08b4ecf87ec71d921472"
|
|
179
178
|
}
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
} from "@lodestar/state-transition";
|
|
26
26
|
import {
|
|
27
27
|
ProducedBlockSource,
|
|
28
|
+
RootHex,
|
|
28
29
|
SignedBeaconBlock,
|
|
29
30
|
SignedBlindedBeaconBlock,
|
|
30
31
|
SignedBlockContents,
|
|
@@ -37,7 +38,7 @@ import {
|
|
|
37
38
|
sszTypesFor,
|
|
38
39
|
} from "@lodestar/types";
|
|
39
40
|
import {fromHex, prettyGweiToEth, sleep, toHex, toRootHex} from "@lodestar/utils";
|
|
40
|
-
import {BlockInputSource,
|
|
41
|
+
import {BlockInputSource, isBlockInputColumns} from "../../../../chain/blocks/blockInput/index.js";
|
|
41
42
|
import {PayloadEnvelopeInputSource} from "../../../../chain/blocks/payloadEnvelopeInput/index.js";
|
|
42
43
|
import {ImportBlockOpts} from "../../../../chain/blocks/types.js";
|
|
43
44
|
import {verifyBlocksInEpoch} from "../../../../chain/blocks/verifyBlock.js";
|
|
@@ -67,7 +68,6 @@ import {validateApiExecutionPayloadEnvelope} from "../../../../chain/validation/
|
|
|
67
68
|
import {OpSource} from "../../../../chain/validatorMonitor.js";
|
|
68
69
|
import {
|
|
69
70
|
computePreFuluKzgCommitmentsInclusionProof,
|
|
70
|
-
getBlobSidecars,
|
|
71
71
|
kzgCommitmentToVersionedHash,
|
|
72
72
|
reconstructBlobs,
|
|
73
73
|
} from "../../../../util/blobs.js";
|
|
@@ -110,6 +110,9 @@ export function getBeaconBlockApi(
|
|
|
110
110
|
const signedBlock = signedBlockContents.signedBlock;
|
|
111
111
|
const slot = signedBlock.message.slot;
|
|
112
112
|
const fork = config.getForkName(slot);
|
|
113
|
+
if (!isForkPostFulu(fork)) {
|
|
114
|
+
throw new ApiError(400, `Publishing blocks is not supported for pre-fulu fork=${fork}`);
|
|
115
|
+
}
|
|
113
116
|
const blockRoot = toRootHex(chain.config.getForkTypes(slot).BeaconBlock.hashTreeRoot(signedBlock.message));
|
|
114
117
|
|
|
115
118
|
const blockForImport = chain.seenBlockInputCache.getByBlock({
|
|
@@ -131,40 +134,26 @@ export function getBeaconBlockApi(
|
|
|
131
134
|
});
|
|
132
135
|
}
|
|
133
136
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
signedBlock as SignedBeaconBlock<ForkPostFulu>,
|
|
155
|
-
cellsAndProofs
|
|
156
|
-
) as fulu.DataColumnSidecar[];
|
|
157
|
-
timer?.();
|
|
158
|
-
blobSidecars = [];
|
|
159
|
-
} else if (isForkPostDeneb(fork)) {
|
|
160
|
-
blobSidecars = getBlobSidecars(config, signedBlock, signedBlockContents.blobs, signedBlockContents.kzgProofs);
|
|
161
|
-
dataColumnSidecars = [];
|
|
162
|
-
} else {
|
|
163
|
-
throw Error(`Invalid data fork=${fork} for publish`);
|
|
164
|
-
}
|
|
165
|
-
} else {
|
|
166
|
-
blobSidecars = [];
|
|
167
|
-
dataColumnSidecars = [];
|
|
137
|
+
// After gloas, data columns are not published with the block but when publishing the execution payload envelope.
|
|
138
|
+
let dataColumnSidecars: fulu.DataColumnSidecar[] = [];
|
|
139
|
+
|
|
140
|
+
if (isDenebBlockContents(signedBlockContents) && isForkPostFulu(fork) && !isForkPostGloas(fork)) {
|
|
141
|
+
const timer = metrics?.peerDas.dataColumnSidecarComputationTime.startTimer();
|
|
142
|
+
// If the block was produced by this node, we will already have computed cells
|
|
143
|
+
// Otherwise, we will compute them from the blobs in this function
|
|
144
|
+
const cells =
|
|
145
|
+
(chain.blockProductionCache.get(blockRoot) as ProduceFullFulu)?.cells ??
|
|
146
|
+
signedBlockContents.blobs.map((blob) => kzg.computeCells(blob));
|
|
147
|
+
const cellsAndProofs = cells.map((rowCells, rowIndex) => ({
|
|
148
|
+
cells: rowCells,
|
|
149
|
+
proofs: signedBlockContents.kzgProofs.slice(rowIndex * NUMBER_OF_COLUMNS, (rowIndex + 1) * NUMBER_OF_COLUMNS),
|
|
150
|
+
}));
|
|
151
|
+
dataColumnSidecars = getDataColumnSidecarsFromBlock(
|
|
152
|
+
config,
|
|
153
|
+
signedBlock as SignedBeaconBlock<ForkPostFulu>,
|
|
154
|
+
cellsAndProofs
|
|
155
|
+
) as fulu.DataColumnSidecar[];
|
|
156
|
+
timer?.();
|
|
168
157
|
}
|
|
169
158
|
|
|
170
159
|
if (isBlockInputColumns(blockForImport)) {
|
|
@@ -182,19 +171,6 @@ export function getBeaconBlockApi(
|
|
|
182
171
|
{throwOnDuplicateAdd: false}
|
|
183
172
|
);
|
|
184
173
|
}
|
|
185
|
-
} else if (isBlockInputBlobs(blockForImport)) {
|
|
186
|
-
for (const blobSidecar of blobSidecars) {
|
|
187
|
-
blockForImport.addBlob(
|
|
188
|
-
{
|
|
189
|
-
blockRootHex: blockRoot,
|
|
190
|
-
blobSidecar,
|
|
191
|
-
source: BlockInputSource.api,
|
|
192
|
-
seenTimestampSec,
|
|
193
|
-
},
|
|
194
|
-
// Same as above for columns
|
|
195
|
-
{throwOnDuplicateAdd: false}
|
|
196
|
-
);
|
|
197
|
-
}
|
|
198
174
|
}
|
|
199
175
|
|
|
200
176
|
// check what validations have been requested before broadcasting and publishing the block
|
|
@@ -215,28 +191,31 @@ export function getBeaconBlockApi(
|
|
|
215
191
|
|
|
216
192
|
switch (broadcastValidation) {
|
|
217
193
|
case routes.beacon.BroadcastValidation.gossip: {
|
|
218
|
-
|
|
219
|
-
|
|
194
|
+
try {
|
|
195
|
+
if (blockLocallyProduced) {
|
|
196
|
+
// Block production does not cover the proposer signature, the validator client signs the block
|
|
197
|
+
await verifyBlockProposerSignature(chain, signedBlock, blockRoot);
|
|
198
|
+
} else {
|
|
220
199
|
await validateGossipBlock(config, chain, signedBlock, fork);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
200
|
+
}
|
|
201
|
+
} catch (error) {
|
|
202
|
+
if (error instanceof BlockGossipError) {
|
|
203
|
+
switch (error.type.code) {
|
|
204
|
+
case BlockErrorCode.ALREADY_KNOWN:
|
|
205
|
+
// Block has already been seen, e.g. via gossip racing the publish API. Benign.
|
|
206
|
+
chain.logger.debug("Ignoring already-known block during publishing", valLogMeta);
|
|
207
|
+
return;
|
|
229
208
|
}
|
|
230
|
-
|
|
231
|
-
chain.logger.error("Gossip validations failed while publishing the block", valLogMeta, error as Error);
|
|
232
|
-
chain.persistInvalidSszValue(
|
|
233
|
-
chain.config.getForkTypes(slot).SignedBeaconBlock,
|
|
234
|
-
signedBlock,
|
|
235
|
-
"api_reject_gossip_failure",
|
|
236
|
-
blockRoot
|
|
237
|
-
);
|
|
238
|
-
throw error;
|
|
239
209
|
}
|
|
210
|
+
|
|
211
|
+
chain.logger.error("Gossip validations failed while publishing the block", valLogMeta, error as Error);
|
|
212
|
+
chain.persistInvalidSszValue(
|
|
213
|
+
chain.config.getForkTypes(slot).SignedBeaconBlock,
|
|
214
|
+
signedBlock,
|
|
215
|
+
"api_reject_gossip_failure",
|
|
216
|
+
blockRoot
|
|
217
|
+
);
|
|
218
|
+
throw error;
|
|
240
219
|
}
|
|
241
220
|
chain.logger.debug("Gossip checks validated while publishing the block", valLogMeta);
|
|
242
221
|
break;
|
|
@@ -316,18 +295,8 @@ export function getBeaconBlockApi(
|
|
|
316
295
|
break;
|
|
317
296
|
}
|
|
318
297
|
|
|
319
|
-
case routes.beacon.BroadcastValidation.none: {
|
|
320
|
-
chain.logger.debug("Skipping broadcast validation", valLogMeta);
|
|
321
|
-
break;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
298
|
default: {
|
|
325
|
-
|
|
326
|
-
const message = `Broadcast validation of ${broadcastValidation} type not implemented yet`;
|
|
327
|
-
if (chain.opts.broadcastValidationStrictness === "error") {
|
|
328
|
-
throw Error(message);
|
|
329
|
-
}
|
|
330
|
-
chain.logger.warn(message, valLogMeta);
|
|
299
|
+
throw new ApiError(400, `Invalid broadcast validation level ${broadcastValidation}`);
|
|
331
300
|
}
|
|
332
301
|
}
|
|
333
302
|
|
|
@@ -394,29 +363,26 @@ export function getBeaconBlockApi(
|
|
|
394
363
|
//
|
|
395
364
|
() => network.publishBeaconBlock(signedBlock),
|
|
396
365
|
...dataColumnSidecars.map((dataColumnSidecar) => () => network.publishDataColumnSidecar(dataColumnSidecar)),
|
|
397
|
-
...blobSidecars.map((blobSidecar) => () => network.publishBlobSidecar(blobSidecar)),
|
|
398
366
|
() =>
|
|
399
367
|
// there is no rush to persist block since we published it to gossip anyway
|
|
400
|
-
chain
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
source: BlockInputSource.api,
|
|
415
|
-
});
|
|
416
|
-
}
|
|
368
|
+
chain.processBlock(blockForImport, opts).catch((e) => {
|
|
369
|
+
if (e instanceof BlockError) {
|
|
370
|
+
switch (e.type.code) {
|
|
371
|
+
case BlockErrorCode.ALREADY_KNOWN:
|
|
372
|
+
// Block was imported while publishing, e.g. received via gossip
|
|
373
|
+
chain.logger.debug("Ignoring already-known block during publishing", valLogMeta);
|
|
374
|
+
return;
|
|
375
|
+
case BlockErrorCode.PARENT_BLOCK_UNKNOWN:
|
|
376
|
+
case BlockErrorCode.PARENT_PAYLOAD_UNKNOWN:
|
|
377
|
+
chain.emitter.emit(ChainEvent.blockUnknownParent, {
|
|
378
|
+
blockInput: blockForImport,
|
|
379
|
+
peer: IDENTITY_PEER_ID,
|
|
380
|
+
source: BlockInputSource.api,
|
|
381
|
+
});
|
|
417
382
|
}
|
|
418
|
-
|
|
419
|
-
|
|
383
|
+
}
|
|
384
|
+
throw e;
|
|
385
|
+
}),
|
|
420
386
|
];
|
|
421
387
|
const sentPeersArr = await promiseAllMaybeAsync<{sentPeers: number; alreadyPublished: boolean} | number | void>(
|
|
422
388
|
publishPromises
|
|
@@ -466,20 +432,6 @@ export function getBeaconBlockApi(
|
|
|
466
432
|
});
|
|
467
433
|
}
|
|
468
434
|
}
|
|
469
|
-
} else if (isBlockInputBlobs(blockForImport) && chain.emitter.listenerCount(routes.events.EventType.blobSidecar)) {
|
|
470
|
-
const blobSidecars = blockForImport.getBlobs();
|
|
471
|
-
const versionedHashes = blockForImport.getVersionedHashes();
|
|
472
|
-
|
|
473
|
-
for (const blobSidecar of blobSidecars) {
|
|
474
|
-
const {index, kzgCommitment} = blobSidecar;
|
|
475
|
-
chain.emitter.emit(routes.events.EventType.blobSidecar, {
|
|
476
|
-
blockRoot,
|
|
477
|
-
slot,
|
|
478
|
-
index,
|
|
479
|
-
kzgCommitment: toHex(kzgCommitment),
|
|
480
|
-
versionedHash: toHex(versionedHashes[index]),
|
|
481
|
-
});
|
|
482
|
-
}
|
|
483
435
|
}
|
|
484
436
|
};
|
|
485
437
|
|
|
@@ -559,26 +511,32 @@ export function getBeaconBlockApi(
|
|
|
559
511
|
|
|
560
512
|
const result: routes.beacon.BlockHeaderResponse[] = [];
|
|
561
513
|
if (parentRoot) {
|
|
514
|
+
let finalizedRoot: RootHex | null = null;
|
|
562
515
|
const finalizedBlock = await db.blockArchive.getByParentRoot(fromHex(parentRoot));
|
|
563
516
|
if (finalizedBlock) {
|
|
564
|
-
|
|
517
|
+
const header = toBeaconHeaderResponse(config, finalizedBlock, true);
|
|
518
|
+
finalizedRoot = toRootHex(header.root);
|
|
519
|
+
result.push(header);
|
|
565
520
|
}
|
|
566
521
|
const nonFinalizedBlocks = chain.forkChoice.getBlockSummariesByParentRoot(parentRoot);
|
|
567
522
|
await Promise.all(
|
|
568
523
|
nonFinalizedBlocks.map(async (summary) => {
|
|
524
|
+
// The finalized block stays in fork choice as its anchor after it is archived
|
|
525
|
+
if (summary.blockRoot === finalizedRoot) {
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
569
528
|
const blockResult = await chain.getBlockByRoot(summary.blockRoot);
|
|
570
529
|
if (blockResult) {
|
|
530
|
+
// There is no canonical block at the slot of a child that was reorged out by a later sibling
|
|
571
531
|
const canonical = chain.forkChoice.getCanonicalBlockAtSlot(blockResult.block.message.slot);
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
executionOptimistic = true;
|
|
578
|
-
}
|
|
579
|
-
// Block from hot db which only contains unfinalized blocks
|
|
580
|
-
finalized = false;
|
|
532
|
+
result.push(
|
|
533
|
+
toBeaconHeaderResponse(config, blockResult.block, canonical?.blockRoot === summary.blockRoot)
|
|
534
|
+
);
|
|
535
|
+
if (isOptimisticBlock(summary)) {
|
|
536
|
+
executionOptimistic = true;
|
|
581
537
|
}
|
|
538
|
+
// Block from hot db which only contains unfinalized blocks
|
|
539
|
+
finalized = false;
|
|
582
540
|
}
|
|
583
541
|
})
|
|
584
542
|
);
|
|
@@ -603,21 +561,18 @@ export function getBeaconBlockApi(
|
|
|
603
561
|
return {data: [], meta: {executionOptimistic: false, finalized: false}};
|
|
604
562
|
}
|
|
605
563
|
|
|
564
|
+
let canonicalRoot: RootHex | null = null;
|
|
606
565
|
const canonicalBlock = await chain.getCanonicalBlockAtSlot(slot);
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
result.push(toBeaconHeaderResponse(config, canonicalBlock.block, true));
|
|
615
|
-
if (!canonicalBlock.finalized) {
|
|
616
|
-
finalized = false;
|
|
566
|
+
if (canonicalBlock) {
|
|
567
|
+
const header = toBeaconHeaderResponse(config, canonicalBlock.block, true);
|
|
568
|
+
canonicalRoot = toRootHex(header.root);
|
|
569
|
+
result.push(header);
|
|
570
|
+
if (!canonicalBlock.finalized) {
|
|
571
|
+
finalized = false;
|
|
572
|
+
}
|
|
617
573
|
}
|
|
618
574
|
|
|
619
|
-
//
|
|
620
|
-
// TODO: What is this logic?
|
|
575
|
+
// Non-canonical blocks at the slot, also if the canonical chain skipped it
|
|
621
576
|
await Promise.all(
|
|
622
577
|
chain.forkChoice.getBlockSummariesAtSlot(slot).map(async (summary) => {
|
|
623
578
|
if (isOptimisticBlock(summary)) {
|
|
@@ -625,7 +580,7 @@ export function getBeaconBlockApi(
|
|
|
625
580
|
}
|
|
626
581
|
finalized = false;
|
|
627
582
|
|
|
628
|
-
if (summary.blockRoot !==
|
|
583
|
+
if (summary.blockRoot !== canonicalRoot) {
|
|
629
584
|
const blockResult = await chain.getBlockByRoot(summary.blockRoot);
|
|
630
585
|
if (blockResult) {
|
|
631
586
|
result.push(toBeaconHeaderResponse(config, blockResult.block));
|
|
@@ -633,6 +588,11 @@ export function getBeaconBlockApi(
|
|
|
633
588
|
}
|
|
634
589
|
})
|
|
635
590
|
);
|
|
591
|
+
|
|
592
|
+
// skip slot
|
|
593
|
+
if (result.length === 0) {
|
|
594
|
+
return {data: [], meta: {executionOptimistic: false, finalized: false}};
|
|
595
|
+
}
|
|
636
596
|
}
|
|
637
597
|
|
|
638
598
|
return {
|
|
@@ -698,11 +658,15 @@ export function getBeaconBlockApi(
|
|
|
698
658
|
: parseInt(blockId, 10);
|
|
699
659
|
if (!Number.isNaN(slot)) {
|
|
700
660
|
const head = chain.forkChoice.getHead();
|
|
661
|
+
// The head can be the FULL variant, a block reports the status of the payload it builds on
|
|
662
|
+
const executionOptimistic = isOptimisticBlock(
|
|
663
|
+
chain.forkChoice.getBlockHexDefaultStatus(head.blockRoot) ?? head
|
|
664
|
+
);
|
|
701
665
|
|
|
702
666
|
if (slot === head.slot) {
|
|
703
667
|
return {
|
|
704
668
|
data: {root: fromHex(head.blockRoot)},
|
|
705
|
-
meta: {executionOptimistic
|
|
669
|
+
meta: {executionOptimistic, finalized: false},
|
|
706
670
|
};
|
|
707
671
|
}
|
|
708
672
|
|
|
@@ -711,7 +675,7 @@ export function getBeaconBlockApi(
|
|
|
711
675
|
return {
|
|
712
676
|
data: {root: state.getBlockRootAtSlot(slot)},
|
|
713
677
|
meta: {
|
|
714
|
-
executionOptimistic
|
|
678
|
+
executionOptimistic,
|
|
715
679
|
finalized: computeEpochAtSlot(slot) <= chain.forkChoice.getFinalizedCheckpoint().epoch,
|
|
716
680
|
},
|
|
717
681
|
};
|
|
@@ -720,7 +684,10 @@ export function getBeaconBlockApi(
|
|
|
720
684
|
const head = chain.forkChoice.getHead();
|
|
721
685
|
return {
|
|
722
686
|
data: {root: fromHex(head.blockRoot)},
|
|
723
|
-
meta: {
|
|
687
|
+
meta: {
|
|
688
|
+
executionOptimistic: isOptimisticBlock(chain.forkChoice.getBlockHexDefaultStatus(head.blockRoot) ?? head),
|
|
689
|
+
finalized: false,
|
|
690
|
+
},
|
|
724
691
|
};
|
|
725
692
|
}
|
|
726
693
|
|
|
@@ -804,11 +771,6 @@ export function getBeaconBlockApi(
|
|
|
804
771
|
};
|
|
805
772
|
try {
|
|
806
773
|
switch (broadcastValidation) {
|
|
807
|
-
case routes.beacon.BroadcastValidation.none: {
|
|
808
|
-
chain.logger.debug("Skipping broadcast validation of execution payload envelope", valLogMeta);
|
|
809
|
-
break;
|
|
810
|
-
}
|
|
811
|
-
|
|
812
774
|
case routes.beacon.BroadcastValidation.gossip: {
|
|
813
775
|
await validateApiExecutionPayloadEnvelope(chain, signedExecutionPayloadEnvelope);
|
|
814
776
|
break;
|
|
@@ -847,11 +809,7 @@ export function getBeaconBlockApi(
|
|
|
847
809
|
}
|
|
848
810
|
|
|
849
811
|
default: {
|
|
850
|
-
|
|
851
|
-
if (chain.opts.broadcastValidationStrictness === "error") {
|
|
852
|
-
throw Error(message);
|
|
853
|
-
}
|
|
854
|
-
chain.logger.warn(message, valLogMeta);
|
|
812
|
+
throw new ApiError(400, `Invalid broadcast validation level ${broadcastValidation}`);
|
|
855
813
|
}
|
|
856
814
|
}
|
|
857
815
|
} catch (error) {
|
|
@@ -1003,9 +961,13 @@ export function getBeaconBlockApi(
|
|
|
1003
961
|
() => network.publishSignedExecutionPayloadEnvelope(signedExecutionPayloadEnvelope),
|
|
1004
962
|
// Publish all data column sidecars
|
|
1005
963
|
...dataColumnSidecars.map((dataColumnSidecar) => () => network.publishDataColumnSidecar(dataColumnSidecar)),
|
|
1006
|
-
// Import execution payload
|
|
1007
|
-
|
|
1008
|
-
|
|
964
|
+
// Import execution payload
|
|
965
|
+
() =>
|
|
966
|
+
chain.processExecutionPayload(payloadInput, {
|
|
967
|
+
// Signature is verified during broadcast validation only for the submitted envelope,
|
|
968
|
+
// an envelope cached by another source is verified at import
|
|
969
|
+
validSignature: payloadInput.getPayloadEnvelope() === signedExecutionPayloadEnvelope,
|
|
970
|
+
}),
|
|
1009
971
|
];
|
|
1010
972
|
|
|
1011
973
|
const publishPromise = promiseAllMaybeAsync<{sentPeers: number; alreadyPublished: boolean} | number | void>(
|
|
@@ -1109,7 +1071,7 @@ export function getBeaconBlockApi(
|
|
|
1109
1071
|
},
|
|
1110
1072
|
|
|
1111
1073
|
async getSignedExecutionPayloadEnvelope({blockId}, context) {
|
|
1112
|
-
const {block,
|
|
1074
|
+
const {block, finalized} = await getBlockResponse(chain, blockId);
|
|
1113
1075
|
const slot = block.message.slot;
|
|
1114
1076
|
const fork = config.getForkName(slot);
|
|
1115
1077
|
|
|
@@ -1123,6 +1085,13 @@ export function getBeaconBlockApi(
|
|
|
1123
1085
|
const blockRoot = config.getForkTypes(slot).BeaconBlock.hashTreeRoot(block.message);
|
|
1124
1086
|
const blockRootHex = toRootHex(blockRoot);
|
|
1125
1087
|
|
|
1088
|
+
// The block's own flag is the status of the payload it builds on, the envelope's is that of its
|
|
1089
|
+
// FULL variant. An unfinalized block without one has not imported its envelope yet.
|
|
1090
|
+
const payload = finalized ? null : chain.forkChoice.getBlockHex(blockRootHex, PayloadStatus.FULL);
|
|
1091
|
+
if (!finalized && payload === null) {
|
|
1092
|
+
throw new ApiError(404, `Execution payload envelope not found for slot=${slot}, blockRoot=${blockRootHex}`);
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1126
1095
|
let data: Uint8Array | gloas.SignedExecutionPayloadEnvelope | null;
|
|
1127
1096
|
try {
|
|
1128
1097
|
data = context?.returnBytes
|
|
@@ -1147,7 +1116,7 @@ export function getBeaconBlockApi(
|
|
|
1147
1116
|
|
|
1148
1117
|
return {
|
|
1149
1118
|
data,
|
|
1150
|
-
meta: {executionOptimistic, finalized, version: fork},
|
|
1119
|
+
meta: {executionOptimistic: payload !== null && isOptimisticBlock(payload), finalized, version: fork},
|
|
1151
1120
|
};
|
|
1152
1121
|
},
|
|
1153
1122
|
|
|
@@ -1233,10 +1202,14 @@ export function getBeaconBlockApi(
|
|
|
1233
1202
|
data = [];
|
|
1234
1203
|
}
|
|
1235
1204
|
|
|
1205
|
+
// Post-gloas sidecars belong to the block's own payload, its FULL variant only exists once imported
|
|
1206
|
+
const payload = finalized ? null : chain.forkChoice.getBlockHex(blockRootHex, PayloadStatus.FULL);
|
|
1236
1207
|
return {
|
|
1237
1208
|
data,
|
|
1238
1209
|
meta: {
|
|
1239
|
-
executionOptimistic
|
|
1210
|
+
executionOptimistic: isForkPostGloas(fork)
|
|
1211
|
+
? !finalized && (payload === null || isOptimisticBlock(payload))
|
|
1212
|
+
: executionOptimistic,
|
|
1240
1213
|
finalized,
|
|
1241
1214
|
version: config.getForkName(block.message.slot),
|
|
1242
1215
|
},
|
|
@@ -1334,10 +1307,14 @@ export function getBeaconBlockApi(
|
|
|
1334
1307
|
blobs = [];
|
|
1335
1308
|
}
|
|
1336
1309
|
|
|
1310
|
+
// Post-gloas blobs belong to the block's own payload, its FULL variant only exists once imported
|
|
1311
|
+
const payload = finalized ? null : chain.forkChoice.getBlockHex(blockRootHex, PayloadStatus.FULL);
|
|
1337
1312
|
return {
|
|
1338
1313
|
data: blobs,
|
|
1339
1314
|
meta: {
|
|
1340
|
-
executionOptimistic
|
|
1315
|
+
executionOptimistic: isForkPostGloas(fork)
|
|
1316
|
+
? !finalized && (payload === null || isOptimisticBlock(payload))
|
|
1317
|
+
: executionOptimistic,
|
|
1341
1318
|
finalized,
|
|
1342
1319
|
},
|
|
1343
1320
|
};
|