← Back to Pull requests

backend: update to btcd v0.26 and v2 modules #4360

Closed
unknown closed this pull request without merging on Aug 31, 2026 10:07 UTC
View on GitHub
unknown unknown commented on Aug 26, 2026 08:54 UTC
Author

Depends on https://github.com/benma/miniscript-go/pull/1.
Depends on https://github.com/BitBoxSwiss/bitbox02-api-go/pull/179.

Maintenance update that bumps all btcd related dependencies to the newest version, which includes a switch to the untangled v2 modules.
This is the third PR in a 3-part series that's required to eventually get these dependency updates into this repo.

Opening as draft until the dependent PRs are merged and go.mod + go.sum are updated.

Notable behavior changes

Bumping bitbox02-api-go from the 2026‑07‑01 pin to the fork (≈ upstream 2026‑08‑24) pulls in upstream changes that have nothing to do with btcd and aren't mentioned anywhere: hard minimum firmware versions for signing (BTCSign now errors below v9.4.0, ETHSign/BTCSignMessage/ETHSignMessage below v9.5.0 — the non-antiklepto fallback paths were removed), new ECDSA signature validation (secp256k1.go), silent-payment PSBT handling, and typed-message parsing changes in eth.go.

P2A addresses are rejected

The btcd/address/v2 library now decodes AddressPayToAnchor successfully. To avoid such addresses from being accepted for building a TX but then running into a generic "unrecognized output type" while signing, any P2A addresses are rejected by the wallet when decoding.

Before asking for reviews, here is a check list of the most common things you might need to consider:

  • updating the Changelog

  • writing unit tests

  • checking if your changes affect other coins or tokens in unintended ways

  • testing on multiple environments (Qt, Android, ...)

  • having an AI review your changes
  • Diff: 207 lines (+155 / -52) across 2 files Reviewer: guggero Review duration: 7273m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 207 lines diff across 2 files
    0.36
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.319
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #4360"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.4% (MEDIUM) · Higher = larger blast radius
    36.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 14.4% · Safe to merge
    14.4%