@lodestar/beacon-node 1.42.0-dev.ff662b331c → 1.42.0
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/pool/index.d.ts.map +1 -1
- package/lib/api/impl/beacon/pool/index.js +0 -4
- 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 +10 -13
- package/lib/api/impl/beacon/state/index.js.map +1 -1
- package/lib/api/impl/lodestar/index.d.ts.map +1 -1
- package/lib/api/impl/lodestar/index.js +0 -4
- 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 +1 -7
- package/lib/api/impl/validator/index.js.map +1 -1
- package/lib/chain/blocks/importBlock.d.ts.map +1 -1
- package/lib/chain/blocks/importBlock.js +4 -6
- 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 +1 -7
- package/lib/chain/blocks/importExecutionPayload.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksExecutionPayloads.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlocksExecutionPayloads.js +2 -3
- package/lib/chain/blocks/verifyBlocksExecutionPayloads.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksSignatures.d.ts.map +1 -1
- package/lib/chain/blocks/verifyBlocksSignatures.js +2 -4
- package/lib/chain/blocks/verifyBlocksSignatures.js.map +1 -1
- package/lib/chain/chain.d.ts.map +1 -1
- package/lib/chain/chain.js +4 -9
- package/lib/chain/chain.js.map +1 -1
- package/lib/chain/forkChoice/index.d.ts.map +1 -1
- package/lib/chain/forkChoice/index.js +8 -10
- package/lib/chain/forkChoice/index.js.map +1 -1
- package/lib/chain/lightClient/index.d.ts +2 -2
- package/lib/chain/lightClient/index.d.ts.map +1 -1
- package/lib/chain/lightClient/index.js.map +1 -1
- package/lib/chain/opPools/aggregatedAttestationPool.d.ts.map +1 -1
- package/lib/chain/opPools/aggregatedAttestationPool.js +2 -5
- package/lib/chain/opPools/aggregatedAttestationPool.js.map +1 -1
- package/lib/chain/opPools/executionPayloadBidPool.d.ts +2 -2
- package/lib/chain/opPools/executionPayloadBidPool.d.ts.map +1 -1
- package/lib/chain/opPools/executionPayloadBidPool.js +2 -2
- package/lib/chain/opPools/executionPayloadBidPool.js.map +1 -1
- package/lib/chain/prepareNextSlot.d.ts.map +1 -1
- package/lib/chain/prepareNextSlot.js +1 -7
- package/lib/chain/prepareNextSlot.js.map +1 -1
- package/lib/chain/produceBlock/computeNewStateRoot.d.ts +2 -2
- package/lib/chain/produceBlock/computeNewStateRoot.d.ts.map +1 -1
- package/lib/chain/produceBlock/computeNewStateRoot.js.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.d.ts +3 -3
- package/lib/chain/produceBlock/produceBlockBody.d.ts.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.js +1 -10
- package/lib/chain/produceBlock/produceBlockBody.js.map +1 -1
- package/lib/chain/validation/block.d.ts.map +1 -1
- package/lib/chain/validation/block.js +2 -2
- package/lib/chain/validation/block.js.map +1 -1
- package/lib/chain/validation/executionPayloadBid.d.ts.map +1 -1
- package/lib/chain/validation/executionPayloadBid.js +4 -7
- 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 +1 -4
- 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 +1 -4
- package/lib/chain/validation/payloadAttestationMessage.js.map +1 -1
- package/lib/chain/validation/syncCommittee.d.ts.map +1 -1
- package/lib/chain/validation/syncCommittee.js +0 -4
- package/lib/chain/validation/syncCommittee.js.map +1 -1
- package/lib/chain/validation/syncCommitteeContributionAndProof.js +1 -4
- package/lib/chain/validation/syncCommitteeContributionAndProof.js.map +1 -1
- package/lib/chain/validatorMonitor.d.ts.map +1 -1
- package/lib/chain/validatorMonitor.js +3 -3
- package/lib/chain/validatorMonitor.js.map +1 -1
- package/lib/network/processor/gossipHandlers.d.ts.map +1 -1
- package/lib/network/processor/gossipHandlers.js +0 -4
- package/lib/network/processor/gossipHandlers.js.map +1 -1
- package/lib/node/nodejs.d.ts.map +1 -1
- package/lib/node/nodejs.js +1 -4
- package/lib/node/nodejs.js.map +1 -1
- package/lib/node/notifier.d.ts.map +1 -1
- package/lib/node/notifier.js +2 -2
- package/lib/node/notifier.js.map +1 -1
- package/package.json +15 -15
- package/src/api/impl/beacon/pool/index.ts +0 -4
- package/src/api/impl/beacon/state/index.ts +15 -15
- package/src/api/impl/lodestar/index.ts +0 -4
- package/src/api/impl/validator/index.ts +0 -7
- package/src/chain/blocks/importBlock.ts +7 -11
- package/src/chain/blocks/importExecutionPayload.ts +1 -7
- package/src/chain/blocks/verifyBlocksExecutionPayloads.ts +1 -2
- package/src/chain/blocks/verifyBlocksSignatures.ts +2 -9
- package/src/chain/chain.ts +4 -10
- package/src/chain/forkChoice/index.ts +8 -11
- package/src/chain/lightClient/index.ts +3 -7
- package/src/chain/opPools/aggregatedAttestationPool.ts +1 -6
- package/src/chain/opPools/executionPayloadBidPool.ts +3 -3
- package/src/chain/prepareNextSlot.ts +0 -8
- package/src/chain/produceBlock/computeNewStateRoot.ts +1 -2
- package/src/chain/produceBlock/produceBlockBody.ts +5 -25
- package/src/chain/validation/block.ts +1 -2
- package/src/chain/validation/executionPayloadBid.ts +3 -7
- package/src/chain/validation/executionPayloadEnvelope.ts +1 -8
- package/src/chain/validation/payloadAttestationMessage.ts +0 -4
- package/src/chain/validation/syncCommittee.ts +1 -5
- package/src/chain/validation/syncCommitteeContributionAndProof.ts +1 -5
- package/src/chain/validatorMonitor.ts +2 -3
- package/src/network/processor/gossipHandlers.ts +0 -5
- package/src/node/nodejs.ts +2 -5
- package/src/node/notifier.ts +2 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {SYNC_COMMITTEE_SUBNET_COUNT, SYNC_COMMITTEE_SUBNET_SIZE} from "@lodestar/params";
|
|
2
|
-
import {IBeaconStateView
|
|
2
|
+
import {IBeaconStateView} from "@lodestar/state-transition";
|
|
3
3
|
import {SubnetID, altair} from "@lodestar/types";
|
|
4
4
|
import {toRootHex} from "@lodestar/utils";
|
|
5
5
|
import {GossipAction, SyncCommitteeError, SyncCommitteeErrorCode} from "../errors/index.js";
|
|
@@ -148,10 +148,6 @@ function getIndicesInSubcommittee(
|
|
|
148
148
|
subnet: SubnetID,
|
|
149
149
|
data: Pick<altair.SyncCommitteeMessage, "slot" | "validatorIndex">
|
|
150
150
|
): IndexInSubcommittee[] | null {
|
|
151
|
-
if (!isStatePostAltair(headState)) {
|
|
152
|
-
return null;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
151
|
const syncCommittee = headState.getIndexedSyncCommittee(data.slot);
|
|
156
152
|
const indexesInCommittee = syncCommittee.validatorIndexMap.get(data.validatorIndex);
|
|
157
153
|
if (indexesInCommittee === undefined) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {SYNC_COMMITTEE_SUBNET_SIZE} from "@lodestar/params";
|
|
2
|
-
import {IBeaconStateView,
|
|
2
|
+
import {IBeaconStateView, isSyncCommitteeAggregator} from "@lodestar/state-transition";
|
|
3
3
|
import {ValidatorIndex, altair} from "@lodestar/types";
|
|
4
4
|
import {GossipAction, SyncCommitteeError, SyncCommitteeErrorCode} from "../errors/index.js";
|
|
5
5
|
import {IBeaconChain} from "../interface.js";
|
|
@@ -107,10 +107,6 @@ function getContributionIndices(
|
|
|
107
107
|
state: IBeaconStateView,
|
|
108
108
|
contribution: altair.SyncCommitteeContribution
|
|
109
109
|
): ValidatorIndex[] {
|
|
110
|
-
if (!isStatePostAltair(state)) {
|
|
111
|
-
throw new Error("Expected Altair state for sync committee contribution");
|
|
112
|
-
}
|
|
113
|
-
|
|
114
110
|
const startIndex = contribution.subcommitteeIndex * SYNC_COMMITTEE_SUBNET_SIZE;
|
|
115
111
|
|
|
116
112
|
const syncCommittee = state.getIndexedSyncCommittee(contribution.slot);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {ChainForkConfig} from "@lodestar/config";
|
|
2
|
-
import {MIN_ATTESTATION_INCLUSION_DELAY, SLOTS_PER_EPOCH} from "@lodestar/params";
|
|
2
|
+
import {ForkSeq, MIN_ATTESTATION_INCLUSION_DELAY, SLOTS_PER_EPOCH} from "@lodestar/params";
|
|
3
3
|
import {
|
|
4
4
|
IBeaconStateView,
|
|
5
5
|
ParticipationFlags,
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
computeStartSlotAtEpoch,
|
|
8
8
|
computeTimeAtSlot,
|
|
9
9
|
getCurrentSlot,
|
|
10
|
-
isStatePostAltair,
|
|
11
10
|
parseAttesterFlags,
|
|
12
11
|
parseParticipationFlags,
|
|
13
12
|
} from "@lodestar/state-transition";
|
|
@@ -741,7 +740,7 @@ export function createValidatorMonitor(
|
|
|
741
740
|
|
|
742
741
|
const rootCache = new RootHexCache(headState);
|
|
743
742
|
|
|
744
|
-
if (
|
|
743
|
+
if (config.getForkSeq(headState.slot) >= ForkSeq.altair) {
|
|
745
744
|
const prevEpochStartSlot = computeStartSlotAtEpoch(prevEpoch);
|
|
746
745
|
const prevEpochTargetRoot = toRootHex(headState.getBlockRootAtSlot(prevEpochStartSlot));
|
|
747
746
|
|
|
@@ -1148,11 +1148,6 @@ function getSequentialHandlers(modules: ValidatorFnsModules, options: GossipHand
|
|
|
1148
1148
|
} catch (e) {
|
|
1149
1149
|
logger.error("Error adding to executionPayloadBid pool", {}, e as Error);
|
|
1150
1150
|
}
|
|
1151
|
-
|
|
1152
|
-
chain.emitter.emit(routes.events.EventType.executionPayloadBid, {
|
|
1153
|
-
version: config.getForkName(executionPayloadBid.message.slot),
|
|
1154
|
-
data: executionPayloadBid,
|
|
1155
|
-
});
|
|
1156
1151
|
},
|
|
1157
1152
|
};
|
|
1158
1153
|
}
|
package/src/node/nodejs.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {BeaconApiMethods} from "@lodestar/api/beacon/server";
|
|
|
6
6
|
import {BeaconConfig} from "@lodestar/config";
|
|
7
7
|
import type {LoggerNode} from "@lodestar/logger/node";
|
|
8
8
|
import {ZERO_HASH_HEX} from "@lodestar/params";
|
|
9
|
-
import {IBeaconStateView, PubkeyCache
|
|
9
|
+
import {IBeaconStateView, PubkeyCache} from "@lodestar/state-transition";
|
|
10
10
|
import {phase0} from "@lodestar/types";
|
|
11
11
|
import {sleep, toRootHex} from "@lodestar/utils";
|
|
12
12
|
import {ProcessShutdownCallback} from "@lodestar/validator";
|
|
@@ -221,10 +221,7 @@ export class BeaconNode {
|
|
|
221
221
|
|
|
222
222
|
let executionEngineOpts = opts.executionEngine;
|
|
223
223
|
if (opts.executionEngine.mode === "mock") {
|
|
224
|
-
const eth1BlockHash =
|
|
225
|
-
isStatePostBellatrix(anchorState) && anchorState.isExecutionStateType
|
|
226
|
-
? toRootHex(anchorState.latestBlockHash)
|
|
227
|
-
: undefined;
|
|
224
|
+
const eth1BlockHash = anchorState.isExecutionStateType ? toRootHex(anchorState.latestBlockHash) : undefined;
|
|
228
225
|
executionEngineOpts = {
|
|
229
226
|
...opts.executionEngine,
|
|
230
227
|
genesisBlockHash: ZERO_HASH_HEX,
|
package/src/node/notifier.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import {BeaconConfig} from "@lodestar/config";
|
|
2
2
|
import {ExecutionStatus, ProtoBlock} from "@lodestar/fork-choice";
|
|
3
3
|
import {EPOCHS_PER_SYNC_COMMITTEE_PERIOD, SLOTS_PER_EPOCH} from "@lodestar/params";
|
|
4
|
-
import {
|
|
5
|
-
IBeaconStateView,
|
|
6
|
-
computeEpochAtSlot,
|
|
7
|
-
computeStartSlotAtEpoch,
|
|
8
|
-
isStatePostBellatrix,
|
|
9
|
-
} from "@lodestar/state-transition";
|
|
4
|
+
import {IBeaconStateView, computeEpochAtSlot, computeStartSlotAtEpoch} from "@lodestar/state-transition";
|
|
10
5
|
import {Epoch} from "@lodestar/types";
|
|
11
6
|
import {ErrorAborted, Logger, prettyBytes, prettyBytesShort, sleep} from "@lodestar/utils";
|
|
12
7
|
import {IBeaconChain} from "../chain/index.js";
|
|
@@ -170,7 +165,7 @@ function getHeadExecutionInfo(
|
|
|
170
165
|
const executionStatusStr = headInfo.executionStatus.toLowerCase();
|
|
171
166
|
|
|
172
167
|
// Add execution status to notifier only if head is on/post bellatrix
|
|
173
|
-
if (
|
|
168
|
+
if (headState.isExecutionStateType) {
|
|
174
169
|
if (headState.isMergeTransitionComplete) {
|
|
175
170
|
const executionPayloadHashInfo =
|
|
176
171
|
headInfo.executionStatus !== ExecutionStatus.PreMerge ? headInfo.executionPayloadBlockHash : "empty";
|