diff --git a/Cargo.lock b/Cargo.lock index 968b511..ec72ebc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,16 +1,24 @@ +[[package]] +name = "arrayvec" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "bellman" -version = "0.1.3" -source = "git+https://github.com/matterinc/bellman#e775b47d99562243f4ed3ab432eb3a56ad9493a3" +version = "0.2.0" +source = "git+https://github.com/matterinc/bellman?tag=0.2.0#6e45a4b233e97a71f4a8a0565c8f8d753c04c08f" dependencies = [ "bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "blake2-rfc 0.2.18 (git+https://github.com/gtank/blake2-rfc?rev=7a5b5fc99ae483a0043db7547fb79a6fa44b88a9)", "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)", + "crossbeam 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "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.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pairing 0.15.2 (git+https://github.com/matterinc/pairing)", + "pairing 0.16.2 (git+https://github.com/matterinc/pairing?tag=0.16.2)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -30,6 +38,16 @@ dependencies = [ "generic-array 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "blake2-rfc" +version = "0.2.18" +source = "git+https://github.com/gtank/blake2-rfc?rev=7a5b5fc99ae483a0043db7547fb79a6fa44b88a9#7a5b5fc99ae483a0043db7547fb79a6fa44b88a9" +dependencies = [ + "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "byte-tools" version = "0.2.0" @@ -40,6 +58,11 @@ name = "byteorder" version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "cfg-if" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "constant_time_eq" version = "0.1.3" @@ -50,6 +73,67 @@ name = "crossbeam" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "crossbeam" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-channel" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-deque" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-queue" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-utils" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "crypto-mac" version = "0.4.0" @@ -75,17 +159,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "ff" version = "0.5.0" -source = "git+https://github.com/matterinc/ff#056a13b95f4b971a9ae2c6fbb5fbc9f1e4f4828e" +source = "git+https://github.com/matterinc/ff?tag=0.5#056a13b95f4b971a9ae2c6fbb5fbc9f1e4f4828e" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "ff_derive 0.4.0 (git+https://github.com/matterinc/ff)", + "ff_derive 0.4.0 (git+https://github.com/matterinc/ff?tag=0.5)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ff_derive" version = "0.4.0" -source = "git+https://github.com/matterinc/ff#056a13b95f4b971a9ae2c6fbb5fbc9f1e4f4828e" +source = "git+https://github.com/matterinc/ff?tag=0.5#056a13b95f4b971a9ae2c6fbb5fbc9f1e4f4828e" 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)", @@ -164,6 +248,11 @@ name = "itoa" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "lazy_static" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "libc" version = "0.2.49" @@ -178,6 +267,11 @@ dependencies = [ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "memoffset" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "nodrop" version = "0.1.13" @@ -215,11 +309,11 @@ dependencies = [ [[package]] name = "pairing" -version = "0.15.2" -source = "git+https://github.com/matterinc/pairing#84b57df3259c2f41d97744792cc89269e261d44e" +version = "0.16.2" +source = "git+https://github.com/matterinc/pairing?tag=0.16.2#c2af46cac3e6ebc8e1e1f37bb993e5e6c7f689d1" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "ff 0.5.0 (git+https://github.com/matterinc/ff)", + "ff 0.5.0 (git+https://github.com/matterinc/ff?tag=0.5)", "hex 0.3.2 (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)", @@ -231,17 +325,15 @@ dependencies = [ name = "powersoftau" version = "0.2.0" dependencies = [ - "bellman 0.1.3 (git+https://github.com/matterinc/bellman)", + "bellman 0.2.0 (git+https://github.com/matterinc/bellman?tag=0.2.0)", "blake2 0.6.1 (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.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.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)", @@ -345,6 +437,11 @@ name = "ryu" version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "scopeguard" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "serde" version = "1.0.88" @@ -370,6 +467,11 @@ dependencies = [ "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "smallvec" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "syn" version = "0.14.9" @@ -430,18 +532,27 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] -"checksum bellman 0.1.3 (git+https://github.com/matterinc/bellman)" = "" +"checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71" +"checksum bellman 0.2.0 (git+https://github.com/matterinc/bellman?tag=0.2.0)" = "" "checksum bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "02b4ff8b16e6076c3e14220b39fbc1fabb6737522281a388998046859400895f" "checksum blake2 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "53bf612c0f2839b7e764ebac65d6cb985f7c6812de399d0728038f4b1da141bc" +"checksum blake2-rfc 0.2.18 (git+https://github.com/gtank/blake2-rfc?rev=7a5b5fc99ae483a0043db7547fb79a6fa44b88a9)" = "" "checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" "checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" +"checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" "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 crossbeam 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b14492071ca110999a20bf90e3833406d5d66bfd93b4e52ec9539025ff43fe0d" +"checksum crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f0ed1a4de2235cabda8558ff5840bffb97fcb64c97827f354a451307df5f72b" +"checksum crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18cd2e169ad86297e6bc0ad9aa679aee9daa4f19e8163860faf7c164e4f5a71" +"checksum crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "04c9e3102cc2d69cd681412141b390abd55a362afc1540965dad0ad4d34280b4" +"checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" +"checksum crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f8306fcef4a7b563b76b7dd949ca48f52bc1141aa067d2ea09565f3e2652aa5c" "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.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c67353c641dc847124ea1902d69bd753dee9bb3beff9aa3662ecf86c971d1fac" -"checksum ff 0.5.0 (git+https://github.com/matterinc/ff)" = "" -"checksum ff_derive 0.4.0 (git+https://github.com/matterinc/ff)" = "" +"checksum ff 0.5.0 (git+https://github.com/matterinc/ff?tag=0.5)" = "" +"checksum ff_derive 0.4.0 (git+https://github.com/matterinc/ff?tag=0.5)" = "" "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" @@ -452,14 +563,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "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 lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" "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 memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "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.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba" -"checksum pairing 0.15.2 (git+https://github.com/matterinc/pairing)" = "" +"checksum pairing 0.16.2 (git+https://github.com/matterinc/pairing?tag=0.16.2)" = "" "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.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915" @@ -473,9 +586,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "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 scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "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 smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be" "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 time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" diff --git a/Cargo.toml b/Cargo.toml index 9edb8d2..98c49b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,19 +24,7 @@ rust-crypto = "0.2" memmap = "0.7.0" itertools = "0.8.0" -ff = { git = 'https://github.com/matterinc/ff', features = ["derive"] } -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" } +bellman = { git = 'https://github.com/matterinc/bellman', tag = "0.2.0"} [features] diff --git a/src/accumulator.rs b/src/accumulator.rs index 4032911..cce9d3a 100644 --- a/src/accumulator.rs +++ b/src/accumulator.rs @@ -25,8 +25,6 @@ //! After some time has elapsed for participants to contribute to the ceremony, a participant is //! simulated with a randomness beacon. The resulting `Accumulator` contains partial zk-SNARK //! public parameters for all circuits within a bounded size. - -extern crate pairing; extern crate rand; extern crate crossbeam; extern crate num_cpus; @@ -34,16 +32,16 @@ extern crate blake2; extern crate generic_array; extern crate typenum; extern crate byteorder; -extern crate ff; +extern crate bellman; extern crate memmap; use memmap::{Mmap, MmapMut}; -use ff::{Field, PrimeField}; +use bellman::pairing::ff::{Field, PrimeField}; use byteorder::{ReadBytesExt, BigEndian}; use rand::{SeedableRng, Rng, Rand}; use rand::chacha::ChaChaRng; -use pairing::bn256::{Bn256}; -use pairing::*; +use bellman::pairing::bn256::{Bn256}; +use bellman::pairing::*; use std::io::{self, Read, Write}; use std::sync::{Arc, Mutex}; use generic_array::GenericArray; diff --git a/src/batched_accumulator.rs b/src/batched_accumulator.rs index e840e91..9bd9b16 100644 --- a/src/batched_accumulator.rs +++ b/src/batched_accumulator.rs @@ -1,7 +1,6 @@ /// Memory constrained accumulator that checks parts of the initial information in parts that fit to memory /// and then contributes to entropy in parts as well -extern crate pairing; extern crate rand; extern crate crossbeam; extern crate num_cpus; @@ -9,18 +8,18 @@ extern crate blake2; extern crate generic_array; extern crate typenum; extern crate byteorder; -extern crate ff; +extern crate bellman; extern crate memmap; extern crate itertools; use itertools::Itertools; use memmap::{Mmap, MmapMut}; -use ff::{Field, PrimeField}; +use bellman::pairing::ff::{Field, PrimeField}; use byteorder::{ReadBytesExt, BigEndian}; use rand::{SeedableRng, Rng, Rand}; use rand::chacha::ChaChaRng; -use pairing::bn256::{Bn256}; -use pairing::*; +use bellman::pairing::bn256::{Bn256}; +use bellman::pairing::*; use std::io::{self, Read, Write}; use std::sync::{Arc, Mutex}; use generic_array::GenericArray; diff --git a/src/bin/beacon_constrained.rs b/src/bin/beacon_constrained.rs index 8e0438d..bcedef3 100644 --- a/src/bin/beacon_constrained.rs +++ b/src/bin/beacon_constrained.rs @@ -1,5 +1,5 @@ extern crate powersoftau; -extern crate pairing; +extern crate bellman; extern crate memmap; extern crate rand; extern crate blake2; @@ -13,7 +13,7 @@ use powersoftau::keypair::{keypair}; use powersoftau::parameters::{UseCompression, CheckForCorrectness}; use std::fs::OpenOptions; -use pairing::bn256::Bn256; +use bellman::pairing::bn256::Bn256; use memmap::*; use std::io::Write; diff --git a/src/bin/compute_constrained.rs b/src/bin/compute_constrained.rs index 6d904d1..46d4ad3 100644 --- a/src/bin/compute_constrained.rs +++ b/src/bin/compute_constrained.rs @@ -1,5 +1,5 @@ extern crate powersoftau; -extern crate pairing; +extern crate bellman; extern crate memmap; extern crate rand; extern crate blake2; @@ -12,7 +12,7 @@ use powersoftau::keypair::{keypair}; use powersoftau::parameters::{UseCompression, CheckForCorrectness}; use std::fs::OpenOptions; -use pairing::bn256::Bn256; +use bellman::pairing::bn256::Bn256; use memmap::*; use std::io::Write; diff --git a/src/bin/new.rs b/src/bin/new.rs index fcf5408..b04d176 100644 --- a/src/bin/new.rs +++ b/src/bin/new.rs @@ -1,5 +1,5 @@ extern crate powersoftau; -extern crate pairing; +extern crate bellman; // use powersoftau::bn256::{Bn256CeremonyParameters}; use powersoftau::small_bn256::{Bn256CeremonyParameters}; @@ -9,7 +9,7 @@ use powersoftau::parameters::{UseCompression}; use std::fs::OpenOptions; use std::io::{Write, BufWriter}; -use pairing::bn256::Bn256; +use bellman::pairing::bn256::Bn256; fn main() { let writer = OpenOptions::new() diff --git a/src/bin/new_constrained.rs b/src/bin/new_constrained.rs index 4d63365..36c6b5a 100644 --- a/src/bin/new_constrained.rs +++ b/src/bin/new_constrained.rs @@ -1,5 +1,5 @@ extern crate powersoftau; -extern crate pairing; +extern crate bellman; extern crate memmap; // use powersoftau::bn256::{Bn256CeremonyParameters}; @@ -10,7 +10,7 @@ use powersoftau::utils::{blank_hash}; use std::fs::OpenOptions; use std::io::{Write}; -use pairing::bn256::Bn256; +use bellman::pairing::bn256::Bn256; use memmap::*; use powersoftau::parameters::PowersOfTauParameters; diff --git a/src/bin/verify.rs.nocompile b/src/bin/verify.rs.nocompile index ece1fcc..cdf8158 100644 --- a/src/bin/verify.rs.nocompile +++ b/src/bin/verify.rs.nocompile @@ -5,8 +5,8 @@ extern crate blake2; extern crate byteorder; extern crate bellman; -use pairing::{CurveAffine, CurveProjective}; -use pairing::bls12_381::{G1, G2}; +use bellman::pairing::{CurveAffine, CurveProjective}; +use bellman::pairing::bls12_381::{G1, G2}; use powersoftau::*; use bellman::multicore::Worker; diff --git a/src/bin/verify_transform_constrained.rs b/src/bin/verify_transform_constrained.rs index 8727f66..2a3a375 100644 --- a/src/bin/verify_transform_constrained.rs +++ b/src/bin/verify_transform_constrained.rs @@ -1,5 +1,5 @@ extern crate powersoftau; -extern crate pairing; +extern crate bellman; extern crate memmap; extern crate rand; extern crate blake2; @@ -12,7 +12,7 @@ use powersoftau::keypair::{PublicKey}; use powersoftau::parameters::{UseCompression, CheckForCorrectness}; use std::fs::OpenOptions; -use pairing::bn256::Bn256; +use bellman::pairing::bn256::Bn256; use memmap::*; use std::io::{Read, Write}; diff --git a/src/bls12_381/mod.rs b/src/bls12_381/mod.rs index 22c82d8..665c23b 100644 --- a/src/bls12_381/mod.rs +++ b/src/bls12_381/mod.rs @@ -34,12 +34,13 @@ extern crate blake2; extern crate generic_array; extern crate typenum; extern crate byteorder; +extern crate bellman; use byteorder::{ReadBytesExt, BigEndian}; use rand::{SeedableRng, Rng, Rand}; use rand::chacha::ChaChaRng; -use pairing::bls12_381::*; -use pairing::*; +use bellman::pairing::bls12_381::*; +use bellman::pairing::*; use std::io::{self, Read, Write}; use std::sync::{Arc, Mutex}; use generic_array::GenericArray; diff --git a/src/bn256/mod.rs b/src/bn256/mod.rs index b2fafa9..a59285a 100644 --- a/src/bn256/mod.rs +++ b/src/bn256/mod.rs @@ -1,4 +1,3 @@ -extern crate pairing; extern crate rand; extern crate crossbeam; extern crate num_cpus; @@ -6,14 +5,14 @@ extern crate blake2; extern crate generic_array; extern crate typenum; extern crate byteorder; -extern crate ff; +extern crate bellman; -use self::ff::{Field, PrimeField}; +use self::bellman::pairing::ff::{Field, PrimeField}; use self::byteorder::{ReadBytesExt, BigEndian}; use self::rand::{SeedableRng, Rng, Rand}; use self::rand::chacha::ChaChaRng; -use self::pairing::bn256::{Bn256}; -use self::pairing::*; +use self::bellman::pairing::bn256::{Bn256}; +use self::bellman::pairing::*; use std::io::{self, Read, Write}; use std::sync::{Arc, Mutex}; use self::generic_array::GenericArray; diff --git a/src/keypair.rs b/src/keypair.rs index a49591d..e3bb9ac 100644 --- a/src/keypair.rs +++ b/src/keypair.rs @@ -1,4 +1,3 @@ -extern crate pairing; extern crate rand; extern crate crossbeam; extern crate num_cpus; @@ -6,18 +5,18 @@ extern crate blake2; extern crate generic_array; extern crate typenum; extern crate byteorder; -extern crate ff; +extern crate bellman; extern crate memmap; extern crate itertools; use itertools::Itertools; use memmap::{Mmap, MmapMut}; -use self::ff::{Field, PrimeField}; +use self::bellman::pairing::ff::{Field, PrimeField}; use self::byteorder::{ReadBytesExt, BigEndian}; use self::rand::{SeedableRng, Rng, Rand}; use self::rand::chacha::ChaChaRng; -use self::pairing::bn256::{Bn256}; -use self::pairing::*; +use self::bellman::pairing::bn256::{Bn256}; +use self::bellman::pairing::*; use std::io::{self, Read, Write}; use std::sync::{Arc, Mutex}; use self::generic_array::GenericArray; diff --git a/src/parameters.rs b/src/parameters.rs index ab35351..0b56013 100644 --- a/src/parameters.rs +++ b/src/parameters.rs @@ -1,4 +1,3 @@ -extern crate pairing; extern crate rand; extern crate crossbeam; extern crate num_cpus; @@ -6,14 +5,14 @@ extern crate blake2; extern crate generic_array; extern crate typenum; extern crate byteorder; -extern crate ff; +extern crate bellman; -use ff::{Field, PrimeField}; +use bellman::pairing::ff::{Field, PrimeField}; use byteorder::{ReadBytesExt, BigEndian}; use rand::{SeedableRng, Rng, Rand}; use rand::chacha::ChaChaRng; -use pairing::bn256::{Bn256}; -use pairing::*; +use bellman::pairing::bn256::{Bn256}; +use bellman::pairing::*; use std::io::{self, Read, Write}; use std::sync::{Arc, Mutex}; use generic_array::GenericArray; diff --git a/src/small_bn256/mod.rs b/src/small_bn256/mod.rs index 8c47568..0d9876d 100644 --- a/src/small_bn256/mod.rs +++ b/src/small_bn256/mod.rs @@ -1,4 +1,3 @@ -extern crate pairing; extern crate rand; extern crate crossbeam; extern crate num_cpus; @@ -6,14 +5,14 @@ extern crate blake2; extern crate generic_array; extern crate typenum; extern crate byteorder; -extern crate ff; +extern crate bellman; -use self::ff::{Field, PrimeField}; +use self::bellman::pairing::ff::{Field, PrimeField}; use self::byteorder::{ReadBytesExt, BigEndian}; use self::rand::{SeedableRng, Rng, Rand}; use self::rand::chacha::ChaChaRng; -use self::pairing::bn256::{Bn256}; -use self::pairing::*; +use self::bellman::pairing::bn256::{Bn256}; +use self::bellman::pairing::*; use std::io::{self, Read, Write}; use std::sync::{Arc, Mutex}; use self::generic_array::GenericArray; diff --git a/src/utils.rs b/src/utils.rs index 48336bd..fddd40c 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,4 +1,3 @@ -extern crate pairing; extern crate rand; extern crate crossbeam; extern crate num_cpus; @@ -6,14 +5,14 @@ extern crate blake2; extern crate generic_array; extern crate typenum; extern crate byteorder; -extern crate ff; +extern crate bellman; -use ff::{Field, PrimeField}; +use bellman::pairing::ff::{Field, PrimeField}; use byteorder::{ReadBytesExt, BigEndian}; use rand::{SeedableRng, Rng, Rand}; use rand::chacha::ChaChaRng; -use pairing::bn256::{Bn256}; -use pairing::*; +use bellman::pairing::bn256::{Bn256}; +use bellman::pairing::*; use std::io::{self, Read, Write}; use std::sync::{Arc, Mutex}; use generic_array::GenericArray;