[Bitcoin-development] BIP62 and future script upgrades
pete at petertodd.org
Tue Nov 4 19:13:13 UTC 2014
On Tue, Nov 04, 2014 at 05:29:46AM -0800, Pieter Wuille wrote:
> one of the rules in BIP62 is the "clean stack" requirement, which
> makes passing more inputs to a script than necessary illegal.
> Unfortunately, this rule needs an exception for P2SH scripts: the test
> can only be done after (and not before) the second stage evaluation.
> Otherwise it would reject all spends from P2SH (which rely on
> "superfluous" inputs to pass data to the second stage).
> I submitted a Pull Request to clarify this in BIP62:
> However, this also leads to the interesting observation that the
> clean-stack rule is incompatible with future P2SH-like constructs -
> which would be very useful if we'd ever want to deploy a "Script 2.0".
> Any such upgrade would suffer from the same problem as P2SH, and
> require an exception in the clean-stack rule, which - once deployed -
> is no longer a softfork.
> Luke suggested on the pull request to not apply this rule on every
> transaction with nVersion >= 3, which indeed solves the problem. I
> believe this can easily be generalized: make the (non mandatory) BIP62
> rules only apply to transaction with strict nVersion==3, and not to
> higher ones. The higher ones are non-standard anyway, and shouldn't be
> used before there is a rule that applies to them anyway - which could
> include some or all of BIP62 if wanted at that point still.
I agree with Luke: make the rules only apply to transactions with a
strict nVersion==3. If we want to extend that later we can do so in
On another topic, I'm skeptical of the choice of nVersion==3 - we'll
likely end up doing more block.nVersion increases in the future, and
there's no reason to think they'll have anything to do with
transactions. No sense creating a rule that'll be so quickly broken.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 650 bytes
Desc: Digital signature
More information about the bitcoin-dev