Can someone summarize the changes to how LoadedPrograms work between version 1.17.6 and versions after? The changes have broken my ProgramTest setup and I would like to know if I can recreate it after upgrading my solana version.

In version 1.17.6, I would clone a program account from mainnet (e.g. the metaplex metadata program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s), as well as its program data account (e.g. metaplex metadata program's is PwDiXFxQsGra4sFFTT8r1QWRMd4vfumiWC1jfWNfdYT), add both accounts to a ProgramTest with ProgramTest::add_account(), and then transactions calling the program would just work when using the created BanksClient.

However, in 1.17.28, the same transaction will trigger the assertion failure in LoadedPrograms::assign_program()

In 1.18, it would return TransactionError::InvalidProgramForExecution

  • This might be a bug in program-test. Can you create an issue with a minimal example that reproduces the problem? In general, the main difference with LoadedPrograms is that you need to wait an extra slot after deployment to use a program. So you might need to warp forward as a workaround
    – Jon C
    Mar 29 at 13:13
  • 1
    repro with it not working in 1.18.9 even after warping forward: github.com/billythedummy/loaded-programs-repro
    – billy
    Mar 31 at 2:50

1 Answer 1


In the ProgramTest context, the LoadedPrograms field of the runtime represents the programs that have been loaded and are currently running within the runtime environment. Between version 1.17.6 and later versions, there may have been changes to how programs are loaded and managed within the runtime environment.

Some potential changes that could have occurred in later versions include:

  1. Improved program loading efficiency: There may have been optimizations made to how programs are loaded into the runtime, resulting in faster loading times and improved performance.

  2. Enhanced program management features: New features may have been added to better manage and monitor the programs running within the runtime, such as improved error handling or resource allocation.

  3. Changes to program lifecycle: The lifecycle of programs within the runtime may have been modified, such as how programs are started, stopped, and updated.

  4. Security enhancements: There may have been updates to improve the security of loaded programs, such as enhanced sandboxing or permission controls.

  • 1
    please do not spam AI generated responses to farm points
    – billy
    Apr 24 at 2:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.