-
Notifications
You must be signed in to change notification settings - Fork 199
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
Test Validator: Set deployment slot to 0
for cloned upgradeable programs
#501
Test Validator: Set deployment slot to 0
for cloned upgradeable programs
#501
Conversation
cc6db45
to
52586ad
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #501 +/- ##
=========================================
- Coverage 81.8% 81.8% -0.1%
=========================================
Files 842 842
Lines 228462 228462
=========================================
- Hits 187084 187043 -41
- Misses 41378 41419 +41 |
52586ad
to
77f34cb
Compare
Is there any intention to backport this? Since it's only impacting dev tools and fixing a bug, I think it would be best to backport. |
Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis. |
…ble programs (backport of #501) (#518) Test Validator: Set deployment slot to `0` for cloned upgradeable programs (#501) test-validator: clone upgradeable programs with slot 0 (cherry picked from commit 4b0e7d6) Co-authored-by: Joe C <[email protected]>
…ble programs (backport of anza-xyz#501) (anza-xyz#518) Test Validator: Set deployment slot to `0` for cloned upgradeable programs (anza-xyz#501) test-validator: clone upgradeable programs with slot 0 (cherry picked from commit 4b0e7d6) Co-authored-by: Joe C <[email protected]>
Problem
When an upgradeable program is cloned from another cluster into the test
validator's genesis config, its existing deployment slot is never modified. This
causes the program cache to fail when attempting to load this program.
On version 1.18, this is an error handled gracefully by the runtime:
The change at solana-labs#34407 seems to have been where the bug was introduced to 1.18. The error is caused by the snippets I mentioned here: #436 (comment)
However, on the current tip, this is actually a panic.
agave/program-runtime/src/loaded_programs.rs
Lines 789 to 791 in b1e1799
Summary of Changes
As we currently do with the SPL programs, when adding the programdata account
for a cloned upgradeable program, set the deployment slot to
0
.Closes #436