Ethereum Scalability Challenge: State Data
Editor's Note: This article comes fromEthereum enthusiasts (ID: ethfans)Editor's Note: This article comes from
Ethereum enthusiasts (ID: ethfans)
Ethereum enthusiasts (ID: ethfans)
, author: Trustnodes, translation & proofreading: Min Min & A Jian, reprinted by Odaily with authorization.
Although the upper limit of available block Gas in Ethereum has been increased, the size of the block (data volume) has not changed much, because the number of transactions on Ethereum is not completely positively correlated with the volume of data.
As you can see from the figure above, there is obviously a certain relationship between the size of block data on Ethereum and the upper limit of block Gas. If it is a line chart, it will also show an upward trend. However, the relationship between the two is a bit complicated.
Gas in Ethereum is an abstract unit that measures how much computing resources are consumed to perform an operation.
Since contracts are Turing complete, you can include an infinite number of looping structures in your transactions. (To avoid falling into an infinite loop) Ethereum has set an upper limit for the Gas available for a single block, which is currently 12 million.
image description
-Ethereum transaction volume in June 2020-
Despite a 50% increase in the block gas limit, the transaction volume on Ethereum is still below its all-time high. This is because most of Gas is used for token transactions or smart contract transactions.
Performing a simple token transaction consumes 80,000 gas, while an ether transfer transaction consumes 20,000 gas. Executing a dapp transaction depends on the situation, but its gas consumption is usually higher than that of token transactions Highest).
In contrast, Bitcoin is much simpler, a basic transaction is only 250 bytes (where a transaction is just 250 bytes or that can be the base and then each transaction is 20 bytes, we do not understand the second half of the sentence—— translator).
There is no such protocol-level transaction compression on Ethereum because it uses an account system.
In order to facilitate account management, the Ethereum network will update the state every time a new block is added. Griffin Ichiba Hotchkiss of the Ethereum Foundation stated:
"The complete Ethereum 'state' refers to the current state of all accounts and balances, and the 'memory' of all smart contracts deployed and running in the EVM (Ethereum Virtual Machine). On the Ethereum blockchain, every Every block that is finalized has one and only one state that the entire network agrees on. Every time a new block is added to the chain, the state changes and updates.”
To give the simplest comparison: Bitcoin state refers to UTXO (unspent effective transaction output). Whether it is the state of Ethereum or the state of Bitcoin, it is a difficult concept to understand. In simple terms, it is the memory (ram) or snapshot of the network. Therefore, both account balances and the code functions contained in the contract are publicly visible.
To sync Ethereum from the genesis block, you need to traverse 400 million "nodes" , which takes about 1 week.
Every time a block is generated, more than 10,000 full nodes of the entire Ethereum network (computers that run the Ethereum client and save all Ethereum blockchain blocks) must be updated locally, updating about 3,000 state tree "nodes" .
This means that every 15 seconds your computer's memory has to sync a block, and the disk has to keep reading and writing changes to the Ethereum network in each block.
Therefore, the more changes there are, the busier the computer's memory and disk will be. After the resources reach the upper limit, the progress of the entire network cannot be synchronized.
The inability to stay in sync means not being unable to download history, but being unable to complete transaction processing at the same time as the entire network.
In addition, a paper last year pointed out that for programmers, it is not a simple problem to construct a mathematical model to accurately associate "execution cost (Gas) with the amount of resources used (such as CPU and memory)".
The paper also states: "We found some discrepancies in the econometric model, for example, significant inconsistencies in order pricing. We designed a genetic algorithm (genetic algorithm) that can generate contracts that are 200 times slower to process than ordinary contracts. .Afterwards, we demonstrated that all major ethereum client implementations are vulnerable, and if they run on consumer-grade hardware, they will not be able to keep up with the network in the event of an attack.”
Similarly, in the Bitcoin system, if an attacker generates a block that is difficult to verify, it may even cause your computer mining system to crash. However, if someone does this, it is likely to lose the 6.25 BTC block reward; if the mining pool does this, it is very likely to lose all miners.
But in the Ethereum system, what the attacker loses is only the cost of issuing the contract. According to the researcher's discovery, this loss is not directly proportional to the impact of the attack.
Of course, we can run nodes through the cloud service provider Infura. The vast majority of operations on the Ethereum network are performed by nodes on Infura.
According to Joseph Lubin, founder of Ethereum incubator ConsenSys, ConsenSys has recently partnered with AMD to create W3BCLOUD, which aims to create "the next generation of decentralized computing, storage and bandwidth."
However, the real solution right now is blockchain contract-level sharding.
image description
-Ethereum Scaling Plan (June 2020)-
The three expansion solutions on the right have independent network environments and blockchains, and have established communication with Ethereum. However, for now, these networks do not communicate with each other.
If history repeats itself, the first step may be to interconnect many independent world computers so that everyone can communicate with each other.
In the beginning, if you had a laptop, you could only access the data on that laptop. Later, with technological breakthroughs, different laptops were connected (initially via cables) and you could access data on your neighbor's laptop.
Since these computers can communicate with each other, we can allow everyone to access our data, but we don't need everyone to store our data unless they want to.
Only those responsible for sharing data need to store data. We just need to connect with other people's computers so we can see each other's data.
That is, we need to implement communication between OMG and ZK. The reason why we cannot establish communication between Bitcoin and Ethereum is because they are different protocols. But there are still projects trying to connect the two.
If we let these data clusters communicate with each other, then as long as they all run on the same protocol, there is no longer any limit to scalability.
This is something that takes a lot of time to achieve. If we look at it from this perspective, we will find that both Satoshi Nakamoto and Gregory Maxwell are right, because they consider it from different time levels.


