Skip to content

Ensure we have sufficient transaction-relay peers #16418

@sdaftuar

Description

@sdaftuar

Currently, we have no protections in place if our outbound peers are running in -blocksonly mode. In practice, we rely on our outbound peers to be our best source of announced transactions, but if all our outbound peers were -blocksonly, we would make no effort to disconnect any to find an alternative peer to receive transactions from.

We discover at connection time (in the VERSION message) whether our peer will relay transactions on our link. Perhaps we should tolerate some number of -blocksonly peers as outbounds, and once we hit that threshold we should disconnect new blocksonly outbounds?

I suppose another issue could be if it's worth having logic that tries to determine whether a peer is silently withholding transactions from us... We have logic for blocks, where we try to find a new outbound peer if we haven't received a new block in a while, but I don't know if there's a reasonable way to do this for transactions. My guess is that this is not a very pressing concern, but perhaps we could do something that just tried making new outbound connections if we aren't receiving any transactions at all?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions