Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove CIMV and CTMV. #368

Merged
merged 2 commits into from
Jun 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions specs/vm/instruction_set.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
- [XOR: XOR](#xor-xor)
- [XORI: XOR immediate](#xori-xor-immediate)
- [Control Flow Instructions](#control-flow-instructions)
- [CIMV: Check input maturity verify](#cimv-check-input-maturity-verify)
- [CTMV: Check transaction maturity verify](#ctmv-check-transaction-maturity-verify)
- [JMP: Jump](#jmp-jump)
- [JI: Jump immediate](#ji-jump-immediate)
- [JNE: Jump if not equal](#jne-jump-if-not-equal)
Expand Down Expand Up @@ -666,46 +664,6 @@ Panic if:

## Control Flow Instructions

### CIMV: Check input maturity verify

| | |
|-------------|-------------------------------------------------------------|
| Description | Set `$rA` to `true` if the `$rC <= tx.input[$rB].maturity`. |
| Operation | ```$rA = checkinputmaturityverify($rB, $rC);``` |
| Syntax | `cimv $rA $rB $rC` |
| Encoding | `0x00 rA rB rC -` |
| Notes | |

Panic if:

- `$rA` is a [reserved register](./main.md#semantics)
- `$rC > tx.input[$rB].maturity`
- the input `$rB` is not of type [`InputType.Coin`](../protocol/tx_format.md)
- `$rB > tx.inputsCount`

Otherwise, advance the program counter `$pc` by `4`.

See also: [BIP-112](https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki) and [CLTV](#cltv-check-lock-time-verify).

### CTMV: Check transaction maturity verify

| | |
|-------------|--------------------------------------------------|
| Description | Set `$rA` to `true` if `$rB <= tx.maturity`. |
| Operation | ```$rA = checktransactionmaturityverify($rB);``` |
| Syntax | `ctmv $rA $rB` |
| Encoding | `0x00 rA rB - -` |
| Notes | |

Panic if:

- `$rA` is a [reserved register](./main.md#semantics)
- `$rB > tx.maturity`

Otherwise, advance the program counter `$pc` by `4`.

See also: [BIP-65](https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki) and [Bitcoin's Time Locks](https://prestwi.ch/bitcoin-time-locks).

### JMP: Jump

| | |
Expand Down