multi: migrate to btcd v2 modules + add WalletKit.SubmitPackage#280
Merged
ellemouton merged 2 commits intoJul 1, 2026
Merged
Conversation
c6ad7ac to
60fdb7e
Compare
Roasbeef
requested changes
Jun 16, 2026
|
|
||
| func (m *walletKitClient) SubmitPackage(ctx context.Context, | ||
| txns []*wire.MsgTx, | ||
| maxFeeRate *float64) (*btcjson.SubmitPackageResult, error) { |
Member
There was a problem hiding this comment.
I don't think we should leak btcjson here (notice how it was just imported with this diff). Instead we should make a higher level wrapper type like we do elsewhere for related APIs.
Member
Author
There was a problem hiding this comment.
Addressed — the method no longer leaks btcjson. It now maps the proto response into lndclient-native SubmitPackageResult / SubmitPackageTxResult types (with chainhash.Hash txids), so callers don't depend on btcjson's submitpackage types. The btcjson import is gone from the file.
1eebf77 to
66d2a3f
Compare
66d2a3f to
4024c4a
Compare
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 now pinned to their released tags: lnd master (post btcd-v2), btcwallet v0.18.0, neutrino v0.18.0, and lightning-onion v1.4.0. btcec/v2 v2.5.0 requires Go 1.25, so the Go version is bumped to 1.25.11.
Add WalletKit.SubmitPackage, wrapping lnd's new WalletKit.SubmitPackage RPC. It serializes the topologically-sorted transactions, forwards the optional per-tx max fee rate (nil uses the node default), and maps the proto response back to the lndclient-native SubmitPackageResult so callers do not depend on btcjson's submitpackage types.
4024c4a to
ee76ab9
Compare
5 tasks
GeorgeTsagk
approved these changes
Jul 1, 2026
GeorgeTsagk
left a comment
Member
There was a problem hiding this comment.
LGTM ee76ab9
tACK with lightninglabs/taproot-assets#2186
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.
Combines the two changes that were split across #280 and #282 into a single
PR for easier review. Two commits:
1.
mod: update to btcd v2 modulesMigrates
lndclientto the new per-packagev2modules introduced bybtcdv0.26.0. The monolithicbtcdpackages (wire,txscript,chaincfg,chainhash,btcutil,psbt) were split out into their own/v2modules,and the address-handling symbols moved out of
btcutilinto a newaddresspackage (imported as
btcaddrto avoid shadowing localaddressvariables).All dependencies are pinned to released tags — no fork
replaces:btcdv0.26.0+btcec/v2v2.5.0btcwalletv0.18.0,neutrinov0.18.0,lightning-onionv1.4.0lndmaster (post btcd-v2),lnd/tlvv1.4.0,lnd/torv1.2.0btcec/v2v2.5.0requires Go 1.25, so the Go version is bumped to 1.25.11.2.
walletkit: add SubmitPackage client methodAdds
WalletKitClient.SubmitPackage, wrapping lnd's newWalletKit.SubmitPackageRPC (lightningnetwork/lnd#10900, merged).
It serializes the topologically-sorted transactions, forwards an optional
per-transaction max fee rate (
niluses the node default), and maps the protoresponse into an lndclient-native
SubmitPackageResultso callers do not dependon
btcjson's submitpackage types.This lets a zero-fee v3/TRUC parent be relayed via its fee-paying CPFP child
(bitcoind's
submitpackage) without the caller needing a separate connectionto the chain backend.