Try   HackMD

Officially the EPF 4th cohort is underway and there are many interesting exchanges in the discord server. My original interest for a project was to do something related to Verkle trie migration. However, after I got more involved in conversations and reading comments in the channels inside the R&D discord server, there is just so much to do! I feel like everyone participating in the program is in a big toystore and you like all the toys but your budget is limited and you can only afford to buy one. Discipline is key.

I am narrowing my potential projects to two options: (1) SSZ and (2) Poseidon hash (EIP-5988).

Simple Serialize, or SSZ, is a serialization technique alternative to the classical RLP serialization. SSZ objects can also be stored in a Merkle tree. There are already many implementations of SSZ. One idea is to make an entire new implementation of SSZ in C or Haskell. Currently there are no implementations in those languages and would be nice to add those to the list. Another potencial project is to look into the issues in one of the current implementations and see what can be done.

Working on SSZ is very interesting and it seems that it can add some immediate value to the protocol. My attention, however, is completely drawn to the Poseidon hash. I won't go into technical details right now (I am planning to do so in future articles), but it suffices to say that Poseidon hash is a relatively new hash technique based on a sponge construction, where the inner permutation in the sponge is constructed following a Hades strategy. The idea behind EIP-5988 is to add a precompile of Poseidon to the protocol in order to accelerate potential uses of ZK-Rollups by L2 networks. Poseidon was designed to be efficient for ZK proof systems.

Right now I would say that I am inclining towards working on an implementation of the Poseidon hash, of which there are a few implementations already. EIP-5988 is in draft stage and it is missing some information in order to justify its adoption or its rejection. Besides an implementation, a gas cost analysis of Poseidon as a precompile can add value in order to make an informed decision. I have no idea on how to do a gas cost analysis, but luckily, there are already some works on the subject; see for example here, here and here. There is a really interesting discussion (here and here) on the costs of running Poseidon as a precompile.

References

  1. Simple Serialize [link].
  2. List of SSZ implementations [link].
  3. Abdelhamid Bakhta, Eli Ben Sasson, Avihu Levy, David Levit Gurevich, "EIP-5988: Add Poseidon hash function precompile [DRAFT]," Ethereum Improvement Proposals, no. 5988, November 2022. Online serial.
  4. Grassi, L., Khovratovich, D., Rechberger, C., Roy, A., & Schofnegger, M. (2021). Poseidon: A new hash function for Zero-Knowledge proof systems. In 30th USENIX Security Symposium (USENIX Security 21) (pp. 519-535). [link]
  5. Grassi, L., Lüftenegger, R., Rechberger, C., Rotaru, D., & Schofnegger, M. (2020). On a generalization of substitution-permutation networks: The HADES design strategy. In Advances in Cryptology–EUROCRYPT 2020: 39th Annual International Conference on the Theory and Applications of Cryptographic Techniques, Zagreb, Croatia, May 10–14, 2020, Proceedings, Part II 30 (pp. 674-704). Springer International Publishing. link.
  6. Bertoni, G., Daemen, J., Peeters, M. & Van A􏰈􏰈ssche, G. (2011). Cryptographic sponge functions. [link].
  7. Das, A., & Qadeer, S. (2020, November). Exact and linear-time gas-cost analysis. In International Static Analysis Symposium (pp. 333-356). Cham: Springer International Publishing. [link]
  8. Signer, C. (2018). Gas cost analysis for ethereum smart contracts (Master's thesis, ETH Zurich, Department of Computer Science). [link]
  9. Pérez, V., Klemen, M., López-García, P., Morales, J. F., & Hermenegildo, M. (2020). Cost analysis of smart contracts via parametric resource analysis. In Static Analysis: 27th International Symposium, SAS 2020, Virtual Event, November 18–20, 2020, Proceedings 27 (pp. 7-31). Springer International Publishing. [link]