Han (weihan) - Update 8
Summary
I had completed most of the required codes related to leaf node which includes the addition of new state epoch metadata and new Verkle proof format.
Development
I've finished most of the development related to state epoch metadata and leaf node modification. I'm almost done with modifying the Verkle proof component.
Check out my development branch here.
Code Notes
Navigating through the Verkle commitment seemed daunting at first, but it wasn't so bad when I got hands on. The following is the notes for the NewLeafNode
function in the tree.go file:
- Load Lagrange Precompile file
- For the first 128 values, build the polynomial for C1
- Create the commitment for C1
- For the last 128 values, build the polynomial for C2
- Create the commitment for C2
- Create the commitment of leaf node. First step is to get the stem (31 bytes). Then it sets the first position of polynomial to 1 (this is constant). Then, it sets the second position of the polynomial to the stem. Then, it sets the position of 2 and 3 to c1 and c2. This is consistent with the commitment formula C(1, Stem, C1, C2).
- Build LeafNode object and return it. It will create the commitment of the node using the polynomial constructed. At this point, poly[0:5] = [1, Stem, C1, C2]. But do take note that the polynomial has a length of 256, so the rest of the elements are zero (which I assume is to be ignored).
The rest of the functions follow a similar pattern on creating and updating the node commitment.
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 (skipped)
Wednesday
Thursday (skipped)
Friday (skipped)
Next week's Action Items
- Complete the Verkle proof component
- Complete unit testing for verkle tree modification
- Present project during EPF office hours