[tor-dev] Meeting about the new guard algorithm proposal (prop259)
Reinaldo de Souza Jr
rjunior at thoughtworks.com
Fri Mar 18 20:03:01 UTC 2016
Another thing I'm interested in is how the proposed algorithm structure
fits into current tor code. The proposed algorithm is:
context = ALGO_CHOOSE_ENTRY_GUARD_START(...)
entryGuard = ALGO_CHOOSE_ENTRY_GUARD_NEXT(context)
circuit = composeCircuitAndConnect(entryGuard)
if not SHOULD_CONTINUE(isSuccessful(circuit)):
I'd like to have ideas of current tor functions with similar purposes.
This is the correlation I was able to find by reading the source code:
Seems to be equivalent to circuit_establish_circuit()
b) while True:
Seems to be equivalent to onion_populate_cpath(). It even has a
"timeout" after 32 tries!
Seems to be equivalent to choose_good_entry_server() as used in
This is the most uncertain to me. It seems to be circuit_handle_first_hop().
The issue is: we rely on `unreachable_since` being updated in case we
fail to connect to the guard before the next call to (c). In current tor
code, this is done by entry_guard_register_connect_status() but I got
lost tracking when it happens.
circuit_mark_for_close_() seems to be called when
circuit_handle_first_hop() fails but it's unclear to me if
entry_guard_register_connect_status() will ever be called as part of
circuit_mark_for_close_() - and if there is any guarantee it will be
called before the next invocation of onion_extend_cpath().
This is also tricky. If onion_extend_cpath() is our loop, this is
supposed to break it in some case.
It is very similar to how entry_guard_register_connect_status() is used
in channel_do_open_actions(). But similarly to
entry_guard_register_connect_status(), I'm also unsure if
channel_do_open_actions() is called as part of onion_extend_cpath().
It could be entry_guard_register_connect_status().
Sorry for such a dense email. I'm trying to make an informed decision
before following my gut seeing how it breaks.
If there is any technique or call graph tool you find useful to get such
information, it would be much appreciated.
*Reinaldo de Souza Jr* | Software Developer
GPG: E0FD 0487 5CAC 4200 EF25 098A 9FA3 789F 0615 5999
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 455 bytes
Desc: OpenPGP digital signature
More information about the tor-dev