1

My question comes from observing that almost all Eth blocks are very close to the current limit of 15M gas used. I think I remember reading once that miners DO NOT simulate transactions in their nodes before adding them to the actual block that they are trying to mine, since simulating that transaction already consumes calculation power, but without any expected value as could calculation power used to mine a block.

Is this true? If it is, how can miners so accurately fill up the block gas limit?

1

Miners must simulate the transactions, otherwise it would be impossible to know what the mined block will be. For example, if I have a simple function that adds two numbers and saves the result within the blockchain, this type of transaction has to be simulated in order to generate the block. Another thing to note is that once a block has been mined other miners should be validating it which requires simulating the transactions.

1
  • Thanks for the answer. Do the miners simulate the txs as if they were located in the first position of the block always, or as if they were located in the position they would finally be located at (i.e., after other txs change the state of the block)? I guess the former, else they would have to simulate each tx everytime a new one is added to the current block they are trying to mine.
    – Hiperfly
    Jun 4 at 8:16

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.