From cd7ca2c64fab15bc91cec5f6734aba20193f4d14 Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Wed, 26 Jun 2024 16:30:43 -0600 Subject: [PATCH] zcash_client_sqlite: Update to `shardtree` commit 337f59179eda51261e9ddfc6b18e8fb84ea277c9 Fixes #1431 --- Cargo.lock | 4 ++-- Cargo.toml | 4 ++-- zcash_client_backend/src/serialization/shardtree.rs | 6 ------ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4d645f9b9a..f93c163c9f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1123,7 +1123,7 @@ dependencies = [ [[package]] name = "incrementalmerkletree" version = "0.5.1" -source = "git+https://github.com/zcash/incrementalmerkletree?rev=8b4b1315d64d171bcf701e5de59d0707dc029f9c#8b4b1315d64d171bcf701e5de59d0707dc029f9c" +source = "git+https://github.com/zcash/incrementalmerkletree?rev=337f59179eda51261e9ddfc6b18e8fb84ea277c9#337f59179eda51261e9ddfc6b18e8fb84ea277c9" dependencies = [ "either", "proptest", @@ -2228,7 +2228,7 @@ dependencies = [ [[package]] name = "shardtree" version = "0.3.1" -source = "git+https://github.com/zcash/incrementalmerkletree?rev=8b4b1315d64d171bcf701e5de59d0707dc029f9c#8b4b1315d64d171bcf701e5de59d0707dc029f9c" +source = "git+https://github.com/zcash/incrementalmerkletree?rev=337f59179eda51261e9ddfc6b18e8fb84ea277c9#337f59179eda51261e9ddfc6b18e8fb84ea277c9" dependencies = [ "assert_matches", "bitflags 2.5.0", diff --git a/Cargo.toml b/Cargo.toml index fe77eb43a8..9c5a285d37 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -124,5 +124,5 @@ panic = 'abort' codegen-units = 1 [patch.crates-io] -incrementalmerkletree = { git = "https://github.com/zcash/incrementalmerkletree", rev = "8b4b1315d64d171bcf701e5de59d0707dc029f9c" } -shardtree = { git = "https://github.com/zcash/incrementalmerkletree", rev = "8b4b1315d64d171bcf701e5de59d0707dc029f9c" } +incrementalmerkletree = { git = "https://github.com/zcash/incrementalmerkletree", rev = "337f59179eda51261e9ddfc6b18e8fb84ea277c9" } +shardtree = { git = "https://github.com/zcash/incrementalmerkletree", rev = "337f59179eda51261e9ddfc6b18e8fb84ea277c9" } diff --git a/zcash_client_backend/src/serialization/shardtree.rs b/zcash_client_backend/src/serialization/shardtree.rs index e74a0d8c8c..a847d8672f 100644 --- a/zcash_client_backend/src/serialization/shardtree.rs +++ b/zcash_client_backend/src/serialization/shardtree.rs @@ -13,7 +13,6 @@ const SER_V1: u8 = 1; const NIL_TAG: u8 = 0; const LEAF_TAG: u8 = 1; const PARENT_TAG: u8 = 2; -const PRUNED_TAG: u8 = 3; /// Writes a [`PrunableTree`] to the provided [`Write`] instance. /// @@ -44,10 +43,6 @@ pub fn write_shard(writer: &mut W, tree: &PrunableTree) writer.write_u8(NIL_TAG)?; Ok(()) } - Node::Pruned => { - writer.write_u8(PRUNED_TAG)?; - Ok(()) - } } } @@ -79,7 +74,6 @@ fn read_shard_v1(mut reader: &mut R) -> io::Result Ok(Tree::empty()), - PRUNED_TAG => Ok(Tree::empty_pruned()), other => Err(io::Error::new( io::ErrorKind::InvalidData, format!("Node tag not recognized: {}", other),