Bitcoin Forum
November 11, 2024, 06:35:32 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Does OP_INVALIDOPCODE always cause script to return false?  (Read 648 times)
uminatsu (OP)
Jr. Member
*
Offline Offline

Activity: 55
Merit: 2


View Profile
June 05, 2014, 05:33:07 PM
 #1

Normally OP_INVALIDOPCODE would cause script evaluation to return false, but what if it is inside the scope of a pair of OP_IF .... OP_ENDIF?

Take a look at this tx:

77822fd6663c665104119cb7635352756dfc50da76a92d417ec1a12c518fad69

scriptPubKey is

OP_IF OP_INVALIDOPCODE 4effffffff 46726f6d.... OP_ENDIF

It seems that a scriptSig of the following will be accepted to memory pool, but will it still fail to verify?

OP_1 OP_0
apxu
Member
**
Offline Offline

Activity: 229
Merit: 13


View Profile
June 05, 2014, 06:26:29 PM
 #2

Seems to me that the "problem" is in this
Code:
            if (vchPushValue.size() > MAX_SCRIPT_ELEMENT_SIZE)
                return false;
This check performs in both branches if/else

So, it is unspendable output ( this "Message from Satoshi" was discussed widely )
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!