Conversation
|
can I review the zokrates vm? It might help me better understand this PR. |
|
yes of course: https://github.com/ioCarb/zokrates-sprout (the proof format is not 100% correct yet, but its a small fix) Here is an example workflow for the zokrates-cli https://zokrates.github.io/gettingstarted.html (because g16 is the default proving scheme its not explicitly set here but generally zokrates needs this information.) We are in a Matrix chatroom with Wangweixiaohao, Xinxin and Simone and are still deciding where to host the zokrates "vm", thats why I haven't tried merging it yet. |
|
Let me know what you think. |
|
I have also initially considered this but this way one would either have to manually compress and copy the proving key or the ioctl would need a zokrates specific option. And for the sake of the ioctl user experience and the dev experience of someone implementing other zkp methods, I found expanding the exp params the best solution. Maybe there is a way I'm not thinking of? |
If these keys are often several GB in size, there could be additional performance penalties on the network interface. |
|
That would be possible, however this still means that either the user would have to manually compress and upload the key for every circuit, which I would consider a hassle or there would need to be a specific option for zokrates in the ioctl. Also the compiled circuit can be a few GB in size as well and in the case of a g16 scheme, the setup is even larger than the proving key. |
|
Another theoretical option would be to perform the setup and possibly even compilation on the "vm" server which would result in only the |
|
I perpared a script in {
"defaultVersion": "0.1",
"versions": [
{
...
"codeExpParam": "{\"method\":\"g16\", \"proving_key\":\"compressed proving.key url\"}",
"code": "789cecbd3baf6c3db32e94f32b5674..."
}
]
}if the size of code is bigger, the project file like this {
"defaultVersion": "0.1",
"versions": [
{
...
"codeExpParam": "{\"method\":\"g16\", \"proving_key\":\"compressed proving.key url\"}",
"code": "ipfs://ipfs.xxx.iotex.io/QmY5Y2HD9WXYhhPg3CJbh2DS7mXwS2dUiyk3gRutLYQE6u"
}
]
} |
|
Ok that would work. |
And I think this message was a little misleading, I was referring to the uncompressed size. The compressed the sizes are:
It seems the compression rate for the circuits are a lot better |
I think the VM doesn't need to scan; it can be specified in the documentation to only accept either a URL or the actual value. |
this is to address the changes proposed in this pr: iotexproject/w3bstream#602