pub struct RotatedNodeCert { /* private fields */ }Expand description
The outcome of a machine-key rotation (NodeCert::rotate): the retiring previous identity and
the freshly minted current one.
Because peer_id = SHA-256(SPKI DER) and the SPKI commits the BLS binding, a rotation mints a
brand-new key pair and therefore a brand-new peer_id — this is an IDENTITY CHANGE, not a cert
renewal. dig-tls is a library and does NOT do networking; it hands back BOTH identities so the
CALLER (dig-node) can dual-present — keep accepting inbound on the old peer_id while it
re-announces the new peer_id to DHT/PEX/relay — then call retire_previous once the
re-announce converges.
The derived Debug renders only each identity’s redacting NodeCert Debug — never key bytes.
Implementations§
Source§impl RotatedNodeCert
impl RotatedNodeCert
Sourcepub fn previous(&self) -> &NodeCert
pub fn previous(&self) -> &NodeCert
The retiring identity. Present it (and accept inbound on its peer_id) during the overlap
window, until the caller’s re-announce converges and it calls retire_previous.
Sourcepub fn into_current(self) -> NodeCert
pub fn into_current(self) -> NodeCert
Consume the rotation, keeping only the new current identity (drops + scrubs the previous key).