- Truncate descriptions
Activity
Trac:
Description: On their review for legacy/trac#25691 (moved), teor notes (about for_direct_connect):We should pass for_direct_conn into this function, and use node_has_preferred_descriptor().
For the mid and exit case: We won't bootstrap unless we have enough actual mid and exit bandwidth, even if we have mids or exits listed as our bridges.
For the guard case: The guard case is unchanged for non-bridge clients.
The bridge client case could be tricky, because:
- compute_frac_paths_available() only checks guard-flagged nodes, not bridges
- even if it did check bridges, they don't have bandwidths
- even if we used a weight of 1 for each bridge, we don't require 65% of bridges to be up to bootstrap
To workaround this issue, I suggest we make f_guard = 1.0 in compute_frac_paths_available() if we are using bridges, and have at least one bridge with the preferred descriptor.
to
On their review for legacy/trac#25691 (moved), teor notes (about for_direct_connect):
We should pass for_direct_conn into this function, and use node_has_preferred_descriptor().
For the mid and exit case: We won't bootstrap unless we have enough actual mid and exit bandwidth, even if we have mids or exits listed as our bridges.
For the guard case: The guard case is unchanged for non-bridge clients.
The bridge client case could be tricky, because:
- compute_frac_paths_available() only checks guard-flagged nodes, not bridges
- even if it did check bridges, they don't have bandwidths
- even if we used a weight of 1 for each bridge, we don't require 65% of bridges to be up to bootstrap
To workaround this issue, I suggest we make f_guard = 1.0 in compute_frac_paths_available() if we are using bridges, and have at least one bridge with
the preferreda full descriptor.Edit: bridge clients always use full descriptors for bridges
I am interested in this ticket. However, I have a question:
When I add
for_direct_conn
infrac_nodes_with_descriptors()
, should I replace instances ofnode_has_any_descriptor()
withnode_has_preferred_descriptor()
and pass infor_direct_conn
(and modifying instances forfrac_nodes_with_descriptors()
to addfor_direct_conn
)? Is there more that I need to do?Trac:
Status: new to assigned
Cc: teor to teor, neel@neelc.org
Owner: N/A to neelYou also need to rewrite the guard weights when the client is using bridges:
Replying to nickm:
For the guard case: The guard case is unchanged for non-bridge clients.
The bridge client case could be tricky, because:
- compute_frac_paths_available() only checks guard-flagged nodes, not bridges
- even if it did check bridges, they
don't have bandwidthsonly have self-measured bandwidths - even if we used a weight of 1 for each bridge, we don't require 65% of bridges to be up to bootstrap
To workaround this issue, I suggest we make f_guard = 1.0 in compute_frac_paths_available() if we are using bridges, and have at least one bridge with
the preferreda full descriptor.Edit: bridge clients always use full descriptors for bridges Edit: bridges have self-measured bandwidths
Trac:
Description: On their review for legacy/trac#25691 (moved), teor notes (about for_direct_connect):We should pass for_direct_conn into this function, and use node_has_preferred_descriptor().
For the mid and exit case: We won't bootstrap unless we have enough actual mid and exit bandwidth, even if we have mids or exits listed as our bridges.
For the guard case: The guard case is unchanged for non-bridge clients.
The bridge client case could be tricky, because:
- compute_frac_paths_available() only checks guard-flagged nodes, not bridges
- even if it did check bridges, they don't have bandwidths
- even if we used a weight of 1 for each bridge, we don't require 65% of bridges to be up to bootstrap
To workaround this issue, I suggest we make f_guard = 1.0 in compute_frac_paths_available() if we are using bridges, and have at least one bridge with
the preferreda full descriptor.Edit: bridge clients always use full descriptors for bridges
to
On their review for legacy/trac#25691 (moved), teor notes (about for_direct_connect):
We should pass for_direct_conn into this function, and use node_has_preferred_descriptor().
For the mid and exit case: We won't bootstrap unless we have enough actual mid and exit bandwidth, even if we have mids or exits listed as our bridges.
For the guard case: The guard case is unchanged for non-bridge clients.
The bridge client case could be tricky, because:
- compute_frac_paths_available() only checks guard-flagged nodes, not bridges
- even if it did check bridges, they
don't have bandwidthsonly have self-measured bandwidths - even if we used a weight of 1 for each bridge, we don't require 65% of bridges to be up to bootstrap
To workaround this issue, I suggest we make f_guard = 1.0 in compute_frac_paths_available() if we are using bridges, and have at least one bridge with
the preferreda full descriptor.Edit: bridge clients always use full descriptors for bridges Edit: bridges have self-measured bandwidths
Keywords: N/A deleted, tor-bridge-client, bootstrap, tor-guard added
Milestone: Tor: unspecified to Tor: 0.3.5.x-finalMy GitHub branch is here: https://github.com/neelchauhan/tor/tree/b25886
CI passes.
I have a pull request here: https://github.com/torproject/tor/pull/139
I did not include the lines for automatically returning 1.0 on a bridge if we have a preferred descriptor in
frac_nodes_with_descriptors()
but you (dgoulet) questioned it hence the reason why it's not here. If you want it I can add another commit and/or create a new branch.So the code makes sense here but I want to come back
f_guard
workardoun originally proposed by teor.This branch is missing it and I'm not even sure where it should go... Seems it could be in
compute_frac_paths_available
where we make that function "bridge aware" somehow. The hack infrac_nodes_with_descriptors()
doesn't seem very appealing to me.I'm not sure how to proceed next neel. I'll point this out to teor.
I have made the changes in a new GitHub PR: https://github.com/torproject/tor/pull/145
This sets
f_guard
to 1.0 on bridges by checking ifUseBridges
is set and if the originalf_guard
is greater than 0 incompute_frac_paths_available()
. I do understand that this may not be a perfect solution, and may also be rejected, but it is an alternative (that I thought of) to putting a ugly hack infrac_nodes_with_descriptors()
that dgoulet had mentioned.Replying to neel:
I have made the changes in a new GitHub PR: https://github.com/torproject/tor/pull/145
This sets
f_guard
to 1.0 on bridges by checking ifUseBridges
is set and if the originalf_guard
is greater than 0 incompute_frac_paths_available()
. I do understand that this may not be a perfect solution, and may also be rejected, but it is an alternative (that I thought of) to putting a ugly hack infrac_nodes_with_descriptors()
that dgoulet had mentioned.We can't check if f_guard is non-zero, because most bridges don't have the guard flag.
I suggest we make f_guard = 1.0 in compute_frac_paths_available() if we are using bridges, and have at least one bridge with
the preferreda full descriptor.Instead, we need to check the number of bridges with full descriptors. There is an existing function in bridges.h that does this check.
Thank you for your response.
I don't fully know what a "full descriptor" is. Does this mean that for bridges:
- We have
node->ri
only? (based onnode_has_preferred_descriptor()
) - We have
node->ri
,node->rs
, andnode->md
? (I am guessing this one)
Also, I did not see any function in
bridges.h
which directly checks for full descriptors (or didn't see them if they were unobvious).The closest thing I saw were functions which get a list of bridges (
bridge_list_get()
) so then I get aSMARTLIST
, and in each iteration get anode_t
from thebridge_info_t
and check for a full descriptor. Should I do this? If not, which function should I use?- We have
Replying to neel:
Thank you for your response.
I don't fully know what a "full descriptor" is.
A router descriptor, rather than a microdescriptor: https://gitweb.torproject.org/torspec.git/tree/dir-spec.txt#n151
Does this mean that for bridges:
- We have
node->ri
only? (based onnode_has_preferred_descriptor()
)
ri (router info) is used to store router descriptors.
- We have
node->ri
,node->rs
, andnode->md
? (I am guessing this one)
Bridges don't have rs (router status) or md (microdescriptor), because bridges are not in the consensus.
Also, I did not see any function in
bridges.h
which directly checks for full descriptors (or didn't see them if they were unobvious).The closest thing I saw were functions which get a list of bridges (
bridge_list_get()
) so then I get aSMARTLIST
, and in each iteration get anode_t
from thebridge_info_t
and check for a full descriptor. Should I do this? If not, which function should I use?num_bridges_usable(0) > 0
, which is actually in entrynodes.h : https://github.com/torproject/tor/blob/5edc72a45b7479f5fe791054aa19f6b3b478c725/src/or/entrynodes.c#L3149- We have
Thank you for the information.
My new PR is here: https://github.com/torproject/tor/pull/153