<p>Miners do optimize the block construction process internally.</p>

<p>Unfortunately they do not share this information with the community, so we don't know what methods they use, how they choose TX's and how they distribute work to pool participants.</p>

<p>Both mining machines and mining software the big miners use are secret. Modern ASIC machines' hardware are closed source and so is their firmware and operating system.</p>

<p>This is unfortunate considering that Satoshi gave us Bitcoin source code, which is absolutely revolutionary, for free.</p>

CC BY-SA 4.0
2019-10-20T13:28:12.440Z
2019-10-20T13:28:12.440Z
Jose Fonseca
<p>The mining is done on ASICs that do nothing but mine. As each miner finishes a work unit, it is given another one that has already been computed and is ready to go. The computation of the work units and the selection of what to put in the block to be mined is done by a general purpose computer and does not compete for resources with mining.</p>

<p>So, in general, it makes no difference how much effort you go through to choose the block contents and work units assigned to miners so long as you can produce work units fast enough to keep all your miners busy all the time.</p>

<p>There is one exception -- when a new block is found. Here, you don't want to use any work units you've already computed because they will produce a later chain of equal length and so are unlikely to reward you. In this case, you do need to produce new work units for all your miners as quickly as you possibly can. Every second it takes you to do this reduce your mining revenue by about 0.8%.</p>

<p>This is, however, an unavoidable case. You must generate new work units and you can't blindly use the same transaction set because certainly at least some of those transactions are included in, or invalidated by, the new block. So you can't avoid doing the work here anyway.</p>

CC BY-SA 4.0
2019-11-20T03:21:45.287Z
2019-11-20T03:21:45.287Z
David Schwartz
<p>So, Bitcoin block consists of some static (magic number, version, previous hash...) and dynamic (timestamp, Merkle Root, transaction count and transactions) elements. What I don't understand is if we update active parts, wouldn't we start guessing nonce from the beginning every time and also calculating the new merkle root would be time-consuming for each transaction? I understand that since PoW is memoryless it doesn't effect much if it is updated every seconds or with every transaction but it may be slower to compute new hashes and root. I'm sorry if I'm wrong but, if miners freeze the block at certain time would they have an advantage. I searched a lot, but couldn't find an article or video of what really happens during mining in slo-mo.</p>

CC BY-SA 4.0
2019-10-20T20:06:50.720Z
It needn't be a fixed time interval.  In principle, a miner could measure how much it costs them (in terms of lost mining time) to restart with a new block header, and then restart only if the new block's fees exceed the old block's by at least that amount.  This amount could of course be different for different miners, depending on their hardware.
Nate Eldredge
<mining-theory><transaction-selection>
what is the most suitable time interval for updating information on a block while mining the block
cagliyangil
# what is the most suitable time interval for updating information on a block while mining the block

(Asked by: username_0 on 2019-10-20)

So, Bitcoin block consists of some static (magic number, version, previous hash...) and dynamic (timestamp, Merkle Root, transaction count and transactions) elements. What I don't understand is if we update active parts, wouldn't we start guessing nonce from the beginning every time and also calculating the new merkle root would be time-consuming for each transaction? I understand that since PoW is memoryless it doesn't effect much if it is updated every seconds or with every transaction but it may be slower to compute new hashes and root. I'm sorry if I'm wrong but, if miners freeze the block at certain time would they have an advantage. I searched a lot, but couldn't find an article or video of what really happens during mining in slo-mo.

**Tags:** mining-theory, transaction-selection

> **Comments:**
> **username_1**: It needn't be a fixed time interval.  In principle, a miner could measure how much it costs them (in terms of lost mining time) to restart with a new block header, and then restart only if the new block's fees exceed the old block's by at least that amount.  This amount could of course be different for different miners, depending on their hardware.  

---

## 2 answers

### Answer by username_2 on 2019-10-20. Score: 1

Miners do optimize the block construction process internally.

Unfortunately they do not share this information with the community, so we don't know what methods they use, how they choose TX's and how they distribute work to pool participants.

Both mining machines and mining software the big miners use are secret. Modern ASIC machines' hardware are closed source and so is their firmware and operating system.

This is unfortunate considering that Satoshi gave us Bitcoin source code, which is absolutely revolutionary, for free.


---

### Answer by username_3 on 2019-11-20. Score: 0

The mining is done on ASICs that do nothing but mine. As each miner finishes a work unit, it is given another one that has already been computed and is ready to go. The computation of the work units and the selection of what to put in the block to be mined is done by a general purpose computer and does not compete for resources with mining.

So, in general, it makes no difference how much effort you go through to choose the block contents and work units assigned to miners so long as you can produce work units fast enough to keep all your miners busy all the time.

There is one exception -- when a new block is found. Here, you don't want to use any work units you've already computed because they will produce a later chain of equal length and so are unlikely to reward you. In this case, you do need to produce new work units for all your miners as quickly as you possibly can. Every second it takes you to do this reduce your mining revenue by about 0.8%.

This is, however, an unavoidable case. You must generate new work units and you can't blindly use the same transaction set because certainly at least some of those transactions are included in, or invalidated by, the new block. So you can't avoid doing the work here anyway.


---

