[RPC][Wallet][Segwit] Bug: Transaction sent to imported P2WSH does not appear in listtransaction. #10924

issue NicolasDorier openend this issue on July 25, 2017
  1. NicolasDorier commented at 9:12 am on July 25, 2017: contributor

    It seems that there is a bug when a node sends coins to an imported P2WSH. Such transaction does not appear in listtransaction unlike P2SH.

    Note that if node A sends to node B where B imported the P2WSH, things works as expected, and both A and B would see the transaction in listtransaction.

    The stangest thing is that gettransaction seems to know about the transaction. (but not the details)

    Repro: https://github.com/NicolasDorier/bitcoin/commits/importaddresssegwit If you switch use_p2wsh to false, it passes, else, it does not. Failing on assert(self.nodes[0].listtransactions("*", 1, 0, True)[0]["txid"] == txid)

    ping @sipa this is the bug I bumped on TumbleBit that I explained to you.

  2. fanquake added the label RPC/REST/ZMQ on Jul 25, 2017
  3. MarcoFalke added this to the milestone 0.15.0 on Jul 27, 2017
  4. MarcoFalke added the label Bug on Jul 27, 2017
  5. sipa commented at 1:24 am on July 28, 2017: member

    A short update (thanks @NicolasDorier): there is no CTxDestination for native witness outputs, which means any importaddress is unable to mark the importer scriptPubKey as anything but change. This leads to inconsistent gettransaction/listtransactions output.

    There are 2 solutions here:

    • make importaddress fail to import addresses with no CTxDestination (or warn at least)
    • Add BIP173 support
  6. sipa commented at 1:35 am on July 28, 2017: member
    Actually, (1) is already warned about in the importaddress RPC help text.
  7. NicolasDorier commented at 3:34 pm on July 28, 2017: contributor
    my attempt to fix the issue, #10947 it would need to have bech32 support though.
  8. ryanofsky commented at 3:14 pm on August 3, 2017: member
    Should #10947 be tagged for 0.15, or should this be untagged?
  9. NicolasDorier commented at 6:56 am on August 4, 2017: contributor
    Should not be tagged for 0.15. I think the best is to wait next version, non obvious code change.
  10. MarcoFalke removed this from the milestone 0.15.0 on Aug 4, 2017
  11. MarcoFalke commented at 7:31 am on August 4, 2017: member
    Cleared milestone 0.15.
  12. NicolasDorier commented at 6:52 am on October 5, 2017: contributor
    Closing as this was solved by #11167
  13. NicolasDorier closed this on Oct 5, 2017

  14. MarcoFalke locked this on Sep 8, 2021

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-09-28 22:12 UTC

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