forex.pm forex forum binary options trade - Binance - Сryptocurrency exchanges - What is the purpose of OP_DROP
  • Welcome to forex.pm forex forum binary options trade. Please login or sign up.
 

What is the purpose of OP_DROP

Started by Bitcoin, Apr 20, 2022, 08:42 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bitcoin

What is the purpose of OP_DROP

From what I can tell OP_DROP is a method of storing non validation data in a tx ( seperate from using data after OP_RETURN ).



However in this unlocking script described by bip199, the timeout block and timeout op are before the OP_DROP, meaning they would be dropped during validation? OP_DROP can't be describing what comes after because that should be the payment path validation - and because afaik bitcoin script is stack based.



What is the point of OP_DROP? How does it apply in the following script?



OP_IF
    [HASHOP] <digest> OP_EQUALVERIFY OP_DUP OP_HASH160 <seller pubkey hash>           
OP_ELSE
    <num> [TIMEOUTOP] OP_DROP OP_DUP OP_HASH160 <buyer pubkey hash>
OP_ENDIF
OP_EQUALVERIFY
OP_CHECKSIG

Source: What is the purpose of OP_DROP