multi: update to btcd v2 modules#10920
Closed
ellemouton wants to merge 1 commit into
Closed
Conversation
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 (Hash160, DecodeAddress, the Address types and the NewAddress* constructors) are imported as btcaddr to avoid shadowing by local "address" variables. bech32 stays on the v1 btcutil path. The migrated dependencies are pulled in via temporary replaces until they are tagged: btcwallet, neutrino, and lightning-onion. btcec/v2 v2.5.0 requires Go 1.25, so the Go version is bumped to 1.25.11.
🔴 PR Severity: CRITICAL
🔴 Critical (30+ files)
🟠 High (10+ files)
🟡 Medium (20+ files)
AnalysisThis PR updates lnd to the btcd v2 module layout, splitting packages into per-package /v2 modules (wire/v2, txscript/v2, chaincfg/v2, chainhash/v2, btcutil/v2, psbt/v2). It is a mass import-path refactor spanning the entire codebase. Why CRITICAL:
Review focus:
To override, add a |
Collaborator
Author
|
Superseded by #10913 (guggero's canonical 'Update everything to btcd v2 modules'), which is the coordinated ecosystem migration and now pins the tagged versions directly. Closing in favor of that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
btcd v0.26.0 split several packages out of the root module into their own
per-package
/v2modules (wire,txscript,chaincfg,chainhash,btcutil,psbt). This updates lnd to the new layout.Changes
wire→wire/v2,txscript→txscript/v2,chaincfg→chaincfg/v2,chaincfg/chainhash→chainhash/v2,btcutil→btcutil/v2,btcutil/psbt→psbt/v2;btcec/v2bumped to v2.5.0.btcutilinto the newaddresspackage (Hash160,DecodeAddress, theAddress*types and theNewAddress*constructors) are imported with abtcaddralias to avoidshadowing by the many local
addressvariables in the codebase.bech32remains on the v1btcutil/bech32path (thebtcutil v1.xcompatmodule), as it did not move into
btcutil/v2.tlvandtorsub-modules were already migrated upstream and are leftunchanged.
Status / dependencies
Draft until the rest of the btcd-v2 stack lands and is tagged; the migrated
dependencies are pinned via temporary
replacedirectives in the meantime:Testing
go build ./...andgo vet ./...(including test compilation) pass.