From 3d15ec3418c1eb1fde6fe42854759545693d9233 Mon Sep 17 00:00:00 2001 From: Ryan Soury Date: Sun, 24 Mar 2024 22:54:03 +1100 Subject: [PATCH] way better sync mechanism --- Cargo.toml | 4 ++-- README.md | 23 +++++++++++++++-------- bin/devsync.sh | 2 +- inputs/example-same.inp | 8 -------- inputs/example-same.json | 8 ++++++++ src/main.rs | 8 ++++---- 6 files changed, 30 insertions(+), 23 deletions(-) delete mode 100644 inputs/example-same.inp create mode 100644 inputs/example-same.json diff --git a/Cargo.toml b/Cargo.toml index 7ff2b3e..f9a3730 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "zkllvm-rust-template" -version = "0.1.0" +name = "zkoracle" +version = "0.0.1" edition = "2021" [dependencies] diff --git a/README.md b/README.md index c767d1b..9401ce3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# zkLLVM Rust template +# zkOracle + +*Fork of zkLLVM Rust template* [![Tutorial check](https://github.com/NilFoundation/zkllvm-rust-template/actions/workflows/main.yml/badge.svg)](https://github.com/NilFoundation/zkllvm-rust-template/actions/workflows/main.yml) @@ -21,13 +23,18 @@ On most of the modern Linux-based platforms you will already have these installe ### Table of contents -- [Introduction](#introduction) -- [Getting started](#getting-started) -- [Building code](#building-rust-code) -- [Generating circuit](#generating-circuit) -- [Generating proof locally](#generating-proof-locally) -- [Uploading circuit statement to Proof Market](#uploading-circuit-statement-to-proof-market) -- [Verifying proof on EVM](#verifying-proof-on-evm) +- [zkOracle](#zkoracle) + - [Prerequisites](#prerequisites) + - [Table of contents](#table-of-contents) + - [Introduction](#introduction) + - [Getting started](#getting-started) + - [Install zkLLVM toolchain](#install-zkllvm-toolchain) + - [Clone repository](#clone-repository) + - [Building Rust code](#building-rust-code) + - [Generating circuit](#generating-circuit) + - [Generating proof locally](#generating-proof-locally) + - [Uploading circuit statement to Proof Market](#uploading-circuit-statement-to-proof-market) + - [Verifying proof on EVM](#verifying-proof-on-evm) ## Introduction diff --git a/bin/devsync.sh b/bin/devsync.sh index 471a478..a3f31c8 100755 --- a/bin/devsync.sh +++ b/bin/devsync.sh @@ -5,4 +5,4 @@ shift echo "Synchronising local repository to remote server at $OPERATION..."; -rsync -azP -e ssh ./ $OPERATION:~/zkoracle/ +rsync -vhra -e ssh ./ $OPERATION:~/zkoracle/ --include='**.gitignore' --exclude='/.git' --filter=':- .gitignore' --delete-after diff --git a/inputs/example-same.inp b/inputs/example-same.inp deleted file mode 100644 index 5887d1a..0000000 --- a/inputs/example-same.inp +++ /dev/null @@ -1,8 +0,0 @@ -[ - { - "field": 5 - }, - { - "field": 5 - } -] \ No newline at end of file diff --git a/inputs/example-same.json b/inputs/example-same.json new file mode 100644 index 0000000..4b9972b --- /dev/null +++ b/inputs/example-same.json @@ -0,0 +1,8 @@ +[ + { + "int": 5 + }, + { + "int": 5 + } +] \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 04009a4..da4a510 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,16 +2,16 @@ #![feature(const_trait_impl)] #![feature(effects)] -use ark_ff::Field; -use ark_pallas::Fq; +// use ark_ff::Field; +// use ark_pallas::Fq; // fn pow(a: Fq, n: u32) -> Fq { // (0..n).fold(Fq::ONE, |acc, _| acc * a) // } #[circuit] -pub fn main(a: Fq, b: Fq) { - assert_eq!(a, b) +pub fn main(a: i32, b: i32) -> bool { + return a == b } // pub fn field_arithmetic_example(a: Fq, b: Fq) -> Fq {