A listing page says when the node hides the listing and who flagged it. A
visitor can tip off the operator (proof-of-work, nothing is hidden by it); the
signed-in operator can sign or withdraw a report from the page and works
through the tips at #/mine/reports. e2e covers the real binaries.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
A report is signed by a node operator (device key and certificate) and
gossiped on one global topic. Each node decides whose reports count: the
operator's own report hides a listing on that node, one trusted report of
illegal content hides it, and --hide-after trusted scam reports hide it
(--trust-reporter names others). Hidden listings stay stored and reachable.
Visitors can tip the node's operator off with a proof-of-work request that
hides nothing.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
Flooding a listing's inbox now gets dearer with every envelope. Relays ask
more proof-of-work from half full on, the node tells browsers the current
price, and the browser mines to it (or says the listing is too busy).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
SIGINT, SIGTERM and SIGHUP all shut the node down in order (SIGTERM is what a
Kubernetes pod termination sends). A second signal, or 20 seconds (below the
30 s Kubernetes grants), stops the process at once, so a stuck shutdown cannot
hang.
The binary knows its version (allmende version, and the 'node running' log
line); the image is built with the commit as version and 'make image' pushes it
tagged with that commit, refusing a dirty tree.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
For bootstrap nodes and other unattended setups: nothing is shown or logged,
and the data directory is marked so later messages do not point to
'allmende recover', which cannot work. The identity lasts the certificate
lifetime (a year) and then has to be replaced; the node says so.
The Kubernetes StatefulSet now initialises itself on first start with it,
so no manual exec step is left.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
The link holds the admin token. Where the terminal is a log (containers) it
would end up in log storage; the notice then only says where the token file
is. The Kubernetes manifest uses it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
k8s/base (kustomize): StatefulSet with a volume, p2p LoadBalancer for 4001
TCP+UDP, ClusterIP for the UI, optional ingress; k8s/overlays/nodeport for
clusters without a load balancer. The pod waits for 'allmende init' so the
recovery phrase never goes to a log.
--announce makes a node that sits behind a router or in a container announce
the address others can dial (e.g. /dns4/name/tcp/4001), so a bootstrap node
behind a port forward works, and the DNS records it prints name the host.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
Opt-in, as one line of words. Uses wl-copy, xclip, xsel, pbcopy or clip.exe,
and falls back to asking the terminal (OSC 52), which works over SSH. The
output says how it was copied and to clear the clipboard afterwards.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
--region takes a place name as well as a code ("Bonn", "Köln", "cologne",
"name:dub" to force a name that looks like a code). The node uses the same
GeoNames list as the browser (internal/places), follows the place's cell plus
any cell within 40 km, and prints what each name became.
The node reminds the owner on its terminal, once a day per listing, about
every listing with 5 days or less left (the UI marks the same range). The
sign-in token is never in the line.
scripts/e2e/ui.ts drives the real bundle in jsdom against real nodes: a buyer
writes from a listing page, the owner reads and answers in their own page and
the buyer's page shows the verified answer; a node with no region gets its
first one by place name in the browser and keeps it over a restart. e2e.sh
also checks --region by name and the reminder, and keeps its scratch files in
the checkout's .tmp.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
A node now starts without any region (it only helps others connect, and
prints a hint). The owner's sign-in link leads straight to the Regions page
when none is followed, visitors get a notice instead of an empty search, and
status always lists regions as an array.
The Docker image no longer pins Bonn, the NixOS module no longer requires
regions, and the VM test now starts without any, chooses the first region
over the API and checks it survives a restart. README and the init hint
follow.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
The p2p node can now add and drop regions while running (SetRegions):
topics, validators, subscriptions and per-region peer discovery start and
stop with them, and a newly followed region catches up by sync.
PUT /api/v1/regions (owner token) applies a change and the node saves it in
regions.json, which wins over --region from then on. The owner's browser
gets a "Regions" page: search a place by name (GeoNames cities, offline,
CC BY 4.0), follow its cell plus any cell within about 40 km.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
- Bootstrap: built-in /dnsaddr/allmende.stinnesbeck.com (TXT records at
_dnsaddr.<name>), resolved at every redial with the last good answer kept;
--bootstrap takes /p2p/ or /dnsaddr/ entries, --no-default-bootstrap drops
the built-in one. Stopping never waits for a stuck resolver.
- Remembered peers in peers.json (saved every 5 min and on shutdown, redialled
at the next start)
- Private Kademlia DHT (/allmende prefix), advertised and looked up per region
with quick first attempts and a backoff; --no-dht turns it off
- NAT traversal: port mapping, hole punching, AutoRelay through bootstrap nodes
- --public: DHT server and relay for a bootstrap node; prints the TXT records
- Docker, NixOS module (public, defaultBootstrap, QUIC/UDP) and docs updated
- e2e: bootstrap node scenario, seed cache restart, and polling that really polls
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The node now checks for new messages every 10 s in the background (before,
only when the web UI asked), and Inbox.Collect reports newly filed visible
messages through OnArrivals. The CLI logs one line per conversation with the
listing title and a link to it, never the buyer's text. Hidden messages are not
announced, a backlog is capped at 5 lines, and a lock stops a background check
and a UI request from filing the same message twice.
The e2e checks that node A announces the message before its API is called.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- scripts/e2e.sh (+ scripts/e2e/*.ts): the two-node end-to-end test, now
self-contained and cleaning up after itself; `make e2e`, part of `make check`
- Dockerfile/.dockerignore: static Go build in a non-root alpine image, data in
/data, defaults to region u1j; `make docker`
- flake.nix, nix/: package (buildGoModule), dev shell, NixOS module
services.allmende (hardened systemd unit that waits for `allmende-admin init`),
and a NixOS VM test run by `nix flake check`
- README: running a node with Docker and NixOS
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Conversations and the owner screen refreshed every 20 s and 30 s. A shared
keepFresh helper now checks every 8 s while the tab is visible, pauses when
it is hidden, catches up at once when it returns, never overlaps runs, and
stops when the screen is gone or the owner token is. The latter also stops
the sign-in form being redrawn under someone typing.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Ctrl+Enter (Cmd+Enter on a Mac) submits the buyer's and the owner's message
boxes through the normal form, so the usual checks apply. Plain Enter still
adds a line. The empty box hints at the shortcut. Not added to the publish
description or the address-release note, where it could submit by accident.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- cmd/node -> cmd/allmende; usage, messages and docs use the new name
- Makefile: build, init, run (REGION defaults to u1j, Bonn), vet, test,
web, web-test, check, clean
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Form at #/mine/new and #/mine/<id>/edit: coordinates pasted and encoded
to a precision-6 geohash in the browser (about 1 km, OSM link to check, no
map tiles), euro price parsing, optional exact address saved on the node only
- Region guard: refuses places the node does not follow; region fixed on edit
- Owner view: days left with a warning under 5 days, manual Renew (30 days),
Edit, Delete with confirmation
- Tests (jsdom and pure logic), docs, rebuilt web/dist
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The release sheet gets an optional email field, prefilled from the saved
address and kept with it. A conversation suggests releasing the address
when the buyer's latest message contains words like "address" or "wo
genau" (a keyword guess, German and English, only ever a suggestion).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Web: "My listings" (listings, requests of a listing, conversation) in
three panes on wide screens and one at a time on phones, and a sheet or
dialog to release the exact address. Sign-in uses a link printed by
`node run` (token in the URL fragment, kept in sessionStorage only).
API: GET /api/v1/mine (own listings with request counts and whether an
address is saved); inbox rows gain last_dir, needs_reply, preview,
effort and grant_until, and can be filtered by listing.
Docs: PROTOCOL.md and README describe the owner UI and login.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Wire format (internal/message): sealed boxes to the listing's device key
(X25519 + HKDF + ChaCha20-Poly1305), padded, proof-of-work stamped, with
signed owner replies and address grants. Relay validation, bounded queues,
gossip on per-region message topics and sync (store, p2p).
Owner side (internal/inbox, API): inbox with hidden link messages and a
per-day new-thread limit, replies, grants, and a private per-listing
address. Public POST/GET /api/v1/messages for buyers.
Browser: noble-based sealing and reply verification checked against a Go
fixture, contact form, conversation view, message list, de/en strings.
Docs: PROTOCOL.md messaging section matches the implementation.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Every node now serves a search and listing-detail UI at GET /. It is
vanilla TypeScript, bundled unminified into web/dist (committed) and
embedded with go:embed, so `go build` is enough to run a node.
The browser verifies each listing itself (certificate, binding, validity,
signature, proof-of-work) with pure-JS ed25519, so a gateway can withhold
listings but not forge them. Unverifiable results are hidden and their
content is never shown. Listing text is only inserted via textContent and
the UI is served with a strict CSP.
Canonical JSON is reimplemented in TypeScript and tested against a golden
fixture signed by the Go code. /api/v1/status now reports difficulty.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- cmd/node: init (recovery phrase onboarding), run, recover
- api: public reads of canonical signed records, token-protected writes
- identity: RevokeAll voids every device certified before a cutoff, so
recovery works with only the phrase; store purges by certificate age
- p2p: redial bootstrap peers, sync on every new connection (in-flight
guard only), validate bootstrap addresses up front
- docs: API, recovery semantics, peer-ID change on recovery
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- identity: 12-word recovery phrase, device certificates, revocations,
device key storage; the identity key is never stored on a node
- listing: signed by a device with an embedded certificate, domain-separated
signatures, ErrTimeWindow for clock-related failures, region helpers
- store: revocations purge a device's listings; keyset-paged Since for sync
- p2p: gossipsub topic per geohash region plus a global revocation topic,
validators run before relaying, /allmende/1/sync catch-up protocol,
bootstrap peers and mDNS
- docs: key model, replication and conflict rules
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Put verifies listings and keeps only the newest version per
(author, id); equal seq resolves to the smaller hash so replicas converge
- Tombstones are stored so old versions cannot be resurrected
- Search by geohash prefix, kind, category, price, area, rooms
- Expire removes listings and tombstones past their lifetime
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- internal/jcs: RFC 8785 canonical JSON (integers only)
- internal/identity: ed25519 keypair, 0600 key file, no overwrite
- internal/listing: signed listing record with PoW, validation,
tombstones and supersede rules
- docs/PROTOCOL.md: architecture and decisions so far
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>