How do you want to change "OP_CLTV OP_DROP" to one "OP_RETURNTRUE"? Please write an usecase.
His proposal is to add some OP_RETURNTRUE opcodes.
Since it is a hard fork, new opcodes could be used.
- 186: OP_RETURNTRUE1
- 187: OP_RETURNTRUE2
- ...
- 195: OP_RETURNTRUE10
Once these opcodes are added, then you can use any of them to instantly mark a transaction as valid.
This means that you can add new features that do pretty much anything.
The example given was OP_CAT. This means take the top 2 items on the stack and combine them into a single array.
An output could be created with the following scriptPubKey.
OP_CAT [00_01_02_03_04_05_06_07] OP_EQUAL
To spend this you need to push two arrays onto the stack that concatenate to the given array. You could push two 4 byte arrays.
[04_05_06_07] [00_01_02_03]
New nodes would be able to process the new opcode fully and check the script is valid. Miners would run the new software.
In the example, OP_CAT is only of the OP_RETURNTRUE opcodes. Ild nodes would see the scriptPubKey as
OP_RETURNTRUE1 [00_01_02_03_04_05_06_07] OP_EQUAL
When they process the transaction, they will first push the two four byte arrays onto the stack and then execute the scriptPubKey. The first opcode says return true, so they will accept the script as valid.
The key point is that they allow soft forks to have opcodes with any functionality. If an old node hits one of these opcodes, it just says "I don't understand this opcode, so will accept the script".
Thanks. I'd like to show it by OP_CLTV
In BIP65, OP_NOP2 is redefined as OP_CLTV. A simple CLTV scriptPubKey would be like this:
<height> OP_CLTV OP_DROP <pubkey> OP_CHECKSIG
For upgraded nodes, OP_CLTV will check whether the locktime is greater than <height>. If not, the script fails immediately. If yes, OP_CLTV will do nothing, and OP_DROP will drop the <height> from the stack, and the OP_CHECKSIG will verify the signature.
For old nodes, OP_CLTV is just OP_NOP2 and is ignored. It will then drop <height> and verify the signature.
Since the new rule is more stringent than the old one, this is a softfork.
-----------------------
With OP_RETURNTRUE, the scriptPubKey would become:
<height> OP_CLTV <pubkey> OP_CHECKSIG
For upgraded nodes, OP_CLTV will check whether the locktime is greater than <height>. If not, the script fails immediately. If yes, OP_CLTV will drop the <height> from the stack, and the OP_CHECKSIG will verify the signature.
For old nodes, OP_CLTV is just OP_RETURNTRUE which automatically declares the script as valid.
Again, since the new rule is more stringent than the old one, this is a softfork.
----------------------
The difference may not be obvious in the OP_CLTV example. But for OP_CAT, it is not possible by simply redefining OP_NOP