[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #32088 [Core Tor/Tor]: Proposal 308 - choose guards in sampled order (was: Proposal 271 - straightforward improvements)



#32088: Proposal 308 - choose guards in sampled order
--------------------------------------+------------------------------------
 Reporter:  Jaym                      |          Owner:  (none)
     Type:  enhancement               |         Status:  reopened
 Priority:  Medium                    |      Milestone:  Tor: 0.4.4.x-final
Component:  Core Tor/Tor              |        Version:
 Severity:  Normal                    |     Resolution:
 Keywords:  tor-spec prop271 prop308  |  Actual Points:
Parent ID:                            |         Points:
 Reviewer:  nickm                     |        Sponsor:
--------------------------------------+------------------------------------
Changes (by teor):

 * status:  closed => reopened
 * priority:  High => Medium
 * milestone:  Tor: 0.4.3.x-final => Tor: 0.4.4.x-final
 * keywords:  tor-spec prop271 => tor-spec prop271 prop308
 * resolution:  implemented =>


Comment:

 I did a small review on this code.

 I've looked at entry_guard_parse_from_state(), and I can't work out where
 we create a dense set of indexes on load. (But I can see where we do it on
 save.)

 Creating a dense set of indexes on load is important, because qsort() is
 not stable. Therefore, the first time a legacy state is loaded, the guards
 will be sorted in arbitrary order. And the order may change, every time
 the sort is performed.

 I also wonder if we need to sort the guard list every time we select a
 guard. Instead, can we keep the list sorted when we add or delete guards?
 Appending guards to the end of the list is just smartlist_add(). We have
 the smartlist_del_keeporder() to remove guards from the list.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/32088#comment:11>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs