Ethereum cohort week 12

This week I worked on Verkle Tries for besu, and 2 PRs are merged:
https://github.com/Quadratic-Labs/VerkleTries_Besu/pull/38
https://github.com/Quadratic-Labs/VerkleTries_Besu/pull/39

So spent most of the week trying to understand serialization differences between pedersen hash used in trie-key generation and pedersen "commitment" used in the trie for commiting to children nodes (up to 256).

Ignacio generated some test cases for our implementation so we can compare and see if our implementation is correct:

-- Pedersen hashing: https://pastebin.com/0RrL3Ryc
The format is:
addr: bytes in hex
treeIndex: The big int number in decimal notation (base 10). It's a "string" because I can put such a big integer in a JSON.
treeKey: the result of the perdersen hash bytes

-- Vec comm: https://pastebin.com/dJyzwXnB
The format is:
frs: a slice of 256  integers (the Frs)
commitment: The resulting big int. [Remember that Pedersen Commitment gives you a point, then you have to do MapToScalar which gives you a Fr. This Fr is here as a big integer]

I have interacted on latest Verkle Implementers call (https://github.com/ethereum/pm/issues/866):

  • gave updates on besu <-> verkle integration
  • asked question about current hash functions proposed in the verkle EIP
  • raised awareness about lack of documentation for verkle tries, many people agreed with me on this and hopefully we will have better docs for future developers

Unfortunatelly I'm still behind on the project proposal (verkle tries in-circuit), but i hope i will have more conclusions and benchmarks by the end of the cohort. But here's an interesting benchmarks website: https://zkbench.dev/

I'll try to do the same for pedersen, keccak, and maybe sha256. Still thinking which zkDSL or tool to use - learning a lot about this and trying to understand differences.

Select a repo