pull down to refresh

Good point! I hadn't considered replay protections and cross-split sniping. That makes it a good deal more complicated than I considered.
302 sats \ 0 replies \ @Murch 3h
It’s a frequent question we get on Bitcoin Stack Exchange: if a block gets reorged, what happens to the transactions in that block? Do they all get unconfirmed and returned to the mempool?
And the important thing to realize there is, that from the perspective of each chaintip the other block might as well not exist. The best chain has only one block at each height, so competing blocks do not at all influence each other in regard to what is included.
Most of the time two competing blocks at the same height will include almost exactly the same transactions with some minor differences in what txs they had seen when they created their template, or some locally prioritized transactions. Obviously, the coinbase transactions will differ, and very occasionally, one block could include a replacement of a transaction while the other block included the corresponding original. But because miners try to maximize the revenue from the available mempool, they pick all the same transactions, and for the most part, either both blocks or neither confirm a transaction, so it makes no difference for the users which block wins out in the end.

Addendum: Obvious exceptions are of course when someone is deliberately reorganizing the chain to revert a previously confirmed transaction, or when a reorg is so deep that coinbase transactions matured on both chaintips and said coinbase outputs don’t exist on the competing chains, so a reorg could remove whole chains of transactions from the history.
reply