6 Commits
Author SHA1 Message Date
nilsandClaude Sonnet 5.5 dfe35b422d Renew the device certificate from the browser, with the recovery phrase
Within the last 30 days the owner page offers it. The node signs a new certificate for the same device key (peer ID and listings stay), saves it, and signs again own listings that would outlive the old certificate. The phrase is used for one request and not kept; another identity's phrase and no-phrase identities are refused. Device.Current gives the certificate to sign with while a renewal happens.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
2026-11-18 23:19:30 +01:00
nilsandClaude Sonnet 5.5 0d5903be79 abuse reports in the browser: notice, visitor tips, operator form and queue
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
2026-11-18 21:23:13 +01:00
nilsandClaude Sonnet 5.5 6995364edc Place names for --region, an expiry reminder, and e2e checks through the UI
--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
2026-11-18 10:51:56 +01:00
nilsandClaude Sonnet 5.5 e7bec4fb63 Add bootstrap nodes, DNS-based discovery, a DHT per region and NAT traversal
- 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>
2026-11-17 22:14:34 +01:00
nilsandClaude Sonnet 5.5 a81595e9ee Announce incoming messages on the node's terminal
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>
2026-11-17 21:29:49 +01:00
nilsandClaude Sonnet 5.5 20ea9b32f7 Add e2e script to the repo, Dockerfile, and a Nix flake with a NixOS module
- 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>
2026-11-17 21:21:21 +01:00