<p>When a new block is found, miners will automatically switch to mining on top of the new block headers with an empty transaction set. Occasionally you can see this in the blocks, when two blocks are found immediately after one another, the second one tends to be empty.</p>
<p>Within a few seconds though a non-mining PC constructs the merkle tree of the highest paying mem-pool transaction that can fit into a block, and passes the merkle root to the mining hardware, which then mines on top of the previous block and includes the transactions.</p>
<p>This merkle root of highest paying TX is updated every 30 seconds or so.</p>
<p>So here's something important: you don't pick which TX to include after you have mined it, you do it before.</p>
<p>Also: The hashrate of the hash-hardware stays constant. It's reliant on getting accurate previous blocker header, merkle root and a few other bits from somewhere, so that what it is mining will be a valid block.</p>

CC BY-SA 4.0
2022-02-27T15:39:35.003Z
Thank you but I still don't how hashrate remains constant or does it affect blocktime adding more transactions? The reasoning is that when addind a new tx to the merkel it invalidates the current block nouce/space search (same nounces can be recalculated).
tlr
CC BY-SA 4.0
2022-02-28T09:37:15.087Z
@tlr: hashrate is a fixed characteristic of the mining hardware used. Nothing else.
RedGrittyBrick
CC BY-SA 4.0
2022-03-02T01:22:31.323Z
The hasher hashes at approximately constant speed. It only hashes the block header, in which all transactions are through the merkle root. So whether there are 0 or 2000 transactions planned for the block doesn't matter to the hasher or the hashing speed.
Paul Otto
CC BY-SA 4.0
2022-02-27T12:02:52.833Z
2022-02-27T12:02:52.833Z
Paul Otto
<p>When a block is mined, the remaining mempool txs can be mined into a new block.</p>
<p>Is there a difference in blocktime between accepting all streaming mempool txs into the mining block and sticking with first 100txs in a block?</p>
<p>If so, how does the applied hashrate fluctuates between two blocks based on txcount for instance, otherwise is the hashrate steady between blocks and whats the reasoning for that?</p>
<p>Thank you,</p>

<mining-pools><mining-theory><hashpower><energy-consumption><block-interval>
do miner hashrates vary during block production?
tlr
# do miner hashrates vary during block production?

(Asked by: username_0 on 2022-02-27)

When a block is mined, the remaining mempool txs can be mined into a new block.

Is there a difference in blocktime between accepting all streaming mempool txs into the mining block and sticking with first 100txs in a block?

If so, how does the applied hashrate fluctuates between two blocks based on txcount for instance, otherwise is the hashrate steady between blocks and whats the reasoning for that?

Thank you,

**Tags:** mining-pools, mining-theory, hashpower, energy-consumption, block-interval


---

## 1 answers

### Answer by username_1 on 2022-02-27. Score: 1

When a new block is found, miners will automatically switch to mining on top of the new block headers with an empty transaction set. Occasionally you can see this in the blocks, when two blocks are found immediately after one another, the second one tends to be empty.

Within a few seconds though a non-mining PC constructs the merkle tree of the highest paying mem-pool transaction that can fit into a block, and passes the merkle root to the mining hardware, which then mines on top of the previous block and includes the transactions.

This merkle root of highest paying TX is updated every 30 seconds or so.

So here's something important: you don't pick which TX to include after you have mined it, you do it before.

Also: The hashrate of the hash-hardware stays constant. It's reliant on getting accurate previous blocker header, merkle root and a few other bits from somewhere, so that what it is mining will be a valid block.

> **Comments:**
> **username_0**: Thank you but I still don't how hashrate remains constant or does it affect blocktime adding more transactions? The reasoning is that when addind a new tx to the merkel it invalidates the current block nouce/space search (same nounces can be recalculated).  
> **username_2**: @username_0: hashrate is a fixed characteristic of the mining hardware used. Nothing else.  
> **username_1**: The hasher hashes at approximately constant speed. It only hashes the block header, in which all transactions are through the merkle root. So whether there are 0 or 2000 transactions planned for the block doesn't matter to the hasher or the hashing speed.  

---

