but I properly calculated all balances and hashes. Who will say too me that I’m wrong? Someone have to execute that contract too to check my result
Who in the blockchain checks smart contacts executed right? Or maybe it’s unnecessary?
All nodes check the txns. If a miner submits a bad block, all good nodes would reject it. And likely the miner would be blacklisted.
So everyone executes smart contracts after miner to proof that he do it right?
But gas goes only to the miner? Am I right? Or how all other nodes trust to miner without actually execute the contracts?
Yes the gas goes to the miner who submitted the correct block. The hard part is not executing the transactions, so the miner puts profitable txns in the block and then solves the hash and then submits it hopefully faster than any other miner.
Yes, I am pretty sure that is correct. As I said, the gas from txns in a block goes to the miner who submitted the block.
Yes, ok. What I’m bothering is that If you need to validate long fork for example in the bitcoin it easy to do, but in the “evm” blockchains it is much harder, because you should not just check simple transactions but also run plenty of the smart contracts that was previously executed by miners
In what circumstance would you feel you need to validate historical txns?
In real life this is probably not needed, but there could potentially be a long fork that needs to be tested.
Well, in practice, it really doesn't matter if historic transactions and chain state content is valid or not... the only thing that matters is what the majority of nodes on the network agree on. In this way you can change everything about the chain so long as the majority of nodes want to make the same changes. But yes, to execute every txn ever would certainly take a long time, perhaps days or weeks. I think it takes a week to sync a full node, but probably depends on hardware.
Обсуждают сегодня