rolling-shutter
rolling-shutter copied to clipboard
Integrate libp2p's Kademlia for peer discovery
Instead of hardcoding the set of addresses we try to connect to, use Kademlia for peer discovery. The config should still contain a set of nodes to connect to initially if we don't know any other peers yet.
Ideally, we can also whitelist peers by libp2p peer id, but it can also be done separately.
I still do not get why the group of keypers cannot be bothered to coordinate and maintain a list of machines that they do run. Is it too much work to ask for, or do we expect them to stay anonymous?
I think it's too much work for them. We should make it as easy as reasonably possible to use our software. I see in general two UX problems with a list (maintained, say, in a git repo). First of all, setting up a keyper would be a two step process:
- initialize keyper, submit multiaddr to the list
- copy and paste the multiaddr list to the config file and start the keyper
Step 2 could only be done after all other nodes submitted their address (and, let's face it, some will miss the deadline and they'd be out).
The second problem is updating it: Whenever a keyper gets a new IP, they'd have to
- realize that there's a problem
- update the list
- convince at least some and ideally all other keypers to update their list and restart their nodes
Similarly if a new keyper joins the set.
I don't think that's practical.
Having an explicit list, would have allowed them to firewall off non-keyper addresses. It's how I would have tried to run the system and IIRC it's also what the tendermint documentation suggests to do. If possible I would have tried to run this in a VPN, though I'm not sure if there is a viable solution for that.
Anyway, I'm also fine with not doing all of that and exposing every service to the public internet.
Having an explicit list, would have allowed them to firewall off non-keyper addresses.
Using Kademlia doesn't rule out a whitelist, I mentioned it above too. But the whitelist shouldn't be based on physical addresses.
it's also what the tendermint documentation suggests to do.
We don't have an explicit list for shuttermint either.
Anyway, I'm also fine with not doing all of that and exposing every service to the public internet.
We already talked about alternatives, a bootstrap node was one. I'm open to other suggestions, but as discussed I don't think we should require all nodes to configure IP addresses.
Using Kademlia doesn't rule out a whitelist, I mentioned it above too. But the whitelist shouldn't be based on physical addresses.
Using a firewall doesn't rule out a whitelist of p2p identities. It operates at a different level of the stack.
We don't have an explicit list for shuttermint either.
Yes, right. They recommend the VPC setup as a way to mitigate DDOS attack. We will also not have this.
done