Skip to content

harness: add neutrino chain-backend option for lnd nodes - #734

Closed
ellemouton wants to merge 1 commit into
mainfrom
ellemouton/lnd-submitpackage-relay
Closed

ellemouton wants to merge 1 commit into
mainfrom
ellemouton/lnd-submitpackage-relay

Conversation

@ellemouton

@ellemouton ellemouton commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

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.SubmitPackage consumer
(lndsubmitter) plus fork pins for lnd/lndclient/btcwallet. That approach
has been descoped: only an lnd-on-bitcoind daemon ever needed package
submission, and that case is already served by the existing bitcoindrpc
package 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:

  • lnd-on-neutrino / embedded neutrino — broadcast parent + CPFP child
    individually; Core v28+ 1p1c P2P relay carries the zero-fee parent.
  • lnd-on-bitcoind — bitcoindrpc PackageSubmitter → bitcoind
    submitpackage (already on main, wired by the harness and cmd/darepod).

So the lnd SubmitPackage RPC 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/package relay method that was also bundled
here belongs with the Esplora work, not this PR.

What remains here is just the harness enabler for the lnd-on-neutrino test
matrix row.

@gemini-code-assist gemini-code-assist Bot 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.

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.

Comment thread lwwallet/esplora_chain.go Resolved
Comment thread chainbackends/lndsubmitter/submitter.go Resolved
Comment thread chainbackends/lndsubmitter/submitter.go Resolved
Comment thread darepod/server.go Resolved
@levmi levmi added daemon P1 Priority 1 — high safety Fund-safety: stuck, lost, or mis-counted funds unroll labels Jun 12, 2026
@levmi

levmi commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

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 Closes #678 to the description so the issue auto-closes on merge; if it is one slice of the matrix (with darepo#564 covering the cross-backend itest), Part of #678 would link it without closing. Leaving the exact keyword to you as owner of both.

@ellemouton
ellemouton changed the base branch from ellemouton/esplora-package-submitter to main June 15, 2026 18:11
@ellemouton
ellemouton force-pushed the ellemouton/lnd-submitpackage-relay branch 5 times, most recently from 6f87168 to 9f891c2 Compare June 15, 2026 21:35
Comment thread darepod/server.go Outdated
backend.SetPackageSubmitter(s.cfg.PackageSubmitter)

default:
backend.SetPackageSubmitter(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What about non-lnd backends?

@ellemouton
ellemouton force-pushed the ellemouton/lnd-submitpackage-relay branch from 9f891c2 to 314f071 Compare June 16, 2026 22:54
@ellemouton ellemouton changed the title multi: relay v3 packages natively via lnd WalletKit.SubmitPackage harness: add neutrino chain-backend option for lnd nodes Jun 16, 2026
@levmi levmi added the tests label Jul 6, 2026
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.
@ellemouton
ellemouton force-pushed the ellemouton/lnd-submitpackage-relay branch from 314f071 to 7c56cb4 Compare July 7, 2026 16:36
@ellemouton
ellemouton marked this pull request as ready for review July 7, 2026 16:36
@ellemouton

Copy link
Copy Markdown
Contributor Author

Combined into #873 for review — that PR now carries both the lnd package submitter and the itest harness support as two commits.

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

Labels

daemon P1 Priority 1 — high safety Fund-safety: stuck, lost, or mis-counted funds tests unroll

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants