feat(anchor): expose Anchor Prometheus metrics on port 5164 - #46
Merged
Merged
Conversation
Anchor nodes started with no --metrics flag and no published port, so duty timing, head-event trigger counters, and QBFT instrumentation were unreadable on a local run. SSV nodes already publish theirs (port 9240); this closes that asymmetry, following the same constant + PortSpec shape. Anchor defaults the metrics listen address to 127.0.0.1, which is unreachable from outside the container, hence the explicit 0.0.0.0 bind. The flags exist on every anchor image pinned in this repo (verified against the shipped binaries in sigp/anchor:v1.2.0 and :v1.3.0), so no profile regresses. Verified live on a 4-operator all-Anchor run: all four anchor-node-N publish metrics: 5164/tcp, and each returns HTTP 200 with ~3.6k lines of Prometheus text (anchor_execution_*, anchor_processor_*).
shane-moore
force-pushed
the
anchor-metrics-port
branch
from
August 10, 2026 19:29
0baf381 to
8e1e9af
Compare
iurii-ssv
approved these changes
Aug 11, 2026
ovidiu-ssv-labs
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
Starts Anchor nodes with
--metricsand publishes port 5164, so duty timing, head-eventtrigger counters, and QBFT instrumentation are readable on a local run. SSV nodes already
publish theirs (port 9240,
nodes/ssv/node.star); this closes that asymmetry and follows thesame shape there: module-level name/number constants plus a
PortSpecin theportsdict.16 lines in one file, no params or profile changes.
Why the explicit
0.0.0.0Anchor defaults the metrics listen address to
127.0.0.1(--metrics-addresshelp: "Defaultsto 127.0.0.1 if --metrics is set"). Bound to loopback inside the container, the published port
refuses connections, so the bind has to be explicit.
Image compatibility
--metrics/--metrics-address/--metrics-portare present on every anchor image pinned inthis repo, checked against the shipped binaries rather than the source:
sigp/anchor:v1.3.0(params.yaml,params-boole.yaml)sigp/anchor:v1.2.0(params-gloas.yaml)Both default to port 5164. No profile regresses; profiles with
anchor.count: 0are unaffectedeither way.
Verification
Live 4-operator all-Anchor run (
ssv: 0/anchor: 4):kurtosis enclave inspectshowsmetrics: 5164/tcpon all fouranchor-node-N, not justthe bootnode (nodes 1..n inherit the flags via the existing
list(command_arr)copy, and theportsdict is set on both service configs).curl http://127.0.0.1:<mapped>/metricsreturns HTTP 200 on all four, ~3,600 lines ofPrometheus text each, carrying real Anchor families:
anchor_execution_current_block,anchor_processor_work_event_queue_length,anchor_processor_worker_time_*.Context
Extracted from #33 per @iurii-ssv's review. That PR's Gloas profiles are superseded by the work
merged since (#34, #35, #36, #37, #39, #40, #41), and this metrics change was one of the two
pieces identified as still net-new. The other, the
buildoorexternal-builder profile, is leftout: it needs
builder_count, which is absent fromethereum-package@6.1.0, and upstream stillstarts genesis builders at
actual_num_validators, colliding with the preregistered keysharevalidators at 64-73. That needs an upstream fix first rather than pinning this repo to a fork.