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

cli: Fix upgradeable program clones #3010

Conversation

acheroncrypto
Copy link
Collaborator

Problem

Upgradeable program clones e.g.

[test.validator]
url = "https://api.mainnet-beta.solana.com"

[[test.validator.clone]]
address = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"

broke after solana-labs/solana#34407 (since 1.17.12), and there was a fix in anza-xyz/agave#501 (1.18.10), but it requires using the new --clone-upgradeable-program option, and doesn't work if you use --clone (which is what Anchor does currently).

Upstream issue: anza-xyz/agave#522

Summary of changes

Use the new --clone-upgradeable-program option when the given account in Anchor.toml is owned by the BPF Upgradeable Loader program.

Note

This requires solana-cli >=1.18.10 since the implementation was broken before that version.

You can load the program binary directly as a workaround to this issue:

solana program dump <ADDRESS> <PATH>

and in Anchor.toml:

[[test.genesis]]
address = <ADDRESS>
program = <PATH>

Copy link

vercel bot commented Jun 6, 2024

@acheroncrypto is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@acheroncrypto acheroncrypto added cli next Required for the next release fix Bug fix PR labels Jun 6, 2024
Cloning non-program BPF Upgradeable Loader account types, e.g. program data account, doesn't work with the `--clone-upgradeable-program` option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli fix Bug fix PR next Required for the next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant