You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
Once an account is marked executable the data becomes immutable and there is no longer a need to copy its data out of the accounts database each time it is referenced. Instead, a shared read-only pointer could be used to refer to the account's data. The whole account could be shared via an Rc<RefCell<Account>> except for the possibility of folks transferring lamports to the account. There is no good reason for folks to do this but if any do, that new balance should be retained. Also, the benefit of this is somewhat minimized since with upgradeable program's the executable account is quite small and the bulk of the data is stored in the ProgramData account. One solution could be looking at the authority field and if None the program is no longer upgradeable and the ProgramData account could also be shared as immutable.
Proposed Solution
The text was updated successfully, but these errors were encountered:
Problem
Once an account is marked executable the data becomes immutable and there is no longer a need to copy its data out of the accounts database each time it is referenced. Instead, a shared read-only pointer could be used to refer to the account's data. The whole account could be shared via an
Rc<RefCell<Account>>
except for the possibility of folks transferring lamports to the account. There is no good reason for folks to do this but if any do, that new balance should be retained. Also, the benefit of this is somewhat minimized since with upgradeable program's the executable account is quite small and the bulk of the data is stored in the ProgramData account. One solution could be looking at the authority field and ifNone
the program is no longer upgradeable and the ProgramData account could also be shared as immutable.Proposed Solution
The text was updated successfully, but these errors were encountered: