Skip to content

bug: RPCStream initSubscriptions panics on CometBFT subscribe failure, crashing node #1037

@Aboudjem

Description

@Aboudjem

Bug Description

In rpc/stream/rpc.go, initSubscriptions() uses panic(err) when CometBFT event subscription fails (lines ~91, ~99). Any transient CometBFT connectivity issue crashes the entire RPC process instead of degrading gracefully.

Impact

  • Network blips, slow starts, or reconnection attempts crash the node permanently
  • The node must be manually restarted
  • Subscription streams are called lazily via HeaderStream()/LogStream(), so the panic can happen at any time

Proposed Fix

Replace panic(err) with s.logger.Error(...) + return. Streams are allocated before subscribe, so callers get non-nil empty streams that degrade gracefully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions