Skip to content

Peer MarkBad() for bad behavior #28

Closed

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().

Activity

  1. ebuchman commented on Mar 21, 2015

    @ebuchman
    Contributor

    We may want to consider adding some proof of work to each transaction as spam prevention, like it's supposed to be used for. Could go so far as having a required difficulty that the validators can vote to update in times of greater spam. Peers that don't do the proof of work can be flat out banned (we can tune the required proof of work to be approximately the cpu cycles not being used for tendermint protocol and tx processing since we're not running at capacity probably)

  2. added 2 commits that reference this issue on Jun 20, 2018
  3. added a commit that references this issue on Jun 21, 2018
  4. added a commit that references this issue on Dec 14, 2020
  5. added a commit that references this issue on Nov 23, 2022
    3abb245
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