2

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?

2 Answers 2

0

Tx1 output value is negative

Definitely not. (2015 codebase, 2022 codebase)

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 it out from under you even if you make the first spend with a high fee.

0

To add to Claris' 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 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.