p2p: a --public node accepts 1000 inbound connections (--max-conns), instead of libp2p's memory-scaled default

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
This commit is contained in:
2026-11-18 22:46:05 +01:00
co-authored by Claude Sonnet 5.5
parent 130ba5dc65
commit 86668baf5a
10 changed files with 170 additions and 53 deletions
+3 -4
View File
@@ -141,10 +141,9 @@ starting a design-heavy item; see "Working with the owner".
access exists. Listings already have an `images` field of hashes.
- **Recovering listings onto an empty database** (after losing the data
directory but not the phrase).
- **Connection limits for `--public` nodes.** Found by `allmende-sim`: libp2p's
default inbound cap scales with RAM (~190 on 16 GB), so a bootstrap node
strands newcomers beyond that. Set explicit limits for public nodes (and
check the k8s memory limit).
- **Check a public node's memory under load.** `--public` nodes now accept
1000 inbound connections (`--max-conns`); nobody has measured a node holding
that many against the 512 MiB pod limit.
- **Peer scoring and rate limits** beyond what the validators do now. The
simulator's attacker stays connected after 500 bad messages.
- **Joining without the seeds.** A newcomer whose remembered peers are all in