0

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,

1 Answer 1

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.

3
  • 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
    Commented Feb 27, 2022 at 15:39
  • @tlr: hashrate is a fixed characteristic of the mining hardware used. Nothing else. Commented Feb 28, 2022 at 9:37
  • 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
    Commented Mar 2, 2022 at 1:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.