import "hashes/sha256/512bit" as sha256import "hashes/mimc7/mimc7" as mimc
I'm able to use sha256 with no problems. However, I don't quite understand the syntax of how mimc is defined:
def main<ROUNDS>(field x_in, field k) -> field:
I try calling it like this in my file enc.zok:
return mimc(u[0]+v[0], 1) (these are two field variables)
I end up with the following error:
enc.zok:
Call site /Users/edo/.zokrates/stdlib/hashes/mimc7/mimc7.zok/main<_>(field, field) -> field incompatible with declaration enc.zok/mimc<ROUNDS>(field, field) -> field
How can I specify this "ROUNDS" variable? I have a large circuit - what should I set it to, and how do I do this in syntax?
In previous version of ZoKrates, I did not have to do this - my above code would compile and work correctly. What has changed?
In my code, I import as follows:
import "hashes/sha256/512bit" as sha256
import "hashes/mimc7/mimc7" as mimc
I'm able to use sha256 with no problems. However, I don't quite understand the syntax of how mimc is defined:
def main<ROUNDS>(field x_in, field k) -> field:
I try calling it like this in my file enc.zok:
return mimc(u[0]+v[0], 1)
(these are two field variables)I end up with the following error:
enc.zok: Call site
/Users/edo/.zokrates/stdlib/hashes/mimc7/mimc7.zok/main<_>(field, field) -> field
incompatible with declarationenc.zok/mimc<ROUNDS>(field, field) -> field
How can I specify this "ROUNDS" variable? I have a large circuit - what should I set it to, and how do I do this in syntax?
In previous version of ZoKrates, I did not have to do this - my above code would compile and work correctly. What has changed?