The analysis on Ethereum state size and the key values analysis have been generated. Meanwhile, the code for conversion is completed and the conversion progress has been running. It will take approximately 2 days to finish the conversion analysis (assuming there are no bugs in the process).
Check out my development branch for Verkle Tree here.
Check out my development branch for Geth here.
Check out my local Verkle testnet setup here.
There was a power outrage when I was running my node, and the database is corrupted, sigh 😔. I tried restarting the node, but got the following error messages:
This seems to be an ongoing issue on Geth (refer to this issue). Anyways, the node has synced up to block 14907811
(5th June 2022), which is 1M blocks less than expected.
Since the EPF day is around the corner, there isn't much time to debug and resync the node. Hence, I will just carry on with the analysis, though I would love to do it all over again after the EPF so that I can get the full analysis.
The main reason why I did a full sync from genesis is to check the last block number that each key-value pair was accessed. Here's the output of my analysis:
The analysis is shown using a block range of 1051200, which is about 6 months (given a block time of 15s). There are a total of 1.07B key-value pairs up until block 14907811
. The most important data point is that only about 19.75% of the total key-value pairs have been accessed in the past 1 year, which corresponds to about 211M key-value pairs. In other words, 80.25% of the total state storage have been redundant, and regular full nodes have been storing them for nothing, for free.
I got a preimage file from Guillaume, and thanks to that, I can do the conversion from MPT to VKT and analyze the total storage saved with my state expiry scheme. The analysis process looks something like this:
For step 1, once I have obtained the preimage file, I can execute the following geth command to import the preimages into my node's database:
For step 2, there is an existing command that can do a offline conversion to VKT by using the underlying snapshot. I've modified the inner workings to include state expiry logics and cater to my new VKT format. The command is as follows:
For step 3, there is an existing tool that allow users to inspect the database. Here's an example of the output:
The command is as follows: