Skip to content

BEP Idea: Support Tendermint's ability to filter (block) peers/nodes #79

@ttmc

Description

@ttmc

A user recently asked how to totally remove a peer/node, i.e. not just set its voting power to zero. Of course you can use a firewall or similar to do that, but the user meant at the Tendermint level. Below is what I learned so far.

I asked on a private Tendermint dev channel, "Is there a way to totally remove a node from a network, rather than changing its power to 0?" The response was a link to this bit of code:

https://github.com/tendermint/tendermint/blob/9e940b95ad4d27efab60d0d49278db5acb2a3b7e/node/node.go#L324-L349

From that, I was able to figure out that it's possible, in some sense, but not documented. You have to do two things:

  1. In config.toml, set filter_peers = true

  2. In your ABCI proxy app (such as BigchainDB Server), you have to implement a response to ABCI "Query" requests to the path:

    "/p2p/filter/addr/ip:port"

    where ip:port is the address of the peer in question. A path of the form:

    "/p2p/filter/id/pubkey"

    is also possible.

    The response from the ABCI proxy app (BigchainDB Server) tells Tendermint whether or not it's OK to add that peer.

    I'm not sure what happens if BigchainDB Server starts responding "not OK" once a peer has already been added. Maybe the query is only done when a new peer is being added?

This is an undocumented feature and the source code has the delightful comment:

	// XXX: Query format subject to change

Metadata

Metadata

Assignees

No one assigned

    Labels

    BEP ideaAn idea for a new BEP, seeking feedback

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions