Timeline for What is the "1 RETURN" bug?
Current License: CC BY-SA 3.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 3, 2022 at 14:50 | comment | added | Michael Altfield | Wow, possibly the world's best example of Linus's Law en.wikipedia.org/wiki/Linus%27s_law | |
| Jun 17, 2015 at 17:08 | comment | added | amaclin | Yes, in the early bitcoin versions OP_RETURN just finished the script evaluation without changing the stack value. So, the stack had 1 on the top. The other flaw in that version was concatenating scriptSig and scriptPubkey to one byte array and executing them as one script, not as two consecutive scripts. return EvalScript(txin.scriptSig + CScript(OP_CODESEPARATOR) + txout.scriptPubKey, txTo, nIn, nHashType); The bug was fixed by changing OP_RETURN opcode: now it finishes script execution as 'failed' | |
| Jun 17, 2015 at 16:49 | comment | added | Wizard Of Ozzie | Wow, what a monumental oversight. I'm not versed in C++, so can you clarify what's happening? It looks like if it's a 6a (op_return) push code is encountered, the code breaks, leaving op_true on the stack, making the Tx valid? | |
| Jun 17, 2015 at 16:44 | vote | accept | Wizard Of Ozzie | ||
| Jun 17, 2015 at 10:15 | history | answered | amaclin | CC BY-SA 3.0 |