decodepsbt fee overstated since #19215 #19516

issue bitcoinhodler openend this issue on July 14, 2020
  1. bitcoinhodler commented at 3:53 pm on July 14, 2020: contributor

    Following commit 46004790588c24174a0bec49b540d158ce163ffd (@achow101), decodepsbt overstates the fee, apparently including both the witness_utxo and non_witness_utxo amounts in the inputs.

    Expected behavior

    The decoded fee should be the sum of the inputs, minus the sum of the outputs.

    Actual behavior

    The decoded fee is exactly twice the amount of the inputs, minus the sum of the outputs.

    To reproduce

    Build any PSBT using createpsbt, walletprocesspsbt, then decode it with decodepsbt. See the fee field in the JSON.

    System information

    I compiled myself from 5550fa5983ea59e7ccef6540b7ec49a1770fb3ca on Whonix 14.

    Then I did git revert 46004790588c24174a0bec49b540d158ce163ffd and the problem went away.

  2. bitcoinhodler added the label Bug on Jul 14, 2020
  3. practicalswift commented at 9:16 pm on July 14, 2020: contributor
    @bitcoinhodler Thanks a lot for reporting! May I ask how you discovered/encountered this issue? That is always interesting to know.
  4. bitcoinhodler commented at 1:28 am on July 15, 2020: contributor
    I have my own fork of Glacier Protocol with a bunch of self-checking tests. They started freaking out after #19215 because the PSBTs had changed, and I noticed the incorrect fee by inspection of the reported mismatches.
  5. fanquake closed this on Jul 15, 2020

  6. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-05 01:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me