Skip to content

Commit

Permalink
Release v1.4.3 (#5135)
Browse files Browse the repository at this point in the history
  • Loading branch information
wemeetagain authored Feb 12, 2023
2 parents 440c59f + ce35af9 commit 941a1cf
Show file tree
Hide file tree
Showing 25 changed files with 227 additions and 84 deletions.
2 changes: 1 addition & 1 deletion default.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# To specify a specific network (defaults to mainnet) set this value.
# Allowed values are: mainnet, gnosis, goerli, ropsten and sepolia. Source for currently supported networks: https://github.com/ChainSafe/lodestar/blob/unstable/packages/cli/src/networks/index.ts#L19
# Allowed values are: mainnet, gnosis, goerli, ropsten, sepolia and chiado. Source for currently supported networks: https://github.com/ChainSafe/lodestar/blob/unstable/packages/cli/src/networks/index.ts#L19
LODESTAR_NETWORK=mainnet

# Set a custom admin password to prevent having to signup.
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"npmClient": "yarn",
"useWorkspaces": true,
"version": "1.4.2",
"version": "1.4.3",
"stream": "true",
"command": {
"version": {
Expand Down
10 changes: 5 additions & 5 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"bugs": {
"url": "https://github.com/ChainSafe/lodestar/issues"
},
"version": "1.4.2",
"version": "1.4.3",
"type": "module",
"exports": {
".": {
Expand Down Expand Up @@ -70,10 +70,10 @@
"dependencies": {
"@chainsafe/persistent-merkle-tree": "^0.4.2",
"@chainsafe/ssz": "^0.9.2",
"@lodestar/config": "^1.4.2",
"@lodestar/params": "^1.4.2",
"@lodestar/types": "^1.4.2",
"@lodestar/utils": "^1.4.2",
"@lodestar/config": "^1.4.3",
"@lodestar/params": "^1.4.3",
"@lodestar/types": "^1.4.3",
"@lodestar/utils": "^1.4.3",
"cross-fetch": "^3.1.4",
"eventsource": "^2.0.2",
"qs": "^6.10.1"
Expand Down
24 changes: 12 additions & 12 deletions packages/beacon-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"bugs": {
"url": "https://github.com/ChainSafe/lodestar/issues"
},
"version": "1.4.2",
"version": "1.4.3",
"type": "module",
"exports": {
".": {
Expand Down Expand Up @@ -114,17 +114,17 @@
"@libp2p/peer-id-factory": "^2.0.1",
"@libp2p/prometheus-metrics": "^1.1.2",
"@libp2p/tcp": "^6.1.0",
"@lodestar/api": "^1.4.2",
"@lodestar/config": "^1.4.2",
"@lodestar/db": "^1.4.2",
"@lodestar/fork-choice": "^1.4.2",
"@lodestar/light-client": "^1.4.2",
"@lodestar/params": "^1.4.2",
"@lodestar/reqresp": "^1.4.2",
"@lodestar/state-transition": "^1.4.2",
"@lodestar/types": "^1.4.2",
"@lodestar/utils": "^1.4.2",
"@lodestar/validator": "^1.4.2",
"@lodestar/api": "^1.4.3",
"@lodestar/config": "^1.4.3",
"@lodestar/db": "^1.4.3",
"@lodestar/fork-choice": "^1.4.3",
"@lodestar/light-client": "^1.4.3",
"@lodestar/params": "^1.4.3",
"@lodestar/reqresp": "^1.4.3",
"@lodestar/state-transition": "^1.4.3",
"@lodestar/types": "^1.4.3",
"@lodestar/utils": "^1.4.3",
"@lodestar/validator": "^1.4.3",
"@multiformats/multiaddr": "^11.0.0",
"@types/datastore-level": "^3.0.0",
"buffer-xor": "^2.0.2",
Expand Down
22 changes: 11 additions & 11 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chainsafe/lodestar",
"version": "1.4.2",
"version": "1.4.3",
"description": "Command line interface for lodestar",
"author": "ChainSafe Systems",
"license": "LGPL-3.0",
Expand Down Expand Up @@ -61,16 +61,16 @@
"@chainsafe/discv5": "^3.0.0",
"@chainsafe/ssz": "^0.9.2",
"@libp2p/peer-id-factory": "^2.0.1",
"@lodestar/api": "^1.4.2",
"@lodestar/beacon-node": "^1.4.2",
"@lodestar/config": "^1.4.2",
"@lodestar/db": "^1.4.2",
"@lodestar/light-client": "^1.4.2",
"@lodestar/params": "^1.4.2",
"@lodestar/state-transition": "^1.4.2",
"@lodestar/types": "^1.4.2",
"@lodestar/utils": "^1.4.2",
"@lodestar/validator": "^1.4.2",
"@lodestar/api": "^1.4.3",
"@lodestar/beacon-node": "^1.4.3",
"@lodestar/config": "^1.4.3",
"@lodestar/db": "^1.4.3",
"@lodestar/light-client": "^1.4.3",
"@lodestar/params": "^1.4.3",
"@lodestar/state-transition": "^1.4.3",
"@lodestar/types": "^1.4.3",
"@lodestar/utils": "^1.4.3",
"@lodestar/validator": "^1.4.3",
"@multiformats/multiaddr": "^11.0.0",
"@types/lockfile": "^1.0.1",
"bip39": "^3.0.2",
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/src/applyPreset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// However this prevents dynamic configuration changes which is exactly what the CLI required before.
// - The dev command can't apply the minimal preset dynamically
// - `--network gnosis` can't apply a different preset dynamically
// - `--network chiado` can't apply a different preset dynamically
//
// Running this file allows us to keep a static export strategy while NOT requiring users to
// set LODESTAR_PRESET manually every time.
Expand All @@ -29,7 +30,7 @@ else if (process.env.LODESTAR_PRESET) {
else if (network) {
if (network === "dev") {
process.env.LODESTAR_PRESET = "minimal";
} else if (network === "gnosis") {
} else if (network === "gnosis" || network === "chiado") {
process.env.LODESTAR_PRESET = "gnosis";
}
}
Expand Down
17 changes: 17 additions & 0 deletions packages/cli/src/networks/chiado.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export {chiadoChainConfig as chainConfig} from "@lodestar/config/networks";

// eth1.providerUrls suggestion: https://rpc.chiado.gnosis.gateway.fm
export const depositContractDeployBlock = 155435;
export const genesisFileUrl = "https://raw.githubusercontent.com/gnosischain/configs/main/chiado/genesis.ssz";
export const bootnodesFileUrl = "https://raw.githubusercontent.com/gnosischain/configs/main/chiado/bootnodes.yaml";

export const bootEnrs = [
"enr:-L64QOijsdi9aVIawMb5h5PWueaPM9Ai6P17GNPFlHzz7MGJQ8tFMdYrEx8WQitNKLG924g2Q9cCdzg54M0UtKa3QIKCMxaHYXR0bmV0c4j__________4RldGgykDE2cEMCAABv__________-CaWSCdjSCaXCEi5AaWYlzZWNwMjU2azGhA8CjTkD4m1s8FbKCN18LgqlYcE65jrT148vFtwd9U62SiHN5bmNuZXRzD4N0Y3CCIyiDdWRwgiMo",
"enr:-L64QKYKGQj5ybkfBxyFU5IEVzP7oJkGHJlie4W8BCGAYEi4P0mmMksaasiYF789mVW_AxYVNVFUjg9CyzmdvpyWQ1KCMlmHYXR0bmV0c4j__________4RldGgykDE2cEMCAABv__________-CaWSCdjSCaXCEi5CtNolzZWNwMjU2azGhAuA7BAwIijy1z81AO9nz_MOukA1ER68rGA67PYQ5pF1qiHN5bmNuZXRzD4N0Y3CCIyiDdWRwgiMo",
"enr:-Ly4QJJUnV9BxP_rw2Bv7E9iyw4sYS2b4OQZIf4Mu_cA6FljJvOeSTQiCUpbZhZjR4R0VseBhdTzrLrlHrAuu_OeZqgJh2F0dG5ldHOI__________-EZXRoMpAxNnBDAgAAb___________gmlkgnY0gmlwhIuQGnOJc2VjcDI1NmsxoQPT_u3IjDtB2r-nveH5DhUmlM8F2IgLyxhmwmqW4L5k3ohzeW5jbmV0cw-DdGNwgiMog3VkcIIjKA",
"enr:-MK4QCkOyqOTPX1_-F-5XVFjPclDUc0fj3EeR8FJ5-hZjv6ARuGlFspM0DtioHn1r6YPUXkOg2g3x6EbeeKdsrvVBYmGAYQKrixeh2F0dG5ldHOIAAAAAAAAAACEZXRoMpAxNnBDAgAAb___________gmlkgnY0gmlwhIuQGlWJc2VjcDI1NmsxoQKdW3-DgLExBkpLGMRtuM88wW_gZkC7Yeg0stYDTrlynYhzeW5jbmV0cwCDdGNwgiMog3VkcIIjKA==",
"enr:-Ly4QLYLNqrjvSxD3lpAPBUNlxa6cIbe79JqLZLFcZZjWoCjZcw-85agLUErHiygG2weRSCLnd5V460qTbLbwJQsfZkoh2F0dG5ldHOI__________-EZXRoMpAxNnBDAgAAb___________gmlkgnY0gmlwhKq7mu-Jc2VjcDI1NmsxoQP900YAYa9kdvzlSKGjVo-F3XVzATjOYp3BsjLjSophO4hzeW5jbmV0cw-DdGNwgiMog3VkcIIjKA",
"enr:-Ly4QCGeYvTCNOGKi0mKRUd45rLj96b4pH98qG7B9TCUGXGpHZALtaL2-XfjASQyhbCqENccI4PGXVqYTIehNT9KJMQgh2F0dG5ldHOI__________-EZXRoMpAxNnBDAgAAb___________gmlkgnY0gmlwhIuQrVSJc2VjcDI1NmsxoQP9iDchx2PGl3JyJ29B9fhLCvVMN6n23pPAIIeFV-sHOIhzeW5jbmV0cw-DdGNwgiMog3VkcIIjKA",
"enr:-Ly4QAtr21x5Ps7HYhdZkIBRBgcBkvlIfEel1YNjtFWf4cV3au2LgBGICz9PtEs9-p2HUl_eME8m1WImxTxSB3AkCMwBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpAxNnBDAgAAb___________gmlkgnY0gmlwhANHhOeJc2VjcDI1NmsxoQNLp1QPV8-pyMCohOtj6xGtSBM_GtVTqzlbvNsCF4ezkYhzeW5jbmV0cwCDdGNwgiMog3VkcIIjKA",
"enr:-Ly4QLgn8Bx6faigkKUGZQvd1HDToV2FAxZIiENK-lczruzQb90qJK-4E65ADly0s4__dQOW7IkLMW7ZAyJy2vtiLy8Bh2F0dG5ldHOIAAAAAAAAAACEZXRoMpAxNnBDAgAAb___________gmlkgnY0gmlwhANFIw2Jc2VjcDI1NmsxoQMa-fWEy9UJHfOl_lix3wdY5qust78sHAqZnWwEiyqKgYhzeW5jbmV0cwCDdGNwgiMog3VkcIIjKA",
];
10 changes: 9 additions & 1 deletion packages/cli/src/networks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@ 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 chiado from "./chiado.js";
import * as zhejiang from "./zhejiang.js";

export type NetworkName = "mainnet" | "dev" | "gnosis" | "goerli" | "ropsten" | "sepolia";
export type NetworkName = "mainnet" | "dev" | "gnosis" | "goerli" | "ropsten" | "sepolia" | "chiado" | "zhejiang";
export const networkNames: NetworkName[] = [
"mainnet",
"gnosis",
"goerli",
"ropsten",
"sepolia",
"chiado",
"zhejiang",

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

export const depositContractDeployBlock = 0;
export const genesisFileUrl =
"https://raw.githubusercontent.com/ethpandaops/withdrawals-testnet/master/zhejiang-testnet/custom_config_data/genesis.ssz";
export const bootnodesFileUrl =
"https://raw.githubusercontent.com/ethpandaops/withdrawals-testnet/master/zhejiang-testnet/custom_config_data/bootstrap_nodes.txt";

// Pick from above file
export const bootEnrs = [];
11 changes: 8 additions & 3 deletions packages/cli/src/options/beaconNodeOptions/network.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {defaultOptions, IBeaconNodeOptions} from "@lodestar/beacon-node";
import {ICliCommandOptions} from "../../util/index.js";
import {ICliCommandOptions, YargsError} from "../../util/index.js";

const defaultListenAddress = "0.0.0.0";
export const defaultP2pPort = 9000;
Expand Down Expand Up @@ -39,6 +39,11 @@ export function parseArgs(args: INetworkArgs): IBeaconNodeOptions["network"] {
const udpPort = args.discoveryPort ?? args.port ?? defaultP2pPort;
const tcpPort = args.port ?? defaultP2pPort;

const targetPeers = args["targetPeers"];
const maxPeers = args["network.maxPeers"] ?? (targetPeers !== undefined ? Math.floor(targetPeers * 1.1) : undefined);
if (targetPeers != null && maxPeers != null && targetPeers > maxPeers) {
throw new YargsError("network.maxPeers must be greater than or equal to targetPeers");
}
return {
discv5: {
enabled: args["discv5"] ?? true,
Expand All @@ -48,8 +53,8 @@ export function parseArgs(args: INetworkArgs): IBeaconNodeOptions["network"] {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
enr: undefined as any,
},
maxPeers: args["network.maxPeers"] ?? (args["targetPeers"] !== undefined ? args["targetPeers"] * 1.1 : undefined),
targetPeers: args["targetPeers"],
maxPeers,
targetPeers,
localMultiaddrs: [`/ip4/${listenAddress}/tcp/${tcpPort}`],
subscribeAllSubnets: args["subscribeAllSubnets"],
connectToDiscv5Bootnodes: args["network.connectToDiscv5Bootnodes"],
Expand Down
6 changes: 3 additions & 3 deletions packages/config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lodestar/config",
"version": "1.4.2",
"version": "1.4.3",
"description": "Chain configuration required for lodestar",
"author": "ChainSafe Systems",
"license": "Apache-2.0",
Expand Down Expand Up @@ -66,7 +66,7 @@
],
"dependencies": {
"@chainsafe/ssz": "^0.9.2",
"@lodestar/params": "^1.4.2",
"@lodestar/types": "^1.4.2"
"@lodestar/params": "^1.4.3",
"@lodestar/types": "^1.4.3"
}
}
41 changes: 41 additions & 0 deletions packages/config/src/chainConfig/networks/chiado.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/* eslint-disable @typescript-eslint/naming-convention */
import {fromHexString as b} from "@chainsafe/ssz";
import {PresetName} from "@lodestar/params";
import {IChainConfig} from "../types.js";
import {chainConfig as mainnet} from "../presets/mainnet.js";

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

// NOTE: Only add diff values
PRESET_BASE: PresetName.gnosis,
CONFIG_NAME: "chiado",

// Transition
TERMINAL_TOTAL_DIFFICULTY: BigInt("231707791542740786049188744689299064356246512"),
TERMINAL_BLOCK_HASH: b("0x0000000000000000000000000000000000000000000000000000000000000000"),
TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: Infinity,

SECONDS_PER_SLOT: 5,
SECONDS_PER_ETH1_BLOCK: 6,
ETH1_FOLLOW_DISTANCE: 1024,
CHURN_LIMIT_QUOTIENT: 4096,

// Ethereum Goerli testnet
DEPOSIT_CHAIN_ID: 10200,
DEPOSIT_NETWORK_ID: 10200,
DEPOSIT_CONTRACT_ADDRESS: b("0xb97036A26259B7147018913bD58a774cf91acf25"),

// Dec 8, 2021, 13:00 UTC
MIN_GENESIS_TIME: 1665396000,
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 6000,
GENESIS_FORK_VERSION: b("0x0000006f"),
GENESIS_DELAY: 300,

// Forking
ALTAIR_FORK_VERSION: b("0x0100006f"),
ALTAIR_FORK_EPOCH: 90,
// Bellatrix
BELLATRIX_FORK_VERSION: b("0x0200006f"),
BELLATRIX_FORK_EPOCH: 180,
};
41 changes: 41 additions & 0 deletions packages/config/src/chainConfig/networks/zhejiang.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/* 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";

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

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

CONFIG_NAME: "zhejiang",

// Genesis
// ---------------------------------------------------------------
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 58000,
MIN_GENESIS_TIME: 1675263480,
GENESIS_FORK_VERSION: b("0x00000069"),
GENESIS_DELAY: 120,

// Forking
// ---------------------------------------------------------------
// # Altair
ALTAIR_FORK_VERSION: b("0x00000070"),
ALTAIR_FORK_EPOCH: 0,
// # Merge
BELLATRIX_FORK_VERSION: b("0x00000071"),
BELLATRIX_FORK_EPOCH: 0,
TERMINAL_TOTAL_DIFFICULTY: BigInt("0"),
// Capella
CAPELLA_FORK_VERSION: b("0x00000072"),
CAPELLA_FORK_EPOCH: 1350,
// Deneb
EIP4844_FORK_VERSION: b("0x00000073"),

// Deposit contract
// ---------------------------------------------------------------
DEPOSIT_CHAIN_ID: 1337803,
DEPOSIT_NETWORK_ID: 1337803,
DEPOSIT_CONTRACT_ADDRESS: b("0x4242424242424242424242424242424242424242"),
};
24 changes: 22 additions & 2 deletions packages/config/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,28 @@ 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 {chiadoChainConfig} from "./chainConfig/networks/chiado.js";
import {zhejiangChainConfig} from "./chainConfig/networks/zhejiang.js";

export {mainnetChainConfig, gnosisChainConfig, goerliChainConfig, ropstenChainConfig, sepoliaChainConfig};
export {
mainnetChainConfig,
gnosisChainConfig,
goerliChainConfig,
ropstenChainConfig,
sepoliaChainConfig,
chiadoChainConfig,
zhejiangChainConfig,
};

export type NetworkName = "mainnet" | "gnosis" | "goerli" | "ropsten" | "sepolia";
export type NetworkName = "mainnet" | "gnosis" | "goerli" | "ropsten" | "sepolia" | "chiado" | "zhejiang";
export const networksChainConfig: Record<NetworkName, IChainConfig> = {
mainnet: mainnetChainConfig,
gnosis: gnosisChainConfig,
goerli: goerliChainConfig,
ropsten: ropstenChainConfig,
sepolia: sepoliaChainConfig,
chiado: chiadoChainConfig,
zhejiang: zhejiangChainConfig,
};

export type GenesisData = {
Expand Down Expand Up @@ -42,4 +54,12 @@ export const genesisData: Record<NetworkName, GenesisData> = {
genesisTime: 1655733600,
genesisValidatorsRoot: "0xd8ea171f3c94aea21ebc42a1ed61052acf3f9209c00e4efbaaddac09ed9b8078",
},
chiado: {
genesisTime: 1665396300,
genesisValidatorsRoot: "0x9d642dac73058fbf39c0ae41ab1e34e4d889043cb199851ded7095bc99eb4c1e",
},
zhejiang: {
genesisTime: 1675263600,
genesisValidatorsRoot: "0x53a92d8f2bb1d85f62d16a156e6ebcd1bcaba652d0900b2c2f387826f3481f6f",
},
};
6 changes: 3 additions & 3 deletions packages/db/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lodestar/db",
"version": "1.4.2",
"version": "1.4.3",
"description": "DB modules of Lodestar",
"author": "ChainSafe Systems",
"homepage": "https://github.com/ChainSafe/lodestar#readme",
Expand Down Expand Up @@ -39,8 +39,8 @@
},
"dependencies": {
"@chainsafe/ssz": "^0.9.2",
"@lodestar/config": "^1.4.2",
"@lodestar/utils": "^1.4.2",
"@lodestar/config": "^1.4.3",
"@lodestar/utils": "^1.4.3",
"@types/levelup": "^4.3.3",
"it-all": "^2.0.0",
"level": "^8.0.0"
Expand Down
Loading

0 comments on commit 941a1cf

Please sign in to comment.