Han (weihan) - Update 6

Summary

In week 6, I was mostly writing the design specification document for the EPF project. Particularly, I came out with some ideas to modify the Verkle Tree such that the state expiry scheme works. I got some feedback from Ignacio and finalize my design on this component.

Design Specification

This document covers the design details of each project components such as verkle tree modification, witness format and EVM. I will be including pseudocode or diagrams so it helps to make the development phase as efficient as possible.

Verkle Tree Modification

The idea of my state expiry scheme is to expire off the values in leaf nodes (i.e. extension nodes). But I faced a bottleneck where the calculation of the commitments depend on the values. So there's no way to delete the values off and replace them with some placeholder data that allow the same commitment value to be regenerated.


Instead of expiring each individual value, another approach is to expire "batches" of values. In Verkle Tree, values are batched into 2. The first 128 values are batched together and the commitment C1 is calculated. The same goes to C2.


In this case, we could include a different set of vector values to record the metadata of the values. Precisely, we can introduce a vector of 256-length where each item is 64-bit value to record the epoch of each value. We would calculation the commitment of this vector (i.e. C3) and it will also be included in the calculation of the commitment of an extension node.

If a batch of values are expired, then we can delete them from the disk while only retain the commitment. If all 256 values are expired, then the entire extension node can be deleted while the commitment still remains.

The resurrection process is pretty straightforward. Upon accessing an expired value, retrieve the commitment attached and recover all expired values in the same batch (i.e. C1 or C2) from some data provider (i.e. archive node).

More details will be included in the design specs.

Special thanks to the mentor Ignacio for providing the feedback to this design.

Daily Updates

To ensure consistency, I post daily updates (on weekdays) on what I did for EPF. Check out my daily updates this week:

Monday
Tuesday
Wednesday
Thursday
Friday (skipped)

Next week's Action Items

  • Complete the design specification
Select a repo