Skip to content

Commit

Permalink
Removing this to catch the failure red handed
Browse files Browse the repository at this point in the history
  • Loading branch information
pawanjay176 committed Jul 28, 2023
1 parent e0b29fa commit e116cb5
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions beacon_node/beacon_chain/src/kzg_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,6 @@ pub fn validate_blobs<T: EthSpec>(
blobs: &[Blob<T>],
kzg_proofs: &[KzgProof],
) -> Result<bool, KzgError> {
// TODO(sean) batch verification fails with a single element, it's unclear to me why
if blobs.len() == 1 && kzg_proofs.len() == 1 && expected_kzg_commitments.len() == 1 {
if let (Some(blob), Some(kzg_proof), Some(kzg_commitment)) = (
blobs.get(0),
kzg_proofs.get(0),
expected_kzg_commitments.get(0),
) {
return validate_blob::<T>(kzg, blob.clone(), *kzg_commitment, *kzg_proof);
} else {
return Ok(false);
}
}

let blobs = blobs
.iter()
.map(|blob| ssz_blob_to_crypto_blob::<T>(blob.clone())) // Avoid this clone
Expand Down

0 comments on commit e116cb5

Please sign in to comment.