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

Intern BLS lazy public keys #3141

Merged
merged 2 commits into from
Nov 26, 2024
Merged

Intern BLS lazy public keys #3141

merged 2 commits into from
Nov 26, 2024

Conversation

hrxi
Copy link
Contributor

@hrxi hrxi commented Nov 23, 2024

This ensures that for each compressed public key there's at most one lazy public key, which means everyone profits when it is uncompressed.

This drops the (unused: never read from) BLS public key cache.

Copy link
Member

@paberr paberr left a comment

Choose a reason for hiding this comment

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

Think about whether we can drop the requirement of the user of the interner to implement a specific Drop by wrapping the type.
Also fix a couple of Clippy warnings.

utils/src/interner.rs Outdated Show resolved Hide resolved
@hrxi hrxi force-pushed the hrxi/intern_bls branch 4 times, most recently from d3659f6 to f01a778 Compare November 24, 2024 18:52
@hrxi
Copy link
Contributor Author

hrxi commented Nov 24, 2024

Think about whether we can drop the requirement of the user of the interner to implement a specific Drop by wrapping the type.

Did so, resulted in a much nicer API. :)

bls/src/lazy.rs Show resolved Hide resolved
lib/src/client.rs Show resolved Hide resolved
consensus/src/bls_cache.rs Outdated Show resolved Hide resolved
consensus/src/bls_cache.rs Show resolved Hide resolved
@jsdanielh
Copy link
Member

Also it looks like there are untouched filed with clippy warnings

@viquezclaudio
Copy link
Member

With this changes, in Safari we get consensus in ~12secs

Previously, in Safari, we used to get consensus in ~23secs

@hrxi
Copy link
Contributor Author

hrxi commented Nov 26, 2024

Also it looks like there are untouched filed with clippy warnings

Fixed.

Copy link
Member

@jsdanielh jsdanielh left a comment

Choose a reason for hiding this comment

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

LGTM

This ensures that for each compressed public key there's at most one
lazy public key, which means everyone profits when it is uncompressed.

This drops the (unused: never read from) BLS public key cache.
@jsdanielh jsdanielh merged commit 6b3a3e0 into albatross Nov 26, 2024
8 checks passed
@jsdanielh jsdanielh deleted the hrxi/intern_bls branch November 26, 2024 23:29
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.

4 participants