Skip to content

Fix missing anchor amount included in fees#3194

Closed
t-bast wants to merge 2 commits intobitcoind-use-bech32mfrom
bitcoind-use-bech32m-bast
Closed

Fix missing anchor amount included in fees#3194
t-bast wants to merge 2 commits intobitcoind-use-bech32mfrom
bitcoind-use-bech32m-bast

Conversation

@t-bast
Copy link
Member

@t-bast t-bast commented Oct 23, 2025

We 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

Note that this PR targets #3191

@t-bast t-bast requested a review from sstone October 23, 2025 15:19
t-bast and others added 2 commits October 24, 2025 09:49
We update `bitcoin-lib` to v0.45, which changes our JNI bindings for
`secp256k1` and adds support for P2A outputs.
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
@t-bast t-bast force-pushed the bitcoind-use-bech32m-bast branch from 4b9cc9d to be8162b Compare October 24, 2025 07:53
@t-bast t-bast closed this Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants