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

Uses NoHashHasher in accounts write cache #4321

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

brooksprumo
Copy link

Problem

The accounts write cache internally is a map from slot to cache-per-slot. The outer map's key is Slot, and we don't need to use a "real", nor cryptographically secure, hashing function. Since slots are guaranteed to be unique identifiers, we can use the slot directly as the index into the map.

Summary of Changes

Use NoHashHasher for the accounts write cache's internal cache.

@brooksprumo brooksprumo self-assigned this Jan 7, 2025
@brooksprumo brooksprumo marked this pull request as ready for review January 7, 2025 17:42
Copy link

@HaoranYi HaoranYi left a comment

Choose a reason for hiding this comment

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

:shipit:

@brooksprumo brooksprumo merged commit e81b261 into anza-xyz:master Jan 7, 2025
40 checks passed
@brooksprumo brooksprumo deleted the nohasher/write-cache branch January 7, 2025 19:20
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