diff --git a/packages/cli/src/networks/holesky.ts b/packages/cli/src/networks/holesky.ts new file mode 100644 index 000000000000..f08a31d4c6d3 --- /dev/null +++ b/packages/cli/src/networks/holesky.ts @@ -0,0 +1,13 @@ +export {holeskyChainConfig as chainConfig} from "@lodestar/config/networks"; + +export const depositContractDeployBlock = 0; +export const genesisFileUrl = + "https://media.githubusercontent.com/media/barnabasbusa/holesky/main/custom_config_data/genesis.ssz"; +export const bootnodesFileUrl = + "https://raw.githubusercontent.com/barnabasbusa/holesky/main/custom_config_data/bootstrap_nodes.txt"; + +export const bootEnrs = [ + "enr:-Iq4QJk4WqRkjsX5c2CXtOra6HnxN-BMXnWhmhEQO9Bn9iABTJGdjUOurM7Btj1ouKaFkvTRoju5vz2GPmVON2dffQKGAX53x8JigmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIyk", + "enr:-KG4QMH842KsJOZAHxI98VJcf8oPr1U8Ylyp2Tb-sNAPniWSCaxIS4F9gc3lGOnROEok7g5qrOm8WgJTl2WXx8MhMmIMhGV0aDKQqX6DZjABcAAKAAAAAAAAAIJpZIJ2NIJpcISygIjpiXNlY3AyNTZrMaECvQMvoDF46BfJgvAbbv1hwpNu9VQBXRIpHS_B8zmkZmmDdGNwgiMog3VkcIIjKA", + "enr:-Ly4QDU8tZeygxz1gEeAD4EKe4H_8gg-IanpTY6h8A1YGPv5BPNvCMD77zjHUk_iF1pfG_8DC6jYWbIOD1k5kF-LaG4Bh2F0dG5ldHOIAAAAAAAAAACEZXRoMpCpfoNmMAFwAAoAAAAAAAAAgmlkgnY0gmlwhJK-DYCJc2VjcDI1NmsxoQN4bUae9DwIcq_56DNztksQYXeddTDKRonI5qI3YhN4SohzeW5jbmV0cwCDdGNwgiMog3VkcIIjKA", +]; diff --git a/packages/cli/src/networks/index.ts b/packages/cli/src/networks/index.ts index d9c5812bc5b4..a44575b94351 100644 --- a/packages/cli/src/networks/index.ts +++ b/packages/cli/src/networks/index.ts @@ -16,15 +16,17 @@ import * as gnosis from "./gnosis.js"; import * as goerli from "./goerli.js"; import * as ropsten from "./ropsten.js"; import * as sepolia from "./sepolia.js"; +import * as holesky from "./holesky.js"; import * as chiado from "./chiado.js"; -export type NetworkName = "mainnet" | "dev" | "gnosis" | "goerli" | "ropsten" | "sepolia" | "chiado"; +export type NetworkName = "mainnet" | "dev" | "gnosis" | "goerli" | "ropsten" | "sepolia" | "holesky" | "chiado"; export const networkNames: NetworkName[] = [ "mainnet", "gnosis", "goerli", "ropsten", "sepolia", + "holesky", "chiado", // Leave always as last network. The order matters for the --help printout @@ -63,6 +65,8 @@ export function getNetworkData(network: NetworkName): { return ropsten; case "sepolia": return sepolia; + case "holesky": + return holesky; case "chiado": return chiado; default: diff --git a/packages/config/src/chainConfig/networks/holesky.ts b/packages/config/src/chainConfig/networks/holesky.ts new file mode 100644 index 000000000000..0dc6897c1a90 --- /dev/null +++ b/packages/config/src/chainConfig/networks/holesky.ts @@ -0,0 +1,43 @@ +/* eslint-disable @typescript-eslint/naming-convention */ +import {fromHexString as b} from "@chainsafe/ssz"; +import {ChainConfig} from "../types.js"; +import {chainConfig as mainnet} from "../presets/mainnet.js"; + +// Holesky beacon chain config: +// https://github.com/barnabasbusa/holesky/blob/main/custom_config_data/config.yaml + +export const holeskyChainConfig: ChainConfig = { + ...mainnet, + + CONFIG_NAME: "holesky", + + // Genesis + // --------------------------------------------------------------- + MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 16384, + // Sep-15-2023 14:55:00 +UTC + MIN_GENESIS_TIME: 1694786100, + GENESIS_DELAY: 300, + GENESIS_FORK_VERSION: b("0x00017000"), + + // Forking + // --------------------------------------------------------------- + // # Altair + ALTAIR_FORK_VERSION: b("0x10017000"), + ALTAIR_FORK_EPOCH: 0, + // # Merge + BELLATRIX_FORK_VERSION: b("0x20017000"), + BELLATRIX_FORK_EPOCH: 0, + TERMINAL_TOTAL_DIFFICULTY: BigInt("0"), + // Capella + CAPELLA_FORK_VERSION: b("0x30017000"), + CAPELLA_FORK_EPOCH: 10, + + // # 28,000,000,000 Gwei to ensure quicker ejection + EJECTION_BALANCE: 28000000000, + + // Deposit contract + // --------------------------------------------------------------- + DEPOSIT_CHAIN_ID: 17000, + DEPOSIT_NETWORK_ID: 17000, + DEPOSIT_CONTRACT_ADDRESS: b("0x4242424242424242424242424242424242424242"), +}; diff --git a/packages/config/src/chainConfig/networks/sepolia.ts b/packages/config/src/chainConfig/networks/sepolia.ts index 01caa9536c8a..a54a8d093db1 100644 --- a/packages/config/src/chainConfig/networks/sepolia.ts +++ b/packages/config/src/chainConfig/networks/sepolia.ts @@ -3,7 +3,7 @@ import {fromHexString as b} from "@chainsafe/ssz"; import {ChainConfig} from "../types.js"; import {chainConfig as mainnet} from "../presets/mainnet.js"; -// Ropsten beacon chain config: +// Sepolia beacon chain config: // https://github.com/eth-clients/merge-testnets/blob/main/sepolia-beacon-chain/config.yaml export const sepoliaChainConfig: ChainConfig = { diff --git a/packages/config/src/networks.ts b/packages/config/src/networks.ts index 3f3c8da3cabe..51f251bfb43a 100644 --- a/packages/config/src/networks.ts +++ b/packages/config/src/networks.ts @@ -4,6 +4,7 @@ import {gnosisChainConfig} from "./chainConfig/networks/gnosis.js"; import {goerliChainConfig} from "./chainConfig/networks/goerli.js"; import {ropstenChainConfig} from "./chainConfig/networks/ropsten.js"; import {sepoliaChainConfig} from "./chainConfig/networks/sepolia.js"; +import {holeskyChainConfig} from "./chainConfig/networks/holesky.js"; import {chiadoChainConfig} from "./chainConfig/networks/chiado.js"; export { @@ -12,16 +13,18 @@ export { goerliChainConfig, ropstenChainConfig, sepoliaChainConfig, + holeskyChainConfig, chiadoChainConfig, }; -export type NetworkName = "mainnet" | "gnosis" | "goerli" | "ropsten" | "sepolia" | "chiado"; +export type NetworkName = "mainnet" | "gnosis" | "goerli" | "ropsten" | "sepolia" | "holesky" | "chiado"; export const networksChainConfig: Record = { mainnet: mainnetChainConfig, gnosis: gnosisChainConfig, goerli: goerliChainConfig, ropsten: ropstenChainConfig, sepolia: sepoliaChainConfig, + holesky: holeskyChainConfig, chiado: chiadoChainConfig, }; @@ -51,6 +54,10 @@ export const genesisData: Record = { genesisTime: 1655733600, genesisValidatorsRoot: "0xd8ea171f3c94aea21ebc42a1ed61052acf3f9209c00e4efbaaddac09ed9b8078", }, + holesky: { + genesisTime: 1694786400, + genesisValidatorsRoot: "0x9143aa7c615a7f7115e2b6aac319c03529df8242ae705fba9df39b79c59fa8b1", + }, chiado: { genesisTime: 1665396300, genesisValidatorsRoot: "0x9d642dac73058fbf39c0ae41ab1e34e4d889043cb199851ded7095bc99eb4c1e", diff --git a/packages/prover/src/utils/execution.ts b/packages/prover/src/utils/execution.ts index 141ad7bfa2ba..dcab3d7d7fb4 100644 --- a/packages/prover/src/utils/execution.ts +++ b/packages/prover/src/utils/execution.ts @@ -45,6 +45,7 @@ export function getChainCommon(network: string): Common { case "goerli": case "ropsten": case "sepolia": + case "holesky": // TODO: Not sure how to detect the fork during runtime return new Common({chain: network, hardfork: Hardfork.Shanghai}); case "minimal":