Post
Topic
Board Development & Technical Discussion
Re: Taproot proposal
by
BlockchainYM
on 28/08/2021, 14:10:11 UTC
I know, but can you tell me the specific meaning of tapscript (Many previously disabled opcodes are redefined to be OP_SUCCESS opcodes that unconditionally render the entire script valid to simplify soft fork upgrades.)? I don’t understand what OP_SUCCESS specifically redefines? How is it used?

In tapscript when the interpreter encounters one of the OP_SUCCESSx opcodes, it instantly succeeds. In the future this might change, and some opcodes might enforce restrictions - soft fork. But the future is not here yet, so nobody knows what and how exactly would happen. So there was OP_CAT at the very beginning, then it was disabled, and now inside tapscript there's OP_SUCCESS126 instead, which might change (in future tapscript version) to something else (instead of instant success).

Here is the list of the codes redefined as OP_SUCCESSx, the red ones were disabled in usual script:

    OP_RESERVED = 0x50,

    OP_VER = 0x62,

    OP_CAT = 0x7e,
    OP_SUBSTR = 0x7f,
    OP_LEFT = 0x80,
    OP_RIGHT = 0x81,
    OP_SIZE = 0x82,

    OP_INVERT = 0x83,
    OP_AND = 0x84,
    OP_OR = 0x85,
    OP_XOR = 0x86,

    OP_RESERVED1 = 0x89,
    OP_RESERVED2 = 0x8a,

    OP_2MUL = 0x8d,
    OP_2DIV = 0x8e,

    OP_MUL = 0x95,
    OP_DIV = 0x96,
    OP_MOD = 0x97,
    OP_LSHIFT = 0x98,
    OP_RSHIFT = 0x99,

and everything between
    OP_CHECKSIGADD = 0xba,
and
    OP_INVALIDOPCODE = 0xff,



Thank you.  Can you tell me a demonstration website with a full transaction script?