@lodestar/beacon-node 1.41.0-dev.253ed58dd1 → 1.41.0-dev.274a9918a8
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 +12 -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 +8 -8
- package/lib/api/impl/beacon/state/index.js.map +1 -1
- package/lib/api/impl/beacon/state/utils.d.ts +5 -6
- package/lib/api/impl/beacon/state/utils.d.ts.map +1 -1
- package/lib/api/impl/beacon/state/utils.js +5 -24
- 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.d.ts +1 -1
- package/lib/api/impl/node/utils.d.ts.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 +38 -18
- 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 +0 -1
- package/lib/chain/archiveStore/archiveStore.d.ts.map +1 -1
- package/lib/chain/archiveStore/archiveStore.js +2 -10
- package/lib/chain/archiveStore/archiveStore.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/getHistoricalState.d.ts +5 -6
- package/lib/chain/archiveStore/historicalState/getHistoricalState.d.ts.map +1 -1
- package/lib/chain/archiveStore/historicalState/getHistoricalState.js +9 -10
- 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 +3 -3
- package/lib/chain/archiveStore/historicalState/worker.js.map +1 -1
- package/lib/chain/archiveStore/interface.d.ts +4 -4
- package/lib/chain/archiveStore/interface.d.ts.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 +5 -5
- package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.d.ts.map +1 -1
- package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.js +6 -2
- 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 +39 -1
- package/lib/chain/archiveStore/utils/archiveBlocks.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 +39 -12
- 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 +3 -3
- package/lib/chain/bls/multithread/index.d.ts.map +1 -1
- package/lib/chain/bls/multithread/index.js +5 -5
- package/lib/chain/bls/multithread/index.js.map +1 -1
- package/lib/chain/bls/multithread/jobItem.d.ts +2 -2
- package/lib/chain/bls/multithread/jobItem.d.ts.map +1 -1
- package/lib/chain/bls/multithread/jobItem.js +4 -3
- 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 +4 -4
- package/lib/chain/bls/singleThread.d.ts.map +1 -1
- package/lib/chain/bls/singleThread.js +4 -4
- package/lib/chain/bls/singleThread.js.map +1 -1
- package/lib/chain/bls/utils.d.ts +2 -2
- package/lib/chain/bls/utils.d.ts.map +1 -1
- package/lib/chain/bls/utils.js +7 -4
- package/lib/chain/bls/utils.js.map +1 -1
- package/lib/chain/chain.d.ts +10 -13
- package/lib/chain/chain.d.ts.map +1 -1
- package/lib/chain/chain.js +40 -30
- 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.d.ts +4 -6
- package/lib/chain/interface.d.ts.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 +6 -2
- 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 +24 -7
- 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 +11 -1
- package/lib/chain/regen/errors.d.ts.map +1 -1
- package/lib/chain/regen/errors.js +4 -1
- package/lib/chain/regen/errors.js.map +1 -1
- package/lib/chain/regen/interface.d.ts +12 -6
- package/lib/chain/regen/interface.d.ts.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 +11 -6
- package/lib/chain/regen/queued.d.ts.map +1 -1
- package/lib/chain/regen/queued.js +44 -9
- package/lib/chain/regen/queued.js.map +1 -1
- package/lib/chain/regen/regen.d.ts +5 -0
- package/lib/chain/regen/regen.d.ts.map +1 -1
- package/lib/chain/regen/regen.js +39 -8
- 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 +4 -5
- package/lib/chain/stateCache/datastore/db.d.ts.map +1 -1
- package/lib/chain/stateCache/datastore/db.js +32 -10
- package/lib/chain/stateCache/datastore/db.js.map +1 -1
- package/lib/chain/stateCache/datastore/file.d.ts +1 -1
- package/lib/chain/stateCache/datastore/file.d.ts.map +1 -1
- package/lib/chain/stateCache/datastore/file.js +5 -5
- package/lib/chain/stateCache/datastore/file.js.map +1 -1
- package/lib/chain/stateCache/datastore/types.d.ts +1 -1
- package/lib/chain/stateCache/datastore/types.d.ts.map +1 -1
- package/lib/chain/stateCache/fifoBlockStateCache.d.ts +7 -4
- package/lib/chain/stateCache/fifoBlockStateCache.d.ts.map +1 -1
- package/lib/chain/stateCache/fifoBlockStateCache.js +8 -3
- 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 +34 -55
- package/lib/chain/stateCache/persistentCheckpointsCache.d.ts.map +1 -1
- package/lib/chain/stateCache/persistentCheckpointsCache.js +217 -119
- package/lib/chain/stateCache/persistentCheckpointsCache.js.map +1 -1
- package/lib/chain/stateCache/types.d.ts +15 -8
- package/lib/chain/stateCache/types.d.ts.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 +14 -7
- 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 +9 -2
- 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.d.ts +2 -1
- package/lib/chain/validation/dataColumnSidecar.d.ts.map +1 -1
- package/lib/chain/validation/dataColumnSidecar.js +125 -108
- 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 +9 -3
- package/lib/chain/validation/payloadAttestationMessage.js.map +1 -1
- package/lib/chain/validation/proposerSlashing.js +1 -1
- package/lib/chain/validation/proposerSlashing.js.map +1 -1
- package/lib/chain/validation/signatureSets/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 +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 +1 -2
- 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 +1 -0
- package/lib/execution/engine/http.d.ts.map +1 -1
- package/lib/execution/engine/http.js +3 -0
- 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 +2 -1
- package/lib/metrics/metrics/beacon.d.ts.map +1 -1
- package/lib/metrics/metrics/beacon.js +9 -3
- package/lib/metrics/metrics/beacon.js.map +1 -1
- package/lib/metrics/metrics/lodestar.d.ts +16 -11
- package/lib/metrics/metrics/lodestar.d.ts.map +1 -1
- package/lib/metrics/metrics/lodestar.js +39 -24
- 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 +2 -2
- package/lib/monitoring/service.d.ts.map +1 -1
- package/lib/monitoring/service.js +3 -2
- 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 +4 -4
- 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 +3 -3
- package/lib/network/core/networkCoreWorkerHandler.d.ts.map +1 -1
- package/lib/network/core/networkCoreWorkerHandler.js.map +1 -1
- package/lib/network/core/types.d.ts +2 -2
- package/lib/network/core/types.d.ts.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 +3 -4
- 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 +3 -3
- 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 +13 -4
- package/lib/network/gossip/gossipsub.d.ts.map +1 -1
- package/lib/network/gossip/gossipsub.js +56 -26
- package/lib/network/gossip/gossipsub.js.map +1 -1
- package/lib/network/gossip/interface.d.ts +3 -3
- package/lib/network/gossip/interface.d.ts.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 +2 -2
- package/lib/network/gossip/scoringParameters.d.ts.map +1 -1
- package/lib/network/gossip/scoringParameters.js +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/interface.d.ts +3 -3
- package/lib/network/interface.d.ts.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 +2 -2
- package/lib/network/libp2p/index.d.ts.map +1 -1
- package/lib/network/libp2p/index.js +42 -19
- 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 +3 -3
- 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 +6 -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 +7 -8
- package/lib/network/peers/datastore.d.ts.map +1 -1
- package/lib/network/peers/datastore.js +10 -10
- 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 +3 -1
- package/lib/network/peers/peerManager.d.ts.map +1 -1
- package/lib/network/peers/peerManager.js +103 -53
- 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.d.ts +3 -3
- package/lib/network/peers/utils/prioritizePeers.d.ts.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 +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/processor/types.d.ts +1 -1
- package/lib/network/processor/types.d.ts.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.d.ts.map +1 -1
- package/lib/network/reqresp/score.js +0 -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 +2 -2
- package/lib/network/util.js.map +1 -1
- package/lib/node/nodejs.d.ts +4 -6
- package/lib/node/nodejs.d.ts.map +1 -1
- package/lib/node/nodejs.js +8 -5
- 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 +5 -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 +8 -5
- package/lib/sync/utils/downloadByRange.d.ts.map +1 -1
- package/lib/sync/utils/downloadByRange.js +8 -6
- 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 +3 -2
- 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 +9 -3
- 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.d.ts.map +1 -1
- package/lib/util/execution.js +19 -9
- 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 +42 -44
- package/src/api/impl/beacon/blocks/index.ts +14 -2
- package/src/api/impl/beacon/state/index.ts +8 -8
- package/src/api/impl/beacon/state/utils.ts +17 -31
- package/src/api/impl/debug/index.ts +1 -0
- package/src/api/impl/node/utils.ts +3 -3
- package/src/api/impl/validator/index.ts +36 -19
- package/src/chain/archiveStore/archiveStore.ts +5 -15
- package/src/chain/archiveStore/historicalState/getHistoricalState.ts +10 -11
- package/src/chain/archiveStore/historicalState/worker.ts +3 -3
- package/src/chain/archiveStore/interface.ts +4 -4
- package/src/chain/archiveStore/strategies/frequencyStateArchiveStrategy.ts +8 -5
- package/src/chain/archiveStore/utils/archiveBlocks.ts +62 -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 +47 -11
- 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/bls/multithread/index.ts +7 -7
- package/src/chain/bls/multithread/jobItem.ts +3 -3
- package/src/chain/bls/singleThread.ts +5 -5
- package/src/chain/bls/utils.ts +8 -5
- package/src/chain/chain.ts +67 -47
- 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/interface.ts +4 -11
- package/src/chain/opPools/aggregatedAttestationPool.ts +1 -1
- package/src/chain/prepareNextSlot.ts +6 -2
- package/src/chain/produceBlock/computeNewStateRoot.ts +4 -3
- package/src/chain/produceBlock/produceBlockBody.ts +18 -5
- package/src/chain/regen/errors.ts +6 -1
- package/src/chain/regen/interface.ts +12 -6
- package/src/chain/regen/queued.ts +55 -14
- package/src/chain/regen/regen.ts +46 -10
- package/src/chain/seenCache/seenGossipBlockInput.ts +56 -18
- package/src/chain/stateCache/datastore/db.ts +33 -10
- package/src/chain/stateCache/datastore/file.ts +6 -5
- package/src/chain/stateCache/datastore/types.ts +3 -2
- package/src/chain/stateCache/fifoBlockStateCache.ts +10 -4
- package/src/chain/stateCache/persistentCheckpointsCache.ts +248 -139
- package/src/chain/stateCache/types.ts +18 -8
- package/src/chain/validation/aggregateAndProof.ts +1 -1
- package/src/chain/validation/attestation.ts +14 -7
- package/src/chain/validation/attesterSlashing.ts +10 -1
- package/src/chain/validation/blobSidecar.ts +2 -2
- package/src/chain/validation/block.ts +9 -4
- package/src/chain/validation/dataColumnSidecar.ts +147 -127
- package/src/chain/validation/executionPayloadBid.ts +1 -2
- package/src/chain/validation/executionPayloadEnvelope.ts +4 -4
- package/src/chain/validation/payloadAttestationMessage.ts +10 -3
- package/src/chain/validation/proposerSlashing.ts +1 -1
- package/src/chain/validation/syncCommitteeContributionAndProof.ts +1 -1
- package/src/db/index.ts +1 -0
- package/src/db/repositories/blockArchive.ts +1 -2
- package/src/execution/engine/http.ts +3 -0
- package/src/metrics/metrics/beacon.ts +9 -3
- package/src/metrics/metrics/lodestar.ts +39 -24
- package/src/monitoring/service.ts +3 -2
- package/src/network/core/networkCore.ts +3 -3
- package/src/network/core/networkCoreWorkerHandler.ts +3 -3
- package/src/network/core/types.ts +2 -2
- package/src/network/discv5/utils.ts +5 -4
- package/src/network/events.ts +2 -1
- package/src/network/gossip/encoding.ts +3 -3
- package/src/network/gossip/gossipsub.ts +98 -32
- package/src/network/gossip/interface.ts +3 -3
- package/src/network/gossip/scoringParameters.ts +4 -4
- package/src/network/interface.ts +3 -3
- package/src/network/libp2p/index.ts +48 -21
- package/src/network/metadata.ts +1 -0
- package/src/network/network.ts +5 -4
- package/src/network/options.ts +8 -1
- package/src/network/peers/datastore.ts +13 -10
- package/src/network/peers/discover.ts +46 -11
- package/src/network/peers/peerManager.ts +118 -54
- package/src/network/peers/utils/prioritizePeers.ts +3 -3
- package/src/network/processor/gossipHandlers.ts +12 -3
- package/src/network/processor/gossipValidatorFn.ts +2 -2
- package/src/network/processor/types.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/score.ts +0 -1
- package/src/network/reqresp/utils/collect.ts +1 -1
- package/src/network/reqresp/utils/collectSequentialBlocksInRange.ts +1 -1
- package/src/network/util.ts +2 -2
- package/src/node/nodejs.ts +8 -9
- package/src/sync/range/range.ts +1 -0
- package/src/sync/utils/downloadByRange.ts +12 -3
- package/src/sync/utils/downloadByRoot.ts +2 -2
- package/src/sync/utils/remoteSyncType.ts +1 -1
- package/src/util/clock.ts +9 -4
- package/src/util/dataColumns.ts +6 -2
- package/src/util/execution.ts +23 -12
- package/src/util/serializedCache.ts +7 -5
- package/src/util/workerEvents.ts +1 -1
- package/lib/chain/archiveStore/utils/archivePayloads.d.ts +0 -7
- package/lib/chain/archiveStore/utils/archivePayloads.d.ts.map +0 -1
- package/lib/chain/archiveStore/utils/archivePayloads.js +0 -10
- package/lib/chain/archiveStore/utils/archivePayloads.js.map +0 -1
- package/src/chain/archiveStore/utils/archivePayloads.ts +0 -15
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {routes} from "@lodestar/api";
|
|
2
2
|
import {ApiError, ApplicationMethods} from "@lodestar/api/server";
|
|
3
|
+
import {PayloadStatus} from "@lodestar/fork-choice";
|
|
3
4
|
import {
|
|
4
5
|
BUILDER_INDEX_SELF_BUILD,
|
|
5
6
|
ForkPostBellatrix,
|
|
@@ -205,7 +206,7 @@ export function getBeaconBlockApi({
|
|
|
205
206
|
case routes.beacon.BroadcastValidation.consensus: {
|
|
206
207
|
// check if this beacon node produced the block else run validations
|
|
207
208
|
if (!blockLocallyProduced) {
|
|
208
|
-
const parentBlock = chain.forkChoice.
|
|
209
|
+
const parentBlock = chain.forkChoice.getBlockDefaultStatus(signedBlock.message.parentRoot);
|
|
209
210
|
if (parentBlock === null) {
|
|
210
211
|
chain.emitter.emit(ChainEvent.unknownParent, {
|
|
211
212
|
blockInput: blockForImport,
|
|
@@ -650,7 +651,7 @@ export function getBeaconBlockApi({
|
|
|
650
651
|
}
|
|
651
652
|
|
|
652
653
|
// TODO GLOAS: review checks, do we want to implement `broadcast_validation`?
|
|
653
|
-
const block = chain.forkChoice.getBlockHex(blockRootHex);
|
|
654
|
+
const block = chain.forkChoice.getBlockHex(blockRootHex, PayloadStatus.EMPTY);
|
|
654
655
|
if (block === null) {
|
|
655
656
|
throw new ApiError(404, `Block not found for beacon block root ${blockRootHex}`);
|
|
656
657
|
}
|
|
@@ -814,11 +815,18 @@ export function getBeaconBlockApi({
|
|
|
814
815
|
}
|
|
815
816
|
|
|
816
817
|
const indicesToReconstruct = indices ?? Array.from({length: blobCount}, (_, i) => i);
|
|
818
|
+
|
|
819
|
+
const timer = metrics?.recoverBlobSidecars.reconstructionTime.startTimer();
|
|
817
820
|
const blobs = await reconstructBlobs(dataColumnSidecars, indicesToReconstruct);
|
|
821
|
+
timer?.();
|
|
822
|
+
metrics?.recoverBlobSidecars.blobsReconstructed.inc(indicesToReconstruct.length);
|
|
823
|
+
|
|
818
824
|
const signedBlockHeader = signedBlockToSignedHeader(config, block);
|
|
819
825
|
|
|
820
826
|
data = await Promise.all(
|
|
821
827
|
indicesToReconstruct.map(async (index, i) => {
|
|
828
|
+
// record per column computation time
|
|
829
|
+
const compTimer = metrics?.peerDas.dataColumnSidecarComputationTime.startTimer();
|
|
822
830
|
// Reconstruct blob sidecar from blob
|
|
823
831
|
const kzgCommitment = blobKzgCommitments[index];
|
|
824
832
|
const blob = blobs[i]; // Use i since blobs only contains requested indices
|
|
@@ -828,6 +836,7 @@ export function getBeaconBlockApi({
|
|
|
828
836
|
block.message.body,
|
|
829
837
|
index
|
|
830
838
|
);
|
|
839
|
+
compTimer?.();
|
|
831
840
|
return {index, blob, kzgCommitment, kzgProof, signedBlockHeader, kzgCommitmentInclusionProof};
|
|
832
841
|
})
|
|
833
842
|
);
|
|
@@ -909,7 +918,10 @@ export function getBeaconBlockApi({
|
|
|
909
918
|
indicesToReconstruct = Array.from({length: blobCount}, (_, i) => i);
|
|
910
919
|
}
|
|
911
920
|
|
|
921
|
+
const timer = metrics?.peerDas.dataColumnsReconstructionTime.startTimer();
|
|
912
922
|
blobs = await reconstructBlobs(dataColumnSidecars, indicesToReconstruct);
|
|
923
|
+
timer?.();
|
|
924
|
+
metrics?.peerDas.reconstructedColumns.inc(indicesToReconstruct.length);
|
|
913
925
|
} else {
|
|
914
926
|
blobs = [];
|
|
915
927
|
}
|
|
@@ -95,14 +95,14 @@ export function getBeaconStateApi({
|
|
|
95
95
|
const {state, executionOptimistic, finalized} = await getState(stateId);
|
|
96
96
|
const currentEpoch = getCurrentEpoch(state);
|
|
97
97
|
const {validators, balances} = state; // Get the validators sub tree once for all the loop
|
|
98
|
-
const {
|
|
98
|
+
const {pubkeyCache} = chain;
|
|
99
99
|
|
|
100
100
|
const validatorResponses: routes.beacon.ValidatorResponse[] = [];
|
|
101
101
|
if (validatorIds.length) {
|
|
102
102
|
assertUniqueItems(validatorIds, "Duplicate validator IDs provided");
|
|
103
103
|
|
|
104
104
|
for (const id of validatorIds) {
|
|
105
|
-
const resp = getStateValidatorIndex(id, state,
|
|
105
|
+
const resp = getStateValidatorIndex(id, state, pubkeyCache);
|
|
106
106
|
if (resp.valid) {
|
|
107
107
|
const validatorIndex = resp.validatorIndex;
|
|
108
108
|
const validator = validators.getReadonly(validatorIndex);
|
|
@@ -127,7 +127,7 @@ export function getBeaconStateApi({
|
|
|
127
127
|
if (statuses.length) {
|
|
128
128
|
assertUniqueItems(statuses, "Duplicate statuses provided");
|
|
129
129
|
|
|
130
|
-
const validatorsByStatus = filterStateValidatorsByStatus(statuses, state,
|
|
130
|
+
const validatorsByStatus = filterStateValidatorsByStatus(statuses, state, pubkeyCache, currentEpoch);
|
|
131
131
|
return {
|
|
132
132
|
data: validatorsByStatus,
|
|
133
133
|
meta: {executionOptimistic, finalized},
|
|
@@ -154,7 +154,7 @@ export function getBeaconStateApi({
|
|
|
154
154
|
|
|
155
155
|
async postStateValidatorIdentities({stateId, validatorIds = []}) {
|
|
156
156
|
const {state, executionOptimistic, finalized} = await getState(stateId);
|
|
157
|
-
const {
|
|
157
|
+
const {pubkeyCache} = chain;
|
|
158
158
|
|
|
159
159
|
let validatorIdentities: routes.beacon.ValidatorIdentities;
|
|
160
160
|
|
|
@@ -163,7 +163,7 @@ export function getBeaconStateApi({
|
|
|
163
163
|
|
|
164
164
|
validatorIdentities = [];
|
|
165
165
|
for (const id of validatorIds) {
|
|
166
|
-
const resp = getStateValidatorIndex(id, state,
|
|
166
|
+
const resp = getStateValidatorIndex(id, state, pubkeyCache);
|
|
167
167
|
if (resp.valid) {
|
|
168
168
|
const index = resp.validatorIndex;
|
|
169
169
|
const {pubkey, activationEpoch} = state.validators.getReadonly(index);
|
|
@@ -187,9 +187,9 @@ export function getBeaconStateApi({
|
|
|
187
187
|
|
|
188
188
|
async getStateValidator({stateId, validatorId}) {
|
|
189
189
|
const {state, executionOptimistic, finalized} = await getState(stateId);
|
|
190
|
-
const {
|
|
190
|
+
const {pubkeyCache} = chain;
|
|
191
191
|
|
|
192
|
-
const resp = getStateValidatorIndex(validatorId, state,
|
|
192
|
+
const resp = getStateValidatorIndex(validatorId, state, pubkeyCache);
|
|
193
193
|
if (!resp.valid) {
|
|
194
194
|
throw new ApiError(resp.code, resp.reason);
|
|
195
195
|
}
|
|
@@ -214,7 +214,7 @@ export function getBeaconStateApi({
|
|
|
214
214
|
|
|
215
215
|
const balances: routes.beacon.ValidatorBalance[] = [];
|
|
216
216
|
for (const id of validatorIds) {
|
|
217
|
-
const resp = getStateValidatorIndex(id, state, chain.
|
|
217
|
+
const resp = getStateValidatorIndex(id, state, chain.pubkeyCache);
|
|
218
218
|
|
|
219
219
|
if (resp.valid) {
|
|
220
220
|
balances.push({
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import {PubkeyIndexMap} from "@chainsafe/pubkey-index-map";
|
|
2
1
|
import {routes} from "@lodestar/api";
|
|
3
|
-
import {
|
|
2
|
+
import {CheckpointWithPayloadStatus, IForkChoice} from "@lodestar/fork-choice";
|
|
4
3
|
import {GENESIS_SLOT} from "@lodestar/params";
|
|
5
|
-
import {BeaconStateAllForks, CachedBeaconStateAllForks} from "@lodestar/state-transition";
|
|
6
|
-
import {
|
|
4
|
+
import {BeaconStateAllForks, CachedBeaconStateAllForks, PubkeyCache} from "@lodestar/state-transition";
|
|
5
|
+
import {
|
|
6
|
+
BLSPubkey,
|
|
7
|
+
Epoch,
|
|
8
|
+
RootHex,
|
|
9
|
+
Slot,
|
|
10
|
+
ValidatorIndex,
|
|
11
|
+
getValidatorStatus,
|
|
12
|
+
mapToGeneralStatus,
|
|
13
|
+
phase0,
|
|
14
|
+
} from "@lodestar/types";
|
|
7
15
|
import {fromHex} from "@lodestar/utils";
|
|
8
16
|
import {IBeaconChain} from "../../../../chain/index.js";
|
|
9
17
|
import {ApiError, ValidationError} from "../../errors.js";
|
|
@@ -11,7 +19,7 @@ import {ApiError, ValidationError} from "../../errors.js";
|
|
|
11
19
|
export function resolveStateId(
|
|
12
20
|
forkChoice: IForkChoice,
|
|
13
21
|
stateId: routes.beacon.StateId
|
|
14
|
-
): RootHex | Slot |
|
|
22
|
+
): RootHex | Slot | CheckpointWithPayloadStatus {
|
|
15
23
|
if (stateId === "head") {
|
|
16
24
|
return forkChoice.getHead().stateRoot;
|
|
17
25
|
}
|
|
@@ -65,28 +73,6 @@ export async function getStateResponseWithRegen(
|
|
|
65
73
|
return res;
|
|
66
74
|
}
|
|
67
75
|
|
|
68
|
-
type GeneralValidatorStatus = "active" | "pending" | "exited" | "withdrawal";
|
|
69
|
-
|
|
70
|
-
function mapToGeneralStatus(subStatus: routes.beacon.ValidatorStatus): GeneralValidatorStatus {
|
|
71
|
-
switch (subStatus) {
|
|
72
|
-
case "active_ongoing":
|
|
73
|
-
case "active_exiting":
|
|
74
|
-
case "active_slashed":
|
|
75
|
-
return "active";
|
|
76
|
-
case "pending_initialized":
|
|
77
|
-
case "pending_queued":
|
|
78
|
-
return "pending";
|
|
79
|
-
case "exited_slashed":
|
|
80
|
-
case "exited_unslashed":
|
|
81
|
-
return "exited";
|
|
82
|
-
case "withdrawal_possible":
|
|
83
|
-
case "withdrawal_done":
|
|
84
|
-
return "withdrawal";
|
|
85
|
-
default:
|
|
86
|
-
throw new Error(`Unknown substatus: ${subStatus}`);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
76
|
export function toValidatorResponse(
|
|
91
77
|
index: ValidatorIndex,
|
|
92
78
|
validator: phase0.Validator,
|
|
@@ -104,7 +90,7 @@ export function toValidatorResponse(
|
|
|
104
90
|
export function filterStateValidatorsByStatus(
|
|
105
91
|
statuses: string[],
|
|
106
92
|
state: BeaconStateAllForks,
|
|
107
|
-
|
|
93
|
+
pubkeyCache: PubkeyCache,
|
|
108
94
|
currentEpoch: Epoch
|
|
109
95
|
): routes.beacon.ValidatorResponse[] {
|
|
110
96
|
const responses: routes.beacon.ValidatorResponse[] = [];
|
|
@@ -115,7 +101,7 @@ export function filterStateValidatorsByStatus(
|
|
|
115
101
|
const validatorStatus = getValidatorStatus(validator, currentEpoch);
|
|
116
102
|
const generalStatus = mapToGeneralStatus(validatorStatus);
|
|
117
103
|
|
|
118
|
-
const resp = getStateValidatorIndex(validator.pubkey, state,
|
|
104
|
+
const resp = getStateValidatorIndex(validator.pubkey, state, pubkeyCache);
|
|
119
105
|
if (resp.valid && (statusSet.has(validatorStatus) || statusSet.has(generalStatus))) {
|
|
120
106
|
responses.push(
|
|
121
107
|
toValidatorResponse(resp.validatorIndex, validator, state.balances.get(resp.validatorIndex), currentEpoch)
|
|
@@ -132,7 +118,7 @@ type StateValidatorIndexResponse =
|
|
|
132
118
|
export function getStateValidatorIndex(
|
|
133
119
|
id: routes.beacon.ValidatorId | BLSPubkey,
|
|
134
120
|
state: BeaconStateAllForks,
|
|
135
|
-
|
|
121
|
+
pubkeyCache: PubkeyCache
|
|
136
122
|
): StateValidatorIndexResponse {
|
|
137
123
|
if (typeof id === "string") {
|
|
138
124
|
// mutate `id` and fallthrough to below
|
|
@@ -160,7 +146,7 @@ export function getStateValidatorIndex(
|
|
|
160
146
|
}
|
|
161
147
|
|
|
162
148
|
// typeof id === Uint8Array
|
|
163
|
-
const validatorIndex =
|
|
149
|
+
const validatorIndex = pubkeyCache.getIndex(id);
|
|
164
150
|
if (validatorIndex === null) {
|
|
165
151
|
return {valid: false, code: 404, reason: "Validator pubkey not found in state"};
|
|
166
152
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {Connection,
|
|
1
|
+
import type {Connection, ConnectionStatus} from "@libp2p/interface";
|
|
2
2
|
import {routes} from "@lodestar/api";
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -24,7 +24,7 @@ export function formatNodePeer(peerIdStr: string, connections: Connection[]): ro
|
|
|
24
24
|
* - Otherwise, the first closed connection
|
|
25
25
|
*/
|
|
26
26
|
export function getRelevantConnection(connections: Connection[]): Connection | null {
|
|
27
|
-
const byStatus = new Map<
|
|
27
|
+
const byStatus = new Map<ConnectionStatus, Connection>();
|
|
28
28
|
for (const conn of connections) {
|
|
29
29
|
if (conn.status === "open") return conn;
|
|
30
30
|
if (!byStatus.has(conn.status)) byStatus.set(conn.status, conn);
|
|
@@ -37,7 +37,7 @@ export function getRelevantConnection(connections: Connection[]): Connection | n
|
|
|
37
37
|
* Map libp2p connection status to the API's peer state notation
|
|
38
38
|
* @param status
|
|
39
39
|
*/
|
|
40
|
-
function getPeerState(status:
|
|
40
|
+
function getPeerState(status: ConnectionStatus): routes.node.PeerState {
|
|
41
41
|
switch (status) {
|
|
42
42
|
case "open":
|
|
43
43
|
return "connected";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {PubkeyIndexMap} from "@chainsafe/pubkey-index-map";
|
|
2
1
|
import {routes} from "@lodestar/api";
|
|
3
2
|
import {ApplicationMethods} from "@lodestar/api/server";
|
|
4
|
-
import {ExecutionStatus, ProtoBlock} from "@lodestar/fork-choice";
|
|
3
|
+
import {ExecutionStatus, PayloadStatus, ProtoBlock} from "@lodestar/fork-choice";
|
|
5
4
|
import {
|
|
6
5
|
BUILDER_INDEX_SELF_BUILD,
|
|
7
6
|
ForkName,
|
|
@@ -27,6 +26,7 @@ import {
|
|
|
27
26
|
computeStartSlotAtEpoch,
|
|
28
27
|
computeTimeAtSlot,
|
|
29
28
|
createCachedBeaconState,
|
|
29
|
+
createPubkeyCache,
|
|
30
30
|
getBlockRootAtSlot,
|
|
31
31
|
getCurrentSlot,
|
|
32
32
|
loadState,
|
|
@@ -74,7 +74,7 @@ import {ChainEvent, CommonBlockBody} from "../../../chain/index.js";
|
|
|
74
74
|
import {PREPARE_NEXT_SLOT_BPS} from "../../../chain/prepareNextSlot.js";
|
|
75
75
|
import {BlockType, ProduceFullDeneb, ProduceFullGloas} from "../../../chain/produceBlock/index.js";
|
|
76
76
|
import {RegenCaller} from "../../../chain/regen/index.js";
|
|
77
|
-
import {
|
|
77
|
+
import {CheckpointHexPayload} from "../../../chain/stateCache/types.js";
|
|
78
78
|
import {validateApiAggregateAndProof} from "../../../chain/validation/index.js";
|
|
79
79
|
import {validateSyncCommitteeGossipContributionAndProof} from "../../../chain/validation/syncCommitteeContributionAndProof.js";
|
|
80
80
|
import {ZERO_HASH} from "../../../constants/index.js";
|
|
@@ -303,7 +303,7 @@ export function getValidatorApi(
|
|
|
303
303
|
* |
|
|
304
304
|
* prepareNextSlot (4s before next slot)
|
|
305
305
|
*/
|
|
306
|
-
async function waitForCheckpointState(cpHex:
|
|
306
|
+
async function waitForCheckpointState(cpHex: CheckpointHexPayload): Promise<CachedBeaconStateAllForks | null> {
|
|
307
307
|
const cpState = chain.regen.getCheckpointStateSync(cpHex);
|
|
308
308
|
if (cpState) {
|
|
309
309
|
return cpState;
|
|
@@ -389,7 +389,7 @@ export function getValidatorApi(
|
|
|
389
389
|
*/
|
|
390
390
|
|
|
391
391
|
function notOnOptimisticBlockRoot(beaconBlockRoot: Root): void {
|
|
392
|
-
const protoBeaconBlock = chain.forkChoice.
|
|
392
|
+
const protoBeaconBlock = chain.forkChoice.getBlockDefaultStatus(beaconBlockRoot);
|
|
393
393
|
if (!protoBeaconBlock) {
|
|
394
394
|
throw new ApiError(404, `Block not in forkChoice, beaconBlockRoot=${toRootHex(beaconBlockRoot)}`);
|
|
395
395
|
}
|
|
@@ -401,7 +401,7 @@ export function getValidatorApi(
|
|
|
401
401
|
}
|
|
402
402
|
|
|
403
403
|
function notOnOutOfRangeData(beaconBlockRoot: Root): void {
|
|
404
|
-
const protoBeaconBlock = chain.forkChoice.
|
|
404
|
+
const protoBeaconBlock = chain.forkChoice.getBlockDefaultStatus(beaconBlockRoot);
|
|
405
405
|
if (!protoBeaconBlock) {
|
|
406
406
|
throw new ApiError(404, `Block not in forkChoice, beaconBlockRoot=${toRootHex(beaconBlockRoot)}`);
|
|
407
407
|
}
|
|
@@ -989,8 +989,30 @@ export function getValidatorApi(
|
|
|
989
989
|
const headBlockRoot = fromHex(headBlockRootHex);
|
|
990
990
|
const fork = config.getForkName(slot);
|
|
991
991
|
|
|
992
|
+
const beaconBlockRoot =
|
|
993
|
+
slot >= headSlot
|
|
994
|
+
? // When attesting to the head slot or later, always use the head of the chain.
|
|
995
|
+
headBlockRoot
|
|
996
|
+
: // Permit attesting to slots *prior* to the current head. This is desirable when
|
|
997
|
+
// the VC and BN are out-of-sync due to time issues or overloading.
|
|
998
|
+
getBlockRootAtSlot(headState, slot);
|
|
999
|
+
|
|
992
1000
|
let index: CommitteeIndex;
|
|
993
|
-
if (
|
|
1001
|
+
if (isForkPostGloas(fork)) {
|
|
1002
|
+
const canonicalBlock = chain.forkChoice.getCanonicalBlockByRoot(beaconBlockRoot);
|
|
1003
|
+
if (!canonicalBlock) {
|
|
1004
|
+
// This should never happen
|
|
1005
|
+
throw Error(`Block not found in fork choice for slot=${slot}, root=${toRootHex(beaconBlockRoot)}`);
|
|
1006
|
+
}
|
|
1007
|
+
// After Gloas, attestation.data.index signals payload status in fork-choice:
|
|
1008
|
+
// - 0 = EMPTY / not present, 1 = FULL / present
|
|
1009
|
+
// - same-slot attestations must always use index = 0
|
|
1010
|
+
if (canonicalBlock.slot !== slot) {
|
|
1011
|
+
index = canonicalBlock.payloadStatus === PayloadStatus.FULL ? 1 : 0;
|
|
1012
|
+
} else {
|
|
1013
|
+
index = 0;
|
|
1014
|
+
}
|
|
1015
|
+
} else if (isForkPostElectra(fork)) {
|
|
994
1016
|
index = 0;
|
|
995
1017
|
} else {
|
|
996
1018
|
if (committeeIndex === undefined) {
|
|
@@ -999,14 +1021,6 @@ export function getValidatorApi(
|
|
|
999
1021
|
index = committeeIndex;
|
|
1000
1022
|
}
|
|
1001
1023
|
|
|
1002
|
-
const beaconBlockRoot =
|
|
1003
|
-
slot >= headSlot
|
|
1004
|
-
? // When attesting to the head slot or later, always use the head of the chain.
|
|
1005
|
-
headBlockRoot
|
|
1006
|
-
: // Permit attesting to slots *prior* to the current head. This is desirable when
|
|
1007
|
-
// the VC and BN are out-of-sync due to time issues or overloading.
|
|
1008
|
-
getBlockRootAtSlot(headState, slot);
|
|
1009
|
-
|
|
1010
1024
|
const targetSlot = computeStartSlotAtEpoch(attEpoch);
|
|
1011
1025
|
const targetRoot =
|
|
1012
1026
|
targetSlot >= headSlot
|
|
@@ -1098,7 +1112,11 @@ export function getValidatorApi(
|
|
|
1098
1112
|
// this is to avoid missed block proposal due to 0 epoch look ahead
|
|
1099
1113
|
if (epoch === nextEpoch && toNextEpochMs < prepareNextSlotLookAheadMs) {
|
|
1100
1114
|
// wait for maximum 1 slot for cp state which is the timeout of validator api
|
|
1101
|
-
const cpState = await waitForCheckpointState({
|
|
1115
|
+
const cpState = await waitForCheckpointState({
|
|
1116
|
+
rootHex: head.blockRoot,
|
|
1117
|
+
epoch,
|
|
1118
|
+
payloadPresent: head.payloadStatus === PayloadStatus.FULL,
|
|
1119
|
+
});
|
|
1102
1120
|
if (cpState) {
|
|
1103
1121
|
state = cpState;
|
|
1104
1122
|
metrics?.duties.requestNextEpochProposalDutiesHit.inc();
|
|
@@ -1123,8 +1141,7 @@ export function getValidatorApi(
|
|
|
1123
1141
|
{
|
|
1124
1142
|
config: chain.config,
|
|
1125
1143
|
// Not required to compute proposers
|
|
1126
|
-
|
|
1127
|
-
index2pubkey: [],
|
|
1144
|
+
pubkeyCache: createPubkeyCache(),
|
|
1128
1145
|
},
|
|
1129
1146
|
{skipSyncPubkeys: true, skipSyncCommitteeCache: true}
|
|
1130
1147
|
);
|
|
@@ -1585,7 +1602,7 @@ export function getValidatorApi(
|
|
|
1585
1602
|
|
|
1586
1603
|
const filteredRegistrations = registrations.filter((registration) => {
|
|
1587
1604
|
const {pubkey} = registration.message;
|
|
1588
|
-
const validatorIndex = chain.
|
|
1605
|
+
const validatorIndex = chain.pubkeyCache.getIndex(pubkey);
|
|
1589
1606
|
if (validatorIndex === null) return false;
|
|
1590
1607
|
|
|
1591
1608
|
const validator = headState.validators.getReadonly(validatorIndex);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {CheckpointWithPayloadStatus} from "@lodestar/fork-choice";
|
|
2
2
|
import {LoggerNode} from "@lodestar/logger/node";
|
|
3
|
-
import {ForkSeq} from "@lodestar/params";
|
|
4
3
|
import {Checkpoint} from "@lodestar/types/phase0";
|
|
5
4
|
import {callFnWhenAwait} from "@lodestar/utils";
|
|
6
5
|
import {IBeaconDb} from "../../db/index.js";
|
|
@@ -14,7 +13,6 @@ import {HistoricalStateRegen} from "./historicalState/historicalStateRegen.js";
|
|
|
14
13
|
import {ArchiveMode, ArchiveStoreOpts, StateArchiveStrategy} from "./interface.js";
|
|
15
14
|
import {FrequencyStateArchiveStrategy} from "./strategies/frequencyStateArchiveStrategy.js";
|
|
16
15
|
import {archiveBlocks} from "./utils/archiveBlocks.js";
|
|
17
|
-
import {archiveExecutionPayloadEnvelopes} from "./utils/archivePayloads.js";
|
|
18
16
|
import {pruneHistory} from "./utils/pruneHistory.js";
|
|
19
17
|
import {updateBackfillRange} from "./utils/updateBackfillRange.js";
|
|
20
18
|
|
|
@@ -29,7 +27,6 @@ type ArchiveStoreInitOpts = ArchiveStoreOpts & {dbName: string; anchorState: {fi
|
|
|
29
27
|
|
|
30
28
|
export enum ArchiveStoreTask {
|
|
31
29
|
ArchiveBlocks = "archive_blocks",
|
|
32
|
-
ArchivePayloads = "archive_payloads",
|
|
33
30
|
PruneHistory = "prune_history",
|
|
34
31
|
OnFinalizedCheckpoint = "on_finalized_checkpoint",
|
|
35
32
|
MaybeArchiveState = "maybe_archive_state",
|
|
@@ -44,7 +41,7 @@ export enum ArchiveStoreTask {
|
|
|
44
41
|
*/
|
|
45
42
|
export class ArchiveStore {
|
|
46
43
|
private archiveMode: ArchiveMode;
|
|
47
|
-
private jobQueue: JobItemQueue<[
|
|
44
|
+
private jobQueue: JobItemQueue<[CheckpointWithPayloadStatus], void>;
|
|
48
45
|
|
|
49
46
|
private archiveDataEpochs?: number;
|
|
50
47
|
private readonly statesArchiverStrategy: StateArchiveStrategy;
|
|
@@ -67,7 +64,7 @@ export class ArchiveStore {
|
|
|
67
64
|
this.archiveMode = opts.archiveMode;
|
|
68
65
|
this.archiveDataEpochs = opts.archiveDataEpochs;
|
|
69
66
|
|
|
70
|
-
this.jobQueue = new JobItemQueue<[
|
|
67
|
+
this.jobQueue = new JobItemQueue<[CheckpointWithPayloadStatus], void>(this.processFinalizedCheckpoint, {
|
|
71
68
|
maxLength: PROCESS_FINALIZED_CHECKPOINT_QUEUE_LENGTH,
|
|
72
69
|
signal,
|
|
73
70
|
});
|
|
@@ -168,7 +165,7 @@ export class ArchiveStore {
|
|
|
168
165
|
//-------------------------------------------------------------------------
|
|
169
166
|
// Event handlers
|
|
170
167
|
//-------------------------------------------------------------------------
|
|
171
|
-
private onFinalizedCheckpoint = (finalized:
|
|
168
|
+
private onFinalizedCheckpoint = (finalized: CheckpointWithPayloadStatus): void => {
|
|
172
169
|
this.jobQueue.push(finalized).catch((e) => {
|
|
173
170
|
if (!isQueueErrorAborted(e)) {
|
|
174
171
|
this.logger.error("Error queuing finalized checkpoint", {epoch: finalized.epoch}, e as Error);
|
|
@@ -189,10 +186,9 @@ export class ArchiveStore {
|
|
|
189
186
|
});
|
|
190
187
|
};
|
|
191
188
|
|
|
192
|
-
private processFinalizedCheckpoint = async (finalized:
|
|
189
|
+
private processFinalizedCheckpoint = async (finalized: CheckpointWithPayloadStatus): Promise<void> => {
|
|
193
190
|
try {
|
|
194
191
|
const finalizedEpoch = finalized.epoch;
|
|
195
|
-
const finalizedFork = this.chain.config.getForkSeqAtEpoch(finalizedEpoch);
|
|
196
192
|
this.logger.verbose("Start processing finalized checkpoint", {epoch: finalizedEpoch, rootHex: finalized.rootHex});
|
|
197
193
|
|
|
198
194
|
let timer = this.metrics?.processFinalizedCheckpoint.durationByTask.startTimer();
|
|
@@ -210,12 +206,6 @@ export class ArchiveStore {
|
|
|
210
206
|
);
|
|
211
207
|
timer?.({source: ArchiveStoreTask.ArchiveBlocks});
|
|
212
208
|
|
|
213
|
-
if (finalizedFork >= ForkSeq.gloas) {
|
|
214
|
-
timer = this.metrics?.processFinalizedCheckpoint.durationByTask.startTimer();
|
|
215
|
-
await archiveExecutionPayloadEnvelopes(this.chain, finalized);
|
|
216
|
-
timer?.({source: ArchiveStoreTask.ArchivePayloads});
|
|
217
|
-
}
|
|
218
|
-
|
|
219
209
|
if (this.opts.pruneHistory) {
|
|
220
210
|
timer = this.metrics?.processFinalizedCheckpoint.durationByTask.startTimer();
|
|
221
211
|
await pruneHistory(
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {PubkeyIndexMap} from "@chainsafe/pubkey-index-map";
|
|
2
1
|
import {BeaconConfig} from "@lodestar/config";
|
|
3
2
|
import {
|
|
4
3
|
BeaconStateAllForks,
|
|
5
4
|
CachedBeaconStateAllForks,
|
|
6
5
|
DataAvailabilityStatus,
|
|
7
6
|
ExecutionPayloadStatus,
|
|
7
|
+
PubkeyCache,
|
|
8
8
|
createCachedBeaconState,
|
|
9
9
|
stateTransition,
|
|
10
10
|
} from "@lodestar/state-transition";
|
|
@@ -15,16 +15,16 @@ import {HistoricalStateRegenMetrics} from "./metrics.js";
|
|
|
15
15
|
import {RegenErrorType} from "./types.js";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* Populate a
|
|
18
|
+
* Populate a PubkeyCache with any new entries based on a BeaconState
|
|
19
19
|
*/
|
|
20
|
-
export function syncPubkeyCache(state: BeaconStateAllForks,
|
|
20
|
+
export function syncPubkeyCache(state: BeaconStateAllForks, pubkeyCache: PubkeyCache): void {
|
|
21
21
|
// Get the validators sub tree once for all the loop
|
|
22
22
|
const validators = state.validators;
|
|
23
23
|
|
|
24
24
|
const newCount = state.validators.length;
|
|
25
|
-
for (let i =
|
|
25
|
+
for (let i = pubkeyCache.size; i < newCount; i++) {
|
|
26
26
|
const pubkey = validators.getReadonly(i).pubkey;
|
|
27
|
-
|
|
27
|
+
pubkeyCache.set(i, pubkey);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -35,7 +35,7 @@ export async function getNearestState(
|
|
|
35
35
|
slot: number,
|
|
36
36
|
config: BeaconConfig,
|
|
37
37
|
db: IBeaconDb,
|
|
38
|
-
|
|
38
|
+
pubkeyCache: PubkeyCache
|
|
39
39
|
): Promise<CachedBeaconStateAllForks> {
|
|
40
40
|
const stateBytesArr = await db.stateArchive.binaries({limit: 1, lte: slot, reverse: true});
|
|
41
41
|
if (!stateBytesArr.length) {
|
|
@@ -44,14 +44,13 @@ export async function getNearestState(
|
|
|
44
44
|
|
|
45
45
|
const stateBytes = stateBytesArr[0];
|
|
46
46
|
const state = getStateTypeFromBytes(config, stateBytes).deserializeToViewDU(stateBytes);
|
|
47
|
-
syncPubkeyCache(state,
|
|
47
|
+
syncPubkeyCache(state, pubkeyCache);
|
|
48
48
|
|
|
49
49
|
return createCachedBeaconState(
|
|
50
50
|
state,
|
|
51
51
|
{
|
|
52
52
|
config,
|
|
53
|
-
|
|
54
|
-
index2pubkey: [],
|
|
53
|
+
pubkeyCache,
|
|
55
54
|
},
|
|
56
55
|
{
|
|
57
56
|
skipSyncPubkeys: true,
|
|
@@ -66,13 +65,13 @@ export async function getHistoricalState(
|
|
|
66
65
|
slot: number,
|
|
67
66
|
config: BeaconConfig,
|
|
68
67
|
db: IBeaconDb,
|
|
69
|
-
|
|
68
|
+
pubkeyCache: PubkeyCache,
|
|
70
69
|
metrics?: HistoricalStateRegenMetrics
|
|
71
70
|
): Promise<Uint8Array> {
|
|
72
71
|
const regenTimer = metrics?.regenTime.startTimer();
|
|
73
72
|
|
|
74
73
|
const loadStateTimer = metrics?.loadStateTime.startTimer();
|
|
75
|
-
let state = await getNearestState(slot, config, db,
|
|
74
|
+
let state = await getNearestState(slot, config, db, pubkeyCache).catch((e) => {
|
|
76
75
|
metrics?.regenErrorCount.inc({reason: RegenErrorType.loadState});
|
|
77
76
|
throw e;
|
|
78
77
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import worker from "node:worker_threads";
|
|
2
|
-
import {PubkeyIndexMap} from "@chainsafe/pubkey-index-map";
|
|
3
2
|
import {Transfer, expose} from "@chainsafe/threads/worker";
|
|
4
3
|
import {chainConfigFromJson, createBeaconConfig} from "@lodestar/config";
|
|
5
4
|
import {LevelDbController} from "@lodestar/db/controller/level";
|
|
6
5
|
import {getNodeLogger} from "@lodestar/logger/node";
|
|
6
|
+
import {createPubkeyCache} from "@lodestar/state-transition";
|
|
7
7
|
import {BeaconDb} from "../../../db/index.js";
|
|
8
8
|
import {RegistryMetricCreator, collectNodeJSMetrics} from "../../../metrics/index.js";
|
|
9
9
|
import {JobFnQueue} from "../../../util/queue/fnQueue.js";
|
|
@@ -52,7 +52,7 @@ const queue = new JobFnQueue(
|
|
|
52
52
|
queueMetrics
|
|
53
53
|
);
|
|
54
54
|
|
|
55
|
-
const
|
|
55
|
+
const pubkeyCache = createPubkeyCache();
|
|
56
56
|
|
|
57
57
|
const api: HistoricalStateWorkerApi = {
|
|
58
58
|
async close() {
|
|
@@ -65,7 +65,7 @@ const api: HistoricalStateWorkerApi = {
|
|
|
65
65
|
historicalStateRegenMetrics?.regenRequestCount.inc();
|
|
66
66
|
|
|
67
67
|
const stateBytes = await queue.push<Uint8Array>(() =>
|
|
68
|
-
getHistoricalState(slot, config, db,
|
|
68
|
+
getHistoricalState(slot, config, db, pubkeyCache, historicalStateRegenMetrics)
|
|
69
69
|
);
|
|
70
70
|
const result = Transfer(stateBytes, [stateBytes.buffer]) as unknown as Uint8Array;
|
|
71
71
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {CheckpointWithPayloadStatus} from "@lodestar/fork-choice";
|
|
2
2
|
import {RootHex} from "@lodestar/types";
|
|
3
3
|
import {Metrics} from "../../metrics/metrics.js";
|
|
4
4
|
|
|
@@ -44,9 +44,9 @@ export type FinalizedStats = {
|
|
|
44
44
|
|
|
45
45
|
export interface StateArchiveStrategy {
|
|
46
46
|
onCheckpoint(stateRoot: RootHex, metrics?: Metrics | null): Promise<void>;
|
|
47
|
-
onFinalizedCheckpoint(finalized:
|
|
48
|
-
maybeArchiveState(finalized:
|
|
49
|
-
archiveState(finalized:
|
|
47
|
+
onFinalizedCheckpoint(finalized: CheckpointWithPayloadStatus, metrics?: Metrics | null): Promise<void>;
|
|
48
|
+
maybeArchiveState(finalized: CheckpointWithPayloadStatus, metrics?: Metrics | null): Promise<void>;
|
|
49
|
+
archiveState(finalized: CheckpointWithPayloadStatus, metrics?: Metrics | null): Promise<void>;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
export interface IArchiveStore {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {CheckpointWithPayloadStatus} from "@lodestar/fork-choice";
|
|
2
2
|
import {SLOTS_PER_EPOCH} from "@lodestar/params";
|
|
3
3
|
import {computeEpochAtSlot, computeStartSlotAtEpoch} from "@lodestar/state-transition";
|
|
4
4
|
import {Epoch, RootHex, Slot} from "@lodestar/types";
|
|
@@ -9,6 +9,7 @@ import {AllocSource, BufferPool} from "../../../util/bufferPool.js";
|
|
|
9
9
|
import {getStateSlotFromBytes} from "../../../util/multifork.js";
|
|
10
10
|
import {IStateRegenerator} from "../../regen/interface.js";
|
|
11
11
|
import {serializeState} from "../../serializeState.js";
|
|
12
|
+
import {fcCheckpointToHexPayload} from "../../stateCache/persistentCheckpointsCache.js";
|
|
12
13
|
import {StateArchiveStrategy, StatesArchiveOpts} from "../interface.js";
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -40,7 +41,7 @@ export class FrequencyStateArchiveStrategy implements StateArchiveStrategy {
|
|
|
40
41
|
private readonly bufferPool?: BufferPool | null
|
|
41
42
|
) {}
|
|
42
43
|
|
|
43
|
-
async onFinalizedCheckpoint(_finalized:
|
|
44
|
+
async onFinalizedCheckpoint(_finalized: CheckpointWithPayloadStatus, _metrics?: Metrics | null): Promise<void> {}
|
|
44
45
|
async onCheckpoint(_stateRoot: RootHex, _metrics?: Metrics | null): Promise<void> {}
|
|
45
46
|
|
|
46
47
|
/**
|
|
@@ -55,7 +56,7 @@ export class FrequencyStateArchiveStrategy implements StateArchiveStrategy {
|
|
|
55
56
|
* epoch - 1024*2 epoch - 1024 epoch - 32 epoch
|
|
56
57
|
* ```
|
|
57
58
|
*/
|
|
58
|
-
async maybeArchiveState(finalized:
|
|
59
|
+
async maybeArchiveState(finalized: CheckpointWithPayloadStatus, metrics?: Metrics | null): Promise<void> {
|
|
59
60
|
let timer = metrics?.processFinalizedCheckpoint.frequencyStateArchive.startTimer();
|
|
60
61
|
const lastStoredSlot = await this.db.stateArchive.lastKey();
|
|
61
62
|
timer?.({step: FrequencyStateArchiveStep.LoadLastStoredSlot});
|
|
@@ -104,10 +105,12 @@ export class FrequencyStateArchiveStrategy implements StateArchiveStrategy {
|
|
|
104
105
|
* Archives finalized states from active bucket to archive bucket.
|
|
105
106
|
* Only the new finalized state is stored to disk
|
|
106
107
|
*/
|
|
107
|
-
async archiveState(finalized:
|
|
108
|
+
async archiveState(finalized: CheckpointWithPayloadStatus, metrics?: Metrics | null): Promise<void> {
|
|
108
109
|
// starting from Mar 2024, the finalized state could be from disk or in memory
|
|
109
110
|
let timer = metrics?.processFinalizedCheckpoint.frequencyStateArchive.startTimer();
|
|
110
|
-
|
|
111
|
+
// Convert fork-choice checkpoint to beacon-node checkpoint with payloadPresent
|
|
112
|
+
const finalizedHexPayload = fcCheckpointToHexPayload(finalized);
|
|
113
|
+
const finalizedStateOrBytes = await this.regen.getCheckpointStateOrBytes(finalizedHexPayload);
|
|
111
114
|
timer?.({step: FrequencyStateArchiveStep.GetFinalizedState});
|
|
112
115
|
|
|
113
116
|
const {rootHex} = finalized;
|