Skip to content

bootstrap-peers: add pocketlawb with a dialable p2p multiaddr - #297

Open
boyroywax wants to merge 1 commit into
Gitlawb:mainfrom
boyroywax:add-pocketlawb-bootstrap-peer
Open

bootstrap-peers: add pocketlawb with a dialable p2p multiaddr#297
boyroywax wants to merge 1 commit into
Gitlawb:mainfrom
boyroywax:add-pocketlawb-bootstrap-peer

Conversation

@boyroywax

@boyroywax boyroywax commented Aug 1, 2026

Copy link
Copy Markdown

Adds pocketlawb to the canonical seed list, with a dialable p2p_multiaddr — currently the only entry in the file that has one.

/dns4/node.pocketlawb.com/udp/7546/quic-v1/p2p/12D3KooWMGuHkbfJ9gTHL7dFozefF3PruxGMvRopE8prPC7eScNH

Why this might be useful beyond one more peer

Every existing entry has "p2p_multiaddr": null, so merge_into_vecs in crates/gitlawb-node/src/bootstrap.rs currently contributes zero addresses to config.p2p_bootstrap. Nodes come up with nothing to dial, and the Kademlia/Gossipsub layer stays idle while federation happens over HTTP. node.gitlawb.com reports connected_peers: 0 and 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:

GITLAWB_BOOTSTRAP_DISABLE_SEEDS=true
GITLAWB_BOOTSTRAP_PEERS=
GITLAWB_P2P_BOOTSTRAP=/dns4/node.pocketlawb.com/udp/7546/quic-v1/p2p/12D3KooW…eScNH

With the embedded seeds disabled and no HTTP peers, the test node reported:

{"connected_peers": 1, "gossipsub_all_peers": 1}

gossipsub_all_peers: 1 indicates the full Noise + muxer handshake completed and the node joined the gitlawb/ref-updates/v1 mesh, not merely that a UDP packet arrived. The target reported the reciprocal connection. The test host was destroyed afterwards.

/dns4 rather than /ip4 is deliberate: libp2p_dns::tokio::Transport::system(quic) resolves at dial time, so the entry survives an address change without another PR.

Node details

DID did:key:z6MkiKcvf32z2tcNCGKscxmtszZqpBUrVFa82FTvPnfAhDNF
HTTP https://node.pocketlawb.com
Version 0.7.0
p2p QUIC-v1 on udp/7546, publicly reachable

GET /health returns {"status":"ok"} and /ready confirms the database pool. The node is federating and mirroring, and node.gitlawb.com lists it as reachable: true.

Happy to adjust the entry format or drop the updated bump if you'd rather manage that field separately.

Summary by CodeRabbit

  • Chores
    • Updated the bootstrap peer list with the latest timestamp.
    • Added the PocketLawb peer and its connection details.

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>
Copilot AI review requested due to automatic review settings August 1, 2026 08:57
@github-actions github-actions Bot added the needs-issue PR has no linked issue label Aug 1, 2026
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution. A couple of things will help us review this faster:

  • Link the issue this addresses (Closes #123). For protocol changes, open an issue first.

See CONTRIBUTING.md. Update the PR and these notes will clear automatically.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The bootstrap peer registry timestamp was updated to 2026-08-01. The pocketlawb peer was added with its operator, DID, HTTP endpoint, QUIC multiaddress, and addition date.

Changes

Bootstrap peer registry

Layer / File(s) Summary
Update peer registry
bootstrap-peers.json
The registry timestamp changed to 2026-08-01. The pocketlawb peer metadata was added.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: copilot, kevincodex1

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes adding pocketlawb with a dialable P2P multiaddress to the bootstrap peers.
Description check ✅ Passed The description explains the change, motivation, implementation details, and independent reachability verification, but omits the template headings and checklist items.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 updated date to 2026-08-01.
  • Added a new bootstrap peer entry (pocketlawb) including a non-null p2p_multiaddr.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 46c51ec2-cd6a-4fe4-84e9-ccfad732909b

📥 Commits

Reviewing files that changed from the base of the PR and between c83cbc5 and 424c03d.

📒 Files selected for processing (1)
  • bootstrap-peers.json

Comment thread bootstrap-peers.json
Comment on lines +45 to +52
},
{
"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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ 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-node

Repository: 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
fi

Repository: 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 beardthelion left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-issue PR has no linked issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants