Title: P2WSH and P2SH Post by: coinlary on July 03, 2024, 01:19:46 PM Bip16 P2WSH and Bip141 P2SH Firstly, both Pay 2 Witness Script Hash ( P2WSH) and Pay 2 Script Hash (P2SH) and they contain the Pay 2 Multisig (P2MS) locking Script Bip16 P2WSH and Bip141 P2SH Firstly, both Pay 2 Witness Script Hash ( P2WSH) and Pay 2 Script Hash (P2SH) Here's a quick overview of Multisig wallet (https://bitcointalk.org/index.php?topic=5039220.msg46238384#msg46238384) P2WSH and P2SH address P2SH was used before the introduction of Seqwit which also brought about the use of P2WSH,the idea of P2WSH was to replace P2SH as it's much more standard P2SH address starts with 3 and usually have 34 chars Testnet starts with 2 -----------‐------------------------------------------------------------ P2WSH address starts with bc1q just like the P2WPKH both are segwit version 0 but P2WSH is 62 chars. Testnet starts with tb1q P2WSH and P2SH Unlocking Script The Unlocking Script is always used to unlock the output of their transaction. The Script sig contains the Unlocking Script(I.e the Unlocking code & the Reedem Script) for P2SH The Witness field Contains the Unlocking Script(Witness script)for P2WSH which needs be hashed using SHA-256 to attempt the Script Hash Ref == https://learnmeabitcoin.com Here's the little I've learned about them so far as I have been reading throughout my stay on the forum All Corrections and additions are welcome [Addit] P2TR P2TR or Taproot exist today which allow lower transaction size and slightly better privacy, so there's no strong reason to keep using P2SH and P2WSH unless you can't find software which use P2TR (with specific spending condition you impose) or you perform transaction with someone else who use software which doesn't support P2TR. Title: Re: P2WSH and P2SH Post by: bitmover on July 03, 2024, 03:34:19 PM Why not talk about the other address formats as well?
Bech32 Native Segwit, starts with bc1, lower fees than compatible segiwt (3) Taproot Bech32m format , stars with bc1p Full list here https://en.bitcoin.it/wiki/List_of_address_prefixes Title: Re: P2WSH and P2SH Post by: pooya87 on July 04, 2024, 05:00:51 AM Firstly, both Pay 2 Witness Script Hash ( P2WSH) and Pay 2 Script Hash (P2SH) are Multisig type and they contain the Pay 2 Multisig (P2MS) locking Script They aren't "multisig type", both of these script hashes can use hash of a multi-sig redeem script as well as hash of any other redeem script type.Quote the idea of P2WSH was to replace P2SH as it's much more standard Being standard is not a spectrum, a script is either standard or not.P2WSH is not exactly a replacement either even though it may look like one. It is the SegWit way of using script hash in locking scripts. Title: Re: P2WSH and P2SH Post by: NotATether on July 04, 2024, 07:30:33 AM Firstly, both Pay 2 Witness Script Hash ( P2WSH) and Pay 2 Script Hash (P2SH) are Multisig type and they contain the Pay 2 Multisig (P2MS) locking Script The old multisig that was used by so-called P2SH and P2MS addresses had some serious limitations in the number of co-signers you could have. I think it was a maximum of three or something. But for segwit addresses (P2WSH in other words), the limit has increased significantly to about a thousand co-signers or close to that. That is why everybody is using P2WSH when they want to use Multisig, as the old address format was way too restrictive about this. Title: Re: P2WSH and P2SH Post by: ABCbits on July 04, 2024, 09:48:52 AM All Corrections and additions are welcome Here's an addition from me. P2TR or Taproot exist today which allow lower transaction size and slightly better privacy, so there's no strong reason to keep using P2SH and P2WSH unless you can't find software which use P2TR (with specific spending condition you impose) or you perform transaction with someone else who use software which doesn't support P2TR. Title: Re: P2WSH and P2SH Post by: BlackHatCoiner on July 04, 2024, 10:14:04 AM Full list here Soon to be updated with silent payment (https://silentpayments.xyz/docs/explained/) addresses. https://en.bitcoin.it/wiki/List_of_address_prefixes Being standard is not a spectrum, a script is either standard or not. Maybe some nodes treat it as standard, maybe some don't! :PThe old multisig that was used by so-called P2SH and P2MS addresses had some serious limitations in the number of co-signers you could have. I think it was a maximum of three or something. Correct, 3. The serious limitation was that P2MS didn't have an address type, it was plain script. This practically means no reputable wallet software can send to P2MS. You need to manually construct it. Recipe for disaster. Title: Re: P2WSH and P2SH Post by: coinlary on July 04, 2024, 11:01:33 AM Why not talk about the other address formats as well? Only talked about those because they "can receive hash of a multisig reedem script" just as I've been correct maybe I can create another thread talking about it if I learn more about themThank you for this Firstly, both Pay 2 Witness Script Hash ( P2WSH) and Pay 2 Script Hash (P2SH) are Multisig type and they contain the Pay 2 Multisig (P2MS) locking Script They aren't "multisig type", both of these script hashes can use hash of a multi-sig redeem script as well as hash of any other redeem script type.Quote the idea of P2WSH was to replace P2SH as it's much more standard Being standard is not a spectrum, a script is either standard or not.P2WSH is not exactly a replacement either even though it may look like one. It is the SegWit way of using script hash in locking scripts. ~ Noted sir.. and correctedThe old multisig that was used by so-called P2SH and P2MS addresses had some serious limitations in the number of co-signers you could have. I think it was a maximum of three or something. But for segwit addresses (P2WSH in other words), the limit has increased significantly to about a thousand co-signers or close to that. That is why everybody is using P2WSH when they want to use Multisig, as the old address format was way too restrictive about this. Here's an addition from me. P2TR or Taproot exist today which allow lower transaction size and slightly better privacy, so there's no strong reason to keep using P2SH and P2WSH unless you can't find software which use P2TR (with specific spending condition you impose) or you perform transaction with someone else who use software which doesn't support P2TR. However, I have a question although I haven't read much about P2TR but can it have co-signers just like a multisig or maybe I'm just getting it all wrong Title: Re: P2WSH and P2SH Post by: pooya87 on July 04, 2024, 04:00:26 PM The old multisig that was used by so-called P2SH and P2MS addresses had some serious limitations in the number of co-signers you could have. I think it was a maximum of three or something. I believe 3 is standard limitation otherwise you can use up to 20 for n in P2MS and only 15 in P2SH (assuming compressed pubkeys)Quote But for segwit addresses (P2WSH in other words), the limit has increased significantly to about a thousand co-signers or close to that. For witness version 0 the n value is still limited to 20 maxhttps://github.com/bitcoin/bitcoin/blob/bd5d1688b4311e21c0e0ff89a3ae02ef7d0543b8/src/script/interpreter.cpp#L1116 Title: Re: P2WSH and P2SH Post by: ABCbits on July 05, 2024, 08:45:53 AM Here's an addition from me. P2TR or Taproot exist today which allow lower transaction size and slightly better privacy, so there's no strong reason to keep using P2SH and P2WSH unless you can't find software which use P2TR (with specific spending condition you impose) or you perform transaction with someone else who use software which doesn't support P2TR. However, I have a question although I haven't read much about P2TR but can it have co-signers just like a multisig or maybe I'm just getting it all wrong Yes, it's possible. What can be done with P2SH and P2WSH is also possible with P2TR. Title: Re: P2WSH and P2SH Post by: coinlary on July 05, 2024, 08:49:02 AM Yes, it's possible. What can be done with P2SH and P2WSH is also possible with P2TR. Title: Re: P2WSH and P2SH Post by: ABCbits on July 05, 2024, 08:56:59 AM Yes, it's possible. What can be done with P2SH and P2WSH is also possible with P2TR. In this case does it means it use the P2MS locking Script too because I'm so surprised it could be used in a multisig wallet The locking script is different. If you try to create P2TR multi-sig address with help of Miniscript and descriptor, you need to use multi_a(k,key1,...,keyN) rather than multi(k,key1,...,keyN). Title: Re: P2WSH and P2SH Post by: coinlary on July 05, 2024, 10:50:08 PM https://github.com/bitcoin/bitcoin/blob/bd5d1688b4311e21c0e0ff89a3ae02ef7d0543b8/src/script/interpreter.cpp#L1116 |