1

Is there just one mempool or does each node keep a copy of the mempool?

From my understanding each node needs to keep a copy of the mempool.

If that is true then how is mempool consensus reached? Does it need to be reached?

What happens to mempool transactions when there are two equally long chains on the network?

If I have BTC in my account and send it to someone, but during that time there are two equally long chains on the network, what happens?

Is there a chance that the BTC gets forever lost in a mempool when one of the chains is rejected?

5

Is there just one mempool or does each node keep a copy of the mempool?

Neither. Every node has their own mempool of transaction they expect to see confirmed. It's not a copy as there is no consistency between nodes.

From my understanding each node needs to keep a copy of the mempool.

No, mempools are completely optional. You can configure your node to not keep one at all. The only downside is that you won't know about transactions until they confirm.

If that is true then how is mempool consensus reached?

There is no mempool consensus. If there was, we wouldn't need a blockchain.

What happens to mempool transactions when there are two equally long chains on the network?

Nodes have just one active chain which they treat as correct. There may be competing chains, but nodes will typically assume that the version they say first will win. If they keep a mempool, they try to keep it consistent with the blockchain as they accept it, not with any possible alternate versions of history.

Is there a chance that the BTC gets forever lost in a mempool when one of the chains is rejected?

Miners have complete power (together) in determining which transactions are accepted into the chain. It's certainly possible that you issue a transactions which never gets included, but that has nothing to do with chains being rejected.

  • So if a transaction is sent but is never included in the blockchain does that mean that the BTC can be sent again or is it gone forever? – Greg Jan 25 '18 at 5:26
  • As long as the transaction is not confirmed, there is no guarantee about anything. If your wallet supports it, it can try sending it again. – Pieter Wuille Jan 25 '18 at 5:30
  • 1
    When one chain is rejected, all transactions that are not confirmed in the accepted chain are returned to the mempool. – Willtech Jan 25 '18 at 8:14
1

If I am not wrong, Bitcoins lost in the orphan block are never considered to have been existed in the first place, so we don't technically call them "lost".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.