Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BLS] Expose signing and verification api that takes as input an already mapped-to-point msg #591

Open
kchalkias opened this issue May 12, 2023 · 5 comments
Assignees

Comments

@kchalkias
Copy link
Collaborator

This will enable caching when the same msg is used for signing and verification (or when we fall back to single sig verification in consensus). See this tweet: https://twitter.com/kostascrypto/status/1656809806198640640?s=20

@benr-ml
Copy link
Contributor

benr-ml commented May 12, 2023

It's not a simple change, so let's first analyze the potential performance improvement (e.g., using flamegraph of batch_verify with 10/100/1000 signatures).

@kchalkias
Copy link
Collaborator Author

kchalkias commented May 12, 2023

@benr-ml map-to-point is ~70 microsec (pretty much half the signing cost or ~6.5% faster aggregated sig verification - assuming you were a signer and you had it in LRU). I guess adding the LRU is easy, and the complexity is on utilizing the BLST api to input a map2point directly during verification, right?

@benr-ml
Copy link
Contributor

benr-ml commented May 12, 2023

Thanks, let's also check this with batch_verify since that's what we're hoping to optimize (maybe it's better...).
As for the LRU, probably not too difficult, but yeah, the changes to BLST will be the more tricky part, we'd need to break the rust interfaces/use the C++ ones directly.

@jonas-lj
Copy link
Contributor

I thought about breaking the interfaces anyway to utilise pre computation on the pairing (see #507). We should do some experiments first though.

@kchalkias
Copy link
Collaborator Author

@jonas-lj and @benr-ml yes we need some data from testnet and mainnet, as said in the recent past, we record all ideas in GH (not to forget them) and then see what makes sense based on data we get every week.

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

No branches or pull requests

3 participants