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

Adds solana-nohash-hasher #33521

Merged
merged 1 commit into from
Oct 4, 2023
Merged

Conversation

brooksprumo
Copy link
Contributor

@brooksprumo brooksprumo commented Oct 4, 2023

Problem

In accounts-db, we make lists of slots for various tasks. We put these in HashSets/HashMaps, which perform cryptographically secure hashing of the keys. Since we (1) don't always require cryptographic security, and (2) know that slots are unique identifiers, we actually don't need to hash the slot at all, but instead can use it directly.

The solana-nohash-hasher crate was designed for this.

Summary of Changes

Add solana-nohash-hasher to accounts-db.

Future PRs will use solana-nohash-hasher—explicitly not included in this PR.

@brooksprumo brooksprumo self-assigned this Oct 4, 2023
Copy link
Contributor

@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.

lgtm

@brooksprumo brooksprumo added the automerge Merge this Pull Request automatically once CI passes label Oct 4, 2023
@mergify mergify bot merged commit daaeb74 into solana-labs:master Oct 4, 2023
27 checks passed
@brooksprumo brooksprumo deleted the nohash/add branch October 4, 2023 15:58
tao-stones pushed a commit to tao-stones/solana that referenced this pull request Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this Pull Request automatically once CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants