Skip to content

chore(zetaclient): demote ChainParams enumeration noise to debug#4608

Open
morde08 wants to merge 1 commit into
developfrom
chore/demote-chainparams-warn
Open

chore(zetaclient): demote ChainParams enumeration noise to debug#4608
morde08 wants to merge 1 commit into
developfrom
chore/demote-chainparams-warn

Conversation

@morde08

@morde08 morde08 commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Demote two log lines from Warn to Debug:
    • skipping unsupported chain (zetaclient/orchestrator/contextupdater.go)
    • chain does not have according ChainParams present; skipping (zetaclient/context/app.go)

Why

Both fire on every UpdateAppContext tick for every chain in the registry — config-driven enumeration over a mostly-static chain list, not runtime warnings. In Datadog over the last 7d these accounted for ~4M warn lines/wk across the fleet (skipping unsupported chain alone: 3,103/day per client). Real Warns in this code path are preserved: chain list changes at runtime, deleted chains, invalid chain params with an error, mempool congestion.

Test plan

  • go test ./zetaclient/context/... ./zetaclient/orchestrator/... — all pass
  • go build ./zetaclient/...
  • After merge & deploy: confirm service:zetaclientd status:warn @msg:"skipping unsupported chain" drops to ~0 in Datadog

🤖 Generated with Claude Code


Note

Low Risk
Logging-only change with no behavior or control-flow impact; operational alerts that still use Warn remain in place.

Overview
Reduces zetaclient log noise by demoting two recurring enumeration messages from Warn to Debug: skipping unsupported chain in contextupdater.go and chain does not have according ChainParams present; skipping in app.go.

Both run on every UpdateAppContext tick for chains that are expected to be skipped (unsupported or missing params), so they were inflating fleet warn volume without signaling new failures. Comments document that intent; real warns in this path (runtime chain list changes, deleted chains, invalid chain params, mempool congestion) are unchanged.

Reviewed by Cursor Bugbot for commit a0c9bf4. Configure here.

Summary by CodeRabbit

  • Chores
    • Adjusted logging severity for chain parameter and unsupported chain enumeration events during update cycles to reduce log verbosity.

Greptile Summary

This PR demotes two log lines from Warn to Debug level in the zetaclient's chain-params enumeration path to reduce high-volume log noise in production. The change is well-scoped and preserves all actionable Warn-level logs in the same code paths.

  • In zetaclient/orchestrator/contextupdater.go, the "skipping unsupported chain" message is demoted to Debug since it fires on every UpdateAppContext tick for each unsupported chain in the registry.
  • In zetaclient/context/app.go, the "chain does not have according ChainParams present; skipping" message is similarly demoted; genuine runtime warnings (chain list changes, invalid params with errors) remain at Warn.

Confidence Score: 5/5

Safe to merge — the only changes are log level demotions with no effect on business logic or control flow.

Both changed lines are pure observability adjustments: .Warn() becomes .Debug() with no surrounding logic touched. Actionable warnings in the same code paths (chain list runtime changes, invalid param validation errors) remain at Warn. The added comments accurately explain the rationale.

No files require special attention.

Important Files Changed

Filename Overview
zetaclient/orchestrator/contextupdater.go Demotes "skipping unsupported chain" from Warn to Debug with an explanatory comment; no logic changes.
zetaclient/context/app.go Demotes "chain does not have according ChainParams present; skipping" from Warn to Debug with an explanatory comment; no logic changes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[UpdateAppContext tick] --> B[Fetch chainParams from ZetaCore]
    B --> C{For each ChainParam}
    C --> D{IsSupported?}
    D -- No --> E[logger.Debug: 'skipping unsupported chain']
    D -- Yes --> F{IsZetaChain?}
    E --> C
    F -- Yes --> C
    F -- No --> G{Validate params}
    G -- Error --> H[logger.Warn: 'skipping invalid chain parameters']
    G -- OK --> I[Add to freshParams]
    H --> C
    I --> C
    C --> J[updateChainRegistry]
    J --> K{Chain list changed?}
    K -- Yes --> L[logger.Warn: 'chain list changed at runtime']
    K --> M{Each chain has ChainParams?}
    M -- Missing & not Zeta --> N[logger.Debug: 'chain does not have ChainParams; skipping']
    M --> O[Update registry]
Loading

Reviews (1): Last reviewed commit: "chore(zetaclient): demote ChainParams en..." | Re-trigger Greptile

Two log lines fire on every UpdateAppContext tick for every chain in
the registry, generating ~4M warns/week with no actionable signal:

- "skipping unsupported chain" (zetaclient/orchestrator/contextupdater.go)
- "chain does not have according ChainParams present; skipping"
  (zetaclient/context/app.go)

These are config-driven enumeration over a static chain list, not
runtime warnings. Demote both from Warn to Debug. Real warns
(mempool congestion, chain list changes at runtime, invalid chain
params with error) remain at Warn.

Expected impact: ~4M log lines/wk removed from Datadog ingestion.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@morde08 morde08 requested a review from a team as a code owner June 8, 2026 22:04
@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0a736b44-c117-4573-a85f-656a4bd328ed

📥 Commits

Reviewing files that changed from the base of the PR and between 9c796d6 and a0c9bf4.

📒 Files selected for processing (2)
  • zetaclient/context/app.go
  • zetaclient/orchestrator/contextupdater.go

📝 Walkthrough

Walkthrough

The PR downgrades two warning-level logs to debug level during chain registry updates and chain enumeration: missing freshChainParams for non-Zeta chains and skipped unsupported chains. Both occur regularly during normal operation and do not require operator action, so debug-level reporting is more appropriate.

Changes

Logging Level Adjustments

Layer / File(s) Summary
Chain update logging severity
zetaclient/context/app.go, zetaclient/orchestrator/contextupdater.go
Missing freshChainParams and unsupported chain skip events are logged at debug level instead of warning level, with an updated comment clarifying that these events occur frequently during repeated update ticks and are not actionable.

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: demoting log severity for ChainParams enumeration messages from Warn to Debug, which is the primary objective of this pull request.
Description check ✅ Passed The description provides comprehensive context including summary, rationale with quantified impact, and a concrete test plan with execution status. However, the description template's testing checklist section is not filled with standard checks.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/demote-chainparams-warn

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.

❤️ Share

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

@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
zetaclient/context/app.go 0.00% 1 Missing ⚠️
zetaclient/orchestrator/contextupdater.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@morde08 morde08 enabled auto-merge June 8, 2026 22:46
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