Bitcoin Forum
May 10, 2024, 02:41:48 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Does OP_INVALIDOPCODE always cause script to return false?  (Read 632 times)
uminatsu (OP)
Newbie
*
Offline Offline

Activity: 55
Merit: 0


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
1715352108
Hero Member
*
Offline Offline

Posts: 1715352108

View Profile Personal Message (Offline)

Ignore
1715352108
Reply with quote  #2

1715352108
Report to moderator
1715352108
Hero Member
*
Offline Offline

Posts: 1715352108

View Profile Personal Message (Offline)

Ignore
1715352108
Reply with quote  #2

1715352108
Report to moderator
1715352108
Hero Member
*
Offline Offline

Posts: 1715352108

View Profile Personal Message (Offline)

Ignore
1715352108
Reply with quote  #2

1715352108
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
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!