Skip to content

Commit 9d59b4f

Browse files
committed
Disables new deployments on loader-v3 when the feature enable_loader_v4 is enabled.
1 parent 33a7ef9 commit 9d59b4f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

programs/bpf_loader/src/lib.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use {
88
solana_compute_budget::compute_budget::MAX_INSTRUCTION_STACK_DEPTH,
99
solana_feature_set::{
1010
bpf_account_data_direct_mapping, enable_bpf_loader_set_authority_checked_ix,
11-
remove_accounts_executable_flag_checks,
11+
enable_loader_v4, remove_accounts_executable_flag_checks,
1212
},
1313
solana_log_collector::{ic_logger_msg, ic_msg, LogCollector},
1414
solana_measure::measure::Measure,
@@ -567,6 +567,14 @@ fn process_loader_upgradeable_instruction(
567567
)?;
568568
}
569569
UpgradeableLoaderInstruction::DeployWithMaxDataLen { max_data_len } => {
570+
if invoke_context
571+
.get_feature_set()
572+
.is_active(&enable_loader_v4::id())
573+
{
574+
ic_logger_msg!(log_collector, "Unsupported instruction");
575+
return Err(InstructionError::InvalidInstructionData);
576+
}
577+
570578
instruction_context.check_number_of_instruction_accounts(4)?;
571579
let payer_key = *transaction_context.get_key_of_account_at_index(
572580
instruction_context.get_index_of_instruction_account_in_transaction(0)?,

0 commit comments

Comments
 (0)