@lodestar/beacon-node 1.47.0-dev.f591cb177e → 1.48.0-dev.67344272c0
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 +44 -12
- 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 +21 -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.map +1 -1
- package/lib/api/impl/events/index.js +2 -0
- package/lib/api/impl/events/index.js.map +1 -1
- package/lib/api/impl/lodestar/index.js +1 -1
- 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 +237 -49
- package/lib/api/impl/validator/index.js.map +1 -1
- package/lib/api/impl/validator/utils.js +1 -1
- 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/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 +21 -13
- 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/verifyBlock.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlock.js +5 -2
- package/lib/chain/blocks/verifyBlock.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/chain.d.ts +9 -4
- package/lib/chain/chain.d.ts.map +1 -1
- package/lib/chain/chain.js +22 -8
- package/lib/chain/chain.js.map +1 -1
- package/lib/chain/errors/blockError.d.ts +1 -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/executionPayloadBid.d.ts +5 -0
- package/lib/chain/errors/executionPayloadBid.d.ts.map +1 -1
- package/lib/chain/errors/executionPayloadBid.js +1 -0
- package/lib/chain/errors/executionPayloadBid.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/prepareNextSlot.d.ts +5 -0
- package/lib/chain/prepareNextSlot.d.ts.map +1 -1
- package/lib/chain/prepareNextSlot.js +47 -6
- 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.js +1 -1
- 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/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 +40 -10
- package/lib/chain/validation/block.js.map +1 -1
- package/lib/chain/validation/executionPayloadBid.d.ts +15 -3
- package/lib/chain/validation/executionPayloadBid.d.ts.map +1 -1
- package/lib/chain/validation/executionPayloadBid.js +166 -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.js +2 -2
- 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 +70 -0
- package/lib/execution/builder/apiClient.d.ts.map +1 -0
- package/lib/execution/builder/apiClient.js +202 -0
- package/lib/execution/builder/apiClient.js.map +1 -0
- package/lib/execution/builder/validateBid.d.ts +23 -0
- package/lib/execution/builder/validateBid.d.ts.map +1 -0
- package/lib/execution/builder/validateBid.js +119 -0
- package/lib/execution/builder/validateBid.js.map +1 -0
- package/lib/metrics/metrics/lodestar.d.ts +84 -23
- package/lib/metrics/metrics/lodestar.d.ts.map +1 -1
- package/lib/metrics/metrics/lodestar.js +161 -55
- 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/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 +6 -2
- 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 +52 -23
- 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 +32 -12
- package/lib/sync/range/chain.js.map +1 -1
- package/lib/sync/range/range.js +1 -1
- package/lib/sync/range/range.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 +6 -2
- package/lib/sync/unknownBlock.d.ts.map +1 -1
- package/lib/sync/unknownBlock.js +143 -68
- 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 +51 -15
- package/src/api/impl/beacon/pool/index.ts +22 -2
- package/src/api/impl/beacon/state/utils.ts +2 -1
- package/src/api/impl/events/index.ts +3 -1
- package/src/api/impl/lodestar/index.ts +1 -1
- package/src/api/impl/validator/index.ts +290 -49
- package/src/api/impl/validator/utils.ts +1 -1
- package/src/api/rest/base.ts +7 -0
- package/src/chain/archiveStore/archiveStore.ts +1 -1
- package/src/chain/blocks/importExecutionPayload.ts +12 -11
- package/src/chain/blocks/index.ts +25 -13
- package/src/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.ts +8 -2
- package/src/chain/blocks/payloadEnvelopeInput/types.ts +17 -4
- package/src/chain/blocks/verifyBlock.ts +5 -2
- 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/chain.ts +25 -7
- package/src/chain/errors/blockError.ts +8 -2
- package/src/chain/errors/executionPayloadBid.ts +6 -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/prepareNextSlot.ts +49 -6
- package/src/chain/produceBlock/computeNewStateRoot.ts +3 -38
- package/src/chain/produceBlock/produceBlockBody.ts +1 -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/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 +43 -10
- package/src/chain/validation/executionPayloadBid.ts +193 -14
- package/src/chain/validation/executionPayloadEnvelope.ts +0 -1
- package/src/chain/validation/payloadAttestationMessage.ts +6 -17
- package/src/chain/validation/proposerPreferences.ts +3 -3
- package/src/chain/validation/proposerSlashing.ts +1 -1
- package/src/chain/validation/voluntaryExit.ts +59 -2
- package/src/execution/builder/apiClient.ts +264 -0
- package/src/execution/builder/validateBid.ts +181 -0
- package/src/metrics/metrics/lodestar.ts +176 -61
- package/src/network/gossip/topic.ts +38 -0
- package/src/network/network.ts +29 -54
- package/src/network/processor/constants.ts +6 -0
- package/src/network/processor/gossipHandlers.ts +6 -2
- package/src/network/processor/gossipQueues/indexed.ts +0 -1
- package/src/network/processor/index.ts +67 -30
- 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 +35 -13
- package/src/sync/range/range.ts +1 -1
- package/src/sync/types.ts +33 -0
- package/src/sync/unknownBlock.ts +167 -73
- 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
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"bugs": {
|
|
12
12
|
"url": "https://github.com/ChainSafe/lodestar/issues"
|
|
13
13
|
},
|
|
14
|
-
"version": "1.
|
|
14
|
+
"version": "1.48.0-dev.67344272c0",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
@@ -100,51 +100,51 @@
|
|
|
100
100
|
"check-readme": "pnpm exec tsx ../../scripts/check_readme.ts"
|
|
101
101
|
},
|
|
102
102
|
"dependencies": {
|
|
103
|
-
"@chainsafe/as-sha256": "^1.2.
|
|
104
|
-
"@chainsafe/blst": "^2.2.0",
|
|
103
|
+
"@chainsafe/as-sha256": "^1.2.5",
|
|
105
104
|
"@chainsafe/discv5": "^12.0.2",
|
|
106
105
|
"@chainsafe/enr": "^6.0.2",
|
|
107
106
|
"@chainsafe/libp2p-noise": "^17.0.0",
|
|
108
107
|
"@chainsafe/libp2p-quic": "^2.1.3",
|
|
109
|
-
"@chainsafe/
|
|
108
|
+
"@chainsafe/lodestar-z": "catalog:",
|
|
109
|
+
"@chainsafe/persistent-merkle-tree": "^1.3.1",
|
|
110
110
|
"@chainsafe/prometheus-gc-stats": "^1.0.0",
|
|
111
111
|
"@chainsafe/snappy-wasm": "^0.5.0",
|
|
112
|
-
"@chainsafe/ssz": "^1.6.
|
|
112
|
+
"@chainsafe/ssz": "^1.6.3",
|
|
113
113
|
"@chainsafe/threads": "^1.11.3",
|
|
114
114
|
"@crate-crypto/node-eth-kzg": "0.9.1",
|
|
115
115
|
"@fastify/bearer-auth": "^10.0.1",
|
|
116
116
|
"@fastify/cors": "^10.0.1",
|
|
117
117
|
"@fastify/swagger": "^9.0.0",
|
|
118
118
|
"@fastify/swagger-ui": "^5.0.1",
|
|
119
|
-
"@libp2p/bootstrap": "^12.0.
|
|
120
|
-
"@libp2p/crypto": "^5.1.
|
|
121
|
-
"@libp2p/gossipsub": "^
|
|
122
|
-
"@libp2p/identify": "^4.
|
|
123
|
-
"@libp2p/interface": "^3.
|
|
124
|
-
"@libp2p/mdns": "^12.0.
|
|
125
|
-
"@libp2p/mplex": "^12.0.
|
|
126
|
-
"@libp2p/peer-id": "^6.0.
|
|
127
|
-
"@libp2p/prometheus-metrics": "^5.0.
|
|
128
|
-
"@libp2p/tcp": "^11.0.
|
|
129
|
-
"@lodestar/api": "^1.
|
|
130
|
-
"@lodestar/config": "^1.
|
|
131
|
-
"@lodestar/db": "^1.
|
|
132
|
-
"@lodestar/fork-choice": "^1.
|
|
133
|
-
"@lodestar/logger": "^1.
|
|
134
|
-
"@lodestar/params": "^1.
|
|
135
|
-
"@lodestar/reqresp": "^1.
|
|
136
|
-
"@lodestar/state-transition": "^1.
|
|
137
|
-
"@lodestar/types": "^1.
|
|
138
|
-
"@lodestar/utils": "^1.
|
|
139
|
-
"@lodestar/validator": "^1.
|
|
119
|
+
"@libp2p/bootstrap": "^12.0.30",
|
|
120
|
+
"@libp2p/crypto": "^5.1.23",
|
|
121
|
+
"@libp2p/gossipsub": "^17.1.0",
|
|
122
|
+
"@libp2p/identify": "^4.1.13",
|
|
123
|
+
"@libp2p/interface": "^3.3.0",
|
|
124
|
+
"@libp2p/mdns": "^12.0.30",
|
|
125
|
+
"@libp2p/mplex": "^12.0.30",
|
|
126
|
+
"@libp2p/peer-id": "^6.0.15",
|
|
127
|
+
"@libp2p/prometheus-metrics": "^5.0.28",
|
|
128
|
+
"@libp2p/tcp": "^11.0.27",
|
|
129
|
+
"@lodestar/api": "^1.48.0-dev.67344272c0",
|
|
130
|
+
"@lodestar/config": "^1.48.0-dev.67344272c0",
|
|
131
|
+
"@lodestar/db": "^1.48.0-dev.67344272c0",
|
|
132
|
+
"@lodestar/fork-choice": "^1.48.0-dev.67344272c0",
|
|
133
|
+
"@lodestar/logger": "^1.48.0-dev.67344272c0",
|
|
134
|
+
"@lodestar/params": "^1.48.0-dev.67344272c0",
|
|
135
|
+
"@lodestar/reqresp": "^1.48.0-dev.67344272c0",
|
|
136
|
+
"@lodestar/state-transition": "^1.48.0-dev.67344272c0",
|
|
137
|
+
"@lodestar/types": "^1.48.0-dev.67344272c0",
|
|
138
|
+
"@lodestar/utils": "^1.48.0-dev.67344272c0",
|
|
139
|
+
"@lodestar/validator": "^1.48.0-dev.67344272c0",
|
|
140
140
|
"@multiformats/multiaddr": "^13.0.1",
|
|
141
|
-
"datastore-core": "^
|
|
142
|
-
"datastore-level": "^
|
|
141
|
+
"datastore-core": "^12.0.1",
|
|
142
|
+
"datastore-level": "^13.0.1",
|
|
143
143
|
"deepmerge": "^4.3.1",
|
|
144
144
|
"fastify": "^5.8.1",
|
|
145
|
-
"interface-datastore": "^
|
|
145
|
+
"interface-datastore": "^10.0.1",
|
|
146
146
|
"jwt-simple": "0.5.6",
|
|
147
|
-
"libp2p": "3.
|
|
147
|
+
"libp2p": "3.3.9",
|
|
148
148
|
"multiformats": "^13.4.2",
|
|
149
149
|
"prom-client": "^15.1.0",
|
|
150
150
|
"qs": "^6.14.2",
|
|
@@ -155,10 +155,10 @@
|
|
|
155
155
|
},
|
|
156
156
|
"devDependencies": {
|
|
157
157
|
"@chainsafe/swap-or-not-shuffle": "^1.2.1",
|
|
158
|
-
"@libp2p/interface-internal": "^3.
|
|
159
|
-
"@libp2p/logger": "^6.2.
|
|
160
|
-
"@libp2p/utils": "^7.0
|
|
161
|
-
"@lodestar/spec-test-util": "^1.
|
|
158
|
+
"@libp2p/interface-internal": "^3.1.12",
|
|
159
|
+
"@libp2p/logger": "^6.2.13",
|
|
160
|
+
"@libp2p/utils": "^7.4.0",
|
|
161
|
+
"@lodestar/spec-test-util": "^1.48.0-dev.67344272c0",
|
|
162
162
|
"@types/js-yaml": "^4.0.5",
|
|
163
163
|
"@types/qs": "^6.9.7",
|
|
164
164
|
"@types/tmp": "^0.2.3",
|
|
@@ -175,5 +175,5 @@
|
|
|
175
175
|
"beacon",
|
|
176
176
|
"blockchain"
|
|
177
177
|
],
|
|
178
|
-
"gitHead": "
|
|
178
|
+
"gitHead": "11114921165ea242fa2d33b68ac8813cdb75a4ee"
|
|
179
179
|
}
|
|
@@ -104,8 +104,8 @@ export function getBeaconBlockApi({
|
|
|
104
104
|
"chain" | "config" | "metrics" | "network" | "db"
|
|
105
105
|
>): ApplicationMethods<routes.beacon.block.Endpoints> {
|
|
106
106
|
const publishBlockV2: ApplicationMethods<routes.beacon.block.Endpoints>["publishBlockV2"] = async (
|
|
107
|
-
{signedBlockContents, broadcastValidation},
|
|
108
|
-
|
|
107
|
+
{signedBlockContents, broadcastValidation, builderUrl},
|
|
108
|
+
context,
|
|
109
109
|
opts: PublishBlockOpts = {}
|
|
110
110
|
) => {
|
|
111
111
|
const seenTimestampSec = Date.now() / 1000;
|
|
@@ -128,7 +128,8 @@ export function getBeaconBlockApi({
|
|
|
128
128
|
forkName: fork,
|
|
129
129
|
sampledColumns: chain.custodyConfig.sampledColumns,
|
|
130
130
|
custodyColumns: chain.custodyConfig.custodyColumns,
|
|
131
|
-
|
|
131
|
+
seenTimestampSec,
|
|
132
|
+
source: PayloadEnvelopeInputSource.api,
|
|
132
133
|
});
|
|
133
134
|
}
|
|
134
135
|
|
|
@@ -208,6 +209,12 @@ export function getBeaconBlockApi({
|
|
|
208
209
|
const blockLocallyProduced = chain.blockProductionCache.has(blockRoot);
|
|
209
210
|
const valLogMeta = {slot, blockRoot, bodyRoot, broadcastValidation, blockLocallyProduced};
|
|
210
211
|
|
|
212
|
+
if (chain.forkChoice.hasBlockHex(blockRoot)) {
|
|
213
|
+
// Block was already imported, e.g. published again by the validator client or received via gossip
|
|
214
|
+
chain.logger.debug("Ignoring already-known block during publishing", valLogMeta);
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
|
|
211
218
|
switch (broadcastValidation) {
|
|
212
219
|
case routes.beacon.BroadcastValidation.gossip: {
|
|
213
220
|
if (!blockLocallyProduced) {
|
|
@@ -355,6 +362,24 @@ export function getBeaconBlockApi({
|
|
|
355
362
|
chain.validatorMonitor?.registerBeaconBlock(OpSource.api, delaySec, signedBlock.message);
|
|
356
363
|
|
|
357
364
|
chain.logger.info("Publishing block", valLogMeta);
|
|
365
|
+
|
|
366
|
+
// Forward the signed block to the winning builder echoed by the validator client so it can
|
|
367
|
+
// help disseminate the block and learn that its bid won without waiting for block gossip.
|
|
368
|
+
// Failures are non-fatal, the builder also sees the block on gossip.
|
|
369
|
+
if (isForkPostGloas(fork) && builderUrl !== undefined) {
|
|
370
|
+
const gloasBlock = signedBlock as SignedBeaconBlock<ForkPostGloas>;
|
|
371
|
+
if (gloasBlock.message.body.signedExecutionPayloadBid.message.builderIndex !== BUILDER_INDEX_SELF_BUILD) {
|
|
372
|
+
chain.builderApiClient
|
|
373
|
+
.submitSignedBeaconBlock(builderUrl, {data: gloasBlock, bytes: context?.sszBytes ?? undefined})
|
|
374
|
+
.then(() => {
|
|
375
|
+
chain.logger.debug("Submitted signed block to builder", {slot, builderUrl});
|
|
376
|
+
})
|
|
377
|
+
.catch((e) => {
|
|
378
|
+
chain.logger.warn("Failed to submit signed block to builder", {...valLogMeta, builderUrl}, e);
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
|
|
358
383
|
const publishPromises = [
|
|
359
384
|
// Send the block, regardless of whether or not it is valid. The API
|
|
360
385
|
// specification is very clear that this is the desired behavior.
|
|
@@ -373,16 +398,20 @@ export function getBeaconBlockApi({
|
|
|
373
398
|
chain
|
|
374
399
|
.processBlock(blockForImport, opts)
|
|
375
400
|
.catch((e) => {
|
|
376
|
-
if (
|
|
377
|
-
e
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
401
|
+
if (e instanceof BlockError) {
|
|
402
|
+
switch (e.type.code) {
|
|
403
|
+
case BlockErrorCode.ALREADY_KNOWN:
|
|
404
|
+
// Block was imported while publishing, e.g. received via gossip
|
|
405
|
+
chain.logger.debug("Ignoring already-known block during publishing", valLogMeta);
|
|
406
|
+
return;
|
|
407
|
+
case BlockErrorCode.PARENT_BLOCK_UNKNOWN:
|
|
408
|
+
case BlockErrorCode.PARENT_PAYLOAD_UNKNOWN:
|
|
409
|
+
chain.emitter.emit(ChainEvent.blockUnknownParent, {
|
|
410
|
+
blockInput: blockForImport,
|
|
411
|
+
peer: IDENTITY_PEER_ID,
|
|
412
|
+
source: BlockInputSource.api,
|
|
413
|
+
});
|
|
414
|
+
}
|
|
386
415
|
}
|
|
387
416
|
throw e;
|
|
388
417
|
}),
|
|
@@ -401,7 +430,7 @@ export function getBeaconBlockApi({
|
|
|
401
430
|
for (let i = 0; i < dataColumnSidecars.length; i++) {
|
|
402
431
|
// + 1 because we publish to beacon_block first
|
|
403
432
|
const {sentPeers, alreadyPublished} = sentPeersArr[i + 1] as {sentPeers: number; alreadyPublished: boolean};
|
|
404
|
-
// sent peers could be 0
|
|
433
|
+
// sent peers could be 0, data_column_sidecar opts out of the zero peers publish error, see gossipTopicAllowPublishToZeroPeers
|
|
405
434
|
metrics?.dataColumns.sentPeersPerSubnet.observe(sentPeers);
|
|
406
435
|
// A duplicate publish (alreadyPublished=true) means the column is already propagating on the network —
|
|
407
436
|
// expected in self-build flows where peers gossip columns back to us before we publish the envelope.
|
|
@@ -1035,13 +1064,20 @@ export function getBeaconBlockApi({
|
|
|
1035
1064
|
throw new ApiError(400, `publishExecutionPayloadBid not supported for pre-gloas fork=${fork}`);
|
|
1036
1065
|
}
|
|
1037
1066
|
|
|
1067
|
+
const validationTimer = metrics?.opPool.executionPayloadBidPool.apiValidationTime.startTimer();
|
|
1068
|
+
// TODO: once the builder is tested and can be trusted, skip this local validation
|
|
1069
|
+
// to publish faster, accepting peer-score risk if it ever emits an invalid bid.
|
|
1038
1070
|
await validateApiExecutionPayloadBid(chain, signedExecutionPayloadBid);
|
|
1071
|
+
validationTimer?.();
|
|
1039
1072
|
|
|
1040
1073
|
const elapsedSec = chain.clock.secFromSlot(slot, seenTimestampSec);
|
|
1041
1074
|
metrics?.gossipExecutionPayloadBid.elapsedTimeTillReceived.observe({source: OpSource.api}, elapsedSec);
|
|
1042
1075
|
|
|
1043
1076
|
try {
|
|
1044
|
-
const insertOutcome = chain.executionPayloadBidPool.add(
|
|
1077
|
+
const insertOutcome = chain.executionPayloadBidPool.add(
|
|
1078
|
+
signedExecutionPayloadBid,
|
|
1079
|
+
Math.floor(elapsedSec * 1000)
|
|
1080
|
+
);
|
|
1045
1081
|
metrics?.opPool.executionPayloadBidPool.apiInsertOutcome.inc({insertOutcome});
|
|
1046
1082
|
} catch (e) {
|
|
1047
1083
|
chain.logger.error("Error adding to executionPayloadBid pool", {}, e as Error);
|
|
@@ -100,7 +100,9 @@ export function getBeaconPoolApi({
|
|
|
100
100
|
const {indexedAttestation, subnet, attDataRootHex, committeeIndex, validatorCommitteeIndex, committeeSize} =
|
|
101
101
|
await validateGossipFnRetryUnknownRoot(validateFn, network, chain, slot, beaconBlockRoot);
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
try {
|
|
104
|
+
// `is_aggregator` only covers aggregating what we receive on the subnet via gossip, not what
|
|
105
|
+
// a validator client hands us directly, see https://github.com/ChainSafe/lodestar/issues/7548
|
|
104
106
|
const insertOutcome = chain.attestationPool.add(
|
|
105
107
|
committeeIndex,
|
|
106
108
|
attestation,
|
|
@@ -110,6 +112,10 @@ export function getBeaconPoolApi({
|
|
|
110
112
|
priority
|
|
111
113
|
);
|
|
112
114
|
metrics?.opPool.attestationPool.apiInsertOutcome.inc({insertOutcome});
|
|
115
|
+
} catch (e) {
|
|
116
|
+
// The pool is a local optimization, failing to insert must not stop us from publishing a
|
|
117
|
+
// validated attestation, which the route requires us to do. Same handling as the gossip path
|
|
118
|
+
logger.debug("Error adding unaggregated attestation to pool", {subnet}, e as Error);
|
|
113
119
|
}
|
|
114
120
|
|
|
115
121
|
if (isForkPostElectra(fork)) {
|
|
@@ -173,7 +179,21 @@ export function getBeaconPoolApi({
|
|
|
173
179
|
},
|
|
174
180
|
|
|
175
181
|
async submitPoolVoluntaryExit({signedVoluntaryExit}) {
|
|
176
|
-
await validateApiVoluntaryExit(chain, signedVoluntaryExit);
|
|
182
|
+
const result = await validateApiVoluntaryExit(chain, signedVoluntaryExit);
|
|
183
|
+
|
|
184
|
+
if (result.status === "deferred") {
|
|
185
|
+
const currentEpoch = chain.clock.currentEpoch;
|
|
186
|
+
const inserted = chain.deferredVoluntaryExitPool.insert(signedVoluntaryExit, result.validity, currentEpoch);
|
|
187
|
+
if (!inserted) {
|
|
188
|
+
throw new ApiError(400, "Deferred voluntary exit pool is full or already contains this validator");
|
|
189
|
+
}
|
|
190
|
+
logger.info("Voluntary exit deferred until transient conditions are met", {
|
|
191
|
+
validatorIndex: signedVoluntaryExit.message.validatorIndex,
|
|
192
|
+
reason: result.validity,
|
|
193
|
+
});
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
|
|
177
197
|
chain.opPool.insertVoluntaryExit(signedVoluntaryExit);
|
|
178
198
|
chain.emitter.emit(routes.events.EventType.voluntaryExit, signedVoluntaryExit);
|
|
179
199
|
await network.publishVoluntaryExit(signedVoluntaryExit);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import {type PubkeyCache} from "@chainsafe/lodestar-z/pubkeys";
|
|
1
2
|
import {routes} from "@lodestar/api";
|
|
2
3
|
import {CheckpointWithHex, IForkChoice} from "@lodestar/fork-choice";
|
|
3
4
|
import {GENESIS_SLOT} from "@lodestar/params";
|
|
4
|
-
import {IBeaconStateView, IBeaconStateViewGloas
|
|
5
|
+
import {IBeaconStateView, IBeaconStateViewGloas} from "@lodestar/state-transition";
|
|
5
6
|
import {
|
|
6
7
|
BLSPubkey,
|
|
7
8
|
BuilderIndex,
|
|
@@ -14,7 +14,9 @@ export function getEventsApi({
|
|
|
14
14
|
// biome-ignore lint/suspicious/noExplicitAny: We need to use `any` type here
|
|
15
15
|
const handler = (data: any): void => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
17
|
+
// TS only relates `{type, message}` to the `BeaconEvent` discriminated union while
|
|
18
|
+
// `EventType` stays within its ~25-member cap; without the cast, adding events trips TS2345.
|
|
19
|
+
onEvent({type: topic, message: data} as routes.events.BeaconEvent);
|
|
18
20
|
} catch (e) {
|
|
19
21
|
// `chain.emitter` emits synchronously, a throwing listener would propagate the error to
|
|
20
22
|
// whoever emitted the event, e.g. a gossip handler, and skip the remaining listeners.
|