Skip to content

Commit

Permalink
Fix - Adds missing feature pubkeys to the FEATURES_AFFECTING_RBPF l…
Browse files Browse the repository at this point in the history
…ist (#32703)

Adds missing feature pubkeys to the FEATURES_AFFECTING_RBPF list.

(cherry picked from commit 33c33f5)

# Conflicts:
#	programs/bpf_loader/src/syscalls/mod.rs
  • Loading branch information
Lichtso authored and mergify[bot] committed Aug 3, 2023
1 parent ef598ee commit 0fd9483
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
9 changes: 7 additions & 2 deletions programs/bpf_loader/src/syscalls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,15 @@ pub fn create_program_runtime_environment<'a>(
let disable_fees_sysvar = feature_set.is_active(&disable_fees_sysvar::id());
let disable_deploy_of_alloc_free_syscall = reject_deployment_of_broken_elfs
&& feature_set.is_active(&disable_deploy_of_alloc_free_syscall::id());
<<<<<<< HEAD
=======
let last_restart_slot_syscall_enabled = feature_set.is_active(&last_restart_slot_sysvar::id());
// !!! ATTENTION !!!
// When adding new features for RBPF here,
// also add them to `Bank::apply_builtin_program_feature_transitions()`.
>>>>>>> 33c33f5f79 (Fix - Adds missing feature pubkeys to the `FEATURES_AFFECTING_RBPF` list (#32703))

use rand::Rng;
// When adding new features for RBPF,
// also add them to `Bank::apply_builtin_program_feature_transitions()`.
let config = Config {
max_call_depth: compute_budget.max_call_depth,
stack_frame_size: compute_budget.stack_frame_size,
Expand Down
7 changes: 7 additions & 0 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7376,6 +7376,13 @@ impl Bank {
feature_set::switch_to_new_elf_parser::id(),
feature_set::bpf_account_data_direct_mapping::id(),
feature_set::enable_alt_bn128_syscall::id(),
feature_set::enable_big_mod_exp_syscall::id(),
feature_set::blake3_syscall_enabled::id(),
feature_set::curve25519_syscall_enabled::id(),
feature_set::disable_fees_sysvar::id(),
feature_set::enable_partitioned_epoch_reward::id(),
feature_set::disable_deploy_of_alloc_free_syscall::id(),
feature_set::last_restart_slot_sysvar::id(),
];
if !only_apply_transitions_for_new_features
|| FEATURES_AFFECTING_RBPF
Expand Down

0 comments on commit 0fd9483

Please sign in to comment.