Author

Topic: Chain reorg question (Read 152 times)

legendary
Activity: 2394
Merit: 5531
Self-proclaimed Genius
January 11, 2020, 03:14:55 AM
#5
Thanks for the inputs.
So I conclude:
The winning fork has its own version of pending transactions (mempool) which will still have the transactions not included in the overtaking chain. The nodes which followed the shorter version for a while will not have these, but will get to know about them when these pending transactions eventually will be included in a block.
They won't wait for those transaction to get included in a block in order to "know" them.
The transactions from the orphaned block that weren't included to the latest block(s) of the longest will be added to their mempool again.

The book: Mastering bitcoin used the term "queued up again" that lightly indicates that the node will move them from the orphaned block back to mempool.
full member
Activity: 183
Merit: 112
Just digging around
January 11, 2020, 02:37:07 AM
#4
Thanks for the inputs.
So I conclude:
The winning fork has its own version of pending transactions (mempool) which will still have the transactions not included in the overtaking chain. The nodes which followed the shorter version for a while will not have these, but will get to know about them when these pending transactions eventually will be included in a block.

Pretty smart IMHO Smiley
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
January 10, 2020, 04:43:18 PM
#3
If a block is orphaned most of the transactions will normally appear in the unorphaned block anyway (especially is consensus rules aren't changed).

In addition, I'm not sure about whether they'd be recycled back into the mempool but my instinct tells me they would... I know they're recycled the other way around so the signature doesn't have to be verified twice (once entering the mempool and once entering the block) so blocks can be added a lot faster.
legendary
Activity: 2912
Merit: 2066
Cashback 15%
January 10, 2020, 04:38:13 PM
#2
Does it x-reference which transactions were included in the loosing but not he winning fork?

No. Orphaned blocks and their transactions are not stored and referenced. Some blockchain explorers may store the orphaned blocks that they received in their database for public viewing, but that's unrelated to how the Bitcoin protocol works.


What happens after chain reorg with the transactions confirmed on the shorter chain (lets assume a somewhat possible 3 blocks reorg), but not included in the longer chain? I believe those are not in the mempool anymore as they were included in a block earlier.
Does Bitcoin core re-queues the transactions from the overwritten blocks?

"The" mempool does not exist. Every node has their own mempool. That means while nodes that followed the "losing" fork will have removed the transaction from their mempool, other nodes that have been following the "winning" fork all along will still have the transactions in their mempool -- given, of course, the transactions have not yet been included in the "winning" chain as well.
full member
Activity: 183
Merit: 112
Just digging around
January 10, 2020, 04:26:16 PM
#1
Hi,

What happens after chain reorg with the transactions confirmed on the shorter chain (lets assume a somewhat possible 3 blocks reorg), but not included in the longer chain? I believe those are not in the mempool anymore as they were included in a block earlier.
Does Bitcoin core re-queues the transactions from the overwritten blocks?
Does it x-reference which transactions were included in the loosing but not he winning fork?

Can someone please someone enlighten me? Wink

Thanks
Jump to: