Skip to content

Commit d2fd13e

Browse files
Lichtsot-nelson
authored andcommitted
Fix - Allow ExtendProgramChecked in CPI (#6245)
* Allows invoking ExtendProgramChecked in CPI. * Rekeys the feature enable_extend_program_checked. (cherry picked from commit f5616d3)
1 parent 4311abc commit d2fd13e

File tree

8 files changed

+50
-27
lines changed

8 files changed

+50
-27
lines changed

Cargo.lock

Lines changed: 22 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ solana-last-restart-slot = "2.2.1"
446446
solana-lattice-hash = { path = "lattice-hash", version = "=2.2.16" }
447447
solana-ledger = { path = "ledger", version = "=2.2.16" }
448448
solana-loader-v2-interface = "2.2.1"
449-
solana-loader-v3-interface = "4.0.1"
449+
solana-loader-v3-interface = "5.0.0"
450450
solana-loader-v4-interface = "2.2.1"
451451
solana-loader-v4-program = { path = "programs/loader-v4", version = "=2.2.16" }
452452
solana-local-cluster = { path = "local-cluster", version = "=2.2.16" }

feature-set/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ pub mod mask_out_rent_epoch_in_vm_serialization {
10181018
}
10191019

10201020
pub mod enable_extend_program_checked {
1021-
solana_pubkey::declare_id!("97QCmR4QtfeQsAti9srfHFk5uMRFP95CvXG8EGr615HM");
1021+
solana_pubkey::declare_id!("2oMRZEDWT2tqtYMofhmmfQ8SsjqUFzT6sYXppQDavxwz");
10221022
}
10231023

10241024
pub static FEATURE_NAMES: LazyLock<AHashMap<Pubkey, &'static str>> = LazyLock::new(|| {

genesis/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ solana-clap-utils = { workspace = true }
2323
solana-cli-config = { workspace = true }
2424
solana-entry = { workspace = true }
2525
solana-ledger = { workspace = true }
26-
solana-loader-v3-interface = "=4.0.1"
26+
solana-loader-v3-interface = "5.0.0"
2727
solana-logger = "=2.3.1"
2828
solana-rpc-client = { workspace = true }
2929
solana-rpc-client-api = { workspace = true }

programs/bpf_loader/src/syscalls/cpi.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
use {
22
super::*,
33
crate::serialization::account_data_region_memory_state,
4-
agave_feature_set::enable_bpf_loader_set_authority_checked_ix,
4+
agave_feature_set::{
5+
enable_bpf_loader_set_authority_checked_ix, enable_extend_program_checked,
6+
},
57
scopeguard::defer,
68
solana_loader_v3_interface::instruction as bpf_loader_upgradeable,
79
solana_measure::measure::Measure,
@@ -1067,6 +1069,12 @@ fn check_authorized_program(
10671069
&& bpf_loader_upgradeable::is_set_authority_checked_instruction(
10681070
instruction_data,
10691071
))
1072+
|| (invoke_context
1073+
.get_feature_set()
1074+
.is_active(&enable_extend_program_checked::id())
1075+
&& bpf_loader_upgradeable::is_extend_program_checked_instruction(
1076+
instruction_data,
1077+
))
10701078
|| bpf_loader_upgradeable::is_close_instruction(instruction_data)))
10711079
|| is_precompile(program_id, |feature_id: &Pubkey| {
10721080
invoke_context.get_feature_set().is_active(feature_id)

programs/sbf/Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

programs/sbf/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ solana-compute-budget-instruction = { workspace = true, features = [
124124
] }
125125
solana-fee = { workspace = true }
126126
solana-ledger = { workspace = true }
127-
solana-loader-v3-interface = "4.0.1"
127+
solana-loader-v3-interface = "5.0.0"
128128
solana-loader-v4-interface = "2.2.1"
129129
solana-log-collector = { workspace = true }
130130
solana-logger = { workspace = true }

svm/examples/Cargo.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)