Repository navigation
P2: self-observability, /health, receive delay, tx-block header checks, URL reda - #59
Merged
Merged
Conversation
Record block_receive_delay_seconds for headers received from the subscription (clamped at 0, not for backfilled headers) and initialize the block time and receive delay SLO gauges at verifier start. Fixes #44 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…logs Endpoint labels and log fields now show only scheme://host[:port]. Errors are redacted before logging, and endpoints that redact to the same value get a #<index> suffix so their labels stay distinct. Fixes #49 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add verifier queue length, in-flight blocks, WebSocket reconnect, last header timestamp and backfill counters. /health now returns 503 until the header subscription is established, while it is down, and (with --health-max-header-age) when no header arrived within the limit. Fixes #45 Fixes #46 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Blocks with transactions now verify both the header and data blobs, each recorded under its own type label. Per-job progress means retries only redo the pending part, and exhaustion records only unverified types as missing. Fixes #47 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…submission_duration_seconds RefreshSubmissionDuration re-observed the last value every 10s, which biased the summary quantiles and inflated _count and _sum. Remove it and expose the latest duration as a gauge instead. The summary now only contains real observations. Fixes #48 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
20 tasks done
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Oct 20, 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.
Implements the P2 issues from the optimization roadmap (#53).
Changes
Receive delay and SLO metrics (#44)
ev_metrics_block_receive_delay_secondsis now recorded for every header received from the subscription. Negative values from clock skew are recorded as 0, and backfilled headers are not counted.block_time_slo_secondsandblock_receive_delay_slo_secondsare set at verifier start.header.Timehas 1-second resolution, so the delay is only accurate to about ±1s (noted in the README). The "not yet emitted" notes are gone.Self-observability metrics and a real
/health(#45, #46)ev_metrics_verifier_queue_length(sampled every 10s)ev_metrics_verifier_inflight_blocksev_metrics_ws_reconnects_totalev_metrics_last_header_received_timestampev_metrics_verifier_backfilled_blocks_totalev_metrics_verifier_backfill_dropped_total/healthreturns 503 until the first subscription is up, and while the subscription is down. Otherwise it returns 200.--health-max-header-age(seconds, default 0). 0 disables the age check, so only the subscription state matters. When set,/healthalso returns 503 if no header has arrived within that time. The check counts from the later of the first subscription and the last header./healthas a readiness probe, not liveness. With the age check on, a halted chain fails it, and restarting the monitor would not help. The README says so.StartServergains ahealthMaxHeaderAgeparameter. Nothing outside this repo calls it.Header verification for blocks with transactions (#47)
typelabel. Blocks without transactions still verify only the header.headerDone,dataDone), so a retry only redoes the pending part and nothing is counted twice. When retries run out, only the still-unverified types are recorded as missing.Endpoint credential redaction (#49)
scheme://host[:port]. Userinfo, path, query and fragment are dropped, so API keys in URLs are no longer exposed. This covers the drift and balance labels and logs, and the balance startup log.RedactErrorkeepserrors.Isanderrors.Asworking).#<index>so they stay distinct. Nothing is hashed.Submission duration is no longer fabricated (#48)
RefreshSubmissionDuration, which re-recorded the last duration every 10s. That biased the summary quantiles toward the last value and inflated_countand_sum.ev_metrics_submission_duration_secondsnow contains only real observations.ev_metrics_last_submission_duration_seconds{chain_id,type}holds the latest value. It is absent until the first submission is verified.Behaviour changes to watch for
NaNwhen no submission was verified in the last 60 seconds, instead of repeating the last value. Switch those panels tolast_submission_duration_secondsfor the latest value.submission_*{type="header"}, the header DA height and duration, andunsubmitted_*{blob_type="header"}rise after upgrading because transaction blocks now count there too.scheme://host[:port]are unchanged.Tests
reg.Gather()./health: 503 before the subscription, 200 after, 503 when down, and the age check on and off.errors.Isanderrors.As, and checks that no label or log line contains a secret placed in the URL.go build,go vet,go test -race ./...(8 packages), golangci-lint (0 issues),gofmtandgo mod tidyare clean.go test -count=3onpkg/metricsstill panics on a duplicate registration.TestStartServer_ExporterErrorStopsServercallsStartServer, which registers on the global Prometheus registry, so it can only run once per process. This was already the case before this PR, and CI runs the tests once.Fixes #44
Fixes #45
Fixes #46
Fixes #47
Fixes #48
Fixes #49
🤖 Generated with Claude Code