Repository navigation
multi: backport the v0.3.0 API to btcd v1 for the v0.1 line - #189
Merged
Merged
Conversation
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.
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.
This PR opens the
v0.1maintenance 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 tagv0.1.1onv0.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, andchaincfgpackages 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 areplacedoes 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.mainstays 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
multi: sync tree with v0.3.0sets the tree to exactly v0.3.0 without merging its history.git diff v0.3.0 c8622f3is empty.customanchor: retain activation checks on compatible tapdis 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.multi: build against released lnd and tapd modulesrewrites 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 throughAssetProofPath.Validateinstead of tapd's exported method.release: prepare v0.1.1documents the two module lines, the replacements consumers need, and how fixes reach this branch.Reviewing
git diff v0.3.0 HEADshows everything this line changes relative to v0.3.0: the import rewrite,go.modandgo.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
replacedirectives, because Go does not apply a dependency's replacements: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
VerifyConnectionbelong onmainfirst. Once they merge there, we backport them here, and Loop can drop its copy.Testing
make itestpasses against tapd v0.8.5 and lnd v0.21.4-beta, over both gRPC and REST (357s)make unit,make unit-race, andmake lint(0 issues) passgo vet -tags=itest ./itest/...passes, andgo mod tidy -diffreports no changesgo list -deps -test -tags=itest ./...contains no btcd v2 packages other thanbtcec/v2module github.com/btcsuite/btcd@latest found (v0.27.0), but does not contain package github.com/btcsuite/btcd/wire.