Open GrapeBaBa opened 4 days ago
What are some of the issues found? I guess it has to do with the issues you've opened.
@fearlessfe Can you post all the issues and alternative solutions here to discuss
@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)
int
, bool
, array
, struct with fixed length
should serialize directly, the same with deserialize
methodmerkleize
method, you can see in this prhashTreeRoot
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.
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.