nonoise₿itcoin

BTC: $115,425.00

Can scriptPubKey be empty in Bitcoin transactions and how would such outputs be spent?

Question

I'm trying to understand Bitcoin's consensus rules regarding empty scriptPubKey fields in transaction outputs.

I've found conflicting information:

  • Some AI sources claim that empty scriptPubKey field is not allowed by consensus rules
  • However, I found this older Stack Exchange answer from ~10 years ago saying the opposite

I have two questions:

  1. Can a Bitcoin transaction output have a completely empty scriptPubKey (0 bytes) and still be considered valid by current consensus rules?
  2. If such outputs are valid, how can they be spent? What would scriptSig look like? Can it be just <3> and that's it (since top level stack element would be non-zero value; it's 3)?

Answer 1

  1. Can a Bitcoin transaction output have a completely empty scriptPubKey (0 bytes) and still be considered valid by current consensus rules?

Yes, but not by the current standardness rules in Bitcoin Core.

  1. If such outputs are valid, how can they be spent? What would scriptSig look like? Can it be just <3> and that's it (since top level stack element would be non-zero value; it's 3)?

Indeed. But again, such a spend will not be valid by standardness rules.

Note that just because an output is valid, does not mean it can be spent. E.g., a scriptPubKey of <0> would be valid (as in by consensus it is allowed to appear in a transaction output), but there is no way to spend it.

Trending Questions - Bitcoin Stack Exchange | 2025-09-15T19:59:37.000Z | By Cosmos
Read Original ← Back to Home