Ethereum gas
An Ethereum transaction can call a smart contract, which can in turn call another smart contract, and then another, and so on. When smart contracts are buggy, it can lead to infinite loops. Outside a blockchain, it is easy to resolve an infinite loop issue. One can stop the out-of-control program by simply shutting down a server, rebooting it, debugging the program, fixing the faulty logic in the code, recompiling it, and redeploying.
With the Ethereum blockchain, this approach simply does not work! Imagine if tens of thousands of nodes went into infinite loops at approximately the same time worldwide. In order to stop infinitely looping smart contracts, all the nodes need to be shut down within a short time window. As long as ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access