@lodestar/beacon-node 1.47.0-dev.d2f4b96574 → 1.47.0-dev.d79d81f994
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/beacon/blocks/index.d.ts.map +1 -1
- package/lib/api/impl/beacon/blocks/index.js +47 -18
- package/lib/api/impl/beacon/blocks/index.js.map +1 -1
- package/lib/api/impl/beacon/pool/index.d.ts.map +1 -1
- package/lib/api/impl/beacon/pool/index.js +25 -2
- package/lib/api/impl/beacon/pool/index.js.map +1 -1
- package/lib/api/impl/beacon/state/utils.d.ts +2 -1
- package/lib/api/impl/beacon/state/utils.d.ts.map +1 -1
- package/lib/api/impl/beacon/state/utils.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 +12 -3
- package/lib/api/impl/events/index.js.map +1 -1
- package/lib/api/impl/lodestar/index.d.ts.map +1 -1
- package/lib/api/impl/lodestar/index.js +12 -13
- package/lib/api/impl/lodestar/index.js.map +1 -1
- package/lib/api/impl/validator/index.d.ts.map +1 -1
- package/lib/api/impl/validator/index.js +238 -65
- package/lib/api/impl/validator/index.js.map +1 -1
- package/lib/api/impl/validator/utils.d.ts +5 -0
- package/lib/api/impl/validator/utils.d.ts.map +1 -1
- package/lib/api/impl/validator/utils.js +18 -12
- package/lib/api/impl/validator/utils.js.map +1 -1
- package/lib/api/rest/base.d.ts.map +1 -1
- package/lib/api/rest/base.js +7 -0
- package/lib/api/rest/base.js.map +1 -1
- package/lib/chain/archiveStore/archiveStore.js +1 -1
- package/lib/chain/archiveStore/archiveStore.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/metrics.d.ts.map +1 -1
- package/lib/chain/archiveStore/historicalState/metrics.js +21 -0
- package/lib/chain/archiveStore/historicalState/metrics.js.map +1 -1
- package/lib/chain/blocks/importBlock.d.ts.map +1 -1
- package/lib/chain/blocks/importBlock.js +2 -7
- package/lib/chain/blocks/importBlock.js.map +1 -1
- package/lib/chain/blocks/importExecutionPayload.d.ts +3 -2
- package/lib/chain/blocks/importExecutionPayload.d.ts.map +1 -1
- package/lib/chain/blocks/importExecutionPayload.js +11 -9
- package/lib/chain/blocks/importExecutionPayload.js.map +1 -1
- package/lib/chain/blocks/index.d.ts.map +1 -1
- package/lib/chain/blocks/index.js +15 -7
- package/lib/chain/blocks/index.js.map +1 -1
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.d.ts +2 -1
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.d.ts.map +1 -1
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.js +6 -2
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.js.map +1 -1
- package/lib/chain/blocks/payloadEnvelopeInput/types.d.ts +14 -5
- package/lib/chain/blocks/payloadEnvelopeInput/types.d.ts.map +1 -1
- package/lib/chain/blocks/payloadEnvelopeInput/types.js +5 -0
- package/lib/chain/blocks/payloadEnvelopeInput/types.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksStateTransitionOnly.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlocksStateTransitionOnly.js +22 -12
- package/lib/chain/blocks/verifyBlocksStateTransitionOnly.js.map +1 -1
- package/lib/chain/blocks/verifyExecutionPayloadEnvelope.d.ts +2 -2
- package/lib/chain/blocks/verifyExecutionPayloadEnvelope.d.ts.map +1 -1
- package/lib/chain/blocks/verifyExecutionPayloadEnvelope.js +2 -2
- package/lib/chain/blocks/verifyExecutionPayloadEnvelope.js.map +1 -1
- package/lib/chain/bls/index.d.ts +1 -1
- package/lib/chain/bls/index.d.ts.map +1 -1
- package/lib/chain/bls/interface.d.ts +5 -5
- package/lib/chain/bls/interface.d.ts.map +1 -1
- package/lib/chain/bls/multithread/index.d.ts +5 -11
- package/lib/chain/bls/multithread/index.d.ts.map +1 -1
- package/lib/chain/bls/multithread/index.js +116 -101
- package/lib/chain/bls/multithread/index.js.map +1 -1
- package/lib/chain/bls/multithread/jobItem.d.ts +5 -19
- package/lib/chain/bls/multithread/jobItem.d.ts.map +1 -1
- package/lib/chain/bls/multithread/jobItem.js +10 -65
- package/lib/chain/bls/multithread/jobItem.js.map +1 -1
- package/lib/chain/bls/multithread/types.d.ts +29 -8
- package/lib/chain/bls/multithread/types.d.ts.map +1 -1
- package/lib/chain/bls/multithread/types.js +12 -0
- package/lib/chain/bls/multithread/types.js.map +1 -1
- package/lib/chain/bls/multithread/utils.d.ts +4 -0
- package/lib/chain/bls/multithread/utils.d.ts.map +1 -1
- package/lib/chain/bls/multithread/utils.js +10 -0
- package/lib/chain/bls/multithread/utils.js.map +1 -1
- package/lib/chain/bls/multithread/worker.js +49 -23
- package/lib/chain/bls/multithread/worker.js.map +1 -1
- package/lib/chain/bls/singleThread.d.ts +4 -10
- package/lib/chain/bls/singleThread.d.ts.map +1 -1
- package/lib/chain/bls/singleThread.js +8 -45
- package/lib/chain/bls/singleThread.js.map +1 -1
- package/lib/chain/bls/utils.d.ts +4 -4
- package/lib/chain/bls/utils.d.ts.map +1 -1
- package/lib/chain/bls/utils.js +18 -19
- package/lib/chain/bls/utils.js.map +1 -1
- package/lib/chain/builderCircuitBreaker.d.ts +6 -5
- package/lib/chain/builderCircuitBreaker.d.ts.map +1 -1
- package/lib/chain/builderCircuitBreaker.js +28 -15
- package/lib/chain/builderCircuitBreaker.js.map +1 -1
- package/lib/chain/chain.d.ts +10 -5
- package/lib/chain/chain.d.ts.map +1 -1
- package/lib/chain/chain.js +24 -9
- package/lib/chain/chain.js.map +1 -1
- package/lib/chain/errors/blockError.d.ts +2 -0
- package/lib/chain/errors/blockError.d.ts.map +1 -1
- package/lib/chain/errors/blockError.js +6 -1
- package/lib/chain/errors/blockError.js.map +1 -1
- package/lib/chain/errors/proposerPreferences.d.ts +6 -0
- package/lib/chain/errors/proposerPreferences.d.ts.map +1 -1
- package/lib/chain/errors/proposerPreferences.js +1 -0
- package/lib/chain/errors/proposerPreferences.js.map +1 -1
- package/lib/chain/forkChoice/index.d.ts.map +1 -1
- package/lib/chain/forkChoice/index.js +4 -0
- package/lib/chain/forkChoice/index.js.map +1 -1
- package/lib/chain/interface.d.ts +8 -4
- package/lib/chain/interface.d.ts.map +1 -1
- package/lib/chain/interface.js.map +1 -1
- package/lib/chain/opPools/aggregatedAttestationPool.js +1 -1
- package/lib/chain/opPools/aggregatedAttestationPool.js.map +1 -1
- package/lib/chain/opPools/attestationPool.d.ts +1 -1
- package/lib/chain/opPools/attestationPool.d.ts.map +1 -1
- package/lib/chain/opPools/attestationPool.js +1 -1
- package/lib/chain/opPools/attestationPool.js.map +1 -1
- package/lib/chain/opPools/deferredVoluntaryExitPool.d.ts +16 -0
- package/lib/chain/opPools/deferredVoluntaryExitPool.d.ts.map +1 -0
- package/lib/chain/opPools/deferredVoluntaryExitPool.js +57 -0
- package/lib/chain/opPools/deferredVoluntaryExitPool.js.map +1 -0
- package/lib/chain/opPools/executionPayloadBidPool.d.ts +7 -2
- package/lib/chain/opPools/executionPayloadBidPool.d.ts.map +1 -1
- package/lib/chain/opPools/executionPayloadBidPool.js +4 -4
- package/lib/chain/opPools/executionPayloadBidPool.js.map +1 -1
- package/lib/chain/opPools/index.d.ts +2 -1
- package/lib/chain/opPools/index.d.ts.map +1 -1
- package/lib/chain/opPools/index.js +1 -0
- package/lib/chain/opPools/index.js.map +1 -1
- package/lib/chain/opPools/payloadAttestationPool.js +3 -3
- package/lib/chain/opPools/payloadAttestationPool.js.map +1 -1
- package/lib/chain/opPools/syncCommitteeMessagePool.js +1 -1
- package/lib/chain/opPools/syncCommitteeMessagePool.js.map +1 -1
- package/lib/chain/opPools/syncContributionAndProofPool.js +1 -1
- package/lib/chain/opPools/syncContributionAndProofPool.js.map +1 -1
- package/lib/chain/opPools/utils.d.ts +1 -1
- package/lib/chain/opPools/utils.d.ts.map +1 -1
- package/lib/chain/opPools/utils.js +1 -1
- package/lib/chain/opPools/utils.js.map +1 -1
- package/lib/chain/options.d.ts +1 -1
- package/lib/chain/options.d.ts.map +1 -1
- package/lib/chain/prepareNextSlot.d.ts.map +1 -1
- package/lib/chain/prepareNextSlot.js +25 -7
- package/lib/chain/prepareNextSlot.js.map +1 -1
- package/lib/chain/produceBlock/computeNewStateRoot.d.ts.map +1 -1
- package/lib/chain/produceBlock/computeNewStateRoot.js +3 -25
- package/lib/chain/produceBlock/computeNewStateRoot.js.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.d.ts +2 -0
- package/lib/chain/produceBlock/produceBlockBody.d.ts.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.js +7 -2
- package/lib/chain/produceBlock/produceBlockBody.js.map +1 -1
- package/lib/chain/regen/interface.d.ts +5 -2
- package/lib/chain/regen/interface.d.ts.map +1 -1
- package/lib/chain/regen/interface.js +3 -0
- package/lib/chain/regen/interface.js.map +1 -1
- package/lib/chain/regen/queued.d.ts +2 -2
- package/lib/chain/regen/queued.d.ts.map +1 -1
- package/lib/chain/regen/queued.js +5 -5
- package/lib/chain/regen/queued.js.map +1 -1
- package/lib/chain/seenCache/seenAttesters.d.ts +9 -5
- package/lib/chain/seenCache/seenAttesters.d.ts.map +1 -1
- package/lib/chain/seenCache/seenAttesters.js +25 -4
- package/lib/chain/seenCache/seenAttesters.js.map +1 -1
- package/lib/chain/seenCache/seenBlockProposers.d.ts +5 -1
- package/lib/chain/seenCache/seenBlockProposers.d.ts.map +1 -1
- package/lib/chain/seenCache/seenBlockProposers.js +10 -3
- package/lib/chain/seenCache/seenBlockProposers.js.map +1 -1
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.d.ts +28 -1
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.d.ts.map +1 -1
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.js +121 -13
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.js.map +1 -1
- package/lib/chain/stateCache/fifoBlockStateCache.d.ts +5 -1
- package/lib/chain/stateCache/fifoBlockStateCache.d.ts.map +1 -1
- package/lib/chain/stateCache/fifoBlockStateCache.js +6 -0
- package/lib/chain/stateCache/fifoBlockStateCache.js.map +1 -1
- package/lib/chain/stateCache/persistentCheckpointsCache.d.ts +47 -5
- package/lib/chain/stateCache/persistentCheckpointsCache.d.ts.map +1 -1
- package/lib/chain/stateCache/persistentCheckpointsCache.js +117 -7
- package/lib/chain/stateCache/persistentCheckpointsCache.js.map +1 -1
- package/lib/chain/stateCache/types.d.ts +3 -3
- package/lib/chain/stateCache/types.d.ts.map +1 -1
- package/lib/chain/validation/attestation.d.ts.map +1 -1
- package/lib/chain/validation/attestation.js +1 -4
- 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 +1 -1
- package/lib/chain/validation/attesterSlashing.js.map +1 -1
- package/lib/chain/validation/block.d.ts.map +1 -1
- package/lib/chain/validation/block.js +21 -7
- package/lib/chain/validation/block.js.map +1 -1
- package/lib/chain/validation/executionPayloadBid.d.ts +13 -3
- package/lib/chain/validation/executionPayloadBid.d.ts.map +1 -1
- package/lib/chain/validation/executionPayloadBid.js +147 -12
- package/lib/chain/validation/executionPayloadBid.js.map +1 -1
- package/lib/chain/validation/executionPayloadEnvelope.js +1 -1
- package/lib/chain/validation/executionPayloadEnvelope.js.map +1 -1
- package/lib/chain/validation/payloadAttestationMessage.d.ts.map +1 -1
- package/lib/chain/validation/payloadAttestationMessage.js +5 -14
- package/lib/chain/validation/payloadAttestationMessage.js.map +1 -1
- package/lib/chain/validation/proposerPreferences.d.ts +1 -1
- package/lib/chain/validation/proposerPreferences.d.ts.map +1 -1
- package/lib/chain/validation/proposerPreferences.js +13 -4
- package/lib/chain/validation/proposerPreferences.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/voluntaryExit.d.ts +9 -1
- package/lib/chain/validation/voluntaryExit.d.ts.map +1 -1
- package/lib/chain/validation/voluntaryExit.js +46 -1
- package/lib/chain/validation/voluntaryExit.js.map +1 -1
- package/lib/execution/builder/apiClient.d.ts +64 -0
- package/lib/execution/builder/apiClient.d.ts.map +1 -0
- package/lib/execution/builder/apiClient.js +184 -0
- package/lib/execution/builder/apiClient.js.map +1 -0
- package/lib/execution/builder/http.d.ts +10 -7
- package/lib/execution/builder/http.d.ts.map +1 -1
- package/lib/execution/builder/http.js +11 -8
- package/lib/execution/builder/http.js.map +1 -1
- package/lib/execution/builder/validateBid.d.ts +22 -0
- package/lib/execution/builder/validateBid.d.ts.map +1 -0
- package/lib/execution/builder/validateBid.js +111 -0
- package/lib/execution/builder/validateBid.js.map +1 -0
- package/lib/metrics/metrics/beacon.d.ts +3 -3
- package/lib/metrics/metrics/beacon.d.ts.map +1 -1
- package/lib/metrics/metrics/beacon.js +9 -9
- package/lib/metrics/metrics/beacon.js.map +1 -1
- package/lib/metrics/metrics/lodestar.d.ts +88 -23
- package/lib/metrics/metrics/lodestar.d.ts.map +1 -1
- package/lib/metrics/metrics/lodestar.js +164 -52
- package/lib/metrics/metrics/lodestar.js.map +1 -1
- package/lib/network/gossip/topic.d.ts +13 -0
- package/lib/network/gossip/topic.d.ts.map +1 -1
- package/lib/network/gossip/topic.js +37 -0
- package/lib/network/gossip/topic.js.map +1 -1
- package/lib/network/libp2p/index.d.ts.map +1 -1
- package/lib/network/libp2p/index.js +10 -2
- package/lib/network/libp2p/index.js.map +1 -1
- package/lib/network/network.d.ts.map +1 -1
- package/lib/network/network.js +23 -43
- package/lib/network/network.js.map +1 -1
- package/lib/network/processor/constants.d.ts +7 -0
- package/lib/network/processor/constants.d.ts.map +1 -0
- package/lib/network/processor/constants.js +7 -0
- package/lib/network/processor/constants.js.map +1 -0
- package/lib/network/processor/gossipHandlers.d.ts.map +1 -1
- package/lib/network/processor/gossipHandlers.js +38 -7
- package/lib/network/processor/gossipHandlers.js.map +1 -1
- package/lib/network/processor/gossipQueues/indexed.d.ts.map +1 -1
- package/lib/network/processor/gossipQueues/indexed.js +0 -1
- package/lib/network/processor/gossipQueues/indexed.js.map +1 -1
- package/lib/network/processor/index.d.ts +3 -0
- package/lib/network/processor/index.d.ts.map +1 -1
- package/lib/network/processor/index.js +41 -17
- package/lib/network/processor/index.js.map +1 -1
- package/lib/network/reqresp/score.d.ts.map +1 -1
- package/lib/network/reqresp/score.js +5 -11
- package/lib/network/reqresp/score.js.map +1 -1
- package/lib/network/util.d.ts +0 -1
- package/lib/network/util.d.ts.map +1 -1
- package/lib/network/util.js +0 -4
- package/lib/network/util.js.map +1 -1
- package/lib/node/deferredVoluntaryExitPublisher.d.ts +15 -0
- package/lib/node/deferredVoluntaryExitPublisher.d.ts.map +1 -0
- package/lib/node/deferredVoluntaryExitPublisher.js +38 -0
- package/lib/node/deferredVoluntaryExitPublisher.js.map +1 -0
- package/lib/node/nodejs.d.ts +2 -1
- package/lib/node/nodejs.d.ts.map +1 -1
- package/lib/node/nodejs.js +7 -0
- package/lib/node/nodejs.js.map +1 -1
- package/lib/sync/range/batch.d.ts +23 -5
- package/lib/sync/range/batch.d.ts.map +1 -1
- package/lib/sync/range/batch.js +61 -22
- package/lib/sync/range/batch.js.map +1 -1
- package/lib/sync/range/chain.d.ts +2 -1
- package/lib/sync/range/chain.d.ts.map +1 -1
- package/lib/sync/range/chain.js +23 -10
- package/lib/sync/range/chain.js.map +1 -1
- package/lib/sync/types.d.ts +32 -0
- package/lib/sync/types.d.ts.map +1 -1
- package/lib/sync/types.js +33 -0
- package/lib/sync/types.js.map +1 -1
- package/lib/sync/unknownBlock.d.ts +15 -2
- package/lib/sync/unknownBlock.d.ts.map +1 -1
- package/lib/sync/unknownBlock.js +234 -63
- package/lib/sync/unknownBlock.js.map +1 -1
- package/lib/sync/utils/downloadByRange.d.ts.map +1 -1
- package/lib/sync/utils/downloadByRange.js +16 -11
- package/lib/sync/utils/downloadByRange.js.map +1 -1
- package/lib/sync/utils/downloadByRoot.d.ts.map +1 -1
- package/lib/sync/utils/downloadByRoot.js +3 -1
- package/lib/sync/utils/downloadByRoot.js.map +1 -1
- package/package.json +35 -35
- package/src/api/impl/beacon/blocks/index.ts +55 -21
- package/src/api/impl/beacon/pool/index.ts +27 -2
- package/src/api/impl/beacon/state/utils.ts +2 -1
- package/src/api/impl/events/index.ts +12 -4
- package/src/api/impl/lodestar/index.ts +12 -13
- package/src/api/impl/validator/index.ts +300 -69
- package/src/api/impl/validator/utils.ts +30 -15
- package/src/api/rest/base.ts +7 -0
- package/src/chain/archiveStore/archiveStore.ts +1 -1
- package/src/chain/archiveStore/historicalState/metrics.ts +22 -0
- package/src/chain/blocks/importBlock.ts +1 -6
- package/src/chain/blocks/importExecutionPayload.ts +12 -11
- package/src/chain/blocks/index.ts +19 -7
- package/src/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.ts +8 -2
- package/src/chain/blocks/payloadEnvelopeInput/types.ts +17 -4
- package/src/chain/blocks/verifyBlocksStateTransitionOnly.ts +25 -16
- package/src/chain/blocks/verifyExecutionPayloadEnvelope.ts +1 -9
- package/src/chain/bls/index.ts +1 -1
- package/src/chain/bls/interface.ts +7 -3
- package/src/chain/bls/multithread/index.ts +148 -120
- package/src/chain/bls/multithread/jobItem.ts +12 -82
- package/src/chain/bls/multithread/types.ts +33 -8
- package/src/chain/bls/multithread/utils.ts +11 -0
- package/src/chain/bls/multithread/worker.ts +85 -27
- package/src/chain/bls/singleThread.ts +11 -55
- package/src/chain/bls/utils.ts +23 -24
- package/src/chain/builderCircuitBreaker.ts +31 -17
- package/src/chain/chain.ts +27 -7
- package/src/chain/errors/blockError.ts +9 -3
- package/src/chain/errors/proposerPreferences.ts +7 -0
- package/src/chain/forkChoice/index.ts +4 -0
- package/src/chain/interface.ts +8 -3
- package/src/chain/opPools/aggregatedAttestationPool.ts +1 -1
- package/src/chain/opPools/attestationPool.ts +1 -1
- package/src/chain/opPools/deferredVoluntaryExitPool.ts +65 -0
- package/src/chain/opPools/executionPayloadBidPool.ts +13 -7
- package/src/chain/opPools/index.ts +2 -1
- package/src/chain/opPools/payloadAttestationPool.ts +3 -3
- package/src/chain/opPools/syncCommitteeMessagePool.ts +1 -1
- package/src/chain/opPools/syncContributionAndProofPool.ts +1 -1
- package/src/chain/opPools/utils.ts +1 -1
- package/src/chain/options.ts +1 -1
- package/src/chain/prepareNextSlot.ts +25 -7
- package/src/chain/produceBlock/computeNewStateRoot.ts +3 -38
- package/src/chain/produceBlock/produceBlockBody.ts +14 -1
- package/src/chain/regen/interface.ts +5 -2
- package/src/chain/regen/queued.ts +5 -5
- package/src/chain/seenCache/seenAttesters.ts +31 -5
- package/src/chain/seenCache/seenBlockProposers.ts +13 -3
- package/src/chain/seenCache/seenPayloadEnvelopeInput.ts +143 -14
- package/src/chain/stateCache/fifoBlockStateCache.ts +8 -1
- package/src/chain/stateCache/persistentCheckpointsCache.ts +133 -8
- package/src/chain/stateCache/types.ts +3 -3
- package/src/chain/validation/attestation.ts +1 -7
- package/src/chain/validation/attesterSlashing.ts +1 -8
- package/src/chain/validation/block.ts +21 -7
- package/src/chain/validation/executionPayloadBid.ts +168 -14
- package/src/chain/validation/executionPayloadEnvelope.ts +0 -1
- package/src/chain/validation/payloadAttestationMessage.ts +6 -17
- package/src/chain/validation/proposerPreferences.ts +15 -5
- package/src/chain/validation/proposerSlashing.ts +1 -1
- package/src/chain/validation/voluntaryExit.ts +59 -2
- package/src/execution/builder/apiClient.ts +244 -0
- package/src/execution/builder/http.ts +11 -11
- package/src/execution/builder/validateBid.ts +166 -0
- package/src/metrics/metrics/beacon.ts +9 -9
- package/src/metrics/metrics/lodestar.ts +178 -58
- package/src/network/gossip/topic.ts +38 -0
- package/src/network/libp2p/index.ts +11 -2
- package/src/network/network.ts +29 -54
- package/src/network/processor/constants.ts +6 -0
- package/src/network/processor/gossipHandlers.ts +41 -5
- package/src/network/processor/gossipQueues/indexed.ts +0 -1
- package/src/network/processor/index.ts +53 -21
- package/src/network/reqresp/score.ts +5 -11
- package/src/network/util.ts +0 -5
- package/src/node/deferredVoluntaryExitPublisher.ts +54 -0
- package/src/node/nodejs.ts +10 -1
- package/src/sync/range/batch.ts +83 -28
- package/src/sync/range/chain.ts +26 -11
- package/src/sync/types.ts +36 -1
- package/src/sync/unknownBlock.ts +273 -70
- package/src/sync/utils/downloadByRange.ts +21 -12
- package/src/sync/utils/downloadByRoot.ts +3 -1
- package/lib/chain/bls/maybeBatch.d.ts +0 -12
- package/lib/chain/bls/maybeBatch.d.ts.map +0 -1
- package/lib/chain/bls/maybeBatch.js +0 -35
- package/lib/chain/bls/maybeBatch.js.map +0 -1
- package/src/chain/bls/maybeBatch.ts +0 -45
|
@@ -71,15 +71,18 @@ export class NoBidReceived extends Error {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
|
-
*
|
|
75
|
-
* the circuit breaker (so at boot time and once for each unique boot).
|
|
74
|
+
* Default circuit breaker parameters:
|
|
76
75
|
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
76
|
+
* SLOTS_PER_EPOCH <= FAULT_INSPECTION_WINDOW < 2 * SLOTS_PER_EPOCH (randomized at initialization)
|
|
77
|
+
* ALLOWED_FAULTS: FAULT_INSPECTION_WINDOW // 4
|
|
79
78
|
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
79
|
+
* e.g. on mainnet SLOTS_PER_EPOCH is 32, so FAULT_INSPECTION_WINDOW is between 32 and 63,
|
|
80
|
+
* and a window of 40 results in ALLOWED_FAULTS = 10.
|
|
81
|
+
*
|
|
82
|
+
* The randomized default window keeps the exact slots under inspection unpredictable per node,
|
|
83
|
+
* so a builder cannot tell when past faults age out of a given proposer's window and time
|
|
84
|
+
* withholding around trip or recovery points. Explicitly configured windows are clamped to at
|
|
85
|
+
* least SLOTS_PER_EPOCH, and configured allowedFaults is capped at the default ~25% budget.
|
|
83
86
|
*/
|
|
84
87
|
export function getFaultInspectionParams(opts: {faultInspectionWindow?: number; allowedFaults?: number}): {
|
|
85
88
|
faultInspectionWindow: number;
|
|
@@ -90,10 +93,7 @@ export function getFaultInspectionParams(opts: {faultInspectionWindow?: number;
|
|
|
90
93
|
SLOTS_PER_EPOCH
|
|
91
94
|
);
|
|
92
95
|
// allowedFaults should be < faultInspectionWindow, limiting them to faultInspectionWindow/4
|
|
93
|
-
const allowedFaults = Math.min(
|
|
94
|
-
opts.allowedFaults ?? Math.floor(faultInspectionWindow / 4),
|
|
95
|
-
Math.floor(faultInspectionWindow / 4)
|
|
96
|
-
);
|
|
96
|
+
const allowedFaults = Math.min(opts.allowedFaults ?? Infinity, Math.floor(faultInspectionWindow / 4));
|
|
97
97
|
return {faultInspectionWindow, allowedFaults};
|
|
98
98
|
}
|
|
99
99
|
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import {routes} from "@lodestar/api";
|
|
2
|
+
import {ProtoBlock} from "@lodestar/fork-choice";
|
|
3
|
+
import {MAX_EXECUTION_PAYMENT, PAYLOAD_BUILDER_VERSION} from "@lodestar/params";
|
|
4
|
+
import {
|
|
5
|
+
computeEpochAtSlot,
|
|
6
|
+
createSingleSignatureSetFromComponents,
|
|
7
|
+
getExecutionPayloadBidSigningRoot,
|
|
8
|
+
isActiveBuilder,
|
|
9
|
+
isGasLimitTargetCompatible,
|
|
10
|
+
isStatePostGloas,
|
|
11
|
+
} from "@lodestar/state-transition";
|
|
12
|
+
import {RootHex, Slot, gloas} from "@lodestar/types";
|
|
13
|
+
import {bigIntMin, byteArrayEquals, prettyGweiToEth, toHex, toRootHex} from "@lodestar/utils";
|
|
14
|
+
import {IBeaconChain} from "../../chain/index.js";
|
|
15
|
+
import {RegenCaller} from "../../chain/regen/index.js";
|
|
16
|
+
import {getShufflingDependentRoot} from "../../util/dependentRoot.js";
|
|
17
|
+
|
|
18
|
+
/** Return the counted bid payment in Gwei, saturated at uint64 max. */
|
|
19
|
+
export function getBuilderBidTotalGwei(bid: gloas.ExecutionPayloadBid, maxExecutionPayment: bigint): bigint {
|
|
20
|
+
return bigIntMin(MAX_EXECUTION_PAYMENT, BigInt(bid.value) + bigIntMin(bid.executionPayment, maxExecutionPayment));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Validate a bid received from a builder over the builder API in response to a bid request
|
|
25
|
+
* made during block production. Unlike gossip validation, the bid must match the requested
|
|
26
|
+
* slot and parent exactly, may carry a non-zero `executionPayment` which is counted at most at
|
|
27
|
+
* the entry's `maxExecutionPayment`, and is not subject to gossip anti-spam rules.
|
|
28
|
+
*
|
|
29
|
+
* Throws with a description of the failure, the caller drops the bid.
|
|
30
|
+
*/
|
|
31
|
+
export async function validateBuilderApiExecutionPayloadBid(
|
|
32
|
+
chain: IBeaconChain,
|
|
33
|
+
signedExecutionPayloadBid: gloas.SignedExecutionPayloadBid,
|
|
34
|
+
request: {
|
|
35
|
+
slot: Slot;
|
|
36
|
+
parentBlock: ProtoBlock;
|
|
37
|
+
parentBlockHash: RootHex;
|
|
38
|
+
parentBlockRoot: RootHex;
|
|
39
|
+
entry: routes.validator.BuilderEntry;
|
|
40
|
+
}
|
|
41
|
+
): Promise<void> {
|
|
42
|
+
const bid = signedExecutionPayloadBid.message;
|
|
43
|
+
const {slot, parentBlock, parentBlockHash, parentBlockRoot, entry} = request;
|
|
44
|
+
|
|
45
|
+
if (bid.slot !== slot) {
|
|
46
|
+
throw Error(`Bid slot=${bid.slot} does not match requested slot=${slot}`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const bidParentBlockHash = toRootHex(bid.parentBlockHash);
|
|
50
|
+
const bidParentBlockRoot = toRootHex(bid.parentBlockRoot);
|
|
51
|
+
if (bidParentBlockHash !== parentBlockHash || bidParentBlockRoot !== parentBlockRoot) {
|
|
52
|
+
throw Error(
|
|
53
|
+
`Bid parent parentBlockHash=${bidParentBlockHash} parentBlockRoot=${bidParentBlockRoot} does not match ` +
|
|
54
|
+
`requested parentBlockHash=${parentBlockHash} parentBlockRoot=${parentBlockRoot}`
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const totalPayment = getBuilderBidTotalGwei(bid, entry.maxExecutionPayment);
|
|
59
|
+
if (totalPayment < entry.minBid) {
|
|
60
|
+
throw Error(
|
|
61
|
+
`Bid total payment=${prettyGweiToEth(totalPayment)} ` +
|
|
62
|
+
`(value=${prettyGweiToEth(bid.value)} ` +
|
|
63
|
+
`executionPayment=${prettyGweiToEth(bid.executionPayment)}) ` +
|
|
64
|
+
`is below minBid=${prettyGweiToEth(entry.minBid)}`
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const state = await chain.regen
|
|
69
|
+
.getBlockSlotState(parentBlock, slot, {dontTransferCache: true}, RegenCaller.validateGossipExecutionPayloadBid)
|
|
70
|
+
.catch((e: Error) => {
|
|
71
|
+
throw Error(`Unable to regenerate state to validate bid: ${e.message}`);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
if (!isStatePostGloas(state)) {
|
|
75
|
+
throw Error(`Expected gloas+ state for execution payload bid validation, got fork=${state.forkName}`);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (bid.builderIndex >= state.getBuildersLength()) {
|
|
79
|
+
throw Error(`Bid builderIndex=${bid.builderIndex} is out of bounds`);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const builder = state.getBuilder(bid.builderIndex);
|
|
83
|
+
if (!isActiveBuilder(builder, state.finalizedCheckpoint.epoch)) {
|
|
84
|
+
throw Error(`Bid builderIndex=${bid.builderIndex} is not an active builder`);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (builder.version !== PAYLOAD_BUILDER_VERSION) {
|
|
88
|
+
throw Error(`Invalid builder version=${builder.version} expected=${PAYLOAD_BUILDER_VERSION}`);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// A bid not signed by one of the builder pubkeys the entry accepts bids from must not be accepted
|
|
92
|
+
if (
|
|
93
|
+
entry.builderPubkeys.length > 0 &&
|
|
94
|
+
!entry.builderPubkeys.some((pubkey) => byteArrayEquals(pubkey, builder.pubkey))
|
|
95
|
+
) {
|
|
96
|
+
throw Error(
|
|
97
|
+
`Bid builder pubkey=${toHex(builder.pubkey)} is not in the entry's ` +
|
|
98
|
+
`builderPubkeys=${entry.builderPubkeys.map(toHex).join(",")}`
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const blobKzgCommitmentsLen = bid.blobKzgCommitments.length;
|
|
103
|
+
const maxBlobsPerBlock = chain.config.getMaxBlobsPerBlock(computeEpochAtSlot(bid.slot));
|
|
104
|
+
if (blobKzgCommitmentsLen > maxBlobsPerBlock) {
|
|
105
|
+
throw Error(`Bid has too many KZG commitments len=${blobKzgCommitmentsLen} limit=${maxBlobsPerBlock}`);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// The coverage check only applies to the staked collateral payment, a pure execution
|
|
109
|
+
// layer payment bid has nothing to cover on-chain
|
|
110
|
+
if (bid.value > 0 && !state.canBuilderCoverBid(bid.builderIndex, bid.value)) {
|
|
111
|
+
throw Error(
|
|
112
|
+
`Builder cannot cover bid value=${prettyGweiToEth(bid.value)} ` + `balance=${prettyGweiToEth(builder.balance)}`
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const randaoMix = state.getRandaoMix(computeEpochAtSlot(state.slot));
|
|
117
|
+
if (!byteArrayEquals(bid.prevRandao, randaoMix)) {
|
|
118
|
+
throw Error(`Invalid bid prevRandao=${toHex(bid.prevRandao)} expected=${toHex(randaoMix)}`);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// The builder must honor the proposer preferences it learned over gossip
|
|
122
|
+
const bidEpoch = computeEpochAtSlot(bid.slot);
|
|
123
|
+
const dependentRootHex = (() => {
|
|
124
|
+
try {
|
|
125
|
+
return getShufflingDependentRoot(chain.forkChoice, bidEpoch, computeEpochAtSlot(parentBlock.slot), parentBlock);
|
|
126
|
+
} catch {
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
})();
|
|
130
|
+
if (dependentRootHex === null) {
|
|
131
|
+
throw Error(`Unable to resolve proposer preferences dependent root for bid slot=${bid.slot}`);
|
|
132
|
+
}
|
|
133
|
+
const proposerPreferences = chain.proposerPreferencesPool.get(bid.slot, dependentRootHex);
|
|
134
|
+
if (proposerPreferences === null) {
|
|
135
|
+
throw Error(`No proposer preferences found for bid slot=${bid.slot} dependentRoot=${dependentRootHex}`);
|
|
136
|
+
}
|
|
137
|
+
if (!byteArrayEquals(bid.feeRecipient, proposerPreferences.message.feeRecipient)) {
|
|
138
|
+
throw Error(
|
|
139
|
+
`Bid feeRecipient=${toHex(bid.feeRecipient)} does not match ` +
|
|
140
|
+
`proposer preferences feeRecipient=${toHex(proposerPreferences.message.feeRecipient)}`
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const parentPayloadVariant = chain.forkChoice.getBlockHexAndBlockHash(bidParentBlockRoot, bidParentBlockHash);
|
|
145
|
+
if (parentPayloadVariant === null || parentPayloadVariant.executionPayloadBlockHash === null) {
|
|
146
|
+
throw Error(`Unable to resolve parent payload gas limit for bid parentBlockHash=${bidParentBlockHash}`);
|
|
147
|
+
}
|
|
148
|
+
const parentGasLimit = BigInt(parentPayloadVariant.executionPayloadGasLimit);
|
|
149
|
+
const targetGasLimit = proposerPreferences.message.targetGasLimit;
|
|
150
|
+
if (!isGasLimitTargetCompatible(parentGasLimit, bid.gasLimit, targetGasLimit)) {
|
|
151
|
+
throw Error(
|
|
152
|
+
`Bid gasLimit=${bid.gasLimit} is not compatible with ` +
|
|
153
|
+
`parentGasLimit=${parentGasLimit} targetGasLimit=${targetGasLimit}`
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const signatureSet = createSingleSignatureSetFromComponents(
|
|
158
|
+
builder.pubkey,
|
|
159
|
+
getExecutionPayloadBidSigningRoot(chain.config, bid),
|
|
160
|
+
signedExecutionPayloadBid.signature
|
|
161
|
+
);
|
|
162
|
+
|
|
163
|
+
if (!(await chain.bls.verifySignatureSets([signatureSet]))) {
|
|
164
|
+
throw Error(`Invalid bid signature builderIndex=${bid.builderIndex}`);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
@@ -143,17 +143,17 @@ export function createBeaconMetrics(register: RegistryMetricCreator) {
|
|
|
143
143
|
name: "beacon_builder_circuit_breaker_active",
|
|
144
144
|
help: "Whether the builder circuit breaker is active (1) causing builder bids to be ignored",
|
|
145
145
|
}),
|
|
146
|
-
|
|
147
|
-
name: "
|
|
148
|
-
help: "Count of
|
|
146
|
+
canonicalBlocks: register.gauge({
|
|
147
|
+
name: "beacon_builder_circuit_breaker_canonical_blocks",
|
|
148
|
+
help: "Count of canonical FULL and EMPTY blocks in the fault inspection window",
|
|
149
149
|
}),
|
|
150
|
-
|
|
151
|
-
name: "
|
|
152
|
-
help: "Count of blocks
|
|
150
|
+
fullBlocks: register.gauge({
|
|
151
|
+
name: "beacon_builder_circuit_breaker_full_blocks",
|
|
152
|
+
help: "Count of canonical FULL blocks in the fault inspection window",
|
|
153
153
|
}),
|
|
154
|
-
|
|
155
|
-
name: "
|
|
156
|
-
help: "Count of
|
|
154
|
+
emptyBlocks: register.gauge({
|
|
155
|
+
name: "beacon_builder_circuit_breaker_empty_blocks",
|
|
156
|
+
help: "Count of canonical EMPTY blocks in the fault inspection window",
|
|
157
157
|
}),
|
|
158
158
|
},
|
|
159
159
|
|
|
@@ -4,7 +4,10 @@ import {ArchiveStoreTask} from "../../chain/archiveStore/archiveStore.js";
|
|
|
4
4
|
import {FrequencyStateArchiveStep} from "../../chain/archiveStore/strategies/frequencyStateArchiveStrategy.js";
|
|
5
5
|
import {BlockInputSource} from "../../chain/blocks/blockInput/index.js";
|
|
6
6
|
import {PayloadErrorCode} from "../../chain/blocks/importExecutionPayload.js";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
PayloadEnvelopeInputPruneReason,
|
|
9
|
+
PayloadEnvelopeInputSource,
|
|
10
|
+
} from "../../chain/blocks/payloadEnvelopeInput/index.js";
|
|
8
11
|
import {JobQueueItemType} from "../../chain/bls/index.js";
|
|
9
12
|
import {AttestationErrorCode, BlockErrorCode} from "../../chain/errors/index.js";
|
|
10
13
|
import {
|
|
@@ -21,7 +24,7 @@ import {ExecutionPayloadStatus} from "../../execution/index.js";
|
|
|
21
24
|
import {GossipType} from "../../network/index.js";
|
|
22
25
|
import {CannotAcceptWorkReason, ReprocessRejectReason} from "../../network/processor/index.js";
|
|
23
26
|
import {BackfillSyncMethod} from "../../sync/backfill/backfill.js";
|
|
24
|
-
import {PendingBlockType} from "../../sync/types.js";
|
|
27
|
+
import {DroppedItemReason, PendingBlockType} from "../../sync/types.js";
|
|
25
28
|
import {PeerSyncType, RangeSyncType} from "../../sync/utils/remoteSyncType.js";
|
|
26
29
|
import {AllocSource} from "../../util/bufferPool.js";
|
|
27
30
|
import {DataColumnReconstructionCode} from "../../util/dataColumns.js";
|
|
@@ -31,6 +34,10 @@ import {RegistryMetricCreator} from "../utils/registryMetricCreator.js";
|
|
|
31
34
|
|
|
32
35
|
export type LodestarMetrics = ReturnType<typeof createLodestarMetrics>;
|
|
33
36
|
|
|
37
|
+
type BlsJobOutcome = "valid" | "invalid" | "prepError" | "verifyError" | "workerError";
|
|
38
|
+
type BlsBufferFlushReason = "size" | "timeout";
|
|
39
|
+
type BlsVerificationCallOperation = "batch" | "single" | "fallback" | "same_message";
|
|
40
|
+
|
|
34
41
|
/**
|
|
35
42
|
* Extra Lodestar custom metrics
|
|
36
43
|
*/
|
|
@@ -97,9 +104,10 @@ export function createLodestarMetrics(
|
|
|
97
104
|
help: "Age of the first item of each key in the indexed queues in seconds",
|
|
98
105
|
buckets: [0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 5],
|
|
99
106
|
}),
|
|
100
|
-
queueTime: register.histogram({
|
|
107
|
+
queueTime: register.histogram<{topic: GossipType}>({
|
|
101
108
|
name: "lodestar_gossip_validation_queue_time_seconds",
|
|
102
109
|
help: "Total time an item stays in queue until it is processed in seconds",
|
|
110
|
+
labelNames: ["topic"],
|
|
103
111
|
buckets: [0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 5],
|
|
104
112
|
}),
|
|
105
113
|
},
|
|
@@ -396,86 +404,108 @@ export function createLodestarMetrics(
|
|
|
396
404
|
// BLS verifier thread pool and queue
|
|
397
405
|
|
|
398
406
|
bls: {
|
|
399
|
-
aggregatedPubkeys: register.
|
|
407
|
+
aggregatedPubkeys: register.counter({
|
|
400
408
|
name: "lodestar_bls_aggregated_pubkeys_total",
|
|
401
|
-
help: "Total
|
|
409
|
+
help: "Total validator public keys used as inputs to aggregate signature sets",
|
|
410
|
+
}),
|
|
411
|
+
pubkeyCacheSize: register.gauge({
|
|
412
|
+
name: "lodestar_bls_pubkey_cache_size",
|
|
413
|
+
help: "Current number of validator public keys in the native cache",
|
|
414
|
+
}),
|
|
415
|
+
pubkeyCacheCapacity: register.gauge({
|
|
416
|
+
name: "lodestar_bls_pubkey_cache_capacity",
|
|
417
|
+
help: "Number of validator public keys the native cache can hold without growing",
|
|
402
418
|
}),
|
|
403
419
|
},
|
|
404
420
|
|
|
405
421
|
blsThreadPool: {
|
|
406
|
-
jobsWorkerTime: register.
|
|
422
|
+
jobsWorkerTime: register.counter<{workerId: number}>({
|
|
407
423
|
name: "lodestar_bls_thread_pool_time_seconds_sum",
|
|
408
|
-
help: "
|
|
424
|
+
help: "Cumulative wall time spent processing BLS dispatch groups by worker",
|
|
409
425
|
labelNames: ["workerId"],
|
|
410
426
|
}),
|
|
411
|
-
successJobsSignatureSetsCount: register.
|
|
427
|
+
successJobsSignatureSetsCount: register.counter({
|
|
412
428
|
name: "lodestar_bls_thread_pool_success_jobs_signature_sets_count",
|
|
413
|
-
help: "Count of
|
|
429
|
+
help: "Count of signature sets completed without an operational error",
|
|
414
430
|
}),
|
|
415
|
-
|
|
416
|
-
name: "lodestar_bls_thread_pool_error_aggregate_signature_sets_count",
|
|
417
|
-
help: "Count of error when aggregating pubkeys or signatures",
|
|
418
|
-
labelNames: ["type"],
|
|
419
|
-
}),
|
|
420
|
-
errorJobsSignatureSetsCount: register.gauge({
|
|
431
|
+
errorJobsSignatureSetsCount: register.counter({
|
|
421
432
|
name: "lodestar_bls_thread_pool_error_jobs_signature_sets_count",
|
|
422
|
-
help: "Count of
|
|
433
|
+
help: "Count of signature sets that ended in an input, binding, or worker error",
|
|
423
434
|
}),
|
|
424
|
-
jobWaitTime: register.histogram({
|
|
435
|
+
jobWaitTime: register.histogram<{type: JobQueueItemType}>({
|
|
425
436
|
name: "lodestar_bls_thread_pool_queue_job_wait_time_seconds",
|
|
426
|
-
help: "Time from job
|
|
427
|
-
|
|
437
|
+
help: "Time from adding a BLS job until it is selected for a worker dispatch group",
|
|
438
|
+
labelNames: ["type"],
|
|
439
|
+
buckets: [0.005, 0.01, 0.025, 0.05, 0.1, 0.2, 0.5, 1, 2],
|
|
440
|
+
}),
|
|
441
|
+
jobDuration: register.histogram<{type: JobQueueItemType}>({
|
|
442
|
+
name: "lodestar_bls_thread_pool_job_duration_seconds",
|
|
443
|
+
help: "End-to-end duration of a BLS job from submission through completion",
|
|
444
|
+
labelNames: ["type"],
|
|
445
|
+
buckets: [0.005, 0.01, 0.025, 0.05, 0.1, 0.2, 0.5, 1, 2],
|
|
446
|
+
}),
|
|
447
|
+
jobResults: register.counter<{type: JobQueueItemType; outcome: BlsJobOutcome}>({
|
|
448
|
+
name: "lodestar_bls_thread_pool_job_results_total",
|
|
449
|
+
help: "Count of completed BLS jobs by cryptographic or operational outcome",
|
|
450
|
+
labelNames: ["type", "outcome"],
|
|
428
451
|
}),
|
|
429
452
|
queueLength: register.gauge({
|
|
430
453
|
name: "lodestar_bls_thread_pool_queue_length",
|
|
431
|
-
help: "Count of
|
|
454
|
+
help: "Count of ready BLS jobs waiting for a worker",
|
|
455
|
+
}),
|
|
456
|
+
bufferedQueueLength: register.gauge({
|
|
457
|
+
name: "lodestar_bls_thread_pool_buffered_queue_length",
|
|
458
|
+
help: "Count of BLS jobs waiting in the intentional batching buffer",
|
|
432
459
|
}),
|
|
433
460
|
workersBusy: register.gauge({
|
|
434
461
|
name: "lodestar_bls_thread_pool_workers_busy",
|
|
435
462
|
help: "Count of current busy workers",
|
|
436
463
|
}),
|
|
437
|
-
totalJobsGroupsStarted: register.
|
|
464
|
+
totalJobsGroupsStarted: register.counter({
|
|
438
465
|
name: "lodestar_bls_thread_pool_job_groups_started_total",
|
|
439
|
-
help: "Count of
|
|
466
|
+
help: "Count of worker dispatch groups started by the BLS thread pool",
|
|
440
467
|
}),
|
|
441
|
-
totalJobsStarted: register.
|
|
468
|
+
totalJobsStarted: register.counter<{type: JobQueueItemType}>({
|
|
442
469
|
name: "lodestar_bls_thread_pool_jobs_started_total",
|
|
443
|
-
help: "Count of
|
|
470
|
+
help: "Count of jobs started by the BLS thread pool",
|
|
444
471
|
labelNames: ["type"],
|
|
445
472
|
}),
|
|
446
|
-
totalSigSetsStarted: register.
|
|
473
|
+
totalSigSetsStarted: register.counter<{type: JobQueueItemType}>({
|
|
447
474
|
name: "lodestar_bls_thread_pool_sig_sets_started_total",
|
|
448
|
-
help: "Count of
|
|
475
|
+
help: "Count of signature sets started by the BLS thread pool",
|
|
449
476
|
labelNames: ["type"],
|
|
450
477
|
}),
|
|
451
478
|
// Re-verifying a batch means doing double work. This number must be very low or it can be a waste of CPU resources
|
|
452
|
-
batchRetries: register.
|
|
479
|
+
batchRetries: register.counter({
|
|
453
480
|
name: "lodestar_bls_thread_pool_batch_retries_total",
|
|
454
|
-
help: "Count of
|
|
481
|
+
help: "Count of combined batches that failed and required per-job fallback",
|
|
455
482
|
}),
|
|
456
483
|
// To count how many sigs are being validated with the optimization of batching them
|
|
457
|
-
batchSigsSuccess: register.
|
|
484
|
+
batchSigsSuccess: register.counter({
|
|
458
485
|
name: "lodestar_bls_thread_pool_batch_sigs_success_total",
|
|
459
|
-
help: "Count of
|
|
486
|
+
help: "Count of signature sets accepted by combined batch verification without fallback",
|
|
460
487
|
}),
|
|
461
|
-
|
|
462
|
-
name: "
|
|
463
|
-
help: "Count of
|
|
488
|
+
bufferFlushes: register.counter<{reason: BlsBufferFlushReason}>({
|
|
489
|
+
name: "lodestar_bls_thread_pool_buffer_flushes_total",
|
|
490
|
+
help: "Count of batching-buffer flushes by trigger",
|
|
491
|
+
labelNames: ["reason"],
|
|
464
492
|
}),
|
|
465
|
-
|
|
466
|
-
name: "
|
|
467
|
-
help: "Count of
|
|
493
|
+
bufferedSignatureSets: register.histogram({
|
|
494
|
+
name: "lodestar_bls_thread_pool_buffered_signature_sets",
|
|
495
|
+
help: "Count of signature sets included in each batching-buffer flush",
|
|
496
|
+
buckets: [1, 8, 16, 24, 28, 32, 36, 40, 44, 48, 64, 128],
|
|
468
497
|
}),
|
|
469
498
|
// To measure the time cost of main thread <-> worker message passing
|
|
470
499
|
latencyToWorker: register.histogram({
|
|
471
500
|
name: "lodestar_bls_thread_pool_latency_to_worker",
|
|
472
501
|
help: "Time from sending the job to the worker and the worker receiving it",
|
|
473
|
-
|
|
502
|
+
// The dashboard treats 20ms as slow; values above 100ms only need severe-stall classification.
|
|
503
|
+
buckets: [0.00025, 0.001, 0.005, 0.02, 0.1],
|
|
474
504
|
}),
|
|
475
505
|
latencyFromWorker: register.histogram({
|
|
476
506
|
name: "lodestar_bls_thread_pool_latency_from_worker",
|
|
477
507
|
help: "Time from the worker sending the result and the main thread receiving it",
|
|
478
|
-
buckets: [0.
|
|
508
|
+
buckets: [0.00025, 0.001, 0.005, 0.02, 0.1],
|
|
479
509
|
}),
|
|
480
510
|
mainThreadDurationInThreadPool: register.histogram({
|
|
481
511
|
name: "lodestar_bls_thread_pool_main_thread_time_seconds",
|
|
@@ -485,32 +515,40 @@ export function createLodestarMetrics(
|
|
|
485
515
|
}),
|
|
486
516
|
timePerSigSet: register.histogram({
|
|
487
517
|
name: "lodestar_bls_worker_thread_time_per_sigset_seconds",
|
|
488
|
-
help: "
|
|
518
|
+
help: "Average BLS worker dispatch wall time per original signature set",
|
|
489
519
|
// Time per sig ~0.9ms on good machines
|
|
490
|
-
buckets: [0.5e-3, 0.75e-3, 1e-3, 1.5e-3, 2e-3, 5e-3],
|
|
491
|
-
}),
|
|
492
|
-
|
|
520
|
+
buckets: [0.5e-3, 0.75e-3, 1e-3, 1.5e-3, 2e-3, 5e-3, 10e-3, 20e-3, 50e-3, 100e-3],
|
|
521
|
+
}),
|
|
522
|
+
workRequestPreparationDuration: register.histogram({
|
|
523
|
+
name: "lodestar_bls_thread_pool_work_request_preparation_duration_seconds",
|
|
524
|
+
help: "Main-thread time spent converting one worker dispatch group to binding inputs",
|
|
525
|
+
// Normal requests take microseconds; the dashboard treats 1ms as a main-thread stall.
|
|
526
|
+
buckets: [0.000005, 0.000025, 0.0001, 0.0005, 0.001, 0.005, 0.025],
|
|
527
|
+
}),
|
|
528
|
+
verificationCallDuration: register.histogram<{operation: BlsVerificationCallOperation}>({
|
|
529
|
+
name: "lodestar_bls_thread_pool_verification_call_duration_seconds",
|
|
530
|
+
help: "Duration of one worker-side lodestar-z verification binding call, including input conversion",
|
|
531
|
+
labelNames: ["operation"],
|
|
532
|
+
// Verification ranges from sub-millisecond calls to large batches; above 500ms is uniformly severe.
|
|
533
|
+
buckets: [0.00025, 0.001, 0.005, 0.02, 0.1, 0.5],
|
|
534
|
+
}),
|
|
535
|
+
verificationCallSignatureSets: register.counter<{operation: BlsVerificationCallOperation}>({
|
|
536
|
+
name: "lodestar_bls_thread_pool_verification_call_signature_sets_total",
|
|
537
|
+
help: "Count of signature sets passed to worker-side lodestar-z verification binding calls",
|
|
538
|
+
labelNames: ["operation"],
|
|
539
|
+
}),
|
|
540
|
+
totalSigSets: register.counter({
|
|
493
541
|
name: "lodestar_bls_thread_pool_sig_sets_total",
|
|
494
542
|
help: "Count of total signature sets",
|
|
495
543
|
}),
|
|
496
|
-
prioritizedSigSets: register.
|
|
544
|
+
prioritizedSigSets: register.counter({
|
|
497
545
|
name: "lodestar_bls_thread_pool_prioritized_sig_sets_total",
|
|
498
546
|
help: "Count of total prioritized signature sets",
|
|
499
547
|
}),
|
|
500
|
-
batchableSigSets: register.
|
|
548
|
+
batchableSigSets: register.counter({
|
|
501
549
|
name: "lodestar_bls_thread_pool_batchable_sig_sets_total",
|
|
502
550
|
help: "Count of total batchable signature sets",
|
|
503
551
|
}),
|
|
504
|
-
aggregateWithRandomnessAsyncDuration: register.histogram({
|
|
505
|
-
name: "lodestar_bls_thread_pool_aggregate_with_randomness_async_time_seconds",
|
|
506
|
-
help: "Total time performing aggregateWithRandomness async",
|
|
507
|
-
buckets: [0.001, 0.005, 0.01, 0.1, 0.3],
|
|
508
|
-
}),
|
|
509
|
-
pubkeysAggregationMainThreadDuration: register.histogram({
|
|
510
|
-
name: "lodestar_bls_thread_pool_pubkeys_aggregation_main_thread_time_seconds",
|
|
511
|
-
help: "Total time spent aggregating pubkeys on main thread",
|
|
512
|
-
buckets: [0.001, 0.005, 0.01, 0.1],
|
|
513
|
-
}),
|
|
514
552
|
},
|
|
515
553
|
|
|
516
554
|
// BLS time on single thread mode
|
|
@@ -643,9 +681,15 @@ export function createLodestarMetrics(
|
|
|
643
681
|
name: "lodestar_sync_unknown_block_downloaded_blocks_error_total",
|
|
644
682
|
help: "Total number of downloaded blocks errors in UnknownBlockSync",
|
|
645
683
|
}),
|
|
646
|
-
removedBlocks: register.gauge({
|
|
684
|
+
removedBlocks: register.gauge<{reason: DroppedItemReason}>({
|
|
647
685
|
name: "lodestar_sync_unknown_block_removed_blocks_total",
|
|
648
|
-
help: "Total
|
|
686
|
+
help: "Total pending blocks dropped from BlockInputSync without completing, by reason",
|
|
687
|
+
labelNames: ["reason"],
|
|
688
|
+
}),
|
|
689
|
+
removedPayloads: register.gauge<{reason: DroppedItemReason}>({
|
|
690
|
+
name: "lodestar_sync_unknown_block_removed_payloads_total",
|
|
691
|
+
help: "Total pending payloads dropped from BlockInputSync without completing, by reason",
|
|
692
|
+
labelNames: ["reason"],
|
|
649
693
|
}),
|
|
650
694
|
elapsedTimeTillReceived: register.histogram({
|
|
651
695
|
name: "lodestar_sync_unknown_block_elapsed_time_till_received",
|
|
@@ -908,6 +952,22 @@ export function createLodestarMetrics(
|
|
|
908
952
|
labelNames: ["error"],
|
|
909
953
|
}),
|
|
910
954
|
},
|
|
955
|
+
gossipExecutionPayloadBid: {
|
|
956
|
+
elapsedTimeTillReceived: register.histogram<{source: OpSource}>({
|
|
957
|
+
name: "lodestar_gossip_execution_payload_bid_elapsed_time_till_received_seconds",
|
|
958
|
+
help: "Time elapsed between the bid's slot start and the time the execution payload bid was received (negative = received before its slot, broadcast in the previous slot; positive = received during its own slot, late)",
|
|
959
|
+
labelNames: ["source"],
|
|
960
|
+
buckets: [-6, -3, -1, 0, 3],
|
|
961
|
+
}),
|
|
962
|
+
},
|
|
963
|
+
gossipPayloadAttestationMessage: {
|
|
964
|
+
elapsedTimeTillReceived: register.histogram<{source: OpSource}>({
|
|
965
|
+
name: "lodestar_gossip_payload_attestation_message_elapsed_time_till_received_seconds",
|
|
966
|
+
help: "Time elapsed between slot time and the time the payload attestation message was received",
|
|
967
|
+
labelNames: ["source"],
|
|
968
|
+
buckets: [3, 6, 9, 12],
|
|
969
|
+
}),
|
|
970
|
+
},
|
|
911
971
|
// recovery in the case of specific blob rows required
|
|
912
972
|
recoverBlobSidecars: {
|
|
913
973
|
blobsReconstructed: register.counter({
|
|
@@ -1175,6 +1235,12 @@ export function createLodestarMetrics(
|
|
|
1175
1235
|
name: "lodestar_oppool_attester_slashing_pool_size",
|
|
1176
1236
|
help: "Current size of the AttesterSlashingPool",
|
|
1177
1237
|
}),
|
|
1238
|
+
deferredVoluntaryExitPool: {
|
|
1239
|
+
size: register.gauge({
|
|
1240
|
+
name: "lodestar_oppool_deferred_voluntary_exit_pool_size",
|
|
1241
|
+
help: "Current size of the DeferredVoluntaryExitPool",
|
|
1242
|
+
}),
|
|
1243
|
+
},
|
|
1178
1244
|
proposerSlashingPoolSize: register.gauge({
|
|
1179
1245
|
name: "lodestar_oppool_proposer_slashing_pool_size",
|
|
1180
1246
|
help: "Current size of the ProposerSlashingPool",
|
|
@@ -1285,6 +1351,11 @@ export function createLodestarMetrics(
|
|
|
1285
1351
|
help: "Total number of InsertOutcome as a result of adding an execution payload bid from api to the pool",
|
|
1286
1352
|
labelNames: ["insertOutcome"],
|
|
1287
1353
|
}),
|
|
1354
|
+
apiValidationTime: register.histogram({
|
|
1355
|
+
name: "lodestar_api_execution_payload_bid_validation_time_seconds",
|
|
1356
|
+
help: "Time elapsed for signed execution payload bid validation - api path",
|
|
1357
|
+
buckets: [0.005, 0.01, 0.025, 0.05, 0.1, 0.5],
|
|
1358
|
+
}),
|
|
1288
1359
|
},
|
|
1289
1360
|
},
|
|
1290
1361
|
|
|
@@ -1379,6 +1450,16 @@ export function createLodestarMetrics(
|
|
|
1379
1450
|
help: "Checkpoint state cache size",
|
|
1380
1451
|
labelNames: ["type"],
|
|
1381
1452
|
}),
|
|
1453
|
+
persistentTierEpochs: register.gauge<{tier: number}>({
|
|
1454
|
+
name: "lodestar_cp_state_cache_persistent_tier_epochs",
|
|
1455
|
+
help: "Number of epoch keys retained in each on-disk checkpoint state retention tier",
|
|
1456
|
+
labelNames: ["tier"],
|
|
1457
|
+
}),
|
|
1458
|
+
persistentTierStates: register.gauge<{tier: number}>({
|
|
1459
|
+
name: "lodestar_cp_state_cache_persistent_tier_states",
|
|
1460
|
+
help: "Number of persisted checkpoint states retained in each on-disk retention tier",
|
|
1461
|
+
labelNames: ["tier"],
|
|
1462
|
+
}),
|
|
1382
1463
|
reads: register.avgMinMax({
|
|
1383
1464
|
name: "lodestar_cp_state_epoch_reads",
|
|
1384
1465
|
help: "Avg min max of all state cache items total read count",
|
|
@@ -1593,9 +1674,15 @@ export function createLodestarMetrics(
|
|
|
1593
1674
|
name: "lodestar_seen_payload_envelope_input_cache_serialized_object_refs",
|
|
1594
1675
|
help: "Number of serialized-cache object refs retained by cached PayloadEnvelopeInputs",
|
|
1595
1676
|
}),
|
|
1596
|
-
created: register.counter({
|
|
1677
|
+
created: register.counter<{source: PayloadEnvelopeInputSource}>({
|
|
1597
1678
|
name: "lodestar_seen_payload_envelope_input_cache_items_created_total",
|
|
1598
|
-
help: "Number of PayloadEnvelopeInputs created",
|
|
1679
|
+
help: "Number of PayloadEnvelopeInputs created by source",
|
|
1680
|
+
labelNames: ["source"],
|
|
1681
|
+
}),
|
|
1682
|
+
pruned: register.counter<{reason: PayloadEnvelopeInputPruneReason}>({
|
|
1683
|
+
name: "lodestar_seen_payload_envelope_input_cache_items_pruned_total",
|
|
1684
|
+
help: "Number of PayloadEnvelopeInputs evicted by reason",
|
|
1685
|
+
labelNames: ["reason"],
|
|
1599
1686
|
}),
|
|
1600
1687
|
},
|
|
1601
1688
|
},
|
|
@@ -1705,6 +1792,10 @@ export function createLodestarMetrics(
|
|
|
1705
1792
|
name: "lodestar_precompute_next_epoch_transition_waste_total",
|
|
1706
1793
|
help: "Total number of precomputing next epoch transition wasted",
|
|
1707
1794
|
}),
|
|
1795
|
+
predictedReorg: register.counter({
|
|
1796
|
+
name: "lodestar_precompute_next_epoch_transition_predicted_reorg_total",
|
|
1797
|
+
help: "Predicted epoch-boundary reorgs where the strong parent was dialed instead of the weak head",
|
|
1798
|
+
}),
|
|
1708
1799
|
duration: register.histogram({
|
|
1709
1800
|
name: "lodestar_precompute_next_epoch_transition_duration_seconds",
|
|
1710
1801
|
help: "Duration of precomputeNextEpochTransition, including epoch transition and hashTreeRoot",
|
|
@@ -1944,6 +2035,35 @@ export function createLodestarMetrics(
|
|
|
1944
2035
|
}),
|
|
1945
2036
|
},
|
|
1946
2037
|
|
|
2038
|
+
builderApi: {
|
|
2039
|
+
bidRequests: register.counter({
|
|
2040
|
+
name: "lodestar_builder_api_bid_requests_total",
|
|
2041
|
+
help: "Total count of execution payload bid requests sent to external builders",
|
|
2042
|
+
}),
|
|
2043
|
+
bidRequestErrors: register.counter({
|
|
2044
|
+
name: "lodestar_builder_api_bid_request_errors_total",
|
|
2045
|
+
help: "Total count of failed execution payload bid requests to external builders",
|
|
2046
|
+
}),
|
|
2047
|
+
bidsReceived: register.counter({
|
|
2048
|
+
name: "lodestar_builder_api_bids_received_total",
|
|
2049
|
+
help: "Total count of execution payload bids received from external builders",
|
|
2050
|
+
}),
|
|
2051
|
+
bidsDiscarded: register.counter({
|
|
2052
|
+
name: "lodestar_builder_api_bids_discarded_total",
|
|
2053
|
+
help: "Total count of execution payload bids from external builders discarded due to failed validation",
|
|
2054
|
+
}),
|
|
2055
|
+
blockSubmissions: register.counter<{status: "success" | "error"}>({
|
|
2056
|
+
name: "lodestar_builder_api_block_submissions_total",
|
|
2057
|
+
help: "Total count of signed beacon blocks submitted to external builders",
|
|
2058
|
+
labelNames: ["status"],
|
|
2059
|
+
}),
|
|
2060
|
+
preferencesForwarded: register.counter<{status: "success" | "error"}>({
|
|
2061
|
+
name: "lodestar_builder_api_preferences_forwarded_total",
|
|
2062
|
+
help: "Total count of builder preferences forwarded to external builders",
|
|
2063
|
+
labelNames: ["status"],
|
|
2064
|
+
}),
|
|
2065
|
+
},
|
|
2066
|
+
|
|
1947
2067
|
db: {
|
|
1948
2068
|
dbReadReq: register.gauge<{bucket: string}>({
|
|
1949
2069
|
name: "lodestar_db_read_req_total",
|