wiki commit

This commit is contained in:
1HXb9KMAtwNJqz4egi6hJx08EQgJajiBTH
2019-12-26 16:55:17 -05:00
committed by buwiki
parent 2719ae5615
commit 8bbf9277b1
3 changed files with 33 additions and 38 deletions
+23 -38
View File
@@ -36,29 +36,14 @@ The table below lists the currently allocated op codes. Op codes marked with **
| Op Code Range | Name |
|--|--|
| 0x00 | OP_0 / OP_FALSE |
| 0x01 - 0x4B | [push data](/protocol/blockchain/script/op-codes/push-data) |
| 0x00 | [OP_0](/protocol/blockchain/script/op-codes/op-x), OP_FALSE |
| 0x01 - 0x4B | [OP_DATA_X](/protocol/blockchain/script/op-codes/op-data-x) |
| 0x4C | OP_PUSHDATA1 |
| 0x4D | OP_PUSHDATA2 |
| 0x4E | OP_PUSHDATA4 |
| 0x4F | OP_1NEGATE |
| 0x50 | OP_RESERVED **(disabled)** |
| 0x51 | OP_1 / OP_TRUE |
| 0x52 | OP_2 |
| 0x53 | OP_3 |
| 0x54 | OP_4 |
| 0x55 | OP_5 |
| 0x56 | OP_6 |
| 0x57 | OP_7 |
| 0x58 | OP_8 |
| 0x59 | OP_9 |
| 0x5A | OP_10 |
| 0x5B | OP_11 |
| 0x5C | OP_12 |
| 0x5D | OP_13 |
| 0x5E | OP_14 |
| 0x5F | OP_15 |
| 0x60 | OP_16 |
| 0x51 - 0x60 | [OP_1](/protocol/blockchain/script/op-codes/op-x) - OP_16, OP_TRUE |
| 0x61 | OP_NOP |
| 0x62 | OP_VER **(disabled)** |
| 0x63 | OP_IF |
@@ -160,38 +145,38 @@ Some node implementations define custom op codes.
| Op Code Range | Name |
|--|--|
| 0xFA | OP_SMALLINTEGER |
| 0xFB | OP_PUBKEYS |
| 0xFD | OP_PUBKEYHASH |
| 0xFE | OP_PUBKEY |
| 0xFF | OP_INVALIDOPCODE |
| 0xFA | OP_SMALLINTEGER <img src="/_static_/images/warning.png" /> |
| 0xFB | OP_PUBKEYS <img src="/_static_/images/warning.png" /> |
| 0xFD | OP_PUBKEYHASH <img src="/_static_/images/warning.png" /> |
| 0xFE | OP_PUBKEY <img src="/_static_/images/warning.png" /> |
| 0xFF | OP_INVALIDOPCODE <img src="/_static_/images/warning.png" /> |
#### Bitcoin ABC
| Op Code Range | Name |
|--|--|
| 0xF0 | OP_PREFIX_BEGIN |
| 0xF7 | OP_PREFIX_END |
| 0xFF | OP_INVALIDOPCODE |
| 0xF0 | OP_PREFIX_BEGIN <img src="/_static_/images/warning.png" /> |
| 0xF7 | OP_PREFIX_END <img src="/_static_/images/warning.png" /> |
| 0xFF | OP_INVALIDOPCODE <img src="/_static_/images/warning.png" /> |
#### Bitcoin Unlimited
| Op Code Range | Name |
|--|--|
| 0xF0 | OP_BIGINTEGER |
| 0xF1 | OP_DATA |
| 0xFA | OP_SMALLINTEGER |
| 0xFB | OP_PUBKEYS |
| 0xFD | OP_PUBKEYHASH |
| 0xFE | OP_PUBKEY |
| 0xFF | OP_INVALIDOPCODE |
| 0xF0 | OP_BIGINTEGER <img src="/_static_/images/warning.png" /> |
| 0xF1 | OP_DATA <img src="/_static_/images/warning.png" /> |
| 0xFA | OP_SMALLINTEGER <img src="/_static_/images/warning.png" /> |
| 0xFB | OP_PUBKEYS <img src="/_static_/images/warning.png" /> |
| 0xFD | OP_PUBKEYHASH <img src="/_static_/images/warning.png" /> |
| 0xFE | OP_PUBKEY <img src="/_static_/images/warning.png" /> |
| 0xFF | OP_INVALIDOPCODE <img src="/_static_/images/warning.png" /> |
#### Flowee the Hub
| Op Code Range | Name |
|--|--|
| 0xFA | OP_SMALLINTEGER |
| 0xFB | OP_PUBKEYS |
| 0xFD | OP_PUBKEYHASH |
| 0xFE | OP_PUBKEY |
| 0xFF | OP_INVALIDOPCODE |
| 0xFA | OP_SMALLINTEGER <img src="/_static_/images/warning.png" /> |
| 0xFB | OP_PUBKEYS <img src="/_static_/images/warning.png" /> |
| 0xFD | OP_PUBKEYHASH <img src="/_static_/images/warning.png" /> |
| 0xFE | OP_PUBKEY <img src="/_static_/images/warning.png" /> |
| 0xFF | OP_INVALIDOPCODE <img src="/_static_/images/warning.png" /> |
@@ -0,0 +1,3 @@
# OP_DATA_X
The OP_DATA_X op codes push a value to the top of the stack. The value pushed to the stack follows this op code and is the length of the op code interpreted as a [two's_complement](https://en.wikipedia.org/wiki/Two%27s_complement) integer. For example, OP_DATA_24 (op code 0x18) pushes the next 24 bytes in the script as a single value on the stack.
@@ -0,0 +1,7 @@
# OP_X
The OP_X op codes add a numerical value to the top of the stack. OP_0 pushes an empty byte array which is interpreted as the numerical value 0. The rest push a single byte to the top of the stack as a [two's_complement](https://en.wikipedia.org/wiki/Two%27s_complement) integer. OP_1 pushes a 1, OP_2 pushes a 2, and so on through OP_16, which adds a 16 (0x10).
# OP_TRUE and OP_FALSE
OP_FALSE is an alias for OP_0 while OP_TRUE is an alias for OP_1.