-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add solana-test-validator --upgradeable-program #30412
Add solana-test-validator --upgradeable-program #30412
Conversation
03bb863
to
a88c550
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Since the SPL programs that use the old loader are already included with the correct loader, it seems right to have --bpf-loader
alias to --upgradeable-loader
. I'm going to take a quick look through the Anchor repo to make sure that this won't break something in their testing framework using anchor test
.
I can't find any references to the exact loader address anywhere in the Anchor repo, so I think it'll be safe to make the aliasing change. Just in case though, can you do it in a separate PR so we can easily revert it if needed? |
Yep, that sounds like a plan. Thanks for checking on that! |
a88c550
to
c6892db
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
c6892db
to
9cb1fcb
Compare
Sorry @joncinque , can I get one last ✅ ? I force pushed to pick up the test fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the lateness, looks good again!
Lol, sorry!! I was just rebasing on #29893... I'm going to need one more 🙏 |
9cb1fcb
to
6c5a48d
Compare
* Add TestValidator handling for upgradeable programs * Plumb --upgradeable-program for solana-test-validator
* Add TestValidator handling for upgradeable programs * Plumb --upgradeable-program for solana-test-validator
Problem
#29051 attempted to default
solana-test-validator --bpf-program
to use the upgradeable loader, but had to be reverted. But the issue remains that most people want to use the upgradeable loader, and the only way to do that with solana-test-validator is clone from another cluster.Summary of Changes
Add
--upgradeable-program
flag to automatically initialize solana-test-validator with an upgradeable program. Parallels #29994I added this as a separate path from the existing param because I thought it would be cool to support an optional upgrade authority, which would break the existing
--bpf-program
interface. However, we could make--bpf-program
an alias for--upgradeable-program <PROGRAM_ID> <PROGRAM.SO> none
. What do you think?If you like that idea, I can remove a bunch of the duplication here, and switch from
ProgramInfo
toUpgradeableProgramInfo
everywhere.