SPECS: handover section, image build-and-pin procedure, current anti-entropy interval

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
This commit is contained in:
2026-11-25 08:05:12 +01:00
co-authored by Claude Sonnet 5.5
parent e0f53dfcda
commit dcfffc09fe
+62 -4
View File
@@ -6,9 +6,52 @@ the rules the owner has set. The protocol itself is in
how to run a node is in [README.md](README.md); the Kubernetes setup is in how to run a node is in [README.md](README.md); the Kubernetes setup is in
[k8s/README.md](k8s/README.md). This file does not repeat them. [k8s/README.md](k8s/README.md). This file does not repeat them.
Status as of 2026-11-19. Check `git log` before trusting any "not built yet" Status as of 2026-11-25. Check `git log` before trusting any "not built yet"
below. below.
## Handover: where things stand
For an agent starting fresh. Everything is committed and pushed to `main`; the
tree was clean at the end of the last session.
**State.** The node is feature-complete for a first public run: identity,
listings, gossip and sync, messaging, abuse reports, a web UI, metrics, an
"Invite someone" page (`allmende address`), recovery of own listings, and
measured limits (memory, relay). The manifest pins image `960a6e6`. The owner
applies manifests by hand; whether the cluster runs that image is theirs to say.
**Decided in the last session, do not reopen without new facts**
- Message-sender abuse reports: not built (see "What is left").
- Vouching and signed blocklists: deferred until there are enough independent
operators (see "What is left").
- The bootstrap node runs with `--no-phrase` on purpose: its identity lapses
after a year and is replaced (`k8s/README.md`). Do not advise backing it up.
**Nothing is in progress.** Pick the next item with the owner. Candidates, with
what each still needs:
| Item | Needs from the owner |
|---|---|
| Second bootstrap name (a dynamic-DNS host as fallback to `allmende.stinnesbeck.com`) | the DDNS hostname (outside `stinnesbeck.com`) and the public node's peer ID (pod log line `node running ... peer_id=...`). Do not guess either |
| Manage the trusted-reporter list from the web UI or a file | a go-ahead; small |
| `--max-relay-reservations` flag (relay holds libp2p's default 128 and refuses the rest) | whether they want a different number |
| Real-NAT relay and hole-punching test | a machine behind a NAT; cannot be done alone |
| Forward secrecy for messages | a design decision (cost: a recovered device cannot read old messages) |
| Images | the legal review first (§184b StGB) |
| Owner's signed reply to a report; reporter reputation | a design decision; only after reports see real use |
**Traps**
- Never touch the cluster (rules below). `kubectl kustomize k8s/base` renders
locally and is fine.
- The args script in `k8s/base/statefulset.yaml` builds the command with
`set --`: every line but the last needs a trailing `\`.
- The difficulty change (16 to 24) is network-wide: old and new nodes exchange
no listings.
- Test IPs must be real public ones (1.1.1.1, 8.8.8.8): libp2p treats the
documentation ranges as non-public.
- Before killing a process, check it is yours; do not use `pkill -f` or
`pgrep -f` with a pattern that also matches your own shell. Kill by PID.
## The idea ## The idea
*Allmende* is German for "commons". It is a **free, distributed marketplace for *Allmende* is German for "commons". It is a **free, distributed marketplace for
@@ -84,8 +127,8 @@ in the middle.
- **Network.** libp2p. Gossipsub topics per **region** (a 3-character geohash - **Network.** libp2p. Gossipsub topics per **region** (a 3-character geohash
cell, ~150 km) plus global topics for revocations and reports. New cell, ~150 km) plus global topics for revocations and reports. New
connections sync with **digests** (only what differs is transferred) and a connections sync with **digests** (only what differs is transferred) and a
background **anti-entropy** round every 30 minutes repairs gossip lost while background **anti-entropy** round every 10 minutes (3 peers per round)
connected. Peers are found through DNS (`_dnsaddr` TXT records), a seed repairs gossip lost while connected. Peers are found through DNS (`_dnsaddr` TXT records), a seed
cache, a private Kademlia DHT, mDNS, and NAT traversal (port mapping, hole cache, a private Kademlia DHT, mDNS, and NAT traversal (port mapping, hole
punching, relays through `--public` nodes). punching, relays through `--public` nodes).
- **Messaging.** A buyer's browser makes a throwaway thread key per listing and - **Messaging.** A buyer's browser makes a throwaway thread key per listing and
@@ -238,7 +281,10 @@ These come from the owner and are not negotiable.
- **Commit and push finished work to `main`** (allow rules for `git commit` and - **Commit and push finished work to `main`** (allow rules for `git commit` and
`git push` are set). Add the attribution trailer the harness gives you. `git push` are set). Add the attribution trailer the harness gives you.
- Report honestly: say when tests fail or something was skipped. Do not - Report honestly: say when tests fail or something was skipped. Do not
discard errors to make a test pass; assert the exact outcome. discard errors to make a test pass; assert the exact outcome. If you break
one of these rules, say so in your report.
- Commit trailers: `Co-Authored-By` and `Claude-Session` lines as the harness
gives them.
## Developing ## Developing
@@ -259,6 +305,18 @@ make image # build and push the container image (clean tree only)
- The container image is pinned in `k8s/base/kustomization.yaml` by tag **and** - The container image is pinned in `k8s/base/kustomization.yaml` by tag **and**
registry digest (the local podman digest differs from the registry's; pull the registry digest (the local podman digest differs from the registry's; pull the
tag back to read the real one). tag back to read the real one).
- **Build and pin a new image** (when the owner says "build and pin the new
image"): commit everything first (`make image` needs a clean tree and tags
the image with the short HEAD hash); run `make image`; then
`podman pull --policy=always git.stinnesbeck.com/nils/allmende:<hash>` and
`podman image inspect --format '{{.Digest}}' ...:<hash>`; set `newTag` and
`digest` in `k8s/base/kustomization.yaml` with Edit; update the pin in the
Kubernetes row of the table above; check with `kubectl kustomize k8s/base`;
commit ("k8s: image <hash> and its digest (...)") and push. That commit
moves HEAD, so the pinned tag is always the commit before it. Tell the owner
to run `kubectl apply -k k8s/base`; never run it yourself.
- **Scratch and background work:** put test data in `.tmp/`; stop any
background watcher or test node you started before reporting done.
- Protocol changes must keep **old nodes working**: the deployed bootstrap node - Protocol changes must keep **old nodes working**: the deployed bootstrap node
runs an older version. New sync kinds fall back to the original full pull runs an older version. New sync kinds fall back to the original full pull
when a peer does not know them. when a peer does not know them.