<p>By input script, if you mean <code>scriptSig</code>, the max standard <code>scriptSig</code> can be up to 1650 bytes.</p>

<p>See <a href="https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L99" rel="nofollow noreferrer"><code>policy.cpp</code></a> :</p>

<pre><code>// Biggest 'standard' txin is a 15-of-15 P2SH multisig with compressed
// keys (remember the 520 byte limit on redeemScript size). That works
// out to a (15*(33+1))+3=513 byte redeemScript, 513+1+15*(73+1)+3=1627
// bytes of scriptSig, which we round off to 1650 bytes for some minor
// future-proofing. That's also enough to spend a 20-of-20
// CHECKMULTISIG scriptPubKey, though such a scriptPubKey is not
// considered standard.
if (txin.scriptSig.size() &gt; 1650) {
    reason = "scriptsig-size";
    return false;
}
</code></pre>

CC BY-SA 4.0
2019-01-10T19:21:17.873Z
Thank you very much. So it appears that also the redeem script is included in the 1650 byte. So I effectively have, if the redeem script has the max size of 520 byte, just 1130 byte.
Daniele
CC BY-SA 4.0
2019-01-10T19:27:19.717Z
Sounds right to me. Also, there is segregated witness data which doesn't look like it counts towards the `scriptSig` limit.
JBaczuk
CC BY-SA 4.0
2019-01-10T19:36:39.940Z
Technically, a 520 byte size redeemScript has an overhead of 3 more bytes, the `OP_PUSHDATA2` opcode that is one byte and another two bytes `0x0802` for the actual size value 520
arubi
CC BY-SA 4.0
2019-01-10T19:15:35.373Z
2019-01-10T19:15:35.373Z
JBaczuk
<p>What is the maximum size for an input script so to be considered <strong>standard</strong> ? Looking at the Bitcoin Core source code it appears to be 10'000 byte, however reading here and there, it appears to be 1650 byte.
If that's the case, if the input script is redeeming a P2SH, is the size of the redeem script (520 byte) to be considered in the count, or not ?
Thank you very much !</p>

<script><standard><input>
Maximum standard input script size
Daniele
# Maximum standard input script size

(Asked by: username_0 on 2019-01-10)

What is the maximum size for an input script so to be considered **standard** ? Looking at the Bitcoin Core source code it appears to be 10'000 byte, however reading here and there, it appears to be 1650 byte.
If that's the case, if the input script is redeeming a P2SH, is the size of the redeem script (520 byte) to be considered in the count, or not ?
Thank you very much !

**Tags:** script, standard, input


---

## 1 answers

### Answer by username_1 on 2019-01-10. Score: 1 | Accepted answer

By input script, if you mean `scriptSig`, the max standard `scriptSig` can be up to 1650 bytes.

See [`policy.cpp`](https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L99) :

```
// Biggest 'standard' txin is a 15-of-15 P2SH multisig with compressed
// keys (remember the 520 byte limit on redeemScript size). That works
// out to a (15*(33+1))+3=513 byte redeemScript, 513+1+15*(73+1)+3=1627
// bytes of scriptSig, which we round off to 1650 bytes for some minor
// future-proofing. That's also enough to spend a 20-of-20
// CHECKMULTISIG scriptPubKey, though such a scriptPubKey is not
// considered standard.
if (txin.scriptSig.size() > 1650) {
    reason = "scriptsig-size";
    return false;
}

```

> **Comments:**
> **username_0**: Thank you very much. So it appears that also the redeem script is included in the 1650 byte. So I effectively have, if the redeem script has the max size of 520 byte, just 1130 byte.  
> **username_1**: Sounds right to me. Also, there is segregated witness data which doesn't look like it counts towards the `scriptSig` limit.  
> **username_2**: Technically, a 520 byte size redeemScript has an overhead of 3 more bytes, the `OP_PUSHDATA2` opcode that is one byte and another two bytes `0x0802` for the actual size value 520  

---

