getKeepAlives (6)

Finalized

The getKeepAlives message is used to query a peer for a specific list of presence records. This allows a node to refresh or verify the status of presences it already knows about.

If the list of requested presences is large, the sender will split the request into multiple getKeepAlives messages (chunks) to respect the maximum message size limit. The peer is expected to respond with one or more keepAlivesChunk messages containing the data for the requested presences it has.

Core Data Types

Payload Structure

The payload consists of a count followed by a repeating series of request entries.

FieldData TypeMinMaxDescription
Entire Payloadbyte[]50MBThe total size of the message payload must not exceed the global maximum.
countIxiVarUInt15000*The number of Presence Request entries that follow in this message.
requestsPresenceRequest[]An array of count presence request entries.

* The maximum value for count is determined by the node configuration (CoreConfig.maximumKeepAlivesPerChunk), which defaults to 5000.

Presence Request Entry Structure

Each entry in the requests array has the following structure:

FieldData TypeDescription
addressIxiBytesThe wallet address (without checksum) of the presence record being requested.
deviceIdIxiBytesThe unique device ID of the presence record being requested.

Behavioral Notes

  • A node receiving this message should iterate through the requested (address, deviceId) pairs and look them up in its local presence list.
  • For each presence record found, the node should include it in a keepAlivesChunk response message.
  • It is not an error if some or all of the requested presences are not found; the responding node simply omits them from the response.