@lodestar/beacon-node 1.46.0-dev.b3cb0f603b → 1.46.0-dev.b9d4e89e49
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.map +1 -1
- package/lib/api/impl/beacon/blocks/utils.js.map +1 -1
- package/lib/api/impl/beacon/index.js.map +1 -1
- package/lib/api/impl/beacon/pool/index.d.ts +1 -1
- package/lib/api/impl/beacon/pool/index.d.ts.map +1 -1
- package/lib/api/impl/beacon/pool/index.js.map +1 -1
- package/lib/api/impl/beacon/rewards/index.d.ts +1 -1
- package/lib/api/impl/beacon/rewards/index.d.ts.map +1 -1
- package/lib/api/impl/beacon/rewards/index.js.map +1 -1
- package/lib/api/impl/beacon/state/index.d.ts +1 -1
- package/lib/api/impl/beacon/state/index.d.ts.map +1 -1
- package/lib/api/impl/beacon/state/index.js.map +1 -1
- package/lib/api/impl/beacon/state/utils.js.map +1 -1
- package/lib/api/impl/config/constants.d.ts +2 -0
- package/lib/api/impl/config/constants.d.ts.map +1 -1
- package/lib/api/impl/config/constants.js +4 -1
- package/lib/api/impl/config/constants.js.map +1 -1
- package/lib/api/impl/config/index.js.map +1 -1
- package/lib/api/impl/debug/index.d.ts +1 -1
- package/lib/api/impl/debug/index.d.ts.map +1 -1
- package/lib/api/impl/debug/index.js.map +1 -1
- package/lib/api/impl/errors.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/attesterSlashing.js.map +1 -1
- package/lib/api/impl/lodestar/index.d.ts +1 -1
- package/lib/api/impl/lodestar/index.d.ts.map +1 -1
- package/lib/api/impl/lodestar/index.js.map +1 -1
- package/lib/api/impl/node/index.js.map +1 -1
- package/lib/api/impl/node/utils.js.map +1 -1
- package/lib/api/impl/proof/index.js.map +1 -1
- package/lib/api/impl/utils.js.map +1 -1
- package/lib/api/impl/validator/index.d.ts.map +1 -1
- package/lib/api/impl/validator/index.js +18 -11
- 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.js.map +1 -1
- package/lib/api/rest/base.js.map +1 -1
- package/lib/api/rest/index.js.map +1 -1
- package/lib/api/rest/swaggerUI.js.map +1 -1
- package/lib/chain/ColumnReconstructionTracker.js.map +1 -1
- package/lib/chain/GetBlobsTracker.js.map +1 -1
- package/lib/chain/archiveStore/archiveStore.js +1 -2
- package/lib/chain/archiveStore/archiveStore.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/getHistoricalState.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/historicalStateRegen.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/metrics.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/types.js +1 -2
- package/lib/chain/archiveStore/historicalState/types.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/worker.js.map +1 -1
- package/lib/chain/archiveStore/interface.js +1 -2
- package/lib/chain/archiveStore/interface.js.map +1 -1
- package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.d.ts.map +1 -1
- package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.js +1 -2
- package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.js.map +1 -1
- package/lib/chain/archiveStore/utils/archiveBlocks.js.map +1 -1
- package/lib/chain/archiveStore/utils/pruneHistory.js.map +1 -1
- package/lib/chain/archiveStore/utils/updateBackfillRange.js.map +1 -1
- package/lib/chain/balancesCache.js.map +1 -1
- package/lib/chain/beaconProposerCache.js.map +1 -1
- package/lib/chain/blocks/blockInput/blockInput.d.ts.map +1 -1
- package/lib/chain/blocks/blockInput/blockInput.js.map +1 -1
- package/lib/chain/blocks/blockInput/errors.js +1 -2
- package/lib/chain/blocks/blockInput/errors.js.map +1 -1
- package/lib/chain/blocks/blockInput/types.js +2 -4
- 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.js.map +1 -1
- package/lib/chain/blocks/importExecutionPayload.js +1 -2
- package/lib/chain/blocks/importExecutionPayload.js.map +1 -1
- package/lib/chain/blocks/index.js.map +1 -1
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.js.map +1 -1
- package/lib/chain/blocks/payloadEnvelopeInput/types.js +1 -2
- package/lib/chain/blocks/payloadEnvelopeInput/types.js.map +1 -1
- package/lib/chain/blocks/payloadEnvelopeProcessor.js.map +1 -1
- package/lib/chain/blocks/types.js +3 -6
- 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/utils/polarBearBanner.d.ts +2 -0
- package/lib/chain/blocks/utils/polarBearBanner.d.ts.map +1 -0
- package/lib/chain/blocks/utils/polarBearBanner.js +51 -0
- package/lib/chain/blocks/utils/polarBearBanner.js.map +1 -0
- package/lib/chain/blocks/verifyBlock.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlock.js +5 -0
- package/lib/chain/blocks/verifyBlock.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksDataAvailability.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksExecutionPayloads.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksSanityChecks.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/verifyExecutionPayloadEnvelope.js +1 -1
- package/lib/chain/blocks/verifyExecutionPayloadEnvelope.js.map +1 -1
- package/lib/chain/blocks/verifyPayloadsDataAvailability.js.map +1 -1
- package/lib/chain/blocks/writeBlockInputToDb.js.map +1 -1
- package/lib/chain/blocks/writePayloadEnvelopeInputToDb.js.map +1 -1
- package/lib/chain/bls/maybeBatch.js.map +1 -1
- package/lib/chain/bls/multithread/index.js.map +1 -1
- package/lib/chain/bls/multithread/jobItem.js +1 -2
- package/lib/chain/bls/multithread/jobItem.js.map +1 -1
- package/lib/chain/bls/multithread/types.js +1 -2
- 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.js.map +1 -1
- package/lib/chain/bls/utils.js.map +1 -1
- package/lib/chain/builderCircuitBreaker.js.map +1 -1
- package/lib/chain/chain.d.ts +2 -2
- package/lib/chain/chain.d.ts.map +1 -1
- package/lib/chain/chain.js.map +1 -1
- package/lib/chain/emitter.d.ts +1 -1
- package/lib/chain/emitter.d.ts.map +1 -1
- package/lib/chain/emitter.js +1 -2
- package/lib/chain/emitter.js.map +1 -1
- package/lib/chain/errors/attestationError.js +1 -2
- package/lib/chain/errors/attestationError.js.map +1 -1
- package/lib/chain/errors/attesterSlashingError.js +1 -2
- package/lib/chain/errors/attesterSlashingError.js.map +1 -1
- package/lib/chain/errors/blobSidecarError.js +1 -2
- package/lib/chain/errors/blobSidecarError.js.map +1 -1
- package/lib/chain/errors/blockError.js +1 -2
- package/lib/chain/errors/blockError.js.map +1 -1
- package/lib/chain/errors/blsToExecutionChangeError.js +1 -2
- package/lib/chain/errors/blsToExecutionChangeError.js.map +1 -1
- package/lib/chain/errors/dataColumnSidecarError.js +1 -2
- package/lib/chain/errors/dataColumnSidecarError.js.map +1 -1
- package/lib/chain/errors/executionPayloadBid.d.ts +11 -4
- package/lib/chain/errors/executionPayloadBid.d.ts.map +1 -1
- package/lib/chain/errors/executionPayloadBid.js +2 -2
- package/lib/chain/errors/executionPayloadBid.js.map +1 -1
- package/lib/chain/errors/executionPayloadEnvelope.js +1 -2
- package/lib/chain/errors/executionPayloadEnvelope.js.map +1 -1
- package/lib/chain/errors/gossipValidation.js +2 -4
- package/lib/chain/errors/gossipValidation.js.map +1 -1
- package/lib/chain/errors/lightClientError.js +2 -4
- package/lib/chain/errors/lightClientError.js.map +1 -1
- package/lib/chain/errors/payloadAttestation.js +1 -2
- package/lib/chain/errors/payloadAttestation.js.map +1 -1
- package/lib/chain/errors/proposerPreferences.js +1 -2
- package/lib/chain/errors/proposerPreferences.js.map +1 -1
- package/lib/chain/errors/proposerSlashingError.js +1 -2
- package/lib/chain/errors/proposerSlashingError.js.map +1 -1
- package/lib/chain/errors/syncCommitteeError.js +1 -2
- package/lib/chain/errors/syncCommitteeError.js.map +1 -1
- package/lib/chain/errors/voluntaryExitError.js +1 -2
- package/lib/chain/errors/voluntaryExitError.js.map +1 -1
- package/lib/chain/forkChoice/index.js +1 -2
- package/lib/chain/forkChoice/index.js.map +1 -1
- package/lib/chain/initState.d.ts +1 -1
- package/lib/chain/initState.d.ts.map +1 -1
- package/lib/chain/initState.js.map +1 -1
- package/lib/chain/interface.js +1 -2
- package/lib/chain/interface.js.map +1 -1
- package/lib/chain/lightClient/index.d.ts +29 -0
- 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 -6
- package/lib/chain/opPools/aggregatedAttestationPool.js.map +1 -1
- package/lib/chain/opPools/attestationPool.js.map +1 -1
- package/lib/chain/opPools/executionPayloadBidPool.js.map +1 -1
- package/lib/chain/opPools/opPool.js.map +1 -1
- package/lib/chain/opPools/payloadAttestationPool.js.map +1 -1
- package/lib/chain/opPools/proposerPreferencesPool.js.map +1 -1
- package/lib/chain/opPools/syncCommitteeMessagePool.js.map +1 -1
- package/lib/chain/opPools/syncContributionAndProofPool.js.map +1 -1
- package/lib/chain/opPools/types.js +2 -4
- package/lib/chain/opPools/types.js.map +1 -1
- package/lib/chain/opPools/utils.js.map +1 -1
- package/lib/chain/prepareNextSlot.d.ts +2 -1
- package/lib/chain/prepareNextSlot.d.ts.map +1 -1
- package/lib/chain/prepareNextSlot.js +34 -24
- package/lib/chain/prepareNextSlot.js.map +1 -1
- 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 +17 -11
- package/lib/chain/produceBlock/produceBlockBody.js.map +1 -1
- package/lib/chain/produceBlock/validateBlobsAndKzgCommitments.js.map +1 -1
- package/lib/chain/regen/errors.js +1 -2
- package/lib/chain/regen/errors.js.map +1 -1
- package/lib/chain/regen/interface.js +2 -4
- package/lib/chain/regen/interface.js.map +1 -1
- package/lib/chain/regen/queued.js.map +1 -1
- package/lib/chain/regen/regen.js.map +1 -1
- package/lib/chain/reprocess.js +1 -2
- package/lib/chain/reprocess.js.map +1 -1
- package/lib/chain/seenCache/seenAggregateAndProof.js.map +1 -1
- package/lib/chain/seenCache/seenAttestationData.js +1 -2
- package/lib/chain/seenCache/seenAttestationData.js.map +1 -1
- package/lib/chain/seenCache/seenAttesters.js.map +1 -1
- package/lib/chain/seenCache/seenBlockAttesters.js.map +1 -1
- package/lib/chain/seenCache/seenBlockProposers.js.map +1 -1
- package/lib/chain/seenCache/seenCommittee.js.map +1 -1
- package/lib/chain/seenCache/seenCommitteeContribution.js.map +1 -1
- package/lib/chain/seenCache/seenExecutionPayloadBids.d.ts +6 -5
- package/lib/chain/seenCache/seenExecutionPayloadBids.d.ts.map +1 -1
- package/lib/chain/seenCache/seenExecutionPayloadBids.js +16 -8
- package/lib/chain/seenCache/seenExecutionPayloadBids.js.map +1 -1
- package/lib/chain/seenCache/seenGossipBlockInput.d.ts +3 -3
- package/lib/chain/seenCache/seenGossipBlockInput.d.ts.map +1 -1
- package/lib/chain/seenCache/seenGossipBlockInput.js.map +1 -1
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.d.ts +1 -1
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.d.ts.map +1 -1
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.js.map +1 -1
- package/lib/chain/serializeState.js.map +1 -1
- package/lib/chain/shufflingCache.js +1 -2
- package/lib/chain/shufflingCache.js.map +1 -1
- package/lib/chain/stateCache/datastore/db.js.map +1 -1
- package/lib/chain/stateCache/datastore/file.js.map +1 -1
- package/lib/chain/stateCache/fifoBlockStateCache.js.map +1 -1
- package/lib/chain/stateCache/mapMetrics.js.map +1 -1
- package/lib/chain/stateCache/persistentCheckpointsCache.d.ts +45 -1
- 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 +1 -2
- package/lib/chain/stateCache/types.js.map +1 -1
- package/lib/chain/validation/aggregateAndProof.js.map +1 -1
- package/lib/chain/validation/attestation.js.map +1 -1
- package/lib/chain/validation/attesterSlashing.js.map +1 -1
- package/lib/chain/validation/blobSidecar.js.map +1 -1
- 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.map +1 -1
- package/lib/chain/validation/dataColumnSidecar.js +21 -16
- package/lib/chain/validation/dataColumnSidecar.js.map +1 -1
- package/lib/chain/validation/executionPayloadBid.d.ts +0 -5
- package/lib/chain/validation/executionPayloadBid.d.ts.map +1 -1
- package/lib/chain/validation/executionPayloadBid.js +74 -26
- package/lib/chain/validation/executionPayloadBid.js.map +1 -1
- 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.map +1 -1
- package/lib/chain/validation/proposerPreferences.js.map +1 -1
- package/lib/chain/validation/proposerSlashing.js.map +1 -1
- package/lib/chain/validation/signatureSets/aggregateAndProof.js.map +1 -1
- package/lib/chain/validation/signatureSets/contributionAndProof.js.map +1 -1
- package/lib/chain/validation/signatureSets/selectionProof.js.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommittee.js.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommitteeContribution.js.map +1 -1
- package/lib/chain/validation/signatureSets/syncCommitteeSelectionProof.js.map +1 -1
- package/lib/chain/validation/syncCommittee.js.map +1 -1
- package/lib/chain/validation/syncCommitteeContributionAndProof.js.map +1 -1
- package/lib/chain/validation/voluntaryExit.js.map +1 -1
- package/lib/chain/validatorMonitor.js +2 -3
- package/lib/chain/validatorMonitor.js.map +1 -1
- package/lib/constants/network.js +2 -4
- package/lib/constants/network.js.map +1 -1
- package/lib/db/beacon.js.map +1 -1
- package/lib/db/buckets.d.ts +23 -23
- package/lib/db/buckets.d.ts.map +1 -1
- package/lib/db/buckets.js +1 -2
- package/lib/db/buckets.js.map +1 -1
- package/lib/db/repositories/attesterSlashing.js.map +1 -1
- package/lib/db/repositories/backfilledRanges.js.map +1 -1
- package/lib/db/repositories/blobSidecars.js.map +1 -1
- package/lib/db/repositories/blobSidecarsArchive.js.map +1 -1
- package/lib/db/repositories/block.js.map +1 -1
- package/lib/db/repositories/blockArchive.js.map +1 -1
- package/lib/db/repositories/blockArchiveIndex.js.map +1 -1
- package/lib/db/repositories/blsToExecutionChange.js.map +1 -1
- package/lib/db/repositories/checkpointState.js.map +1 -1
- package/lib/db/repositories/dataColumnSidecar.js.map +1 -1
- package/lib/db/repositories/dataColumnSidecarArchive.js.map +1 -1
- package/lib/db/repositories/executionPayloadEnvelope.js.map +1 -1
- package/lib/db/repositories/executionPayloadEnvelopeArchive.js.map +1 -1
- package/lib/db/repositories/lightclientBestUpdate.js.map +1 -1
- package/lib/db/repositories/lightclientCheckpointHeader.js.map +1 -1
- package/lib/db/repositories/lightclientSyncCommittee.js.map +1 -1
- package/lib/db/repositories/lightclientSyncCommitteeWitness.js.map +1 -1
- package/lib/db/repositories/proposerSlashing.js.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.js.map +1 -1
- package/lib/execution/builder/cache.js.map +1 -1
- package/lib/execution/builder/http.js +1 -2
- package/lib/execution/builder/http.js.map +1 -1
- package/lib/execution/builder/index.js.map +1 -1
- package/lib/execution/engine/disabled.js.map +1 -1
- package/lib/execution/engine/http.d.ts.map +1 -1
- package/lib/execution/engine/http.js.map +1 -1
- package/lib/execution/engine/index.js.map +1 -1
- package/lib/execution/engine/interface.d.ts +1 -1
- package/lib/execution/engine/interface.js +2 -4
- package/lib/execution/engine/interface.js.map +1 -1
- package/lib/execution/engine/jsonRpcHttpClient.d.ts +13 -10
- package/lib/execution/engine/jsonRpcHttpClient.d.ts.map +1 -1
- package/lib/execution/engine/jsonRpcHttpClient.js +1 -2
- package/lib/execution/engine/jsonRpcHttpClient.js.map +1 -1
- package/lib/execution/engine/jwt.js.map +1 -1
- package/lib/execution/engine/mock.js.map +1 -1
- package/lib/execution/engine/payloadIdCache.js.map +1 -1
- package/lib/execution/engine/types.js +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 +2 -2
- package/lib/metrics/metrics/lodestar.d.ts.map +1 -1
- package/lib/metrics/metrics/lodestar.js +1 -1
- 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.js.map +1 -1
- package/lib/metrics/utils/gauge.js.map +1 -1
- package/lib/metrics/utils/registryMetricCreator.js.map +1 -1
- package/lib/monitoring/clientStats.js.map +1 -1
- package/lib/monitoring/properties.js.map +1 -1
- package/lib/monitoring/service.js.map +1 -1
- package/lib/monitoring/system.d.ts.map +1 -1
- package/lib/monitoring/system.js.map +1 -1
- package/lib/monitoring/types.js +2 -4
- package/lib/monitoring/types.js.map +1 -1
- package/lib/network/core/events.d.ts.map +1 -1
- package/lib/network/core/events.js +2 -4
- package/lib/network/core/events.js.map +1 -1
- package/lib/network/core/metrics.d.ts +7 -6
- package/lib/network/core/metrics.d.ts.map +1 -1
- package/lib/network/core/metrics.js.map +1 -1
- package/lib/network/core/networkCore.d.ts +1 -1
- package/lib/network/core/networkCore.d.ts.map +1 -1
- package/lib/network/core/networkCore.js.map +1 -1
- package/lib/network/core/networkCoreWorker.js.map +1 -1
- package/lib/network/core/networkCoreWorkerHandler.js.map +1 -1
- package/lib/network/discv5/index.d.ts +1 -1
- 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 +1 -2
- package/lib/network/discv5/utils.js.map +1 -1
- package/lib/network/discv5/worker.js.map +1 -1
- package/lib/network/events.d.ts.map +1 -1
- package/lib/network/events.js +2 -4
- package/lib/network/events.js.map +1 -1
- package/lib/network/forks.js.map +1 -1
- package/lib/network/gossip/encoding.js.map +1 -1
- package/lib/network/gossip/errors.js.map +1 -1
- package/lib/network/gossip/gossipsub.js.map +1 -1
- package/lib/network/gossip/interface.js +2 -4
- package/lib/network/gossip/interface.js.map +1 -1
- package/lib/network/gossip/metrics.d.ts +14 -12
- package/lib/network/gossip/metrics.d.ts.map +1 -1
- package/lib/network/gossip/metrics.js.map +1 -1
- package/lib/network/gossip/scoringParameters.d.ts +1 -1
- package/lib/network/gossip/scoringParameters.d.ts.map +1 -1
- package/lib/network/gossip/scoringParameters.js.map +1 -1
- package/lib/network/gossip/topic.d.ts +671 -26
- package/lib/network/gossip/topic.d.ts.map +1 -1
- package/lib/network/gossip/topic.js +3 -3
- package/lib/network/gossip/topic.js.map +1 -1
- package/lib/network/libp2p/error.js +1 -2
- package/lib/network/libp2p/error.js.map +1 -1
- package/lib/network/libp2p/index.js.map +1 -1
- package/lib/network/metadata.js +2 -4
- package/lib/network/metadata.js.map +1 -1
- package/lib/network/network.d.ts +1 -1
- package/lib/network/network.d.ts.map +1 -1
- package/lib/network/network.js.map +1 -1
- package/lib/network/peers/client.js +1 -2
- package/lib/network/peers/client.js.map +1 -1
- package/lib/network/peers/datastore.d.ts +3 -0
- package/lib/network/peers/datastore.d.ts.map +1 -1
- package/lib/network/peers/datastore.js.map +1 -1
- package/lib/network/peers/discover.d.ts +7 -0
- package/lib/network/peers/discover.d.ts.map +1 -1
- package/lib/network/peers/discover.js +2 -4
- package/lib/network/peers/discover.js.map +1 -1
- package/lib/network/peers/peerManager.d.ts +1 -0
- package/lib/network/peers/peerManager.d.ts.map +1 -1
- package/lib/network/peers/peerManager.js.map +1 -1
- package/lib/network/peers/peersData.js +1 -2
- package/lib/network/peers/peersData.js.map +1 -1
- package/lib/network/peers/score/interface.js +2 -4
- package/lib/network/peers/score/interface.js.map +1 -1
- package/lib/network/peers/score/score.js.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 +1 -2
- package/lib/network/peers/utils/assertPeerRelevance.js.map +1 -1
- package/lib/network/peers/utils/enrSubnetsDeserialize.js.map +1 -1
- package/lib/network/peers/utils/getConnectedPeerIds.js.map +1 -1
- package/lib/network/peers/utils/prioritizePeers.js +1 -2
- package/lib/network/peers/utils/prioritizePeers.js.map +1 -1
- package/lib/network/peers/utils/subnetMap.js.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.js.map +1 -1
- package/lib/network/processor/gossipQueues/index.js.map +1 -1
- package/lib/network/processor/gossipQueues/indexed.js.map +1 -1
- package/lib/network/processor/gossipQueues/linear.js.map +1 -1
- package/lib/network/processor/gossipQueues/types.js +2 -4
- package/lib/network/processor/gossipQueues/types.js.map +1 -1
- package/lib/network/processor/gossipValidatorFn.js.map +1 -1
- package/lib/network/processor/index.d.ts.map +1 -1
- package/lib/network/processor/index.js +4 -5
- package/lib/network/processor/index.js.map +1 -1
- package/lib/network/reqresp/ReqRespBeaconNode.js.map +1 -1
- package/lib/network/reqresp/handlers/beaconBlocksByHead.js.map +1 -1
- 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.js.map +1 -1
- package/lib/network/reqresp/handlers/blobSidecarsByRoot.js.map +1 -1
- package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.js.map +1 -1
- package/lib/network/reqresp/handlers/dataColumnSidecarsByRoot.js.map +1 -1
- package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRange.js.map +1 -1
- package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRoot.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 +1 -1
- package/lib/network/reqresp/handlers/lightClientFinalityUpdate.js.map +1 -1
- package/lib/network/reqresp/handlers/lightClientOptimisticUpdate.js +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 +6 -2
- package/lib/network/reqresp/handlers/lightClientUpdatesByRange.js.map +1 -1
- package/lib/network/reqresp/interface.js +1 -2
- 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 +35 -9
- package/lib/network/reqresp/protocols.js.map +1 -1
- package/lib/network/reqresp/rateLimit.js +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 +20 -3
- package/lib/network/reqresp/score.js.map +1 -1
- package/lib/network/reqresp/types.js +2 -4
- package/lib/network/reqresp/types.js.map +1 -1
- package/lib/network/reqresp/utils/collect.js.map +1 -1
- package/lib/network/reqresp/utils/collectSequentialBlocksInRange.js +1 -2
- 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.js.map +1 -1
- package/lib/network/subnets/attnetsService.js +1 -2
- package/lib/network/subnets/attnetsService.js.map +1 -1
- package/lib/network/subnets/interface.js.map +1 -1
- package/lib/network/subnets/syncnetsService.d.ts.map +1 -1
- package/lib/network/subnets/syncnetsService.js.map +1 -1
- package/lib/network/subnets/util.js.map +1 -1
- package/lib/network/util.js.map +1 -1
- package/lib/node/nodejs.d.ts +2 -2
- package/lib/node/nodejs.d.ts.map +1 -1
- package/lib/node/nodejs.js +1 -2
- 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 +7 -0
- package/lib/sync/backfill/backfill.d.ts.map +1 -1
- package/lib/sync/backfill/backfill.js +3 -6
- package/lib/sync/backfill/backfill.js.map +1 -1
- package/lib/sync/backfill/errors.js +1 -2
- package/lib/sync/backfill/errors.js.map +1 -1
- package/lib/sync/backfill/verify.js.map +1 -1
- package/lib/sync/constants.d.ts +6 -5
- package/lib/sync/constants.d.ts.map +1 -1
- package/lib/sync/constants.js +6 -5
- package/lib/sync/constants.js.map +1 -1
- package/lib/sync/interface.js +1 -2
- package/lib/sync/interface.js.map +1 -1
- package/lib/sync/range/batch.d.ts +10 -1
- package/lib/sync/range/batch.d.ts.map +1 -1
- package/lib/sync/range/batch.js +44 -16
- package/lib/sync/range/batch.js.map +1 -1
- package/lib/sync/range/chain.d.ts +10 -0
- package/lib/sync/range/chain.d.ts.map +1 -1
- package/lib/sync/range/chain.js +31 -17
- package/lib/sync/range/chain.js.map +1 -1
- package/lib/sync/range/range.d.ts.map +1 -1
- package/lib/sync/range/range.js +2 -4
- package/lib/sync/range/range.js.map +1 -1
- package/lib/sync/range/utils/batches.d.ts +18 -0
- package/lib/sync/range/utils/batches.d.ts.map +1 -1
- package/lib/sync/range/utils/batches.js +38 -0
- 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.js.map +1 -1
- package/lib/sync/range/utils/updateChains.js.map +1 -1
- package/lib/sync/sync.js.map +1 -1
- package/lib/sync/types.js +3 -6
- package/lib/sync/types.js.map +1 -1
- package/lib/sync/unknownBlock.d.ts +23 -0
- 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 +1 -2
- package/lib/sync/utils/downloadByRange.js.map +1 -1
- package/lib/sync/utils/downloadByRoot.d.ts +7 -7
- package/lib/sync/utils/downloadByRoot.d.ts.map +1 -1
- package/lib/sync/utils/downloadByRoot.js +1 -2
- package/lib/sync/utils/downloadByRoot.js.map +1 -1
- package/lib/sync/utils/pendingBlocksTree.js.map +1 -1
- package/lib/sync/utils/rateLimit.js.map +1 -1
- package/lib/sync/utils/remoteSyncType.d.ts.map +1 -1
- package/lib/sync/utils/remoteSyncType.js +2 -4
- package/lib/sync/utils/remoteSyncType.js.map +1 -1
- package/lib/util/address.js.map +1 -1
- package/lib/util/array.js.map +1 -1
- package/lib/util/asyncIterableToEvents.js +1 -2
- package/lib/util/asyncIterableToEvents.js.map +1 -1
- package/lib/util/binarySearch.js.map +1 -1
- package/lib/util/bitArray.js +1 -2
- package/lib/util/bitArray.js.map +1 -1
- package/lib/util/blobs.js.map +1 -1
- package/lib/util/bufferPool.js +1 -2
- package/lib/util/bufferPool.js.map +1 -1
- package/lib/util/chunkify.js.map +1 -1
- package/lib/util/clock.js +1 -2
- package/lib/util/clock.js.map +1 -1
- package/lib/util/dataColumns.js +2 -4
- 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 +1 -2
- 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.js.map +1 -1
- package/lib/util/map.js.map +1 -1
- package/lib/util/metadata.js.map +1 -1
- package/lib/util/multifork.js.map +1 -1
- package/lib/util/numpy.js.map +1 -1
- package/lib/util/peerId.js.map +1 -1
- package/lib/util/profile.js +1 -2
- package/lib/util/profile.js.map +1 -1
- package/lib/util/promises.js.map +1 -1
- package/lib/util/queue/errors.js +1 -2
- package/lib/util/queue/errors.js.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 +1 -2
- package/lib/util/queue/options.js.map +1 -1
- package/lib/util/serializedCache.js.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 +1 -1
- package/lib/util/sszBytes.js.map +1 -1
- package/lib/util/time.js.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 +16 -16
- package/src/api/impl/config/constants.ts +6 -0
- package/src/api/impl/validator/index.ts +20 -7
- package/src/chain/blocks/utils/polarBearBanner.ts +50 -0
- package/src/chain/blocks/verifyBlock.ts +6 -0
- package/src/chain/blocks/verifyExecutionPayloadEnvelope.ts +1 -1
- package/src/chain/errors/executionPayloadBid.ts +12 -4
- package/src/chain/opPools/aggregatedAttestationPool.ts +4 -2
- package/src/chain/prepareNextSlot.ts +59 -34
- package/src/chain/produceBlock/produceBlockBody.ts +17 -5
- package/src/chain/seenCache/seenExecutionPayloadBids.ts +22 -9
- package/src/chain/validation/dataColumnSidecar.ts +27 -17
- package/src/chain/validation/executionPayloadBid.ts +91 -27
- package/src/chain/validatorMonitor.ts +1 -1
- package/src/execution/engine/interface.ts +1 -1
- package/src/execution/engine/types.ts +1 -1
- package/src/metrics/metrics/lodestar.ts +1 -1
- package/src/network/gossip/topic.ts +4 -2
- package/src/network/processor/index.ts +2 -1
- package/src/network/reqresp/handlers/lightClientFinalityUpdate.ts +1 -1
- package/src/network/reqresp/handlers/lightClientOptimisticUpdate.ts +1 -1
- package/src/network/reqresp/handlers/lightClientUpdatesByRange.ts +6 -2
- package/src/network/reqresp/protocols.ts +39 -11
- package/src/network/reqresp/rateLimit.ts +1 -1
- package/src/network/reqresp/score.ts +22 -3
- package/src/sync/constants.ts +6 -5
- package/src/sync/range/batch.ts +50 -12
- package/src/sync/range/chain.ts +36 -16
- package/src/sync/range/utils/batches.ts +44 -0
- package/src/util/sszBytes.ts +1 -1
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"bugs": {
|
|
12
12
|
"url": "https://github.com/ChainSafe/lodestar/issues"
|
|
13
13
|
},
|
|
14
|
-
"version": "1.46.0-dev.
|
|
14
|
+
"version": "1.46.0-dev.b9d4e89e49",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
],
|
|
78
78
|
"scripts": {
|
|
79
79
|
"clean": "rm -rf lib && rm -f *.tsbuildinfo",
|
|
80
|
-
"build": "
|
|
80
|
+
"build": "tsc -p tsconfig.build.json",
|
|
81
81
|
"build:watch": "pnpm run build --watch",
|
|
82
82
|
"build:release": "pnpm clean && pnpm run build",
|
|
83
83
|
"check-build": "node -e \"(async function() { await import('./lib/index.js') })()\"",
|
|
84
|
-
"check-types": "
|
|
84
|
+
"check-types": "tsc",
|
|
85
85
|
"lint": "biome check src/ test/",
|
|
86
86
|
"lint:fix": "pnpm run lint --write",
|
|
87
87
|
"test": "pnpm test:unit && pnpm test:e2e",
|
|
@@ -126,17 +126,17 @@
|
|
|
126
126
|
"@libp2p/peer-id": "^6.0.4",
|
|
127
127
|
"@libp2p/prometheus-metrics": "^5.0.14",
|
|
128
128
|
"@libp2p/tcp": "^11.0.13",
|
|
129
|
-
"@lodestar/api": "^1.46.0-dev.
|
|
130
|
-
"@lodestar/config": "^1.46.0-dev.
|
|
131
|
-
"@lodestar/db": "^1.46.0-dev.
|
|
132
|
-
"@lodestar/fork-choice": "^1.46.0-dev.
|
|
133
|
-
"@lodestar/logger": "^1.46.0-dev.
|
|
134
|
-
"@lodestar/params": "^1.46.0-dev.
|
|
135
|
-
"@lodestar/reqresp": "^1.46.0-dev.
|
|
136
|
-
"@lodestar/state-transition": "^1.46.0-dev.
|
|
137
|
-
"@lodestar/types": "^1.46.0-dev.
|
|
138
|
-
"@lodestar/utils": "^1.46.0-dev.
|
|
139
|
-
"@lodestar/validator": "^1.46.0-dev.
|
|
129
|
+
"@lodestar/api": "^1.46.0-dev.b9d4e89e49",
|
|
130
|
+
"@lodestar/config": "^1.46.0-dev.b9d4e89e49",
|
|
131
|
+
"@lodestar/db": "^1.46.0-dev.b9d4e89e49",
|
|
132
|
+
"@lodestar/fork-choice": "^1.46.0-dev.b9d4e89e49",
|
|
133
|
+
"@lodestar/logger": "^1.46.0-dev.b9d4e89e49",
|
|
134
|
+
"@lodestar/params": "^1.46.0-dev.b9d4e89e49",
|
|
135
|
+
"@lodestar/reqresp": "^1.46.0-dev.b9d4e89e49",
|
|
136
|
+
"@lodestar/state-transition": "^1.46.0-dev.b9d4e89e49",
|
|
137
|
+
"@lodestar/types": "^1.46.0-dev.b9d4e89e49",
|
|
138
|
+
"@lodestar/utils": "^1.46.0-dev.b9d4e89e49",
|
|
139
|
+
"@lodestar/validator": "^1.46.0-dev.b9d4e89e49",
|
|
140
140
|
"@multiformats/multiaddr": "^13.0.1",
|
|
141
141
|
"datastore-core": "^11.0.2",
|
|
142
142
|
"datastore-level": "^12.0.2",
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"@libp2p/interface-internal": "^3.0.13",
|
|
159
159
|
"@libp2p/logger": "^6.2.2",
|
|
160
160
|
"@libp2p/utils": "^7.0.13",
|
|
161
|
-
"@lodestar/spec-test-util": "^1.46.0-dev.
|
|
161
|
+
"@lodestar/spec-test-util": "^1.46.0-dev.b9d4e89e49",
|
|
162
162
|
"@types/js-yaml": "^4.0.5",
|
|
163
163
|
"@types/qs": "^6.9.7",
|
|
164
164
|
"@types/tmp": "^0.2.3",
|
|
@@ -175,5 +175,5 @@
|
|
|
175
175
|
"beacon",
|
|
176
176
|
"blockchain"
|
|
177
177
|
],
|
|
178
|
-
"gitHead": "
|
|
178
|
+
"gitHead": "d3c2dfbe8deed5e07ef7e8454e1cf2bc1af5192b"
|
|
179
179
|
}
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
BUILDER_PAYMENT_THRESHOLD_DENOMINATOR,
|
|
13
13
|
BUILDER_PAYMENT_THRESHOLD_NUMERATOR,
|
|
14
14
|
BUILDER_WITHDRAWAL_PREFIX,
|
|
15
|
+
BYTES_PER_FIELD_ELEMENT,
|
|
15
16
|
COMPOUNDING_WITHDRAWAL_PREFIX,
|
|
16
17
|
CONSOLIDATION_REQUEST_TYPE,
|
|
17
18
|
DEPOSIT_CONTRACT_TREE_DEPTH,
|
|
@@ -26,6 +27,7 @@ import {
|
|
|
26
27
|
DOMAIN_BUILDER_DEPOSIT,
|
|
27
28
|
DOMAIN_CONTRIBUTION_AND_PROOF,
|
|
28
29
|
DOMAIN_DEPOSIT,
|
|
30
|
+
DOMAIN_INCLUSION_LIST_COMMITTEE,
|
|
29
31
|
DOMAIN_PROPOSER_PREFERENCES,
|
|
30
32
|
DOMAIN_PTC_ATTESTER,
|
|
31
33
|
DOMAIN_RANDAO,
|
|
@@ -131,6 +133,7 @@ export const specConstants = {
|
|
|
131
133
|
// Deneb types
|
|
132
134
|
BLOB_TX_TYPE: toHexByte(BLOB_TX_TYPE),
|
|
133
135
|
VERSIONED_HASH_VERSION_KZG: toHexByte(VERSIONED_HASH_VERSION_KZG),
|
|
136
|
+
BYTES_PER_FIELD_ELEMENT,
|
|
134
137
|
|
|
135
138
|
// electra
|
|
136
139
|
UNSET_DEPOSIT_REQUESTS_START_INDEX,
|
|
@@ -148,6 +151,9 @@ export const specConstants = {
|
|
|
148
151
|
DOMAIN_BUILDER_DEPOSIT,
|
|
149
152
|
BUILDER_DEPOSIT_REQUEST_TYPE: toHexByte(BUILDER_DEPOSIT_REQUEST_TYPE),
|
|
150
153
|
BUILDER_EXIT_REQUEST_TYPE: toHexByte(BUILDER_EXIT_REQUEST_TYPE),
|
|
154
|
+
|
|
155
|
+
// heze
|
|
156
|
+
DOMAIN_INCLUSION_LIST_COMMITTEE,
|
|
151
157
|
};
|
|
152
158
|
|
|
153
159
|
/** Convert single-byte numbers to hex strings for API spec compliance */
|
|
@@ -339,12 +339,13 @@ export function getValidatorApi(
|
|
|
339
339
|
* Following activities should be skipped on an Optimistic head (with Syncing status):
|
|
340
340
|
* 1. Attestation if targetRoot is optimistic
|
|
341
341
|
* 2. SyncCommitteeContribution if if the root for which to produce contribution is Optimistic.
|
|
342
|
-
* 3. ProduceBlock if the parentRoot (chain's current head is optimistic
|
|
343
|
-
*
|
|
344
|
-
*
|
|
345
|
-
*
|
|
346
|
-
*
|
|
347
|
-
*
|
|
342
|
+
* 3. ProduceBlock if the parentRoot (chain's current head) is optimistic. Must be checked
|
|
343
|
+
* explicitly as only local payload production consults the EL, blinded blocks from an
|
|
344
|
+
* external builder or bid based blocks (gloas) can be produced without a synced EL.
|
|
345
|
+
* 4. SyncCommitteeSignature (base sync committee message) is aborted in the validator client
|
|
346
|
+
* (see SyncCommitteeService) when the head root it would sign is optimistic, since it is
|
|
347
|
+
* produced from the head root without a beacon-node produce endpoint to gate here. Spec:
|
|
348
|
+
* https://github.com/ethereum/consensus-specs/blob/v1.6.1/sync/optimistic.md#participating-in-sync-committees
|
|
348
349
|
*/
|
|
349
350
|
|
|
350
351
|
function notOnOptimisticBlockRoot(beaconBlockRoot: Root): void {
|
|
@@ -545,6 +546,12 @@ export function getValidatorApi(
|
|
|
545
546
|
const parentBlock = chain.getProposerHead(slot);
|
|
546
547
|
const {blockRoot: parentBlockRootHex, slot: parentSlot} = parentBlock;
|
|
547
548
|
const parentBlockRoot = fromHex(parentBlockRootHex);
|
|
549
|
+
// An optimistic validator MUST NOT produce a block
|
|
550
|
+
if (isOptimisticBlock(parentBlock)) {
|
|
551
|
+
throw new NodeIsSyncing(
|
|
552
|
+
`Parent block's execution payload not yet validated, executionPayloadBlockHash=${parentBlock.executionPayloadBlockHash}`
|
|
553
|
+
);
|
|
554
|
+
}
|
|
548
555
|
notOnOutOfRangeData(parentBlockRoot);
|
|
549
556
|
metrics?.blockProductionSlotDelta.set(slot - parentSlot);
|
|
550
557
|
|
|
@@ -870,6 +877,12 @@ export function getValidatorApi(
|
|
|
870
877
|
const parentBlock = chain.getProposerHead(slot);
|
|
871
878
|
const {blockRoot: parentBlockRootHex, slot: parentSlot} = parentBlock;
|
|
872
879
|
const parentBlockRoot = fromHex(parentBlockRootHex);
|
|
880
|
+
// An optimistic validator MUST NOT produce a block
|
|
881
|
+
if (isOptimisticBlock(parentBlock)) {
|
|
882
|
+
throw new NodeIsSyncing(
|
|
883
|
+
`Parent block's execution payload not yet validated, executionPayloadBlockHash=${parentBlock.executionPayloadBlockHash}`
|
|
884
|
+
);
|
|
885
|
+
}
|
|
873
886
|
notOnOutOfRangeData(parentBlockRoot);
|
|
874
887
|
metrics?.blockProductionSlotDelta.set(slot - parentSlot);
|
|
875
888
|
|
|
@@ -1808,7 +1821,7 @@ export function getValidatorApi(
|
|
|
1808
1821
|
const filteredRegistrations = registrations.filter((registration) => {
|
|
1809
1822
|
const {pubkey} = registration.message;
|
|
1810
1823
|
const validatorIndex = chain.pubkeyCache.getIndex(pubkey);
|
|
1811
|
-
if (validatorIndex === null) return false;
|
|
1824
|
+
if (validatorIndex === null || validatorIndex >= headState.validatorCount) return false;
|
|
1812
1825
|
|
|
1813
1826
|
const validator = headState.getValidator(validatorIndex);
|
|
1814
1827
|
const status = getValidatorStatus(validator, currentEpoch);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export const GLOAS_POLAR_BEAR_BANNER = String.raw`
|
|
2
|
+
|
|
3
|
+
__ . .- '%%%░░░░░
|
|
4
|
+
/ '-. , ' '%%%░░░░
|
|
5
|
+
_.--""""--.._; . * .-' '%%%%░░
|
|
6
|
+
\ / _."" .' '-._ ' . '%%%%
|
|
7
|
+
L ."; ; ; '-. . / ' * '""
|
|
8
|
+
Ø / / .' ' ; '. ' ; |
|
|
9
|
+
D / ; e ' ) ( ' ; \ . .' ,:
|
|
10
|
+
E ; : P ( ' ) : '-.\ ' '
|
|
11
|
+
S ; ; B ).( '. '; ' '
|
|
12
|
+
T : : S (/:\) \ :
|
|
13
|
+
A : \ ': / : \ \ '.;
|
|
14
|
+
R \ \ '; \\ // ; ;
|
|
15
|
+
/ \ \ : .' \ \|/ | /
|
|
16
|
+
'>' : ' '.; |
|
|
17
|
+
/ ,' / '. ;/ _\
|
|
18
|
+
;,' ; '. '.; '-.
|
|
19
|
+
;' .' : '. '. / \, \ \ \
|
|
20
|
+
\ :,' : '. '. \ ; ::\_/_/_/::
|
|
21
|
+
~| .-=:.-" -,- "-.,=-.\ ;.; :::; ; ;::
|
|
22
|
+
~|\ |('.' : .')| \: '. :::::::
|
|
23
|
+
~|:\ \\/ : \// ; \ _____
|
|
24
|
+
~~\:\ ■ : .:. : _/ ; \hjw:
|
|
25
|
+
~~~\/ | ; ; ; | \"""
|
|
26
|
+
~~.' ■ : _ _ ; / ; /|~~
|
|
27
|
+
~/ | '. \'; ;'/ .' .' / /:|~~
|
|
28
|
+
| ■ ! : : !_.' / .--::/~~~
|
|
29
|
+
|\___ | '.: :.'/\ ; ____.':|:|/~~~~
|
|
30
|
+
\:::|\ ■ \'_'/ | : : ___/|:::|:'"""~~~~~
|
|
31
|
+
~'""|:\ | ;"^" | ! :__/|::|/""""~~~~~~~~~~
|
|
32
|
+
~~~~\::\_____ .-' | ; |::|/""~~~~~~~~~~~~~~~~
|
|
33
|
+
~~~~~\:|::::|\ / / / / / /"""~~~~~~~~~~~~~~~~~~~~
|
|
34
|
+
~~~~~~\|::::|:'--\_\_\__.'-| ;~~~~~~~~~~~~~~~~~~~~~~~~
|
|
35
|
+
~~~~~~~~""""~\::::::::::::/ .'~~~~~~~~~~~~~<><~~~~~~~~~
|
|
36
|
+
~~~~~~~~~~~~~~""""'"""".-' /~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
37
|
+
~~~~~~~__,------.__.--/ , , , |/--._~~~~~~~~~~~~~~~~~~~~~~~
|
|
38
|
+
~~~~~~/ | . :\| | |v' \__~~~~~~~~~~~~~~~~~~~~
|
|
39
|
+
~~~~~|\ ■ /:\ :::v-;v-':: \_~~~~~~~~~~~~~~~~~~
|
|
40
|
+
~~~~~\:\ / : \ ::::::::: \~~~~~~~~~~~~~~~~~
|
|
41
|
+
~~~~~~\|'-. / : \ /|~~~~~~~~~~~~~~~~
|
|
42
|
+
~~~~~~~~': \ \'. ,'/ ___ ____/:/~~~~~~~~~<><~~~~
|
|
43
|
+
~~~~~~~~~~\|: \ ' / /|:|\ /|:::|/~~~~~~~~~~~~~~~~~
|
|
44
|
+
~~~~~~~~~~~|: \:/ //"""\\ /:/"""~~~~~~~~~~~~~~~~~~~
|
|
45
|
+
~~~><>~~~~~|\ ' //~~~~~\\______/:/~~~~~~~~~~~~~~~~~~~~~~~
|
|
46
|
+
~~~~~~~~~~~'|\____//~~~~~~~\|GLOAS|/~~~~~~~~<><~~~~~~~~~~~~~
|
|
47
|
+
~~~~~~~~~~~~\|:::|/~~~~~~~~~'"""""'~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
48
|
+
~~~~~~~~~~~~~'"""'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
49
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~eth
|
|
50
|
+
`;
|
|
@@ -13,6 +13,7 @@ import {ImportBlockOpts} from "./types.js";
|
|
|
13
13
|
import {DENEB_BLOWFISH_BANNER} from "./utils/blowfishBanner.js";
|
|
14
14
|
import {ELECTRA_GIRAFFE_BANNER} from "./utils/giraffeBanner.js";
|
|
15
15
|
import {CAPELLA_OWL_BANNER} from "./utils/ownBanner.js";
|
|
16
|
+
import {GLOAS_POLAR_BEAR_BANNER} from "./utils/polarBearBanner.js";
|
|
16
17
|
import {FULU_ZEBRA_BANNER} from "./utils/zebraBanner.js";
|
|
17
18
|
import {verifyBlocksDataAvailability} from "./verifyBlocksDataAvailability.js";
|
|
18
19
|
import {SegmentExecStatus, verifyBlocksExecutionPayload} from "./verifyBlocksExecutionPayloads.js";
|
|
@@ -230,6 +231,11 @@ export async function verifyBlocksInEpoch(
|
|
|
230
231
|
this.logger.info("Activating peerDAS", {epoch: this.config.FULU_FORK_EPOCH});
|
|
231
232
|
break;
|
|
232
233
|
|
|
234
|
+
case ForkName.gloas:
|
|
235
|
+
this.logger.info(GLOAS_POLAR_BEAR_BANNER);
|
|
236
|
+
this.logger.info("Activating ePBS", {epoch: this.config.GLOAS_FORK_EPOCH});
|
|
237
|
+
break;
|
|
238
|
+
|
|
233
239
|
default:
|
|
234
240
|
}
|
|
235
241
|
}
|
|
@@ -61,7 +61,7 @@ export function verifyExecutionPayloadEnvelope(
|
|
|
61
61
|
`Prev randao mismatch between bid and payload bid=${toHex(bid.prevRandao)} payload=${toHex(payload.prevRandao)}`
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
|
-
if (bid.gasLimit !== payload.gasLimit) {
|
|
64
|
+
if (bid.gasLimit !== BigInt(payload.gasLimit)) {
|
|
65
65
|
throw new Error(`Gas limit mismatch between payload and bid payload=${payload.gasLimit} bid=${bid.gasLimit}`);
|
|
66
66
|
}
|
|
67
67
|
if (!byteArrayEquals(bid.blockHash, payload.blockHash)) {
|
|
@@ -5,6 +5,7 @@ export enum ExecutionPayloadBidErrorCode {
|
|
|
5
5
|
BUILDER_NOT_ELIGIBLE = "EXECUTION_PAYLOAD_BID_ERROR_BUILDER_NOT_ELIGIBLE",
|
|
6
6
|
INVALID_BUILDER_VERSION = "EXECUTION_PAYLOAD_BID_ERROR_INVALID_BUILDER_VERSION",
|
|
7
7
|
NON_ZERO_EXECUTION_PAYMENT = "EXECUTION_PAYLOAD_BID_ERROR_NON_ZERO_EXECUTION_PAYMENT",
|
|
8
|
+
INCOMPATIBLE_WITH_HEAD = "EXECUTION_PAYLOAD_BID_ERROR_INCOMPATIBLE_WITH_HEAD",
|
|
8
9
|
BID_ALREADY_KNOWN = "EXECUTION_PAYLOAD_BID_ERROR_BID_ALREADY_KNOWN",
|
|
9
10
|
BID_TOO_LOW = "EXECUTION_PAYLOAD_BID_ERROR_BID_TOO_LOW",
|
|
10
11
|
BID_TOO_HIGH = "EXECUTION_PAYLOAD_BID_ERROR_BID_TOO_HIGH",
|
|
@@ -31,7 +32,14 @@ export type ExecutionPayloadBidErrorType =
|
|
|
31
32
|
| {
|
|
32
33
|
code: ExecutionPayloadBidErrorCode.NON_ZERO_EXECUTION_PAYMENT;
|
|
33
34
|
builderIndex: BuilderIndex;
|
|
34
|
-
executionPayment:
|
|
35
|
+
executionPayment: bigint;
|
|
36
|
+
}
|
|
37
|
+
| {
|
|
38
|
+
code: ExecutionPayloadBidErrorCode.INCOMPATIBLE_WITH_HEAD;
|
|
39
|
+
slot: Slot;
|
|
40
|
+
parentBlockRoot: RootHex;
|
|
41
|
+
parentBlockHash: RootHex;
|
|
42
|
+
headBlockRoot: RootHex;
|
|
35
43
|
}
|
|
36
44
|
| {
|
|
37
45
|
code: ExecutionPayloadBidErrorCode.BID_ALREADY_KNOWN;
|
|
@@ -73,9 +81,9 @@ export type ExecutionPayloadBidErrorType =
|
|
|
73
81
|
| {
|
|
74
82
|
code: ExecutionPayloadBidErrorCode.PROPOSER_PREFERENCES_GAS_LIMIT_MISMATCH;
|
|
75
83
|
builderIndex: BuilderIndex;
|
|
76
|
-
bidGasLimit:
|
|
77
|
-
parentGasLimit:
|
|
78
|
-
targetGasLimit:
|
|
84
|
+
bidGasLimit: bigint;
|
|
85
|
+
parentGasLimit: bigint;
|
|
86
|
+
targetGasLimit: bigint;
|
|
79
87
|
};
|
|
80
88
|
|
|
81
89
|
export class ExecutionPayloadBidError extends GossipActionError<ExecutionPayloadBidErrorType> {}
|
|
@@ -234,6 +234,7 @@ export class AggregatedAttestationPool {
|
|
|
234
234
|
const stateEpoch = state.epoch;
|
|
235
235
|
const statePrevEpoch = stateEpoch - 1;
|
|
236
236
|
const rootCache = new RootCache(state);
|
|
237
|
+
const gloasState = isStatePostGloas(state) ? state : null;
|
|
237
238
|
|
|
238
239
|
const notSeenValidatorsFn = getNotSeenValidatorsFn(this.config, shufflingCache, state);
|
|
239
240
|
const validateAttestationDataFn = getValidateAttestationDataFn(forkChoice, state);
|
|
@@ -361,7 +362,8 @@ export class AggregatedAttestationPool {
|
|
|
361
362
|
inclusionDistance,
|
|
362
363
|
stateEpoch,
|
|
363
364
|
rootCache,
|
|
364
|
-
|
|
365
|
+
gloasState?.executionPayloadAvailability ?? null,
|
|
366
|
+
gloasState?.latestExecutionPayloadBid.slot ?? null
|
|
365
367
|
);
|
|
366
368
|
|
|
367
369
|
const weight =
|
|
@@ -431,7 +433,7 @@ export class AggregatedAttestationPool {
|
|
|
431
433
|
);
|
|
432
434
|
} else {
|
|
433
435
|
const attestationGroupsByIndex = this.attestationGroupByIndexByDataHexBySlot.get(bySlot);
|
|
434
|
-
if (!attestationGroupsByIndex)
|
|
436
|
+
if (!attestationGroupsByIndex) return [];
|
|
435
437
|
attestationGroupsArr = Array.from(attestationGroupsByIndex.values());
|
|
436
438
|
}
|
|
437
439
|
|
|
@@ -1,7 +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 {
|
|
4
|
+
import {
|
|
5
|
+
ForkPostBellatrix,
|
|
6
|
+
ForkSeq,
|
|
7
|
+
SLOTS_PER_EPOCH,
|
|
8
|
+
isForkPostBellatrix,
|
|
9
|
+
isForkPostFulu,
|
|
10
|
+
isForkPostGloas,
|
|
11
|
+
} from "@lodestar/params";
|
|
5
12
|
import {
|
|
6
13
|
IBeaconStateView,
|
|
7
14
|
IBeaconStateViewBellatrix,
|
|
@@ -11,7 +18,7 @@ import {
|
|
|
11
18
|
isStatePostBellatrix,
|
|
12
19
|
isStatePostGloas,
|
|
13
20
|
} from "@lodestar/state-transition";
|
|
14
|
-
import {Bytes32, Slot} from "@lodestar/types";
|
|
21
|
+
import {Bytes32, Slot, ValidatorIndex} from "@lodestar/types";
|
|
15
22
|
import {Logger, fromHex, isErrorAborted, sleep} from "@lodestar/utils";
|
|
16
23
|
import {GENESIS_SLOT, ZERO_HASH_HEX} from "../constants/constants.js";
|
|
17
24
|
import {BuilderStatus} from "../execution/builder/http.js";
|
|
@@ -111,29 +118,36 @@ export class PrepareNextSlotScheduler {
|
|
|
111
118
|
: null;
|
|
112
119
|
const start = Date.now();
|
|
113
120
|
// No need to wait for this or the clock drift
|
|
114
|
-
// Pre Bellatrix: we only do precompute state transition for the last slot of epoch
|
|
115
|
-
// For Bellatrix, we always do the `processSlots()` to prepare payload for the next slot
|
|
116
|
-
const prepareState = await this.chain.regen.getBlockSlotState(
|
|
117
|
-
headBlock,
|
|
118
|
-
prepareSlot,
|
|
119
|
-
// the slot 0 of next epoch will likely use this Previous Root Checkpoint state for state transition so we transfer cache here
|
|
120
|
-
// the resulting state with cache will be cached in Checkpoint State Cache which is used for the upcoming block processing
|
|
121
|
-
// for other slots dontTransferCached=true because we don't run state transition on this state
|
|
122
|
-
{dontTransferCache: !isEpochTransition},
|
|
123
|
-
RegenCaller.precomputeEpoch
|
|
124
|
-
);
|
|
125
|
-
|
|
126
121
|
if (isForkPostBellatrix(fork)) {
|
|
127
|
-
|
|
122
|
+
let preparedState: IBeaconStateView | undefined;
|
|
123
|
+
|
|
124
|
+
const getProposerIndex = async (): Promise<ValidatorIndex> => {
|
|
125
|
+
if (isForkPostFulu(fork)) {
|
|
126
|
+
// getBeaconProposer covers the current + next epoch; should not throw
|
|
127
|
+
// PROPOSER_EPOCH_MISMATCH here due to the PREPARE_EPOCH_LIMIT check above.
|
|
128
|
+
return this.chain.getHeadState().getBeaconProposer(prepareSlot);
|
|
129
|
+
}
|
|
130
|
+
// the slot 0 of next epoch will likely use this Previous Root Checkpoint state for state transition so we transfer cache here
|
|
131
|
+
// the resulting state with cache will be cached in Checkpoint State Cache which is used for the upcoming block processing
|
|
132
|
+
// for other slots dontTransferCached=true because we don't run state transition on this state
|
|
133
|
+
preparedState = await this.chain.regen.getBlockSlotState(
|
|
134
|
+
headBlock,
|
|
135
|
+
prepareSlot,
|
|
136
|
+
{dontTransferCache: !isEpochTransition},
|
|
137
|
+
RegenCaller.precomputeEpoch
|
|
138
|
+
);
|
|
139
|
+
return preparedState.getBeaconProposer(prepareSlot);
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
const proposerIndex = await getProposerIndex();
|
|
128
143
|
const feeRecipient = this.chain.beaconProposerCache.get(proposerIndex);
|
|
129
|
-
let updatedPrepareState = prepareState;
|
|
130
144
|
|
|
131
145
|
if (feeRecipient) {
|
|
132
146
|
// If we are proposing next slot, we need to predict if we can proposer-boost-reorg or not
|
|
133
147
|
const proposerHead = this.chain.predictProposerHead(clockSlot);
|
|
134
148
|
const {slot: proposerHeadSlot, blockRoot: proposerHeadRoot} = proposerHead;
|
|
135
149
|
|
|
136
|
-
// If we predict we can reorg,
|
|
150
|
+
// If we predict we can reorg, we build on the proposer head (parent) block instead
|
|
137
151
|
if (proposerHeadRoot !== headRoot || proposerHeadSlot !== headSlot) {
|
|
138
152
|
this.logger.verbose("Weak head detected. May build on parent block instead", {
|
|
139
153
|
proposerHeadSlot,
|
|
@@ -142,13 +156,6 @@ export class PrepareNextSlotScheduler {
|
|
|
142
156
|
headRoot,
|
|
143
157
|
});
|
|
144
158
|
this.metrics?.weakHeadDetected.inc();
|
|
145
|
-
updatedPrepareState = await this.chain.regen.getBlockSlotState(
|
|
146
|
-
proposerHead,
|
|
147
|
-
prepareSlot,
|
|
148
|
-
// only transfer cache if epoch transition because that's the state we will use to stateTransition() the 1st block of epoch
|
|
149
|
-
{dontTransferCache: !isEpochTransition},
|
|
150
|
-
RegenCaller.predictProposerHead
|
|
151
|
-
);
|
|
152
159
|
updatedHead = proposerHead;
|
|
153
160
|
}
|
|
154
161
|
|
|
@@ -165,30 +172,41 @@ export class PrepareNextSlotScheduler {
|
|
|
165
172
|
}
|
|
166
173
|
}
|
|
167
174
|
|
|
168
|
-
|
|
175
|
+
// post-fulu we'll always reach here because preparedState is undefined
|
|
176
|
+
if (preparedState === undefined || updatedHead !== headBlock) {
|
|
177
|
+
preparedState = await this.chain.regen.getBlockSlotState(
|
|
178
|
+
updatedHead,
|
|
179
|
+
prepareSlot,
|
|
180
|
+
// only transfer cache if epoch transition because that's the state we will use to stateTransition() the 1st block of epoch
|
|
181
|
+
{dontTransferCache: !isEpochTransition},
|
|
182
|
+
updatedHead === headBlock ? RegenCaller.precomputeEpoch : RegenCaller.predictProposerHead
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
if (!isStatePostBellatrix(preparedState)) {
|
|
169
187
|
throw new Error("Expected Bellatrix state for payload attributes");
|
|
170
188
|
}
|
|
171
189
|
|
|
172
190
|
let parentBlockHash: Bytes32;
|
|
173
191
|
// Apply parent payload once here as it's reused by EL prep and SSE emit below
|
|
174
|
-
let stateAfterParentPayload: IBeaconStateViewBellatrix =
|
|
175
|
-
if (isStatePostGloas(
|
|
176
|
-
// Spec: should_build_on_full(store, head)
|
|
192
|
+
let stateAfterParentPayload: IBeaconStateViewBellatrix = preparedState;
|
|
193
|
+
if (isStatePostGloas(preparedState)) {
|
|
194
|
+
// Spec: should_build_on_full(store, head, slot) - see produceBlockBody.ts for context.
|
|
177
195
|
if (this.chain.forkChoice.shouldBuildOnFull(updatedHead, prepareSlot)) {
|
|
178
|
-
parentBlockHash =
|
|
196
|
+
parentBlockHash = preparedState.latestExecutionPayloadBid.blockHash;
|
|
179
197
|
// Skip applying parent payload unless we're proposing the next slot or have to emit payload_attributes events
|
|
180
198
|
if (feeRecipient !== undefined || this.chain.opts.emitPayloadAttributes === true) {
|
|
181
199
|
const parentExecutionRequests = await this.chain.getParentExecutionRequests(
|
|
182
200
|
updatedHead.slot,
|
|
183
201
|
updatedHead.blockRoot
|
|
184
202
|
);
|
|
185
|
-
stateAfterParentPayload =
|
|
203
|
+
stateAfterParentPayload = preparedState.withParentPayloadApplied(parentExecutionRequests);
|
|
186
204
|
}
|
|
187
205
|
} else {
|
|
188
|
-
parentBlockHash =
|
|
206
|
+
parentBlockHash = preparedState.latestExecutionPayloadBid.parentBlockHash;
|
|
189
207
|
}
|
|
190
208
|
} else {
|
|
191
|
-
parentBlockHash =
|
|
209
|
+
parentBlockHash = preparedState.latestExecutionPayloadHeader.blockHash;
|
|
192
210
|
}
|
|
193
211
|
|
|
194
212
|
if (feeRecipient) {
|
|
@@ -221,7 +239,7 @@ export class PrepareNextSlotScheduler {
|
|
|
221
239
|
});
|
|
222
240
|
}
|
|
223
241
|
|
|
224
|
-
this.computeStateHashTreeRoot(
|
|
242
|
+
this.computeStateHashTreeRoot(preparedState, isEpochTransition);
|
|
225
243
|
|
|
226
244
|
// If emitPayloadAttributes is true emit a SSE payloadAttributes event for
|
|
227
245
|
// every slot. Without the flag, only emit the event if we are proposing in the next slot.
|
|
@@ -239,7 +257,14 @@ export class PrepareNextSlotScheduler {
|
|
|
239
257
|
this.chain.emitter.emit(routes.events.EventType.payloadAttributes, {data, version: fork});
|
|
240
258
|
}
|
|
241
259
|
} else {
|
|
242
|
-
|
|
260
|
+
// Pre-bellatrix only reaches here at an epoch transition to precompute the next epoch state
|
|
261
|
+
const preparedState = await this.chain.regen.getBlockSlotState(
|
|
262
|
+
headBlock,
|
|
263
|
+
prepareSlot,
|
|
264
|
+
{dontTransferCache: !isEpochTransition},
|
|
265
|
+
RegenCaller.precomputeEpoch
|
|
266
|
+
);
|
|
267
|
+
this.computeStateHashTreeRoot(preparedState, isEpochTransition);
|
|
243
268
|
}
|
|
244
269
|
|
|
245
270
|
// assuming there is no reorg, it caches the checkpoint state & helps avoid doing a full state transition in the next slot
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import {BitArray} from "@chainsafe/ssz";
|
|
1
2
|
import {ChainForkConfig} from "@lodestar/config";
|
|
2
3
|
import {IForkChoice, ProtoBlock, getSafeExecutionBlockHash} from "@lodestar/fork-choice";
|
|
3
4
|
import {
|
|
@@ -10,6 +11,7 @@ import {
|
|
|
10
11
|
ForkPostGloas,
|
|
11
12
|
ForkPreGloas,
|
|
12
13
|
ForkSeq,
|
|
14
|
+
INCLUSION_LIST_COMMITTEE_SIZE,
|
|
13
15
|
isForkPostAltair,
|
|
14
16
|
isForkPostBellatrix,
|
|
15
17
|
isForkPostGloas,
|
|
@@ -49,6 +51,7 @@ import {
|
|
|
49
51
|
electra,
|
|
50
52
|
fulu,
|
|
51
53
|
gloas,
|
|
54
|
+
heze,
|
|
52
55
|
ssz,
|
|
53
56
|
} from "@lodestar/types";
|
|
54
57
|
import {GWEI_TO_WEI, Logger, byteArrayEquals, fromHex, sleep, toHex, toPubkeyHex, toRootHex} from "@lodestar/utils";
|
|
@@ -276,7 +279,7 @@ export async function produceBlockBody<T extends BlockType>(
|
|
|
276
279
|
let parentExecutionRequests: gloas.ExecutionRequests;
|
|
277
280
|
// Apply parent payload once here as it's reused by EL prep and voluntary exit filtering below
|
|
278
281
|
let stateAfterParentPayload: IBeaconStateViewBellatrix = currentState;
|
|
279
|
-
// Spec: should_build_on_full(store, head). `parentBlock` is the proposer's head
|
|
282
|
+
// Spec: should_build_on_full(store, head, slot). `parentBlock` is the proposer's head
|
|
280
283
|
// (set by chain.getProposerHead(slot)). Returns false when the PTC majority signalled
|
|
281
284
|
// the blob data is not available or the payload was not timely, forcing a build on EMPTY (reorg).
|
|
282
285
|
const isBuildingOnFull = this.forkChoice.shouldBuildOnFull(parentBlock, blockSlot);
|
|
@@ -345,14 +348,18 @@ export async function produceBlockBody<T extends BlockType>(
|
|
|
345
348
|
blockHash: executionPayload.blockHash,
|
|
346
349
|
prevRandao: currentState.getRandaoMix(currentState.epoch),
|
|
347
350
|
feeRecipient: executionPayload.feeRecipient,
|
|
348
|
-
gasLimit: executionPayload.gasLimit,
|
|
351
|
+
gasLimit: BigInt(executionPayload.gasLimit),
|
|
349
352
|
builderIndex: BUILDER_INDEX_SELF_BUILD,
|
|
350
353
|
slot: blockSlot,
|
|
351
354
|
value: 0,
|
|
352
|
-
executionPayment:
|
|
355
|
+
executionPayment: 0n,
|
|
353
356
|
blobKzgCommitments: blobsBundle.commitments,
|
|
354
357
|
executionRequestsRoot: ssz.gloas.ExecutionRequests.hashTreeRoot(executionRequests as gloas.ExecutionRequests),
|
|
355
358
|
};
|
|
359
|
+
if (ForkSeq[fork] >= ForkSeq.heze) {
|
|
360
|
+
// TODO HEZE: populate from inclusion list pool once IL aggregation is wired up.
|
|
361
|
+
(bid as heze.ExecutionPayloadBid).inclusionListBits = BitArray.fromBitLen(INCLUSION_LIST_COMMITTEE_SIZE);
|
|
362
|
+
}
|
|
356
363
|
const signedBid: gloas.SignedExecutionPayloadBid = {
|
|
357
364
|
message: bid,
|
|
358
365
|
signature: G2_POINT_AT_INFINITY,
|
|
@@ -927,6 +934,11 @@ function preparePayloadAttributes(
|
|
|
927
934
|
);
|
|
928
935
|
}
|
|
929
936
|
|
|
937
|
+
if (ForkSeq[fork] >= ForkSeq.heze) {
|
|
938
|
+
// TODO HEZE: populate from inclusion list pool once IL aggregation is wired up.
|
|
939
|
+
(payloadAttributes as heze.SSEPayloadAttributes["payloadAttributes"]).inclusionListTransactions = [];
|
|
940
|
+
}
|
|
941
|
+
|
|
930
942
|
return payloadAttributes;
|
|
931
943
|
}
|
|
932
944
|
|
|
@@ -949,7 +961,7 @@ function getProposerTargetGasLimit(
|
|
|
949
961
|
prepareSlot: Slot,
|
|
950
962
|
parentBlockRoot: Root,
|
|
951
963
|
parentBlockHash: Bytes32
|
|
952
|
-
):
|
|
964
|
+
): bigint {
|
|
953
965
|
const parentBlockRootHex = toRootHex(parentBlockRoot);
|
|
954
966
|
const parentBlock = chain.forkChoice.getBlockHexDefaultStatus(parentBlockRootHex);
|
|
955
967
|
const dependentRootHex = (() => {
|
|
@@ -979,7 +991,7 @@ function getProposerTargetGasLimit(
|
|
|
979
991
|
`Cannot resolve parent payload gas_limit for proposer targetGasLimit fallback parentBlockRoot=${parentBlockRootHex} parentBlockHash=${toRootHex(parentBlockHash)}`
|
|
980
992
|
);
|
|
981
993
|
}
|
|
982
|
-
return parentPayloadVariant.executionPayloadGasLimit;
|
|
994
|
+
return BigInt(parentPayloadVariant.executionPayloadGasLimit);
|
|
983
995
|
}
|
|
984
996
|
|
|
985
997
|
export async function produceCommonBlockBody<T extends BlockType>(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {BuilderIndex, Slot} from "@lodestar/types";
|
|
1
|
+
import {BuilderIndex, RootHex, Slot} from "@lodestar/types";
|
|
2
2
|
import {MapDef} from "@lodestar/utils";
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -7,29 +7,42 @@ import {MapDef} from "@lodestar/utils";
|
|
|
7
7
|
const SLOTS_RETAINED = 2;
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Tracks execution payload bids we've already seen per
|
|
10
|
+
* Tracks execution payload bids we've already seen per
|
|
11
|
+
* (slot, builder, parent block hash, parent block root).
|
|
11
12
|
*/
|
|
12
13
|
export class SeenExecutionPayloadBids {
|
|
13
|
-
private readonly
|
|
14
|
+
private readonly branchesByBuilderBySlot = new MapDef<Slot, MapDef<BuilderIndex, Set<string>>>(
|
|
15
|
+
() => new MapDef<BuilderIndex, Set<string>>(() => new Set<string>())
|
|
16
|
+
);
|
|
14
17
|
private lowestPermissibleSlot: Slot = 0;
|
|
15
18
|
|
|
16
|
-
isKnown(slot: Slot, builderIndex: BuilderIndex): boolean {
|
|
17
|
-
return
|
|
19
|
+
isKnown(slot: Slot, builderIndex: BuilderIndex, parentBlockHash: RootHex, parentBlockRoot: RootHex): boolean {
|
|
20
|
+
return (
|
|
21
|
+
this.branchesByBuilderBySlot.get(slot)?.get(builderIndex)?.has(branchKey(parentBlockHash, parentBlockRoot)) ===
|
|
22
|
+
true
|
|
23
|
+
);
|
|
18
24
|
}
|
|
19
25
|
|
|
20
|
-
add(slot: Slot, builderIndex: BuilderIndex): void {
|
|
26
|
+
add(slot: Slot, builderIndex: BuilderIndex, parentBlockHash: RootHex, parentBlockRoot: RootHex): void {
|
|
21
27
|
if (slot < this.lowestPermissibleSlot) {
|
|
22
28
|
throw Error(`slot ${slot} < lowestPermissibleSlot ${this.lowestPermissibleSlot}`);
|
|
23
29
|
}
|
|
24
|
-
this.
|
|
30
|
+
this.branchesByBuilderBySlot
|
|
31
|
+
.getOrDefault(slot)
|
|
32
|
+
.getOrDefault(builderIndex)
|
|
33
|
+
.add(branchKey(parentBlockHash, parentBlockRoot));
|
|
25
34
|
}
|
|
26
35
|
|
|
27
36
|
prune(currentSlot: Slot): void {
|
|
28
37
|
this.lowestPermissibleSlot = Math.max(currentSlot - SLOTS_RETAINED, 0);
|
|
29
|
-
for (const slot of this.
|
|
38
|
+
for (const slot of this.branchesByBuilderBySlot.keys()) {
|
|
30
39
|
if (slot < this.lowestPermissibleSlot) {
|
|
31
|
-
this.
|
|
40
|
+
this.branchesByBuilderBySlot.delete(slot);
|
|
32
41
|
}
|
|
33
42
|
}
|
|
34
43
|
}
|
|
35
44
|
}
|
|
45
|
+
|
|
46
|
+
function branchKey(parentBlockHash: RootHex, parentBlockRoot: RootHex): string {
|
|
47
|
+
return `${parentBlockHash}:${parentBlockRoot}`;
|
|
48
|
+
}
|