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 - loader-v2 and loader-v3 deprecation warnings #4704

Merged

Conversation

Lichtso
Copy link

@Lichtso Lichtso commented Jan 30, 2025

Problem

Loader-v2 (see #4487 (comment)) and loader-v3 (see #4666) are deprecated and attempting to deploy on them will already fail on a test validator with a genesis feature set including disable_new_loader_v3_deployments by default. Thus, there should be a warning telling dApp devs what to do instead of just seeing:

Error: Deploying program failed: RPC response error -32002: Transaction simulation failed: Error processing Instruction 1: invalid instruction data; 5 log messages:
Program 11111111111111111111111111111111 invoke [1]
Program 11111111111111111111111111111111 success
Program BPFLoaderUpgradeab1e11111111111111111111111 invoke [1]
Unsupported instruction
Program BPFLoaderUpgradeab1e11111111111111111111111 failed: invalid instruction data

Summary of Changes

Adds deprecation warnings in the SDK and the CLI.
Removes the outdated and unused test program "rust/finalize".

@Lichtso Lichtso force-pushed the feature/loader_v3_deprecation_warning branch 2 times, most recently from 41af157 to 62736b6 Compare January 30, 2025 14:00
@Lichtso Lichtso force-pushed the feature/loader_v3_deprecation_warning branch from 62736b6 to 2279bc0 Compare January 30, 2025 14:09
@Lichtso Lichtso force-pushed the feature/loader_v3_deprecation_warning branch from 2279bc0 to e917644 Compare January 30, 2025 14:18
Copy link

@KirillLykov KirillLykov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe also add somewhere (to documentation of loader-v3 or loader-v4 an example of using v4 in comparison to the previous one. For example, --program-id cla has changed the semantics and --fee-payer is removed. So an example could say that a typical deployment command line with version 3 was ... while now it is ....

@Lichtso
Copy link
Author

Lichtso commented Jan 30, 2025

I will do follow up PRs for the docs, also to fix the bug you discovered in the signer aliasing.

@Lichtso Lichtso merged commit 5b7ebfb into anza-xyz:master Jan 30, 2025
59 checks passed
@Lichtso Lichtso deleted the feature/loader_v3_deprecation_warning branch January 30, 2025 16:51
Copy link

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit late to the party, but this looks great, thanks!

attempting to deploy on them will already fail on a test validator with a genesis feature set including disable_new_loader_v3_deployments by default

This is a very important point. Can you add that behavior as a breaking change to the CHANGELOG in solana-test-validator, along with what command should be used instead, and an example command of how to disable the feature if needed?

We also need to make devrel / Anchor aware of this breaking change in v2.2.

@jacobcreech
Copy link

Instead of introducing a sub command, why not just abstract out the work behind the scenes in solana program deploy? Devs don't care what loader they use, they just want to deploy their program.

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.

4 participants