<p>note that your custom script is unspendable, as <code>OP_EQUAL</code> will push a 0 or a 1 and <code>0x1111</code> pushes <code>0x1111</code>, you end up with 2 stack elements. (ending with 2 stack elements is not valid spend, segwit would be anyone can spend if this was the case)</p>
<p>transactions with outputs under the dust limit (1 sat definitely is) or nonstandard output scripts are nonstandard and will not be relayed</p>

CC BY-SA 4.0
2022-02-20T17:07:46.327Z
first i just figure out i might to invert OP_EQUAL and 0x1111 in my purpose (i want to can spend by "providing" only 0x1111 as a signature script so) 0x1111 + 0x1111 OP_EQUAL might work, right?
cc1cc1
CC BY-SA 4.0
2022-02-20T17:08:08.530Z
yes that will work
Antoni
CC BY-SA 4.0
2022-02-20T17:08:34.327Z
second, i was not knowing about dust limit, now its more clear!
cc1cc1
CC BY-SA 4.0
2022-02-20T17:08:52.147Z
maybe the testnet is a better place to try and learn bitcoin scripts, coins are free and nonstandard TXs **are** relayed there
Antoni
CC BY-SA 4.0
2022-02-20T17:10:36.853Z
by free i mean there are websites that give small amounts of free testcoins, just search 'bitcoin testnet faucet' on the internet
Antoni
CC BY-SA 4.0
2022-02-20T17:24:54.313Z
yes i know about testnet and faucets but i prefer to do it on mainnet, because on this case, maybe it will work on testnet, but not on the mainnet
cc1cc1
CC BY-SA 4.0
2022-02-20T16:43:25.537Z
2022-02-20T16:43:25.537Z
Antoni
<p>For educational purposes and better understanding of bitcoin script, I try to broadcast this transaction:</p>
<pre><code>01000000 -&gt; version

01 -&gt; 1 input

0410a792656db6b10c28f2ded1a21f0cdf7cf31200b5a0179b5a254e325438b2 -&gt; input hash

00000000 -&gt; input index

8a -&gt; sigscript lenght

4730440220460e5bf8a20995a4323c573c2428272d4c5738a35ac99def37813f1d752591cd022000c09914c6ec5cf9cbcba8228ea46583ec856d43da5fcc85b8fea8a1227763ec014104292959febef0a3c9ac140cb5a013f174f85a7978838890b196de3028fab725ed1a95cc9f26365f8665d6bbc9619b3f9f06695b4ce45f691b93f57a9f07e28849 -&gt; sigscript

ffffffff - sequence

02 -&gt; 2 output

0100000000000000 - &gt; 1 sat

04 -&gt; 4 bytes long

87021111 -&gt; OP_EQUAL 0X1111

1819000000000000 -&gt; 6424 sat

19 -&gt; 25 bytes long

76a9145294db2204c27889dd9b7b88ff30cff6c40a62d788ac 
-&gt; OP_DUP OP_HASH160 &lt;pubkey hash&gt; OP_EQUALVERIFY OP_CHECKSIG

00000000 -&gt; timelock
01000000
</code></pre>
<p>I know the script of the 1st output is not standard (it's my purpose : OP_EQUAL 0X1111) but why is not valid?</p>

<transactions><non-standard-transaction><raw>
Why is my raw transaction not valid?
cc1cc1
# Why is my raw transaction not valid?

(Asked by: username_0 on 2022-02-20)

For educational purposes and better understanding of bitcoin script, I try to broadcast this transaction:
01000000 -> version

01 -> 1 input

0410a792656db6b10c28f2ded1a21f0cdf7cf31200b5a0179b5a254e325438b2 -> input hash

00000000 -> input index

8a -> sigscript lenght

4730440220460e5bf8a20995a4323c573c2428272d4c5738a35ac99def37813f1d752591cd022000c09914c6ec5cf9cbcba8228ea46583ec856d43da5fcc85b8fea8a1227763ec014104292959febef0a3c9ac140cb5a013f174f85a7978838890b196de3028fab725ed1a95cc9f26365f8665d6bbc9619b3f9f06695b4ce45f691b93f57a9f07e28849 -> sigscript

ffffffff - sequence

02 -> 2 output

0100000000000000 - > 1 sat

04 -> 4 bytes long

87021111 -> OP_EQUAL 0X1111

1819000000000000 -> 6424 sat

19 -> 25 bytes long

76a9145294db2204c27889dd9b7b88ff30cff6c40a62d788ac 
-> OP_DUP OP_HASH160  OP_EQUALVERIFY OP_CHECKSIG

00000000 -> timelock
01000000

I know the script of the 1st output is not standard (it's my purpose : OP_EQUAL 0X1111) but why is not valid?

**Tags:** transactions, non-standard-transaction, raw


---

## 1 answers

### Answer by username_1 on 2022-02-20. Score: 1

note that your custom script is unspendable, as `OP_EQUAL` will push a 0 or a 1 and `0x1111` pushes `0x1111`, you end up with 2 stack elements. (ending with 2 stack elements is not valid spend, segwit would be anyone can spend if this was the case)

transactions with outputs under the dust limit (1 sat definitely is) or nonstandard output scripts are nonstandard and will not be relayed

> **Comments:**
> **username_0**: first i just figure out i might to invert OP_EQUAL and 0x1111 in my purpose (i want to can spend by "providing" only 0x1111 as a signature script so) 0x1111 + 0x1111 OP_EQUAL might work, right?  
> **username_1**: yes that will work  
> **username_0**: second, i was not knowing about dust limit, now its more clear!  
> **username_1**: maybe the testnet is a better place to try and learn bitcoin scripts, coins are free and nonstandard TXs **are** relayed there  
> **username_1**: by free i mean there are websites that give small amounts of free testcoins, just search 'bitcoin testnet faucet' on the internet  
> **username_0**: yes i know about testnet and faucets but i prefer to do it on mainnet, because on this case, maybe it will work on testnet, but not on the mainnet  

---

