Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/beacon-node/src/api/impl/config/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ import {
SYNC_COMMITTEE_SUBNET_COUNT,
BLOB_TX_TYPE,
VERSIONED_HASH_VERSION_KZG,
COMPOUNDING_WITHDRAWAL_PREFIX,
DOMAIN_CONSOLIDATION,
UNSET_DEPOSIT_RECEIPTS_START_INDEX,
FULL_EXIT_REQUEST_AMOUNT,
} from "@lodestar/params";

/* eslint-disable @typescript-eslint/naming-convention */
Expand All @@ -57,6 +61,7 @@ export const specConstants = {
// ## Withdrawal prefixes
BLS_WITHDRAWAL_PREFIX,
ETH1_ADDRESS_WITHDRAWAL_PREFIX,
COMPOUNDING_WITHDRAWAL_PREFIX,
// ## Domain types
DOMAIN_BEACON_PROPOSER,
DOMAIN_BEACON_ATTESTER,
Expand All @@ -66,6 +71,7 @@ export const specConstants = {
DOMAIN_SELECTION_PROOF,
DOMAIN_AGGREGATE_AND_PROOF,
DOMAIN_APPLICATION_BUILDER,
DOMAIN_CONSOLIDATION,

// phase0/validator.md
TARGET_AGGREGATORS_PER_COMMITTEE,
Expand Down Expand Up @@ -100,4 +106,8 @@ export const specConstants = {
// Deneb types
BLOB_TX_TYPE,
VERSIONED_HASH_VERSION_KZG,

// electra
UNSET_DEPOSIT_RECEIPTS_START_INDEX,
FULL_EXIT_REQUEST_AMOUNT,
};
30 changes: 15 additions & 15 deletions packages/beacon-node/test/sim/electra-interop.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,21 +234,21 @@ describe("executionEngine / ExecutionEngineHttp", function () {
});

// TODO: get this post merge run working
// it("Post-merge, run for a few blocks", async function () {
// console.log("\n\nPost-merge, run for a few blocks\n\n");
// const {elClient, tearDownCallBack} = await runEL(
// {...elSetupConfig, mode: ELStartMode.PostMerge, genesisTemplate: "electra.tmpl"},
// {...elRunOptions, ttd: BigInt(0)},
// controller.signal
// );
// afterEachCallbacks.push(() => tearDownCallBack());

// await runNodeWithEL({
// elClient,
// electraEpoch: 0,
// testName: "post-merge",
// });
// });
it.skip("Post-merge, run for a few blocks", async function () {
console.log("\n\nPost-merge, run for a few blocks\n\n");
const {elClient, tearDownCallBack} = await runEL(
{...elSetupConfig, mode: ELStartMode.PostMerge, genesisTemplate: "electra.tmpl"},
{...elRunOptions, ttd: BigInt(0)},
controller.signal
);
afterEachCallbacks.push(() => tearDownCallBack());

await runNodeWithEL({
elClient,
electraEpoch: 0,
testName: "post-merge",
});
});

/**
* Want to test two things:
Expand Down
10 changes: 8 additions & 2 deletions packages/beacon-node/test/spec/presets/epoch_processing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,21 @@ export type EpochTransitionFn = (state: CachedBeaconStateAllForks, epochTransiti
/* eslint-disable @typescript-eslint/naming-convention */

const epochTransitionFns: Record<string, EpochTransitionFn> = {
effective_balance_updates: epochFns.processEffectiveBalanceUpdates,
effective_balance_updates: (state, epochTransitionCache) => {
const fork = state.config.getForkSeq(state.slot);
epochFns.processEffectiveBalanceUpdates(fork, state, epochTransitionCache);
},
eth1_data_reset: epochFns.processEth1DataReset,
historical_roots_update: epochFns.processHistoricalRootsUpdate,
inactivity_updates: epochFns.processInactivityUpdates as EpochTransitionFn,
justification_and_finalization: epochFns.processJustificationAndFinalization,
participation_flag_updates: epochFns.processParticipationFlagUpdates as EpochTransitionFn,
participation_record_updates: epochFns.processParticipationRecordUpdates as EpochTransitionFn,
randao_mixes_reset: epochFns.processRandaoMixesReset,
registry_updates: epochFns.processRegistryUpdates,
registry_updates: (state, epochTransitionCache) => {
const fork = state.config.getForkSeq(state.slot);
epochFns.processRegistryUpdates(fork, state, epochTransitionCache);
},
rewards_and_penalties: epochFns.processRewardsAndPenalties,
slashings: epochFns.processSlashings,
slashings_reset: epochFns.processSlashingsReset,
Expand Down
3 changes: 2 additions & 1 deletion packages/beacon-node/test/spec/presets/operations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ const operationFns: Record<string, BlockProcessFn<CachedBeaconStateAllForks>> =
sync_aggregate_random: sync_aggregate,

voluntary_exit: (state, testCase: {voluntary_exit: phase0.SignedVoluntaryExit}) => {
blockFns.processVoluntaryExit(state, testCase.voluntary_exit);
const fork = state.config.getForkSeq(state.slot);
blockFns.processVoluntaryExit(fork, state, testCase.voluntary_exit);
},

execution_payload: (state, testCase: {body: bellatrix.BeaconBlockBody; execution: {execution_valid: boolean}}) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/light-client/test/unit/webEsmBundle.browser.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access */
import {expect, describe, it, vi} from "vitest";
import {Lightclient, LightclientEvent, utils, transport} from "../../dist/lightclient.min.mjs";
import {Lightclient, LightclientEvent, utils, transport} from "../../src/index.js";

describe("web bundle for lightclient", () => {
vi.setConfig({testTimeout: 20_000});
Expand Down
5 changes: 3 additions & 2 deletions packages/types/src/electra/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from "./types.js";
export * as ts from "./types.js";
export * as ssz from "./sszTypes.js";
import * as ts from "./types.js";
import * as ssz from "./sszTypes.js";
export {ts, ssz};