[tor-bugs] #23094 [Core Tor/Tor]: prop224: Optimize hsdir_index calculation

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Apr 29 02:18:46 UTC 2018


#23094: prop224: Optimize hsdir_index calculation
-------------------------------------------------+-------------------------
 Reporter:  asn                                  |          Owner:  neel
     Type:  enhancement                          |         Status:
                                                 |  merge_ready
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.3.4.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tor-hs, prop224, prop224-extra,      |  Actual Points:
  032-unreached                                  |
Parent ID:                                       |         Points:  1
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------
Changes (by teor):

 * status:  needs_review => merge_ready


Comment:

 Replying to [ticket:23094 asn]:
 > Let's include `hsdir_index_t` in the node_t instead of a pointer that we
 allocate, since that structure is always present anyway.
 >
 > See here for more details:
 > https://oniongit.eu/dgoulet/tor/merge_requests/6#note_412

 This is implemented in https://github.com/neelchauhan/tor/tree/b23094 and
 is ready to merge.

 Replying to [comment:3 asn]:
 > After our #23387 refactoring of hsdir index logic Nick suggested that we
 don't need to keep all 3 around in memory, since two of them are always
 identical:
 > https://oniongit.eu/asn/tor/merge_requests/6#note_1201

 Removing hsdir_index_t.fetch is not implemented.
 We need to:
 * analyse the state machine of fetch, store_first, and store_second to
 make sure that fetch is always equal to store_first or store_second
 * work out the condition that we can use to select betweeen store_first or
 store_second when we want fetch
 * write a function that produces fetch from a hsdir_index_t, and use it
 instead of fetch

 We can do this in a separate ticket if you'd like to merge just the first
 patch. They are independent. And integers are cheap.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23094#comment:9>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list