You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hidden nodes (🚫 prefix): adverts with name and position are still served by /api/packets and the WebSocket #1023
A node whose name starts with a hidden-name prefix (hiddenNamePrefixes, default 🚫, Kpa-clawbot#1181) disappears from /api/nodes, /api/nodes/search and /api/nodes/{pubkey}, and the recent privacy fixes also hide it in Analytics → Areas, New Nodes and Node Changes. But its adverts are still served with name, public key and exact position:
/api/packets?type=4 lists them, so the Packets page shows them;
/api/packets/{hash} returns the decoded advert, including lat/lon;
this includes adverts sent after the 🚫 rename, as long as the node still sends a position;
adverts sent before the rename carry the old name, so the identity can be linked to its earlier name.
Found in the second fact review of the /faq page (#1014): with hiddenNamePrefixes set on the test fixture, the node list, search and detail hide the node, while /api/packets?type=4 returns three adverts with its name and coordinates. The FAQ now states this gap honestly; this issue is about closing it.
An operator or owner who hides a node expects its position to stop being published. Today it is published for the full packet retention window.
Proposal (to plan, not to start yet)
Apply the existing identity rule (identityHidden in cmd/server/identity_visibility.go: blacklisted, or any known name starting with a hidden prefix) to packet responses:
Advert packets from a hidden identity are left out of /api/packets (list and grouped), /api/packets/{hash}, and the WebSocket broadcast that Live and Packets consume — all adverts by that pubkey, also those sent before the rename.
Other packets that a hidden node sent or relayed stay (they carry no position), but any resolved name or pubkey for that hop or sender is shown as unknown, consistent with how hidden nodes are treated elsewhere.
Check that a node-blacklisted identity has no similar gap on these endpoints, and fix it the same way if it has.
Keep the server read-only: filter at response time, cached per visibility generation (HiddenNamePrefixesGeneration / BlacklistGeneration), no per-packet DB lookups.
Acceptance
With a hidden prefix set, no API response or WebSocket message contains a hidden node's advert, name, public key or position.
Test red on master, green after: list, grouped list, detail, WebSocket.
Performance: filtering 30K+ packets stays within the existing budgets (benchmark included).
Docs: config.example.json_comment_hiddenNamePrefixes and the user guide describe what is hidden.
Hidden nodes (🚫 prefix) still have their adverts, with name, public key and position, served by /api/packets* and the WebSocket.
Scope: research only. No code was changed, nothing was committed or pushed, and no network calls were made beyond reading the local firmware clone.
CoreScope: master @ 2c7fbd6c.
Firmware: local clone of https://github.com/meshcore-dev/MeshCore @ a366955c (committed 2026-09-30).
Line numbers are from 2026-11-28.
Marking used in this report:
[V]: I read the line myself.
[I]: taken from a delegated code inventory that I spot-checked but did not read line by line.
[A]: an assumption.
1. Conclusion and recommendation
The gap is larger than the issue describes.
No packet-serving path in cmd/server/ applies IsBlacklisted, IsNameHidden or identityHidden. This covers the packet list, grouped list, detail, batch observations, ?node= / ?nodes=, the WebSocket broadcast, the node-health recentPackets, the observer-analytics RecentPackets and the audio-lab buckets [I, verified for the WS loop and the grouped cache].
So both a hidden-prefix node and a node-blacklisted node have their adverts served in full (acceptance item 3 of the issue: the blacklist has the same gap).
The frontend has no hiding logic of its own [I]. It shows whatever arrives.
The advert leaks through four channels in each packet:
decoded.payload
decoded_json
the nested packet.decoded_json
raw_hex. The client splits the advert bytes into PubKey / Latitude / Longitude / Name itself (public/app.js:93-117) [V].
Live creates a map marker from any advert that has a position (public/live.js:3454-3466) [V].
On the Nodes page, a WS advert overwrites a cached node's name and position (public/nodes.js:657-665) [V].
Recommendation: option (b). Drop the packets that carry a hidden identity's full public key at serve time.
That means ADVERT (pubKey) and ANON_REQ (srcPubKey).
It applies to every packet endpoint and the WS broadcast.
It uses a cached set of hidden transmission IDs. The per-packet check is one map lookup, and nothing is done at all when nothing is hidden.
Why not redaction:
raw_hex cannot be redacted in a meaningful way.
A redacted advert still gives away the packet hash, the time, the observer and the path. The first hop is a repeater near the node, so the path reveals its rough location.
Hop and sender names in other packets are redacted in a separate later milestone (M3). The server stays read-only.
2. Findings with sources
2.1 What an advert carries (firmware)
Payload = 32-byte public key + 4-byte timestamp + 64-byte Ed25519 signature + app_data of at most 32 bytes.
Built by createAdvert, firmware/src/Mesh.cpp:404-438 [I]. The signing block is at Mesh.cpp:425-436 [V].
The same layout is in docs/payloads.md:26-45 [I].
app_data = flags byte, then optional lat/lon (2 × int32, degrees × 1e6, flag ADV_LATLON_MASK 0x10), then optional feat1/feat2, then the name (flag ADV_NAME_MASK 0x80).
Sources: src/helpers/AdvertDataHelpers.h:7-17,29-30,63-64 and .cpp:4-29 [I].
The signature covers pub_key ‖ timestamp ‖ app_data (Mesh.cpp:429-435) [V].
A server cannot strip the position or rename an advert and keep it valid.
Any "redacted advert" is therefore a CoreScope-made object, not a MeshCore packet.
The public key is always present: it is the identity. The name is optional: it is not encoded when empty (AdvertDataHelpers.cpp:20) [I].
ANON_REQ carries the sender's full 32-byte public key. The decoder exposes it as srcPubKey (cmd/server/decoder.go:108-114) [V]. So it leaks the identity as well, though not the position.
2.2 Can a node advert without a position? What the owner must do
Repeater, room server and sensor build adverts through CommonCLI::buildAdvertData (src/helpers/CommonCLI.cpp:169-180) [V]. It has three policies:
ADVERT_LOC_NONE: name only;
SHARE: live GPS;
PREFS: stored node_lat/lon.
The default is PREFS, so these nodes send a location by default (simple_repeater/MyMesh.cpp:923, room :675, sensor SensorMesh.cpp:736) [I].
gps advert none|share|prefs sets the policy (CommonCLI.cpp:352-380, docs/cli_commands.md:1025-1037) [V for 352-360].
It is compiled only when ENV_INCLUDE_GPS == 1 (CommonCLI.cpp:322) [V].
On a build without GPS there is no CLI command to turn the location off. The owner can only set set lat 0 and set lon 0. The advert then still has the 0x10 flag set and carries 0,0, because the firmware has no 0,0 check [I].
Companion radios default to advert_loc_policy = 0 (NONE), so they send no location (examples/companion_radio/NodePrefs.h:9-10,29) [I].
The policy can be changed through CMD_SET_OTHER_PARAMS (MyMesh.cpp:1443-1451) [I].
[A] The app shows this as a location-sharing setting; I did not check the app's UI text.
Advert intervals:
Flood advert: set flood.advert.interval. The code default is 47 h for repeater and room (simple_repeater/MyMesh.cpp:904) [I]. docs/faq.md:209 and cli_commands.md:657 still say 12 h, so the docs look stale [I].
Zero-hop advert: set advert.interval.
Companions advertise only when the user tells them to.
Both intervals are set from the CLI.
What the owner must do on the device:
Turn the location off:
companion: set the location policy to none;
repeater, room or sensor with GPS: gps advert none;
without GPS: set lat 0 and set lon 0.
Rename to 🚫….
Send an advert.
The location must be turned off on the device in any case. CoreScope can stop serving a position, but every other observer, map and dashboard on the mesh still receives it over RF.
CoreScope's Live page already ignores 0,0 positions (public/live.js:3462) [V].
2.3 Inventory: server (cmd/server/)
Packet endpoints. None of them filter [I unless marked]:
RawHex / DecodedJSON of sample packets, adverts included
—
routes.go:1510 POST /api/decode
echoes the caller's own hex
out of scope
WebSocket:
Poller.pollStore broadcasts every new transmission and observation with no filter (websocket.go:392-402) [V].
Hub.Broadcast marshals the message once for all clients (websocket.go:179) [I].
The message bodies are built in IngestNewFromDB (store.go:3108-3190) and IngestNewObservations (store.go:3427-3487). They contain decoded.payload, decoded_json, raw_hex, resolved_path and a nested packet [I].
The no-store fallback is websocket.go:325-350 → db.GetNewTransmissionsSince (db.go:3931) [I].
Other paths that leak a hidden node's name, pubkey or position (in scope for M3/M4) [I]:
blacklist checked, hidden name not checked [V for the blacklist-only lines]
observer neighbours (routes.go:3626-3688)
neighbour nodes
GPS sanity / area analytics (db.go:4311)
node names and positions
Existing filters with bugs (found during this research; worth their own tickets or folding into M3):
handleResolveHops, routes.go:3244-3246 [V]. BestCandidate is set to best.PublicKey even when best was just rejected as hidden at line 3238. This leaks a hidden pubkey.
filterBlacklistedFromSubpaths, routes.go:4303 [V for the code shape]. It never removes anything:
it type-asserts []interface{}, but the store returns []map[string]interface{} [I];
share cards, OG images, per-packet OG meta: there are no og: strings in the Go code, and index.html has static meta tags only [I];
packet export endpoints [I].
Store internals [V]:
StoreTx (store.go:34-80) has no cached advert pubkey. ParsedDecoded() is a lazy sync.Once map.
byNode[pubkey] already indexes every transmission by pubKey, destPubKey and srcPubKey (indexByNode, store.go:1888-1907).
So the transmissions of N hidden pubkeys are found in O(their packets) without scanning the store.
nodeCache (store.go:7156) holds a 30 s snapshot of nodes with current names.
Generation counters:
BlacklistGeneration and HiddenNamePrefixesGeneration (config.go:971,1126) [V].
They are used only by Reach (node_reach.go:587) and Reach-rank (reach_rank.go:210) [V].
Their setters are called only from tests, so there is no hot reload today [I].
2.4 Inventory: frontend (public/)
There is no client-side hiding anywhere: no reference to the 🚫 prefix, hiddenNamePrefix or similar [I]. All of the following are fixed by filtering on the server. No frontend change is required for privacy.
Location
Shows
Source
packets.js:3001-3013getDetailPreview
advert name linked to #/nodes/{pubKey} in every row type
payload.name contains "🚫" lists every hidden advert
decoded_json
live.js:3454-3466 [V]
a map marker for every advert with a position; also its tooltip, heat map (4410), node datalist (2950), feed (4465, 4605), path anchor (3639-3711)
WS, VCR (/api/packets?expand=observations)
nodes.js:657-665 [V]
a WS advert overwrites a cached node's name and position until reload; this also reaches the export (nodes-export.js)
WS
audio-lab.js:120-152,507
raw advert bytes, "lon X° → pan"
/api/audio-lab/buckets
hop-resolver.js
nodes injected on Live remain after switching pages (live.js never resets the resolver)
Live nodeData
These are clean or already gated [I]: map.js markers (built from /api/nodes), channels, traces, compare, observer-detail, home, and the analytics pages. The analytics pages depend only on their server endpoints (see 2.3).
2.5 FAQ
The answer lives on the branch origin/feat/info-faq, file sites/meshview-info/faq.html:519-526, with the anchor #skjul-node (not #hide-node) [V].
It currently says, translated:
adverts with name and position stay on the packets page until they expire after 30 days, and new adverts also show on the Live page;
remove the position from the device.
Packet retention defaults to retention.packetDays: 30 (config.example.json:15) [V].
3. Options
(a) Redact name and position at serve time
(b) Drop packets that carry a hidden full pubkey (recommended)
(c) Drop at ingest (ingestor)
(d) Hide in the frontend only
Privacy
Partial. The pubkey must also go, and raw_hex must be blanked: it holds all fields. The hash, time, observer and path remain, and the first hop reveals a rough location.
Full for adverts. Nothing about the advert is served.
Full for future adverts; already-stored adverts remain.
None. The API still serves everything.
What breaks
Hex breakdown, field table and signature check for those rows. A fabricated advert shape that every consumer must tolerate. Hash lookup still resolves.
/api/packets/{hash} of such a packet returns 404 (the same as unknown). Deep links and replay of those packets stop working. Live shows no marker. Node counts on aggregate stats are unchanged (counts only).
Not reversible. Hidden adverts are lost to analytics, which contradicts the config.example.json promise that "DB rows are preserved". A rename back does not restore them.
—
Perf
Rewriting JSON per packet, plus copies, and caching those copies. Worst on the WS path.
One map lookup per packet; nothing when the set is empty.
—
—
Read-only server
yes
yes
no (ingestor change; allowed, but see above)
yes
Reversible on rename back
yes
yes (the set is rebuilt)
no
yes
Other approaches I considered and rejected:
Coarsening the position (for example to 1 km): it cannot be applied to raw_hex, and a rough position is still a position.
A new per-node opt-out list: YAGNI, because the prefix and the blacklist already express the intent.
4. Recommended design (option b)
Rule: a transmission is identity-hidden when its decoded full pubkey belongs to a hidden identity.
The pubkey field is pubKey for ADVERT and srcPubKey for ANON_REQ.
"Hidden" = identityHidden(cfg, pk, names…), the existing rule:
node blacklist, or observer blacklist;
or a current node, inactive-node or observer name that starts with a hidden prefix.
An ADVERT is also hidden when its own decoded name starts with a hidden prefix. This keeps the first 🚫 advert hidden before the ingestor's nodes row is updated. It also keeps the 🚫 period hidden after a later rename back.
Cache: hiddenTx map[int]struct{} plus hiddenPK map[string]struct{}. They live in PacketStore and are swapped through an atomic pointer.
How the cache is built:
Load hiddenPK:
the blacklist entries;
one bulk query for pubkeys whose nodes / inactive_nodes / observers name matches a prefix. This is a full scan of a table of around 2–10K rows, with no json_each. It is a variant of hiddenNamesSQL without the key list.
Take the union of byNode[pk] restricted to ADVERT and ANON_REQ entries, and add the IDs to hiddenTx.
Under s.mu RLock, copy the slices. Build the maps outside the lock.
When it is rebuilt:
at load;
when BlacklistGeneration or HiddenNamePrefixesGeneration changes;
when a poll batch contains an ADVERT whose hidden status disagrees with hiddenPK. For example:
a 🚫 name from a pubkey not in the set;
a plain name from a pubkey in the set.
This rebuild runs at most once per poll cycle;
after a TTL of about 30 s, aligned with nodeCache, to pick up DB-side changes such as nodes moving to inactive_nodes.
Incremental updates during ingest, before the broadcast:
a new transmission from a pubkey in hiddenPK is added to hiddenTx;
a new advert with a 🚫 name adds its pubkey immediately. This fails closed and covers the window before the DB rebuild.
The cache is bounded by the store size. IDs of evicted transmissions are dropped on the next rebuild.
Where the check goes:
filterPackets (one predicate in the single pass, so totals stay consistent);
QueryMultiNodePackets;
the fast paths of GetPacketByHash, GetTransmissionByID and GetPacketByID, which return 404;
[A] I assume from_pubkey is also filled for ANON_REQ. If it is not, the fallback must parse decoded_json for type 7.
Perf:
With nothing configured, len(hiddenTx)==0 short-circuits: zero cost.
When hiding is active, each packet costs one map lookup with no allocation.
A rebuild costs O(nodes) in SQL plus O(packets of the hidden pubkeys). It runs off the request path, and the copy is taken under RLock.
The WS path stays O(1) per message.
Delay for a rename to 🚫: immediate, through the advert's own name. Delay for a rename back: up to one poll cycle or the TTL, failing closed.
5. Proposed plan (each milestone is one PR, test-first: red on master, green after)
M1: drop hidden-identity adverts and ANON_REQ from every packet response and the WS.
Changes:
Add hiddenTx/hiddenPK and the predicate, applied to every endpoint listed in §4.
Add the visibility epoch to the grouped cache.
Apply the same rule in the SQL fallbacks.
Tests (Go). A fixture advert has a name, a position and a pubkey. Each test runs with the prefix set, then repeats with that pubkey blacklisted instead. Each asserts that the response body contains neither the pubkey, the name nor the lat/lon string:
WS: start a hub client, ingest a hidden advert, then a visible one, and assert that only the visible one arrives;
an advert from before the rename (plain name, same pubkey) is hidden once the node is renamed in the DB;
a 🚫 advert is hidden before the nodes row is updated;
a rename back makes the plain adverts visible again after a rebuild, while the 🚫-era adverts stay hidden;
a generation bump invalidates the grouped cache;
anti-tautology: removing the predicate turns each test red.
Benchmark: BenchmarkFilterPackets30K with 0, 1 and 50 hidden pubkeys.
Budget: ≤ 5 % over the empty-set baseline.
0 extra allocations per packet.
Rebuild under 20 ms with 2K nodes and 30K packets.
Report before and after numbers in the PR.
Browser check:
on the fixture with hiddenNamePrefixes, the hidden node is absent from Packets (payload.name contains "🚫" returns nothing), from the Live map and from a deep link to its advert hash;
a visible node is unchanged.
Docs: update config.example.json_comment_hiddenNamePrefixes and the user guide.
M2: redact hidden hops in packets that stay.
Changes:
resolved_path entries and /api/packets/{hash}/path hops that belong to a hidden pubkey become null, the same as an unresolved hop.
handleResolveHops stops returning BestCandidate for a hidden best match (fixes routes.go:3244).
Cost: O(hops) map lookups per packet, using the same hiddenPK.
Tests:
one per endpoint, plus the WS resolved_path;
a regression test for bestCandidate.
M3: aggregate and analytics endpoints.
Covers:
node paths (intermediate hops), node and observer neighbours, peers;
distance, hash-sizes, collisions, subpaths (rewrite filterBlacklistedFromSubpaths copy-on-write on the real shape, and gate it on prefixes too);
subpath detail (prefix hops), path-inspect, clock-skew, new-nodes and node-changes (add the hidden-name check), GPS sanity, areas.
Approach:
use the hiddenPK set instead of isPubkeyHidden per item, which removes one DB query per edge or hop;
run each filter on a copy, never on the shared cached result.
Tests: one red-to-green test per endpoint, plus a benchmark for subpaths and the neighbour graph.
M4: frontend hardening (defence in depth, small).
nodes.js:657-665: do not overwrite a cached node from a WS advert. Trigger a /api/nodes reload instead, the way map.js already does.
Reset HopResolver when leaving Live.
Tests: test-frontend-helpers.js (vm context) plus a Playwright check.
Customizer (rule 8): there is no new value to configure. The rebuild TTL of about 30 s is internal and should not be exposed.
6. What the FAQ (#skjul-node) should say after M1
Suggested text (English here; the Danish wording is for the owner):
Rename the node so the name starts with 🚫 and send an advert. MeshView then stops showing the node: not on the map, node list, search, packets page or Live page, and not in its adverts or their position — including adverts sent before the rename. Packets your node relays still appear, but your node is shown as an unknown hop.
Hiding is not deleting: the data is kept until it expires after 30 days, and your node's adverts are still broadcast on the radio and can be seen by other maps and apps. To stop publishing your position everywhere, turn location off on the device before you send the advert: companion app – location sharing off; repeater/room with GPS – gps advert none; without GPS – set lat 0 and set lon 0.
Until M2 and M3 ship, add one more sentence: "names of hidden nodes can still show up in some analytics views."
7. Licences and terms
CoreScope is GPL-3.0 (LICENSE) [V].
MeshCore firmware is MIT, "Copyright (c) 2025 Scott Powell / rippleradios.com" (firmware/license.txt) [V].
The firmware was only read, for protocol facts. No code is copied, so no licence obligations arise.
No external service, account or token was used.
8. Open questions for the owner
My default choice is given for each.
ANON_REQ. Should it be dropped like an advert? It carries the hidden node's full public key, in the decoded payload and in raw_hex. Default: yes, in M1. The alternative is to keep it and blank srcPubKey and raw_hex.
🚫-era adverts after a rename back. Should they stay hidden? Default: yes, because the owner asked to be hidden during that period. The alternative is to show everything again once the node is visible.
Packet counts in /api/stats and in the per-type analytics.Default: keep counting hidden packets. They are counts only, with no identity. The alternative is to exclude them, at extra cost, for a small gain.
Old FAQ promise.config.example.json says "DB rows are preserved … for analytics". That stays true under (b). Confirm that option (c), dropping at ingest, is not wanted.
Bugs found along the way. Should the resolve-hopsbestCandidate leak and the no-op subpaths filter go in their own issues now, or stay in M2 and M3 as planned? Default: M2 and M3.
Firmware docs. The interval defaults in faq.md and cli_commands.md (12 h) differ from the code (47 h). Relevant only if our FAQ quotes them: if it does, quote the code value.
Owner decision (2026-11-29): the M0 plan is approved with option (b), with one change to §8.
ANON_REQ: dropped like an advert, in M1 (default).
Changed: adverts from the 🚫 period become visible again when the node is renamed back. Hiding follows the node's current state, not the state when the advert was sent. The advert's own 🚫 name still hides it immediately, before the nodes row is updated, but only while the node is currently hidden.
Packet counts in /api/stats and per-type analytics keep counting hidden packets (default).
Nothing is dropped at ingest; option (c) is not wanted (DB rows are preserved).
The resolve-hopsbestCandidate leak and the subpaths filter stay in M2 and M3 (default).
If our FAQ quotes advert intervals, quote the code value.
M1 merged in #1053: adverts and ANON_REQ of hidden identities (🚫 prefix or blacklist) are no longer served by any packet endpoint or the WebSocket; hiding follows the node's current state. Hop and sender names in other packets (M2/M3) are still open.
Activity
dborup commentedon Nov 29, 2026
Research (M0) — CS-VM1 #1023
Hidden nodes (🚫 prefix) still have their adverts, with name, public key and position, served by
/api/packets*and the WebSocket.Scope: research only. No code was changed, nothing was committed or pushed, and no network calls were made beyond reading the local firmware clone.
master@2c7fbd6c.https://github.com/meshcore-dev/MeshCore@a366955c(committed 2026-09-30).Marking used in this report:
1. Conclusion and recommendation
The gap is larger than the issue describes.
cmd/server/appliesIsBlacklisted,IsNameHiddenoridentityHidden. This covers the packet list, grouped list, detail, batch observations,?node=/?nodes=, the WebSocket broadcast, the node-healthrecentPackets, the observer-analyticsRecentPacketsand the audio-lab buckets [I, verified for the WS loop and the grouped cache].decoded.payloaddecoded_jsonpacket.decoded_jsonraw_hex. The client splits the advert bytes into PubKey / Latitude / Longitude / Name itself (public/app.js:93-117) [V].public/live.js:3454-3466) [V].public/nodes.js:657-665) [V].Recommendation: option (b). Drop the packets that carry a hidden identity's full public key at serve time.
pubKey) and ANON_REQ (srcPubKey).Why not redaction:
raw_hexcannot be redacted in a meaningful way.Hop and sender names in other packets are redacted in a separate later milestone (M3). The server stays read-only.
2. Findings with sources
2.1 What an advert carries (firmware)
createAdvert,firmware/src/Mesh.cpp:404-438[I]. The signing block is atMesh.cpp:425-436[V].docs/payloads.md:26-45[I].ADV_LATLON_MASK 0x10), then optional feat1/feat2, then the name (flagADV_NAME_MASK 0x80).src/helpers/AdvertDataHelpers.h:7-17,29-30,63-64and.cpp:4-29[I].pub_key ‖ timestamp ‖ app_data(Mesh.cpp:429-435) [V].AdvertDataHelpers.cpp:20) [I].srcPubKey(cmd/server/decoder.go:108-114) [V]. So it leaks the identity as well, though not the position.2.2 Can a node advert without a position? What the owner must do
CommonCLI::buildAdvertData(src/helpers/CommonCLI.cpp:169-180) [V]. It has three policies:ADVERT_LOC_NONE: name only;SHARE: live GPS;PREFS: storednode_lat/lon.PREFS, so these nodes send a location by default (simple_repeater/MyMesh.cpp:923, room:675, sensorSensorMesh.cpp:736) [I].gps advert none|share|prefssets the policy (CommonCLI.cpp:352-380,docs/cli_commands.md:1025-1037) [V for 352-360].ENV_INCLUDE_GPS == 1(CommonCLI.cpp:322) [V].set lat 0andset lon 0. The advert then still has the 0x10 flag set and carries 0,0, because the firmware has no 0,0 check [I].advert_loc_policy = 0(NONE), so they send no location (examples/companion_radio/NodePrefs.h:9-10,29) [I].CMD_SET_OTHER_PARAMS(MyMesh.cpp:1443-1451) [I].set flood.advert.interval. The code default is 47 h for repeater and room (simple_repeater/MyMesh.cpp:904) [I].docs/faq.md:209andcli_commands.md:657still say 12 h, so the docs look stale [I].set advert.interval.gps advert none;set lat 0andset lon 0.🚫….advert.public/live.js:3462) [V].2.3 Inventory: server (
cmd/server/)Packet endpoints. None of them filter [I unless marked]:
routes.go:1248handlePackets?nodes=→store.QueryMultiNodePackets(store.go:2717)routes.go:1311-1327groupByHash→QueryGroupedPackets(store.go:2048) →groupedTxsToPage(store.go:2128)raw_hex,decoded_json, pathstore.go:2070) has no visibility generation [V]routes.go:1329-1343list →QueryPackets(store.go:1972) →filterPackets(store.go:3586) →txToMap/txToMapWithRP(store.go:4136/4191)raw_hex,decoded_json,resolved_path(full hop pubkeys), observations?node=usesbyNode. The SQL fallback isdb.QueryPackets(db.go:682)routes.go:1399handlePacketDetail(/api/packets/{hash or id})raw_hexfor each observation (routes.go:1466)routes.go:1371POST/api/packets/observations→enrichObsWithTx(store.go:4094)raw_hex,decoded_json,resolved_pathroutes.go:3773/api/packets/{hash}/path→db.GetPacketPath(db.go:2783)routes.go:2180/api/nodes/{pk}/health→GetNodeHealth(store.go:9873)recentPacketsroutes.go:3707observer analytics →buildRecentPackets(observer_analytics.go:197)raw_hex,decoded_jsonroutes.go:3935/api/audio-lab/bucketsRawHex/DecodedJSONof sample packets, adverts includedroutes.go:1510POST/api/decodeWebSocket:
Poller.pollStorebroadcasts every new transmission and observation with no filter (websocket.go:392-402) [V].Hub.Broadcastmarshals the message once for all clients (websocket.go:179) [I].IngestNewFromDB(store.go:3108-3190) andIngestNewObservations(store.go:3427-3487). They containdecoded.payload,decoded_json,raw_hex,resolved_pathand a nestedpacket[I].websocket.go:325-350→db.GetNewTransmissionsSince(db.go:3931) [I].Other paths that leak a hidden node's name, pubkey or position (in scope for M3/M4) [I]:
routes.go:2246handleNodePathsneighbor_api.gonode neighbours (around lines 183-197)node_analytics_summary.go:404)routes.go:2915distance (store.go:5604-5612)store.go:8583-8596, 8697, 8737, 8755)store.go:8949-8952)routes.go:3082)path_inspect.go:236,345clock_skew.go:851)new_nodes.go:92,node_changes.go:71routes.go:3626-3688)db.go:4311)Existing filters with bugs (found during this research; worth their own tickets or folding into M3):
handleResolveHops,routes.go:3244-3246[V].BestCandidateis set tobest.PublicKeyeven whenbestwas just rejected as hidden at line 3238. This leaks a hidden pubkey.filterBlacklistedFromSubpaths,routes.go:4303[V for the code shape]. It never removes anything:[]interface{}, but the store returns[]map[string]interface{}[I];hopsas a list, buthopsis a count [I];NodeBlacklist[I];isPubkeyHidden,routes.go:227-237[V]. It runs one DB query per call. It is used per edge or per hop in the neighbour graph and in subpaths.Already correct:
/api/nodes,/api/nodes/search,/api/nodes/{pk}, bulk-health, resolve, rx-coverage, rx-dashboard, reach, reach-rank;topology_privacy.go, copy-on-write).Not present in the server:
og:strings in the Go code, andindex.htmlhas static meta tags only [I];Store internals [V]:
StoreTx(store.go:34-80) has no cached advert pubkey.ParsedDecoded()is a lazysync.Oncemap.byNode[pubkey]already indexes every transmission bypubKey,destPubKeyandsrcPubKey(indexByNode,store.go:1888-1907).nodeCache(store.go:7156) holds a 30 s snapshot of nodes with current names.Generation counters:
BlacklistGenerationandHiddenNamePrefixesGeneration(config.go:971,1126) [V].node_reach.go:587) and Reach-rank (reach_rank.go:210) [V].2.4 Inventory: frontend (
public/)There is no client-side hiding anywhere: no reference to the 🚫 prefix,
hiddenNamePrefixor similar [I]. All of the following are fixed by filtering on the server. No frontend change is required for privacy.packets.js:3001-3013getDetailPreview#/nodes/{pubKey}in every row typedecoded_jsonpackets.js:3394-3406decoded_jsonpackets.js:3743-3762buildFieldTable;:3510-3516hex dump;app.js:93-117byte rangesraw_hex,decoded_jsonpackets.js:2854-2878replay →sessionStorage→live.js:1686/api/packets/{hash}packets.js:3604-3675,map.js:1467-1471,1377-1379,route-view-utils.js:39-58/api/packets/{hash}packet-filter.js:341,498-504payload.name contains "🚫"lists every hidden advertdecoded_jsonlive.js:3454-3466[V]/api/packets?expand=observations)nodes.js:657-665[V]nodes-export.js)audio-lab.js:120-152,507/api/audio-lab/bucketshop-resolver.jslive.jsnever resets the resolver)nodeDataThese are clean or already gated [I]:
map.jsmarkers (built from/api/nodes), channels, traces, compare, observer-detail, home, and the analytics pages. The analytics pages depend only on their server endpoints (see 2.3).2.5 FAQ
origin/feat/info-faq, filesites/meshview-info/faq.html:519-526, with the anchor#skjul-node(not#hide-node) [V].retention.packetDays: 30(config.example.json:15) [V].3. Options
raw_hexmust be blanked: it holds all fields. The hash, time, observer and path remain, and the first hop reveals a rough location./api/packets/{hash}of such a packet returns 404 (the same as unknown). Deep links and replay of those packets stop working. Live shows no marker. Node counts on aggregate stats are unchanged (counts only).config.example.jsonpromise that "DB rows are preserved". A rename back does not restore them.Other approaches I considered and rejected:
raw_hex, and a rough position is still a position.4. Recommended design (option b)
Rule: a transmission is identity-hidden when its decoded full pubkey belongs to a hidden identity.
pubKeyfor ADVERT andsrcPubKeyfor ANON_REQ.identityHidden(cfg, pk, names…), the existing rule:nodesrow is updated. It also keeps the 🚫 period hidden after a later rename back.Cache:
hiddenTx map[int]struct{}plushiddenPK map[string]struct{}. They live inPacketStoreand are swapped through an atomic pointer.How the cache is built:
hiddenPK:nodes/inactive_nodes/observersname matches a prefix. This is a full scan of a table of around 2–10K rows, with nojson_each. It is a variant ofhiddenNamesSQLwithout the key list.byNode[pk]restricted to ADVERT and ANON_REQ entries, and add the IDs tohiddenTx.s.muRLock, copy the slices. Build the maps outside the lock.When it is rebuilt:
at load;
when
BlacklistGenerationorHiddenNamePrefixesGenerationchanges;when a poll batch contains an ADVERT whose hidden status disagrees with
hiddenPK. For example:This rebuild runs at most once per poll cycle;
after a TTL of about 30 s, aligned with
nodeCache, to pick up DB-side changes such as nodes moving toinactive_nodes.Incremental updates during ingest, before the broadcast:
hiddenPKis added tohiddenTx;The cache is bounded by the store size. IDs of evicted transmissions are dropped on the next rebuild.
Where the check goes:
filterPackets(one predicate in the single pass, so totals stay consistent);QueryMultiNodePackets;GetPacketByHash,GetTransmissionByIDandGetPacketByID, which return 404;enrichObsWithTxcallers: batch observations, node health, observer analytics;/api/packets/{hash}/path, which returns 404;pollStore: skip the broadcast when the transmission or observation ID is inhiddenTx.The grouped-cache key gains
|v<visibility epoch>.SQL fallbacks (no store loaded): add
AND NOT (payload_type IN (4,7) AND lower(from_pubkey) IN (…hiddenPK…)).from_pubkeyis indexed and written by the ingestor (bug: pubkey attribution via LIKE-on-JSON is unsound — adversarial spoofing + same-name false positives + perf Kpa-clawbot/CoreScope#1143,cmd/ingestor/db.go:2637) [V for the comment].from_pubkeyis also filled for ANON_REQ. If it is not, the fallback must parsedecoded_jsonfor type 7.Perf:
len(hiddenTx)==0short-circuits: zero cost.5. Proposed plan (each milestone is one PR, test-first: red on master, green after)
M1: drop hidden-identity adverts and ANON_REQ from every packet response and the WS.
Changes:
hiddenTx/hiddenPKand the predicate, applied to every endpoint listed in §4.Tests (Go). A fixture advert has a name, a position and a pubkey. Each test runs with the prefix set, then repeats with that pubkey blacklisted instead. Each asserts that the response body contains neither the pubkey, the name nor the lat/lon string:
/api/packets,groupByHash=true,?node=,?nodes=,/api/packets/{hash}(404), POST observations,/api/packets/{hash}/path, node-healthrecentPackets, observer analytics, audio-lab;nodesrow is updated;Benchmark:
BenchmarkFilterPackets30Kwith 0, 1 and 50 hidden pubkeys.Browser check:
hiddenNamePrefixes, the hidden node is absent from Packets (payload.name contains "🚫"returns nothing), from the Live map and from a deep link to its advert hash;Docs: update
config.example.json_comment_hiddenNamePrefixesand the user guide.M2: redact hidden hops in packets that stay.
Changes:
resolved_pathentries and/api/packets/{hash}/pathhops that belong to a hidden pubkey becomenull, the same as an unresolved hop.handleResolveHopsstops returningBestCandidatefor a hidden best match (fixesroutes.go:3244).hiddenPK.Tests:
resolved_path;bestCandidate.M3: aggregate and analytics endpoints.
Covers:
filterBlacklistedFromSubpathscopy-on-write on the real shape, and gate it on prefixes too);Approach:
hiddenPKset instead ofisPubkeyHiddenper item, which removes one DB query per edge or hop;Tests: one red-to-green test per endpoint, plus a benchmark for subpaths and the neighbour graph.
M4: frontend hardening (defence in depth, small).
nodes.js:657-665: do not overwrite a cached node from a WS advert. Trigger a/api/nodesreload instead, the waymap.jsalready does.HopResolverwhen leaving Live.test-frontend-helpers.js(vm context) plus a Playwright check.Customizer (rule 8): there is no new value to configure. The rebuild TTL of about 30 s is internal and should not be exposed.
6. What the FAQ (
#skjul-node) should say after M1Suggested text (English here; the Danish wording is for the owner):
Until M2 and M3 ship, add one more sentence: "names of hidden nodes can still show up in some analytics views."
7. Licences and terms
LICENSE) [V].firmware/license.txt) [V].8. Open questions for the owner
My default choice is given for each.
raw_hex. Default: yes, in M1. The alternative is to keep it and blanksrcPubKeyandraw_hex./api/statsand in the per-type analytics. Default: keep counting hidden packets. They are counts only, with no identity. The alternative is to exclude them, at extra cost, for a small gain.config.example.jsonsays "DB rows are preserved … for analytics". That stays true under (b). Confirm that option (c), dropping at ingest, is not wanted.resolve-hopsbestCandidateleak and the no-op subpaths filter go in their own issues now, or stay in M2 and M3 as planned? Default: M2 and M3.faq.mdandcli_commands.md(12 h) differ from the code (47 h). Relevant only if our FAQ quotes them: if it does, quote the code value.dborup commentedon Nov 29, 2026
Owner decision (2026-11-29): the M0 plan is approved with option (b), with one change to §8.
nodesrow is updated, but only while the node is currently hidden./api/statsand per-type analytics keep counting hidden packets (default).resolve-hopsbestCandidateleak and the subpaths filter stay in M2 and M3 (default).M1 (server + WS) can start.
test(server): pin the background merge's coverage count and set equal…
test(server): make the WebSocket test's observation broadcast real (#…
dborup commentedon Nov 29, 2026
M1 merged in #1053: adverts and ANON_REQ of hidden identities (🚫 prefix or blacklist) are no longer served by any packet endpoint or the WebSocket; hiding follows the node's current state. Hop and sender names in other packets (M2/M3) are still open.
Merge pull request #1053 from dborup/feat/1023-m1-hidden-identity-pac…
test(privacy): allocation bound of the hop redaction tolerates CI noi…
fix(privacy): hidden relays stay unnamed in the ping-bot reply, node …