This project contains the source code for the paper "Cross-Blockchain Communication Using Oracles With an Off-Chain Aggregation Mechanism Based on zk-SNARKs." We provide a prototypical implementation of the smart contracts and the Oracle node.
You need to have the following software installed:
- 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
- Change into the operator directory:
cd node/cmd/zkOracle
- Install all dependencies:
go mod download
- Build the node:
go build -o node
- Run the node:
./node -c ./configs/config.json
For the evaluation of the prototype, we also provide a simulated version that allows measuring the gas consumption, proving time and memory usage in node/cmd/simulator
This is a research prototype. We welcome anyone to contribute. File a bug report or submit feature requests through the issue tracker. If you want to contribute, feel free to submit a pull request.
The financial support by the Austrian Federal Ministry for Digital and Economic Affairs, the National Foundation for Research, Technology and Development as well as the Christian Doppler Research Association is gratefully acknowledged.
This project is licensed under the MIT License.