From 0b02fb9204c74e6e6fd350cbdc8511563f95bed4 Mon Sep 17 00:00:00 2001 From: Patrick Mulligan Date: Sun, 15 Feb 2026 17:55:54 -0500 Subject: [PATCH] docs: document automatic channel setup in unified regtest mode Add explanation of how dev.sh automatically sets up Lightning channels: - lnd-1 as hub funds lnd-3 and lnd-4 via channels - lnd-4 receives payments (Lightning.Pub backend) - lnd-3 sends payments (ATM funding source) - Mining ensures channel confirmation and graph propagation This clarifies that the environment works from a clean Docker slate. Co-Authored-By: Claude Opus 4.5 --- README.md | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 76a83d8..e85884b 100644 --- a/README.md +++ b/README.md @@ -90,16 +90,27 @@ lamassu-next/ ## Infrastructure Services -| Service | Port | Description | -| ------------------ | ----- | ----------------------------------- | -| strfry | 7777 | Nostr relay (ws://localhost:7777) | -| bitcoind | 18443 | Bitcoin regtest node | -| lnd-1 | 10001 | Lightning.Pub's LND node | -| lnd-2 | 10002 | Peer node for channel | -| lnd-3 | 10003 | Funding source (auto-miner rewards) | -| Lightning.Pub | 1776 | Nostr-native accounts API | -| Withdraw Extension | 1777 | LNURL-withdraw for cash-in | -| PostgreSQL | 5432 | Lightning.Pub database | +The development environment uses a shared regtest stack from `~/dev/local/docker/regtest/`: + +| Service | Port | Description | +| ------------------ | ----- | --------------------------------- | +| strfry | 7777 | Nostr relay (ws://localhost:7777) | +| bitcoind | 18443 | Bitcoin regtest node (shared) | +| lnd-1 | 10001 | Hub node (funds lnd-3 and lnd-4) | +| lnd-3 | 10003 | Payment source for ATM funding | +| lnd-4 | 10004 | Lightning.Pub's backend node | +| Lightning.Pub | 1776 | Nostr-native accounts API | +| Withdraw Extension | 1777 | LNURL-withdraw for cash-in | +| PostgreSQL | 5432 | Lightning.Pub database | + +**Automatic channel setup**: When `dev.sh up` runs, it automatically: + +1. Ensures lnd-1 has funds (mines blocks if needed) +2. Opens a channel from lnd-1 → lnd-4 (so Lightning.Pub can receive payments) +3. Opens a channel from lnd-1 → lnd-3 (so lnd-3 can pay invoices for funding) +4. Mines blocks for channel confirmation and graph propagation + +This makes the environment work from a clean Docker slate without manual intervention. ## Testing Cash-In Flow