-
Notifications
You must be signed in to change notification settings - Fork 33
Description
Caching Message Hash
The BLS signature verification requires 1. hashing messages and 2. applying the pairing.
From the stats, it seems like the average distinct messages per batch is about 1.2. This means that the number of distinct messages are very small and 1 for a majority of batches. This means that we will be hashing the same messages redundantly, so we should cache these hashes.
Optimized Aggregation
Right now, when we aggregate public keys and signatures together, we have to convert these to projective coordinates first. It should actually be possible to add points together efficiently without conversion as long as at least one point is on projective coordinates. Avoiding this conversion should give some savings.
Use sequential execution for small inputs
Since the number of distinct messages are quite small (1 or 2 in most cases), use of the parallel function par_verify_distinct might introduce more overhead than the sequential verify_distinct function.