Crate solana_feature_set

Source
Expand description

Collection of all runtime features.

Steps to add a new feature are outlined below. Note that these steps only cover the process of getting a feature into the core Solana code.

  1. Generate a new keypair with solana-keygen new --outfile feature.json --no-passphrase
    • Keypairs should be held by core contributors only. If you’re a non-core contributor going through these steps, the PR process will facilitate a keypair holder being picked. That person will generate the keypair, provide pubkey for PR, and ultimately enable the feature.
  2. Add a public module for the feature, specifying keypair pubkey as the id with solana_pubkey::declare_id!() within the module. Additionally, add an entry to FEATURE_NAMES map.
  3. Add desired logic to check for and switch on feature availability.

For more information on how features are picked up, see comments for Feature.

Modules§

abort_on_invalid_curve
account_hash_ignore_slot
add_compute_budget_program
add_get_minimum_delegation_instruction_to_stake_program
add_get_processed_sibling_instruction_syscall
add_new_reserved_account_keys
add_set_compute_unit_price_ix
add_set_tx_loaded_accounts_data_size_instruction
add_shred_type_to_shred_seed
allow_commission_decrease_at_any_time
allow_votes_to_directly_update_vote_state
apply_cost_tracker_during_replay
bank_transaction_count_fix
better_error_codes_for_tx_lamport_check
blake3_syscall_enabled
bpf_account_data_direct_mapping
cap_accounts_data_allocations_per_transaction
cap_bpf_program_instruction_accounts
cap_transaction_accounts_data_size
chained_merkle_conflict_duplicate_proofs
check_init_vote_data
check_physical_overlapping
check_slice_translation_size
check_syscall_outputs_do_not_overlap
checked_arithmetic_in_fee_validation
clean_up_delegation_errors
commission_updates_only_allowed_in_first_half_of_epoch
compact_vote_state_updates
consume_blockstore_duplicate_proofs
cost_model_requested_write_lock_cost
credits_auto_rewind
curve25519_restrict_msm_length
curve25519_syscall_enabled
dedupe_config_program_signers
default_units_per_instruction
delay_visibility_of_program_deployment
demote_program_write_locks
deplete_cu_meter_on_vm_failure
deprecate_legacy_vote_ixs
deprecate_rewards_sysvar
deprecate_unused_legacy_vote_plumbing
disable_account_loader_special_case
disable_bpf_deprecated_load_instructions
disable_bpf_loader_instructions
disable_bpf_unresolved_symbols_at_runtime
disable_builtin_loader_ownership_chains
disable_cpi_setting_executable_and_rent_epoch
disable_deploy_of_alloc_free_syscall
disable_deprecated_loader
disable_fee_calculator
disable_fees_sysvar
disable_rehash_for_rent_epoch
disable_rent_fees_collection
disable_sbpf_v1_execution
disable_turbine_fanout_experiments
do_support_realloc
drop_legacy_shreds
drop_redundant_turbine_path
ed25519_precompile_verify_strict
ed25519_program_enabled
enable_alt_bn128_compression_syscall
enable_alt_bn128_syscall
enable_big_mod_exp_syscall
enable_bpf_loader_extend_program_ix
enable_bpf_loader_set_authority_checked_ix
enable_chained_merkle_shreds
enable_durable_nonce
enable_early_verification_of_account_modifications
enable_get_epoch_stake_syscall
enable_gossip_duplicate_proof_ingestion
enable_partitioned_epoch_reward
enable_poseidon_syscall
enable_program_redeployment_cooldown
enable_program_runtime_v2_and_loader_v4
enable_request_heap_frame_ix
enable_secp256r1_precompile
enable_tower_sync_ix
enable_transaction_loading_failure_fees
enable_turbine_extended_fanout_experiments
enable_turbine_fanout_experiments
enable_zk_proof_from_account
enable_zk_transfer_with_fee
epoch_accounts_hash
error_on_syscall_bpf_function_hash_collisions
evict_invalid_stakes_cache_entries
executables_incur_cpi_data_cost
filter_stake_delegation_accounts
filter_votes_outside_slot_hashes
fix_recent_blockhashes
fixed_memcpy_nonoverlapping_check
full_inflation
get_sysvar_syscall_enabled
include_account_index_in_rent_error
include_loaded_accounts_data_size_in_fee_calculation
increase_tx_account_lock_limit
incremental_snapshot_only_incremental_hash_calculation
index_erasure_conflict_duplicate_proofs
instructions_sysvar_owned_by_sysvar
last_restart_slot_sysvar
leave_nonce_on_success
libsecp256k1_0_5_upgrade_enabled
libsecp256k1_fail_on_bad_count
libsecp256k1_fail_on_bad_count2
limit_max_instruction_trace_length
limit_secp256k1_recovery_id
loosen_cpi_size_restriction
max_tx_account_locks
merge_nonce_error_into_system_error
merkle_conflict_duplicate_proofs
migrate_address_lookup_table_program_to_core_bpf
migrate_config_program_to_core_bpf
migrate_feature_gate_program_to_core_bpf
migrate_stake_program_to_core_bpf
move_precompile_verification_to_svm
move_serialized_len_ptr_in_cpi
move_stake_and_move_lamports_ixs
native_programs_consume_cu
no_overflow_rent_distribution
nonce_must_be_advanceable
nonce_must_be_authorized
nonce_must_be_writable
on_load_preserve_rent_epoch_for_rent_exempt_accounts
optimize_epoch_boundary_updates
partitioned_epoch_rewards_superfeature
pico_inflation
preserve_rent_epoch_for_rent_exempt_accounts
prevent_calling_precompiles_as_programs
prevent_crediting_accounts_that_end_rent_paying
prevent_rent_paying_rent_recipients
quick_bail_on_panic
raise_block_limits_to_50m
record_instruction_in_transaction_context_push
reduce_required_deploy_balance
reduce_stake_warmup_cooldown
reenable_sbpf_v1_execution
reject_callx_r10
reject_empty_instruction_without_program
reject_non_rent_exempt_vote_withdraws
reject_vote_account_close_unless_zero_credit_epoch
relax_authority_signer_check_for_lookup_table_creation
remaining_compute_units_syscall_enabled
remove_bpf_loader_incorrect_program_id
remove_congestion_multiplier_from_fee_calculation
remove_deprecated_request_unit_ix
remove_native_loader
remove_rounding_in_fee_calculation
rent_for_sysvars
requestable_heap_size
require_custodian_for_locked_stake_authorize
require_rent_exempt_accounts
require_rent_exempt_split_destination
require_static_program_ids_in_transaction
reserve_minimal_cus_for_builtin_instructions
return_data_syscall_enabled
reward_full_priority_fee
round_up_heap_size
secp256k1_program_enabled
secp256k1_recover_syscall_enabled
send_to_tpu_vote_port
separate_nonce_from_blockhash
set_exempt_rent_epoch_max
simplify_alt_bn128_syscall_error_codes
simplify_writable_program_account_check
skip_rent_rewrites
sol_log_data_syscall_enabled
spl_associated_token_account_v1_0_4
spl_associated_token_account_v1_1_0
spl_token_v2_multisig_fix
spl_token_v2_self_transfer_fix
spl_token_v2_set_authority_fix
spl_token_v3_3_0_release
spl_token_v3_4_0
stake_allow_zero_undelegated_amount
stake_deactivate_delinquent_instruction
stake_merge_with_unmatched_credits_observed
stake_minimum_delegation_for_rewards
stake_program_advance_activating_credits_observed
stake_raise_minimum_delegation_to_1_sol
stake_split_uses_rent_sysvar
stakes_remove_delegation_if_inactive
stop_sibling_instruction_search_at_parent
stop_truncating_strings_in_syscalls
switch_to_new_elf_parser
syscall_saturated_math
system_transfer_zero_check
timely_vote_credits
tx_wide_compute_cap
update_hashes_per_tick
update_hashes_per_tick2
update_hashes_per_tick3
update_hashes_per_tick4
update_hashes_per_tick5
update_hashes_per_tick6
update_rewards_from_cached_accounts
update_syscall_base_costs
use_default_units_in_fee_calculation
validate_fee_collector_account
verify_retransmitter_signature
verify_tx_signatures_len
versioned_tx_message_enabled
vote_authorize_with_seed
vote_only_full_fec_sets
vote_only_retransmitter_signed_fec_sets
vote_stake_checked_instructions
vote_state_add_vote_latency
vote_state_update_credit_per_dequeue
vote_state_update_root_fix
vote_withdraw_authority_may_change_authorized_voter
warp_timestamp_again
warp_timestamp_with_a_vengeance
zk_elgamal_proof_program_enabled
zk_token_sdk_enabled

Structs§

FEATURE_NAMES
Map of feature identifiers to user-visible description
FULL_INFLATION_FEATURE_PAIRS
Set of feature pairs that once enabled will trigger full inflation
FeatureSet
FeatureSet holds the set of currently active/inactive runtime features
FullInflationFeaturePair
ID
Unique identifier of the current software’s feature set