<p>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.</p>

CC BY-SA 3.0
2017-12-05T17:03:56.647Z
I think you might be right. But that brings me to a question why addresses do not contain a full scriptPubKey (https://bitcoin.stackexchange.com/questions/64235/why-doesnt-address-contain-a-full-scriptpubkey). If it would be the case, there would be no reason for P2SH nesting, since the receiver could send an arbitrary scriptPubKey
tsusanka
CC BY-SA 3.0
2017-12-05T16:04:29.653Z
2017-12-05T16:04:29.653Z
Nick ODell
<p>I'm reading about SegWit and the <a href="https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki" rel="nofollow noreferrer">BIP 141</a> in particular and I don't understand what is the motivation behind the P2SH nesting. </p>

<p>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.</p>

<p>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.</p>

<p2wpkh><segregated-witness>
Why does SegWit offer P2SH nesting?
tsusanka
# Why does SegWit offer P2SH nesting?

(Asked by: username_0 on 2017-12-05)

I'm reading about SegWit and the [BIP 141](https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki) 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.

**Tags:** p2wpkh, segregated-witness


---

## 1 answers

### Answer by username_1 on 2017-12-05. Score: 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.

> **Comments:**
> **username_0**: I think you might be right. But that brings me to a question why addresses do not contain a full scriptPubKey (https://bitcoin.stackexchange.com/questions/64235/why-doesnt-address-contain-a-full-scriptpubkey). If it would be the case, there would be no reason for P2SH nesting, since the receiver could send an arbitrary scriptPubKey  

---

