-
Notifications
You must be signed in to change notification settings - Fork 292
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
fix: DHTBootstrap should always respond to version packets with toxcore version #2354
fix: DHTBootstrap should always respond to version packets with toxcore version #2354
Conversation
I'd say that it's good that it reports "1" as the version. While DHTBootstrap is fine for local testing purposes, we don't want people use DHTBootstrap for hosting real bootstrap nodes, as it doesn't even offer TCP relay server service. With the version being "1" it's easy to detect someone running DHTBootstrap whenever someone submits a node to nodes.tox.chat and ask them to switch to using tox-bootstrapd instead, as that is what we want everyone to run. |
Oh, I see it does support the relay server now. I guess it has been a while since I have looked into DHTBootstrap's code. |
@nurupo I have people asking me frequently on how to host the bootstrap node on windows. I'd assume we can support the windows version since it works properly with the correct arguments passed. And yes, it does support all the basic stuff now. I'm writing a doc for toxcore on the proper steps to take in order to setup a bootstrap node and telling people that they can't use windows is a bit weird. If you think there is no reason to do any of it then let me know. |
Yep, the only reason to use DHTBootstrap is either for testing or if you are on Windows, as tox-bootstrapd is UNIX-only. I wonder if there is a similar issue with the maximum number of sockets open on Windows that tox-bootstrapd resolves by increasing the file descriptor limit. DHTBootstrap is not very battle-tested, especially on Windows, we treated it mostly as a toy bootstrap node for testing purposes, so I wouldn't be surprised if there are issues like these that pop up.
Something like this? https://wiki.tox.chat/users/runningnodes Also, note that there is already a document describing how to setup tox-bootstrapd, so just pointing to that document should be enough, no need to duplicate the same information in multiple places that might get out of sync over time. |
Should be |
excerpt form stackoverflow:
this means yes, you can only serve 512 simultaneously. or worse, with the "handshake done, no data sent" /attack/ it would be 512-256=256 edit: but it might not be as bad?
|
Just to reiterate, I'm not opposed to this PR, it's blocked only by this off-by-one error and GitHub checks / CI build failures. Well, it is not technically an error, as sending a 0 length string should be allowed, it's that everything: DHTBootstrap and tox-bootstrapd, always sent a 1-length null string for an empty string, so I'm just wary of unnecessary breaking anything that might rely on this behavior when reading the packet. |
Tha can you fix #2330 while you're in there; only a couple of lines in the README (not INSTALL). Thanks. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2354 +/- ##
==========================================
+ Coverage 74.46% 74.48% +0.02%
==========================================
Files 87 87
Lines 26211 26211
==========================================
+ Hits 19517 19523 +6
+ Misses 6694 6688 -6 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, 1 of 1 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: complete! 1 change requests, 1 of 1 approvals obtained (waiting on @Tha14)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r4, all commit messages.
Reviewable status: complete! 1 of 1 approvals obtained (waiting on @Tha14)
The current implementation does not allow responding to bootstrap node packets which results in some of the nodes in nodes.tox.chat to not have a version. This also means that we do not know which of those nodes are actually up-to-date and which are not, making things complicated when it comes to contacting the server owners.
This change is