refactor: Simplify path selection#3870
Conversation
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3870/docs/iroh/ Last updated: 2026-02-17T14:15:54Z |
8f4f1f1 to
f2807e1
Compare
f2807e1 to
0c7a026
Compare
405fda6 to
c05c0e0
Compare
|
I like the structural idea, as well as the ability to expand the test coverage. What's missing to finish this @rklaehn ? |
Not much. I guess we can merge it as is, since it carefully tries to exactly replicate the existing logic while making things more generic, and then as a next step provide another 2 case enum in the public transport configuration API. That would happen in #3845 or in a subsequent PR to main. But it feels a bit silly to provide a bias API before adding custom transports. |
6976892 to
ebde742
Compare
…have data for it in the all_paths map.
41d3ec0 to
bb5058b
Compare
cc6b755 to
f32e6e1
Compare
Description
Fewer special cases in selection of the best path, in preparation to integrating user transports into path selection.
This should keep the current logic completey unchanged, but make it easier to add additional paths without a maze of special cases.
Implemented rules:
The purpose is to be able to integrate user transports more easily. Each user transport id would get a flag if it is considered available or backup (default backup?), and a rtt bias (default 0). Then you would add user transports to the selection process without any special cases.
I guess available or backup are not the right categories here. The meaning would be standard (a transport that has a theoretical chance to become the best transport) and fallback (a transport of last resort that you want to get rid of asap as soon as you have another option, regardless of rtt). E.g. a BLE transport would always be a fallback transport because available bandwidth is very limited regardless of rtt.
Breaking Changes
None
Notes & open questions
Change checklist
quic-rpciroh-gossipiroh-blobsdumbpipesendme