@lodestar/beacon-node 1.41.0-dev.bb33751bfd → 1.41.0-dev.c11b797bd6
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.map +1 -1
- package/lib/api/impl/beacon/blocks/index.d.ts +1 -1
- package/lib/api/impl/beacon/blocks/index.d.ts.map +1 -1
- package/lib/api/impl/beacon/blocks/index.js +3 -2
- package/lib/api/impl/beacon/blocks/index.js.map +1 -1
- package/lib/api/impl/beacon/blocks/utils.js.map +1 -1
- package/lib/api/impl/beacon/index.js.map +1 -1
- package/lib/api/impl/beacon/pool/index.d.ts +1 -1
- package/lib/api/impl/beacon/pool/index.d.ts.map +1 -1
- package/lib/api/impl/beacon/pool/index.js.map +1 -1
- package/lib/api/impl/beacon/rewards/index.d.ts +1 -1
- package/lib/api/impl/beacon/rewards/index.d.ts.map +1 -1
- package/lib/api/impl/beacon/rewards/index.js.map +1 -1
- package/lib/api/impl/beacon/state/index.d.ts +1 -1
- package/lib/api/impl/beacon/state/index.d.ts.map +1 -1
- package/lib/api/impl/beacon/state/index.js.map +1 -1
- package/lib/api/impl/beacon/state/utils.js.map +1 -1
- package/lib/api/impl/config/constants.js.map +1 -1
- package/lib/api/impl/config/index.js.map +1 -1
- package/lib/api/impl/debug/index.d.ts +1 -1
- package/lib/api/impl/debug/index.d.ts.map +1 -1
- package/lib/api/impl/debug/index.js.map +1 -1
- package/lib/api/impl/errors.d.ts.map +1 -1
- package/lib/api/impl/errors.js.map +1 -1
- package/lib/api/impl/events/index.d.ts +1 -1
- package/lib/api/impl/events/index.d.ts.map +1 -1
- package/lib/api/impl/events/index.js.map +1 -1
- package/lib/api/impl/lightclient/index.d.ts +1 -1
- package/lib/api/impl/lightclient/index.d.ts.map +1 -1
- package/lib/api/impl/lightclient/index.js.map +1 -1
- package/lib/api/impl/lodestar/index.d.ts +1 -1
- package/lib/api/impl/lodestar/index.d.ts.map +1 -1
- package/lib/api/impl/lodestar/index.js.map +1 -1
- package/lib/api/impl/node/index.js.map +1 -1
- package/lib/api/impl/node/utils.js.map +1 -1
- package/lib/api/impl/proof/index.js.map +1 -1
- package/lib/api/impl/utils.js.map +1 -1
- package/lib/api/impl/validator/index.d.ts.map +1 -1
- package/lib/api/impl/validator/index.js +30 -12
- package/lib/api/impl/validator/index.js.map +1 -1
- package/lib/api/impl/validator/utils.d.ts +1 -1
- package/lib/api/impl/validator/utils.d.ts.map +1 -1
- package/lib/api/impl/validator/utils.js.map +1 -1
- package/lib/api/rest/activeSockets.d.ts.map +1 -1
- package/lib/api/rest/activeSockets.js.map +1 -1
- package/lib/api/rest/base.d.ts.map +1 -1
- package/lib/api/rest/base.js.map +1 -1
- package/lib/api/rest/index.d.ts.map +1 -1
- package/lib/api/rest/index.js.map +1 -1
- package/lib/api/rest/swaggerUI.js.map +1 -1
- package/lib/bun-wrappers/prometheus-gc-stats.js.map +1 -1
- package/lib/chain/ColumnReconstructionTracker.d.ts.map +1 -1
- package/lib/chain/ColumnReconstructionTracker.js.map +1 -1
- package/lib/chain/GetBlobsTracker.d.ts.map +1 -1
- package/lib/chain/GetBlobsTracker.js.map +1 -1
- package/lib/chain/archiveStore/archiveStore.d.ts.map +1 -1
- package/lib/chain/archiveStore/archiveStore.js +2 -1
- package/lib/chain/archiveStore/archiveStore.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/getHistoricalState.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/historicalStateRegen.d.ts.map +1 -1
- package/lib/chain/archiveStore/historicalState/historicalStateRegen.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/metrics.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/types.js +2 -1
- package/lib/chain/archiveStore/historicalState/types.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/worker.js.map +1 -1
- package/lib/chain/archiveStore/interface.js +2 -1
- package/lib/chain/archiveStore/interface.js.map +1 -1
- package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.d.ts +1 -1
- package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.d.ts.map +1 -1
- package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.js +2 -1
- package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.js.map +1 -1
- package/lib/chain/archiveStore/utils/archiveBlocks.d.ts +3 -8
- package/lib/chain/archiveStore/utils/archiveBlocks.d.ts.map +1 -1
- package/lib/chain/archiveStore/utils/archiveBlocks.js +1 -1
- package/lib/chain/archiveStore/utils/archiveBlocks.js.map +1 -1
- package/lib/chain/archiveStore/utils/archivePayloads.js.map +1 -1
- package/lib/chain/archiveStore/utils/pruneHistory.js.map +1 -1
- package/lib/chain/archiveStore/utils/updateBackfillRange.js +1 -1
- package/lib/chain/archiveStore/utils/updateBackfillRange.js.map +1 -1
- package/lib/chain/balancesCache.d.ts.map +1 -1
- package/lib/chain/balancesCache.js.map +1 -1
- package/lib/chain/beaconProposerCache.d.ts.map +1 -1
- package/lib/chain/beaconProposerCache.js.map +1 -1
- package/lib/chain/blocks/blockInput/blockInput.d.ts +5 -0
- package/lib/chain/blocks/blockInput/blockInput.d.ts.map +1 -1
- package/lib/chain/blocks/blockInput/blockInput.js +24 -0
- package/lib/chain/blocks/blockInput/blockInput.js.map +1 -1
- package/lib/chain/blocks/blockInput/errors.js +2 -1
- package/lib/chain/blocks/blockInput/errors.js.map +1 -1
- package/lib/chain/blocks/blockInput/types.d.ts +16 -0
- package/lib/chain/blocks/blockInput/types.d.ts.map +1 -1
- package/lib/chain/blocks/blockInput/types.js +4 -2
- package/lib/chain/blocks/blockInput/types.js.map +1 -1
- package/lib/chain/blocks/blockInput/utils.js.map +1 -1
- package/lib/chain/blocks/importBlock.d.ts.map +1 -1
- package/lib/chain/blocks/importBlock.js +27 -4
- package/lib/chain/blocks/importBlock.js.map +1 -1
- package/lib/chain/blocks/index.d.ts.map +1 -1
- package/lib/chain/blocks/index.js.map +1 -1
- package/lib/chain/blocks/types.js +6 -3
- package/lib/chain/blocks/types.js.map +1 -1
- package/lib/chain/blocks/utils/chainSegment.js.map +1 -1
- package/lib/chain/blocks/utils/checkpoint.js.map +1 -1
- package/lib/chain/blocks/verifyBlock.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksDataAvailability.js.map +1 -1
- 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 -1
- package/lib/chain/blocks/verifyBlocksSanityChecks.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksSignatures.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksStateTransitionOnly.js.map +1 -1
- package/lib/chain/blocks/writeBlockInputToDb.d.ts +12 -3
- package/lib/chain/blocks/writeBlockInputToDb.d.ts.map +1 -1
- package/lib/chain/blocks/writeBlockInputToDb.js +92 -98
- package/lib/chain/blocks/writeBlockInputToDb.js.map +1 -1
- package/lib/chain/bls/maybeBatch.js.map +1 -1
- package/lib/chain/bls/multithread/index.d.ts.map +1 -1
- package/lib/chain/bls/multithread/index.js.map +1 -1
- package/lib/chain/bls/multithread/jobItem.js +2 -1
- package/lib/chain/bls/multithread/jobItem.js.map +1 -1
- package/lib/chain/bls/multithread/types.js +2 -1
- package/lib/chain/bls/multithread/types.js.map +1 -1
- package/lib/chain/bls/multithread/utils.js.map +1 -1
- package/lib/chain/bls/multithread/worker.js.map +1 -1
- package/lib/chain/bls/singleThread.d.ts.map +1 -1
- package/lib/chain/bls/singleThread.js.map +1 -1
- package/lib/chain/bls/utils.js.map +1 -1
- package/lib/chain/chain.d.ts +4 -4
- package/lib/chain/chain.d.ts.map +1 -1
- package/lib/chain/chain.js +13 -12
- package/lib/chain/chain.js.map +1 -1
- package/lib/chain/emitter.d.ts +4 -6
- package/lib/chain/emitter.d.ts.map +1 -1
- package/lib/chain/emitter.js +2 -1
- package/lib/chain/emitter.js.map +1 -1
- package/lib/chain/errors/attestationError.d.ts.map +1 -1
- package/lib/chain/errors/attestationError.js +2 -1
- package/lib/chain/errors/attestationError.js.map +1 -1
- package/lib/chain/errors/attesterSlashingError.js +2 -1
- package/lib/chain/errors/attesterSlashingError.js.map +1 -1
- package/lib/chain/errors/blobSidecarError.js +2 -1
- package/lib/chain/errors/blobSidecarError.js.map +1 -1
- package/lib/chain/errors/blockError.d.ts.map +1 -1
- package/lib/chain/errors/blockError.js +2 -1
- package/lib/chain/errors/blockError.js.map +1 -1
- package/lib/chain/errors/blsToExecutionChangeError.js +2 -1
- package/lib/chain/errors/blsToExecutionChangeError.js.map +1 -1
- package/lib/chain/errors/dataColumnSidecarError.js +2 -1
- package/lib/chain/errors/dataColumnSidecarError.js.map +1 -1
- package/lib/chain/errors/executionPayloadBid.d.ts +1 -1
- package/lib/chain/errors/executionPayloadBid.js +2 -1
- package/lib/chain/errors/executionPayloadBid.js.map +1 -1
- package/lib/chain/errors/executionPayloadEnvelope.d.ts +2 -2
- package/lib/chain/errors/executionPayloadEnvelope.d.ts.map +1 -1
- package/lib/chain/errors/executionPayloadEnvelope.js +2 -1
- package/lib/chain/errors/executionPayloadEnvelope.js.map +1 -1
- package/lib/chain/errors/gossipValidation.d.ts.map +1 -1
- package/lib/chain/errors/gossipValidation.js +4 -2
- package/lib/chain/errors/gossipValidation.js.map +1 -1
- package/lib/chain/errors/lightClientError.js +4 -2
- package/lib/chain/errors/lightClientError.js.map +1 -1
- package/lib/chain/errors/payloadAttestation.d.ts +1 -1
- package/lib/chain/errors/payloadAttestation.js +2 -1
- package/lib/chain/errors/payloadAttestation.js.map +1 -1
- package/lib/chain/errors/proposerSlashingError.js +2 -1
- package/lib/chain/errors/proposerSlashingError.js.map +1 -1
- package/lib/chain/errors/syncCommitteeError.js +2 -1
- package/lib/chain/errors/syncCommitteeError.js.map +1 -1
- package/lib/chain/errors/voluntaryExitError.js +2 -1
- package/lib/chain/errors/voluntaryExitError.js.map +1 -1
- package/lib/chain/forkChoice/index.d.ts.map +1 -1
- package/lib/chain/forkChoice/index.js +32 -25
- package/lib/chain/forkChoice/index.js.map +1 -1
- package/lib/chain/initState.d.ts +1 -1
- package/lib/chain/initState.d.ts.map +1 -1
- package/lib/chain/initState.js.map +1 -1
- package/lib/chain/interface.js +2 -1
- package/lib/chain/interface.js.map +1 -1
- package/lib/chain/lightClient/index.d.ts +0 -29
- package/lib/chain/lightClient/index.d.ts.map +1 -1
- package/lib/chain/lightClient/index.js.map +1 -1
- package/lib/chain/lightClient/proofs.js.map +1 -1
- package/lib/chain/opPools/aggregatedAttestationPool.d.ts.map +1 -1
- package/lib/chain/opPools/aggregatedAttestationPool.js +5 -3
- package/lib/chain/opPools/aggregatedAttestationPool.js.map +1 -1
- package/lib/chain/opPools/attestationPool.d.ts.map +1 -1
- package/lib/chain/opPools/attestationPool.js.map +1 -1
- package/lib/chain/opPools/executionPayloadBidPool.d.ts.map +1 -1
- package/lib/chain/opPools/executionPayloadBidPool.js.map +1 -1
- package/lib/chain/opPools/opPool.d.ts.map +1 -1
- 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.map +1 -1
- package/lib/chain/opPools/syncCommitteeMessagePool.d.ts.map +1 -1
- 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.map +1 -1
- package/lib/chain/opPools/types.js +4 -2
- package/lib/chain/opPools/types.js.map +1 -1
- package/lib/chain/opPools/utils.js.map +1 -1
- package/lib/chain/prepareNextSlot.d.ts +1 -2
- package/lib/chain/prepareNextSlot.d.ts.map +1 -1
- package/lib/chain/prepareNextSlot.js.map +1 -1
- package/lib/chain/produceBlock/computeNewStateRoot.d.ts +0 -1
- package/lib/chain/produceBlock/computeNewStateRoot.d.ts.map +1 -1
- package/lib/chain/produceBlock/computeNewStateRoot.js +4 -3
- package/lib/chain/produceBlock/computeNewStateRoot.js.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.d.ts +1 -1
- package/lib/chain/produceBlock/produceBlockBody.d.ts.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.js +7 -5
- package/lib/chain/produceBlock/produceBlockBody.js.map +1 -1
- package/lib/chain/produceBlock/validateBlobsAndKzgCommitments.js.map +1 -1
- package/lib/chain/regen/errors.d.ts.map +1 -1
- package/lib/chain/regen/errors.js +2 -1
- package/lib/chain/regen/errors.js.map +1 -1
- package/lib/chain/regen/interface.js +4 -2
- package/lib/chain/regen/interface.js.map +1 -1
- package/lib/chain/regen/queued.d.ts.map +1 -1
- package/lib/chain/regen/queued.js +4 -1
- package/lib/chain/regen/queued.js.map +1 -1
- package/lib/chain/regen/regen.d.ts.map +1 -1
- package/lib/chain/regen/regen.js +6 -2
- package/lib/chain/regen/regen.js.map +1 -1
- package/lib/chain/reprocess.d.ts.map +1 -1
- package/lib/chain/reprocess.js +2 -1
- package/lib/chain/reprocess.js.map +1 -1
- package/lib/chain/seenCache/seenAggregateAndProof.d.ts.map +1 -1
- package/lib/chain/seenCache/seenAggregateAndProof.js.map +1 -1
- package/lib/chain/seenCache/seenAttestationData.d.ts.map +1 -1
- package/lib/chain/seenCache/seenAttestationData.js +2 -1
- package/lib/chain/seenCache/seenAttestationData.js.map +1 -1
- package/lib/chain/seenCache/seenAttesters.d.ts.map +1 -1
- package/lib/chain/seenCache/seenAttesters.js.map +1 -1
- package/lib/chain/seenCache/seenBlockAttesters.d.ts.map +1 -1
- package/lib/chain/seenCache/seenBlockAttesters.js.map +1 -1
- package/lib/chain/seenCache/seenBlockProposers.d.ts.map +1 -1
- package/lib/chain/seenCache/seenBlockProposers.js.map +1 -1
- package/lib/chain/seenCache/seenCommittee.d.ts.map +1 -1
- package/lib/chain/seenCache/seenCommittee.js.map +1 -1
- package/lib/chain/seenCache/seenCommitteeContribution.d.ts.map +1 -1
- package/lib/chain/seenCache/seenCommitteeContribution.js.map +1 -1
- package/lib/chain/seenCache/seenExecutionPayloadBids.d.ts.map +1 -1
- package/lib/chain/seenCache/seenExecutionPayloadBids.js.map +1 -1
- package/lib/chain/seenCache/seenExecutionPayloadEnvelope.d.ts.map +1 -1
- package/lib/chain/seenCache/seenExecutionPayloadEnvelope.js.map +1 -1
- package/lib/chain/seenCache/seenGossipBlockInput.d.ts +7 -3
- package/lib/chain/seenCache/seenGossipBlockInput.d.ts.map +1 -1
- package/lib/chain/seenCache/seenGossipBlockInput.js +23 -9
- package/lib/chain/seenCache/seenGossipBlockInput.js.map +1 -1
- package/lib/chain/serializeState.js +1 -0
- package/lib/chain/serializeState.js.map +1 -1
- package/lib/chain/shufflingCache.d.ts.map +1 -1
- package/lib/chain/shufflingCache.js +2 -1
- package/lib/chain/shufflingCache.js.map +1 -1
- package/lib/chain/stateCache/datastore/db.d.ts.map +1 -1
- package/lib/chain/stateCache/datastore/db.js.map +1 -1
- package/lib/chain/stateCache/datastore/file.d.ts.map +1 -1
- package/lib/chain/stateCache/datastore/file.js.map +1 -1
- package/lib/chain/stateCache/fifoBlockStateCache.d.ts.map +1 -1
- package/lib/chain/stateCache/fifoBlockStateCache.js.map +1 -1
- package/lib/chain/stateCache/mapMetrics.d.ts.map +1 -1
- package/lib/chain/stateCache/mapMetrics.js.map +1 -1
- package/lib/chain/stateCache/persistentCheckpointsCache.d.ts +1 -41
- package/lib/chain/stateCache/persistentCheckpointsCache.d.ts.map +1 -1
- package/lib/chain/stateCache/persistentCheckpointsCache.js.map +1 -1
- package/lib/chain/stateCache/types.js +2 -1
- package/lib/chain/stateCache/types.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.d.ts.map +1 -1
- package/lib/chain/validation/attestation.js +10 -6
- package/lib/chain/validation/attestation.js.map +1 -1
- package/lib/chain/validation/attesterSlashing.d.ts.map +1 -1
- package/lib/chain/validation/attesterSlashing.js +8 -1
- package/lib/chain/validation/attesterSlashing.js.map +1 -1
- package/lib/chain/validation/blobSidecar.js +2 -2
- package/lib/chain/validation/blobSidecar.js.map +1 -1
- package/lib/chain/validation/block.d.ts.map +1 -1
- package/lib/chain/validation/block.js +6 -3
- package/lib/chain/validation/block.js.map +1 -1
- package/lib/chain/validation/blsToExecutionChange.js.map +1 -1
- package/lib/chain/validation/dataColumnSidecar.js +1 -1
- package/lib/chain/validation/dataColumnSidecar.js.map +1 -1
- package/lib/chain/validation/executionPayloadBid.js +1 -2
- package/lib/chain/validation/executionPayloadBid.js.map +1 -1
- package/lib/chain/validation/executionPayloadEnvelope.js +4 -4
- package/lib/chain/validation/executionPayloadEnvelope.js.map +1 -1
- package/lib/chain/validation/lightClientFinalityUpdate.js.map +1 -1
- package/lib/chain/validation/lightClientOptimisticUpdate.js.map +1 -1
- package/lib/chain/validation/payloadAttestationMessage.js +1 -2
- package/lib/chain/validation/payloadAttestationMessage.js.map +1 -1
- package/lib/chain/validation/proposerSlashing.js.map +1 -1
- package/lib/chain/validation/signatureSets/aggregateAndProof.js.map +1 -1
- package/lib/chain/validation/signatureSets/contributionAndProof.js.map +1 -1
- package/lib/chain/validation/signatureSets/selectionProof.js.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommittee.js.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommitteeContribution.js.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommitteeSelectionProof.js.map +1 -1
- package/lib/chain/validation/syncCommittee.js.map +1 -1
- package/lib/chain/validation/syncCommitteeContributionAndProof.js.map +1 -1
- package/lib/chain/validation/voluntaryExit.js.map +1 -1
- package/lib/chain/validatorMonitor.d.ts.map +1 -1
- package/lib/chain/validatorMonitor.js +2 -1
- package/lib/chain/validatorMonitor.js.map +1 -1
- package/lib/constants/network.js +4 -2
- package/lib/constants/network.js.map +1 -1
- package/lib/db/beacon.d.ts.map +1 -1
- package/lib/db/beacon.js.map +1 -1
- package/lib/db/buckets.d.ts +23 -23
- package/lib/db/buckets.d.ts.map +1 -1
- package/lib/db/buckets.js +2 -1
- package/lib/db/buckets.js.map +1 -1
- package/lib/db/index.d.ts +1 -0
- package/lib/db/index.d.ts.map +1 -1
- package/lib/db/index.js +1 -0
- package/lib/db/index.js.map +1 -1
- package/lib/db/repositories/attesterSlashing.d.ts.map +1 -1
- package/lib/db/repositories/attesterSlashing.js.map +1 -1
- package/lib/db/repositories/backfilledRanges.d.ts.map +1 -1
- package/lib/db/repositories/backfilledRanges.js.map +1 -1
- package/lib/db/repositories/blobSidecars.d.ts.map +1 -1
- package/lib/db/repositories/blobSidecars.js.map +1 -1
- package/lib/db/repositories/blobSidecarsArchive.d.ts.map +1 -1
- package/lib/db/repositories/blobSidecarsArchive.js.map +1 -1
- package/lib/db/repositories/block.d.ts.map +1 -1
- package/lib/db/repositories/block.js.map +1 -1
- package/lib/db/repositories/blockArchive.d.ts.map +1 -1
- package/lib/db/repositories/blockArchive.js.map +1 -1
- package/lib/db/repositories/blockArchiveIndex.d.ts +2 -2
- package/lib/db/repositories/blockArchiveIndex.js.map +1 -1
- package/lib/db/repositories/blsToExecutionChange.d.ts.map +1 -1
- package/lib/db/repositories/blsToExecutionChange.js.map +1 -1
- package/lib/db/repositories/checkpointState.d.ts.map +1 -1
- package/lib/db/repositories/checkpointState.js.map +1 -1
- package/lib/db/repositories/dataColumnSidecar.d.ts.map +1 -1
- package/lib/db/repositories/dataColumnSidecar.js.map +1 -1
- package/lib/db/repositories/dataColumnSidecarArchive.d.ts.map +1 -1
- package/lib/db/repositories/dataColumnSidecarArchive.js.map +1 -1
- package/lib/db/repositories/executionPayloadEnvelope.d.ts.map +1 -1
- package/lib/db/repositories/executionPayloadEnvelope.js.map +1 -1
- package/lib/db/repositories/executionPayloadEnvelopeArchive.d.ts.map +1 -1
- package/lib/db/repositories/executionPayloadEnvelopeArchive.js.map +1 -1
- package/lib/db/repositories/lightclientBestUpdate.d.ts.map +1 -1
- package/lib/db/repositories/lightclientBestUpdate.js.map +1 -1
- package/lib/db/repositories/lightclientCheckpointHeader.d.ts.map +1 -1
- package/lib/db/repositories/lightclientCheckpointHeader.js.map +1 -1
- package/lib/db/repositories/lightclientSyncCommittee.d.ts.map +1 -1
- package/lib/db/repositories/lightclientSyncCommittee.js.map +1 -1
- package/lib/db/repositories/lightclientSyncCommitteeWitness.d.ts.map +1 -1
- package/lib/db/repositories/lightclientSyncCommitteeWitness.js.map +1 -1
- package/lib/db/repositories/proposerSlashing.d.ts.map +1 -1
- package/lib/db/repositories/proposerSlashing.js.map +1 -1
- package/lib/db/repositories/stateArchive.d.ts.map +1 -1
- package/lib/db/repositories/stateArchive.js.map +1 -1
- package/lib/db/repositories/stateArchiveIndex.js.map +1 -1
- package/lib/db/repositories/voluntaryExit.d.ts.map +1 -1
- package/lib/db/repositories/voluntaryExit.js.map +1 -1
- package/lib/execution/builder/cache.d.ts.map +1 -1
- package/lib/execution/builder/cache.js.map +1 -1
- package/lib/execution/builder/http.d.ts.map +1 -1
- package/lib/execution/builder/http.js +2 -1
- package/lib/execution/builder/http.js.map +1 -1
- package/lib/execution/builder/index.js.map +1 -1
- package/lib/execution/builder/utils.js.map +1 -1
- package/lib/execution/engine/disabled.d.ts.map +1 -1
- package/lib/execution/engine/disabled.js.map +1 -1
- package/lib/execution/engine/http.d.ts.map +1 -1
- package/lib/execution/engine/http.js.map +1 -1
- package/lib/execution/engine/index.js.map +1 -1
- package/lib/execution/engine/interface.js +4 -2
- package/lib/execution/engine/interface.js.map +1 -1
- package/lib/execution/engine/jsonRpcHttpClient.d.ts +10 -15
- package/lib/execution/engine/jsonRpcHttpClient.d.ts.map +1 -1
- package/lib/execution/engine/jsonRpcHttpClient.js +2 -1
- package/lib/execution/engine/jsonRpcHttpClient.js.map +1 -1
- package/lib/execution/engine/jwt.js.map +1 -1
- package/lib/execution/engine/mock.d.ts.map +1 -1
- package/lib/execution/engine/mock.js.map +1 -1
- package/lib/execution/engine/payloadIdCache.d.ts.map +1 -1
- package/lib/execution/engine/payloadIdCache.js.map +1 -1
- package/lib/execution/engine/types.js.map +1 -1
- package/lib/execution/engine/utils.d.ts +1 -1
- package/lib/execution/engine/utils.d.ts.map +1 -1
- package/lib/execution/engine/utils.js.map +1 -1
- package/lib/metrics/metrics/beacon.d.ts.map +1 -1
- package/lib/metrics/metrics/beacon.js.map +1 -1
- package/lib/metrics/metrics/lodestar.d.ts +8 -6
- package/lib/metrics/metrics/lodestar.d.ts.map +1 -1
- package/lib/metrics/metrics/lodestar.js +18 -10
- package/lib/metrics/metrics/lodestar.js.map +1 -1
- package/lib/metrics/metrics.js.map +1 -1
- package/lib/metrics/nodeJsMetrics.js.map +1 -1
- package/lib/metrics/server/http.d.ts +1 -1
- package/lib/metrics/server/http.d.ts.map +1 -1
- package/lib/metrics/server/http.js.map +1 -1
- package/lib/metrics/utils/avgMinMax.d.ts.map +1 -1
- package/lib/metrics/utils/avgMinMax.js.map +1 -1
- package/lib/metrics/utils/gauge.d.ts.map +1 -1
- package/lib/metrics/utils/gauge.js.map +1 -1
- package/lib/metrics/utils/registryMetricCreator.d.ts.map +1 -1
- package/lib/metrics/utils/registryMetricCreator.js.map +1 -1
- package/lib/monitoring/clientStats.js.map +1 -1
- package/lib/monitoring/properties.d.ts.map +1 -1
- package/lib/monitoring/properties.js.map +1 -1
- package/lib/monitoring/service.d.ts.map +1 -1
- package/lib/monitoring/service.js.map +1 -1
- package/lib/monitoring/system.d.ts.map +1 -1
- package/lib/monitoring/system.js.map +1 -1
- package/lib/monitoring/types.js +4 -2
- package/lib/monitoring/types.js.map +1 -1
- package/lib/network/core/events.d.ts +1 -3
- package/lib/network/core/events.d.ts.map +1 -1
- package/lib/network/core/events.js +4 -2
- package/lib/network/core/events.js.map +1 -1
- package/lib/network/core/metrics.d.ts +6 -7
- package/lib/network/core/metrics.d.ts.map +1 -1
- package/lib/network/core/metrics.js.map +1 -1
- package/lib/network/core/networkCore.d.ts +1 -1
- package/lib/network/core/networkCore.d.ts.map +1 -1
- package/lib/network/core/networkCore.js.map +1 -1
- package/lib/network/core/networkCoreWorker.js.map +1 -1
- package/lib/network/core/networkCoreWorkerHandler.d.ts.map +1 -1
- package/lib/network/core/networkCoreWorkerHandler.js.map +1 -1
- package/lib/network/discv5/index.d.ts +1 -3
- package/lib/network/discv5/index.d.ts.map +1 -1
- package/lib/network/discv5/index.js.map +1 -1
- package/lib/network/discv5/utils.d.ts +1 -1
- package/lib/network/discv5/utils.d.ts.map +1 -1
- package/lib/network/discv5/utils.js +7 -5
- package/lib/network/discv5/utils.js.map +1 -1
- package/lib/network/discv5/worker.js.map +1 -1
- package/lib/network/events.d.ts +1 -3
- package/lib/network/events.d.ts.map +1 -1
- package/lib/network/events.js +4 -2
- package/lib/network/events.js.map +1 -1
- package/lib/network/forks.js.map +1 -1
- package/lib/network/gossip/encoding.d.ts.map +1 -1
- package/lib/network/gossip/encoding.js.map +1 -1
- package/lib/network/gossip/errors.d.ts.map +1 -1
- package/lib/network/gossip/errors.js.map +1 -1
- package/lib/network/gossip/gossipsub.d.ts.map +1 -1
- package/lib/network/gossip/gossipsub.js +9 -6
- package/lib/network/gossip/gossipsub.js.map +1 -1
- package/lib/network/gossip/interface.js +4 -2
- package/lib/network/gossip/interface.js.map +1 -1
- package/lib/network/gossip/metrics.d.ts +12 -14
- package/lib/network/gossip/metrics.d.ts.map +1 -1
- package/lib/network/gossip/metrics.js.map +1 -1
- package/lib/network/gossip/scoringParameters.d.ts +1 -1
- package/lib/network/gossip/scoringParameters.d.ts.map +1 -1
- package/lib/network/gossip/scoringParameters.js.map +1 -1
- package/lib/network/gossip/topic.d.ts +2867 -2920
- package/lib/network/gossip/topic.d.ts.map +1 -1
- package/lib/network/gossip/topic.js.map +1 -1
- package/lib/network/libp2p/error.js +2 -1
- package/lib/network/libp2p/error.js.map +1 -1
- package/lib/network/libp2p/index.d.ts +1 -1
- package/lib/network/libp2p/index.d.ts.map +1 -1
- package/lib/network/libp2p/index.js +35 -17
- package/lib/network/libp2p/index.js.map +1 -1
- package/lib/network/metadata.d.ts +1 -0
- package/lib/network/metadata.d.ts.map +1 -1
- package/lib/network/metadata.js +5 -2
- package/lib/network/metadata.js.map +1 -1
- package/lib/network/network.d.ts +1 -1
- package/lib/network/network.d.ts.map +1 -1
- package/lib/network/network.js +1 -1
- 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 +3 -0
- package/lib/network/options.js.map +1 -1
- package/lib/network/peers/client.js +2 -1
- package/lib/network/peers/client.js.map +1 -1
- package/lib/network/peers/datastore.d.ts +0 -3
- package/lib/network/peers/datastore.d.ts.map +1 -1
- package/lib/network/peers/datastore.js.map +1 -1
- package/lib/network/peers/discover.d.ts +2 -7
- package/lib/network/peers/discover.d.ts.map +1 -1
- package/lib/network/peers/discover.js +45 -12
- package/lib/network/peers/discover.js.map +1 -1
- package/lib/network/peers/peerManager.d.ts +0 -1
- package/lib/network/peers/peerManager.d.ts.map +1 -1
- package/lib/network/peers/peerManager.js.map +1 -1
- package/lib/network/peers/peersData.d.ts.map +1 -1
- package/lib/network/peers/peersData.js +2 -1
- package/lib/network/peers/peersData.js.map +1 -1
- package/lib/network/peers/score/interface.js +4 -2
- package/lib/network/peers/score/interface.js.map +1 -1
- package/lib/network/peers/score/score.d.ts.map +1 -1
- package/lib/network/peers/score/score.js.map +1 -1
- package/lib/network/peers/score/store.d.ts.map +1 -1
- package/lib/network/peers/score/store.js.map +1 -1
- package/lib/network/peers/score/utils.js.map +1 -1
- package/lib/network/peers/utils/assertPeerRelevance.js +2 -1
- package/lib/network/peers/utils/assertPeerRelevance.js.map +1 -1
- package/lib/network/peers/utils/enrSubnetsDeserialize.js.map +1 -1
- package/lib/network/peers/utils/getConnectedPeerIds.js.map +1 -1
- package/lib/network/peers/utils/prioritizePeers.js +2 -1
- package/lib/network/peers/utils/prioritizePeers.js.map +1 -1
- package/lib/network/peers/utils/subnetMap.d.ts.map +1 -1
- package/lib/network/peers/utils/subnetMap.js.map +1 -1
- package/lib/network/processor/aggregatorTracker.d.ts.map +1 -1
- package/lib/network/processor/aggregatorTracker.js.map +1 -1
- 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 +1 -0
- package/lib/network/processor/gossipHandlers.js.map +1 -1
- package/lib/network/processor/gossipQueues/index.js.map +1 -1
- package/lib/network/processor/gossipQueues/indexed.d.ts.map +1 -1
- package/lib/network/processor/gossipQueues/indexed.js.map +1 -1
- package/lib/network/processor/gossipQueues/linear.d.ts.map +1 -1
- package/lib/network/processor/gossipQueues/linear.js.map +1 -1
- package/lib/network/processor/gossipQueues/types.js +4 -2
- package/lib/network/processor/gossipQueues/types.js.map +1 -1
- package/lib/network/processor/gossipValidatorFn.js.map +1 -1
- package/lib/network/processor/index.d.ts.map +1 -1
- package/lib/network/processor/index.js +4 -2
- 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.map +1 -1
- package/lib/network/reqresp/handlers/beaconBlocksByRange.d.ts.map +1 -1
- package/lib/network/reqresp/handlers/beaconBlocksByRange.js +3 -2
- package/lib/network/reqresp/handlers/beaconBlocksByRange.js.map +1 -1
- package/lib/network/reqresp/handlers/beaconBlocksByRoot.js.map +1 -1
- package/lib/network/reqresp/handlers/blobSidecarsByRange.d.ts.map +1 -1
- package/lib/network/reqresp/handlers/blobSidecarsByRange.js +3 -2
- package/lib/network/reqresp/handlers/blobSidecarsByRange.js.map +1 -1
- package/lib/network/reqresp/handlers/blobSidecarsByRoot.js +1 -1
- package/lib/network/reqresp/handlers/blobSidecarsByRoot.js.map +1 -1
- package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.d.ts.map +1 -1
- package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.js +3 -2
- package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.js.map +1 -1
- package/lib/network/reqresp/handlers/dataColumnSidecarsByRoot.js +1 -1
- package/lib/network/reqresp/handlers/dataColumnSidecarsByRoot.js.map +1 -1
- package/lib/network/reqresp/handlers/index.js.map +1 -1
- package/lib/network/reqresp/handlers/lightClientBootstrap.js.map +1 -1
- package/lib/network/reqresp/handlers/lightClientFinalityUpdate.js.map +1 -1
- package/lib/network/reqresp/handlers/lightClientOptimisticUpdate.js.map +1 -1
- package/lib/network/reqresp/handlers/lightClientUpdatesByRange.js.map +1 -1
- package/lib/network/reqresp/interface.js +2 -1
- package/lib/network/reqresp/interface.js.map +1 -1
- package/lib/network/reqresp/protocols.d.ts.map +1 -1
- package/lib/network/reqresp/protocols.js.map +1 -1
- package/lib/network/reqresp/rateLimit.js.map +1 -1
- package/lib/network/reqresp/score.js.map +1 -1
- package/lib/network/reqresp/types.js +4 -2
- package/lib/network/reqresp/types.js.map +1 -1
- package/lib/network/reqresp/utils/collect.d.ts +1 -1
- 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.js +2 -1
- package/lib/network/reqresp/utils/collectSequentialBlocksInRange.js.map +1 -1
- package/lib/network/reqresp/utils/dataColumnResponseValidation.d.ts +1 -1
- package/lib/network/reqresp/utils/dataColumnResponseValidation.d.ts.map +1 -1
- package/lib/network/reqresp/utils/dataColumnResponseValidation.js.map +1 -1
- package/lib/network/statusCache.d.ts.map +1 -1
- package/lib/network/statusCache.js.map +1 -1
- package/lib/network/subnets/attnetsService.d.ts.map +1 -1
- package/lib/network/subnets/attnetsService.js +2 -1
- package/lib/network/subnets/attnetsService.js.map +1 -1
- package/lib/network/subnets/interface.js.map +1 -1
- package/lib/network/subnets/syncnetsService.d.ts.map +1 -1
- package/lib/network/subnets/syncnetsService.js.map +1 -1
- package/lib/network/subnets/util.js.map +1 -1
- package/lib/network/util.js.map +1 -1
- package/lib/node/nodejs.d.ts +2 -2
- package/lib/node/nodejs.d.ts.map +1 -1
- package/lib/node/nodejs.js +2 -1
- package/lib/node/nodejs.js.map +1 -1
- package/lib/node/notifier.js.map +1 -1
- package/lib/node/utils/interop/deposits.js.map +1 -1
- package/lib/node/utils/interop/state.d.ts +1 -1
- package/lib/node/utils/interop/state.d.ts.map +1 -1
- package/lib/node/utils/interop/state.js.map +1 -1
- package/lib/node/utils/lightclient.js.map +1 -1
- package/lib/node/utils/state.js.map +1 -1
- package/lib/sync/backfill/backfill.d.ts +1 -10
- package/lib/sync/backfill/backfill.d.ts.map +1 -1
- package/lib/sync/backfill/backfill.js +6 -3
- package/lib/sync/backfill/backfill.js.map +1 -1
- package/lib/sync/backfill/errors.js +2 -1
- package/lib/sync/backfill/errors.js.map +1 -1
- package/lib/sync/backfill/verify.js.map +1 -1
- package/lib/sync/interface.js +2 -1
- package/lib/sync/interface.js.map +1 -1
- package/lib/sync/range/batch.d.ts.map +1 -1
- package/lib/sync/range/batch.js +4 -2
- package/lib/sync/range/batch.js.map +1 -1
- package/lib/sync/range/chain.d.ts +0 -10
- package/lib/sync/range/chain.d.ts.map +1 -1
- package/lib/sync/range/chain.js +2 -1
- package/lib/sync/range/chain.js.map +1 -1
- package/lib/sync/range/range.d.ts +1 -3
- package/lib/sync/range/range.d.ts.map +1 -1
- package/lib/sync/range/range.js +4 -2
- package/lib/sync/range/range.js.map +1 -1
- package/lib/sync/range/utils/batches.js.map +1 -1
- package/lib/sync/range/utils/chainTarget.js.map +1 -1
- package/lib/sync/range/utils/hashBlocks.js.map +1 -1
- package/lib/sync/range/utils/peerBalancer.d.ts.map +1 -1
- package/lib/sync/range/utils/peerBalancer.js.map +1 -1
- package/lib/sync/range/utils/updateChains.js.map +1 -1
- package/lib/sync/sync.d.ts.map +1 -1
- package/lib/sync/sync.js.map +1 -1
- package/lib/sync/types.js +4 -2
- package/lib/sync/types.js.map +1 -1
- package/lib/sync/unknownBlock.d.ts +0 -14
- package/lib/sync/unknownBlock.d.ts.map +1 -1
- package/lib/sync/unknownBlock.js.map +1 -1
- package/lib/sync/utils/downloadByRange.d.ts +4 -4
- package/lib/sync/utils/downloadByRange.d.ts.map +1 -1
- package/lib/sync/utils/downloadByRange.js +2 -1
- package/lib/sync/utils/downloadByRange.js.map +1 -1
- package/lib/sync/utils/downloadByRoot.d.ts +8 -8
- package/lib/sync/utils/downloadByRoot.d.ts.map +1 -1
- package/lib/sync/utils/downloadByRoot.js +2 -1
- package/lib/sync/utils/downloadByRoot.js.map +1 -1
- package/lib/sync/utils/pendingBlocksTree.js.map +1 -1
- package/lib/sync/utils/remoteSyncType.d.ts +1 -1
- package/lib/sync/utils/remoteSyncType.d.ts.map +1 -1
- package/lib/sync/utils/remoteSyncType.js +4 -2
- package/lib/sync/utils/remoteSyncType.js.map +1 -1
- package/lib/util/address.js.map +1 -1
- package/lib/util/array.d.ts.map +1 -1
- package/lib/util/array.js.map +1 -1
- package/lib/util/asyncIterableToEvents.d.ts.map +1 -1
- package/lib/util/asyncIterableToEvents.js +2 -1
- package/lib/util/asyncIterableToEvents.js.map +1 -1
- package/lib/util/binarySearch.d.ts.map +1 -1
- package/lib/util/binarySearch.js.map +1 -1
- package/lib/util/bitArray.js +2 -1
- package/lib/util/bitArray.js.map +1 -1
- package/lib/util/blobs.js.map +1 -1
- package/lib/util/bufferPool.d.ts.map +1 -1
- package/lib/util/bufferPool.js +2 -1
- package/lib/util/bufferPool.js.map +1 -1
- package/lib/util/chunkify.js.map +1 -1
- package/lib/util/clock.d.ts.map +1 -1
- package/lib/util/clock.js +2 -1
- package/lib/util/clock.js.map +1 -1
- package/lib/util/dataColumns.d.ts.map +1 -1
- package/lib/util/dataColumns.js +4 -2
- package/lib/util/dataColumns.js.map +1 -1
- package/lib/util/dependentRoot.js.map +1 -1
- package/lib/util/enum.js.map +1 -1
- package/lib/util/error.js.map +1 -1
- package/lib/util/eventLoop.js.map +1 -1
- package/lib/util/execution.js +2 -1
- package/lib/util/execution.js.map +1 -1
- package/lib/util/file.js.map +1 -1
- package/lib/util/forkChoice.js.map +1 -1
- package/lib/util/forkName.js.map +1 -1
- package/lib/util/graffiti.js.map +1 -1
- package/lib/util/hex.js.map +1 -1
- package/lib/util/ip.js.map +1 -1
- package/lib/util/itTrigger.d.ts.map +1 -1
- package/lib/util/itTrigger.js.map +1 -1
- package/lib/util/map.d.ts.map +1 -1
- package/lib/util/map.js.map +1 -1
- package/lib/util/metadata.js.map +1 -1
- package/lib/util/multifork.js.map +1 -1
- package/lib/util/numpy.js.map +1 -1
- package/lib/util/peerId.js.map +1 -1
- package/lib/util/profile.js +2 -1
- package/lib/util/profile.js.map +1 -1
- package/lib/util/promises.js.map +1 -1
- package/lib/util/queue/errors.js +2 -1
- package/lib/util/queue/errors.js.map +1 -1
- package/lib/util/queue/fnQueue.d.ts.map +1 -1
- package/lib/util/queue/fnQueue.js.map +1 -1
- package/lib/util/queue/itemQueue.d.ts.map +1 -1
- package/lib/util/queue/itemQueue.js.map +1 -1
- package/lib/util/queue/options.js +2 -1
- package/lib/util/queue/options.js.map +1 -1
- package/lib/util/serializedCache.d.ts +4 -4
- package/lib/util/serializedCache.d.ts.map +1 -1
- package/lib/util/serializedCache.js +6 -4
- package/lib/util/serializedCache.js.map +1 -1
- package/lib/util/set.d.ts.map +1 -1
- package/lib/util/set.js.map +1 -1
- package/lib/util/shuffle.js.map +1 -1
- package/lib/util/sortBy.js.map +1 -1
- package/lib/util/sszBytes.js.map +1 -1
- package/lib/util/time.js.map +1 -1
- package/lib/util/timeSeries.d.ts.map +1 -1
- package/lib/util/timeSeries.js.map +1 -1
- package/lib/util/types.d.ts.map +1 -1
- package/lib/util/workerEvents.d.ts +1 -1
- package/lib/util/workerEvents.d.ts.map +1 -1
- package/lib/util/workerEvents.js.map +1 -1
- package/lib/util/wrapError.js.map +1 -1
- package/package.json +29 -28
- package/src/api/impl/beacon/blocks/index.ts +3 -2
- package/src/api/impl/validator/index.ts +26 -12
- package/src/chain/archiveStore/archiveStore.ts +5 -5
- package/src/chain/archiveStore/utils/archiveBlocks.ts +4 -5
- package/src/chain/archiveStore/utils/updateBackfillRange.ts +1 -1
- package/src/chain/blocks/blockInput/blockInput.ts +35 -0
- package/src/chain/blocks/blockInput/types.ts +17 -0
- package/src/chain/blocks/importBlock.ts +35 -4
- package/src/chain/blocks/verifyBlocksSanityChecks.ts +7 -2
- package/src/chain/blocks/writeBlockInputToDb.ts +105 -104
- package/src/chain/chain.ts +31 -19
- package/src/chain/emitter.ts +3 -3
- package/src/chain/errors/executionPayloadBid.ts +1 -1
- package/src/chain/errors/executionPayloadEnvelope.ts +6 -2
- package/src/chain/errors/payloadAttestation.ts +1 -1
- package/src/chain/forkChoice/index.ts +39 -21
- package/src/chain/opPools/aggregatedAttestationPool.ts +1 -1
- package/src/chain/produceBlock/computeNewStateRoot.ts +4 -3
- package/src/chain/produceBlock/produceBlockBody.ts +1 -2
- package/src/chain/regen/queued.ts +7 -2
- package/src/chain/regen/regen.ts +9 -3
- package/src/chain/seenCache/seenGossipBlockInput.ts +40 -11
- package/src/chain/validation/aggregateAndProof.ts +1 -1
- package/src/chain/validation/attestation.ts +10 -6
- package/src/chain/validation/attesterSlashing.ts +9 -0
- package/src/chain/validation/blobSidecar.ts +2 -2
- package/src/chain/validation/block.ts +9 -4
- package/src/chain/validation/dataColumnSidecar.ts +1 -1
- package/src/chain/validation/executionPayloadBid.ts +1 -2
- package/src/chain/validation/executionPayloadEnvelope.ts +4 -4
- package/src/chain/validation/payloadAttestationMessage.ts +1 -2
- package/src/db/index.ts +1 -0
- package/src/metrics/metrics/lodestar.ts +18 -10
- package/src/network/discv5/utils.ts +5 -4
- package/src/network/gossip/gossipsub.ts +12 -7
- package/src/network/libp2p/index.ts +40 -18
- package/src/network/metadata.ts +1 -0
- package/src/network/network.ts +2 -1
- package/src/network/options.ts +5 -1
- package/src/network/peers/discover.ts +46 -11
- package/src/network/processor/gossipHandlers.ts +6 -1
- package/src/network/processor/gossipValidatorFn.ts +1 -1
- package/src/network/reqresp/ReqRespBeaconNode.ts +1 -1
- package/src/network/reqresp/handlers/beaconBlocksByRange.ts +4 -3
- package/src/network/reqresp/handlers/blobSidecarsByRange.ts +3 -2
- package/src/network/reqresp/handlers/blobSidecarsByRoot.ts +1 -1
- package/src/network/reqresp/handlers/dataColumnSidecarsByRange.ts +4 -3
- package/src/network/reqresp/handlers/dataColumnSidecarsByRoot.ts +2 -2
- package/src/network/reqresp/utils/collect.ts +1 -1
- package/src/network/reqresp/utils/collectSequentialBlocksInRange.ts +1 -1
- package/src/sync/utils/downloadByRoot.ts +1 -1
- package/src/sync/utils/remoteSyncType.ts +1 -1
- package/src/util/serializedCache.ts +7 -5
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
isStartSlotOfEpoch,
|
|
21
21
|
isStateValidatorsNodesPopulated,
|
|
22
22
|
} from "@lodestar/state-transition";
|
|
23
|
-
import {Attestation, BeaconBlock, altair, capella, electra, phase0, ssz} from "@lodestar/types";
|
|
23
|
+
import {Attestation, BeaconBlock, altair, capella, electra, isGloasBeaconBlock, phase0, ssz} from "@lodestar/types";
|
|
24
24
|
import {isErrorAborted, toRootHex} from "@lodestar/utils";
|
|
25
25
|
import {ZERO_HASH_HEX} from "../../constants/index.js";
|
|
26
26
|
import {callInNextEventLoop} from "../../util/eventLoop.js";
|
|
@@ -95,7 +95,7 @@ export async function importBlock(
|
|
|
95
95
|
// Without this, a supernode syncing from behind can accumulate many blocks worth of column
|
|
96
96
|
// data in memory (up to 128 columns per block) causing OOM before persistence catches up.
|
|
97
97
|
await this.unfinalizedBlockWrites.waitForSpace();
|
|
98
|
-
this.unfinalizedBlockWrites.push(
|
|
98
|
+
this.unfinalizedBlockWrites.push(blockInput).catch((e) => {
|
|
99
99
|
if (!isQueueErrorAborted(e)) {
|
|
100
100
|
this.logger.error("Error pushing block to unfinalized write queue", {slot: blockSlot}, e as Error);
|
|
101
101
|
}
|
|
@@ -230,6 +230,32 @@ export async function importBlock(
|
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
+
// 4.5. Import payload attestations to fork choice (Gloas)
|
|
234
|
+
//
|
|
235
|
+
if (isGloasBeaconBlock(block.message)) {
|
|
236
|
+
for (const payloadAttestation of block.message.body.payloadAttestations) {
|
|
237
|
+
try {
|
|
238
|
+
// Extract PTC indices from aggregation bits
|
|
239
|
+
const ptcIndices: number[] = [];
|
|
240
|
+
for (let i = 0; i < payloadAttestation.aggregationBits.bitLen; i++) {
|
|
241
|
+
if (payloadAttestation.aggregationBits.get(i)) {
|
|
242
|
+
ptcIndices.push(i);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
if (ptcIndices.length > 0) {
|
|
247
|
+
this.forkChoice.notifyPtcMessages(
|
|
248
|
+
toRootHex(payloadAttestation.data.beaconBlockRoot),
|
|
249
|
+
ptcIndices,
|
|
250
|
+
payloadAttestation.data.payloadPresent
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
} catch (e) {
|
|
254
|
+
this.logger.warn("Error processing PayloadAttestation from block", {slot: blockSlot}, e as Error);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
233
259
|
// 5. Compute head. If new head, immediately stateCache.setHeadState()
|
|
234
260
|
|
|
235
261
|
const oldHead = this.forkChoice.getHead();
|
|
@@ -345,7 +371,7 @@ export async function importBlock(
|
|
|
345
371
|
// 3) Proposer boost reorg related flag is turned on (this is checked inside the function)
|
|
346
372
|
// 4) Block meets the criteria of being re-orged out (this is also checked inside the function)
|
|
347
373
|
const result = this.forkChoice.shouldOverrideForkChoiceUpdate(
|
|
348
|
-
blockSummary
|
|
374
|
+
blockSummary,
|
|
349
375
|
this.clock.secFromSlot(currentSlot),
|
|
350
376
|
currentSlot
|
|
351
377
|
);
|
|
@@ -441,7 +467,12 @@ export async function importBlock(
|
|
|
441
467
|
this.metrics?.currentActiveValidators.set(activeValidatorsCount);
|
|
442
468
|
this.metrics?.currentValidators.set({status: "active"}, activeValidatorsCount);
|
|
443
469
|
|
|
444
|
-
const parentBlockSummary =
|
|
470
|
+
const parentBlockSummary = isGloasBeaconBlock(block.message)
|
|
471
|
+
? this.forkChoice.getBlockHexAndBlockHash(
|
|
472
|
+
toRootHex(checkpointState.latestBlockHeader.parentRoot),
|
|
473
|
+
toRootHex(block.message.body.signedExecutionPayloadBid.message.parentBlockHash)
|
|
474
|
+
)
|
|
475
|
+
: this.forkChoice.getBlockDefaultStatus(checkpointState.latestBlockHeader.parentRoot);
|
|
445
476
|
|
|
446
477
|
if (parentBlockSummary) {
|
|
447
478
|
const justifiedCheckpoint = checkpointState.currentJustifiedCheckpoint;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {ChainForkConfig} from "@lodestar/config";
|
|
2
2
|
import {IForkChoice, ProtoBlock} from "@lodestar/fork-choice";
|
|
3
3
|
import {computeStartSlotAtEpoch} from "@lodestar/state-transition";
|
|
4
|
-
import {RootHex, Slot} from "@lodestar/types";
|
|
4
|
+
import {RootHex, Slot, isGloasBeaconBlock} from "@lodestar/types";
|
|
5
5
|
import {toRootHex} from "@lodestar/utils";
|
|
6
6
|
import {IClock} from "../../util/clock.js";
|
|
7
7
|
import {BlockError, BlockErrorCode} from "../errors/index.js";
|
|
@@ -90,7 +90,12 @@ export function verifyBlocksSanityChecks(
|
|
|
90
90
|
} else {
|
|
91
91
|
// When importing a block segment, only the first NON-IGNORED block must be known to the fork-choice.
|
|
92
92
|
const parentRoot = toRootHex(block.message.parentRoot);
|
|
93
|
-
parentBlock =
|
|
93
|
+
parentBlock = isGloasBeaconBlock(block.message)
|
|
94
|
+
? chain.forkChoice.getBlockHexAndBlockHash(
|
|
95
|
+
parentRoot,
|
|
96
|
+
toRootHex(block.message.body.signedExecutionPayloadBid.message.parentBlockHash)
|
|
97
|
+
)
|
|
98
|
+
: chain.forkChoice.getBlockHexDefaultStatus(parentRoot);
|
|
94
99
|
if (!parentBlock) {
|
|
95
100
|
throw new BlockError(block, {code: BlockErrorCode.PARENT_UNKNOWN, parentRoot});
|
|
96
101
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import {ForkPostDeneb, isForkPostDeneb} from "@lodestar/params";
|
|
2
|
+
import {SignedBeaconBlock} from "@lodestar/types";
|
|
3
|
+
import {fromHex, toRootHex} from "@lodestar/utils";
|
|
4
|
+
import {getBlobKzgCommitments} from "../../util/dataColumns.js";
|
|
3
5
|
import {BeaconChain} from "../chain.js";
|
|
4
|
-
import {IBlockInput, isBlockInputBlobs, isBlockInputColumns} from "./blockInput/index.js";
|
|
6
|
+
import {IBlockInput, IDataColumnsInput, isBlockInputBlobs, isBlockInputColumns} from "./blockInput/index.js";
|
|
5
7
|
import {BLOB_AVAILABILITY_TIMEOUT} from "./verifyBlocksDataAvailability.js";
|
|
6
8
|
|
|
7
9
|
/**
|
|
@@ -10,129 +12,128 @@ import {BLOB_AVAILABILITY_TIMEOUT} from "./verifyBlocksDataAvailability.js";
|
|
|
10
12
|
*
|
|
11
13
|
* This operation may be performed before, during or after importing to the fork-choice. As long as errors
|
|
12
14
|
* are handled properly for eventual consistency.
|
|
15
|
+
*
|
|
16
|
+
* Block+blobs (pre-fulu) and data columns (fulu+) are written in parallel.
|
|
13
17
|
*/
|
|
14
|
-
export async function writeBlockInputToDb(this: BeaconChain,
|
|
15
|
-
const
|
|
16
|
-
// track slots for logging
|
|
17
|
-
const slots: number[] = [];
|
|
18
|
-
|
|
19
|
-
for (const blockInput of blocksInputs) {
|
|
20
|
-
const block = blockInput.getBlock();
|
|
21
|
-
const slot = block.message.slot;
|
|
22
|
-
slots.push(slot);
|
|
23
|
-
const blockRoot = this.config.getForkTypes(block.message.slot).BeaconBlock.hashTreeRoot(block.message);
|
|
24
|
-
const blockRootHex = toRootHex(blockRoot);
|
|
25
|
-
const blockBytes = this.serializedCache.get(block);
|
|
26
|
-
if (blockBytes) {
|
|
27
|
-
// skip serializing data if we already have it
|
|
28
|
-
this.metrics?.importBlock.persistBlockWithSerializedDataCount.inc();
|
|
29
|
-
fnPromises.push(this.db.block.putBinary(this.db.block.getId(block), blockBytes));
|
|
30
|
-
} else {
|
|
31
|
-
this.metrics?.importBlock.persistBlockNoSerializedDataCount.inc();
|
|
32
|
-
fnPromises.push(this.db.block.add(block));
|
|
33
|
-
}
|
|
18
|
+
export async function writeBlockInputToDb(this: BeaconChain, blockInput: IBlockInput): Promise<void> {
|
|
19
|
+
const promises: Promise<void>[] = [writeBlockAndBlobsToDb.call(this, blockInput)];
|
|
34
20
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
inputType: blockInput.type,
|
|
39
|
-
});
|
|
21
|
+
if (isBlockInputColumns(blockInput)) {
|
|
22
|
+
promises.push(writeDataColumnsToDb.call(this, blockInput));
|
|
23
|
+
}
|
|
40
24
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
25
|
+
await Promise.all(promises);
|
|
26
|
+
this.logger.debug("Persisted blockInput to db", {slot: blockInput.slot, root: blockInput.blockRootHex});
|
|
27
|
+
}
|
|
44
28
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
29
|
+
async function writeBlockAndBlobsToDb(this: BeaconChain, blockInput: IBlockInput): Promise<void> {
|
|
30
|
+
const block = blockInput.getBlock();
|
|
31
|
+
const slot = block.message.slot;
|
|
32
|
+
const blockRoot = this.config.getForkTypes(slot).BeaconBlock.hashTreeRoot(block.message);
|
|
33
|
+
const blockRootHex = toRootHex(blockRoot);
|
|
34
|
+
const numBlobs = isForkPostDeneb(blockInput.forkName)
|
|
35
|
+
? getBlobKzgCommitments(blockInput.forkName, block as SignedBeaconBlock<ForkPostDeneb>).length
|
|
36
|
+
: undefined;
|
|
37
|
+
const fnPromises: Promise<void>[] = [];
|
|
55
38
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
39
|
+
const blockBytes = this.serializedCache.get(block);
|
|
40
|
+
if (blockBytes) {
|
|
41
|
+
// skip serializing data if we already have it
|
|
42
|
+
this.metrics?.importBlock.persistBlockWithSerializedDataCount.inc();
|
|
43
|
+
fnPromises.push(this.db.block.putBinary(this.db.block.getId(block), blockBytes));
|
|
44
|
+
} else {
|
|
45
|
+
this.metrics?.importBlock.persistBlockNoSerializedDataCount.inc();
|
|
46
|
+
fnPromises.push(this.db.block.add(block));
|
|
47
|
+
}
|
|
64
48
|
|
|
65
|
-
|
|
66
|
-
if (dataColumnSidecars.length !== dataColumnsLen) {
|
|
67
|
-
this.logger.debug(
|
|
68
|
-
`Invalid dataColumnSidecars=${dataColumnSidecars.length} for custody expected custodyColumnsLen=${dataColumnsLen}`
|
|
69
|
-
);
|
|
70
|
-
}
|
|
49
|
+
this.logger.debug("Persist block to hot DB", {slot, root: blockRootHex, inputType: blockInput.type, numBlobs});
|
|
71
50
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
if (serialized) {
|
|
78
|
-
binaryPuts.push({key: dataColumnSidecar.index, value: serialized});
|
|
79
|
-
} else {
|
|
80
|
-
nonbinaryPuts.push(dataColumnSidecar);
|
|
51
|
+
if (isBlockInputBlobs(blockInput)) {
|
|
52
|
+
fnPromises.push(
|
|
53
|
+
(async () => {
|
|
54
|
+
if (!blockInput.hasAllData()) {
|
|
55
|
+
await blockInput.waitForAllData(BLOB_AVAILABILITY_TIMEOUT);
|
|
81
56
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
57
|
+
const blobSidecars = blockInput.getBlobs();
|
|
58
|
+
await this.db.blobSidecars.add({blockRoot, slot, blobSidecars});
|
|
59
|
+
this.logger.debug("Persisted blobSidecars to hot DB", {
|
|
60
|
+
slot,
|
|
61
|
+
root: blockRootHex,
|
|
62
|
+
numBlobs: blobSidecars.length,
|
|
63
|
+
});
|
|
64
|
+
})()
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
await Promise.all(fnPromises);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Persists data columns to DB for a given block. Accepts a narrow sub-interface of IBlockInput
|
|
73
|
+
* so it can be reused across forks (e.g. Fulu, Gloas).
|
|
74
|
+
*
|
|
75
|
+
* NOTE: Old data is pruned on archive.
|
|
76
|
+
*/
|
|
77
|
+
export async function writeDataColumnsToDb(this: BeaconChain, blockInput: IDataColumnsInput): Promise<void> {
|
|
78
|
+
const {slot, blockRootHex} = blockInput;
|
|
79
|
+
const blockRoot = fromHex(blockRootHex);
|
|
101
80
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
81
|
+
if (!blockInput.hasComputedAllData()) {
|
|
82
|
+
// Supernodes may only have a subset of the data columns by the time the block begins to be imported
|
|
83
|
+
// because full data availability can be assumed after NUMBER_OF_COLUMNS / 2 columns are available.
|
|
84
|
+
// Here, however, all data columns must be fully available/reconstructed before persisting to the DB.
|
|
85
|
+
await blockInput.waitForComputedAllData(BLOB_AVAILABILITY_TIMEOUT).catch(() => {
|
|
86
|
+
this.logger.debug("Failed to wait for computed all data", {slot, blockRoot: blockRootHex});
|
|
106
87
|
});
|
|
107
88
|
}
|
|
89
|
+
|
|
90
|
+
const {custodyColumns} = this.custodyConfig;
|
|
91
|
+
const dataColumnSidecars = blockInput.getCustodyColumns();
|
|
92
|
+
|
|
93
|
+
const binaryPuts: {key: number; value: Uint8Array}[] = [];
|
|
94
|
+
const nonbinaryPuts = [];
|
|
95
|
+
for (const dataColumnSidecar of dataColumnSidecars) {
|
|
96
|
+
// skip reserializing column if we already have it
|
|
97
|
+
const serialized = this.serializedCache.get(dataColumnSidecar);
|
|
98
|
+
if (serialized) {
|
|
99
|
+
binaryPuts.push({key: dataColumnSidecar.index, value: serialized});
|
|
100
|
+
} else {
|
|
101
|
+
nonbinaryPuts.push(dataColumnSidecar);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
await Promise.all([
|
|
106
|
+
this.db.dataColumnSidecar.putManyBinary(blockRoot, binaryPuts),
|
|
107
|
+
this.db.dataColumnSidecar.putMany(blockRoot, nonbinaryPuts),
|
|
108
|
+
]);
|
|
109
|
+
|
|
110
|
+
this.logger.debug("Persisted dataColumnSidecars to hot DB", {
|
|
111
|
+
slot,
|
|
112
|
+
root: blockRootHex,
|
|
113
|
+
dataColumnSidecars: dataColumnSidecars.length,
|
|
114
|
+
custodyColumns: custodyColumns.length,
|
|
115
|
+
numBlobs: dataColumnSidecars[0]?.column.length,
|
|
116
|
+
});
|
|
108
117
|
}
|
|
109
118
|
|
|
110
|
-
export async function
|
|
119
|
+
export async function persistBlockInput(this: BeaconChain, blockInput: IBlockInput): Promise<void> {
|
|
111
120
|
await writeBlockInputToDb
|
|
112
|
-
.call(this,
|
|
121
|
+
.call(this, blockInput)
|
|
113
122
|
.catch((e) => {
|
|
114
123
|
this.logger.debug(
|
|
115
124
|
"Error persisting block input in hot db",
|
|
116
125
|
{
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
root: blockInputs[0].blockRootHex,
|
|
126
|
+
slot: blockInput.slot,
|
|
127
|
+
root: blockInput.blockRootHex,
|
|
120
128
|
},
|
|
121
129
|
e
|
|
122
130
|
);
|
|
123
131
|
})
|
|
124
132
|
.finally(() => {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
this.serializedCache.clear();
|
|
131
|
-
if (blockInputs.length === 1) {
|
|
132
|
-
this.logger.debug("Pruned block input", {
|
|
133
|
-
slot: blockInputs[0].slot,
|
|
134
|
-
root: blockInputs[0].blockRootHex,
|
|
135
|
-
});
|
|
136
|
-
}
|
|
133
|
+
this.seenBlockInputCache.prune(blockInput.blockRootHex);
|
|
134
|
+
this.logger.debug("Pruned block input", {
|
|
135
|
+
slot: blockInput.slot,
|
|
136
|
+
root: blockInput.blockRootHex,
|
|
137
|
+
});
|
|
137
138
|
});
|
|
138
139
|
}
|
package/src/chain/chain.ts
CHANGED
|
@@ -2,7 +2,13 @@ import path from "node:path";
|
|
|
2
2
|
import {PrivateKey} from "@libp2p/interface";
|
|
3
3
|
import {CompositeTypeAny, TreeView, Type} from "@chainsafe/ssz";
|
|
4
4
|
import {BeaconConfig} from "@lodestar/config";
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
CheckpointWithHex,
|
|
7
|
+
CheckpointWithPayloadStatus,
|
|
8
|
+
IForkChoice,
|
|
9
|
+
ProtoBlock,
|
|
10
|
+
UpdateHeadOpt,
|
|
11
|
+
} from "@lodestar/fork-choice";
|
|
6
12
|
import {LoggerNode} from "@lodestar/logger/node";
|
|
7
13
|
import {
|
|
8
14
|
BUILDER_INDEX_SELF_BUILD,
|
|
@@ -58,7 +64,7 @@ import {Logger, fromHex, gweiToWei, isErrorAborted, pruneSetToMax, sleep, toRoot
|
|
|
58
64
|
import {ProcessShutdownCallback} from "@lodestar/validator";
|
|
59
65
|
import {GENESIS_EPOCH, ZERO_HASH} from "../constants/index.js";
|
|
60
66
|
import {IBeaconDb} from "../db/index.js";
|
|
61
|
-
import {BLOB_SIDECARS_IN_WRAPPER_INDEX} from "../db/repositories/blobSidecars.
|
|
67
|
+
import {BLOB_SIDECARS_IN_WRAPPER_INDEX} from "../db/repositories/blobSidecars.js";
|
|
62
68
|
import {BuilderStatus} from "../execution/builder/http.js";
|
|
63
69
|
import {IExecutionBuilder, IExecutionEngine} from "../execution/index.js";
|
|
64
70
|
import {Metrics} from "../metrics/index.js";
|
|
@@ -69,15 +75,15 @@ import {CustodyConfig, getValidatorsCustodyRequirement} from "../util/dataColumn
|
|
|
69
75
|
import {callInNextEventLoop} from "../util/eventLoop.js";
|
|
70
76
|
import {ensureDir, writeIfNotExist} from "../util/file.js";
|
|
71
77
|
import {isOptimisticBlock} from "../util/forkChoice.js";
|
|
72
|
-
import {JobItemQueue} from "../util/queue/itemQueue.
|
|
78
|
+
import {JobItemQueue} from "../util/queue/itemQueue.js";
|
|
73
79
|
import {SerializedCache} from "../util/serializedCache.js";
|
|
74
|
-
import {getSlotFromSignedBeaconBlockSerialized} from "../util/sszBytes.
|
|
80
|
+
import {getSlotFromSignedBeaconBlockSerialized} from "../util/sszBytes.js";
|
|
75
81
|
import {ArchiveStore} from "./archiveStore/archiveStore.js";
|
|
76
82
|
import {CheckpointBalancesCache} from "./balancesCache.js";
|
|
77
83
|
import {BeaconProposerCache} from "./beaconProposerCache.js";
|
|
78
84
|
import {IBlockInput, isBlockInputBlobs, isBlockInputColumns} from "./blocks/blockInput/index.js";
|
|
79
85
|
import {BlockProcessor, ImportBlockOpts} from "./blocks/index.js";
|
|
80
|
-
import {
|
|
86
|
+
import {persistBlockInput} from "./blocks/writeBlockInputToDb.js";
|
|
81
87
|
import {BlsMultiThreadWorkerPool, BlsSingleThreadVerifier, IBlsVerifier} from "./bls/index.js";
|
|
82
88
|
import {ColumnReconstructionTracker} from "./ColumnReconstructionTracker.js";
|
|
83
89
|
import {ChainEvent, ChainEventEmitter} from "./emitter.js";
|
|
@@ -164,7 +170,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
164
170
|
readonly lightClientServer?: LightClientServer;
|
|
165
171
|
readonly reprocessController: ReprocessController;
|
|
166
172
|
readonly archiveStore: ArchiveStore;
|
|
167
|
-
readonly unfinalizedBlockWrites: JobItemQueue<[IBlockInput
|
|
173
|
+
readonly unfinalizedBlockWrites: JobItemQueue<[IBlockInput], void>;
|
|
168
174
|
|
|
169
175
|
// Ops pool
|
|
170
176
|
readonly attestationPool: AttestationPool;
|
|
@@ -314,12 +320,14 @@ export class BeaconChain implements IBeaconChain {
|
|
|
314
320
|
|
|
315
321
|
this.beaconProposerCache = new BeaconProposerCache(opts);
|
|
316
322
|
this.checkpointBalancesCache = new CheckpointBalancesCache();
|
|
323
|
+
this.serializedCache = new SerializedCache();
|
|
317
324
|
this.seenBlockInputCache = new SeenBlockInput({
|
|
318
325
|
config,
|
|
319
326
|
custodyConfig: this.custodyConfig,
|
|
320
327
|
clock,
|
|
321
328
|
chainEvents: emitter,
|
|
322
329
|
signal,
|
|
330
|
+
serializedCache: this.serializedCache,
|
|
323
331
|
metrics,
|
|
324
332
|
logger,
|
|
325
333
|
});
|
|
@@ -406,8 +414,6 @@ export class BeaconChain implements IBeaconChain {
|
|
|
406
414
|
this.bls = bls;
|
|
407
415
|
this.emitter = emitter;
|
|
408
416
|
|
|
409
|
-
this.serializedCache = new SerializedCache();
|
|
410
|
-
|
|
411
417
|
this.getBlobsTracker = new GetBlobsTracker({
|
|
412
418
|
logger,
|
|
413
419
|
executionEngine: this.executionEngine,
|
|
@@ -429,7 +435,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
429
435
|
);
|
|
430
436
|
|
|
431
437
|
this.unfinalizedBlockWrites = new JobItemQueue(
|
|
432
|
-
|
|
438
|
+
persistBlockInput.bind(this),
|
|
433
439
|
{
|
|
434
440
|
maxLength: DEFAULT_MAX_PENDING_UNFINALIZED_BLOCK_WRITES,
|
|
435
441
|
signal,
|
|
@@ -600,7 +606,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
600
606
|
): Promise<{state: CachedBeaconStateAllForks | Uint8Array; executionOptimistic: boolean; finalized: boolean} | null> {
|
|
601
607
|
if (opts?.allowRegen) {
|
|
602
608
|
const state = await this.regen.getState(stateRoot, RegenCaller.restApi);
|
|
603
|
-
const block = this.forkChoice.
|
|
609
|
+
const block = this.forkChoice.getBlockDefaultStatus(state.latestBlockHeader.hashTreeRoot());
|
|
604
610
|
const finalizedEpoch = this.forkChoice.getFinalizedCheckpoint().epoch;
|
|
605
611
|
return {
|
|
606
612
|
state,
|
|
@@ -616,7 +622,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
616
622
|
// TODO: This is very inneficient for debug requests of serialized content, since it deserializes to serialize again
|
|
617
623
|
const cachedStateCtx = this.regen.getStateSync(stateRoot);
|
|
618
624
|
if (cachedStateCtx) {
|
|
619
|
-
const block = this.forkChoice.
|
|
625
|
+
const block = this.forkChoice.getBlockDefaultStatus(cachedStateCtx.latestBlockHeader.hashTreeRoot());
|
|
620
626
|
const finalizedEpoch = this.forkChoice.getFinalizedCheckpoint().epoch;
|
|
621
627
|
return {
|
|
622
628
|
state: cachedStateCtx,
|
|
@@ -650,7 +656,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
650
656
|
// finalized or justified checkpoint states maynot be available with PersistentCheckpointStateCache, use getCheckpointStateOrBytes() api to get Uint8Array
|
|
651
657
|
const cachedStateCtx = this.regen.getCheckpointStateSync(checkpoint);
|
|
652
658
|
if (cachedStateCtx) {
|
|
653
|
-
const block = this.forkChoice.
|
|
659
|
+
const block = this.forkChoice.getBlockDefaultStatus(cachedStateCtx.latestBlockHeader.hashTreeRoot());
|
|
654
660
|
const finalizedEpoch = this.forkChoice.getFinalizedCheckpoint().epoch;
|
|
655
661
|
return {
|
|
656
662
|
state: cachedStateCtx,
|
|
@@ -667,7 +673,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
667
673
|
): Promise<{state: CachedBeaconStateAllForks | Uint8Array; executionOptimistic: boolean; finalized: boolean} | null> {
|
|
668
674
|
const cachedStateCtx = await this.regen.getCheckpointStateOrBytes(checkpoint);
|
|
669
675
|
if (cachedStateCtx) {
|
|
670
|
-
const block = this.forkChoice.
|
|
676
|
+
const block = this.forkChoice.getBlockDefaultStatus(checkpoint.root);
|
|
671
677
|
const finalizedEpoch = this.forkChoice.getFinalizedCheckpoint().epoch;
|
|
672
678
|
return {
|
|
673
679
|
state: cachedStateCtx,
|
|
@@ -711,7 +717,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
711
717
|
async getBlockByRoot(
|
|
712
718
|
root: string
|
|
713
719
|
): Promise<{block: SignedBeaconBlock; executionOptimistic: boolean; finalized: boolean} | null> {
|
|
714
|
-
const block = this.forkChoice.
|
|
720
|
+
const block = this.forkChoice.getBlockHexDefaultStatus(root);
|
|
715
721
|
if (block) {
|
|
716
722
|
// Block found in fork-choice.
|
|
717
723
|
// It may be in the block input cache, awaiting full DA reconstruction, check there first
|
|
@@ -735,7 +741,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
735
741
|
async getSerializedBlockByRoot(
|
|
736
742
|
root: string
|
|
737
743
|
): Promise<{block: Uint8Array; executionOptimistic: boolean; finalized: boolean; slot: Slot} | null> {
|
|
738
|
-
const block = this.forkChoice.
|
|
744
|
+
const block = this.forkChoice.getBlockHexDefaultStatus(root);
|
|
739
745
|
if (block) {
|
|
740
746
|
// Block found in fork-choice.
|
|
741
747
|
// It may be in the block input cache, awaiting full DA reconstruction, check there first
|
|
@@ -1186,7 +1192,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
1186
1192
|
* @param blockState state that declares justified checkpoint `checkpoint`
|
|
1187
1193
|
*/
|
|
1188
1194
|
private justifiedBalancesGetter(
|
|
1189
|
-
checkpoint:
|
|
1195
|
+
checkpoint: CheckpointWithPayloadStatus,
|
|
1190
1196
|
blockState: CachedBeaconStateAllForks
|
|
1191
1197
|
): EffectiveBalanceIncrements {
|
|
1192
1198
|
this.metrics?.balancesCache.requests.inc();
|
|
@@ -1225,7 +1231,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
1225
1231
|
* @param blockState state that declares justified checkpoint `checkpoint`
|
|
1226
1232
|
*/
|
|
1227
1233
|
private closestJustifiedBalancesStateToCheckpoint(
|
|
1228
|
-
checkpoint:
|
|
1234
|
+
checkpoint: CheckpointWithPayloadStatus,
|
|
1229
1235
|
blockState: CachedBeaconStateAllForks
|
|
1230
1236
|
): {state: CachedBeaconStateAllForks; stateId: string; shouldWarn: boolean} {
|
|
1231
1237
|
const state = this.regen.getCheckpointStateSync(checkpoint);
|
|
@@ -1239,7 +1245,10 @@ export class BeaconChain implements IBeaconChain {
|
|
|
1239
1245
|
}
|
|
1240
1246
|
|
|
1241
1247
|
// Find a state in the same branch of checkpoint at same epoch. Balances should exactly the same
|
|
1242
|
-
for (const descendantBlock of this.forkChoice.forwardIterateDescendants(
|
|
1248
|
+
for (const descendantBlock of this.forkChoice.forwardIterateDescendants(
|
|
1249
|
+
checkpoint.rootHex,
|
|
1250
|
+
checkpoint.payloadStatus
|
|
1251
|
+
)) {
|
|
1243
1252
|
if (computeEpochAtSlot(descendantBlock.slot) === checkpoint.epoch) {
|
|
1244
1253
|
const descendantBlockState = this.regen.getStateSync(descendantBlock.stateRoot);
|
|
1245
1254
|
if (descendantBlockState) {
|
|
@@ -1255,7 +1264,10 @@ export class BeaconChain implements IBeaconChain {
|
|
|
1255
1264
|
|
|
1256
1265
|
// Find a state in the same branch of checkpoint at a latter epoch. Balances are not the same, but should be close
|
|
1257
1266
|
// Note: must call .forwardIterateDescendants() again since nodes are not sorted
|
|
1258
|
-
for (const descendantBlock of this.forkChoice.forwardIterateDescendants(
|
|
1267
|
+
for (const descendantBlock of this.forkChoice.forwardIterateDescendants(
|
|
1268
|
+
checkpoint.rootHex,
|
|
1269
|
+
checkpoint.payloadStatus
|
|
1270
|
+
)) {
|
|
1259
1271
|
if (computeEpochAtSlot(descendantBlock.slot) > checkpoint.epoch) {
|
|
1260
1272
|
const descendantBlockState = this.regen.getStateSync(descendantBlock.stateRoot);
|
|
1261
1273
|
if (descendantBlockState) {
|
package/src/chain/emitter.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {EventEmitter} from "node:events";
|
|
2
2
|
import {StrictEventEmitter} from "strict-event-emitter-types";
|
|
3
3
|
import {routes} from "@lodestar/api";
|
|
4
|
-
import {
|
|
4
|
+
import {CheckpointWithPayloadStatus} from "@lodestar/fork-choice";
|
|
5
5
|
import {CachedBeaconStateAllForks} from "@lodestar/state-transition";
|
|
6
6
|
import {DataColumnSidecars, RootHex, deneb, phase0} from "@lodestar/types";
|
|
7
7
|
import {PeerIdStr} from "../util/peerId.js";
|
|
@@ -83,8 +83,8 @@ export type ChainEventData = {
|
|
|
83
83
|
export type IChainEvents = ApiEvents & {
|
|
84
84
|
[ChainEvent.checkpoint]: (checkpoint: phase0.Checkpoint, state: CachedBeaconStateAllForks) => void;
|
|
85
85
|
|
|
86
|
-
[ChainEvent.forkChoiceJustified]: (checkpoint:
|
|
87
|
-
[ChainEvent.forkChoiceFinalized]: (checkpoint:
|
|
86
|
+
[ChainEvent.forkChoiceJustified]: (checkpoint: CheckpointWithPayloadStatus) => void;
|
|
87
|
+
[ChainEvent.forkChoiceFinalized]: (checkpoint: CheckpointWithPayloadStatus) => void;
|
|
88
88
|
|
|
89
89
|
[ChainEvent.updateTargetCustodyGroupCount]: (targetGroupCount: number) => void;
|
|
90
90
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {BuilderIndex, RootHex, Slot} from "@lodestar/types";
|
|
2
|
-
import {GossipActionError} from "./gossipValidation.
|
|
2
|
+
import {GossipActionError} from "./gossipValidation.js";
|
|
3
3
|
|
|
4
4
|
export enum ExecutionPayloadBidErrorCode {
|
|
5
5
|
BUILDER_NOT_ELIGIBLE = "EXECUTION_PAYLOAD_BID_ERROR_BUILDER_NOT_ELIGIBLE",
|
|
@@ -25,9 +25,13 @@ export type ExecutionPayloadEnvelopeErrorType =
|
|
|
25
25
|
| {
|
|
26
26
|
code: ExecutionPayloadEnvelopeErrorCode.BUILDER_INDEX_MISMATCH;
|
|
27
27
|
envelopeBuilderIndex: BuilderIndex;
|
|
28
|
-
bidBuilderIndex: BuilderIndex;
|
|
28
|
+
bidBuilderIndex: BuilderIndex | null;
|
|
29
|
+
}
|
|
30
|
+
| {
|
|
31
|
+
code: ExecutionPayloadEnvelopeErrorCode.BLOCK_HASH_MISMATCH;
|
|
32
|
+
envelopeBlockHash: RootHex;
|
|
33
|
+
bidBlockHash: RootHex | null;
|
|
29
34
|
}
|
|
30
|
-
| {code: ExecutionPayloadEnvelopeErrorCode.BLOCK_HASH_MISMATCH; envelopeBlockHash: RootHex; bidBlockHash: RootHex}
|
|
31
35
|
| {code: ExecutionPayloadEnvelopeErrorCode.INVALID_SIGNATURE}
|
|
32
36
|
| {code: ExecutionPayloadEnvelopeErrorCode.CACHE_FAIL; blockRoot: RootHex};
|
|
33
37
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {RootHex, Slot, ValidatorIndex} from "@lodestar/types";
|
|
2
|
-
import {GossipActionError} from "./gossipValidation.
|
|
2
|
+
import {GossipActionError} from "./gossipValidation.js";
|
|
3
3
|
|
|
4
4
|
export enum PayloadAttestationErrorCode {
|
|
5
5
|
NOT_CURRENT_SLOT = "PAYLOAD_ATTESTATION_ERROR_NOT_CURRENT_SLOT",
|