ADDRMAP control event doesn't say what stream or circuit the info came from
Noticed while designing a controller-based exitmap dns test in tpo/network-health/exitmap#16 (closed):
If you listen for stream events and addrmap events, you get
setevents addrmap stream
250 OK
resolve freehaven.net.VSIFskylab.exit
250 OK
650 STREAM 62 NEWRESOLVE 0 freehaven.net.VSIFskylab.exit:0 SOURCE_ADDR=127.0.0.1:51756 PURPOSE=DNS_REQUEST CLIENT_PROTOCOL=UNKNOWN NYM_EPOCH=0 SESSION_GROUP=-3 ISO_FIELDS=SOCKS_USERNAME,SOCKS_PASSWORD,CLIENTADDR,SESSION_GROUP,NYM_EPOCH
650 STREAM 62 SENTRESOLVE 3 freehaven.net.vsifskylab.exit:0 CLIENT_PROTOCOL=UNKNOWN NYM_EPOCH=0 SESSION_GROUP=-3 ISO_FIELDS=SOCKS_USERNAME,SOCKS_PASSWORD,CLIENTADDR,SESSION_GROUP,NYM_EPOCH
650 ADDRMAP freehaven.net 128.31.0.34 "2021-01-19 04:03:48" EXPIRES="2021-01-19 09:03:48" CACHED="NO"
650 STREAM 62 REMAP 3 128.31.0.34.vsifskylab.exit:0 SOURCE=EXIT CLIENT_PROTOCOL=UNKNOWN NYM_EPOCH=0 SESSION_GROUP=-3 ISO_FIELDS=SOCKS_USERNAME,SOCKS_PASSWORD,CLIENTADDR,SESSION_GROUP,NYM_EPOCH
650 STREAM 62 CLOSED 3 128.31.0.34.vsifskylab.exit:0 REASON=DONE CLIENT_PROTOCOL=UNKNOWN NYM_EPOCH=0 SESSION_GROUP=-3 ISO_FIELDS=SOCKS_USERNAME,SOCKS_PASSWORD,CLIENTADDR,SESSION_GROUP,NYM_EPOCH
Check out how that "addrmap" event line has no hints about who did the resolve.
That means if I issue ten resolve commands in parallel, and get ten addrmap answers back... I don't have any explicit way to match up my answers to the questions.
It seems to me that listing either STREAMID or CIRCID as another argument in the event line would be enough.