From bfb33ffd88ad24452bed9b53975249c05bf72b2f Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 30 Nov 2016 09:08:54 -0500 Subject: 271: Rewrite sec 3.9 for clarity; include per-circuit restrictions --- proposals/271-another-guard-selection.txt | 32 ++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) (limited to 'proposals/271-another-guard-selection.txt') diff --git a/proposals/271-another-guard-selection.txt b/proposals/271-another-guard-selection.txt index b38c289..87ba960 100644 --- a/proposals/271-another-guard-selection.txt +++ b/proposals/271-another-guard-selection.txt @@ -449,6 +449,12 @@ Status: Open We update the {last_tried_connect} time for the guard to 'now.' + In some cases (for example, when we need a certain directory feature, + or when we need to avoid using a certain exit as a guard), we need to + restrict the guards that we use for a single circuit. When this happens, we + remember the restrictions that applied when choosing the guard for + that circuit, since we will need them later (see [UPDATE_WAITING].). + ** Rationale ** We're getting to the core of the algorithm here. Our main goals are to @@ -529,17 +535,21 @@ Status: Open circuit might be ready to be called . - * If any circuit is , and every - circuit with an {is_pending} guard having higher priority has been - in state for at least - {NONPRIMARY_GUARD_CONNECT_TIMEOUT} seconds, and all primary - guards have reachable status of , then call that circuit - . - - * If any circuit is , then do not use any - or circuits - circuits whose guards have lower priority. (Time them out - after a {NONPRIMARY_GUARD_IDLE_TIMEOUT} seconds.) + * If any circuit C1 is , AND: + * All primary guards have reachable status of . + * There is no circuit C2 that "blocks" C1. + Then, upgrade C1 to . + + * If any circuit stays is + for more than {NONPRIMARY_GUARD_IDLE_TIMEOUT} seconds, + time it out. + + Definition: In the algorithm above, C2 "blocks" C1 if: + * C2 obeys all the restrictions that C1 had to obey, AND + * C2 has higher priority than C1, AND + * Either C2 is , or C2 is , + or C2 has been for no more than + {NONPRIMARY_GUARD_CONNECT_TIMEOUT} seconds. **Rationale** -- cgit v1.2.3-54-g00ecf