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.
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.
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:
cfg := GetConfig()
var c1poly [NodeWidth]Fr
var c1 *Point
count, err := fillSuffixTreePoly(c1poly[:], values[:NodeWidth/2])
c1 = cfg.CommitToPoly(c1poly[:], NodeWidth-count)
var c2poly [NodeWidth]Fr
count, err = fillSuffixTreePoly(c2poly[:], values[NodeWidth/2:])
c2 := cfg.CommitToPoly(c2poly[:], NodeWidth-count)
// Root commitment preparation for calculation.
stem = stem[:StemSize] // enforce a 31-byte length
var poly [NodeWidth]Fr
poly[0].SetUint64(1)
if err := StemFromBytes(&poly[1], stem); err != nil {
return nil, err
}
banderwagon.BatchMapToScalarField([]*Fr{&poly[2], &poly[3]}, []*Point{c1, c2})
return &LeafNode{
// depth will be 0, but the commitment calculation
// does not need it, and so it won't be free.
values: values,
stem: stem,
commitment: cfg.CommitToPoly(poly[:], NodeWidth-4),
c1: c1,
c2: c2,
}, nil
}
The rest of the functions follow a similar pattern on creating and updating the node commitment.
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)
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