From 8585c01bd596009174f5bafb9d4317f829fe3b88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Mon, 3 Aug 2026 17:07:59 -0300 Subject: [PATCH] docs(claude-md): note that equal API and metrics ports merge routers CLAUDE.md described the RPC crate as always binding two Axum servers. `crates/net/rpc/src/lib.rs` merges the API and metrics/debug routers onto a single listener when --api-port and --metrics-port match, so pointing both flags at one port is supported rather than a misconfiguration. Split out of #554, which only touched it incidentally. --- CLAUDE.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 5eb367d2..3e092d5e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -288,7 +288,10 @@ actual_slot = finalized_slot + 1 + relative_index ## HTTP Servers (API + Metrics) -The RPC crate runs two independent Axum servers (API on `:5052`, metrics/debug on `:5054`). See [`docs/rpc.md`](docs/rpc.md) for the full reference: CLI flags and defaults, the API endpoints (health, finalized state/block, justified checkpoint, blocks by root/slot, fork-choice tree + D3.js UI, runtime aggregator toggle), the metrics/debug endpoints (Prometheus `/metrics`, jemalloc heap profiling), the Hive test-driver endpoints, plus request/response shapes, status codes, and content types. +The RPC crate serves the API router (`--api-port`, default 5052) and the metrics/debug routers +(`--metrics-port`, default 5054). When the two ports differ it binds two independent Axum servers; +when they are equal it merges all three routers onto a single listener, so pointing both flags at +one port is supported and not a misconfiguration. See [`docs/rpc.md`](docs/rpc.md) for the full reference: CLI flags and defaults, the API endpoints (health, finalized state/block, justified checkpoint, blocks by root/slot, fork-choice tree + D3.js UI, runtime aggregator toggle), the metrics/debug endpoints (Prometheus `/metrics`, jemalloc heap profiling), the Hive test-driver endpoints, plus request/response shapes, status codes, and content types. ## Configuration Files