Skip to content

Commit

Permalink
chore: release v1.18.0 (#6702)
Browse files Browse the repository at this point in the history
  • Loading branch information
wemeetagain committed Apr 23, 2024
2 parents def26ac + 71aea4b commit 778a171
Show file tree
Hide file tree
Showing 271 changed files with 17,085 additions and 4,381 deletions.
25 changes: 25 additions & 0 deletions .devcontainer/devcontainer.json
@@ -0,0 +1,25 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "Node.js & TypeScript",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye",
"features": {
"ghcr.io/devcontainers/features/python:1": {}
}

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
11 changes: 7 additions & 4 deletions .env.test
@@ -1,13 +1,16 @@
# We use these images during sim and e2e tests
# TODO: Upgrade Geth once the Nethermind issue is resolved else it's causing following error
# Rejected peer id=134e2c1a76745626 addr=192.168.0.3:9052 conn=staticdial err="useless peer"
GETH_DOCKER_IMAGE=ethereum/client-go:v1.11.6
# This is the last version which supports pre/post merge chains in the same network
# All newer versions only work with post merge chains
GETH_DOCKER_IMAGE=ethereum/client-go:v1.13.14
# Use either image or local binary for the testing
GETH_BINARY_DIR=
LIGHTHOUSE_DOCKER_IMAGE=sigp/lighthouse:v4.6.0-amd64-modern-dev
LIGHTHOUSE_DOCKER_IMAGE=sigp/lighthouse:v5.1.1-amd64-modern-dev

# We can't upgrade nethermind further due to genesis hash mismatch with the geth
# https://github.com/NethermindEth/nethermind/issues/6683
# Disabling Nethermind from sim tests until the above issue is resolved
NETHERMIND_DOCKER_IMAGE=nethermind/nethermind:1.18.2

# We mostly use mainnet for unit testing
# Changing this value may impact the tests which are written with mainnet in mind
LODESTAR_PRESET=mainnet
5 changes: 2 additions & 3 deletions .github/workflows/docs-check.yml
Expand Up @@ -41,10 +41,9 @@ jobs:
- name: Build and collect docs
run: yarn docs:build

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

# Run spellcheck AFTER building docs, in case the CLI reference has issues
- name: Spellcheck
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/docs.yml
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
docs:
runs-on: buildjet-4vcpu-ubuntu-2204
runs-on: ubuntu-latest
env:
DEPLOY_REF: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || 'stable' }}
steps:
Expand Down Expand Up @@ -64,19 +64,13 @@ jobs:

- name: Set up Python
uses: actions/setup-python@v1

- name: Install dependencies
working-directory: docs
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Build docs
working-directory: docs
run: mkdocs build --verbose --clean --site-dir site
run: yarn && yarn build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/site
publish_dir: ./docs/build
30 changes: 5 additions & 25 deletions .github/workflows/publish-rc.yml
Expand Up @@ -48,46 +48,26 @@ jobs:
needs: tag
if: needs.tag.outputs.is_rc == 'true'
steps:
# <common-build> - Uses YAML anchors in the future
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Needs full depth for changelog generation
- uses: actions/setup-node@v4
with:
node-version: 20
check-latest: true
cache: yarn
- name: Node.js version
id: node
run: echo "v8CppApiVersion=$(node --print "process.versions.modules")" >> $GITHUB_OUTPUT
- name: Restore dependencies
uses: actions/cache@master
id: cache-deps

- uses: "./.github/actions/setup-and-build"
with:
path: |
node_modules
packages/*/node_modules
key: ${{ runner.os }}-${{ steps.node.outputs.v8CppApiVersion }}-${{ hashFiles('**/yarn.lock', '**/package.json') }}
- name: Install & build
if: steps.cache-deps.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile && yarn build
- name: Build
run: yarn build
if: steps.cache-deps.outputs.cache-hit == 'true'
# </common-build>
node: 20

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

- name: Create Release
id: create_release
uses: actions/create-release@v1
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.tag.outputs.tag }}
body_path: "CHANGELOG.md"
release_name: Release ${{ needs.tag.outputs.tag }}
name: Release ${{ needs.tag.outputs.tag }}
prerelease: true

- name: Change and commit version
Expand Down
30 changes: 5 additions & 25 deletions .github/workflows/publish-stable.yml
Expand Up @@ -54,46 +54,26 @@ jobs:
needs: tag
if: needs.tag.outputs.is_stable == 'true'
steps:
# <common-build> - Uses YAML anchors in the future
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Needs full depth for changelog generation
- uses: actions/setup-node@v4
with:
node-version: 20
check-latest: true
cache: yarn
- name: Node.js version
id: node
run: echo "v8CppApiVersion=$(node --print "process.versions.modules")" >> $GITHUB_OUTPUT
- name: Restore dependencies
uses: actions/cache@master
id: cache-deps

- uses: "./.github/actions/setup-and-build"
with:
path: |
node_modules
packages/*/node_modules
key: ${{ runner.os }}-${{ steps.node.outputs.v8CppApiVersion }}-${{ hashFiles('**/yarn.lock', '**/package.json') }}
- name: Install & build
if: steps.cache-deps.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile && yarn build
- name: Build
run: yarn build
if: steps.cache-deps.outputs.cache-hit == 'true'
# </common-build>
node: 20

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

- name: Create Release
id: create_release
uses: actions/create-release@v1
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.tag.outputs.tag }}
body_path: "CHANGELOG.md"
release_name: Release ${{ needs.tag.outputs.tag }}
name: Release ${{ needs.tag.outputs.tag }}
prerelease: false

# From https://github.com/lerna/lerna/issues/2404
Expand Down
45 changes: 0 additions & 45 deletions .github/workflows/test-sim-merge.yml
Expand Up @@ -71,51 +71,6 @@ jobs:
ENGINE_PORT: 8551
ETH_PORT: 8661

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

- name: Test Lodestar <> geth withdrawals
run: yarn test:sim:withdrawals
working-directory: packages/beacon-node
env:
EL_BINARY_DIR: ${{ env.GETH_WITHDRAWALS_IMAGE }}
EL_SCRIPT_DIR: gethdocker

- name: Pull ethereumjs withdrawals
run: docker pull $ETHEREUMJS_WITHDRAWALS_IMAGE

- name: Test Lodestar <> ethereumjs withdrawals
run: yarn test:sim:withdrawals
working-directory: packages/beacon-node
env:
EL_BINARY_DIR: ${{ env.ETHEREUMJS_WITHDRAWALS_IMAGE }}
EL_SCRIPT_DIR: ethereumjsdocker

# Disable nethermind build as the withdrawal test config seems to be no
# longer available, enable after grabbing a build which has one
#
# - name: Pull nethermind withdrawals
# run: docker pull $NETHERMIND_WITHDRAWALS_IMAGE

# - name: Test Lodestar <> nethermind withdrawals
# run: yarn test:sim:withdrawals
# working-directory: packages/beacon-node
# env:
# EL_BINARY_DIR: ${{ env.NETHERMIND_WITHDRAWALS_IMAGE }}
# EL_SCRIPT_DIR: netherminddocker

# Enable the blob sims when stable images
# - name: Pull ethereumjs blobs
# run: docker pull $ETHEREUMJS_BLOBS_IMAGE

# - name: Test Lodestar <> ethereumjs blobs
# run: yarn test:sim:blobs
# working-directory: packages/beacon-node
# env:
# EL_BINARY_DIR: ${{ env.ETHEREUMJS_BLOBS_IMAGE }}
# EL_SCRIPT_DIR: ethereumjsdocker
# DEV_RUN: true

- name: Upload debug log test files
if: ${{ always() }}
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-sim.yml
Expand Up @@ -165,7 +165,7 @@ jobs:
run: |
docker pull ${{env.GETH_DOCKER_IMAGE}}
docker pull ${{env.LIGHTHOUSE_DOCKER_IMAGE}}
docker pull ${{env.NETHERMIND_DOCKER_IMAGE}}
# docker pull ${{env.NETHERMIND_DOCKER_IMAGE}}
- name: Sim tests mixed client
run: DEBUG='${{github.event.inputs.debug}}' yarn test:sim:mixedclient
working-directory: packages/cli
Expand Down
6 changes: 4 additions & 2 deletions .gitignore
Expand Up @@ -48,7 +48,9 @@ docs/pages/lightclient-prover/lightclient.md
docs/pages/lightclient-prover/prover.md
docs/pages/api/api-reference.md
docs/pages/contribution/getting-started.md
docs/site
## Docusaurus
docs/.docusaurus/
docs/build/

# Testnet artifacts
.lodestar
Expand Down Expand Up @@ -76,4 +78,4 @@ packages/cli/.git-data.json
.last_build_unixsec
dictionary.dic

temp/
temp/
5 changes: 5 additions & 0 deletions .wordlist.txt
Expand Up @@ -12,12 +12,14 @@ CTRL
Casper
Chai
ChainSafe
Codespaces
Customizations
DPoS
DVs
Discv
DockerHub
Dockerized
Docusaurus
EIP
EIPs
EL
Expand All @@ -39,6 +41,7 @@ Geth
Github
Gossipsub
Grafana
HTTPS
HackMD
Homebrew
IPFS
Expand Down Expand Up @@ -91,6 +94,7 @@ api
async
backfill
beaconcha
blockRoot
blockchain
bootnode
bootnodes
Expand All @@ -114,6 +118,7 @@ ddos
decrypt
deserialization
dev
devcontainer
devnet
devnets
devtools
Expand Down
16 changes: 7 additions & 9 deletions CONTRIBUTING.md
Expand Up @@ -47,11 +47,15 @@ Contributing to tests:
- Do not pull unpinned versions from DockerHub (use deterministic tag) or Github (checkout commit not branch).
- 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.

## Devcontainer

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).

### Common Issues

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

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.
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.

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

Expand Down Expand Up @@ -250,15 +254,9 @@ node scripts/download_dashboards.mjs

## Contributing to Documentation

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`

Your locally served documentation will then be accessible at http://localhost:8000.
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`.

If you run into build issues due to circular dependencies, branch switching or other incompatibilities, try cleaning your modules and rebuild your dependencies with:

```sh
yarn clean && yarn clean:nm && yarn && yarn build
```
Your locally served documentation will then be accessible at http://localhost:3000/lodestar/.

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.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -46,7 +46,7 @@ yarn build

| Package | Version | License | Docs | Description |
| ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| [`@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 |
| [`@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 |
| [`@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 |
| [`@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 |
| [`@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 |
Expand Down

0 comments on commit 778a171

Please sign in to comment.