Author

Topic: P2WSH and P2SH (Read 220 times)

jr. member
Activity: 52
Merit: 10
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
July 05, 2024, 04:56:59 AM
#11
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).
jr. member
Activity: 52
Merit: 10
July 05, 2024, 04:49:02 AM
#10


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
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
July 05, 2024, 04:45:53 AM
#9

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.
Okays noted and added ...
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.
legendary
Activity: 3472
Merit: 10611
July 04, 2024, 12:00:26 PM
#8
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 max
https://github.com/bitcoin/bitcoin/blob/bd5d1688b4311e21c0e0ff89a3ae02ef7d0543b8/src/script/interpreter.cpp#L1116
jr. member
Activity: 52
Merit: 10
July 04, 2024, 07:01:33 AM
#7
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 them
Thank 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 corrected


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.
Thank you for 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.
Okays noted and added ...
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
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
July 04, 2024, 06:14:04 AM
#6
Soon to be updated with silent payment addresses.

Being standard is not a spectrum, a script is either standard or not.
Maybe some nodes treat it as standard, maybe some don't!  Tongue

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.
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.
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
July 04, 2024, 05:48:52 AM
#5
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.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
July 04, 2024, 03:30:33 AM
#4
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.
legendary
Activity: 3472
Merit: 10611
July 04, 2024, 01:00:51 AM
#3
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.
legendary
Activity: 2352
Merit: 6089
bitcoindata.science
July 03, 2024, 11:34:19 AM
#2
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
jr. member
Activity: 52
Merit: 10
July 03, 2024, 09:19:46 AM
#1
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) are Multisig type are script hashes that can use hash of a multi-sig redeem script as well as hash of any other redeem script type, they contain the Pay 2 Multisig (P2MS) locking Script

Here's a quick overview  of Multisig wallet

   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.
Jump to: