From 61420a3135c7f592d1c3becfd076e19db4dfeaaa Mon Sep 17 00:00:00 2001 From: Ron Kuris Date: Wed, 29 Nov 2023 09:06:04 -0800 Subject: [PATCH] Range proofs can contain zero length data (#386) --- firewood/src/proof.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/firewood/src/proof.rs b/firewood/src/proof.rs index e101ff2fa..b0883758e 100644 --- a/firewood/src/proof.rs +++ b/firewood/src/proof.rs @@ -30,8 +30,6 @@ pub enum ProofError { InconsistentProofData, #[error("non-monotonic range increase")] NonMonotonicIncreaseRange, - #[error("range has deletion")] - RangeHasDeletion, #[error("invalid data")] InvalidData, #[error("invalid proof")] @@ -163,10 +161,6 @@ impl + Send> Proof { return Err(ProofError::NonMonotonicIncreaseRange); } - if !vals.iter().all(|v| !v.as_ref().is_empty()) { - return Err(ProofError::RangeHasDeletion); - } - // Use in-memory merkle let mut merkle_setup = new_merkle(0x10000, 0x10000);