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

Supports rehashing with accounts lt hash #3186

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

brooksprumo
Copy link

Problem

In #3123 we had to skip rehashing if the accounts lt hash was enabled. Now that #3180 is merged, we can remove this restriction.

Summary of Changes

Move updating the accounts lt hash outside of Bank::hash_internal_state(). Since rehash() calls hash_internal_state(), and we're guaranteed no accounts have been modified, then we are also guaranteed the already-computed accounts lt hash is still correct.

@brooksprumo brooksprumo self-assigned this Oct 15, 2024
@brooksprumo brooksprumo marked this pull request as ready for review October 15, 2024 21:40
Copy link

@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 5ab9e26 into anza-xyz:master Oct 16, 2024
40 checks passed
@brooksprumo brooksprumo deleted the lthash/rehash3 branch October 16, 2024 17:03
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.

seems like a good choice to move lt_hash out of hash_internal_state() so that rehash() doesn't need to change.
lgtm.

ray-kast pushed a commit to abklabs/agave that referenced this pull request Nov 27, 2024
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