@lodestar/beacon-node 2.1.0-dev.48a9458cd6 → 2.1.0-dev.4b0199a2eb
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 +1 -3
- 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 +8 -0
- package/lib/api/impl/beacon/pool/index.js.map +1 -1
- package/lib/api/impl/beacon/state/index.d.ts.map +1 -1
- package/lib/api/impl/beacon/state/index.js +3 -2
- package/lib/api/impl/beacon/state/index.js.map +1 -1
- package/lib/api/impl/beacon/state/utils.js +1 -1
- package/lib/api/impl/beacon/state/utils.js.map +1 -1
- package/lib/api/impl/config/constants.d.ts +0 -1
- package/lib/api/impl/config/constants.d.ts.map +1 -1
- package/lib/api/impl/config/constants.js +1 -3
- package/lib/api/impl/config/constants.js.map +1 -1
- package/lib/api/impl/debug/index.d.ts.map +1 -1
- package/lib/api/impl/debug/index.js +0 -3
- package/lib/api/impl/debug/index.js.map +1 -1
- package/lib/api/impl/errors.d.ts +7 -0
- package/lib/api/impl/errors.d.ts.map +1 -1
- package/lib/api/impl/errors.js +9 -0
- package/lib/api/impl/errors.js.map +1 -1
- package/lib/api/impl/validator/index.d.ts.map +1 -1
- package/lib/api/impl/validator/index.js +4 -94
- package/lib/api/impl/validator/index.js.map +1 -1
- package/lib/api/rest/base.d.ts.map +1 -1
- package/lib/api/rest/base.js +5 -2
- package/lib/api/rest/base.js.map +1 -1
- package/lib/chain/ColumnReconstructionTracker.d.ts +3 -0
- package/lib/chain/ColumnReconstructionTracker.d.ts.map +1 -1
- package/lib/chain/ColumnReconstructionTracker.js +3 -1
- package/lib/chain/ColumnReconstructionTracker.js.map +1 -1
- package/lib/chain/GetBlobsTracker.d.ts +3 -0
- package/lib/chain/GetBlobsTracker.d.ts.map +1 -1
- package/lib/chain/GetBlobsTracker.js +3 -1
- package/lib/chain/GetBlobsTracker.js.map +1 -1
- package/lib/chain/blocks/importBlock.d.ts.map +1 -1
- package/lib/chain/blocks/importBlock.js +14 -5
- package/lib/chain/blocks/importBlock.js.map +1 -1
- package/lib/chain/blocks/importExecutionPayload.d.ts.map +1 -1
- package/lib/chain/blocks/importExecutionPayload.js +7 -56
- package/lib/chain/blocks/importExecutionPayload.js.map +1 -1
- package/lib/chain/blocks/payloadEnvelopeInput/types.d.ts +2 -1
- package/lib/chain/blocks/payloadEnvelopeInput/types.d.ts.map +1 -1
- package/lib/chain/blocks/types.d.ts +0 -4
- package/lib/chain/blocks/types.d.ts.map +1 -1
- package/lib/chain/blocks/types.js +0 -5
- package/lib/chain/blocks/types.js.map +1 -1
- package/lib/chain/chain.d.ts +3 -3
- package/lib/chain/chain.d.ts.map +1 -1
- package/lib/chain/chain.js +30 -10
- package/lib/chain/chain.js.map +1 -1
- package/lib/chain/errors/dataColumnSidecarError.d.ts +7 -0
- package/lib/chain/errors/dataColumnSidecarError.d.ts.map +1 -1
- package/lib/chain/errors/dataColumnSidecarError.js +1 -0
- package/lib/chain/errors/dataColumnSidecarError.js.map +1 -1
- package/lib/chain/errors/executionPayloadBid.d.ts +0 -15
- package/lib/chain/errors/executionPayloadBid.d.ts.map +1 -1
- package/lib/chain/errors/executionPayloadBid.js +0 -3
- package/lib/chain/errors/executionPayloadBid.js.map +1 -1
- package/lib/chain/errors/index.d.ts +0 -1
- package/lib/chain/errors/index.d.ts.map +1 -1
- package/lib/chain/errors/index.js +0 -1
- package/lib/chain/errors/index.js.map +1 -1
- package/lib/chain/forkChoice/index.d.ts +11 -2
- package/lib/chain/forkChoice/index.d.ts.map +1 -1
- package/lib/chain/forkChoice/index.js +180 -13
- package/lib/chain/forkChoice/index.js.map +1 -1
- package/lib/chain/forkChoiceExecutionEngine.d.ts +1 -2
- package/lib/chain/forkChoiceExecutionEngine.d.ts.map +1 -1
- package/lib/chain/forkChoiceExecutionEngine.js +0 -3
- package/lib/chain/forkChoiceExecutionEngine.js.map +1 -1
- package/lib/chain/interface.d.ts +3 -3
- package/lib/chain/interface.d.ts.map +1 -1
- package/lib/chain/interface.js.map +1 -1
- package/lib/chain/opPools/index.d.ts +0 -1
- package/lib/chain/opPools/index.d.ts.map +1 -1
- package/lib/chain/opPools/index.js +0 -1
- package/lib/chain/opPools/index.js.map +1 -1
- package/lib/chain/opPools/opPool.d.ts +9 -3
- package/lib/chain/opPools/opPool.d.ts.map +1 -1
- package/lib/chain/opPools/opPool.js +22 -16
- package/lib/chain/opPools/opPool.js.map +1 -1
- package/lib/chain/options.d.ts.map +1 -1
- package/lib/chain/options.js +1 -2
- package/lib/chain/options.js.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.d.ts +1 -3
- package/lib/chain/produceBlock/produceBlockBody.d.ts.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.js +3 -33
- package/lib/chain/produceBlock/produceBlockBody.js.map +1 -1
- package/lib/chain/regen/interface.d.ts +0 -1
- package/lib/chain/regen/interface.d.ts.map +1 -1
- package/lib/chain/regen/interface.js +0 -1
- package/lib/chain/regen/interface.js.map +1 -1
- package/lib/chain/seenCache/index.d.ts +1 -0
- package/lib/chain/seenCache/index.d.ts.map +1 -1
- package/lib/chain/seenCache/index.js +1 -0
- package/lib/chain/seenCache/index.js.map +1 -1
- package/lib/chain/seenCache/seenBlockProposers.d.ts +3 -0
- package/lib/chain/seenCache/seenBlockProposers.d.ts.map +1 -1
- package/lib/chain/seenCache/seenBlockProposers.js +6 -2
- package/lib/chain/seenCache/seenBlockProposers.js.map +1 -1
- package/lib/chain/seenCache/seenDataColumnSidecars.d.ts +17 -0
- package/lib/chain/seenCache/seenDataColumnSidecars.d.ts.map +1 -0
- package/lib/chain/seenCache/seenDataColumnSidecars.js +61 -0
- package/lib/chain/seenCache/seenDataColumnSidecars.js.map +1 -0
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.d.ts +11 -2
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.d.ts.map +1 -1
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.js +28 -2
- package/lib/chain/seenCache/seenPayloadEnvelopeInput.js.map +1 -1
- package/lib/chain/validation/attestation.d.ts.map +1 -1
- package/lib/chain/validation/attestation.js +4 -2
- package/lib/chain/validation/attestation.js.map +1 -1
- package/lib/chain/validation/block.d.ts.map +1 -1
- package/lib/chain/validation/block.js +20 -7
- package/lib/chain/validation/block.js.map +1 -1
- package/lib/chain/validation/dataColumnSidecar.js +1 -1
- package/lib/chain/validation/dataColumnSidecar.js.map +1 -1
- package/lib/chain/validation/executionPayloadBid.d.ts.map +1 -1
- package/lib/chain/validation/executionPayloadBid.js +1 -34
- package/lib/chain/validation/executionPayloadBid.js.map +1 -1
- package/lib/chain/validation/index.d.ts +0 -1
- package/lib/chain/validation/index.d.ts.map +1 -1
- package/lib/chain/validation/index.js +0 -1
- package/lib/chain/validation/index.js.map +1 -1
- package/lib/chain/validation/proposerSlashing.js +5 -1
- package/lib/chain/validation/proposerSlashing.js.map +1 -1
- package/lib/chain/validation/voluntaryExit.js +2 -2
- package/lib/chain/validation/voluntaryExit.js.map +1 -1
- package/lib/execution/builder/validateBid.d.ts.map +1 -1
- package/lib/execution/builder/validateBid.js +1 -14
- package/lib/execution/builder/validateBid.js.map +1 -1
- package/lib/execution/engine/disabled.d.ts +0 -1
- package/lib/execution/engine/disabled.d.ts.map +1 -1
- package/lib/execution/engine/disabled.js +0 -3
- package/lib/execution/engine/disabled.js.map +1 -1
- package/lib/execution/engine/http.d.ts +2 -8
- package/lib/execution/engine/http.d.ts.map +1 -1
- package/lib/execution/engine/http.js +4 -27
- package/lib/execution/engine/http.js.map +1 -1
- package/lib/execution/engine/interface.d.ts +2 -13
- package/lib/execution/engine/interface.d.ts.map +1 -1
- package/lib/execution/engine/interface.js.map +1 -1
- package/lib/execution/engine/jsonRpcTransport.d.ts +2 -3
- package/lib/execution/engine/jsonRpcTransport.d.ts.map +1 -1
- package/lib/execution/engine/jsonRpcTransport.js +9 -33
- package/lib/execution/engine/jsonRpcTransport.js.map +1 -1
- package/lib/execution/engine/mock.d.ts +0 -1
- package/lib/execution/engine/mock.d.ts.map +1 -1
- package/lib/execution/engine/mock.js +3 -25
- package/lib/execution/engine/mock.js.map +1 -1
- package/lib/execution/engine/payloadIdCache.d.ts +1 -4
- package/lib/execution/engine/payloadIdCache.d.ts.map +1 -1
- package/lib/execution/engine/payloadIdCache.js +2 -16
- package/lib/execution/engine/payloadIdCache.js.map +1 -1
- package/lib/execution/engine/restTransport.d.ts +1 -2
- package/lib/execution/engine/restTransport.d.ts.map +1 -1
- package/lib/execution/engine/restTransport.js +0 -3
- package/lib/execution/engine/restTransport.js.map +1 -1
- package/lib/execution/engine/transport.d.ts +2 -3
- package/lib/execution/engine/transport.d.ts.map +1 -1
- package/lib/execution/engine/types.d.ts +0 -24
- package/lib/execution/engine/types.d.ts.map +1 -1
- package/lib/execution/engine/types.js +0 -12
- package/lib/execution/engine/types.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/metrics/metrics/beacon.d.ts +0 -16
- package/lib/metrics/metrics/beacon.d.ts.map +1 -1
- package/lib/metrics/metrics/beacon.js +0 -35
- package/lib/metrics/metrics/beacon.js.map +1 -1
- package/lib/metrics/metrics/lodestar.d.ts +0 -9
- package/lib/metrics/metrics/lodestar.d.ts.map +1 -1
- package/lib/metrics/metrics/lodestar.js +0 -20
- package/lib/metrics/metrics/lodestar.js.map +1 -1
- package/lib/network/core/networkCore.d.ts +1 -3
- package/lib/network/core/networkCore.d.ts.map +1 -1
- package/lib/network/core/networkCore.js +1 -3
- package/lib/network/core/networkCore.js.map +1 -1
- package/lib/network/forks.d.ts +2 -2
- package/lib/network/forks.d.ts.map +1 -1
- package/lib/network/forks.js +3 -3
- package/lib/network/forks.js.map +1 -1
- package/lib/network/gossip/interface.d.ts +2 -8
- package/lib/network/gossip/interface.d.ts.map +1 -1
- package/lib/network/gossip/interface.js +0 -1
- package/lib/network/gossip/interface.js.map +1 -1
- package/lib/network/gossip/scoringParameters.js +19 -14
- package/lib/network/gossip/scoringParameters.js.map +1 -1
- package/lib/network/gossip/topic.d.ts +17 -29
- package/lib/network/gossip/topic.d.ts.map +1 -1
- package/lib/network/gossip/topic.js +1 -13
- package/lib/network/gossip/topic.js.map +1 -1
- package/lib/network/interface.d.ts +1 -2
- package/lib/network/interface.d.ts.map +1 -1
- package/lib/network/network.d.ts +2 -8
- package/lib/network/network.d.ts.map +1 -1
- package/lib/network/network.js +16 -45
- package/lib/network/network.js.map +1 -1
- package/lib/network/options.d.ts +0 -1
- package/lib/network/options.d.ts.map +1 -1
- package/lib/network/options.js +0 -1
- package/lib/network/options.js.map +1 -1
- package/lib/network/peers/discover.d.ts +1 -0
- package/lib/network/peers/discover.d.ts.map +1 -1
- package/lib/network/peers/discover.js +44 -48
- package/lib/network/peers/discover.js.map +1 -1
- package/lib/network/peers/score/store.d.ts.map +1 -1
- package/lib/network/peers/score/store.js +1 -2
- package/lib/network/peers/score/store.js.map +1 -1
- package/lib/network/processor/gossipHandlers.d.ts.map +1 -1
- package/lib/network/processor/gossipHandlers.js +76 -50
- package/lib/network/processor/gossipHandlers.js.map +1 -1
- package/lib/network/processor/gossipQueues/index.d.ts.map +1 -1
- package/lib/network/processor/gossipQueues/index.js +0 -6
- package/lib/network/processor/gossipQueues/index.js.map +1 -1
- package/lib/network/processor/gossipValidatorFn.d.ts.map +1 -1
- package/lib/network/processor/gossipValidatorFn.js +1 -5
- 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 +0 -1
- package/lib/network/processor/index.js.map +1 -1
- package/lib/network/reqresp/ReqRespBeaconNode.d.ts.map +1 -1
- package/lib/network/reqresp/ReqRespBeaconNode.js +0 -6
- package/lib/network/reqresp/ReqRespBeaconNode.js.map +1 -1
- package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.d.ts.map +1 -1
- package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.js +3 -1
- package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.js.map +1 -1
- package/lib/network/reqresp/handlers/index.d.ts.map +1 -1
- package/lib/network/reqresp/handlers/index.js +0 -5
- package/lib/network/reqresp/handlers/index.js.map +1 -1
- package/lib/network/reqresp/protocols.d.ts +0 -1
- package/lib/network/reqresp/protocols.d.ts.map +1 -1
- package/lib/network/reqresp/protocols.js +0 -5
- package/lib/network/reqresp/protocols.js.map +1 -1
- package/lib/network/reqresp/rateLimit.d.ts.map +1 -1
- package/lib/network/reqresp/rateLimit.js +0 -4
- package/lib/network/reqresp/rateLimit.js.map +1 -1
- package/lib/network/reqresp/types.d.ts +2 -5
- package/lib/network/reqresp/types.d.ts.map +1 -1
- package/lib/network/reqresp/types.js +0 -3
- package/lib/network/reqresp/types.js.map +1 -1
- package/lib/sync/range/chain.d.ts.map +1 -1
- package/lib/sync/range/chain.js +1 -0
- 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 +5 -1
- package/lib/sync/range/range.js.map +1 -1
- package/lib/sync/unknownBlock.d.ts.map +1 -1
- package/lib/sync/unknownBlock.js +14 -1
- package/lib/sync/unknownBlock.js.map +1 -1
- package/lib/sync/utils/downloadByRange.d.ts +6 -0
- package/lib/sync/utils/downloadByRange.d.ts.map +1 -1
- package/lib/sync/utils/downloadByRange.js +17 -8
- 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 +1 -1
- package/lib/sync/utils/downloadByRoot.js.map +1 -1
- package/lib/sync/utils/pendingBlocksTree.d.ts.map +1 -1
- package/lib/sync/utils/pendingBlocksTree.js +6 -1
- package/lib/sync/utils/pendingBlocksTree.js.map +1 -1
- package/lib/util/dataColumns.d.ts +2 -1
- package/lib/util/dataColumns.d.ts.map +1 -1
- package/lib/util/dataColumns.js +7 -2
- package/lib/util/dataColumns.js.map +1 -1
- package/lib/util/execution.d.ts +2 -1
- package/lib/util/execution.d.ts.map +1 -1
- package/lib/util/execution.js +7 -2
- package/lib/util/execution.js.map +1 -1
- package/package.json +18 -21
- package/src/api/impl/beacon/blocks/index.ts +1 -5
- package/src/api/impl/beacon/pool/index.ts +11 -0
- package/src/api/impl/beacon/state/index.ts +3 -7
- package/src/api/impl/beacon/state/utils.ts +1 -1
- package/src/api/impl/config/constants.ts +0 -4
- package/src/api/impl/debug/index.ts +0 -4
- package/src/api/impl/errors.ts +10 -0
- package/src/api/impl/validator/index.ts +2 -123
- package/src/api/rest/base.ts +4 -2
- package/src/chain/ColumnReconstructionTracker.ts +5 -1
- package/src/chain/GetBlobsTracker.ts +5 -0
- package/src/chain/blocks/importBlock.ts +14 -7
- package/src/chain/blocks/importExecutionPayload.ts +7 -74
- package/src/chain/blocks/payloadEnvelopeInput/types.ts +8 -1
- package/src/chain/blocks/types.ts +0 -5
- package/src/chain/chain.ts +34 -9
- package/src/chain/errors/dataColumnSidecarError.ts +8 -0
- package/src/chain/errors/executionPayloadBid.ts +0 -18
- package/src/chain/errors/index.ts +0 -1
- package/src/chain/forkChoice/index.ts +233 -13
- package/src/chain/forkChoiceExecutionEngine.ts +1 -5
- package/src/chain/interface.ts +2 -2
- package/src/chain/opPools/index.ts +0 -1
- package/src/chain/opPools/opPool.ts +27 -16
- package/src/chain/options.ts +1 -2
- package/src/chain/produceBlock/produceBlockBody.ts +12 -66
- package/src/chain/regen/interface.ts +0 -1
- package/src/chain/seenCache/index.ts +1 -0
- package/src/chain/seenCache/seenBlockProposers.ts +12 -2
- package/src/chain/seenCache/seenDataColumnSidecars.ts +69 -0
- package/src/chain/seenCache/seenPayloadEnvelopeInput.ts +28 -2
- package/src/chain/validation/attestation.ts +4 -2
- package/src/chain/validation/block.ts +19 -7
- package/src/chain/validation/dataColumnSidecar.ts +1 -1
- package/src/chain/validation/executionPayloadBid.ts +2 -49
- package/src/chain/validation/index.ts +0 -1
- package/src/chain/validation/proposerSlashing.ts +5 -1
- package/src/chain/validation/voluntaryExit.ts +2 -2
- package/src/execution/builder/validateBid.ts +2 -23
- package/src/execution/engine/disabled.ts +0 -4
- package/src/execution/engine/http.ts +5 -40
- package/src/execution/engine/interface.ts +2 -24
- package/src/execution/engine/jsonRpcTransport.ts +9 -46
- package/src/execution/engine/mock.ts +3 -26
- package/src/execution/engine/payloadIdCache.ts +4 -25
- package/src/execution/engine/restTransport.ts +1 -15
- package/src/execution/engine/transport.ts +2 -5
- package/src/execution/engine/types.ts +0 -35
- package/src/index.ts +1 -0
- package/src/metrics/metrics/beacon.ts +0 -37
- package/src/metrics/metrics/lodestar.ts +0 -21
- package/src/network/core/networkCore.ts +1 -3
- package/src/network/forks.ts +7 -3
- package/src/network/gossip/interface.ts +0 -5
- package/src/network/gossip/scoringParameters.ts +23 -14
- package/src/network/gossip/topic.ts +0 -14
- package/src/network/interface.ts +0 -2
- package/src/network/network.ts +20 -55
- package/src/network/options.ts +0 -2
- package/src/network/peers/discover.ts +42 -52
- package/src/network/peers/score/store.ts +1 -2
- package/src/network/processor/gossipHandlers.ts +135 -69
- package/src/network/processor/gossipQueues/index.ts +0 -6
- package/src/network/processor/gossipValidatorFn.ts +0 -5
- package/src/network/processor/index.ts +0 -1
- package/src/network/reqresp/ReqRespBeaconNode.ts +0 -7
- package/src/network/reqresp/handlers/dataColumnSidecarsByRange.ts +4 -1
- package/src/network/reqresp/handlers/index.ts +0 -5
- package/src/network/reqresp/protocols.ts +0 -6
- package/src/network/reqresp/rateLimit.ts +0 -4
- package/src/network/reqresp/types.ts +0 -6
- package/src/sync/range/chain.ts +1 -0
- package/src/sync/range/range.ts +7 -1
- package/src/sync/unknownBlock.ts +20 -1
- package/src/sync/utils/downloadByRange.ts +30 -7
- package/src/sync/utils/downloadByRoot.ts +12 -9
- package/src/sync/utils/pendingBlocksTree.ts +6 -1
- package/src/util/dataColumns.ts +13 -1
- package/src/util/execution.ts +16 -1
- package/lib/chain/errors/inclusionList.d.ts +0 -60
- package/lib/chain/errors/inclusionList.d.ts.map +0 -1
- package/lib/chain/errors/inclusionList.js +0 -19
- package/lib/chain/errors/inclusionList.js.map +0 -1
- package/lib/chain/opPools/inclusionListStore.d.ts +0 -66
- package/lib/chain/opPools/inclusionListStore.d.ts.map +0 -1
- package/lib/chain/opPools/inclusionListStore.js +0 -174
- package/lib/chain/opPools/inclusionListStore.js.map +0 -1
- package/lib/chain/validation/inclusionList.d.ts +0 -14
- package/lib/chain/validation/inclusionList.d.ts.map +0 -1
- package/lib/chain/validation/inclusionList.js +0 -150
- package/lib/chain/validation/inclusionList.js.map +0 -1
- package/lib/network/reqresp/handlers/inclusionListsByIndices.d.ts +0 -10
- package/lib/network/reqresp/handlers/inclusionListsByIndices.d.ts.map +0 -1
- package/lib/network/reqresp/handlers/inclusionListsByIndices.js +0 -30
- package/lib/network/reqresp/handlers/inclusionListsByIndices.js.map +0 -1
- package/src/chain/errors/inclusionList.ts +0 -38
- package/src/chain/opPools/inclusionListStore.ts +0 -211
- package/src/chain/validation/inclusionList.ts +0 -192
- package/src/network/reqresp/handlers/inclusionListsByIndices.ts +0 -44
package/src/util/dataColumns.ts
CHANGED
|
@@ -33,6 +33,7 @@ import {BlockInputColumns} from "../chain/blocks/blockInput/blockInput.js";
|
|
|
33
33
|
import {BlockInputSource} from "../chain/blocks/blockInput/types.js";
|
|
34
34
|
import {PayloadEnvelopeInput, PayloadEnvelopeInputSource} from "../chain/blocks/payloadEnvelopeInput/index.js";
|
|
35
35
|
import {ChainEvent, ChainEventEmitter} from "../chain/emitter.js";
|
|
36
|
+
import {SeenDataColumnSidecars} from "../chain/seenCache/seenDataColumnSidecars.js";
|
|
36
37
|
import {Metrics} from "../metrics/metrics.js";
|
|
37
38
|
import {NodeId} from "../network/subnets/index.js";
|
|
38
39
|
import {dataColumnMatrixRecovery} from "./blobs.js";
|
|
@@ -434,6 +435,7 @@ export function getGloasDataColumnSidecars(
|
|
|
434
435
|
export async function recoverDataColumnSidecars(
|
|
435
436
|
input: BlockInputColumns | PayloadEnvelopeInput,
|
|
436
437
|
emitter: ChainEventEmitter,
|
|
438
|
+
seenDataColumnSidecars: SeenDataColumnSidecars,
|
|
437
439
|
metrics: Metrics | null
|
|
438
440
|
): Promise<DataColumnReconstructionCode> {
|
|
439
441
|
const existingColumns = input.getAllColumns();
|
|
@@ -486,6 +488,7 @@ export async function recoverDataColumnSidecars(
|
|
|
486
488
|
const sidecarsToPublish: DataColumnSidecar[] = [];
|
|
487
489
|
for (const columnSidecar of fullSidecars) {
|
|
488
490
|
if (!input.hasColumn(columnSidecar.index)) {
|
|
491
|
+
let isRepeatProposal = false;
|
|
489
492
|
if (input instanceof PayloadEnvelopeInput) {
|
|
490
493
|
if (!isGloasDataColumnSidecar(columnSidecar)) {
|
|
491
494
|
throw new Error(`Expected gloas DataColumnSidecar for block ${input.blockRootHex}`);
|
|
@@ -505,9 +508,18 @@ export async function recoverDataColumnSidecars(
|
|
|
505
508
|
seenTimestampSec: Date.now() / 1000,
|
|
506
509
|
source: BlockInputSource.recovery,
|
|
507
510
|
});
|
|
511
|
+
// Reconstructed columns count as received via gossip for the repeat proposal check
|
|
512
|
+
const {slot, proposerIndex} = columnSidecar.signedBlockHeader.message;
|
|
513
|
+
isRepeatProposal = seenDataColumnSidecars.isRepeatProposal(
|
|
514
|
+
slot,
|
|
515
|
+
proposerIndex,
|
|
516
|
+
columnSidecar.index,
|
|
517
|
+
input.blockRootHex
|
|
518
|
+
);
|
|
519
|
+
seenDataColumnSidecars.add(slot, proposerIndex, columnSidecar.index, input.blockRootHex);
|
|
508
520
|
}
|
|
509
521
|
sidecarsReconstructed.push(columnSidecar);
|
|
510
|
-
if (missingSampledColumns.has(columnSidecar.index)) {
|
|
522
|
+
if (missingSampledColumns.has(columnSidecar.index) && !isRepeatProposal) {
|
|
511
523
|
sidecarsToPublish.push(columnSidecar);
|
|
512
524
|
}
|
|
513
525
|
}
|
package/src/util/execution.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
EnvelopeReconstructionError,
|
|
12
12
|
EnvelopeReconstructionErrorCode,
|
|
13
13
|
} from "../chain/errors/envelopeReconstructionError.js";
|
|
14
|
+
import {SeenDataColumnSidecars} from "../chain/seenCache/seenDataColumnSidecars.js";
|
|
14
15
|
import {IBeaconDb} from "../db/index.js";
|
|
15
16
|
import {ArchivedEnvelope, decodeArchivedEnvelope} from "../db/repositories/index.js";
|
|
16
17
|
import {IExecutionEngine} from "../execution/index.js";
|
|
@@ -48,6 +49,7 @@ export async function getDataColumnSidecarsFromExecution(
|
|
|
48
49
|
config: ChainForkConfig,
|
|
49
50
|
executionEngine: Pick<IExecutionEngine, "getBlobs">,
|
|
50
51
|
emitter: ChainEventEmitter,
|
|
52
|
+
seenDataColumnSidecars: SeenDataColumnSidecars,
|
|
51
53
|
input: IBlockInput | PayloadEnvelopeInput,
|
|
52
54
|
metrics: Metrics | null,
|
|
53
55
|
blobAndProofBuffers?: Uint8Array[]
|
|
@@ -112,8 +114,18 @@ export async function getDataColumnSidecarsFromExecution(
|
|
|
112
114
|
const previouslyMissingColumns = input.getMissingSampledColumnMeta().missing;
|
|
113
115
|
const sampledColumns = previouslyMissingColumns.map((columnIndex) => dataColumnSidecars[columnIndex]);
|
|
114
116
|
|
|
117
|
+
const columnsToPublish = sampledColumns.filter(
|
|
118
|
+
(columnSidecar) =>
|
|
119
|
+
isGloasDataColumnSidecar(columnSidecar) ||
|
|
120
|
+
!seenDataColumnSidecars.isRepeatProposal(
|
|
121
|
+
columnSidecar.signedBlockHeader.message.slot,
|
|
122
|
+
columnSidecar.signedBlockHeader.message.proposerIndex,
|
|
123
|
+
columnSidecar.index,
|
|
124
|
+
input.blockRootHex
|
|
125
|
+
)
|
|
126
|
+
);
|
|
115
127
|
// for columns we have already seen, publishDataColumnSidecar() catches PublishError.Duplicate and marks alreadyPublished=true
|
|
116
|
-
emitter.emit(ChainEvent.publishDataColumns,
|
|
128
|
+
emitter.emit(ChainEvent.publishDataColumns, columnsToPublish);
|
|
117
129
|
// TODO: Can we record dataColumns.sentPeersPerSubnet metric here somehow
|
|
118
130
|
|
|
119
131
|
// add all sampled columns to the input, even if we didn't sample them
|
|
@@ -145,6 +157,9 @@ export async function getDataColumnSidecarsFromExecution(
|
|
|
145
157
|
source: BlockInputSource.engine,
|
|
146
158
|
seenTimestampSec,
|
|
147
159
|
});
|
|
160
|
+
// Columns from the execution layer count as received via gossip for the repeat proposal check
|
|
161
|
+
const {slot, proposerIndex} = columnSidecar.signedBlockHeader.message;
|
|
162
|
+
seenDataColumnSidecars.add(slot, proposerIndex, columnSidecar.index, input.blockRootHex);
|
|
148
163
|
}
|
|
149
164
|
|
|
150
165
|
if (emitter.listenerCount(routes.events.EventType.dataColumnSidecar)) {
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Epoch, RootHex, Slot, ValidatorIndex } from "@lodestar/types";
|
|
2
|
-
import { GossipActionError } from "./gossipValidation.js";
|
|
3
|
-
export declare enum InclusionListErrorCode {
|
|
4
|
-
EMPTY_TRANSACTIONS = "INCLUSION_LIST_ERROR_EMPTY_TRANSACTIONS",
|
|
5
|
-
MAXIMUM_SIZE_EXCEEDED = "INCLUSION_LIST_ERROR_MAXIMUM_SIZE_EXCEEDED",
|
|
6
|
-
EMPTY_TRANSACTION = "INCLUSION_LIST_ERROR_EMPTY_TRANSACTION",
|
|
7
|
-
INVALID_SLOT = "INCLUSION_LIST_ERROR_INVALID_SLOT",
|
|
8
|
-
MORE_THAN_TWO = "INCLUSION_LIST_ERROR_MORE_THAN_TWO",
|
|
9
|
-
VALIDATOR_NOT_IN_COMMITTEE = "INCLUSION_LIST_ERROR_VALIDATOR_NOT_IN_COMMITTEE",
|
|
10
|
-
UNKNOWN_DEPENDENT_ROOT = "INCLUSION_LIST_ERROR_UNKNOWN_DEPENDENT_ROOT",
|
|
11
|
-
INVALID_DEPENDENT_ROOT_SLOT = "INCLUSION_LIST_ERROR_INVALID_DEPENDENT_ROOT_SLOT",
|
|
12
|
-
INVALID_DEPENDENT_ROOT = "INCLUSION_LIST_ERROR_INVALID_DEPENDENT_ROOT",
|
|
13
|
-
MISSING_SHUFFLING = "INCLUSION_LIST_ERROR_MISSING_SHUFFLING",
|
|
14
|
-
INVALID_SIGNATURE = "INCLUSION_LIST_ERROR_INVALID_SIGNATURE",
|
|
15
|
-
PRE_HEZE_SLOT = "INCLUSION_LIST_ERROR_PRE_HEZE_SLOT"
|
|
16
|
-
}
|
|
17
|
-
export type InclusionListErrorType = {
|
|
18
|
-
code: InclusionListErrorCode.EMPTY_TRANSACTIONS;
|
|
19
|
-
} | {
|
|
20
|
-
code: InclusionListErrorCode.MAXIMUM_SIZE_EXCEEDED;
|
|
21
|
-
totalBytes: number;
|
|
22
|
-
maxBytes: number;
|
|
23
|
-
} | {
|
|
24
|
-
code: InclusionListErrorCode.EMPTY_TRANSACTION;
|
|
25
|
-
transactionIndex: number;
|
|
26
|
-
} | {
|
|
27
|
-
code: InclusionListErrorCode.INVALID_SLOT;
|
|
28
|
-
inclusionListSlot: Slot;
|
|
29
|
-
currentSlot: Slot;
|
|
30
|
-
} | {
|
|
31
|
-
code: InclusionListErrorCode.MORE_THAN_TWO;
|
|
32
|
-
validatorIndex: ValidatorIndex;
|
|
33
|
-
} | {
|
|
34
|
-
code: InclusionListErrorCode.VALIDATOR_NOT_IN_COMMITTEE;
|
|
35
|
-
validatorIndex: ValidatorIndex;
|
|
36
|
-
} | {
|
|
37
|
-
code: InclusionListErrorCode.UNKNOWN_DEPENDENT_ROOT;
|
|
38
|
-
dependentRoot: RootHex;
|
|
39
|
-
} | {
|
|
40
|
-
code: InclusionListErrorCode.INVALID_DEPENDENT_ROOT_SLOT;
|
|
41
|
-
dependentRoot: RootHex;
|
|
42
|
-
dependentSlot: Slot;
|
|
43
|
-
maxSlot: Slot;
|
|
44
|
-
} | {
|
|
45
|
-
code: InclusionListErrorCode.INVALID_DEPENDENT_ROOT;
|
|
46
|
-
dependentRoot: RootHex;
|
|
47
|
-
epoch: Epoch;
|
|
48
|
-
} | {
|
|
49
|
-
code: InclusionListErrorCode.MISSING_SHUFFLING;
|
|
50
|
-
dependentRoot: RootHex;
|
|
51
|
-
epoch: Epoch;
|
|
52
|
-
} | {
|
|
53
|
-
code: InclusionListErrorCode.INVALID_SIGNATURE;
|
|
54
|
-
} | {
|
|
55
|
-
code: InclusionListErrorCode.PRE_HEZE_SLOT;
|
|
56
|
-
inclusionListSlot: Slot;
|
|
57
|
-
};
|
|
58
|
-
export declare class InclusionListError extends GossipActionError<InclusionListErrorType> {
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=inclusionList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inclusionList.d.ts","sourceRoot":"","sources":["../../../src/chain/errors/inclusionList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AAExD,oBAAY,sBAAsB;IAChC,kBAAkB,4CAA4C;IAC9D,qBAAqB,+CAA+C;IACpE,iBAAiB,2CAA2C;IAC5D,YAAY,sCAAsC;IAClD,aAAa,uCAAuC;IACpD,0BAA0B,oDAAoD;IAC9E,sBAAsB,gDAAgD;IACtE,2BAA2B,qDAAqD;IAChF,sBAAsB,gDAAgD;IACtE,iBAAiB,2CAA2C;IAC5D,iBAAiB,2CAA2C;IAC5D,aAAa,uCAAuC;CACrD;AAED,MAAM,MAAM,sBAAsB,GAC9B;IAAC,IAAI,EAAE,sBAAsB,CAAC,kBAAkB,CAAA;CAAC,GACjD;IAAC,IAAI,EAAE,sBAAsB,CAAC,qBAAqB,CAAC;IAAC,UAAU,EAA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|
|
3
|
-
(function (InclusionListErrorCode) {
|
|
4
|
-
InclusionListErrorCode["EMPTY_TRANSACTIONS"] = "INCLUSION_LIST_ERROR_EMPTY_TRANSACTIONS";
|
|
5
|
-
InclusionListErrorCode["MAXIMUM_SIZE_EXCEEDED"] = "INCLUSION_LIST_ERROR_MAXIMUM_SIZE_EXCEEDED";
|
|
6
|
-
InclusionListErrorCode["EMPTY_TRANSACTION"] = "INCLUSION_LIST_ERROR_EMPTY_TRANSACTION";
|
|
7
|
-
InclusionListErrorCode["INVALID_SLOT"] = "INCLUSION_LIST_ERROR_INVALID_SLOT";
|
|
8
|
-
InclusionListErrorCode["MORE_THAN_TWO"] = "INCLUSION_LIST_ERROR_MORE_THAN_TWO";
|
|
9
|
-
InclusionListErrorCode["VALIDATOR_NOT_IN_COMMITTEE"] = "INCLUSION_LIST_ERROR_VALIDATOR_NOT_IN_COMMITTEE";
|
|
10
|
-
InclusionListErrorCode["UNKNOWN_DEPENDENT_ROOT"] = "INCLUSION_LIST_ERROR_UNKNOWN_DEPENDENT_ROOT";
|
|
11
|
-
InclusionListErrorCode["INVALID_DEPENDENT_ROOT_SLOT"] = "INCLUSION_LIST_ERROR_INVALID_DEPENDENT_ROOT_SLOT";
|
|
12
|
-
InclusionListErrorCode["INVALID_DEPENDENT_ROOT"] = "INCLUSION_LIST_ERROR_INVALID_DEPENDENT_ROOT";
|
|
13
|
-
InclusionListErrorCode["MISSING_SHUFFLING"] = "INCLUSION_LIST_ERROR_MISSING_SHUFFLING";
|
|
14
|
-
InclusionListErrorCode["INVALID_SIGNATURE"] = "INCLUSION_LIST_ERROR_INVALID_SIGNATURE";
|
|
15
|
-
InclusionListErrorCode["PRE_HEZE_SLOT"] = "INCLUSION_LIST_ERROR_PRE_HEZE_SLOT";
|
|
16
|
-
})(InclusionListErrorCode || (InclusionListErrorCode = {}));
|
|
17
|
-
export class InclusionListError extends GossipActionError {
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=inclusionList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inclusionList.js","sourceRoot":"","sources":["../../../src/chain/errors/inclusionList.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AAExD,MAAM,CAAN,IAAY,sBAaX;AAbD,WAAY,sBAAsB;IAChC,wFAA8D,CAAA;IAC9D,8FAAoE,CAAA;IACpE,sFAA4D,CAAA;IAC5D,4EAAkD,CAAA;IAClD,8EAAoD,CAAA;IACpD,wGAA8E,CAAA;IAC9E,gGAAsE,CAAA;IACtE,0GAAgF,CAAA;IAChF,gGAAsE,CAAA;IACtE,sFAA4D,CAAA;IAC5D,sFAA4D,CAAA;IAC5D,8EAAoD,CAAA;AACtD,CAAC,EAbW,sBAAsB,KAAtB,sBAAsB,QAajC;AAqBD,MAAM,OAAO,kBAAmB,SAAQ,iBAAyC;CAAG"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { BitArray } from "@chainsafe/ssz";
|
|
2
|
-
import { BeaconConfig } from "@lodestar/config";
|
|
3
|
-
import { RootHex, Slot, ValidatorIndex, bellatrix, heze } from "@lodestar/types";
|
|
4
|
-
export declare enum InclusionListInsertOutcome {
|
|
5
|
-
/** Stored as a new entry. */
|
|
6
|
-
New = "New",
|
|
7
|
-
/** Slot is older than the prune horizon. */
|
|
8
|
-
Old = "Old",
|
|
9
|
-
/** Identical inclusion list already stored. */
|
|
10
|
-
Seen = "Seen",
|
|
11
|
-
/** New equivocation evidence: this validator already has a different inclusion list stored. */
|
|
12
|
-
Equivocating = "Equivocating",
|
|
13
|
-
/** Validator was already marked as an equivocator for this `(slot, dependent_root)`. */
|
|
14
|
-
SubsequentEquivocation = "SubsequentEquivocation"
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Spec `InclusionListStore`: inclusion lists keyed by `(slot, dependent_root)`, one per validator index.
|
|
18
|
-
* The committee position is recorded at insert time (gossip validation resolves it) so the bit-oriented
|
|
19
|
-
* reads need no shuffling lookup. Signed lists are kept so InclusionListsByIndices can serve them.
|
|
20
|
-
* A validator's first list stays stored and an equivocation marks the validator so reads skip it.
|
|
21
|
-
*/
|
|
22
|
-
export declare class InclusionListStore {
|
|
23
|
-
private readonly config;
|
|
24
|
-
/** slot -> dependent_root -> validator index -> entry */
|
|
25
|
-
private readonly inclusionLists;
|
|
26
|
-
/** slot -> dependent_root -> equivocating validator indices */
|
|
27
|
-
private readonly equivocators;
|
|
28
|
-
/** slot -> dependent_root -> validator index -> count, for the p2p "first or second message" rule */
|
|
29
|
-
private readonly seenCounts;
|
|
30
|
-
private lowestPermissibleSlot;
|
|
31
|
-
constructor(config: BeaconConfig);
|
|
32
|
-
get size(): number;
|
|
33
|
-
/**
|
|
34
|
-
* Late lists are stored with `timely=false` rather than dropped: they still count toward the
|
|
35
|
-
* non-timely view used to validate another node's `inclusion_list_bits`.
|
|
36
|
-
*/
|
|
37
|
-
process(signedInclusionList: heze.SignedInclusionList, committeeIndices: number[], timely: boolean): InclusionListInsertOutcome;
|
|
38
|
-
/** Count a valid message of `validatorIndex` for the first-or-second message gossip rule */
|
|
39
|
-
markSeen(slot: Slot, dependentRoot: RootHex, validatorIndex: ValidatorIndex): void;
|
|
40
|
-
/** Gossip rule: at most two valid messages per validator for a `(slot, dependent_root)` */
|
|
41
|
-
seenTwice(slot: Slot, dependentRoot: RootHex, validatorIndex: ValidatorIndex): boolean;
|
|
42
|
-
/** Deduplicated transactions from valid, non-equivocating inclusion lists at `(slot, dependentRoot)`. */
|
|
43
|
-
getInclusionListTransactions(slot: Slot, dependentRoot: RootHex, onlyTimely?: boolean): bellatrix.Transactions;
|
|
44
|
-
/** Bit `i` is set when committee member `i` submitted a valid, non-equivocating inclusion list */
|
|
45
|
-
getInclusionListBits(slot: Slot, dependentRoot: RootHex, onlyTimely?: boolean): BitArray;
|
|
46
|
-
/**
|
|
47
|
-
* True if `bits` has a bit set for every bit set in the local inclusion list bits.
|
|
48
|
-
*
|
|
49
|
-
* Intentionally deviates from the spec by only checking against timely lists, where the proposer would check
|
|
50
|
-
* against every list it observed (only_timely=False in
|
|
51
|
-
* https://github.com/ethereum/consensus-specs/blob/v1.7.0-beta.4/specs/heze/validator.md#signed-execution-payload-bid).
|
|
52
|
-
* A bid that passed gossip must stay eligible, otherwise a list released after the deadline voids every bid and
|
|
53
|
-
* a high early bid with empty bits crowds out the rest without ever paying.
|
|
54
|
-
*/
|
|
55
|
-
isInclusionListBitsInclusive(slot: Slot, dependentRoot: RootHex, bits: BitArray): boolean;
|
|
56
|
-
/** Inclusion lists for the given committee positions, to serve InclusionListsByIndices. */
|
|
57
|
-
getByIndices(slot: Slot, dependentRoot: RootHex, indices: BitArray): heze.SignedInclusionList[];
|
|
58
|
-
/**
|
|
59
|
-
* Lists are kept one slot past the MIN_SLOTS_FOR_INCLUSION_LISTS_REQUESTS serving window, the lists of slot N are
|
|
60
|
-
* read when the payload of slot N + 1 is processed, which may happen during slot N + 2
|
|
61
|
-
*/
|
|
62
|
-
prune(clockSlot: Slot): void;
|
|
63
|
-
/** Entries at `(slot, dependentRoot)` from non-equivocating validators, timely when required. */
|
|
64
|
-
private getEligible;
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=inclusionListStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inclusionListStore.d.ts","sourceRoot":"","sources":["../../../src/chain/opPools/inclusionListStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAiB,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAC,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,IAAI,EAAM,MAAM,iBAAiB,CAAC;AAGpF,oBAAY,0BAA0B;IACpC,6BAA6B;IAC7B,GAAG,QAAQ;IACX,4CAA4C;IAC5C,GAAG,QAAQ;IACX,+CAA+C;IAC/C,IAAI,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AE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAQ9F;IAED;;;OAGG;IACH,KAAK,CAAC,SAAS,EAAE,IAAI,GAAG,IAAI,CAoB3B;IAED,iGAAiG;IACjG,OAAO,CAAE,WAAW;CAiBrB"}
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { BitArray, SerializedList } from "@chainsafe/ssz";
|
|
2
|
-
import { INCLUSION_LIST_COMMITTEE_SIZE } from "@lodestar/params";
|
|
3
|
-
import { ssz } from "@lodestar/types";
|
|
4
|
-
import { MapDef, toHex, toRootHex } from "@lodestar/utils";
|
|
5
|
-
export var InclusionListInsertOutcome;
|
|
6
|
-
(function (InclusionListInsertOutcome) {
|
|
7
|
-
/** Stored as a new entry. */
|
|
8
|
-
InclusionListInsertOutcome["New"] = "New";
|
|
9
|
-
/** Slot is older than the prune horizon. */
|
|
10
|
-
InclusionListInsertOutcome["Old"] = "Old";
|
|
11
|
-
/** Identical inclusion list already stored. */
|
|
12
|
-
InclusionListInsertOutcome["Seen"] = "Seen";
|
|
13
|
-
/** New equivocation evidence: this validator already has a different inclusion list stored. */
|
|
14
|
-
InclusionListInsertOutcome["Equivocating"] = "Equivocating";
|
|
15
|
-
/** Validator was already marked as an equivocator for this `(slot, dependent_root)`. */
|
|
16
|
-
InclusionListInsertOutcome["SubsequentEquivocation"] = "SubsequentEquivocation";
|
|
17
|
-
})(InclusionListInsertOutcome || (InclusionListInsertOutcome = {}));
|
|
18
|
-
/**
|
|
19
|
-
* Spec `InclusionListStore`: inclusion lists keyed by `(slot, dependent_root)`, one per validator index.
|
|
20
|
-
* The committee position is recorded at insert time (gossip validation resolves it) so the bit-oriented
|
|
21
|
-
* reads need no shuffling lookup. Signed lists are kept so InclusionListsByIndices can serve them.
|
|
22
|
-
* A validator's first list stays stored and an equivocation marks the validator so reads skip it.
|
|
23
|
-
*/
|
|
24
|
-
export class InclusionListStore {
|
|
25
|
-
config;
|
|
26
|
-
/** slot -> dependent_root -> validator index -> entry */
|
|
27
|
-
inclusionLists = new MapDef(() => new MapDef(() => new Map()));
|
|
28
|
-
/** slot -> dependent_root -> equivocating validator indices */
|
|
29
|
-
equivocators = new MapDef(() => new MapDef(() => new Set()));
|
|
30
|
-
/** slot -> dependent_root -> validator index -> count, for the p2p "first or second message" rule */
|
|
31
|
-
seenCounts = new MapDef(() => new MapDef(() => new Map()));
|
|
32
|
-
lowestPermissibleSlot = 0;
|
|
33
|
-
constructor(config) {
|
|
34
|
-
this.config = config;
|
|
35
|
-
}
|
|
36
|
-
get size() {
|
|
37
|
-
let count = 0;
|
|
38
|
-
for (const byDependentRoot of this.inclusionLists.values()) {
|
|
39
|
-
for (const entries of byDependentRoot.values()) {
|
|
40
|
-
count += entries.size;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return count;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Late lists are stored with `timely=false` rather than dropped: they still count toward the
|
|
47
|
-
* non-timely view used to validate another node's `inclusion_list_bits`.
|
|
48
|
-
*/
|
|
49
|
-
process(signedInclusionList, committeeIndices, timely) {
|
|
50
|
-
const inclusionList = signedInclusionList.message;
|
|
51
|
-
const { slot, validatorIndex } = inclusionList;
|
|
52
|
-
if (slot < this.lowestPermissibleSlot) {
|
|
53
|
-
return InclusionListInsertOutcome.Old;
|
|
54
|
-
}
|
|
55
|
-
const dependentRoot = toRootHex(inclusionList.dependentRoot);
|
|
56
|
-
const stored = this.inclusionLists.getOrDefault(slot).getOrDefault(dependentRoot);
|
|
57
|
-
const entry = stored.get(validatorIndex);
|
|
58
|
-
if (entry !== undefined) {
|
|
59
|
-
if (ssz.heze.InclusionList.equals(entry.signedInclusionList.message, inclusionList)) {
|
|
60
|
-
return InclusionListInsertOutcome.Seen;
|
|
61
|
-
}
|
|
62
|
-
const equivocators = this.equivocators.getOrDefault(slot).getOrDefault(dependentRoot);
|
|
63
|
-
if (equivocators.has(validatorIndex)) {
|
|
64
|
-
return InclusionListInsertOutcome.SubsequentEquivocation;
|
|
65
|
-
}
|
|
66
|
-
equivocators.add(validatorIndex);
|
|
67
|
-
return InclusionListInsertOutcome.Equivocating;
|
|
68
|
-
}
|
|
69
|
-
stored.set(validatorIndex, { signedInclusionList, committeeIndices, timely });
|
|
70
|
-
return InclusionListInsertOutcome.New;
|
|
71
|
-
}
|
|
72
|
-
/** Count a valid message of `validatorIndex` for the first-or-second message gossip rule */
|
|
73
|
-
markSeen(slot, dependentRoot, validatorIndex) {
|
|
74
|
-
const counts = this.seenCounts.getOrDefault(slot).getOrDefault(dependentRoot);
|
|
75
|
-
counts.set(validatorIndex, (counts.get(validatorIndex) ?? 0) + 1);
|
|
76
|
-
}
|
|
77
|
-
/** Gossip rule: at most two valid messages per validator for a `(slot, dependent_root)` */
|
|
78
|
-
seenTwice(slot, dependentRoot, validatorIndex) {
|
|
79
|
-
return (this.seenCounts.get(slot)?.get(dependentRoot)?.get(validatorIndex) ?? 0) >= 2;
|
|
80
|
-
}
|
|
81
|
-
/** Deduplicated transactions from valid, non-equivocating inclusion lists at `(slot, dependentRoot)`. */
|
|
82
|
-
getInclusionListTransactions(slot, dependentRoot, onlyTimely = true) {
|
|
83
|
-
const transactions = [];
|
|
84
|
-
const seen = new Set();
|
|
85
|
-
for (const { signedInclusionList } of this.getEligible(slot, dependentRoot, onlyTimely)) {
|
|
86
|
-
for (const transaction of signedInclusionList.message.transactions) {
|
|
87
|
-
const key = toHex(transaction);
|
|
88
|
-
if (!seen.has(key)) {
|
|
89
|
-
seen.add(key);
|
|
90
|
-
transactions.push(transaction);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return SerializedList.fromArray(transactions);
|
|
95
|
-
}
|
|
96
|
-
/** Bit `i` is set when committee member `i` submitted a valid, non-equivocating inclusion list */
|
|
97
|
-
getInclusionListBits(slot, dependentRoot, onlyTimely = true) {
|
|
98
|
-
const bits = BitArray.fromBitLen(INCLUSION_LIST_COMMITTEE_SIZE);
|
|
99
|
-
for (const { committeeIndices } of this.getEligible(slot, dependentRoot, onlyTimely)) {
|
|
100
|
-
for (const committeeIndex of committeeIndices) {
|
|
101
|
-
bits.set(committeeIndex, true);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
return bits;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* True if `bits` has a bit set for every bit set in the local inclusion list bits.
|
|
108
|
-
*
|
|
109
|
-
* Intentionally deviates from the spec by only checking against timely lists, where the proposer would check
|
|
110
|
-
* against every list it observed (only_timely=False in
|
|
111
|
-
* https://github.com/ethereum/consensus-specs/blob/v1.7.0-beta.4/specs/heze/validator.md#signed-execution-payload-bid).
|
|
112
|
-
* A bid that passed gossip must stay eligible, otherwise a list released after the deadline voids every bid and
|
|
113
|
-
* a high early bid with empty bits crowds out the rest without ever paying.
|
|
114
|
-
*/
|
|
115
|
-
isInclusionListBitsInclusive(slot, dependentRoot, bits) {
|
|
116
|
-
for (const { committeeIndices } of this.getEligible(slot, dependentRoot, true)) {
|
|
117
|
-
if (committeeIndices.some((committeeIndex) => !bits.get(committeeIndex))) {
|
|
118
|
-
return false;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
return true;
|
|
122
|
-
}
|
|
123
|
-
/** Inclusion lists for the given committee positions, to serve InclusionListsByIndices. */
|
|
124
|
-
getByIndices(slot, dependentRoot, indices) {
|
|
125
|
-
const out = [];
|
|
126
|
-
for (const { signedInclusionList, committeeIndices } of this.getEligible(slot, dependentRoot, false)) {
|
|
127
|
-
if (committeeIndices.some((committeeIndex) => indices.get(committeeIndex))) {
|
|
128
|
-
out.push(signedInclusionList);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
return out;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Lists are kept one slot past the MIN_SLOTS_FOR_INCLUSION_LISTS_REQUESTS serving window, the lists of slot N are
|
|
135
|
-
* read when the payload of slot N + 1 is processed, which may happen during slot N + 2
|
|
136
|
-
*/
|
|
137
|
-
prune(clockSlot) {
|
|
138
|
-
const horizon = clockSlot - this.config.MIN_SLOTS_FOR_INCLUSION_LISTS_REQUESTS - 1;
|
|
139
|
-
for (const slot of this.inclusionLists.keys()) {
|
|
140
|
-
if (slot < horizon) {
|
|
141
|
-
this.inclusionLists.delete(slot);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
for (const slot of this.equivocators.keys()) {
|
|
145
|
-
if (slot < horizon) {
|
|
146
|
-
this.equivocators.delete(slot);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
for (const slot of this.seenCounts.keys()) {
|
|
150
|
-
if (slot < horizon) {
|
|
151
|
-
this.seenCounts.delete(slot);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
this.lowestPermissibleSlot = Math.max(horizon, 0);
|
|
155
|
-
}
|
|
156
|
-
/** Entries at `(slot, dependentRoot)` from non-equivocating validators, timely when required. */
|
|
157
|
-
*getEligible(slot, dependentRoot, onlyTimely) {
|
|
158
|
-
const stored = this.inclusionLists.get(slot)?.get(dependentRoot);
|
|
159
|
-
if (!stored || stored.size === 0) {
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
const equivocators = this.equivocators.get(slot)?.get(dependentRoot);
|
|
163
|
-
for (const [validatorIndex, entry] of stored) {
|
|
164
|
-
if (equivocators?.has(validatorIndex)) {
|
|
165
|
-
continue;
|
|
166
|
-
}
|
|
167
|
-
if (onlyTimely && !entry.timely) {
|
|
168
|
-
continue;
|
|
169
|
-
}
|
|
170
|
-
yield entry;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
//# sourceMappingURL=inclusionListStore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inclusionListStore.js","sourceRoot":"","sources":["../../../src/chain/opPools/inclusionListStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QA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,IAAI,KAAK,CAAC,EAAE,CAAC;YACjC,OAAO;QACT,CAAC;QACD,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC;QAErE,KAAK,MAAM,CAAC,cAAc,EAAE,KAAK,CAAC,IAAI,MAAM,EAAE,CAAC;YAC7C,IAAI,YAAY,EAAE,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC;gBACtC,SAAS;YACX,CAAC;YACD,IAAI,UAAU,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;gBAChC,SAAS;YACX,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { heze } from "@lodestar/types";
|
|
2
|
-
import { IBeaconChain } from "../interface.js";
|
|
3
|
-
export type InclusionListValidationResult = {
|
|
4
|
-
/** Positions of `validator_index` in `get_inclusion_list_committee(state, slot)`, several when the committee cycles */
|
|
5
|
-
committeeIndices: number[];
|
|
6
|
-
/** Sum of the byte lengths of `message.transactions` */
|
|
7
|
-
totalBytes: number;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Gossip validation for the `inclusion_list` topic, in spec rule order. Also applied to inclusion lists
|
|
11
|
-
* submitted over the API before they are published.
|
|
12
|
-
*/
|
|
13
|
-
export declare function validateGossipInclusionList(chain: IBeaconChain, signedInclusionList: heze.SignedInclusionList): Promise<InclusionListValidationResult>;
|
|
14
|
-
//# sourceMappingURL=inclusionList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inclusionList.d.ts","sourceRoot":"","sources":["../../../src/chain/validation/inclusionList.ts"],"names":[],"mappings":"AASA,OAAO,EAAiB,IAAI,EAAC,MAAM,iBAAiB,CAAC;AAIrD,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAI7C,MAAM,MAAM,6BAA6B,GAAG;IAC1C,uHAAuH;IACvH,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,wDAAwD;IACxD,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;GAGG;AACH,wBAAsB,2BAA2B,CAC/C,KAAK,EAAE,YAAY,EACnB,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,GAC5C,OAAO,CAAC,6BAA6B,CAAC,CAqIxC"}
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { GENESIS_SLOT, MIN_SEED_LOOKAHEAD, isForkPostHeze } from "@lodestar/params";
|
|
2
|
-
import { computeEpochAtSlot, computeStartSlotAtEpoch, getInclusionListCommittee, getInclusionListSignatureSet, } from "@lodestar/state-transition";
|
|
3
|
-
import { toRootHex } from "@lodestar/utils";
|
|
4
|
-
import { InclusionListError, InclusionListErrorCode } from "../errors/inclusionList.js";
|
|
5
|
-
import { GossipAction } from "../errors/index.js";
|
|
6
|
-
import { RegenCaller } from "../regen/index.js";
|
|
7
|
-
import { isValidDependentRoot } from "./proposerPreferences.js";
|
|
8
|
-
/**
|
|
9
|
-
* Gossip validation for the `inclusion_list` topic, in spec rule order. Also applied to inclusion lists
|
|
10
|
-
* submitted over the API before they are published.
|
|
11
|
-
*/
|
|
12
|
-
export async function validateGossipInclusionList(chain, signedInclusionList) {
|
|
13
|
-
const { slot, validatorIndex, transactions, dependentRoot } = signedInclusionList.message;
|
|
14
|
-
let totalBytes = 0;
|
|
15
|
-
for (let i = 0; i < transactions.length; i++) {
|
|
16
|
-
totalBytes += transactions.getSize(i);
|
|
17
|
-
}
|
|
18
|
-
// A pre-heze slot has no inclusion list committee to validate against
|
|
19
|
-
if (!isForkPostHeze(chain.config.getForkName(slot))) {
|
|
20
|
-
throw new InclusionListError(GossipAction.IGNORE, {
|
|
21
|
-
code: InclusionListErrorCode.PRE_HEZE_SLOT,
|
|
22
|
-
inclusionListSlot: slot,
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
// [IGNORE] The message is either the first or second valid message received from validatorIndex
|
|
26
|
-
// for (message.slot, message.dependent_root)
|
|
27
|
-
const dependentRootHex = toRootHex(dependentRoot);
|
|
28
|
-
if (chain.inclusionListStore.seenTwice(slot, dependentRootHex, validatorIndex)) {
|
|
29
|
-
throw new InclusionListError(GossipAction.IGNORE, {
|
|
30
|
-
code: InclusionListErrorCode.MORE_THAN_TWO,
|
|
31
|
-
validatorIndex,
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
// [IGNORE] message.slot is equal to the current slot, with a MAXIMUM_GOSSIP_CLOCK_DISPARITY allowance
|
|
35
|
-
if (!chain.clock.isCurrentSlotGivenGossipDisparity(slot)) {
|
|
36
|
-
throw new InclusionListError(GossipAction.IGNORE, {
|
|
37
|
-
code: InclusionListErrorCode.INVALID_SLOT,
|
|
38
|
-
inclusionListSlot: slot,
|
|
39
|
-
currentSlot: chain.clock.currentSlot,
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
// [IGNORE] The size of message.transactions is greater than 0
|
|
43
|
-
if (totalBytes === 0) {
|
|
44
|
-
throw new InclusionListError(GossipAction.IGNORE, { code: InclusionListErrorCode.EMPTY_TRANSACTIONS });
|
|
45
|
-
}
|
|
46
|
-
// [REJECT] The size of message.transactions is within upperbound MAX_TRANSACTIONS_BYTES_PER_INCLUSION_LIST
|
|
47
|
-
if (totalBytes > chain.config.MAX_TRANSACTIONS_BYTES_PER_INCLUSION_LIST) {
|
|
48
|
-
throw new InclusionListError(GossipAction.REJECT, {
|
|
49
|
-
code: InclusionListErrorCode.MAXIMUM_SIZE_EXCEEDED,
|
|
50
|
-
totalBytes,
|
|
51
|
-
maxBytes: chain.config.MAX_TRANSACTIONS_BYTES_PER_INCLUSION_LIST,
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
// [REJECT] Every transaction in message.transactions is non-empty
|
|
55
|
-
let emptyTransactionIndex = -1;
|
|
56
|
-
for (let i = 0; i < transactions.length; i++) {
|
|
57
|
-
if (transactions.getSize(i) === 0) {
|
|
58
|
-
emptyTransactionIndex = i;
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
if (emptyTransactionIndex !== -1) {
|
|
63
|
-
throw new InclusionListError(GossipAction.REJECT, {
|
|
64
|
-
code: InclusionListErrorCode.EMPTY_TRANSACTION,
|
|
65
|
-
transactionIndex: emptyTransactionIndex,
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
// [IGNORE] The block with root message.dependent_root has been seen
|
|
69
|
-
const dependentBlock = chain.forkChoice.getBlockHexDefaultStatus(dependentRootHex);
|
|
70
|
-
if (dependentBlock === null) {
|
|
71
|
-
throw new InclusionListError(GossipAction.IGNORE, {
|
|
72
|
-
code: InclusionListErrorCode.UNKNOWN_DEPENDENT_ROOT,
|
|
73
|
-
dependentRoot: dependentRootHex,
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
// [REJECT] The slot of the block with root message.dependent_root is strictly less than
|
|
77
|
-
// compute_start_slot_at_epoch(compute_epoch_at_slot(message.slot) - MIN_SEED_LOOKAHEAD),
|
|
78
|
-
// clamped to genesis like compute_shuffling_dependent_slot
|
|
79
|
-
const epoch = computeEpochAtSlot(slot);
|
|
80
|
-
const dependentEpoch = epoch - MIN_SEED_LOOKAHEAD;
|
|
81
|
-
const maxDependentSlot = Math.max(GENESIS_SLOT, computeStartSlotAtEpoch(dependentEpoch) - 1);
|
|
82
|
-
if (dependentBlock.slot > maxDependentSlot) {
|
|
83
|
-
throw new InclusionListError(GossipAction.REJECT, {
|
|
84
|
-
code: InclusionListErrorCode.INVALID_DEPENDENT_ROOT_SLOT,
|
|
85
|
-
dependentRoot: dependentRootHex,
|
|
86
|
-
dependentSlot: dependentBlock.slot,
|
|
87
|
-
maxSlot: maxDependentSlot,
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
// [IGNORE] is_valid_dependent_root(store, message.dependent_root, epoch - MIN_SEED_LOOKAHEAD)
|
|
91
|
-
if (!isValidDependentRoot(chain.forkChoice, dependentBlock, dependentEpoch)) {
|
|
92
|
-
throw new InclusionListError(GossipAction.IGNORE, {
|
|
93
|
-
code: InclusionListErrorCode.INVALID_DEPENDENT_ROOT,
|
|
94
|
-
dependentRoot: dependentRootHex,
|
|
95
|
-
epoch: dependentEpoch,
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
// [REJECT] validatorIndex is in get_inclusion_list_committee(state, message.slot), where state is the
|
|
99
|
-
// state of the block with root message.dependent_root, i.e. the shuffling of `epoch` keyed by `dependent_root`
|
|
100
|
-
const shuffling = await getShuffling(chain, epoch, dependentRootHex, dependentBlock);
|
|
101
|
-
if (shuffling === null) {
|
|
102
|
-
throw new InclusionListError(GossipAction.IGNORE, {
|
|
103
|
-
code: InclusionListErrorCode.MISSING_SHUFFLING,
|
|
104
|
-
dependentRoot: dependentRootHex,
|
|
105
|
-
epoch,
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
const committeeIndices = getInclusionListCommittee(shuffling, slot).getCommitteeIndices(validatorIndex);
|
|
109
|
-
if (committeeIndices.length === 0) {
|
|
110
|
-
throw new InclusionListError(GossipAction.REJECT, {
|
|
111
|
-
code: InclusionListErrorCode.VALIDATOR_NOT_IN_COMMITTEE,
|
|
112
|
-
validatorIndex,
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
// [REJECT] The signature is valid with respect to the validator's public key
|
|
116
|
-
// Domain from the list's own slot, so a list for the first Heze slot verifies while the clock is still in Gloas
|
|
117
|
-
const signatureSet = getInclusionListSignatureSet(chain.config, slot, signedInclusionList);
|
|
118
|
-
// With only 16 inclusion list committee members per slot, batching can delay gossip by 100ms.
|
|
119
|
-
// Verify without batching so inclusion lists can be forwarded sooner.
|
|
120
|
-
if (!(await chain.bls.verifySignatureSets([signatureSet], { batchable: false }))) {
|
|
121
|
-
throw new InclusionListError(GossipAction.REJECT, { code: InclusionListErrorCode.INVALID_SIGNATURE });
|
|
122
|
-
}
|
|
123
|
-
// Check again after the async validation so concurrent lists of the same validator cannot all pass
|
|
124
|
-
if (chain.inclusionListStore.seenTwice(slot, dependentRootHex, validatorIndex)) {
|
|
125
|
-
throw new InclusionListError(GossipAction.IGNORE, {
|
|
126
|
-
code: InclusionListErrorCode.MORE_THAN_TWO,
|
|
127
|
-
validatorIndex,
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
chain.inclusionListStore.markSeen(slot, dependentRootHex, validatorIndex);
|
|
131
|
-
return { committeeIndices, totalBytes };
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* The shuffling of `epoch` on the branch of `dependentBlock`. Usually cached from the head state; when the
|
|
135
|
-
* dependent block is the head across empty epochs that state has not reached the lookahead start slot, so
|
|
136
|
-
* the spec's `process_slots` step is a state regen
|
|
137
|
-
*/
|
|
138
|
-
async function getShuffling(chain, epoch, dependentRootHex, dependentBlock) {
|
|
139
|
-
const cached = await chain.shufflingCache.get(epoch, dependentRootHex);
|
|
140
|
-
if (cached !== null) {
|
|
141
|
-
return cached;
|
|
142
|
-
}
|
|
143
|
-
try {
|
|
144
|
-
return await chain.regenStateForAttestationVerification(epoch, dependentRootHex, dependentBlock, RegenCaller.validateGossipInclusionList);
|
|
145
|
-
}
|
|
146
|
-
catch {
|
|
147
|
-
return null;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
//# sourceMappingURL=inclusionList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inclusionList.js","sourceRoot":"","sources":["../../../src/chain/validation/inclusionList.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAClF,OAAO,EAEL,kBAAkB,EAClB,uBAAuB,EACvB,yBAAyB,EACzB,4BAA4B,GAC7B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,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,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC;IAE1E,OAAO,EAAC,gBAAgB,EAAE,UAAU,EAAC,CAAC;AACxC,CAAC;AAED;;;;GAIG;AACH,KAAK,UAAU,YAAY,CACzB,KAAmB,EACnB,KAAY,EACZ,gBAAyB,EACzB,cAA0B;IAE1B,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;IACvE,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QACpB,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,IAAI,CAAC;QACH,OAAO,MAAM,KAAK,CAAC,oCAAoC,CACrD,KAAK,EACL,gBAAgB,EAChB,cAAc,EACd,WAAW,CAAC,2BAA2B,CACxC,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PeerId } from "@libp2p/interface";
|
|
2
|
-
import { ResponseOutgoing } from "@lodestar/reqresp";
|
|
3
|
-
import { heze } from "@lodestar/types";
|
|
4
|
-
import { IBeaconChain } from "../../../chain/index.js";
|
|
5
|
-
/**
|
|
6
|
-
* Only lists that passed gossip validation are stored and the store skips equivocators, so the spec's
|
|
7
|
-
* "SHOULD NOT respond with lists that fail gossip validation or are from equivocators" holds by construction.
|
|
8
|
-
*/
|
|
9
|
-
export declare function onInclusionListsByIndices(requestBody: heze.InclusionListsByIndicesRequest, chain: IBeaconChain, peerId: PeerId, peerClient: string): AsyncIterable<ResponseOutgoing>;
|
|
10
|
-
//# sourceMappingURL=inclusionListsByIndices.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inclusionListsByIndices.d.ts","sourceRoot":"","sources":["../../../../src/network/reqresp/handlers/inclusionListsByIndices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAC,IAAI,EAAM,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAC;AAGrD;;;GAGG;AACH,wBAAuB,yBAAyB,CAC9C,WAAW,EAAE,IAAI,CAAC,8BAA8B,EAChD,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,GACjB,aAAa,CAAC,gBAAgB,CAAC,CA0BjC"}
|