Does a transaction in Bitcoin Mempool reach many miners during mining or only a single miner?

0

I'm trying to understand the logic around the Mempool. What I understand is a miner will pick transactions based on an incentive given by the sender, i.e. a fee, so that the higher fee, the faster transaction will get confirmed.

But, What if the transaction get picked by a single miner regardless of fee and that miner is very unlucky miner that somehow it never win the block hashing lottery. Is that possible?

My question is:

Is only a single transaction picked by a single miner and the miner hashes the transaction with other transaction, then guessing the nonce, if it wins, then it includes in the block, else return to the Mempool?

Or,

Is only a single transaction picked by multiple miners and all those miners hash the transaction with other transactions, the guessing the nonce and the miner who wins the lottery included it in the block?

zdk

Posted 2018-04-09T09:21:30.850

Reputation: 103

Answers

0

How it actually works:

You send your transaction to one or more nodes (your wallet does this job for you). Each of the nodes (some of them are miners) sends it immediately to all the nodes it knows (and again and again).

All the miners store the transaction (if it's valid) in their own mempool.

When a new block was created, all miners look in their mempool and try to find the best not-mined transactions, pick those with the highest fee per byte and include it in their block-mining-attemp.

If one of the miner's mempool-transactions is mined, they simply delete it out of your mempool.

ndsvw

Posted 2018-04-09T09:21:30.850

Reputation: 1 947

Thanks for the answer, it's very clear. Stored transactions in their own mempool, let's say, tx1, tx2, tx3 the miner, m1, picks tx1,tx2 -> block-mining-attempt -> get a new block. And, the miner, m2, picks tx1, tx2, tx3 -> what will happen next to tx3, return to his own mempool?zdk 2018-04-09T11:14:36.743

1Note that your transaction is not sent directly to miners but rather sent to other nodes on the network which may or may not be miners.Andrew Chow 2018-04-09T15:50:47.710

@zdk I'm not 100% sure, but I think, a transaction stays in the mempool when the miner picks it. The miner can remove it later (as soon it's mined by someone). It depends on the implementation of the mempool...ndsvw 2018-04-09T17:41:49.393