3

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.

tsusanka
  • 357
  • 3
  • 7

1 Answers1

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.

Nick ODell
  • 29,184
  • 11
  • 69
  • 129
  • 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 Dec 05 '17 at 17:03