Add missing controller events so we can link every step of the HS dance
For Sponsor R, we'd like to be able to collect async control events on a Tor client with
setevents circ stream circ_minor hs_desc, log the raw output to file, and then later reconstruct the HS dance from that file to analyze performance/scalability problems. There is some missing information in these events that prevents us from fully reconstructing the dance.
- Cannot link
HS_DESCevents to the stream used to perform the lookup. The stream used for the lookup will go to a
$XXX.exitand will have
This could be solved by adding the stream id to the
HS_DESC event, which would then also allow us to link it up to the circuit used for the directory fetch.
- Cannot link the HS directory stream/circuit to the rendezvous stream/circuit to the introduction circuit.
We could treat the RP stream as the "parent" stream and link it to the directory stream; then we could treat the circuit to which the RP stream is attached as the "parent" circuit and link it to the circuit used for the directory fetch as well as the circuit used for the introduction.
We could also add new type of HS event to handle these sorts of issues.
Humans make mistakes; please let me know if I am wrong about any of this.
See also Roger's HS walkthrough: https://trac.torproject.org/projects/tor/wiki/doc/TorControlPortWalkthrough-HS