Update librustzcash commit and adapt to changes in `DiversifierKey`.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
b05b1dafa6
commit
fe5faf94f2
|
@ -6,7 +6,7 @@ replace-with = "vendored-sources"
|
|||
|
||||
[source."https://github.com/zcash/librustzcash.git"]
|
||||
git = "https://github.com/zcash/librustzcash.git"
|
||||
rev = "e5dad037e9ac091d75dbc4e962f9e34e100f0c67"
|
||||
rev = "abe452d8a5a3d3bce102c3445f9e321d68296d8f"
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source.vendored-sources]
|
||||
|
|
|
@ -539,7 +539,7 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
|
|||
[[package]]
|
||||
name = "equihash"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/zcash/librustzcash.git?rev=e5dad037e9ac091d75dbc4e962f9e34e100f0c67#e5dad037e9ac091d75dbc4e962f9e34e100f0c67"
|
||||
source = "git+https://github.com/zcash/librustzcash.git?rev=abe452d8a5a3d3bce102c3445f9e321d68296d8f#abe452d8a5a3d3bce102c3445f9e321d68296d8f"
|
||||
dependencies = [
|
||||
"blake2b_simd",
|
||||
"byteorder",
|
||||
|
@ -548,7 +548,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "f4jumble"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zcash/librustzcash.git?rev=e5dad037e9ac091d75dbc4e962f9e34e100f0c67#e5dad037e9ac091d75dbc4e962f9e34e100f0c67"
|
||||
source = "git+https://github.com/zcash/librustzcash.git?rev=abe452d8a5a3d3bce102c3445f9e321d68296d8f#abe452d8a5a3d3bce102c3445f9e321d68296d8f"
|
||||
dependencies = [
|
||||
"blake2b_simd",
|
||||
]
|
||||
|
@ -2308,7 +2308,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "zcash_address"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zcash/librustzcash.git?rev=e5dad037e9ac091d75dbc4e962f9e34e100f0c67#e5dad037e9ac091d75dbc4e962f9e34e100f0c67"
|
||||
source = "git+https://github.com/zcash/librustzcash.git?rev=abe452d8a5a3d3bce102c3445f9e321d68296d8f#abe452d8a5a3d3bce102c3445f9e321d68296d8f"
|
||||
dependencies = [
|
||||
"bech32",
|
||||
"bs58",
|
||||
|
@ -2319,7 +2319,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "zcash_encoding"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zcash/librustzcash.git?rev=e5dad037e9ac091d75dbc4e962f9e34e100f0c67#e5dad037e9ac091d75dbc4e962f9e34e100f0c67"
|
||||
source = "git+https://github.com/zcash/librustzcash.git?rev=abe452d8a5a3d3bce102c3445f9e321d68296d8f#abe452d8a5a3d3bce102c3445f9e321d68296d8f"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"nonempty",
|
||||
|
@ -2328,7 +2328,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "zcash_history"
|
||||
version = "0.3.0"
|
||||
source = "git+https://github.com/zcash/librustzcash.git?rev=e5dad037e9ac091d75dbc4e962f9e34e100f0c67#e5dad037e9ac091d75dbc4e962f9e34e100f0c67"
|
||||
source = "git+https://github.com/zcash/librustzcash.git?rev=abe452d8a5a3d3bce102c3445f9e321d68296d8f#abe452d8a5a3d3bce102c3445f9e321d68296d8f"
|
||||
dependencies = [
|
||||
"blake2b_simd",
|
||||
"byteorder",
|
||||
|
@ -2338,7 +2338,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "zcash_note_encryption"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zcash/librustzcash.git?rev=e5dad037e9ac091d75dbc4e962f9e34e100f0c67#e5dad037e9ac091d75dbc4e962f9e34e100f0c67"
|
||||
source = "git+https://github.com/zcash/librustzcash.git?rev=abe452d8a5a3d3bce102c3445f9e321d68296d8f#abe452d8a5a3d3bce102c3445f9e321d68296d8f"
|
||||
dependencies = [
|
||||
"chacha20",
|
||||
"chacha20poly1305",
|
||||
|
@ -2349,7 +2349,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "zcash_primitives"
|
||||
version = "0.7.0"
|
||||
source = "git+https://github.com/zcash/librustzcash.git?rev=e5dad037e9ac091d75dbc4e962f9e34e100f0c67#e5dad037e9ac091d75dbc4e962f9e34e100f0c67"
|
||||
source = "git+https://github.com/zcash/librustzcash.git?rev=abe452d8a5a3d3bce102c3445f9e321d68296d8f#abe452d8a5a3d3bce102c3445f9e321d68296d8f"
|
||||
dependencies = [
|
||||
"aes",
|
||||
"bip0039",
|
||||
|
@ -2386,7 +2386,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "zcash_proofs"
|
||||
version = "0.7.1"
|
||||
source = "git+https://github.com/zcash/librustzcash.git?rev=e5dad037e9ac091d75dbc4e962f9e34e100f0c67#e5dad037e9ac091d75dbc4e962f9e34e100f0c67"
|
||||
source = "git+https://github.com/zcash/librustzcash.git?rev=abe452d8a5a3d3bce102c3445f9e321d68296d8f#abe452d8a5a3d3bce102c3445f9e321d68296d8f"
|
||||
dependencies = [
|
||||
"bellman",
|
||||
"blake2b_simd",
|
||||
|
|
14
Cargo.toml
14
Cargo.toml
|
@ -111,10 +111,10 @@ panic = 'abort'
|
|||
codegen-units = 1
|
||||
|
||||
[patch.crates-io]
|
||||
equihash = { git = "https://github.com/zcash/librustzcash.git", rev = "e5dad037e9ac091d75dbc4e962f9e34e100f0c67" }
|
||||
zcash_address = { git = "https://github.com/zcash/librustzcash.git", rev = "e5dad037e9ac091d75dbc4e962f9e34e100f0c67" }
|
||||
zcash_encoding = { git = "https://github.com/zcash/librustzcash.git", rev = "e5dad037e9ac091d75dbc4e962f9e34e100f0c67" }
|
||||
zcash_history = { git = "https://github.com/zcash/librustzcash.git", rev = "e5dad037e9ac091d75dbc4e962f9e34e100f0c67" }
|
||||
zcash_note_encryption = { git = "https://github.com/zcash/librustzcash.git", rev = "e5dad037e9ac091d75dbc4e962f9e34e100f0c67" }
|
||||
zcash_primitives = { git = "https://github.com/zcash/librustzcash.git", rev = "e5dad037e9ac091d75dbc4e962f9e34e100f0c67" }
|
||||
zcash_proofs = { git = "https://github.com/zcash/librustzcash.git", rev = "e5dad037e9ac091d75dbc4e962f9e34e100f0c67" }
|
||||
equihash = { git = "https://github.com/zcash/librustzcash.git", rev = "abe452d8a5a3d3bce102c3445f9e321d68296d8f" }
|
||||
zcash_address = { git = "https://github.com/zcash/librustzcash.git", rev = "abe452d8a5a3d3bce102c3445f9e321d68296d8f" }
|
||||
zcash_encoding = { git = "https://github.com/zcash/librustzcash.git", rev = "abe452d8a5a3d3bce102c3445f9e321d68296d8f" }
|
||||
zcash_history = { git = "https://github.com/zcash/librustzcash.git", rev = "abe452d8a5a3d3bce102c3445f9e321d68296d8f" }
|
||||
zcash_note_encryption = { git = "https://github.com/zcash/librustzcash.git", rev = "abe452d8a5a3d3bce102c3445f9e321d68296d8f" }
|
||||
zcash_primitives = { git = "https://github.com/zcash/librustzcash.git", rev = "abe452d8a5a3d3bce102c3445f9e321d68296d8f" }
|
||||
zcash_proofs = { git = "https://github.com/zcash/librustzcash.git", rev = "abe452d8a5a3d3bce102c3445f9e321d68296d8f" }
|
||||
|
|
|
@ -757,14 +757,14 @@ pub extern "C" fn librustzcash_zip32_sapling_derive_internal_fvk(
|
|||
dk_ret: *mut [c_uchar; 32],
|
||||
) {
|
||||
let fvk = FullViewingKey::read(&unsafe { *fvk }[..]).expect("valid Sapling FullViewingKey");
|
||||
let dk = zip32::DiversifierKey(unsafe { *dk });
|
||||
let dk = zip32::DiversifierKey::from_bytes(unsafe { *dk });
|
||||
|
||||
let (fvk_internal, dk_internal) = sapling_derive_internal_fvk(&fvk, &dk);
|
||||
let fvk_ret = unsafe { &mut *fvk_ret };
|
||||
let dk_ret = unsafe { &mut *dk_ret };
|
||||
|
||||
fvk_ret.copy_from_slice(&fvk_internal.to_bytes());
|
||||
dk_ret.copy_from_slice(&dk_internal.0);
|
||||
dk_ret.copy_from_slice(dk_internal.as_bytes());
|
||||
}
|
||||
|
||||
/// Derive a PaymentAddress from an ExtendedFullViewingKey.
|
||||
|
@ -776,7 +776,7 @@ pub extern "C" fn librustzcash_zip32_sapling_address(
|
|||
addr_ret: *mut [c_uchar; 43],
|
||||
) -> bool {
|
||||
let fvk = FullViewingKey::read(&unsafe { *fvk }[..]).expect("valid Sapling FullViewingKey");
|
||||
let dk = zip32::DiversifierKey(unsafe { *dk });
|
||||
let dk = zip32::DiversifierKey::from_bytes(unsafe { *dk });
|
||||
let j = zip32::DiversifierIndex(unsafe { *j });
|
||||
|
||||
match sapling_address(&fvk, &dk, j) {
|
||||
|
@ -800,7 +800,7 @@ pub extern "C" fn librustzcash_zip32_find_sapling_address(
|
|||
addr_ret: *mut [c_uchar; 43],
|
||||
) -> bool {
|
||||
let fvk = FullViewingKey::read(&unsafe { *fvk }[..]).expect("valid Sapling FullViewingKey");
|
||||
let dk = zip32::DiversifierKey(unsafe { *dk });
|
||||
let dk = zip32::DiversifierKey::from_bytes(unsafe { *dk });
|
||||
let j = zip32::DiversifierIndex(unsafe { *j });
|
||||
|
||||
match sapling_find_address(&fvk, &dk, j) {
|
||||
|
@ -823,7 +823,7 @@ pub extern "C" fn librustzcash_sapling_diversifier_index(
|
|||
d: *const [c_uchar; 11],
|
||||
j_ret: *mut [c_uchar; 11],
|
||||
) {
|
||||
let dk = zip32::DiversifierKey(unsafe { *dk });
|
||||
let dk = zip32::DiversifierKey::from_bytes(unsafe { *dk });
|
||||
let diversifier = Diversifier(unsafe { *d });
|
||||
let j_ret = unsafe { &mut *j_ret };
|
||||
|
||||
|
|
Loading…
Reference in New Issue