v2.1: test-validator: Fix upgradeable programs at genesis (backport of #3692) #3694
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
As noted in https://solana.stackexchange.com/questions/17478/solana-localnet-error-while-upgrading-a-program-loaded-at-genesis-using-solan, an upgradeable program loaded at genesis is not actually upgradeable, failing with
instruction changed executable accounts data
. This is because the program-data account is incorrectly set as "executable", which it isn't really.Summary of changes
Don't set the program-data account as executable. This is the only place in the repo where we were doing this incorrectly.
Since this is a small change that fixes a bug only in the test validator, I think this is a good candidate for a backport.
This is an automatic backport of pull request #3692 done by Mergify.