Function ensure_node_id
pub fn ensure_node_id(data_dir: &Path, configured: &str) -> Result<String>Expand description
Resolve this daemon’s relay node-id.
If the operator set [relay].node_id (configured), that wins. Otherwise read
(or mint + persist) a random 128-bit value at <data_dir>/relay/node_id.
The node-id is an UNGUESSABLE routing CAPABILITY, not a name (design relay/02): high entropy + non-enumerability stops attackers probing which daemons are online or flooding a daemon’s inner mTLS by guessing ids (A6/A10). It is kept DECOUPLED from the cert/identity so the relay (a metadata adversary) only ever learns an opaque handle, and so it can be rotated without reissuing certs.