Skip to content

Commit b8da556

Browse files
authored
chore: v1.34.0 release (#8344)
2 parents 5f2cf3c + 1a17514 commit b8da556

File tree

376 files changed

+16996
-2852
lines changed

Some content is hidden

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

376 files changed

+16996
-2852
lines changed

.env.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# We use these images during sim and e2e tests
22
# This is the last version which supports pre/post merge chains in the same network
33
# All newer versions only work with post merge chains
4-
GETH_DOCKER_IMAGE=ethereum/client-go:v1.13.14
4+
GETH_DOCKER_IMAGE=ethereum/client-go:v1.16.2
55
# Use either image or local binary for the testing
66
GETH_BINARY_DIR=
7-
LIGHTHOUSE_DOCKER_IMAGE=sigp/lighthouse:v7.0.1
7+
LIGHTHOUSE_DOCKER_IMAGE=ethpandaops/lighthouse:unstable-d235f2c
88

99
# We can't upgrade nethermind further due to genesis hash mismatch with the geth
1010
# https://github.com/NethermindEth/nethermind/issues/6683
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
name: Publish nextfork release
2+
3+
# only one per github sha can be run
4+
concurrency:
5+
group: cd-publish-nextfork
6+
7+
on:
8+
push:
9+
branches:
10+
- peerDAS # Nextfork branch
11+
12+
env:
13+
NEXT_FORK: peerDAS
14+
15+
jobs:
16+
npm:
17+
name: Publish to NPM Registry
18+
runs-on: buildjet-4vcpu-ubuntu-2204
19+
steps:
20+
# <common-build> - Uses YAML anchors in the future
21+
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
- uses: actions/setup-node@v4
25+
with:
26+
node-version: 22
27+
registry-url: "https://registry.npmjs.org"
28+
check-latest: true
29+
cache: yarn
30+
- name: Node.js version
31+
id: node
32+
run: echo "v8CppApiVersion=$(node --print "process.versions.modules")" >> $GITHUB_OUTPUT
33+
- name: Restore dependencies
34+
uses: actions/cache@master
35+
id: cache-deps
36+
with:
37+
path: |
38+
node_modules
39+
packages/*/node_modules
40+
key: ${{ runner.os }}-${{ steps.node.outputs.v8CppApiVersion }}-${{ hashFiles('**/yarn.lock', '**/package.json') }}
41+
- name: Install & build
42+
if: steps.cache-deps.outputs.cache-hit != 'true'
43+
run: yarn install --frozen-lockfile && yarn build
44+
- name: Build
45+
run: yarn build
46+
if: steps.cache-deps.outputs.cache-hit == 'true'
47+
# </common-build>
48+
- name: Get version
49+
id: version
50+
run: |
51+
PACKAGE_VERSION=$(node -p "require('./packages/cli/package.json').version")
52+
NEXT_VERSION=$(npx --yes semver --increment minor $PACKAGE_VERSION)
53+
export VERSION=${NEXT_VERSION}-${NEXT_FORK}.${GITHUB_SHA:0:10}
54+
echo "version=$VERSION" >> $GITHUB_OUTPUT
55+
echo PACKAGE_VERSION $PACKAGE_VERSION GITHUB_SHA $GITHUB_SHA VERSION $VERSION
56+
57+
- name: Change and commit version
58+
# Write version before publishing so it's picked up by `lerna publish from-package`.
59+
# It must also be committed to ensure a clean git tree, otherwise `lerna publish` errors.
60+
# This "temp" commit doesn't change the actually release commit which is captured above.
61+
# git-data is also correct, since it's generated at build time, before `lerna version` run.
62+
run: |
63+
node_modules/.bin/lerna version ${{ steps.version.outputs.version }} \
64+
--force-publish \
65+
--exact \
66+
--yes \
67+
--no-git-tag-version
68+
69+
git config user.name 'temp'
70+
git config user.email '[email protected]'
71+
git commit -am "${{ steps.version.outputs.version }}"
72+
73+
- name: Publish to npm registry
74+
# Note: before https://github.com/ChainSafe/lodestar/commit/28e2c74cf0f1bede8b09c8c9fec26f54b367e3fd
75+
# We used `lerna publish --canary` option. However, since we now publish must version on branches,
76+
# i.e. v0.35.x branch, lerna fails to detect the latest version and publishes canary versions as
77+
# `0.34.0-dev.173+28e2c74cf0` instead of `0.36.0-dev.4+28e2c74cf0`, which creates confusion.
78+
#
79+
# --no-git-reset:
80+
# Do not delete code version artifacts so the next step can pick the version
81+
#
82+
# --dist-tag next:
83+
# Make this dev version installable with `@next`
84+
#
85+
# --preid dev:
86+
# Tag version with `dev` instead of `alpha`
87+
#
88+
# --force-publish:
89+
# lerna doesn't want to publish anything otherwise - "lerna success No changed packages
90+
# to publish"
91+
# --exact
92+
# lerna will link the dependencies of monorepo packages without ^ operator as npm
93+
# is apparently bad at resolving ^ dependencies of the canary versions. For e.g
94+
# @chainsafe/lodestar@^0.34.0-dev.4 resolves to => 0.34.0
95+
#
96+
# NOTE: Using --preid dev.$(git rev-parse --short=7 HEAD) results in `0.24.3-dev.3ddb91d.0+3ddb91d`
97+
run: |
98+
node_modules/.bin/lerna publish from-package \
99+
--yes \
100+
--no-verify-access \
101+
--dist-tag next \
102+
--no-git-reset \
103+
--force-publish \
104+
--exact
105+
env:
106+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
107+
outputs:
108+
version: ${{ steps.version.outputs.version }}
109+
110+
docker:
111+
name: Publish to Docker Hub
112+
runs-on: buildjet-4vcpu-ubuntu-2204
113+
needs: npm
114+
steps:
115+
- uses: actions/checkout@v4
116+
# https://github.com/docker/setup-qemu-action
117+
- name: Set up QEMU
118+
uses: docker/setup-qemu-action@v3
119+
# https://github.com/docker/setup-buildx-action
120+
- name: Set up Docker Buildx
121+
uses: docker/setup-buildx-action@v3
122+
- name: Login to Docker Hub
123+
uses: docker/login-action@v3
124+
with:
125+
username: ${{ secrets.DOCKERHUB_USERNAME }}
126+
password: ${{ secrets.DOCKERHUB_TOKEN }}
127+
- name: Build and push lodestar
128+
run: >
129+
docker buildx build . --push
130+
--tag chainsafe/lodestar:nextfork
131+
--platform linux/amd64,linux/arm64
132+
--build-arg COMMIT=$(git rev-parse HEAD)
133+
134+
- run: docker run chainsafe/lodestar:nextfork --help
135+
# Display history to know byte size of each layer
136+
# Image is available only because of the previous `docker run` command
137+
- run: docker image history chainsafe/lodestar:nextfork
138+
139+
- name: Build and push custom Grafana
140+
run: >
141+
docker buildx build ./docker/grafana/ --push
142+
--file ./docker/grafana/Dockerfile
143+
--build-context dashboards=./dashboards
144+
--tag chainsafe/lodestar-grafana:nextfork
145+
--platform linux/amd64,linux/arm64
146+
147+
- name: Build and push custom Prometheus
148+
run: >
149+
docker buildx build ./docker/prometheus/ --push
150+
--file ./docker/prometheus/Dockerfile
151+
--tag chainsafe/lodestar-prometheus:nextfork
152+
--platform linux/amd64,linux/arm64

biome.jsonc

Lines changed: 50 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,51 @@
99
"vcs": {
1010
"defaultBranch": "unstable"
1111
},
12-
"files": {
13-
"include": ["packages/*/src/**/*.ts", "packages/*/test/**/*.ts", "configs/**/*.ts", "./vitest.config.ts"]
14-
},
15-
"formatter": {
16-
"ignore": ["**/lib", "**/.nyc_output", "./packages/*/spec-tests", "**/node_modules", "./packages/*/node_modules/**"]
12+
"assist": {
13+
"actions": {
14+
"source": {
15+
"organizeImports": { "level": "off", "options": { "identifierOrder": "lexicographic" } },
16+
"useSortedKeys": { "level": "off", "options": { "sortOrder": "lexicographic" } }
17+
}
18+
}
1719
},
18-
"organizeImports": {
19-
"enabled": true
20+
"files": {
21+
"includes": [
22+
"**/packages/**/*/src/**/*.ts",
23+
"**/packages/**/*/test/**/*.ts",
24+
"**/configs/**/*.ts",
25+
"vitest.config.ts",
26+
"!**/lib",
27+
"!packages/**/*/spec-tests",
28+
"!packages/**/*/node_modules/"
29+
]
2030
},
2131
"linter": {
2232
"rules": {
2333
"correctness": {
2434
"useImportExtensions": {
2535
"level": "error",
2636
"options": {
27-
"suggestedExtensions": {
28-
"ts": {
29-
"module": "js",
30-
"component": "jsx"
31-
}
32-
}
37+
"forceJsExtensions": false
3338
}
39+
},
40+
"useParseIntRadix": {
41+
"level": "off"
3442
}
3543
},
3644
"performance": {
3745
// This rule should be enabled but with considerations and careful review
3846
"noDelete": "off"
3947
},
4048
"style": {
41-
// The code usage looks suspicious so it should be enabled in a separate PR
42-
"noCommaOperator": "off",
49+
// Will be enabled in a separate PR
50+
"useArrayLiterals": "off",
4351
// There are a lot of places we mutate params, should be fixed in an independent PR.
4452
"noParameterAssign": "off",
4553
"noRestrictedGlobals": {
4654
"level": "error",
4755
"options": {
48-
"deniedGlobals": ["fetch"]
56+
"deniedGlobals": { "fetch": "Please use 'fetch' from '@lodestar/api' instead." }
4957
}
5058
},
5159
// In some cases the enums are initialized with values of other enums
@@ -143,19 +151,31 @@
143151
}
144152
},
145153
"suspicious": {
154+
// Will be enabled in separate PR
155+
"useIterableCallbackReturn": "off",
146156
// There is a lot of empty code blocks, should be enabled and clean up separately.
147-
"noEmptyBlockStatements": "off"
157+
"noEmptyBlockStatements": "off",
158+
// We are using `Object.prototype.hasOwnProperty` a lot because compiling lib is set to prior 2022
159+
"noPrototypeBuiltins": "off"
148160
},
149161
"nursery": {
150162
// Need to enable this rule with exception to anonymous functions
151163
"useExplicitType": "off"
164+
},
165+
"complexity": {
166+
// Should be done in a separate PR
167+
"useIndexOf": "off",
168+
// Should be done in a separate PR
169+
"useDateNow": "off",
170+
// The code usage looks suspicious so it should be enabled in a separate PR
171+
"noCommaOperator": "off"
152172
}
153173
}
154174
},
155175
"overrides": [
156176
// Code using console output
157177
{
158-
"include": ["packages/cli/src/", "packages/test-utils/src", "packages/flare/src"],
178+
"includes": ["**/packages/cli/src/**", "**/packages/test-utils/src/**", "**/packages/flare/src/**"],
159179
"linter": {
160180
"rules": {
161181
"suspicious": {
@@ -166,7 +186,7 @@
166186
},
167187
// All test files
168188
{
169-
"include": ["**/test/**/*.ts", "packages/spec-test-util/src"],
189+
"includes": ["**/packages/spec-test-util/src/**"],
170190
"linter": {
171191
"rules": {
172192
"complexity": {
@@ -185,20 +205,17 @@
185205
}
186206
},
187207
{
188-
"include": [
189-
// These files are using mix cases e.g. `engine_newPayloadV4`
190-
// It's a mix of snake_case and camelCase, which can't validated by biome
191-
"packages/beacon-node/src/db/buckets.ts",
192-
"packages/beacon-node/src/execution/engine/mock.ts",
193-
"packages/beacon-node/src/execution/engine/types.ts",
194-
"packages/beacon-node/src/eth1/provider/eth1Provider.ts",
195-
"packages/validator/src/buckets.ts",
196-
"packages/prover/src/types.ts",
197-
"prover/src/utils/process.ts",
198-
"prover/src/verified_requests/**/*.ts",
199-
"packages/types/src/utils/**/*.ts",
200-
// This file is using snake_case function names
201-
"packages/beacon-node/test/spec/bls/bls.ts"
208+
"includes": [
209+
"**/packages/beacon-node/src/db/buckets.ts",
210+
"**/packages/beacon-node/src/execution/engine/mock.ts",
211+
"**/packages/beacon-node/src/execution/engine/types.ts",
212+
"**/packages/beacon-node/src/eth1/provider/eth1Provider.ts",
213+
"**/packages/validator/src/buckets.ts",
214+
"**/packages/prover/src/types.ts",
215+
"**/prover/src/utils/process.ts",
216+
"**/prover/src/verified_requests/**/*.ts",
217+
"**/packages/types/src/utils/**/*.ts",
218+
"**/packages/beacon-node/test/spec/bls/bls.ts"
202219
],
203220
"linter": {
204221
"rules": {

0 commit comments

Comments
 (0)