Skip to content

Commit fda27b8

Browse files
committed
chore: fix types and lint (ChainSafe#6750)
* chore: fix types and lint * fx * type and lint fix
1 parent 4a55211 commit fda27b8

File tree

5 files changed

+38
-20
lines changed

5 files changed

+38
-20
lines changed

packages/beacon-node/src/api/impl/config/constants.ts

+10
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ import {
3636
SYNC_COMMITTEE_SUBNET_COUNT,
3737
BLOB_TX_TYPE,
3838
VERSIONED_HASH_VERSION_KZG,
39+
COMPOUNDING_WITHDRAWAL_PREFIX,
40+
DOMAIN_CONSOLIDATION,
41+
UNSET_DEPOSIT_RECEIPTS_START_INDEX,
42+
FULL_EXIT_REQUEST_AMOUNT,
3943
} from "@lodestar/params";
4044

4145
/* eslint-disable @typescript-eslint/naming-convention */
@@ -57,6 +61,7 @@ export const specConstants = {
5761
// ## Withdrawal prefixes
5862
BLS_WITHDRAWAL_PREFIX,
5963
ETH1_ADDRESS_WITHDRAWAL_PREFIX,
64+
COMPOUNDING_WITHDRAWAL_PREFIX,
6065
// ## Domain types
6166
DOMAIN_BEACON_PROPOSER,
6267
DOMAIN_BEACON_ATTESTER,
@@ -66,6 +71,7 @@ export const specConstants = {
6671
DOMAIN_SELECTION_PROOF,
6772
DOMAIN_AGGREGATE_AND_PROOF,
6873
DOMAIN_APPLICATION_BUILDER,
74+
DOMAIN_CONSOLIDATION,
6975

7076
// phase0/validator.md
7177
TARGET_AGGREGATORS_PER_COMMITTEE,
@@ -100,4 +106,8 @@ export const specConstants = {
100106
// Deneb types
101107
BLOB_TX_TYPE,
102108
VERSIONED_HASH_VERSION_KZG,
109+
110+
// electra
111+
UNSET_DEPOSIT_RECEIPTS_START_INDEX,
112+
FULL_EXIT_REQUEST_AMOUNT,
103113
};

packages/beacon-node/test/sim/electra-interop.test.ts

+15-15
Original file line numberDiff line numberDiff line change
@@ -234,21 +234,21 @@ describe("executionEngine / ExecutionEngineHttp", function () {
234234
});
235235

236236
// TODO: get this post merge run working
237-
// it("Post-merge, run for a few blocks", async function () {
238-
// console.log("\n\nPost-merge, run for a few blocks\n\n");
239-
// const {elClient, tearDownCallBack} = await runEL(
240-
// {...elSetupConfig, mode: ELStartMode.PostMerge, genesisTemplate: "electra.tmpl"},
241-
// {...elRunOptions, ttd: BigInt(0)},
242-
// controller.signal
243-
// );
244-
// afterEachCallbacks.push(() => tearDownCallBack());
245-
246-
// await runNodeWithEL({
247-
// elClient,
248-
// electraEpoch: 0,
249-
// testName: "post-merge",
250-
// });
251-
// });
237+
it.skip("Post-merge, run for a few blocks", async function () {
238+
console.log("\n\nPost-merge, run for a few blocks\n\n");
239+
const {elClient, tearDownCallBack} = await runEL(
240+
{...elSetupConfig, mode: ELStartMode.PostMerge, genesisTemplate: "electra.tmpl"},
241+
{...elRunOptions, ttd: BigInt(0)},
242+
controller.signal
243+
);
244+
afterEachCallbacks.push(() => tearDownCallBack());
245+
246+
await runNodeWithEL({
247+
elClient,
248+
electraEpoch: 0,
249+
testName: "post-merge",
250+
});
251+
});
252252

253253
/**
254254
* Want to test two things:

packages/beacon-node/test/spec/presets/epoch_processing.test.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,21 @@ export type EpochTransitionFn = (state: CachedBeaconStateAllForks, epochTransiti
2222
/* eslint-disable @typescript-eslint/naming-convention */
2323

2424
const epochTransitionFns: Record<string, EpochTransitionFn> = {
25-
effective_balance_updates: epochFns.processEffectiveBalanceUpdates,
25+
effective_balance_updates: (state, epochTransitionCache) => {
26+
const fork = state.config.getForkSeq(state.slot);
27+
epochFns.processEffectiveBalanceUpdates(fork, state, epochTransitionCache);
28+
},
2629
eth1_data_reset: epochFns.processEth1DataReset,
2730
historical_roots_update: epochFns.processHistoricalRootsUpdate,
2831
inactivity_updates: epochFns.processInactivityUpdates as EpochTransitionFn,
2932
justification_and_finalization: epochFns.processJustificationAndFinalization,
3033
participation_flag_updates: epochFns.processParticipationFlagUpdates as EpochTransitionFn,
3134
participation_record_updates: epochFns.processParticipationRecordUpdates as EpochTransitionFn,
3235
randao_mixes_reset: epochFns.processRandaoMixesReset,
33-
registry_updates: epochFns.processRegistryUpdates,
36+
registry_updates: (state, epochTransitionCache) => {
37+
const fork = state.config.getForkSeq(state.slot);
38+
epochFns.processRegistryUpdates(fork, state, epochTransitionCache);
39+
},
3440
rewards_and_penalties: epochFns.processRewardsAndPenalties,
3541
slashings: epochFns.processSlashings,
3642
slashings_reset: epochFns.processSlashingsReset,

packages/beacon-node/test/spec/presets/operations.test.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ const operationFns: Record<string, BlockProcessFn<CachedBeaconStateAllForks>> =
7171
sync_aggregate_random: sync_aggregate,
7272

7373
voluntary_exit: (state, testCase: {voluntary_exit: phase0.SignedVoluntaryExit}) => {
74-
blockFns.processVoluntaryExit(state, testCase.voluntary_exit);
74+
const fork = state.config.getForkSeq(state.slot);
75+
blockFns.processVoluntaryExit(fork, state, testCase.voluntary_exit);
7576
},
7677

7778
execution_payload: (state, testCase: {body: bellatrix.BeaconBlockBody; execution: {execution_valid: boolean}}) => {

packages/types/src/electra/index.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export * from "./types.js";
2-
export * as ts from "./types.js";
3-
export * as ssz from "./sszTypes.js";
2+
import * as ts from "./types.js";
3+
import * as ssz from "./sszTypes.js";
4+
export {ts, ssz};

0 commit comments

Comments
 (0)