Skip to content

logging: clearer chain-provider startup summary and backend tags#364

Merged
anderdc merged 3 commits into
testfrom
chore/clear-provider-logging
May 21, 2026
Merged

logging: clearer chain-provider startup summary and backend tags#364
anderdc merged 3 commits into
testfrom
chore/clear-provider-logging

Conversation

@LandynDev
Copy link
Copy Markdown
Collaborator

What

Make validator/miner chain-provider logging legible: a one-time startup summary of which API each provider talks to, and consistent backend tags on the RPC/verify path so it's clear who served a call.

Why

Today the backend in use is scattered across ad-hoc inline prefixes (BTC RPC ..., BTC Esplora: ..., TAO scan: ...) and there's no single "here's the lineup" line at load. Hard to tell at a glance which API a node is using or which Esplora host served a given lookup.

Changes

  • Startup summary (create_chain_providers, on check=True): logs each provider and its backend once, e.g.
    Chain providers ready:
      btc → Core RPC http://localhost:8332 (primary) + Esplora fallback: blockstream.info, mempool.space
      tao → Subtensor wss://entrypoint-finney…:443
    
    Driven by a new describe() on ChainProvider (default = chain name; overridden by BTC/TAO).
  • Backend tags on the verify + RPC-call path: [BTC-RPC], [Esplora], [Subtensor] (module constants, defined once).
  • Short host tags in Esplora failover narration — full URLs replaced with a compact registrable label so repeated lines don't pollute:
    Esplora [1/2] gomaestro-api/tx/9f3a…0f1a → rate-limited (429); falling back to: blockstream
    Esplora [2/2] blockstream/tx/9f3a…0f1a → 200 (served after 1 fallback(s))
    

Scope

Limited to the transaction-verification / RPC-call path — the "which API served this" story. Send/sign/address/fee log lines are intentionally untouched. No behavior changes; logging strings only. Full base URL is still preserved inside the raised HTTPError for deep debugging.

Test

ruff format + ruff check pass; package compiles. No tests assert on the changed log strings.

@anderdc anderdc merged commit 8e254be into test May 21, 2026
3 checks passed
@anderdc anderdc deleted the chore/clear-provider-logging branch May 21, 2026 17:13
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