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

Feature Gate: Deprecate executable meta flag update in bpf loader #34425

Open
HaoranYi opened this issue Dec 12, 2023 · 5 comments
Open

Feature Gate: Deprecate executable meta flag update in bpf loader #34425

HaoranYi opened this issue Dec 12, 2023 · 5 comments
Assignees
Labels
feature-gate Pull Request adds or modifies a runtime feature gate

Comments

@HaoranYi
Copy link
Contributor

HaoranYi commented Dec 12, 2023

SIMD

SIMD-0094

Description

Using account's owner and loader metadata stored in account's data can tell us whether the account is executable. Therefore, we don't need to set account's executable meta when deploy the program by bpf loader.
When this feature is activated, bpf loader will no longer write true to account's executable meta.

Feature ID

k6uR1J9VtKJnTukBV2Eo15BEy434MBg8bT6hHQgmU8v

Activation Method

Single Core Contributor

Deployment Considerations

NA

Minimum Beta Version

No response

Minimum Stable Version

No response

Testnet Activation Epoch

No response

Devnet Activation Epoch

No response

Mainnet-Beta Activation Epoch

No response

@HaoranYi HaoranYi added the feature-gate Pull Request adds or modifies a runtime feature gate label Dec 12, 2023
@CriesofCarrots
Copy link
Contributor

SIMD link does not link to a SIMD

@HaoranYi HaoranYi self-assigned this Dec 13, 2023
@HaoranYi
Copy link
Contributor Author

HaoranYi commented Dec 13, 2023

SIMD link does not link to a SIMD

Linked.

@billythedummy
Copy link
Contributor

billythedummy commented Jan 29, 2024

Did you guys check if there are any currently mainnet-deployed programs that for example check the executable flag on a program AccountInfo before CPI-ing it? They will stop working with any new programs deployed after this feature. Probably also want to check with anchor if they're using the executable flag for any account checks and the like.

cc @acheroncrypto

Update: nvm correct me if i'm wrong but this doesn't change the AccountInfo struct that's available to programs since the executable field is serialized with the return of the updated function:

s.write::<u8>(borrowed_account.is_executable(feature_set) as u8);
. No plans to deprecate AccountInfo.executable, right?

@acheroncrypto
Copy link
Contributor

Probably also want to check with anchor if they're using the executable flag for any account checks and the like.

cc @acheroncrypto

Anchor uses the executable flag in some places but I think that's fine because #34194 doesn't seem to affect programs.

@HaoranYi
Copy link
Contributor Author

HaoranYi commented Jan 29, 2024

Did you guys check if there are any currently mainnet-deployed programs that for example check the executable flag on a program AccountInfo before CPI-ing it? They will stop working with any new programs deployed after this feature. Probably also want to check with anchor if they're using the executable flag for any account checks and the like.

cc @acheroncrypto

Update: nvm correct me if i'm wrong but this doesn't change the AccountInfo struct that's available to programs since the executable field is serialized with the return of the updated function:

s.write::<u8>(borrowed_account.is_executable(feature_set) as u8);

. No plans to deprecate AccountInfo.executable, right?

Yes, that's correct. This feature didn't change AccountInfo.executable visible to the runtime. It only affects the account's executable metadata stored in accounts-db, which are ignored anyway when the feature is activated.

In future, we may consider removing or repurposing account's executable metadata store in accounts-db. But that's out of the scope of this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-gate Pull Request adds or modifies a runtime feature gate
Projects
None yet
Development

No branches or pull requests

4 participants