Skip to content

hsservice: Warn and react appropriately if generated descriptor is longer than HSV3MaxDescriptorSize

Right now, our hsclient code imposes a maximum size on an hsdesc, but the hsservice code does not.

(The correct maximum is the value of hsdir_max_desc_size in a NetParams, which is taken from HSV3MaxDescriptorSize in the directory.)

At a minimum, we might just shut down the service with a warning if our descriptors are larger than this. But since the likeliest reason for an hsdesc to be too large is because of including too many client-authorization sections, it would be better to remove these until the descriptor "fits" again.