Skip to content

multi: migrate to btcd v2 modules - #860

Merged
ellemouton merged 3 commits into
mainfrom
ellemouton/btcd-v2-migration
Jul 7, 2026
Merged

ellemouton merged 3 commits into
mainfrom
ellemouton/btcd-v2-migration

Conversation

@ellemouton

@ellemouton ellemouton commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Migrates darepo-client to the per-package btcd v2 modules introduced by btcd
v0.26.0, letting the client consume WalletKit.SubmitPackage (lndclient #280)
for lnd-backed v3/TRUC package relay.

What changed

  • Mechanical btcd-v2 codemod (~450 files): wire → wire/v2, txscript → txscript/v2,
    chaincfg → chaincfg/v2, chaincfg/chainhash → chainhash/v2, btcutil → btcutil/v2,
    btcutil/psbt → psbt/v2; address symbols → address/v2 (aliased btcaddr).
    btcjson, rpcclient, blockchain, btcec/v2 stay in the root module.
  • EsploraChainService.SubmitPackage — btcwallet v0.18.0 added SubmitPackage
    to chain.Interface; the Esplora backend returns a not-supported error.
  • go 1.26.0 (btcec/v2 v2.5.0 needs Go 1.25+); btcwallet v0.18.0, neutrino
    v0.18.0, lnd master.

Dependencies

None — all upstream, no fork replaces. The full btcd-v2 chain is merged:
lndclient #280,
aperture #244, and
taproot-assets #2186;
all pinned to their merged upstream commits. Builds green (go build ./...).

@gemini-code-assist

Copy link
Copy Markdown

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@ellemouton
ellemouton force-pushed the ellemouton/btcd-v2-migration branch from 1e97339 to 72cbf6f Compare July 6, 2026 15:20
@levmi levmi added P1 Priority 1 — high refactor Code cleanup and restructuring labels Jul 6, 2026
@ellemouton
ellemouton force-pushed the ellemouton/btcd-v2-migration branch from 72cbf6f to 03782bb Compare July 6, 2026 20:00
@ellemouton
ellemouton marked this pull request as ready for review July 6, 2026 20:30
@ellemouton
ellemouton force-pushed the ellemouton/btcd-v2-migration branch 3 times, most recently from 41ed5da to 8eb94ae Compare July 6, 2026 21:37
Migrate the main module to the per-package btcd v2 modules introduced by
btcd v0.26.0. The monolithic btcd packages were split into their own /v2
modules and v0.26.0 removed the old paths: wire, txscript, chaincfg,
chaincfg/chainhash, btcutil and btcutil/psbt each move to their /v2
module (chainhash and psbt to the top level). The address-handling
symbols (Address, DecodeAddress, NewAddress*, Hash160) moved out of
btcutil into a new address package, imported as btcaddr to avoid
shadowing local "address" variables.

btcwallet v0.18.0 added SubmitPackage to chain.Interface, so
EsploraChainService gains a SubmitPackage method that returns a
not-supported error (Esplora has no package-relay endpoint).

go directive bumped to 1.26.0 (btcec/v2 v2.5.0 needs Go 1.25+). All
dependencies are pinned to their merged upstream commits: lndclient
(PR #280) and taproot-assets + taprpc (PR #2186). No fork replaces.
lnd's invoicesrpc.AddInvoice unconditionally dereferences
ChanDB.FetchAllChannels while assembling hop hints. The swap invoice
generator builds invoices from explicit caller-provided route hints and
has no backing channel database, so it passed ChanDB: nil, which panics
against lnd master. Provide a mockChanDB reporting an empty channel set,
mirroring the existing mockGraph stub.
@ellemouton
ellemouton force-pushed the ellemouton/btcd-v2-migration branch from 8eb94ae to efa8993 Compare July 6, 2026 22:13
The bumped lndclient enforces a higher minimum connected-lnd version
(>= v0.21.0). The itest/systest harness pinned lnd
daily-testing-20260115, which predates that and is rejected at client
setup ("error checking connected lnd version"). Bump the default LND
image to a daily-testing build matching the lnd master the module now
tracks.
@ellemouton
ellemouton merged commit 273b532 into main Jul 7, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P1 Priority 1 — high refactor Code cleanup and restructuring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants