Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit ff68bf6

Browse files
authored
quick bail on panic (#25804)
1 parent 363d8d1 commit ff68bf6

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

programs/bpf_loader/src/syscalls.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use {
2727
disable_fees_sysvar, do_support_realloc, executables_incur_cpi_data_cost,
2828
fixed_memcpy_nonoverlapping_check, libsecp256k1_0_5_upgrade_enabled,
2929
limit_secp256k1_recovery_id, prevent_calling_precompiles_as_programs,
30-
return_data_syscall_enabled, secp256k1_recover_syscall_enabled,
30+
quick_bail_on_panic, return_data_syscall_enabled, secp256k1_recover_syscall_enabled,
3131
sol_log_data_syscall_enabled, syscall_saturated_math, update_syscall_base_costs,
3232
zk_token_sdk_enabled,
3333
},
@@ -606,6 +606,9 @@ declare_syscall!(
606606
if !invoke_context
607607
.feature_set
608608
.is_active(&update_syscall_base_costs::id())
609+
|| invoke_context
610+
.feature_set
611+
.is_active(&quick_bail_on_panic::id())
609612
{
610613
question_mark!(invoke_context.get_compute_meter().consume(len), result);
611614
}

sdk/src/feature_set.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,10 @@ pub mod vote_state_update_credit_per_dequeue {
428428
solana_sdk::declare_id!("CveezY6FDLVBToHDcvJRmtMouqzsmj4UXYh5ths5G5Uv");
429429
}
430430

431+
pub mod quick_bail_on_panic {
432+
solana_sdk::declare_id!("DpJREPyuMZ5nDfU6H3WTqSqUFSXAfw8u7xqmWtEwJDcP");
433+
}
434+
431435
lazy_static! {
432436
/// Map of feature identifiers to user-visible description
433437
pub static ref FEATURE_NAMES: HashMap<Pubkey, &'static str> = [
@@ -528,6 +532,7 @@ lazy_static! {
528532
(separate_nonce_from_blockhash::id(), "separate durable nonce and blockhash domains #25744"),
529533
(enable_durable_nonce::id(), "enable durable nonce #25744"),
530534
(vote_state_update_credit_per_dequeue::id(), "Calculate vote credits for VoteStateUpdate per vote dequeue to match credit awards for Vote instruction"),
535+
(quick_bail_on_panic::id(), "quick bail on panic"),
531536
/*************** ADD NEW FEATURES HERE ***************/
532537
]
533538
.iter()

0 commit comments

Comments
 (0)