0

Suppose a transaction T changes the state from S to an invalid state S'. For example, say, it ran an long loop of no operations (no_op), and attempted a double spend. Since this T transforms the state to an invalid state S', the transaction should not make it into the blockchain. How does a miner claim gas for the computation power they invested in running the transaction, if they cannot show everyone else the transaction they wasted time on ?

I'm assuming gas economics in Ethereum are similar to transaction fees in Bitcoin. Is my understanding right ?

1

Suppose a transaction T changes the state from S to an invalid state S'.

It doesn't work like that.

The miner can include transaction T in a block and run it until it aborts (for whatever reason). Whatever. The miner doesn't get to transmit S, valid or invalid. Only that transaction T was included in the block in a certain position.

Everyone else will also run the transaction and also see that it aborts. They will similarly compute the same gas consumption and similarly compute the miner reward from the inputs in T included in the block.

In other words, no one is counting on the miner's assessment of the award due.

Hope it helps.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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