From 10286b98f095a6768db534c3b88f20231edbc148 Mon Sep 17 00:00:00 2001 From: Pascal Berrang Date: Mon, 20 Nov 2023 12:48:19 -0600 Subject: [PATCH] Add nimiq e2e test script --- Cargo.lock | 357 ++++++++++++++++++++----------------------- e2e/nimiq_e2e.sh | 105 +++++++++++++ src/bin/new_setup.rs | 7 - 3 files changed, 273 insertions(+), 196 deletions(-) create mode 100755 e2e/nimiq_e2e.sh diff --git a/Cargo.lock b/Cargo.lock index e66481e..49eadc4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -91,9 +91,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72832d73be48bac96a5d7944568f305d829ed55b0ce3b483647089dfaf6cf704" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ "cfg-if", "once_cell", @@ -407,9 +407,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f658e2baef915ba0f26f1f7c42bfb8e12f532a01f449a090ded75ae7a07e9ba2" +checksum = "bc2d0cfb2a7388d34f590e76686704c494ed7aaceed62ee1ba35cbf363abc2a5" dependencies = [ "flate2", "futures-core", @@ -432,7 +432,7 @@ dependencies = [ "log", "parking", "polling", - "rustix 0.37.26", + "rustix 0.37.27", "slab", "socket2 0.4.10", "waker-fn", @@ -455,7 +455,7 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -484,7 +484,7 @@ dependencies = [ "bytes", "dyn-clone", "futures", - "getrandom 0.2.10", + "getrandom 0.2.11", "http-types", "log", "paste", @@ -849,9 +849,9 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fbc60abd742b35f2492f808e1abbb83d45f72db402e14c55057edc9c7b1e9e4" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] @@ -1016,13 +1016,13 @@ dependencies = [ [[package]] name = "curve25519-dalek-derive" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -1100,7 +1100,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -1111,9 +1111,9 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "dyn-clone" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "ed25519" @@ -1198,9 +1198,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" +checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" dependencies = [ "libc", "windows-sys 0.48.0", @@ -1229,9 +1229,9 @@ checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fiat-crypto" -version = "0.2.1" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0870c84016d4b481be5c9f323c24f65e31e901ae618f0e80f4308fb00de1d2d" +checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" [[package]] name = "find-crate" @@ -1331,9 +1331,9 @@ checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" [[package]] name = "futures" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" dependencies = [ "futures-channel", "futures-core", @@ -1346,9 +1346,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ "futures-core", "futures-sink", @@ -1356,15 +1356,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ "futures-core", "futures-task", @@ -1373,9 +1373,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] name = "futures-lite" @@ -1394,13 +1394,13 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -1416,21 +1416,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ "futures-channel", "futures-core", @@ -1467,9 +1467,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", "js-sys", @@ -1526,9 +1526,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.21" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" dependencies = [ "bytes", "fnv", @@ -1536,7 +1536,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap", "slab", "tokio", "tokio-util", @@ -1552,12 +1552,6 @@ dependencies = [ "byteorder", ] -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - [[package]] name = "hashbrown" version = "0.13.2" @@ -1643,9 +1637,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -1742,7 +1736,7 @@ dependencies = [ "serde", "serde_derive", "thiserror", - "toml 0.8.2", + "toml 0.8.8", "unic-langid", ] @@ -1834,19 +1828,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", "hashbrown 0.14.2", @@ -1941,9 +1925,9 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" dependencies = [ "wasm-bindgen", ] @@ -1968,9 +1952,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.149" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "linux-raw-sys" @@ -1980,9 +1964,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" +checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" [[package]] name = "lock_api" @@ -2069,9 +2053,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -2109,12 +2093,12 @@ dependencies = [ [[package]] name = "nimiq-database-value" version = "0.1.0" -source = "git+https://github.com/nimiq/core-rs-albatross#18ff158bea6803ba6dfae5f6d2e17f6fd318df6c" +source = "git+https://github.com/nimiq/core-rs-albatross#a7d392c818e641bf9058f0f8e306c2dc341d9eb4" [[package]] name = "nimiq-hash" version = "0.1.0" -source = "git+https://github.com/nimiq/core-rs-albatross#18ff158bea6803ba6dfae5f6d2e17f6fd318df6c" +source = "git+https://github.com/nimiq/core-rs-albatross#a7d392c818e641bf9058f0f8e306c2dc341d9eb4" dependencies = [ "blake2-rfc", "byteorder", @@ -2131,17 +2115,17 @@ dependencies = [ [[package]] name = "nimiq-hash_derive" version = "0.1.0" -source = "git+https://github.com/nimiq/core-rs-albatross#18ff158bea6803ba6dfae5f6d2e17f6fd318df6c" +source = "git+https://github.com/nimiq/core-rs-albatross#a7d392c818e641bf9058f0f8e306c2dc341d9eb4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "nimiq-keys" version = "0.1.0" -source = "git+https://github.com/nimiq/core-rs-albatross#18ff158bea6803ba6dfae5f6d2e17f6fd318df6c" +source = "git+https://github.com/nimiq/core-rs-albatross#a7d392c818e641bf9058f0f8e306c2dc341d9eb4" dependencies = [ "curve25519-dalek 4.1.1", "data-encoding", @@ -2164,7 +2148,7 @@ dependencies = [ [[package]] name = "nimiq-macros" version = "0.1.1" -source = "git+https://github.com/nimiq/core-rs-albatross#18ff158bea6803ba6dfae5f6d2e17f6fd318df6c" +source = "git+https://github.com/nimiq/core-rs-albatross#a7d392c818e641bf9058f0f8e306c2dc341d9eb4" dependencies = [ "hex", "nimiq-serde", @@ -2175,12 +2159,12 @@ dependencies = [ [[package]] name = "nimiq-mmr" version = "0.1.0" -source = "git+https://github.com/nimiq/core-rs-albatross#18ff158bea6803ba6dfae5f6d2e17f6fd318df6c" +source = "git+https://github.com/nimiq/core-rs-albatross#a7d392c818e641bf9058f0f8e306c2dc341d9eb4" [[package]] name = "nimiq-serde" version = "0.1.0" -source = "git+https://github.com/nimiq/core-rs-albatross#18ff158bea6803ba6dfae5f6d2e17f6fd318df6c" +source = "git+https://github.com/nimiq/core-rs-albatross#a7d392c818e641bf9058f0f8e306c2dc341d9eb4" dependencies = [ "hex", "postcard", @@ -2192,7 +2176,7 @@ dependencies = [ [[package]] name = "nimiq-utils" version = "0.1.0" -source = "git+https://github.com/nimiq/core-rs-albatross#18ff158bea6803ba6dfae5f6d2e17f6fd318df6c" +source = "git+https://github.com/nimiq/core-rs-albatross#a7d392c818e641bf9058f0f8e306c2dc341d9eb4" dependencies = [ "futures-util", "nimiq-database-value", @@ -2332,9 +2316,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.57" +version = "0.10.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" +checksum = "7a257ad03cd8fb16ad4172fedf8094451e1af1c4b70097636ef2eac9a5f0cc33" dependencies = [ "bitflags 2.4.1", "cfg-if", @@ -2353,7 +2337,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2364,18 +2348,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.1.5+3.1.3" +version = "300.1.6+3.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "559068e4c12950d7dcaa1857a61725c0d38d4fc03ff8e070ab31a75d6e316491" +checksum = "439fac53e092cd7442a3660c85dde4643ab3b5bd39040912388dcdabf6b88085" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.93" +version = "0.9.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" +checksum = "40a4130519a360279579c2053038317e40eff64d13fd3f004f9e1b72b8a6aaf9" dependencies = [ "cc", "libc", @@ -2491,7 +2475,7 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "phase1" version = "0.3.0" -source = "git+https://github.com/nimiq/snark-setup#7e2c9694b5aa953a46ac5ff0528bc0fcc195ff69" +source = "git+https://github.com/nimiq/snark-setup#d5f04b70f15138fe40d63cf3460bf577dbf4ece3" dependencies = [ "ark-ec", "ark-ff", @@ -2512,7 +2496,7 @@ dependencies = [ [[package]] name = "phase1-cli" version = "0.3.0" -source = "git+https://github.com/nimiq/snark-setup#7e2c9694b5aa953a46ac5ff0528bc0fcc195ff69" +source = "git+https://github.com/nimiq/snark-setup#d5f04b70f15138fe40d63cf3460bf577dbf4ece3" dependencies = [ "ark-bls12-377", "ark-bls12-381", @@ -2534,7 +2518,7 @@ dependencies = [ [[package]] name = "phase2" version = "0.3.0" -source = "git+https://github.com/nimiq/snark-setup#7e2c9694b5aa953a46ac5ff0528bc0fcc195ff69" +source = "git+https://github.com/nimiq/snark-setup#d5f04b70f15138fe40d63cf3460bf577dbf4ece3" dependencies = [ "ark-ec", "ark-ff", @@ -2556,7 +2540,7 @@ dependencies = [ [[package]] name = "phase2-cli" version = "0.3.0" -source = "git+https://github.com/nimiq/snark-setup#7e2c9694b5aa953a46ac5ff0528bc0fcc195ff69" +source = "git+https://github.com/nimiq/snark-setup#d5f04b70f15138fe40d63cf3460bf577dbf4ece3" dependencies = [ "anyhow", "ark-bls12-377", @@ -2568,6 +2552,7 @@ dependencies = [ "ark-mnt6-753", "ark-relations", "ark-serialize", + "ark-snark", "ark-std", "gumdrop 0.8.1", "hex", @@ -2598,7 +2583,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2645,9 +2630,9 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "platforms" -version = "3.1.2" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4503fa043bf02cee09a9582e9554b4c6403b2ef55e4612e96561d294419429f8" +checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" [[package]] name = "polling" @@ -2835,7 +2820,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.11", ] [[package]] @@ -2876,15 +2861,6 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -3089,9 +3065,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.26" +version = "0.37.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84f3f8f960ed3b5a59055428714943298bf3fa2d4a1d53135084e0544829d995" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" dependencies = [ "bitflags 1.3.2", "errno", @@ -3103,14 +3079,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.20" +version = "0.38.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ce50cb2e16c2903e30d1cbccfd8387a74b9d4c938b6a4c5ec6cc7556f7a8a0" +checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" dependencies = [ "bitflags 2.4.1", "errno", "libc", - "linux-raw-sys 0.4.10", + "linux-raw-sys 0.4.11", "windows-sys 0.48.0", ] @@ -3226,9 +3202,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.189" +version = "1.0.192" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" +checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" dependencies = [ "serde_derive", ] @@ -3244,22 +3220,22 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.189" +version = "1.0.192" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" +checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "serde_json" -version = "1.0.107" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ - "indexmap 2.0.2", + "indexmap", "itoa", "ryu", "serde", @@ -3278,20 +3254,20 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" +checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "serde_spanned" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" dependencies = [ "serde", ] @@ -3311,7 +3287,7 @@ dependencies = [ [[package]] name = "setup-utils" version = "0.3.0" -source = "git+https://github.com/nimiq/snark-setup#7e2c9694b5aa953a46ac5ff0528bc0fcc195ff69" +source = "git+https://github.com/nimiq/snark-setup#d5f04b70f15138fe40d63cf3460bf577dbf4ece3" dependencies = [ "ark-ec", "ark-ff", @@ -3380,9 +3356,12 @@ dependencies = [ [[package]] name = "signature" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "rand_core 0.6.4", +] [[package]] name = "slab" @@ -3395,9 +3374,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.1" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "snark-setup-operator" @@ -3542,9 +3521,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -3597,22 +3576,22 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.8.0" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ "cfg-if", "fastrand 2.0.1", - "redox_syscall 0.3.5", - "rustix 0.38.20", + "redox_syscall 0.4.1", + "rustix 0.38.25", "windows-sys 0.48.0", ] [[package]] name = "termcolor" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] @@ -3644,7 +3623,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3690,9 +3669,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5d0e245e80bdc9b4e5356fc45a72184abbc3861992603f515270e9340f5a219" +checksum = "83c02bf3c538ab32ba913408224323915f4ef9a6d61c0e85d493f355921c0ece" dependencies = [ "displaydoc", ] @@ -3714,9 +3693,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.33.0" +version = "1.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" +checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" dependencies = [ "backtrace", "bytes", @@ -3733,13 +3712,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3754,9 +3733,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", @@ -3777,21 +3756,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.2" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.20.2", + "toml_edit 0.21.0", ] [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] @@ -3802,18 +3781,18 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.2", + "indexmap", "toml_datetime", "winnow", ] [[package]] name = "toml_edit" -version = "0.20.2" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ - "indexmap 2.0.2", + "indexmap", "serde", "serde_spanned", "toml_datetime", @@ -3856,7 +3835,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3871,12 +3850,12 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] @@ -4009,11 +3988,11 @@ dependencies = [ [[package]] name = "uuid" -version = "1.5.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" +checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.11", ] [[package]] @@ -4073,9 +4052,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" dependencies = [ "cfg-if", "serde", @@ -4085,24 +4064,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" dependencies = [ "cfg-if", "js-sys", @@ -4112,9 +4091,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4122,22 +4101,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" [[package]] name = "wasm-streams" @@ -4154,9 +4133,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" dependencies = [ "js-sys", "wasm-bindgen", @@ -4171,7 +4150,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.20", + "rustix 0.38.25", ] [[package]] @@ -4348,9 +4327,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.17" +version = "0.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3b801d0e0a6726477cc207f60162da452f3a95adb368399bef20a946e06f65c" +checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" dependencies = [ "memchr", ] @@ -4419,29 +4398,29 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.11" +version = "0.7.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c19fae0c8a9efc6a8281f2e623db8af1db9e57852e04cde3e754dd2dc29340f" +checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.11" +version = "0.7.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc56589e9ddd1f1c28d4b4b5c773ce232910a6bb67a70133d61c9e347585efe9" +checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "zeroize" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" dependencies = [ "zeroize_derive", ] @@ -4454,7 +4433,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] diff --git a/e2e/nimiq_e2e.sh b/e2e/nimiq_e2e.sh new file mode 100755 index 0000000..9817bad --- /dev/null +++ b/e2e/nimiq_e2e.sh @@ -0,0 +1,105 @@ +#!/bin/bash -e + +ps auwx | grep "nodemon" | grep -v grep | awk '{print $2}' | xargs kill || true + +COMMIT="master" +BASE_DIR=$(pwd) + +# Phase 1 +rm -rf snark-setup-coordinator +git clone https://github.com/nimiq/snark-setup-coordinator +pushd snark-setup-coordinator/coordinator-service +git checkout $COMMIT +npm install +npm run build + +cp $BASE_DIR/empty_phase1.json ceremony +npm run reset-db +JSON_LOGGING=true COORDINATOR_CONFIG_PATH=ceremony/empty_phase1.json COORDINATOR_AUTH_TYPE=nimiq npm run start-nodemon & +sleep 5 +popd + +rm -f transcript + +echo 1 | RUST_LOG=info cargo run --bin new_ceremony --release -- --phase phase1 --server-url http://localhost:8080 --verifier ba154fac00e55e69ea72bb4966e8f19baf5ad8565e1b67018800b6570828618c --participant 7dfff91466cbe1a42aa9cb613213e6c6d6c012ee03fac0f7512d330fd420d319 --unsafe-passphrase --keys-file $BASE_DIR/nimiq-verifier.keys --deployer ba154fac00e55e69ea72bb4966e8f19baf5ad8565e1b67018800b6570828618c +echo 1 | RUST_LOG=info cargo run --bin new_setup --release -- --version 1 --chunk-size 12 --powers 22 --curve mnt4_753 --upload-mode direct --server-url http://localhost:8080 --output-dir ./snark-setup-coordinator/coordinator-service/.storage --unsafe-passphrase --keys-file $BASE_DIR/nimiq-verifier.keys +echo 1 | RUST_LOG=info cargo run --bin new_setup --release -- --version 2 --chunk-size 12 --powers 20 --curve mnt6_753 --upload-mode direct --server-url http://localhost:8080 --output-dir ./snark-setup-coordinator/coordinator-service/.storage --unsafe-passphrase --keys-file $BASE_DIR/nimiq-verifier.keys + +echo 1 | RUST_LOG=info cargo run --release --bin contribute --no-default-features -- --unsafe-passphrase --exit-when-finished-contributing --keys-file $BASE_DIR/nimiq-contributor.keys --coordinator-url http://localhost:8080 +echo 1 | RUST_LOG=info cargo run --release --bin contribute --no-default-features -- --unsafe-passphrase --exit-when-finished-contributing --keys-file $BASE_DIR/nimiq-verifier.keys --participation-mode verify --coordinator-url http://localhost:8080 +echo 1 | RUST_LOG=info cargo run --release --bin control -- --unsafe-passphrase --keys-file $BASE_DIR/nimiq-verifier.keys --coordinator-url http://localhost:8080 new-round --verify-transcript --expected-participant 7dfff91466cbe1a42aa9cb613213e6c6d6c012ee03fac0f7512d330fd420d319 --new-participant 2238a626c0cbd0c3357da185c438755a2426284abfb293c664f66ce237761a07 --publish --shutdown-delay-time-in-secs 10 + +echo 1 | RUST_LOG=info cargo run --release --bin contribute --no-default-features -- --unsafe-passphrase --exit-when-finished-contributing --keys-file $BASE_DIR/nimiq-contributor-2.keys --coordinator-url http://localhost:8080 +echo 1 | RUST_LOG=info cargo run --release --bin contribute --no-default-features -- --unsafe-passphrase --exit-when-finished-contributing --keys-file $BASE_DIR/nimiq-verifier.keys --participation-mode verify --coordinator-url http://localhost:8080 +echo 1 | RUST_LOG=info cargo run --release --bin control -- --unsafe-passphrase --keys-file $BASE_DIR/nimiq-verifier.keys --coordinator-url http://localhost:8080 apply-beacon --beacon-hash 0000000000000000000000000000000000000000000000000000000000000000 --expected-participant 2238a626c0cbd0c3357da185c438755a2426284abfb293c664f66ce237761a07 +RUST_BACKTRACE=1 RUST_LOG=info cargo run --release --bin verify_transcript --no-default-features -- --beacon-hash 0000000000000000000000000000000000000000000000000000000000000000 +RUST_LOG=info cargo run --release --bin intermediate_transform + +# Phase 2 +ps auwx | grep "nodemon" | grep -v grep | awk '{print $2}' | xargs kill || true + +rm -rf snark-setup-coordinator +git clone https://github.com/nimiq/snark-setup-coordinator +pushd snark-setup-coordinator/coordinator-service +git checkout $COMMIT +npm install +npm run build + +cp $BASE_DIR/empty_phase2.json ceremony +npm run reset-db +JSON_LOGGING=true COORDINATOR_CONFIG_PATH=ceremony/empty_phase2.json COORDINATOR_AUTH_TYPE=nimiq npm run start-nodemon & +sleep 5 +popd + +rm -f transcript + +# Copy the phase2_init file appropriately +# MNT4 +# 0: macro block, 21 powers +# 1: merger, 21 powers +# 2: pk_tree_1, 21 powers +# 3: pk_tree_3, 21 powers +# 4: pk_tree_5, 22 powers +# MNT6 +# 5: macro block wrapper, 19 powers +# 6: merger wrapper, 19 powers +# 7: pk_tree_0, 20 powers +# 8: pk_tree_2, 20 powers +# 9: pk_tree_4, 20 powers +cp setup0_phase2_init mnt4_phase2_init +cp setup1_phase2_init mnt6_phase2_init +mv setup1_phase2_init setup5_phase2_init + +cp setup0_phase2_init setup1_phase2_init +cp setup0_phase2_init setup2_phase2_init +cp setup0_phase2_init setup3_phase2_init +cp setup0_phase2_init setup4_phase2_init + +cp setup5_phase2_init setup6_phase2_init +cp setup5_phase2_init setup7_phase2_init +cp setup5_phase2_init setup8_phase2_init +cp setup5_phase2_init setup9_phase2_init + +echo 1 | RUST_LOG=info cargo run --bin new_ceremony --release -- --phase phase2 --server-url http://localhost:8080 --verifier ba154fac00e55e69ea72bb4966e8f19baf5ad8565e1b67018800b6570828618c --participant 7dfff91466cbe1a42aa9cb613213e6c6d6c012ee03fac0f7512d330fd420d319 --unsafe-passphrase --keys-file $BASE_DIR/nimiq-verifier.keys --deployer ba154fac00e55e69ea72bb4966e8f19baf5ad8565e1b67018800b6570828618c +echo 1 | RUST_LOG=info cargo run --bin new_setup --release -- --version 1 --chunk-size 12 --powers 21 --curve mnt4_753 --circuit-filename macro_block --upload-mode direct --server-url http://localhost:8080 --output-dir ./snark-setup-coordinator/coordinator-service/.storage --unsafe-passphrase --keys-file $BASE_DIR/nimiq-verifier.keys +echo 1 | RUST_LOG=info cargo run --bin new_setup --release -- --version 2 --chunk-size 12 --powers 21 --curve mnt4_753 --circuit-filename merger --upload-mode direct --server-url http://localhost:8080 --output-dir ./snark-setup-coordinator/coordinator-service/.storage --unsafe-passphrase --keys-file $BASE_DIR/nimiq-verifier.keys +echo 1 | RUST_LOG=info cargo run --bin new_setup --release -- --version 3 --chunk-size 12 --powers 21 --curve mnt4_753 --circuit-filename pk_tree_1 --upload-mode direct --server-url http://localhost:8080 --output-dir ./snark-setup-coordinator/coordinator-service/.storage --unsafe-passphrase --keys-file $BASE_DIR/nimiq-verifier.keys +echo 1 | RUST_LOG=info cargo run --bin new_setup --release -- --version 4 --chunk-size 12 --powers 21 --curve mnt4_753 --circuit-filename pk_tree_3 --upload-mode direct --server-url http://localhost:8080 --output-dir ./snark-setup-coordinator/coordinator-service/.storage --unsafe-passphrase --keys-file $BASE_DIR/nimiq-verifier.keys +echo 1 | RUST_LOG=info cargo run --bin new_setup --release -- --version 5 --chunk-size 12 --powers 22 --curve mnt4_753 --circuit-filename pk_tree_5 --upload-mode direct --server-url http://localhost:8080 --output-dir ./snark-setup-coordinator/coordinator-service/.storage --unsafe-passphrase --keys-file $BASE_DIR/nimiq-verifier.keys +echo 1 | RUST_LOG=info cargo run --bin new_setup --release -- --version 6 --chunk-size 12 --powers 19 --curve mnt6_753 --circuit-filename macro_block_wrapper --upload-mode direct --server-url http://localhost:8080 --output-dir ./snark-setup-coordinator/coordinator-service/.storage --unsafe-passphrase --keys-file $BASE_DIR/nimiq-verifier.keys +echo 1 | RUST_LOG=info cargo run --bin new_setup --release -- --version 7 --chunk-size 12 --powers 19 --curve mnt6_753 --circuit-filename merger_wrapper --upload-mode direct --server-url http://localhost:8080 --output-dir ./snark-setup-coordinator/coordinator-service/.storage --unsafe-passphrase --keys-file $BASE_DIR/nimiq-verifier.keys +echo 1 | RUST_LOG=info cargo run --bin new_setup --release -- --version 8 --chunk-size 12 --powers 20 --curve mnt6_753 --circuit-filename pk_tree_0 --upload-mode direct --server-url http://localhost:8080 --output-dir ./snark-setup-coordinator/coordinator-service/.storage --unsafe-passphrase --keys-file $BASE_DIR/nimiq-verifier.keys +echo 1 | RUST_LOG=info cargo run --bin new_setup --release -- --version 9 --chunk-size 12 --powers 20 --curve mnt6_753 --circuit-filename pk_tree_2 --upload-mode direct --server-url http://localhost:8080 --output-dir ./snark-setup-coordinator/coordinator-service/.storage --unsafe-passphrase --keys-file $BASE_DIR/nimiq-verifier.keys +echo 1 | RUST_LOG=info cargo run --bin new_setup --release -- --version 10 --chunk-size 12 --powers 20 --curve mnt6_753 --circuit-filename pk_tree_4 --upload-mode direct --server-url http://localhost:8080 --output-dir ./snark-setup-coordinator/coordinator-service/.storage --unsafe-passphrase --keys-file $BASE_DIR/nimiq-verifier.keys + +echo 1 | RUST_LOG=info cargo run --release --bin contribute -- --unsafe-passphrase --exit-when-finished-contributing --keys-file $BASE_DIR/nimiq-contributor.keys --coordinator-url http://localhost:8080 +echo 1 | RUST_LOG=info cargo run --release --bin contribute -- --unsafe-passphrase --exit-when-finished-contributing --keys-file $BASE_DIR/nimiq-verifier.keys --participation-mode verify --coordinator-url http://localhost:8080 +# Control used to run only 1 round +#echo 1 | RUST_LOG=info cargo run --release --bin control -- -i new_challenge.query -I new_challenge.full --unsafe-passphrase --keys-file $BASE_DIR/nimiq-verifier.keys --circuit-filenames circuit_mnt4_753 --circuit-filenames circuit_mnt6_753 --coordinator-url http://localhost:8080 apply-beacon --beacon-hash 0000000000000000000000000000000000000000000000000000000000000000 --expected-participant 7dfff91466cbe1a42aa9cb613213e6c6d6c012ee03fac0f7512d330fd420d319 +echo 1 | RUST_LOG=info cargo run --release --bin control -- -i new_challenge.query -I new_challenge.full --unsafe-passphrase --keys-file $BASE_DIR/nimiq-verifier.keys --circuit-filenames circuit_mnt4_753 --circuit-filenames circuit_mnt6_753 --coordinator-url http://localhost:8080 new-round --verify-transcript --expected-participant 7dfff91466cbe1a42aa9cb613213e6c6d6c012ee03fac0f7512d330fd420d319 --new-participant 2238a626c0cbd0c3357da185c438755a2426284abfb293c664f66ce237761a07 --publish --shutdown-delay-time-in-secs 10 +echo 1 | RUST_LOG=info cargo run --release --bin contribute -- --unsafe-passphrase --exit-when-finished-contributing --keys-file $BASE_DIR/nimiq-contributor-2.keys --coordinator-url http://localhost:8080 +echo 1 | RUST_LOG=info cargo run --release --bin contribute -- --unsafe-passphrase --exit-when-finished-contributing --keys-file $BASE_DIR/nimiq-verifier.keys --participation-mode verify --coordinator-url http://localhost:8080 +echo 1 | RUST_LOG=info cargo run --release --bin control -- -i new_challenge.query -I new_challenge.full --unsafe-passphrase --keys-file $BASE_DIR/nimiq-verifier.keys --circuit-filenames circuit_mnt4_753 --circuit-filenames circuit_mnt6_753 --coordinator-url http://localhost:8080 apply-beacon --beacon-hash 0000000000000000000000000000000000000000000000000000000000000000 --expected-participant 2238a626c0cbd0c3357da185c438755a2426284abfb293c664f66ce237761a07 +RUST_LOG=info cargo run --release --bin verify_transcript -- --circuit-filenames circuit_mnt4_753 --circuit-filenames circuit_mnt6_753 --beacon-hash 0000000000000000000000000000000000000000000000000000000000000000 -i new_challenge.query -I new_challenge.full + +RUST_LOG=info cargo run --release --bin get_keys diff --git a/src/bin/new_setup.rs b/src/bin/new_setup.rs index c9058ef..6f8ca7a 100644 --- a/src/bin/new_setup.rs +++ b/src/bin/new_setup.rs @@ -231,13 +231,6 @@ async fn run(opts: &NewSetupOpts, key_pair: &[u8]) -> Result<()> where E::G1Affine: Neg, { - if opts.powers > E::ScalarField::TWO_ADICITY as usize { - return Err(anyhow!( - "Cannot create radix-2 domain for number of powers (maximum powers {}).", - E::ScalarField::TWO_ADICITY - )); - } - let server_url = Url::parse(opts.server_url.as_str())?.join("ceremony")?; let data = reqwest::get(server_url.as_str()) .await?