Skip to content

Commit

Permalink
Merge cfceff1 into e5b74d5
Browse files Browse the repository at this point in the history
  • Loading branch information
dapplion authored Jun 16, 2022
2 parents e5b74d5 + cfceff1 commit 802b8e2
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 3 deletions.
6 changes: 5 additions & 1 deletion packages/cli/src/networks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ import * as gnosis from "./gnosis.js";
import * as prater from "./prater.js";
import * as kiln from "./kiln.js";
import * as ropsten from "./ropsten.js";
import * as sepolia from "./sepolia.js";

export type NetworkName = "mainnet" | "dev" | "gnosis" | "prater" | "kiln" | "ropsten";
export type NetworkName = "mainnet" | "dev" | "gnosis" | "prater" | "kiln" | "ropsten" | "sepolia";
export const networkNames: NetworkName[] = [
"mainnet",
"gnosis",
"prater",
"kiln",
"ropsten",
"sepolia",

// Leave always as last network. The order matters for the --help printout
"dev",
Expand Down Expand Up @@ -53,6 +55,8 @@ function getNetworkData(
return kiln;
case "ropsten":
return ropsten;
case "sepolia":
return sepolia;
default:
throw Error(`Network not supported: ${network}`);
}
Expand Down
12 changes: 12 additions & 0 deletions packages/cli/src/networks/sepolia.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export {sepoliaChainConfig as chainConfig} from "@chainsafe/lodestar-config/networks";

/* eslint-disable max-len */

export const depositContractDeployBlock = 1273020;
export const genesisFileUrl = "https://raw.githubusercontent.com/eth-clients/merge-testnets/main/sepolia/genesis.ssz";
export const bootnodesFileUrl =
"https://raw.githubusercontent.com/eth-clients/merge-testnets/main/sepolia/bootstrap_nodes.txt";

export const bootEnrs = [
"enr:-Iq4QMCTfIMXnow27baRUb35Q8iiFHSIDBJh6hQM5Axohhf4b6Kr_cOCu0htQ5WvVqKvFgY28893DHAg8gnBAXsAVqmGAX53x8JggmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIyk",
];
36 changes: 36 additions & 0 deletions packages/config/src/chainConfig/networks/sepolia.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* eslint-disable @typescript-eslint/naming-convention */
import {fromHexString as b} from "@chainsafe/ssz";
import {IChainConfig} from "../types.js";
import {chainConfig as mainnet} from "../presets/mainnet.js";

/* eslint-disable max-len */

// Ropsten beacon chain config:
// https://github.com/eth-clients/merge-testnets/blob/main/sepolia-beacon-chain/config.yaml

export const sepoliaChainConfig: IChainConfig = {
...mainnet,

// Genesis
// ---------------------------------------------------------------
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 1300,
// # Sunday, June 19, 2022 2:00:00 PM +UTC
MIN_GENESIS_TIME: 1655647200,
GENESIS_FORK_VERSION: b("0x90000069"),

// Forking
// ---------------------------------------------------------------
// # Altair
ALTAIR_FORK_VERSION: b("0x90000070"),
ALTAIR_FORK_EPOCH: 50,
// # Merge
BELLATRIX_FORK_VERSION: b("0x90000071"),
BELLATRIX_FORK_EPOCH: 100,
TERMINAL_TOTAL_DIFFICULTY: BigInt("100000000000000000000000"),

// Deposit contract
// ---------------------------------------------------------------
DEPOSIT_CHAIN_ID: 11155111,
DEPOSIT_NETWORK_ID: 11155111,
DEPOSIT_CONTRACT_ADDRESS: b("0x7f02C3E3c98b133055B8B348B2Ac625669Ed295D"),
};
13 changes: 11 additions & 2 deletions packages/config/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,23 @@ import {gnosisChainConfig} from "./chainConfig/networks/gnosis.js";
import {praterChainConfig} from "./chainConfig/networks/prater.js";
import {kilnChainConfig} from "./chainConfig/networks/kiln.js";
import {ropstenChainConfig} from "./chainConfig/networks/ropsten.js";
import {sepoliaChainConfig} from "./chainConfig/networks/sepolia.js";

export {mainnetChainConfig, gnosisChainConfig, praterChainConfig, kilnChainConfig, ropstenChainConfig};
export {
mainnetChainConfig,
gnosisChainConfig,
praterChainConfig,
kilnChainConfig,
ropstenChainConfig,
sepoliaChainConfig,
};

export type NetworkName = "mainnet" | "gnosis" | "prater" | "kiln" | "ropsten";
export type NetworkName = "mainnet" | "gnosis" | "prater" | "kiln" | "ropsten" | "sepolia";
export const networksChainConfig: Record<NetworkName, IChainConfig> = {
mainnet: mainnetChainConfig,
gnosis: gnosisChainConfig,
prater: praterChainConfig,
kiln: kilnChainConfig,
ropsten: ropstenChainConfig,
sepolia: sepoliaChainConfig,
};

0 comments on commit 802b8e2

Please sign in to comment.