Repository navigation
harness: add neutrino chain-backend option for lnd nodes - #734
ellemouton wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new lndsubmitter package to relay v3/TRUC ephemeral-anchor packages through LND's WalletKit.SubmitPackage RPC, eliminating the need for a separate bitcoind RPC or Esplora endpoint for LND-backed daemons. It also implements package submission for the Esplora chain service and updates the test harness to support Neutrino for testing SPV broadcast paths. The review feedback focuses on adding defensive nil checks in lndsubmitter, darepod/server.go, and esplora_chain.go to prevent potential nil pointer dereferences, as well as importing the errors package where needed.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Triage note (added P1 + unroll/safety/daemon, owner @ellemouton): this looks like it implements the lnd/bitcoind package-relay config that #678 tracks (and the broadcast side of the already-closed #590). If it fully satisfies #678, consider adding |
6f87168 to
9f891c2
Compare
| backend.SetPackageSubmitter(s.cfg.PackageSubmitter) | ||
|
|
||
| default: | ||
| backend.SetPackageSubmitter( |
9f891c2 to
314f071
Compare
Add an optional neutrino chain backend for harness lnd nodes, selected via lndConfig.chainBackend (LNDChainBackendBitcoind default, or LNDChainBackendNeutrino). Neutrino mode runs lnd with --bitcoin.node=neutrino --neutrino.connect=<bitcoind>:18444, syncing and broadcasting over the regtest bitcoind's P2P interface and compact block filters. This lets integration tests exercise lnd's native SPV / 1p1c broadcast path -- broadcasting a zero-fee v3 anchor parent plus its CPFP child over P2P and relying on the peer's 1p1c package relay -- instead of bitcoind's synchronous mempool acceptance. StartAdditionalLNDWithBackend exposes the choice to callers; StartAdditionalLND keeps the bitcoind default.
314f071 to
7c56cb4
Compare
|
Combined into #873 for review — that PR now carries both the lnd package submitter and the itest harness support as two commits. |
Summary
Adds a neutrino chain-backend option for the harness's lnd nodes, so the
unilateral-exit package-relay itests can exercise an lnd-on-neutrino
client (P2P 1p1c relay) in addition to the existing bitcoind-backed setup.
Background / scope change
This PR previously also carried the lnd
WalletKit.SubmitPackageconsumer(
lndsubmitter) plus fork pins for lnd/lndclient/btcwallet. That approachhas been descoped: only an lnd-on-bitcoind daemon ever needed package
submission, and that case is already served by the existing
bitcoindrpcpackage submitter (point darepod at the same bitcoind lnd uses). Every other
backend relays via the existing individual-broadcast 1p1c fallback, which
needs no new code:
individually; Core v28+ 1p1c P2P relay carries the zero-fee parent.
bitcoindrpcPackageSubmitter→ bitcoindsubmitpackage(already onmain, wired by the harness andcmd/darepod).So the lnd
SubmitPackageRPC stack (btcd / btcwallet / lnd / lndclient PRs)becomes a later, purely-additive ergonomic upgrade (a pure-lnd operator
wouldn't configure a separate bitcoind endpoint) rather than a correctness
requirement. The lwwallet
/txs/packagerelay method that was also bundledhere belongs with the Esplora work, not this PR.
What remains here is just the harness enabler for the lnd-on-neutrino test
matrix row.