fix: fix usage of deserializeSyncCommittee

This commit is contained in:
Derrick Hammer 2023-07-11 02:42:54 -04:00
parent a5bfec403a
commit 80fdc45ccd
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 9 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import axiosRetry from "axios-retry";
import axios from "axios"; import axios from "axios";
import { digest } from "@chainsafe/as-sha256"; import { digest } from "@chainsafe/as-sha256";
import { concatBytes } from "@noble/hashes/utils"; import { concatBytes } from "@noble/hashes/utils";
import { deserializeSyncCommittee } from "@lodestar/light-client/utils";
export function getDefaultClientConfig() { export function getDefaultClientConfig() {
const chainConfig = createBeaconConfig( const chainConfig = createBeaconConfig(
@ -38,7 +39,14 @@ export async function optimisticUpdateVerify(
const headerBlockRoot = phase0.ssz.BeaconBlockHeader.hashTreeRoot( const headerBlockRoot = phase0.ssz.BeaconBlockHeader.hashTreeRoot(
header.beacon, header.beacon,
); );
const committeeFast = this.deserializeSyncCommittee(committee);
const committeeFast = deserializeSyncCommittee({
pubkeys: committee,
aggregatePubkey: bls.PublicKey.aggregate(
deserializePubkeys(committee),
).toBytes(),
});
try { try {
assertValidSignedHeader( assertValidSignedHeader(
this.config.chainConfig, this.config.chainConfig,