@lodestar/beacon-node 1.41.0-dev.9fa839a030 → 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 +123 -4
- 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 +19 -2
- 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 +134 -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 +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 -6
- 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 +2 -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 -95
- 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 +45 -28
- 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 +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/options.d.ts.map +1 -1
- package/lib/chain/options.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 +3 -3
- package/lib/chain/prepareNextSlot.js.map +1 -1
- package/lib/chain/produceBlock/computeNewStateRoot.d.ts +9 -2
- package/lib/chain/produceBlock/computeNewStateRoot.d.ts.map +1 -1
- package/lib/chain/produceBlock/computeNewStateRoot.js +25 -2
- package/lib/chain/produceBlock/computeNewStateRoot.js.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.d.ts +23 -8
- package/lib/chain/produceBlock/produceBlockBody.d.ts.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.js +115 -13
- 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.d.ts +2 -2
- package/lib/chain/validation/dataColumnSidecar.d.ts.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 +1 -0
- package/lib/metrics/metrics/beacon.d.ts.map +1 -1
- package/lib/metrics/metrics/beacon.js +5 -0
- package/lib/metrics/metrics/beacon.js.map +1 -1
- package/lib/metrics/metrics/lodestar.d.ts +16 -6
- package/lib/metrics/metrics/lodestar.d.ts.map +1 -1
- package/lib/metrics/metrics/lodestar.js +32 -10
- package/lib/metrics/metrics/lodestar.js.map +1 -1
- package/lib/metrics/metrics.d.ts.map +1 -1
- package/lib/metrics/metrics.js +8 -3
- 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 +6 -6
- 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 +3166 -3169
- package/lib/network/gossip/topic.d.ts.map +1 -1
- package/lib/network/gossip/topic.js +2 -2
- package/lib/network/gossip/topic.js.map +1 -1
- package/lib/network/interface.d.ts +6 -5
- 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 +6 -5
- package/lib/network/network.d.ts.map +1 -1
- package/lib/network/network.js +11 -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 +9 -2
- 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.d.ts.map +1 -1
- package/lib/network/reqresp/handlers/lightClientUpdatesByRange.js +7 -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 +11 -3
- package/lib/util/dataColumns.d.ts.map +1 -1
- package/lib/util/dataColumns.js +31 -2
- package/lib/util/dataColumns.js.map +1 -1
- package/lib/util/dependentRoot.js.map +1 -1
- package/lib/util/enum.js.map +1 -1
- package/lib/util/error.js.map +1 -1
- package/lib/util/eventLoop.js.map +1 -1
- package/lib/util/execution.js +2 -1
- package/lib/util/execution.js.map +1 -1
- package/lib/util/file.js.map +1 -1
- package/lib/util/forkChoice.js.map +1 -1
- package/lib/util/forkName.js.map +1 -1
- package/lib/util/graffiti.js.map +1 -1
- package/lib/util/hex.js.map +1 -1
- package/lib/util/ip.js.map +1 -1
- package/lib/util/itTrigger.d.ts.map +1 -1
- package/lib/util/itTrigger.js.map +1 -1
- package/lib/util/map.d.ts.map +1 -1
- package/lib/util/map.js.map +1 -1
- package/lib/util/metadata.js.map +1 -1
- package/lib/util/multifork.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 +7 -2
- package/lib/util/serializedCache.d.ts.map +1 -1
- package/lib/util/serializedCache.js +9 -2
- 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 +147 -3
- 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/lightclient/index.ts +19 -2
- package/src/api/impl/node/utils.ts +3 -3
- package/src/api/impl/validator/index.ts +153 -17
- 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 -7
- package/src/chain/blocks/index.ts +2 -1
- 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 -101
- 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 +82 -45
- 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/lightClient/index.ts +4 -1
- package/src/chain/opPools/aggregatedAttestationPool.ts +1 -1
- package/src/chain/options.ts +1 -0
- package/src/chain/prepareNextSlot.ts +5 -5
- package/src/chain/produceBlock/computeNewStateRoot.ts +36 -3
- package/src/chain/produceBlock/produceBlockBody.ts +162 -13
- 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 +3 -6
- 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/beacon.ts +5 -0
- package/src/metrics/metrics/lodestar.ts +32 -10
- package/src/metrics/metrics.ts +8 -3
- 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 +6 -6
- package/src/network/gossip/scoringParameters.ts +4 -4
- package/src/network/gossip/topic.ts +2 -1
- package/src/network/interface.ts +7 -4
- package/src/network/libp2p/index.ts +8 -3
- package/src/network/network.ts +26 -7
- 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 +19 -4
- 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/handlers/lightClientUpdatesByRange.ts +6 -1
- 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 +37 -1
- package/src/util/multifork.ts +45 -0
- package/src/util/serializedCache.ts +10 -3
- package/src/util/workerEvents.ts +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {routes} from "@lodestar/api";
|
|
2
2
|
import {ChainForkConfig} from "@lodestar/config";
|
|
3
3
|
import {getSafeExecutionBlockHash} from "@lodestar/fork-choice";
|
|
4
|
-
import {ForkPostBellatrix, ForkSeq, SLOTS_PER_EPOCH} from "@lodestar/params";
|
|
4
|
+
import {ForkPostBellatrix, ForkSeq, SLOTS_PER_EPOCH, isForkPostBellatrix} from "@lodestar/params";
|
|
5
5
|
import {
|
|
6
6
|
CachedBeaconStateAllForks,
|
|
7
7
|
CachedBeaconStateExecutions,
|
|
8
|
+
CachedBeaconStateGloas,
|
|
8
9
|
StateHashTreeRootSource,
|
|
9
10
|
computeEpochAtSlot,
|
|
10
11
|
computeTimeAtSlot,
|
|
11
|
-
isExecutionStateType,
|
|
12
12
|
} from "@lodestar/state-transition";
|
|
13
13
|
import {Slot} from "@lodestar/types";
|
|
14
14
|
import {Logger, fromHex, isErrorAborted, sleep} from "@lodestar/utils";
|
|
@@ -120,10 +120,10 @@ export class PrepareNextSlotScheduler {
|
|
|
120
120
|
RegenCaller.precomputeEpoch
|
|
121
121
|
);
|
|
122
122
|
|
|
123
|
-
if (
|
|
123
|
+
if (isForkPostBellatrix(fork)) {
|
|
124
124
|
const proposerIndex = prepareState.epochCtx.getBeaconProposer(prepareSlot);
|
|
125
125
|
const feeRecipient = this.chain.beaconProposerCache.get(proposerIndex);
|
|
126
|
-
let updatedPrepareState = prepareState;
|
|
126
|
+
let updatedPrepareState = prepareState as CachedBeaconStateExecutions | CachedBeaconStateGloas;
|
|
127
127
|
let updatedHeadRoot = headRoot;
|
|
128
128
|
|
|
129
129
|
if (feeRecipient) {
|
|
@@ -146,7 +146,7 @@ export class PrepareNextSlotScheduler {
|
|
|
146
146
|
// only transfer cache if epoch transition because that's the state we will use to stateTransition() the 1st block of epoch
|
|
147
147
|
{dontTransferCache: !isEpochTransition},
|
|
148
148
|
RegenCaller.predictProposerHead
|
|
149
|
-
)) as CachedBeaconStateExecutions;
|
|
149
|
+
)) as CachedBeaconStateExecutions | CachedBeaconStateGloas;
|
|
150
150
|
updatedHeadRoot = proposerHeadRoot;
|
|
151
151
|
}
|
|
152
152
|
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CachedBeaconStateAllForks,
|
|
3
|
+
CachedBeaconStateGloas,
|
|
3
4
|
DataAvailabilityStatus,
|
|
4
5
|
ExecutionPayloadStatus,
|
|
6
|
+
G2_POINT_AT_INFINITY,
|
|
5
7
|
StateHashTreeRootSource,
|
|
6
8
|
stateTransition,
|
|
7
9
|
} from "@lodestar/state-transition";
|
|
8
|
-
import {
|
|
10
|
+
import {processExecutionPayloadEnvelope} from "@lodestar/state-transition/block";
|
|
11
|
+
import {BeaconBlock, BlindedBeaconBlock, Gwei, Root, gloas} from "@lodestar/types";
|
|
9
12
|
import {ZERO_HASH} from "../../constants/index.js";
|
|
10
13
|
import {Metrics} from "../../metrics/index.js";
|
|
11
14
|
|
|
@@ -18,7 +21,7 @@ export function computeNewStateRoot(
|
|
|
18
21
|
metrics: Metrics | null,
|
|
19
22
|
state: CachedBeaconStateAllForks,
|
|
20
23
|
block: BeaconBlock | BlindedBeaconBlock
|
|
21
|
-
): {newStateRoot: Root; proposerReward: Gwei} {
|
|
24
|
+
): {newStateRoot: Root; proposerReward: Gwei; postState: CachedBeaconStateAllForks} {
|
|
22
25
|
// Set signature to zero to re-use stateTransition() function which requires the SignedBeaconBlock type
|
|
23
26
|
const blockEmptySig = {message: block, signature: ZERO_HASH};
|
|
24
27
|
|
|
@@ -51,5 +54,35 @@ export function computeNewStateRoot(
|
|
|
51
54
|
const newStateRoot = postState.hashTreeRoot();
|
|
52
55
|
hashTreeRootTimer?.();
|
|
53
56
|
|
|
54
|
-
return {newStateRoot, proposerReward};
|
|
57
|
+
return {newStateRoot, proposerReward, postState};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Compute the state root after processing an execution payload envelope.
|
|
62
|
+
* Similar to `computeNewStateRoot` but for payload envelope processing.
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
65
|
+
export function computeEnvelopeStateRoot(
|
|
66
|
+
metrics: Metrics | null,
|
|
67
|
+
postBlockState: CachedBeaconStateGloas,
|
|
68
|
+
envelope: gloas.ExecutionPayloadEnvelope
|
|
69
|
+
): Root {
|
|
70
|
+
const signedEnvelope: gloas.SignedExecutionPayloadEnvelope = {
|
|
71
|
+
message: envelope,
|
|
72
|
+
signature: G2_POINT_AT_INFINITY,
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const processEnvelopeTimer = metrics?.blockPayload.executionPayloadEnvelopeProcessingTime.startTimer();
|
|
76
|
+
const postEnvelopeState = processExecutionPayloadEnvelope(postBlockState, signedEnvelope, false, {
|
|
77
|
+
dontTransferCache: true,
|
|
78
|
+
});
|
|
79
|
+
processEnvelopeTimer?.();
|
|
80
|
+
|
|
81
|
+
const hashTreeRootTimer = metrics?.stateHashTreeRootTime.startTimer({
|
|
82
|
+
source: StateHashTreeRootSource.computeEnvelopeStateRoot,
|
|
83
|
+
});
|
|
84
|
+
const stateRoot = postEnvelopeState.hashTreeRoot();
|
|
85
|
+
hashTreeRootTimer?.();
|
|
86
|
+
|
|
87
|
+
return stateRoot;
|
|
55
88
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import {ChainForkConfig} from "@lodestar/config";
|
|
2
|
-
import {ProtoBlock, getSafeExecutionBlockHash} from "@lodestar/fork-choice";
|
|
2
|
+
import {IForkChoice, ProtoBlock, getSafeExecutionBlockHash} from "@lodestar/fork-choice";
|
|
3
3
|
import {
|
|
4
|
+
BUILDER_INDEX_SELF_BUILD,
|
|
4
5
|
ForkName,
|
|
5
6
|
ForkPostBellatrix,
|
|
7
|
+
ForkPostCapella,
|
|
6
8
|
ForkPostDeneb,
|
|
7
9
|
ForkPostFulu,
|
|
10
|
+
ForkPostGloas,
|
|
8
11
|
ForkPreGloas,
|
|
9
12
|
ForkSeq,
|
|
10
13
|
isForkPostAltair,
|
|
@@ -16,6 +19,8 @@ import {
|
|
|
16
19
|
CachedBeaconStateBellatrix,
|
|
17
20
|
CachedBeaconStateCapella,
|
|
18
21
|
CachedBeaconStateExecutions,
|
|
22
|
+
CachedBeaconStateGloas,
|
|
23
|
+
G2_POINT_AT_INFINITY,
|
|
19
24
|
computeTimeAtSlot,
|
|
20
25
|
getExpectedWithdrawals,
|
|
21
26
|
getRandaoMix,
|
|
@@ -42,6 +47,7 @@ import {
|
|
|
42
47
|
deneb,
|
|
43
48
|
electra,
|
|
44
49
|
fulu,
|
|
50
|
+
gloas,
|
|
45
51
|
} from "@lodestar/types";
|
|
46
52
|
import {Logger, fromHex, sleep, toHex, toPubkeyHex, toRootHex} from "@lodestar/utils";
|
|
47
53
|
import {ZERO_HASH_HEX} from "../../constants/index.js";
|
|
@@ -99,6 +105,20 @@ export type AssembledBodyType<T extends BlockType> = T extends BlockType.Full
|
|
|
99
105
|
: BlindedBeaconBlockBody;
|
|
100
106
|
export type AssembledBlockType<T extends BlockType> = T extends BlockType.Full ? BeaconBlock : BlindedBeaconBlock;
|
|
101
107
|
|
|
108
|
+
export type ProduceFullGloas = {
|
|
109
|
+
type: BlockType.Full;
|
|
110
|
+
fork: ForkPostGloas;
|
|
111
|
+
executionPayload: ExecutionPayload<ForkPostGloas>;
|
|
112
|
+
executionRequests: electra.ExecutionRequests;
|
|
113
|
+
blobsBundle: BlobsBundle<ForkPostGloas>;
|
|
114
|
+
cells: fulu.Cell[][];
|
|
115
|
+
/**
|
|
116
|
+
* Cached envelope state root computed during block production.
|
|
117
|
+
* This is the state root after running `processExecutionPayloadEnvelope` on the
|
|
118
|
+
* post-block state, and later used to construct the `ExecutionPayloadEnvelope`.
|
|
119
|
+
*/
|
|
120
|
+
envelopeStateRoot: Root;
|
|
121
|
+
};
|
|
102
122
|
export type ProduceFullFulu = {
|
|
103
123
|
type: BlockType.Full;
|
|
104
124
|
fork: ForkPostFulu;
|
|
@@ -131,6 +151,7 @@ export type ProduceBlinded = {
|
|
|
131
151
|
|
|
132
152
|
/** The result of local block production, everything that's not the block itself */
|
|
133
153
|
export type ProduceResult =
|
|
154
|
+
| ProduceFullGloas
|
|
134
155
|
| ProduceFullFulu
|
|
135
156
|
| ProduceFullDeneb
|
|
136
157
|
| ProduceFullBellatrix
|
|
@@ -180,12 +201,112 @@ export async function produceBlockBody<T extends BlockType>(
|
|
|
180
201
|
this.logger.verbose("Producing beacon block body", logMeta);
|
|
181
202
|
|
|
182
203
|
if (isForkPostGloas(fork)) {
|
|
183
|
-
// TODO GLOAS:
|
|
204
|
+
// TODO GLOAS: support non self-building here, the block type differentiation between
|
|
205
|
+
// full and blinded no longer makes sense in gloas, it might be a good idea to move
|
|
206
|
+
// this into a completely separate function and have pre/post gloas more separated
|
|
207
|
+
const gloasState = currentState as CachedBeaconStateGloas;
|
|
208
|
+
const safeBlockHash = getSafeExecutionBlockHash(this.forkChoice);
|
|
209
|
+
const finalizedBlockHash = this.forkChoice.getFinalizedBlock().executionPayloadBlockHash ?? ZERO_HASH_HEX;
|
|
210
|
+
const feeRecipient = requestedFeeRecipient ?? this.beaconProposerCache.getOrDefault(proposerIndex);
|
|
211
|
+
|
|
212
|
+
const endExecutionPayload = this.metrics?.executionBlockProductionTimeSteps.startTimer();
|
|
213
|
+
|
|
214
|
+
this.logger.verbose("Preparing execution payload from engine", {
|
|
215
|
+
slot: blockSlot,
|
|
216
|
+
parentBlockRoot: toRootHex(parentBlockRoot),
|
|
217
|
+
feeRecipient,
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
// Get execution payload from EL
|
|
221
|
+
const prepareRes = await prepareExecutionPayload(
|
|
222
|
+
this,
|
|
223
|
+
this.logger,
|
|
224
|
+
fork,
|
|
225
|
+
parentBlockRoot,
|
|
226
|
+
safeBlockHash,
|
|
227
|
+
finalizedBlockHash ?? ZERO_HASH_HEX,
|
|
228
|
+
gloasState,
|
|
229
|
+
feeRecipient
|
|
230
|
+
);
|
|
231
|
+
|
|
232
|
+
const {prepType, payloadId} = prepareRes;
|
|
233
|
+
Object.assign(logMeta, {executionPayloadPrepType: prepType});
|
|
234
|
+
|
|
235
|
+
if (prepType !== PayloadPreparationType.Cached) {
|
|
236
|
+
await sleep(PAYLOAD_GENERATION_TIME_MS);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
this.logger.verbose("Fetching execution payload from engine", {slot: blockSlot, payloadId});
|
|
240
|
+
const payloadRes = await this.executionEngine.getPayload(fork, payloadId);
|
|
241
|
+
|
|
242
|
+
endExecutionPayload?.({step: BlockProductionStep.executionPayload});
|
|
243
|
+
|
|
244
|
+
const {executionPayload, blobsBundle, executionRequests} = payloadRes;
|
|
245
|
+
executionPayloadValue = payloadRes.executionPayloadValue;
|
|
246
|
+
shouldOverrideBuilder = payloadRes.shouldOverrideBuilder;
|
|
247
|
+
|
|
248
|
+
if (blobsBundle === undefined) {
|
|
249
|
+
throw Error(`Missing blobsBundle response from getPayload at fork=${fork}`);
|
|
250
|
+
}
|
|
251
|
+
if (executionRequests === undefined) {
|
|
252
|
+
throw Error(`Missing executionRequests response from getPayload at fork=${fork}`);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
const cells = blobsBundle.blobs.map((blob) => kzg.computeCells(blob));
|
|
256
|
+
if (this.opts.sanityCheckExecutionEngineBlobs) {
|
|
257
|
+
await validateCellsAndKzgCommitments(blobsBundle.commitments, blobsBundle.proofs, cells);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// Create self-build execution payload bid
|
|
261
|
+
const bid: gloas.ExecutionPayloadBid = {
|
|
262
|
+
parentBlockHash: gloasState.latestBlockHash,
|
|
263
|
+
parentBlockRoot: parentBlockRoot,
|
|
264
|
+
blockHash: executionPayload.blockHash,
|
|
265
|
+
prevRandao: getRandaoMix(gloasState, gloasState.epochCtx.epoch),
|
|
266
|
+
feeRecipient: executionPayload.feeRecipient,
|
|
267
|
+
gasLimit: BigInt(executionPayload.gasLimit),
|
|
268
|
+
builderIndex: BUILDER_INDEX_SELF_BUILD,
|
|
269
|
+
slot: blockSlot,
|
|
270
|
+
value: 0,
|
|
271
|
+
executionPayment: 0,
|
|
272
|
+
blobKzgCommitments: blobsBundle.commitments,
|
|
273
|
+
};
|
|
274
|
+
const signedBid: gloas.SignedExecutionPayloadBid = {
|
|
275
|
+
message: bid,
|
|
276
|
+
signature: G2_POINT_AT_INFINITY,
|
|
277
|
+
};
|
|
278
|
+
|
|
184
279
|
const commonBlockBody = await commonBlockBodyPromise;
|
|
185
|
-
|
|
186
|
-
|
|
280
|
+
const gloasBody = Object.assign({}, commonBlockBody) as gloas.BeaconBlockBody;
|
|
281
|
+
gloasBody.signedExecutionPayloadBid = signedBid;
|
|
282
|
+
// TODO GLOAS: Get payload attestations from pool for previous slot
|
|
283
|
+
gloasBody.payloadAttestations = [];
|
|
284
|
+
blockBody = gloasBody as AssembledBodyType<T>;
|
|
285
|
+
|
|
286
|
+
// Store execution payload data required to construct execution payload envelope later
|
|
287
|
+
const gloasResult = produceResult as ProduceFullGloas;
|
|
288
|
+
gloasResult.executionPayload = executionPayload as ExecutionPayload<ForkPostGloas>;
|
|
289
|
+
gloasResult.executionRequests = executionRequests;
|
|
290
|
+
gloasResult.blobsBundle = blobsBundle;
|
|
291
|
+
gloasResult.cells = cells;
|
|
292
|
+
|
|
293
|
+
const fetchedTime = Date.now() / 1000 - computeTimeAtSlot(this.config, blockSlot, this.genesisTime);
|
|
294
|
+
this.metrics?.blockPayload.payloadFetchedTime.observe({prepType}, fetchedTime);
|
|
295
|
+
this.logger.verbose("Produced block with self-build bid", {
|
|
296
|
+
slot: blockSlot,
|
|
297
|
+
executionPayloadValue,
|
|
298
|
+
prepType,
|
|
299
|
+
payloadId,
|
|
300
|
+
fetchedTime,
|
|
301
|
+
executionBlockHash: toRootHex(executionPayload.blockHash),
|
|
302
|
+
blobs: blobsBundle.commitments.length,
|
|
303
|
+
});
|
|
187
304
|
|
|
188
|
-
|
|
305
|
+
Object.assign(logMeta, {
|
|
306
|
+
transactions: executionPayload.transactions.length,
|
|
307
|
+
blobs: blobsBundle.commitments.length,
|
|
308
|
+
shouldOverrideBuilder,
|
|
309
|
+
});
|
|
189
310
|
} else if (isForkPostBellatrix(fork)) {
|
|
190
311
|
const safeBlockHash = getSafeExecutionBlockHash(this.forkChoice);
|
|
191
312
|
const finalizedBlockHash = this.forkChoice.getFinalizedBlock().executionPayloadBlockHash ?? ZERO_HASH_HEX;
|
|
@@ -447,8 +568,14 @@ export async function produceBlockBody<T extends BlockType>(
|
|
|
447
568
|
});
|
|
448
569
|
}
|
|
449
570
|
|
|
450
|
-
if (ForkSeq[fork] >= ForkSeq.
|
|
451
|
-
const {blsToExecutionChanges,
|
|
571
|
+
if (ForkSeq[fork] >= ForkSeq.gloas) {
|
|
572
|
+
const {blsToExecutionChanges, payloadAttestations} = blockBody as BeaconBlockBody<ForkPostGloas>;
|
|
573
|
+
Object.assign(logMeta, {
|
|
574
|
+
blsToExecutionChanges: blsToExecutionChanges.length,
|
|
575
|
+
payloadAttestations: payloadAttestations.length,
|
|
576
|
+
});
|
|
577
|
+
} else if (ForkSeq[fork] >= ForkSeq.capella) {
|
|
578
|
+
const {blsToExecutionChanges, executionPayload} = blockBody as BeaconBlockBody<ForkPostCapella & ForkPreGloas>;
|
|
452
579
|
Object.assign(logMeta, {
|
|
453
580
|
blsToExecutionChanges: blsToExecutionChanges.length,
|
|
454
581
|
});
|
|
@@ -480,10 +607,12 @@ export async function prepareExecutionPayload(
|
|
|
480
607
|
parentBlockRoot: Root,
|
|
481
608
|
safeBlockHash: RootHex,
|
|
482
609
|
finalizedBlockHash: RootHex,
|
|
483
|
-
state: CachedBeaconStateExecutions,
|
|
610
|
+
state: CachedBeaconStateExecutions | CachedBeaconStateGloas,
|
|
484
611
|
suggestedFeeRecipient: string
|
|
485
612
|
): Promise<{prepType: PayloadPreparationType; payloadId: PayloadId}> {
|
|
486
|
-
const parentHash =
|
|
613
|
+
const parentHash = isForkPostGloas(fork)
|
|
614
|
+
? (state as CachedBeaconStateGloas).latestBlockHash
|
|
615
|
+
: (state as CachedBeaconStateExecutions).latestExecutionPayloadHeader.blockHash;
|
|
487
616
|
const timestamp = computeTimeAtSlot(chain.config, state.slot, state.genesisTime);
|
|
488
617
|
const prevRandao = getRandaoMix(state, state.epochCtx.epoch);
|
|
489
618
|
|
|
@@ -568,25 +697,45 @@ export function getPayloadAttributesForSSE(
|
|
|
568
697
|
fork: ForkPostBellatrix,
|
|
569
698
|
chain: {
|
|
570
699
|
config: ChainForkConfig;
|
|
700
|
+
forkChoice: IForkChoice;
|
|
571
701
|
},
|
|
572
702
|
{
|
|
573
703
|
prepareState,
|
|
574
704
|
prepareSlot,
|
|
575
705
|
parentBlockRoot,
|
|
576
706
|
feeRecipient,
|
|
577
|
-
}: {
|
|
707
|
+
}: {
|
|
708
|
+
prepareState: CachedBeaconStateExecutions | CachedBeaconStateGloas;
|
|
709
|
+
prepareSlot: Slot;
|
|
710
|
+
parentBlockRoot: Root;
|
|
711
|
+
feeRecipient: string;
|
|
712
|
+
}
|
|
578
713
|
): SSEPayloadAttributes {
|
|
579
|
-
const parentHash =
|
|
714
|
+
const parentHash = isForkPostGloas(fork)
|
|
715
|
+
? (prepareState as CachedBeaconStateGloas).latestBlockHash
|
|
716
|
+
: (prepareState as CachedBeaconStateExecutions).latestExecutionPayloadHeader.blockHash;
|
|
580
717
|
const payloadAttributes = preparePayloadAttributes(fork, chain, {
|
|
581
718
|
prepareState,
|
|
582
719
|
prepareSlot,
|
|
583
720
|
parentBlockRoot,
|
|
584
721
|
feeRecipient,
|
|
585
722
|
});
|
|
723
|
+
|
|
724
|
+
let parentBlockNumber: number;
|
|
725
|
+
if (isForkPostGloas(fork)) {
|
|
726
|
+
const parentBlock = chain.forkChoice.getBlockHexAndBlockHash(toRootHex(parentBlockRoot), toRootHex(parentHash));
|
|
727
|
+
if (parentBlock?.executionPayloadBlockHash == null) {
|
|
728
|
+
throw Error(`Parent block not found in fork choice root=${toRootHex(parentBlockRoot)}`);
|
|
729
|
+
}
|
|
730
|
+
parentBlockNumber = parentBlock.executionPayloadNumber;
|
|
731
|
+
} else {
|
|
732
|
+
parentBlockNumber = (prepareState as CachedBeaconStateExecutions).latestExecutionPayloadHeader.blockNumber;
|
|
733
|
+
}
|
|
734
|
+
|
|
586
735
|
const ssePayloadAttributes: SSEPayloadAttributes = {
|
|
587
736
|
proposerIndex: prepareState.epochCtx.getBeaconProposer(prepareSlot),
|
|
588
737
|
proposalSlot: prepareSlot,
|
|
589
|
-
parentBlockNumber
|
|
738
|
+
parentBlockNumber,
|
|
590
739
|
parentBlockRoot,
|
|
591
740
|
parentBlockHash: parentHash,
|
|
592
741
|
payloadAttributes,
|
|
@@ -605,7 +754,7 @@ function preparePayloadAttributes(
|
|
|
605
754
|
parentBlockRoot,
|
|
606
755
|
feeRecipient,
|
|
607
756
|
}: {
|
|
608
|
-
prepareState: CachedBeaconStateExecutions;
|
|
757
|
+
prepareState: CachedBeaconStateExecutions | CachedBeaconStateGloas;
|
|
609
758
|
prepareSlot: Slot;
|
|
610
759
|
parentBlockRoot: Root;
|
|
611
760
|
feeRecipient: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {routes} from "@lodestar/api";
|
|
2
2
|
import {IForkChoice, ProtoBlock} from "@lodestar/fork-choice";
|
|
3
3
|
import {CachedBeaconStateAllForks, computeEpochAtSlot} from "@lodestar/state-transition";
|
|
4
|
-
import {BeaconBlock, Epoch, RootHex, Slot, phase0} from "@lodestar/types";
|
|
4
|
+
import {BeaconBlock, Epoch, RootHex, Slot, isGloasBeaconBlock, phase0} from "@lodestar/types";
|
|
5
5
|
import {Logger, toRootHex} from "@lodestar/utils";
|
|
6
6
|
import {Metrics} from "../../metrics/index.js";
|
|
7
7
|
import {JobItemQueue} from "../../util/queue/index.js";
|
|
@@ -88,7 +88,12 @@ export class QueuedStateRegenerator implements IStateRegenerator {
|
|
|
88
88
|
*/
|
|
89
89
|
getPreStateSync(block: BeaconBlock): CachedBeaconStateAllForks | null {
|
|
90
90
|
const parentRoot = toRootHex(block.parentRoot);
|
|
91
|
-
const parentBlock =
|
|
91
|
+
const parentBlock = isGloasBeaconBlock(block)
|
|
92
|
+
? this.forkChoice.getBlockHexAndBlockHash(
|
|
93
|
+
parentRoot,
|
|
94
|
+
toRootHex(block.body.signedExecutionPayloadBid.message.parentBlockHash)
|
|
95
|
+
)
|
|
96
|
+
: this.forkChoice.getBlockHexDefaultStatus(parentRoot);
|
|
92
97
|
if (!parentBlock) {
|
|
93
98
|
throw new RegenError({
|
|
94
99
|
code: RegenErrorCode.BLOCK_NOT_IN_FORKCHOICE,
|
package/src/chain/regen/regen.ts
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
processSlots,
|
|
12
12
|
stateTransition,
|
|
13
13
|
} from "@lodestar/state-transition";
|
|
14
|
-
import {BeaconBlock, RootHex, SignedBeaconBlock, Slot} from "@lodestar/types";
|
|
14
|
+
import {BeaconBlock, RootHex, SignedBeaconBlock, Slot, isGloasBeaconBlock} from "@lodestar/types";
|
|
15
15
|
import {Logger, fromHex, toRootHex} from "@lodestar/utils";
|
|
16
16
|
import {IBeaconDb} from "../../db/index.js";
|
|
17
17
|
import {Metrics} from "../../metrics/index.js";
|
|
@@ -58,7 +58,13 @@ export class StateRegenerator implements IStateRegeneratorInternal {
|
|
|
58
58
|
opts: StateRegenerationOpts,
|
|
59
59
|
regenCaller: RegenCaller
|
|
60
60
|
): Promise<CachedBeaconStateAllForks> {
|
|
61
|
-
const
|
|
61
|
+
const parentRoot = toRootHex(block.parentRoot);
|
|
62
|
+
const parentBlock = isGloasBeaconBlock(block)
|
|
63
|
+
? this.modules.forkChoice.getBlockHexAndBlockHash(
|
|
64
|
+
parentRoot,
|
|
65
|
+
toRootHex(block.body.signedExecutionPayloadBid.message.parentBlockHash)
|
|
66
|
+
)
|
|
67
|
+
: this.modules.forkChoice.getBlockHexDefaultStatus(parentRoot);
|
|
62
68
|
if (!parentBlock) {
|
|
63
69
|
throw new RegenError({
|
|
64
70
|
code: RegenErrorCode.BLOCK_NOT_IN_FORKCHOICE,
|
|
@@ -152,7 +158,7 @@ export class StateRegenerator implements IStateRegeneratorInternal {
|
|
|
152
158
|
|
|
153
159
|
const getSeedStateTimer = this.modules.metrics?.regenGetState.getSeedState.startTimer({caller});
|
|
154
160
|
// iterateAncestorBlocks only returns ancestor blocks, not the block itself
|
|
155
|
-
for (const b of this.modules.forkChoice.iterateAncestorBlocks(block.blockRoot)) {
|
|
161
|
+
for (const b of this.modules.forkChoice.iterateAncestorBlocks(block.blockRoot, block.payloadStatus)) {
|
|
156
162
|
state = this.modules.blockStateCache.get(b.stateRoot);
|
|
157
163
|
if (state) {
|
|
158
164
|
break;
|
|
@@ -3,6 +3,7 @@ import {CheckpointWithHex} from "@lodestar/fork-choice";
|
|
|
3
3
|
import {
|
|
4
4
|
ForkName,
|
|
5
5
|
ForkPostFulu,
|
|
6
|
+
ForkPostGloas,
|
|
6
7
|
ForkPreGloas,
|
|
7
8
|
SLOTS_PER_EPOCH,
|
|
8
9
|
isForkPostDeneb,
|
|
@@ -16,10 +17,12 @@ import {Metrics} from "../../metrics/metrics.js";
|
|
|
16
17
|
import {MAX_LOOK_AHEAD_EPOCHS} from "../../sync/constants.js";
|
|
17
18
|
import {IClock} from "../../util/clock.js";
|
|
18
19
|
import {CustodyConfig} from "../../util/dataColumns.js";
|
|
20
|
+
import {SerializedCache} from "../../util/serializedCache.js";
|
|
19
21
|
import {
|
|
20
22
|
BlockInput,
|
|
21
23
|
BlockInputBlobs,
|
|
22
24
|
BlockInputColumns,
|
|
25
|
+
BlockInputNoData,
|
|
23
26
|
BlockInputPreData,
|
|
24
27
|
BlockWithSource,
|
|
25
28
|
DAType,
|
|
@@ -53,6 +56,7 @@ export type SeenBlockInputCacheModules = {
|
|
|
53
56
|
chainEvents: ChainEventEmitter;
|
|
54
57
|
signal: AbortSignal;
|
|
55
58
|
custodyConfig: CustodyConfig;
|
|
59
|
+
serializedCache: SerializedCache;
|
|
56
60
|
metrics: Metrics | null;
|
|
57
61
|
logger?: Logger;
|
|
58
62
|
};
|
|
@@ -99,6 +103,7 @@ export class SeenBlockInput {
|
|
|
99
103
|
private readonly clock: IClock;
|
|
100
104
|
private readonly chainEvents: ChainEventEmitter;
|
|
101
105
|
private readonly signal: AbortSignal;
|
|
106
|
+
private readonly serializedCache: SerializedCache;
|
|
102
107
|
private readonly metrics: Metrics | null;
|
|
103
108
|
private readonly logger?: Logger;
|
|
104
109
|
private blockInputs = new Map<RootHex, IBlockInput>();
|
|
@@ -107,19 +112,35 @@ export class SeenBlockInput {
|
|
|
107
112
|
// and the signature to ensure we only skip verification if both match
|
|
108
113
|
private verifiedProposerSignatures = new Map<Slot, Map<RootHex, BLSSignature>>();
|
|
109
114
|
|
|
110
|
-
constructor({
|
|
115
|
+
constructor({
|
|
116
|
+
config,
|
|
117
|
+
custodyConfig,
|
|
118
|
+
clock,
|
|
119
|
+
chainEvents,
|
|
120
|
+
signal,
|
|
121
|
+
serializedCache,
|
|
122
|
+
metrics,
|
|
123
|
+
logger,
|
|
124
|
+
}: SeenBlockInputCacheModules) {
|
|
111
125
|
this.config = config;
|
|
112
126
|
this.custodyConfig = custodyConfig;
|
|
113
127
|
this.clock = clock;
|
|
114
128
|
this.chainEvents = chainEvents;
|
|
115
129
|
this.signal = signal;
|
|
130
|
+
this.serializedCache = serializedCache;
|
|
116
131
|
this.metrics = metrics;
|
|
117
132
|
this.logger = logger;
|
|
118
133
|
|
|
119
134
|
if (metrics) {
|
|
120
|
-
metrics.seenCache.blockInput.blockInputCount.addCollect(() =>
|
|
121
|
-
metrics.seenCache.blockInput.blockInputCount.set(this.blockInputs.size)
|
|
122
|
-
|
|
135
|
+
metrics.seenCache.blockInput.blockInputCount.addCollect(() => {
|
|
136
|
+
metrics.seenCache.blockInput.blockInputCount.set(this.blockInputs.size);
|
|
137
|
+
metrics.seenCache.blockInput.serializedObjectRefs.set(
|
|
138
|
+
Array.from(this.blockInputs.values()).reduce(
|
|
139
|
+
(count, blockInput) => count + blockInput.getSerializedCacheKeys().length,
|
|
140
|
+
0
|
|
141
|
+
)
|
|
142
|
+
);
|
|
143
|
+
});
|
|
123
144
|
}
|
|
124
145
|
|
|
125
146
|
this.chainEvents.on(ChainEvent.forkChoiceFinalized, this.onFinalized);
|
|
@@ -140,7 +161,10 @@ export class SeenBlockInput {
|
|
|
140
161
|
* Removes the single BlockInput from the cache
|
|
141
162
|
*/
|
|
142
163
|
remove(rootHex: RootHex): void {
|
|
143
|
-
this.blockInputs.
|
|
164
|
+
const blockInput = this.blockInputs.get(rootHex);
|
|
165
|
+
if (blockInput) {
|
|
166
|
+
this.evictBlockInput(blockInput);
|
|
167
|
+
}
|
|
144
168
|
}
|
|
145
169
|
|
|
146
170
|
/**
|
|
@@ -152,7 +176,7 @@ export class SeenBlockInput {
|
|
|
152
176
|
let deletedCount = 0;
|
|
153
177
|
while (blockInput) {
|
|
154
178
|
deletedCount++;
|
|
155
|
-
this.
|
|
179
|
+
this.evictBlockInput(blockInput);
|
|
156
180
|
blockInput = this.blockInputs.get(parentRootHex ?? "");
|
|
157
181
|
parentRootHex = blockInput?.parentRootHex;
|
|
158
182
|
}
|
|
@@ -163,10 +187,10 @@ export class SeenBlockInput {
|
|
|
163
187
|
onFinalized = (checkpoint: CheckpointWithHex) => {
|
|
164
188
|
let deletedCount = 0;
|
|
165
189
|
const cutoffSlot = computeStartSlotAtEpoch(checkpoint.epoch);
|
|
166
|
-
for (const [
|
|
190
|
+
for (const [, blockInput] of this.blockInputs) {
|
|
167
191
|
if (blockInput.slot < cutoffSlot) {
|
|
168
192
|
deletedCount++;
|
|
169
|
-
this.
|
|
193
|
+
this.evictBlockInput(blockInput);
|
|
170
194
|
}
|
|
171
195
|
}
|
|
172
196
|
this.logger?.debug(`BlockInputCache.onFinalized deleted ${deletedCount} cached BlockInputs`);
|
|
@@ -179,12 +203,19 @@ export class SeenBlockInput {
|
|
|
179
203
|
if (!blockInput) {
|
|
180
204
|
const {forkName, daOutOfRange} = this.buildCommonProps(block.message.slot);
|
|
181
205
|
|
|
182
|
-
// TODO GLOAS: Implement
|
|
183
206
|
if (isForkPostGloas(forkName)) {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
207
|
+
// Post-gloas
|
|
208
|
+
blockInput = BlockInputNoData.createFromBlock({
|
|
209
|
+
block: block as SignedBeaconBlock<ForkPostGloas>,
|
|
210
|
+
blockRootHex,
|
|
211
|
+
daOutOfRange,
|
|
212
|
+
forkName,
|
|
213
|
+
source,
|
|
214
|
+
seenTimestampSec,
|
|
215
|
+
peerIdStr,
|
|
216
|
+
});
|
|
217
|
+
} else if (!isForkPostDeneb(forkName)) {
|
|
218
|
+
// Pre-deneb
|
|
188
219
|
blockInput = BlockInputPreData.createFromBlock({
|
|
189
220
|
block,
|
|
190
221
|
blockRootHex,
|
|
@@ -194,8 +225,8 @@ export class SeenBlockInput {
|
|
|
194
225
|
seenTimestampSec,
|
|
195
226
|
peerIdStr,
|
|
196
227
|
});
|
|
197
|
-
// Fulu Only
|
|
198
228
|
} else if (isForkPostFulu(forkName)) {
|
|
229
|
+
// Fulu Only
|
|
199
230
|
blockInput = BlockInputColumns.createFromBlock({
|
|
200
231
|
block: block as SignedBeaconBlock<ForkPostFulu & ForkPreGloas>,
|
|
201
232
|
blockRootHex,
|
|
@@ -207,8 +238,8 @@ export class SeenBlockInput {
|
|
|
207
238
|
seenTimestampSec,
|
|
208
239
|
peerIdStr,
|
|
209
240
|
});
|
|
210
|
-
// Deneb and Electra
|
|
211
241
|
} else {
|
|
242
|
+
// Deneb and Electra
|
|
212
243
|
blockInput = BlockInputBlobs.createFromBlock({
|
|
213
244
|
block: block as SignedBeaconBlock<ForkBlobsDA>,
|
|
214
245
|
blockRootHex,
|
|
@@ -219,6 +250,7 @@ export class SeenBlockInput {
|
|
|
219
250
|
peerIdStr,
|
|
220
251
|
});
|
|
221
252
|
}
|
|
253
|
+
this.metrics?.seenCache.blockInput.createdByBlock.inc();
|
|
222
254
|
this.blockInputs.set(blockInput.blockRootHex, blockInput);
|
|
223
255
|
}
|
|
224
256
|
|
|
@@ -318,7 +350,7 @@ export class SeenBlockInput {
|
|
|
318
350
|
custodyColumns: this.custodyConfig.custodyColumns,
|
|
319
351
|
sampledColumns: this.custodyConfig.sampledColumns,
|
|
320
352
|
});
|
|
321
|
-
this.metrics?.seenCache.blockInput.
|
|
353
|
+
this.metrics?.seenCache.blockInput.createdByColumn.inc();
|
|
322
354
|
this.blockInputs.set(blockRootHex, blockInput);
|
|
323
355
|
}
|
|
324
356
|
|
|
@@ -399,14 +431,20 @@ export class SeenBlockInput {
|
|
|
399
431
|
|
|
400
432
|
if (itemsToDelete > 0) {
|
|
401
433
|
const sorted = [...this.blockInputs.entries()].sort((a, b) => a[1].slot - b[1].slot);
|
|
402
|
-
for (const [
|
|
403
|
-
this.
|
|
434
|
+
for (const [, blockInput] of sorted) {
|
|
435
|
+
this.evictBlockInput(blockInput);
|
|
404
436
|
itemsToDelete--;
|
|
405
437
|
if (itemsToDelete <= 0) return;
|
|
406
438
|
}
|
|
407
439
|
}
|
|
408
440
|
pruneSetToMax(this.verifiedProposerSignatures, MAX_BLOCK_INPUT_CACHE_SIZE);
|
|
409
441
|
}
|
|
442
|
+
|
|
443
|
+
private evictBlockInput(blockInput: IBlockInput): void {
|
|
444
|
+
// Without forcefully clearing this cache, we would rely on WeakMap to evict memory which is not reliable
|
|
445
|
+
this.serializedCache.delete(blockInput.getSerializedCacheKeys());
|
|
446
|
+
this.blockInputs.delete(blockInput.blockRootHex);
|
|
447
|
+
}
|
|
410
448
|
}
|
|
411
449
|
|
|
412
450
|
enum SeenBlockInputCacheErrorCode {
|
|
@@ -81,7 +81,7 @@ async function validateAggregateAndProof(
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
// [REJECT] `aggregate.data.index == 0` if `block.slot == aggregate.data.slot`.
|
|
84
|
-
const block = chain.forkChoice.
|
|
84
|
+
const block = chain.forkChoice.getBlockDefaultStatus(attData.beaconBlockRoot);
|
|
85
85
|
|
|
86
86
|
// If block is unknown, we don't handle it here. It will throw error later on at `verifyHeadBlockAndTargetRoot()`
|
|
87
87
|
if (block !== null && block.slot === attData.slot && attData.index !== 0) {
|
|
@@ -143,7 +143,10 @@ export async function validateGossipAttestationsSameAttData(
|
|
|
143
143
|
if (batchableBls) {
|
|
144
144
|
// all signature sets should have same signing root since we filtered in network processor
|
|
145
145
|
signatureValids = await chain.bls.verifySignatureSetsSameMessage(
|
|
146
|
-
signatureSets.map((set) =>
|
|
146
|
+
signatureSets.map((set) => {
|
|
147
|
+
const publicKey = chain.pubkeyCache.getOrThrow(set.index);
|
|
148
|
+
return {publicKey, signature: set.signature};
|
|
149
|
+
}),
|
|
147
150
|
signatureSets[0].signingRoot
|
|
148
151
|
);
|
|
149
152
|
} else {
|
|
@@ -183,7 +186,7 @@ export async function validateGossipAttestationsSameAttData(
|
|
|
183
186
|
chain.seenAttesters.add(targetEpoch, validatorIndex);
|
|
184
187
|
} else {
|
|
185
188
|
step0ResultOrErrors[oldIndex] = {
|
|
186
|
-
err: new AttestationError(GossipAction.
|
|
189
|
+
err: new AttestationError(GossipAction.REJECT, {
|
|
187
190
|
code: AttestationErrorCode.INVALID_SIGNATURE,
|
|
188
191
|
}),
|
|
189
192
|
};
|
|
@@ -304,7 +307,7 @@ async function validateAttestationNoSignatureCheck(
|
|
|
304
307
|
}
|
|
305
308
|
|
|
306
309
|
// [REJECT] `attestation.data.index == 0` if `block.slot == attestation.data.slot`.
|
|
307
|
-
const block = chain.forkChoice.
|
|
310
|
+
const block = chain.forkChoice.getBlockDefaultStatus(attData.beaconBlockRoot);
|
|
308
311
|
|
|
309
312
|
// block being null will be handled by `verifyHeadBlockAndTargetRoot`
|
|
310
313
|
if (block !== null && block.slot === attSlot && attData.index !== 0) {
|
|
@@ -601,10 +604,14 @@ export function verifyPropagationSlotRange(fork: ForkName, chain: IBeaconChain,
|
|
|
601
604
|
//
|
|
602
605
|
// see: https://github.com/ethereum/consensus-specs/pull/3360
|
|
603
606
|
if (ForkSeq[fork] < ForkSeq.deneb) {
|
|
607
|
+
const currentSlot = chain.clock.currentSlot;
|
|
608
|
+
const withinPastDisparity = currentSlot > 0 && chain.clock.isCurrentSlotGivenGossipDisparity(currentSlot - 1);
|
|
604
609
|
const earliestPermissibleSlot = Math.max(
|
|
605
|
-
//
|
|
606
|
-
|
|
607
|
-
|
|
610
|
+
// Pre-Deneb propagation is time-bounded: an attestation remains valid at the exact old
|
|
611
|
+
// boundary `compute_time_at_slot(slot + range + 1) + MAXIMUM_GOSSIP_CLOCK_DISPARITY`.
|
|
612
|
+
// Model that boundary by extending the lower slot bound by one additional slot only while
|
|
613
|
+
// the clock still considers the previous slot current given gossip disparity.
|
|
614
|
+
currentSlot - chain.config.ATTESTATION_PROPAGATION_SLOT_RANGE - (withinPastDisparity ? 1 : 0),
|
|
608
615
|
0
|
|
609
616
|
);
|
|
610
617
|
|
|
@@ -753,7 +760,7 @@ export function getAttestationDataSigningRoot(config: BeaconConfig, data: phase0
|
|
|
753
760
|
function verifyHeadBlockIsKnown(chain: IBeaconChain, beaconBlockRoot: Root): ProtoBlock {
|
|
754
761
|
// TODO (LH): Enforce a maximum skip distance for unaggregated attestations.
|
|
755
762
|
|
|
756
|
-
const headBlock = chain.forkChoice.
|
|
763
|
+
const headBlock = chain.forkChoice.getBlockDefaultStatus(beaconBlockRoot);
|
|
757
764
|
if (headBlock === null) {
|
|
758
765
|
throw new AttestationError(GossipAction.IGNORE, {
|
|
759
766
|
code: AttestationErrorCode.UNKNOWN_OR_PREFINALIZED_BEACON_BLOCK_ROOT,
|