Skip to content

Commit

Permalink
chore: release v1.17.0 (#6523)
Browse files Browse the repository at this point in the history
  • Loading branch information
philknows committed Mar 11, 2024
2 parents 14ea654 + 88b2564 commit def26ac
Show file tree
Hide file tree
Showing 198 changed files with 2,395 additions and 1,854 deletions.
15 changes: 15 additions & 0 deletions .eslintrc.js
Expand Up @@ -80,6 +80,7 @@ module.exports = {
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": ["error", {varsIgnorePattern: "^_", argsIgnorePattern: "^_"}],
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/restrict-template-expressions": [
Expand Down Expand Up @@ -133,6 +134,13 @@ module.exports = {
"no-console": "error",
"no-loss-of-precision": "error",
"no-prototype-builtins": 0,
"no-restricted-globals": [
"error",
{
name: "fetch",
message: "Please use 'fetch' from '@lodestar/api' instead.",
},
],
"no-restricted-imports": [
"error",
{
Expand Down Expand Up @@ -209,6 +217,13 @@ module.exports = {
"import/no-named-as-default-member": "off",
},
},
{
files: ["**/perf/**/*.ts"],
rules: {
// A lot of benchmarks just need to execute expressions without using the result
"@typescript-eslint/no-unused-expressions": "off",
},
},
{
files: ["**/test/**/*.test.ts"],
plugins: ["vitest"],
Expand Down
28 changes: 1 addition & 27 deletions .github/workflows/test-sim-merge.yml
Expand Up @@ -32,7 +32,7 @@ jobs:
with:
node-version: 20
check-latest: true
cache: yarn
cache: yarn
- name: Node.js version
id: node
run: echo "v8CppApiVersion=$(node --print "process.versions.modules")" >> $GITHUB_OUTPUT
Expand All @@ -55,28 +55,9 @@ jobs:
- name: Pull Geth
run: docker pull $GETH_IMAGE

- name: Test Lodestar <> Geth interop
run: yarn test:sim:merge-interop
working-directory: packages/beacon-node
env:
EL_BINARY_DIR: ${{ env.GETH_IMAGE }}
EL_SCRIPT_DIR: gethdocker
ENGINE_PORT: 8551
ETH_PORT: 8545
TX_SCENARIOS: simple

- name: Pull Nethermind
run: docker pull $NETHERMIND_IMAGE

- name: Test Lodestar <> Nethermind interop
run: yarn test:sim:merge-interop
working-directory: packages/beacon-node
env:
EL_BINARY_DIR: ${{ env.NETHERMIND_IMAGE }}
EL_SCRIPT_DIR: netherminddocker
ENGINE_PORT: 8551
ETH_PORT: 8545

- name: Pull mergemock
run: docker pull $MERGEMOCK_IMAGE

Expand All @@ -90,13 +71,6 @@ jobs:
ENGINE_PORT: 8551
ETH_PORT: 8661

- name: Upload debug log test files
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: debug-test-logs
path: packages/beacon-node/test-logs

- name: Pull geth withdrawals
run: docker pull $GETH_WITHDRAWALS_IMAGE

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Expand Up @@ -5,7 +5,7 @@ Thanks for your interest in contributing to Lodestar. It's people like you that
## Prerequisites

- :gear: [NodeJS](https://nodejs.org/) (LTS)
- :toolbox: [Yarn](https://yarnpkg.com/)
- :toolbox: [Yarn](https://classic.yarnpkg.com/lang/en/)

### MacOS Specifics

Expand All @@ -32,7 +32,7 @@ To run tests:
- :test_tube: Run `yarn check-types` to check TypeScript types.
- :test_tube: Run `yarn lint` to run the linter (ESLint).

Note that to run `test:e2e`, first ensure that the environment is correctly setup by running the `run_e2e_env.sh` script.
Note that to run `test:e2e`, first ensure that the environment is correctly setup by running the `run_e2e_env.sh` script. This script requires a running docker engine.

```sh
./scripts/run_e2e_env.sh start
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -29,7 +29,7 @@
## Prerequisites

- :gear: [NodeJS](https://nodejs.org/) (LTS)
- :toolbox: [Yarn](https://yarnpkg.com/)
- :toolbox: [Yarn](https://classic.yarnpkg.com/lang/en/)

###### Developer Quickstart:

Expand Down
2 changes: 0 additions & 2 deletions docs/pages/contribution/testing/integration-tests.md
Expand Up @@ -20,8 +20,6 @@ The images used by this test during CI are:
- `GETH_WITHDRAWALS_IMAGE: g11tech/geth:withdrawalsfeb8`
- `ETHEREUMJS_WITHDRAWALS_IMAGE: g11tech/ethereumjs:blobs-b6b63`

#### `test:sim:merge-interop`

#### `test:sim:mergemock`

#### `yarn test:sim:blobs`
76 changes: 37 additions & 39 deletions docs/pages/validator-management/vc-configuration.md
Expand Up @@ -4,37 +4,24 @@ The following instructions are for stakers utilizing the Lodestar validator clie

[TOC]

## Wallet configuration

A wallet helps to manage many validators from a group of 12/24 words (also known as a "mnemonic" or "recovery phrase"). All validators and withdrawal keys can be re-generated from a backed-up mnemonic.

The mnemonic is randomly generated during wallet creation and printed out to the terminal. It's important to make one or more backups of the mnemonic to ensure your ETH wallets are not lost in the case of data loss.

<!-- prettier-ignore-start -->
!!! danger
It is very important to keep your mnemonic private as it represents the ultimate control of your ETH wallets.
<!-- prettier-ignore-end -->
## Setup your validator

### Create a wallet
Validators are represented by a BLS keypair. Use your generated mnemonic from one of the tools above to generate the keystore files required for validator duties on Ethereum using the Lodestar validator client.

Lodestar has removed its functionality to create wallets.
### Create a keystore

To create a wallet, we recommend using the official [`staking-deposit-cli`](https://github.com/ethereum/staking-deposit-cli/releases) from the Ethereum Foundation for users comfortable with command line interfaces.
To create a keystore, we recommend using the official [Staking Deposit CLI](https://github.com/ethereum/staking-deposit-cli/releases) from the Ethereum Foundation for users comfortable with command line interfaces.

Alternatively, for a graphical user interface, you can use the [Stakehouse Wagyu Key Generator](https://wagyu.gg/) developed by members of the EthStaker community.

<!-- prettier-ignore-start -->
!!! info
These tools will generate files for staking validators as well as the important mnemonic. This mnemonic must be handled and stored securely.
!!! warning
These tools will generate keystore files for staking validators as well as the important mnemonic. This mnemonic must be handled and stored securely.
<!-- prettier-ignore-end -->

## Setup your validator

Validators are represented by a BLS keypair. Use your generated mnemonic from one of the tools above to generate the keystore files required for validator duties on Lodestar.
### Import a validator keystore to Lodestar

### Import a validator keystore from your wallet to Lodestar

To import a validator keystore that was created via one of the methods described above, you must locate the validator JSON keystores exported by those tools (ex. `keystore-m_12381_3600_0_0_0-1654128694.json`).
To import a validator JSON keystore that was created via one of the methods described above, you must locate the file for import (ex. `keystore-m_12381_3600_0_0_0-1654128694.json`).

Inside the keystore JSON file, you should have an [EIP-2335 keystore file](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2335.md#json-schema).

Expand All @@ -60,7 +47,7 @@ _Plaintext passphrase file import_
!!! info
The interactive passphrase import method will prompt every keystore in the `validator_keys` folder for import and will ask for the individual password for each keystore. **This method will allow you to import multiple keystores with different passwords.**

The plaintext passphrase file import method will allow to import all keystores in the `validator_keys` folder with the same password contained in `password.txt` for efficiency.
The plaintext passphrase file import method will allow you to import all keystores in the `validator_keys` folder encrypted with the same password contained in `password.txt` for efficiency.
<!-- prettier-ignore-end -->

Once imported with either method, these keystores will be automatically loaded when you start the validator. To list the imported keystores, use the `validator list` command.
Expand Down Expand Up @@ -118,9 +105,19 @@ Example 3: Setting a `--builder.boostFactor=100` is the same as signaling `--bui

### Submit a validator deposit

Please use the official Ethereum Launchpad to perform your deposits
Please use the official Ethereum Launchpad to perform your deposits. Ensure your deposits are sent to the proper beacon chain deposit address on the correct network.

#### Mainnet
- [Ethereum Mainnet Launchpad](https://launchpad.ethereum.org)
- [Beacon Chain Deposit Contract](https://etherscan.io/address/0x00000000219ab540356cbb839cbe05303d7705fa) `0x00000000219ab540356cBB839Cbe05303d7705Fa`

#### Holesky Testnet
- [Ethereum Holesky Testnet Launchpad](https://holesky.launchpad.ethereum.org)
- [Holesky Beacon Chain Deposit Contract](https://holesky.etherscan.io/address/0x4242424242424242424242424242424242424242) `0x4242424242424242424242424242424242424242`

- Ethereum Foundation launchpad: <https://launchpad.ethereum.org>
#### Ephemery Testnet
- [Ethereum Ephemery Testnet Launchpad](https://launchpad.ephemery.dev/)
- [Ephemeral Testnet Resources](https://ephemery.dev/)

## Run the validator

Expand All @@ -133,19 +130,20 @@ To start a Lodestar validator run the command:
You should see confirmation that modules have started.

```txt
Nov-29 10:47:13.647[] info: Lodestar network=sepolia, version=v1.2.2/f093b46, commit=f093b468ec3ab0dbbe8e2d2c8175f52ad88aa35f
Nov-29 10:47:13.649[] info: Connecting to LevelDB database path=/home/user/.local/share/lodestar/sepolia/validator-db
Nov-29 10:47:51.732[] info: 3 local keystores
Nov-29 10:47:51.735[] info: 0x800f6be579b31ea950a50be65f7de8f678b23b7466579c01ac26ebf9c19599fb2b446da40ad4fc92c6109fcd6793303f
Nov-29 10:47:51.735[] info: 0x81337ebe90d6942d8b61922ea880c4d28ebc745ddc10a1acc85b745a15c6c8754af1a73b1b3483b6a5024b783510b35c
Nov-29 10:47:51.757[] info: 0xb95fc0ec39596deee2c4363f57bb4786f5bb8dfb345c1e5b14e2927be482615971d0d81f9a88b3389fac7079b3cb2f46
Nov-29 10:47:51.776[] info: Genesis fetched from the beacon node
Nov-29 10:47:51.781[] info: Verified connected beacon node and validator have same the config
Nov-29 10:47:51.837[] info: Verified connected beacon node and validator have the same genesisValidatorRoot
Nov-29 10:47:51.914[] info: Discovered new validators count=100
Nov-29 10:48:00.197[] info: Published SyncCommitteeMessage slot=1165140, count=27
Nov-29 10:48:02.296[] info: Published attestations slot=1165140, count=6
Nov-29 10:48:08.122[] info: Published aggregateAndProofs slot=1165140, index=0, count=2
Nov-29 10:48:12.102[] info: Published SyncCommitteeMessage slot=1165141, count=27
Nov-29 10:48:14.236[] info: Published attestations slot=1165141, count=4
Mar-01 03:06:35.048[] info: Lodestar network=holesky, version=v1.16.0/6ad9740, commit=6ad9740a085574306cf46c7642e749d6ec9a4264
Mar-01 03:06:35.050[] info: Connecting to LevelDB database path=/keystoresDir/validator-db-holesky
Mar-01 03:06:35.697[] info: 100% of keystores imported. current=2 total=2 rate=1318.68keys/m
Mar-01 03:06:35.698[] info: 2 local keystores
Mar-01 03:06:35.698[] info: 0xa6fcfca12e1db6c7341d82327010cd57224dc239d1c5e4fb18286cc32edb877d813c5af1c870d474aef7b3ff7ab927ea
Mar-01 03:06:35.698[] info: 0x8f868e53bbe1451bcf6d42c9ab6d292cbd7fbfa09c59b6b99c1dd6a4977e2e7b4b752c328784ca2788dd6f63ffcbdb7e
Mar-01 03:06:35.732[] info: Beacon node urls=http://127.0.0.1:9596
Mar-01 03:09:23.813[] info: Genesis fetched from the beacon node
Mar-01 03:09:23.816[] info: Verified connected beacon node and validator have same the config
Mar-01 03:09:23.818[] info: Verified connected beacon node and validator have the same genesisValidatorRoot
Mar-01 03:09:23.818[] info: Initializing validator useProduceBlockV3=deneb+, broadcastValidation=gossip, defaultBuilderSelection=executiononly, suggestedFeeRecipient=0xeeef273281fB83F56182eE960aA4bAfe7fE075DE, strictFeeRecipientCheck=false
Mar-01 03:09:23.830[] info: Validator seen on beacon chain validatorIndex=1234567, pubKey=0xa6fcfca12e1db6c7341d82327010cd57224dc239d1c5e4fb18286cc32edb877d813c5af1c870d474aef7b3ff7ab927ea
Mar-01 03:09:23.830[] info: Validator seen on beacon chain validatorIndex=1234568, pubKey=0x8f868e53bbe1451bcf6d42c9ab6d292cbd7fbfa09c59b6b99c1dd6a4977e2e7b4b752c328784ca2788dd6f63ffcbdb7e
Mar-01 03:09:23.830[] info: Validator statuses active=2, total=2
Mar-01 03:15:50.191[] info: Published attestations slot=1113379, count=1
Mar-01 03:16:02.728[] info: Published attestations slot=1113380, count=1
```
2 changes: 1 addition & 1 deletion lerna.json
Expand Up @@ -4,7 +4,7 @@
],
"npmClient": "yarn",
"useNx": true,
"version": "1.16.0",
"version": "1.17.0",
"stream": true,
"command": {
"version": {
Expand Down
17 changes: 9 additions & 8 deletions package.json
Expand Up @@ -2,7 +2,7 @@
"name": "root",
"private": true,
"engines": {
"node": ">=18.17.0 <19 || >=20.1.0"
"node": ">=20.1.0 <21"
},
"workspaces": [
"packages/*"
Expand Down Expand Up @@ -49,15 +49,15 @@
"@chainsafe/eslint-plugin-node": "^11.2.3",
"@dapplion/benchmark": "^0.2.4",
"@types/mocha": "^10.0.6",
"@types/node": "^20.6.5",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
"@types/node": "^20.11.20",
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@typescript-eslint/parser": "^7.1.0",
"@vitest/coverage-v8": "^1.2.1",
"@vitest/browser": "^1.2.1",
"crypto-browserify": "^3.12.0",
"dotenv": "^16.4.1",
"electron": "^26.2.2",
"eslint": "^8.56.0",
"eslint": "^8.57.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
Expand All @@ -70,13 +70,13 @@
"node-gyp": "^9.4.0",
"npm-run-all": "^4.1.5",
"path-browserify": "^1.0.1",
"prettier": "^3.0.3",
"prettier": "^3.2.5",
"process": "^0.11.10",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"supertest": "^6.3.3",
"ts-node": "^10.9.1",
"typescript": "^5.2.2",
"ts-node": "^10.9.2",
"typescript": "^5.3.3",
"typescript-docs-verifier": "^2.5.0",
"vite-plugin-node-polyfills": "^0.19.0",
"vite-plugin-top-level-await": "^1.4.1",
Expand All @@ -86,6 +86,7 @@
"webdriverio": "^8.28.0"
},
"resolutions": {
"@puppeteer/browsers": "^2.1.0",
"dns-over-http-resolver": "^2.1.1",
"loupe": "^2.3.6",
"vite": "^5.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/api/README.md
Expand Up @@ -36,7 +36,7 @@ api.beacon
## Prerequisites

- [NodeJS](https://nodejs.org/) (LTS)
- [Yarn](https://yarnpkg.com/)
- [Yarn](https://classic.yarnpkg.com/lang/en/)

## What you need

Expand Down
12 changes: 6 additions & 6 deletions packages/api/package.json
Expand Up @@ -11,7 +11,7 @@
"bugs": {
"url": "https://github.com/ChainSafe/lodestar/issues"
},
"version": "1.16.0",
"version": "1.17.0",
"type": "module",
"exports": {
".": {
Expand Down Expand Up @@ -68,11 +68,11 @@
},
"dependencies": {
"@chainsafe/persistent-merkle-tree": "^0.6.1",
"@chainsafe/ssz": "^0.14.0",
"@lodestar/config": "^1.16.0",
"@lodestar/params": "^1.16.0",
"@lodestar/types": "^1.16.0",
"@lodestar/utils": "^1.16.0",
"@chainsafe/ssz": "^0.14.3",
"@lodestar/config": "^1.17.0",
"@lodestar/params": "^1.17.0",
"@lodestar/types": "^1.17.0",
"@lodestar/utils": "^1.17.0",
"eventsource": "^2.0.2",
"qs": "^6.11.1"
},
Expand Down
9 changes: 8 additions & 1 deletion packages/api/src/beacon/routes/beacon/index.ts
Expand Up @@ -6,6 +6,7 @@ import {RoutesData, ReturnTypes, reqEmpty, ContainerData} from "../../../utils/i
import * as block from "./block.js";
import * as pool from "./pool.js";
import * as state from "./state.js";
import * as rewards from "./rewards.js";

// See /packages/api/src/routes/index.ts for reasoning and instructions to add new routes

Expand All @@ -15,9 +16,11 @@ import * as state from "./state.js";
export * as block from "./block.js";
export * as pool from "./pool.js";
export * as state from "./state.js";
export * as rewards from "./rewards.js";
export {BroadcastValidation} from "./block.js";
export type {BlockId, BlockHeaderResponse} from "./block.js";
export type {AttestationFilters} from "./pool.js";
export type {BlockRewards, SyncCommitteeRewards} from "./rewards.js";
// TODO: Review if re-exporting all these types is necessary
export type {
StateId,
Expand All @@ -34,7 +37,8 @@ export type {

export type Api = block.Api &
pool.Api &
state.Api & {
state.Api &
rewards.Api & {
getGenesis(): Promise<ApiClientResponse<{[HttpStatusCode.OK]: {data: phase0.Genesis}}>>;
};

Expand All @@ -43,6 +47,7 @@ export const routesData: RoutesData<Api> = {
...block.routesData,
...pool.routesData,
...state.routesData,
...rewards.routesData,
};

export type ReqTypes = {
Expand All @@ -56,6 +61,7 @@ export function getReqSerializers(config: ChainForkConfig) {
...block.getReqSerializers(config),
...pool.getReqSerializers(),
...state.getReqSerializers(),
...rewards.getReqSerializers(),
};
}

Expand All @@ -65,5 +71,6 @@ export function getReturnTypes(): ReturnTypes<Api> {
...block.getReturnTypes(),
...pool.getReturnTypes(),
...state.getReturnTypes(),
...rewards.getReturnTypes(),
};
}

0 comments on commit def26ac

Please sign in to comment.