Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: hushan on April 23, 2018, 12:31:37 AM



Title: Can coinbase transaction contains multiple destinations?
Post by: hushan on April 23, 2018, 12:31:37 AM
Can coinbase transaction contains multiple destinations, or does it have to be one output? For example, for the current reward 12.5, if set the coinbase tx to send 10 to one address and 2.5 to another, is it a valid coinbase tx and will it get confirmed by the network?


Title: Re: Can coinbase transaction contains multiple destinations?
Post by: achow101 on April 23, 2018, 12:50:01 AM
Can coinbase transaction contains multiple destinations, or does it have to be one output? For example, for the current reward 12.5, if set the coinbase tx to send 10 to one address and 2.5 to another, is it a valid coinbase tx and will it get confirmed by the network?
Yes, you can have a coinbase transaction with multiple outputs. The sum of the outputs just needs to be less than the block reward (block subsidy plus transaction fees).


Title: Re: Can coinbase transaction contains multiple destinations?
Post by: hushan on April 23, 2018, 12:55:34 AM
Can coinbase transaction contains multiple destinations, or does it have to be one output? For example, for the current reward 12.5, if set the coinbase tx to send 10 to one address and 2.5 to another, is it a valid coinbase tx and will it get confirmed by the network?
Yes, you can have a coinbase transaction with multiple outputs. The sum of the outputs just needs to be less than the block reward (block subsidy plus transaction fees).

Thanks, another question, can the coinbase output be P2SH address? And can it be segwit?


Title: Re: Can coinbase transaction contains multiple destinations?
Post by: achow101 on April 23, 2018, 01:35:40 AM
Thanks, another question, can the coinbase output be P2SH address? And can it be segwit?
Yes. The outputs for a coinbase transaction are just like outputs for any other transaction.


Title: Re: Can coinbase transaction contains multiple destinations?
Post by: Quickseller on April 23, 2018, 05:00:53 AM
Can coinbase transaction contains multiple destinations, or does it have to be one output? For example, for the current reward 12.5, if set the coinbase tx to send 10 to one address and 2.5 to another, is it a valid coinbase tx and will it get confirmed by the network?
Yes, you can have a coinbase transaction with multiple outputs. The sum of the outputs just needs to be less than the block reward (block subsidy plus transaction fees).
*Less than or equal to the block reward.


Title: Re: Can coinbase transaction contains multiple destinations?
Post by: TheQuin on April 23, 2018, 03:04:30 PM
Here's an example one mined by ckpool with 151 outputs including some Segwit ones.

https://btc.com/ae45a6033dfd718e3240151344f6b8c06a27ea5434fcfc2aaf983d820f8d8f8d


Title: Re: Can coinbase transaction contains multiple destinations?
Post by: Quickseller on April 23, 2018, 03:50:34 PM
Can coinbase transaction contains multiple destinations, or does it have to be one output? For example, for the current reward 12.5, if set the coinbase tx to send 10 to one address and 2.5 to another, is it a valid coinbase tx and will it get confirmed by the network?
Yes, you can have a coinbase transaction with multiple outputs. The sum of the outputs just needs to be less than the block reward (block subsidy plus transaction fees).
*Less than or equal to the block reward.

But in reality almost all miner set the outputs (plus fees) is equal with block reward & tx fee ::)

Also, if OP is interested in technical details, you can see more info at https://www.safaribooksonline.com/library/view/mastering-bitcoin/9781491902639/ch08.html (https://www.safaribooksonline.com/library/view/mastering-bitcoin/9781491902639/ch08.html). It's a bit outdated though.
There is no tx fee paid in coinbase transactions....


Title: Re: Can coinbase transaction contains multiple destinations?
Post by: Xynerise on April 23, 2018, 04:17:11 PM

There is no tx fee paid in coinbase transactions....
[/quote]
I guess he means transaction fees of transactions in the block as block reward.