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.
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.
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.
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)
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing