header-langage
简体中文
繁體中文
English
Tiếng Việt
Scan to Download the APP
Partnered With:

Can you reduce the burden on nodes by restarting Ethereum?

Read this article in 6 Minutes
A less radical, stateless ethereal path.

The originalIntroduction to | ReGenesis: restarting ethereum to reduce node load

Source: Ethereum enthusiast



Experience from Cosmos Hub


If you have observed how Cosmos Hub was upgraded from 1.0 to 2.0 and then to 3.0, you will know that the Cosmos Hub upgrade was essentially done by restarting the blockchain with a new creation block. To upgrade, the node operator would close the node, generate a snapshot of the Cosmos Hub state, and then package the snapshot into a new creation block, creating a new blockchain.

Now, anyone who wants to join CosmosHub needs to get the cosmoshub-3 creation block, download all the blocks of Cosmoshub-3 and replay them (no longer need to download the blocks of Cosmoshub-1 or Cosmoshub-2).

Can we "restart" ETH 1.0?

Let's see if we can apply the same approach to Ethereum. The Ethereum blockchain is huge (150-160 Gb) and large (40-100 Gb, depending on how you store the state). One obvious advantage of "rebooting" the Ethereum blockchain is that new nodes need to download 40Gb of creation status, rather than a 150-GB blockchain. However, downloading 40 Gb of creation is not a great experience either.

Store the state of the ethereum in the chain, where only the Merkel-gen hash is visible

Suppose we could store the 40 Gb "under the chain," packing only the root hash into the creation block, so that we could start from the empty state. But how do we make transactions access these implicit states?

Keep in mind that although these 40 Gb states are implicit, and how to obtain them is an implementation detail, you can run all 10 million blocks to calculate these states, either by downloading their snapshot through fast synchronization, Warp synchronization, or copying it from someone else's external disk for verification. Although the state is implicit, we assume that the block proposer (usually the pool) has access to this implicit data and is able to process all transactions. We just want to give up a hypothesis that all other authentication nodes can access the implicit state, to verify the blocks in the transaction is valid, and the head of the state of root hash in the block of the execution result (translator note: in the etheric fang in the current agreement, because all state is explicit, so this assumption is reasonable).

Isn't this a stateless ethereum?
If you know the Stateless Ethereum, you may realize that this is where we are currently striving - to keep the assumption that "the block proposer can access the implicit state", and to remove the assumption that "all verification nodes can access the implicit state". Our proposed solution is to have the block proposer add additional proof to the block. We call this proof "Block Witness."

Proof in a block vs. proof in a trade

Those of you who are new to this scenario would argue that the extra proof is actually provided by the transaction sender, part of the transaction payload, and we have to come out and say no, the proof is provided by the block proposer. However, as we later discovered, the transaction must also contain additional documentation. In other words, the transaction sender needs to prove that the sender address has enough ETH to pay for the gas fee and all other transactions with a low NONCE value initiated by this account. In addition, the transaction sender needs to prove the nONCE value of the sender's account, so that the node can figure out if there is a gap between the Nonce values and someone can send a series of non-viable transactions for a DDOS attack. More rigorous checks are possible, but ETH balances and the nonce value of the sender's account are necessary (and perhaps not sufficient) information for most DDOS attacks.

Shortcomings in the proof of the transaction


Suppose we want the transaction sender to add a proof of each relevant state to the transaction. The advantage is that it will simplify the work we need to witness the extra gas charges. The main drawback is that this is usually done through dynamic state access (DSA, as opposed to static state access (SSA)). If a transaction involves a particularly complex intelligent contract, for example, with a large number of nested calls to other contracts, it may be difficult to calculate in advance the state items that the transaction will involve. An attacker could even use DSA to "hook" a user, that is, to jump the gun on a transaction (sending the same content but charging more for Gas to be packaged up first) so that the user's transaction fails due to insufficient proof.

Mitigation from ReGenesis


Although DSA's hidden dangers are difficult to solve completely, it can reduce its risks as much as possible, so that users will not feel inconvenient, nor will they always be limited to the situation where the expected state transition cannot be realized. This mitigation requires the introduction of an additional rule that any proof provided with the transaction (which has been validated against the state root, but is not sufficient to guarantee the transaction's success) becomes part of the implicit state. Thus, as the user repeatedly tries to execute the transaction, the implicit state grows and eventually the transaction succeeds. Attackers who try to "tag" the user must find more sophisticated ways to redirect the user's state access outside of the existing implicit state and fail.

As the implicit state goes from zero (at the time of restart) to an increasing number of active access states, there will be less proof that a transaction needs to provide. After a while, most transactions don't even need to come with any proof, except for those that involve a long time ago.

We can execute ReGenesis on a regular basis


I call this a "reboot" of reGenesis, which can be executed on a regular basis to lighten the load on non-mining nodes. ReGenesis also represents a less radical, stateless version of Ethereum.

Repeating ReGenesis would simplify the architecture of the Ethereum client implementation, almost eliminating the need for more advanced snapshot synchronization algorithms. If we performed ReGenesis every 1 million blocks (about 6 months), we could expose status snapshots and blockchain files on BitTorrent, Swarm, and IPFS. We can't do this at the moment, because states change every 15 seconds instead of every 6 months. If the client implementation could replay blocks for six months, we wouldn't need a very complex snapshot algorithm. As a result, the ethereum implementation becomes less complex.

The disadvantage of ReGenesis

I haven't explored that much, but I've seen three weaknesses:

The user may need to access the full implicit state to create the transaction. In fact, I think it's a fair compromise.
The user may need to execute the transaction repeatedly until the expected state transition is finally achieved.
Some rollup technologies that leverage blockchain data for data availability may be affected.


Text link:https://mp.weixin.qq.com



Welcome to join the official BlockBeats community:

Telegram Subscription Group: https://t.me/theblockbeats

Telegram Discussion Group: https://t.me/BlockBeats_App

Official Twitter Account: https://twitter.com/BlockBeatsAsia

举报 Correction/Report
Choose Library
Add Library
Cancel
Finish
Add Library
Visible to myself only
Public
Save
Correction/Report
Submit