featurize bpf function hash collision fix (#24262)
This commit is contained in:
parent
929753a11f
commit
138f04a49f
|
@ -44,7 +44,8 @@ use {
|
||||||
feature_set::{
|
feature_set::{
|
||||||
cap_accounts_data_len, disable_bpf_deprecated_load_instructions,
|
cap_accounts_data_len, disable_bpf_deprecated_load_instructions,
|
||||||
disable_bpf_unresolved_symbols_at_runtime, disable_deprecated_loader,
|
disable_bpf_unresolved_symbols_at_runtime, disable_deprecated_loader,
|
||||||
do_support_realloc, reduce_required_deploy_balance, requestable_heap_size,
|
do_support_realloc, error_on_syscall_bpf_function_hash_collisions,
|
||||||
|
reduce_required_deploy_balance, requestable_heap_size,
|
||||||
},
|
},
|
||||||
instruction::{AccountMeta, InstructionError},
|
instruction::{AccountMeta, InstructionError},
|
||||||
keyed_account::keyed_account_at_index,
|
keyed_account::keyed_account_at_index,
|
||||||
|
@ -142,7 +143,9 @@ pub fn create_executor(
|
||||||
&& invoke_context
|
&& invoke_context
|
||||||
.feature_set
|
.feature_set
|
||||||
.is_active(&disable_bpf_deprecated_load_instructions::id()),
|
.is_active(&disable_bpf_deprecated_load_instructions::id()),
|
||||||
syscall_bpf_function_hash_collision: false,
|
syscall_bpf_function_hash_collision: invoke_context
|
||||||
|
.feature_set
|
||||||
|
.is_active(&error_on_syscall_bpf_function_hash_collisions::id()),
|
||||||
reject_callx_r10: false,
|
reject_callx_r10: false,
|
||||||
// Warning, do not use `Config::default()` so that configuration here is explicit.
|
// Warning, do not use `Config::default()` so that configuration here is explicit.
|
||||||
};
|
};
|
||||||
|
|
|
@ -335,6 +335,10 @@ pub mod add_get_minimum_delegation_instruction_to_stake_program {
|
||||||
solana_sdk::declare_id!("St8k9dVXP97xT6faW24YmRSYConLbhsMJA4TJTBLmMT");
|
solana_sdk::declare_id!("St8k9dVXP97xT6faW24YmRSYConLbhsMJA4TJTBLmMT");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub mod error_on_syscall_bpf_function_hash_collisions {
|
||||||
|
solana_sdk::declare_id!("8199Q2gMD2kwgfopK5qqVWuDbegLgpuFUFHCcUJQDN8b");
|
||||||
|
}
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
/// Map of feature identifiers to user-visible description
|
/// Map of feature identifiers to user-visible description
|
||||||
pub static ref FEATURE_NAMES: HashMap<Pubkey, &'static str> = [
|
pub static ref FEATURE_NAMES: HashMap<Pubkey, &'static str> = [
|
||||||
|
@ -413,6 +417,7 @@ lazy_static! {
|
||||||
(check_slice_translation_size::id(), "check size when translating slices"),
|
(check_slice_translation_size::id(), "check size when translating slices"),
|
||||||
(stake_split_uses_rent_sysvar::id(), "stake split instruction uses rent sysvar"),
|
(stake_split_uses_rent_sysvar::id(), "stake split instruction uses rent sysvar"),
|
||||||
(add_get_minimum_delegation_instruction_to_stake_program::id(), "add GetMinimumDelegation instruction to stake program"),
|
(add_get_minimum_delegation_instruction_to_stake_program::id(), "add GetMinimumDelegation instruction to stake program"),
|
||||||
|
(error_on_syscall_bpf_function_hash_collisions::id(), "error on bpf function hash collisions"),
|
||||||
/*************** ADD NEW FEATURES HERE ***************/
|
/*************** ADD NEW FEATURES HERE ***************/
|
||||||
]
|
]
|
||||||
.iter()
|
.iter()
|
||||||
|
|
Loading…
Reference in New Issue