Rust Implementation of Cross-Chain Oracle Using an Off-Chain Aggregation Mechanism Based on zk-SNARKs
This is a Rust port of the zkOracle project, originally implemented in Go. zkOracle-Rust aims to provide the same functionality as the original project while leveraging the benefits of the Rust programming language.
Original Work: https://github.com/soberm/zkOracle Paper: https://arxiv.org/abs/2405.08395
zkOracle-Rust is a zero-knowledge oracle system implemented in Rust. It allows for the creation and verification of zero-knowledge proofs for oracle data, enabling privacy-preserving data feeds for blockchain applications.
This project is a work in progress, porting the original Go implementation to Rust.
Before you begin, ensure you have met the following requirements:
- Rust (latest stable version) - Install RustGolang (version 1.19)
- Hardhat (version >= 2.11.1)
- Solidity (^0.8.0)
To install zkOracle-Rust, follow these steps:
- Change into the following directory:
cd node/cmd/compiler
- Install all dependencies:
go mod download
- Adapt the parameters of the circuits in the respective src files
- Build the constraint system setup:
go build -o compiler
- Run the constraint system setup:
./compiler -b ./build
- Update the verifier contracts using the generated contracts
- Change into the contract directory:
cd contracts/
- Install all dependencies:
npm install
- Compile contracts:
hardhat compile
- Update the parameters in ./scripts/deploy.ts
- Deploy contracts:
hardhat run --network <your_network> ./scripts/deploy.ts
cargo run
Contributions to zkOracle-Rust are welcome. Please feel free to submit a Pull
This project is licensed under the MIT License.