Week 7, first zkVM example
The plan of this week was to start from the following example which proves the execution of a simple attestation using the ere framework. Then, the goal was to remove the dependencies on ere and proceed by directly proving the attestation on openVM. I didn’t manage to make it work but I got a lot of questions that I must answer:
-
How to setup, build and run a host-guest program in openVM?
There are two ways. One is to use CLI to build and run the guest program. Another one is to use SDK tooling to further control each step of the process. My goal is to use SDK tooling. The host program will do the compiling and proving. First it compiles guest code using RISC-V and then transpiles it to an executable for openVM. An example of SDK imports to the host code can be found here.
The instructions above provide basic functionality but complicated examples are missing.
- What is the proper Cargo.toml configuration of host, guest and root? Why guest should be defined as a workspace inside the project’s workspace?
-
What are the steps leading to a proof in chronological order?
My current understanding, following this example is:
- Compile guest code into ELF file
- Transpile ELF into, a format that is executable in the virtual machine, VmExe
- Provide input from host and run guest code
- Generate a proof
- Verify the proof
- How to effectively navigate Rust language docs and git repos such as the openVM repo?
I am still trying to understand all the details so that I finish proving a single attestation in openVM. I hope to be done by the end of week 8. I will post the project on my github with PRs if needed.