@lodestar/beacon-node 1.41.0-dev.a35cbde8b3 → 1.41.0-dev.aeab9f930d
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 +8 -8
- package/lib/api/impl/beacon/state/index.js.map +1 -1
- package/lib/api/impl/beacon/state/utils.d.ts +3 -4
- 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 +6 -2
- 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 +33 -17
- 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 +1 -0
- package/lib/chain/archiveStore/archiveStore.d.ts.map +1 -1
- package/lib/chain/archiveStore/archiveStore.js +11 -1
- 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.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.d.ts +7 -0
- package/lib/chain/archiveStore/utils/archivePayloads.d.ts.map +1 -0
- package/lib/chain/archiveStore/utils/archivePayloads.js +10 -0
- package/lib/chain/archiveStore/utils/archivePayloads.js.map +1 -0
- 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 +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 +9 -12
- package/lib/chain/chain.d.ts.map +1 -1
- package/lib/chain/chain.js +22 -23
- package/lib/chain/chain.js.map +1 -1
- package/lib/chain/emitter.d.ts +6 -8
- 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.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 +15 -6
- 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 +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.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 +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 +3 -1
- package/lib/db/beacon.d.ts.map +1 -1
- package/lib/db/beacon.js +5 -1
- package/lib/db/beacon.js.map +1 -1
- package/lib/db/buckets.d.ts +24 -22
- package/lib/db/buckets.d.ts.map +1 -1
- package/lib/db/buckets.js +4 -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/interface.d.ts +3 -1
- package/lib/db/interface.d.ts.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.d.ts.map +1 -1
- 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 +5 -3
- package/lib/db/repositories/dataColumnSidecar.d.ts.map +1 -1
- package/lib/db/repositories/dataColumnSidecar.js +14 -1
- package/lib/db/repositories/dataColumnSidecar.js.map +1 -1
- package/lib/db/repositories/dataColumnSidecarArchive.d.ts +5 -3
- package/lib/db/repositories/dataColumnSidecarArchive.d.ts.map +1 -1
- package/lib/db/repositories/dataColumnSidecarArchive.js +14 -1
- package/lib/db/repositories/dataColumnSidecarArchive.js.map +1 -1
- package/lib/db/repositories/executionPayloadEnvelope.d.ts +19 -0
- package/lib/db/repositories/executionPayloadEnvelope.d.ts.map +1 -0
- package/lib/db/repositories/executionPayloadEnvelope.js +22 -0
- package/lib/db/repositories/executionPayloadEnvelope.js.map +1 -0
- package/lib/db/repositories/executionPayloadEnvelopeArchive.d.ts +18 -0
- package/lib/db/repositories/executionPayloadEnvelopeArchive.d.ts.map +1 -0
- package/lib/db/repositories/executionPayloadEnvelopeArchive.js +28 -0
- package/lib/db/repositories/executionPayloadEnvelopeArchive.js.map +1 -0
- package/lib/db/repositories/index.d.ts +2 -0
- package/lib/db/repositories/index.d.ts.map +1 -1
- package/lib/db/repositories/index.js +2 -0
- package/lib/db/repositories/index.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.map +1 -1
- package/lib/metrics/metrics/beacon.js.map +1 -1
- package/lib/metrics/metrics/lodestar.d.ts +11 -6
- package/lib/metrics/metrics/lodestar.d.ts.map +1 -1
- package/lib/metrics/metrics/lodestar.js +23 -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 +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.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 +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 +47 -20
- 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 +3121 -3174
- 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 +1 -1
- package/lib/network/libp2p/index.d.ts.map +1 -1
- package/lib/network/libp2p/index.js +7 -2
- 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 +3 -3
- package/lib/network/network.d.ts.map +1 -1
- package/lib/network/network.js +2 -2
- package/lib/network/network.js.map +1 -1
- package/lib/network/options.d.ts.map +1 -1
- package/lib/network/options.js +3 -0
- package/lib/network/options.js.map +1 -1
- package/lib/network/peers/client.js +2 -1
- package/lib/network/peers/client.js.map +1 -1
- package/lib/network/peers/datastore.d.ts +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 +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 +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 +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.d.ts +2 -2
- package/lib/util/blobs.d.ts.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 +3 -5
- package/lib/util/dataColumns.d.ts.map +1 -1
- package/lib/util/dataColumns.js +4 -6
- 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.d.ts +8 -0
- package/lib/util/multifork.d.ts.map +1 -1
- package/lib/util/multifork.js +37 -0
- 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 +41 -44
- package/src/api/impl/beacon/blocks/index.ts +3 -2
- package/src/api/impl/beacon/state/index.ts +8 -8
- package/src/api/impl/beacon/state/utils.ts +15 -29
- package/src/api/impl/debug/index.ts +9 -5
- package/src/api/impl/node/utils.ts +3 -3
- package/src/api/impl/validator/index.ts +29 -16
- package/src/chain/archiveStore/archiveStore.ts +15 -5
- package/src/chain/archiveStore/historicalState/getHistoricalState.ts +10 -11
- package/src/chain/archiveStore/historicalState/worker.ts +3 -3
- package/src/chain/archiveStore/utils/archiveBlocks.ts +4 -5
- package/src/chain/archiveStore/utils/archivePayloads.ts +15 -0
- 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/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 +47 -39
- package/src/chain/emitter.ts +5 -5
- 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/produceBlock/computeNewStateRoot.ts +4 -3
- package/src/chain/produceBlock/produceBlockBody.ts +10 -4
- 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 +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 +1 -1
- 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/beacon.ts +8 -0
- package/src/db/buckets.ts +3 -0
- package/src/db/index.ts +1 -0
- package/src/db/interface.ts +5 -0
- package/src/db/repositories/blockArchive.ts +1 -2
- package/src/db/repositories/dataColumnSidecar.ts +18 -3
- package/src/db/repositories/dataColumnSidecarArchive.ts +18 -3
- package/src/db/repositories/executionPayloadEnvelope.ts +26 -0
- package/src/db/repositories/executionPayloadEnvelopeArchive.ts +32 -0
- package/src/db/repositories/index.ts +2 -0
- package/src/execution/engine/http.ts +3 -0
- package/src/metrics/metrics/lodestar.ts +23 -10
- 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/events.ts +2 -1
- package/src/network/gossip/encoding.ts +3 -3
- package/src/network/gossip/gossipsub.ts +86 -25
- 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 +8 -3
- package/src/network/network.ts +9 -6
- package/src/network/options.ts +3 -0
- package/src/network/peers/datastore.ts +13 -10
- 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/utils/downloadByRoot.ts +1 -1
- package/src/sync/utils/remoteSyncType.ts +1 -1
- package/src/util/blobs.ts +3 -3
- package/src/util/clock.ts +9 -4
- package/src/util/dataColumns.ts +2 -7
- package/src/util/multifork.ts +45 -0
- package/src/util/serializedCache.ts +7 -5
- package/src/util/workerEvents.ts +1 -1
|
@@ -7,7 +7,7 @@ import {Worker, spawn} from "@chainsafe/threads";
|
|
|
7
7
|
self = undefined;
|
|
8
8
|
|
|
9
9
|
import {PublicKey} from "@chainsafe/blst";
|
|
10
|
-
import {ISignatureSet,
|
|
10
|
+
import {ISignatureSet, PubkeyCache} from "@lodestar/state-transition";
|
|
11
11
|
import {Logger} from "@lodestar/utils";
|
|
12
12
|
import {Metrics} from "../../../metrics/index.js";
|
|
13
13
|
import {LinkedList} from "../../../util/array.js";
|
|
@@ -34,7 +34,7 @@ const workerDir = process.env.NODE_ENV === "test" ? "../../../../lib/chain/bls/m
|
|
|
34
34
|
export type BlsMultiThreadWorkerPoolModules = {
|
|
35
35
|
logger: Logger;
|
|
36
36
|
metrics: Metrics | null;
|
|
37
|
-
|
|
37
|
+
pubkeyCache: PubkeyCache;
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
export type BlsMultiThreadWorkerPoolOptions = {
|
|
@@ -114,7 +114,7 @@ type WorkerDescriptor = {
|
|
|
114
114
|
export class BlsMultiThreadWorkerPool implements IBlsVerifier {
|
|
115
115
|
private readonly logger: Logger;
|
|
116
116
|
private readonly metrics: Metrics | null;
|
|
117
|
-
private readonly
|
|
117
|
+
private readonly pubkeyCache: PubkeyCache;
|
|
118
118
|
|
|
119
119
|
private readonly workers: WorkerDescriptor[];
|
|
120
120
|
private readonly jobs = new LinkedList<JobQueueItem>();
|
|
@@ -130,10 +130,10 @@ export class BlsMultiThreadWorkerPool implements IBlsVerifier {
|
|
|
130
130
|
private workersBusy = 0;
|
|
131
131
|
|
|
132
132
|
constructor(options: BlsMultiThreadWorkerPoolOptions, modules: BlsMultiThreadWorkerPoolModules) {
|
|
133
|
-
const {logger, metrics,
|
|
133
|
+
const {logger, metrics, pubkeyCache} = modules;
|
|
134
134
|
this.logger = logger;
|
|
135
135
|
this.metrics = metrics;
|
|
136
|
-
this.
|
|
136
|
+
this.pubkeyCache = pubkeyCache;
|
|
137
137
|
this.blsVerifyAllMultiThread = options.blsVerifyAllMultiThread ?? false;
|
|
138
138
|
|
|
139
139
|
// Use compressed for herumi for now.
|
|
@@ -173,7 +173,7 @@ export class BlsMultiThreadWorkerPool implements IBlsVerifier {
|
|
|
173
173
|
try {
|
|
174
174
|
return verifySignatureSetsMaybeBatch(
|
|
175
175
|
sets.map((set) => ({
|
|
176
|
-
publicKey: getAggregatedPubkey(set, this.
|
|
176
|
+
publicKey: getAggregatedPubkey(set, this.pubkeyCache),
|
|
177
177
|
message: set.signingRoot.valueOf(),
|
|
178
178
|
signature: set.signature,
|
|
179
179
|
}))
|
|
@@ -398,7 +398,7 @@ export class BlsMultiThreadWorkerPool implements IBlsVerifier {
|
|
|
398
398
|
try {
|
|
399
399
|
// Note: This can throw, must be handled per-job.
|
|
400
400
|
// Pubkey and signature aggregation is defered here
|
|
401
|
-
workReq = await jobItemWorkReq(job, this.
|
|
401
|
+
workReq = await jobItemWorkReq(job, this.pubkeyCache, this.metrics);
|
|
402
402
|
} catch (e) {
|
|
403
403
|
this.metrics?.blsThreadPool.errorAggregateSignatureSetsCount.inc({type: job.type});
|
|
404
404
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {PublicKey, asyncAggregateWithRandomness} from "@chainsafe/blst";
|
|
2
|
-
import {ISignatureSet,
|
|
2
|
+
import {ISignatureSet, PubkeyCache, SignatureSetType} from "@lodestar/state-transition";
|
|
3
3
|
import {Metrics} from "../../../metrics/metrics.js";
|
|
4
4
|
import {LinkedList} from "../../../util/array.js";
|
|
5
5
|
import {VerifySignatureOpts} from "../interface.js";
|
|
@@ -50,7 +50,7 @@ export function jobItemSigSets(job: JobQueueItem): number {
|
|
|
50
50
|
*/
|
|
51
51
|
export async function jobItemWorkReq(
|
|
52
52
|
job: JobQueueItem,
|
|
53
|
-
|
|
53
|
+
pubkeyCache: PubkeyCache,
|
|
54
54
|
metrics: Metrics | null
|
|
55
55
|
): Promise<BlsWorkReq> {
|
|
56
56
|
switch (job.type) {
|
|
@@ -59,7 +59,7 @@ export async function jobItemWorkReq(
|
|
|
59
59
|
opts: job.opts,
|
|
60
60
|
sets: job.sets.map((set) => ({
|
|
61
61
|
// this can throw, handled in the consumer code
|
|
62
|
-
publicKey: getAggregatedPubkey(set,
|
|
62
|
+
publicKey: getAggregatedPubkey(set, pubkeyCache, metrics).toBytes(),
|
|
63
63
|
signature: set.signature,
|
|
64
64
|
message: set.signingRoot,
|
|
65
65
|
})),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {PublicKey, Signature, aggregatePublicKeys, aggregateSignatures, verify} from "@chainsafe/blst";
|
|
2
|
-
import {ISignatureSet,
|
|
2
|
+
import {ISignatureSet, PubkeyCache} from "@lodestar/state-transition";
|
|
3
3
|
import {Metrics} from "../../metrics/index.js";
|
|
4
4
|
import {IBlsVerifier} from "./interface.js";
|
|
5
5
|
import {verifySignatureSetsMaybeBatch} from "./maybeBatch.js";
|
|
@@ -7,18 +7,18 @@ import {getAggregatedPubkey, getAggregatedPubkeysCount} from "./utils.js";
|
|
|
7
7
|
|
|
8
8
|
export class BlsSingleThreadVerifier implements IBlsVerifier {
|
|
9
9
|
private readonly metrics: Metrics | null;
|
|
10
|
-
private readonly
|
|
10
|
+
private readonly pubkeyCache: PubkeyCache;
|
|
11
11
|
|
|
12
|
-
constructor({metrics = null,
|
|
12
|
+
constructor({metrics = null, pubkeyCache}: {metrics: Metrics | null; pubkeyCache: PubkeyCache}) {
|
|
13
13
|
this.metrics = metrics;
|
|
14
|
-
this.
|
|
14
|
+
this.pubkeyCache = pubkeyCache;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
async verifySignatureSets(sets: ISignatureSet[]): Promise<boolean> {
|
|
18
18
|
this.metrics?.bls.aggregatedPubkeys.inc(getAggregatedPubkeysCount(sets));
|
|
19
19
|
|
|
20
20
|
const setsAggregated = sets.map((set) => ({
|
|
21
|
-
publicKey: getAggregatedPubkey(set, this.
|
|
21
|
+
publicKey: getAggregatedPubkey(set, this.pubkeyCache, this.metrics),
|
|
22
22
|
message: set.signingRoot,
|
|
23
23
|
signature: set.signature,
|
|
24
24
|
}));
|
package/src/chain/bls/utils.ts
CHANGED
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import {PublicKey, aggregatePublicKeys} from "@chainsafe/blst";
|
|
2
|
-
import {ISignatureSet,
|
|
2
|
+
import {ISignatureSet, PubkeyCache, SignatureSetType} from "@lodestar/state-transition";
|
|
3
3
|
import {Metrics} from "../../metrics/metrics.js";
|
|
4
4
|
|
|
5
5
|
export function getAggregatedPubkey(
|
|
6
6
|
signatureSet: ISignatureSet,
|
|
7
|
-
|
|
7
|
+
pubkeyCache: PubkeyCache,
|
|
8
8
|
metrics: Metrics | null = null
|
|
9
9
|
): PublicKey {
|
|
10
10
|
switch (signatureSet.type) {
|
|
11
11
|
case SignatureSetType.single:
|
|
12
12
|
return signatureSet.pubkey;
|
|
13
13
|
|
|
14
|
-
case SignatureSetType.indexed:
|
|
15
|
-
return
|
|
14
|
+
case SignatureSetType.indexed: {
|
|
15
|
+
return pubkeyCache.getOrThrow(signatureSet.index);
|
|
16
|
+
}
|
|
16
17
|
|
|
17
18
|
case SignatureSetType.aggregate: {
|
|
18
19
|
const timer = metrics?.blsThreadPool.pubkeysAggregationMainThreadDuration.startTimer();
|
|
19
|
-
const pubkeys = signatureSet.indices.map((i) =>
|
|
20
|
+
const pubkeys = signatureSet.indices.map((i) => {
|
|
21
|
+
return pubkeyCache.getOrThrow(i);
|
|
22
|
+
});
|
|
20
23
|
const aggregated = aggregatePublicKeys(pubkeys);
|
|
21
24
|
timer?.();
|
|
22
25
|
return aggregated;
|
package/src/chain/chain.ts
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import {PrivateKey} from "@libp2p/interface";
|
|
3
|
-
import {PubkeyIndexMap} from "@chainsafe/pubkey-index-map";
|
|
4
3
|
import {CompositeTypeAny, TreeView, Type} from "@chainsafe/ssz";
|
|
5
4
|
import {BeaconConfig} from "@lodestar/config";
|
|
6
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
CheckpointWithHex,
|
|
7
|
+
CheckpointWithPayloadStatus,
|
|
8
|
+
IForkChoice,
|
|
9
|
+
ProtoBlock,
|
|
10
|
+
UpdateHeadOpt,
|
|
11
|
+
} from "@lodestar/fork-choice";
|
|
7
12
|
import {LoggerNode} from "@lodestar/logger/node";
|
|
8
13
|
import {
|
|
9
14
|
BUILDER_INDEX_SELF_BUILD,
|
|
10
15
|
EFFECTIVE_BALANCE_INCREMENT,
|
|
16
|
+
ForkPostFulu,
|
|
11
17
|
GENESIS_SLOT,
|
|
12
18
|
SLOTS_PER_EPOCH,
|
|
13
19
|
isForkPostElectra,
|
|
@@ -20,7 +26,7 @@ import {
|
|
|
20
26
|
CachedBeaconStateGloas,
|
|
21
27
|
EffectiveBalanceIncrements,
|
|
22
28
|
EpochShuffling,
|
|
23
|
-
|
|
29
|
+
PubkeyCache,
|
|
24
30
|
computeAnchorCheckpoint,
|
|
25
31
|
computeAttestationsRewards,
|
|
26
32
|
computeBlockRewards,
|
|
@@ -36,6 +42,7 @@ import {
|
|
|
36
42
|
BeaconBlock,
|
|
37
43
|
BlindedBeaconBlock,
|
|
38
44
|
BlindedBeaconBlockBody,
|
|
45
|
+
DataColumnSidecars,
|
|
39
46
|
Epoch,
|
|
40
47
|
Root,
|
|
41
48
|
RootHex,
|
|
@@ -46,7 +53,6 @@ import {
|
|
|
46
53
|
ValidatorIndex,
|
|
47
54
|
Wei,
|
|
48
55
|
deneb,
|
|
49
|
-
fulu,
|
|
50
56
|
gloas,
|
|
51
57
|
isBlindedBeaconBlock,
|
|
52
58
|
phase0,
|
|
@@ -58,7 +64,7 @@ import {Logger, fromHex, gweiToWei, isErrorAborted, pruneSetToMax, sleep, toRoot
|
|
|
58
64
|
import {ProcessShutdownCallback} from "@lodestar/validator";
|
|
59
65
|
import {GENESIS_EPOCH, ZERO_HASH} from "../constants/index.js";
|
|
60
66
|
import {IBeaconDb} from "../db/index.js";
|
|
61
|
-
import {BLOB_SIDECARS_IN_WRAPPER_INDEX} from "../db/repositories/blobSidecars.
|
|
67
|
+
import {BLOB_SIDECARS_IN_WRAPPER_INDEX} from "../db/repositories/blobSidecars.js";
|
|
62
68
|
import {BuilderStatus} from "../execution/builder/http.js";
|
|
63
69
|
import {IExecutionBuilder, IExecutionEngine} from "../execution/index.js";
|
|
64
70
|
import {Metrics} from "../metrics/index.js";
|
|
@@ -69,15 +75,15 @@ import {CustodyConfig, getValidatorsCustodyRequirement} from "../util/dataColumn
|
|
|
69
75
|
import {callInNextEventLoop} from "../util/eventLoop.js";
|
|
70
76
|
import {ensureDir, writeIfNotExist} from "../util/file.js";
|
|
71
77
|
import {isOptimisticBlock} from "../util/forkChoice.js";
|
|
72
|
-
import {JobItemQueue} from "../util/queue/itemQueue.
|
|
78
|
+
import {JobItemQueue} from "../util/queue/itemQueue.js";
|
|
73
79
|
import {SerializedCache} from "../util/serializedCache.js";
|
|
74
|
-
import {getSlotFromSignedBeaconBlockSerialized} from "../util/sszBytes.
|
|
80
|
+
import {getSlotFromSignedBeaconBlockSerialized} from "../util/sszBytes.js";
|
|
75
81
|
import {ArchiveStore} from "./archiveStore/archiveStore.js";
|
|
76
82
|
import {CheckpointBalancesCache} from "./balancesCache.js";
|
|
77
83
|
import {BeaconProposerCache} from "./beaconProposerCache.js";
|
|
78
84
|
import {IBlockInput, isBlockInputBlobs, isBlockInputColumns} from "./blocks/blockInput/index.js";
|
|
79
85
|
import {BlockProcessor, ImportBlockOpts} from "./blocks/index.js";
|
|
80
|
-
import {
|
|
86
|
+
import {persistBlockInput} from "./blocks/writeBlockInputToDb.js";
|
|
81
87
|
import {BlsMultiThreadWorkerPool, BlsSingleThreadVerifier, IBlsVerifier} from "./bls/index.js";
|
|
82
88
|
import {ColumnReconstructionTracker} from "./ColumnReconstructionTracker.js";
|
|
83
89
|
import {ChainEvent, ChainEventEmitter} from "./emitter.js";
|
|
@@ -164,7 +170,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
164
170
|
readonly lightClientServer?: LightClientServer;
|
|
165
171
|
readonly reprocessController: ReprocessController;
|
|
166
172
|
readonly archiveStore: ArchiveStore;
|
|
167
|
-
readonly unfinalizedBlockWrites: JobItemQueue<[IBlockInput
|
|
173
|
+
readonly unfinalizedBlockWrites: JobItemQueue<[IBlockInput], void>;
|
|
168
174
|
|
|
169
175
|
// Ops pool
|
|
170
176
|
readonly attestationPool: AttestationPool;
|
|
@@ -191,8 +197,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
191
197
|
readonly seenBlockAttesters = new SeenBlockAttesters();
|
|
192
198
|
|
|
193
199
|
// Global state caches
|
|
194
|
-
readonly
|
|
195
|
-
readonly index2pubkey: Index2PubkeyCache;
|
|
200
|
+
readonly pubkeyCache: PubkeyCache;
|
|
196
201
|
|
|
197
202
|
readonly beaconProposerCache: BeaconProposerCache;
|
|
198
203
|
readonly checkpointBalancesCache: CheckpointBalancesCache;
|
|
@@ -238,8 +243,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
238
243
|
{
|
|
239
244
|
privateKey,
|
|
240
245
|
config,
|
|
241
|
-
|
|
242
|
-
index2pubkey,
|
|
246
|
+
pubkeyCache,
|
|
243
247
|
db,
|
|
244
248
|
dbName,
|
|
245
249
|
dataDir,
|
|
@@ -255,8 +259,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
255
259
|
}: {
|
|
256
260
|
privateKey: PrivateKey;
|
|
257
261
|
config: BeaconConfig;
|
|
258
|
-
|
|
259
|
-
index2pubkey: Index2PubkeyCache;
|
|
262
|
+
pubkeyCache: PubkeyCache;
|
|
260
263
|
db: IBeaconDb;
|
|
261
264
|
dbName: string;
|
|
262
265
|
dataDir: string;
|
|
@@ -288,8 +291,8 @@ export class BeaconChain implements IBeaconChain {
|
|
|
288
291
|
const emitter = new ChainEventEmitter();
|
|
289
292
|
// by default, verify signatures on both main threads and worker threads
|
|
290
293
|
const bls = opts.blsVerifyAllMainThread
|
|
291
|
-
? new BlsSingleThreadVerifier({metrics,
|
|
292
|
-
: new BlsMultiThreadWorkerPool(opts, {logger, metrics,
|
|
294
|
+
? new BlsSingleThreadVerifier({metrics, pubkeyCache})
|
|
295
|
+
: new BlsMultiThreadWorkerPool(opts, {logger, metrics, pubkeyCache});
|
|
293
296
|
|
|
294
297
|
if (!clock) clock = new Clock({config, genesisTime: this.genesisTime, signal});
|
|
295
298
|
|
|
@@ -317,12 +320,14 @@ export class BeaconChain implements IBeaconChain {
|
|
|
317
320
|
|
|
318
321
|
this.beaconProposerCache = new BeaconProposerCache(opts);
|
|
319
322
|
this.checkpointBalancesCache = new CheckpointBalancesCache();
|
|
323
|
+
this.serializedCache = new SerializedCache();
|
|
320
324
|
this.seenBlockInputCache = new SeenBlockInput({
|
|
321
325
|
config,
|
|
322
326
|
custodyConfig: this.custodyConfig,
|
|
323
327
|
clock,
|
|
324
328
|
chainEvents: emitter,
|
|
325
329
|
signal,
|
|
330
|
+
serializedCache: this.serializedCache,
|
|
326
331
|
metrics,
|
|
327
332
|
logger,
|
|
328
333
|
});
|
|
@@ -345,8 +350,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
345
350
|
]);
|
|
346
351
|
|
|
347
352
|
// Global cache of validators pubkey/index mapping
|
|
348
|
-
this.
|
|
349
|
-
this.index2pubkey = index2pubkey;
|
|
353
|
+
this.pubkeyCache = pubkeyCache;
|
|
350
354
|
|
|
351
355
|
const fileDataStore = opts.nHistoricalStatesFileDataStore ?? true;
|
|
352
356
|
const blockStateCache = new FIFOBlockStateCache(this.opts, {metrics});
|
|
@@ -410,8 +414,6 @@ export class BeaconChain implements IBeaconChain {
|
|
|
410
414
|
this.bls = bls;
|
|
411
415
|
this.emitter = emitter;
|
|
412
416
|
|
|
413
|
-
this.serializedCache = new SerializedCache();
|
|
414
|
-
|
|
415
417
|
this.getBlobsTracker = new GetBlobsTracker({
|
|
416
418
|
logger,
|
|
417
419
|
executionEngine: this.executionEngine,
|
|
@@ -433,7 +435,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
433
435
|
);
|
|
434
436
|
|
|
435
437
|
this.unfinalizedBlockWrites = new JobItemQueue(
|
|
436
|
-
|
|
438
|
+
persistBlockInput.bind(this),
|
|
437
439
|
{
|
|
438
440
|
maxLength: DEFAULT_MAX_PENDING_UNFINALIZED_BLOCK_WRITES,
|
|
439
441
|
signal,
|
|
@@ -604,7 +606,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
604
606
|
): Promise<{state: CachedBeaconStateAllForks | Uint8Array; executionOptimistic: boolean; finalized: boolean} | null> {
|
|
605
607
|
if (opts?.allowRegen) {
|
|
606
608
|
const state = await this.regen.getState(stateRoot, RegenCaller.restApi);
|
|
607
|
-
const block = this.forkChoice.
|
|
609
|
+
const block = this.forkChoice.getBlockDefaultStatus(state.latestBlockHeader.hashTreeRoot());
|
|
608
610
|
const finalizedEpoch = this.forkChoice.getFinalizedCheckpoint().epoch;
|
|
609
611
|
return {
|
|
610
612
|
state,
|
|
@@ -620,7 +622,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
620
622
|
// TODO: This is very inneficient for debug requests of serialized content, since it deserializes to serialize again
|
|
621
623
|
const cachedStateCtx = this.regen.getStateSync(stateRoot);
|
|
622
624
|
if (cachedStateCtx) {
|
|
623
|
-
const block = this.forkChoice.
|
|
625
|
+
const block = this.forkChoice.getBlockDefaultStatus(cachedStateCtx.latestBlockHeader.hashTreeRoot());
|
|
624
626
|
const finalizedEpoch = this.forkChoice.getFinalizedCheckpoint().epoch;
|
|
625
627
|
return {
|
|
626
628
|
state: cachedStateCtx,
|
|
@@ -654,7 +656,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
654
656
|
// finalized or justified checkpoint states maynot be available with PersistentCheckpointStateCache, use getCheckpointStateOrBytes() api to get Uint8Array
|
|
655
657
|
const cachedStateCtx = this.regen.getCheckpointStateSync(checkpoint);
|
|
656
658
|
if (cachedStateCtx) {
|
|
657
|
-
const block = this.forkChoice.
|
|
659
|
+
const block = this.forkChoice.getBlockDefaultStatus(cachedStateCtx.latestBlockHeader.hashTreeRoot());
|
|
658
660
|
const finalizedEpoch = this.forkChoice.getFinalizedCheckpoint().epoch;
|
|
659
661
|
return {
|
|
660
662
|
state: cachedStateCtx,
|
|
@@ -671,7 +673,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
671
673
|
): Promise<{state: CachedBeaconStateAllForks | Uint8Array; executionOptimistic: boolean; finalized: boolean} | null> {
|
|
672
674
|
const cachedStateCtx = await this.regen.getCheckpointStateOrBytes(checkpoint);
|
|
673
675
|
if (cachedStateCtx) {
|
|
674
|
-
const block = this.forkChoice.
|
|
676
|
+
const block = this.forkChoice.getBlockDefaultStatus(checkpoint.root);
|
|
675
677
|
const finalizedEpoch = this.forkChoice.getFinalizedCheckpoint().epoch;
|
|
676
678
|
return {
|
|
677
679
|
state: cachedStateCtx,
|
|
@@ -715,7 +717,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
715
717
|
async getBlockByRoot(
|
|
716
718
|
root: string
|
|
717
719
|
): Promise<{block: SignedBeaconBlock; executionOptimistic: boolean; finalized: boolean} | null> {
|
|
718
|
-
const block = this.forkChoice.
|
|
720
|
+
const block = this.forkChoice.getBlockHexDefaultStatus(root);
|
|
719
721
|
if (block) {
|
|
720
722
|
// Block found in fork-choice.
|
|
721
723
|
// It may be in the block input cache, awaiting full DA reconstruction, check there first
|
|
@@ -739,7 +741,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
739
741
|
async getSerializedBlockByRoot(
|
|
740
742
|
root: string
|
|
741
743
|
): Promise<{block: Uint8Array; executionOptimistic: boolean; finalized: boolean; slot: Slot} | null> {
|
|
742
|
-
const block = this.forkChoice.
|
|
744
|
+
const block = this.forkChoice.getBlockHexDefaultStatus(root);
|
|
743
745
|
if (block) {
|
|
744
746
|
// Block found in fork-choice.
|
|
745
747
|
// It may be in the block input cache, awaiting full DA reconstruction, check there first
|
|
@@ -817,7 +819,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
817
819
|
return null;
|
|
818
820
|
}
|
|
819
821
|
|
|
820
|
-
async getDataColumnSidecars(blockSlot: Slot, blockRootHex: string): Promise<
|
|
822
|
+
async getDataColumnSidecars(blockSlot: Slot, blockRootHex: string): Promise<DataColumnSidecars> {
|
|
821
823
|
const blockInput = this.seenBlockInputCache.get(blockRootHex);
|
|
822
824
|
if (blockInput) {
|
|
823
825
|
if (!isBlockInputColumns(blockInput)) {
|
|
@@ -827,10 +829,10 @@ export class BeaconChain implements IBeaconChain {
|
|
|
827
829
|
}
|
|
828
830
|
const sidecarsUnfinalized = await this.db.dataColumnSidecar.values(fromHex(blockRootHex));
|
|
829
831
|
if (sidecarsUnfinalized.length > 0) {
|
|
830
|
-
return sidecarsUnfinalized;
|
|
832
|
+
return sidecarsUnfinalized as DataColumnSidecars;
|
|
831
833
|
}
|
|
832
834
|
const sidecarsFinalized = await this.db.dataColumnSidecarArchive.values(blockSlot);
|
|
833
|
-
return sidecarsFinalized;
|
|
835
|
+
return sidecarsFinalized as DataColumnSidecars;
|
|
834
836
|
}
|
|
835
837
|
|
|
836
838
|
async getSerializedDataColumnSidecars(
|
|
@@ -852,7 +854,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
852
854
|
if (serialized) {
|
|
853
855
|
return serialized;
|
|
854
856
|
}
|
|
855
|
-
return
|
|
857
|
+
return sszTypesFor(blockInput.forkName as ForkPostFulu).DataColumnSidecar.serialize(sidecar);
|
|
856
858
|
});
|
|
857
859
|
}
|
|
858
860
|
const sidecarsUnfinalized = await this.db.dataColumnSidecar.getManyBinary(fromHex(blockRootHex), indices);
|
|
@@ -919,7 +921,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
919
921
|
RegenCaller.produceBlock
|
|
920
922
|
);
|
|
921
923
|
const proposerIndex = state.epochCtx.getBeaconProposer(slot);
|
|
922
|
-
const proposerPubKey = this.
|
|
924
|
+
const proposerPubKey = this.pubkeyCache.getOrThrow(proposerIndex).toBytes();
|
|
923
925
|
|
|
924
926
|
const {body, produceResult, executionPayloadValue, shouldOverrideBuilder} = await produceBlockBody.call(
|
|
925
927
|
this,
|
|
@@ -1190,7 +1192,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
1190
1192
|
* @param blockState state that declares justified checkpoint `checkpoint`
|
|
1191
1193
|
*/
|
|
1192
1194
|
private justifiedBalancesGetter(
|
|
1193
|
-
checkpoint:
|
|
1195
|
+
checkpoint: CheckpointWithPayloadStatus,
|
|
1194
1196
|
blockState: CachedBeaconStateAllForks
|
|
1195
1197
|
): EffectiveBalanceIncrements {
|
|
1196
1198
|
this.metrics?.balancesCache.requests.inc();
|
|
@@ -1229,7 +1231,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
1229
1231
|
* @param blockState state that declares justified checkpoint `checkpoint`
|
|
1230
1232
|
*/
|
|
1231
1233
|
private closestJustifiedBalancesStateToCheckpoint(
|
|
1232
|
-
checkpoint:
|
|
1234
|
+
checkpoint: CheckpointWithPayloadStatus,
|
|
1233
1235
|
blockState: CachedBeaconStateAllForks
|
|
1234
1236
|
): {state: CachedBeaconStateAllForks; stateId: string; shouldWarn: boolean} {
|
|
1235
1237
|
const state = this.regen.getCheckpointStateSync(checkpoint);
|
|
@@ -1243,7 +1245,10 @@ export class BeaconChain implements IBeaconChain {
|
|
|
1243
1245
|
}
|
|
1244
1246
|
|
|
1245
1247
|
// Find a state in the same branch of checkpoint at same epoch. Balances should exactly the same
|
|
1246
|
-
for (const descendantBlock of this.forkChoice.forwardIterateDescendants(
|
|
1248
|
+
for (const descendantBlock of this.forkChoice.forwardIterateDescendants(
|
|
1249
|
+
checkpoint.rootHex,
|
|
1250
|
+
checkpoint.payloadStatus
|
|
1251
|
+
)) {
|
|
1247
1252
|
if (computeEpochAtSlot(descendantBlock.slot) === checkpoint.epoch) {
|
|
1248
1253
|
const descendantBlockState = this.regen.getStateSync(descendantBlock.stateRoot);
|
|
1249
1254
|
if (descendantBlockState) {
|
|
@@ -1259,7 +1264,10 @@ export class BeaconChain implements IBeaconChain {
|
|
|
1259
1264
|
|
|
1260
1265
|
// Find a state in the same branch of checkpoint at a latter epoch. Balances are not the same, but should be close
|
|
1261
1266
|
// Note: must call .forwardIterateDescendants() again since nodes are not sorted
|
|
1262
|
-
for (const descendantBlock of this.forkChoice.forwardIterateDescendants(
|
|
1267
|
+
for (const descendantBlock of this.forkChoice.forwardIterateDescendants(
|
|
1268
|
+
checkpoint.rootHex,
|
|
1269
|
+
checkpoint.payloadStatus
|
|
1270
|
+
)) {
|
|
1263
1271
|
if (computeEpochAtSlot(descendantBlock.slot) > checkpoint.epoch) {
|
|
1264
1272
|
const descendantBlockState = this.regen.getStateSync(descendantBlock.stateRoot);
|
|
1265
1273
|
if (descendantBlockState) {
|
|
@@ -1535,7 +1543,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
1535
1543
|
throw Error(`State is not in cache for slot ${slot}`);
|
|
1536
1544
|
}
|
|
1537
1545
|
|
|
1538
|
-
const rewards = await computeAttestationsRewards(this.config, this.
|
|
1546
|
+
const rewards = await computeAttestationsRewards(this.config, this.pubkeyCache, cachedState, validatorIds);
|
|
1539
1547
|
|
|
1540
1548
|
return {rewards, executionOptimistic, finalized};
|
|
1541
1549
|
}
|
|
@@ -1552,6 +1560,6 @@ export class BeaconChain implements IBeaconChain {
|
|
|
1552
1560
|
|
|
1553
1561
|
preState = processSlots(preState, block.slot); // Dial preState's slot to block.slot
|
|
1554
1562
|
|
|
1555
|
-
return computeSyncCommitteeRewards(this.config, this.
|
|
1563
|
+
return computeSyncCommitteeRewards(this.config, this.pubkeyCache, block, preState, validatorIds);
|
|
1556
1564
|
}
|
|
1557
1565
|
}
|
package/src/chain/emitter.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {EventEmitter} from "node:events";
|
|
2
2
|
import {StrictEventEmitter} from "strict-event-emitter-types";
|
|
3
3
|
import {routes} from "@lodestar/api";
|
|
4
|
-
import {
|
|
4
|
+
import {CheckpointWithPayloadStatus} from "@lodestar/fork-choice";
|
|
5
5
|
import {CachedBeaconStateAllForks} from "@lodestar/state-transition";
|
|
6
|
-
import {
|
|
6
|
+
import {DataColumnSidecars, RootHex, deneb, phase0} from "@lodestar/types";
|
|
7
7
|
import {PeerIdStr} from "../util/peerId.js";
|
|
8
8
|
import {BlockInputSource, IBlockInput} from "./blocks/blockInput/types.js";
|
|
9
9
|
|
|
@@ -83,12 +83,12 @@ export type ChainEventData = {
|
|
|
83
83
|
export type IChainEvents = ApiEvents & {
|
|
84
84
|
[ChainEvent.checkpoint]: (checkpoint: phase0.Checkpoint, state: CachedBeaconStateAllForks) => void;
|
|
85
85
|
|
|
86
|
-
[ChainEvent.forkChoiceJustified]: (checkpoint:
|
|
87
|
-
[ChainEvent.forkChoiceFinalized]: (checkpoint:
|
|
86
|
+
[ChainEvent.forkChoiceJustified]: (checkpoint: CheckpointWithPayloadStatus) => void;
|
|
87
|
+
[ChainEvent.forkChoiceFinalized]: (checkpoint: CheckpointWithPayloadStatus) => void;
|
|
88
88
|
|
|
89
89
|
[ChainEvent.updateTargetCustodyGroupCount]: (targetGroupCount: number) => void;
|
|
90
90
|
|
|
91
|
-
[ChainEvent.publishDataColumns]: (sidecars:
|
|
91
|
+
[ChainEvent.publishDataColumns]: (sidecars: DataColumnSidecars) => void;
|
|
92
92
|
|
|
93
93
|
[ChainEvent.publishBlobSidecars]: (sidecars: deneb.BlobSidecar[]) => void;
|
|
94
94
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {BuilderIndex, RootHex, Slot} from "@lodestar/types";
|
|
2
|
-
import {GossipActionError} from "./gossipValidation.
|
|
2
|
+
import {GossipActionError} from "./gossipValidation.js";
|
|
3
3
|
|
|
4
4
|
export enum ExecutionPayloadBidErrorCode {
|
|
5
5
|
BUILDER_NOT_ELIGIBLE = "EXECUTION_PAYLOAD_BID_ERROR_BUILDER_NOT_ELIGIBLE",
|
|
@@ -25,9 +25,13 @@ export type ExecutionPayloadEnvelopeErrorType =
|
|
|
25
25
|
| {
|
|
26
26
|
code: ExecutionPayloadEnvelopeErrorCode.BUILDER_INDEX_MISMATCH;
|
|
27
27
|
envelopeBuilderIndex: BuilderIndex;
|
|
28
|
-
bidBuilderIndex: BuilderIndex;
|
|
28
|
+
bidBuilderIndex: BuilderIndex | null;
|
|
29
|
+
}
|
|
30
|
+
| {
|
|
31
|
+
code: ExecutionPayloadEnvelopeErrorCode.BLOCK_HASH_MISMATCH;
|
|
32
|
+
envelopeBlockHash: RootHex;
|
|
33
|
+
bidBlockHash: RootHex | null;
|
|
29
34
|
}
|
|
30
|
-
| {code: ExecutionPayloadEnvelopeErrorCode.BLOCK_HASH_MISMATCH; envelopeBlockHash: RootHex; bidBlockHash: RootHex}
|
|
31
35
|
| {code: ExecutionPayloadEnvelopeErrorCode.INVALID_SIGNATURE}
|
|
32
36
|
| {code: ExecutionPayloadEnvelopeErrorCode.CACHE_FAIL; blockRoot: RootHex};
|
|
33
37
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {RootHex, Slot, ValidatorIndex} from "@lodestar/types";
|
|
2
|
-
import {GossipActionError} from "./gossipValidation.
|
|
2
|
+
import {GossipActionError} from "./gossipValidation.js";
|
|
3
3
|
|
|
4
4
|
export enum PayloadAttestationErrorCode {
|
|
5
5
|
NOT_CURRENT_SLOT = "PAYLOAD_ATTESTATION_ERROR_NOT_CURRENT_SLOT",
|
|
@@ -4,9 +4,11 @@ import {
|
|
|
4
4
|
ForkChoice,
|
|
5
5
|
ForkChoiceStore,
|
|
6
6
|
JustifiedBalancesGetter,
|
|
7
|
+
PayloadStatus,
|
|
7
8
|
ProtoArray,
|
|
8
9
|
ProtoBlock,
|
|
9
10
|
ForkChoiceOpts as RawForkChoiceOpts,
|
|
11
|
+
getCheckpointPayloadStatus,
|
|
10
12
|
} from "@lodestar/fork-choice";
|
|
11
13
|
import {ZERO_HASH_HEX} from "@lodestar/params";
|
|
12
14
|
import {
|
|
@@ -104,6 +106,14 @@ export function initializeForkChoiceFromFinalizedState(
|
|
|
104
106
|
// production code use ForkChoice constructor directly
|
|
105
107
|
const forkchoiceConstructor = opts.forkchoiceConstructor ?? ForkChoice;
|
|
106
108
|
|
|
109
|
+
const isForkPostGloas = (state as CachedBeaconStateGloas).latestBlockHash !== undefined;
|
|
110
|
+
|
|
111
|
+
// Determine justified checkpoint payload status
|
|
112
|
+
const justifiedPayloadStatus = getCheckpointPayloadStatus(state, justifiedCheckpoint.epoch);
|
|
113
|
+
|
|
114
|
+
// Determine finalized checkpoint payload status
|
|
115
|
+
const finalizedPayloadStatus = getCheckpointPayloadStatus(state, finalizedCheckpoint.epoch);
|
|
116
|
+
|
|
107
117
|
return new forkchoiceConstructor(
|
|
108
118
|
config,
|
|
109
119
|
|
|
@@ -113,6 +123,8 @@ export function initializeForkChoiceFromFinalizedState(
|
|
|
113
123
|
finalizedCheckpoint,
|
|
114
124
|
justifiedBalances,
|
|
115
125
|
justifiedBalancesGetter,
|
|
126
|
+
justifiedPayloadStatus,
|
|
127
|
+
finalizedPayloadStatus,
|
|
116
128
|
{
|
|
117
129
|
onJustified: (cp) => emitter.emit(ChainEvent.forkChoiceJustified, cp),
|
|
118
130
|
onFinalized: (cp) => emitter.emit(ChainEvent.forkChoiceFinalized, cp),
|
|
@@ -145,15 +157,12 @@ export function initializeForkChoiceFromFinalizedState(
|
|
|
145
157
|
: {executionPayloadBlockHash: null, executionStatus: ExecutionStatus.PreMerge}),
|
|
146
158
|
|
|
147
159
|
dataAvailabilityStatus: DataAvailabilityStatus.PreData,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
builderIndex: (state as CachedBeaconStateGloas).latestExecutionPayloadBid.builderIndex,
|
|
155
|
-
blockHashHex: toRootHex((state as CachedBeaconStateGloas).latestExecutionPayloadBid.blockHash),
|
|
156
|
-
}),
|
|
160
|
+
payloadStatus: isForkPostGloas ? PayloadStatus.PENDING : PayloadStatus.FULL, // TODO GLOAS: Post-gloas how do we know if the checkpoint payload is FULL or EMPTY?
|
|
161
|
+
builderIndex: isForkPostGloas ? (state as CachedBeaconStateGloas).latestExecutionPayloadBid.builderIndex : null,
|
|
162
|
+
blockHashFromBid: isForkPostGloas
|
|
163
|
+
? toRootHex((state as CachedBeaconStateGloas).latestExecutionPayloadBid.blockHash)
|
|
164
|
+
: null,
|
|
165
|
+
parentBlockHash: isForkPostGloas ? toRootHex((state as CachedBeaconStateGloas).latestBlockHash) : null,
|
|
157
166
|
},
|
|
158
167
|
currentSlot
|
|
159
168
|
),
|
|
@@ -196,12 +205,22 @@ export function initializeForkChoiceFromUnfinalizedState(
|
|
|
196
205
|
|
|
197
206
|
// this is not the justified state, but there is no other ways to get justified balances
|
|
198
207
|
const justifiedBalances = getEffectiveBalanceIncrementsZeroInactive(unfinalizedState);
|
|
208
|
+
|
|
209
|
+
const isForkPostGloas = (unfinalizedState as CachedBeaconStateGloas).latestBlockHash !== undefined;
|
|
210
|
+
|
|
211
|
+
// For unfinalized state, use getCheckpointPayloadStatus to determine the correct status.
|
|
212
|
+
// It checks state.execution_payload_availability to determine EMPTY vs FULL.
|
|
213
|
+
const justifiedPayloadStatus = getCheckpointPayloadStatus(unfinalizedState, justifiedCheckpoint.epoch);
|
|
214
|
+
const finalizedPayloadStatus = getCheckpointPayloadStatus(unfinalizedState, finalizedCheckpoint.epoch);
|
|
215
|
+
|
|
199
216
|
const store = new ForkChoiceStore(
|
|
200
217
|
currentSlot,
|
|
201
218
|
justifiedCheckpoint,
|
|
202
219
|
finalizedCheckpoint,
|
|
203
220
|
justifiedBalances,
|
|
204
221
|
justifiedBalancesGetter,
|
|
222
|
+
justifiedPayloadStatus,
|
|
223
|
+
finalizedPayloadStatus,
|
|
205
224
|
{
|
|
206
225
|
onJustified: (cp) => emitter.emit(ChainEvent.forkChoiceJustified, cp),
|
|
207
226
|
onFinalized: (cp) => emitter.emit(ChainEvent.forkChoiceFinalized, cp),
|
|
@@ -235,15 +254,14 @@ export function initializeForkChoiceFromUnfinalizedState(
|
|
|
235
254
|
: {executionPayloadBlockHash: null, executionStatus: ExecutionStatus.PreMerge}),
|
|
236
255
|
|
|
237
256
|
dataAvailabilityStatus: DataAvailabilityStatus.PreData,
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}),
|
|
257
|
+
payloadStatus: isForkPostGloas ? PayloadStatus.PENDING : PayloadStatus.FULL, // TODO GLOAS: Post-gloas how do we know if the checkpoint payload is FULL or EMPTY?
|
|
258
|
+
builderIndex: isForkPostGloas
|
|
259
|
+
? (unfinalizedState as CachedBeaconStateGloas).latestExecutionPayloadBid.builderIndex
|
|
260
|
+
: null,
|
|
261
|
+
blockHashFromBid: isForkPostGloas
|
|
262
|
+
? toRootHex((unfinalizedState as CachedBeaconStateGloas).latestExecutionPayloadBid.blockHash)
|
|
263
|
+
: null,
|
|
264
|
+
parentBlockHash: isForkPostGloas ? toRootHex((unfinalizedState as CachedBeaconStateGloas).latestBlockHash) : null,
|
|
247
265
|
};
|
|
248
266
|
|
|
249
267
|
const parentSlot = blockHeader.slot - 1;
|
|
@@ -285,9 +303,9 @@ export function initializeForkChoiceFromUnfinalizedState(
|
|
|
285
303
|
};
|
|
286
304
|
|
|
287
305
|
const protoArray = ProtoArray.initialize(finalizedBlock, currentSlot);
|
|
288
|
-
protoArray.onBlock(justifiedBlock, currentSlot);
|
|
289
|
-
protoArray.onBlock(parentBlock, currentSlot);
|
|
290
|
-
protoArray.onBlock(headBlock, currentSlot);
|
|
306
|
+
protoArray.onBlock(justifiedBlock, currentSlot, null);
|
|
307
|
+
protoArray.onBlock(parentBlock, currentSlot, null);
|
|
308
|
+
protoArray.onBlock(headBlock, currentSlot, null);
|
|
291
309
|
|
|
292
310
|
logger?.verbose("Initialized protoArray successfully", {...logCtx, length: protoArray.length()});
|
|
293
311
|
|