Blockchain Paradigm -
Detailed explanation o of the Ethereum Yellow Paper （part 1）
From today, I will post 4 articles to share and explain the content of the Ethereum Yellow Paper.
Welcome to follow and discuss with us
0x01 what is a state machine
Ethereum is positioned as the world computer, hoping to create a new kind of decentralized computer that anyone can be a part of and use.
Ethereum can be thought of as a transaction-based state machine: we start from a genesis state and step through transactions to bring it to the current state.
Let’s first explain what a “state” is.
For example, in real life, a light switch has two states: Open and Closed.
What we usually call a state machine is a finite state machine, that is, the number of states of the things being described is limited. Let’s not be confused by concepts. In fact, as practitioners in the Internet industry, whether you are a development, testing, or product manager, we will encounter state machine scenarios in the development process.
State Machine, not an actual machine, but a mathematical model. bluntly speaking, it generally refers to a state transition diagram.
- State, a state machine must contain at least two states.
- Event. event is a trigger or a password to perform an action. “Users excute an order” is an event.
- Action. Actions to be performed after an event occurs. For example, the event is “user placed an order”, and the action is “ordered”. When programming, an Action generally corresponds to a function.
- Transform. That is, changing from one state to another. For example “made complete” is a transformation.
0x02 Blockchain State Machine Paradigm
This equation means that an input affects the current state (process) and, therefore, we get the new state (store/output).Another way to understand it is as a state transition machine.
In Ethereum, transactions are organized in blocks linked together to form a blockchain. The process of adding new blocks to the blockchain is called mining. The mining process requires a lot of computing power and electricity. So we need a mechanism to incentivize people to get involved. Every time a node creates a new block, they get a certain reward.
We all know that we don’t handle transactions individually to update state. Therefore, the equation representing the normal form can be rewritten as:
This equation means that by applying the transactions in the block to the current state, the state will be updated, resulting in a new state.
In a nutshell, Equation 4 illustrates how blockchains work. A node mines a block, the transactions on that block are applied (in order) to the state, and it modifies it. Additionally, nodes that mine blocks will be rewarded.
Speaking of rewards, Ethereum has its currency (Ether), which is the reward that nodes get from mining blocks. This currency can be divided into smaller parts, see below pic:
Stay tuned with the following parts!