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

Faced with the surge in the state of the Ethereum network, V God proposed these solutions

Read this article in 5 Minutes
The state size of Ethereum is growing rapidly.

Original title: " A state expiry and statelessness roadmap "
Original author: Vitalik Buterin
Original compilation: Kyle, Babbitt


The state scale of Ethereum is increasing Rapid growth. The state-only size is currently about 35 GB, and if you include all Merkle proofs, it's over 100 GB, and roughly halving every year. State storage is also a weakness of Ethereum economics: it is the only mechanism whereby a participant pays once and becomes a permanent burden on the node. In order to keep Ethereum scalable and sustainable, we need some solutions.


There are two avenues for solutions, and they've been around for a long time: weak statelessness and state expiration: 


• State Expiration: Removes states from the state that have not been visited recently (for example: the last visit was last year), and require witnesses ) to restore the expired state. This reduces the state that each needs to store to about 20-50 GB.  

• Weakly stateless: Only block proposers are required to store state, and all other nodes are allowed to statelessly validate blocks. Achieving this in practice requires switching to Verkle trees to reduce the size of witnesses.


This document describes a multi-stage proposal to implement both ideas simultaneously. This turned out to be much easier than doing the two solutions one after the other. State expiration without Verkle trees requires very large witness sizes to attest to old states, and switching to Verkle trees without state expiration requires an in-place transition procedure (e.g. EIP 2584‌), which is almost as complicated as just implementing state expiration. However, if done concurrently, these two reforms address the challenges facing each other: state expiration involves the creation of a new state tree each year, allowing Verkle trees to be introduced incrementally over time without in-place transformations, while Verkle trees solve The question of the size of the witnesses was addressed.


Related Links: State Expiration and History of Stateless Thought 


• The stateless client concept, original ethresear.ch post (2017): https://ethresear.ch/t/the-stateless-client-concept/172‌ (see also EthHub)

• State rent (predecessor to state expiration), original proposal in 2015: https: //github.com/ethereum/EIPs/issues/35‌

• ReGenesis (Alexey Akhunov's proposal, which can be said to be a form of state expiration + history expiration): https://medium.com/@mandrigin/regenesis-explained-97540f457807‌

• Verkle tree: https://notes.ethereum.org/_N1mutVERDKtqGIEYc-Flw‌

• Demo on Boundary Witness size (Youtube): https://www.youtube .com/watch?v=qQpvkxKso2E‌

• State Size Management Theory (February 2021): https://hackmd.io/@ vbuterin/state_size_management‌

• Resurrection Conflict Minimized State Bounding: https://ethresear.ch/t/resurrection-conflict-minimized-state-bounding-take-2/8739‌

• Some paths for statelessness and state expiration: https://hackmd.io /@vbuterin/state_expiry_paths


Recap: How does state expiration work?


This is a description of the mechanism proposed here and what is proposed in this document. The core idea is that each epoch will have a state tree (eg: 1 epoch ~= 1 year), and when a new epoch starts, an empty state tree is initialized for that epoch, and any state updates go into that tree. All writes that happen over a period of time go into the newest tree (so the new and old trees may store the same information or even conflict with each other; the new tree always takes precedence).




Note that these roughly one-year state expiration times are sometimes called "epochs" historically, But I'm switching to the term "period" to avoid confusion with beacon chain periods.


Maintain two key principles:

• Only the most recent tree (i.e. the tree corresponding to the current cycle) can be modified. All old trees are no longer modifiable; objects in the old tree can only be modified by creating copies of them in the new tree, and these copies supersede the old ones.  

• Full nodes (including block proposers) are expected to only hold the latest two trees, so only objects in the latest two trees can be read without witnesses. Reading older trees requires a witness.


A "witness" is a short proof that a value or set of values exists somewhere in a tree that can be identified by only the root people to verify. For example, a witness can be made that proves that storage slot 123 of account 0x124f...89ab contains the value 50 in some state, and this proof can be verified by anyone who has the root of the state tree.


State expiration establishes a hybrid state mechanism: consensus nodes need to store recently accessed or modified state, but can use a stateless client-side approach based on witnesses to verify the older state. That is, it is possible to maintain an "archive node", which can even store a historical state tree, or a completely stateless node, which uses witnesses to verify even the most recent state. However, the gas cost structure and default network format are built around the assumption that nodes store the most recent two state trees.


Roadmap


This transformation roadmap is implemented in stages. These stages include:


• Cycle 1 Hard Fork: We are implementing a hard fork starting with cycle 1 (everything before that was cycle 0). After this fork, there will be two state trees: a hex Patricia tree (frozen and no longer editable) and a new Verkle tree (containing all new edits/additions to the state, as well as old copy of state)

Original EIP: https://notes.ethereum.org/@vbuterin/verkle_tree_eip


• Address cycle extension: Addresses are extended from 20 bytes to 32 bytes, and the new address format includes the concept of an "address cycle" (formerly called an "address space"). This allows new contracts to fill new storage slots without needing to provide witnesses. This can be done anytime before the final state due transition, before or after the cycle 1 hard fork.


VB proposal: https://ethereum-magicians.org/t/increasing-address-size-from-20-to-32-bytes/5485


Ipsilon Team Proposal: https://notes.ethereum.org/@ipsilon/address-space-extension-exploration


• Cycle 2 Hard Fork: We implemented a hard fork to begin Cycle 2 and scheduled the start of future phases. The cycle 0 hex Patricia tree is replaced with a Verkle tree, and clients only store the root, so state in the cycle 0 tree now requires witnesses to attest. After that, the status expiration plan has been fully implemented.


Original EIP: https://notes.ethereum.org/@vbuterin/state_expiry_eip


Original link


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