Page MenuHomePhabricator

-maxapsfee: follow-up fixes
ClosedPublic

Authored by PiRK on Sep 13 2021, 14:22.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC53106ad51363: -maxapsfee: follow-up fixes
Summary

Co-authored-by: Jon Atack <jon@atack.com>
Co-authored-by: Samuel Dobson <dobsonsa68@gmail.com>

This is a backport of core#19743

Notes:

  • the Release notes are not relevant because they refer to a PR that we backported almost one year ago.
  • the formula for computing a defaulti fee in Bitcoin ABC is 1 sat/byte * tx_size, with tx_size ~ 148 * n_in + 33 * n_out + 10. The tx sizes in the log messages checked in this PR are consistent with this formula (and different from the way Core computes the fees).
Test Plan

ninja all check-all

Event Timeline

PiRK requested review of this revision.Sep 13 2021, 14:22
Fabien requested changes to this revision.Sep 13 2021, 18:37
Fabien added a subscriber: Fabien.
Fabien added inline comments.
test/functional/wallet_groups.py
24

Why are the values different from the original PR ?

115

Same question

This revision now requires changes to proceed.Sep 13 2021, 18:37
PiRK planned changes to this revision.Sep 13 2021, 19:17

I will try to figure out exactly why the second set of values, the computed fees for the transactions created in the test, are different.

Regarding the values for the -maxapsfee parameters, it is deduced from the fees on lines 129 & 144. The difference 813 - 519 (sats) is equal to 2.94 XEC. So the 2.93XEC threshold is the limit that triggers the un-grouping of UTXOs.

I will leave a note in a comment or in the description, when I figure out how the fee is computed exactly for Bitcoin ABC. But the order of magnitude for those fee values makes sense, when I compare with similar transactions I see on the explorer.

PiRK edited the summary of this revision. (Show Details)

update the description to add a note about how the tx fees are computed, and add a comment next to -maxapsfee=2.93 to explain the threshold.

I tried to understand exactly how core computes a fee, but that code path is very complex with many parameters involved.

This revision is now accepted and ready to land.Sep 14 2021, 09:08
This revision was automatically updated to reflect the committed changes.