Skip to content

mod: update to btcd v2 modules#282

Draft
ellemouton wants to merge 1 commit into
lightninglabs:masterfrom
ellemouton:ellemouton/btcd-v2-modules
Draft

mod: update to btcd v2 modules#282
ellemouton wants to merge 1 commit into
lightninglabs:masterfrom
ellemouton:ellemouton/btcd-v2-modules

Conversation

@ellemouton

Copy link
Copy Markdown
Member

Summary

Migrates lndclient to the new per-package v2 modules introduced by
btcd v0.26.0. The monolithic btcd packages (wire, txscript,
chaincfg, chainhash, btcutil, psbt) were split out into their own
/v2 modules, and the address-handling symbols moved out of btcutil
into a new address package.

Changes

  • Bump btcd to v0.26.0 and adopt the v2 modules: wire/v2,
    txscript/v2, chaincfg/v2, chainhash/v2, btcutil/v2, psbt/v2,
    and btcec/v2 v2.5.0.
  • The address symbols that moved from btcutil into the new address
    package (DecodeAddress, the Address types, the NewAddress*
    constructors) are imported as btcaddr to avoid shadowing by local
    address variables.
  • btcec/v2 v2.5.0 requires Go 1.25, so the go directive is bumped to
    1.25.11.

Dependencies

Until the migrated modules are tagged, the dependency chain is pulled in
via temporary replace directives:

  • btcd v0.26.0 (tagged)
  • lightningnetwork/lnd (btcd v2 migration)
  • btcsuite/btcwallet (btcd v2 migration)
  • lightninglabs/neutrino (btcd v2 migration)
  • lightningnetwork/lightning-onion (btcd v2 migration)

Once those are tagged the replace directives will be dropped and the
go.mod pinned to the released versions.

Warning

Draft — do not merge until the upstream dependencies above are tagged.

Bump btcd to v0.26.0 and adopt its new per-package v2 modules: wire/v2,
txscript/v2, chaincfg/v2, chainhash/v2, btcutil/v2, psbt/v2, and
btcec/v2 v2.5.0. The address symbols that moved out of btcutil into the
new address package (DecodeAddress, the Address types and the
NewAddress* constructors) are imported as btcaddr to avoid shadowing by
local "address" variables.

The migrated dependencies are pulled in via temporary replaces until
they are tagged: lnd, btcwallet, neutrino, and lightning-onion.

btcec/v2 v2.5.0 requires Go 1.25, so the Go version is bumped to
1.25.11.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant