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

feat: Parse and expand authority public keys once and reuse #121

Merged
merged 3 commits into from
Jan 5, 2022

Conversation

gdanezis
Copy link
Collaborator

@gdanezis gdanezis commented Jan 4, 2022

Instead of parsing and re-expanding all authority keys for each certificate we check, we expand them once and re-use the expanded public keys for multiple batch certificate verification.

On my bench I observe a ~7%-10% improvement in throughput, mostly due to handle_confimation_order tsaking less time.

fastx_types/src/committee.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@huitseeker huitseeker left a comment

Choose a reason for hiding this comment

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

This is OK-ish, but I would note that whatever we gain here in point decompression just for the committee is more complex than manipulating ed25519 PubKeys in the first place.

That later approach is the better change, I think. See #122 for a PR

fastx_types/src/base_types.rs Outdated Show resolved Hide resolved
fastx_types/src/committee.rs Outdated Show resolved Hide resolved
@gdanezis gdanezis merged commit 5a482af into main Jan 5, 2022
@gdanezis gdanezis deleted the reuse-public-keys branch January 5, 2022 15:28
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.

3 participants