SegWit support for importmulti #12253

issue sipa openend this issue on January 23, 2018
  1. sipa commented at 10:48 pm on January 23, 2018: member

    It’s currently not possible to import (solvable) SegWit addresses (P2SH and native) using importmulti. I believe that’s a shortcoming we should address before release.

    My suggestion would be for P2WPKH (P2SH and native) to be supported without any extra arguments. This means that a P2WPKH address/script with corresponding private or public key should work. For P2SH it means checking if the supplied P2SH address perhaps matches the supplied public key or private key when converted to P2WPKH first.

    To support P2WSH, I think we need an extra field “witnessScript”. When supplied, it would either be required to match a P2WSH address/script directly, or if the address is P2SH, indirectly.

  2. fanquake added the label RPC/REST/ZMQ on Jan 24, 2018
  3. MarcoFalke added this to the milestone 0.16.0 on Jan 24, 2018
  4. jnewbery commented at 9:21 pm on January 24, 2018: member

    I think we can remove the 0.16.0 Milestone from this PR:

    010:50 < sipa> wumpus: do we want [#12253](/bitcoin-bitcoin/12253/) in 0.16?
    110:50 < gribble> [#12253](/bitcoin-bitcoin/12253/) | SegWit support for importmulti · Issue [#12253](/bitcoin-bitcoin/12253/) · bitcoin/bitcoin · GitHub
    210:51 < wumpus> sipa: if possible, but I think it's getting a bit late for that
    310:52 < sipa> i certainly won't have time until next week
    410:52 < wumpus> I assume the code still needs to be written, and ofc it will need to go through a review cycle
    510:52 < wumpus> right, so I guess that means no
    610:53 < wumpus> should probably mention lack of support in importmulti it in the 'known issues' in the release notes
    

    (https://botbot.me/freenode/bitcoin-core-dev/2018-01-24/?msg=96111019&page=3)

  5. MarcoFalke removed this from the milestone 0.16.0 on Jan 25, 2018
  6. MarcoFalke commented at 3:12 pm on July 28, 2018: member
    If this is still not supported, it could make sense to add a note in the rpc help documentation of importmulti.
  7. gwillen commented at 7:56 am on October 6, 2018: contributor

    I’m running into this trying to do stuff with offline signing, which (I’m lead to understand) requires solvability for fundrawtransaction and friends. Since everything is segwit now, it seems like there’s no way to get a solvable watchonly address anymore.

    EDIT: For other people who are running into this, you can work around it using importpubkey. If needed, set rescan to false and then use rescanblockchain to manually rescan to a suitable depth. (Of course, this is more RPC-intensive if you were actually using importmulti to import multiple things, rather than just using it for its clever date-based rescan behavior as I was.)

  8. gwillen commented at 6:26 am on October 7, 2018: contributor
    After talking to @instagibbs, this may be partly fixed by #14019, possibly only for P2SH-wrapped segwit addresses? He says it’s working for him, and he’s using that PR.
  9. instagibbs commented at 0:19 am on October 8, 2018: member
    I was mistaken, I was talking about how I imported p2pkh, then used it as segwit address.
  10. laanwj closed this on Oct 31, 2018

  11. laanwj referenced this in commit b312579c69 on Oct 31, 2018
  12. DrahtBot locked this on Sep 8, 2021
  13. PastaPastaPasta referenced this in commit 5b5bcb5fbd on Sep 18, 2021
  14. UdjinM6 referenced this in commit 908b6e6535 on Sep 28, 2021
  15. kittywhiskers referenced this in commit 5f308252d1 on Oct 12, 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-11-17 09:12 UTC

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