This question already has an answer here:

If I have a contract, does it run on all nodes or is a node selected using some method ? If the former, this seems very wasteful of computational power.

marked as duplicate by Ismael, Paul S, Community Aug 26 '17 at 22:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


it runs on all the nodes mining the ethereum blocks. indeed there is a waste of computational power but there is a trust gain. if we select few nodes to run the code how can we trust them and how to protected them not being compromised

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