Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: jackjack on August 15, 2011, 12:51:50 AM



Title: Why so many OP codes are disabled?
Post by: jackjack on August 15, 2011, 12:51:50 AM
All I could find to explain that is 3 lines:
Quote
LSHIFT and RETURN bugs

On July 28 2010 two bugs were discovered and demonstrated on the test network. The first caused bitcoin to crash on some machines when processing a transaction containing an OP_LSHIFT. The second exploited another bug in the transaction handling code and allowed an attacker to spend coins that they did not own. Neither were exploited on the main network, and both were fixed by Bitcoin version 0.3.5.

After these bugs were discovered, many currently-unused script words were disabled for safety.

Are there any more details about this?
Is it possible that the official client accept them again in the near future? (at least INVERT, OR, AND, XOR and arithmetic ones)


Title: Re: Why so many OP codes are disabled?
Post by: Maged on August 15, 2011, 01:06:08 AM
This thread answers some of your questions:
https://bitcointalk.org/index.php?topic=28861.0


Title: Re: Why so many OP codes are disabled?
Post by: jackjack on August 15, 2011, 02:32:06 AM
Thanks for that

My second question is still unanswered though, and I can't find any information about that


Title: Re: Why so many OP codes are disabled?
Post by: Maged on August 15, 2011, 02:44:29 AM
gmaxwell's post addresses that point.


Title: Re: Why so many OP codes are disabled?
Post by: jackjack on August 15, 2011, 02:51:25 AM
If I understand correctly: if I want an OP code to be re-enabled, I'll have to make it secure


Title: Re: Why so many OP codes are disabled?
Post by: Maged on August 15, 2011, 04:34:08 AM
If I understand correctly: if I want an OP code to be re-enabled, I'll have to make it secure
You'll also have to mathematically prove it.


Title: Re: Why so many OP codes are disabled?
Post by: Mike Hearn on August 15, 2011, 11:53:05 AM
Seeing use cases for the disabled opcodes would definitely help.


Title: Re: Why so many OP codes are disabled?
Post by: ByteCoin on August 15, 2011, 01:27:07 PM
Does it seem reasonable to everyone that there is very little distinction between enabling an existing but disabled opcode and creating a completely new opcode to facilitate some desired functionality?

Many of the existing but disabled opcodes (especially the stack manipulation ones) seem rather pointless and it would be better to work towards opcodes that facilitate desired functionality such as Rivest and Shamir's  Paywords (http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.120.7731&rank=1) scheme as mentioned by hashcoin (https://bitcointalk.org/index.php?topic=25786.0).

Scripting is a great idea but parts of the current (but disabled) implementation seem to have been rushed out with insufficient thought.

ByteCoin


Title: Re: Why so many OP codes are disabled?
Post by: Gavin Andresen on August 15, 2011, 02:08:14 PM
I'd say the short answer to "is it possible to accept them again in the near future" is no (where "near" is in the next six months).

I agree with Maged-- before enabling new opcodes, I'd like to see a peer-reviewed academic-style paper that works through the security implications of the existing set of opcodes and gives a nice framework for thinking about new (or disabled old) opcodes. Doing that is way outside my own personal level of expertise; I know only enough about designing secure algorithms to know that I  have no idea whether or not re-enabling OP_XOR would have security implications for bitcoin.

Same goes for enabling nLockTime / transaction replacement, although I suspect that proving that transaction replacement doesn't open up any subtle attacks may be harder than proving security properties of opcodes.


Title: Re: Why so many OP codes are disabled?
Post by: jackjack on August 15, 2011, 05:54:13 PM
Ok thanks for the explanations