0

i am wondering how a Miner chooses the transactions, he want to mine inside a block. For example, a Miner has got the Transactions T1 and T2 at the moment he starts a new mining work. This Miner is the one, finding the next block, which is after 10 seconds. After 8 seconds and 2 seconds before the Miner would find the next block T3 arrives at the Miner. Which transactions does the Miner then mine into the next Block, only T1 and T2 or also T3? (I assume here, the block size is bigger than the combined size of T1,T2 and T3.

So does the Miner determine at the beginning of a new mining process, which transactions go into the next block and ignores incoming transactions during the mining process of the next block?

0

TL;DR: freely.

Mining is based on economic incentives. The miners are believed to want to maximize their profits. Therefore because mining a block (finding the right solution to the mining puzzle) is so hard he should include as much transaction to a block as he can because the amount of time processing the extra transactions is insignificant compared to the effort required to solve the puzzle.

Furthermore miners will probably choose transactions with a high gas price as miners keep the gas costs associated with the transactions. So in the end they will choose: 1) The transactions with the highest gas price and 2) As many of them as possible.

In the end any client can do whatever they wish - even mine a block with 0 transactions. But the more you follow economic incentives, well, the more you gain. So all popular client implementations try to maximize miner income.

There are always plenty of transactions in the tx pool to choose from as the network is mostly operating at maximum capacity. I'm not exactly sure how client implementations operate in this regard but most likely they will just choose the transactions to include and stick to that - even if 1 second after choosing the transactions a tx with mega-big-tx-price is received the set is not changed.

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.