Author

Topic: Help; what happens to transaction in deactivated blocks (Read 145 times)

legendary
Activity: 2268
Merit: 18748
So the reorg will not take place when it is a shorter chain?
Nodes follow the chain with the most proof of work. If they are sent a block or chain of blocks which build on older blocks but do not have more combined work than the chain they are currently following, then they will simply ignore them.

Let's say my node has a chain of blocks which goes A-B1-C1-D1-E1. You then send a chain of blocks which goes A-B2-C2. Provided the difficulty of all blocks is the same, then my node will simply ignore the blocks you have sent. If my chain then receives block F1, and then later you send me block F2, then again, I'll simply ignore your block since I already have a verified block at the same height. If, on the other hand, my latest block was F1, and you sent F2-G2, then I would drop F1 and replace it with F2-G2, since your chain now contains more work than mine.
full member
Activity: 303
Merit: 136
Defend Bitcoin and its PoW: bitcoincleanup.com
A chain organisation is said to take place after more than a block is mined same time. The blocks in older chain are deactivated for those in the newest chain. When more than a block is mined at same time nodes receive different blocks causing disparity to which block was actually mined first. Then chain reorganisation happens when another block is mined. The most recent block is received as the newest longest chain. Each mode then perform chain organisation.

My questions are;
1. What if the nodes receive blocks shorter than the active chain, does chain organisation also occurs?
2. Does this mean only the transaction present in the longest chain remain valid after reorganisation?

3. What happens to the transaction in deactivated blocks?
To put it simply, you only have to reorg if you get a 'longer' chain.

So the reorg will not take place when it is a shorter chain?
What then happens to the disparity of blocks in each Node ?..... Will they remain different till a longer chain is mined
copper member
Activity: 821
Merit: 1992
Quote
since I believe the biggest reorgs we've had were never more than 2 or 3 blocks
You are right if you think about present times, but historically, we had a bigger reorg during Value Overflow Incident. We also had some 6 blocks reorgs when mining pools used SPV mining.

Quote
I'm not 100% sure if the client has to retransmit it though or if full nodes put it back into the mempool after dropping their existing, shorter chain for a longer one where that transaction is not included.
They will put it back into their mempools, unless it is already mined in the reorged chain, or unless it is now invalid.
legendary
Activity: 3472
Merit: 10611
The transaction will go back to the mempool and will be mined later.
Not necessarily. You see when another miner finds block A' they also have pretty much the same mempool as the first miner that mined block A. Consequently block A' could have almost identical transactions as block A and if A' replaces A the confirmed state of those transactions won't change, only the block hash that contained them will.
hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
A chain organisation is said to take place after more than a block is mined same time. The blocks in older chain are deactivated for those in the newest chain. When more than a block is mined at same time nodes receive different blocks causing disparity to which block was actually mined first. Then chain reorganisation happens when another block is mined. The most recent block is received as the newest longest chain. Each mode then perform chain organisation.

My questions are;
1. What if the nodes receive blocks shorter than the active chain, does chain organisation also occurs?
2. Does this mean only the transaction present in the longest chain remain valid after reorganisation?

3. What happens to the transaction in deactivated blocks?
To put it simply, you only have to reorg if you get a 'longer' chain. If such a chain is submitted to you, some blocks will become stale and the transactions that were mined in them, go back to 0 confirmations (they're not in the blockchain anymore). That's the main reason it's usually recommended to wait for 6 confirmations; since I believe the biggest reorgs we've had were never more than 2 or 3 blocks.
The transaction will go back to the mempool and will be mined later. I'm not 100% sure if the client has to retransmit it though or if full nodes put it back into the mempool after dropping their existing, shorter chain for a longer one where that transaction is not included.
copper member
Activity: 821
Merit: 1992
Quote
The blocks in older chain are deactivated for those in the newest chain.
This is not always the case, because the total chainwork is counted, the block time can be older, but it has to meet the consensus.

Quote
What if the nodes receive blocks shorter than the active chain, does chain organisation also occurs?
It depends on chainwork.

Quote
Does this mean only the transaction present in the longest chain remain valid after reorganisation?
Yes, in the heaviest chain, not the longest, Satoshi changed it from "the longest" to "the heaviest" by adding code for checking Proof of Work for that reorged chain.

Quote
What happens to the transaction in deactivated blocks?
It does not exist, unless it is also included in the heaviest chain. You can use your CPU and mine today a new block, on top of the Genesis Block, and pretend it happened in 2009. And guess what: those coins will never exist, so you will not get 50 BTC for doing that. This case is the same for any transaction, coinbase or not.
full member
Activity: 303
Merit: 136
Defend Bitcoin and its PoW: bitcoincleanup.com
A chain organisation is said to take place after more than a block is mined same time. The blocks in older chain are deactivated for those in the newest chain. When more than a block is mined at same time nodes receive different blocks causing disparity to which block was actually mined first. Then chain reorganisation happens when another block is mined. The most recent block is received as the newest longest chain. Each mode then perform chain organisation.

My questions are;
1. What if the nodes receive blocks shorter than the active chain, does chain organisation also occurs?
2. Does this mean only the transaction present in the longest chain remain valid after reorganisation?

3. What happens to the transaction in deactivated blocks?
Jump to: