-
Notifications
You must be signed in to change notification settings - Fork 139
Remove to_account_shared_data from ReadableAccount
#386
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joncinque can weigh in, but I believe you should do one PR to deprecate it and then another to remove it with the "Breaking" label.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we remove this from the sdk, then agave won't be able to upgrade to this new version until we replace all the call sites.
What is the migration path for agave?
Since the change is simple, I was thinking of bumping the version and upgrading the call sites in the same PR. I can do the latter first if that is what you prefer. |
I haven't looked at doing this myself, but I think it would be good to update the call sites first and bump the sdk second. This makes a (hopefully unnecessary) revert less painful (in case there are other PRs that build on the sdk bump). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git grep tells me there are 33 call sites in Agave currently of to_account_shared_data, in accounts-db and runtime. I agree that it's better to add the new method and deprecate the old method first, then remove the old method.
What's the new method, and where will it live?
We don't want to allow the conversion to The idea I discussed with @brooksprumo was to have the new method internal to accounts-db.
Sure, I'll create the new method and remove the old usages first. |
|
Yeah, I think in accounts-db is the right place. |
Problem
We are introducing a new account layout for the SVM. We'll also have "view" structs that do not own the fields for when programs borrow an account. Those structs implement
ReadableAccount, but cannot be converted intoAccountSharedDatawithout losing references to the underlying data.Solution
Remove the
to_account_shared_datafromReadableAccount.