rust-bitcoin / rust-miniscript

Support for Miniscript and Output Descriptors for rust-bitcoin
Creative Commons Zero v1.0 Universal
354 stars 139 forks source link

Errors running miniscript on real mainnet transactions #548

Open panicfarm opened 1 year ago

panicfarm commented 1 year ago

We ran miniscript on all p2(w)sh and p2tr script-path inputs from 20 recent mainnet blocks (about 60,000 tx inputs). The program tried to create a miniscript interpreter miniscript::Interpreter::from_txdata() and then print an inferred descriptor string interpreter.inferred_descriptor().

It successfully printed inferred descriptor string in 28820 cases and errored in 31463 cases.

  1. During miniscript::Interpreter::from_txdata((): Format: 'error message' - transaction tx input no: ScriptPubKey type (tr, wsh, sh) asm of the script (tapscript, witnesscript, etc):

    The majority (29029 or 92% of all errors) are related to Ordinals/Inscriptions 1.1 'parse error: non-minimal datapush': cannot create miniscript::Interpreter - tx 5d414380bb14a0e8980a704f8549ca9106217bcafcdf619dfb1bb2ca7252f226 inp 0: spk_type tr asm OP_PUSHBYTES_32 94ee234a17604d0638a85d586be9205e1edf35d0f00b6eedde1b511a3fd18f27 OP_CHECKSIG OP_0 OP_IF OP_PUSHBYTES_3 6f7264 OP_PUSHBYTES_1 01 OP_PUSHBYTES_24 746578742f706c61696e3b636861727365743d7574662d38 OP_0 OP_PUSHDATA1 7b200d0a20202270223a20226272632d3230222c0d0a2020226f70223a20227472616e73666572222c0d0a2020227469636b223a20226f726469222c0d0a202022616d74223a202231303030220d0a7d OP_ENDIF

    1.2 'parse error: numeric overflow (number on stack larger than 4 bytes)': cannot create miniscript::Interpreter - tx 58868891a559c5971a9575a18ea5712dfca148700d1cda2a96da55ec2aedad73 inp 0: spk_type tr asm OP_PUSHBYTES_32 117f692257b2331233b5705ce9c682be8719ff1b2b64cbca290bd6faeb54423e OP_CHECKSIG OP_PUSHBYTES_6 0c99fddc8701 OP_DROP OP_0 OP_IF OP_PUSHBYTES_3 6f7264 OP_PUSHBYTES_1 01 OP_PUSHBYTES_24 746578742f706c61696e3b636861727365743d7574662d38 OP_0 OP_PUSHBYTES_53 7b2270223a226272632d3230222c226f70223a226d696e74222c227469636b223a22676d676e222c22616d74223a2231303030227d OP_ENDIF

    Of the rest, here are the reprepresentative errors and tx inputs for each error type:

    1.3 'parse error: invalid opcode OP_ROT': cannot create miniscript::Interpreter - tx 52a63e45de2e037abdbb37a2968e1ab5c9dc4ed9b9cd7e9f36a8f17c442a98ca inp 0: spk_type sh asm OP_DUP 1 OP_EQUAL OP_IF OP_DROP e8e77ff0f0209eff11d5003378980a876c446201 3b47cde0ec9cb66c31b50f6fb243b5ce5a1bdeac OP_ELSE OP_DUP 2 OP_EQUAL OP_IF OP_DROP e8e77ff0f0209eff11d5003378980a876c446201 b32c58ebe49f457cbf97e2920aeaaf28fcd64f72 OP_ELSE OP_DUP 3 OP_EQUAL OP_IF OP_DROP bfa898bb050932e1c536f120ffed8a61d6e7081a 1d7ff464a97d6ea55436cae306ba2ced6e69cc56 OP_ELSE 4 OP_EQUALVERIFY bfa898bb050932e1c536f120ffed8a61d6e7081a f8bebd776c7540c8c44ec409c8e51bd9cf4ee08b OP_ENDIF OP_ENDIF OP_ENDIF OP_ROT OP_HASH160 OP_EQUALVERIFY OP_OVER OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG (note that for the referenced outpount txid 52a63e45de2e037abdbb37a2968e1ab5c9dc4ed9b9cd7e9f36a8f17c442a98ca:0 the scriptPubKey type is P2SH, but the input has witness data)

    1.4 'parse error: unexpected «Drop»': cannot create miniscript::Interpreter - tx 078abba516075253eaab7704b6355bfb8c3360840199c91d088bac60b0566b19 inp 0: spk_type wsh asm OP_DUP OP_HASH160 OP_PUSHBYTES_20 4ba823708e25439e47d6224ed0a09ddb417a4dfc OP_EQUAL OP_IF OP_CHECKSIG OP_ELSE OP_PUSHBYTES_33 02cf43bc4345df3558b458e0a6a8ade949fbfd594a376b45340c02d1e0d2cc3d4d OP_SWAP OP_SIZE OP_PUSHBYTES_1 20 OP_EQUAL OP_NOTIF OP_DROP OP_PUSHNUM_2 OP_SWAP OP_PUSHBYTES_33 036950b4c0ba75eceee919531c2375cc802673b0f1f9d7a813ea070536f3a2cbe2 OP_PUSHNUM_2 OP_CHECKMULTISIG OP_ELSE OP_HASH160 OP_PUSHBYTES_20 edd66bd68d09f36084fe94894f2df982a0da9595 OP_EQUALVERIFY OP_CHECKSIG OP_ENDIF OP_PUSHNUM_1 OP_CSV OP_DROP OP_ENDIF

    1.5 'parse error: unexpected «Drop»': cannot create miniscript::Interpreter - tx 0214b83c07325f0e9a4f2132f02b1555571b07b2aabd305c93ac01e0e9d70bc7 inp 2: spk_type sh asm OP_DUP 3 OP_EQUAL OP_IF OP_DROP OP_HASH160 a9a9b1ed750f5486fc826df113ed7477a3d87791 OP_EQUALVERIFY OP_DUP OP_HASH160 d3c569451e908ab94539ffbd86e0742f73475d12 OP_EQUALVERIFY OP_CHECKSIG OP_ELSE OP_DUP 4 OP_EQUAL OP_IF OP_DROP OP_HASH160 6e819578707ff98f010795a8e2071eedb7fd5300 OP_EQUALVERIFY OP_DUP OP_HASH160 d3c569451e908ab94539ffbd86e0742f73475d12 OP_EQUALVERIFY OP_CHECKSIG OP_ELSE OP_DUP OP_HASH160 fe720e279e73a145c1b27a9284c644efda435b58 OP_EQUALVERIFY OP_CHECKSIG OP_ENDIF OP_ENDIF (note that for the referenced outpount txid 5e9ad44cc05e33053674eb1f1221d88088362b85b810e9051fa4fcca0d060058:1 the scriptPubKey type is P2SH, but the input has witness data)

    1.6 'parse error: unexpected «Else»': cannot create miniscript::Interpreter - tx b6f7b0b6561c0a7f5f5563c9b257efff0c25ee5b3bf0122c2947e20e713d1fcc inp 0: spk_type wsh asm OP_DUP OP_HASH160 OP_PUSHBYTES_20 56f2c7661463ea13646ba92892d63436301ed5b5 OP_EQUAL OP_IF OP_CHECKSIG OP_ELSE OP_PUSHBYTES_33 0349a7db1b1fe5485c1ae893c23b093178ef1ebe6309b6a6fa2dd3d944d3a24dda OP_SWAP OP_SIZE OP_PUSHBYTES_1 20 OP_EQUAL OP_NOTIF OP_DROP OP_PUSHNUM_2 OP_SWAP OP_PUSHBYTES_33 024dc66c3d3f31447e29e67ba2b0a06f0d47d4622bd69ca07ed2d9e70b014d0866 OP_PUSHNUM_2 OP_CHECKMULTISIG OP_ELSE OP_HASH160 OP_PUSHBYTES_20 c044924e2bca55b66fdf8fad5de34b7c736d34da OP_EQUALVERIFY OP_CHECKSIG OP_ENDIF OP_ENDIF

    1.7 'parse error: unexpected «EndIf»': cannot create miniscript::Interpreter - tx d165bf83721cb29ce050547d449e85bbf302be4f50339d76115d089f6d290968 inp 0: spk_type wsh asm OP_IF OP_SIZE OP_PUSHBYTES_1 20 OP_EQUALVERIFY OP_SHA256 OP_PUSHBYTES_32 f6bcd6c4978b195bc56cb2db73598a41fce053cc4813581c4dadd096694c43dd OP_EQUALVERIFY OP_DUP OP_HASH160 OP_PUSHBYTES_20 12ef1ccb960ed6443eadc443ad933068099d1ce7 OP_ELSE OP_PUSHBYTES_4 e0b85264 OP_CLTV OP_DROP OP_DUP OP_HASH160 OP_PUSHBYTES_20 f0dda5268cc05e6d46d2bf29af41a5004f682583 OP_ENDIF OP_EQUALVERIFY OP_CHECKSIG

    1.8 'parse error: invalid opcode OP_DEPTH': cannot create miniscript::Interpreter - tx ac8c783fd4177b7634092d508568d232c71e3762fdf3f68e2f1b0ce2c6f3346d inp 0: spk_type sh asm OP_DEPTH 12 OP_EQUAL OP_IF 11 020e0338c96a8870479f2396c373cc7696ba124e8635d41b0ea581112b67817261 02675333a4e4b8fb51d9d4e22fa5a8eaced3fdac8a8cbf9be8c030f75712e6af99 02896807d54bc55c24981f24a453c60ad3e8993d693732288068a23df3d9f50d48 029e51a5ef5db3137051de8323b001749932f2ff0d34c82e96a2c2461de96ae56c 02a4e1a9638d46923272c266631d94d36bdb03a64ee0e14c7518e49d2f29bc4010 02f8a00b269f8c5e59c67d36db3cdc11b11b21f64b4bffb2815e9100d9aa8daf07 03079e252e85abffd3c401a69b087e590a9b86f33f574f08129ccbd3521ecf516b 03111cf405b627e22135b3b3733a4a34aa5723fb0f58379a16d32861bf576b0ec2 0318f331b3e5d38156da6633b31929c5b220349859cc9ca3d33fb4e68aa0840174 03230dae6b4ac93480aeab26d000841298e3b8f6157028e47b0897c1e025165de1 035abff4281ff00660f99ab27bb53e6b33689c2cd8dcd364bc3c90ca5aea0d71a6 03bd45cddfacf2083b14310ae4a84e25de61e451637346325222747b157446614c 03cc297026b06c71cbfa52089149157b5ff23de027ac5ab781800a578192d17546 03d3bde5d63bdb3a6379b461be64dad45eabff42f758543a9645afd42f6d424828 03ed1e8d5109c9ed66f7941bc53cc71137baa76d50d274bda8d5e8ffbd6e61fe9a 15 OP_ELSE 2016 OP_CHECKSEQUENCEVERIFY OP_DROP 2 03aab896d53a8e7d6433137bbba940f9c521e085dd07e60994579b64a6d992cf79 0291b7d0b1b692f8f524516ed950872e5da10fb1b808b5a526dedc6fed1cf29807 0386aa9372fbab374593466bc5451dc59954e90787f08060964d95c87ef34ca5bb 3 OP_ENDIF OP_CHECKMULTISIG

  2. During interpreter.inferred_descriptor():

    Format: 'error message' - 'sample transaction' 'tx input number':

    2.1 'non-T miniscript: [K/nduesm]expr_raw_pk_h(0x1f9014a6b82d29068bf4dfc4e4d091af40367475)': failed getting inferred_descriptor - tx 9708697709667c381a3beac59b426a17a46f6ed19069b2ea95e434ddd38ac700 inp 1 (note that the referred output is of the sh type, but the input has witness of 3 elements, with witnesScript being OP_DUP OP_HASH160 1f9014a6b82d29068bf4dfc4e4d091af40367475 OP_EQUALVERIFY OP_CHECKSIG)

    2.2 'typecheck: fragment «v:expr_raw_pk_h(f63253ceefdfc04aef4f60e5e6d8f27e883157f5)» cannot wrap a fragment of type K': failed getting inferred_descriptor - tx 7f4f0d92de63d86a868e01b826ea5194ff8eb40cb917f2e04a5e6c78669aa9d1 inp 0 (witnesScript 02c2e615c92493ffe61614bf2f01aa2cce1479384d6b934c58b08291d778493bc5 OP_CHECKSIG OP_NOTIF OP_DUP OP_HASH160 f63253ceefdfc04aef4f60e5e6d8f27e883157f5 OP_EQUALVERIFY OP_CHECKSIGVERIFY 788076 OP_CHECKLOCKTIMEVERIFY OP_ELSE 03c3212f10b0a370671d2a6c512e12efcaca377269496f9c2b5b2db517a6006e64 OP_CHECKSIGVERIFY OP_SIZE 32 OP_EQUALVERIFY OP_HASH160 f5394b993627eac914537acdc0cb269eed1db075 OP_EQUAL OP_ENDIF)

apoelstra commented 1 year ago

Neat! Thank you for the statistics.

Not every instance of Script is valid Miniscript -- and in particular the ordinal script is not -- so we don't expect to be able to process every existing transaction. 40% is pretty good IMHO, especially with ordinals skewing the stats.

panicfarm commented 1 year ago

I used btcdeb and stepped through cases 1.4, 1.5, 1.6 above. Here is the screen grab of btcdeb stepping though the witness script in the case 1.6, that gave parse error: unexpected «Else»': cannot create miniscript::Interpreter.

Can you explain why these Scripts are not valid Miniscripts?

The commands are:

1.4

btcdeb --txin=0200000000010188e086e3d6aced333a327946ed01fc9f42b3d602b8394b0581e3fab9e4409f2e0300000000bb5e5a80074a010000000000002200206b4d6938fb108276ea39f6426e15736f439fb0824d6eb6cabc39f98be67160324a0100000000000022002070006d5014914f88630a6ce2cb4f4075039b718191ef56ce84605a9c77bc2677d486010000000000220020b60e270241eafacdf9d9d7a07fe6efd8540bdf94f2041408ac3a6875b50fdf85e1860100000000002200201402276f7618132c05e6c9e4594fb5c6cc24d786b96b5e04fd504e72a50949a136160400000000002200200ece41e99a4cc1478dceb2e68c8ced29e2727d5b93596c28804b882035d67af29ddb0600000000002200209bbac939184c9bb43f271245a1c484a9612c60ee25a57d7fab272c87f4922a6a1e393e0000000000220020cf29646601fcbcf7e8331b8120f4913558edee758745de49b61dfeb39dbdc7e10400483045022100c4b886067dd894df9a500067a63d3ea03d45f7ea904f3055526f57501097f7a002207d7a3b7c9bc99abb4a774ca6095c7c3745bdd6cb7577ef32c1796a0200b9367001483045022100e9edc71b3664fffea790d046e25484fbcf176e8c21e625f411eaf936b0cc9a8e022031049c2f4aef3cbf66a1d907ea7bd228d09f45d5149349b1fac013dc5c00e2b2014752210244147ec5510d30d38b8614661b01f99a6e7aa3de1cc0b0e37683aeaa945a7a592102afeb43ba1818a90a911ad4272430062daee5e5029250ad4272d045cac7fdd51952aea393b120 --tx=020000000001029a2e0c7e109ead727b389c49d21d3d0f033b19755e4a72984d09326354e7e4950200000000010000002a0950f91bc9ac1202b0c91f483752e9c924ad056c241258d8bf8118c844501301000000000000000002d486010000000000220020cf29646601fcbcf7e8331b8120f4913558edee758745de49b61dfeb39dbdc7e19af5000000000000225120bc3d00cd790b4046118cb88c4f155cd64bc170602cf77ee840655d12a2b60f050500483045022100e154a929c958153c709d480e08177406555aab342c453a7a7a71ce69d6469a7402206173c9c30ae50cdb71150fa01b8083a56017e4b362e5d02d9e32b091a51317548347304402202fdb030d1e0f2b40c2fb98993dbf7f93b0c787066bd99e86ba08c17bcd3f794702203a275bff5e07e7386ee2d7607c7fd74bd8c40016af895132fa82b332c3ff0b2001008876a9144ba823708e25439e47d6224ed0a09ddb417a4dfc8763ac672102cf43bc4345df3558b458e0a6a8ade949fbfd594a376b45340c02d1e0d2cc3d4d7c820120876475527c21036950b4c0ba75eceee919531c2375cc802673b0f1f9d7a813ea070536f3a2cbe252ae67a914edd66bd68d09f36084fe94894f2df982a0da959588ac6851b275680140d09a815db7b8db34e80997ad5f59b65584fa57bc331526caa42aa0423eacc5a76adc7fafa5a3f3bf97a283d7e033a2e960f3550ff89a3bad1a864ecb08030c0432060c00

1.5

btcdeb --tx=0200000000010c45ed46acb749e5929397b76e86e82f39a1a868f9c04e5c7cf3ac0969e504c4670200000017160014d3c569451e908ab94539ffbd86e0742f73475d12feffffff10293753f6cd0042b9fd0eafa6951da2ef71486f817bf8d875c28f0826e0e5590000000017160014d3c569451e908ab94539ffbd86e0742f73475d12feffffff5800060dcafca41f05e910b8852b368880d821121feb743605335ec04cd49a5e0100000023220020fd1df66e459556d9b0fdd0548841de84bc724afe3ee922e308a57087d3e4a66efeffffffac7b121dfce5f98e8857df83d71cc827bbf037aea5b3e72b5968ef7c1c3b1edc010000002322002073157bea597ce4cda20fecbcfa6fd0698367aadadd1d38ec862e04249db37fd6feffffffdb2655cbf0c9420e03c831fec4e48d245569aaacc8c11aec57b5379f1266c29401000000232200204eeb82e879195f1d92b4ca33c98a59ddf0290742958797fb9efa5f48a282ae07feffffff7d8f12a82ebf315700f4c760619a33be97109ac7d6c229c4bbd8d2b714948cef01000000232200205f9b8160b053f3530cb6f17e8b63f6b83ded35fd2f1b43a1f756be20ed9683f8feffffff73545dc219340e97c908a3c42cf66c35fcbb0f67c21d3f6b1e8c618ee505fa56010000002322002048242079f08e7cd5371b9cf78ab2a2273d9ebb9920fbd66a4020da0bc1bad27bfeffffffa183e8c147f7ec3f7ca114308e3d1fa02b093fe7eecc999bf16ab00325a92d8b0100000023220020047fdf2fb22a40a31db8e4ccbf3a7a9f02a092634d2b932a19851513ecb102c3feffffff448186436088606dfb0483bd6f9fa3c5e987cf78df00a0f05f883a8ce0b3a02401000000232200202007503c11836beeafa19195889b2c40692b2d74f70db1a1b09a837c59bb6405feffffffe5bef3715ec9ea2e8cc08323fc32a8bd6b59583c6a982ef38886bea585c6d68a0100000023220020d4e575773a4131bd34c02075fe5b4d0737acad767f83456ee282b5451b1ec02dfeffffff4d104e45671887afd1f863aba5801548ecc7fd3b9548524c579b9c060278e8f1010000002322002061b5b8093e896adae1a5f8f8ae301bc0dec5317fb94ae71a51060ae366790b3efeffffffd9ef6365c9c7d9bcc3ce15aa95243d7d5573c02f0285583251afc70e238357be0100000023220020abd6846e34f8e528e4d9a6bbeea16a149ff3ee95068d7b8dfa5130f93a17e9fefeffffff0199ea720000000000160014c149578cf77745927f4cd228adbc4689e2ff6e0a0247304402206a122b980b23f6d018e8971dbc6ba708b2afe46bc32afa6e48ea61611aaef724022073a4d204f334ec463dc03262b5c79acffadb1530a0454ffb5571b9c650559479012102d715afac55b4fdfe530ca2055356862c0350583a1f92c837453dd797a35a1850024730440220367ed64aedd830ba4ab230976a2a3b141bec886fc02a5cd9a11085ce29d90bab0220504293d1bba16a5903e699a8d55223be7b999f7cbff064242c92037e672fcf25012102d715afac55b4fdfe530ca2055356862c0350583a1f92c837453dd797a35a18500547304402201104bf68d2a27ab3170744ccf20d89e7da58bccaf3cc1c46897c3ca3d2a5ad2202200f706f0c7f9010f199dd41396cf650cee1e67c1754ffd6fafbf1214883d7a4ca012102d715afac55b4fdfe530ca2055356862c0350583a1f92c837453dd797a35a18502102194c2957333954231ace6395b8f5e642df66bb16d13ac166b7bb12f9900ffef60103877653876375a914a9a9b1ed750f5486fc826df113ed7477a3d877918876a914d3c569451e908ab94539ffbd86e0742f73475d1288ac677654876375a9146e819578707ff98f010795a8e2071eedb7fd53008876a914d3c569451e908ab94539ffbd86e0742f73475d1288ac6776a914fe720e279e73a145c1b27a9284c644efda435b5888ac6868054730440220193fa4613a25e15de1ff752129d4b9d83290ab1d4665cd4271b31c3124eab27a022062352b9cb5a7386d41ab68ce5e6489c4d5cd378561f054ef3bfbc2563c644208012102d715afac55b4fdfe530ca2055356862c0350583a1f92c837453dd797a35a185021028fdd6fa5c84325bfc1ab82d5ff453159ad1ca17632182a6fb90e61cc35ae6b530103877653876375a914748c92c9de65daf838d5e7edcc6eb7faf4559bfa8876a914d3c569451e908ab94539ffbd86e0742f73475d1288ac677654876375a914e31fbd1335b40f457c281fb214a4de5c775e04df8876a914d3c569451e908ab94539ffbd86e0742f73475d1288ac6776a914fe720e279e73a145c1b27a9284c644efda435b5888ac686805473044022076439ea085d4418523f992c34d2a810443e2f1359c020ae363183f7b3670f6a70220023067dda38c70113e73d8b406a123b01f8d9c102fd5e00e76c58627b9ace0ec012102d715afac55b4fdfe530ca2055356862c0350583a1f92c837453dd797a35a1850210339dc3a05142e223870d037e794b2cb7e007b01b2f8c6e9cf9a5076481736b96b0103877653876375a9141bff3e47d15cf6ac6bbe7518b71d973e08b00c8d8876a914d3c569451e908ab94539ffbd86e0742f73475d1288ac677654876375a91442d49a48fac90886f6a5e09a3c19a6b7e986725b8876a914d3c569451e908ab94539ffbd86e0742f73475d1288ac6776a914fe720e279e73a145c1b27a9284c644efda435b5888ac686805473044022019c69cc8a212aecb54628c7ad96468f3fdc93aaea06cbc45de23879ee894ea7c02207e5bb570129c67f0bd97ed7bc58d892aa526a89c28592b4fae846ff233f3864b012102d715afac55b4fdfe530ca2055356862c0350583a1f92c837453dd797a35a18502102f1aa258ee3c578f42dbd2f72d35a9f57ece19b8ca1f5acc226ff6644286cc8260103877653876375a91443b3044e9fe0ee4cc1218f0fe128c1e1186c35908876a914d3c569451e908ab94539ffbd86e0742f73475d1288ac677654876375a914a925b6aa0faae66cb4d93752d732bceb2de6f2ee8876a914d3c569451e908ab94539ffbd86e0742f73475d1288ac6776a914fe720e279e73a145c1b27a9284c644efda435b5888ac68680547304402205d5b904082c165b4dfef9dc8e82855fbf76801e0f911a6052214c81349db0fd902204ad57c07cc0276612183abc8a5eff2210ac7ffa696b252733a8d2998298b9c44012102d715afac55b4fdfe530ca2055356862c0350583a1f92c837453dd797a35a1850204a52add3ccb6ff8a84aa7e3331cad53fda57f149dceeca1ed92a1f12614f8abe0104877653876375a91453733b53c2fb5f0f1cc7cfed469a3da6c772fa5a8876a914d3c569451e908ab94539ffbd86e0742f73475d1288ac677654876375a9149b0f67f1194af91a41cc08acf7a7389e6848aa888876a914d3c569451e908ab94539ffbd86e0742f73475d1288ac6776a914fe720e279e73a145c1b27a9284c644efda435b5888ac68680547304402201b69d3fbbf4b890e5bdb0f9eed542abc6e648970fb1599edb47a4a1eed9d7a4c022020a433c3e702883e3f93519d4ae37d687a724336ae8939a08c78287d9c57bf6d012102d715afac55b4fdfe530ca2055356862c0350583a1f92c837453dd797a35a1850204b45781a5b19589b563c187804d19a437242db7b1a2f4ff06814e18f9a3cd6e60104877653876375a91430ea45521385bac5637e5587f8d26123f6049e758876a914d3c569451e908ab94539ffbd86e0742f73475d1288ac677654876375a91424f75d5a125a606754d0dc9c9e70ae026f8cd8dd8876a914d3c569451e908ab94539ffbd86e0742f73475d1288ac6776a914fe720e279e73a145c1b27a9284c644efda435b5888ac68680547304402204d554afcb3e855d76979c1d7109276f059a999d99ddef558c0d7a772b49a9be90220295c69cf101a080f75c36e7a54329dc9f1750665f14152feea044dd5e0f7c0b4012102d715afac55b4fdfe530ca2055356862c0350583a1f92c837453dd797a35a1850208d3e29e6472bd4a3886d6bf8b650a853bcf864ced92025bf6e689eba0ac300170104877653876375a914b6fde291bd7bc5130b2394a2a9547b1103b039df8876a914d3c569451e908ab94539ffbd86e0742f73475d1288ac677654876375a914f51d432eb8a8018964ed7b79eead5324322800638876a914d3c569451e908ab94539ffbd86e0742f73475d1288ac6776a914fe720e279e73a145c1b27a9284c644efda435b5888ac68680547304402205a8d5654364e2157b75bb242d8c06bc35a24a0ac9b794f9f3a7f79db5b2d7fe6022026e58378a7b53b737d971cb0bfc5f4d28443a903d57c80acb38cf17b95302d4e012102d715afac55b4fdfe530ca2055356862c0350583a1f92c837453dd797a35a1850200beaa9b16d4b1c0cc3114881cce2ac079012dbdb7bcd288e68fcef1ae5c882da0104877653876375a91463696d4dbf4c200c89004bdcd4512086121783bf8876a914d3c569451e908ab94539ffbd86e0742f73475d1288ac677654876375a9141fbae1f8edefde973379bc1fbfff0636dc9ef1348876a914d3c569451e908ab94539ffbd86e0742f73475d1288ac6776a914fe720e279e73a145c1b27a9284c644efda435b5888ac68680547304402200fb3b00e8e65e31f65cce6407e272732c9ddfe225c0d1e2ff566b6bc1bbd945702200fecb77bd66b1e93a9d038de81934208ae1ae1478d39b27b8e0cb0340a7fff0b012102d715afac55b4fdfe530ca2055356862c0350583a1f92c837453dd797a35a18502103c6e440ba8d01647f899f37f2be0b08474516317b7da57012e9993e0d1d761e0f0103877653876375a9141f0140a5232bca52081b91530b2a7e3cc90464fb8876a914d3c569451e908ab94539ffbd86e0742f73475d1288ac677654876375a9146feada94b775e43fac4d39b040a610c6acafb8248876a914d3c569451e908ab94539ffbd86e0742f73475d1288ac6776a914fe720e279e73a145c1b27a9284c644efda435b5888ac68680547304402202277637756264a569b89b8cfcf8917ac53dda957b16ef43a2663f4970c3efd0102206b448eb36f5e37c54cfd23ccdf2e6a66391689ed9c8e472bb23370f672b809b6012102d715afac55b4fdfe530ca2055356862c0350583a1f92c837453dd797a35a18502103b38ba7cc2c6f93c48c1ee2cc97da4bb8d33173f282d94060124652b114d1fb750103877653876375a914c5701154f8c3719f2be24999a43b42fa6fcbcaf88876a914d3c569451e908ab94539ffbd86e0742f73475d1288ac677654876375a9149e527cd7ee5166781a2778a6f7ee409fb437d26d8876a914d3c569451e908ab94539ffbd86e0742f73475d1288ac6776a914fe720e279e73a145c1b27a9284c644efda435b5888ac686800000000 --txin=02000000000101db2655cbf0c9420e03c831fec4e48d245569aaacc8c11aec57b5379f1266c2940200000017160014d3c569451e908ab94539ffbd86e0742f73475d12feffffff03338201000000000017a914e3007e86cf588723f9b5e43dce664bbb7ca7b81d87dd0300000000000017a914b37724fe6498e8f58da59a774ca7389d369d6d48873cf51e000000000017a914b6d5f6e3f91990597f5960a53b7645639fa31b178702473044022065e50d9fb751388de182a2b9e79aa53ea3d708049abd90ad383cd9798f2969550220479c8565f1f29d0b6678782ccc96336ec5d13d35c5caad1098b6702c34e8e4c8012102d715afac55b4fdfe530ca2055356862c0350583a1f92c837453dd797a35a185000000000

1.6 (the screen grabbed one):

btcdeb --tx=0200000000010144ae030a640d2774c298ce074768ae695b99a661a334e6606615f00c28fb6159010000000000000000011d3304000000000022002048eaa50566119433c394141b7e4d7132f5998f0ba24c13ad4de868ec2e657fcb05004730440220274268e39f0342ac34e2d4a679d7803d7b9c65e7dbe1a65e13a3bfa9106d9540022020654045f11303fbb877da7b0370191092384bbbe37b38b73d8f4c2ef75ddeca0147304402206fdefee135b05f02641877cc7f6295dc7493df6d3e6355a0752e35aa889f0900022028f7f2c3b30d96969524e81fd550918a5662dd8c5194d2161640b61410b7adb001008576a91456f2c7661463ea13646ba92892d63436301ed5b58763ac67210349a7db1b1fe5485c1ae893c23b093178ef1ebe6309b6a6fa2dd3d944d3a24dda7c820120876475527c21024dc66c3d3f31447e29e67ba2b0a06f0d47d4622bd69ca07ed2d9e70b014d086652ae67a914c044924e2bca55b66fdf8fad5de34b7c736d34da88ac6868e8050c00 --txin=0200000000010120b6dcf72111276a81f1c281bb5c3f429334ef34bfa93b12f1a6705cb87420a4010000000046b5358004c2af0000000000002200205b8c77ef2af589d7ca490c3c924db961818e4db3e313b9e343db60edd8e111e92c5b0400000000002200206f1912b349fae83f4e8b05205ff64f3983c886fd70870cf17987ba5aed94cbd3bdc715000000000016001415f006476518a2626eea2b6eec5d78c5b1d65d27ccc952000000000022002048eaa50566119433c394141b7e4d7132f5998f0ba24c13ad4de868ec2e657fcb04004730440220563b0220ca7ca84dec381c76a1fd60a821209a296fc44132c7d67f647732674502200afb70d900b936c70c14696846600d2f7d2cc13daafdf7e387f30a79783ecae301483045022100a19e7b34dbebf9e62a6e44a582d5241ed3bd475f1631da81631082819cdd2e0802201cb742becd0014f7928d7ba602511c76f53ea23a6ec8b1146d29321bf76dead101475221028d74efe884d2be900f22577b7c1500f1702ba4f2c85c646189cdc360aa6f8cb52103effff6a089bd5481713b532e1a540235049c7a02fffa5f0d5fad3d2d492f3a8452aec70d6d20
sanket1729 commented 1 year ago

@panicfarm, miniscripts are scripts that are defined by http://bitcoin.sipa.be/miniscript/. Any other script that does not follow the spec is not a miniscript. In particular, miniscript does not any OP_DEPTH or OP_DROP (Miniscript uses VERIFY instead).

If else statements must also follow the rules of or_i, or_d, or_c. Any other conditional way of using them is not accepted as a valid miniscript.