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:
@@ -5,8 +5,9 @@
|
||||
# scripts/sim-sweep.sh # the default sweep
|
||||
# SIZES="100 200" LIMITED="200" scripts/sim-sweep.sh
|
||||
#
|
||||
# SIZES run with the seeds' connection limit lifted; LIMITED run again with
|
||||
# libp2p's default limit (about 190 inbound connections on 16 GB of RAM).
|
||||
# SIZES run with the seeds' connection limit as shipped (1000 for a --public
|
||||
# node); LIMITED run again with libp2p's own default (about 190 inbound
|
||||
# connections on 16 GB of RAM), which is how it was before the limit was set.
|
||||
cd "$(dirname "$0")/.." || exit 1
|
||||
OUT=.tmp/sim
|
||||
mkdir -p "$OUT"
|
||||
@@ -27,6 +28,6 @@ run() { # run NODES SEEDCONNS LABEL
|
||||
return 0
|
||||
}
|
||||
|
||||
for n in $SIZES; do run "$n" 5000 "lifted-$n"; done
|
||||
for n in $LIMITED; do run "$n" "" "default-$n"; done
|
||||
for n in $SIZES; do run "$n" 0 "fixed-$n"; done # the node's own default for a --public node
|
||||
for n in $LIMITED; do run "$n" -1 "default-$n"; done # libp2p's default, the way it was before the fix
|
||||
echo "done: $(ls $OUT/*.json | wc -l) runs in $OUT"
|
||||
|
||||
Reference in New Issue
Block a user