Skip to content

multi: backport the v0.3.0 API to btcd v1 for the v0.1 line - #189

Merged
darioAnongba merged 4 commits into
v0.1from
darioAnongba/release-v0.1-backport
Nov 2, 2026
Merged

darioAnongba merged 4 commits into
v0.1from
darioAnongba/release-v0.1-backport

Conversation

@darioAnongba

Copy link
Copy Markdown
Collaborator

This PR opens the v0.1 maintenance line. It brings the v0.3.0 API onto the btcd v1 modules and builds it with lnd v0.21.3-beta, tapd v0.8.6, and taprpc v1.3.3. Once it merges, we tag v0.1.1 on v0.1.

Why a separate line

Modules that require released lnd v0.21 or tapd v0.8 packages cannot build with tap-sdk v0.2.0 or v0.3.0. Go selects one version of the btcd root module for the whole build. btcd v0.26.0 moves the wire, txscript, and chaincfg packages out of the root module into separate v2 modules, so every btcd v1 import in tapd, lnd, and btcutil fails to resolve. Pinning btcd back to v0.25 with a replace does not help, because tap-sdk also selects btcwallet and neutrino versions that use the btcd v2 types.

Loop and lightning-terminal stay on the released modules until lnd and tapd ship on btcd v2. lightninglabs/loop#1273 copies the SDK into Loop for this reason; with v0.1.1, Loop can require the module instead.

main stays on btcd v2, because wavelength, lumos, and swapdk-server use v0.3.0 with lnd master, and the SDK tracks tapd main for new RPCs.

Why the branch starts at v0.1.0

Go derives a pseudo-version from the highest semver tag among a commit's ancestors. A branch cut from v0.3.0 would give its untagged commits v0.3.1-0.… pseudo-versions, which outrank v0.3.0 and would pull btcd v1 into builds on the v2 line. Starting from v0.1.0 keeps every version on this line below v0.2.0, so a module on the btcd v2 line always keeps the version it requires.

Commits

  1. multi: sync tree with v0.3.0 sets the tree to exactly v0.3.0 without merging its history. git diff v0.3.0 c8622f3 is empty.
  2. customanchor: retain activation checks on compatible tapd is cherry-picked from hieblmi/tap-sdk with authorship kept. tapd v0.8.6 has the same activation-evidence check as tapd main but keeps it unexported (missingActivationEvidence), so the SDK carries a copy with the same rule order. This commit also builds on the v0.3.0 dependencies.
  3. multi: build against released lnd and tapd modules rewrites six import paths (wire/v2, txscript/v2, chainhash/v2, psbt/v2, btcutil/v2, address/v2/bech32), pins the released modules, and adds the lnd/tlv replacement that tapd v0.8.6 builds with. One itest assertion checks activation evidence through AssetProofPath.Validate instead of tapd's exported method.
  4. release: prepare v0.1.1 documents the two module lines, the replacements consumers need, and how fixes reach this branch.

Reviewing

git diff v0.3.0 HEAD shows everything this line changes relative to v0.3.0: the import rewrite, go.mod and go.sum, the activation-check copy, one itest line, and docs. The btcd v2 migration in #164 changed only import paths, so the Go part of this diff is its inverse plus the tapd v0.8 adapter.

Consumers

Modules on this line must carry two replace directives, because Go does not apply a dependency's replacements:

replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-display v1.34.2-hex-display
replace github.com/lightningnetwork/lnd/tlv => github.com/lightninglabs/taproot-assets/third_party/lnd/tlv v0.0.0-20261016193543-734ce74dd1e8

The tlv pin is the copy tapd v0.8.6 vendors under third_party/lnd/tlv. Loop carries it in lightninglabs/loop#1273, and lightning-terminal carries its own.

Follow-ups

The other four commits on hieblmi/tap-sdk (anchor outpoints in asset records, received-asset signing metadata, P2A dust handling in an itest, and caller-owned gRPC connections) and Loop's move of certificate pinning to VerifyConnection belong on main first. Once they merge there, we backport them here, and Loop can drop its copy.

Testing

  • make itest passes against tapd v0.8.5 and lnd v0.21.4-beta, over both gRPC and REST (357s)
  • make unit, make unit-race, and make lint (0 issues) pass
  • go vet -tags=itest ./itest/... passes, and go mod tidy -diff reports no changes
  • go list -deps -test -tags=itest ./... contains no btcd v2 packages other than btcec/v2
  • A scratch module that requires lnd v0.21.6-beta, tapd v0.8.8, and lndclient v0.21.0-2 builds against this branch with only the two replacements above. With v0.3.0 it fails on module github.com/btcsuite/btcd@latest found (v0.27.0), but does not contain package github.com/btcsuite/btcd/wire.

darioAnongba and others added 4 commits November 2, 2026 18:03
Bring the v0.3.0 tree onto the v0.1 release line without merging its
history, so pseudo-versions on this branch keep resolving below v0.2.0.
Mirror tapd's required-evidence check while the compatible dependency
keeps its helper private. Continue using the native proof verifier for
cryptographic validation and preserve the existing activation rules.
Import the btcd v1 module paths and require lnd v0.21.3-beta, tapd
v0.8.6 and taprpc v1.3.3, so the SDK builds alongside the released
daemons. Pin lnd/tlv to the copy tapd v0.8.6 builds with. The
custom-anchor itest checks activation evidence via AssetProofPath.
Document the v0.1 line: the v0.3.0 API on the btcd v1 modules, its
daemon and Go module versions, the lnd/tlv replacement consumers need,
and how fixes reach the branch.
@darioAnongba darioAnongba moved this from 🆕 New to 🏗 In progress in Taproot-Assets Project Board Nov 2, 2026
@darioAnongba darioAnongba self-assigned this Nov 2, 2026
@darioAnongba
darioAnongba merged commit f797b30 into v0.1 Nov 2, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from 🏗 In progress to ✅ Done in Taproot-Assets Project Board Nov 2, 2026
@darioAnongba
darioAnongba deleted the darioAnongba/release-v0.1-backport branch November 2, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants