This question already has an answer here:
In most exaplanations of the essentials of Ethereum, I miss an important detail: "Who runs the computations of a smart contract?".
Say I make a call, add some gas, all of which allows me to, say, extract some tokens from a (solidity) contract.
Where is the code ran?
Reading a question about fees makes me believe it is a miner.
If the Solidity is being executed in a transaction, the fee always goes to the miner of the block, even if there is an Out of Gas or execution error of any kind.
If that is the case, what miner will run the code? All of them? The winning one?
However, reading a question on the how- of executing contracts makes me beleive it is the node executing this. Would that be the node one is connected to? And when a node needs to call another contract as part of this contract-call, will it do so on itself, or delegate that to another node?
And if it is the nodes, do miners need to re-run a contract in order to decide whether it's outcome state was properly ran?
Another question covers the when: at what time are they ran. The answer there does cover some of the "who", but does not explain explicitely who is running it.