From 980736806fe5417e36cbbdf00cdcf51b755e3b28 Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Thu, 18 May 2023 17:03:30 -0600 Subject: [PATCH] Upgrade `incrementalmerkletree` & `orchard` patch versions. --- Cargo.toml | 5 ++--- zcash_primitives/src/merkle_tree.rs | 8 ++++---- zcash_proofs/src/sapling/prover.rs | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1aeb9090c..59b1b607b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,6 +21,5 @@ codegen-units = 1 [patch.crates-io] zcash_encoding = { path = "components/zcash_encoding" } zcash_note_encryption = { path = "components/zcash_note_encryption" } -bridgetree = { git = "https://github.com/zcash/incrementalmerkletree.git", rev = "ea1686e8f8f6c1e41aa97251a7eb4fadfd33df47" } -incrementalmerkletree = { git = "https://github.com/zcash/incrementalmerkletree.git", rev = "ea1686e8f8f6c1e41aa97251a7eb4fadfd33df47" } -orchard = { git = "https://github.com/zcash/orchard.git", rev = "8bc53ecbde0944f59f2321f06f2f4171975c7288" } +incrementalmerkletree = { git = "https://github.com/zcash/incrementalmerkletree.git", rev = "62f0c9039b0bee94c16c40c272e19c5922290664" } +orchard = { git = "https://github.com/zcash/orchard.git", rev = "11b6858ac81a79675de205980155a49d6f92b71e" } diff --git a/zcash_primitives/src/merkle_tree.rs b/zcash_primitives/src/merkle_tree.rs index 798649540..176d3b437 100644 --- a/zcash_primitives/src/merkle_tree.rs +++ b/zcash_primitives/src/merkle_tree.rs @@ -67,21 +67,21 @@ pub fn read_leu64_usize(mut reader: R) -> io::Result { } pub fn write_position(mut writer: W, position: Position) -> io::Result<()> { - write_usize_leu64(&mut writer, position.into()) + writer.write_u64::(position.into()) } pub fn read_position(mut reader: R) -> io::Result { - read_leu64_usize(&mut reader).map(Position::from) + reader.read_u64::().map(Position::from) } pub fn write_address(mut writer: W, addr: Address) -> io::Result<()> { writer.write_u8(addr.level().into())?; - write_usize_leu64(&mut writer, addr.index()) + writer.write_u64::(addr.index()) } pub fn read_address(mut reader: R) -> io::Result
{ let level = reader.read_u8().map(Level::from)?; - let index = read_leu64_usize(&mut reader).map(usize::from)?; + let index = reader.read_u64::()?; Ok(Address::from_parts(level, index)) } diff --git a/zcash_proofs/src/sapling/prover.rs b/zcash_proofs/src/sapling/prover.rs index e30521fd2..9ecfb8f6a 100644 --- a/zcash_proofs/src/sapling/prover.rs +++ b/zcash_proofs/src/sapling/prover.rs @@ -90,7 +90,7 @@ impl SaplingProvingContext { ); // We now have the full witness for our circuit - let pos: usize = merkle_path.position().into(); + let pos: u64 = merkle_path.position().into(); let instance = Spend { value_commitment_opening: Some(value_commitment_opening), proof_generation_key: Some(proof_generation_key),