@lodestar/beacon-node 1.41.0-dev.afd446235e → 1.41.0-dev.b90dff673d
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 +1 -0
- 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 +25 -2
- package/lib/chain/blocks/blockInput/blockInput.d.ts.map +1 -1
- package/lib/chain/blocks/blockInput/blockInput.js +71 -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 +18 -1
- package/lib/chain/blocks/blockInput/types.d.ts.map +1 -1
- package/lib/chain/blocks/blockInput/types.js +5 -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.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlocksDataAvailability.js +3 -0
- package/lib/chain/blocks/verifyBlocksDataAvailability.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksExecutionPayloads.d.ts +4 -0
- package/lib/chain/blocks/verifyBlocksExecutionPayloads.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlocksExecutionPayloads.js +5 -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 +38 -16
- 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.d.ts +1 -2
- package/lib/constants/network.d.ts.map +1 -1
- package/lib/constants/network.js +4 -3
- 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.js +2 -1
- 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.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.js.map +1 -1
- package/lib/network/metadata.d.ts.map +1 -1
- package/lib/network/metadata.js +4 -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/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 +0 -7
- package/lib/network/peers/discover.d.ts.map +1 -1
- package/lib/network/peers/discover.js +4 -2
- package/lib/network/peers/discover.js.map +1 -1
- package/lib/network/peers/peerManager.d.ts +0 -9
- package/lib/network/peers/peerManager.d.ts.map +1 -1
- package/lib/network/peers/peerManager.js +3 -48
- 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 +4 -1
- 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 +6 -0
- package/lib/util/clock.d.ts.map +1 -1
- package/lib/util/clock.js +11 -4
- 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 +28 -28
- package/src/api/impl/beacon/blocks/index.ts +3 -2
- package/src/api/impl/debug/index.ts +1 -0
- 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 +103 -3
- package/src/chain/blocks/blockInput/types.ts +18 -0
- package/src/chain/blocks/importBlock.ts +35 -4
- package/src/chain/blocks/verifyBlocksDataAvailability.ts +3 -0
- package/src/chain/blocks/verifyBlocksExecutionPayloads.ts +9 -2
- 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 +56 -18
- 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/constants/network.ts +0 -1
- package/src/db/index.ts +1 -0
- package/src/metrics/metrics/lodestar.ts +18 -10
- package/src/network/network.ts +2 -1
- package/src/network/peers/peerManager.ts +4 -61
- package/src/network/processor/gossipHandlers.ts +12 -3
- 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/clock.ts +9 -4
- package/src/util/serializedCache.ts +7 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {routes} from "@lodestar/api";
|
|
2
2
|
import {IForkChoice, ProtoBlock} from "@lodestar/fork-choice";
|
|
3
3
|
import {CachedBeaconStateAllForks, computeEpochAtSlot} from "@lodestar/state-transition";
|
|
4
|
-
import {BeaconBlock, Epoch, RootHex, Slot, phase0} from "@lodestar/types";
|
|
4
|
+
import {BeaconBlock, Epoch, RootHex, Slot, isGloasBeaconBlock, phase0} from "@lodestar/types";
|
|
5
5
|
import {Logger, toRootHex} from "@lodestar/utils";
|
|
6
6
|
import {Metrics} from "../../metrics/index.js";
|
|
7
7
|
import {JobItemQueue} from "../../util/queue/index.js";
|
|
@@ -88,7 +88,12 @@ export class QueuedStateRegenerator implements IStateRegenerator {
|
|
|
88
88
|
*/
|
|
89
89
|
getPreStateSync(block: BeaconBlock): CachedBeaconStateAllForks | null {
|
|
90
90
|
const parentRoot = toRootHex(block.parentRoot);
|
|
91
|
-
const parentBlock =
|
|
91
|
+
const parentBlock = isGloasBeaconBlock(block)
|
|
92
|
+
? this.forkChoice.getBlockHexAndBlockHash(
|
|
93
|
+
parentRoot,
|
|
94
|
+
toRootHex(block.body.signedExecutionPayloadBid.message.parentBlockHash)
|
|
95
|
+
)
|
|
96
|
+
: this.forkChoice.getBlockHexDefaultStatus(parentRoot);
|
|
92
97
|
if (!parentBlock) {
|
|
93
98
|
throw new RegenError({
|
|
94
99
|
code: RegenErrorCode.BLOCK_NOT_IN_FORKCHOICE,
|
package/src/chain/regen/regen.ts
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
processSlots,
|
|
12
12
|
stateTransition,
|
|
13
13
|
} from "@lodestar/state-transition";
|
|
14
|
-
import {BeaconBlock, RootHex, SignedBeaconBlock, Slot} from "@lodestar/types";
|
|
14
|
+
import {BeaconBlock, RootHex, SignedBeaconBlock, Slot, isGloasBeaconBlock} from "@lodestar/types";
|
|
15
15
|
import {Logger, fromHex, toRootHex} from "@lodestar/utils";
|
|
16
16
|
import {IBeaconDb} from "../../db/index.js";
|
|
17
17
|
import {Metrics} from "../../metrics/index.js";
|
|
@@ -58,7 +58,13 @@ export class StateRegenerator implements IStateRegeneratorInternal {
|
|
|
58
58
|
opts: StateRegenerationOpts,
|
|
59
59
|
regenCaller: RegenCaller
|
|
60
60
|
): Promise<CachedBeaconStateAllForks> {
|
|
61
|
-
const
|
|
61
|
+
const parentRoot = toRootHex(block.parentRoot);
|
|
62
|
+
const parentBlock = isGloasBeaconBlock(block)
|
|
63
|
+
? this.modules.forkChoice.getBlockHexAndBlockHash(
|
|
64
|
+
parentRoot,
|
|
65
|
+
toRootHex(block.body.signedExecutionPayloadBid.message.parentBlockHash)
|
|
66
|
+
)
|
|
67
|
+
: this.modules.forkChoice.getBlockHexDefaultStatus(parentRoot);
|
|
62
68
|
if (!parentBlock) {
|
|
63
69
|
throw new RegenError({
|
|
64
70
|
code: RegenErrorCode.BLOCK_NOT_IN_FORKCHOICE,
|
|
@@ -152,7 +158,7 @@ export class StateRegenerator implements IStateRegeneratorInternal {
|
|
|
152
158
|
|
|
153
159
|
const getSeedStateTimer = this.modules.metrics?.regenGetState.getSeedState.startTimer({caller});
|
|
154
160
|
// iterateAncestorBlocks only returns ancestor blocks, not the block itself
|
|
155
|
-
for (const b of this.modules.forkChoice.iterateAncestorBlocks(block.blockRoot)) {
|
|
161
|
+
for (const b of this.modules.forkChoice.iterateAncestorBlocks(block.blockRoot, block.payloadStatus)) {
|
|
156
162
|
state = this.modules.blockStateCache.get(b.stateRoot);
|
|
157
163
|
if (state) {
|
|
158
164
|
break;
|
|
@@ -3,6 +3,7 @@ import {CheckpointWithHex} from "@lodestar/fork-choice";
|
|
|
3
3
|
import {
|
|
4
4
|
ForkName,
|
|
5
5
|
ForkPostFulu,
|
|
6
|
+
ForkPostGloas,
|
|
6
7
|
ForkPreGloas,
|
|
7
8
|
SLOTS_PER_EPOCH,
|
|
8
9
|
isForkPostDeneb,
|
|
@@ -16,10 +17,12 @@ import {Metrics} from "../../metrics/metrics.js";
|
|
|
16
17
|
import {MAX_LOOK_AHEAD_EPOCHS} from "../../sync/constants.js";
|
|
17
18
|
import {IClock} from "../../util/clock.js";
|
|
18
19
|
import {CustodyConfig} from "../../util/dataColumns.js";
|
|
20
|
+
import {SerializedCache} from "../../util/serializedCache.js";
|
|
19
21
|
import {
|
|
20
22
|
BlockInput,
|
|
21
23
|
BlockInputBlobs,
|
|
22
24
|
BlockInputColumns,
|
|
25
|
+
BlockInputNoData,
|
|
23
26
|
BlockInputPreData,
|
|
24
27
|
BlockWithSource,
|
|
25
28
|
DAType,
|
|
@@ -53,6 +56,7 @@ export type SeenBlockInputCacheModules = {
|
|
|
53
56
|
chainEvents: ChainEventEmitter;
|
|
54
57
|
signal: AbortSignal;
|
|
55
58
|
custodyConfig: CustodyConfig;
|
|
59
|
+
serializedCache: SerializedCache;
|
|
56
60
|
metrics: Metrics | null;
|
|
57
61
|
logger?: Logger;
|
|
58
62
|
};
|
|
@@ -99,6 +103,7 @@ export class SeenBlockInput {
|
|
|
99
103
|
private readonly clock: IClock;
|
|
100
104
|
private readonly chainEvents: ChainEventEmitter;
|
|
101
105
|
private readonly signal: AbortSignal;
|
|
106
|
+
private readonly serializedCache: SerializedCache;
|
|
102
107
|
private readonly metrics: Metrics | null;
|
|
103
108
|
private readonly logger?: Logger;
|
|
104
109
|
private blockInputs = new Map<RootHex, IBlockInput>();
|
|
@@ -107,19 +112,35 @@ export class SeenBlockInput {
|
|
|
107
112
|
// and the signature to ensure we only skip verification if both match
|
|
108
113
|
private verifiedProposerSignatures = new Map<Slot, Map<RootHex, BLSSignature>>();
|
|
109
114
|
|
|
110
|
-
constructor({
|
|
115
|
+
constructor({
|
|
116
|
+
config,
|
|
117
|
+
custodyConfig,
|
|
118
|
+
clock,
|
|
119
|
+
chainEvents,
|
|
120
|
+
signal,
|
|
121
|
+
serializedCache,
|
|
122
|
+
metrics,
|
|
123
|
+
logger,
|
|
124
|
+
}: SeenBlockInputCacheModules) {
|
|
111
125
|
this.config = config;
|
|
112
126
|
this.custodyConfig = custodyConfig;
|
|
113
127
|
this.clock = clock;
|
|
114
128
|
this.chainEvents = chainEvents;
|
|
115
129
|
this.signal = signal;
|
|
130
|
+
this.serializedCache = serializedCache;
|
|
116
131
|
this.metrics = metrics;
|
|
117
132
|
this.logger = logger;
|
|
118
133
|
|
|
119
134
|
if (metrics) {
|
|
120
|
-
metrics.seenCache.blockInput.blockInputCount.addCollect(() =>
|
|
121
|
-
metrics.seenCache.blockInput.blockInputCount.set(this.blockInputs.size)
|
|
122
|
-
|
|
135
|
+
metrics.seenCache.blockInput.blockInputCount.addCollect(() => {
|
|
136
|
+
metrics.seenCache.blockInput.blockInputCount.set(this.blockInputs.size);
|
|
137
|
+
metrics.seenCache.blockInput.serializedObjectRefs.set(
|
|
138
|
+
Array.from(this.blockInputs.values()).reduce(
|
|
139
|
+
(count, blockInput) => count + blockInput.getSerializedCacheKeys().length,
|
|
140
|
+
0
|
|
141
|
+
)
|
|
142
|
+
);
|
|
143
|
+
});
|
|
123
144
|
}
|
|
124
145
|
|
|
125
146
|
this.chainEvents.on(ChainEvent.forkChoiceFinalized, this.onFinalized);
|
|
@@ -140,7 +161,10 @@ export class SeenBlockInput {
|
|
|
140
161
|
* Removes the single BlockInput from the cache
|
|
141
162
|
*/
|
|
142
163
|
remove(rootHex: RootHex): void {
|
|
143
|
-
this.blockInputs.
|
|
164
|
+
const blockInput = this.blockInputs.get(rootHex);
|
|
165
|
+
if (blockInput) {
|
|
166
|
+
this.evictBlockInput(blockInput);
|
|
167
|
+
}
|
|
144
168
|
}
|
|
145
169
|
|
|
146
170
|
/**
|
|
@@ -152,7 +176,7 @@ export class SeenBlockInput {
|
|
|
152
176
|
let deletedCount = 0;
|
|
153
177
|
while (blockInput) {
|
|
154
178
|
deletedCount++;
|
|
155
|
-
this.
|
|
179
|
+
this.evictBlockInput(blockInput);
|
|
156
180
|
blockInput = this.blockInputs.get(parentRootHex ?? "");
|
|
157
181
|
parentRootHex = blockInput?.parentRootHex;
|
|
158
182
|
}
|
|
@@ -163,10 +187,10 @@ export class SeenBlockInput {
|
|
|
163
187
|
onFinalized = (checkpoint: CheckpointWithHex) => {
|
|
164
188
|
let deletedCount = 0;
|
|
165
189
|
const cutoffSlot = computeStartSlotAtEpoch(checkpoint.epoch);
|
|
166
|
-
for (const [
|
|
190
|
+
for (const [, blockInput] of this.blockInputs) {
|
|
167
191
|
if (blockInput.slot < cutoffSlot) {
|
|
168
192
|
deletedCount++;
|
|
169
|
-
this.
|
|
193
|
+
this.evictBlockInput(blockInput);
|
|
170
194
|
}
|
|
171
195
|
}
|
|
172
196
|
this.logger?.debug(`BlockInputCache.onFinalized deleted ${deletedCount} cached BlockInputs`);
|
|
@@ -179,12 +203,19 @@ export class SeenBlockInput {
|
|
|
179
203
|
if (!blockInput) {
|
|
180
204
|
const {forkName, daOutOfRange} = this.buildCommonProps(block.message.slot);
|
|
181
205
|
|
|
182
|
-
// TODO GLOAS: Implement
|
|
183
206
|
if (isForkPostGloas(forkName)) {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
207
|
+
// Post-gloas
|
|
208
|
+
blockInput = BlockInputNoData.createFromBlock({
|
|
209
|
+
block: block as SignedBeaconBlock<ForkPostGloas>,
|
|
210
|
+
blockRootHex,
|
|
211
|
+
daOutOfRange,
|
|
212
|
+
forkName,
|
|
213
|
+
source,
|
|
214
|
+
seenTimestampSec,
|
|
215
|
+
peerIdStr,
|
|
216
|
+
});
|
|
217
|
+
} else if (!isForkPostDeneb(forkName)) {
|
|
218
|
+
// Pre-deneb
|
|
188
219
|
blockInput = BlockInputPreData.createFromBlock({
|
|
189
220
|
block,
|
|
190
221
|
blockRootHex,
|
|
@@ -194,8 +225,8 @@ export class SeenBlockInput {
|
|
|
194
225
|
seenTimestampSec,
|
|
195
226
|
peerIdStr,
|
|
196
227
|
});
|
|
197
|
-
// Fulu Only
|
|
198
228
|
} else if (isForkPostFulu(forkName)) {
|
|
229
|
+
// Fulu Only
|
|
199
230
|
blockInput = BlockInputColumns.createFromBlock({
|
|
200
231
|
block: block as SignedBeaconBlock<ForkPostFulu & ForkPreGloas>,
|
|
201
232
|
blockRootHex,
|
|
@@ -207,8 +238,8 @@ export class SeenBlockInput {
|
|
|
207
238
|
seenTimestampSec,
|
|
208
239
|
peerIdStr,
|
|
209
240
|
});
|
|
210
|
-
// Deneb and Electra
|
|
211
241
|
} else {
|
|
242
|
+
// Deneb and Electra
|
|
212
243
|
blockInput = BlockInputBlobs.createFromBlock({
|
|
213
244
|
block: block as SignedBeaconBlock<ForkBlobsDA>,
|
|
214
245
|
blockRootHex,
|
|
@@ -219,6 +250,7 @@ export class SeenBlockInput {
|
|
|
219
250
|
peerIdStr,
|
|
220
251
|
});
|
|
221
252
|
}
|
|
253
|
+
this.metrics?.seenCache.blockInput.createdByBlock.inc();
|
|
222
254
|
this.blockInputs.set(blockInput.blockRootHex, blockInput);
|
|
223
255
|
}
|
|
224
256
|
|
|
@@ -318,7 +350,7 @@ export class SeenBlockInput {
|
|
|
318
350
|
custodyColumns: this.custodyConfig.custodyColumns,
|
|
319
351
|
sampledColumns: this.custodyConfig.sampledColumns,
|
|
320
352
|
});
|
|
321
|
-
this.metrics?.seenCache.blockInput.
|
|
353
|
+
this.metrics?.seenCache.blockInput.createdByColumn.inc();
|
|
322
354
|
this.blockInputs.set(blockRootHex, blockInput);
|
|
323
355
|
}
|
|
324
356
|
|
|
@@ -399,14 +431,20 @@ export class SeenBlockInput {
|
|
|
399
431
|
|
|
400
432
|
if (itemsToDelete > 0) {
|
|
401
433
|
const sorted = [...this.blockInputs.entries()].sort((a, b) => a[1].slot - b[1].slot);
|
|
402
|
-
for (const [
|
|
403
|
-
this.
|
|
434
|
+
for (const [, blockInput] of sorted) {
|
|
435
|
+
this.evictBlockInput(blockInput);
|
|
404
436
|
itemsToDelete--;
|
|
405
437
|
if (itemsToDelete <= 0) return;
|
|
406
438
|
}
|
|
407
439
|
}
|
|
408
440
|
pruneSetToMax(this.verifiedProposerSignatures, MAX_BLOCK_INPUT_CACHE_SIZE);
|
|
409
441
|
}
|
|
442
|
+
|
|
443
|
+
private evictBlockInput(blockInput: IBlockInput): void {
|
|
444
|
+
// Without forcefully clearing this cache, we would rely on WeakMap to evict memory which is not reliable
|
|
445
|
+
this.serializedCache.delete(blockInput.getSerializedCacheKeys());
|
|
446
|
+
this.blockInputs.delete(blockInput.blockRootHex);
|
|
447
|
+
}
|
|
410
448
|
}
|
|
411
449
|
|
|
412
450
|
enum SeenBlockInputCacheErrorCode {
|
|
@@ -81,7 +81,7 @@ async function validateAggregateAndProof(
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
// [REJECT] `aggregate.data.index == 0` if `block.slot == aggregate.data.slot`.
|
|
84
|
-
const block = chain.forkChoice.
|
|
84
|
+
const block = chain.forkChoice.getBlockDefaultStatus(attData.beaconBlockRoot);
|
|
85
85
|
|
|
86
86
|
// If block is unknown, we don't handle it here. It will throw error later on at `verifyHeadBlockAndTargetRoot()`
|
|
87
87
|
if (block !== null && block.slot === attData.slot && attData.index !== 0) {
|
|
@@ -186,7 +186,7 @@ export async function validateGossipAttestationsSameAttData(
|
|
|
186
186
|
chain.seenAttesters.add(targetEpoch, validatorIndex);
|
|
187
187
|
} else {
|
|
188
188
|
step0ResultOrErrors[oldIndex] = {
|
|
189
|
-
err: new AttestationError(GossipAction.
|
|
189
|
+
err: new AttestationError(GossipAction.REJECT, {
|
|
190
190
|
code: AttestationErrorCode.INVALID_SIGNATURE,
|
|
191
191
|
}),
|
|
192
192
|
};
|
|
@@ -307,7 +307,7 @@ async function validateAttestationNoSignatureCheck(
|
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
// [REJECT] `attestation.data.index == 0` if `block.slot == attestation.data.slot`.
|
|
310
|
-
const block = chain.forkChoice.
|
|
310
|
+
const block = chain.forkChoice.getBlockDefaultStatus(attData.beaconBlockRoot);
|
|
311
311
|
|
|
312
312
|
// block being null will be handled by `verifyHeadBlockAndTargetRoot`
|
|
313
313
|
if (block !== null && block.slot === attSlot && attData.index !== 0) {
|
|
@@ -604,10 +604,14 @@ export function verifyPropagationSlotRange(fork: ForkName, chain: IBeaconChain,
|
|
|
604
604
|
//
|
|
605
605
|
// see: https://github.com/ethereum/consensus-specs/pull/3360
|
|
606
606
|
if (ForkSeq[fork] < ForkSeq.deneb) {
|
|
607
|
+
const currentSlot = chain.clock.currentSlot;
|
|
608
|
+
const withinPastDisparity = currentSlot > 0 && chain.clock.isCurrentSlotGivenGossipDisparity(currentSlot - 1);
|
|
607
609
|
const earliestPermissibleSlot = Math.max(
|
|
608
|
-
//
|
|
609
|
-
|
|
610
|
-
|
|
610
|
+
// Pre-Deneb propagation is time-bounded: an attestation remains valid at the exact old
|
|
611
|
+
// boundary `compute_time_at_slot(slot + range + 1) + MAXIMUM_GOSSIP_CLOCK_DISPARITY`.
|
|
612
|
+
// Model that boundary by extending the lower slot bound by one additional slot only while
|
|
613
|
+
// the clock still considers the previous slot current given gossip disparity.
|
|
614
|
+
currentSlot - chain.config.ATTESTATION_PROPAGATION_SLOT_RANGE - (withinPastDisparity ? 1 : 0),
|
|
611
615
|
0
|
|
612
616
|
);
|
|
613
617
|
|
|
@@ -756,7 +760,7 @@ export function getAttestationDataSigningRoot(config: BeaconConfig, data: phase0
|
|
|
756
760
|
function verifyHeadBlockIsKnown(chain: IBeaconChain, beaconBlockRoot: Root): ProtoBlock {
|
|
757
761
|
// TODO (LH): Enforce a maximum skip distance for unaggregated attestations.
|
|
758
762
|
|
|
759
|
-
const headBlock = chain.forkChoice.
|
|
763
|
+
const headBlock = chain.forkChoice.getBlockDefaultStatus(beaconBlockRoot);
|
|
760
764
|
if (headBlock === null) {
|
|
761
765
|
throw new AttestationError(GossipAction.IGNORE, {
|
|
762
766
|
code: AttestationErrorCode.UNKNOWN_OR_PREFINALIZED_BEACON_BLOCK_ROOT,
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
assertValidAttesterSlashing,
|
|
3
3
|
getAttesterSlashableIndices,
|
|
4
4
|
getAttesterSlashingSignatureSets,
|
|
5
|
+
isSlashableValidator,
|
|
5
6
|
} from "@lodestar/state-transition";
|
|
6
7
|
import {AttesterSlashing} from "@lodestar/types";
|
|
7
8
|
import {AttesterSlashingError, AttesterSlashingErrorCode, GossipAction} from "../errors/index.js";
|
|
@@ -58,6 +59,14 @@ export async function validateAttesterSlashing(
|
|
|
58
59
|
});
|
|
59
60
|
}
|
|
60
61
|
|
|
62
|
+
const currentEpoch = state.epochCtx.epoch;
|
|
63
|
+
if (!intersectingIndices.some((index) => isSlashableValidator(state.validators.getReadonly(index), currentEpoch))) {
|
|
64
|
+
throw new AttesterSlashingError(GossipAction.REJECT, {
|
|
65
|
+
code: AttesterSlashingErrorCode.INVALID,
|
|
66
|
+
error: Error("AttesterSlashing has no slashable validators"),
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
61
70
|
const signatureSets = getAttesterSlashingSignatureSets(chain.config, state.slot, attesterSlashing);
|
|
62
71
|
if (!(await chain.bls.verifySignatureSets(signatureSets, {batchable: true, priority: prioritizeBls}))) {
|
|
63
72
|
throw new AttesterSlashingError(GossipAction.REJECT, {
|
|
@@ -78,7 +78,7 @@ export async function validateGossipBlobSidecar(
|
|
|
78
78
|
// already know this block.
|
|
79
79
|
const blockRoot = ssz.phase0.BeaconBlockHeader.hashTreeRoot(blobSidecar.signedBlockHeader.message);
|
|
80
80
|
const blockHex = toRootHex(blockRoot);
|
|
81
|
-
if (chain.forkChoice.
|
|
81
|
+
if (chain.forkChoice.getBlockHexDefaultStatus(blockHex) !== null) {
|
|
82
82
|
throw new BlobSidecarGossipError(GossipAction.IGNORE, {code: BlobSidecarErrorCode.ALREADY_KNOWN, root: blockHex});
|
|
83
83
|
}
|
|
84
84
|
|
|
@@ -89,7 +89,7 @@ export async function validateGossipBlobSidecar(
|
|
|
89
89
|
// gossip and non-gossip sources) (a client MAY queue blocks for processing once the parent block is
|
|
90
90
|
// retrieved).
|
|
91
91
|
const parentRoot = toRootHex(blobSidecar.signedBlockHeader.message.parentRoot);
|
|
92
|
-
const parentBlock = chain.forkChoice.
|
|
92
|
+
const parentBlock = chain.forkChoice.getBlockHexDefaultStatus(parentRoot);
|
|
93
93
|
if (parentBlock === null) {
|
|
94
94
|
// If fork choice does *not* consider the parent to be a descendant of the finalized block,
|
|
95
95
|
// then there are two more cases:
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
isExecutionEnabled,
|
|
10
10
|
isExecutionStateType,
|
|
11
11
|
} from "@lodestar/state-transition";
|
|
12
|
-
import {SignedBeaconBlock, deneb, gloas} from "@lodestar/types";
|
|
12
|
+
import {SignedBeaconBlock, deneb, gloas, isGloasBeaconBlock} from "@lodestar/types";
|
|
13
13
|
import {byteArrayEquals, sleep, toRootHex} from "@lodestar/utils";
|
|
14
14
|
import {BlockErrorCode, BlockGossipError, GossipAction} from "../errors/index.js";
|
|
15
15
|
import {IBeaconChain} from "../interface.js";
|
|
@@ -56,7 +56,7 @@ export async function validateGossipBlock(
|
|
|
56
56
|
// check, we will load the parent and state from disk only to find out later that we
|
|
57
57
|
// already know this block.
|
|
58
58
|
const blockRoot = toRootHex(config.getForkTypes(blockSlot).BeaconBlock.hashTreeRoot(block));
|
|
59
|
-
if (chain.forkChoice.
|
|
59
|
+
if (chain.forkChoice.getBlockHexDefaultStatus(blockRoot) !== null) {
|
|
60
60
|
throw new BlockGossipError(GossipAction.IGNORE, {code: BlockErrorCode.ALREADY_KNOWN, root: blockRoot});
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -72,7 +72,12 @@ export async function validateGossipBlock(
|
|
|
72
72
|
// [REJECT] The current finalized_checkpoint is an ancestor of block -- i.e.
|
|
73
73
|
// get_ancestor(store, block.parent_root, compute_start_slot_at_epoch(store.finalized_checkpoint.epoch)) == store.finalized_checkpoint.root
|
|
74
74
|
const parentRoot = toRootHex(block.parentRoot);
|
|
75
|
-
const parentBlock =
|
|
75
|
+
const parentBlock = isGloasBeaconBlock(block)
|
|
76
|
+
? chain.forkChoice.getBlockHexAndBlockHash(
|
|
77
|
+
parentRoot,
|
|
78
|
+
toRootHex(block.body.signedExecutionPayloadBid.message.parentBlockHash)
|
|
79
|
+
)
|
|
80
|
+
: chain.forkChoice.getBlockHexDefaultStatus(parentRoot);
|
|
76
81
|
if (parentBlock === null) {
|
|
77
82
|
// If fork choice does *not* consider the parent to be a descendant of the finalized block,
|
|
78
83
|
// then there are two more cases:
|
|
@@ -104,7 +109,7 @@ export async function validateGossipBlock(
|
|
|
104
109
|
|
|
105
110
|
// [REJECT] The block is from a higher slot than its parent.
|
|
106
111
|
if (parentBlock.slot >= blockSlot) {
|
|
107
|
-
throw new BlockGossipError(GossipAction.
|
|
112
|
+
throw new BlockGossipError(GossipAction.REJECT, {
|
|
108
113
|
code: BlockErrorCode.NOT_LATER_THAN_PARENT,
|
|
109
114
|
parentSlot: parentBlock.slot,
|
|
110
115
|
slot: blockSlot,
|
|
@@ -73,7 +73,7 @@ export async function validateGossipDataColumnSidecar(
|
|
|
73
73
|
// 6) [IGNORE] The sidecar's block's parent (defined by block_header.parent_root) has been seen (via gossip
|
|
74
74
|
// or non-gossip sources)
|
|
75
75
|
const parentRoot = toRootHex(blockHeader.parentRoot);
|
|
76
|
-
const parentBlock = chain.forkChoice.
|
|
76
|
+
const parentBlock = chain.forkChoice.getBlockHexDefaultStatus(parentRoot);
|
|
77
77
|
if (parentBlock === null) {
|
|
78
78
|
// If fork choice does *not* consider the parent to be a descendant of the finalized block,
|
|
79
79
|
// then there are two more cases:
|
|
@@ -113,8 +113,7 @@ async function validateExecutionPayloadBid(
|
|
|
113
113
|
|
|
114
114
|
// [IGNORE] `bid.parent_block_root` is the hash tree root of a known beacon
|
|
115
115
|
// block in fork choice.
|
|
116
|
-
|
|
117
|
-
if (block === null) {
|
|
116
|
+
if (!chain.forkChoice.hasBlock(bid.parentBlockRoot)) {
|
|
118
117
|
throw new ExecutionPayloadBidError(GossipAction.IGNORE, {
|
|
119
118
|
code: ExecutionPayloadBidErrorCode.UNKNOWN_BLOCK_ROOT,
|
|
120
119
|
parentBlockRoot: parentBlockRootHex,
|
|
@@ -37,7 +37,7 @@ async function validateExecutionPayloadEnvelope(
|
|
|
37
37
|
// the block is retrieved).
|
|
38
38
|
// TODO GLOAS: Need to review this, we should queue the envelope for later
|
|
39
39
|
// processing if the block is not yet known, otherwise we would ignore it here
|
|
40
|
-
const block = chain.forkChoice.
|
|
40
|
+
const block = chain.forkChoice.getBlockDefaultStatus(envelope.beaconBlockRoot);
|
|
41
41
|
if (block === null) {
|
|
42
42
|
throw new ExecutionPayloadEnvelopeError(GossipAction.IGNORE, {
|
|
43
43
|
code: ExecutionPayloadEnvelopeErrorCode.BLOCK_ROOT_UNKNOWN,
|
|
@@ -79,7 +79,7 @@ async function validateExecutionPayloadEnvelope(
|
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
if (block.builderIndex
|
|
82
|
+
if (block.builderIndex == null || block.blockHashFromBid == null) {
|
|
83
83
|
// This indicates this block is a pre-gloas block which is wrong
|
|
84
84
|
throw new ExecutionPayloadEnvelopeError(GossipAction.IGNORE, {
|
|
85
85
|
code: ExecutionPayloadEnvelopeErrorCode.CACHE_FAIL,
|
|
@@ -97,11 +97,11 @@ async function validateExecutionPayloadEnvelope(
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
// [REJECT] `payload.block_hash == bid.block_hash`
|
|
100
|
-
if (toRootHex(payload.blockHash) !== block.
|
|
100
|
+
if (toRootHex(payload.blockHash) !== block.blockHashFromBid) {
|
|
101
101
|
throw new ExecutionPayloadEnvelopeError(GossipAction.REJECT, {
|
|
102
102
|
code: ExecutionPayloadEnvelopeErrorCode.BLOCK_HASH_MISMATCH,
|
|
103
103
|
envelopeBlockHash: toRootHex(payload.blockHash),
|
|
104
|
-
bidBlockHash: block.
|
|
104
|
+
bidBlockHash: block.blockHashFromBid,
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
107
|
|
|
@@ -59,8 +59,7 @@ async function validatePayloadAttestationMessage(
|
|
|
59
59
|
// [IGNORE] The message's block `data.beacon_block_root` has been seen (via
|
|
60
60
|
// gossip or non-gossip sources) (a client MAY queue attestation for processing
|
|
61
61
|
// once the block is retrieved. Note a client might want to request payload after).
|
|
62
|
-
|
|
63
|
-
if (block === null) {
|
|
62
|
+
if (!chain.forkChoice.hasBlock(data.beaconBlockRoot)) {
|
|
64
63
|
throw new PayloadAttestationError(GossipAction.IGNORE, {
|
|
65
64
|
code: PayloadAttestationErrorCode.UNKNOWN_BLOCK_ROOT,
|
|
66
65
|
blockRoot: toRootHex(data.beaconBlockRoot),
|
package/src/constants/network.ts
CHANGED
package/src/db/index.ts
CHANGED
|
@@ -1461,29 +1461,37 @@ export function createLodestarMetrics(
|
|
|
1461
1461
|
name: "lodestar_seen_block_input_cache_size",
|
|
1462
1462
|
help: "Number of cached BlockInputs",
|
|
1463
1463
|
}),
|
|
1464
|
-
|
|
1465
|
-
name: "
|
|
1464
|
+
serializedObjectRefs: register.gauge({
|
|
1465
|
+
name: "lodestar_seen_block_input_cache_serialized_object_refs",
|
|
1466
|
+
help: "Number of serialized-cache object refs retained by cached BlockInputs",
|
|
1467
|
+
}),
|
|
1468
|
+
duplicateBlockCount: register.counter<{source: BlockInputSource}>({
|
|
1469
|
+
name: "lodestar_seen_block_input_cache_duplicate_block_total",
|
|
1466
1470
|
help: "Total number of duplicate blocks that pass validation and attempt to be cached but are known",
|
|
1467
1471
|
labelNames: ["source"],
|
|
1468
1472
|
}),
|
|
1469
|
-
duplicateBlobCount: register.
|
|
1470
|
-
name: "
|
|
1473
|
+
duplicateBlobCount: register.counter<{source: BlockInputSource}>({
|
|
1474
|
+
name: "lodestar_seen_block_input_cache_duplicate_blob_total",
|
|
1471
1475
|
help: "Total number of duplicate blobs that pass validation and attempt to be cached but are known",
|
|
1472
1476
|
labelNames: ["source"],
|
|
1473
1477
|
}),
|
|
1474
|
-
duplicateColumnCount: register.
|
|
1475
|
-
name: "
|
|
1478
|
+
duplicateColumnCount: register.counter<{source: BlockInputSource}>({
|
|
1479
|
+
name: "lodestar_seen_block_input_cache_duplicate_column_total",
|
|
1476
1480
|
help: "Total number of duplicate columns that pass validation and attempt to be cached but are known",
|
|
1477
1481
|
labelNames: ["source"],
|
|
1478
1482
|
}),
|
|
1479
|
-
createdByBlock: register.
|
|
1480
|
-
name: "
|
|
1483
|
+
createdByBlock: register.counter({
|
|
1484
|
+
name: "lodestar_seen_block_input_cache_items_created_by_block_total",
|
|
1481
1485
|
help: "Number of BlockInputs created via a block being seen first",
|
|
1482
1486
|
}),
|
|
1483
|
-
createdByBlob: register.
|
|
1484
|
-
name: "
|
|
1487
|
+
createdByBlob: register.counter({
|
|
1488
|
+
name: "lodestar_seen_block_input_cache_items_created_by_blob_total",
|
|
1485
1489
|
help: "Number of BlockInputs created via a blob being seen first",
|
|
1486
1490
|
}),
|
|
1491
|
+
createdByColumn: register.counter({
|
|
1492
|
+
name: "lodestar_seen_block_input_cache_items_created_by_column_total",
|
|
1493
|
+
help: "Number of BlockInputs created via a data column being seen first",
|
|
1494
|
+
}),
|
|
1487
1495
|
},
|
|
1488
1496
|
},
|
|
1489
1497
|
|
package/src/network/network.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {Connection,
|
|
1
|
+
import {Connection, PeerId, PrivateKey} from "@libp2p/interface";
|
|
2
2
|
import {BitArray} from "@chainsafe/ssz";
|
|
3
3
|
import {BeaconConfig} from "@lodestar/config";
|
|
4
4
|
import {LoggerNode} from "@lodestar/logger/node";
|
|
@@ -162,9 +162,6 @@ export class PeerManager {
|
|
|
162
162
|
|
|
163
163
|
// A single map of connected peers with all necessary data to handle PINGs, STATUS, and metrics
|
|
164
164
|
private connectedPeers: Map<PeerIdStr, PeerData>;
|
|
165
|
-
/** Track one in-flight identify call per peer/connection id */
|
|
166
|
-
private readonly identifyInProgress = new Map<PeerIdStr, string>();
|
|
167
|
-
|
|
168
165
|
private opts: PeerManagerOpts;
|
|
169
166
|
private intervals: NodeJS.Timeout[] = [];
|
|
170
167
|
|
|
@@ -195,7 +192,6 @@ export class PeerManager {
|
|
|
195
192
|
|
|
196
193
|
this.libp2p.services.components.events.addEventListener(Libp2pEvent.connectionOpen, this.onLibp2pPeerConnect);
|
|
197
194
|
this.libp2p.services.components.events.addEventListener(Libp2pEvent.connectionClose, this.onLibp2pPeerDisconnect);
|
|
198
|
-
this.libp2p.services.components.events.addEventListener(Libp2pEvent.peerIdentify, this.onPeerIdentify);
|
|
199
195
|
this.networkEventBus.on(NetworkEvent.reqRespRequest, this.onRequest);
|
|
200
196
|
|
|
201
197
|
this.lastStatus = this.statusCache.get();
|
|
@@ -239,7 +235,6 @@ export class PeerManager {
|
|
|
239
235
|
Libp2pEvent.connectionClose,
|
|
240
236
|
this.onLibp2pPeerDisconnect
|
|
241
237
|
);
|
|
242
|
-
this.libp2p.services.components.events.removeEventListener(Libp2pEvent.peerIdentify, this.onPeerIdentify);
|
|
243
238
|
this.networkEventBus.off(NetworkEvent.reqRespRequest, this.onRequest);
|
|
244
239
|
for (const interval of this.intervals) clearInterval(interval);
|
|
245
240
|
}
|
|
@@ -490,25 +485,7 @@ export class PeerManager {
|
|
|
490
485
|
// peers that close identify right after connection open or turn out to be
|
|
491
486
|
// irrelevant.
|
|
492
487
|
if (peerData?.agentVersion === null) {
|
|
493
|
-
|
|
494
|
-
const connection = getConnection(this.libp2p, peerIdStr);
|
|
495
|
-
if (!connection || connection.status !== "open") {
|
|
496
|
-
this.logger.debug("Peer has no open connection for identify", {peerId: prettyPrintPeerId(peer)});
|
|
497
|
-
return;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
const identifyKey = connection.id;
|
|
501
|
-
if (this.identifyInProgress.get(peerIdStr) === identifyKey) {
|
|
502
|
-
return;
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
this.identifyInProgress.set(peerIdStr, identifyKey);
|
|
506
|
-
void this.identifyPeer(peerIdStr, prettyPrintPeerId(peer), connection, identifyKey).finally(() => {
|
|
507
|
-
// Clear only if this identify attempt is still the active one for this peer
|
|
508
|
-
if (this.identifyInProgress.get(peerIdStr) === identifyKey) {
|
|
509
|
-
this.identifyInProgress.delete(peerIdStr);
|
|
510
|
-
}
|
|
511
|
-
});
|
|
488
|
+
void this.identifyPeer(peer.toString(), prettyPrintPeerId(peer), getConnection(this.libp2p, peer.toString()));
|
|
512
489
|
}
|
|
513
490
|
}
|
|
514
491
|
}
|
|
@@ -867,7 +844,6 @@ export class PeerManager {
|
|
|
867
844
|
|
|
868
845
|
// remove the ping and status timer for the peer
|
|
869
846
|
this.connectedPeers.delete(peerIdStr);
|
|
870
|
-
this.identifyInProgress.delete(peerIdStr);
|
|
871
847
|
|
|
872
848
|
this.logger.verbose(logMessage, logContext);
|
|
873
849
|
this.networkEventBus.emit(NetworkEvent.peerDisconnected, {peer: peerIdStr});
|
|
@@ -885,47 +861,14 @@ export class PeerManager {
|
|
|
885
861
|
}
|
|
886
862
|
}
|
|
887
863
|
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
* This captures agentVersion from identify-push or successful inbound/outbound identify,
|
|
891
|
-
* even if our explicit identify request failed earlier.
|
|
892
|
-
*/
|
|
893
|
-
private onPeerIdentify = (evt: CustomEvent<IdentifyResult>): void => {
|
|
894
|
-
const {peerId, agentVersion} = evt.detail;
|
|
895
|
-
if (!agentVersion) return;
|
|
896
|
-
|
|
897
|
-
const peerIdStr = peerId.toString();
|
|
898
|
-
const peerData = this.connectedPeers.get(peerIdStr);
|
|
899
|
-
if (!peerData) return;
|
|
900
|
-
|
|
901
|
-
peerData.agentVersion = agentVersion;
|
|
902
|
-
peerData.agentClient = getKnownClientFromAgentVersion(agentVersion);
|
|
903
|
-
this.identifyInProgress.delete(peerIdStr);
|
|
904
|
-
};
|
|
905
|
-
|
|
906
|
-
private async identifyPeer(
|
|
907
|
-
peerIdStr: string,
|
|
908
|
-
peerIdPretty: string,
|
|
909
|
-
connection: Connection,
|
|
910
|
-
identifyKey: string
|
|
911
|
-
): Promise<void> {
|
|
912
|
-
if (this.identifyInProgress.get(peerIdStr) !== identifyKey) {
|
|
913
|
-
return;
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
if (connection.status !== "open") {
|
|
864
|
+
private async identifyPeer(peerIdStr: string, peerIdPretty: string, connection?: Connection): Promise<void> {
|
|
865
|
+
if (!connection || connection.status !== "open") {
|
|
917
866
|
this.logger.debug("Peer has no open connection for identify", {peerId: peerIdPretty});
|
|
918
867
|
return;
|
|
919
868
|
}
|
|
920
869
|
|
|
921
870
|
try {
|
|
922
871
|
const result = await this.libp2p.services.identify.identify(connection);
|
|
923
|
-
|
|
924
|
-
// A newer identify attempt may have superseded this one (e.g. reconnect).
|
|
925
|
-
if (this.identifyInProgress.get(peerIdStr) !== identifyKey) {
|
|
926
|
-
return;
|
|
927
|
-
}
|
|
928
|
-
|
|
929
872
|
const agentVersion = result.agentVersion;
|
|
930
873
|
if (agentVersion) {
|
|
931
874
|
const connectedPeerData = this.connectedPeers.get(peerIdStr);
|