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

Removes AccountStorageReference #4931

Conversation

brooksprumo
Copy link

@brooksprumo brooksprumo commented Feb 11, 2025

Problem

AccountStorageReference was created to bypass an atomic read when needing the ID of an account storage entry. The ID used to be atomic to allow interior mutability. This was required back when the storages were recycled and their IDs needed to change. Storage recycling has been removed for a few versions now, and the ID also is now non-atomic. Thus the original reason for creating AccountStorageReference no longer applies, and we can remove AccountStorageReference entirely.

Summary of Changes

Replace uses of AccountStorageReference with Arc<AccountStorageEntry> and remove AccountStorageReference.

@brooksprumo brooksprumo self-assigned this Feb 11, 2025
@brooksprumo brooksprumo marked this pull request as ready for review February 11, 2025 16:29
@brooksprumo brooksprumo requested a review from roryharr February 11, 2025 17:09
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.

lgtm

@brooksprumo brooksprumo merged commit fe06baa into anza-xyz:master Feb 11, 2025
47 checks passed
@brooksprumo brooksprumo deleted the account-storage/remove-account-storage-reference branch February 11, 2025 18:09
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