Skip to content

start API server after chain init, add health/ready endpoints#623

Open
chetanyb wants to merge 4 commits intomainfrom
chain-init-sync
Open

start API server after chain init, add health/ready endpoints#623
chetanyb wants to merge 4 commits intomainfrom
chain-init-sync

Conversation

@chetanyb
Copy link
Contributor

@chetanyb chetanyb commented Mar 3, 2026

Summary

  • Start API server after chain initialization, removing setChain()/getChain() pattern
  • Add /lean/v0/health on metrics server (port 9668) for early liveness checks
  • Add /lean/v0/ready on API server (port 9667) for readiness checks

Endpoint Layout

Server Port Endpoint Availability
Metrics 9668 /lean/v0/health Immediate
API 9667 /lean/v0/ready After chain init

Changes

  • api_server.zig - chain now required at construction, added /lean/v0/ready
  • metrics_server.zig - added /lean/v0/health
  • main.zig - moved API server start after beam_node.init()

Closes #519

chetanyb added 3 commits March 1, 2026 12:53
Returns 200 with {"ready":true} when chain is initialized, 503 with
{"ready":false} otherwise. Useful for orchestration systems (e.g.,
Kubernetes readiness probes).
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.

Start API Server After Chain Initialization (Remove Late setChain)

1 participant