Skip to content

chore: upgrade validator-ejector to Node.js 24.22.1 - #203

Open
eddort wants to merge 3 commits into
mainfrom
feat/node-update
Open

eddort wants to merge 3 commits into
mainfrom
feat/node-update

Conversation

@eddort

@eddort eddort commented Oct 21, 2026

Copy link
Copy Markdown
Member

Update validator-ejector to Node.js 24.22.1 across development, CI and Docker.

Changes:

  • Pin dependencies and Yarn; add scoped security overrides.
  • Use native BLST and Lodestar SSZ; remove unused BLS/Lodestar dependencies.
  • Keep keystore 3.0.0 to preserve password-file handling; retain ethers 5.
  • Replace prom-client while preserving metric names and labels.
  • Update cloud SDKs, TypeScript, Vitest, ESLint and tsx.
  • Lock Hardhat 2.29.1; remove its separate CI installation.
  • Exclude tests and development packages from production images.
  • Add crypto, encryption, HTTP/TLS, cloud and metrics regressions.
  • Generate TLS keys and keystore inputs at runtime.
  • Add startup/native probes and dependency documentation.

Validation on 2026-10-21:

  • 298 unit tests on macOS and Linux; 16 e2e tests, no skips.
  • Build, typecheck, lint, startup and amd64/arm64 image checks passed.

Known limitations:

  • GCS emits listener warnings; no memory leak confirmed.
  • One low elliptic advisory remains without a patched release.
  • Hosted GitHub Actions was not run.

- Update and pin dependencies with scoped security overrides
- Replace legacy BLS helpers with native BLST and Lodestar SSZ
- Preserve keystore password handling and ethers 5 behavior
- Update Hardhat, CI, TypeScript, lint and test tooling
- Build production-only Docker images and add runtime probes
- Add regression tests with generated TLS and keystore inputs
- Remove unused dependencies and obsolete configuration
@eddort
eddort changed the base branch from main to develop October 21, 2026 20:29
Comment thread scripts/check-startup.ts Fixed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Native cryptography changes and cross-major dependency overrides require human validation, particularly with hosted CI still unverified.

No open issues 🎉

What changed in this PR

Upgrades validator-ejector to Node.js 24.22.1 across development, CI, and Docker, with dependency compatibility checks.

Changes:

  • Pins runtime and tooling versions and separates production dependencies.
  • Migrates signature verification to native BLST and replaces the metrics client.
  • Adds regression tests, runtime probes, and dependency documentation.
File Description
vite.e2e.config.ts Uses Vitest configuration imports.
vite.config.ts Uses Vitest configuration imports.
tsconfig.json Updates resolution and typechecking scope.
tsconfig.build.json Excludes tests from production builds.
src/​test/​tls-certificate.ts Generates ephemeral TLS certificates.
src/​services/​webhook-caller/​webhook-caller.spec.ts Adapts Nock header assertions.
src/​services/​prom/​service.ts Replaces the metrics client.
src/​services/​prom/​service.spec.ts Checks metric compatibility.
src/​services/​messages-processor/​test/​prepare-deps.ts Supports encryption tests and mock cleanup.
src/​services/​messages-processor/​service.ts Integrates crypto helpers and context validation.
src/​services/​messages-processor/​messages-processor.spec.ts Covers fork selection and malformed inputs.
src/​services/​messages-processor/​encryption.spec.ts Tests encryption and password-file compatibility.
src/​services/​messages-processor/​crypto.ts Implements BLST verification and SSZ helpers.
src/​services/​messages-processor/​crypto.spec.ts Tests roots and signature validation.
src/​services/​http-handler/​service.ts Updates registry types.
src/​services/​exit-logs/​fetcher.spec.ts Adapts Nock request parsing.
src/​services/​execution-api/​el.spec.ts Adapts Nock request parsing.
src/​services/​cloud-storage.spec.ts Tests cloud SDK HTTP compatibility.
src/​lib/​request/​runtime.spec.ts Tests real HTTP and TLS behavior.
src/​lib/​request/​middlewares.ts Updates metrics imports and types.
src/​lib/​request/​middlewares.spec.ts Updates metrics and timeout mocks.
src/​lib/​job/​index.ts Updates histogram types.
src/​app/​service.ts Updates interval timer typing.
scripts/​check-startup.ts Probes development and built startup.
scripts/​check-runtime.mjs Checks production runtime and native dependencies.
README.md Documents setup and validation procedures.
package.json Pins dependencies and updates scripts.
eslint.config.js Adds flat ESLint configuration.
docs/​dependencies.md Documents compatibility and security constraints.
Dockerfile Updates Node and isolates production dependencies.
.nvmrc Pins Node.js 24.22.1.
.gitignore Ignores coverage output.
.github/​workflows/​tests_and_checks.yml Updates CI runtime and checks.
.github/​workflows/​test.yml Updates CI runtime and checks.
.eslintrc Removes legacy ESLint configuration.
.dockerignore Excludes secrets and generated artifacts.

Review effort: Balanced

- replaced static password with random bytes for better security
- updated test cases to reflect new password generation method
@eddort
eddort changed the base branch from develop to main October 22, 2026 11:15
- replace error message with a generic failure message
- ensure consistent response structure for failed requests
Comment thread package.json
"@lodestar/params": "1.50.0",
"@lodestar/types": "1.50.0",
"@prometheus-io/client": "0.16.1",
"dotenv": "18.0.8",

@chasingrainbows chasingrainbows Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the update to dotenv 18, the daemon prints one extra line to stderr at every start: "◇ injected env (N) from .env". It also prints it when there is no .env file. The line is not JSON, so it can confuse log pipelines. src/app/module.ts:37 calls dotenv.config() with no options. Suggest dotenv.config({ quiet: true }) there and in src/scripts/*.ts.

Comment thread README.md

## Requirements

- Node.js 24.22.1 and Yarn 1.22.22 for local installation and development

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README is correct here. The public guide is now outdated: https://docs.lido.fi/guides/validator-ejector-guide, section Requirements, still says "Node.js 16", and section "Running directly" has the old install steps (yarn, yarn build, yarn start). After this merge the only supported runtime is Node 24.22.1 with Yarn 1.22.22. A docs PR with these two edits is needed after the merge.

Comment thread Dockerfile
COPY --from=production-dependencies /app/node_modules ./node_modules
COPY --from=build /app/dist ./dist
COPY package.json ./
COPY scripts/check-runtime.mjs ./scripts/check-runtime.mjs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two probes (check-runtime.mjs and check-startup.ts) run only by hand from the README. Why not run them in CI? For example: build the image and run node scripts/check-runtime.mjs inside it, and run check-startup.ts built after yarn build. Then a broken Dockerfile or a missing native blst build for alpine would fail the PR, not the deploy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants