Skip to content

Commit 6ea6e46

Browse files
authored
chore: v1.28.0 release (#7587)
2 parents ff574a5 + 461532e commit 6ea6e46

File tree

246 files changed

+3523
-2433
lines changed

Some content is hidden

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

246 files changed

+3523
-2433
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ prometheus.yml
2626

2727
# Docker
2828
Dockerfile
29+
Dockerfile.dev
2930
docker-compose.yml
3031

3132
# Tests

.wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ gpg
167167
heapdump
168168
heaptrack
169169
holesky
170+
hoodi
170171
interop
171172
js
172173
keymanager

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ If you observe following error running any of the test files that means you are
7171
- Before running the tests, make sure to switch to the package directory (e.g. `packages/beacon-node`) to speed up test execution
7272

7373
```sh
74-
LODESTAR_PRESET=minimal yarn vitest --run --bail 1 --config vitest.spec.config.ts test/spec/presets/sanity.test.ts -t attester_slashing
74+
LODESTAR_PRESET=minimal yarn vitest run --bail 1 --config vitest.spec.config.ts test/spec/presets/sanity.test.ts -t attester_slashing
7575
```
7676

7777
## Docker

Dockerfile.dev

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Dockerfile.dev is a stripped down version of Dockerfile that is used for development purposes.
2+
# It minimizes number of installs and builds to speed up the development process.
3+
# Run this on local host only.
4+
# Generated image is larger than production image. Do not use this for production.
5+
6+
FROM --platform=${BUILDPLATFORM:-amd64} node:22 AS build_dev
7+
ARG COMMIT
8+
9+
WORKDIR /usr/app
10+
11+
COPY . .
12+
13+
RUN yarn install --non-interactive && yarn build
14+
15+
RUN cd packages/cli && GIT_COMMIT=${COMMIT} yarn write-git-data
16+
17+
ENV NODE_OPTIONS=--max-old-space-size=8192
18+
19+
ENTRYPOINT ["node", "./packages/cli/bin/lodestar"]

biome.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"useIgnoreFile": true
77
},
88
"files": {
9-
"include": ["packages/*/src/**/*.ts", "packages/*/test/**/*.ts"]
9+
"include": ["packages/*/src/**/*.ts", "packages/*/test/**/*.ts", "configs/**/*.ts"]
1010
},
1111
"formatter": {
1212
"enabled": true,

vite.base.config.ts renamed to configs/vite.config.base.ts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import {visualizer} from "rollup-plugin-visualizer";
12
import {UserConfig, defineConfig} from "vite";
23
import {nodePolyfills} from "vite-plugin-node-polyfills";
3-
import {visualizer} from "rollup-plugin-visualizer";
44
import topLevelAwait from "vite-plugin-top-level-await";
5-
import {blsBrowserPlugin} from "./scripts/vite/plugins/blsBrowserPlugin.js";
5+
import {blsBrowserPlugin} from "../scripts/vite/plugins/blsBrowserPlugin.js";
66

77
export function getBaseViteConfig(
88
pkgInfo: {
@@ -41,10 +41,12 @@ export function getBaseViteConfig(
4141
banner,
4242
legalComments: "none",
4343
sourcemap: "inline",
44+
supported: {
45+
"top-level-await": true,
46+
},
4447
},
4548
build: {
46-
// "modules" refer to ['es2020', 'edge88', 'firefox78', 'chrome87', 'safari14']
47-
target: "modules",
49+
target: "es2022",
4850
outDir: "dist",
4951
sourcemap: true,
5052
minify: true,
@@ -57,13 +59,10 @@ export function getBaseViteConfig(
5759
formats: ["es"],
5860
name: libName,
5961
fileName: (format) => {
60-
if (format === "esm" || format === "es") {
61-
return `${libName.toLowerCase()}.min.mjs`;
62-
} else if (format === "cjs") {
63-
return `${libName.toLowerCase()}.min.cjs`;
64-
} else {
65-
return `${libName.toLowerCase()}.min.${format}.js`;
66-
}
62+
if (format === "esm" || format === "es") return `${libName.toLowerCase()}.min.mjs`;
63+
if (format === "cjs") return `${libName.toLowerCase()}.min.cjs`;
64+
65+
return `${libName.toLowerCase()}.min.${format}.js`;
6766
},
6867
},
6968
rollupOptions: {
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/// <reference types="@vitest/browser/providers/webdriverio" />
2+
3+
import path from "node:path";
4+
import {defineConfig} from "vitest/config";
5+
const __dirname = new URL(".", import.meta.url).pathname;
6+
import {nodePolyfills} from "vite-plugin-node-polyfills";
7+
import topLevelAwait from "vite-plugin-top-level-await";
8+
import {blsBrowserPlugin} from "../scripts/vite/plugins/blsBrowserPlugin.js";
9+
10+
export default defineConfig({
11+
plugins: [
12+
topLevelAwait(),
13+
blsBrowserPlugin(),
14+
nodePolyfills({
15+
include: ["buffer", "process", "util", "string_decoder", "url", "querystring", "events"],
16+
globals: {Buffer: true, process: true},
17+
protocolImports: true,
18+
}),
19+
],
20+
test: {
21+
include: ["**/*.test.ts"],
22+
exclude: [
23+
"**/*.node.test.ts",
24+
"**/node_modules/**",
25+
"**/dist/**",
26+
"**/lib/**",
27+
"**/cypress/**",
28+
"**/.{idea,git,cache,output,temp}/**",
29+
"**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*",
30+
],
31+
setupFiles: [path.join(__dirname, "../scripts/vitest/setupFiles/customMatchers.ts")],
32+
reporters: ["default", "hanging-process"],
33+
coverage: {
34+
enabled: false,
35+
},
36+
browser: {
37+
enabled: true,
38+
headless: true,
39+
ui: false,
40+
screenshotFailures: false,
41+
// Recommended provider is `playwright` but it's causing following error on CI
42+
// Error: Failed to connect to the browser session "af5be85a-7f29-4299-b680-b07f0cfc2520" within the timeout.
43+
// TODO: Debug the issue in later versions of playwright and vitest
44+
provider: "webdriverio",
45+
connectTimeout: 90_0000,
46+
instances: [
47+
// TODO: Add support for webkit when available
48+
// Invalid types from webdriverio for capabilities
49+
{
50+
browser: "firefox",
51+
maxConcurrency: 1,
52+
capabilities: {
53+
browserVersion: "stable",
54+
},
55+
} as never,
56+
// Invalid types from webdriverio for capabilities
57+
{
58+
browser: "chrome",
59+
maxConcurrency: 1,
60+
capabilities: {
61+
browserVersion: "stable",
62+
},
63+
} as never,
64+
],
65+
},
66+
},
67+
resolve: {
68+
alias: {
69+
"node:perf_hooks": path.join(__dirname, "../scripts/vitest/polyfills/perf_hooks.js"),
70+
},
71+
},
72+
optimizeDeps: {
73+
include: [
74+
"vite-plugin-node-polyfills/shims/buffer",
75+
"vite-plugin-node-polyfills/shims/global",
76+
"vite-plugin-node-polyfills/shims/process",
77+
],
78+
},
79+
});

vitest.base.e2e.config.ts renamed to configs/vitest.config.base.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {defineConfig, mergeConfig} from "vitest/config";
2-
import vitestConfig from "./vitest.base.unit.config.js";
2+
import vitestConfig from "./vitest.config.base.unit.js";
33

44
export default mergeConfig(
55
vitestConfig,

configs/vitest.config.base.spec.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import {defineConfig, mergeConfig} from "vitest/config";
2+
import vitestConfig from "./vitest.config.base.unit.js";
3+
4+
export default mergeConfig(
5+
vitestConfig,
6+
defineConfig({
7+
test: {
8+
coverage: {
9+
enabled: false,
10+
},
11+
// There are tests which is taking over 10 minutes.
12+
// ✓ test/spec/presets/epoch_processing.test.ts > electra/epoch_processing/rewards_and_penalties/pyspec_tests > electra/epoch_processing/rewards_and_penalties/pyspec_tests/full_attestations_one_validaor_one_gwei 572377ms
13+
// So I have to increase these values to such extreme
14+
testTimeout: 1000 * 60 * 15,
15+
hookTimeout: 1000 * 60 * 15,
16+
passWithNoTests: true,
17+
pool: "threads",
18+
poolOptions: {
19+
threads: {
20+
isolate: false,
21+
},
22+
},
23+
},
24+
})
25+
);

vitest.base.unit.config.ts renamed to configs/vitest.config.base.ts

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,35 +17,18 @@ export default defineConfig({
1717
"**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*",
1818
],
1919
setupFiles: [
20-
path.join(__dirname, "./scripts/vitest/setupFiles/customMatchers.ts"),
21-
path.join(__dirname, "./scripts/vitest/setupFiles/dotenv.ts"),
20+
path.join(__dirname, "../scripts/vitest/setupFiles/customMatchers.ts"),
21+
path.join(__dirname, "../scripts/vitest/setupFiles/dotenv.ts"),
2222
],
2323
reporters: process.env.GITHUB_ACTIONS
2424
? ["verbose", "hanging-process", "github-actions"]
2525
: [process.env.TEST_COMPACT_OUTPUT ? "basic" : "verbose", "hanging-process"],
2626
coverage: {
27-
enabled: process.env.CI === "true",
28-
clean: true,
29-
all: false,
30-
extension: [".ts"],
31-
provider: "v8",
32-
reporter: [["lcovonly", {file: "lcov.info"}], ["text"]],
33-
reportsDirectory: "./coverage",
34-
exclude: [
35-
"**/*.d.ts",
36-
"**/*.js",
37-
"**/lib/**",
38-
"**/coverage/**",
39-
"**/scripts/**",
40-
"**/test/**",
41-
"**/types/**",
42-
"**/bin/**",
43-
"**/node_modules/**",
44-
"**/spec-tests/**",
45-
"**/spec-tests-bls/**",
46-
],
27+
enabled: false,
4728
},
48-
diff: process.env.TEST_COMPACT_DIFF ? path.join(import.meta.dirname, "./scripts/vitest/vitest.diff.ts") : undefined,
29+
diff: process.env.TEST_COMPACT_DIFF
30+
? path.join(import.meta.dirname, "../scripts/vitest/vitest.diff.ts")
31+
: undefined,
4932
onConsoleLog: () => !process.env.TEST_QUIET_CONSOLE,
5033
},
5134
});

0 commit comments

Comments
 (0)