Skip to content
Almena Network— version v2026-12-beta
Auto
English

Node specification

Requirements that a conformant node must meet. It does not depend on anything in client/.

This document gathers as requirements what has already been decided in network, the interface and conformance. The reason for each decision is in those documents; here it only says what a node must do. It also includes the protocol between nodes (section 6), because only nodes implement it.

A conformant node:

  1. Meets all the functions of the base node (section 2).
  2. MAY enable a single complementary function: Mediator, Archive, Push or Relay (section 3). It MUST NOT enable more than one.
  3. MAY also be configured as an entity node (section 4), independently of the above.
  4. Implements the protocol between nodes (section 6) and the interface’s read routes.
  1. On its first start, the node MUST generate its key and its identity: a transferable KERI AID (network, 6.2).
  2. It MUST keep that identity between starts and MAY rotate its key without changing identifier.
  3. Its network identifier (PeerId) MUST be bound to its AID with a signed association (network, 1.1.1).
  4. Recovery with the same identity files (network, 6.2.1): before operating, the node MUST check with several nodes that the last heartbeat of that identity is older than T (5.1). If it is active, it MUST NOT start. If a node sees more recent heartbeats signed with its own identity, it MUST stop. After a recovery it SHOULD rotate the key.
  1. The node MUST synchronize its clock with NTS against at least 3 independent sources, with the goal of being within 100 ms of real time (network, 6.2.3).
  2. It MUST compute its drift with respect to the median of at least 5 neighbours, from the signed time of their heartbeats.
  3. If it drifts more than 1 s from that median, it MUST stop writing records and keeping custody until it is back within the margin for several consecutive heartbeats.
  4. It MUST reject a record whose time differs by more than 1 s from its own.
  1. An active node MUST emit a signed heartbeat with an increasing counter and its time every minute (6.1).
  2. It MUST publish its signed entry in the DHT (address, read URL, complementary function if it has one, entry date, and implementation and version for information only) and renew it before it expires after 24 h (network, 8.1).
  3. To leave, it SHOULD publish a signed withdrawal entry.
  4. During the entry period (7 days) it works, but it is neither a custodian nor a mediator.
  1. The node MUST take part in the DHT. libp2p with Kademlia is recommended (SHOULD) (network, 1.1.1).
  2. It MUST answer any network query: if it does not have the data, it locates it, fetches it and serves it. It MAY keep it in cache for at most 24 h.
  3. It MUST verify by hash and signature everything it receives, whether from a custodian, a cache or a wallet, and MUST reject whatever is not valid (conformance, layer 1).
  1. The node MUST offer the read routes of the interface, 6, including GET /1.0/info (interface, 8), directly or through a Relay Node.
  2. A directly exposed node SHOULD use its own domain and TLS certificate.
  3. A search in the entity directory is resolved by an Archive Node; other nodes MUST forward it.
  4. Entities’ internal audit logs and mailboxes MUST NOT have a public route.
  1. The node MUST accept the custody the network assigns to it: it is a custodian of a piece of data if it is among the k eligible nodes closest to its hash, skipping those in the same network or behind the same relay and the entity nodes of the entity itself (network, 4).
  2. It MUST contribute the v2026-12-beta minimums: 10 GB of disk, 2 Mbps upload and 95 % availability (network, 5.1).
  3. If one of the k custodians of a piece of data has had no heartbeats for 1 hour and this node is the next closest, it MUST copy the data from the others (re-replication).
  4. It MUST answer storage challenges (6.5).
  5. Before storing an activity record it MUST check its signature with the current keys of the entity’s KEL, the continuity of its hash chain, its time (2.2) and the entity’s quota (2.8). If anything fails, it MUST reject it.
  6. It MUST NOT offer any operation to delete or modify records (network, 7.3).
  1. The node MUST monitor its neighbours for clock, availability, custody and declared function, and generate signed evidence when it detects non-compliance (conformance, layer 3).
  2. It MUST apply the same consequence rule as everyone else: note it, and on repetition exclude from custody and mediation for a growing time (conformance, 3).
  3. Where it has a choice (mediators, relays, gateways), it SHOULD prefer nodes with a conformance credential, but MUST NOT reject those without one. Custodians are always the k closest.
  1. It MUST apply the quotas per entity and day (publications and space) and reject whatever exceeds them with the quota_exceeded error (network, 10). The values will be set with performance tests.
  1. It hosts DIDComm mailboxes of persons and entities and offers what is described in the interface, 2 to 5 and 7: Coordinate Mediation 3.0, Message Pickup 3.0, HTTPS (MUST) and WebSocket over TLS (SHOULD).
  2. It is transport only: it MUST NOT process, transform or keep messages outside the mailbox (network, 6.0).
  3. It MUST keep an uncollected message for at least 30 days and delete it when its receipt is confirmed.
  4. If it has a push URL for a mailbox, it SHOULD send an empty notice to that URL when a message arrives, at most one per minute and mailbox, signed in the style of VAPID (interface, 7). It MUST NOT know the operating system token.
  5. It SHOULD be exposed directly and not behind a relay.
  6. It MUST respect the cap on mailboxes per node (to be set with performance tests).
  1. It keeps a full copy of everything public on the network and builds the search index over it (network, 6).
  2. It MUST NOT store mailboxes or anything private.
  1. It notifies its publisher’s wallets when a mediator asks it to (interface, 7). Only it knows the operating system token.
  1. It forwards the traffic of nodes that cannot be exposed, without being able to read it: the traffic MUST be end-to-end encrypted (network, 6.3).
  2. It states in its entry how many nodes it can serve.
  3. A node that depends on relays SHOULD use two, chosen at random and in different networks.

An additional role of a node, authorized by the entity with M of N in its KEL and revocable. Every entity has at least one (network, 6.4).

  1. It collects the entity’s messages from its mailboxes, decrypts them and stores them in the entity store, which it may be itself or which it accesses. It is the only way into that store. None of it goes to the network.
  2. It MUST keep the entity’s keys and data separate from those it uses on the network.
  3. It generates and keeps the entity’s encryption, issuing and record keys, and the key with which it acts as a holder, in protected key storage (a hardware security module or equivalent). The encryption key is a hybrid pair (P-256 and ML-KEM-768); the signing keys SHOULD be composite ML-DSA-65 + ES256 (cryptography). It MUST NOT keep the managers’ rotation keys (key inventory).
  4. It writes the entity’s activity records and its internal audit log, and publishes the audit log anchor every 24 h and after each change in the KEL (network, 7).
  5. It stores the entity’s credentials when the entity acts as a holder (protocols).
  6. It offers the management interface to the entity console: it checks the console sign-in, opens sessions, prepares operations, asks the managers for their approvals and executes the operation when the threshold is reached (interface, 10).
  7. It only accepts being bound to an entity with its operator’s consent.
  8. Several entity nodes (network, 6.4.1): each one has its own encryption key; a message is not deleted from the mailbox until it is in the entity store; how they coordinate among themselves is up to the implementation, over an end-to-end encrypted channel separate from the network.
  9. The network neither rewards nor penalizes a node for being an entity node.

The v2026-12-beta values are in network, 5.1. They are provisional until the performance tests.

Messages that nodes exchange. All of them are signed with the key of the node that emits them.

Format. Each message is JSON signed as JWS, like credentials and DIDComm, and travels over libp2p with a request–response protocol for each message type (6.1 to 6.7). If the performance tests call for it, it MAY later move to CBOR without changing the content.

Encryption. The channel between nodes SHOULD use a hybrid key agreement (ML-KEM-768 with X25519 or P-256). The channel between nodes of the same entity (6.7) carries private data, so it MUST be hybrid (cryptography).

Common header. Every message carries its type, version, the AID of the emitting node, a unique identifier and the time.

It contains the node’s AID, an increasing counter and its time. It serves for availability, identity recovery (2.1) and clock monitoring (2.2).

The node directory entry (2.3) and the withdrawal entry. They are published in the DHT.

Locating a piece of data in the DHT by its hash and fetching it from a custodian or a cache.

Delivery of a piece of data to its k custodians. Each custodian validates it (2.6) and responds with a signed acknowledgement or a rejection with its reason. The delivery carries the hash of the data and the data itself; the acknowledgement carries the custodian’s AID, the hash and the time.

Once a day, a randomly chosen neighbour asks each custodian for a random chunk of a piece of data with its Merkle tree path. If it responds correctly, a signed acknowledgement is left; if it fails, the neighbour generates evidence and the data is re-replicated (network, 9). The challenge carries the hash of the data and which chunk is requested; the response carries the chunk and its Merkle path.

Storage challenge and re-replication

Signed evidence about a specific node (clock, availability, custody or declared function), checkable by anyone. It carries the AID of the node concerned, the type of misbehaviour and the signed messages that prove it.

Their content is up to the implementation (section 4). They go through an end-to-end encrypted channel, separate from the network, with hybrid key agreement.

  • What a custodian sees: only public information, signed and without personal data. It can withhold it but not forge it; this is mitigated by the k copies, caches and Archive Nodes.
  • What a mediator sees: encrypted messages, and when and how much each mailbox is used and from which IP address (interface, 11). That is why a person spreads their relationships among their 3 mediators.
  • What a relay sees: whom the node communicates with and how much traffic it moves, never the content.
  • Entity node: it is the only one that has decrypted data, and only of its entity. Its security is the entity’s responsibility (P10).
  • Multiple identities: they are curbed with the entry period, proven resources and network diversity (network, 6.2.2).

None for now.