fix conflicts
This commit is contained in:
commit
63f49278da
11 changed files with 105 additions and 28345 deletions
135
Cargo.lock
generated
135
Cargo.lock
generated
|
@ -11,7 +11,7 @@ name = "ansi_term"
|
|||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -23,7 +23,7 @@ dependencies = [
|
|||
"difference 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"environment 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"skeptic 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -32,9 +32,9 @@ name = "atty"
|
|||
version = "0.2.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -42,21 +42,20 @@ name = "backtrace"
|
|||
version = "0.3.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"backtrace-sys 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"backtrace-sys 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-demangle 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "backtrace-sys"
|
||||
version = "0.1.22"
|
||||
version = "0.1.23"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cc 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -66,7 +65,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
dependencies = [
|
||||
"byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -91,19 +90,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "cargo_metadata"
|
||||
version = "0.5.4"
|
||||
version = "0.5.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.15"
|
||||
version = "1.0.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
@ -130,7 +129,7 @@ name = "cmake"
|
|||
version = "0.1.31"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cc 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -205,12 +204,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.0.0"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.41"
|
||||
version = "0.2.42"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
@ -218,7 +217,7 @@ name = "memchr"
|
|||
version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -295,14 +294,9 @@ name = "num-traits"
|
|||
version = "0.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "pkg-config"
|
||||
version = "0.3.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "0.4.3"
|
||||
version = "0.4.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -318,10 +312,10 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "0.6.2"
|
||||
version = "0.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -330,13 +324,13 @@ version = "0.4.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.1.38"
|
||||
version = "0.1.40"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
@ -344,7 +338,7 @@ name = "redox_termios"
|
|||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"redox_syscall 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -372,7 +366,7 @@ name = "remove_dir_all"
|
|||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -390,7 +384,7 @@ name = "same-file"
|
|||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -399,7 +393,7 @@ version = "0.9.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -409,27 +403,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.62"
|
||||
version = "1.0.66"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.62"
|
||||
version = "1.0.66"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.18"
|
||||
version = "1.0.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -438,11 +432,11 @@ version = "0.13.3"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bytecount 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cargo_metadata 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cargo_metadata 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -454,11 +448,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "0.14.0"
|
||||
version = "0.14.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -476,8 +470,8 @@ name = "termion"
|
|||
version = "1.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -494,7 +488,7 @@ name = "thread_local"
|
|||
version = "0.3.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -542,12 +536,12 @@ version = "2.1.4"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.3.4"
|
||||
version = "0.3.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -575,12 +569,12 @@ dependencies = [
|
|||
"gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[metadata]
|
||||
|
@ -589,14 +583,14 @@ dependencies = [
|
|||
"checksum assert_cli 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "72342c21057a3cb5f7c2d849bf7999a83795434dd36d74fa8c24680581bd1930"
|
||||
"checksum atty 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2fc4a1aa4c24c0718a250f0681885c1af91419d242f29eb8f2ab28502d80dbd1"
|
||||
"checksum backtrace 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dbdd17cd962b570302f5297aea8648d5923e22e555c2ed2d8b2e34eca646bf6d"
|
||||
"checksum backtrace-sys 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5fd343a2466c4603f76f38de264bc0526cffc7fa38ba52fb9f13237eccc1ced2"
|
||||
"checksum backtrace-sys 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)" = "bff67d0c06556c0b8e6b5f090f0eac52d950d9dfd1d35ba04e4ca3543eaf6a7e"
|
||||
"checksum bincode 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e103c8b299b28a9c6990458b7013dc4a8356a9b854c51b9883241f5866fac36e"
|
||||
"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"
|
||||
"checksum bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c54bb8f454c567f21197eefcdbf5679d0bd99f2ddbe52e84c77061952e6789"
|
||||
"checksum bytecount 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "882585cd7ec84e902472df34a5e01891202db3bf62614e1f0afe459c1afcf744"
|
||||
"checksum byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "74c0b906e9446b0a2e4f760cdb3fa4b2c48cdc6db8766a845c54b6ff063fd2e9"
|
||||
"checksum cargo_metadata 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6ebd6272a2ca4fd39dbabbd6611eb03df45c2259b3b80b39a9ff8fbdcf42a4b3"
|
||||
"checksum cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "0ebb87d1116151416c0cf66a0e3fb6430cccd120fd6300794b4dfaa050ac40ba"
|
||||
"checksum cargo_metadata 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "682476b87b3e22cd3820d86b26cd8603cd84ab76dce7547b2631858347aa8967"
|
||||
"checksum cc 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)" = "49ec142f5768efb5b7622aebc3fdbdbb8950a4b9ba996393cb76ef7466e8747d"
|
||||
"checksum cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "405216fd8fe65f718daa7102ea808a946b6ce40c742998fbfd3463645552de18"
|
||||
"checksum clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f0f16b89cbb9ee36d87483dc939fe9f1e13c05898d56d7b230a0d4dff033a536"
|
||||
"checksum cmake 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "95470235c31c726d72bf2e1f421adc1e65b9d561bf5529612cbe1a72da1467b3"
|
||||
|
@ -612,8 +606,8 @@ dependencies = [
|
|||
"checksum itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c069bbec61e1ca5a596166e55dfe4773ff745c3d16b700013bcaff9a6df2c682"
|
||||
"checksum lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "cf186d1a8aa5f5bee5fd662bc9c1b949e0259e1bcc379d1f006847b0080c7417"
|
||||
"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73"
|
||||
"checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d"
|
||||
"checksum libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)" = "ac8ebf8343a981e2fa97042b14768f02ed3e1d602eac06cae6166df3c8ced206"
|
||||
"checksum lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e6412c5e2ad9584b0b8e979393122026cdd6d2a80b933f890dcd694ddbe73739"
|
||||
"checksum libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "b685088df2b950fccadf07a7187c8ef846a959c142338a48f9dc0b94517eb5f1"
|
||||
"checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d"
|
||||
"checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e"
|
||||
"checksum num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "e63899ad0da84ce718c14936262a41cee2c79c981fc0a0e7c7beb47d5a07e8c1"
|
||||
|
@ -623,12 +617,11 @@ dependencies = [
|
|||
"checksum num-rational 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "ee314c74bd753fc86b4780aa9475da469155f3848473a261d2d18e35245a784e"
|
||||
"checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31"
|
||||
"checksum num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "775393e285254d2f5004596d69bb8bc1149754570dcc08cf30cabeba67955e28"
|
||||
"checksum pkg-config 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "110d5ee3593dbb73f56294327fe5668bcc997897097cbc76b51e7aed3f52452f"
|
||||
"checksum proc-macro2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a45f2f0ae0b5757f6fe9e68745ba25f5246aea3598984ed81d013865873c1f84"
|
||||
"checksum proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "effdb53b25cdad54f8f48843d67398f7ef2e14f12c1b4cb4effc549a6462a4d6"
|
||||
"checksum pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d6fdf85cda6cadfae5428a54661d431330b312bc767ddbc57adbedc24da66e32"
|
||||
"checksum quote 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9e53eeda07ddbd8b057dde66d9beded11d0dfda13f0db0769e6b71d6bcf2074e"
|
||||
"checksum quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e44651a0dc4cdd99f71c83b561e221f714912d11af1a4dff0631f923d53af035"
|
||||
"checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5"
|
||||
"checksum redox_syscall 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)" = "0a12d51a5b5fd700e6c757f15877685bfa04fd7eb60c108f01d045cafa0073c2"
|
||||
"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1"
|
||||
"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
|
||||
"checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384"
|
||||
"checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7"
|
||||
|
@ -638,12 +631,12 @@ dependencies = [
|
|||
"checksum same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfb6eded0b06a0b512c8ddbcf04089138c9b4362c2f696f3c3d76039d68f3637"
|
||||
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
|
||||
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
||||
"checksum serde 1.0.62 (registry+https://github.com/rust-lang/crates.io-index)" = "44d9552562673a8ea8757f5b77ccd794b54dd6841d2def71e9936f293ee81c72"
|
||||
"checksum serde_derive 1.0.62 (registry+https://github.com/rust-lang/crates.io-index)" = "9503e0851dc4398d7f7ee1da227f9c9b9cf82718eb239ab10847b1de6e2a5777"
|
||||
"checksum serde_json 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "ee382a792fabc5d720630aeafe1a4c69abe3d32aaaa5dbba6762fd8246d1bbe3"
|
||||
"checksum serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)" = "e9a2d9a9ac5120e0f768801ca2b58ad6eec929dc9d1d616c162f208869c2ce95"
|
||||
"checksum serde_derive 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)" = "0a90213fa7e0f5eac3f7afe2d5ff6b088af515052cc7303bd68c7e3b91a3fb79"
|
||||
"checksum serde_json 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)" = "fc97cccc2959f39984524026d760c08ef0dd5f0f5948c8d31797dbfae458c875"
|
||||
"checksum skeptic 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c4474d6da9593171bcb086890fc344a3a12783cb24e5b141f8a5d0e43561f4b6"
|
||||
"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550"
|
||||
"checksum syn 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "99d991a9e7c33123925e511baab68f7ec25c3795962fe326a2395e5a42a614f0"
|
||||
"checksum syn 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c67da57e61ebc7b7b6fff56bb34440ca3a83db037320b0507af4c10368deda7d"
|
||||
"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8"
|
||||
"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
|
||||
"checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693"
|
||||
|
@ -656,6 +649,6 @@ dependencies = [
|
|||
"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a"
|
||||
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
|
||||
"checksum walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "63636bd0eb3d00ccb8b9036381b526efac53caf112b7783b730ab3f8e44da369"
|
||||
"checksum winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e3bd221fcbe8a271359c04f21a76db7d0c6028862d1bb5512d85e1e2eb5bb3"
|
||||
"checksum winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd"
|
||||
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
|
|
17
Dockerfile
17
Dockerfile
|
@ -2,8 +2,9 @@ FROM ubuntu:14.04
|
|||
|
||||
MAINTAINER JacobEberhardt <jacob.eberhardt@tu-berlin.de>, Dennis Kuhnert <dennis.kuhnert@campus.tu-berlin.de>
|
||||
|
||||
ARG rust_toolchain=nightly-2018-06-04
|
||||
ARG RUST_TOOLCHAIN=nightly-2018-06-04
|
||||
ARG LIBSNARK_PATH=/root/libsnark
|
||||
ARG LIBSNARK_COMMIT=f7c87b88744ecfd008126d415494d9b34c4c1b20
|
||||
|
||||
WORKDIR /root/
|
||||
|
||||
|
@ -22,14 +23,18 @@ RUN apt-get update && apt-get install -y \
|
|||
ENV LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/local/lib
|
||||
|
||||
RUN curl https://sh.rustup.rs -sSf | \
|
||||
sh -s -- --default-toolchain $rust_toolchain -y
|
||||
sh -s -- --default-toolchain $RUST_TOOLCHAIN -y
|
||||
|
||||
ENV PATH=/root/.cargo/bin:$PATH
|
||||
|
||||
RUN git clone https://github.com/scipr-lab/libsnark.git $LIBSNARK_PATH
|
||||
RUN cd $LIBSNARK_PATH && git submodule update --init --recursive
|
||||
WORKDIR $LIBSNARK_PATH
|
||||
RUN git checkout $LIBSNARK_COMMIT
|
||||
RUN git submodule update --init --recursive
|
||||
|
||||
COPY . /root/ZoKrates
|
||||
WORKDIR /root/
|
||||
|
||||
RUN cd ZoKrates \
|
||||
&& cargo build
|
||||
COPY . ZoKrates
|
||||
|
||||
#RUN cd ZoKrates \
|
||||
# && cargo build
|
||||
|
|
10
build.rs
10
build.rs
|
@ -24,16 +24,6 @@ fn main() {
|
|||
.file("lib/wraplibsnark.cpp")
|
||||
.compile("libwraplibsnark.a");
|
||||
|
||||
gcc::Build::new()
|
||||
.cpp(true)
|
||||
.flag("-std=c++11")
|
||||
.include("/root/libsnark")
|
||||
.include("/root/libsnark/depends/libff")
|
||||
.include("/root/libsnark/depends/libfqfft")
|
||||
.define("CURVE_ALT_BN128", None)
|
||||
.file("lib/wraplibsnarkgadgets.cpp")
|
||||
.compile("libwraplibsnarkgadgets.a");
|
||||
|
||||
println!("cargo:warning=libsnark installed to {}", libsnark.display());
|
||||
println!(
|
||||
"cargo:warning=libsnark libs installed to {}",
|
||||
|
|
|
@ -46,7 +46,7 @@ std::string HexStringFromLibsnarkBigint(libff::bigint<libff::alt_bn128_r_limbs>
|
|||
ss << std::hex << std::setw(2) << (int)x[i];
|
||||
}
|
||||
|
||||
std:string str = ss.str();
|
||||
std::string str = ss.str();
|
||||
return str.erase(0, min(str.find_first_not_of('0'), str.size()-1));
|
||||
}
|
||||
|
||||
|
@ -55,11 +55,10 @@ std::string outputPointG1AffineAsHex(libff::alt_bn128_G1 _p)
|
|||
libff::alt_bn128_G1 aff = _p;
|
||||
aff.to_affine_coordinates();
|
||||
return
|
||||
"\"0x" +
|
||||
"0x" +
|
||||
HexStringFromLibsnarkBigint(aff.X.as_bigint()) +
|
||||
"\", \"0x" +
|
||||
HexStringFromLibsnarkBigint(aff.Y.as_bigint()) +
|
||||
"\"";
|
||||
", 0x" +
|
||||
HexStringFromLibsnarkBigint(aff.Y.as_bigint());
|
||||
}
|
||||
|
||||
std::string outputPointG2AffineAsHex(libff::alt_bn128_G2 _p)
|
||||
|
@ -67,11 +66,11 @@ std::string outputPointG2AffineAsHex(libff::alt_bn128_G2 _p)
|
|||
libff::alt_bn128_G2 aff = _p;
|
||||
aff.to_affine_coordinates();
|
||||
return
|
||||
"[\"0x" +
|
||||
HexStringFromLibsnarkBigint(aff.X.c1.as_bigint()) + "\", \"0x" +
|
||||
HexStringFromLibsnarkBigint(aff.X.c0.as_bigint()) + "\"],\n [\"0x" +
|
||||
HexStringFromLibsnarkBigint(aff.Y.c1.as_bigint()) + "\", \"0x" +
|
||||
HexStringFromLibsnarkBigint(aff.Y.c0.as_bigint()) + "\"]";
|
||||
"[0x" +
|
||||
HexStringFromLibsnarkBigint(aff.X.c1.as_bigint()) + ", 0x" +
|
||||
HexStringFromLibsnarkBigint(aff.X.c0.as_bigint()) + "], [0x" +
|
||||
HexStringFromLibsnarkBigint(aff.Y.c1.as_bigint()) + ", 0x" +
|
||||
HexStringFromLibsnarkBigint(aff.Y.c0.as_bigint()) + "]";
|
||||
}
|
||||
|
||||
//takes input and puts it into constraint system
|
||||
|
@ -226,29 +225,29 @@ void exportInput(r1cs_primary_input<libff::Fr<libff::alt_bn128_pp>> input){
|
|||
|
||||
void printProof(r1cs_ppzksnark_proof<libff::alt_bn128_pp> proof){
|
||||
cout << "Proof:"<< endl;
|
||||
cout << "proof.A = Pairing.G1Point(" << outputPointG1AffineAsHex(proof.g_A.g)<< ");" << endl;
|
||||
cout << "proof.A_p = Pairing.G1Point(" << outputPointG1AffineAsHex(proof.g_A.h)<< ");" << endl;
|
||||
cout << "proof.B = Pairing.G2Point(" << outputPointG2AffineAsHex(proof.g_B.g)<< ");" << endl;
|
||||
cout << "proof.B_p = Pairing.G1Point(" << outputPointG1AffineAsHex(proof.g_B.h)<<");" << endl;
|
||||
cout << "proof.C = Pairing.G1Point(" << outputPointG1AffineAsHex(proof.g_C.g)<< ");" << endl;
|
||||
cout << "proof.C_p = Pairing.G1Point(" << outputPointG1AffineAsHex(proof.g_C.h)<<");" << endl;
|
||||
cout << "proof.H = Pairing.G1Point(" << outputPointG1AffineAsHex(proof.g_H)<<");"<< endl;
|
||||
cout << "proof.K = Pairing.G1Point(" << outputPointG1AffineAsHex(proof.g_K)<<");"<< endl;
|
||||
cout << "A = Pairing.G1Point(" << outputPointG1AffineAsHex(proof.g_A.g)<< ");" << endl;
|
||||
cout << "A_p = Pairing.G1Point(" << outputPointG1AffineAsHex(proof.g_A.h)<< ");" << endl;
|
||||
cout << "B = Pairing.G2Point(" << outputPointG2AffineAsHex(proof.g_B.g)<< ");" << endl;
|
||||
cout << "B_p = Pairing.G1Point(" << outputPointG1AffineAsHex(proof.g_B.h)<<");" << endl;
|
||||
cout << "C = Pairing.G1Point(" << outputPointG1AffineAsHex(proof.g_C.g)<< ");" << endl;
|
||||
cout << "C_p = Pairing.G1Point(" << outputPointG1AffineAsHex(proof.g_C.h)<<");" << endl;
|
||||
cout << "H = Pairing.G1Point(" << outputPointG1AffineAsHex(proof.g_H)<<");"<< endl;
|
||||
cout << "K = Pairing.G1Point(" << outputPointG1AffineAsHex(proof.g_K)<<");"<< endl;
|
||||
}
|
||||
|
||||
bool _setup(const uint8_t* A, const uint8_t* B, const uint8_t* C, int constraints, int variables, int inputs, const char* pk_path, const char* vk_path)
|
||||
{
|
||||
//libsnark::inhibit_profiling_info = true;
|
||||
//libsnark::inhibit_profiling_counters = true;
|
||||
libff::inhibit_profiling_info = true;
|
||||
libff::inhibit_profiling_counters = true;
|
||||
|
||||
//initialize curve parameters
|
||||
libff::alt_bn128_pp::init_public_params();
|
||||
|
||||
auto cs = createConstraintSystem(A, B ,C , constraints, variables, inputs);
|
||||
|
||||
assert(cs.num_variables() >= inputs);
|
||||
assert(cs.num_inputs() == inputs);
|
||||
assert(cs.num_constraints() == constraints);
|
||||
assert(cs.num_variables() >= (unsigned)inputs);
|
||||
assert(cs.num_inputs() == (unsigned)inputs);
|
||||
assert(cs.num_constraints() == (unsigned)constraints);
|
||||
|
||||
// create keypair
|
||||
auto keypair = r1cs_ppzksnark_generator<libff::alt_bn128_pp>(cs);
|
||||
|
@ -265,8 +264,8 @@ bool _setup(const uint8_t* A, const uint8_t* B, const uint8_t* C, int constraint
|
|||
|
||||
bool _generate_proof(const char* pk_path, const uint8_t* public_inputs, int public_inputs_length, const uint8_t* private_inputs, int private_inputs_length)
|
||||
{
|
||||
// libsnark::inhibit_profiling_info = true;
|
||||
// libsnark::inhibit_profiling_counters = true;
|
||||
libff::inhibit_profiling_info = true;
|
||||
libff::inhibit_profiling_counters = true;
|
||||
|
||||
//initialize curve parameters
|
||||
libff::alt_bn128_pp::init_public_params();
|
||||
|
|
|
@ -1,140 +0,0 @@
|
|||
//https://gist.github.com/kobigurk/24c25e68219df87c348f1a78db51bb52
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "libsnark/gadgetlib1/gadget.hpp"
|
||||
#include "libff/common/default_types/ec_pp.hpp"
|
||||
|
||||
using namespace libsnark;
|
||||
using namespace libff;
|
||||
using std::vector;
|
||||
|
||||
#include "wraplibsnarkgadgets.hpp"
|
||||
#include <libsnark/gadgetlib1/gadgets/hashes/sha256/sha256_gadget.hpp>
|
||||
#include <libsnark/zk_proof_systems/ppzksnark/r1cs_ppzksnark/r1cs_ppzksnark.hpp>
|
||||
|
||||
typedef libff::Fr<alt_bn128_pp> FieldT;
|
||||
|
||||
void constraint_to_json(linear_combination<FieldT> constraints, std::stringstream &ss)
|
||||
{
|
||||
ss << "{";
|
||||
uint count = 0;
|
||||
for (const linear_term<FieldT>& lt : constraints.terms)
|
||||
{
|
||||
if (count != 0) {
|
||||
ss << ",";
|
||||
}
|
||||
|
||||
ss << '"' << lt.index << '"' << ":" << '"' << lt.coeff << '"';
|
||||
count++;
|
||||
}
|
||||
ss << "}";
|
||||
}
|
||||
|
||||
|
||||
std::string r1cs_to_json(protoboard<FieldT> pb)
|
||||
{
|
||||
r1cs_constraint_system<FieldT> constraints = pb.get_constraint_system();
|
||||
std::stringstream ss;
|
||||
|
||||
ss << "{\"input_count\":512, \"outputs\":[513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768],\"constraints\":[";
|
||||
|
||||
for (size_t c = 0; c < constraints.num_constraints(); ++c)
|
||||
{
|
||||
ss << "[";// << "\"A\"=";
|
||||
constraint_to_json(constraints.constraints[c].a, ss);
|
||||
ss << ",";// << "\"B\"=";
|
||||
constraint_to_json(constraints.constraints[c].b, ss);
|
||||
ss << ",";// << "\"A\"=";;
|
||||
constraint_to_json(constraints.constraints[c].c, ss);
|
||||
if (c == constraints.num_constraints()-1 ) {
|
||||
ss << "]\n";
|
||||
} else {
|
||||
ss << "],\n";
|
||||
}
|
||||
}
|
||||
ss << "]}";
|
||||
ss.rdbuf()->pubseekpos(0, std::ios_base::out);
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
char* _sha256Constraints()
|
||||
{
|
||||
libff::alt_bn128_pp::init_public_params();
|
||||
protoboard<FieldT> pb;
|
||||
|
||||
digest_variable<FieldT> left(pb, SHA256_digest_size, "left");
|
||||
digest_variable<FieldT> right(pb, SHA256_digest_size, "right");
|
||||
digest_variable<FieldT> output(pb, SHA256_digest_size, "output");
|
||||
|
||||
sha256_two_to_one_hash_gadget<FieldT> f(pb, left, right, output, "f");
|
||||
f.generate_r1cs_constraints();
|
||||
|
||||
auto json = r1cs_to_json(pb);
|
||||
|
||||
auto result = new char[json.size()];
|
||||
memcpy(result, json.c_str(), json.size() + 1);
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string array_to_json(protoboard<FieldT> pb)
|
||||
{
|
||||
std::stringstream ss;
|
||||
r1cs_variable_assignment<FieldT> values = pb.full_variable_assignment();
|
||||
ss << "\n{\"variables\":[";
|
||||
|
||||
ss << 1 << ","; // the variable zero to the one constant
|
||||
|
||||
for (size_t i = 0; i < values.size(); ++i)
|
||||
{
|
||||
ss << values[i].as_bigint();
|
||||
if (i < values.size() - 1) { ss << ",";}
|
||||
}
|
||||
|
||||
ss << "]}\n";
|
||||
ss.rdbuf()->pubseekpos(0, std::ios_base::out);
|
||||
|
||||
return(ss.str());
|
||||
}
|
||||
|
||||
pb_variable_array<FieldT> from_bits(std::vector<bool> bits, pb_variable<FieldT>& ZERO) {
|
||||
pb_variable_array<FieldT> acc;
|
||||
|
||||
for (size_t i = 0; i < bits.size(); i++) {
|
||||
bool bit = bits[i];
|
||||
acc.emplace_back(bit ? ONE : ZERO);
|
||||
}
|
||||
return acc;
|
||||
}
|
||||
|
||||
|
||||
char* _sha256Witness()
|
||||
{
|
||||
|
||||
libff::alt_bn128_pp::init_public_params();
|
||||
|
||||
protoboard<FieldT> pb;
|
||||
|
||||
digest_variable<FieldT> left(pb, SHA256_digest_size, "left");
|
||||
digest_variable<FieldT> right(pb, SHA256_digest_size, "right");
|
||||
digest_variable<FieldT> output(pb, SHA256_digest_size, "output");
|
||||
|
||||
sha256_two_to_one_hash_gadget<FieldT> f(pb, left, right, output, "f");
|
||||
f.generate_r1cs_constraints(true);
|
||||
|
||||
const libff::bit_vector left_bv = libff::int_list_to_bits({0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, 32);
|
||||
const libff::bit_vector right_bv = libff::int_list_to_bits({0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, 32);
|
||||
|
||||
left.generate_r1cs_witness(left_bv);
|
||||
right.generate_r1cs_witness(right_bv);
|
||||
|
||||
f.generate_r1cs_witness();
|
||||
|
||||
assert(pb.is_satisfied());
|
||||
|
||||
auto json = array_to_json(pb);
|
||||
auto result = new char[json.size()];
|
||||
memcpy(result, json.c_str(), json.size() + 1);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
/**
|
||||
* @file wraplibsnark.hpp
|
||||
* @author Jacob Eberhardt <jacob.eberhardt@tu-berlin.de
|
||||
* @author Dennis Kuhnert <dennis.kuhnert@campus.tu-berlin.de>
|
||||
* @date 2017
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
char* _sha256Constraints();
|
||||
char* _sha256Witness();
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
|
@ -1 +0,0 @@
|
|||
[42]
|
|
@ -1,4 +0,0 @@
|
|||
def main(a):
|
||||
o0, o1, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14, o15, o16, o17, o18, o19, o20, o21, o22, o23, o24, o25, o26, o27, o28, o29, o30, o31, o32, o33, o34, o35, o36, o37, o38, o39, o40, o41, o42, o43, o44, o45, o46, o47, o48, o49, o50, o51, o52, o53, o54, o55, o56, o57, o58, o59, o60, o61, o62, o63, o64, o65, o66, o67, o68, o69, o70, o71, o72, o73, o74, o75, o76, o77, o78, o79, o80, o81, o82, o83, o84, o85, o86, o87, o88, o89, o90, o91, o92, o93, o94, o95, o96, o97, o98, o99, o100, o101, o102, o103, o104, o105, o106, o107, o108, o109, o110, o111, o112, o113, o114, o115, o116, o117, o118, o119, o120, o121, o122, o123, o124, o125, o126, o127, o128, o129, o130, o131, o132, o133, o134, o135, o136, o137, o138, o139, o140, o141, o142, o143, o144, o145, o146, o147, o148, o149, o150, o151, o152, o153, o154, o155, o156, o157, o158, o159, o160, o161, o162, o163, o164, o165, o166, o167, o168, o169, o170, o171, o172, o173, o174, o175, o176, o177, o178, o179, o180, o181, o182, o183, o184, o185, o186, o187, o188, o189, o190, o191, o192, o193, o194, o195, o196, o197, o198, o199, o200, o201, o202, o203, o204, o205, o206, o207, o208, o209, o210, o211, o212, o213, o214, o215, o216, o217, o218, o219, o220, o221, o222, o223, o224, o225, o226, o227, o228, o229, o230, o231, o232, o233, o234, o235, o236, o237, o238, o239, o240, o241, o242, o243, o244, o245, o246, o247, o248, o249, o250, o251, o252, o253, o254, o255 = sha256libsnark(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
|
||||
return o0, o1, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14, o15, o16, o17, o18, o19, o20, o21, o22, o23, o24, o25, o26, o27, o28, o29, o30, o31, o32, o33, o34, o35, o36, o37, o38, o39, o40, o41, o42, o43, o44, o45, o46, o47, o48, o49, o50, o51, o52, o53, o54, o55, o56, o57, o58, o59, o60, o61, o62, o63, o64, o65, o66, o67, o68, o69, o70, o71, o72, o73, o74, o75, o76, o77, o78, o79, o80, o81, o82, o83, o84, o85, o86, o87, o88, o89, o90, o91, o92, o93, o94, o95, o96, o97, o98, o99, o100, o101, o102, o103, o104, o105, o106, o107, o108, o109, o110, o111, o112, o113, o114, o115, o116, o117, o118, o119, o120, o121, o122, o123, o124, o125, o126, o127, o128, o129, o130, o131, o132, o133, o134, o135, o136, o137, o138, o139, o140, o141, o142, o143, o144, o145, o146, o147, o148, o149, o150, o151, o152, o153, o154, o155, o156, o157, o158, o159, o160, o161, o162, o163, o164, o165, o166, o167, o168, o169, o170, o171, o172, o173, o174, o175, o176, o177, o178, o179, o180, o181, o182, o183, o184, o185, o186, o187, o188, o189, o190, o191, o192, o193, o194, o195, o196, o197, o198, o199, o200, o201, o202, o203, o204, o205, o206, o207, o208, o209, o210, o211, o212, o213, o214, o215, o216, o217, o218, o219, o220, o221, o222, o223, o224, o225, o226, o227, o228, o229, o230, o231, o232, o233, o234, o235, o236, o237, o238, o239, o240, o241, o242, o243, o244, o245, o246, o247, o248, o249, o250, o251, o252, o253, o254, o255
|
||||
|
File diff suppressed because one or more lines are too long
|
@ -1,256 +0,0 @@
|
|||
~out_0 1
|
||||
~out_1 1
|
||||
~out_2 0
|
||||
~out_3 1
|
||||
~out_4 1
|
||||
~out_5 0
|
||||
~out_6 1
|
||||
~out_7 0
|
||||
~out_8 0
|
||||
~out_9 1
|
||||
~out_10 0
|
||||
~out_11 1
|
||||
~out_12 0
|
||||
~out_13 1
|
||||
~out_14 1
|
||||
~out_15 0
|
||||
~out_16 1
|
||||
~out_17 0
|
||||
~out_18 0
|
||||
~out_19 1
|
||||
~out_20 1
|
||||
~out_21 0
|
||||
~out_22 0
|
||||
~out_23 0
|
||||
~out_24 1
|
||||
~out_25 0
|
||||
~out_26 1
|
||||
~out_27 1
|
||||
~out_28 1
|
||||
~out_29 1
|
||||
~out_30 1
|
||||
~out_31 0
|
||||
~out_32 0
|
||||
~out_33 0
|
||||
~out_34 0
|
||||
~out_35 1
|
||||
~out_36 0
|
||||
~out_37 1
|
||||
~out_38 1
|
||||
~out_39 1
|
||||
~out_40 1
|
||||
~out_41 0
|
||||
~out_42 1
|
||||
~out_43 1
|
||||
~out_44 1
|
||||
~out_45 0
|
||||
~out_46 0
|
||||
~out_47 1
|
||||
~out_48 1
|
||||
~out_49 0
|
||||
~out_50 1
|
||||
~out_51 1
|
||||
~out_52 0
|
||||
~out_53 1
|
||||
~out_54 0
|
||||
~out_55 0
|
||||
~out_56 0
|
||||
~out_57 1
|
||||
~out_58 1
|
||||
~out_59 0
|
||||
~out_60 1
|
||||
~out_61 0
|
||||
~out_62 0
|
||||
~out_63 1
|
||||
~out_64 0
|
||||
~out_65 1
|
||||
~out_66 1
|
||||
~out_67 0
|
||||
~out_68 0
|
||||
~out_69 0
|
||||
~out_70 1
|
||||
~out_71 0
|
||||
~out_72 0
|
||||
~out_73 0
|
||||
~out_74 1
|
||||
~out_75 1
|
||||
~out_76 0
|
||||
~out_77 0
|
||||
~out_78 1
|
||||
~out_79 1
|
||||
~out_80 0
|
||||
~out_81 1
|
||||
~out_82 0
|
||||
~out_83 1
|
||||
~out_84 0
|
||||
~out_85 1
|
||||
~out_86 1
|
||||
~out_87 1
|
||||
~out_88 1
|
||||
~out_89 0
|
||||
~out_90 0
|
||||
~out_91 1
|
||||
~out_92 1
|
||||
~out_93 0
|
||||
~out_94 0
|
||||
~out_95 1
|
||||
~out_96 0
|
||||
~out_97 1
|
||||
~out_98 1
|
||||
~out_99 1
|
||||
~out_100 0
|
||||
~out_101 1
|
||||
~out_102 1
|
||||
~out_103 1
|
||||
~out_104 1
|
||||
~out_105 0
|
||||
~out_106 0
|
||||
~out_107 1
|
||||
~out_108 1
|
||||
~out_109 1
|
||||
~out_110 1
|
||||
~out_111 1
|
||||
~out_112 1
|
||||
~out_113 0
|
||||
~out_114 1
|
||||
~out_115 1
|
||||
~out_116 1
|
||||
~out_117 1
|
||||
~out_118 1
|
||||
~out_119 0
|
||||
~out_120 1
|
||||
~out_121 1
|
||||
~out_122 0
|
||||
~out_123 0
|
||||
~out_124 1
|
||||
~out_125 0
|
||||
~out_126 1
|
||||
~out_127 0
|
||||
~out_128 1
|
||||
~out_129 0
|
||||
~out_130 0
|
||||
~out_131 0
|
||||
~out_132 1
|
||||
~out_133 1
|
||||
~out_134 0
|
||||
~out_135 0
|
||||
~out_136 1
|
||||
~out_137 1
|
||||
~out_138 1
|
||||
~out_139 0
|
||||
~out_140 0
|
||||
~out_141 1
|
||||
~out_142 0
|
||||
~out_143 1
|
||||
~out_144 1
|
||||
~out_145 1
|
||||
~out_146 0
|
||||
~out_147 1
|
||||
~out_148 0
|
||||
~out_149 1
|
||||
~out_150 0
|
||||
~out_151 0
|
||||
~out_152 1
|
||||
~out_153 0
|
||||
~out_154 0
|
||||
~out_155 1
|
||||
~out_156 0
|
||||
~out_157 0
|
||||
~out_158 0
|
||||
~out_159 1
|
||||
~out_160 1
|
||||
~out_161 1
|
||||
~out_162 0
|
||||
~out_163 0
|
||||
~out_164 0
|
||||
~out_165 0
|
||||
~out_166 0
|
||||
~out_167 0
|
||||
~out_168 1
|
||||
~out_169 1
|
||||
~out_170 0
|
||||
~out_171 1
|
||||
~out_172 0
|
||||
~out_173 0
|
||||
~out_174 1
|
||||
~out_175 0
|
||||
~out_176 0
|
||||
~out_177 1
|
||||
~out_178 1
|
||||
~out_179 0
|
||||
~out_180 0
|
||||
~out_181 0
|
||||
~out_182 1
|
||||
~out_183 0
|
||||
~out_184 0
|
||||
~out_185 1
|
||||
~out_186 0
|
||||
~out_187 0
|
||||
~out_188 0
|
||||
~out_189 0
|
||||
~out_190 1
|
||||
~out_191 1
|
||||
~out_192 1
|
||||
~out_193 0
|
||||
~out_194 1
|
||||
~out_195 1
|
||||
~out_196 1
|
||||
~out_197 0
|
||||
~out_198 1
|
||||
~out_199 0
|
||||
~out_200 1
|
||||
~out_201 1
|
||||
~out_202 1
|
||||
~out_203 1
|
||||
~out_204 1
|
||||
~out_205 1
|
||||
~out_206 1
|
||||
~out_207 0
|
||||
~out_208 1
|
||||
~out_209 1
|
||||
~out_210 1
|
||||
~out_211 1
|
||||
~out_212 1
|
||||
~out_213 0
|
||||
~out_214 0
|
||||
~out_215 1
|
||||
~out_216 1
|
||||
~out_217 1
|
||||
~out_218 1
|
||||
~out_219 0
|
||||
~out_220 1
|
||||
~out_221 0
|
||||
~out_222 1
|
||||
~out_223 0
|
||||
~out_224 0
|
||||
~out_225 0
|
||||
~out_226 0
|
||||
~out_227 1
|
||||
~out_228 1
|
||||
~out_229 0
|
||||
~out_230 0
|
||||
~out_231 0
|
||||
~out_232 0
|
||||
~out_233 0
|
||||
~out_234 1
|
||||
~out_235 1
|
||||
~out_236 0
|
||||
~out_237 1
|
||||
~out_238 1
|
||||
~out_239 1
|
||||
~out_240 1
|
||||
~out_241 0
|
||||
~out_242 1
|
||||
~out_243 0
|
||||
~out_244 1
|
||||
~out_245 0
|
||||
~out_246 0
|
||||
~out_247 1
|
||||
~out_248 1
|
||||
~out_249 1
|
||||
~out_250 0
|
||||
~out_251 1
|
||||
~out_252 1
|
||||
~out_253 0
|
||||
~out_254 0
|
||||
~out_255 0
|
|
@ -13,11 +13,11 @@ mod integration {
|
|||
use serde_json::Value;
|
||||
|
||||
fn setup() {
|
||||
fs::create_dir(".tmp").unwrap();
|
||||
fs::create_dir("./tests/tmp").unwrap();
|
||||
}
|
||||
|
||||
fn teardown() {
|
||||
fs::remove_dir_all(".tmp").unwrap();
|
||||
fs::remove_dir_all("./tests/tmp").unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -53,7 +53,7 @@ mod integration {
|
|||
}
|
||||
|
||||
fn test_compile_and_witness(program_name: &str, program_path: &Path, expected_flattened_code_path: &Path, arguments_path: &Path, expected_witness_path: &Path) {
|
||||
let tmp_base = Path::new(".tmp/");
|
||||
let tmp_base = Path::new("./tests/tmp/");
|
||||
let test_case_path = tmp_base.join(program_name);
|
||||
let flattened_path = tmp_base.join(program_name).join("out");
|
||||
let flattened_code_path = tmp_base.join(program_name).join("out").with_extension("code");
|
||||
|
@ -62,16 +62,8 @@ mod integration {
|
|||
// create a tmp folder to store artifacts
|
||||
fs::create_dir(test_case_path).unwrap();
|
||||
|
||||
// prepare compile arguments
|
||||
let mut compile = vec!["./target/debug/zokrates", "compile", "-i", program_path.to_str().unwrap(), "-o", flattened_path.to_str().unwrap()];
|
||||
|
||||
if program_name == "sha_libsnark" {
|
||||
compile.push("--gadgets");
|
||||
compile.push("--optimized");
|
||||
}
|
||||
|
||||
// compile
|
||||
assert_cli::Assert::command(&compile)
|
||||
assert_cli::Assert::command(&["cargo", "run", "--", "compile", "-i", program_path.to_str().unwrap(), "-o", flattened_path.to_str().unwrap()])
|
||||
.succeeds()
|
||||
.unwrap();
|
||||
|
||||
|
@ -83,7 +75,7 @@ mod integration {
|
|||
_ => panic!(format!("Cannot read arguments. Check {}", arguments_path.to_str().unwrap()))
|
||||
}).collect();
|
||||
|
||||
let mut compute = vec!["./target/debug/zokrates", "compute-witness", "-i", flattened_path.to_str().unwrap(), "-o", witness_path.to_str().unwrap(), "-a"];
|
||||
let mut compute = vec!["cargo", "run", "--", "compute-witness", "-i", flattened_path.to_str().unwrap(), "-o", witness_path.to_str().unwrap(), "-a"];
|
||||
|
||||
for arg in arguments_str_list.iter() {
|
||||
compute.push(arg);
|
||||
|
@ -115,8 +107,6 @@ mod integration {
|
|||
|
||||
// check equality
|
||||
assert_eq!(flattened_code, expected_flattened_code, "Flattening failed for {}\n\nExpected\n\n{}\n\nGot\n\n{}", program_path.to_str().unwrap(), expected_flattened_code.as_str(), flattened_code.as_str());
|
||||
for line in expected_witness.as_str().split("\n") {
|
||||
assert!(witness.contains(line), "Witness generation failed for {}\n\nLine \"{}\" not found in witness", program_path.to_str().unwrap(), line);
|
||||
}
|
||||
assert!(witness.contains(expected_witness.as_str()), "Witness generation failed for {}\n\nExpected\n\n{}\n\nGot\n\n{}", program_path.to_str().unwrap(), expected_witness.as_str(), witness.as_str());
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue