Skip to content

docs(observability): drop tokenomics metrics - #1449

Merged
thiras merged 2 commits into
mainfrom
codex/1439-drop-tokenomics-metrics
Jul 25, 2026
Merged

thiras merged 2 commits into
mainfrom
codex/1439-drop-tokenomics-metrics

Conversation

@altanoruc

Copy link
Copy Markdown
Contributor

Summary

  • remove the unimplemented node-side Tokenomics Metrics subsection from the observability appendix
  • prune the two internal references to deployment-specific tokenomics dashboards
  • preserve the separate Slash-Safety and watcher-health metric families unchanged

Rationale

Network-global tokenomics and governance state remains authoritative on-chain and should be consumed directly by indexers, governance interfaces, and keepers instead of being re-exported from each node's Prometheus endpoint.

Impact

This cancels future node-side collectors only. It does not change Rust, contracts, monitoring assets, settlement metrics, or operator-local slash-safety signals.

Validation

  • make -C adr check-book-list check-refs
  • npx --yes [email protected] --dot '**/*.md' --ignore '.github/agents/**' --ignore '.github/workflows/*.md' --ignore 'adr/_build/**'
  • targeted greps confirm no removed metric consumer exists in crates/, monitoring/, contracts/, or .github/
  • SHA-256 comparison confirms the Slash-Safety block is unchanged
  • Pandoc successfully converts the edited appendix to standalone Typst

The full make -C adr MERMAID=0 PDF build was also attempted locally. Pandoc 3.10.1 generates a Typst compatibility expression referencing the removed horizontalRule symbol, which Typst 0.14.2 rejects; the same failure reproduces from a one-line Markdown input and is independent of this change.

Closes #1439

@coderabbitai

coderabbitai Bot commented Jul 24, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@altanoruc, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Free

Run ID: 45947d45-131a-4725-8bb8-5548a5e6aeff

📥 Commits

Reviewing files that changed from the base of the PR and between fa8f606 and 24d5811.

📒 Files selected for processing (2)
  • adr/016-contract-interactions.md
  • adr/appendix-observability.md

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor Author

Review

Reviewed against #1439. The removal is clean, complete, and matches the filed verdict. One documentation-consistency nit in adr/016-contract-interactions.md and one decision worth recording explicitly; nothing blocking.

What I verified

  • No dangling references. Zero hits repo-wide (excluding adr/_build) for the #tokenomics-metrics anchor and for all twelve removed series: decdn_fee_router_inflow_usdc_{total,rate}, decdn_operator_bytes_{delivered,in_window}, decdn_capacity_bond_{amount_token,declared_mbps,slashed_at_epoch,active_operator_count}, decdn_fee_router_total_bytes_in_window, decdn_slash_{escrow_total_token,appeals,finalized_total}.
  • Issue open question 4 answered: no. Neither monitoring/prometheus-alerts.yml nor monitoring/grafana-dashboard.json references any removed series — the full set of decdn_* names in both files is slash-safety / liveness / delivery / cache / probe / payments only. The § Reference dashboards and alerts claim that they "consume only canonical § Metric Registry metric names" still holds after the removal.
  • Issue open question 3 answered: no gap. ADRs 026, 036, and 009 contain no Prometheus / metrics / observability references at all, so dropping the node-side mirror leaves no dangling promise of vote-weight visibility. The surviving "dashboard" prose in 016:224, 036:180, and 036:182 all describes off-chain indexers reading the chain directly — consistent with this PR's direction, not orphaned by it.
  • Retained families untouched. The diff on appendix-observability.md touches only the tokenomics block and its two back-references; Slash-Safety, Active-Staker-Set Watcher, and Watcher Liveness/Panic are byte-identical. Heading structure and blank-line framing around the excision site are correct, and the file has no TOC or tier-count that went stale.
  • No orphaned contract views. The removed metrics sourced declaredMbps, escrowedTotal, getActiveNodeCount, and the three FeeRouter byte counters. Of these only getActiveNodeCount appears in the Off-Chain Read API table, and it is independently justified there by the bootstrap pagination loop — so nothing else in 016 needed pruning.
  • Checks. make -C adr check-book-list check-refs passes locally; [email protected] clean on both changed files; CI green (ADR book check, markdownlint, PR title all pass; Rust/Solidity jobs correctly skipped as docs-only).

Findings

1. slashedAtEpoch is now an orphan in the Off-Chain Read API table — adr/016-contract-interactions.md:466 (minor, doc consistency)

That table's stated scope is explicit: "Off-chain components — clients and nodes — also need a stable set of view functions." Before this PR the row's off-chain justification was the governance-dashboard metric. With that clause dropped, the only remaining consumer named is DecdnGovernor._getVotes — an on-chain caller, already documented one table up at line 436 (Governor | CapacityBond | firstBondedAt(operator), slashedAtEpoch(operator) (vote-weight inputs...)). So the row now duplicates a cross-contract entry inside a table that exists to enumerate off-chain reads. No off-chain production code reads it either: the only Rust callers are e2e assertions (crates/e2e/src/chain.rs:989), which the issue explicitly classifies as correctness checks rather than consumers.

Suggested fix: drop the row. The surface stays fully covered at 016:23 (Contract Inventory), 016:436 (cross-contract call table), and 016:654 (CapacityBond view/access table). Alternatively keep it with a genuine off-chain consumer named, if one is intended.

The sibling bondOf edit does not have this problem and is correct as written — crates/node/src/handlers/probe.rs:62 implements the ADR 003 admission check, so the row retains a real off-chain reader.

2. The keeper carve-out was decided silently (low — suggest recording, not changing)

The issue marked open question 1 as [your call]: if keepers are expected to scrape node /metrics, then decdn_slash_escrow_total_token and decdn_slash_appeals were the two rows worth preserving. This PR drops them, with the body asserting keepers "consume [chain state] directly." I agree — that matches both the issue's own Verdict: DROP header and its rebuttal (a keeper is by definition already an on-chain actor with RPC and a wallet). Worth stating the chain-native keeper-consumption model explicitly in the PR body or commit message so the answer is recorded rather than inferred from the omission, since it's the one judgment call the issue deliberately left open.

3. Pre-existing, out of scope: decdn_slashes_detected_total is implemented but unregistered (follow-up)

The issue lists this under "what we keep," and it exists in code (crates/node/src/metrics.rs:508, crates/node/src/slash_watcher.rs) — but it appears nowhere in adr/ or docs/. The appendix bills itself as "the complete registry of names, types, and labels," so an implemented-but-unregistered metric is a real gap. Not introduced by this PR and not this PR's job to fix; worth a separate issue.

Verdict

The core change is right, and the "cancels future collectors, deletes no shipped code" framing in the PR body is accurate — I confirmed none of these collectors exist in crates/node. Good to merge once finding 1 is either applied or consciously waived.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Retracting finding 1 — no change needed

Went to apply the slashedAtEpoch fix from my review above and found the premise doesn't hold. Don't make that edit. The PR is correct as-is.

Two things I missed:

firstBondedAt sits two rows above with the identical shape. Line 463: "age_ramp governance-weight anchor" — that's read on-chain by DecdnGovernor (capacityBond.firstBondedAt(op), 036:114), it's listed in the cross-contract table at 436 right next to slashedAtEpoch, and its only Rust reader is likewise crates/e2e/src/bindings.rs. It predates this PR and is untouched by it. So an on-chain-only consumer in this table is the existing convention, not an anomaly this PR introduced — after the edit, slashedAtEpoch reads consistently with the row above it.

The table's stated scope is broader than I treated it. Line 456: "a stable set of view functions for cold-start peer discovery and live state inspection … were not surfaced here, leaving room for them to be missed during contract scaffolding." That's a scaffolding-completeness spec for the off-chain-facing read surface, not a census of current off-chain callers. "Live state inspection" is exactly what a governance UI, indexer, or operator checking their own vote weight does with these two views.

Which makes the deletion actively wrong: it would leave the table listing one ADR 036 vote-weight input and omitting the other, when anyone reproducing vote weight off-chain needs both. And that reader is more central after this PR, not less — pushing those consumers to read the chain directly is the whole rationale, so documenting the surface they read is the thing that should stay.

Findings 2 (record the chain-native keeper-consumption model in the PR body) and 3 (decdn_slashes_detected_total implemented but unregistered — pre-existing, separate issue) stand. Neither blocks merge.

Everything in the "What I verified" section above still holds. LGTM as-is.


Generated by Claude Code

@thiras
thiras merged commit d2baf50 into main Jul 25, 2026
24 checks passed
@thiras
thiras deleted the codex/1439-drop-tokenomics-metrics branch July 25, 2026 16:08
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.

Remove node-side tokenomics/governance metrics (appendix-observability)

2 participants