<p>The minimal push check only needs to occur for scripts that are being executed. The malleability only comes from data that is pushed to the stack when an input is being spent. That data is not covered by any signatures which is why it is malleable. So the only data that is pushed to the stack that is malleable are the arguments required for the path taken. There won't be any arguments for the path not taken.</p>
<p>Of course this means that if the script has a path that is not taken, the pushes for anything in those branches are not checked. However these are not malleable. The script will have been committed to earlier in the output script of the output being spent.</p>

CC BY-SA 4.0
2022-02-17T20:13:21.660Z
I understand why checking in unexecuted branches is not useful. What I do not understand is why this check is made also on the scriptPubKey and not only on the scriptSig.

You say that "So the only data that is pushed to the stack that is malleable are the arguments required for the path taken". However I think that only the data pushed to the stack by the scriptSig is malleable, because data included in the scriptPubKey, even in executed branches, is not malleable
giacomocaironi
CC BY-SA 4.0
2022-02-17T19:38:09.747Z
2022-02-17T19:38:09.747Z
Ava Chow
<p>Pushdata operations that are not minimally encoded are non-standard since Bitcoin Core 0.9.</p>
<p>My question is: how is this check performed? From reading the source code it seems that it is performed only on executed branches of the script, but it seems not quite right. It would have made more sense to me if it were performed either on the entire script or only on the scriptSig, since malleability of pushdata operations in the scriptSig is what prompted for the check in the first place.</p>
<p>Am I wrong?</p>

<bitcoin-core-development><non-standard-transaction>
About Pushdata operations of non-standard size
giacomocaironi
# About Pushdata operations of non-standard size

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

Pushdata operations that are not minimally encoded are non-standard since Bitcoin Core 0.9.

My question is: how is this check performed? From reading the source code it seems that it is performed only on executed branches of the script, but it seems not quite right. It would have made more sense to me if it were performed either on the entire script or only on the scriptSig, since malleability of pushdata operations in the scriptSig is what prompted for the check in the first place.

Am I wrong?

**Tags:** bitcoin-core-development, non-standard-transaction


---

## 1 answers

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

The minimal push check only needs to occur for scripts that are being executed. The malleability only comes from data that is pushed to the stack when an input is being spent. That data is not covered by any signatures which is why it is malleable. So the only data that is pushed to the stack that is malleable are the arguments required for the path taken. There won't be any arguments for the path not taken.

Of course this means that if the script has a path that is not taken, the pushes for anything in those branches are not checked. However these are not malleable. The script will have been committed to earlier in the output script of the output being spent.

> **Comments:**
> **username_0**: I understand why checking in unexecuted branches is not useful. What I do not understand is why this check is made also on the scriptPubKey and not only on the scriptSig.  You say that "So the only data that is pushed to the stack that is malleable are the arguments required for the path taken". However I think that only the data pushed to the stack by the scriptSig is malleable, because data included in the scriptPubKey, even in executed branches, is not malleable  

---

