From 5d6f53c4f2054c0802c524df2f4a62d7cd527f00 Mon Sep 17 00:00:00 2001 From: Jon C Date: Mon, 18 Nov 2024 14:29:44 +0100 Subject: [PATCH] test-validator: Fix upgradeable programs at genesis (#3692) #### 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. (cherry picked from commit 73f54a05ac38228b1d86504041a17efcb46d6468) --- test-validator/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-validator/src/lib.rs b/test-validator/src/lib.rs index 8f25086d2f6ef1..ab480854203368 100644 --- a/test-validator/src/lib.rs +++ b/test-validator/src/lib.rs @@ -808,7 +808,7 @@ impl TestValidator { lamports: Rent::default().minimum_balance(program_data.len()).max(1), data: program_data, owner: upgradeable_program.loader, - executable: true, + executable: false, rent_epoch: 0, }), );