New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove implementation of disabled opcodes #2610
Conversation
So we stop getting pull requests (like bitcoin#2604) fixing problems with disabled Script opcodes. A hard fork would be required to re-enable these, and if we ever did that we'd require extensive review and testing.
Any reason not to remove the definitions of OP_disabledops entirely? |
The only reason to keep them would be backward compatibility for the decoded version, I guess, and then even only for very weird scripts... |
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/bce697d7faef0d8119ba80ae583cfcce460c7f81 for binaries and test log. |
Good. The code is unused and there is no reason to keep it like this. If it is ever decided to bring the opcodes back, it can be done with better designed semantics w.r.t signed/unsigned handling. |
@luke-jr The code that actually disabled those OP's is executed, so I'd be inclined to leave that in place out of paranoia, at least for now. FWIW, I manually reviewed the change. |
RE: remove opcodes entirely: I thought about removing the OP_ enum constants, but then we'd just have to use hard-coded 0x constants in a couple of places (the early if statement, and the opcode-to-string map so unit tests continued working) which would be uglier and more error-prone. |
ACK |
Remove implementation of disabled opcodes
Remove implementation of disabled opcodes
So we stop getting pull requests (like #2604) fixing problems with disabled Script opcodes.
A hard fork would be required to re-enable these, and if we ever did that we'd require extensive review and testing.
I double-checked to make sure the script_invalid.json unit tests make sure that the disabled opcodes are handled properly (script invalid even if the disabled opcodes are in the unexecuted branch of an OP_IF); they do.