diff --git a/program-runtime/src/invoke_context.rs b/program-runtime/src/invoke_context.rs index c6bbce7837b0fb..f9e00efb034b1e 100644 --- a/program-runtime/src/invoke_context.rs +++ b/program-runtime/src/invoke_context.rs @@ -434,6 +434,7 @@ impl<'a> InvokeContext<'a> { })?; let borrowed_program_account = instruction_context .try_borrow_instruction_account(self.transaction_context, program_account_index)?; + #[allow(deprecated)] if !self .get_feature_set() .is_active(&remove_accounts_executable_flag_checks::id()) diff --git a/programs/bpf_loader/src/lib.rs b/programs/bpf_loader/src/lib.rs index ec308b094aef78..ac80ff8367d5df 100644 --- a/programs/bpf_loader/src/lib.rs +++ b/programs/bpf_loader/src/lib.rs @@ -440,6 +440,7 @@ pub fn process_instruction_inner( } // Program Invocation + #[allow(deprecated)] if !invoke_context .get_feature_set() .is_active(&remove_accounts_executable_flag_checks::id()) @@ -757,6 +758,7 @@ fn process_loader_upgradeable_instruction( let program = instruction_context.try_borrow_instruction_account(transaction_context, 1)?; + #[allow(deprecated)] if !invoke_context .get_feature_set() .is_active(&remove_accounts_executable_flag_checks::id()) @@ -1501,6 +1503,7 @@ fn execute<'a, 'b: 'a>( )?; error = EbpfError::SyscallError(Box::new( + #[allow(deprecated)] if !invoke_context .get_feature_set() .is_active(&remove_accounts_executable_flag_checks::id()) diff --git a/programs/bpf_loader/src/serialization.rs b/programs/bpf_loader/src/serialization.rs index 2cb2f20b162280..15c5820dc23924 100644 --- a/programs/bpf_loader/src/serialization.rs +++ b/programs/bpf_loader/src/serialization.rs @@ -339,6 +339,7 @@ fn serialize_parameters_unaligned( s.write::((account.get_data().len() as u64).to_le()); let vm_data_addr = s.write_account(&mut account)?; let vm_owner_addr = s.write_all(account.get_owner().as_ref()); + #[allow(deprecated)] s.write::(account.is_executable() as u8); s.write::((account.get_rent_epoch()).to_le()); accounts_metadata.push(SerializedAccountMetadata { @@ -467,6 +468,7 @@ fn serialize_parameters_aligned( s.write::(NON_DUP_MARKER); s.write::(borrowed_account.is_signer() as u8); s.write::(borrowed_account.is_writable() as u8); + #[allow(deprecated)] s.write::(borrowed_account.is_executable() as u8); s.write_all(&[0u8, 0, 0, 0]); let vm_key_addr = s.write_all(borrowed_account.get_key().as_ref()); diff --git a/programs/bpf_loader/src/syscalls/cpi.rs b/programs/bpf_loader/src/syscalls/cpi.rs index 94046f5f741560..7485578cbb4ea7 100644 --- a/programs/bpf_loader/src/syscalls/cpi.rs +++ b/programs/bpf_loader/src/syscalls/cpi.rs @@ -881,6 +881,7 @@ where .transaction_context .get_key_of_account_at_index(instruction_account.index_in_transaction)?; + #[allow(deprecated)] if callee_account.is_executable() { // Use the known account consume_compute_meter( diff --git a/sdk/src/transaction_context.rs b/sdk/src/transaction_context.rs index cb7dfa451d85cc..8121682d7941fe 100644 --- a/sdk/src/transaction_context.rs +++ b/sdk/src/transaction_context.rs @@ -1003,6 +1003,7 @@ impl<'a> BorrowedAccount<'a> { /// Returns whether this account is executable (transaction wide) #[inline] + #[deprecated(since = "2.1.0", note = "Use `get_owner` instead")] pub fn is_executable(&self) -> bool { self.account.executable() } @@ -1041,6 +1042,7 @@ impl<'a> BorrowedAccount<'a> { return Err(InstructionError::ExecutableModified); } // don't touch the account if the executable flag does not change + #[allow(deprecated)] if self.is_executable() == is_executable { return Ok(()); }