Bitcoin Forum
November 07, 2026, 07:05:23 AM *
News: Latest Bitcoin Core release: 32.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Confused about what happens to the losing block when two miners compete.  (Read 187 times)
Aljawaab (OP)
Newbie
*
Offline

Activity: 9
Merit: 8


View Profile
October 26, 2026, 02:03:30 PM
Merited by Welsh (4), BlackHatCoiner (4)
 #1

‎I'm still learning how Bitcoin works, and I've been reading the "Chain Reorganization" on Learn Me A Bitcoin guide.

https://learnmeabitcoin.com/technical/blockchain/chain-reorganization/


‎I understand that miners collect transaction into blacks, but I am confused about what happens when two miners find valid blocks almost the same time.
‎which block does the network eventually accept, and what happens to the transaction included only in the block that loses? Do those transactions disappear completely or return to Memory pool.
‎
‎I would appreciate an explanation of how this works in practice. Iam a newbie and I want to understand the process properly.

hosemary
Legendary
*
Offline

Activity: 3304
Merit: 7467



View Profile
October 26, 2026, 04:53:49 PM
Merited by LoyceV (4), Welsh (4), BlackHatCoiner (4), philipma1957 (3), ABCbits (2), vapourminer (1), Mia Chloe (1)
 #2

‎which block does the network eventually accept, and what happens to the transaction included only in the block that loses? Do those transactions disappear completely or return to Memory pool.
We will have two chains, and the next block will determine which one wins.

Assume that we have chains A and B, and each has N blocks.
The chain that receives the block N+1 first will become the winning chain and the network will ignore the other chain.

Transactions that were included in the losing chain but not in the winning chain will be treated as unconfirmed transactions and can be included in any of the next blocks.

nc50lc
Legendary
*
Online Online

Activity: 3318
Merit: 9337


Self-proclaimed Genius


View Profile
October 27, 2026, 04:28:13 AM
Merited by vapourminer (4), LoyceV (4), Welsh (4), BlackHatCoiner (4), ABCbits (2)
 #3

-snip- and what happens to the transaction included only in the block that loses? Do those transactions disappear completely or return to Memory pool.
In case the node initially followed a stale block and accepted the active chain, the node will check which transactions are already confirmed to be removed from its mempool.
Then, the ones that aren't included to the active chain but was included to the stale block will be re-included to its mempool.
(take note that each node's mempool can be different)

‎I would appreciate an explanation of how this works in practice. Iam a newbie and I want to understand the process properly.
You'll love testnet4's blockchain for this.
Visualization of its forks: fork.observer/?network=testnet4 (you can zoom-in/out with your mouse wheel)

Imagine that the lines in that chart are the bitcoin nodes, some follow a fork and some follow the other
and once a block of the same height has more blocks on top of it, the other fork usually got stale.

Mainnet's blockchain isn't s chaotic as that, but it's a good example of what you're currently researching.

Aljawaab (OP)
Newbie
*
Offline

Activity: 9
Merit: 8


View Profile
October 27, 2026, 03:34:11 PM
 #4

So if I understand correctly;
 When a node switches to the longer chain, the transaction from the losing block go back into the memory pool if they are still valid and not confirmed. And conflicting transaction in the winning block is dropped.
‎thank you both, the tool really helped me.
‎
Cricktor
Legendary
*
Offline

Activity: 1666
Merit: 4673



View Profile
October 31, 2026, 12:13:52 PM
 #5

And conflicting transaction in the winning block is dropped.
How did you come to this statement and what exactly do you mean by "conflicting transaction"? Conflicting in what sense?

I don't see anything in the previous answers that would make you derive such a statement.

An honest node's mempool, be it a miner's, a mining pool's or any casual bitcoiner's, only accepts valid transactions spending valid UTXOs. A node verifies this before it adds a transaction to its mempool. This is key to prevent spending coins multiple times.

Danish Ali
Member
**
Offline

Activity: 112
Merit: 200


View Profile
October 31, 2026, 01:22:43 PM
 #6

And conflicting transaction in the winning block is dropped.

You were very close, but you had it backwards! Conflicting means that there are two differing transactions spending the same coin (UTXO). Cricktor explained that whilst the mempools on each node only contain valid transactions they are not synced. This means that two miners may have two differing versions in their mempools. This could be a transaction and its RBF fee bumped replacement, or an actual double spend. Both miners would include what they consider "their" version of the transaction into their block. Both blocks are valid.

Once the reorg occurs the node will transition to the winning chain. The transaction which spent the same coin in the losing block is now invalid as the coin has already been spent in the winning chain. It won't be placed back into the mempool it will simply be discarded. The version in the winning block will remain confirmed.

This is also why it is recommended to wait for more than one confirmation. If you only have one confirmation then your payment could be stuck in a block which gets replaced with another block in the chain containing a conflicting transaction.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!