Skip to content

wallet: /monitoring page surfaces 'RPC 400' fatal error on validator-set returning code 29 (no validators in the set) #431

Description

@kaelabbott

Summary

/monitoring page renders a generic "Monitoring Error RPC 400" when /v1/query/validator-set returns code: 29 — there are no validators in the set. For chains with no staked committee validators (e.g. single-validator deployments) this is the normal/expected response, not an error worth surfacing as a fatal monitoring failure.

Repro

  • Single-validator chain, healthy + producing blocks
  • Open /monitoring page in the canopy wallet UI

Observed

  • Page renders a red box: "Monitoring Error — RPC 400"
  • Network panel shows /v1/query/validator-set returning HTTP 400 with:
    {
      "code": 29,
      "module": "main",
      "msg": "there are no validators in the set"
    }
  • Other RPC calls succeed (height, params, consensus-info, peer-info, resource-usage, log all 200)

Expected

The monitoring page should:

  1. Detect code: 29 (ErrNoValidators) specifically
  2. Render gracefully (e.g. "No committee validators staked yet" or "Single-validator chain — committee empty")
  3. Continue showing the rest of the monitoring data that DID load

Root cause

  • Server: lib/error.go → ErrNoValidators() (HTTP 400, code 29) — this is the canonical response, expected when the committee has 0 staked validators
  • Wallet: cmd/rpc/web/wallet/public/plugin/canopy/chain.json defines validatorSet query but doesn't appear to special-case the empty/zero-validators response

Suggested fix

In the wallet's monitoring page renderer, treat code: 29 from /v1/query/validator-set as a non-fatal state and show an empty/zero-validators panel instead of the generic error box.

Reproduction details

  • Chain: universal-databases-98799, chain_id 243
  • Pod image: canonical-v6 (rebuilt today from RichardJamesLopez/canopy@e1d9ee47)
  • Wallet host: data-wallet.val-a.grad.dev.app.canopynetwork.org
  • Reproduced via curl with payloads {}, {"height":0}, {"chainId":98799}, {"id":98799}, {"id":98799,"height":50000} — all return the same 400/code:29

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions