English
 找回密码
 立即注册

Analysis of Ethereum architecture

Vitalik 2025-9-23 17:21 79775人围观 ETH

The content of this article comes from the HiBlock blockchain community "Doing things together" author: recinajh To understand and join "Making things together", please see the detailed introduction at the end of the article ~ Architecture 1 The top-level



The content of this article comes from the friends of the HiBlock blockchain community who "do things together"

Author: rectinajh

To understand and join "Let's Make Things Together", please see the detailed introduction at the end of the article~






Architecture

1
Top-level architecture design

Blockchain can be simply divided into three layers, protocol layer, extension layer and application layer. Among them, the protocol layer can be divided into the storage layer and the network layer, which are independent of each other but inseparable.

The top layer of Ethereum is DApp, which is the display layer of the entire blockchain. It is exchanged through Web3.js and the smart contract layer. For example, Ethereum uses truffle and web3-js. The application layer of the blockchain can be the mobile terminal, the web terminal, or integrated into the existing server, using the current business server as the application layer.

All smart contracts run on the EVM (Ethereum Virtual Machine) and use RPC (Remote Procedure Call Protocol. Remote procedure call intuitively means the process method of A calling B through the network).

Under EVM and RPC are the four core contents of Ethereum, including: blockChain, consensus algorithm, mining and network layer. Except for DApp, all other parts are in the Ethereum client. The most popular Ethereum client currently is Geth (Go-Ethereum).



blockchain

2
From the perspective of data structure

The protocol layer is the lowest technology. This level is usually a complete blockchain product, similar to the operating system of our computer. It maintains network nodes and only provides APIs for calling. There are four aspects: network programming, distributed algorithm, encrypted signature, and data storage technology. Distributed algorithm basically belongs to the implementation of business logic and can be done in any language. Encrypted signature technology is direct and simple to use, and database technology is also mainly used at the usage level.

Storage layer: a block (Block) + linked list and blockchain data structure. The database used in Ethereum is levelDB.

Network layer: p2p network. The implementation and concurrency processing of P2P network are the difficulties of development. Therefore, for those languages ​​with strong network programming ability and simple concurrency processing, Nodejs develops blockchain applications and gradually becomes more popular. Go language has become very popular.

Consensus layer: This is the incentive layer, which uses the mining mechanism to formulate the way to obtain currency in the blockchain. For example, Bitcoin uses POW (Proof of Work): the better the performance of the computer, the easier it is to obtain monetary rewards. There is also POS (Proof of Stake): similar to the concept of crowdfunding dividends, interest will be paid to holders based on the amount and time of currency you hold.

Extension layer: Similar to a computer driver, this part of Ethereum includes EVM (Ethereum Virtual Machine) and smart contracts. It is to make blockchain products more practical, such as the concept of "smart contracts" in Ethereum, which is a typical extension-level application development.

Contract layer: In the past, blockchain did not have this layer. Therefore, the initial blockchain can only conduct transactions and cannot be used in other fields or perform other logical processing. However, the emergence of the contract layer and "smart contracts" are "programmable contracts", or "contract intelligence", where "intelligence" refers to intelligence in execution, which means that when a certain condition is met, the automatic execution of the contract makes the use of blockchain in other fields a reality.

Application layer: similar to various software programs in computers, the display layer of the blockchain. DAPP products are actually applications at this level. Smart contracts are published to the blockchain. People access the block through the address and then interact with the smart contract. Ethereum uses truffle and web3-js. The application layer of the blockchain can be the mobile terminal, the web terminal, or integrated into the existing server, using the current business server as the application layer. The DAPP developed based on this actually encapsulates a layer of web applications based on smart contracts. It is at this level that tokens are issued and interact with smart contracts through the web applications provided by DAPP.



HiBlock blockchain community invites you to do things together~

1. Read the code together
Community website: http://hiblock.net/topics/node21
Read the code together, such as starting with the Ethereum source code

2. Write notes together
Community website: http://hiblock.net/topics/node22
You can't reach a thousand miles without taking small steps. I write about 500 words every day about my understanding of the blockchain, or express my own opinions on a certain issue. The HiBlock official account will sort and publish it for the public.

3. Translate documents together
Community website: http://hiblock.net/topics/node23
There are too many English documents and information that are very valuable. Let’s be the porters of knowledge together.

Current work of the translation team: Solidity official documentation, refer to Github repository, smart contract-Solidity official documentation (1)

4. Study the course together
Community website: http://hiblock.net/topics/node24
Share professional and technical knowledge with more people. It can be sharing a lesson, or polishing a series of lessons.

If you want to sign up for any of the above activities, please add the WeChat assistant (baobaotalk_com), and then directly reply with your name + number [multiple selections possible, such as Bob 1/2/3]



Click "Read the original text" to enter the GitHub page of HiBlock "making things happen"~
精彩评论0
我有话说......
TA还没有介绍自己。