Warning !!!
What Is Ethereum
Ethereum is a deterministic but practically unbounded state machine, consisting of a globally accessible singleton state and a virtual machine that applies changes to that state.
What is an unbounded state?
Ethereum vs Bitcoin
Bitcoin’s blockchain, tracks the state of units of bitcoin and their ownership.
Ethereum tracks the state transitions of a general-purpose data store, i.e., a store that can hold any data expressible as a key–value tuple
Ethereum vs General-purpose stored-program computer
Like a general-purpose stored-program computer, Ethereum can load code into its state machine and run that 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
Components of a Blockchain vs Ethereum
What a blockchain include | Matching to Ethereum |
---|---|
A peer-to-peer (P2P) network connecting participants and propagating transactions and blocks of verified transactions, based on a standardized “gossip” protocol | Ethereum runs on the Ethereum main network, which is addressable on TCP port 30303, and runs a protocol called ÐΞVp2p. |
Messages, in the form of transactions, representing state transitions | Ethereum transactions are network messages that include (among other things) a sender, recipient, value, and data payload. |
A state machine that processes transactions according to the consensus rules | Ethereum state transitions are processed by the Ethereum Virtual Machine (EVM), a stack-based virtual machine that executes bytecode (machine-language instructions). EVM programs, called “smart contracts,” are written in high-level languages (e.g., Solidity) and compiled to bytecode for execution on the EVM. |
A chain of cryptographically secured blocks that acts as a journal of all the verified and accepted state transitions | Ethereum’s state is stored locally on each node as a database (usually Google’s LevelDB), which contains the transactions and system state in a serialized hashed data structure called a Merkle Patricia Tree. |
A set of consensus rules, governing what constitutes a transaction and what makes for a valid state transition A consensus algorithm that decentralizes control over the blockchain, by forcing participants to cooperate in the enforcement of the consensus rules | Ethereum uses Bitcoin’s consensus model, Nakamoto Consensus, which uses sequential single-signature blocks, weighted in importance by PoW to determine the longest chain and therefore the current state. However, there are plans to move to a PoS weighted voting system, codenamed Casper, in the near future. |
A game-theoretically sound incentivization scheme (e.g., proof-of-work costs plus block rewards) to economically secure the state machine in an open environment | Ethereum currently uses a PoW algorithm called Ethash, but this will eventually be dropped with the move to PoS at some point in the future. |
One or more open source software implementations of the above (“clients”) | Ethereum has several interoperable implementations of the client software, the most prominent of which are Go-Ethereum (Geth) and Parity. |
Ethereum and Turing Completeness
What is Turing-complete System ?
Alan Turing further defined a system to be Turing complete if it can be used to simulate any Turing machine. Such a system is called a Universal Turing machine (UTM).
Ethereum’s ability to execute a stored program, in a state machine called the Ethereum Virtual Machine, while reading and writing data to memory makes it a Turing-complete system and therefore a UTM. Ethereum can compute any algorithm that can be computed by any Turing machine, given the limitations of finite memory.
=> Means that any program of any complexity can be executed on it leading to security and resource management problems.
=> Ethereum introduces Gas, a metric to measure cost of each operation on ethereum. This limits the usage and helps in solving lot of problems. 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 pro‐ gram can consume.
Dapp & Web3
DApp is a web application that is built on top of open, decentralized, peer-to-peer infrastructure services. A DApp is composed of at least:
• Smart contracts on a blockchain
• A web frontend user interface
In addition, many DApps include other decentralized components, such as:
• A decentralized (P2P) storage protocol and platform
• A decentralized (P2P) messaging protocol and platform
Web3 represents a new vision and focus for web applications: from centrally owned and managed applications to applications built on decentralized protocols.