ZKRendezvous

ZKRendezvous

RiscZero: First ever? ZK RayTracer circuit attempt on RiscZero. *********** Aleo: FileAuth, prove and verify aspects of the file that user uploads in the WebUI.

The problem ZKRendezvous solves

For RISCZero:
ZKVM track
Ambitious is an understatement when someone says they are writing zk circuit for a Raytracer (IYKYK). I tried and only partially succeeded. You may ask why build a raytracer zk circuit, 3D rendering has become so incredible in the last decade that you cannot tell the difference between 3D rendered image and real photo from camera. This is where the 3D artists who spend blood and sweat in creating photorealistic renders prove that they actually computed each and every pixel (in this with case raytracing), attach it as metadata.
Another use case of this (not implemented) could be in physics simulations in computer graphics, to prove that the physical properties of the scenes actually match the actual real world physics properties. i.e that game actually computes the gravity as -9.8 m2/s and not something more or less.


For ALEO:
Authentication Track
This is a simple web application that can we used to verify that certain properties of the file hold true, of the file that user uploads in their browser, before we take any action on that file. The user will upload the file in browser and the and hit execute the ALEO program, in the backend leo program checks for some properties of that file, for example if the file has been modified (in this case in last 24hrs) or that file has been tampered and size has changed. (in this case from its original 45kb file size).
If all the checks are passed then the proof is generated. I imagine if this kind of authentication can be useful in many cases can be handy in peer-peer games where the players need to trust files shared amongst the players are not modified or tampered in other ways. Offcourse this is a very basic POC and can be extented many fold further.

Challenges I ran into

RISCZero:
Ouch! i almost broke my computer (disk full) trying to *accidently generate a proof of 1920 1080 raytraced image. Not only Rust panicked, i panicked too :) Computer froze and I could not locate where VM is storing the cache and free the memory, restarting the computer helped. I could run the program at 2424 pixels image size.
Secondly i had to import the Rust std library to import for which the support is experimental in RISCZero, i think its the vector class which is not supported because it required dynamic memory allocation.


Aleo:
I had some issues with the deployment, since the online faucet for test aleo wasn't working for me.
Also lack of support of Strings in leo language made it difficult to check certain properties of the file, for example i would have liked to compare the signining key of the file in the leo program, but the key (20 bytes) is bigger than what a u256 (8 bytes) can store.

Technologies used

Discussion