원클릭으로
announce-mechanism
// Detailed knowledge of Reticulum's announce mechanism for automatic path discovery. Use when working with announce propagation, path discovery, announce bandwidth, announce forwarding, path requests, or announce structure.
// Detailed knowledge of Reticulum's announce mechanism for automatic path discovery. Use when working with announce propagation, path discovery, announce bandwidth, announce forwarding, path requests, or announce structure.
Reticulum's cryptographic primitives, identity structure, encryption tokens, and key derivation. Use when working with Ed25519, X25519, identity hashes, HKDF, token format, encryption, signatures, ratchets, or key derivation.
Reticulum's addressing system and destination types. Use when working with destination types (SINGLE, GROUP, PLAIN, LINK), destination hashes, aspect naming, or addressing.
Reticulum's hardware abstraction layer and interface types. Use when working with RNode, AutoInterface, TCP, UDP, I2P, Serial, KISS, BLE interfaces, interface modes, IFAC, bandwidth allocation, or MTU.
Reticulum's link system — encrypted channels with forward secrecy. Use when working with link establishment, link requests, ECDH, ephemeral keys, forward secrecy, channels, keep-alive, or link timeouts.
Reticulum's packet structure and wire format. Use when working with packet headers, MTU/MDU, packet types, header types (HEADER_1/HEADER_2), packet context flags, IFAC, or binary packet encoding.
Reticulum's resource transfer system for large data over links. Use when working with resource transfers, windowing, hashmaps, segments, compression, file transfers, or resource states.
| name | announce-mechanism |
| description | Detailed knowledge of Reticulum's announce mechanism for automatic path discovery. Use when working with announce propagation, path discovery, announce bandwidth, announce forwarding, path requests, or announce structure. |
This skill provides detailed knowledge about Reticulum's announce mechanism for automatic path discovery. Invoke when the user mentions announce, announce propagation, path discovery, announce bandwidth, announce forwarding, path request, or announce structure.
The announce mechanism is Reticulum's core method for automatic path discovery and establishing end-to-end connectivity. When a destination announces itself, the announcement propagates through the network, allowing any node to discover and reach that destination without manual configuration or centralized coordination.
Announces serve two critical functions:
An announce packet consists of a standard packet header plus the announce payload:
Packet Header (separate from payload):
Announce Payload (the data portion):
[PUB_KEY 64B][NAME_HASH 10B][RANDOM_HASH 10B][RATCHET? 32B][SIGNATURE 64B][APP_DATA?]
DEST_HASH (16 bytes, in packet header): Truncated SHA-256 hash of the destination being announced. Located in the packet's address field, not the payload. Used for routing.
PUB_KEY (64 bytes): Full X25519/Ed25519 public key (32 bytes encryption + 32 bytes signing). Used by receivers to reconstruct the destination and encrypt traffic.
NAME_HASH (10 bytes): Truncated SHA-256 hash of the destination's full name (app_name + aspects). Helps receivers identify the destination type without transmitting the full name.
RANDOM_HASH (10 bytes): Unique blob making each announce distinct. Composed of 5 random bytes + 5 bytes timestamp (big-endian). Prevents duplicate detection from blocking refreshed announces.
RATCHET (32 bytes, optional): Current X25519 ratchet public key for forward secrecy. Present only if destination uses ratchets. Indicated by packet context flag.
SIGNATURE (64 bytes): Ed25519 signature over all preceding fields (including destination hash, which is signed but not transmitted in the data portion). Ensures authenticity and prevents spoofing.
APP_DATA (variable, optional): Application-specific data such as user nickname, status, version, capabilities, etc. Can be any length but should be minimized to conserve bandwidth.
Without ratchet: 64 + 10 + 10 + 64 = 148 bytes (plus optional app data)
With ratchet: 64 + 10 + 10 + 32 + 64 = 180 bytes (plus optional app data)
These are minimum sizes for the announce payload only. The packet header (including DEST_HASH) adds 19 bytes (HEADER_1 format), for total packet sizes of approximately 167 and 199 bytes respectively.
The signature is computed over the following signed data:
signed_data = destination_hash + public_key + name_hash + random_hash + ratchet + app_data
Critical: The destination hash is included in the signed data even though it's already in the packet header. This binds the public key cryptographically to the destination hash, preventing relay attacks where an attacker might try to substitute a different destination hash.
The signature can be verified by any node that receives the announce using the public key contained in the announce itself. This creates a self-authenticating packet.
When a transport node receives an announce, it applies the following forwarding algorithm:
path_table[destination_hash] = {
"timestamp": time.time(),
"received_from": announcing_interface_hash,
"hops": announce_hops,
"expires": time.time() + PATHFINDER_E,
"random_blobs": random_hash,
"interface": receiving_interface,
"announce_packet": announce_packet
}
Announces closer to their origin (fewer hops) have higher priority:
priority = 1.0 / hop_count
This ensures local connectivity converges quickly even on slow networks, while announces for distant destinations wait in queue until bandwidth becomes available.
PATHFINDER_M = 128 # Max hops before discarding
PATHFINDER_R = 1 # Retransmit retries
PATHFINDER_G = 5 # Retry grace period (seconds)
PATHFINDER_RW = 0.5 # Random window for announce rebroadcast (seconds)
PATHFINDER_E = 604800 # Path entry expiration (7 days)
PATHFINDER_M (128): Absolute maximum network diameter. Announces exceeding this hop count are dropped. This bounds convergence time and prevents infinite propagation.
PATHFINDER_R (1): Number of retransmission attempts if rebroadcast is not heard from neighbors. Ensures reliability in lossy networks.
PATHFINDER_G (5 seconds): Grace period to wait for neighbor rebroadcast before retrying. Prevents redundant transmissions.
PATHFINDER_RW (0.5 seconds): Randomization window for retransmit timing. Spreads announce traffic over time to avoid burst congestion.
PATHFINDER_E (604800 seconds): Path table entry lifetime. Paths are removed after 7 days without a refresh announce.
Interfaces allocate a maximum of 2% bandwidth for processing announces by default. This percentage is configurable per-interface.
announce_bandwidth_allocation = 0.02 # 2% of interface bandwidth
This ensures local network segments maintain connectivity even when connected to much larger, faster networks that generate many announces.
When a node needs to send a packet to an unknown destination, it can issue a path request:
PATH_REQUEST_TIMEOUT = 15 # Timeout for path requests (seconds)
PATH_REQUEST_GRACE = 0.4 # Grace before announcing (seconds)
PATH_REQUEST_MI = 20 # Minimum interval between requests (seconds)
A path response is an announce packet with:
RNS.Packet.PATH_RESPONSE instead of RNS.Packet.NONEThe path response follows the return path established by the path request, allowing bidirectional communication.
Network convergence refers to the time required for all nodes to learn paths to all destinations after an announce is sent.
Fast Networks (high bandwidth, low latency):
Slow Networks (low bandwidth, high latency):
For a maximum-diameter network (128 hops) with adequate bandwidth:
Even networks that never reach full convergence can still communicate via recursive path resolution: slow segments query faster segments for paths on-demand.
Broadcast periodically or on network join. Used for:
Sent in response to a path request. Characteristics:
Includes current ratchet public key for forward secrecy:
The optional app_data field allows destinations to include contextual information:
There is no strict requirement for announce frequency, but typical patterns:
Periodic Announces:
Event-Driven Announces:
Conservative Strategy:
See references/wire-examples.py for a complete implementation of announce packet construction including signature generation.
Q: Can announces be encrypted? A: No. Announces must be cleartext so any node can learn the public key and establish paths. However, the signature ensures authenticity.
Q: What happens if two nodes have the same destination hash? A: Collisions are astronomically unlikely (2^-128 probability). If it occurred, both destinations would be reachable, but packets might be routed incorrectly.
Q: Do announces consume a lot of bandwidth? A: In sparse networks, no. In dense networks with thousands of destinations, announce traffic can be significant. The 2% bandwidth limit prevents congestion.
Q: How do mobile destinations re-announce after moving? A: Simply send a new announce from the new location. The updated path entry will propagate through the network with the new routing information.
Q: Can I suppress announces for private destinations?
A: Yes. Don't call announce(). Instead, share the public key out-of-band (QR code, file, manual exchange). Packets can still be sent if both ends know each other's keys.
Q: What's the difference between an announce and a path request? A: An announce is a broadcast from a destination advertising its presence. A path request is a query asking "who knows how to reach this destination?"