Skip to content

Commit

Permalink
Range proofs can contain zero length data (#386)
Browse files Browse the repository at this point in the history
  • Loading branch information
rkuris authored Nov 29, 2023
1 parent 4a4f4ba commit 61420a3
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions firewood/src/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down Expand Up @@ -163,10 +161,6 @@ impl<N: AsRef<[u8]> + Send> Proof<N> {
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);

Expand Down

0 comments on commit 61420a3

Please sign in to comment.