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

Don't add inbound peers to the Routing Table till we've finished bootstrapping #652

Open
aarshkshah1992 opened this issue May 21, 2020 · 1 comment
Assignees

Comments

@aarshkshah1992
Copy link
Contributor

aarshkshah1992 commented May 21, 2020

We should NOT add remote peers who make inbound connections to us to the Routing Table till we've refreshed/bootstrapped our Routing Table ATLEAST once upon startup.
This will prevent malicious peers from connecting to us en-masse upon startup and hijacking our Routing Table.

Also, if we ever detect an empty Routing Table, we should again disallow inbound peers till we've bootstrapped the DHT.

ping @Stebalien @aschmahmann.

@aarshkshah1992 aarshkshah1992 self-assigned this May 21, 2020
@aarshkshah1992 aarshkshah1992 changed the title Dont add inbound peers to the Routing Table till we've finished bootstrapping Don't add inbound peers to the Routing Table till we've finished bootstrapping May 21, 2020
@aschmahmann
Copy link
Contributor

Shouldn't hurt, but I'm not sure how much this will really help us especially once we land the persistent routing table snapshotting + restoring.

The case of "if we ever detect an empty Routing Table" is also sort of flaky. what if my internet connection dies, but I'm still attached to a single peer on my local network? Over time if they are in DHT auto mode perhaps they'll switch into client mode and so my routing table will empty, but otherwise (e.g. multiple infrastructure servers that have been configured to server mode) they'll allow inbound connections as soon as they're online again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants