36
36
feature_set:: {
37
37
bpf_account_data_direct_mapping, cap_accounts_data_allocations_per_transaction,
38
38
cap_bpf_program_instruction_accounts, delay_visibility_of_program_deployment,
39
- disable_bpf_loader_instructions, enable_bpf_loader_extend_program_ix,
40
- enable_bpf_loader_set_authority_checked_ix, enable_program_redeployment_cooldown,
41
- limit_max_instruction_trace_length, native_programs_consume_cu,
42
- remove_bpf_loader_incorrect_program_id,
39
+ enable_bpf_loader_extend_program_ix, enable_bpf_loader_set_authority_checked_ix,
40
+ enable_program_redeployment_cooldown, limit_max_instruction_trace_length,
41
+ native_programs_consume_cu, remove_bpf_loader_incorrect_program_id,
43
42
} ,
44
43
instruction:: { AccountMeta , InstructionError } ,
45
44
loader_instruction:: LoaderInstruction ,
@@ -510,20 +509,11 @@ pub fn process_instruction_inner(
510
509
if native_programs_consume_cu {
511
510
invoke_context. consume_checked ( DEFAULT_LOADER_COMPUTE_UNITS ) ?;
512
511
}
513
- // Return `UnsupportedProgramId` error for bpf_loader when
514
- // `disable_bpf_loader_instruction` feature is activated.
515
- if invoke_context
516
- . feature_set
517
- . is_active ( & disable_bpf_loader_instructions:: id ( ) )
518
- {
519
- ic_logger_msg ! (
520
- log_collector,
521
- "BPF loader management instructions are no longer supported"
522
- ) ;
523
- Err ( InstructionError :: UnsupportedProgramId )
524
- } else {
525
- process_loader_instruction ( invoke_context)
526
- }
512
+ ic_logger_msg ! (
513
+ log_collector,
514
+ "BPF loader management instructions are no longer supported"
515
+ ) ;
516
+ Err ( InstructionError :: UnsupportedProgramId )
527
517
} else if bpf_loader_deprecated:: check_id ( program_id) {
528
518
if native_programs_consume_cu {
529
519
invoke_context. consume_checked ( DEPRECATED_LOADER_COMPUTE_UNITS ) ?;
@@ -1486,7 +1476,7 @@ fn common_close_account(
1486
1476
Ok ( ( ) )
1487
1477
}
1488
1478
1489
- fn process_loader_instruction ( invoke_context : & mut InvokeContext ) -> Result < ( ) , InstructionError > {
1479
+ fn _process_loader_instruction ( invoke_context : & mut InvokeContext ) -> Result < ( ) , InstructionError > {
1490
1480
let transaction_context = & invoke_context. transaction_context ;
1491
1481
let instruction_context = transaction_context. get_current_instruction_context ( ) ?;
1492
1482
let instruction_data = instruction_context. get_instruction_data ( ) ;
@@ -1787,7 +1777,6 @@ mod tests {
1787
1777
} ,
1788
1778
account_utils:: StateMut ,
1789
1779
clock:: Clock ,
1790
- feature_set:: FeatureSet ,
1791
1780
instruction:: { AccountMeta , InstructionError } ,
1792
1781
pubkey:: Pubkey ,
1793
1782
rent:: Rent ,
@@ -1826,9 +1815,6 @@ mod tests {
1826
1815
expected_result,
1827
1816
Entrypoint :: vm,
1828
1817
|invoke_context| {
1829
- let mut features = FeatureSet :: all_enabled ( ) ;
1830
- features. deactivate ( & disable_bpf_loader_instructions:: id ( ) ) ;
1831
- invoke_context. feature_set = Arc :: new ( features) ;
1832
1818
test_utils:: load_all_invoked_programs ( invoke_context) ;
1833
1819
} ,
1834
1820
|_invoke_context| { } ,
@@ -1847,6 +1833,7 @@ mod tests {
1847
1833
program_account
1848
1834
}
1849
1835
1836
+ #[ ignore]
1850
1837
#[ test]
1851
1838
fn test_bpf_loader_write ( ) {
1852
1839
let loader_id = bpf_loader:: id ( ) ;
@@ -1914,6 +1901,7 @@ mod tests {
1914
1901
) ;
1915
1902
}
1916
1903
1904
+ #[ ignore]
1917
1905
#[ test]
1918
1906
fn test_bpf_loader_finalize ( ) {
1919
1907
let loader_id = bpf_loader:: id ( ) ;
@@ -1978,6 +1966,7 @@ mod tests {
1978
1966
) ;
1979
1967
}
1980
1968
1969
+ #[ ignore]
1981
1970
#[ test]
1982
1971
fn test_bpf_loader_invoke_main ( ) {
1983
1972
let loader_id = bpf_loader:: id ( ) ;
@@ -2048,9 +2037,6 @@ mod tests {
2048
2037
Err ( InstructionError :: ProgramFailedToComplete ) ,
2049
2038
Entrypoint :: vm,
2050
2039
|invoke_context| {
2051
- let mut features = FeatureSet :: all_enabled ( ) ;
2052
- features. deactivate ( & disable_bpf_loader_instructions:: id ( ) ) ;
2053
- invoke_context. feature_set = Arc :: new ( features) ;
2054
2040
invoke_context. mock_set_remaining ( 0 ) ;
2055
2041
test_utils:: load_all_invoked_programs ( invoke_context) ;
2056
2042
} ,
@@ -2596,11 +2582,7 @@ mod tests {
2596
2582
instruction_accounts,
2597
2583
expected_result,
2598
2584
Entrypoint :: vm,
2599
- |invoke_context| {
2600
- let mut features = FeatureSet :: all_enabled ( ) ;
2601
- features. deactivate ( & disable_bpf_loader_instructions:: id ( ) ) ;
2602
- invoke_context. feature_set = Arc :: new ( features) ;
2603
- } ,
2585
+ |_invoke_context| { } ,
2604
2586
|_invoke_context| { } ,
2605
2587
)
2606
2588
}
0 commit comments