0

I am very new to blockchain and try to understand it completely. What I think I understood is, that every transaction is going to the mempool first and these transactions are getting picked by miners. With a bunch of transactions and the previous block hash a new hash needs to be calculated. And as soon as the desired hash is calculated a new block is mined.

What I dont understand:

  • Is one transaction only picked by one miner or is it possible, that more miners can pick the same transaction?
  • If only one miner can pick a transaction, what happens if this miner has weak hardware?
  • If more miners can pick a transaction, what happens to the other miners(that couldnt calculate the hash first).

I googled a lot and couldnt find an answer to this questions. Hope this question meets the criteria and you guys can help me :).

Thanks in advance.

2

Solo Miners

Is one transaction only picked by one miner or is it possible, that more miners can pick the same transaction?

Each miner is free to pick whichever transactions they want. They have no knowledge of what other miners are working on. Miners might pick different transactions, some the same and some different or all the same. There is no explicit coordination.

Only when the rate of new transactions is low, it is likely that each miner will have the same set, or nearly the same set, of transactions to work with.

If only one miner can pick a transaction, [...]

Not applicable.

If more miners can pick a transaction, what happens to the other miners(that couldnt calculate the hash first).

When they see another miner has produced a new block, the others stop their work and start on the next block based on the new block produced by the other miner. They first remove from their mempool any transactions included in the other miner's new block.


Mining Pools

Things are a little more complicated for mining pools. Members of a pool coordinate their work cooperatively. But you can think of each separate pool as a separate miner and the above applies.

Stratum v1: Pools and solo miners are the only entities that are constructing block templates. Regular miners cannot because they don’t have the transaction sets to build the blocks.

Stratum v2: Every miner (who has it implemented in their firmware & a pool that supports it) will have the option to prioritize transactions however they want without impacting the other miners in the pool.


Further reading

8
  • Maybe my question was not clear? Can different miners pick the SAME transaction at the same time. And if this is possible. It would be possible, that a miner eith bad luck would NEVER mine a block and would never be funded? – user1949096 Mar 11 at 20:06
  • @user1949096: If you wish, you can Edit it and/or explain why this answer doesn't address your question. – RedGrittyBrick Mar 11 at 20:10
  • @user1949096: 1) Yes (but it isn't important), 2) Yes. – RedGrittyBrick Mar 11 at 20:11
  • There is no coordination, so miners have absolutely no clue what other miners are trying to include in their blocks. It doesn't matter, mining is a purely local process, so anyone can create whatever block they want. Once their block is created, and broadcast, other miners can't include the same transaction in a successor block anymore of course; that'd be a double spend. – Pieter Wuille Mar 11 at 20:11
  • RedGrittyBrick and @Pieter thank you for your answers. So I think I understood it now. I try to explain: the same transaction can be picked by x miners. When the first block is mined, the miner gets a refund. The next miner, who creates the next block, which contains also this transaction, is also getting rewarded. So a transaction can be exist in more than just one block. Did I get it right? – user1949096 Mar 11 at 20:19

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.