Skip to content

Hash-based signatures rust benchmarks#935

Merged
lockedloop merged 13 commits intomainfrom
danilo/hash_based_sig_benchmark
Sep 5, 2025
Merged

Hash-based signatures rust benchmarks#935
lockedloop merged 13 commits intomainfrom
danilo/hash_based_sig_benchmark

Conversation

@lockedloop
Copy link
Copy Markdown
Contributor

@lockedloop lockedloop commented Sep 3, 2025

No description provided.

@lockedloop lockedloop self-assigned this Sep 3, 2025
@graphite-app
Copy link
Copy Markdown

graphite-app bot commented Sep 3, 2025

How to use the Graphite Merge Queue

Add the label merge-ready to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@lockedloop lockedloop changed the title initial dump Hash-based signatures rust benchmarks Sep 3, 2025
@lockedloop lockedloop marked this pull request as ready for review September 5, 2025 10:33
@lockedloop lockedloop requested a review from GraDKh September 5, 2025 10:33

group.bench_with_input(BenchmarkId::from_parameter(&bench_name), &bench_name, |b, _| {
b.iter(|| {
let mut prover_transcript = ProverTranscript::new(StdChallenger::default());
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Pseudo-Random Testing rule requires benchmarks to use rand::rng() instead of seeded RNGs. StdChallenger::default() likely uses a seeded RNG rather than thread RNG. Replace with rand::rng() for proper randomness in benchmarks, reserving StdRng::seed_from_u64 for reproducible tests only.

Suggested change
let mut prover_transcript = ProverTranscript::new(StdChallenger::default());
let mut prover_transcript = ProverTranscript::new(StdChallenger::new(rand::thread_rng()));

Spotted by Diamond (based on custom rule: Monbijou Testing Patterns)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Comment thread crates/examples/benches/hashsign.rs Outdated
Comment thread crates/examples/benches/hashsign.rs Outdated
lockedloop and others added 4 commits September 5, 2025 14:09
…benchmark

Incorporated all improvements from hashsign-benchmarks including:
- Centralized get_feature_suffix in PlatformDiagnostics
- Parallel compression for improved merkle tree performance
- Updated benchmark configurations (100ms warmup, 10s measurement, 10 samples)
- Blake2s, keccak, and ethsign benchmarks set to 50 samples
- Fixed tree height limit from 10 to 31 for realistic benchmarks
- Default parameters: 4 validators, tree height 13, spec 2

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@lockedloop lockedloop requested a review from GraDKh September 5, 2025 13:36
@lockedloop lockedloop merged commit 1e87511 into main Sep 5, 2025
19 checks passed
@lockedloop lockedloop deleted the danilo/hash_based_sig_benchmark branch September 5, 2025 13:46
lockedloop added a commit that referenced this pull request Sep 8, 2025
  - Replace bench_with_input with bench_function across all benchmarks (unused input param)
  - Set blake2s, keccak, ethsign to 50 samples for better statistical validity
  - Update default hashsign params: 4 validators, tree height 13, spec 2
  - Fix overly restrictive tree height limit (10 → 31) to enable realistic benchmarks
  - Centralize get_feature_suffix() in PlatformDiagnostics to eliminate code duplication
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants