Mining Process - Transactions Selection

I started reading about Bitcoin a few weeks ago. Reading most the information and watching videos on the web, I though I understood about the mining process. However, I was shocked when I realized than all the 2^32 combinations of possible values of Nonce can be found is less than 1sec with the current mining hardware. I was even more shocked when I saw the explanation that the mining process also includes the selection of each transaction will be processed. Thus, mining process is much more "try to find the transactions" that will provide the solutions than really try to find the correct Nonce. When the solution is found, then does the miner publish the list of all transactions he selected, the Merkel Root and the Nonce. If the miner's solution is correct, he receives the block reward (currently is 12.5BTC) plus all the transactions fees included in the publish list (not all initial transactions).

At the same time, the concept of "Priority transactions" (https://en.bitcoin.it/wiki/Transaction_fees) no longer applies , since the miners choose the transactions to be processed.

Is my understanding correct?

• Your understanding is a little bit nervous, but without significant errors. Why are you shocked? Modern computers are very fast and can calculate billions operations per second in parallel Oct 31, 2017 at 21:12
• It’s more than that! The miner on my desk can do 25,000 2**32 nonce ranges a second, and it’s not even particularly modern. Miners are fast at doing their very specific task. Nov 1, 2017 at 3:36

1 Answer

Most miners today simply use sort transactions by fee/byte and include them in blocks. This is optimal strategy for revenue maximization(ignoring the knapsack errors).

When the nonce space is exhausted, miners can either change the timestamp of the header or they can use the additional space in the first transaction(called coinbase) where they can put random data. Changing this random data changes the merkle root, on which you try out 2^32 nonces.

So, to answer your question miners don't necessarily try to find new transactions that will find the solution, they can mine the same set of transactions with a little change in first transaction that does not affect the outputs any transactions in the block.

• Where can I find more information about you said regarding the changes in timestamp and in coinbase? Nov 2, 2017 at 20:05
• Please read bitcoin.org/en/developer-reference#block-headers on bitcoin wiki. The nonce section in the table has links to relevant sections Nov 3, 2017 at 4:24