About 4 s to mine one listing on 8 cores now that the miner is fast. Nodes of the old default refuse nothing from new ones, but a node at 24 refuses listings mined for 16, so the bootstrap node needs the new image to exchange listings with updated nodes.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
pow.Mine finds the smallest nonce, exactly what trying 0, 1, 2, ... finds, so every signed record and golden fixture stays the same. It saves the SHA-256 state after the whole blocks before the nonce, hashes only the number and what follows per attempt, and uses every core but one from difficulty 14 up. Listing, report, revocation and message mining use it; each re-checks the result before signing. One listing at difficulty 16 takes about 19 ms instead of about 2 s. docs/PROTOCOL.md says what proof-of-work can and cannot do against fast hardware.
allmende-load fills a data directory with signed invented listings for capacity tests and measures mining time (-mine-only).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
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
The simulator showed libp2p's default cap (about 190 on 16 GB) stranding newcomers
on a bootstrap node: 12 of 200 and 212 of 400 nodes never found a peer. As
shipped, the same networks now form and deliver 100% up to 600 nodes.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
Findings: default libp2p connection limits strand nodes on a bootstrap node beyond ~190 peers, there is no peer scoring, and newcomers cannot find their region without DHT servers when their remembered peers are elsewhere. Documented in docs/PROTOCOL.md and SPECS.md.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
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
- 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>
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>
- 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>
- 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>