Provable VM is an open-source Rust-based virtual machine designed to run a set of instructions while providing cryptographic zero-knowledge proof (ZKP) capabilities. This project leverages advanced ZK-proof libraries like ark-groth16 and Bls12-381 to ensure the integrity and privacy of computational execution. The VM integrates a constraint system that enforces state correctness, making it ideal for secure and verifiable computational tasks.
- Fully functional virtual machine (VM) with a stack-based instruction set.
- Integrated zero-knowledge proof system using arkworks.
- Ability to verify program execution using Groth16 proofs.
- Cryptographic trace commitment for program execution.
- Modularized codebase for ease of understanding and contribution.
- Comprehensive error handling for robust performance.
Prerequisites:
- Rust toolchain installed (https://www.rust-lang.org/tools/install).
- Basic understanding of Rust programming.
- Familiarity with zero-knowledge proofs is helpful but not required.
- Clone the repository:
git clone https://github.com/luishsr/provable-vm.git
- Navigate to the project directory:
cd provable-vm
- Build the project:
cargo build
- Run tests:
cargo test
Usage: To run a program using Provable VM:
-
Create a program file (e.g.,
program.prov
) with instructions: -
Execute the program:
cargo run -- program.prov
-
Generate proofs: Use the integrated proof-generation features to create and verify proofs for program execution.
- src/
- #main.rs: Entry point of the application.
- vm.rs: Core virtual machine logic.
- zk_proof.rs: ZK proof generation and verification logic.
- program_loader.rs: Utilities to load and parse program files.
- utils.rs: Shared utilities for the project.
- examples/: Example program files for the VM.
- README.md: Documentation for the project.
Contributions are welcome! Please follow the steps below:
- Fork the repository on GitHub.
- Create a new feature branch:
git checkout -b feature-branch-name
- Commit your changes:
git commit -m "Description of changes"
- Push the branch:
git push origin feature-branch-name
- Submit a pull request.
This project was created and maintained by Luis Soares. Contributions are welcome!
This project is licensed under the MIT License. See the LICENSE file for details.
Provable VM utilizes the arkworks framework for cryptographic functionalities and the Rust language for high performance. Special thanks to the open-source community for their contributions to cryptographic research and libraries.
The implementation was inspired by the TinyRAM
For questions or support, reach out to the repository maintainers via GitHub issues.