Skip to documentation
SLOP

tiny.reticulum.packet

Reference tiny.reticulum packet

Defined in tiny.reticulum.

Four jobs govern what a node does with a packet once its bytes have been read: decide whether to act on it, remember it so it is acted on once, answer it with a signed reply that says it arrived, and keep track of the packets it sent that are still waiting to be answered.

API (5)

Types and contracts

Public types and contracts.

Namespaces

Public namespaces.

No direct callersNo direct callstiny.reticulumpacket
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/reticulum/src/packet/root.zig

zig
//! Four jobs govern what a node does with a packet once its bytes have been//! read: decide whether to act on it, remember it so it is acted on once,//! answer it with a signed reply that says it arrived, and keep track of the//! packets it sent that are still waiting to be answered. The 32-byte digest//! that names a packet is the key every one of those four jobs turns on.//!//! A mesh floods, so the same packet reaches a node over more than one route,//! and the node has to act on it once. A sender needs to learn that what it//! sent arrived, and to give up after a wait that grows with the distance. Both//! jobs need memory fixed before the program starts.//!//! Remembering the digest of every packet a node ever saw grows without limit,//! and forgetting them all at once would let an old packet act a second time. A//! record of a sent packet that waits forever for its answer holds its slot//! forever, and a node whose records fill their storage cannot record the//! packet it is sending now. The answer to a packet has to name the packet//! without carrying it back, because the answer travels over the same 500-byte//! limit.//!//! The subtree follows Reticulum 1.5.0, the reference implementation, pinned to//! one upstream commit by the package README and the generated conformance//! corpus. What it takes is the admission rules of Reticulum@1.5.0//! RNS/Transport.py:1571-1628, the two hash generations of Reticulum@1.5.0//! RNS/Transport.py:803-805, the two proof forms of Reticulum@1.5.0//! RNS/Packet.py:403-404, and the receipt states and timeout rule of//! Reticulum@1.5.0 RNS/Packet.py:396-400,537-548. The package generates//! reference vectors from that release and replays them in tests, so each of//! those claims is checkable from this tree.//!//! The store of seen hashes keeps two generations of the 32-byte SHA-256 digest//! that names a packet (*packet hash*) and drops the older one on rotation, so//! a packet stays recognized for at least one rotation while the store stays//! bounded. The store of seen hashes and the records of sent packets//! (*receipts*) are both carved out of caller storage with an entry maximum the//! caller fixes. The reference filters an arriving packet against its shared//! instance before it reaches these rules, and this subtree leaves that to the//! caller. The reference marks a receipt for culling with a negative timeout,//! and seconds here are unsigned, so the largest value a timeout holds marks//! it. The subtree names its pieces: the packet hash, admission, the store of//! seen hashes, proofs, and receipts.//!//! - *proof*: a packet carrying a signature over an earlier packet's hash, sent//!   back so the sender learns the packet arrived.pub const Hash = [32]u8;pub const filter = @import("filter.zig");pub const hashlist = @import("hashlist.zig");pub const proof = @import("proof.zig");pub const receipt = @import("receipt.zig");

Source: lib/reticulum/src/root.zig:66

zig
pub const packet = @import("packet/root.zig");

Audit

Definitions2
Public names2
Members0
Version26.7.0
Revisiondaab053ee433