-
Notifications
You must be signed in to change notification settings - Fork 235
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
[WIP] - Contacts, etc. #2242
Open
dr7ana
wants to merge
378
commits into
oxen-io:dev
Choose a base branch
from
dr7ana:contacts
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[WIP] - Contacts, etc. #2242
+37,433
−73,170
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- When receiving a request to fetch RouterID's, the remote endpoint fulfilling the request stores them in an unordered set. When the request caller receives that payload, it is loaded into a vector in the same order. However, we should just load it directly into an unordered set to enforce both the order and that none appear twice - The trust model will have to operate on multiple large lists of RouterID's and RC's efficiently, and maintaining a sort order ensures the values are workable immediately after deserialization
- initial/subsequent fetching combined for RouterContacts and RouterIDs - bootstraps fallback implemented and looped into fetch logic
- greedy evaluation of returned rid's, simplifying post-processing logic to simple frequency comparison per rid against a constant threshold - tidied up link_manager request/response handling - TODO: - review and decide thresholds - evaluate necessity and potential implementation of rc comparison
- bootstrap cooldown implemented with 1min timer in case all bootstraps fail - set comparison implemented in non-initial and non-bootstrap rc fetching; set comparison in rid fetching is done every fetch - nodedb get_random functions refactored into conditional/non-conditional methods. Conditional search implements reservoir sampling for one-pass accumulation of n random rcs
- disable reachability testing with config option; required to be done on testnet - reachability testing pipeline through link_manager executes pings similar to storage server. connection established hook reports successful reachability, while connection closed callback (with non-default error code) reports unsuccessful testing
- Once we have our set of returned rc's and accepted rid's (ones that were found locally), the remainder are placed in an "unconfirmed" state - Once there, they have five subsequent successful fetches to be found in request response, at which point their verification counter is incremented and their attempt counter is reset - If they appear three times, they are "promoted" and moved to our "known_{rid,rc}" list
- redoing link_manager functions again to implement previously ignored review comments on several PRs - conceptually merging "whitelist_routers" and new "known_{rids,rcs}", s.t. we can completely eliminate white/red/gray/green/etc lists in favor of something that isn't dumb
- Up and running locally, no connections yet - Next: flip testnet and do the gosh dang thing
- now pointing to jason/void-listen
- straightened out setting of public addr and public port in config vs listen ("bind") addr - fixed small bug in router contact writing and saving
Some of these were wrong (trying to use formats that didn't work); this updates them all to new-style logging.
This doesn't really have a purpose.
`deregister_peer` does the exact same thing as `close_connection` so just remove it. Also removes an unnecessary loop dispatch call (because we *have* to be in the logic thread already to be able to touch the variables we are touching before the dispatch).
- TODO: discuss authentication for nodes connecting to bootstrap seed - crit log num connected/RC's, conn open/closed, etc
- nodes now send their RC to the bootstrap seed on making a request - allows the bootstrap seed to distribute RCs
We are reinterpret_cast'ing the version to a string to send it as raw bytes, but it was sending \x00\x00\x09 instead of \x00\x09\x0a because the version constant was actually a uint16_t array. This just makes the version constant a uint8_t array instead so that it works (and I am not at all worried about any version component getting larger than 255).
9a6445a
to
c8c54c4
Compare
1e74439
to
9cc7efd
Compare
- unified under session_path_interface pure virtual class
0ec41c0
to
efc30d1
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.