Skip to content

Commit 778a171

Browse files
authored
chore: release v1.18.0 (#6702)
2 parents def26ac + 71aea4b commit 778a171

File tree

271 files changed

+17085
-4381
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+17085
-4381
lines changed

.devcontainer/devcontainer.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
3+
{
4+
"name": "Node.js & TypeScript",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye",
7+
"features": {
8+
"ghcr.io/devcontainers/features/python:1": {}
9+
}
10+
11+
// Features to add to the dev container. More info: https://containers.dev/features.
12+
// "features": {},
13+
14+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
15+
// "forwardPorts": [],
16+
17+
// Use 'postCreateCommand' to run commands after the container is created.
18+
// "postCreateCommand": "yarn install",
19+
20+
// Configure tool-specific properties.
21+
// "customizations": {},
22+
23+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
24+
// "remoteUser": "root"
25+
}

.env.test

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
# We use these images during sim and e2e tests
2-
# TODO: Upgrade Geth once the Nethermind issue is resolved else it's causing following error
3-
# Rejected peer id=134e2c1a76745626 addr=192.168.0.3:9052 conn=staticdial err="useless peer"
4-
GETH_DOCKER_IMAGE=ethereum/client-go:v1.11.6
2+
# This is the last version which supports pre/post merge chains in the same network
3+
# All newer versions only work with post merge chains
4+
GETH_DOCKER_IMAGE=ethereum/client-go:v1.13.14
55
# Use either image or local binary for the testing
66
GETH_BINARY_DIR=
7-
LIGHTHOUSE_DOCKER_IMAGE=sigp/lighthouse:v4.6.0-amd64-modern-dev
7+
LIGHTHOUSE_DOCKER_IMAGE=sigp/lighthouse:v5.1.1-amd64-modern-dev
8+
89
# We can't upgrade nethermind further due to genesis hash mismatch with the geth
910
# https://github.com/NethermindEth/nethermind/issues/6683
11+
# Disabling Nethermind from sim tests until the above issue is resolved
1012
NETHERMIND_DOCKER_IMAGE=nethermind/nethermind:1.18.2
13+
1114
# We mostly use mainnet for unit testing
1215
# Changing this value may impact the tests which are written with mainnet in mind
1316
LODESTAR_PRESET=mainnet

.github/workflows/docs-check.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,9 @@ jobs:
4141
- name: Build and collect docs
4242
run: yarn docs:build
4343

44-
# Run prettier check with fix after generating the docs. The CLI reference is formatted with prettier for
45-
# deployed version so this will fail if not "fixable"
44+
# Run prettier check after generating the docs
4645
- name: Check docs format
47-
run: yarn docs:lint:fix
46+
run: yarn docs:lint
4847

4948
# Run spellcheck AFTER building docs, in case the CLI reference has issues
5049
- name: Spellcheck

.github/workflows/docs.yml

+3-9
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414

1515
jobs:
1616
docs:
17-
runs-on: buildjet-4vcpu-ubuntu-2204
17+
runs-on: ubuntu-latest
1818
env:
1919
DEPLOY_REF: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || 'stable' }}
2020
steps:
@@ -64,19 +64,13 @@ jobs:
6464

6565
- name: Set up Python
6666
uses: actions/setup-python@v1
67-
68-
- name: Install dependencies
69-
working-directory: docs
70-
run: |
71-
python -m pip install --upgrade pip
72-
pip install -r requirements.txt
7367

7468
- name: Build docs
7569
working-directory: docs
76-
run: mkdocs build --verbose --clean --site-dir site
70+
run: yarn && yarn build
7771

7872
- name: Deploy
7973
uses: peaceiris/actions-gh-pages@v3
8074
with:
8175
github_token: ${{ secrets.GITHUB_TOKEN }}
82-
publish_dir: ./docs/site
76+
publish_dir: ./docs/build

.github/workflows/publish-rc.yml

+5-25
Original file line numberDiff line numberDiff line change
@@ -48,46 +48,26 @@ jobs:
4848
needs: tag
4949
if: needs.tag.outputs.is_rc == 'true'
5050
steps:
51-
# <common-build> - Uses YAML anchors in the future
5251
- uses: actions/checkout@v4
5352
with:
5453
fetch-depth: 0 # Needs full depth for changelog generation
55-
- uses: actions/setup-node@v4
56-
with:
57-
node-version: 20
58-
check-latest: true
59-
cache: yarn
60-
- name: Node.js version
61-
id: node
62-
run: echo "v8CppApiVersion=$(node --print "process.versions.modules")" >> $GITHUB_OUTPUT
63-
- name: Restore dependencies
64-
uses: actions/cache@master
65-
id: cache-deps
54+
55+
- uses: "./.github/actions/setup-and-build"
6656
with:
67-
path: |
68-
node_modules
69-
packages/*/node_modules
70-
key: ${{ runner.os }}-${{ steps.node.outputs.v8CppApiVersion }}-${{ hashFiles('**/yarn.lock', '**/package.json') }}
71-
- name: Install & build
72-
if: steps.cache-deps.outputs.cache-hit != 'true'
73-
run: yarn install --frozen-lockfile && yarn build
74-
- name: Build
75-
run: yarn build
76-
if: steps.cache-deps.outputs.cache-hit == 'true'
77-
# </common-build>
57+
node: 20
7858

7959
- name: Generate changelog
8060
run: node scripts/generate_changelog.mjs ${{ needs.tag.outputs.prev_tag }} ${{ needs.tag.outputs.tag }} CHANGELOG.md
8161

8262
- name: Create Release
8363
id: create_release
84-
uses: actions/create-release@v1
64+
uses: softprops/action-gh-release@v2
8565
env:
8666
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8767
with:
8868
tag_name: ${{ needs.tag.outputs.tag }}
8969
body_path: "CHANGELOG.md"
90-
release_name: Release ${{ needs.tag.outputs.tag }}
70+
name: Release ${{ needs.tag.outputs.tag }}
9171
prerelease: true
9272

9373
- name: Change and commit version

.github/workflows/publish-stable.yml

+5-25
Original file line numberDiff line numberDiff line change
@@ -54,46 +54,26 @@ jobs:
5454
needs: tag
5555
if: needs.tag.outputs.is_stable == 'true'
5656
steps:
57-
# <common-build> - Uses YAML anchors in the future
5857
- uses: actions/checkout@v4
5958
with:
6059
fetch-depth: 0 # Needs full depth for changelog generation
61-
- uses: actions/setup-node@v4
62-
with:
63-
node-version: 20
64-
check-latest: true
65-
cache: yarn
66-
- name: Node.js version
67-
id: node
68-
run: echo "v8CppApiVersion=$(node --print "process.versions.modules")" >> $GITHUB_OUTPUT
69-
- name: Restore dependencies
70-
uses: actions/cache@master
71-
id: cache-deps
60+
61+
- uses: "./.github/actions/setup-and-build"
7262
with:
73-
path: |
74-
node_modules
75-
packages/*/node_modules
76-
key: ${{ runner.os }}-${{ steps.node.outputs.v8CppApiVersion }}-${{ hashFiles('**/yarn.lock', '**/package.json') }}
77-
- name: Install & build
78-
if: steps.cache-deps.outputs.cache-hit != 'true'
79-
run: yarn install --frozen-lockfile && yarn build
80-
- name: Build
81-
run: yarn build
82-
if: steps.cache-deps.outputs.cache-hit == 'true'
83-
# </common-build>
63+
node: 20
8464

8565
- name: Generate changelog
8666
run: node scripts/generate_changelog.mjs ${{ needs.tag.outputs.prev_tag }} ${{ needs.tag.outputs.tag }} CHANGELOG.md
8767

8868
- name: Create Release
8969
id: create_release
90-
uses: actions/create-release@v1
70+
uses: softprops/action-gh-release@v2
9171
env:
9272
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9373
with:
9474
tag_name: ${{ needs.tag.outputs.tag }}
9575
body_path: "CHANGELOG.md"
96-
release_name: Release ${{ needs.tag.outputs.tag }}
76+
name: Release ${{ needs.tag.outputs.tag }}
9777
prerelease: false
9878

9979
# From https://github.com/lerna/lerna/issues/2404

.github/workflows/test-sim-merge.yml

-45
Original file line numberDiff line numberDiff line change
@@ -71,51 +71,6 @@ jobs:
7171
ENGINE_PORT: 8551
7272
ETH_PORT: 8661
7373

74-
- name: Pull geth withdrawals
75-
run: docker pull $GETH_WITHDRAWALS_IMAGE
76-
77-
- name: Test Lodestar <> geth withdrawals
78-
run: yarn test:sim:withdrawals
79-
working-directory: packages/beacon-node
80-
env:
81-
EL_BINARY_DIR: ${{ env.GETH_WITHDRAWALS_IMAGE }}
82-
EL_SCRIPT_DIR: gethdocker
83-
84-
- name: Pull ethereumjs withdrawals
85-
run: docker pull $ETHEREUMJS_WITHDRAWALS_IMAGE
86-
87-
- name: Test Lodestar <> ethereumjs withdrawals
88-
run: yarn test:sim:withdrawals
89-
working-directory: packages/beacon-node
90-
env:
91-
EL_BINARY_DIR: ${{ env.ETHEREUMJS_WITHDRAWALS_IMAGE }}
92-
EL_SCRIPT_DIR: ethereumjsdocker
93-
94-
# Disable nethermind build as the withdrawal test config seems to be no
95-
# longer available, enable after grabbing a build which has one
96-
#
97-
# - name: Pull nethermind withdrawals
98-
# run: docker pull $NETHERMIND_WITHDRAWALS_IMAGE
99-
100-
# - name: Test Lodestar <> nethermind withdrawals
101-
# run: yarn test:sim:withdrawals
102-
# working-directory: packages/beacon-node
103-
# env:
104-
# EL_BINARY_DIR: ${{ env.NETHERMIND_WITHDRAWALS_IMAGE }}
105-
# EL_SCRIPT_DIR: netherminddocker
106-
107-
# Enable the blob sims when stable images
108-
# - name: Pull ethereumjs blobs
109-
# run: docker pull $ETHEREUMJS_BLOBS_IMAGE
110-
111-
# - name: Test Lodestar <> ethereumjs blobs
112-
# run: yarn test:sim:blobs
113-
# working-directory: packages/beacon-node
114-
# env:
115-
# EL_BINARY_DIR: ${{ env.ETHEREUMJS_BLOBS_IMAGE }}
116-
# EL_SCRIPT_DIR: ethereumjsdocker
117-
# DEV_RUN: true
118-
11974
- name: Upload debug log test files
12075
if: ${{ always() }}
12176
uses: actions/upload-artifact@v4

.github/workflows/test-sim.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ jobs:
165165
run: |
166166
docker pull ${{env.GETH_DOCKER_IMAGE}}
167167
docker pull ${{env.LIGHTHOUSE_DOCKER_IMAGE}}
168-
docker pull ${{env.NETHERMIND_DOCKER_IMAGE}}
168+
# docker pull ${{env.NETHERMIND_DOCKER_IMAGE}}
169169
- name: Sim tests mixed client
170170
run: DEBUG='${{github.event.inputs.debug}}' yarn test:sim:mixedclient
171171
working-directory: packages/cli

.gitignore

+4-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ docs/pages/lightclient-prover/lightclient.md
4848
docs/pages/lightclient-prover/prover.md
4949
docs/pages/api/api-reference.md
5050
docs/pages/contribution/getting-started.md
51-
docs/site
51+
## Docusaurus
52+
docs/.docusaurus/
53+
docs/build/
5254

5355
# Testnet artifacts
5456
.lodestar
@@ -76,4 +78,4 @@ packages/cli/.git-data.json
7678
.last_build_unixsec
7779
dictionary.dic
7880

79-
temp/
81+
temp/

.wordlist.txt

+5
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ CTRL
1212
Casper
1313
Chai
1414
ChainSafe
15+
Codespaces
1516
Customizations
1617
DPoS
1718
DVs
1819
Discv
1920
DockerHub
2021
Dockerized
22+
Docusaurus
2123
EIP
2224
EIPs
2325
EL
@@ -39,6 +41,7 @@ Geth
3941
Github
4042
Gossipsub
4143
Grafana
44+
HTTPS
4245
HackMD
4346
Homebrew
4447
IPFS
@@ -91,6 +94,7 @@ api
9194
async
9295
backfill
9396
beaconcha
97+
blockRoot
9498
blockchain
9599
bootnode
96100
bootnodes
@@ -114,6 +118,7 @@ ddos
114118
decrypt
115119
deserialization
116120
dev
121+
devcontainer
117122
devnet
118123
devnets
119124
devtools

CONTRIBUTING.md

+7-9
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,15 @@ Contributing to tests:
4747
- Do not pull unpinned versions from DockerHub (use deterministic tag) or Github (checkout commit not branch).
4848
- Carefully design tests that depend on timing sensitive events like p2p network e2e tests. Consider that Github runners are significantly less powerful than your development environment.
4949

50+
## Devcontainer
51+
52+
A [devcontainer](https://containers.dev/) [configuration](.devcontainer/devcontainer.json) is provided to help speed up linux based development environment setup. It will be used by [GitHub Codespaces](https://github.com/features/codespaces) or directly inside VS Code via your local through this [extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers).
53+
5054
### Common Issues
5155

5256
**Error: [vitest] Cannot mock "../../src/db/repositories/index.js" because it is already loaded by "src/db/beacon.ts"**
5357

54-
If you observe any error in tests with matching to above error message, that implies you are loading the mocks in the wrong order. The correct order is to import the mocks first and then the actual module. We suggest to import the mocks on very top before any local modules.
58+
If you observe any error in tests with matching to above error message, that implies you are loading the mocks in the wrong order. The correct order is to import the mocks first and then the actual module. We suggest to import the mocks on very top before any local modules.
5559

5660
**✖ Error: Cannot find package 'async_hooks' imported from**
5761

@@ -250,15 +254,9 @@ node scripts/download_dashboards.mjs
250254

251255
## Contributing to Documentation
252256

253-
When submitting PRs for documentation updates, build and run the documentation locally to ensure functionality before submission. For first time documentation contributors, install the python dependencies with `yarn docs:install`. Build the documentation locally with `yarn docs:build` and serve with `yarn docs:serve`
254-
255-
Your locally served documentation will then be accessible at http://localhost:8000.
257+
When submitting PRs for documentation updates, build and run the documentation locally to ensure functionality before submission. First generate the CLI documentation with `yarn docs:build`. Then build and serve the documentation locally with `yarn docs:serve`.
256258

257-
If you run into build issues due to circular dependencies, branch switching or other incompatibilities, try cleaning your modules and rebuild your dependencies with:
258-
259-
```sh
260-
yarn clean && yarn clean:nm && yarn && yarn build
261-
```
259+
Your locally served documentation will then be accessible at http://localhost:3000/lodestar/.
262260

263261
We also use a spelling [word list](https://github.com/ChainSafe/lodestar/blob/unstable/.wordlist.txt) as part of our documentation checks. If using unrecognized words or abbreviations, please extend the word list to pass checks. Make sure the list is sorted with `./scripts/wordlist_sort.sh` and checked with `./scripts/wordlist_sort_check.sh` for sorting and duplicates.
264262

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ yarn build
4646

4747
| Package | Version | License | Docs | Description |
4848
| ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
49-
| [`@lodestar/beacon-node`](./packages/beacon-node) | [![npm](https://img.shields.io/npm/v/@lodestar/beacon-node)](https://www.npmjs.com/package/@lodestar/beacon-node) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/readme-blue)](./packages/beacon-node) | :rotating_light: Beacon-chain client |
49+
| [`@lodestar/beacon-node`](./packages/beacon-node) | [![npm](https://img.shields.io/npm/v/@lodestar/beacon-node)](https://www.npmjs.com/package/@lodestar/beacon-node) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/readme-blue)](./packages/beacon-node) | :rotating_light: Beacon-chain client |
5050
| [`@lodestar/validator`](./packages/validator) | [![npm](https://img.shields.io/npm/v/@lodestar/validator)](https://www.npmjs.com/package/@lodestar/validator) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/readme-blue)](./packages/validator) | :bank: Validator client |
5151
| [`@lodestar/light-client`](./packages/light-client) | [![npm](https://img.shields.io/npm/v/@lodestar/light-client)](https://www.npmjs.com/package/@lodestar/light-client) | [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) | [![documentation](https://img.shields.io/badge/readme-blue)](./packages/light-client) | :bird: Ethereum Light client |
5252
| [`@lodestar/api`](./packages/api) | [![npm](https://img.shields.io/npm/v/@lodestar/api)](https://www.npmjs.com/package/@lodestar/api) | [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) | [![documentation](https://img.shields.io/badge/readme-blue)](./packages/api) | :clipboard: REST Client for the Ethereum Beacon API |

0 commit comments

Comments
 (0)