Ivan Markin twim@riseup.net writes:
IMO an onion service should publish its first descriptor instantly. If something happens afterwards and one has to fix the descriptor - deal with it with backoff/delay to prevent DoS on HSDirs.
+1
txtorcon only ever waits for the first descriptor to be published (since at this point I presume the service is at least theoretically reachable) before alerting the caller that the service is "ready".
From a controller perspective it would also be nice to have
more-granular feedback (maybe an HS_DESC event that indicates "waiting X seconds to do anything at all with this one") so that e.g. a GUI can make a nice progress bar that doesn't just sit there (i.e. if tor tells me that it will be 5 seconds before we even try anything, I can provide feedback every 1 second if I like).
Perhaps you could achieve "less load on HSdirs" but preserve "at least one descriptor is uploaded right away" by selecting N random delays, where one lucky HSDir gets a 0 second delay and the other 5 get something random between 1 and 30 (or whatever).
p.s. I don't view ADD_ONION as being useful *only* for temporary services -- it's also the good API for applications that want to manage their own private-key material. For these, they might like to know when *all* descriptors are uploaded, etc.