Skip to content
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

Failed to process block 96464 on testnet #1

Closed
davecgh opened this issue Oct 7, 2013 · 2 comments
Closed

Failed to process block 96464 on testnet #1

davecgh opened this issue Oct 7, 2013 · 2 comments
Labels

Comments

@davecgh
Copy link
Member

davecgh commented Oct 7, 2013

[11:21:08 2013-10-07] [WRN] [CHAN] tx 1b8bb29b851c555d1f34ab61df8f910ea0fc60d09f66dd2c9b16464b8ae1c931 failed input 0, err Invalid Opcode
[11:21:08 2013-10-07] [ERR] [BTCD] [BMGR] Failed to process block 000000000017538a71d012de3a73fcc22415b2aabf7329133c0109aa0a75b4b4: Invalid Opcode

This is due to the fact that btcscript errors on scripts with invalid opcodes regardless of them being executed or not while bitcoind has rather "interesting" handling in that it doesn't explode on invalid opcodes unless they are executed. It doesn't seem like a particularly good idea to allow invalid opcodes in a transaction script regardless of them being executed or not, but to be compatible, the same behavior is required.

The relevant code from bitcoind is:

else if (fExec || (OP_IF <= opcode && opcode <= OP_ENDIF))
switch (opcode)
{
@apotheon
Copy link

apotheon commented Oct 7, 2013

This hurts my brain.

@davecgh
Copy link
Member Author

davecgh commented Oct 8, 2013

This is resolved as of commit 52a1488. Tests have also been added to prevent regressions.

@davecgh davecgh closed this as completed Oct 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants