Post
Topic
Board Development & Technical Discussion
Re: Bitcoin branch - multiple blocks
by
lugospod
on 22/03/2018, 22:59:01 UTC
I must have gotten something mixed up... isn't a coinbase a fee that the miner gets payed just for mining the block? He could really mine a block with only his coinbase transactions... basically he can decide not to include any additional transactions?
Yes. There is only one coinbase transaction per block. The coinbase transaction includes the payout for the block subsidy and the sum of the transaction fees in the block.

If so, then any other transaction he includes in his new generated block can make him money OUTPUT_1_amount - OUTPUT_2_change = transaction fee.
The transaction fee is the input amount - output amount.

So by mining a block he gets a coinbase amount (reward) + all of the transaction fees. So he broadcasts the message that he mined it... block is on the blockchain...transactions are considered valid...
The miner broadcasts the block itself. He doesn't just say that a block was mined. Miners also do not dictate what transactions are valid; a miner could include an invalid transaction in a block and the block would be rejected by all other full nodes on the network.


Thank you.

So, if we assume that everything is OK with the block... then at the same time we have two blocks with the same "parent" (previous block). And possible those two branches could go like that for a couple of more blocks (the probability of that decreases exponentially). So until this situation is resolved, everything is OK... some nodes are using one branch, and some nodes are using other branch...  And when the "problem" gets resolved, all of the transactions that were in the loosing chain get thrown back into the "unconfirmed" pool... where some other miner can pick them and try to include them in their block...

Did I get this right? Until the the problem is resolved the miner could "spend" the fee he received for including the transaction in his block. After that the block chain decides to eliminate his block (because it was in the loosing team). What happens now?
He is not receiving the reward for his block because it was discarded?
The transactions that were included in his block need to be resent (by him or some other miner).
What happens with the fee he already spent (the one he received for including the transactions in the first place)?


I am obviously missing some information...I am trying to find info on google, but I can't seem to find the "right" site that explains this process in details...

Also, I don't see why isn't it possible that two miners are trying to include the same transaction in their blocks? transaction is in the unconfirmed pool, both want to add it in their block (it is needed because the transactions in the block also have impact on calculating/mining the block), and possible both succeed at the same time... this of-course seem wrong so again, I am missing some info or got something mixed up Smiley

tnx!