Skip to content

Commit

Permalink
Remove counters from sigverify functions (solana-labs#2785)
Browse files Browse the repository at this point in the history
These counters should be removed for several reasons:
- Counters in general are bad (multiple atomics for a single value)
- The counters are at debug level, so effectively unused
- The reported values can be determined from SigVerifierStats

The only thing lost is whether verification was done by cpu/gpu/disabled
verifier. But, most validators are not running gpu's, so ripping this
out now and it can be re-added more properly if more validators shift to
using gpu's.
  • Loading branch information
steviez authored and jeffwashington committed Aug 29, 2024
1 parent 3ceb0ff commit ec36c97
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions perf/src/sigverify.rs
Original file line number Diff line number Diff line change
@@ -11,7 +11,6 @@ use {
recycler::Recycler,
},
rayon::{prelude::*, ThreadPool},
solana_metrics::inc_new_counter_debug,
solana_rayon_threadlimit::get_thread_count,
solana_sdk::{
hash::Hash,
@@ -531,7 +530,6 @@ pub fn ed25519_verify_cpu(batches: &mut [PacketBatch], reject_non_vote: bool, pa
}
});
});
inc_new_counter_debug!("ed25519_verify_cpu", packet_count);
}

pub fn ed25519_verify_disabled(batches: &mut [PacketBatch]) {
@@ -542,7 +540,6 @@ pub fn ed25519_verify_disabled(batches: &mut [PacketBatch]) {
.par_iter_mut()
.for_each(|p| p.meta_mut().set_discard(false))
});
inc_new_counter_debug!("ed25519_verify_disabled", packet_count);
}

pub fn copy_return_values<I, T>(sig_lens: I, out: &PinnedVec<u8>, rvs: &mut [Vec<u8>])
@@ -672,7 +669,6 @@ pub fn ed25519_verify(
trace!("done verify");
copy_return_values(sig_lens, &out, &mut rvs);
mark_disabled(batches, &rvs);
inc_new_counter_debug!("ed25519_verify_gpu", valid_packet_count);
}

#[cfg(test)]

0 comments on commit ec36c97

Please sign in to comment.