@lodestar/beacon-node 1.43.0-dev.ade910fc78 → 1.43.0-dev.b741495bdc
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 -4
- package/lib/api/impl/beacon/blocks/index.js.map +1 -1
- package/lib/api/impl/beacon/state/utils.d.ts +2 -2
- 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/validator/index.d.ts.map +1 -1
- package/lib/api/impl/validator/index.js +1 -4
- package/lib/api/impl/validator/index.js.map +1 -1
- package/lib/chain/GetBlobsTracker.d.ts +1 -1
- package/lib/chain/GetBlobsTracker.d.ts.map +1 -1
- package/lib/chain/GetBlobsTracker.js +1 -2
- package/lib/chain/GetBlobsTracker.js.map +1 -1
- package/lib/chain/archiveStore/archiveStore.d.ts.map +1 -1
- package/lib/chain/archiveStore/archiveStore.js.map +1 -1
- package/lib/chain/archiveStore/interface.d.ts +4 -4
- package/lib/chain/archiveStore/interface.d.ts.map +1 -1
- package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.d.ts +4 -4
- package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.d.ts.map +1 -1
- package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.js +2 -4
- package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.js.map +1 -1
- package/lib/chain/archiveStore/utils/archiveBlocks.d.ts +2 -2
- package/lib/chain/archiveStore/utils/archiveBlocks.d.ts.map +1 -1
- package/lib/chain/archiveStore/utils/archiveBlocks.js +110 -58
- package/lib/chain/archiveStore/utils/archiveBlocks.js.map +1 -1
- package/lib/chain/blocks/importBlock.d.ts.map +1 -1
- package/lib/chain/blocks/importBlock.js +23 -31
- package/lib/chain/blocks/importBlock.js.map +1 -1
- package/lib/chain/blocks/importExecutionPayload.d.ts +15 -14
- package/lib/chain/blocks/importExecutionPayload.d.ts.map +1 -1
- package/lib/chain/blocks/importExecutionPayload.js +63 -85
- 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 +1 -2
- package/lib/chain/blocks/index.js.map +1 -1
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.d.ts +3 -0
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.d.ts.map +1 -1
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.js +20 -0
- package/lib/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.js.map +1 -1
- package/lib/chain/blocks/payloadEnvelopeProcessor.d.ts +5 -0
- package/lib/chain/blocks/payloadEnvelopeProcessor.d.ts.map +1 -1
- package/lib/chain/blocks/payloadEnvelopeProcessor.js +6 -4
- package/lib/chain/blocks/payloadEnvelopeProcessor.js.map +1 -1
- package/lib/chain/blocks/types.d.ts +15 -21
- package/lib/chain/blocks/types.d.ts.map +1 -1
- package/lib/chain/blocks/verifyExecutionPayloadEnvelope.d.ts +24 -0
- package/lib/chain/blocks/verifyExecutionPayloadEnvelope.d.ts.map +1 -0
- package/lib/chain/blocks/verifyExecutionPayloadEnvelope.js +76 -0
- package/lib/chain/blocks/verifyExecutionPayloadEnvelope.js.map +1 -0
- package/lib/chain/blocks/verifyPayloadsDataAvailability.d.ts +14 -0
- package/lib/chain/blocks/verifyPayloadsDataAvailability.d.ts.map +1 -0
- package/lib/chain/blocks/verifyPayloadsDataAvailability.js +25 -0
- package/lib/chain/blocks/verifyPayloadsDataAvailability.js.map +1 -0
- package/lib/chain/blocks/writePayloadEnvelopeInputToDb.d.ts +1 -1
- package/lib/chain/blocks/writePayloadEnvelopeInputToDb.js +1 -1
- package/lib/chain/chain.d.ts +3 -3
- package/lib/chain/chain.d.ts.map +1 -1
- package/lib/chain/chain.js +16 -32
- package/lib/chain/chain.js.map +1 -1
- package/lib/chain/emitter.d.ts +16 -4
- package/lib/chain/emitter.d.ts.map +1 -1
- package/lib/chain/emitter.js +5 -0
- package/lib/chain/emitter.js.map +1 -1
- package/lib/chain/errors/attestationError.d.ts +8 -1
- package/lib/chain/errors/attestationError.d.ts.map +1 -1
- package/lib/chain/errors/attestationError.js +4 -0
- package/lib/chain/errors/attestationError.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/errors/executionPayloadEnvelope.d.ts +5 -0
- package/lib/chain/errors/executionPayloadEnvelope.d.ts.map +1 -1
- package/lib/chain/errors/executionPayloadEnvelope.js +1 -0
- package/lib/chain/errors/executionPayloadEnvelope.js.map +1 -1
- package/lib/chain/forkChoice/index.d.ts.map +1 -1
- package/lib/chain/forkChoice/index.js +11 -15
- package/lib/chain/forkChoice/index.js.map +1 -1
- package/lib/chain/interface.d.ts +2 -2
- package/lib/chain/interface.d.ts.map +1 -1
- package/lib/chain/prepareNextSlot.d.ts.map +1 -1
- package/lib/chain/prepareNextSlot.js +22 -16
- package/lib/chain/prepareNextSlot.js.map +1 -1
- package/lib/chain/produceBlock/computeNewStateRoot.d.ts +3 -9
- package/lib/chain/produceBlock/computeNewStateRoot.d.ts.map +1 -1
- package/lib/chain/produceBlock/computeNewStateRoot.js +5 -32
- package/lib/chain/produceBlock/computeNewStateRoot.js.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.d.ts +3 -8
- package/lib/chain/produceBlock/produceBlockBody.d.ts.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.js +30 -19
- package/lib/chain/produceBlock/produceBlockBody.js.map +1 -1
- package/lib/chain/regen/errors.d.ts +1 -11
- package/lib/chain/regen/errors.d.ts.map +1 -1
- package/lib/chain/regen/errors.js +0 -2
- package/lib/chain/regen/errors.js.map +1 -1
- package/lib/chain/regen/interface.d.ts +6 -11
- package/lib/chain/regen/interface.d.ts.map +1 -1
- package/lib/chain/regen/queued.d.ts +6 -10
- package/lib/chain/regen/queued.d.ts.map +1 -1
- package/lib/chain/regen/queued.js +3 -10
- package/lib/chain/regen/queued.js.map +1 -1
- package/lib/chain/regen/regen.d.ts +0 -5
- package/lib/chain/regen/regen.d.ts.map +1 -1
- package/lib/chain/regen/regen.js +0 -8
- package/lib/chain/regen/regen.js.map +1 -1
- package/lib/chain/stateCache/persistentCheckpointsCache.d.ts +1 -7
- package/lib/chain/stateCache/persistentCheckpointsCache.d.ts.map +1 -1
- package/lib/chain/stateCache/persistentCheckpointsCache.js +4 -9
- package/lib/chain/stateCache/persistentCheckpointsCache.js.map +1 -1
- package/lib/chain/stateCache/types.d.ts +0 -6
- package/lib/chain/stateCache/types.d.ts.map +1 -1
- package/lib/chain/stateCache/types.js.map +1 -1
- package/lib/chain/validation/aggregateAndProof.js +12 -0
- package/lib/chain/validation/aggregateAndProof.js.map +1 -1
- package/lib/chain/validation/attestation.d.ts.map +1 -1
- package/lib/chain/validation/attestation.js +12 -0
- package/lib/chain/validation/attestation.js.map +1 -1
- package/lib/chain/validation/executionPayloadBid.d.ts.map +1 -1
- package/lib/chain/validation/executionPayloadBid.js +13 -1
- package/lib/chain/validation/executionPayloadBid.js.map +1 -1
- package/lib/chain/validation/executionPayloadEnvelope.d.ts.map +1 -1
- package/lib/chain/validation/executionPayloadEnvelope.js +21 -11
- 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 +4 -3
- package/lib/chain/validation/payloadAttestationMessage.js.map +1 -1
- package/lib/db/repositories/executionPayloadEnvelopeArchive.js +1 -1
- package/lib/db/repositories/executionPayloadEnvelopeArchive.js.map +1 -1
- package/lib/execution/engine/http.d.ts.map +1 -1
- package/lib/execution/engine/http.js +21 -14
- package/lib/execution/engine/http.js.map +1 -1
- package/lib/execution/engine/interface.d.ts +1 -0
- package/lib/execution/engine/interface.d.ts.map +1 -1
- package/lib/execution/engine/mock.d.ts.map +1 -1
- package/lib/execution/engine/mock.js +6 -0
- package/lib/execution/engine/mock.js.map +1 -1
- package/lib/execution/engine/types.d.ts +20 -0
- package/lib/execution/engine/types.d.ts.map +1 -1
- package/lib/execution/engine/types.js +18 -0
- package/lib/execution/engine/types.js.map +1 -1
- package/lib/network/gossip/topic.d.ts +3 -2
- package/lib/network/gossip/topic.d.ts.map +1 -1
- package/lib/network/network.js +1 -1
- package/lib/network/network.js.map +1 -1
- package/lib/network/processor/gossipHandlers.d.ts.map +1 -1
- package/lib/network/processor/gossipHandlers.js +22 -6
- package/lib/network/processor/gossipHandlers.js.map +1 -1
- package/lib/node/nodejs.d.ts.map +1 -1
- package/lib/node/nodejs.js +4 -2
- package/lib/node/nodejs.js.map +1 -1
- package/lib/util/sszBytes.d.ts.map +1 -1
- package/lib/util/sszBytes.js +16 -3
- package/lib/util/sszBytes.js.map +1 -1
- package/package.json +16 -16
- package/src/api/impl/beacon/blocks/index.ts +1 -4
- package/src/api/impl/beacon/state/utils.ts +2 -2
- package/src/api/impl/validator/index.ts +3 -6
- package/src/chain/GetBlobsTracker.ts +1 -2
- package/src/chain/archiveStore/archiveStore.ts +5 -5
- package/src/chain/archiveStore/interface.ts +4 -4
- package/src/chain/archiveStore/strategies/frequencyStateArchiveStrategy.ts +6 -8
- package/src/chain/archiveStore/utils/archiveBlocks.ts +153 -94
- package/src/chain/blocks/importBlock.ts +22 -35
- package/src/chain/blocks/importExecutionPayload.ts +77 -103
- package/src/chain/blocks/index.ts +1 -2
- package/src/chain/blocks/payloadEnvelopeInput/payloadEnvelopeInput.ts +27 -0
- package/src/chain/blocks/payloadEnvelopeProcessor.ts +6 -5
- package/src/chain/blocks/types.ts +15 -26
- package/src/chain/blocks/verifyExecutionPayloadEnvelope.ts +129 -0
- package/src/chain/blocks/verifyPayloadsDataAvailability.ts +38 -0
- package/src/chain/blocks/writePayloadEnvelopeInputToDb.ts +1 -1
- package/src/chain/chain.ts +23 -48
- package/src/chain/emitter.ts +15 -3
- package/src/chain/errors/attestationError.ts +6 -1
- package/src/chain/errors/executionPayloadBid.ts +6 -0
- package/src/chain/errors/executionPayloadEnvelope.ts +6 -0
- package/src/chain/forkChoice/index.ts +8 -20
- package/src/chain/interface.ts +2 -2
- package/src/chain/prepareNextSlot.ts +25 -16
- package/src/chain/produceBlock/computeNewStateRoot.ts +6 -43
- package/src/chain/produceBlock/produceBlockBody.ts +41 -20
- package/src/chain/regen/errors.ts +1 -6
- package/src/chain/regen/interface.ts +6 -11
- package/src/chain/regen/queued.ts +6 -14
- package/src/chain/regen/regen.ts +0 -8
- package/src/chain/stateCache/persistentCheckpointsCache.ts +5 -15
- package/src/chain/stateCache/types.ts +0 -3
- package/src/chain/validation/aggregateAndProof.ts +13 -0
- package/src/chain/validation/attestation.ts +13 -0
- package/src/chain/validation/executionPayloadBid.ts +14 -0
- package/src/chain/validation/executionPayloadEnvelope.ts +22 -12
- package/src/chain/validation/payloadAttestationMessage.ts +5 -3
- package/src/db/repositories/executionPayloadEnvelopeArchive.ts +1 -1
- package/src/execution/engine/http.ts +21 -14
- package/src/execution/engine/interface.ts +1 -0
- package/src/execution/engine/mock.ts +8 -1
- package/src/execution/engine/types.ts +41 -0
- package/src/network/network.ts +1 -1
- package/src/network/processor/gossipHandlers.ts +26 -10
- package/src/node/nodejs.ts +4 -2
- package/src/util/sszBytes.ts +21 -3
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.43.0-dev.
|
|
14
|
+
"version": "1.43.0-dev.b741495bdc",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"@chainsafe/prometheus-gc-stats": "^1.0.0",
|
|
119
119
|
"@chainsafe/pubkey-index-map": "^3.0.0",
|
|
120
120
|
"@chainsafe/snappy-wasm": "^0.5.0",
|
|
121
|
-
"@chainsafe/ssz": "^1.
|
|
121
|
+
"@chainsafe/ssz": "^1.4.0",
|
|
122
122
|
"@chainsafe/threads": "^1.11.3",
|
|
123
123
|
"@crate-crypto/node-eth-kzg": "0.9.1",
|
|
124
124
|
"@fastify/bearer-auth": "^10.0.1",
|
|
@@ -135,18 +135,18 @@
|
|
|
135
135
|
"@libp2p/peer-id": "^6.0.4",
|
|
136
136
|
"@libp2p/prometheus-metrics": "^5.0.14",
|
|
137
137
|
"@libp2p/tcp": "^11.0.13",
|
|
138
|
-
"@lodestar/api": "^1.43.0-dev.
|
|
139
|
-
"@lodestar/config": "^1.43.0-dev.
|
|
140
|
-
"@lodestar/db": "^1.43.0-dev.
|
|
141
|
-
"@lodestar/fork-choice": "^1.43.0-dev.
|
|
142
|
-
"@lodestar/light-client": "^1.43.0-dev.
|
|
143
|
-
"@lodestar/logger": "^1.43.0-dev.
|
|
144
|
-
"@lodestar/params": "^1.43.0-dev.
|
|
145
|
-
"@lodestar/reqresp": "^1.43.0-dev.
|
|
146
|
-
"@lodestar/state-transition": "^1.43.0-dev.
|
|
147
|
-
"@lodestar/types": "^1.43.0-dev.
|
|
148
|
-
"@lodestar/utils": "^1.43.0-dev.
|
|
149
|
-
"@lodestar/validator": "^1.43.0-dev.
|
|
138
|
+
"@lodestar/api": "^1.43.0-dev.b741495bdc",
|
|
139
|
+
"@lodestar/config": "^1.43.0-dev.b741495bdc",
|
|
140
|
+
"@lodestar/db": "^1.43.0-dev.b741495bdc",
|
|
141
|
+
"@lodestar/fork-choice": "^1.43.0-dev.b741495bdc",
|
|
142
|
+
"@lodestar/light-client": "^1.43.0-dev.b741495bdc",
|
|
143
|
+
"@lodestar/logger": "^1.43.0-dev.b741495bdc",
|
|
144
|
+
"@lodestar/params": "^1.43.0-dev.b741495bdc",
|
|
145
|
+
"@lodestar/reqresp": "^1.43.0-dev.b741495bdc",
|
|
146
|
+
"@lodestar/state-transition": "^1.43.0-dev.b741495bdc",
|
|
147
|
+
"@lodestar/types": "^1.43.0-dev.b741495bdc",
|
|
148
|
+
"@lodestar/utils": "^1.43.0-dev.b741495bdc",
|
|
149
|
+
"@lodestar/validator": "^1.43.0-dev.b741495bdc",
|
|
150
150
|
"@multiformats/multiaddr": "^13.0.1",
|
|
151
151
|
"datastore-core": "^11.0.2",
|
|
152
152
|
"datastore-fs": "^11.0.2",
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
"@libp2p/interface-internal": "^3.0.13",
|
|
170
170
|
"@libp2p/logger": "^6.2.2",
|
|
171
171
|
"@libp2p/utils": "^7.0.13",
|
|
172
|
-
"@lodestar/spec-test-util": "^1.43.0-dev.
|
|
172
|
+
"@lodestar/spec-test-util": "^1.43.0-dev.b741495bdc",
|
|
173
173
|
"@types/js-yaml": "^4.0.5",
|
|
174
174
|
"@types/qs": "^6.9.7",
|
|
175
175
|
"@types/tmp": "^0.2.3",
|
|
@@ -186,5 +186,5 @@
|
|
|
186
186
|
"beacon",
|
|
187
187
|
"blockchain"
|
|
188
188
|
],
|
|
189
|
-
"gitHead": "
|
|
189
|
+
"gitHead": "30fc761b43215b6e1b51e1d847af5c76f7447a4a"
|
|
190
190
|
}
|
|
@@ -651,11 +651,10 @@ export function getBeaconBlockApi({
|
|
|
651
651
|
async publishExecutionPayloadEnvelope({signedExecutionPayloadEnvelope}) {
|
|
652
652
|
const seenTimestampSec = Date.now() / 1000;
|
|
653
653
|
const envelope = signedExecutionPayloadEnvelope.message;
|
|
654
|
-
const slot = envelope.
|
|
654
|
+
const slot = envelope.payload.slotNumber;
|
|
655
655
|
const fork = config.getForkName(slot);
|
|
656
656
|
const blockRootHex = toRootHex(envelope.beaconBlockRoot);
|
|
657
657
|
const blockHashHex = toRootHex(envelope.payload.blockHash);
|
|
658
|
-
const stateRootHex = toRootHex(envelope.stateRoot);
|
|
659
658
|
|
|
660
659
|
if (!isForkPostGloas(fork)) {
|
|
661
660
|
throw new ApiError(400, `publishExecutionPayloadEnvelope not supported for pre-gloas fork=${fork}`);
|
|
@@ -740,7 +739,6 @@ export function getBeaconBlockApi({
|
|
|
740
739
|
slot,
|
|
741
740
|
blockRoot: blockRootHex,
|
|
742
741
|
blockHash: blockHashHex,
|
|
743
|
-
stateRoot: stateRootHex,
|
|
744
742
|
builderIndex: envelope.builderIndex,
|
|
745
743
|
isSelfBuild,
|
|
746
744
|
dataColumns: dataColumnSidecars.length,
|
|
@@ -768,7 +766,6 @@ export function getBeaconBlockApi({
|
|
|
768
766
|
builderIndex: envelope.builderIndex,
|
|
769
767
|
blockHash: blockHashHex,
|
|
770
768
|
blockRoot: blockRootHex,
|
|
771
|
-
stateRoot: stateRootHex,
|
|
772
769
|
});
|
|
773
770
|
|
|
774
771
|
const sentPeersArr = await publishPromise;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {routes} from "@lodestar/api";
|
|
2
|
-
import {
|
|
2
|
+
import {CheckpointWithHex, IForkChoice} from "@lodestar/fork-choice";
|
|
3
3
|
import {GENESIS_SLOT} from "@lodestar/params";
|
|
4
4
|
import {IBeaconStateView, PubkeyCache} from "@lodestar/state-transition";
|
|
5
5
|
import {BLSPubkey, Epoch, RootHex, Slot, ValidatorIndex, getValidatorStatus, phase0} from "@lodestar/types";
|
|
@@ -10,7 +10,7 @@ import {ApiError, ValidationError} from "../../errors.js";
|
|
|
10
10
|
export function resolveStateId(
|
|
11
11
|
forkChoice: IForkChoice,
|
|
12
12
|
stateId: routes.beacon.StateId
|
|
13
|
-
): RootHex | Slot |
|
|
13
|
+
): RootHex | Slot | CheckpointWithHex {
|
|
14
14
|
if (stateId === "head") {
|
|
15
15
|
return forkChoice.getHead().stateRoot;
|
|
16
16
|
}
|
|
@@ -70,7 +70,7 @@ import {ChainEvent, CommonBlockBody} from "../../../chain/index.js";
|
|
|
70
70
|
import {PREPARE_NEXT_SLOT_BPS} from "../../../chain/prepareNextSlot.js";
|
|
71
71
|
import {BlockType, ProduceFullDeneb, ProduceFullGloas} from "../../../chain/produceBlock/index.js";
|
|
72
72
|
import {RegenCaller} from "../../../chain/regen/index.js";
|
|
73
|
-
import {
|
|
73
|
+
import {CheckpointHex} from "../../../chain/stateCache/types.js";
|
|
74
74
|
import {validateApiAggregateAndProof} from "../../../chain/validation/index.js";
|
|
75
75
|
import {validateSyncCommitteeGossipContributionAndProof} from "../../../chain/validation/syncCommitteeContributionAndProof.js";
|
|
76
76
|
import {ZERO_HASH} from "../../../constants/index.js";
|
|
@@ -301,7 +301,7 @@ export function getValidatorApi(
|
|
|
301
301
|
* |
|
|
302
302
|
* prepareNextSlot (4s before next slot)
|
|
303
303
|
*/
|
|
304
|
-
async function waitForCheckpointState(cpHex:
|
|
304
|
+
async function waitForCheckpointState(cpHex: CheckpointHex): Promise<IBeaconStateView | null> {
|
|
305
305
|
const cpState = chain.regen.getCheckpointStateSync(cpHex);
|
|
306
306
|
if (cpState) {
|
|
307
307
|
return cpState;
|
|
@@ -1113,7 +1113,6 @@ export function getValidatorApi(
|
|
|
1113
1113
|
const cpState = await waitForCheckpointState({
|
|
1114
1114
|
rootHex: head.blockRoot,
|
|
1115
1115
|
epoch,
|
|
1116
|
-
payloadPresent: head.payloadStatus === PayloadStatus.FULL,
|
|
1117
1116
|
});
|
|
1118
1117
|
if (cpState) {
|
|
1119
1118
|
state = cpState;
|
|
@@ -1642,15 +1641,13 @@ export function getValidatorApi(
|
|
|
1642
1641
|
throw Error("Cached block production result is not full block");
|
|
1643
1642
|
}
|
|
1644
1643
|
|
|
1645
|
-
const {executionPayload, executionRequests
|
|
1644
|
+
const {executionPayload, executionRequests} = produceResult as ProduceFullGloas;
|
|
1646
1645
|
|
|
1647
1646
|
const envelope: gloas.ExecutionPayloadEnvelope = {
|
|
1648
1647
|
payload: executionPayload,
|
|
1649
1648
|
executionRequests: executionRequests,
|
|
1650
1649
|
builderIndex: BUILDER_INDEX_SELF_BUILD,
|
|
1651
1650
|
beaconBlockRoot,
|
|
1652
|
-
slot,
|
|
1653
|
-
stateRoot: payloadEnvelopeStateRoot,
|
|
1654
1651
|
};
|
|
1655
1652
|
|
|
1656
1653
|
logger.info("Produced execution payload envelope", {
|
|
@@ -44,7 +44,7 @@ export class GetBlobsTracker {
|
|
|
44
44
|
this.config = init.config;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
triggerGetBlobs(input: IBlockInput | PayloadEnvelopeInput
|
|
47
|
+
triggerGetBlobs(input: IBlockInput | PayloadEnvelopeInput): void {
|
|
48
48
|
if (this.activeReconstructions.has(input.blockRootHex)) {
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
@@ -101,7 +101,6 @@ export class GetBlobsTracker {
|
|
|
101
101
|
.then((result) => {
|
|
102
102
|
this.logger.debug("getBlobsV2 result for block", {...logCtx, result});
|
|
103
103
|
this.metrics?.dataColumns.dataColumnEngineResult.inc({result});
|
|
104
|
-
onComplete?.();
|
|
105
104
|
})
|
|
106
105
|
.catch((error) => {
|
|
107
106
|
this.logger.debug("Error during getBlobsV2 for block", logCtx, error as Error);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {CheckpointWithHex} from "@lodestar/fork-choice";
|
|
2
2
|
import {LoggerNode} from "@lodestar/logger/node";
|
|
3
3
|
import {Checkpoint} from "@lodestar/types/phase0";
|
|
4
4
|
import {callFnWhenAwait} from "@lodestar/utils";
|
|
@@ -41,7 +41,7 @@ export enum ArchiveStoreTask {
|
|
|
41
41
|
*/
|
|
42
42
|
export class ArchiveStore {
|
|
43
43
|
private archiveMode: ArchiveMode;
|
|
44
|
-
private jobQueue: JobItemQueue<[
|
|
44
|
+
private jobQueue: JobItemQueue<[CheckpointWithHex], void>;
|
|
45
45
|
|
|
46
46
|
private archiveDataEpochs?: number;
|
|
47
47
|
private readonly statesArchiverStrategy: StateArchiveStrategy;
|
|
@@ -64,7 +64,7 @@ export class ArchiveStore {
|
|
|
64
64
|
this.archiveMode = opts.archiveMode;
|
|
65
65
|
this.archiveDataEpochs = opts.archiveDataEpochs;
|
|
66
66
|
|
|
67
|
-
this.jobQueue = new JobItemQueue<[
|
|
67
|
+
this.jobQueue = new JobItemQueue<[CheckpointWithHex], void>(this.processFinalizedCheckpoint, {
|
|
68
68
|
maxLength: PROCESS_FINALIZED_CHECKPOINT_QUEUE_LENGTH,
|
|
69
69
|
signal,
|
|
70
70
|
});
|
|
@@ -166,7 +166,7 @@ export class ArchiveStore {
|
|
|
166
166
|
//-------------------------------------------------------------------------
|
|
167
167
|
// Event handlers
|
|
168
168
|
//-------------------------------------------------------------------------
|
|
169
|
-
private onFinalizedCheckpoint = (finalized:
|
|
169
|
+
private onFinalizedCheckpoint = (finalized: CheckpointWithHex): void => {
|
|
170
170
|
this.jobQueue.push(finalized).catch((e) => {
|
|
171
171
|
if (!isQueueErrorAborted(e)) {
|
|
172
172
|
this.logger.error("Error queuing finalized checkpoint", {epoch: finalized.epoch}, e as Error);
|
|
@@ -187,7 +187,7 @@ export class ArchiveStore {
|
|
|
187
187
|
});
|
|
188
188
|
};
|
|
189
189
|
|
|
190
|
-
private processFinalizedCheckpoint = async (finalized:
|
|
190
|
+
private processFinalizedCheckpoint = async (finalized: CheckpointWithHex): Promise<void> => {
|
|
191
191
|
try {
|
|
192
192
|
const finalizedEpoch = finalized.epoch;
|
|
193
193
|
this.logger.verbose("Start processing finalized checkpoint", {epoch: finalizedEpoch, rootHex: finalized.rootHex});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {CheckpointWithHex} from "@lodestar/fork-choice";
|
|
2
2
|
import {RootHex} from "@lodestar/types";
|
|
3
3
|
import {Metrics} from "../../metrics/metrics.js";
|
|
4
4
|
|
|
@@ -45,9 +45,9 @@ export type FinalizedStats = {
|
|
|
45
45
|
|
|
46
46
|
export interface StateArchiveStrategy {
|
|
47
47
|
onCheckpoint(stateRoot: RootHex, metrics?: Metrics | null): Promise<void>;
|
|
48
|
-
onFinalizedCheckpoint(finalized:
|
|
49
|
-
maybeArchiveState(finalized:
|
|
50
|
-
archiveState(finalized:
|
|
48
|
+
onFinalizedCheckpoint(finalized: CheckpointWithHex, metrics?: Metrics | null): Promise<void>;
|
|
49
|
+
maybeArchiveState(finalized: CheckpointWithHex, metrics?: Metrics | null): Promise<void>;
|
|
50
|
+
archiveState(finalized: CheckpointWithHex, metrics?: Metrics | null): Promise<void>;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
export interface IArchiveStore {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {CheckpointWithHex} from "@lodestar/fork-choice";
|
|
2
2
|
import {SLOTS_PER_EPOCH} from "@lodestar/params";
|
|
3
3
|
import {computeEpochAtSlot, computeStartSlotAtEpoch} from "@lodestar/state-transition";
|
|
4
4
|
import {Epoch, RootHex, Slot} from "@lodestar/types";
|
|
@@ -9,7 +9,6 @@ import {AllocSource, BufferPool} from "../../../util/bufferPool.js";
|
|
|
9
9
|
import {getStateSlotFromBytes} from "../../../util/multifork.js";
|
|
10
10
|
import {IStateRegenerator} from "../../regen/interface.js";
|
|
11
11
|
import {serializeState} from "../../serializeState.js";
|
|
12
|
-
import {fcCheckpointToHexPayload} from "../../stateCache/persistentCheckpointsCache.js";
|
|
13
12
|
import {StateArchiveStrategy, StatesArchiveOpts} from "../interface.js";
|
|
14
13
|
|
|
15
14
|
/**
|
|
@@ -41,7 +40,7 @@ export class FrequencyStateArchiveStrategy implements StateArchiveStrategy {
|
|
|
41
40
|
private readonly bufferPool?: BufferPool | null
|
|
42
41
|
) {}
|
|
43
42
|
|
|
44
|
-
async onFinalizedCheckpoint(_finalized:
|
|
43
|
+
async onFinalizedCheckpoint(_finalized: CheckpointWithHex, _metrics?: Metrics | null): Promise<void> {}
|
|
45
44
|
async onCheckpoint(_stateRoot: RootHex, _metrics?: Metrics | null): Promise<void> {}
|
|
46
45
|
|
|
47
46
|
/**
|
|
@@ -56,7 +55,7 @@ export class FrequencyStateArchiveStrategy implements StateArchiveStrategy {
|
|
|
56
55
|
* epoch - 1024*2 epoch - 1024 epoch - 32 epoch
|
|
57
56
|
* ```
|
|
58
57
|
*/
|
|
59
|
-
async maybeArchiveState(finalized:
|
|
58
|
+
async maybeArchiveState(finalized: CheckpointWithHex, metrics?: Metrics | null): Promise<void> {
|
|
60
59
|
let timer = metrics?.processFinalizedCheckpoint.frequencyStateArchive.startTimer();
|
|
61
60
|
const lastStoredSlot = await this.db.stateArchive.lastKey();
|
|
62
61
|
timer?.({step: FrequencyStateArchiveStep.LoadLastStoredSlot});
|
|
@@ -105,12 +104,11 @@ export class FrequencyStateArchiveStrategy implements StateArchiveStrategy {
|
|
|
105
104
|
* Archives finalized states from active bucket to archive bucket.
|
|
106
105
|
* Only the new finalized state is stored to disk
|
|
107
106
|
*/
|
|
108
|
-
async archiveState(finalized:
|
|
107
|
+
async archiveState(finalized: CheckpointWithHex, metrics?: Metrics | null): Promise<void> {
|
|
109
108
|
// starting from Mar 2024, the finalized state could be from disk or in memory
|
|
110
109
|
let timer = metrics?.processFinalizedCheckpoint.frequencyStateArchive.startTimer();
|
|
111
|
-
|
|
112
|
-
const
|
|
113
|
-
const finalizedStateOrBytes = await this.regen.getCheckpointStateOrBytes(finalizedHexPayload);
|
|
110
|
+
const finalizedHex = {epoch: finalized.epoch, rootHex: finalized.rootHex};
|
|
111
|
+
const finalizedStateOrBytes = await this.regen.getCheckpointStateOrBytes(finalizedHex);
|
|
114
112
|
timer?.({step: FrequencyStateArchiveStep.GetFinalizedState});
|
|
115
113
|
|
|
116
114
|
const {rootHex} = finalized;
|