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 IntSet for uncleaned roots during index generation #34008

Conversation

brooksprumo
Copy link
Contributor

Problem

Index generation identifies uncleaned rooted slots. It puts them in a HashSet. The slot itself is already a unique identifier, and furthermore, there won't be any collisions here. We also don't need cryptographic security for the HashSet. Instead, we can use an IntSet to skip hashing the slot.

Summary of Changes

Replace HashSet with IntSet.

@brooksprumo brooksprumo self-assigned this Nov 9, 2023
@brooksprumo brooksprumo marked this pull request as ready for review November 9, 2023 19:16
Copy link

codecov bot commented Nov 9, 2023

Codecov Report

Merging #34008 (fc22361) into master (bba6ea2) will decrease coverage by 0.1%.
Report is 4 commits behind head on master.
The diff coverage is 100.0%.

@@            Coverage Diff            @@
##           master   #34008     +/-   ##
=========================================
- Coverage    81.9%    81.9%   -0.1%     
=========================================
  Files         811      811             
  Lines      219347   219347             
=========================================
- Hits       179732   179709     -23     
- Misses      39615    39638     +23     

Copy link
Contributor

@jeffwashington jeffwashington 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 merged commit a96be5d into solana-labs:master Nov 9, 2023
32 checks passed
@brooksprumo brooksprumo deleted the generate-index/uncleaned-roots/intset branch November 9, 2023 20:04
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.

2 participants