contract-design – Is EVM Deterministic? Understanding State Transitions and Turing Completeness

contract-designevmstate-transitionturing-completeness

Unlike something like JVM or CIL, EVM is said to be deterministic and understandably so when multiple nodes in a decentralized network have to simultaneously work together. But, EVM is also said to be unpredictable in the sense that we don't know what result it will produce before actually running it, as state here:

But as Turing proved, Ethereum can’t predict if a smart contract will
terminate, or how long it will run, without actually running it
(possibly running forever). Whether by accident or on purpose, a smart
contract can be created such that it runs forever when a node attempts
to validate it.

Are these two different concepts?

Best Answer

Are these two different concepts?

Even though we can't predict the result beforehand, being deterministic means that for the same starting conditions, and given the same inputs, the same result will occur, even if that result is a smart contract running forever.

It will run forever in the same way - following the same execution path - on each node in the network, or each time the same experiment is run from the same initial conditions.

Thought experiment only. Can't actually happen given gas constraints.

Related Topic