...by Daniel Szego
quote
"On a long enough timeline we will all become Satoshi Nakamoto.."
Daniel Szego

Thursday, November 30, 2017

Blockchain FAQ - Turing Completeness


Question: Is solidity or Ethereum EVM Turing complete ?

Answer: Theoretically yes, so you can implement loops infinite loops and everything that can be theoretically implemented. However from a practical point of view it is not. If you consider the live Ethereum network, there is a block gas limit that can be fine tuned by the miners but only on a long run. The sum of all gas consumption of all transactions in a block has to be smaller than this gas limit, otherwise a "gas limit exceeded" exception is thrown.  It is basically a mechanism to prevent DoDS attacks. So in the practical implementation of Ethereum, it is not possible to implement infinite loops or computation without limit, even if someone could finance the gas forever.