Skip to content

dash-spv: a configured peer rejected for missing services fails silently and is redialed forever #1241

Open

Description

@xdustinface

All paths are under dash-spv/src/ at 8dde9d0c (dev after #902).

network/manager.rs:229-240 requires NETWORK, plus COMPACT_FILTERS when filters are on and BLOOM when mempool tracking is on, for every peer including configured ones. network/peer.rs:350-361 drops a peer that lacks one, and network/manager.rs:843 records it as Ban::DialFailed, which the configured-peer exemption (network/bans.rs:34) does not cover. The peer is retried with a backoff up to 60s forever, and nothing reaches the client or the FFI beyond a warn! log line. Before #902, exclusive mode required ServiceFlags::NONE.

Evidence. By code reading. Dash Core advertises NODE_COMPACT_FILTERS only with -peerblockfilters and -blockfilterindex (init.cpp:1243-1248), and NODE_BLOOM by default. With filters on, the old code also failed against a non-filter node (Core disconnects on getcfheaders, net_processing.cpp:3466-3471), so that case is not new. These cases worked before #902 and now give zero peers:

  • a pinned pruned node, which advertises NETWORK_LIMITED instead of NETWORK
  • a pinned node with -peerbloomfilters=0 while mempool tracking is on

Fix. Accept NETWORK_LIMITED and skip the BLOOM requirement for configured peers where the features allow it, and surface a rejected configured peer as an error event to the client and FFI.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions