Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: polaker on January 11, 2020, 08:26:06 AM



Title: Is there any limitation of P2SH?
Post by: polaker on January 11, 2020, 08:26:06 AM
I just got this thought experiment in my head: can we live only with P2SH?

I like the succinct P2SH approach. It sounds perfect if all the scripts could be done in this way.

Let's ignore segwit for this experiment :)


Title: Re: Is there any limitation of P2SH?
Post by: polaker on January 11, 2020, 11:42:06 AM
Let's start with something obvious,
1. Maximum Bitcoin script is 40000 weight (or 10000 bytes before SegWit activiation)
2. Non-turing complete Opcode

I meant to compare P2SH with all other possible Bitcoin scripts. My bad, I did not express it clear enough.

The first point about script size still stands. Is there any good&useful example on-chain that uses many bytes close to the limits?

Thanks!


Title: Re: Is there any limitation of P2SH?
Post by: gmaxwell on January 11, 2020, 08:32:05 PM
Multisigs with more than 15 participants is the most common...

But BC1 addresses don't have this limit, and if you're doing something big you'll want that in any case for efficiency sake.

P2SH is antiquated now, not the best place to look for novel functionality.



Title: Re: Is there any limitation of P2SH?
Post by: aplistir on January 12, 2020, 06:49:08 AM
I just got this thought experiment in my head: can we live only with P2SH?

I like the succinct P2SH approach. It sounds perfect if all the scripts could be done in this way.

That made me have an interesting thought.
Could P2SH be quantum safe? As it is NOT based on public keys, which are weak with QC.

P2SH is antiquated now, not the best place to look for novel functionality.

Antiquated? I thought that P2SH is still the only way to do your own "creative" scripts that will be accepted by the network. Like the first implementation of segwith showed.


Title: Re: Is there any limitation of P2SH?
Post by: darosior on January 12, 2020, 03:35:53 PM
Antiquated? I thought that P2SH is still the only way to do your own "creative" scripts that will be accepted by the network. Like the first implementation of segwit showed.
It's P2WSH, hence the point about BC1 addresses.


Title: Re: Is there any limitation of P2SH?
Post by: TechPriest on January 12, 2020, 04:00:51 PM
Could P2SH be quantum safe? As it is NOT based on public keys, which are weak with QC.

Not, this is not quantum safe the same as P2PKH. Because it based on public keys, you provide them in your scriptsig of redeem script.

1. Maximum Bitcoin script is 40000 weight (or 10000 bytes before SegWit activiation)


If i remember right, P2SH redeem script is just 520 byte of space.