[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: [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. --

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 m...@plan99.net 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

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 pieter.wui...@gmail.com 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

[Bitcoin-development] Bitcoin API Wrapper

2014-11-04 Thread Krzysztof Okupski
Dear everyone, I've developed a C++ wrapper for JSON-RPC communication with an existing Bitcoin installation. For everyone that is a developer and interested in building extensions or alike, this might prove useful. The code can be found on GitHub: - https://github.com/minium/bitcoin-api-cpp

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 (and not

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 p...@petertodd.org 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

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 jgar...@bitpay.com wrote: On Tue, Nov 4, 2014 at 8:13 PM, Peter Todd p...@petertodd.org 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

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