bootstrap-peers: add pocketlawb with a dialable p2p multiaddr - #297
bootstrap-peers: add pocketlawb with a dialable p2p multiaddr#297boyroywax wants to merge 1 commit into
Conversation
Every existing entry has "p2p_multiaddr": null, so merge_into_vecs contributes no addresses to config.p2p_bootstrap and nodes start with nothing to dial. With no AutoNAT in the swarm a node cannot discover and publish its own public address, so the seed list is the only channel. This node is on a static public IPv4 with no NAT. Reachability was verified from an isolated node on a separate host and network with GITLAWB_BOOTSTRAP_DISABLE_SEEDS=true and no HTTP peers, which reported connected_peers=1 and gossipsub_all_peers=1 — a completed handshake and mesh join, not just an inbound packet. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Thanks for the contribution. A couple of things will help us review this faster:
See CONTRIBUTING.md. Update the PR and these notes will clear automatically. |
📝 WalkthroughWalkthroughThe bootstrap peer registry timestamp was updated to ChangesBootstrap peer registry
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Updates the Gitlawb network’s canonical bootstrap seed list to include a new peer (pocketlawb) with a dialable libp2p QUIC-v1 multiaddr, enabling nodes to actually populate config.p2p_bootstrap and attempt P2P connections at startup.
Changes:
- Bumped the seed list
updateddate to2026-08-01. - Added a new bootstrap peer entry (
pocketlawb) including a non-nullp2p_multiaddr.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@bootstrap-peers.json`:
- Around line 45-52: Add a regression test covering the new pocketlawb
p2p_multiaddr through merge_into_vecs, rather than only parse_seed_list; verify
the embedded JSON or specific address is successfully parsed and added to
config.p2p_bootstrap without failure, reusing the existing bootstrap
configuration and test helpers.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| }, | ||
| { | ||
| "name": "pocketlawb", | ||
| "operator": "pocketlawb", | ||
| "did": "did:key:z6MkiKcvf32z2tcNCGKscxmtszZqpBUrVFa82FTvPnfAhDNF", | ||
| "http_url": "https://node.pocketlawb.com", | ||
| "p2p_multiaddr": "/dns4/node.pocketlawb.com/udp/7546/quic-v1/p2p/12D3KooWMGuHkbfJ9gTHL7dFozefF3PruxGMvRopE8prPC7eScNH", | ||
| "added": "2026-08-01" |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C 12 'fn merge_into_vecs|p2p_multiaddr|p2p_bootstrap|Multiaddr' crates/gitlawb-node/src/bootstrap.rs
rg -n -C 8 'embedded_seed_list_parses_successfully|merge_seeds|pocketlawb' crates/gitlawb-nodeRepository: Gitlawb/node
Length of output: 12576
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Inspect the exact new peer entry and determine whether there is any direct regression test for merge_into_vecs with embedded JSON.
python3 - <<'PY'
from pathlib import Path
import re
json_path = Path("bootstrap-peers.json")
bootstrap = Path("crates/gitlawb-node/src/bootstrap.rs")
data = json_path.read_text()
for m in re.finditer(r'\{"name"\s*:\s*"pocketlawb"[\s\S]*?\n\s*\}', data):
block = m.group(0)
print("pocketlawb_block:")
print(block)
print("contains_p2p_multiaddr=", '"p2p_multiaddr"' in block)
src = bootstrap.read_text()
print("embedded_regression_uses_merge_into_vecs=", "merge_into_vecs" in src[src.find("fn embedded_seed_list_parses_successfully"):])
PY
# Check whether the libp2p crate is available in vendor/tooling without executing repo code.
if command -v cargo >/dev/null 2>&1; then
cargo --version
cargo tree --package gitlawb-node --no-dedupe 2>/dev/null | rg 'libp2p|Multiaddr|libp2p-core' | head -50 || true
fiRepository: Gitlawb/node
Length of output: 142
Validate the new multiaddr through the bootstrap merge path.
merge_into_vecs parses p2p_multiaddr with Multiaddr::from_str before adding it to config.p2p_bootstrap, but embedded_seed_list_parses_successfully only calls parse_seed_list. Add a regression that runs the embedded JSON through merge_into_vecs for the new pocketlawb entry, or add a specific merge test for this address.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@bootstrap-peers.json` around lines 45 - 52, Add a regression test covering
the new pocketlawb p2p_multiaddr through merge_into_vecs, rather than only
parse_seed_list; verify the embedded JSON or specific address is successfully
parsed and added to config.p2p_bootstrap without failure, reusing the existing
bootstrap configuration and test helpers.
beardthelion
left a comment
There was a problem hiding this comment.
The pocketlawb multiaddr is well-formed for the merge path. Multiaddr::from_str accepts it, merge_into_vecs of the embedded JSON adds exactly that string to p2p_bootstrap, and GET https://node.pocketlawb.com/api/v1/p2p/info reports the same peer_id as the /p2p/ component. /health and /ready are ok.
Findings
- [P2] Pin the embedded multiaddr through merge_into_vecs
crates/gitlawb-node/src/bootstrap.rs:310
Same ask as CodeRabbit. embedded_seed_list_parses_successfully only calls parse_seed_list. I corrupted pocketlawb's p2p_multiaddr to "not-a-multiaddr" and that test stayed green; merge_into_vecs then added zero p2p entries. Extend the embedded regression (or add a sibling) so parse_seed_list(EMBEDDED_PEERS_JSON) plus merge_into_vecs asserts counts.p2p >= 1 and the pocketlawb address is present. That is the load-bearing check for a dialable seed entry.
One process note, not a finding: this would be the first non-null p2p_multiaddr in the canonical seed list, and it would make a third-party node the fleet's first compile-time dial target. Public-node PRs are welcome for the HTTP seed path; landing a dialable multiaddr in every binary is a separate network-ops call. We are holding on that admission until we settle it on our side. The merge-path test above still applies either way.
Not an ask, recorded only: merge does not bind the optional did field to the /p2p/ PeerId. Trust for seed dial targets stays the PR review of this file. Operators can still set GITLAWB_BOOTSTRAP_DISABLE_SEEDS.
Adds
pocketlawbto the canonical seed list, with a dialablep2p_multiaddr— currently the only entry in the file that has one.Why this might be useful beyond one more peer
Every existing entry has
"p2p_multiaddr": null, somerge_into_vecsincrates/gitlawb-node/src/bootstrap.rscurrently contributes zero addresses toconfig.p2p_bootstrap. Nodes come up with nothing to dial, and the Kademlia/Gossipsub layer stays idle while federation happens over HTTP.node.gitlawb.comreportsconnected_peers: 0and advertises only loopback and private addresses, which is consistent with that.There's no AutoNAT or identify-based external address discovery in the swarm, so a node cannot learn its own public address and publish it itself — the seed list is the only channel. This node runs on a plain VPS with a static public IPv4 and no NAT, so it can serve as a stable dial target.
Verification
Reachability was confirmed with an isolated node on a separate host and network (different provider region), configured so that a successful connection could only have come from this listener:
With the embedded seeds disabled and no HTTP peers, the test node reported:
{"connected_peers": 1, "gossipsub_all_peers": 1}gossipsub_all_peers: 1indicates the full Noise + muxer handshake completed and the node joined thegitlawb/ref-updates/v1mesh, not merely that a UDP packet arrived. The target reported the reciprocal connection. The test host was destroyed afterwards./dns4rather than/ip4is deliberate:libp2p_dns::tokio::Transport::system(quic)resolves at dial time, so the entry survives an address change without another PR.Node details
did:key:z6MkiKcvf32z2tcNCGKscxmtszZqpBUrVFa82FTvPnfAhDNFGET /healthreturns{"status":"ok"}and/readyconfirms the database pool. The node is federating and mirroring, andnode.gitlawb.comlists it asreachable: true.Happy to adjust the entry format or drop the
updatedbump if you'd rather manage that field separately.Summary by CodeRabbit