Skip to content

Commit

Permalink
Clean up reject_callx_r10
Browse files Browse the repository at this point in the history
  • Loading branch information
riptl committed Sep 5, 2024
1 parent 98c8853 commit 100c30d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions programs/bpf_loader/src/syscalls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ use {
enable_big_mod_exp_syscall, enable_get_epoch_stake_syscall,
enable_partitioned_epoch_reward, enable_poseidon_syscall,
error_on_syscall_bpf_function_hash_collisions, get_sysvar_syscall_enabled,
last_restart_slot_sysvar, partitioned_epoch_rewards_superfeature, reject_callx_r10,
last_restart_slot_sysvar, partitioned_epoch_rewards_superfeature,
remaining_compute_units_syscall_enabled,
},
hash::{Hash, Hasher},
Expand Down Expand Up @@ -301,7 +301,7 @@ pub fn create_program_runtime_environment_v1<'a>(
sanitize_user_provided_values: true,
external_internal_function_hash_collision: feature_set
.is_active(&error_on_syscall_bpf_function_hash_collisions::id()),
reject_callx_r10: feature_set.is_active(&reject_callx_r10::id()),
reject_callx_r10: true,
enable_sbpf_v1: true,
enable_sbpf_v2: false,
optimize_rodata: false,
Expand Down
12 changes: 6 additions & 6 deletions runtime/src/bank/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11915,7 +11915,7 @@ fn test_feature_activation_loaded_programs_cache_preparation_phase() {
let (mut genesis_config, mint_keypair) = create_genesis_config(1_000_000 * LAMPORTS_PER_SOL);
genesis_config
.accounts
.remove(&feature_set::reject_callx_r10::id());
.remove(&feature_set::disable_fees_sysvar::id());
let (root_bank, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config);

// Program Setup
Expand Down Expand Up @@ -11956,7 +11956,7 @@ fn test_feature_activation_loaded_programs_cache_preparation_phase() {
let feature_account_balance =
std::cmp::max(genesis_config.rent.minimum_balance(Feature::size_of()), 1);
bank.store_account(
&feature_set::reject_callx_r10::id(),
&feature_set::disable_fees_sysvar::id(),
&feature::create_account(&Feature { activated_at: None }, feature_account_balance),
);

Expand Down Expand Up @@ -12028,7 +12028,7 @@ fn test_feature_activation_loaded_programs_epoch_transition() {
let (mut genesis_config, mint_keypair) = create_genesis_config(1_000_000 * LAMPORTS_PER_SOL);
genesis_config
.accounts
.remove(&feature_set::reject_callx_r10::id());
.remove(&feature_set::disable_fees_sysvar::id());
let (root_bank, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config);

// Program Setup
Expand Down Expand Up @@ -12061,7 +12061,7 @@ fn test_feature_activation_loaded_programs_epoch_transition() {
let feature_account_balance =
std::cmp::max(genesis_config.rent.minimum_balance(Feature::size_of()), 1);
bank.store_account(
&feature_set::reject_callx_r10::id(),
&feature_set::disable_fees_sysvar::id(),
&feature::create_account(&Feature { activated_at: None }, feature_account_balance),
);

Expand Down Expand Up @@ -12997,9 +12997,9 @@ fn test_deploy_last_epoch_slot() {
let (mut genesis_config, mint_keypair) = create_genesis_config(1_000_000 * LAMPORTS_PER_SOL);
genesis_config
.accounts
.remove(&feature_set::reject_callx_r10::id());
.remove(&feature_set::disable_fees_sysvar::id());
let mut bank = Bank::new_for_tests(&genesis_config);
bank.activate_feature(&feature_set::reject_callx_r10::id());
bank.activate_feature(&feature_set::disable_fees_sysvar::id());

// go to the last slot in the epoch
let (bank, bank_forks) = bank.wrap_with_bank_forks_for_tests();
Expand Down
2 changes: 1 addition & 1 deletion svm/tests/mock_bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ fn create_custom_environment<'a>() -> BuiltinProgram<InvokeContext<'a>> {
noop_instruction_rate: 256,
sanitize_user_provided_values: true,
external_internal_function_hash_collision: false,
reject_callx_r10: false,
reject_callx_r10: true,
enable_sbpf_v1: true,
enable_sbpf_v2: false,
optimize_rodata: false,
Expand Down

0 comments on commit 100c30d

Please sign in to comment.