File tree Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -7229,10 +7229,7 @@ fn test_bpf_loader_upgradeable_deploy_with_max_len() {
7229
7229
) ;
7230
7230
assert_eq ! (
7231
7231
bank. process_transaction( & transaction) ,
7232
- Err ( TransactionError :: InstructionError (
7233
- 0 ,
7234
- InstructionError :: InvalidAccountData
7235
- ) ) ,
7232
+ Err ( TransactionError :: InvalidProgramForExecution ) ,
7236
7233
) ;
7237
7234
{
7238
7235
let program_cache = bank. transaction_processor . program_cache . read ( ) . unwrap ( ) ;
@@ -7253,10 +7250,7 @@ fn test_bpf_loader_upgradeable_deploy_with_max_len() {
7253
7250
let transaction = Transaction :: new ( & [ & binding] , message, bank. last_blockhash ( ) ) ;
7254
7251
assert_eq ! (
7255
7252
bank. process_transaction( & transaction) ,
7256
- Err ( TransactionError :: InstructionError (
7257
- 0 ,
7258
- InstructionError :: InvalidAccountData ,
7259
- ) ) ,
7253
+ Err ( TransactionError :: InvalidProgramForExecution ) ,
7260
7254
) ;
7261
7255
{
7262
7256
let program_cache = bank. transaction_processor . program_cache . read ( ) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -869,6 +869,10 @@ pub mod reenable_sbpf_v1_execution {
869
869
solana_pubkey:: declare_id!( "TestFeature21111111111111111111111111111111" ) ;
870
870
}
871
871
872
+ pub mod disable_account_loader_special_case {
873
+ solana_pubkey:: declare_id!( "EQUMpNFr7Nacb1sva56xn1aLfBxppEoSBH8RRVdkcD1x" ) ;
874
+ }
875
+
872
876
lazy_static ! {
873
877
/// Map of feature identifiers to user-visible description
874
878
pub static ref FEATURE_NAMES : HashMap <Pubkey , & ' static str > = [
@@ -1081,6 +1085,7 @@ lazy_static! {
1081
1085
( partitioned_epoch_rewards_superfeature:: id( ) , "replaces enable_partitioned_epoch_reward to enable partitioned rewards at epoch boundary SIMD-0118" ) ,
1082
1086
( disable_sbpf_v1_execution:: id( ) , "Disables execution of SBPFv1 programs" ) ,
1083
1087
( reenable_sbpf_v1_execution:: id( ) , "Re-enables execution of SBPFv1 programs" ) ,
1088
+ ( disable_account_loader_special_case:: id( ) , "Disable account loader special case #3513" ) ,
1084
1089
/*************** ADD NEW FEATURES HERE ***************/
1085
1090
]
1086
1091
. iter( )
Original file line number Diff line number Diff line change @@ -424,6 +424,8 @@ fn load_transaction_account<CB: TransactionProcessingCallback>(
424
424
loaded_programs : & ProgramCacheForTxBatch ,
425
425
) -> Result < ( LoadedTransactionAccount , bool ) > {
426
426
let mut account_found = true ;
427
+ let disable_account_loader_special_case =
428
+ feature_set. is_active ( & feature_set:: disable_account_loader_special_case:: id ( ) ) ;
427
429
let is_instruction_account = u8:: try_from ( account_index)
428
430
. map ( |i| instruction_accounts. contains ( & & i) )
429
431
. unwrap_or ( false ) ;
@@ -444,9 +446,10 @@ fn load_transaction_account<CB: TransactionProcessingCallback>(
444
446
account : account_override. clone ( ) ,
445
447
rent_collected : 0 ,
446
448
}
447
- } else if let Some ( program) = ( !is_instruction_account && !is_writable)
448
- . then_some ( ( ) )
449
- . and_then ( |_| loaded_programs. find ( account_key) )
449
+ } else if let Some ( program) =
450
+ ( !disable_account_loader_special_case && !is_instruction_account && !is_writable)
451
+ . then_some ( ( ) )
452
+ . and_then ( |_| loaded_programs. find ( account_key) )
450
453
{
451
454
// Optimization to skip loading of accounts which are only used as
452
455
// programs in top-level instructions and not passed as instruction accounts.
You can’t perform that action at this time.
0 commit comments