Skip to content

Add API endpoint for consensus client head forks#609

Merged
pk910 merged 4 commits intomasterfrom
add/client-head-forks-api
Mar 19, 2026
Merged

Add API endpoint for consensus client head forks#609
pk910 merged 4 commits intomasterfrom
add/client-head-forks-api

Conversation

@parithosh
Copy link
Copy Markdown
Member

Summary

  • Adds GET /api/v1/network/client_head_forks endpoint that exposes the same data as the /forks UI page
  • Returns consensus client head forks grouped by chain head, with per-client details (name, version, status, head slot, distance, last refresh, last error)
  • Reuses the same fork validation logic as the UI handler (clients on finalized canonical blocks are merged into the canonical fork)

Test plan

  • Deploy locally and verify curl http://localhost:8080/api/v1/network/client_head_forks returns expected JSON
  • Compare API response against /forks UI page data to confirm parity
  • Verify rate limiting applies correctly (call cost 1)

🤖 Generated with Claude Code

parithosh and others added 2 commits March 17, 2026 14:47
Expose the same data shown on the /forks UI page via a new
GET /api/v1/network/client_head_forks endpoint, returning which
consensus clients are on which chain head with per-client details.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pk910 pk910 enabled auto-merge March 19, 2026 11:36
@pk910 pk910 merged commit 978cc04 into master Mar 19, 2026
4 checks passed
@pk910 pk910 deleted the add/client-head-forks-api branch March 19, 2026 11:40
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