OCamlPro / ocaml-solidity

Ocaml-solidity provides a Solidity parser and typechecker
https://ocamlpro.github.io/ocaml-solidity
Other
30 stars 10 forks source link

Remove blake2 dependency #35

Closed hra687261 closed 2 years ago

Stevendeo commented 2 years ago

Though it compiles, ezHash seems to heavily depend on blake2 through external functions... The best would be to remove ezHash completely.

hra687261 commented 2 years ago

Not sure about that, I don't think it even uses the blake2 opam package (which contains simple bidings to c code), it seems like it uses the c code directly, through the bindings: https://github.com/OCamlPro/ocaml-solidity/blob/f7265bd39436c4e154a8b9559e42514399a17c32/src/ez_hash/ezHash.ml#L30-L34 to the file: https://github.com/OCamlPro/ocaml-solidity/blob/f7265bd39436c4e154a8b9559e42514399a17c32/src/ez_hash/blake2b-stubs.c which uses the c files of blake2. I thought about using hacl-star, but it seemed like an overkill solution since the hacl-star library is big and takes a long time to compile. But I agree that ez_hash should be separated from ocaml-solidity into its own library.

Stevendeo commented 2 years ago

Okay I see, let's go for this version then.