Post
Topic
Board Development & Technical Discussion
Merits 2 from 1 user
Re: Bitcoin branch - multiple blocks
by
lugospod
on 23/03/2018, 14:44:02 UTC
⭐ Merited by ETFbitcoin (2)
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...
Yes.

tnx!

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)?
He can't. The maturity for the block reward is 100 blocks. The miner cannot spend any UTXO (unspent transaction output) created by the coinbase transaction until the chain is
has at least 100 other blocks mined on top of that. This should counter any possible block reorgs unless it goes to 101+ and that is unlikely.

Oh, this information about maturity was the "missing" part:) tnx!

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
It is possible and probably is happening. If they mine a block at the same time, they could include the same transaction that is in their respective mempool since its not in a block already.

If this is possible, then if I had a private key to the bitcoins that are in those two duplicate transaction, I could double spend them? Right or wrong?
1) Both miners included the same transaction from their mempool, both mind the block in the same time, both blocks are on blockchain (until one block "dies").
So basically, I can create two transactions, one that references "first" duplicate transaction, and the second that references the "second"? (in theory of course)

2) I could "spend" first transaction, and that block could be cancelled (because it ends up in the "dead chain) and my transaction "terminated" - but I already received goods for that transaction and the "retailer" lost his money? Right or wrong?

3) When does the miner get the fees for including transactions in the block (output-input)? Is there a different "maturity" for transactions or it is the same as for Block?
I am asking in regards if he collects the fee right away, and that block gets "killed" and transactions returned back into "pool", someone has to pay the second miner who will include that transaction again in his pool.

One other thing I missed on google (nobody shows that example), where is the transaction for "fee"? Is it included in the coinbase transaction (reward for block + sum of all fees for transactions in the block) or are transactions fee separate? If they are separate who will create a "record" about that fee (it has to be written as a transaction so that the miner can reference it when he wants to spend it)

Big thank you once again for all your efforts to go in this border line cases with me Smiley

KR