-
Notifications
You must be signed in to change notification settings - Fork 331
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: Cloned upgradeable programs don't work #436
Comments
After debugging this issue further, I found out that this broke after solana-labs#34407 (not the solana-labs@22bfcd9 is a rather complex commit, so I don't know which part of the commit caused this issue. Fixing this behavior from the |
@acheroncrypto thanks for reporting and also digging into this! I've been checking this out as well, and I found so far that this seems to be specific to the "cloning down" action:
As you've mentioned above, the issue also seems unrelated to the I'll continue checking this out. |
Cloning doesn't work properly (see anza-xyz/agave#436). New Solana releases also include stable `token-2022` version, which makes cloning from live clusters redundant.
I'm quite surprised we haven't seen this reported yet, but I think I've narrowed it down. The issue appears to be that the cloned program data account's deployment slot is preserved from the cluster it clones the account from, which is problematic when the programs cache goes to attempt an extraction. agave/program-runtime/src/loaded_programs.rs Line 908 in b01b0d0
At a high-level, it appears that this causes a continuous loop on Bank's Lines 4989 to 5002 in b01b0d0
I intend to get a more descriptive and formal report, and ensure there isn't a deeper runtime issue. However, in the meantime I can assert that simply overwriting a cloned program data account's slot to |
Problem
Interacting with cloned upgradeable programs results in
This program may not be used for executing instructions
error.This is likely related to the recent removal (solana-labs#34194) and readding (#309) of the
executable
flag because this used to work in1.17.0
.Reproduction
Version: v1.18.8
Clone the
spl-token-2022
program:Interact with the program:
Results in error:
Solution
Not sure if it's the best way but setting the program data account of cloned upgradeable programs to
true
fixes this issue.This is also what
--upgradeable-program
option (solana-labs#30412) does:agave/test-validator/src/lib.rs
Line 750 in b2b159a
The text was updated successfully, but these errors were encountered: