<p>Normally, non standard transactions would be rejected by P2P nodes (but would still be mineable by miners directly since this is just a policy rule).</p>

<p>P2SH addresses do not disclose the script they hash until they are first spent from. So you can send BTC to any script (valid or not) using P2SH addresses. Standardness rules are not imposed on P2SH input scripts, they just have to respect the protocol rules (size, use enabled opcodes, etc...).</p>

<p>To create your own scripts, you can use <a href="https://bitcoin.stackexchange.com/questions/63885/how-do-i-spend-a-non-standard-p2sh-transaction">this question</a> as a starting point.</p>

CC BY-SA 3.0
2018-03-19T19:55:27.887Z
But wouldn't miners reject it  without a siganture or is the redeem script hash a hash of OP_TRUE in the scriptsig allowing it to be mined?
John
CC BY-SA 3.0
2018-03-19T20:55:21.667Z
The script hashed by the address was `OP_TRUE`, which is valid by itself. Miners won't reject non standard scripts in P2SH spends (but would normally if used outside of P2SH).
alcio
CC BY-SA 3.0
2018-03-20T01:47:39.147Z
So if the transaction is p2sh and  i put the scriptsig as OP_True it will be valid but non standard?
John
CC BY-SA 3.0
2018-03-20T09:53:06.667Z
It will be valid, the script will be non standard but the transaction will still be relayed.
alcio
CC BY-SA 3.0
2018-03-19T17:55:28.037Z
2018-03-19T17:55:28.037Z
alcio
<p>Can someone explain how this transaction was validated, broadcasted and mined? </p>

<p>When i looked at the scriptsig it only had the hex value for OP_True.</p>

<p><a href="https://blockchain.info/tx/91c8b08f305d895d6bc8f43bbdd36dcbc7f1d998e3df5e8f13dd9cdeebf15cb5?show_adv=true" rel="nofollow noreferrer">https://blockchain.info/tx/91c8b08f305d895d6bc8f43bbdd36dcbc7f1d998e3df5e8f13dd9cdeebf15cb5?show_adv=true</a>
Also how can i create a transaction like this and have it broadcasted and mined?</p>

<p2sh><non-standard-transaction>
How do non-standard transactions get created, broadcast and mined?
John
# How do non-standard transactions get created, broadcast and mined?

(Asked by: username_0 on 2018-03-19)

Can someone explain how this transaction was validated, broadcasted and mined?

When i looked at the scriptsig it only had the hex value for OP\_True.

<https://blockchain.info/tx/91c8b08f305d895d6bc8f43bbdd36dcbc7f1d998e3df5e8f13dd9cdeebf15cb5?show_adv=true>
Also how can i create a transaction like this and have it broadcasted and mined?

**Tags:** p2sh, non-standard-transaction


---

## 1 answers

### Answer by username_1 on 2018-03-19. Score: 1

Normally, non standard transactions would be rejected by P2P nodes (but would still be mineable by miners directly since this is just a policy rule).

P2SH addresses do not disclose the script they hash until they are first spent from. So you can send BTC to any script (valid or not) using P2SH addresses. Standardness rules are not imposed on P2SH input scripts, they just have to respect the protocol rules (size, use enabled opcodes, etc...).

To create your own scripts, you can use [this question](https://bitcoin.stackexchange.com/questions/63885/how-do-i-spend-a-non-standard-p2sh-transaction) as a starting point.

> **Comments:**
> **username_0**: But wouldn't miners reject it  without a siganture or is the redeem script hash a hash of OP_TRUE in the scriptsig allowing it to be mined?  
> **username_1**: The script hashed by the address was `OP_TRUE`, which is valid by itself. Miners won't reject non standard scripts in P2SH spends (but would normally if used outside of P2SH).  
> **username_0**: So if the transaction is p2sh and  i put the scriptsig as OP_True it will be valid but non standard?  
> **username_1**: It will be valid, the script will be non standard but the transaction will still be relayed.  

---

