Skip to content

Commit 7244f27

Browse files
committed
refactor: remove unused commented code
Signed-off-by: pedro bufulin <pedro@semiotic.ai>
1 parent d966c4b commit 7244f27

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

h2s2/src/ncs.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ impl<P: Pairing, D: Digest + Send + Sync> HolographicHomomorphicSignatureScheme<
188188

189189
fn evaluate(
190190
signatures: &[Self::Signature],
191-
_weights: &[Self::Weight],
191+
weights: &[Self::Weight],
192192
) -> Result<Self::AggregatedSignature, Box<dyn Error>> {
193193
let mut aggregate_signature = P::G1::zero();
194194
let mut total_value = P::ScalarField::zero();
@@ -289,8 +289,6 @@ mod tests {
289289
fn test_aggregate() {
290290
let mut rng = test_rng();
291291
let params = &*PARAMS;
292-
// let sk = params.secret_key.unwrap();
293-
// let pk = params.public_key;
294292

295293
// Generate random messages for each lane/index
296294
let messages: Vec<ark_bn254::Fr> = (0..N).map(|_| ark_bn254::Fr::rand(&mut rng)).collect();
@@ -327,9 +325,6 @@ mod tests {
327325
let aggregated_signature =
328326
NCS::<Bn254, Blake2b512>::evaluate(&signatures, &weights).expect("Evaluate failed");
329327

330-
// Compute the aggregate message (sum of all messages)
331-
// let message_aggregate: ark_bn254::Fr = messages.iter().copied().sum();
332-
333328
// Verify the aggregated signature
334329
let is_valid = NCS::<Bn254, Blake2b512>::verify_aggregate(
335330
&params,
@@ -358,9 +353,6 @@ mod tests {
358353
let tampered_aggregate_signature =
359354
NCS::<Bn254, Blake2b512>::evaluate(&signatures, &weights).expect("Evaluate failed");
360355

361-
// Compute the aggregate message (should fail because of duplicate signature)
362-
// let tampered_message_aggregate: ark_bn254::Fr = messages.iter().copied().sum();
363-
364356
// Verify the aggregated signature with the tampered signature table
365357
let is_valid = NCS::<Bn254, Blake2b512>::verify_aggregate(
366358
&params,

0 commit comments

Comments
 (0)