Do all transactions have at least one output that contains at least one bitcoin address

2

Do all transactions that are included in a valid block have to have at least one bitcoin address as part of their outputs (vout)?

I found this to be similar: Are Bitcoin transactions permitted to have no outputs (i.e. all inputs become transaction fee)? although not quite the same.

Doug Peters

Posted 2014-12-23T18:33:14.733

Reputation: 1 326

Answers

3

No. A notable example of a pubkey script that doesn't typically include addresses or keys is the nulldata standard transaction type. Examples of pubkey scripts that include public keys but not addresses are pay-to-pubkey (P2PK)[1] and "bare" multisig.

Although I'm not absolutely sure, I believe its allowed to have an empty pubkey script. (That is, the compactSize uint that describes the size of the pubKey script is 0x00.)

Note: Bitcoin Core's getrawtransaction RPC, decodetransaction RPC, and other RPCs will display the public keys in P2PK, bare multisig, and redeem scripts as addresses---which can be a bit confusing.

[1] P2PK was formerly used for most coinbase transactions, but that usage has mostly disappeared on mainnet with pooled mining. It's still a standard transaction type and quite common for coinbase transactions on testnet.

David A. Harding

Posted 2014-12-23T18:33:14.733

Reputation: 10 154

Great answer David, thanks! Do all transactions have to have at least one output amount (value)?Doug Peters 2014-12-23T18:55:17.343

1You're welcome. All transactions must have at least one output. All outputs must have a value, but that value can be 0 satoshis. For example, in order to be standard, a nulldata standard transaction must have a value of 0.David A. Harding 2014-12-23T19:43:16.433

1+1 for the additional note, been banging my head against the wall due to this for hours.Priidu Neemre 2015-06-10T10:35:50.300