bigchaindb / bigchaindb/BEPs

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

Open
#79 1 comment 0 reactions 0 assignees View on GitHub
BEP idea
Dominant language
Shell
Stars
33
Forks
24
PR merge metrics
No merged PRs in 30d

Description

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](https://tendermint.com/docs/app-dev/abci-spec.html#request-response-messages)" 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:

```golang
// XXX: Query format subject to change
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked node/node.go section and the config.toml filter_peers setting, then review the ABCI Query paths /p2p/filter/addr/ip:port and /p2p/filter/id/pubkey. Clarify whether filtering is checked only when peers are added and define the expected behavior before writing a BEP or implementation plan.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.