Re: [Bitcoin-development] BIP62 and future script upgrades

2014-11-04 Thread Pieter Wuille
Ok, addressed these (and a few other things) in https://github.com/bitcoin/bips/pull/117: * Better names for the rules. * Clarify interaction of BIP62 with P2SH. * Clarify that known hashtypes are required, despite not being part of DER. * Use v2 transactions instead of v3 transactions. * Apply the

Re: [Bitcoin-development] BIP62 and future script upgrades

2014-11-04 Thread Peter Todd
On Tue, Nov 04, 2014 at 12:00:43PM -0800, Pieter Wuille wrote: > On Tue, Nov 4, 2014 at 11:56 AM, Jeff Garzik wrote: > > On Tue, Nov 4, 2014 at 8:13 PM, Peter Todd wrote: > >> On another topic, I'm skeptical of the choice of nVersion==3 - we'll > >> likely end up doing more block.nVersion increas

Re: [Bitcoin-development] BIP62 and future script upgrades

2014-11-04 Thread Pieter Wuille
On Tue, Nov 4, 2014 at 11:56 AM, Jeff Garzik wrote: > On Tue, Nov 4, 2014 at 8:13 PM, Peter Todd wrote: >> 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 anythi

Re: [Bitcoin-development] BIP62 and future script upgrades

2014-11-04 Thread Jeff Garzik
On Tue, Nov 4, 2014 at 8:13 PM, Peter Todd wrote: > 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 tha

Re: [Bitcoin-development] BIP62 and future script upgrades

2014-11-04 Thread Peter Todd
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 (an

Re: [Bitcoin-development] BIP62 and future script upgrades

2014-11-04 Thread Gavin Andresen
On Tue, Nov 4, 2014 at 8:29 AM, Pieter Wuille wrote: > 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

Re: [Bitcoin-development] BIP62 and future script upgrades

2014-11-04 Thread Pieter Wuille
On Tue, Nov 4, 2014 at 5:38 AM, Mike Hearn wrote: > This is another problem that only exists because of the desire to soft fork. > If "script 2.0" is a hard fork upgrade, you no longer need weird hacks like > scripts-which-are-not-scripts. I agree. I also agree that the desire for softforks somet

Re: [Bitcoin-development] BIP62 and future script upgrades

2014-11-04 Thread Mike Hearn
This is another problem that only exists because of the desire to soft fork. If "script 2.0" is a hard fork upgrade, you no longer need weird hacks like scripts-which-are-not-scripts. --

[Bitcoin-development] BIP62 and future script upgrades

2014-11-04 Thread Pieter Wuille
Hi all, 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 re