Upgrade btcd and migrate to btcec/v2 - #21
Merged
Merged
Conversation
mswilkison
marked this pull request as ready for review
September 18, 2026 14:38
Keep btcd v0.24.2, btcec/v2 v2.2.0 and btcutil v1.1.5 from this PR and add filippo.io/bigmod v0.1.0 from dev. go mod tidy under go1.26.8 (also records the go.sum hashes that were missing on the previous head).
|
Merged into Before merging, the merged #20 head was merged into this branch (1062fd6). Conflict was Checks run:
Follow-ups, not blocking: CI does not test at keep-core's secp256k1 v4.3.0 resolution. Full report: agent-docs/pr-integration/21.md (local). |
piotr-roslaniec
added a commit
that referenced
this pull request
Sep 29, 2026
Merge origin/dev (contains #18/#20/#21) into the input-guards branch. Auto-merged cleanly (no textual conflicts); key choices: - go.mod/go.sum: adopt origin/dev toolchain and dependencies (go 1.25.7, toolchain go1.26.8, x/crypto v0.52.0, x/sys v0.45.0, protobuf v1.33.0, btcd v0.24.2, btcec/v2 v2.2.0, btcutil v1.1.5, bigmod v0.1.0) per the integration contract. - crypto/mta/proofs.go: keep #12 decoder guards (ProofBobWC 12-part arity, Bytes nil-receiver panics) plus dev's CT/sampling changes; changes were in disjoint regions and both survived.
piotr-roslaniec
added a commit
that referenced
this pull request
Sep 29, 2026
Merge current origin/dev (includes #18/#20/#21) into the PR #14 branch. Conflict choices: - No textual conflicts; clean automatic merge. - Go toolchain/deps kept from origin/dev (go 1.25.7, toolchain go1.26.8, x/crypto v0.52.0, x/sys v0.45.0, protobuf v1.33.0, btcd v0.24.2, btcec/v2 v2.2.0, btcutil v1.1.5, bigmod v0.1.0). - Preserved PR #14 changes on top of dev: BaseParty fatal-error latch (abort/abortedWith) and keygen unmarshalVSSCommitment part-count guard in ecdsa/keygen/round_3.go.
This was referenced Sep 29, 2026
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.
The current btcd version is covered by three published Dependabot advisories. Upgrade it to v0.24.2 and migrate the removed legacy btcec and btcutil imports to
btcd/btcec/v2 v2.2.0andbtcd/btcutil v1.1.5. This covers GHSA-2chg-86hq-7w38, GHSA-3jgf-r68h-xfqm, and GHSA-27vh-h6mc-q6g8.Stacked on #20; merge #19, then #20, then this PR. The combined stack selects versions at or above the fixed versions for all 30 current Dependabot alerts. Dependency selection was checked against each alert's published affected range; this is not a claim that all affected dependency paths are reachable in tss-lib.
The migration preserves compressed public-key parsing, the caller-supplied curve instance in derived keys, the registered
secp256k1name, and coordinate-based JSON/Gob persistence. Compatibility tests use fixed legacy encodings, synthetic save data with no signing secrets, ordinary point arithmetic, BIP32 vectors, hierarchy deltas, and curve registry controls. No legacy btcec or btcutil packages remain in the compiled library/test dependency closure.Downstream integration review remains required before adoption. Exported
elliptic.Curvesignatures remain the same, but the concrete curve implementation changes from legacy btcec to Decred secp256k1/v4 through btcec/v2. Callers using legacy imports or concrete type assertions need adaptation. The selected btcd/btcec/btcutil versions match the public keep-core dependency set referenced by keep-core #4312; that PR also supplies the Go baseline used by #20. This does not establish keep-core integration compatibility, and Go module version selection in consumers can choose a higher btcec/v2 version.Validation on the final stacked commit with Go 1.26.8:
tss,crypto,crypto/ckd,crypto/schnorr,crypto/vss, andecdsa/signingpackage suites passed, including ordinary and HD signing end to end (signing: 67.601s).go build -mod=readonly -p 1 ./...,go vet -mod=readonly -p 1 ./...,go mod verify, module tidiness, and whitespace checks passed.The exact minimum Go toolchain was not exercised locally. Full repository test CI and formatting CI passed at the current head
66aaeca3344b1977d2d2c20f6fd98c521bc58bbe. These workflows were dispatched explicitly because this stacked PR targets a branch other than master.