-
Notifications
You must be signed in to change notification settings - Fork 110
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
Notes on Peer Sourcing #6675
Comments
Here's a summary of the actions we could take to improve seed peers, these changes will help make Zebra more robust to DNS and network attacks:
Which of these changes are the most important? Which should we do before the stable release? |
Hey team! Please add your planning poker estimate with Zenhub @arya2 @conradoplg @upbqdn @teor2345 @dconnolly |
@mpguerra I can't estimate this PR until we decide which changes we're going to make. Some of these changes should probably have their own tickets. |
We have a ticket for one of these changes already: And an older ticket with a bunch of similar suggestions: |
|
I think we've finished everything we're going to do here for now. This audit item was partially fixed and partially accepted as a risk. |
Motivation
We want to make Zebra's peers more robust and distributed:
Auditor Comments
When a peer initially connects to the network, they start by sourcing peers from a list of known-good mainnet peers. The default list is specified in code in
zebra/zebra-network/src/config.rs
, although users can override it by generating and editing azebrad.toml
config file.zebra/zebra-network/src/config.rs
Lines 277 to 282 in c76d1f5
The use of a variety of trusted introduction points with distinctive, easily recognized names is considered a best practice. However, taken together, these endpoints do represent a degree of centralization in the network infrastructure. While users technically can change or extend this list, it is doubtful that many of them will.
Additionally, changes to the default list would not be propagated to any user who has made local modifications. One could imagine a case where one of the default mainnet peers is compromised, loses trust, and is removed from the list, but peers who edited their configuration to extend this list fail to receive this change and continue connecting to a malicious peer.
Scenarios such as this one could be mitigated by decomposing the default mainnet peer list into two lists: one, the “officially sanctioned” default list, which users technically could edit but are not expected to, and another, which may default to an empty list, which is intended to contain any additional peers a user may wish to use by default. This would simplify peer list maintenance, leading to better user experience and maintainability. It could also act as a subtle encouragement for peers to diversify their set of introduction points, which would be good for network health and resilience (as long as users vet any new introduction points to their satisfaction out-of-band).
As a further improvement, the degree of centralization could be reduced by following a practice commonly seen in other peer-to-peer systems, e.g., torrent clients, where the client will attempt, on startup, to reconnect to whoever it was connected to before it last exited the network. The initial mainnet peers can be used as well, and should probably be preferred*, but they are no longer treated as an exclusive source of truth± regarding the peer-to-peer network.
*When considering attacks at the level of the routing overlay, we can assume that malicious peers will only refer us to other malicious peers, whereas honest peers may refer us to either a malicious or an honest peer. Thus, even if we trust our introduction point, this trust is not fully transitive, and our trust in other peers should be inversely correlated to the number of routing hops required to reach them - although of course this level of trust cannot be precisely quantified in general. What we can say in general is that even if our introduction points are not exclusively trusted, they are likely the
most trusted peers we have.
±Slight caveat: the default peers likely - though not necessarily, if we’ve modified the peer list - gave us our original introduction to these cached peers (either directly or by introducing their introducers, etc). Therefore there is still a great deal of trust placed in these introduction points; the improvement here is that we have to extend this trust for a shorter time window.
The text was updated successfully, but these errors were encountered: