change: NU5 mainnet dependency upgrades (#4405)

* upgrade dependencies to NU5 mainnet versions

* migrate to bitvec 1.0

* update deny.toml

* point to published redjubjub 0.5

* Point at zcash-script@0.1.6 on crates.io

* update Cargo.lock

* specify patch versions of dependencies

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
This commit is contained in:
Conrado Gouvea 2022-05-18 22:03:55 -03:00 committed by GitHub
parent 2d7b7c2c5b
commit 55822dda41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 253 additions and 275 deletions

358
Cargo.lock generated
View File

@ -371,12 +371,12 @@ checksum = "c5738be7561b0eeb501ef1d5c5db3f24e01ceb55fededd9b00039aada34966ad"
[[package]]
name = "bellman"
version = "0.11.1"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0944d18a9a37691b87733b39c9360c9950af9aa5f97e2455bc108d8eb64fc1c1"
checksum = "0d96d7f4f3dc9a699bdef1d19648f6f20ef966b51892d224582a4475be669cb5"
dependencies = [
"bitvec",
"blake2s_simd 0.5.11",
"blake2s_simd",
"byteorder",
"crossbeam-channel",
"ff",
@ -390,16 +390,6 @@ dependencies = [
"subtle",
]
[[package]]
name = "bigint"
version = "4.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0e8c8a600052b52482eff2cf4d810e462fdff1f656ac1ecb6232132a1ed7def"
dependencies = [
"byteorder",
"crunchy 0.1.6",
]
[[package]]
name = "bincode"
version = "1.3.3"
@ -469,9 +459,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitvec"
version = "0.22.3"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5237f00a8c86130a0cc317830e558b966dd7850d48a953d998c813f01a41b527"
checksum = "1489fcb93a5bb47da0462ca93ad252ad6af2145cce58d10d46a83931ba9f016b"
dependencies = [
"funty",
"radium",
@ -501,17 +491,6 @@ dependencies = [
"constant_time_eq",
]
[[package]]
name = "blake2s_simd"
version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e461a7034e85b211a4acb57ee2e6730b32912b06c08cc242243c39fc21ae6a2"
dependencies = [
"arrayref",
"arrayvec 0.5.2",
"constant_time_eq",
]
[[package]]
name = "blake2s_simd"
version = "1.0.0"
@ -592,9 +571,9 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae"
[[package]]
name = "bls12_381"
version = "0.6.0"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d28daeeded7949f1c7c72693377c98473b00be0aa0023760a84a300e4e7c74b"
checksum = "62250ece575fa9b22068b3a8d59586f01d426dd7785522efd97632959e71c986"
dependencies = [
"ff",
"group",
@ -636,6 +615,12 @@ version = "3.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c"
[[package]]
name = "byte-slice-cast"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87c5fdd0166095e1d463fc6cc01aa8ce547ad77a4e84d42eb6762b084e28067e"
[[package]]
name = "byte-tools"
version = "0.3.1"
@ -1038,12 +1023,6 @@ dependencies = [
"lazy_static",
]
[[package]]
name = "crunchy"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2f4a431c5c9f662e1200b7c7f02c34e91361150e382089a8f2dec3ba680cbda"
[[package]]
name = "crunchy"
version = "0.2.2"
@ -1506,25 +1485,17 @@ dependencies = [
[[package]]
name = "equihash"
version = "0.1.0"
source = "git+https://github.com/ZcashFoundation/librustzcash.git?rev=c3ff94134b472ba90af665e5454983dc12de1338#c3ff94134b472ba90af665e5454983dc12de1338"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4127688f6177e3f57521881cb1cfd90d1228214f9dc43b8efe6f6c6948cd8280"
dependencies = [
"blake2b_simd 1.0.0",
"blake2b_simd 0.5.11",
"byteorder",
]
[[package]]
name = "equihash"
version = "0.1.0"
source = "git+https://github.com/zcash/librustzcash.git?rev=d14e7a707ce01cefcbc82651dad48f002185dded#d14e7a707ce01cefcbc82651dad48f002185dded"
dependencies = [
"blake2b_simd 1.0.0",
"byteorder",
]
[[package]]
name = "equihash"
version = "0.1.0"
source = "git+https://github.com/zcash/librustzcash.git?rev=d5c5f04#d5c5f048947d211c2fbef23ce986b329b91d1aa5"
source = "git+https://github.com/ZcashFoundation/librustzcash.git?rev=6d75718076e592a41b6bd6ec916dc15420e4cc3c#6d75718076e592a41b6bd6ec916dc15420e4cc3c"
dependencies = [
"blake2b_simd 1.0.0",
"byteorder",
@ -1569,15 +1540,27 @@ dependencies = [
[[package]]
name = "ff"
version = "0.11.0"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2958d04124b9f27f175eaeb9a9f383d026098aa837eadd8ba22c11f13a05b9e"
checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e"
dependencies = [
"bitvec",
"rand_core 0.6.3",
"subtle",
]
[[package]]
name = "fixed-hash"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c"
dependencies = [
"byteorder",
"rand 0.8.5",
"rustc-hex",
"static_assertions",
]
[[package]]
name = "fixedbitset"
version = "0.4.1"
@ -1653,9 +1636,9 @@ dependencies = [
[[package]]
name = "funty"
version = "1.2.0"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1847abb9cb65d566acd5942e94aea9c8f547ad02c98e1649326fc0e8910b8b1e"
checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c"
[[package]]
name = "futures"
@ -1850,9 +1833,9 @@ dependencies = [
[[package]]
name = "group"
version = "0.11.0"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89"
checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d"
dependencies = [
"byteorder",
"ff",
@ -1907,9 +1890,9 @@ checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
[[package]]
name = "halo2_gadgets"
version = "0.1.0-beta.3"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7524b798b8b3689a198cd87ee1d22fe3ca007a51d35c4093f32d75c0efc30abe"
checksum = "13f3914f58cc4af5e4fe83d48b02d582be18976bc7e96c3151aa2bf1c98e9f60"
dependencies = [
"arrayvec 0.7.2",
"bitvec",
@ -1925,12 +1908,11 @@ dependencies = [
[[package]]
name = "halo2_proofs"
version = "0.1.0-beta.4"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0240b05b791cccfd6451b010b19711280e63b87f495bd84df0103f35c9139e7"
checksum = "e925780549adee8364c7f2b685c753f6f3df23bde520c67416e93bf615933760"
dependencies = [
"blake2b_simd 1.0.0",
"bumpalo",
"ff",
"group",
"pasta_curves",
@ -1972,8 +1954,9 @@ dependencies = [
[[package]]
name = "hdwallet"
version = "0.3.0"
source = "git+https://github.com/nuttycom/hdwallet?rev=9b4c1bdbe0517e3a7a8f285d6048a37d472ba3bc#9b4c1bdbe0517e3a7a8f285d6048a37d472ba3bc"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9cd89bf343be18dbe1e505100e48168bbd084760e842a8fed0317d2361470193"
dependencies = [
"lazy_static",
"rand_core 0.6.3",
@ -2181,10 +2164,30 @@ dependencies = [
]
[[package]]
name = "incrementalmerkletree"
version = "0.3.0-beta.2"
name = "impl-codec"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5812f2cfa06a7694b842402e9a100529d80fdc3022ead65ad98ce0af0bcd3311"
checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f"
dependencies = [
"parity-scale-codec",
]
[[package]]
name = "impl-trait-for-tuples"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb"
dependencies = [
"proc-macro2 1.0.36",
"quote 1.0.15",
"syn 1.0.92",
]
[[package]]
name = "incrementalmerkletree"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "068c5bdd31006d55536655cf1eb0d22d84d28de7c725b419480fd5d005c83216"
dependencies = [
"serde",
]
@ -2315,7 +2318,7 @@ version = "18.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b939a78fa820cdfcb7ee7484466746a7377760970f6f9c6fe19f9edcc8a38d2"
dependencies = [
"proc-macro-crate",
"proc-macro-crate 0.1.5",
"proc-macro2 1.0.36",
"quote 1.0.15",
"syn 1.0.92",
@ -2357,9 +2360,9 @@ dependencies = [
[[package]]
name = "jubjub"
version = "0.8.0"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2e7baec19d4e83f9145d4891178101a604565edff9645770fc979804138b04c"
checksum = "a575df5f985fe1cd5b2b05664ff6accfc46559032b954529fd225a2168d27b0f"
dependencies = [
"bitvec",
"bls12_381",
@ -2947,9 +2950,9 @@ dependencies = [
[[package]]
name = "orchard"
version = "0.1.0-beta.3"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3bb8c5f5a0977683b5071650f1e7d91f296e344a796fda585086d5b4b0a74ea"
checksum = "f918076e191a68d55c5517a16e075ecfe58fc63ed112408263f3d6194597bfcf"
dependencies = [
"aes",
"bitvec",
@ -2969,7 +2972,7 @@ dependencies = [
"reddsa",
"serde",
"subtle",
"zcash_note_encryption 0.1.0 (git+https://github.com/zcash/librustzcash.git?rev=d14e7a707ce01cefcbc82651dad48f002185dded)",
"zcash_note_encryption 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -3014,13 +3017,39 @@ checksum = "decf7381921fea4dcb2549c5667eda59b3ec297ab7e2b5fc33eac69d2e7da87b"
[[package]]
name = "pairing"
version = "0.21.0"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2e415e349a3006dd7d9482cdab1c980a845bed1377777d768cb693a44540b42"
checksum = "135590d8bdba2b31346f9cd1fb2a912329f5135e832a4f422942eb6ead8b6b3b"
dependencies = [
"group",
]
[[package]]
name = "parity-scale-codec"
version = "3.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8b44461635bbb1a0300f100a841e571e7d919c81c73075ef5d152ffdb521066"
dependencies = [
"arrayvec 0.7.2",
"bitvec",
"byte-slice-cast",
"impl-trait-for-tuples",
"parity-scale-codec-derive",
"serde",
]
[[package]]
name = "parity-scale-codec-derive"
version = "3.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c45ed1f39709f5a89338fab50e59816b2e8815f5bb58276e7ddf9afd495f73f8"
dependencies = [
"proc-macro-crate 1.1.3",
"proc-macro2 1.0.36",
"quote 1.0.15",
"syn 1.0.92",
]
[[package]]
name = "parking_lot"
version = "0.11.2"
@ -3082,9 +3111,9 @@ dependencies = [
[[package]]
name = "pasta_curves"
version = "0.3.0"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82b6fc4f73033f6aa52fdde0c38f1f570e7f2c244f22e441f62a144556891b8c"
checksum = "369d7785168ad7ff0cbe467d968ca3e19a927d8536b11ef9c21b4e454b15ba42"
dependencies = [
"blake2b_simd 1.0.0",
"ff",
@ -3374,6 +3403,17 @@ dependencies = [
"syn 1.0.92",
]
[[package]]
name = "primitive-types"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a"
dependencies = [
"fixed-hash",
"impl-codec",
"uint",
]
[[package]]
name = "proc-macro-crate"
version = "0.1.5"
@ -3383,6 +3423,16 @@ dependencies = [
"toml",
]
[[package]]
name = "proc-macro-crate"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a"
dependencies = [
"thiserror",
"toml",
]
[[package]]
name = "proc-macro-error"
version = "1.0.4"
@ -3600,9 +3650,9 @@ dependencies = [
[[package]]
name = "radium"
version = "0.6.2"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb"
checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09"
[[package]]
name = "radix_trie"
@ -3730,9 +3780,9 @@ dependencies = [
[[package]]
name = "reddsa"
version = "0.2.0"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a2efaed2ccc184ca4f82ed083ec0afe700c6254acae3d7732fc50ef79d5cbe9"
checksum = "4cc8038c8b7e481bdf688d0585d4897ed0e9e0cee10aa365dde51238c20e4182"
dependencies = [
"blake2b_simd 1.0.0",
"byteorder",
@ -3747,10 +3797,11 @@ dependencies = [
[[package]]
name = "redjubjub"
version = "0.4.0"
source = "git+https://github.com/ZcashFoundation/redjubjub.git?rev=a32ae3fc871bc72558ac2ce7eac933d1ad5f4a9c#a32ae3fc871bc72558ac2ce7eac933d1ad5f4a9c"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6039ff156887caf92df308cbaccdc058c9d3155a913da046add6e48c4cdbd91d"
dependencies = [
"blake2b_simd 0.5.11",
"blake2b_simd 1.0.0",
"byteorder",
"digest 0.9.0",
"jubjub",
@ -3978,6 +4029,12 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
[[package]]
name = "rustc-hex"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6"
[[package]]
name = "rustc_version"
version = "0.4.0"
@ -5597,12 +5654,12 @@ checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c"
[[package]]
name = "uint"
version = "0.9.1"
version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6470ab50f482bde894a037a57064480a246dbfdd5960bd65a44824693f08da5f"
checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0"
dependencies = [
"byteorder",
"crunchy 0.2.2",
"crunchy",
"hex",
"static_assertions",
]
@ -5988,9 +6045,9 @@ dependencies = [
[[package]]
name = "wyz"
version = "0.4.0"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "129e027ad65ce1453680623c3fb5163cbf7107bfe1aa32257e7d0e63f9ced188"
checksum = "30b31594f29d27036c383b53b59ed3476874d518f0efb151b27a4c275141390e"
dependencies = [
"tap",
]
@ -6027,8 +6084,9 @@ dependencies = [
[[package]]
name = "zcash_encoding"
version = "0.0.0"
source = "git+https://github.com/ZcashFoundation/librustzcash.git?rev=c3ff94134b472ba90af665e5454983dc12de1338#c3ff94134b472ba90af665e5454983dc12de1338"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fb61ea88eb539bc0ac2068e5da99411dd4978595b3d7ff6a4b1562ddc8e8710"
dependencies = [
"byteorder",
"nonempty",
@ -6036,17 +6094,8 @@ dependencies = [
[[package]]
name = "zcash_encoding"
version = "0.0.0"
source = "git+https://github.com/zcash/librustzcash.git?rev=d14e7a707ce01cefcbc82651dad48f002185dded#d14e7a707ce01cefcbc82651dad48f002185dded"
dependencies = [
"byteorder",
"nonempty",
]
[[package]]
name = "zcash_encoding"
version = "0.0.0"
source = "git+https://github.com/zcash/librustzcash.git?rev=d5c5f04#d5c5f048947d211c2fbef23ce986b329b91d1aa5"
version = "0.1.0"
source = "git+https://github.com/ZcashFoundation/librustzcash.git?rev=6d75718076e592a41b6bd6ec916dc15420e4cc3c#6d75718076e592a41b6bd6ec916dc15420e4cc3c"
dependencies = [
"byteorder",
"nonempty",
@ -6054,18 +6103,20 @@ dependencies = [
[[package]]
name = "zcash_history"
version = "0.2.0"
source = "git+https://github.com/ZcashFoundation/librustzcash.git?tag=0.5.1-zebra-v1.0.0-beta.4#80d5b049b8e8127671026320a1c22841035345a4"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb611a28a4e13ac715ee712f4344d6b279b767daf6345dafefb2c4bf582b6679"
dependencies = [
"bigint",
"blake2b_simd 0.5.11",
"blake2b_simd 1.0.0",
"byteorder",
"primitive-types",
]
[[package]]
name = "zcash_note_encryption"
version = "0.1.0"
source = "git+https://github.com/ZcashFoundation/librustzcash.git?rev=c3ff94134b472ba90af665e5454983dc12de1338#c3ff94134b472ba90af665e5454983dc12de1338"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33f84ae538f05a8ac74c82527f06b77045ed9553a0871d9db036166a4c344e3a"
dependencies = [
"chacha20",
"chacha20poly1305",
@ -6076,18 +6127,7 @@ dependencies = [
[[package]]
name = "zcash_note_encryption"
version = "0.1.0"
source = "git+https://github.com/zcash/librustzcash.git?rev=d14e7a707ce01cefcbc82651dad48f002185dded#d14e7a707ce01cefcbc82651dad48f002185dded"
dependencies = [
"chacha20",
"chacha20poly1305",
"rand_core 0.6.3",
"subtle",
]
[[package]]
name = "zcash_note_encryption"
version = "0.1.0"
source = "git+https://github.com/zcash/librustzcash.git?rev=d5c5f04#d5c5f048947d211c2fbef23ce986b329b91d1aa5"
source = "git+https://github.com/ZcashFoundation/librustzcash.git?rev=6d75718076e592a41b6bd6ec916dc15420e4cc3c#6d75718076e592a41b6bd6ec916dc15420e4cc3c"
dependencies = [
"chacha20",
"chacha20poly1305",
@ -6097,51 +6137,20 @@ dependencies = [
[[package]]
name = "zcash_primitives"
version = "0.5.0"
source = "git+https://github.com/ZcashFoundation/librustzcash.git?rev=c3ff94134b472ba90af665e5454983dc12de1338#c3ff94134b472ba90af665e5454983dc12de1338"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcb1ef5719fb24b42450dcd6b10e6155793be5668f0d962ad8132b6e4d108635"
dependencies = [
"aes",
"bip0039",
"bitvec",
"blake2b_simd 1.0.0",
"blake2s_simd 1.0.0",
"bls12_381",
"byteorder",
"chacha20poly1305",
"equihash 0.1.0 (git+https://github.com/ZcashFoundation/librustzcash.git?rev=c3ff94134b472ba90af665e5454983dc12de1338)",
"ff",
"fpe",
"group",
"hex",
"incrementalmerkletree",
"jubjub",
"lazy_static",
"memuse",
"nonempty",
"orchard",
"rand 0.8.5",
"rand_core 0.6.3",
"sha2",
"subtle",
"zcash_encoding 0.0.0 (git+https://github.com/ZcashFoundation/librustzcash.git?rev=c3ff94134b472ba90af665e5454983dc12de1338)",
"zcash_note_encryption 0.1.0 (git+https://github.com/ZcashFoundation/librustzcash.git?rev=c3ff94134b472ba90af665e5454983dc12de1338)",
]
[[package]]
name = "zcash_primitives"
version = "0.5.0"
source = "git+https://github.com/zcash/librustzcash.git?rev=d14e7a707ce01cefcbc82651dad48f002185dded#d14e7a707ce01cefcbc82651dad48f002185dded"
dependencies = [
"aes",
"bip0039",
"bitvec",
"blake2b_simd 1.0.0",
"blake2s_simd 1.0.0",
"blake2s_simd",
"bls12_381",
"bs58",
"byteorder",
"chacha20poly1305",
"equihash 0.1.0 (git+https://github.com/zcash/librustzcash.git?rev=d14e7a707ce01cefcbc82651dad48f002185dded)",
"equihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ff",
"fpe",
"group",
@ -6159,29 +6168,27 @@ dependencies = [
"secp256k1",
"sha2",
"subtle",
"zcash_encoding 0.0.0 (git+https://github.com/zcash/librustzcash.git?rev=d14e7a707ce01cefcbc82651dad48f002185dded)",
"zcash_note_encryption 0.1.0 (git+https://github.com/zcash/librustzcash.git?rev=d14e7a707ce01cefcbc82651dad48f002185dded)",
"zcash_encoding 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"zcash_note_encryption 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "zcash_primitives"
version = "0.5.0"
source = "git+https://github.com/zcash/librustzcash.git?rev=d5c5f04#d5c5f048947d211c2fbef23ce986b329b91d1aa5"
version = "0.6.0"
source = "git+https://github.com/ZcashFoundation/librustzcash.git?rev=6d75718076e592a41b6bd6ec916dc15420e4cc3c#6d75718076e592a41b6bd6ec916dc15420e4cc3c"
dependencies = [
"aes",
"bip0039",
"bitvec",
"blake2b_simd 1.0.0",
"blake2s_simd 1.0.0",
"blake2s_simd",
"bls12_381",
"bs58",
"byteorder",
"chacha20poly1305",
"equihash 0.1.0 (git+https://github.com/zcash/librustzcash.git?rev=d5c5f04)",
"equihash 0.1.0 (git+https://github.com/ZcashFoundation/librustzcash.git?rev=6d75718076e592a41b6bd6ec916dc15420e4cc3c)",
"ff",
"fpe",
"group",
"hdwallet",
"hex",
"incrementalmerkletree",
"jubjub",
@ -6191,18 +6198,16 @@ dependencies = [
"orchard",
"rand 0.8.5",
"rand_core 0.6.3",
"ripemd",
"secp256k1",
"sha2",
"subtle",
"zcash_encoding 0.0.0 (git+https://github.com/zcash/librustzcash.git?rev=d5c5f04)",
"zcash_note_encryption 0.1.0 (git+https://github.com/zcash/librustzcash.git?rev=d5c5f04)",
"zcash_encoding 0.1.0 (git+https://github.com/ZcashFoundation/librustzcash.git?rev=6d75718076e592a41b6bd6ec916dc15420e4cc3c)",
"zcash_note_encryption 0.1.0 (git+https://github.com/ZcashFoundation/librustzcash.git?rev=6d75718076e592a41b6bd6ec916dc15420e4cc3c)",
]
[[package]]
name = "zcash_proofs"
version = "0.5.0"
source = "git+https://github.com/ZcashFoundation/librustzcash.git?rev=c3ff94134b472ba90af665e5454983dc12de1338#c3ff94134b472ba90af665e5454983dc12de1338"
version = "0.6.0"
source = "git+https://github.com/ZcashFoundation/librustzcash.git?rev=6d75718076e592a41b6bd6ec916dc15420e4cc3c#6d75718076e592a41b6bd6ec916dc15420e4cc3c"
dependencies = [
"bellman",
"blake2b_simd 1.0.0",
@ -6215,13 +6220,14 @@ dependencies = [
"lazy_static",
"minreq",
"rand_core 0.6.3",
"zcash_primitives 0.5.0 (git+https://github.com/ZcashFoundation/librustzcash.git?rev=c3ff94134b472ba90af665e5454983dc12de1338)",
"zcash_primitives 0.6.0 (git+https://github.com/ZcashFoundation/librustzcash.git?rev=6d75718076e592a41b6bd6ec916dc15420e4cc3c)",
]
[[package]]
name = "zcash_script"
version = "0.1.6-alpha.0"
source = "git+https://github.com/ZcashFoundation/zcash_script.git?rev=98c74180ff2899898457090b95578dc4e58ce85d#98c74180ff2899898457090b95578dc4e58ce85d"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f584be367800e38503e66c446f011b580dc181edb28cc2afea8d6c5545765508"
dependencies = [
"bindgen",
"blake2b_simd 1.0.0",
@ -6231,9 +6237,9 @@ dependencies = [
"orchard",
"rand_core 0.6.3",
"tracing",
"zcash_encoding 0.0.0 (git+https://github.com/zcash/librustzcash.git?rev=d14e7a707ce01cefcbc82651dad48f002185dded)",
"zcash_note_encryption 0.1.0 (git+https://github.com/zcash/librustzcash.git?rev=d14e7a707ce01cefcbc82651dad48f002185dded)",
"zcash_primitives 0.5.0 (git+https://github.com/zcash/librustzcash.git?rev=d14e7a707ce01cefcbc82651dad48f002185dded)",
"zcash_encoding 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"zcash_note_encryption 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"zcash_primitives 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -6242,11 +6248,10 @@ version = "1.0.0-beta.9"
dependencies = [
"aes",
"bech32",
"bigint",
"bitflags",
"bitvec",
"blake2b_simd 1.0.0",
"blake2s_simd 1.0.0",
"blake2s_simd",
"bls12_381",
"bs58",
"byteorder",
@ -6255,7 +6260,7 @@ dependencies = [
"criterion",
"displaydoc",
"ed25519-zebra",
"equihash 0.1.0 (git+https://github.com/zcash/librustzcash.git?rev=d14e7a707ce01cefcbc82651dad48f002185dded)",
"equihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"fpe",
"futures",
"group",
@ -6266,6 +6271,7 @@ dependencies = [
"jubjub",
"lazy_static",
"orchard",
"primitive-types",
"proptest",
"proptest-derive",
"rand 0.8.5",
@ -6286,10 +6292,10 @@ dependencies = [
"tracing",
"uint",
"x25519-dalek",
"zcash_encoding 0.0.0 (git+https://github.com/zcash/librustzcash.git?rev=d5c5f04)",
"zcash_encoding 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"zcash_history",
"zcash_note_encryption 0.1.0 (git+https://github.com/zcash/librustzcash.git?rev=d14e7a707ce01cefcbc82651dad48f002185dded)",
"zcash_primitives 0.5.0 (git+https://github.com/zcash/librustzcash.git?rev=d5c5f04)",
"zcash_note_encryption 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"zcash_primitives 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"zebra-test",
]

View File

@ -65,17 +65,5 @@ lto = "thin"
[patch.crates-io]
# TODO: replace with upstream librustzcash when these changes are merged (#3037)
# remove these after a new librustzcash release (#2982)
# These are librustzcash file requirements specified in its workspace Cargo.toml,
# that we must replace with git requirements
equihash = { git = "https://github.com/zcash/librustzcash.git", rev = "d14e7a707ce01cefcbc82651dad48f002185dded" }
hdwallet = { git = "https://github.com/nuttycom/hdwallet", rev = "9b4c1bdbe0517e3a7a8f285d6048a37d472ba3bc" }
zcash_encoding = { git = "https://github.com/zcash/librustzcash.git", rev = "d14e7a707ce01cefcbc82651dad48f002185dded" }
zcash_note_encryption = { git = "https://github.com/zcash/librustzcash.git", rev = "d14e7a707ce01cefcbc82651dad48f002185dded" }
zcash_primitives = { git = "https://github.com/zcash/librustzcash.git", rev = "d14e7a707ce01cefcbc82651dad48f002185dded" }
# Currently pointing to `download-sprout-params-new` branch which contains the
# changes from `download-sprout-params-d14e7a70` rebased on top of d14e7a70 as
# required by `zcash/Cargo.toml`.
zcash_proofs = { git = "https://github.com/ZcashFoundation/librustzcash.git", rev = "c3ff94134b472ba90af665e5454983dc12de1338" }
# Currently pointing to `download-sprout-params` branch.
zcash_proofs = { git = "https://github.com/ZcashFoundation/librustzcash.git", rev = "6d75718076e592a41b6bd6ec916dc15420e4cc3c" }

View File

@ -27,9 +27,9 @@ skip = [
# wait for zcash_proofs fork be merged back into upstream
# https://github.com/ZcashFoundation/zebra/issues/3831
{ name = "equihash", version = "=0.1.0" },
{ name = "zcash_encoding", version = "=0.0.0" },
{ name = "zcash_encoding", version = "=0.1.0" },
{ name = "zcash_note_encryption", version = "=0.1.0" },
{ name = "zcash_primitives", version = "=0.5.0" },
{ name = "zcash_primitives", version = "=0.6.0" },
]
# Similarly to `skip` allows you to skip certain crates during duplicate
# detection. Unlike skip, it also includes the entire tree of transitive
@ -51,9 +51,6 @@ skip-tree = [
# wait for structopt upgrade (or upgrade to clap 3)
{ name = "heck", version = "=0.3.3" },
# wait for bellman to upgrade
{ name = "blake2s_simd", version = "=0.5.11" },
# wait for halo2 to upgrade
{ name = "blake2b_simd", version = "=0.5.11" },
@ -64,9 +61,6 @@ skip-tree = [
# wait for insta to remove duplicated dependencies
{ name = "sha-1", version = "=0.8.2" },
# wait for orchard -> bigint to upgrade
{ name = "crunchy", version = "=0.1.6" },
# wait for curve25519-dalek to upgrade
{ name = "digest", version = "=0.9.0" },
@ -83,6 +77,8 @@ skip-tree = [
# upgrade abscissa and arti
{ name = "darling", version = "=0.12.4" },
{ name = "darling", version = "=0.13.4" },
{ name = "proc-macro-crate", version = "=0.1.5" },
]
# This section is considered when running `cargo deny check sources`.
@ -100,11 +96,9 @@ unknown-git = "deny"
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
# List of URLs for allowed Git repositories
allow-git = [
"https://github.com/nuttycom/hdwallet",
]
[sources.allow-org]
github = [
"ZcashFoundation",
"zcash",
]

View File

@ -15,25 +15,25 @@ bench = ["zebra-test"]
[dependencies]
aes = "0.7.5"
bech32 = "0.9.0"
bigint = "4.4.3"
bitvec = "0.22"
bitvec = "1.0.0"
bitflags = "1.3.2"
blake2b_simd = "1.0.0"
blake2s_simd = "1.0.0"
bls12_381 = "0.6.0"
bls12_381 = "0.7.0"
bs58 = { version = "0.4.0", features = ["check"] }
byteorder = "1.4.3"
chrono = { version = "0.4.19", features = ["serde"] }
displaydoc = "0.2.3"
fpe = "0.5.1"
futures = "0.3.21"
group = "0.11.0"
halo2 = { package = "halo2_proofs", version = "=0.1.0-beta.4" }
group = "0.12.0"
halo2 = { package = "halo2_proofs", version = "0.1.0" }
hex = { version = "0.4.3", features = ["serde"] }
incrementalmerkletree = "0.3.0-beta.2"
incrementalmerkletree = "0.3.0"
itertools = "0.10.3"
jubjub = "0.8.0"
jubjub = "0.9.0"
lazy_static = "1.4.0"
primitive-types = "0.11.1"
rand_core = "0.6.3"
ripemd = "0.1.1"
@ -49,13 +49,13 @@ thiserror = "1.0.31"
uint = "0.9.1"
x25519-dalek = { version = "1.2.0", features = ["serde"] }
orchard = "=0.1.0-beta.3"
orchard = "0.1.0"
equihash = "0.1.0"
zcash_note_encryption = "0.1"
zcash_primitives = { git = "https://github.com/zcash/librustzcash.git", rev = "d5c5f04", features = ["transparent-inputs"] }
zcash_encoding = { git = "https://github.com/zcash/librustzcash.git", rev = "d5c5f04" }
zcash_history = { git = "https://github.com/ZcashFoundation/librustzcash.git", tag = "0.5.1-zebra-v1.0.0-beta.4" }
zcash_primitives = { version = "0.6.0", features = ["transparent-inputs"] }
zcash_encoding = "0.1.0"
zcash_history = "0.3.0"
proptest = { version = "0.10.1", optional = true }
proptest-derive = { version = "0.3.0", optional = true }
@ -66,8 +66,7 @@ tokio = { version = "1.18.2", optional = true }
# ZF deps
ed25519-zebra = "3.0.0"
# TODO: Update to 0.5 release when published
redjubjub = { git = "https://github.com/ZcashFoundation/redjubjub.git", rev = "a32ae3fc871bc72558ac2ce7eac933d1ad5f4a9c" }
redjubjub = "0.5.0"
zebra-test = { path = "../zebra-test/", optional = true }

View File

@ -117,7 +117,7 @@ impl NoteCommitment {
#[allow(non_snake_case)]
pub fn new(note: Note) -> Option<Self> {
// s as in the argument name for WindowedPedersenCommit_r(s)
let mut s: BitVec<Lsb0, u8> = BitVec::new();
let mut s: BitVec<u8, Lsb0> = BitVec::new();
// Prefix
s.append(&mut bitvec![1; 6]);

View File

@ -653,17 +653,17 @@ impl From<FullViewingKey> for IncomingViewingKey {
/// <https://zips.z.cash/protocol/nu5.pdf#concreteprfs>
#[allow(non_snake_case)]
fn from(fvk: FullViewingKey) -> Self {
let mut M: BitVec<Lsb0, u8> = BitVec::new();
let mut M: BitVec<u8, Lsb0> = BitVec::new();
// I2LEBSP_l^Orchard_base(ak)
let ak_bytes =
extract_p(pallas::Point::from_bytes(&fvk.spend_validating_key.into()).unwrap())
.to_repr();
M.extend_from_bitslice(&BitArray::<Lsb0, _>::from(ak_bytes)[0..255]);
M.extend_from_bitslice(&BitArray::<_, Lsb0>::from(ak_bytes)[0..255]);
// I2LEBSP_l^Orchard_base(nk)
let nk_bytes: [u8; 32] = fvk.nullifier_deriving_key.into();
M.extend_from_bitslice(&BitArray::<Lsb0, _>::from(nk_bytes)[0..255]);
M.extend_from_bitslice(&BitArray::<_, Lsb0>::from(nk_bytes)[0..255]);
// Commit^ivk_rivk
// rivk needs to be 255 bits long

View File

@ -64,14 +64,14 @@ fn Q(D: &[u8]) -> pallas::Point {
///
/// <https://zips.z.cash/protocol/nu5.pdf#concretesinsemillahash>
#[allow(non_snake_case)]
fn S(j: &BitSlice<Lsb0, u8>) -> pallas::Point {
fn S(j: &BitSlice<u8, Lsb0>) -> pallas::Point {
// The value of j is a 10-bit value, therefore must never exceed 2^10 in
// value.
assert_eq!(j.len(), 10);
// I2LEOSP_32(𝑗)
let mut leosp_32_j = [0u8; 4];
leosp_32_j[..2].copy_from_slice(j.as_raw_slice());
leosp_32_j[..2].copy_from_slice(j.to_bitvec().as_raw_slice());
pallas_group_hash(b"z.cash:SinsemillaS", &leosp_32_j)
}
@ -114,7 +114,7 @@ fn incomplete_addition(
///
/// If `M` is greater than `k*c = 2530` bits.
#[allow(non_snake_case)]
pub fn sinsemilla_hash_to_point(D: &[u8], M: &BitVec<Lsb0, u8>) -> Option<pallas::Point> {
pub fn sinsemilla_hash_to_point(D: &[u8], M: &BitVec<u8, Lsb0>) -> Option<pallas::Point> {
let k = 10;
let c = 253;
@ -129,8 +129,7 @@ pub fn sinsemilla_hash_to_point(D: &[u8], M: &BitVec<Lsb0, u8>) -> Option<pallas
for chunk in M.chunks(k) {
// Pad each chunk with zeros.
let mut store = [0u8; 2];
let bits =
BitSlice::<Lsb0, _>::from_slice_mut(&mut store).expect("must work for small slices");
let bits = BitSlice::<_, Lsb0>::from_slice_mut(&mut store);
bits[..chunk.len()].copy_from_bitslice(chunk);
acc = incomplete_addition(incomplete_addition(acc, Some(S(&bits[..k]))), acc);
@ -156,7 +155,7 @@ pub fn sinsemilla_hash_to_point(D: &[u8], M: &BitVec<Lsb0, u8>) -> Option<pallas
///
/// If `M` is greater than `k*c = 2530` bits in `sinsemilla_hash_to_point`.
#[allow(non_snake_case)]
pub fn sinsemilla_hash(D: &[u8], M: &BitVec<Lsb0, u8>) -> Option<pallas::Base> {
pub fn sinsemilla_hash(D: &[u8], M: &BitVec<u8, Lsb0>) -> Option<pallas::Base> {
extract_p_bottom(sinsemilla_hash_to_point(D, M))
}
@ -173,7 +172,7 @@ pub fn sinsemilla_hash(D: &[u8], M: &BitVec<Lsb0, u8>) -> Option<pallas::Base> {
pub fn sinsemilla_commit(
r: pallas::Scalar,
D: &[u8],
M: &BitVec<Lsb0, u8>,
M: &BitVec<u8, Lsb0>,
) -> Option<pallas::Point> {
sinsemilla_hash_to_point(&[D, b"-M"].concat(), M)
.map(|point| point + pallas_group_hash(&[D, b"-r"].concat(), b"") * r)
@ -186,7 +185,7 @@ pub fn sinsemilla_commit(
pub fn sinsemilla_short_commit(
r: pallas::Scalar,
D: &[u8],
M: &BitVec<Lsb0, u8>,
M: &BitVec<u8, Lsb0>,
) -> Option<pallas::Base> {
extract_p_bottom(sinsemilla_commit(r, D, M))
}
@ -215,7 +214,7 @@ mod tests {
let D = b"z.cash:test-Sinsemilla";
let M = bitvec![
Lsb0, u8; 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0,
u8, Lsb0; 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0,
1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0,
];
@ -247,7 +246,7 @@ mod tests {
for tv in tests::vectors::SINSEMILLA.iter() {
let D = tv.domain.as_slice();
let M: &BitVec<Lsb0, u8> = &tv.msg.iter().collect();
let M: &BitVec<u8, Lsb0> = &tv.msg.iter().collect();
assert_eq!(
sinsemilla_hash_to_point(D, M).expect("should not fail per Theorem 5.4.4"),

View File

@ -51,13 +51,13 @@ pub(super) const MERKLE_DEPTH: usize = 32;
/// https://zips.z.cash/protocol/protocol.pdf#orchardmerklecrh
/// https://zips.z.cash/protocol/protocol.pdf#constants
fn merkle_crh_orchard(layer: u8, left: pallas::Base, right: pallas::Base) -> pallas::Base {
let mut s = bitvec![Lsb0, u8;];
let mut s = bitvec![u8, Lsb0;];
// Prefix: l = I2LEBSP_10(MerkleDepth^Orchard 1 layer)
let l = MERKLE_DEPTH - 1 - layer as usize;
s.extend_from_bitslice(&BitArray::<Lsb0, _>::from([l, 0])[0..10]);
s.extend_from_bitslice(&BitArray::<Lsb0, _>::from(left.to_repr())[0..255]);
s.extend_from_bitslice(&BitArray::<Lsb0, _>::from(right.to_repr())[0..255]);
s.extend_from_bitslice(&BitArray::<_, Lsb0>::from([l, 0])[0..10]);
s.extend_from_bitslice(&BitArray::<_, Lsb0>::from(left.to_repr())[0..255]);
s.extend_from_bitslice(&BitArray::<_, Lsb0>::from(right.to_repr())[0..255]);
match sinsemilla_hash(b"z.cash:Orchard-MerkleCRH", &s) {
Some(h) => h,

View File

@ -277,7 +277,7 @@ impl Version for zcash_history::V1 {
.to_work()
.expect("work must be valid during contextual verification");
// There is no direct `std::primitive::u128` to `bigint::U256` conversion
let work = bigint::U256::from_big_endian(&work.as_u128().to_be_bytes());
let work = primitive_types::U256::from_big_endian(&work.as_u128().to_be_bytes());
let sapling_tx_count = block.sapling_transactions_count();

View File

@ -110,7 +110,7 @@ impl NoteCommitment {
T: RngCore + CryptoRng,
{
// s as in the argument name for WindowedPedersenCommit_r(s)
let mut s: BitVec<Lsb0, u8> = BitVec::new();
let mut s: BitVec<u8, Lsb0> = BitVec::new();
// Prefix
s.append(&mut bitvec![1; 6]);

View File

@ -20,13 +20,13 @@ fn I_i(domain: [u8; 8], i: u32) -> jubjub::ExtendedPoint {
///
/// https://zips.z.cash/protocol/protocol.pdf#concretepedersenhash
#[allow(non_snake_case)]
fn M_i(segment: &BitSlice<Lsb0, u8>) -> jubjub::Fr {
fn M_i(segment: &BitSlice<u8, Lsb0>) -> jubjub::Fr {
let mut m_i = jubjub::Fr::zero();
for (j, chunk) in segment.chunks(3).enumerate() {
// Pad each chunk with zeros.
let mut store = 0u8;
let bits = BitSlice::<Lsb0, _>::from_element_mut(&mut store);
let bits = BitSlice::<_, Lsb0>::from_element_mut(&mut store);
chunk
.iter()
.enumerate()
@ -68,7 +68,7 @@ fn M_i(segment: &BitSlice<Lsb0, u8>) -> jubjub::Fr {
///
/// https://zips.z.cash/protocol/protocol.pdf#concretepedersenhash
#[allow(non_snake_case)]
pub fn pedersen_hash_to_point(domain: [u8; 8], M: &BitVec<Lsb0, u8>) -> jubjub::ExtendedPoint {
pub fn pedersen_hash_to_point(domain: [u8; 8], M: &BitVec<u8, Lsb0>) -> jubjub::ExtendedPoint {
let mut result = jubjub::ExtendedPoint::identity();
// Split M into n segments of 3 * c bits, where c = 63, padding the last
@ -94,7 +94,7 @@ pub fn pedersen_hash_to_point(domain: [u8; 8], M: &BitVec<Lsb0, u8>) -> jubjub::
///
/// https://zips.z.cash/protocol/protocol.pdf#concretepedersenhash
#[allow(non_snake_case)]
pub fn pedersen_hash(domain: [u8; 8], M: &BitVec<Lsb0, u8>) -> jubjub::Fq {
pub fn pedersen_hash(domain: [u8; 8], M: &BitVec<u8, Lsb0>) -> jubjub::Fq {
jubjub::AffinePoint::from(pedersen_hash_to_point(domain, M)).get_u()
}
@ -121,7 +121,7 @@ pub fn mixing_pedersen_hash(P: jubjub::ExtendedPoint, x: jubjub::Fr) -> jubjub::
/// PedersenHashToPoint("Zcash_PH", s) + [r]FindGroupHash^J^(r)("Zcash_PH", "r")
///
/// https://zips.z.cash/protocol/protocol.pdf#concretewindowedcommit
pub fn windowed_pedersen_commitment(r: jubjub::Fr, s: &BitVec<Lsb0, u8>) -> jubjub::ExtendedPoint {
pub fn windowed_pedersen_commitment(r: jubjub::Fr, s: &BitVec<u8, Lsb0>) -> jubjub::ExtendedPoint {
const D: [u8; 8] = *b"Zcash_PH";
pedersen_hash_to_point(D, s) + find_group_hash(D, b"r") * r

View File

@ -22,14 +22,14 @@ fn point_from_hex<T: AsRef<[u8]>>(point_in_hex: T) -> jubjub::AffinePoint {
}
pub struct TestVector {
pub input_bits: BitVec<Lsb0, u8>,
pub input_bits: BitVec<u8, Lsb0>,
pub output_point: jubjub::AffinePoint,
}
lazy_static! {
pub static ref TEST_VECTORS: [TestVector; 12] = [
TestVector {
input_bits: bitvec![Lsb0, u8; 1, 1, 1, 1, 1, 1],
input_bits: bitvec![u8, Lsb0; 1, 1, 1, 1, 1, 1],
// original librustzcash affine point test vector (in reversed-endian byte order):
// "06b1187c11ca4fb4383b2e0d0dbbde3ad3617338b5029187ec65a5eaed5e4d0b",
// "3ce70f536652f0dea496393a1e55c4e08b9d55508e16d11e5db40d4810cbc982"
@ -38,7 +38,7 @@ lazy_static! {
)
},
TestVector {
input_bits: bitvec![Lsb0, u8; 1, 1, 1, 1, 1, 1, 0],
input_bits: bitvec![u8, Lsb0; 1, 1, 1, 1, 1, 1, 0],
// Original librustzcash affine point test vector (in reversed-endian byte order):
// "2fc3bc454c337f71d4f04f86304262fcbfc9ecd808716b92fc42cbe6827f7f1a",
// "46d0d25bf1a654eedc6a9b1e5af398925113959feac31b7a2c036ff9b9ec0638"
@ -47,7 +47,7 @@ lazy_static! {
)
},
TestVector {
input_bits: bitvec![Lsb0, u8; 1, 1, 1, 1, 1, 1, 1],
input_bits: bitvec![u8, Lsb0; 1, 1, 1, 1, 1, 1, 1],
// Original librustzcash affine point test vector (in reversed-endian byte order):
// "4f8ce0e0a9e674b3ab9606a7d7aefba386e81583d81918127814cde41d209d97",
// "312b5ab93b14c9b9af334fe1fe3c50fffb53fbd074fa40ca600febde7c97e346"
@ -56,7 +56,7 @@ lazy_static! {
)
},
TestVector {
input_bits: bitvec![Lsb0, u8; 1, 1, 1, 1, 1, 1, 1, 0, 0],
input_bits: bitvec![u8, Lsb0; 1, 1, 1, 1, 1, 1, 1, 0, 0],
// Original librustzcash affine point test vector (in reversed-endian byte order):
// "4f8ce0e0a9e674b3ab9606a7d7aefba386e81583d81918127814cde41d209d97",
// "312b5ab93b14c9b9af334fe1fe3c50fffb53fbd074fa40ca600febde7c97e346"
@ -65,7 +65,7 @@ lazy_static! {
),
},
TestVector {
input_bits: bitvec![Lsb0, u8;
input_bits: bitvec![u8, Lsb0;
1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1,
0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1,
@ -82,7 +82,7 @@ lazy_static! {
),
},
TestVector {
input_bits: bitvec![Lsb0, u8;
input_bits: bitvec![u8, Lsb0;
1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0,
0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0,
0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0,
@ -99,7 +99,7 @@ lazy_static! {
),
},
TestVector {
input_bits: bitvec![Lsb0, u8;
input_bits: bitvec![u8, Lsb0;
1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0,
1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0,
@ -116,7 +116,7 @@ lazy_static! {
)
},
TestVector {
input_bits: bitvec![Lsb0, u8;
input_bits: bitvec![u8, Lsb0;
1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0,
0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0,
1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1,
@ -153,7 +153,7 @@ lazy_static! {
),
},
TestVector {
input_bits: bitvec![Lsb0, u8;
input_bits: bitvec![u8, Lsb0;
1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0,
0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0,
1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1,
@ -191,7 +191,7 @@ lazy_static! {
),
},
TestVector {
input_bits: bitvec![Lsb0, u8;
input_bits: bitvec![u8, Lsb0;
1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1,
1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0,
0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1,
@ -235,7 +235,7 @@ lazy_static! {
),
},
TestVector {
input_bits: bitvec![Lsb0, u8;
input_bits: bitvec![u8, Lsb0;
1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0,
1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1,
0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0,
@ -279,7 +279,7 @@ lazy_static! {
),
},
TestVector {
input_bits: bitvec![Lsb0, u8;
input_bits: bitvec![u8, Lsb0;
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,

View File

@ -50,13 +50,13 @@ pub(super) const MERKLE_DEPTH: usize = 32;
///
/// https://zips.z.cash/protocol/protocol.pdf#merklecrh
fn merkle_crh_sapling(layer: u8, left: [u8; 32], right: [u8; 32]) -> [u8; 32] {
let mut s = bitvec![Lsb0, u8;];
let mut s = bitvec![u8, Lsb0;];
// Prefix: l = I2LEBSP_6(MerkleDepth^Sapling 1 layer)
let l = (MERKLE_DEPTH - 1) as u8 - layer;
s.extend_from_bitslice(&BitSlice::<Lsb0, _>::from_element(&l)[0..6]);
s.extend_from_bitslice(&BitArray::<Lsb0, _>::from(left)[0..255]);
s.extend_from_bitslice(&BitArray::<Lsb0, _>::from(right)[0..255]);
s.extend_from_bitslice(&BitSlice::<_, Lsb0>::from_element(&l)[0..6]);
s.extend_from_bitslice(&BitArray::<_, Lsb0>::from(left)[0..255]);
s.extend_from_bitslice(&BitArray::<_, Lsb0>::from(right)[0..255]);
pedersen_hash(*b"Zcash_PH", &s).to_bytes()
}

View File

@ -11,12 +11,12 @@ proptest-impl = ["proptest", "proptest-derive", "zebra-chain/proptest-impl", "ze
[dependencies]
blake2b_simd = "1.0.0"
bellman = "0.11.1"
bls12_381 = "0.6.0"
jubjub = "0.8.0"
bellman = "0.13.0"
bls12_381 = "0.7.0"
jubjub = "0.9.0"
rand = { version = "0.8.5", package = "rand" }
halo2 = { package = "halo2_proofs", version = "=0.1.0-beta.4" }
halo2 = { package = "halo2_proofs", version = "0.1.0" }
chrono = "0.4.19"
dirs = "4.0.0"
@ -34,13 +34,11 @@ tower = { version = "0.4.12", features = ["timeout", "util", "buffer"] }
tracing = "0.1.31"
tracing-futures = "0.2.5"
orchard = "=0.1.0-beta.3"
orchard = "0.1.0"
# TODO: replace with upstream librustzcash when these changes are merged (#3037)
# Currently pointing to `download-sprout-params-new` branch which contains the
# changes from `download-sprout-params-d14e7a70` rebased on top of d14e7a70 as
# required by `zcash/Cargo.toml`.
zcash_proofs = { git = "https://github.com/ZcashFoundation/librustzcash.git", rev = "c3ff94134b472ba90af665e5454983dc12de1338", features = ["local-prover", "multicore", "download-params"] }
# Currently pointing to `download-sprout-params` branch.
zcash_proofs = { git = "https://github.com/ZcashFoundation/librustzcash.git", rev = "6d75718076e592a41b6bd6ec916dc15420e4cc3c", features = ["local-prover", "multicore", "download-params"] }
tower-fallback = { path = "../tower-fallback/" }
tower-batch = { path = "../tower-batch/" }

View File

@ -2,7 +2,6 @@
use std::{
convert::{TryFrom, TryInto},
error::Error,
fmt,
future::Future,
mem,
@ -129,13 +128,9 @@ pub static JOINSPLIT_VERIFIER: Lazy<ServiceFn<fn(Item) -> Ready<Result<(), Boxed
// function (which is possible because it doesn't capture any state).
tower::service_fn(
(|item: Item| {
// Workaround bug in `bellman::VerificationError` fmt::Display
// implementation https://github.com/zkcrypto/bellman/pull/77
#[allow(deprecated)]
ready(
item.verify_single(&GROTH16_PARAMETERS.sprout.joinsplit_prepared_verifying_key)
// When that is fixed, change to `e.to_string()`
.map_err(|e| TransactionError::Groth16(e.description().to_string()))
.map_err(|e| TransactionError::Groth16(e.to_string()))
.map_err(tower_fallback::BoxedError::from),
)
}) as fn(_) -> _,

View File

@ -8,7 +8,8 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
zcash_script = { git = "https://github.com/ZcashFoundation/zcash_script.git", rev = "98c74180ff2899898457090b95578dc4e58ce85d" }
# TODO: make a release and point to it
zcash_script = "0.1.6"
zebra-chain = { path = "../zebra-chain" }

View File

@ -45,10 +45,8 @@ insta = { version = "1.14.0", features = ["ron"] }
proptest = "0.10.1"
proptest-derive = "0.3.0"
# TODO: replace w/ crate version when released: https://github.com/ZcashFoundation/zebra/issues/2083
# Note: if updating this, also update the workspace Cargo.toml to match.
halo2 = { package = "halo2_proofs", version = "=0.1.0-beta.4" }
jubjub = "0.8.0"
halo2 = { package = "halo2_proofs", version = "0.1.0" }
jubjub = "0.9.0"
tokio = { version = "1.18.2", features = ["full"] }