1#![cfg_attr(
2 not(feature = "agave-unstable-api"),
3 deprecated(
4 since = "3.1.0",
5 note = "This crate has been marked for formal inclusion in the Agave Unstable API. From \
6 v4.0.0 onward, the `agave-unstable-api` crate feature must be specified to \
7 acknowledge use of an interface that may break without warning."
8 )
9)]
10#[derive(Clone, Copy, Default)]
11pub struct SVMFeatureSet {
12 pub move_precompile_verification_to_svm: bool,
13 pub stricter_abi_and_runtime_constraints: bool,
14 pub account_data_direct_mapping: bool,
15 pub enable_bpf_loader_set_authority_checked_ix: bool,
16 pub enable_loader_v4: bool,
17 pub deplete_cu_meter_on_vm_failure: bool,
18 pub abort_on_invalid_curve: bool,
19 pub blake3_syscall_enabled: bool,
20 pub curve25519_syscall_enabled: bool,
21 pub disable_deploy_of_alloc_free_syscall: bool,
22 pub disable_fees_sysvar: bool,
23 pub disable_sbpf_v0_execution: bool,
24 pub enable_alt_bn128_compression_syscall: bool,
25 pub enable_alt_bn128_syscall: bool,
26 pub enable_big_mod_exp_syscall: bool,
27 pub enable_get_epoch_stake_syscall: bool,
28 pub enable_poseidon_syscall: bool,
29 pub enable_sbpf_v1_deployment_and_execution: bool,
30 pub enable_sbpf_v2_deployment_and_execution: bool,
31 pub enable_sbpf_v3_deployment_and_execution: bool,
32 pub get_sysvar_syscall_enabled: bool,
33 pub last_restart_slot_sysvar: bool,
34 pub reenable_sbpf_v0_execution: bool,
35 pub remaining_compute_units_syscall_enabled: bool,
36 pub remove_bpf_loader_incorrect_program_id: bool,
37 pub move_stake_and_move_lamports_ixs: bool,
38 pub stake_raise_minimum_delegation_to_1_sol: bool,
39 pub deprecate_legacy_vote_ixs: bool,
40 pub mask_out_rent_epoch_in_vm_serialization: bool,
41 pub simplify_alt_bn128_syscall_error_codes: bool,
42 pub fix_alt_bn128_multiplication_input_length: bool,
43 pub increase_tx_account_lock_limit: bool,
44 pub enable_extend_program_checked: bool,
45 pub formalize_loaded_transaction_data_size: bool,
46 pub disable_zk_elgamal_proof_program: bool,
47 pub reenable_zk_elgamal_proof_program: bool,
48 pub raise_cpi_nesting_limit_to_8: bool,
49 pub provide_instruction_data_offset_in_vm_r2: bool,
50 pub increase_cpi_account_info_limit: bool,
51 pub vote_state_v4: bool,
52 pub poseidon_enforce_padding: bool,
53 pub fix_alt_bn128_pairing_length_check: bool,
54}
55
56impl SVMFeatureSet {
57 pub fn all_enabled() -> Self {
58 Self {
59 move_precompile_verification_to_svm: true,
60 stricter_abi_and_runtime_constraints: true,
61 account_data_direct_mapping: true,
62 enable_bpf_loader_set_authority_checked_ix: true,
63 enable_loader_v4: true,
64 deplete_cu_meter_on_vm_failure: true,
65 abort_on_invalid_curve: true,
66 blake3_syscall_enabled: true,
67 curve25519_syscall_enabled: true,
68 disable_deploy_of_alloc_free_syscall: true,
69 disable_fees_sysvar: true,
70 disable_sbpf_v0_execution: true,
71 enable_alt_bn128_compression_syscall: true,
72 enable_alt_bn128_syscall: true,
73 enable_big_mod_exp_syscall: true,
74 enable_get_epoch_stake_syscall: true,
75 enable_poseidon_syscall: true,
76 enable_sbpf_v1_deployment_and_execution: true,
77 enable_sbpf_v2_deployment_and_execution: true,
78 enable_sbpf_v3_deployment_and_execution: true,
79 get_sysvar_syscall_enabled: true,
80 last_restart_slot_sysvar: true,
81 reenable_sbpf_v0_execution: true,
82 remaining_compute_units_syscall_enabled: true,
83 remove_bpf_loader_incorrect_program_id: true,
84 move_stake_and_move_lamports_ixs: true,
85 stake_raise_minimum_delegation_to_1_sol: true,
86 deprecate_legacy_vote_ixs: true,
87 mask_out_rent_epoch_in_vm_serialization: true,
88 simplify_alt_bn128_syscall_error_codes: true,
89 fix_alt_bn128_multiplication_input_length: true,
90 increase_tx_account_lock_limit: true,
91 enable_extend_program_checked: true,
92 formalize_loaded_transaction_data_size: true,
93 disable_zk_elgamal_proof_program: true,
94 reenable_zk_elgamal_proof_program: true,
95 raise_cpi_nesting_limit_to_8: true,
96 provide_instruction_data_offset_in_vm_r2: true,
97 increase_cpi_account_info_limit: true,
98 vote_state_v4: true,
99 poseidon_enforce_padding: true,
100 fix_alt_bn128_pairing_length_check: true,
101 }
102 }
103}