<p>P2SH addresses already do allow custom scripts.</p>
<p>So I guess your question is why aren't custom scripts, that are not encoded as apart of a P2SH address, considered standard. They are not user-friendly -- they can be quite long, and the sender doesn't really need to know the full script, so it would be a lot of added complexity for no reason. There just aren't many common use cases for it, and edge cases are inherently not &quot;standard&quot;.</p>

CC BY-SA 4.0
2021-02-09T11:07:30.200Z
2021-02-09T11:07:30.200Z
ieatpizza
<p>To answer your question exactly: why were they <strong>made</strong> non-standard? Because originally (after a few vulnerabilities in the Script logic in 2010), all scripts were made non-standard except a few whitelisted ones. Since then, more and more groups of scripts have been added to that category (including almost all P2SH scripts, with a few exceptions).</p>
<p>Why have bare scripts (non-P2SH,non-segwit) not been made non-standard except for P2PK, P2PKH, and multisig up to 3 keys?</p>
<p>UTXO bloat.</p>
<p>Yes, P2SH implies slightly more blockchain space usage. But not using P2SH for potentially long scripts means those scripts have to enter the UTXO set, where they burden full nodes until spent. With P2SH, only the script hash enters the UTXO set.</p>
<p>In addition, there just isn't much use for non-P2SH scripts as there are no standardized way of sending to them. The ones that are permitted are due to historical usage.</p>

CC BY-SA 4.0
2021-02-12T04:03:37.270Z
Did you perhaps mean "on-chain data" or "slightly more blockspace used"?
Murch
CC BY-SA 4.0
2021-02-12T03:58:45.927Z
2021-02-12T04:21:48.280Z
2021-02-12T04:21:48.280Z
Pieter Wuille
<p>Custom script = nonstandard</p>
<p>P2SH custom script = standard</p>
<p>Why don't  we set non-p2sh custom scripts standard too? Forcing P2SH requires adding hashes to the chain causing more bloating</p>

<bitcoin-core><transactions><standard>
Why were custom scripts made non-standard except if they're P2SH?
MCCCS
# Why were custom scripts made non-standard except if they're P2SH?

(Asked by: username_0 on 2021-02-09)

Custom script = nonstandard

P2SH custom script = standard

Why don't we set non-p2sh custom scripts standard too? Forcing P2SH requires adding hashes to the chain causing more bloating

**Tags:** bitcoin-core, transactions, standard


---

## 2 answers

### Answer by username_2 on 2021-02-12. Score: 3 | Accepted answer

To answer your question exactly: why were they **made** non-standard? Because originally (after a few vulnerabilities in the Script logic in 2010), all scripts were made non-standard except a few whitelisted ones. Since then, more and more groups of scripts have been added to that category (including almost all P2SH scripts, with a few exceptions).

Why have bare scripts (non-P2SH,non-segwit) not been made non-standard except for P2PK, P2PKH, and multisig up to 3 keys?

UTXO bloat.

Yes, P2SH implies slightly more blockchain space usage. But not using P2SH for potentially long scripts means those scripts have to enter the UTXO set, where they burden full nodes until spent. With P2SH, only the script hash enters the UTXO set.

In addition, there just isn't much use for non-P2SH scripts as there are no standardized way of sending to them. The ones that are permitted are due to historical usage.

> **Comments:**
> **username_3**: Did you perhaps mean "on-chain data" or "slightly more blockspace used"?  

---

### Answer by username_1 on 2021-02-09. Score: 0

P2SH addresses already do allow custom scripts.

So I guess your question is why aren't custom scripts, that are not encoded as apart of a P2SH address, considered standard. They are not user-friendly -- they can be quite long, and the sender doesn't really need to know the full script, so it would be a lot of added complexity for no reason. There just aren't many common use cases for it, and edge cases are inherently not "standard".


---

