From ff0c71836f5822b0ed982cbacd1df31b22e174c4 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Thu, 14 Dec 2023 20:20:19 +0100 Subject: [PATCH] consensus: add more opcodes --- consensus/src/lib.rs | 3 +- consensus/src/opcodes.rs | 206 +++++++++++++++++++++++++++++++++++++++ consensus/src/script.rs | 81 --------------- consensus/src/stl.rs | 2 +- src/stl.rs | 2 +- stl/Bitcoin@0.1.0.sta | 94 ++++++++++-------- stl/Bitcoin@0.1.0.stl | Bin 2942 -> 3336 bytes stl/Bitcoin@0.1.0.sty | 22 +++-- 8 files changed, 276 insertions(+), 134 deletions(-) diff --git a/consensus/src/lib.rs b/consensus/src/lib.rs index 7eb6cc69..2789c0d4 100644 --- a/consensus/src/lib.rs +++ b/consensus/src/lib.rs @@ -73,8 +73,9 @@ pub use coding::{ VarInt, VarIntArray, }; pub use hashtypes::{PubkeyHash, ScriptHash, WPubkeyHash, WScriptHash}; +pub use opcodes::OpCode; pub use pubkeys::{CompressedPk, InvalidPubkey, LegacyPk, PubkeyParseError, UncompressedPk}; -pub use script::{OpCode, RedeemScript, ScriptBytes, ScriptPubkey, SigScript}; +pub use script::{RedeemScript, ScriptBytes, ScriptPubkey, SigScript}; pub use segwit::{SegwitError, Witness, WitnessProgram, WitnessScript, WitnessVer, Wtxid}; pub use sigtypes::{Bip340Sig, LegacySig, SigError, SighashFlag, SighashType}; pub use taproot::{ diff --git a/consensus/src/opcodes.rs b/consensus/src/opcodes.rs index 0b3dd072..b31a2943 100644 --- a/consensus/src/opcodes.rs +++ b/consensus/src/opcodes.rs @@ -19,6 +19,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +use crate::LIB_NAME_BITCOIN; + /// Push an empty array onto the stack. pub const OP_PUSHBYTES_0: u8 = 0x00; /// Push the next byte as an array onto the stack. @@ -548,3 +550,207 @@ pub const OP_RETURN_253: u8 = 0xfd; pub const OP_RETURN_254: u8 = 0xfe; /// Synonym for OP_RETURN. pub const OP_INVALIDOPCODE: u8 = 0xff; + +#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug, Display)] +#[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] +#[strict_type(lib = LIB_NAME_BITCOIN, tags = repr, into_u8, try_from_u8)] +#[non_exhaustive] +#[repr(u8)] +pub enum OpCode { + /// Push an empty array onto the stack. + #[display("OP_PUSH_BYTES0")] + PushBytes0 = OP_PUSHBYTES_0, + + /// Push the next byte as an array onto the stack. + #[display("OP_PUSH_BYTES1")] + PushBytes1 = OP_PUSHBYTES_1, + + /// Push the next 2 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES2")] + PushBytes2 = OP_PUSHBYTES_2, + + /// Push the next 3 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES3")] + PushBytes3 = OP_PUSHBYTES_3, + + /// Push the next 4 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES4")] + PushBytes4 = OP_PUSHBYTES_4, + + /// Push the next 5 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES5")] + PushBytes5 = OP_PUSHBYTES_5, + + /// Push the next 6 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES6")] + PushBytes6 = OP_PUSHBYTES_6, + + /// Push the next 7 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES7")] + PushBytes7 = OP_PUSHBYTES_7, + + /// Push the next 8 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES8")] + PushBytes8 = OP_PUSHBYTES_8, + + /// Push the next 9 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES9")] + PushBytes9 = OP_PUSHBYTES_9, + + /// Push the next 10 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES10")] + PushBytes10 = OP_PUSHBYTES_10, + + /// Push the next 11 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES11")] + PushBytes11 = OP_PUSHBYTES_11, + + /// Push the next 12 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES12")] + PushBytes12 = OP_PUSHBYTES_12, + + /// Push the next 13 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES13")] + PushBytes13 = OP_PUSHBYTES_13, + + /// Push the next 14 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES14")] + PushBytes14 = OP_PUSHBYTES_14, + + /// Push the next 15 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES15")] + PushBytes15 = OP_PUSHBYTES_15, + + /// Push the next 16 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES16")] + PushBytes16 = OP_PUSHBYTES_16, + + /// Push the next 17 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES17")] + PushBytes17 = OP_PUSHBYTES_17, + + /// Push the next 18 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES18")] + PushBytes18 = OP_PUSHBYTES_18, + + /// Push the next 19 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES19")] + PushBytes19 = OP_PUSHBYTES_19, + + /// Push the next 20 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES20")] + PushBytes20 = OP_PUSHBYTES_20, + + /// Push the next 21 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES21")] + PushBytes21 = OP_PUSHBYTES_21, + + /// Push the next 22 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES22")] + PushBytes22 = OP_PUSHBYTES_22, + + /// Push the next 23 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES23")] + PushBytes23 = OP_PUSHBYTES_23, + + /// Push the next 24 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES24")] + PushBytes24 = OP_PUSHBYTES_24, + + /// Push the next 25 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES25")] + PushBytes25 = OP_PUSHBYTES_25, + + /// Push the next 26 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES26")] + PushBytes26 = OP_PUSHBYTES_26, + + /// Push the next 27 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES27")] + PushBytes27 = OP_PUSHBYTES_27, + + /// Push the next 28 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES28")] + PushBytes28 = OP_PUSHBYTES_28, + + /// Push the next 29 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES29")] + PushBytes29 = OP_PUSHBYTES_29, + + /// Push the next 30 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES30")] + PushBytes30 = OP_PUSHBYTES_30, + + /// Push the next 30 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES31")] + PushBytes31 = OP_PUSHBYTES_31, + + /// Push the next 32 bytes as an array onto the stack. + #[display("OP_PUSH_BYTES32")] + PushBytes32 = OP_PUSHBYTES_32, + + /// Read the next byte as N; push the next N bytes as an array onto the + /// stack. + #[display("OP_PUSH_DATA1")] + PushData1 = OP_PUSHDATA1, + /// Read the next 2 bytes as N; push the next N bytes as an array onto the + /// stack. + #[display("OP_PUSH_DATA2")] + PushData2 = OP_PUSHDATA2, + /// Read the next 4 bytes as N; push the next N bytes as an array onto the + /// stack. + #[display("OP_PUSH_DATA3")] + PushData4 = OP_PUSHDATA4, + + /// Push the array `0x01` onto the stack. + #[display("OP_PUSHNUM_1")] + PushNum1 = OP_PUSHNUM_1, + + /// Synonym for OP_RETURN. + Reserved = OP_RESERVED, + + /// Fail the script immediately. + #[display("OP_RETURN")] + #[strict_type(dumb)] + Return = OP_RETURN, + + /// Duplicates the top stack item. + #[display("OP_DUP")] + Dup = OP_DUP, + + /// Pushes 1 if the inputs are exactly equal, 0 otherwise. + #[display("OP_EQUAL")] + Equal = OP_EQUAL, + + /// Returns success if the inputs are exactly equal, failure otherwise. + #[display("OP_EQUALVERIFY")] + EqualVerify = OP_EQUALVERIFY, + + /// Pop the top stack item and push its RIPEMD160 hash. + #[display("OP_RIPEMD160")] + Ripemd160 = OP_RIPEMD160, + + /// Pop the top stack item and push its SHA1 hash. + #[display("OP_SHA1")] + Sha1 = OP_SHA1, + + /// Pop the top stack item and push its SHA256 hash. + #[display("OP_SHA256")] + Sha256 = OP_SHA256, + + /// Pop the top stack item and push its RIPEMD(SHA256) hash. + #[display("OP_HASH160")] + Hash160 = OP_HASH160, + + /// Pop the top stack item and push its SHA256(SHA256) hash. + #[display("OP_HASH256")] + Hash256 = OP_HASH256, + + /// pushing 1/0 for success/failure. + #[display("OP_CHECKSIG")] + CheckSig = OP_CHECKSIG, + + /// returning success/failure. + #[display("OP_CHECKSIGVERIFY")] + CheckSigVerify = OP_CHECKSIGVERIFY, +} diff --git a/consensus/src/script.rs b/consensus/src/script.rs index ce678baa..f5ffe6b4 100644 --- a/consensus/src/script.rs +++ b/consensus/src/script.rs @@ -25,87 +25,6 @@ use amplify::confinement::Confined; use crate::opcodes::*; use crate::{ScriptHash, VarInt, VarIntArray, LIB_NAME_BITCOIN}; -#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug, Display)] -#[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] -// TODO: Replace `try_from` with `from` since opcodes cover whole range of u8 -#[strict_type(lib = LIB_NAME_BITCOIN, tags = repr, into_u8, try_from_u8)] -#[non_exhaustive] -#[repr(u8)] -pub enum OpCode { - /// Push an empty array onto the stack. - #[display("OP_PUSH_BYTES0")] - PushBytes0 = OP_PUSHBYTES_0, - - /// Push the next 32 bytes as an array onto the stack. - #[display("OP_PUSH_BYTES32")] - PushBytes32 = OP_PUSHBYTES_32, - - /// Synonym for OP_RETURN. - Reserved = OP_RESERVED, - - /// Fail the script immediately. - #[display("OP_RETURN")] - #[strict_type(dumb)] - Return = OP_RETURN, - - /// Read the next byte as N; push the next N bytes as an array onto the - /// stack. - #[display("OP_PUSH_DATA1")] - PushData1 = OP_PUSHDATA1, - /// Read the next 2 bytes as N; push the next N bytes as an array onto the - /// stack. - #[display("OP_PUSH_DATA2")] - PushData2 = OP_PUSHDATA2, - /// Read the next 4 bytes as N; push the next N bytes as an array onto the - /// stack. - #[display("OP_PUSH_DATA3")] - PushData4 = OP_PUSHDATA4, - - /// Push the array `0x01` onto the stack. - #[display("OP_PUSHNUM_1")] - PushNum1 = OP_PUSHNUM_1, - - /// Duplicates the top stack item. - #[display("OP_DUP")] - Dup = OP_DUP, - - /// Pushes 1 if the inputs are exactly equal, 0 otherwise. - #[display("OP_EQUAL")] - Equal = OP_EQUAL, - - /// Returns success if the inputs are exactly equal, failure otherwise. - #[display("OP_EQUALVERIFY")] - EqualVerify = OP_EQUALVERIFY, - - /// Pop the top stack item and push its RIPEMD160 hash. - #[display("OP_RIPEMD160")] - Ripemd160 = OP_RIPEMD160, - - /// Pop the top stack item and push its SHA1 hash. - #[display("OP_SHA1")] - Sha1 = OP_SHA1, - - /// Pop the top stack item and push its SHA256 hash. - #[display("OP_SHA256")] - Sha256 = OP_SHA256, - - /// Pop the top stack item and push its RIPEMD(SHA256) hash. - #[display("OP_HASH160")] - Hash160 = OP_HASH160, - - /// Pop the top stack item and push its SHA256(SHA256) hash. - #[display("OP_HASH256")] - Hash256 = OP_HASH256, - - /// pushing 1/0 for success/failure. - #[display("OP_CHECKSIG")] - CheckSig = OP_CHECKSIG, - - /// returning success/failure. - #[display("OP_CHECKSIGVERIFY")] - CheckSigVerify = OP_CHECKSIGVERIFY, -} - #[derive(Wrapper, WrapperMut, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, From, Default)] #[wrapper(Deref, AsSlice, Hex)] #[wrapper_mut(DerefMut, AsSliceMut)] diff --git a/consensus/src/stl.rs b/consensus/src/stl.rs index 73806020..66008bc3 100644 --- a/consensus/src/stl.rs +++ b/consensus/src/stl.rs @@ -37,7 +37,7 @@ pub const LIB_ID_BITCOIN: &str = pub const LIB_ID_BP_TX: &str = "urn:ubideco:stl:HX2UBak8vPsTokug1DGMDvTpzns3xUdwZ7QJdyt4qBA9#speed-atlanta-trilogy"; pub const LIB_ID_BP_CONSENSUS: &str = - "urn:ubideco:stl:DQtzB8Kcfm7XeuhWf8sv3n31c5V2qK6VS1Zbye76haUQ#erosion-quiet-kinetic"; + "urn:ubideco:stl:H6wk6SV9j8Up16osC9q3AsQkkA41i7E2qodEfUf5JRPz#mustang-europe-melon"; #[deprecated(since = "0.10.8", note = "use _bp_tx_stl instead")] fn _bitcoin_stl() -> Result { _bp_tx_stl() } diff --git a/src/stl.rs b/src/stl.rs index 617c9f8b..710efcc4 100644 --- a/src/stl.rs +++ b/src/stl.rs @@ -30,7 +30,7 @@ use strict_types::{CompileError, LibBuilder, TypeLib}; /// Strict types id for the library providing data types from [`dbc`] and /// [`seals`] crates. pub const LIB_ID_BPCORE: &str = - "urn:ubideco:stl:E4xYrMV4cHgYhTPzrjG3DxzAyLEMnbvnsrBsGhQP4anV#quest-harlem-mirror"; + "urn:ubideco:stl:BrKg2wSDRFDFSGzn2RrQkbwFeuLw2yDAFtpQ7WRh3nrz#dance-swim-liter"; fn _bp_core_stl() -> Result { LibBuilder::new(libname!(LIB_NAME_BPCORE), tiny_bset! { diff --git a/stl/Bitcoin@0.1.0.sta b/stl/Bitcoin@0.1.0.sta index a1faf26f..43982767 100644 --- a/stl/Bitcoin@0.1.0.sta +++ b/stl/Bitcoin@0.1.0.sta @@ -1,5 +1,5 @@ -----BEGIN STRICT TYPE LIB----- -Id: urn:ubideco:stl:DQtzB8Kcfm7XeuhWf8sv3n31c5V2qK6VS1Zbye76haUQ +Id: urn:ubideco:stl:H6wk6SV9j8Up16osC9q3AsQkkA41i7E2qodEfUf5JRPz Name: Bitcoin Dependencies: urn:ubideco:stl:9KALDYR8Nyjq4FdMW6kYoL7vdkWnqPqNuFnmE9qHpNjZ @@ -24,48 +24,56 @@ etTJLemGB0xlYWZWZXIFAQAAAQhMZWdhY3lQawYCCmNvbXByZXNzZWQCe4SAPJ76 gHX3UTvsS5P2TQZwdWJrZXkABwAAQCEACUxlZ2FjeVNpZwYCA3NpZwAIAABAAAAA AAAAAAD/AAAAAAAAAAxzaWdoYXNoX3R5cGUB2xdkPncJEyfoBJkkgdXcYBUjCJVT OeWLM5/UTE9ySCoKTG9ja0hlaWdodAUBAAAECExvY2tUaW1lBQEAAAQNTG9ja1Rp -bWVzdGFtcAUBAAAEBk9wQ29kZQMSCnB1c2hCeXRlczAAC3B1c2hCe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nl0ZXMFAQAABAZWYXJJbnQFAQAACARWb3V0BQEAAAQLV1B1YmtleUhhc2gFAQAH +AABAFAALV1NjcmlwdEhhc2gFAQAHAABAIAALV2VpZ2h0VW5pdHMFAQAABAdXaXRu +ZXNzBQEACAHEcmuPjyjResGXyB2ODaGbYkSc5tBkXf7H6Xg8tYfxowAAAAAAAAAA +/////wAAAAAOV2l0bmVzc1Byb2dyYW0GAgd2ZXJzaW9uAdHs2nZn5ELtTRJppmcD +NuX+9DevXs4raa66DEZWxPqtB3Byb2dyYW0ACAAAQAIAAAAAAAAAKAAAAAAAAAAN +V2l0bmVzc1NjcmlwdAUBASWr9bkSFBe6oznUX3sVdadxS+F6dRhd0DE1etTJLemG +CldpdG5lc3NWZXIDEQJ2MAACdjFRAnYyUgJ2M1MCdjRUAnY1VQJ2NlYCdjdXAnY4 +WAJ2OVkDdjEwWgN2MTFbA3YxMlwDdjEzXQN2MTReA3YxNV8DdjE2YAVXdHhpZAUB +AAcAAEAgAAdYT25seVBrBQEABwAAQCAA -----END STRICT TYPE LIB----- diff --git a/stl/Bitcoin@0.1.0.stl b/stl/Bitcoin@0.1.0.stl index f0e96517fa533f7966623d9b8fafb14e3b313ca8..29e2893d5912556a9b53ee7414cfa7a19bcf4cdc 100644 GIT binary patch delta 423 zcmYk%Ne%%~5XNydnr`#ZXhUD&4gIFAyGSf0&BE$!UBVqCuHphNB50EOcK=_hl1jaj zOL}_*o=1mMvEQDLyMk4yd6in!sAWK%*Qr&5S~sapNNroxt{s;m#0K=lE705C&<9Rb|<1ONYBunCO>p8`YzkTXC&2dD)=rvS4A*cHI7VNbFRjU>`X{#G3Nx<|S3zlUhErupYOw*s=4{rv>;Quk2_*mk diff --git a/stl/Bitcoin@0.1.0.sty b/stl/Bitcoin@0.1.0.sty index 721d1342..a3a4fab0 100644 --- a/stl/Bitcoin@0.1.0.sty +++ b/stl/Bitcoin@0.1.0.sty @@ -1,5 +1,5 @@ {- - Id: urn:ubideco:stl:DQtzB8Kcfm7XeuhWf8sv3n31c5V2qK6VS1Zbye76haUQ#erosion-quiet-kinetic + Id: urn:ubideco:stl:H6wk6SV9j8Up16osC9q3AsQkkA41i7E2qodEfUf5JRPz#mustang-europe-melon Name: Bitcoin Version: 0.1.0 Description: Consensus library for bitcoin protocol @@ -54,12 +54,20 @@ data LockHeight :: U32 data LockTime :: U32 -- urn:ubideco:semid:8h25q8Va3Sx3csGvq4reMPqG7w4QrEowpYxdMAwaErmF#compass-protein-barcode data LockTimestamp :: U32 --- urn:ubideco:semid:F8WJfUNUgyVDSX6zXjrdi2pWBa54zLWorawtahJf33Hw#shampoo-rufus-tobacco -data OpCode :: pushBytes0:0 | pushBytes32:32 | pushData1:76 | pushData2:77 - | pushData4:78 | reserved:80 | pushNum1:81 | return:106 - | dup:118 | equal:135 | equalVerify:136 | ripemd160:166 - | sha1:167 | sha256:168 | hash160:169 | hash256:170 - | checkSig:172 | checkSigVerify:173 +-- urn:ubideco:semid:9G21BTSC1kjkfh3hirjQvRcRkC6fwL5VtcUUobGAT9bu#bless-hippie-shirt +data OpCode :: pushBytes0:0 | pushBytes1:1 | pushBytes2:2 | pushBytes3:3 + | pushBytes4:4 | pushBytes5:5 | pushBytes6:6 | pushBytes7:7 + | pushBytes8:8 | pushBytes9:9 | pushBytes10:10 | pushBytes11:11 + | pushBytes12:12 | pushBytes13:13 | pushBytes14:14 | pushBytes15:15 + | pushBytes16:16 | pushBytes17:17 | pushBytes18:18 | pushBytes19:19 + | pushBytes20:20 | pushBytes21:21 | pushBytes22:22 | pushBytes23:23 + | pushBytes24:24 | pushBytes25:25 | pushBytes26:26 | pushBytes27:27 + | pushBytes28:28 | pushBytes29:29 | pushBytes30:30 | pushBytes31:31 + | pushBytes32:32 | pushData1:76 | pushData2:77 | pushData4:78 + | reserved:80 | pushNum1:81 | return:106 | dup:118 + | equal:135 | equalVerify:136 | ripemd160:166 | sha1:167 + | sha256:168 | hash160:169 | hash256:170 | checkSig:172 + | checkSigVerify:173 -- urn:ubideco:semid:FWt2MSo8A4nsYgYbuBqMRNLiKgtzvLBgUn774iKzTcuf#pocket-pegasus-frank data Outpoint :: txid Txid, vout Vout