updatePresence (24)
The updatePresence message is used by a node to broadcast its complete presence information to its peers. It serves as a full "business card," containing the node's wallet address, public key, and a list of all its network endpoints.
This message is sent proactively when a node first connects to the network. It is distinct from a keepAlivePresence message, which is a lightweight heartbeat to prevent an existing presence entry from expiring.
Core Data Types
PresenceObject: The comprehensive data structure that contains a node's identity and list of contact addresses.
Payload Structure
The entire payload of an updatePresence message consists of a single field: the raw bytes of a complete, serialized Presence object.
| Field | Data Type | Min | Max | Description |
|---|---|---|---|---|
presenceData | Presence Object | * | * | The full binary representation of the sender's Presence object. For a detailed breakdown, see the Presence data structure documentation. |
Behavioral Notes
-
Recipient's Action: A node receiving an
updatePresencemessage MUST perform the following steps:- Deserialize the payload into a
Presenceobject. - Perform full validation on the
Presenceobject. This includes verifying the signature of each nestedPresenceAddressentry against the public key provided in the top-levelPresenceobject. - If the
Presenceis valid, the node updates its local Presence List, replacing any existing entry for that wallet address with the new data.
- Deserialize the payload into a
-
Propagation: Master Nodes that receive and validate a new
updatePresencemessage may propagate it to their own peers to ensure the information is disseminated throughout the network.