regtest devnet (bitcoind + 2x lnd) manual runbook
Use this doc to run a local regtest devnet (Bitcoin Core + twolnd nodes).
It exercises go-lcpd Lightning integration (custom messages, invoice binding, payments).
This devnet is managed by ./scripts/devnet.
It stores all state/logs under ./.data/devnet/ (gitignored).
If a step fails, check logs/state under ./.data/devnet/.
Re-run with LCPD_LOG_LEVEL=debug.
This doc runs a minimal Quote → Pay → Stream flow with two roles:
- Alice: Provider. Configure Provider mode only on Alice. Use
LCPD_BACKEND=deterministicto avoid external APIs. - Bob: Requester.
Prerequisites
- Go 1.24.4+
bitcoind/bitcoin-clionPATHlnd/lnclionPATHjqonPATH(used in the commands below)
Build go-lcpd CLI tools (one-time)
Install binaries intogo-lcpd/bin/:
Start / stop
Start:Wallet init / unlock (first time)
lnd can start without an initialized wallet, but you must create a wallet before using RPCs (payments/channels/invoices).
First time (interactive):
Fund on-chain (make Alice the miner)
- Create a receive address for Alice:
- Mine blocks on regtest to fund Alice (mine 101 blocks to satisfy coinbase maturity):
Connect nodes / open channel / pay (make Bob able to pay Alice)
1) Connect to Bob
2) Open a channel from Alice → Bob (push funds so Bob can pay)
3) Bob pays an invoice from Alice (connectivity/route check)
Try go-lcpd (custom messages / Quote → Pay → Stream)
Once the twolnd nodes are connected as peers, start go-lcpd on both sides.
This triggers lcp_manifest exchange over BOLT #1 custom messages.
You can observe it via ListLCPPeers.
In this walkthrough, Alice runs as a Provider, streams the result, and sends lcp_result without external dependencies.
It uses LCPD_BACKEND=deterministic.
Provider configuration is YAML-first (LCPD_PROVIDER_CONFIG_PATH).
0) Create a Provider YAML config
Example:go-lcpd/provider.devnet.yaml
1) Start go-lcpd on Alice (Provider / separate terminal)
2) Start go-lcpd on Bob (Requester-only / separate terminal)
3) Call ListLCPPeers (confirm manifest exchange)
gpt-5.2 under peers[0].remoteManifest.supportedTasks[].openaiChatCompletionsV1.model, it means the Provider successfully advertised the model.
4) Send one job from Bob to Alice (Quote → Pay → Stream)
Logs / data locations
- state/log:
./.data/devnet/ - bitcoind log:
./.data/devnet/logs/bitcoind.log - lnd log:
./.data/devnet/logs/lnd-alice.log/./.data/devnet/logs/lnd-bob.log