mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-23 07:07:07 +03:00
Merge pull request #1168 from AleoHQ/feat/snarkvm-upgrades
Updates Leo to snarkVM v0.7.4
This commit is contained in:
commit
9facd3e984
@ -44,7 +44,7 @@ jobs:
|
||||
|
||||
rust-stable:
|
||||
docker:
|
||||
- image: cimg/rust:1.52.1
|
||||
- image: cimg/rust:1.53
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- checkout
|
||||
@ -60,24 +60,9 @@ jobs:
|
||||
- clear_environment:
|
||||
cache_key: leo-stable-cache
|
||||
|
||||
rust-nightly:
|
||||
docker:
|
||||
- image: howardwu/snarkos-ci:2021-03-25
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- checkout
|
||||
- setup_environment:
|
||||
cache_key: leo-nightly-cache
|
||||
- run:
|
||||
name: Build and test
|
||||
no_output_timeout: 30m
|
||||
command: cargo test --all
|
||||
- clear_environment:
|
||||
cache_key: leo-nightly-cache
|
||||
|
||||
leo-executable:
|
||||
docker:
|
||||
- image: cimg/rust:1.52.1
|
||||
- image: cimg/rust:1.53
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- checkout
|
||||
@ -95,7 +80,7 @@ jobs:
|
||||
|
||||
leo-new:
|
||||
docker:
|
||||
- image: cimg/rust:1.52.1
|
||||
- image: cimg/rust:1.53
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- attach_workspace:
|
||||
@ -108,7 +93,7 @@ jobs:
|
||||
|
||||
leo-init:
|
||||
docker:
|
||||
- image: cimg/rust:1.52.1
|
||||
- image: cimg/rust:1.53
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- attach_workspace:
|
||||
@ -121,7 +106,7 @@ jobs:
|
||||
|
||||
leo-clean:
|
||||
docker:
|
||||
- image: cimg/rust:1.52.1
|
||||
- image: cimg/rust:1.53
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- attach_workspace:
|
||||
@ -134,7 +119,7 @@ jobs:
|
||||
|
||||
leo-setup:
|
||||
docker:
|
||||
- image: cimg/rust:1.52.1
|
||||
- image: cimg/rust:1.53
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- attach_workspace:
|
||||
@ -147,7 +132,7 @@ jobs:
|
||||
|
||||
leo-add-remove:
|
||||
docker:
|
||||
- image: cimg/rust:1.52.1
|
||||
- image: cimg/rust:1.53
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- attach_workspace:
|
||||
@ -160,7 +145,7 @@ jobs:
|
||||
|
||||
leo-check-constraints:
|
||||
docker:
|
||||
- image: cimg/rust:1.50.0
|
||||
- image: cimg/rust:1.53
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- attach_workspace:
|
||||
@ -173,7 +158,7 @@ jobs:
|
||||
|
||||
leo-login-logout:
|
||||
docker:
|
||||
- image: cimg/rust:1.52.1
|
||||
- image: cimg/rust:1.53
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- attach_workspace:
|
||||
@ -186,7 +171,7 @@ jobs:
|
||||
|
||||
leo-clone:
|
||||
docker:
|
||||
- image: cimg/rust:1.52.1
|
||||
- image: cimg/rust:1.53
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- attach_workspace:
|
||||
@ -199,7 +184,7 @@ jobs:
|
||||
|
||||
leo-publish:
|
||||
docker:
|
||||
- image: cimg/rust:1.52.1
|
||||
- image: cimg/rust:1.53
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- attach_workspace:
|
||||
@ -215,7 +200,6 @@ workflows:
|
||||
main-workflow:
|
||||
jobs:
|
||||
- rust-stable
|
||||
- rust-nightly
|
||||
- leo-executable
|
||||
- leo-new:
|
||||
requires:
|
||||
|
314
Cargo.lock
generated
314
Cargo.lock
generated
@ -36,6 +36,17 @@ version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
|
||||
|
||||
[[package]]
|
||||
name = "ahash"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "43bb833f0bf979d8475d38fbf09ed3b8a55e1885fe93ad3f93239fc6a4f17b98"
|
||||
dependencies = [
|
||||
"getrandom 0.2.3",
|
||||
"once_cell",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "0.7.18"
|
||||
@ -135,9 +146,9 @@ checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
|
||||
|
||||
[[package]]
|
||||
name = "bech32"
|
||||
version = "0.8.0"
|
||||
version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6c7f7096bc256f5e5cb960f60dfc4f4ef979ca65abe7fb9d5a4f77150d3783d4"
|
||||
checksum = "cf9ff0bbfd639f15c74af777d81383cf53efb7c93613f6cab67c6c11e05bbf8b"
|
||||
|
||||
[[package]]
|
||||
name = "bincode"
|
||||
@ -245,9 +256,9 @@ checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040"
|
||||
|
||||
[[package]]
|
||||
name = "bzip2"
|
||||
version = "0.4.2"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "abf8012c8a15d5df745fcf258d93e6149dcf102882c8d8702d9cff778eab43a8"
|
||||
checksum = "6afcd980b5f3a45017c57e57a2fcccbb351cc43a356ce117ef760ef8052b89b0"
|
||||
dependencies = [
|
||||
"bzip2-sys",
|
||||
"libc",
|
||||
@ -255,9 +266,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "bzip2-sys"
|
||||
version = "0.1.10+1.0.8"
|
||||
version = "0.1.11+1.0.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "17fa3d1ac1ca21c5c4e36a97f3c3eb25084576f6fc47bf0139c1123434216c6c"
|
||||
checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
@ -266,18 +277,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cast"
|
||||
version = "0.2.6"
|
||||
version = "0.2.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "57cdfa5d50aad6cb4d44dcab6101a7f79925bd59d82ca42f38a9856a28865374"
|
||||
checksum = "4c24dab4283a142afa2fdca129b80ad2c6284e073930f964c3a1293c225ee39a"
|
||||
dependencies = [
|
||||
"rustc_version",
|
||||
"rustc_version 0.4.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.68"
|
||||
version = "1.0.69"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4a72c244c1ff497a746a7e1fb3d14bd08420ecda70c8f25c7112f2781652d787"
|
||||
checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2"
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
@ -373,9 +384,9 @@ checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b"
|
||||
|
||||
[[package]]
|
||||
name = "cpufeatures"
|
||||
version = "0.1.4"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ed00c67cb5d0a7d64a44f6ad2668db7e7530311dd53ea79bcd4fb022c64911c8"
|
||||
checksum = "66c99696f6c9dd7f35d486b9d04d7e6e202aa3e8c40d553f2fdf5e7e0c6a71ef"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
@ -501,6 +512,36 @@ dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "curl"
|
||||
version = "0.4.38"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "003cb79c1c6d1c93344c7e1201bb51c2148f24ec2bd9c253709d6b2efb796515"
|
||||
dependencies = [
|
||||
"curl-sys",
|
||||
"libc",
|
||||
"openssl-probe",
|
||||
"openssl-sys",
|
||||
"schannel",
|
||||
"socket2",
|
||||
"winapi 0.3.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "curl-sys"
|
||||
version = "0.4.44+curl-7.77.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4b6d85e9322b193f117c966e79c2d6929ec08c02f339f950044aba12e20bbaf1"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
"libz-sys",
|
||||
"openssl-sys",
|
||||
"pkg-config",
|
||||
"vcpkg",
|
||||
"winapi 0.3.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "derivative"
|
||||
version = "2.2.0"
|
||||
@ -509,7 +550,7 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.9",
|
||||
"syn 1.0.72",
|
||||
"syn 1.0.73",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -617,7 +658,7 @@ checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.9",
|
||||
"syn 1.0.72",
|
||||
"syn 1.0.73",
|
||||
"synstructure",
|
||||
]
|
||||
|
||||
@ -893,6 +934,9 @@ name = "hashbrown"
|
||||
version = "0.11.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
@ -905,9 +949,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
version = "0.1.18"
|
||||
version = "0.1.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c"
|
||||
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
@ -954,9 +998,9 @@ checksum = "6456b8a6c8f33fee7d958fcd1b60d55b11940a79e63ae87013e6d22e26034440"
|
||||
|
||||
[[package]]
|
||||
name = "hyper"
|
||||
version = "0.14.9"
|
||||
version = "0.14.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "07d6baa1b441335f3ce5098ac421fb6547c46dda735ca1bc6d0153c838f9dd83"
|
||||
checksum = "7728a72c4c7d72665fde02204bcbd93b247721025b222ef78606f14513e0fd03"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"futures-channel",
|
||||
@ -1054,9 +1098,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ipnet"
|
||||
version = "2.3.0"
|
||||
version = "2.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135"
|
||||
checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9"
|
||||
|
||||
[[package]]
|
||||
name = "itertools"
|
||||
@ -1363,9 +1407,21 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.95"
|
||||
version = "0.2.98"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "789da6d93f1b866ffe175afc5322a4d76c038605a1c3319bb57b06967ca98a36"
|
||||
checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790"
|
||||
|
||||
[[package]]
|
||||
name = "libz-sys"
|
||||
version = "1.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
"pkg-config",
|
||||
"vcpkg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "linked-hash-map"
|
||||
@ -1471,9 +1527,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "mio"
|
||||
version = "0.7.11"
|
||||
version = "0.7.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf80d3e903b34e0bd7282b218398aec54e082c840d9baf8339e0080a0c542956"
|
||||
checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"log",
|
||||
@ -1642,9 +1698,9 @@ checksum = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a"
|
||||
|
||||
[[package]]
|
||||
name = "object"
|
||||
version = "0.25.2"
|
||||
version = "0.25.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f8bc1d42047cf336f0f939c99e97183cf31551bf0f2865a2ec9c8d91fd4ffb5e"
|
||||
checksum = "a38f2be3697a57b4060074ff41b44c16870d916ad7877c17696e063257482bc7"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
@ -1675,9 +1731,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
|
||||
|
||||
[[package]]
|
||||
name = "openssl"
|
||||
version = "0.10.34"
|
||||
version = "0.10.35"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6d7830286ad6a3973c0f1d9b73738f69c76b739301d0229c4b96501695cbe4c8"
|
||||
checksum = "549430950c79ae24e6d02e0b7404534ecf311d94cc9f861e9e4020187d13d885"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cfg-if 1.0.0",
|
||||
@ -1695,9 +1751,9 @@ checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a"
|
||||
|
||||
[[package]]
|
||||
name = "openssl-sys"
|
||||
version = "0.9.63"
|
||||
version = "0.9.65"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b6b0d6fb7d80f877617dfcb014e605e2b5ab2fb0afdf27935219bb6bd984cb98"
|
||||
checksum = "7a7907e3bfa08bb85105209cdfcb6c63d109f8f6c1ed6ca318fff5c1853fbc1d"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"cc",
|
||||
@ -1754,7 +1810,7 @@ dependencies = [
|
||||
"pest_meta",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.9",
|
||||
"syn 1.0.72",
|
||||
"syn 1.0.73",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1770,9 +1826,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-lite"
|
||||
version = "0.2.6"
|
||||
version = "0.2.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905"
|
||||
checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443"
|
||||
|
||||
[[package]]
|
||||
name = "pin-utils"
|
||||
@ -1801,15 +1857,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "plotters-backend"
|
||||
version = "0.3.0"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b07fffcddc1cb3a1de753caa4e4df03b79922ba43cf882acc1bdd7e8df9f4590"
|
||||
checksum = "d88417318da0eaf0fdcdb51a0ee6c3bed624333bff8f946733049380be67ac1c"
|
||||
|
||||
[[package]]
|
||||
name = "plotters-svg"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b38a02e23bd9604b842a812063aec4ef702b57989c37b655254bb61c471ad211"
|
||||
checksum = "521fa9638fa597e1dc53e9412a4f9cefb01187ee1f7413076f9e6749e2885ba9"
|
||||
dependencies = [
|
||||
"plotters-backend",
|
||||
]
|
||||
@ -1865,7 +1921,7 @@ dependencies = [
|
||||
"proc-macro-error-attr",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.9",
|
||||
"syn 1.0.72",
|
||||
"syn 1.0.73",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
@ -1951,9 +2007,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"rand_chacha 0.3.0",
|
||||
"rand_chacha 0.3.1",
|
||||
"rand_core 0.6.3",
|
||||
"rand_hc 0.3.0",
|
||||
"rand_hc 0.3.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1968,9 +2024,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rand_chacha"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d"
|
||||
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
|
||||
dependencies = [
|
||||
"ppv-lite86",
|
||||
"rand_core 0.6.3",
|
||||
@ -2005,9 +2061,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rand_hc"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73"
|
||||
checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7"
|
||||
dependencies = [
|
||||
"rand_core 0.6.3",
|
||||
]
|
||||
@ -2048,9 +2104,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.2.8"
|
||||
version = "0.2.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc"
|
||||
checksum = "5ab49abadf3f9e1c4bc499e8845e152ad87d2ad2d30371841171169e9d75feee"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
]
|
||||
@ -2138,9 +2194,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustc-demangle"
|
||||
version = "0.1.19"
|
||||
version = "0.1.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "410f7acf3cb3a44527c5d9546bad4bf4e6c460915d5f9f2fc524498bfe8f70ce"
|
||||
checksum = "dead70b0b5e03e9c814bcb6b01e03e68f7c57a80aa48c72ec92152ab3e818d49"
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
@ -2148,7 +2204,16 @@ version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee"
|
||||
dependencies = [
|
||||
"semver",
|
||||
"semver 0.11.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
|
||||
dependencies = [
|
||||
"semver 1.0.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2229,7 +2294,7 @@ dependencies = [
|
||||
"quick-xml",
|
||||
"regex",
|
||||
"reqwest",
|
||||
"semver",
|
||||
"semver 0.11.0",
|
||||
"serde_json",
|
||||
"tempfile",
|
||||
"zip",
|
||||
@ -2244,6 +2309,12 @@ dependencies = [
|
||||
"semver-parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5f3aac57ee7f3272d8395c6e4f502f434f0e289fcd62876f70daa008c20dcabe"
|
||||
|
||||
[[package]]
|
||||
name = "semver-parser"
|
||||
version = "0.10.2"
|
||||
@ -2280,7 +2351,7 @@ checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.9",
|
||||
"syn 1.0.72",
|
||||
"syn 1.0.73",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2375,10 +2446,11 @@ checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e"
|
||||
|
||||
[[package]]
|
||||
name = "snarkvm-algorithms"
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ba6482ab4ec9170c9b8ce6c1ac9689d02aba1e112b474fa10cb72e8dda6ae0bd"
|
||||
checksum = "352a3345d4ba258c1454b459f6449b48ae2062c686e8beba43805031abb70c72"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitvec",
|
||||
"blake2",
|
||||
"crossbeam-channel",
|
||||
@ -2388,7 +2460,7 @@ dependencies = [
|
||||
"lazy_static",
|
||||
"once_cell",
|
||||
"rand 0.8.4",
|
||||
"rand_chacha 0.3.0",
|
||||
"rand_chacha 0.3.1",
|
||||
"rayon",
|
||||
"sha2",
|
||||
"smallvec",
|
||||
@ -2402,14 +2474,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "snarkvm-curves"
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "29f5549929d0cc1cb8165e643f2d348f619f2f7cd5ce655201b36bf8b1aa4494"
|
||||
checksum = "f97e6d7dc07a949050728353f2de05fd2ea376515a866fb9f06cfde14803a91e"
|
||||
dependencies = [
|
||||
"derivative",
|
||||
"rand 0.8.4",
|
||||
"rand_xorshift",
|
||||
"rustc_version",
|
||||
"rustc_version 0.3.3",
|
||||
"serde",
|
||||
"snarkvm-fields",
|
||||
"snarkvm-utilities",
|
||||
@ -2418,22 +2490,22 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "snarkvm-derives"
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "45886a0c7a81323c267a4c2cfab1de7f0621a8f03a04fb78e2ea4f3ae5e26066"
|
||||
checksum = "ffcfd2f005ec8c25c627516dfe4245e330792d22a21f6176627309072cd65176"
|
||||
dependencies = [
|
||||
"proc-macro-crate",
|
||||
"proc-macro-error",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.9",
|
||||
"syn 1.0.72",
|
||||
"syn 1.0.73",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "snarkvm-dpc"
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "03ce3598d82ad7b3401c6d9a2a1a97dfce24eb25dba75e366389d106a62d3995"
|
||||
checksum = "4e778b5e032a4c48e2a12a1806ca10044900d92c0ae42e721faa85af40430109"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base58",
|
||||
@ -2452,7 +2524,9 @@ dependencies = [
|
||||
"snarkvm-curves",
|
||||
"snarkvm-fields",
|
||||
"snarkvm-gadgets",
|
||||
"snarkvm-marlin",
|
||||
"snarkvm-parameters",
|
||||
"snarkvm-polycommit",
|
||||
"snarkvm-profiler",
|
||||
"snarkvm-r1cs",
|
||||
"snarkvm-utilities",
|
||||
@ -2461,10 +2535,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "snarkvm-fields"
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9467325948cf839e5aeb5c91a502a2b79474d35672155a225b51b7b2c39e8e5e"
|
||||
checksum = "aab09f08aee0e85613772242a442ad7057f166c54150ac52d5d5fbe00df77f1b"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
"derivative",
|
||||
"rand 0.8.4",
|
||||
@ -2476,9 +2551,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "snarkvm-gadgets"
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2511b5493f835f6908ee1c1411b233c1abb5de7937925dd17ca44ae6e819a186"
|
||||
checksum = "552bb91384d004a314d27eefd863c0992a3a984b7e5dcfce711b4e85f1cbfc03"
|
||||
dependencies = [
|
||||
"derivative",
|
||||
"digest 0.9.0",
|
||||
@ -2495,11 +2570,36 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "snarkvm-parameters"
|
||||
version = "0.6.0"
|
||||
name = "snarkvm-marlin"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f8591a36b0a21f24394ec6a592ac3e6d669694156094771bd0a58c0c113b2d25"
|
||||
checksum = "e2af3e3720556f0fd653e2255c0e2aa1333624e658b759eb109f6364f9456c7f"
|
||||
dependencies = [
|
||||
"blake2",
|
||||
"derivative",
|
||||
"digest 0.9.0",
|
||||
"hashbrown",
|
||||
"rand 0.8.4",
|
||||
"rand_chacha 0.3.1",
|
||||
"rand_core 0.6.3",
|
||||
"rayon",
|
||||
"snarkvm-algorithms",
|
||||
"snarkvm-curves",
|
||||
"snarkvm-fields",
|
||||
"snarkvm-gadgets",
|
||||
"snarkvm-polycommit",
|
||||
"snarkvm-profiler",
|
||||
"snarkvm-r1cs",
|
||||
"snarkvm-utilities",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "snarkvm-parameters"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0bae615fbc1065cfe3e23dd8e3407148c4e7a5afa1632e3120f4b85ad099d810"
|
||||
dependencies = [
|
||||
"curl",
|
||||
"hex",
|
||||
"snarkvm-algorithms",
|
||||
"snarkvm-utilities",
|
||||
@ -2507,16 +2607,35 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "snarkvm-profiler"
|
||||
version = "0.6.0"
|
||||
name = "snarkvm-polycommit"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a8892a13630b65576cd983bc69fa89bdff3f568e56466cc523a1cee783ec1513"
|
||||
checksum = "c7f72af773beed90a4ef947ad153b7cc9733e543414d144b68d7d3d62b32fd98"
|
||||
dependencies = [
|
||||
"derivative",
|
||||
"digest 0.9.0",
|
||||
"hashbrown",
|
||||
"rand_core 0.6.3",
|
||||
"snarkvm-algorithms",
|
||||
"snarkvm-curves",
|
||||
"snarkvm-fields",
|
||||
"snarkvm-gadgets",
|
||||
"snarkvm-profiler",
|
||||
"snarkvm-r1cs",
|
||||
"snarkvm-utilities",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "snarkvm-profiler"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2a428f675f2df8c3aa3683ee583ea36fd8ecff5959cdcd528c07f209986d3614"
|
||||
|
||||
[[package]]
|
||||
name = "snarkvm-r1cs"
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ea6805a58c986fd78be5cf474a62e40b19abf64187457874a7c93f0b8573fde6"
|
||||
checksum = "42fc7eaab616b21fb6e0dab4f0c9402a8c831d7c65fa5e4eb941919bf7d9ea33"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"fxhash",
|
||||
@ -2529,11 +2648,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "snarkvm-utilities"
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1f6dcdbf85edf6a03157aef21608e3c44835eeff97d0c2d0b3c90b3bcb869e82"
|
||||
checksum = "c47f9b27b3dadda802b019e494bd6ddb6b4b3cc001b402eb217b75d66ff7758f"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
"num-bigint",
|
||||
"rand 0.8.4",
|
||||
"snarkvm-derives",
|
||||
"thiserror",
|
||||
@ -2582,14 +2703,14 @@ dependencies = [
|
||||
"proc-macro-error",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.9",
|
||||
"syn 1.0.72",
|
||||
"syn 1.0.73",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "subtle"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2"
|
||||
checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
@ -2604,9 +2725,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.72"
|
||||
version = "1.0.73"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82"
|
||||
checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.9",
|
||||
@ -2615,13 +2736,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "synstructure"
|
||||
version = "0.12.4"
|
||||
version = "0.12.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701"
|
||||
checksum = "474aaa926faa1603c40b7885a9eaea29b444d1cb2850cb7c0e37bb1a4182f4fa"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.9",
|
||||
"syn 1.0.72",
|
||||
"syn 1.0.73",
|
||||
"unicode-xid 0.2.2",
|
||||
]
|
||||
|
||||
@ -2701,7 +2822,7 @@ checksum = "060d69a0afe7796bf42e9e2ff91f5ee691fb15c53d38b4b62a9a53eb23164745"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.9",
|
||||
"syn 1.0.72",
|
||||
"syn 1.0.73",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2750,17 +2871,18 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
|
||||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "1.6.1"
|
||||
version = "1.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0a38d31d7831c6ed7aad00aa4c12d9375fd225a6dd77da1d25b707346319a975"
|
||||
checksum = "98c8b05dc14c75ea83d63dd391100353789f5f24b8b3866542a5e85c8be8e985"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"bytes",
|
||||
"libc",
|
||||
"memchr",
|
||||
"mio 0.7.11",
|
||||
"mio 0.7.13",
|
||||
"num_cpus",
|
||||
"pin-project-lite",
|
||||
"winapi 0.3.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2822,7 +2944,7 @@ checksum = "c42e6fa53307c8a17e4ccd4dc81cf5ec38db9209f59b222210375b54ee40d1e2"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.9",
|
||||
"syn 1.0.72",
|
||||
"syn 1.0.73",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2936,9 +3058,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "unicode-segmentation"
|
||||
version = "1.7.1"
|
||||
version = "1.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796"
|
||||
checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
@ -2978,9 +3100,9 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
|
||||
|
||||
[[package]]
|
||||
name = "vcpkg"
|
||||
version = "0.2.13"
|
||||
version = "0.2.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "025ce40a007e1907e58d5bc1a594def78e5573bb0b1160bc389634e8f12e4faa"
|
||||
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
|
||||
|
||||
[[package]]
|
||||
name = "vec_map"
|
||||
@ -3065,7 +3187,7 @@ dependencies = [
|
||||
"log",
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.9",
|
||||
"syn 1.0.72",
|
||||
"syn 1.0.73",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
@ -3099,7 +3221,7 @@ checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.27",
|
||||
"quote 1.0.9",
|
||||
"syn 1.0.72",
|
||||
"syn 1.0.73",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
10
Cargo.toml
10
Cargo.toml
@ -74,22 +74,22 @@ path = "./synthesizer"
|
||||
version = "1.5.2"
|
||||
|
||||
[dependencies.snarkvm-algorithms]
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
|
||||
[dependencies.snarkvm-curves]
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
default-features = false
|
||||
|
||||
[dependencies.snarkvm-gadgets]
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
default-features = false
|
||||
|
||||
[dependencies.snarkvm-r1cs]
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
default-features = false
|
||||
|
||||
[dependencies.snarkvm-utilities]
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
|
||||
[dependencies.anyhow]
|
||||
version = "1.0"
|
||||
|
@ -57,27 +57,28 @@ version = "1.5.2"
|
||||
version = "0.4"
|
||||
|
||||
[dependencies.snarkvm-curves]
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
default-features = false
|
||||
|
||||
[dependencies.snarkvm-fields]
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
default-features = false
|
||||
|
||||
[dependencies.snarkvm-dpc]
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
default-features = false
|
||||
|
||||
[dependencies.snarkvm-gadgets]
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
default-features = false
|
||||
features = ["curves"]
|
||||
|
||||
[dependencies.snarkvm-r1cs]
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
default-features = false
|
||||
|
||||
[dependencies.snarkvm-utilities]
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
|
||||
[dependencies.bincode]
|
||||
version = "1.3"
|
||||
@ -118,7 +119,7 @@ version = "0.3"
|
||||
default-features = false
|
||||
|
||||
[dev-dependencies.snarkvm-algorithms]
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
default-features = false
|
||||
|
||||
[dev-dependencies.tempfile]
|
||||
|
@ -31,8 +31,10 @@ use leo_asg::{ConstInt, Expression, Span};
|
||||
use snarkvm_fields::PrimeField;
|
||||
use snarkvm_gadgets::{
|
||||
boolean::Boolean,
|
||||
eq::{EqGadget, EvaluateEqGadget},
|
||||
select::CondSelectGadget,
|
||||
traits::{
|
||||
eq::{EqGadget, EvaluateEqGadget},
|
||||
select::CondSelectGadget,
|
||||
},
|
||||
};
|
||||
use snarkvm_r1cs::ConstraintSystem;
|
||||
|
||||
|
@ -20,7 +20,7 @@ use crate::{enforce_and, errors::ExpressionError, value::ConstrainedValue, Group
|
||||
use leo_asg::Span;
|
||||
|
||||
use snarkvm_fields::PrimeField;
|
||||
use snarkvm_gadgets::{boolean::Boolean, eq::EvaluateEqGadget};
|
||||
use snarkvm_gadgets::{boolean::Boolean, traits::eq::EvaluateEqGadget};
|
||||
use snarkvm_r1cs::ConstraintSystem;
|
||||
|
||||
pub fn evaluate_eq<'a, F: PrimeField, G: GroupType<F>, CS: ConstraintSystem<F>>(
|
||||
|
@ -27,7 +27,7 @@ use crate::{
|
||||
use leo_asg::{Span, Type};
|
||||
|
||||
use snarkvm_fields::PrimeField;
|
||||
use snarkvm_gadgets::{boolean::Boolean, select::CondSelectGadget};
|
||||
use snarkvm_gadgets::{boolean::Boolean, traits::select::CondSelectGadget};
|
||||
use snarkvm_r1cs::ConstraintSystem;
|
||||
|
||||
impl<'a, F: PrimeField, G: GroupType<F>> ConstrainedProgram<'a, F, G> {
|
||||
|
@ -28,7 +28,7 @@ use crate::{
|
||||
use leo_asg::{ConstInt, Expression, Node};
|
||||
|
||||
use snarkvm_fields::PrimeField;
|
||||
use snarkvm_gadgets::{eq::EvaluateEqGadget, select::CondSelectGadget};
|
||||
use snarkvm_gadgets::traits::{eq::EvaluateEqGadget, select::CondSelectGadget};
|
||||
use snarkvm_r1cs::ConstraintSystem;
|
||||
|
||||
use super::ResolverContext;
|
||||
|
@ -17,7 +17,7 @@
|
||||
use crate::{errors::AddressError, ConstrainedValue, GroupType, IntegerTrait};
|
||||
use leo_ast::{InputValue, Span};
|
||||
|
||||
use snarkvm_dpc::{account::AccountAddress, testnet1::instantiated::Components};
|
||||
use snarkvm_dpc::{account::Address as AleoAddress, testnet1::instantiated::Components};
|
||||
use snarkvm_fields::PrimeField;
|
||||
use snarkvm_gadgets::{
|
||||
boolean::Boolean,
|
||||
@ -35,16 +35,16 @@ use std::{borrow::Borrow, str::FromStr};
|
||||
/// A public address
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct Address {
|
||||
pub address: Option<AccountAddress<Components>>,
|
||||
pub address: Option<AleoAddress<Components>>,
|
||||
pub bytes: Vec<UInt8>,
|
||||
}
|
||||
|
||||
impl Address {
|
||||
pub(crate) fn constant(address: String, span: &Span) -> Result<Self, AddressError> {
|
||||
let address = AccountAddress::from_str(&address).map_err(|error| AddressError::account_error(error, span))?;
|
||||
let address = AleoAddress::from_str(&address).map_err(|error| AddressError::account_error(error, span))?;
|
||||
|
||||
let mut address_bytes = vec![];
|
||||
address.write(&mut address_bytes).unwrap();
|
||||
address.write_le(&mut address_bytes).unwrap();
|
||||
|
||||
let bytes = UInt8::constant_vec(&address_bytes[..]);
|
||||
|
||||
@ -87,7 +87,7 @@ impl Address {
|
||||
|
||||
pub(crate) fn alloc_helper<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<String>>(
|
||||
value_gen: Fn,
|
||||
) -> Result<AccountAddress<Components>, SynthesisError> {
|
||||
) -> Result<AleoAddress<Components>, SynthesisError> {
|
||||
let address_string = match value_gen() {
|
||||
Ok(value) => {
|
||||
let string_value = value.borrow().clone();
|
||||
@ -96,7 +96,7 @@ impl Address {
|
||||
_ => Err(SynthesisError::AssignmentMissing),
|
||||
}?;
|
||||
|
||||
AccountAddress::from_str(&address_string).map_err(|_| SynthesisError::AssignmentMissing)
|
||||
AleoAddress::from_str(&address_string).map_err(|_| SynthesisError::AssignmentMissing)
|
||||
}
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ impl<F: PrimeField> AllocGadget<String, F> for Address {
|
||||
let address = Self::alloc_helper(value_gen)?;
|
||||
let mut address_bytes = vec![];
|
||||
address
|
||||
.write(&mut address_bytes)
|
||||
.write_le(&mut address_bytes)
|
||||
.map_err(|_| SynthesisError::AssignmentMissing)?;
|
||||
|
||||
let bytes = UInt8::alloc_vec(cs, &address_bytes[..])?;
|
||||
@ -126,7 +126,7 @@ impl<F: PrimeField> AllocGadget<String, F> for Address {
|
||||
let address = Self::alloc_helper(value_gen)?;
|
||||
let mut address_bytes = vec![];
|
||||
address
|
||||
.write(&mut address_bytes)
|
||||
.write_le(&mut address_bytes)
|
||||
.map_err(|_| SynthesisError::AssignmentMissing)?;
|
||||
|
||||
let bytes = UInt8::alloc_input_vec_le(cs, &address_bytes[..])?;
|
||||
|
@ -25,9 +25,11 @@ use leo_ast::{InputValue, Span};
|
||||
use snarkvm_fields::PrimeField;
|
||||
use snarkvm_gadgets::{
|
||||
boolean::Boolean,
|
||||
eq::{ConditionalEqGadget, EqGadget, EvaluateEqGadget, NEqGadget},
|
||||
select::CondSelectGadget,
|
||||
traits::bits::comparator::{ComparatorGadget, EvaluateLtGadget},
|
||||
traits::{
|
||||
bits::comparator::{ComparatorGadget, EvaluateLtGadget},
|
||||
eq::{ConditionalEqGadget, EqGadget, EvaluateEqGadget, NEqGadget},
|
||||
select::CondSelectGadget,
|
||||
},
|
||||
};
|
||||
use snarkvm_r1cs::{ConstraintSystem, SynthesisError};
|
||||
|
||||
|
@ -19,15 +19,15 @@ use leo_asg::{GroupCoordinate, GroupValue, Span};
|
||||
|
||||
use snarkvm_curves::{
|
||||
edwards_bls12::{EdwardsAffine, EdwardsParameters, Fq},
|
||||
templates::twisted_edwards_extended::GroupAffine,
|
||||
templates::twisted_edwards_extended::Affine,
|
||||
AffineCurve,
|
||||
TEModelParameters,
|
||||
TwistedEdwardsParameters,
|
||||
};
|
||||
use snarkvm_fields::{Fp256, One, Zero};
|
||||
use snarkvm_gadgets::{
|
||||
bits::{ToBitsBEGadget, ToBytesGadget},
|
||||
boolean::Boolean,
|
||||
curves::edwards_bls12::EdwardsBlsGadget,
|
||||
curves::edwards_bls12::EdwardsBls12Gadget,
|
||||
fields::{AllocatedFp, FpGadget},
|
||||
integers::uint::UInt8,
|
||||
traits::{
|
||||
@ -48,7 +48,7 @@ use std::{
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum EdwardsGroupType {
|
||||
Constant(EdwardsAffine),
|
||||
Allocated(Box<EdwardsBlsGadget>),
|
||||
Allocated(Box<EdwardsBls12Gadget>),
|
||||
}
|
||||
|
||||
impl GroupType<Fq> for EdwardsGroupType {
|
||||
@ -68,7 +68,7 @@ impl GroupType<Fq> for EdwardsGroupType {
|
||||
match self {
|
||||
EdwardsGroupType::Constant(group) => Ok(EdwardsGroupType::Constant(group.neg())),
|
||||
EdwardsGroupType::Allocated(group) => {
|
||||
let result = <EdwardsBlsGadget as GroupGadget<GroupAffine<EdwardsParameters>, Fq>>::negate(group, cs)
|
||||
let result = <EdwardsBls12Gadget as GroupGadget<Affine<EdwardsParameters>, Fq>>::negate(group, cs)
|
||||
.map_err(|e| GroupError::negate_operation(e, span))?;
|
||||
|
||||
Ok(EdwardsGroupType::Allocated(Box::new(result)))
|
||||
@ -83,7 +83,7 @@ impl GroupType<Fq> for EdwardsGroupType {
|
||||
}
|
||||
|
||||
(EdwardsGroupType::Allocated(self_value), EdwardsGroupType::Allocated(other_value)) => {
|
||||
let result = <EdwardsBlsGadget as GroupGadget<GroupAffine<EdwardsParameters>, Fq>>::add(
|
||||
let result = <EdwardsBls12Gadget as GroupGadget<Affine<EdwardsParameters>, Fq>>::add(
|
||||
self_value,
|
||||
cs,
|
||||
other_value,
|
||||
@ -111,7 +111,7 @@ impl GroupType<Fq> for EdwardsGroupType {
|
||||
}
|
||||
|
||||
(EdwardsGroupType::Allocated(self_value), EdwardsGroupType::Allocated(other_value)) => {
|
||||
let result = <EdwardsBlsGadget as GroupGadget<GroupAffine<EdwardsParameters>, Fq>>::sub(
|
||||
let result = <EdwardsBls12Gadget as GroupGadget<Affine<EdwardsParameters>, Fq>>::sub(
|
||||
self_value,
|
||||
cs,
|
||||
other_value,
|
||||
@ -317,10 +317,10 @@ impl EdwardsGroupType {
|
||||
Self::edwards_affine_from_value(&group_value, &Span::default()).map_err(|_| SynthesisError::AssignmentMissing)
|
||||
}
|
||||
|
||||
pub fn allocated<CS: ConstraintSystem<Fq>>(&self, mut cs: CS) -> Result<EdwardsBlsGadget, SynthesisError> {
|
||||
pub fn allocated<CS: ConstraintSystem<Fq>>(&self, mut cs: CS) -> Result<EdwardsBls12Gadget, SynthesisError> {
|
||||
match self {
|
||||
EdwardsGroupType::Constant(constant) => {
|
||||
<EdwardsBlsGadget as AllocGadget<GroupAffine<EdwardsParameters>, Fq>>::alloc(
|
||||
<EdwardsBls12Gadget as AllocGadget<Affine<EdwardsParameters>, Fq>>::alloc(
|
||||
&mut cs.ns(|| format!("{:?}", constant)),
|
||||
|| Ok(constant),
|
||||
)
|
||||
@ -332,7 +332,7 @@ impl EdwardsGroupType {
|
||||
let x_allocated = FpGadget::alloc(cs.ns(|| "x"), || x_value.ok_or(SynthesisError::AssignmentMissing))?;
|
||||
let y_allocated = FpGadget::alloc(cs.ns(|| "y"), || y_value.ok_or(SynthesisError::AssignmentMissing))?;
|
||||
|
||||
Ok(EdwardsBlsGadget::new(x_allocated, y_allocated))
|
||||
Ok(EdwardsBls12Gadget::new(x_allocated, y_allocated))
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -343,7 +343,7 @@ impl AllocGadget<GroupValue, Fq> for EdwardsGroupType {
|
||||
cs: CS,
|
||||
value_gen: Fn,
|
||||
) -> Result<Self, SynthesisError> {
|
||||
let value = <EdwardsBlsGadget as AllocGadget<GroupAffine<EdwardsParameters>, Fq>>::alloc(cs, || {
|
||||
let value = <EdwardsBls12Gadget as AllocGadget<Affine<EdwardsParameters>, Fq>>::alloc(cs, || {
|
||||
Self::alloc_helper(value_gen)
|
||||
})?;
|
||||
|
||||
@ -354,7 +354,7 @@ impl AllocGadget<GroupValue, Fq> for EdwardsGroupType {
|
||||
cs: CS,
|
||||
value_gen: Fn,
|
||||
) -> Result<Self, SynthesisError> {
|
||||
let value = <EdwardsBlsGadget as AllocGadget<GroupAffine<EdwardsParameters>, Fq>>::alloc_input(cs, || {
|
||||
let value = <EdwardsBls12Gadget as AllocGadget<Affine<EdwardsParameters>, Fq>>::alloc_input(cs, || {
|
||||
Self::alloc_helper(value_gen)
|
||||
})?;
|
||||
|
||||
@ -375,7 +375,7 @@ impl PartialEq for EdwardsGroupType {
|
||||
|
||||
(EdwardsGroupType::Constant(constant_value), EdwardsGroupType::Allocated(allocated_value))
|
||||
| (EdwardsGroupType::Allocated(allocated_value), EdwardsGroupType::Constant(constant_value)) => {
|
||||
<EdwardsBlsGadget as GroupGadget<GroupAffine<EdwardsParameters>, Fq>>::get_value(allocated_value)
|
||||
<EdwardsBls12Gadget as GroupGadget<Affine<EdwardsParameters>, Fq>>::get_value(allocated_value)
|
||||
.map(|allocated_value| allocated_value == *constant_value)
|
||||
.unwrap_or(false)
|
||||
}
|
||||
@ -387,8 +387,8 @@ impl Eq for EdwardsGroupType {}
|
||||
|
||||
// fn compare_allocated_edwards_bls_gadgets<CS: ConstraintSystem<Fq>>(
|
||||
// mut cs: CS,
|
||||
// first: &EdwardsBlsGadget,
|
||||
// second: &EdwardsBlsGadget,
|
||||
// first: &EdwardsBls12Gadget,
|
||||
// second: &EdwardsBls12Gadget,
|
||||
// ) -> Result<Boolean, SynthesisError> {
|
||||
// // compare x coordinates
|
||||
// let x_first = &first.x;
|
||||
@ -422,7 +422,7 @@ impl EvaluateEqGadget<Fq> for EdwardsGroupType {
|
||||
// (EdwardsGroupType::Constant(constant_value), EdwardsGroupType::Allocated(allocated_value))
|
||||
// | (EdwardsGroupType::Allocated(allocated_value), EdwardsGroupType::Constant(constant_value)) => {
|
||||
// let allocated_constant_value =
|
||||
// <EdwardsBlsGadget as AllocGadget<GroupAffine<EdwardsParameters>, Fq>>::alloc(
|
||||
// <EdwardsBls12Gadget as AllocGadget<Affine<EdwardsParameters>, Fq>>::alloc(
|
||||
// &mut cs.ns(|| format!("alloc constant for eq")),
|
||||
// || Ok(constant_value),
|
||||
// )?;
|
||||
@ -452,14 +452,14 @@ impl ConditionalEqGadget<Fq> for EdwardsGroupType {
|
||||
}
|
||||
// a - a
|
||||
(EdwardsGroupType::Allocated(self_value), EdwardsGroupType::Allocated(other_value)) => {
|
||||
<EdwardsBlsGadget>::conditional_enforce_equal(self_value, cs, other_value, condition)
|
||||
<EdwardsBls12Gadget>::conditional_enforce_equal(self_value, cs, other_value, condition)
|
||||
}
|
||||
// c - a = a - c
|
||||
(EdwardsGroupType::Constant(constant_value), EdwardsGroupType::Allocated(allocated_value))
|
||||
| (EdwardsGroupType::Allocated(allocated_value), EdwardsGroupType::Constant(constant_value)) => {
|
||||
let x = FpGadget::from(AllocatedFp::from(&mut cs, &constant_value.x));
|
||||
let y = FpGadget::from(AllocatedFp::from(&mut cs, &constant_value.y));
|
||||
let constant_gadget = EdwardsBlsGadget::new(x, y);
|
||||
let constant_gadget = EdwardsBls12Gadget::new(x, y);
|
||||
|
||||
constant_gadget.conditional_enforce_equal(cs, allocated_value, condition)
|
||||
}
|
||||
@ -467,7 +467,7 @@ impl ConditionalEqGadget<Fq> for EdwardsGroupType {
|
||||
}
|
||||
|
||||
fn cost() -> usize {
|
||||
2 * <EdwardsBlsGadget as ConditionalEqGadget<Fq>>::cost() //upper bound
|
||||
2 * <EdwardsBls12Gadget as ConditionalEqGadget<Fq>>::cost() //upper bound
|
||||
}
|
||||
}
|
||||
|
||||
@ -483,14 +483,14 @@ impl CondSelectGadget<Fq> for EdwardsGroupType {
|
||||
} else {
|
||||
let first_gadget = first.allocated(cs.ns(|| "first"))?;
|
||||
let second_gadget = second.allocated(cs.ns(|| "second"))?;
|
||||
let result = EdwardsBlsGadget::conditionally_select(cs, cond, &first_gadget, &second_gadget)?;
|
||||
let result = EdwardsBls12Gadget::conditionally_select(cs, cond, &first_gadget, &second_gadget)?;
|
||||
|
||||
Ok(EdwardsGroupType::Allocated(Box::new(result)))
|
||||
}
|
||||
}
|
||||
|
||||
fn cost() -> usize {
|
||||
2 * <EdwardsBlsGadget as CondSelectGadget<Fq>>::cost()
|
||||
2 * <EdwardsBls12Gadget as CondSelectGadget<Fq>>::cost()
|
||||
}
|
||||
}
|
||||
|
||||
@ -518,7 +518,7 @@ impl ToBytesGadget<Fq> for EdwardsGroupType {
|
||||
}
|
||||
}
|
||||
|
||||
fn edwards_affine_one() -> GroupAffine<EdwardsParameters> {
|
||||
fn edwards_affine_one() -> Affine<EdwardsParameters> {
|
||||
let (x, y) = EdwardsParameters::AFFINE_GENERATOR_COEFFS;
|
||||
|
||||
EdwardsAffine::new(x, y)
|
||||
|
@ -70,7 +70,7 @@ impl Command for Prove {
|
||||
|
||||
// Write the proof file to the output directory
|
||||
let mut proof = vec![];
|
||||
program_proof.write(&mut proof)?;
|
||||
program_proof.write_le(&mut proof)?;
|
||||
ProofFile::new(&package_name).write_to(&path, &proof)?;
|
||||
|
||||
Ok((program_proof, prepared_verifying_key))
|
||||
|
@ -24,6 +24,7 @@ use snarkvm_algorithms::{
|
||||
traits::snark::SNARK,
|
||||
};
|
||||
use snarkvm_curves::bls12_377::{Bls12_377, Fr};
|
||||
use snarkvm_utilities::ToBytes;
|
||||
|
||||
use anyhow::{anyhow, Result};
|
||||
use rand::thread_rng;
|
||||
@ -86,7 +87,7 @@ impl Command for Setup {
|
||||
let proving_key_file = ProvingKeyFile::new(&package_name);
|
||||
tracing::info!("Saving proving key ({:?})", proving_key_file.full_path(&path));
|
||||
let mut proving_key_bytes = vec![];
|
||||
proving_key.write(&mut proving_key_bytes)?;
|
||||
proving_key.write_le(&mut proving_key_bytes)?;
|
||||
let _ = proving_key_file.write_to(&path, &proving_key_bytes)?;
|
||||
tracing::info!("Complete");
|
||||
|
||||
@ -94,7 +95,7 @@ impl Command for Setup {
|
||||
let verification_key_file = VerificationKeyFile::new(&package_name);
|
||||
tracing::info!("Saving verification key ({:?})", verification_key_file.full_path(&path));
|
||||
let mut verification_key = vec![];
|
||||
proving_key.vk.write(&mut verification_key)?;
|
||||
proving_key.vk.write_le(&mut verification_key)?;
|
||||
let _ = verification_key_file.write_to(&path, &verification_key)?;
|
||||
tracing::info!("Complete");
|
||||
|
||||
|
@ -26,19 +26,18 @@ path = "../ast"
|
||||
version = "1.5.2"
|
||||
|
||||
[dependencies.snarkvm-algorithms]
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
|
||||
[dependencies.snarkvm-curves]
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
default-features = false
|
||||
|
||||
[dependencies.snarkvm-dpc]
|
||||
version = "0.6.0"
|
||||
default-features = false
|
||||
version = "0.7.4"
|
||||
features = [ "testnet1" ]
|
||||
|
||||
[dependencies.snarkvm-utilities]
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
|
||||
[dependencies.indexmap]
|
||||
version = "1.7.0"
|
||||
|
@ -22,25 +22,22 @@ use snarkvm_algorithms::{
|
||||
traits::{CommitmentScheme, CRH},
|
||||
};
|
||||
use snarkvm_dpc::{
|
||||
testnet1::{
|
||||
instantiated::{Components, LocalDataCRH, LocalDataCommitment},
|
||||
parameters::SystemParameters,
|
||||
},
|
||||
traits::DPCComponents,
|
||||
testnet1::{instantiated::Components, parameters::SystemParameters},
|
||||
DPCComponents,
|
||||
};
|
||||
use snarkvm_utilities::{bytes::ToBytes, to_bytes, FromBytes};
|
||||
use snarkvm_utilities::{bytes::ToBytes, to_bytes_le, FromBytes};
|
||||
|
||||
use std::convert::TryFrom;
|
||||
|
||||
/// Returns `true` if the path to the local data commitment leaf is a valid path in the record
|
||||
/// commitment Merkle tree.
|
||||
pub fn verify_local_data_commitment(
|
||||
system_parameters: &SystemParameters<Components>,
|
||||
dpc: &SystemParameters<Components>,
|
||||
ast_input: &AstInput,
|
||||
) -> Result<bool, LocalDataVerificationError> {
|
||||
// Verify record commitment.
|
||||
let typed_record = ast_input.get_record();
|
||||
let dpc_record_values = verify_record_commitment(system_parameters, typed_record)?;
|
||||
let dpc_record_values = verify_record_commitment(dpc, typed_record)?;
|
||||
let record_commitment: Vec<u8> = dpc_record_values.commitment;
|
||||
let record_serial_number: Vec<u8> = dpc_record_values.serial_number;
|
||||
|
||||
@ -61,26 +58,32 @@ pub fn verify_local_data_commitment(
|
||||
// Select local data commitment input bytes.
|
||||
let is_death = leaf_index < (Components::NUM_INPUT_RECORDS as u32);
|
||||
let input_bytes = if is_death {
|
||||
to_bytes![record_serial_number, record_commitment, memo, network_id]?
|
||||
to_bytes_le![record_serial_number, record_commitment, memo, network_id]?
|
||||
} else {
|
||||
to_bytes![record_commitment, memo, network_id]?
|
||||
to_bytes_le![record_commitment, memo, network_id]?
|
||||
};
|
||||
|
||||
// Construct local data commitment leaf.
|
||||
let local_data_leaf_randomness = <LocalDataCommitment as CommitmentScheme>::Randomness::read(&leaf_randomness[..])?;
|
||||
let local_data_commitment_leaf = LocalDataCommitment::commit(
|
||||
&system_parameters.local_data_commitment,
|
||||
let local_data_leaf_randomness =
|
||||
<<Components as DPCComponents>::LocalDataCommitment as CommitmentScheme>::Randomness::read_le(
|
||||
&leaf_randomness[..],
|
||||
)?;
|
||||
let local_data_commitment_leaf = <Components as DPCComponents>::LocalDataCommitment::commit(
|
||||
&dpc.local_data_commitment,
|
||||
&input_bytes,
|
||||
&local_data_leaf_randomness,
|
||||
)?;
|
||||
|
||||
// Construct record commitment merkle path.
|
||||
let local_data_merkle_path = CommitmentMerklePath::<LocalDataCommitment, LocalDataCRH>::read(&path[..])?;
|
||||
let local_data_merkle_path = CommitmentMerklePath::<
|
||||
<Components as DPCComponents>::LocalDataCommitment,
|
||||
<Components as DPCComponents>::LocalDataCRH,
|
||||
>::read_le(&path[..])?;
|
||||
|
||||
// Check record commitment merkle path is valid for the given local data commitment root.
|
||||
let local_data_commitment_root = <LocalDataCRH as CRH>::Output::read(&root[..])?;
|
||||
let local_data_commitment_root = <<Components as DPCComponents>::LocalDataCRH as CRH>::Output::read_le(&root[..])?;
|
||||
let result = local_data_merkle_path.verify(
|
||||
&system_parameters.local_data_crh,
|
||||
&dpc.local_data_crh,
|
||||
&local_data_commitment_root,
|
||||
&local_data_commitment_leaf,
|
||||
)?;
|
||||
|
@ -17,7 +17,7 @@
|
||||
use crate::{utilities::*, DPCRecordValuesError};
|
||||
use leo_ast::Record as AstRecord;
|
||||
|
||||
use snarkvm_dpc::{testnet1::instantiated::Components, AccountAddress};
|
||||
use snarkvm_dpc::{testnet1::instantiated::Components, Address};
|
||||
|
||||
use std::{convert::TryFrom, str::FromStr};
|
||||
|
||||
@ -36,7 +36,7 @@ static COMMITMENT_RANDOMNESS_PARAMETER_STRING: &str = "commitment_randomness";
|
||||
/// A new [`DPCRecordValues`] type can be constructed from an [`AstRecord`] type.
|
||||
pub struct DPCRecordValues {
|
||||
pub serial_number: Vec<u8>,
|
||||
pub owner: AccountAddress<Components>,
|
||||
pub owner: Address<Components>,
|
||||
pub is_dummy: bool,
|
||||
pub value: u64,
|
||||
pub payload: Vec<u8>,
|
||||
@ -59,7 +59,7 @@ impl TryFrom<&AstRecord> for DPCRecordValues {
|
||||
|
||||
// Lookup record owner
|
||||
let owner_value = find_input(OWNER_PARAMETER_STRING.to_owned(), ¶meters)?;
|
||||
let owner = AccountAddress::<Components>::from_str(&owner_value.to_string())?;
|
||||
let owner = Address::<Components>::from_str(&owner_value.to_string())?;
|
||||
|
||||
// Lookup record is_dummy
|
||||
let is_dummy_value = find_input(IS_DUMMY_PARAMETER_STRING.to_owned(), ¶meters)?;
|
||||
|
@ -18,25 +18,25 @@ use crate::{DPCRecordValues, RecordVerificationError};
|
||||
use leo_ast::Record as AstRecord;
|
||||
|
||||
use snarkvm_algorithms::traits::CommitmentScheme;
|
||||
use snarkvm_dpc::testnet1::{
|
||||
instantiated::{Components, RecordCommitment},
|
||||
parameters::SystemParameters,
|
||||
use snarkvm_dpc::{
|
||||
testnet1::{instantiated::Components, parameters::SystemParameters},
|
||||
DPCComponents,
|
||||
};
|
||||
use snarkvm_utilities::{bytes::ToBytes, to_bytes, FromBytes};
|
||||
use snarkvm_utilities::{bytes::ToBytes, to_bytes_le, FromBytes};
|
||||
|
||||
use std::convert::TryFrom;
|
||||
|
||||
/// Returns a serialized [`DPCRecordValues`] type if the record commitment is valid given the
|
||||
/// system parameters.
|
||||
pub fn verify_record_commitment(
|
||||
system_parameters: &SystemParameters<Components>,
|
||||
dpc: &SystemParameters<Components>,
|
||||
ast_record: &AstRecord,
|
||||
) -> Result<DPCRecordValues, RecordVerificationError> {
|
||||
// generate a dpc record from the typed record
|
||||
let record = DPCRecordValues::try_from(ast_record)?;
|
||||
|
||||
// verify record commitment
|
||||
let record_commitment_input = to_bytes![
|
||||
let record_commitment_input = to_bytes_le![
|
||||
record.owner,
|
||||
record.is_dummy,
|
||||
record.value,
|
||||
@ -46,12 +46,15 @@ pub fn verify_record_commitment(
|
||||
record.serial_number_nonce
|
||||
]?;
|
||||
|
||||
let commitment = <RecordCommitment as CommitmentScheme>::Output::read(&record.commitment[..])?;
|
||||
let commitment =
|
||||
<<Components as DPCComponents>::RecordCommitment as CommitmentScheme>::Output::read_le(&record.commitment[..])?;
|
||||
let commitment_randomness =
|
||||
<RecordCommitment as CommitmentScheme>::Randomness::read(&record.commitment_randomness[..])?;
|
||||
<<Components as DPCComponents>::RecordCommitment as CommitmentScheme>::Randomness::read_le(
|
||||
&record.commitment_randomness[..],
|
||||
)?;
|
||||
|
||||
let record_commitment = RecordCommitment::commit(
|
||||
&system_parameters.record_commitment,
|
||||
let record_commitment = <Components as DPCComponents>::RecordCommitment::commit(
|
||||
&dpc.record_commitment,
|
||||
&record_commitment_input,
|
||||
&commitment_randomness,
|
||||
)?;
|
||||
|
@ -72,10 +72,10 @@
|
||||
// let noop_program_snark_pp =
|
||||
// InstantiatedDPC::generate_noop_program_snark_parameters(&system_parameters, &mut rng).unwrap();
|
||||
//
|
||||
// let noop_program_id = to_bytes![
|
||||
// let noop_program_id = to_bytes_le![
|
||||
// ProgramVerificationKeyCRH::hash(
|
||||
// &system_parameters.program_verification_key_crh,
|
||||
// &to_bytes![noop_program_snark_pp.verification_key].unwrap()
|
||||
// &to_bytes_le![noop_program_snark_pp.verification_key].unwrap()
|
||||
// )
|
||||
// .unwrap()
|
||||
// ]
|
||||
@ -160,11 +160,11 @@
|
||||
// let root = local_data.local_data_merkle_tree.root();
|
||||
//
|
||||
// let serial_number = local_data.old_serial_numbers[0];
|
||||
// let serial_number_bytes = to_bytes![serial_number].unwrap();
|
||||
// let serial_number_bytes = to_bytes_le![serial_number].unwrap();
|
||||
//
|
||||
// let memorandum = local_data.memorandum;
|
||||
// let network_id = local_data.network_id;
|
||||
// let input_bytes = to_bytes![serial_number, record.commitment(), memorandum, network_id].unwrap();
|
||||
// let input_bytes = to_bytes_le![serial_number, record.commitment(), memorandum, network_id].unwrap();
|
||||
// let leaf_randomness = local_data.local_data_commitment_randomizers[0];
|
||||
//
|
||||
// let old_record_leaf = <LocalDataCommitment as CommitmentScheme>::commit(
|
||||
@ -185,7 +185,7 @@
|
||||
// println!();
|
||||
// println!("[state]");
|
||||
// println!("leaf index {}", leaf_index);
|
||||
// println!("root {:?}", to_bytes![root].unwrap());
|
||||
// println!("root {:?}", to_bytes_le![root].unwrap());
|
||||
// println!();
|
||||
// println!("[record]");
|
||||
// println!(
|
||||
@ -193,7 +193,7 @@
|
||||
// serial_number_bytes,
|
||||
// serial_number_bytes.len()
|
||||
// );
|
||||
// println!("commitment {:?}", to_bytes![record.commitment()].unwrap());
|
||||
// println!("commitment {:?}", to_bytes_le![record.commitment()].unwrap());
|
||||
// println!("owner {}", record.owner());
|
||||
// println!("is_dummy {:?}", record.is_dummy());
|
||||
// println!("value {:?}", record.value());
|
||||
@ -202,18 +202,18 @@
|
||||
// println!("death_program_id {:?}", record.death_program_id());
|
||||
// println!(
|
||||
// "serial number nonce {:?}",
|
||||
// to_bytes![record.serial_number_nonce()].unwrap()
|
||||
// to_bytes_le![record.serial_number_nonce()].unwrap()
|
||||
// );
|
||||
// println!(
|
||||
// "commitment randomness {:?}",
|
||||
// to_bytes![record.commitment_randomness()].unwrap()
|
||||
// to_bytes_le![record.commitment_randomness()].unwrap()
|
||||
// );
|
||||
// println!();
|
||||
// println!("[state_leaf]");
|
||||
// println!("path {:?}", to_bytes![path].unwrap());
|
||||
// println!("path {:?}", to_bytes_le![path].unwrap());
|
||||
// println!("memo {:?}", memorandum);
|
||||
// println!("network id {:?}", network_id);
|
||||
// println!("leaf randomness {:?}", to_bytes![leaf_randomness].unwrap());
|
||||
// println!("leaf randomness {:?}", to_bytes_le![leaf_randomness].unwrap());
|
||||
// println!();
|
||||
// println!("////////////////////////////////////////////////////");
|
||||
// }
|
||||
|
@ -18,18 +18,18 @@ license = "GPL-3.0"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies.snarkvm-curves]
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
default-features = false
|
||||
|
||||
[dependencies.snarkvm-fields]
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
default-features = false
|
||||
|
||||
[dependencies.snarkvm-gadgets]
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
|
||||
[dependencies.snarkvm-r1cs]
|
||||
version = "0.6.0"
|
||||
version = "0.7.4"
|
||||
default-features = false
|
||||
|
||||
[dependencies.num-bigint]
|
||||
|
@ -155,6 +155,10 @@ impl<E: PairingEngine> ConstraintSystem<E::Fr> for CircuitSynthesizer<E> {
|
||||
fn num_private_variables(&self) -> usize {
|
||||
self.private_variables.len()
|
||||
}
|
||||
|
||||
fn is_in_setup_mode(&self) -> bool {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
fn push_constraints<F: Field>(l: LinearCombination<F>, constraint: &mut Vec<(F, Index)>) {
|
||||
|
@ -29,7 +29,7 @@ impl<F: Field> From<&F> for SerializedField {
|
||||
|
||||
let mut buf = Vec::new();
|
||||
|
||||
field.write(&mut buf).unwrap();
|
||||
field.write_le(&mut buf).unwrap();
|
||||
|
||||
// convert to base 10 integer
|
||||
|
||||
|
@ -4,11 +4,11 @@ expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 506500
|
||||
num_constraints: 556546
|
||||
at: 168dc7e5a5c91155b81d611ec03fe223c562493918fb29fc46ce84cb1f54b7f5
|
||||
bt: b9699f707750827fa2663e2e2c6ef82c786ed4c74556e3bed076d78eb1a896b1
|
||||
ct: ee951676608c1176ff532d3d37c5827e2180105104289b2b1b273333677227cc
|
||||
num_private_variables: 264820
|
||||
num_constraints: 330868
|
||||
at: 90e89968758ed4552073b4217621741d7471a683f004aff63679ee176690ebb4
|
||||
bt: a83224709a5d2ea9ba982fd81f35188e299590ab7ce201773857c54a39b27d93
|
||||
ct: 26d5f56acb9effc130128af10b00b426d2396e7d8962636268b3dd08ba8df5e3
|
||||
output:
|
||||
- input_file: i128.in
|
||||
output:
|
||||
|
@ -4,11 +4,11 @@ expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 7764
|
||||
num_constraints: 8642
|
||||
at: 021e947acc78bbd99baa676d90f79998564e19d2b0478fb1e2e7946189d94bc2
|
||||
bt: eadd8a53b4c1d8efbd2015f9e358120b022061fc46b548fdab054b5a75a79757
|
||||
ct: 496912e80f22b87bffa4fcb70059f09f267d5edf5f85e42030b7bd3d65bc57d3
|
||||
num_private_variables: 4358
|
||||
num_constraints: 5446
|
||||
at: 285c49252166e044a1648d7cdeaa3975efca0e746efd365d2f170900157df8b9
|
||||
bt: b7dcf6f446108df31801263f54f0d504800d85f341baa945f13eb2dbbbbe4851
|
||||
ct: 6743f276428e33d909885898f76d747836254decaf153021c75df8d62b890e41
|
||||
output:
|
||||
- input_file: i16.in
|
||||
output:
|
||||
|
@ -4,11 +4,11 @@ expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 31396
|
||||
num_constraints: 34690
|
||||
at: c916998b93bc4ded6f989fe837aa04d3a2ea3c46c26bba70514d346ddf13f7dc
|
||||
bt: 2b765f5660bc847af13d6361ed89fbc296cfa094fd80972604f1745259c14289
|
||||
ct: 3054de0adc6f09929e39a097dc66d9dace247ff1481254154c31e5416d6b82e7
|
||||
num_private_variables: 16918
|
||||
num_constraints: 21142
|
||||
at: a8ca22c0da8166ef4f88e959be315231681516ee6113dff620637774f8e4a670
|
||||
bt: e09097be6926888dddac4cd61c1b3419e05b5b700ba3acca116f6eb2c01cb0a4
|
||||
ct: 13922ea4b7763c9228f5dfedfb0d8e2f7d5a3bbed934cd6df5ae99f4150222d2
|
||||
output:
|
||||
- input_file: i32.in
|
||||
output:
|
||||
|
@ -4,11 +4,11 @@ expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 126276
|
||||
num_constraints: 139010
|
||||
at: 5569763c96399af86cb10f3f5658e82c52594a8b4bd085542d92a6090db5f83f
|
||||
bt: 2a2b1dfbe635b61460fcba331f7383edd70f065881804500e5c4068771b1b040
|
||||
ct: 4dab363af1609fb733af59eb97aed35a67429bfa2cdd45c8c2bc8fcfa1ae6268
|
||||
num_private_variables: 66614
|
||||
num_constraints: 83254
|
||||
at: 329edae9756f7bd721526c1b0790df530231fd3294f92161fb6c6b92036f03cd
|
||||
bt: 81f681cc8f8cfc15fbecf76405b9a65ee9bf78492f8c012067a6a3db6efd466a
|
||||
ct: 308cc563c21dc87ce980daf26ae9f4716b2e9f26517940e244ce3d98f488d280
|
||||
output:
|
||||
- input_file: i64.in
|
||||
output:
|
||||
|
@ -4,11 +4,11 @@ expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 1900
|
||||
num_constraints: 2146
|
||||
at: 78254e9ffa335030ec73b144fe62ec20ae56e25f40dda07a761f8dae73d4a5ec
|
||||
bt: b857cea12f4b3716495ef7dffecf8cc30b26e4f560fa0464c4a04df43a1f18ef
|
||||
ct: b45ff088d9439c294745b670408d93a081733efdff5b80d9369e287974cd22b8
|
||||
num_private_variables: 1150
|
||||
num_constraints: 1438
|
||||
at: ea4e10bc92af056bb4b3797063565094853fe4ba595f03fd6d4a8a0fc30ca195
|
||||
bt: a41852ab8ac16bc91220ddd5b2fd1dacf3bebb624715cf2c3dc53f5dd172da9b
|
||||
ct: 0449683ea39f4822da71f08082f051f005ecf6b846ab99e48c6ab9ac5aaa75be
|
||||
output:
|
||||
- input_file: i8.in
|
||||
output:
|
||||
|
@ -4,11 +4,11 @@ expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 50562
|
||||
num_constraints: 50946
|
||||
at: 70bbe9c287066bbab7efc8c955d61d85862da186d3a0fe741fb3c7af670521f6
|
||||
bt: 5f17f32257e466ef51120fe4cb2d1d2039bcf5bf39c3c477ec09c966419719c9
|
||||
ct: d4285993ccb479eefff4da2590ce08924fe8d1750c916a794036f8131d1d720e
|
||||
num_private_variables: 263418
|
||||
num_constraints: 329465
|
||||
at: 7f9291f6c2c9d381cb6d96c1b958eb025a7fa82d19065612225198341d8ed37d
|
||||
bt: e26d177238ab12a9e8091dfb18f68e0e82d410b1ebce7c8633bd0a4973f5db2f
|
||||
ct: f36c23bcc522e47f2efe7c42ec8f9bccfb980c46c71d03f69222eb87a3aa6dd5
|
||||
output:
|
||||
- input_file: u128.in
|
||||
output:
|
||||
|
@ -4,11 +4,11 @@ expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 913
|
||||
num_constraints: 961
|
||||
at: d047f1835e03694527f9382bab398f5e463fdde613b59b26f060fd2a0e8e65d6
|
||||
bt: 9a48749a964cf80e8bacc149bcdc3524853fb3517f848522553e7da6e273f715
|
||||
ct: 82ac3f91dba2daec2992e4aaea085ff388f59e0e26330488e1dd2be11d79308d
|
||||
num_private_variables: 4188
|
||||
num_constraints: 5275
|
||||
at: f1b7abc9150b53dfc10ee7e67e8c985a07f4e0169cd1e8ed234c67c14019f669
|
||||
bt: ce2d469f0b5ace885987081e8dca6a93f663d3f90317850debc36b4fa3ebed96
|
||||
ct: 5ecb4125316e7086ed355d51b635965c19ce3f234575dd3e521c187714c00dda
|
||||
output:
|
||||
- input_file: u16.in
|
||||
output:
|
||||
|
@ -4,11 +4,11 @@ expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 3361
|
||||
num_constraints: 3457
|
||||
at: b4586913c6db620e8148b90ba3be229f924a47980b735a0c4e2cece8f1334761
|
||||
bt: 4984a34e571417eb6ce209b1542beefad525200e782ec88e6f5c58c440402f33
|
||||
ct: a0b70b0006b80beff40b0f991739c129cdf3a759c4d7c85c274f59ad62e103d5
|
||||
num_private_variables: 16572
|
||||
num_constraints: 20795
|
||||
at: 4f6450d5e7991f179adb08e1b026e453c4c6abd66f38ea4a175a888b3c1bdbf1
|
||||
bt: 3f6fd055b4a8dacc1138d93848e7ea7424a5bc64af98ad3ee1e6e5ff4719e3c3
|
||||
ct: a5941a2d70ce52e20004890f9a7198b0f22c93803e9d159824e716ff2ed2d223
|
||||
output:
|
||||
- input_file: u32.in
|
||||
output:
|
||||
|
@ -4,11 +4,11 @@ expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 12865
|
||||
num_constraints: 13057
|
||||
at: 9d9258e2128a7d269df73826378edef9d92a54ddce7a119886b62b30792c6682
|
||||
bt: 37b9014d1049204c4dcc70c10ddba1f7cf576ac366850b6a839896ca106b5e45
|
||||
ct: 96c178c46c3d65d0d19f71fede0add7de947179c34ad70565bf34b80ca88fa4a
|
||||
num_private_variables: 65916
|
||||
num_constraints: 82555
|
||||
at: 071831a1f073f5ba74377785488634267645562682b9dbeaafd1f65e39bf17d3
|
||||
bt: bcde87dd40262305d4c32a5949fa939d1b83f6ae51143eba7c147eab61314987
|
||||
ct: 7c81f1ec1d5e9746863df8f4128342df3b6ad3abe2397c2274a0c3fc45750094
|
||||
output:
|
||||
- input_file: u64.in
|
||||
output:
|
||||
|
@ -4,11 +4,11 @@ expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 265
|
||||
num_constraints: 289
|
||||
at: 0dc1e93afeaa315465d5b3b595255d51ec60c250628f6240753c8108ab9e8053
|
||||
bt: 781b0b03c0008f52efceb5be0abe02d4ac135ac1df6cda486eb941e9e6df53f5
|
||||
ct: c137ae93c16c69c41bc1758702a1b64e14ed572dab2f1461552c328dfb4b173a
|
||||
num_private_variables: 1068
|
||||
num_constraints: 1355
|
||||
at: 8ed58147507a99812dafb5a57a6c403d92d4454ea232cc7ee8b7f387a1435aa4
|
||||
bt: 9e0ee614664ff1c133eff0a1bdb47f8521967aacb928ff34195d0639aec895d6
|
||||
ct: 0b81ff43876b3dbc83461a76cfd1c6ff5513f2a5597441d526a472bd74b66ad1
|
||||
output:
|
||||
- input_file: u8.in
|
||||
output:
|
||||
|
@ -4,11 +4,11 @@ expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 18
|
||||
num_constraints: 18
|
||||
at: 0af86ba5c2862fbd3f6877188bf7b64b0e1c943322d72aa1eeff86e3d4782a66
|
||||
bt: 337d485395ace679b31230eee59c92054ba721ca86d569123ddd4625d611b595
|
||||
ct: 6c0e1fd41ec8a0fa1ac6c5c845ac3158b5a6846d089b98fab88b4d9b9e41f6a8
|
||||
num_private_variables: 1
|
||||
num_constraints: 1
|
||||
at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f
|
||||
bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c
|
||||
ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05
|
||||
output:
|
||||
- input_file: input/dummy.in
|
||||
output:
|
||||
|
Loading…
Reference in New Issue
Block a user