Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ttmc opened this issue Sep 4, 2018 · 1 comment
Open
Labels
BEP idea An idea for a new BEP, seeking feedback

Comments

@ttmc
Copy link
Contributor

ttmc commented Sep 4, 2018

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
@ttmc ttmc added the BEP idea An idea for a new BEP, seeking feedback label Sep 4, 2018
@ttmc
Copy link
Contributor Author

ttmc commented Sep 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BEP idea An idea for a new BEP, seeking feedback
Projects
None yet
Development

No branches or pull requests

1 participant