You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a zig ssz lib here developed by the member of Verkle/ZEAM team, but we found some issues when used it in consensus spec types. We can enhance this lib and further do optimization to make it available for both beacon and beam chain.
There is a talk at Devcon 7 which introduced high perf ssz lib implementation here which can be inspired.
@eightfilms Our code is not exact the same with the ssz lib , because we use the latest version of zig, the std.builtin.Type has changed.
In fact our encode and decode methods are from the zabi, the origin code of zabi is also from the ssz lib , but with some updates; the hashRootTree method are from the ssz lib .
In our ssz spec tests, we find some bugs(according to the current ssz lib)
when serialize struct, int, bool, array, struct with fixed length should serialize directly, the same with deserialize method
there is bug in merkleize method, you can see in this pr
in hashTreeRoot method, when the type is Slice, we must pass the limit, after that, it should call the mixInLength method. Now, we doesn't find a solution to pass the limit of Slice type.
Activity
spiral-ladder commentedon Nov 19, 2024
What are some of the issues found? I guess it has to do with the issues you've opened.
GrapeBaBa commentedon Nov 19, 2024
@fearlessfe Can you post all the issues and alternative solutions here to discuss
fearlessfe commentedon Nov 19, 2024
@eightfilms Our code is not exact the same with the ssz lib , because we use the latest version of zig, the
std.builtin.Typehas changed.In fact our encode and decode methods are from the zabi, the origin code of
zabiis also from the ssz lib , but with some updates; thehashRootTreemethod are from the ssz lib .In our ssz spec tests, we find some bugs(according to the current ssz lib)
int,bool,array,struct with fixed lengthshould serialize directly, the same withdeserializemethodmerkleizemethod, you can see in this prhashTreeRootmethod, when the type isSlice, we must pass thelimit, after that, it should call themixInLengthmethod. Now, we doesn't find a solution to pass the limit ofSlicetype.