Skip to content

Peer MarkBad() for bad behavior #28

@jaekwon

Description

@jaekwon

In the various reactors (consensus/pex/mempool etc), bad behavior should be reported and eventually trickle to the addrbook somehow and call MarkBad() so we know not to dial the peer again. Or not to dial the peer again for a while. Not sure what the addrbook does but we should make sure the behavior is reasonable.

We should discuss the overall strategy of peer ethics before hastily disconnecting/banning nodes (or even being too lenient) because it could cause the network to fragment. Maybe we should err on the side of being lenient (and suffer some spam)?

In any case we should keep a good record of things so when things change (e.g. a peer is marked bad, banned, etc) we know how to debug it. It could be as simple as a log.Info().

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