header-langage
简体中文
繁體中文
English
Scan to Download the APP
Partnered With:

Ip-4444: Limits the historical data of executive-level clients

Read this article in 5 Minutes
Ip-4444 proposes that clients pry data over a year old. The first thing we need to understand is how historical data is used today.
原文作者: lightclients
原文编译: ETH 中文站


Translator's Note: IP-4444 proposes to put the HISTORY_PRUNE_EPOCHS  Set to 82125 epochs (i.e., one year on the beacon chain), so that the executor client in PoS Ethereum no longer provides more than one year of block headers, block principals, and receipt data on the P2P network. The client can prune this historical data locally. Lightclients, one of the authors of the EIP, tweeted a brief introduction. This is a translation of the tweet.


The Ethereum client currently stores 275 GB of historical data that is not necessary to validate the blockchain. That number is growing at 140 GB per year. IP-4444 suggests that clients prune data older than 1 year. So why don't we just prune the data?


To understand why the data has not been pruned, and why this needs to be discussed, it is necessary to understand how historical data is being used today. There are two main categories of use: synchronous and user requests through JSON-RPC.


There are two main methods of synchronization:


· Full Sync: Download and execute every block from Genesis to the top of the blockchain.


· State Sync: There are a number of options, but the main one is to synchronize the block headers with proof-of-work checks and download the State of the latest block.


In both cases, clients request historical data through p2p networks to extend their view of the chain. Trust models typically trust creation and validate everything else -- either completely, or lightly through proof-of-work checks.


The proof of equity changes that. Since it is susceptible to remote attacks, we have to rely on Weak Subjectivity Checkpoint. This essentially means that we trust one block in the chain of authority as much as we trust the Genesis block in PoW.


Weak subjective checkpoints allow clients to skip the bootstrap step of requesting historical data over a P2P network. Of course, they will still need to synchronize history data after a checkpoint -- so checkpoints should always precede trimming boundaries.


That sounds like a security setback. Previously, we had a hash of July 13, 2015 to verify. Now, what we have is a moving checkpoint of weak subjectivity. But in fact, we rely on weak subjectivity all the time.


When was the last time you verified code differences between client versions? Most people don't have the technical background to do it. Therefore, every time you update your client, you rely on your client team to implement the Ethereum protocol strictly.


Fortunately, there are a lot of people looking at software like Go-Ethereum. All it takes is a whistleblower to expose malicious commits in the code. Again, all it takes is a whistleblower to point out that a client is pushing a malicious checkpoint with weak subjectivity.


In fact, it is much easier to verify that a client rolls out the right weakly subjective checkpoints than to ensure that the code executes the protocol correctly.


So, from a security point of view, there's really no regression. This also includes synchronization -- another major category of use for historical data is to service user requests.

Users can request two types of data:


· Current data, such as slot values, account balances, latest block heights, etc.


· Historical data, such as slot data in block N, block headers in block N, transaction receipts, etc.


Current data will continue to be accessible, and when IP-4444 is implemented, historical data will be accessible depending on how long ago it was.


The main users of historical data are Dapp developers. Many DApps add historical data to their databases and provide it to the user through their front end. It is important for them to be able to traverse all transactions and logs.


There are several ways to support this use case -- the most popular method now is client-side publishing multiplexers, where versions that support a range of blocks execute that range of blocks. For example, geTH version A might support blocks up to 10 MB in height, while GEth version B supports blocks up to 10 MB in height.


The multiplexer will execute blocks of 0 to 10m height with version A, output the state database and import it into GETH version B, and then continue to execute blocks of 10m height later. Json-rpc requests are directed to the client that responds with the appropriate information.


But if historical blocks are no longer available on P2P networks -- who provides the data? Expect many large, trusted institutions to provide mirror images of this data. Because the data is static, it is easy to agree on and verify its hash value. This is a 1-of-N trust model.


The new standard will be to store no historical data and run a client-side multiplexer. This means that the standard memory footprint of ethereum clients will be reduced by 275 GB -- but there is one final issue to mention.


Currently, Ethereum's JSON-RPC gives an empty response when the requested data does not exist. Assuming the client is not synchronizing, this will be accepted as "this data does not exist in the authority chain or the nearest fork."


Once the client starts prune the old data, this immutability is broken. When a user requests a receipt for a particular transaction, the client will not know whether the receipt was pruned or never existed. Currently, we expect RPC to return an empty response for both cases.


I would love to get feedback on this approach. What do jSON-RPC users think about this? How often do you access historical data over a year? Another (though heavier) approach is to keep an index of the trimmed data hash so that more content can be returned to the user.


275 GB of this data is at & NBSP; geth db inspect  In the output of the. Here's a screenshot:




The official IP-4444 specification (pronounced EIP four 4S, incidentally) can be found here:https://t.co/vlfYfcIGpN?amp=1


The 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