AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 34 Bitcoin

Configure bitcoind test instances to use bech32m addresses (#3195)

Public commit record

What the developer wrote

Authored by Bastien Teinturier

100/100 · Strong
Configure bitcoind test instances to use bech32m addresses (#3195)

When addres type or change type is not specified, bitcoind will
now start with addresstype=bech32m and changetype=bech32m.

We take this opportunity to fix feerate tests that failed because
of the following reasons:

- first of all, we had a bug where we didn't take into account the
anchor amount in our fee calculation, so we ended up always adding
`330 sats` to the on-chain fees we paid, which was hidden by our
tolerance interval, but started appearing with smaller p2tr inputs
- then we fix the remaining tests that need manual tweaking of the
utxos available in the test wallet, because they end up creating
transactions where we don't have a change output (and overpay fees
slightly, but not enough to make it worth adding a change output),
these tests simply needed to be tweaked to accomodate p2tr weights

Co-authored by @sstone
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit updates Eclair's Bitcoin Core integration to use taproot (bech32m) addresses by default and fixes a fee-calculation bug where the anchor output amount was not being counted. The fee bug caused on-chain fees to be undercounted by 330 satoshis, which was previously hidden by test tolerances but surfaced when switching to smaller taproot inputs. The fix is in the ReplaceableTxFunder component, which funds transactions for force-closing Lightning channels. There is no evidence this was a remotely exploitable vulnerability; it is best characterized as a correctness/robustness fix that could lead to slightly overpaying on-chain fees.

Recommended action

Review whether the corrected fee computation affects any live fee-bumping or RBF logic in production; ensure deployments using Bitcoin Core 29.0+ with bech32m are tested. No urgent security patch appears required, but operators should verify their bitcoind wallet uses segwit/bech32m UTXOs as documented.

Security signals we found

01

Fee calculation bug fixed in ReplaceableTxFunder.scala

02

Anchor output amount (330 sats) now included in currentFee computation

03

Default bitcoind address type changed to bech32m/taproot

04

Bitcoin Core minimum version relaxed from 29.1 to 29.0

05

Test tolerances and UTXO amounts adjusted for p2tr weights

Risk score

Why this scored 34/100

Our methodology →
Potential impact 8/30
Exploitability 4/25
Stealth signal 5/15
Affected reach 6/15
Confidence 7/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.