Skip to content

Commit

Permalink
Load KZG setup
Browse files Browse the repository at this point in the history
  • Loading branch information
dgcoffman committed Nov 7, 2022
1 parent 513e277 commit 7e8f3ab
Show file tree
Hide file tree
Showing 2 changed files with 4,167 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/validator/src/validator.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// TODO EIP-4844 Do this (use the trusted setup from Geth)
// import {loadTrustedSetup} from "c-kzg";
import {loadTrustedSetup} from "c-kzg";
import {IDatabaseApiOptions} from "@lodestar/db";
import {BLSPubkey, ssz} from "@lodestar/types";
import {createIBeaconConfig, IBeaconConfig} from "@lodestar/config";
Expand Down Expand Up @@ -73,6 +72,9 @@ export class Validator {
const clock = new Clock(config, logger, {genesisTime: Number(genesis.genesisTime)});
const loggerVc = getLoggerVc(logger, clock);

// Load our KZG trusted setup into C-KZG for later use
loadTrustedSetup("../../../trusted_setup.txt");

let api: Api;
if (typeof opts.api === "string" || Array.isArray(opts.api)) {
// This new api instance can make do with default timeout as a faster timeout is
Expand Down
Loading

0 comments on commit 7e8f3ab

Please sign in to comment.