Skip to content

Commit c8dda07

Browse files
authored
Benchmarking of BLS votes. (#121)
1 parent e0be42f commit c8dda07

File tree

3 files changed

+142
-1
lines changed

3 files changed

+142
-1
lines changed

Logbook.md

+26
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
# Leios logbook
22

3+
## 2025-01-02
4+
5+
### Benchmarking BLS signatures and aggregate verifications
6+
7+
The construction and verification BLS votes were benchmarked using the Rust [bls-signatures](https://lib.rs/crates/bls-signatures) package. Note that aggregate verification speeds the process significantly.
8+
9+
| Operation | CPU time |
10+
| ------------------------------------ | -------------: |
11+
| Signing an item | 1.369±0.030 ms |
12+
| Verifying a single item | 1.662±0.090 ms |
13+
| Verifying an aggregate of 500 items | 55.3±5.3 ms |
14+
| Verifying an aggregate of 1000 items | 100.±20. ms |
15+
16+
![Benchmark for verifying an aggregate BLS signature](images/bls-verification.svg)
17+
18+
Generic benchmarks for cryptographic operations have provided guidance on the pros and cons of the prospective voting and certificate schemes, but further work on estimating CPU resources needed will require detailed implementation of the prospective voting and certificate schemes. For the time being, the following values can be used in simulation studies.
19+
20+
- Number of votes: 600
21+
- Quorum: 60%
22+
- Vote size: 250 B / vote
23+
- Certificate size: 75 kB / vote
24+
- Generate vote: 2 ms / vote
25+
- Verify vote: 3 ms / vote
26+
- Generate certificate: 50 ms / certificate + 0.5 ms / vote
27+
- Verify certificate: 50 ms / certificate + 0.5 ms / vote
28+
329
## 2024-12-27
430

531
### Votes and certificates

docs/technical-report-1.md

+21-1
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,18 @@ The BLS certificate describe in the Leios paper does not compress votes the way
505505

506506
Also recall that any ephemeral keys would have to be registered on-chain, consuming additional precious space and complicating bookkeeping: that would only provide benefit if the keys were reused for many votes. It might also be possible to only store the Merkle proof for the KES key only at the start of the KES period (e.g., every 36 hours).
507507

508-
The construction and verification times below are based on previous experience with Mithril certificates:
508+
The construction and verification times below are based on benchmarking using the Rust [bls-signatures](https://lib.rs/crates/bls-signatures) package.
509+
510+
| Operation | CPU time |
511+
| ------------------------------------ | -------------: |
512+
| Signing an item | 1.369±0.030 ms |
513+
| Verifying a single item | 1.662±0.090 ms |
514+
| Verifying an aggregate of 500 items | 55.3±5.3 ms |
515+
| Verifying an aggregate of 1000 items | 100.±20. ms |
516+
517+
![Benchmark for verifying an aggregate BLS signature](../images/bls-verification.svg)
518+
519+
However, these measurements are not consistent with the experience of Mithril:
509520

510521
| Metric | Value |
511522
| ----------------------------------- | ----- |
@@ -538,6 +549,15 @@ The construction and verification times below are based on previous experience w
538549
3. ALBA would require a larger quorum.
539550
4. The clumpiness of the Cardano stake distribution on mainnet means that some producer nodes might cast more than one vote in a given pipeline.
540551
5. MUSEN and BLS certificates need further evaluation for Leios.
552+
4. Generic benchmarks for cryptographic operations have provided guidance on the pros and cons of the prospective voting and certificate schemes, but further work on estimating CPU resources needed will require detailed implementation of the prospective voting and certificate schemes. For the time being, the following values can be used in simulation studies.
553+
1. Number of votes: 600
554+
2. Quorum: 60%
555+
3. Vote size: 250 B / vote
556+
4. Certificate size: 75 kB / vote
557+
6. Generate vote: 2 ms / vote
558+
7. Verify vote: 3 ms / vote
559+
8. Generate certificate: 50 ms / certificate + 0.5 ms / vote
560+
9. Verify certificate: 50 ms / certificate + 0.5 ms / vote
541561

542562

543563
## Cost analyses

images/bls-verification.svg

+95
Loading

0 commit comments

Comments
 (0)