forex.pm forex forum binary options trade

 Сryptocurrency exchanges => Binance - Сryptocurrency exchanges => Topic started by: Bitcoin on Apr 20, 2022, 08:42 pm

Title: What is the purpose of OP_DROP
Post by: Bitcoin on Apr 20, 2022, 08:42 pm
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 (https://bitcoin.stackexchange.com/questions/92366/what-is-the-purpose-of-op-drop)