May 23, 2023
Ethereum is an open source, globally decentralized computing infrastructure that executes programs called smart contracts.
It uses a blockchain to synchronize and store the system’s state changes, along with a cryptocurrency called ether to meter and constrain execution resource costs.
In other words, whenever someone wants to perform an operation within this system, they need to pay a certain amount of ether to cover the costs associated with that operation. This helps ensure that resources are used wisely and that the system remains stable and efficient.
In December 2013, Vitalik started sharing a whitepaper that outlined the idea behind Ethereum: a Turing-complete, general-purpose blockchain. The founders worked for years, building and refining the vision. And on July 30, 2015, the first Ethereum block was mined.Ethereum’s development was planned over four distinct stages, with major changes occurring at each stage. A stage may include sub releases, known as “hard forks”, that change functionality in a way that is not backward compatible.
The four main development stages are codenamed Frontier, Homestead, Metropolis, and Serenity.
Block | Stage | Description |
---|---|---|
Block #0 | Frontier | The initial stage of Ethereum, lasting from July 30, 2015 to March 2016. |
Block #200,000 | Ice Age | A hard fork to introduce an exponential difficulty increase, to motivate a transition to PoS when ready. |
Block #1,150,000 | Homestead | The second stage of Ethereum, launched in March 2016. |
Block #1,192,500 | DAO | A hard fork that reimbursed victims of the hacked DAO contract and caused Ethereum and Ethereum Classic to split into two competing systems. |
Block #2,463,000 | Tangerine Whistle | A hard fork to change the gas calculation for certain I/O-heavy operations and to clear the accumulated state from a denial-of-service (DoS) attack that exploited the low gas cost of those operations. |
Block #2,675,000 | Spurious Dragon | A hard fork to address more DoS attack vectors, and another state clearing. Also, a replay attack protection mechanism. |
Block #4,370,000 | Metropolis Byzantium | It is the third stage of Ethereum. Byzantium is the first of two hard forks planned for Metropolis. |
Ethereum is a distributed state machine. It has memory that stores both code and data, and it uses the Ethereum blockchain to track how this memory changes over time. Ethereum can load code into its state machine and run the code, storing the resulting state changes in its blockchain.
Two of the critical differences from most general-purpose computers are that Ethereum state changes are governed by the rules of consensus and the state is distributed globally.
Turing completeness is a concept in computer science that refers to a system or language’s ability to simulate a Turing machine.
A Turing machine is an abstract mathematical model that can perform any computation that can be described algorithmically.
To be Turing complete, a system or language needs to have a few key abilities:
Bitcoin is not considered Turing complete because its scripting language, known as Bitcoin Script, is intentionally designed to be simple and limited in order to prioritize security and prevent certain types of vulnerabilities.
It is a stack-based scripting language used for defining conditions under which Bitcoin transactions can be spent. It intentionally avoids looping constructs (such as traditional while loops) and recursive function calls, which are key features of Turing complete languages. Why? These limitations are imposed to ensure that the validation of Bitcoin transactions remains predictable and deterministic.
Ethereum’s groundbreaking innovation is to combine the general-purpose computing architecture of a stored-program computer with a decentralized blockchain, thereby creating a distributed single-state (singleton) world computer. Ethereum programs run “everywhere” yet produce a common state that is secured by the rules of consensus.
Turing completeness is very dangerous, particularly in open access systems like public blockchain, because of the halting problem. What is the halting problem?
The halting problem is a famous problem in computer science that deals with determining whether a given program will eventually halt or it will run indefinitely.
Modern printers are Turing complete and can be given files to print that send them into a frozen state. The fact that Ethereum is Turing complete means that any program of any complexity can be computed by Ethereum. But the flexibility brings some thorny security and resource management problems. An unresponsive printer can be turned off and turned back on again. That is not possible with a public blockchain.
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. This is effectively a DoS attack. In a world computer, a program that abuses resources gets to abuse the world’s resources. How does Ethereum constrain the resources used by a smart contract if it cannot predict resource use in advance?
To answer this challenge, Ethereum introduces a metering mechanism called gas. As the EVM executes a smart contract, it carefully accounts for every instruction (computation, data access, etc). Each instruction has a predetermined cost in units of gas. The EVM will terminate execution if the amount of gas consumed by computation exceeds the gas available in the transaction. Gas is the mechanism Ethereum uses to allow Turing-complete computation while limiting the resources that any program can consume.
It can only be purchased as part of a transaction, and can only be bought with ether. Ether needs to be sent along with a transaction and it needs to be explicitly earmarked for the purchase of gas, along with an acceptable gas price. (The price is not fixed, it depends on demand and supply, similar to how a normal petrol pump works.)
..... To Be Continued. Stay Tuned.
Subscribe to the newsletter to learn more about the decentralized web, AI and technology.
Please be respectful!