Skip to main content

Module node_id

Module node_id 

Source
Expand description

The one node-id derivation (ADR-103 D11). The one node-id derivation (ADR-103 D11, ADR-025).

node_id = hex(SHA-256(ed25519 pubkey)[..16]): 32 lowercase hex characters. Every place that names a node (mesh handshake, cluster membership, heartbeats, chain event sources, status RPC, substrate <node-id> path segments, leaf registration) uses this value. Do not hash a pubkey into an id anywhere else.

Constants§

NODE_ID_BYTES
Number of hash bytes kept in a node id (16 bytes = 32 hex chars).
NODE_ID_HEX_LEN
Length of a node id in hex characters.

Functions§

is_node_id
True when s has the shape of a node id produced by node_id_from_pubkey (32 lowercase hex characters).
node_id_from_pubkey
Derive the node id from an Ed25519 public key.