I would like to know whether the execution of a smart contract is done by the miner or by the blockchain system?
3 Answers
Each node of the network, not only miners execute the smart contracts. The results of the execution should be exactly the same to add the transactions to the blockchain. The smart contract is executed within the EVM and only those calls which modify some state require to be executed through a transaction. The getters are executed only in the node where it was called.
-
-
The result of the execution is the set of states that the transaction changes, nothing related to PoW or PoS. Jun 1, 2017 at 21:07
In simple terms, the smart contract is executed by every node on the network, not just the node that mines that specific block.
At a more abstract level, the smart contract is executed by the Ethereum Virtual Machine (EVM). The EVM is the "computer" that is operating in parallel on every node, and is kept in consensus about the state of every program running on ethereum.
By miners and by all full nodes in the network.
-
1