how to convert the Variable which is calculated by Keccak256Circuit to bn254's fp.Element to calculate bn254 msm #1177
Replies: 2 comments
-
Hi, I'm not able to run the example without the full circuit definition and witness assignment. It would be better to add full example which causes the error. But with seeing your current implementation, it seems that there is a mix of witness assignment and in-circuit computation. For reference, see the example for implementing scalar multiplication with assertion check as a doctest: https://pkg.go.dev/github.com/consensys/gnark@v0.10.0/std/algebra/emulated/sw_emulated#example-Curve. In the example Let us know if you are able to adapt the example for your use case or there are some further issues. |
Beta Was this translation helpful? Give feedback.
-
Now I have fixed my problem through above code. thanks |
Beta Was this translation helpful? Give feedback.
-
I encounter the error which is
define circuit: can't set fp.Element from type expr.Term
when compile my Circuit for this lines := emulated.ValueOf[emparams.BN254Fr](*scalarEle)
Beta Was this translation helpful? Give feedback.
All reactions