Bitcoin Forum
May 26, 2024, 05:18:27 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is anybody using OP_RESERVED even for academic purposes?  (Read 103 times)
NotATether (OP)
Legendary
*
Offline Offline

Activity: 1610
Merit: 6761


bitcoincleanup.com / bitmixlist.org


View Profile WWW
August 10, 2022, 04:56:59 PM
Merited by NeuroticFish (1), ABCbits (1)
 #1

Bitcoin Wiki's script page says that OP_RESERVED causes script evaluation to fail unless it's in an unexecuted IF statement.

According to https://bitcoin.stackexchange.com/questions/105778/why-were-op-reserved-op-reserved1-and-op-reserved2-originally-reserved , nobody really knows why they were introduced. And, all google searches to find at least an academic usage of the opcodes have not turned any results.

So, is it really true that these opcodes are virtually unused, and not useful for anything?

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3402
Merit: 6657


Just writing some code


View Profile WWW
August 10, 2022, 06:12:30 PM
Last edit: August 10, 2022, 09:00:44 PM by achow101
Merited by NeuroticFish (3), vapourminer (2), garlonicon (2)
 #2

They are literally unused and are unusable because they do not appear in the script interpreter. The main loop of the interpreter doesn't handle OP_RESERVED, and the default for unhandled opcdoes is to immediately fail. This behavior has existed since the original 0.1.0 release.

The are likely named OP_RESERVED because Satoshi was probably saving some space to add new opcodes in the future. However the only way to change the behavior of these opcodes is to do a hard fork which redefines them to only fail under specific conditions. Since the original release, the OP_NOP opcodes were added (which would also have been a hard fork), and with Taproot, OP_SUCCESS. These opcodes allow us to introduce new opcodes as soft forks.

garlonicon
Hero Member
*****
Offline Offline

Activity: 808
Merit: 1945


View Profile
August 10, 2022, 06:32:55 PM
 #3

They can be used in one case: to mark transaction as failed if some conditions are met. "<condition> OP_NOTIF OP_RESERVED OP_ENDIF" is the same as "<condition> OP_VERIFY".
Sandra_hakeem
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1045


Goodnight, ohh Leo!!! 🦅


View Profile WWW
August 10, 2022, 09:21:10 PM
 #4

Bitcoin Wiki's script page says that OP_RESERVED causes script evaluation to fail unless it's in an unexecuted IF statement.

According to https://bitcoin.stackexchange.com/questions/105778/why-were-op-reserved-op-reserved1-and-op-reserved2-originally-reserved , nobody really knows why they were introduced. And, all google searches to find at least an academic usage of the opcodes have not turned any results.

So, is it really true that these opcodes are virtually unused, and not useful for anything?

I think it's logical just as achow101 said......I have learnt that it associates some values along portional bytes, expressing  them as ''0x515253'' ? It also partly help programmers differentiate between the negative sign in the Script Number encoding. They might easily assume 0x50 is either OP_0 (0x00) or OP_1NEGATE (0x4f, 79).
References at https://bitcoin.stackexchange.com/questions/105778/why-were-op-reserved-op-reserved1-and-op-reserved2-originally-reserved

▄▄███████▄▄
▄██████████████▄
▄██████████████████▄
▄████▀▀▀▀███▀▀▀▀█████▄
▄█████████████▄█▀████▄
███████████▄███████████
██████████▄█▀███████████
██████████▀████████████
▀█████▄█▀█████████████▀
▀████▄▄▄▄███▄▄▄▄████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀
.
 MΞTAWIN  THE FIRST WEB3 CASINO   
.
.. PLAY NOW ..
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!