1
I'm looking into the structure of blocks in the Bitcoin blockchain, and I can't figure out when\how the fees collected by miner of the blocks are transferred to the miner. According to what I can tell they are not a part of the coinbase transaction (which as I understand has to be constant since changing it after discovering a block would change the hash of the block). Are the fees paid as separate a transaction? Are they written directly to the UTXO without appearing on the blockchain? Something else?
Thanks!
Thanks! If this is the case, how is this implemented in a way which does not change the hash of the block once it's filled out? – MayaD – 2018-11-04T19:42:49.867
@MayaD The entire contents of the (candidate) block, including the subsidy payout, is determined before mining even begins. Nothing can be modified about a block afterwards, as it would invalidate the proof of work. When a miner wants to update the contents of the block they're working on, mining continues by working on a new, updated, block candidate. – Pieter Wuille – 2018-11-07T06:43:36.387
Thanks again! If this is the case, is there a way of determining which part of the fee paid to user x came from user y? Do you maybe have a reference to the relevant place in the source code? – MayaD – 2018-11-12T18:53:56.537