From 424c03d59111da2a4bd591609b73ccdee2aa7219 Mon Sep 17 00:00:00 2001 From: James <679773+boyroywax@users.noreply.github.com> Date: Sat, 1 Aug 2026 01:56:25 -0700 Subject: [PATCH 1/2] bootstrap-peers: add pocketlawb with a dialable p2p multiaddr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- bootstrap-peers.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bootstrap-peers.json b/bootstrap-peers.json index f2ce8097..f790c211 100644 --- a/bootstrap-peers.json +++ b/bootstrap-peers.json @@ -1,7 +1,7 @@ { "$comment": "Canonical seed list for the Gitlawb network. Merged with GITLAWB_BOOTSTRAP_PEERS at startup. PRs to add public nodes welcome.", "version": 1, - "updated": "2026-06-30", + "updated": "2026-08-01", "peers": [ { "name": "gitlawb", @@ -42,6 +42,14 @@ "http_url": "https://rapybus-gitlawb.com", "p2p_multiaddr": null, "added": "2026-05-16" + }, + { + "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" } ] } From 8e6d96973db5d9eae555a0167eead55c58e21d88 Mon Sep 17 00:00:00 2001 From: Kevin Codex Date: Mon, 31 Aug 2026 14:18:58 +0800 Subject: [PATCH 2/2] test(bootstrap): pin the embedded multiaddr through merge_into_vecs Parsing alone let a corrupted p2p_multiaddr stay green while the merge silently skipped it; assert the embedded list yields at least one dialable entry and that pocketlawb's address survives the real merge path. --- crates/gitlawb-node/src/bootstrap.rs | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/crates/gitlawb-node/src/bootstrap.rs b/crates/gitlawb-node/src/bootstrap.rs index 86a6a201..3a5d68bd 100644 --- a/crates/gitlawb-node/src/bootstrap.rs +++ b/crates/gitlawb-node/src/bootstrap.rs @@ -313,4 +313,41 @@ mod tests { parse_seed_list(EMBEDDED_PEERS_JSON) .expect("embedded bootstrap-peers.json must always parse"); } + + #[test] + fn embedded_seed_list_merges_a_dialable_p2p_entry() { + // Parsing alone is not the load-bearing property for a dialable seed: + // `merge_into_vecs` silently SKIPS a p2p_multiaddr that fails + // `Multiaddr::from_str` (by design — one bad entry must not poison the + // rest), so a corrupted embedded address would pass the parse + // regression above while every shipped binary quietly lost its + // compile-time dial target. Drive the embedded JSON through the real + // merge and pin both the count and the specific pocketlawb address, so + // corruption fails HERE instead of degrading in the field. + let list = parse_seed_list(EMBEDDED_PEERS_JSON) + .expect("embedded bootstrap-peers.json must always parse"); + let pocketlawb_addr = list + .peers + .iter() + .find(|p| p.name == "pocketlawb") + .expect("pocketlawb entry present in embedded seed list") + .p2p_multiaddr + .clone() + .expect("pocketlawb entry carries a p2p_multiaddr"); + + let mut http_peers = Vec::new(); + let mut p2p_bootstrap = Vec::new(); + let counts = merge_into_vecs(list, &mut http_peers, &mut p2p_bootstrap); + + assert!( + counts.p2p >= 1, + "embedded seed list merged zero dialable p2p entries; a \ + p2p_multiaddr in bootstrap-peers.json no longer survives \ + Multiaddr::from_str" + ); + assert!( + p2p_bootstrap.contains(&pocketlawb_addr), + "pocketlawb's multiaddr was skipped by the merge path" + ); + } }