<blockquote>
<p>Tx1 output value is negative</p>
</blockquote>
<p>Definitely not. (<a href="https://github.com/bitcoin/bitcoin/blob/13b828270a6f912aeb24dee87108c6bda83d1b96/src/main.cpp#L711" rel="nofollow noreferrer">2015 codebase</a>, <a href="https://github.com/bitcoin/bitcoin/blob/master/src/consensus/tx_check.cpp#L27" rel="nofollow noreferrer">2022 codebase</a>)</p>
<blockquote>
<p>Tx2 sigScript is empty</p>
</blockquote>
<p>Yes, so long as the script evaluates to true.</p>
<blockquote>
<p>Tx3 scriptPubKey is Empty</p>
</blockquote>
<p>Yes, the scriptPubKey is not validated.</p>
<p>Tx2 and Tx3 will both be spendable by anybody in the network, other users will attempt to spend it instantly and miners could attempt to <a href="https://en.bitcoin.it/wiki/Double-spending#Finney_attack" rel="nofollow noreferrer">finney attack</a> it out from under you even if you make the first spend with a high fee.</p>

CC BY-SA 4.0
2015-09-18T11:45:20.640Z
2022-06-07T13:31:14.913Z
2022-06-07T13:31:14.913Z
Claris
<p>To add to Claris' answer something that confused me in the empty scriptPubKey case that was explained to me on IRC this week.</p>
<p>None of the explicitly defined <a href="https://bitcoin.stackexchange.com/questions/107872/what-are-the-scriptpubkey-scriptsig-redeem-script-and-witness-for-the-various">output types</a> thus far (P2PK, P2PKH, P2SH, P2WPKH, P2WSH, P2SH-P2WPKH, P2SH-P2WSH, P2TR) can contain an empty scriptPubKey as defined. However a Bitcoin transaction does not <strong>need</strong> to have an explicitly defined output type. Consensus rules are only concerned with scripts rather than output types. Indeed if consensus rules were exclusively defined in terms of output types it wouldn't have been possible to do SegWit and Taproot as soft forks.</p>
<p>The related Bitcoin Core code (EvalScript returning true if scriptPubKey is empty) is <a href="https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp#L1233" rel="nofollow noreferrer">here</a>.</p>

CC BY-SA 4.0
2022-06-07T13:26:28.563Z
2022-06-07T13:26:28.563Z
Michael Folkson
<p>Lets consider 3 possible transactions:</p>
<ul>
<li><p>Tx1  an output value is negative</p>
</li>
<li><p>Tx2  a sigScript is empty</p>
</li>
<li><p>Tx3  a scriptPubKey is empty</p>
</li>
</ul>
<p>Is it possible for these transactions to meet consensus rules (could be mined in a block)? Are they all non-standard according to standardness/policy rules?</p>

<transactions><script><consensus><input-script><non-standard-transaction>
Can transactions include a negative output value, an empty sigScript or an empty scriptPubKey and still meet consensus rules?
bitaps.com
# Can transactions include a negative output value, an empty sigScript or an empty scriptPubKey and still meet consensus rules?

(Asked by: username_0 on 2015-09-18)

Lets consider 3 possible transactions:

* Tx1 an output value is negative
* Tx2 a sigScript is empty
* Tx3 a scriptPubKey is empty

Is it possible for these transactions to meet consensus rules (could be mined in a block)? Are they all non-standard according to standardness/policy rules?

**Tags:** transactions, script, consensus, input-script, non-standard-transaction


---

## 2 answers

### Answer by username_1 on 2015-09-18. Score: 0 | Accepted answer

> Tx1 output value is negative

Definitely not. ([2015 codebase](https://github.com/bitcoin/bitcoin/blob/13b828270a6f912aeb24dee87108c6bda83d1b96/src/main.cpp#L711), [2022 codebase](https://github.com/bitcoin/bitcoin/blob/master/src/consensus/tx_check.cpp#L27))

> Tx2 sigScript is empty

Yes, so long as the script evaluates to true.

> Tx3 scriptPubKey is Empty

Yes, the scriptPubKey is not validated.

Tx2 and Tx3 will both be spendable by anybody in the network, other users will attempt to spend it instantly and miners could attempt to [finney attack](https://en.bitcoin.it/wiki/Double-spending#Finney_attack) it out from under you even if you make the first spend with a high fee.


---

### Answer by username_2 on 2022-06-07. Score: 0

To add to username_1' answer something that confused me in the empty scriptPubKey case that was explained to me on IRC this week.

None of the explicitly defined [output types](https://bitcoin.stackexchange.com/questions/107872/what-are-the-scriptpubkey-scriptsig-redeem-script-and-witness-for-the-various) thus far (P2PK, P2PKH, P2SH, P2WPKH, P2WSH, P2SH-P2WPKH, P2SH-P2WSH, P2TR) can contain an empty scriptPubKey as defined. However a Bitcoin transaction does not **need** to have an explicitly defined output type. Consensus rules are only concerned with scripts rather than output types. Indeed if consensus rules were exclusively defined in terms of output types it wouldn't have been possible to do SegWit and Taproot as soft forks.

The related Bitcoin Core code (EvalScript returning true if scriptPubKey is empty) is [here](https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp#L1233).


---

