0

For example in Bitcoin, if I want a miner to verify whether other miners store a transaction, before deleting it from his mempool.

How can I handle the case more than one miner doing the verification at the same time?

Is it possible to use backoff algorithm?

  • 1
    It's impossible to answer this as its based on a misunderstanding of the system. – Anonymous Mar 5 at 15:17
0

The mempool is just a temporary store of unconfirmed transactions. Each node's mempool is not synchronized, and in fact a node could choose to not keep a mempool at all. So no node needs to verify whether anyone else has a transaction, before deleting it from their memory. Miners will choose transactions from their mempool, to build new block templates that they will mine on.

What matters is the blockchain. Each new valid block will (likely) include some transactions, so when a node hears about that block, it will update its mempool accordingly (removing transactions that have been confirmed in the block).

Thus, miners can all be attempting to mine a block that includes the same (or different) transactions, and it is simply the first miner to find a valid block that will 'win', with their block being appended to the blockchain. All other miners will see this new block, and start to mine on top of it, adjusting their mempool (and thus the transactions they include in their new attempts to find a block) accordingly.

  • So all miners will work on what they see as a full block of transactions, when a miner found a valid block it will broadcast it on the network to everyone. At that point will all other other miners stop mining and verify the new valid block? After that the miner will collect see what transactions where now verified and assemble a for a new block I assume. In the bitcoin blockchain there the miners will stop collecting transactions every 10 minutes (on average). Other parameters is the priority (fee) and congestion in the network (to many transaction). Are these assumptions correct? – Damian Mar 6 at 1:56
  • I now understand that the difficulty is adjusted my looking at the average time between verification over the last 2 weeks. The goal is to get this to about 10 minutes in bitcoin. – Damian Mar 6 at 2:09
  • 2
    Miners never stop mining. They are continuously trying to find a successor block, with a contents drawn from the mempool of that time. Whenever a new block is found, their mempool changes, and thus their next future attempts will be on top of that. – Pieter Wuille Mar 6 at 2:17
  • So when the first miner solves the hashing solution and broadcasts it, will the other miners verify that block? I assume the transactions are sealed in the block that we are trying to reach consensus on, but what if a the different blocks the miners are checking have different transactions in them? – Damian Mar 7 at 8:54
  • @Damian see: bitcoin.stackexchange.com/questions/8172/… – chytrik Mar 7 at 9:18

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.