cleanup for freeze
This commit is contained in:
parent
03ec5d5ffa
commit
4db0a32f5b
243
Cargo.lock
generated
243
Cargo.lock
generated
@ -1,19 +1,17 @@
|
||||
[[package]]
|
||||
name = "bellman"
|
||||
version = "0.1.2"
|
||||
source = "git+https://github.com/matterinc/bellman#6e5cfe211feec9f0e612a47a8a19d31f37ea9071"
|
||||
version = "0.1.3"
|
||||
source = "git+https://github.com/matterinc/bellman#e775b47d99562243f4ed3ab432eb3a56ad9493a3"
|
||||
dependencies = [
|
||||
"bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ff 0.5.0 (git+https://github.com/matterinc/ff)",
|
||||
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pairing 0.15.1 (git+https://github.com/matterinc/pairing)",
|
||||
"pbr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pairing 0.15.2 (git+https://github.com/matterinc/pairing)",
|
||||
"rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -21,11 +19,6 @@ name = "bit-vec"
|
||||
version = "0.4.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "blake2"
|
||||
version = "0.6.1"
|
||||
@ -44,7 +37,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "byteorder"
|
||||
version = "1.2.7"
|
||||
version = "1.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
@ -76,7 +69,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "either"
|
||||
version = "1.5.0"
|
||||
version = "1.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
@ -84,9 +77,9 @@ name = "ff"
|
||||
version = "0.5.0"
|
||||
source = "git+https://github.com/matterinc/ff#056a13b95f4b971a9ae2c6fbb5fbc9f1e4f4828e"
|
||||
dependencies = [
|
||||
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ff_derive 0.4.0 (git+https://github.com/matterinc/ff)",
|
||||
"rand 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -97,24 +90,15 @@ dependencies = [
|
||||
"num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.85 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fuchsia-zircon"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fuchsia-zircon-sys"
|
||||
version = "0.3.3"
|
||||
name = "fuchsia-cprng"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
@ -128,7 +112,7 @@ version = "0.1.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -152,7 +136,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "hex-literal"
|
||||
version = "0.1.1"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"hex-literal-impl 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -172,7 +156,7 @@ name = "itertools"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"either 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -180,18 +164,9 @@ name = "itoa"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "kernel32-sys"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.47"
|
||||
version = "0.2.49"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
@ -199,7 +174,7 @@ name = "memmap"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -232,54 +207,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "num_cpus"
|
||||
version = "1.9.0"
|
||||
version = "1.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pairing"
|
||||
version = "0.15.1"
|
||||
source = "git+https://github.com/matterinc/pairing#3279e322eb9239e7f6e98f0abb9421e4e7f37c25"
|
||||
version = "0.15.2"
|
||||
source = "git+https://github.com/matterinc/pairing#84b57df3259c2f41d97744792cc89269e261d44e"
|
||||
dependencies = [
|
||||
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ff 0.5.0 (git+https://github.com/matterinc/ff)",
|
||||
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.85 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.85 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pbr"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "powersoftau"
|
||||
version = "0.1.2"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"bellman 0.1.2 (git+https://github.com/matterinc/bellman)",
|
||||
"bellman 0.1.3 (git+https://github.com/matterinc/bellman)",
|
||||
"blake2 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ff 0.5.0 (git+https://github.com/matterinc/ff)",
|
||||
"generic-array 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pairing 0.15.1 (git+https://github.com/matterinc/pairing)",
|
||||
"rand 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pairing 0.15.2 (git+https://github.com/matterinc/pairing)",
|
||||
"rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -299,7 +262,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "0.4.25"
|
||||
version = "0.4.27"
|
||||
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)",
|
||||
@ -307,37 +270,44 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "0.6.10"
|
||||
version = "0.6.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.3.22"
|
||||
version = "0.3.23"
|
||||
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.47 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.4.5"
|
||||
version = "0.4.6"
|
||||
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.47 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_core"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_core"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
@ -345,30 +315,22 @@ name = "rdrand"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.1.50"
|
||||
version = "0.1.51"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "redox_termios"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rust-crypto"
|
||||
version = "0.2.36"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -385,27 +347,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.85"
|
||||
version = "1.0.88"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.85"
|
||||
version = "1.0.88"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.36"
|
||||
version = "1.0.38"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.85 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -413,8 +375,8 @@ name = "syn"
|
||||
version = "0.14.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -423,28 +385,18 @@ name = "syn"
|
||||
version = "0.15.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "termion"
|
||||
version = "1.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.1.42"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -458,11 +410,6 @@ name = "unicode-xid"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.2.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.3.6"
|
||||
@ -472,11 +419,6 @@ dependencies = [
|
||||
"winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-build"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "winapi-i686-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
@ -488,64 +430,57 @@ version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[metadata]
|
||||
"checksum bellman 0.1.2 (git+https://github.com/matterinc/bellman)" = "<none>"
|
||||
"checksum bellman 0.1.3 (git+https://github.com/matterinc/bellman)" = "<none>"
|
||||
"checksum bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "02b4ff8b16e6076c3e14220b39fbc1fabb6737522281a388998046859400895f"
|
||||
"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12"
|
||||
"checksum blake2 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "53bf612c0f2839b7e764ebac65d6cb985f7c6812de399d0728038f4b1da141bc"
|
||||
"checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40"
|
||||
"checksum byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "94f88df23a25417badc922ab0f5716cc1330e87f71ddd9203b3a3ccd9cedf75d"
|
||||
"checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb"
|
||||
"checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e"
|
||||
"checksum crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "24ce9782d4d5c53674646a6a4c1863a21a8fc0cb649b3c94dfc16e45071dea19"
|
||||
"checksum crypto-mac 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "779015233ac67d65098614aec748ac1c756ab6677fa2e14cf8b37c08dfed1198"
|
||||
"checksum digest 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e5b29bf156f3f4b3c4f610a25ff69370616ae6e0657d416de22645483e72af0a"
|
||||
"checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0"
|
||||
"checksum either 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c67353c641dc847124ea1902d69bd753dee9bb3beff9aa3662ecf86c971d1fac"
|
||||
"checksum ff 0.5.0 (git+https://github.com/matterinc/ff)" = "<none>"
|
||||
"checksum ff_derive 0.4.0 (git+https://github.com/matterinc/ff)" = "<none>"
|
||||
"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
|
||||
"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
|
||||
"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
|
||||
"checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b"
|
||||
"checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4"
|
||||
"checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2"
|
||||
"checksum generic-array 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fceb69994e330afed50c93524be68c42fa898c2d9fd4ee8da03bd7363acd26f2"
|
||||
"checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77"
|
||||
"checksum hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4da5f0e01bd8a71a224a4eedecaacfcabda388dbb7a80faf04d3514287572d95"
|
||||
"checksum hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "27455ce8b4a6666c87220e4b59c9a83995476bdadc10197905e61dbe906e36fa"
|
||||
"checksum hex-literal-impl 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1d340b6514f232f6db1bd16db65302a5278a04fef9ce867cb932e7e5fa21130a"
|
||||
"checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358"
|
||||
"checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b"
|
||||
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
|
||||
"checksum libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)" = "48450664a984b25d5b479554c29cc04e3150c97aa4c01da5604a2d4ed9151476"
|
||||
"checksum libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)" = "413f3dfc802c5dc91dc570b05125b6cda9855edfaa9825c9849807876376e70e"
|
||||
"checksum memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b"
|
||||
"checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945"
|
||||
"checksum num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "57450397855d951f1a41305e54851b1a7b8f5d2e349543a02a2effe25459f718"
|
||||
"checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea"
|
||||
"checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1"
|
||||
"checksum num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5a69d464bdc213aaaff628444e99578ede64e9c854025aa43b9796530afa9238"
|
||||
"checksum pairing 0.15.1 (git+https://github.com/matterinc/pairing)" = "<none>"
|
||||
"checksum pbr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "deb73390ab68d81992bd994d145f697451bb0b54fd39738e72eef32458ad6907"
|
||||
"checksum num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba"
|
||||
"checksum pairing 0.15.2 (git+https://github.com/matterinc/pairing)" = "<none>"
|
||||
"checksum proc-macro-hack 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2c725b36c99df7af7bf9324e9c999b9e37d92c8f8caf106d82e1d7953218d2d8"
|
||||
"checksum proc-macro-hack-impl 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2b753ad9ed99dd8efeaa7d2fb8453c8f6bc3e54b97966d35f1bc77ca6865254a"
|
||||
"checksum proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)" = "d3797b7142c9aa74954e351fc089bbee7958cebbff6bf2815e7ffff0b19f547d"
|
||||
"checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c"
|
||||
"checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1"
|
||||
"checksum rand 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "dee497e66d8d76bf08ce20c8d36e16f93749ab0bf89975b4f8ae5cee660c2da2"
|
||||
"checksum rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0905b6b7079ec73b314d4c748701f6931eb79fd97c668caa3f1899b22b32c6db"
|
||||
"checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915"
|
||||
"checksum quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1"
|
||||
"checksum rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c"
|
||||
"checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293"
|
||||
"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"
|
||||
"checksum rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0"
|
||||
"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
|
||||
"checksum redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)" = "52ee9a534dc1301776eff45b4fa92d2c39b1d8c3d3357e6eb593e0d795506fc2"
|
||||
"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
|
||||
"checksum redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)" = "423e376fffca3dfa06c9e9790a9ccd282fafb3cc6e6397d01dbf64f9bacc6b85"
|
||||
"checksum rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a"
|
||||
"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
|
||||
"checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7"
|
||||
"checksum serde 1.0.85 (registry+https://github.com/rust-lang/crates.io-index)" = "534b8b91a95e0f71bca3ed5824752d558da048d4248c91af873b63bd60519752"
|
||||
"checksum serde_derive 1.0.85 (registry+https://github.com/rust-lang/crates.io-index)" = "a915306b0f1ac5607797697148c223bedeaa36bcc2e28a01441cd638cc6567b4"
|
||||
"checksum serde_json 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)" = "574378d957d6dcdf1bbb5d562a15cbd5e644159432f84634b94e485267abbcc7"
|
||||
"checksum serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)" = "9f301d728f2b94c9a7691c90f07b0b4e8a4517181d9461be94c04bddeb4bd850"
|
||||
"checksum serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)" = "beed18e6f5175aef3ba670e57c60ef3b1b74d250d962a26604bff4c80e970dd4"
|
||||
"checksum serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)" = "27dce848e7467aa0e2fcaf0a413641499c0b745452aaca1194d24dedde9e13c9"
|
||||
"checksum syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)" = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741"
|
||||
"checksum syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)" = "f92e629aa1d9c827b2bb8297046c1ccffc57c99b947a680d3ccff1f136a3bee9"
|
||||
"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
|
||||
"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f"
|
||||
"checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169"
|
||||
"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
|
||||
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
|
||||
"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0"
|
||||
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
|
||||
"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"
|
||||
|
22
Cargo.toml
22
Cargo.toml
@ -1,14 +1,14 @@
|
||||
[package]
|
||||
name = "powersoftau"
|
||||
version = "0.1.2"
|
||||
version = "0.2.0"
|
||||
authors = ["Sean Bowe", "Alex Vlasov"]
|
||||
license = "MIT/Apache-2.0"
|
||||
edition = "2018"
|
||||
|
||||
description = "Communal zk-SNARK MPC for Public Parameters"
|
||||
documentation = "https://docs.rs/powersoftau/"
|
||||
homepage = "https://github.com/matterinc/powersoftau"
|
||||
repository = "https://github.com/matterinc/powersoftau"
|
||||
homepage = "https://github.com/matter-labs/powersoftau"
|
||||
repository = "https://github.com/matter-labs/powersoftau"
|
||||
|
||||
[dependencies]
|
||||
rand = "0.4"
|
||||
@ -24,13 +24,19 @@ rust-crypto = "0.2"
|
||||
memmap = "0.7.0"
|
||||
itertools = "0.8.0"
|
||||
|
||||
#ff = { path = "../ff", features = ["derive"] }
|
||||
#pairing = { path = "../pairing", features = ["expose-arith"]}
|
||||
#bellman = { path = "../bellman" }
|
||||
|
||||
ff = { git = 'https://github.com/matterinc/ff', features = ["derive"] }
|
||||
pairing = { git = 'https://github.com/matterinc/pairing', features = ["expose-arith"] }
|
||||
pairing = { git = 'https://github.com/matterinc/pairing', features = ["expose-arith"]}
|
||||
bellman = { git = 'https://github.com/matterinc/bellman'}
|
||||
|
||||
#ff = { git = 'https://github.com/matterinc/ff', features = ["derive"], rev = "056a13b9" }
|
||||
#pairing = { git = 'https://github.com/matterinc/pairing', features = ["expose-arith"], rev = "84b57df3" }
|
||||
#bellman = { git = 'https://github.com/matterinc/bellman', rev = "e775b47d"}
|
||||
|
||||
#[patch.'https://https://github.com/matterinc/ff']
|
||||
#ff = { git = 'https://github.com/matterinc/ff', features = ["derive"], rev = "056a13b9" }
|
||||
|
||||
#[patch.'https://https://github.com/matterinc/pairing']
|
||||
#pairing = { git = 'https://github.com/matterinc/pairing', features = ["expose-arith"], rev = "84b57df3" }
|
||||
|
||||
[features]
|
||||
|
||||
|
@ -432,10 +432,6 @@ impl<E:Engine, P: PowersOfTauParameters> BachedAccumulator<E, P> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// fn read_point<ENC: EncodedPoint>(
|
||||
|
||||
// ) ->
|
||||
|
||||
fn read_points_chunk<ENC: EncodedPoint>(
|
||||
&mut self,
|
||||
from: usize,
|
||||
|
@ -1,142 +0,0 @@
|
||||
extern crate powersoftau;
|
||||
extern crate rand;
|
||||
extern crate blake2;
|
||||
extern crate byteorder;
|
||||
|
||||
#[macro_use]
|
||||
extern crate hex_literal;
|
||||
|
||||
extern crate crypto;
|
||||
|
||||
use powersoftau::*;
|
||||
|
||||
use std::fs::OpenOptions;
|
||||
use std::io::{Read, BufReader, Write, BufWriter};
|
||||
|
||||
fn main() {
|
||||
// Create an RNG based on the outcome of the random beacon
|
||||
let mut rng = {
|
||||
use byteorder::{ReadBytesExt, BigEndian};
|
||||
use rand::{SeedableRng};
|
||||
use rand::chacha::ChaChaRng;
|
||||
use crypto::sha2::Sha256;
|
||||
use crypto::digest::Digest;
|
||||
|
||||
// Place block hash here (block number #514200)
|
||||
let mut cur_hash: [u8; 32] = hex!("00000000000000000034b33e842ac1c50456abe5fa92b60f6b3dfc5d247f7b58");
|
||||
|
||||
// Performs 2^n hash iterations over it
|
||||
const N: usize = 42;
|
||||
|
||||
for i in 0..(1u64<<N) {
|
||||
// Print 1024 of the interstitial states
|
||||
// so that verification can be
|
||||
// parallelized
|
||||
if i % (1u64<<(N-10)) == 0 {
|
||||
print!("{}: ", i);
|
||||
for b in cur_hash.iter() {
|
||||
print!("{:02x}", b);
|
||||
}
|
||||
println!("");
|
||||
}
|
||||
|
||||
let mut h = Sha256::new();
|
||||
h.input(&cur_hash);
|
||||
h.result(&mut cur_hash);
|
||||
}
|
||||
|
||||
print!("Final result of beacon: ");
|
||||
for b in cur_hash.iter() {
|
||||
print!("{:02x}", b);
|
||||
}
|
||||
println!("");
|
||||
|
||||
let mut digest = &cur_hash[..];
|
||||
|
||||
let mut seed = [0u32; 8];
|
||||
for i in 0..8 {
|
||||
seed[i] = digest.read_u32::<BigEndian>().expect("digest is large enough for this to work");
|
||||
}
|
||||
|
||||
ChaChaRng::from_seed(&seed)
|
||||
};
|
||||
|
||||
// Try to load `./challenge` from disk.
|
||||
let reader = OpenOptions::new()
|
||||
.read(true)
|
||||
.open("challenge").expect("unable open `./challenge` in this directory");
|
||||
|
||||
{
|
||||
let metadata = reader.metadata().expect("unable to get filesystem metadata for `./challenge`");
|
||||
if metadata.len() != (ACCUMULATOR_BYTE_SIZE as u64) {
|
||||
panic!("The size of `./challenge` should be {}, but it's {}, so something isn't right.", ACCUMULATOR_BYTE_SIZE, metadata.len());
|
||||
}
|
||||
}
|
||||
|
||||
let reader = BufReader::new(reader);
|
||||
let mut reader = HashReader::new(reader);
|
||||
|
||||
// Create `./response` in this directory
|
||||
let writer = OpenOptions::new()
|
||||
.read(false)
|
||||
.write(true)
|
||||
.create_new(true)
|
||||
.open("response").expect("unable to create `./response` in this directory");
|
||||
|
||||
let writer = BufWriter::new(writer);
|
||||
let mut writer = HashWriter::new(writer);
|
||||
|
||||
println!("Reading `./challenge` into memory...");
|
||||
|
||||
// Read the BLAKE2b hash of the previous contribution
|
||||
{
|
||||
// We don't need to do anything with it, but it's important for
|
||||
// the hash chain.
|
||||
let mut tmp = [0; 64];
|
||||
reader.read_exact(&mut tmp).expect("unable to read BLAKE2b hash of previous contribution");
|
||||
}
|
||||
|
||||
// Load the current accumulator into memory
|
||||
let mut current_accumulator = Accumulator::deserialize(&mut reader, UseCompression::No, CheckForCorrectness::No).expect("unable to read uncompressed accumulator");
|
||||
|
||||
// Get the hash of the current accumulator
|
||||
let current_accumulator_hash = reader.into_hash();
|
||||
|
||||
// Construct our keypair using the RNG we created above
|
||||
let (pubkey, privkey) = keypair(&mut rng, current_accumulator_hash.as_ref());
|
||||
|
||||
// Perform the transformation
|
||||
println!("Computing, this could take a while...");
|
||||
current_accumulator.transform(&privkey);
|
||||
println!("Writing your contribution to `./response`...");
|
||||
|
||||
// Write the hash of the input accumulator
|
||||
writer.write_all(¤t_accumulator_hash.as_ref()).expect("unable to write BLAKE2b hash of input accumulator");
|
||||
|
||||
// Write the transformed accumulator (in compressed form, to save upload bandwidth for disadvantaged
|
||||
// players.)
|
||||
current_accumulator.serialize(&mut writer, UseCompression::Yes).expect("unable to write transformed accumulator");
|
||||
|
||||
// Write the public key
|
||||
pubkey.serialize(&mut writer).expect("unable to write public key");
|
||||
|
||||
// Get the hash of the contribution, so the user can compare later
|
||||
let contribution_hash = writer.into_hash();
|
||||
|
||||
print!("Done!\n\n\
|
||||
Your contribution has been written to `./response`\n\n\
|
||||
The BLAKE2b hash of `./response` is:\n");
|
||||
|
||||
for line in contribution_hash.as_slice().chunks(16) {
|
||||
print!("\t");
|
||||
for section in line.chunks(4) {
|
||||
for b in section {
|
||||
print!("{:02x}", b);
|
||||
}
|
||||
print!(" ");
|
||||
}
|
||||
println!("");
|
||||
}
|
||||
|
||||
println!("\n");
|
||||
}
|
@ -40,26 +40,24 @@ fn main() {
|
||||
use crypto::sha2::Sha256;
|
||||
use crypto::digest::Digest;
|
||||
|
||||
// Place block hash here (block number #514200)
|
||||
let mut cur_hash: [u8; 32] = hex!("00000000000000000034b33e842ac1c50456abe5fa92b60f6b3dfc5d247f7b58");
|
||||
// Place block hash here (block number #564321)
|
||||
let mut cur_hash: [u8; 32] = hex!("0000000000000000000a558a61ddc8ee4e488d647a747fe4dcc362fe2026c620");
|
||||
|
||||
// Performs 2^n hash iterations over it
|
||||
// const N: usize = 42;
|
||||
|
||||
const N: usize = 16;
|
||||
const N: usize = 31;
|
||||
|
||||
for i in 0..(1u64<<N) {
|
||||
// Print 1024 of the interstitial states
|
||||
// so that verification can be
|
||||
// parallelized
|
||||
|
||||
// if i % (1u64<<(N-10)) == 0 {
|
||||
// print!("{}: ", i);
|
||||
// for b in cur_hash.iter() {
|
||||
// print!("{:02x}", b);
|
||||
// }
|
||||
// println!("");
|
||||
// }
|
||||
if i % (1u64<<(N-10)) == 0 {
|
||||
print!("{}: ", i);
|
||||
for b in cur_hash.iter() {
|
||||
print!("{:02x}", b);
|
||||
}
|
||||
println!("");
|
||||
}
|
||||
|
||||
let mut h = Sha256::new();
|
||||
h.input(&cur_hash);
|
||||
|
@ -1,128 +0,0 @@
|
||||
extern crate powersoftau;
|
||||
extern crate rand;
|
||||
extern crate blake2;
|
||||
extern crate byteorder;
|
||||
|
||||
use powersoftau::*;
|
||||
|
||||
use std::fs::OpenOptions;
|
||||
use std::io::{self, Read, BufReader, Write, BufWriter};
|
||||
|
||||
fn main() {
|
||||
// Create an RNG based on a mixture of system randomness and user provided randomness
|
||||
let mut rng = {
|
||||
use byteorder::{ReadBytesExt, BigEndian};
|
||||
use blake2::{Blake2b, Digest};
|
||||
use rand::{SeedableRng, Rng, OsRng};
|
||||
use rand::chacha::ChaChaRng;
|
||||
|
||||
let h = {
|
||||
let mut system_rng = OsRng::new().unwrap();
|
||||
let mut h = Blake2b::default();
|
||||
|
||||
// Gather 1024 bytes of entropy from the system
|
||||
for _ in 0..1024 {
|
||||
let r: u8 = system_rng.gen();
|
||||
h.input(&[r]);
|
||||
}
|
||||
|
||||
// Ask the user to provide some information for additional entropy
|
||||
let mut user_input = String::new();
|
||||
println!("Type some random text and press [ENTER] to provide additional entropy...");
|
||||
io::stdin().read_line(&mut user_input).expect("expected to read some random text from the user");
|
||||
|
||||
// Hash it all up to make a seed
|
||||
h.input(&user_input.as_bytes());
|
||||
h.result()
|
||||
};
|
||||
|
||||
let mut digest = &h[..];
|
||||
|
||||
// Interpret the first 32 bytes of the digest as 8 32-bit words
|
||||
let mut seed = [0u32; 8];
|
||||
for i in 0..8 {
|
||||
seed[i] = digest.read_u32::<BigEndian>().expect("digest is large enough for this to work");
|
||||
}
|
||||
|
||||
ChaChaRng::from_seed(&seed)
|
||||
};
|
||||
|
||||
// Try to load `./challenge` from disk.
|
||||
let reader = OpenOptions::new()
|
||||
.read(true)
|
||||
.open("challenge").expect("unable open `./challenge` in this directory");
|
||||
|
||||
{
|
||||
let metadata = reader.metadata().expect("unable to get filesystem metadata for `./challenge`");
|
||||
if metadata.len() != (ACCUMULATOR_BYTE_SIZE as u64) {
|
||||
panic!("The size of `./challenge` should be {}, but it's {}, so something isn't right.", ACCUMULATOR_BYTE_SIZE, metadata.len());
|
||||
}
|
||||
}
|
||||
|
||||
let reader = BufReader::new(reader);
|
||||
let mut reader = HashReader::new(reader);
|
||||
|
||||
// Create `./response` in this directory
|
||||
let writer = OpenOptions::new()
|
||||
.read(false)
|
||||
.write(true)
|
||||
.create_new(true)
|
||||
.open("response").expect("unable to create `./response` in this directory");
|
||||
|
||||
let writer = BufWriter::new(writer);
|
||||
let mut writer = HashWriter::new(writer);
|
||||
|
||||
println!("Reading `./challenge` into memory...");
|
||||
|
||||
// Read the BLAKE2b hash of the previous contribution
|
||||
{
|
||||
// We don't need to do anything with it, but it's important for
|
||||
// the hash chain.
|
||||
let mut tmp = [0; 64];
|
||||
reader.read_exact(&mut tmp).expect("unable to read BLAKE2b hash of previous contribution");
|
||||
}
|
||||
|
||||
// Load the current accumulator into memory
|
||||
let mut current_accumulator = Accumulator::deserialize(&mut reader, UseCompression::No, CheckForCorrectness::No).expect("unable to read uncompressed accumulator");
|
||||
|
||||
// Get the hash of the current accumulator
|
||||
let current_accumulator_hash = reader.into_hash();
|
||||
|
||||
// Construct our keypair using the RNG we created above
|
||||
let (pubkey, privkey) = keypair(&mut rng, current_accumulator_hash.as_ref());
|
||||
|
||||
// Perform the transformation
|
||||
println!("Computing, this could take a while...");
|
||||
current_accumulator.transform(&privkey);
|
||||
println!("Writing your contribution to `./response`...");
|
||||
|
||||
// Write the hash of the input accumulator
|
||||
writer.write_all(¤t_accumulator_hash.as_ref()).expect("unable to write BLAKE2b hash of input accumulator");
|
||||
|
||||
// Write the transformed accumulator (in compressed form, to save upload bandwidth for disadvantaged
|
||||
// players.)
|
||||
current_accumulator.serialize(&mut writer, UseCompression::Yes).expect("unable to write transformed accumulator");
|
||||
|
||||
// Write the public key
|
||||
pubkey.serialize(&mut writer).expect("unable to write public key");
|
||||
|
||||
// Get the hash of the contribution, so the user can compare later
|
||||
let contribution_hash = writer.into_hash();
|
||||
|
||||
print!("Done!\n\n\
|
||||
Your contribution has been written to `./response`\n\n\
|
||||
The BLAKE2b hash of `./response` is:\n");
|
||||
|
||||
for line in contribution_hash.as_slice().chunks(16) {
|
||||
print!("\t");
|
||||
for section in line.chunks(4) {
|
||||
for b in section {
|
||||
print!("{:02x}", b);
|
||||
}
|
||||
print!(" ");
|
||||
}
|
||||
println!("");
|
||||
}
|
||||
|
||||
println!("\n");
|
||||
}
|
@ -19,9 +19,9 @@ use std::io::Write;
|
||||
|
||||
use powersoftau::parameters::PowersOfTauParameters;
|
||||
|
||||
const input_is_compressed: UseCompression = UseCompression::No;
|
||||
const compress_the_output: UseCompression = UseCompression::Yes;
|
||||
const check_input_correctness: CheckForCorrectness = CheckForCorrectness::No;
|
||||
const INPUT_IS_COMPRESSED: UseCompression = UseCompression::No;
|
||||
const COMPRESS_THE_OUTPUT: UseCompression = UseCompression::Yes;
|
||||
const CHECK_INPUT_CORRECTNESS: CheckForCorrectness = CheckForCorrectness::No;
|
||||
|
||||
fn main() {
|
||||
println!("Will contribute to accumulator for 2^{} powers of tau", Bn256CeremonyParameters::REQUIRED_POWER);
|
||||
@ -72,7 +72,7 @@ fn main() {
|
||||
|
||||
{
|
||||
let metadata = reader.metadata().expect("unable to get filesystem metadata for `./challenge`");
|
||||
let expected_challenge_length = match input_is_compressed {
|
||||
let expected_challenge_length = match INPUT_IS_COMPRESSED {
|
||||
UseCompression::Yes => {
|
||||
Bn256CeremonyParameters::CONTRIBUTION_BYTE_SIZE
|
||||
},
|
||||
@ -95,7 +95,7 @@ fn main() {
|
||||
.create_new(true)
|
||||
.open("response").expect("unable to create `./response` in this directory");
|
||||
|
||||
let required_output_length = match compress_the_output {
|
||||
let required_output_length = match COMPRESS_THE_OUTPUT {
|
||||
UseCompression::Yes => {
|
||||
Bn256CeremonyParameters::CONTRIBUTION_BYTE_SIZE
|
||||
},
|
||||
@ -110,7 +110,7 @@ fn main() {
|
||||
|
||||
println!("Calculating previous contribution hash...");
|
||||
|
||||
assert!(UseCompression::No == input_is_compressed, "Hashing the compressed file in not yet defined");
|
||||
assert!(UseCompression::No == INPUT_IS_COMPRESSED, "Hashing the compressed file in not yet defined");
|
||||
let current_accumulator_hash = BachedAccumulator::<Bn256, Bn256CeremonyParameters>::calculate_hash(&readable_map);
|
||||
|
||||
{
|
||||
@ -141,16 +141,16 @@ fn main() {
|
||||
BachedAccumulator::<Bn256, Bn256CeremonyParameters>::transform(
|
||||
&readable_map,
|
||||
&mut writable_map,
|
||||
input_is_compressed,
|
||||
compress_the_output,
|
||||
check_input_correctness,
|
||||
INPUT_IS_COMPRESSED,
|
||||
COMPRESS_THE_OUTPUT,
|
||||
CHECK_INPUT_CORRECTNESS,
|
||||
&privkey
|
||||
).expect("must transform with the key");
|
||||
|
||||
println!("Finihsing writing your contribution to `./response`...");
|
||||
|
||||
// Write the public key
|
||||
pubkey.write::<Bn256CeremonyParameters>(&mut writable_map, compress_the_output).expect("unable to write public key");
|
||||
pubkey.write::<Bn256CeremonyParameters>(&mut writable_map, COMPRESS_THE_OUTPUT).expect("unable to write public key");
|
||||
|
||||
writable_map.flush().expect("must flush a memory map");
|
||||
|
||||
|
@ -1,24 +0,0 @@
|
||||
extern crate powersoftau;
|
||||
use powersoftau::*;
|
||||
|
||||
use std::fs::OpenOptions;
|
||||
use std::io::{Write, BufWriter};
|
||||
|
||||
fn main() {
|
||||
let writer = OpenOptions::new()
|
||||
.read(false)
|
||||
.write(true)
|
||||
.create_new(true)
|
||||
.open("challenge").expect("unable to create `./challenge`");
|
||||
|
||||
let mut writer = BufWriter::new(writer);
|
||||
|
||||
// Write a blank BLAKE2b hash:
|
||||
writer.write_all(&blank_hash().as_slice()).expect("unable to write blank hash to `./challenge`");
|
||||
|
||||
let acc = Accumulator::new();
|
||||
acc.serialize(&mut writer, UseCompression::No).expect("unable to write fresh accumulator to `./challenge`");
|
||||
writer.flush().expect("unable to flush accumulator to disk");
|
||||
|
||||
println!("Wrote a fresh accumulator to `./challenge`");
|
||||
}
|
@ -1,117 +0,0 @@
|
||||
extern crate powersoftau;
|
||||
use powersoftau::*;
|
||||
|
||||
use std::fs::OpenOptions;
|
||||
use std::io::{Read, Write, BufWriter, BufReader};
|
||||
|
||||
fn main() {
|
||||
// Try to load `./challenge` from disk.
|
||||
let challenge_reader = OpenOptions::new()
|
||||
.read(true)
|
||||
.open("challenge").expect("unable open `./challenge` in this directory");
|
||||
|
||||
{
|
||||
let metadata = challenge_reader.metadata().expect("unable to get filesystem metadata for `./challenge`");
|
||||
if metadata.len() != (ACCUMULATOR_BYTE_SIZE as u64) {
|
||||
panic!("The size of `./challenge` should be {}, but it's {}, so something isn't right.", ACCUMULATOR_BYTE_SIZE, metadata.len());
|
||||
}
|
||||
}
|
||||
|
||||
let challenge_reader = BufReader::new(challenge_reader);
|
||||
let mut challenge_reader = HashReader::new(challenge_reader);
|
||||
|
||||
// Try to load `./response` from disk.
|
||||
let response_reader = OpenOptions::new()
|
||||
.read(true)
|
||||
.open("response").expect("unable open `./response` in this directory");
|
||||
|
||||
{
|
||||
let metadata = response_reader.metadata().expect("unable to get filesystem metadata for `./response`");
|
||||
if metadata.len() != (CONTRIBUTION_BYTE_SIZE as u64) {
|
||||
panic!("The size of `./response` should be {}, but it's {}, so something isn't right.", CONTRIBUTION_BYTE_SIZE, metadata.len());
|
||||
}
|
||||
}
|
||||
|
||||
let response_reader = BufReader::new(response_reader);
|
||||
let mut response_reader = HashReader::new(response_reader);
|
||||
|
||||
// Create new_challenge file
|
||||
let writer = OpenOptions::new()
|
||||
.read(false)
|
||||
.write(true)
|
||||
.create_new(true)
|
||||
.open("new_challenge").expect("unable to create `./new_challenge`");
|
||||
|
||||
let mut writer = BufWriter::new(writer);
|
||||
|
||||
// Deserialize the current challenge
|
||||
|
||||
// Read the BLAKE2b hash of the previous contribution
|
||||
{
|
||||
// We don't need to do anything with it, but it's important for
|
||||
// the hash chain.
|
||||
let mut tmp = [0; 64];
|
||||
challenge_reader.read_exact(&mut tmp).expect("unable to read BLAKE2b hash of previous contribution");
|
||||
}
|
||||
|
||||
// Load the current accumulator into memory
|
||||
let current_accumulator = Accumulator::deserialize(
|
||||
&mut challenge_reader,
|
||||
UseCompression::No,
|
||||
CheckForCorrectness::No // no need to check since we constructed the challenge already
|
||||
).expect("unable to read uncompressed accumulator");
|
||||
|
||||
// Get the hash of the current accumulator
|
||||
let current_accumulator_hash = challenge_reader.into_hash();
|
||||
|
||||
// Load the response into memory
|
||||
|
||||
// Check the hash chain
|
||||
{
|
||||
let mut response_challenge_hash = [0; 64];
|
||||
response_reader.read_exact(&mut response_challenge_hash).expect("couldn't read hash of challenge file from response file");
|
||||
|
||||
if &response_challenge_hash[..] != current_accumulator_hash.as_slice() {
|
||||
panic!("Hash chain failure. This is not the right response.");
|
||||
}
|
||||
}
|
||||
|
||||
// Load the response's accumulator
|
||||
let new_accumulator = Accumulator::deserialize(&mut response_reader, UseCompression::Yes, CheckForCorrectness::Yes)
|
||||
.expect("wasn't able to deserialize the response file's accumulator");
|
||||
|
||||
// Load the response's pubkey
|
||||
let public_key = PublicKey::deserialize(&mut response_reader)
|
||||
.expect("wasn't able to deserialize the response file's public key");
|
||||
|
||||
// Get the hash of the response file
|
||||
let response_hash = response_reader.into_hash();
|
||||
|
||||
if !verify_transform(¤t_accumulator, &new_accumulator, &public_key, current_accumulator_hash.as_slice()) {
|
||||
println!("Verification failed, contribution was invalid somehow.");
|
||||
panic!("INVALID CONTRIBUTION!!!");
|
||||
} else {
|
||||
println!("Verification succeeded!");
|
||||
}
|
||||
|
||||
println!("Here's the BLAKE2b hash of the participant's response file:");
|
||||
|
||||
for line in response_hash.as_slice().chunks(16) {
|
||||
print!("\t");
|
||||
for section in line.chunks(4) {
|
||||
for b in section {
|
||||
print!("{:02x}", b);
|
||||
}
|
||||
print!(" ");
|
||||
}
|
||||
println!("");
|
||||
}
|
||||
|
||||
println!("Verification succeeded! Writing to `./new_challenge`...");
|
||||
|
||||
writer.write_all(response_hash.as_slice()).expect("couldn't write response file's hash into the `./new_challenge` file");
|
||||
new_accumulator.serialize(&mut writer, UseCompression::No).expect("unable to write uncompressed accumulator into the `./new_challenge` file");
|
||||
|
||||
println!("Done! `./new_challenge` contains the new challenge file. The other files");
|
||||
println!("were left alone.");
|
||||
}
|
5
test.sh
5
test.sh
@ -7,13 +7,12 @@ rm challenge_old
|
||||
rm response_old
|
||||
|
||||
cargo run --release --bin new_constrained
|
||||
cargo run --release --bin beacon_constrained
|
||||
cargo run --release --bin compute_constrained
|
||||
cargo run --release --bin verify_transform_constrained
|
||||
|
||||
mv challenge challenge_old
|
||||
mv response response_old
|
||||
|
||||
mv new_challenge challenge
|
||||
|
||||
cargo run --release --bin compute_constrained
|
||||
cargo run --release --bin beacon_constrained
|
||||
cargo run --release --bin verify_transform_constrained
|
Loading…
Reference in New Issue
Block a user