KeepAlive

Planned Upgrade

Introduction

A KeepAlive is a signed "heartbeat" message that a peer periodically sends to the network. Its primary purpose is to signal that the peer is still online and available. Master and Relay Nodes on the network collect these messages and use the timestamp to update the lastSeenTime for the corresponding entry in their Presence List. If a node fails to send a KeepAlive message within a certain time window, it is considered offline and removed from the active list.

This document describes the on-wire serialization format for the latest KeepAlive version (v2).

Core Data Types

  • IxiVarInt / IxiVarUInt: See IxiVarInt Encoding.
  • IxiBytes: See IxiBytes Encoding.
  • string: A standard UTF-8 encoded string, prefixed with its length.
  • char: A single byte representing a character.

KeepAlive Structure (v2)

The structure is divided into a section used for checksum calculation and the signature itself.

Checksum Section

The following fields are serialized in order to generate a checksum. This checksum is then signed to produce the signature field.

FieldData TypeMinMaxDescription
versionIxiVarUInt2The KeepAlive structure version.
walletAddressIxiBytes**The wallet address of the node sending the keepalive.
deviceIdIxiBytes**The unique device identifier for the specific client instance.
timestampIxiVarInt**The Unix timestamp when this keepalive was generated.
hostNamestring**The public contact address of the node (e.g., IP address and port).
nodeTypechar11A single character representing the node type ('M' for Master, 'H' for Full History, 'R' for Relay, 'C' for Client). Currently all M nodes are also H nodes.
powSolutionIxiBytes0*Optional. The serialized SignerPowSolution object, required for 'M' and 'H' type nodes.

Signature Field

This field is appended to the full message but is not part of the checksum calculation.

FieldData TypeMinMaxDescription
signatureIxiBytes**The cryptographic signature over the checksum of the fields listed above.

Checksum & Signature

  • Checksum Calculation: The checksum is a sha3_512sqTrunc hash calculated over the serialized bytes of the Checksum Section. The ixianChecksumLock constant is prepended to the byte array before hashing.
  • Signature: The signature is generated by signing the calculated checksum with the private key corresponding to the node's wallet address. This proves the authenticity of the heartbeat.