I'm reading about SegWit and the BIP 141 in particular and I don't understand what is the motivation behind the P2SH nesting.

At first I thought the P2WPKH is not valid on non-upgraded nodes, so P2WPKH nested in P2SH is a way to make this a soft fork (with the P2WPKH being used only after all nodes are upgraded). But as I was looking into the definition of P2WPKH I came to a conclusion it is a ANYONE_CAN_SPEND transaction on the older nodes.

My another guess was that this might be to enable a segwit-unaware wallet to create a transaction containing a scriptPubKey, which can be redeemed later on using a segwit witness. Is that right? Are there any other benefits? It seems like a little bit too much of a hassle.

1 Answer 1


I'm not entirely sure, but I think the intent of that change is to allow non-segwit wallets to generate payments to segwit wallets. Imagine that you're a business that uses segwit, but 1% of your customers insist on paying using a wallet that doesn't support segwit.

  • I think you might be right. But that brings me to a question why addresses do not contain a full scriptPubKey (bitcoin.stackexchange.com/questions/64235/…). If it would be the case, there would be no reason for P2SH nesting, since the receiver could send an arbitrary scriptPubKey
    – tsusanka
    Commented Dec 5, 2017 at 17:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.