Skip to content

chore(preconf): enrich sequencer server health check impl.#3086

Open
bar-bera wants to merge 6 commits intopreconf-devfrom
preconf/sequencer-health-check
Open

chore(preconf): enrich sequencer server health check impl.#3086
bar-bera wants to merge 6 commits intopreconf-devfrom
preconf/sequencer-health-check

Conversation

@bar-bera
Copy link
Copy Markdown
Collaborator

Uses existent services to add checks on the /eth/v1/preconf/health endpoint of the sequencer server:

  • node has a state to work with
  • node is synced
  • EL is connected

@bar-bera bar-bera requested a review from a team as a code owner April 20, 2026 15:36
Copilot AI review requested due to automatic review settings April 20, 2026 15:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enriches the sequencer preconf server /eth/v1/preconf/health endpoint by reporting readiness/sync state and execution-layer connectivity, wiring in existing node services to drive those checks.

Changes:

  • Extend preconf.Server to accept SyncChecker and ELChecker dependencies and use them in the health handler to return 200 vs 503 plus a JSON body.
  • Wire ConsensusService and EngineClient into the sequencer preconf server provider.
  • Add HealthResponse type and new unit tests covering the health endpoint status/flags.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
node-core/components/preconf_server.go Injects consensus + engine clients into the preconf server so health checks can reflect node/EL state.
beacon/preconf/types.go Adds HealthResponse struct returned by /eth/v1/preconf/health.
beacon/preconf/server.go Implements health response building and 200/503 logic based on readiness, syncing, and EL connectivity.
beacon/preconf/server_test.go Updates server construction for new deps and adds coverage for the health endpoint.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread beacon/preconf/server.go
Comment thread beacon/preconf/server_test.go
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

❌ Patch coverage is 83.78378% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.34%. Comparing base (cd11467) to head (4b0a2be).

Files with missing lines Patch % Lines
beacon/preconf/server.go 87.50% 2 Missing and 1 partial ⚠️
node-core/components/preconf_server.go 0.00% 2 Missing ⚠️
execution/client/client.go 80.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           preconf-dev    #3086      +/-   ##
===============================================
+ Coverage        58.93%   59.34%   +0.40%     
===============================================
  Files              379      379              
  Lines            19531    19558      +27     
===============================================
+ Hits             11511    11606      +95     
+ Misses            7058     6987      -71     
- Partials           962      965       +3     
Files with missing lines Coverage Δ
beacon/preconf/types.go 51.72% <ø> (ø)
execution/client/engine.go 62.37% <100.00%> (+1.15%) ⬆️
execution/client/errors.go 30.76% <100.00%> (+2.76%) ⬆️
execution/client/client.go 54.61% <80.00%> (+0.13%) ⬆️
node-core/components/preconf_server.go 21.62% <0.00%> (-1.24%) ⬇️
beacon/preconf/server.go 55.44% <87.50%> (+5.16%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants