Repository navigation
data,web: key Reticulum nodes on identity; discover host aspects - #897
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Pulled 1. The README documents the approach you rejected
python -c "import RNS; RNS.Reticulum(configdir='$HOME/.reticulum'); \
print('!' + RNS.Transport.internal_identity().hash.hex()[:8])"The code does not do that. Both on my box, same config dir: So the README is describing the 2. The PR title and body describe a different design than the head commitThe title says "key Reticulum nodes on destinations" and the body opens with "Key rows on the destination hash again (reverses RN1)". The head commit 3. Changing the id rule strands the previous ingestor rowNot a defect, but it has now bitten twice on the same host. Each id-scheme change leaves the old row behind, unheartbeated, until it ages out. I had drafted an upgrade caveat for #896 but did not push it, since you had this in flight and its premise changed. If you want, I will send a short note for the README and CHANGELOG against whatever lands: leaving Otherwise clean
One small thing: at connect the startup line reads |
|
Good findings, I fixed all three. |
.env.example still described the #896 model: the ingestor owning an RNS identity and deriving its !xxxxxxxx from "the transport identity already in RETICULUM_CONFIG_DIR". #897 shipped the opposite. RE8 excludes the transport identity from the pick, because RNS generates it as an independent keypair that matches none of the operator's announced destinations; the id is the discovered primary identity, the one announcing the most destinations on the machine. README says this correctly and .env.example contradicted it, pointing operators at the hash rnstatus prints as "Transport Instance". The strands-the-old-row caveat #897 added to README and CHANGELOG is carried over too, since .env.example is where an operator is standing when they set the variable that moves the id. Two guards in the deployment-surface class, both negative-tested against main, where they correctly fail. pytest 1443 passed; black clean.
Ref #888
Findings from a live RNode + rnsd test, where the shipped behaviour from #889/#890/#893 did not survive contact with a real stack.
One node record per identity (RE7, superseding RE1). A peer announcing lxmf.delivery, lxmf.propagation and nomadnetwork.node is one node with three destinations, not three nodes. RE1 had split them to stop a merged row being named from one aspect and roled from another; the destinations table (RE2) already carries the per-aspect name and role, so the split bought nothing and cost the node count its meaning. Verified against RNS: Destination.hash reproduces all three field destination hashes from identity 27716218... alone.
Destinations become a table, and are served. destinations (id, node_id, identity_hash, name, aspect, role, interface, first_heard, last_heard, protocol) replaces the nodes.dest_hash JSON column -- a column and a table modelling one relationship would drift -- and is served by GET /api/destinations. The write is its own forward-only statement outside the upsert's freshness guard, so a stale record's new destination is not dropped, and it still cannot regress last_heard or write through a synthetic placeholder.
A 0-hop announce is always ingested. Transport.inbound adds a hop to every inbound packet and takes it back for a local-client or shared-instance interface, so zero hops can only mean "announced by an app on this machine". Filtering purely on interface name hid the operator's own nodes, because every local destination legitimately reads LocalInterface[rns/default]. RETICULUM_INTERFACES now applies from one hop out; empty (the default) still ingests everything.
Share the operator's RNS stack. RETICULUM_CONFIG_DIR defaults to ~/.reticulum again; the config seeding and the allowlist's fail-open, both of which existed to work around an app-owned directory, are removed.
Derive the host node id the Reticulum way. canonical_node_id keeps the low 32 bits of a hex value -- right for a Meshtastic node num, wrong for a 16-byte identity hash, which it truncates from the opposite end: the ingestor registered !86c39940 while its own peer row read !27716218. Raw identity hashes now map through _reticulum_node_id. With INGESTOR_NODE_ID unset the id is derived from the transport identity rather than warned about.
Log the transmit gate only when it blocks something. The announcement policy check moves after the due check, so the suppression line names the gate when it actually blocks a due announcement instead of once per 60 s loop; the startup "Transmit policy resolved" line already carries that.