Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Feb 2, 2023
1 parent 4306849 commit 30911c9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/light-client/src/transport/rest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import EventEmitter from "events";
import StrictEventEmitter from "strict-event-emitter-types";
import {allForks, altair, SyncPeriod} from "@lodestar/types";
import {allForks, SyncPeriod} from "@lodestar/types";
import {Api, ApiError, routes} from "@lodestar/api";
import {ForkName} from "@lodestar/params";
import {LightClientTransport} from "./interface.js";
Expand Down
5 changes: 2 additions & 3 deletions packages/light-client/test/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import bls from "@chainsafe/bls/switchable";
import {PointFormat, PublicKey, SecretKey} from "@chainsafe/bls/types";
import {hash, Tree} from "@chainsafe/persistent-merkle-tree";
import {BitArray, fromHexString} from "@chainsafe/ssz";
import {routes} from "@lodestar/api";
import {IBeaconConfig} from "@lodestar/config";
import {
DOMAIN_SYNC_COMMITTEE,
Expand All @@ -12,7 +11,7 @@ import {
SLOTS_PER_EPOCH,
SYNC_COMMITTEE_SIZE,
} from "@lodestar/params";
import {altair, phase0, Slot, ssz, SyncPeriod} from "@lodestar/types";
import {altair, phase0, Slot, ssz, SyncPeriod, allForks} from "@lodestar/types";
import {SyncCommitteeFast} from "../../src/types.js";
import {computeSigningRoot} from "../../src/utils/domain.js";
import {getLcLoggerConsole} from "../../src/utils/logger.js";
Expand Down Expand Up @@ -159,7 +158,7 @@ export function computeLightclientUpdate(config: IBeaconConfig, period: SyncPeri
export function computeLightClientSnapshot(
period: SyncPeriod
): {
snapshot: routes.lightclient.LightClientBootstrap;
snapshot: allForks.LightClientBootstrap;
checkpointRoot: Uint8Array;
} {
const currentSyncCommittee = getInteropSyncCommittee(period).syncCommittee;
Expand Down
16 changes: 8 additions & 8 deletions packages/types/src/allForks/sszTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ export const allForksLightClient = {
LightClientOptimisticUpdate: capella.LightClientOptimisticUpdate,
LightClientStore: capella.LightClientStore,
},
eip4844: {
BeaconBlock: eip4844.BeaconBlock,
LightClientHeader: eip4844.LightClientHeader,
LightClientBootstrap: eip4844.LightClientBootstrap,
LightClientUpdate: eip4844.LightClientUpdate,
LightClientFinalityUpdate: eip4844.LightClientFinalityUpdate,
LightClientOptimisticUpdate: eip4844.LightClientOptimisticUpdate,
LightClientStore: eip4844.LightClientStore,
deneb: {
BeaconBlock: deneb.BeaconBlock,
LightClientHeader: deneb.LightClientHeader,
LightClientBootstrap: deneb.LightClientBootstrap,
LightClientUpdate: deneb.LightClientUpdate,
LightClientFinalityUpdate: deneb.LightClientFinalityUpdate,
LightClientOptimisticUpdate: deneb.LightClientOptimisticUpdate,
LightClientStore: deneb.LightClientStore,
},
};

Expand Down
4 changes: 2 additions & 2 deletions packages/types/src/allForks/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export type AllForksBlindedTypes = {
};

export type AllForksLightClient = {
BeaconBlock: altair.BeaconBlock | bellatrix.BeaconBlock | capella.BeaconBlock | eip4844.BeaconBlock;
BeaconBlock: altair.BeaconBlock | bellatrix.BeaconBlock | capella.BeaconBlock | deneb.BeaconBlock;
LightClientHeader: LightClientHeader;
LightClientBootstrap: LightClientBootstrap;
LightClientUpdate: LightClientUpdate;
Expand Down Expand Up @@ -229,7 +229,7 @@ export type AllForksBlindedSSZTypes = {

export type AllForksLightClientSSZTypes = {
BeaconBlock: AllForksTypeOf<
typeof altairSsz.BeaconBlock | typeof capellaSsz.BeaconBlock | typeof eip4844Ssz.BeaconBlock
typeof altairSsz.BeaconBlock | typeof capellaSsz.BeaconBlock | typeof denebSsz.BeaconBlock
>;
LightClientHeader: AllForksTypeOf<
typeof altairSsz.LightClientHeader | typeof capellaSsz.LightClientHeader | typeof denebSsz.LightClientHeader
Expand Down

0 comments on commit 30911c9

Please sign in to comment.