What is Ethereum?

Explaining in simplest way, reading mastering ethereum

JiJay
4 min readJul 29, 2021

Today, the price of ether which is a main cryptocurrency in ethereum rised 7%, which showed why so many people are passionate about cryptocurrency. Although many people care about cryptocurrency, there are few interest in blockchain which enables all the cryptocurrency we use.

In this article, I’m going to share what I’ve learned about ethereum, explaining it in simplest way, refering to mastering ethereum which is a great book. Hope this helps you guys who want to know about ethereum, not ether!

I really recommend book “Mastering Ethereum” who wants to know about ethereum.

What is Ethereum?

There are many definitions of ethereum.

From a computer science perspective, 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.

From a practical perspective, ethereum is an open source, globally decentralized computing infrastructure that executes programs called smart contracts.

Ethereum uses a blockchain to synchronize and store the system’s state changes, along with a crpytocurrency called ether to meter and constrain execution resource costs.

When we say ethereum use (public) blockchain, we say that because technology ethereum uses has components of blockchain.

  1. P2P network
  2. Messages
  3. set of consesus rules
  4. State machine
  5. chain of cryptographically secured blokcs
  6. consensus algorithm
  7. incentivization scheme
  8. open source software implementations(clients)

P2P(peer-to-peer) network is essential for decentralized protocol and therefore essential for block chain. It connects participants and propagates transactions and blocks of verified transactions.

Messages, in the form of transactions, represent state transitions.

Set of consesus rules governs what makes for a valid state transition.

State Machine processes transactions according to the consensus rules.

Chain of cryptographically secured blocks are serials of all the verified and accepted state transitions which makes almost impossible to forge history in blockchain. Attacker have to change all the blocks of a chain as there are all connected.

Incentivization scheme is needed to economically secure the state machine in an open enviornment. The transactions have to be mined and miners need some incentive, which is why cryptocurrency always go with blockchain.

Clients are open source software implementations of above.

As Ethereum is also a blochchain, it has those components as well.

Ethereum as state machine

You can think of blockchain as a history of state changes, which is related to state machine where transactions cause state transition. Therefore, you can think of ethereum as a distributed state machine as it is based on distributed network(P2P network).

Ethereum has memory that stores both code and data and it uses blockchain to track how this memory changes over time.

Like a computer, ethereum can load code into its state machine and run that code, storing resulting state changes in its blockchain. However, it is different from normal computer in that state changes are governed by the rules of consensus and the state is distributed globally.

It’s like creating a world-wide computer that as only one undeniable state globally, under consensus.

Ethereum programs run everywhere, yet produce a common state that is secured by the rules of consensus, creating a distributed single-state world computer.

Ethereum and Turing Completeness

Why is there a gas in ethereum?

As mentioned above, ethereum can execute a stored program or code in a state machine called Ethereum Virtual Machine(EVM) and read and write data to memory.

As Ethereum can compute any algorithm that can be computed by any Turing machine, ethereum is said to be turing complete.

Turing-complete means that we cannot predict the path of a program without running it, which enables infinite loop. This is a huge problem to ethereum, isn’t it? 🤨

In other words, ethereum can’t predict if a smart contract will terminate or how long it will run, without actually running it.

This is where the “gas” appears. As the EVM executes a smart contract, it carefully accounts for every instruction and each instruction has a predetermined cost in units of gas. When a transaction triggers the execution of a smart contract, it must include an amount of gas that sets the upper limit of what can be consumed running the smart contract, which is called gas limit. The EVM will terminate execution if the amount of gas consumed by computation exceeds the gas available in the transaction. Gas allows Turing-complete computation in ethereum while limiting the resources that any program can consume, preventing infinite loop.

Gas is a virtual currency and you can pay ether for gas as gas can be purchased for the transaction. Gas price which is an amount of ether for a unit of gas, is not fixed and depends on demand and supply. If there are lots of transactions, waiting to be mined, gas price gets expensive while if there are many miners or less transactions, gas prices gets cheaper. After gas is purchased for the transaction, the computation is executed and any unused gas is refunded back to the sender of the transaction.

Conclusion

So far, we’ve looked for the basic concepts of what ethereum is. I know it was not perfect explanation and there are many concepts that I skipped over. But don’t need to be hurry! We’ll go through those concepts and deep dive to concepts we learned in the following articles. I think and I hope blockchain is the future and studying one of the promising blockchain is essential for future as developers. So, cheer up! 👍 You’re doing great!

--

--