-
Notifications
You must be signed in to change notification settings - Fork 342
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 smart routing algorithm to select closest relay #6871
Fix smart routing algorithm to select closest relay #6871
Conversation
f995eee
to
4b856d7
Compare
77bdb03
to
b60f37d
Compare
ebccf37
to
c7e0ff9
Compare
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 11 of 12 files at r1, all commit messages.
Reviewable status: 11 of 12 files reviewed, 1 unresolved discussion (waiting on @rablador)
ios/MullvadREST/Relay/RelayPicking.swift
line 132 at r1 (raw file):
) } catch let error as NoRelaysSatisfyingConstraintsError where error.reason == .noDaitaRelaysFound { // If DAITA and smart routing are enabled and no supported relays are found, we should try to find the nearest
nit
Should we still refer to the feature as "Smart routing" ? 🤔
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.
Reviewable status: 11 of 12 files reviewed, 1 unresolved discussion (waiting on @buggmagnet)
ios/MullvadREST/Relay/RelayPicking.swift
line 132 at r1 (raw file):
Previously, buggmagnet wrote…
nit
Should we still refer to the feature as "Smart routing" ? 🤔
Nope!
c7e0ff9
to
3ce1b39
Compare
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 r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion
3ce1b39
to
a7b8c35
Compare
🚨 End to end tests failed. Please check the failed workflow run. |
Currently, smart routing picks a random DAITA relay. It should pick the closest relay using the haversine distance. It should group relays that are the same distance away and use the roulette wheel selection algorithm to pick one between the group of closest relays.
Also includes: update-the-relay-selector-wrapper-to-enable-smart-routing-ios-832
This change is