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: Disable bpf loader management instructions #34424

Closed
HaoranYi opened this issue Dec 12, 2023 · 8 comments
Closed

Feature Gate: Disable bpf loader management instructions #34424

HaoranYi opened this issue Dec 12, 2023 · 8 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

Disable bpf loader V1 program deployment

Description

bpf loader still reads and writes account executable meta to check and set whether an account is executable. Therefore, it is a blocker to deprecate executable meta on the accounts.
This feature, when activated, will make sure that there will no more bpf loader program deployment on chain. Then, we can safely deprecate account executable meta.

Feature ID

7WeS1vfPRgeeoXArLh7879YcB9mgE9ktjPDtajXeWfXn

Activation Method

Single Core Contributor

Deployment Considerations

NA

Minimum Beta Version

v1.17.20

Minimum Stable Version

v1.17.20

Testnet Activation Epoch

608

Devnet Activation Epoch

659

Mainnet-Beta Activation Epoch

601

@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.

@CriesofCarrots
Copy link
Contributor

Please update the fields in the PR description before closing this, for historical tracking purposes.

@HaoranYi
Copy link
Contributor Author

feature has been activated on mainnet.

@bshumi
Copy link

bshumi commented Sep 14, 2024

Hi @HaoranYi, I was trying to deploy a solana program and accidentally used solana cli 1.14.29 with "solana deploy" instead of "solana program deploy". The deployment txs failed with the following errors:

BPF loader management instructions are no longer supported
Program returned error: Unsupported program id

It created an account that belongs to BPFLoader2 and took about 3 SOL. As a result, I can't close it. How can I get my SOL back? Is there any instruction that allows me to recover my funds?

@HaoranYi
Copy link
Contributor Author

HaoranYi commented Sep 15, 2024

Sorry to hear about this. I am not aware of any instructions to withdraw these funds.
I am at @Lichtso to see if he knows more to help you.

@Lichtso
Copy link
Contributor

Lichtso commented Sep 17, 2024

If you created the account with BPFLoader2 as owner (instead of gifting the account during program initialization), then it is finalized and thus the funds are burnt unfortunately. We should deactivate the CLI of the older loaders to prevent others from stepping in the same issue.

@bshumi
Copy link

bshumi commented Sep 18, 2024

@Lichtso Thanks for your response! Is there any chance of adding a 'rescue' instruction to BPFLoader2? I have the account keypair, and I think I should be eligible to recover my funds. The issue seems to have happened because the CLI wasn't deactivated earlier.

Another possibility could be to return the funds through a bug bounty—I'm happy to work something out if this can help improve the system and prevent others from facing the same problem. Let me know if this could be an option!

halbornteam pushed a commit to halbornteam/solana-test-framework that referenced this issue Nov 4, 2024
- Cargo.lock removed from .gitignore (previous recommendation to not check in Cargo.lock for libraries has changed)
- Deploy non-upgradable program is no longer supported (solana-labs/solana#34424) - deploy_program function was kept for backwards compatibility but now uses upgradable loader)
- Fixed outdate processor macro. Also now it is possible to use this macro with new anchor entrypoint function.
- Updated structure of the new Pyth Oracle price account.
- Replaced various deprecated functions and structs with new equivalents.
- Fixed most of the compiler warnings.
- Bumped dependencies versions.
halbornteam pushed a commit to halbornteam/solana-test-framework that referenced this issue Nov 4, 2024
- Cargo.lock removed from .gitignore (previous recommendation to not check in Cargo.lock for libraries has changed)
- Deploy non-upgradable program is no longer supported (solana-labs/solana#34424) - deploy_program function was kept for backwards compatibility but now uses upgradable loader)
- Fixed outdate processor macro. Also now it is possible to use this macro with new anchor entrypoint function.
- Updated structure of the new Pyth Oracle price account.
- Replaced various deprecated functions and structs with new equivalents.
- Fixed most of the compiler warnings.
- Bumped dependencies versions.
- Fixed create_associated_token_account to work with spl_token_2022::ID as suggested in [PR#23](#23).
- Fixed add_empty_account_with_anchor to work with future Anchor versions:
coral-xyz/anchor#3163  as suggested in [PR#23](#23).
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