How does a miner create a transaction input to spend tx fees?

5

1

I'm wondering where does a miner get an input for a transaction that spends the tx fees received from mining a block? It's not out of the coinbase transaction.

JBaczuk

Posted 2018-07-10T22:46:08.877

Reputation: 6 172

Answers

6

The transaction fees in a block are included in the coinbase transaction, which is a special type of transaction in that it does not have any inputs.

The value of the coinbase transaction’s output can be up to:

Current block reward + (sum of all inputs in the block - sum of all outputs in the block)

Claiming more than this will result in the block being invalid, but claiming less than this is allowed (though probably not in the miner’s best interests!)

chytrik

Posted 2018-07-10T22:46:08.877

Reputation: 10 276

Haha I'll gladly eat my words that makes sense, I never noticed before!JBaczuk 2018-07-11T00:27:04.453