solana_feature_set/
lib.rs

1//! Collection of all runtime features.
2//!
3//! Steps to add a new feature are outlined below. Note that these steps only cover
4//! the process of getting a feature into the core Solana code.
5//! - For features that are unambiguously good (ie bug fixes), these steps are sufficient.
6//! - For features that should go up for community vote (ie fee structure changes), more
7//!   information on the additional steps to follow can be found at:
8//!   <https://spl.solana.com/feature-proposal#feature-proposal-life-cycle>
9//!
10//! 1. Generate a new keypair with `solana-keygen new --outfile feature.json --no-passphrase`
11//!    - Keypairs should be held by core contributors only. If you're a non-core contributor going
12//!      through these steps, the PR process will facilitate a keypair holder being picked. That
13//!      person will generate the keypair, provide pubkey for PR, and ultimately enable the feature.
14//! 2. Add a public module for the feature, specifying keypair pubkey as the id with
15//!    `solana_pubkey::declare_id!()` within the module.
16//!    Additionally, add an entry to `FEATURE_NAMES` map.
17//! 3. Add desired logic to check for and switch on feature availability.
18//!
19//! For more information on how features are picked up, see comments for `Feature`.
20#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
21#![deprecated(since = "2.2.5", note = "Use agave-feature-set instead")]
22
23use {
24    ahash::{AHashMap, AHashSet},
25    lazy_static::lazy_static,
26    solana_epoch_schedule::EpochSchedule,
27    solana_hash::Hash,
28    solana_pubkey::Pubkey,
29    solana_sha256_hasher::Hasher,
30};
31
32pub mod deprecate_rewards_sysvar {
33    solana_pubkey::declare_id!("GaBtBJvmS4Arjj5W1NmFcyvPjsHN38UGYDq2MDwbs9Qu");
34}
35
36pub mod pico_inflation {
37    solana_pubkey::declare_id!("4RWNif6C2WCNiKVW7otP4G7dkmkHGyKQWRpuZ1pxKU5m");
38}
39
40pub mod full_inflation {
41    pub mod devnet_and_testnet {
42        solana_pubkey::declare_id!("DT4n6ABDqs6w4bnfwrXT9rsprcPf6cdDga1egctaPkLC");
43    }
44
45    pub mod mainnet {
46        pub mod certusone {
47            pub mod vote {
48                solana_pubkey::declare_id!("BzBBveUDymEYoYzcMWNQCx3cd4jQs7puaVFHLtsbB6fm");
49            }
50            pub mod enable {
51                solana_pubkey::declare_id!("7XRJcS5Ud5vxGB54JbK9N2vBZVwnwdBNeJW1ibRgD9gx");
52            }
53        }
54    }
55}
56
57pub mod secp256k1_program_enabled {
58    solana_pubkey::declare_id!("E3PHP7w8kB7np3CTQ1qQ2tW3KCtjRSXBQgW9vM2mWv2Y");
59}
60
61pub mod spl_token_v2_multisig_fix {
62    solana_pubkey::declare_id!("E5JiFDQCwyC6QfT9REFyMpfK2mHcmv1GUDySU1Ue7TYv");
63}
64
65pub mod no_overflow_rent_distribution {
66    solana_pubkey::declare_id!("4kpdyrcj5jS47CZb2oJGfVxjYbsMm2Kx97gFyZrxxwXz");
67}
68
69pub mod filter_stake_delegation_accounts {
70    solana_pubkey::declare_id!("GE7fRxmW46K6EmCD9AMZSbnaJ2e3LfqCZzdHi9hmYAgi");
71}
72
73pub mod require_custodian_for_locked_stake_authorize {
74    solana_pubkey::declare_id!("D4jsDcXaqdW8tDAWn8H4R25Cdns2YwLneujSL1zvjW6R");
75}
76
77pub mod spl_token_v2_self_transfer_fix {
78    solana_pubkey::declare_id!("BL99GYhdjjcv6ys22C9wPgn2aTVERDbPHHo4NbS3hgp7");
79}
80
81pub mod warp_timestamp_again {
82    solana_pubkey::declare_id!("GvDsGDkH5gyzwpDhxNixx8vtx1kwYHH13RiNAPw27zXb");
83}
84
85pub mod check_init_vote_data {
86    solana_pubkey::declare_id!("3ccR6QpxGYsAbWyfevEtBNGfWV4xBffxRj2tD6A9i39F");
87}
88
89pub mod secp256k1_recover_syscall_enabled {
90    solana_pubkey::declare_id!("6RvdSWHh8oh72Dp7wMTS2DBkf3fRPtChfNrAo3cZZoXJ");
91}
92
93pub mod system_transfer_zero_check {
94    solana_pubkey::declare_id!("BrTR9hzw4WBGFP65AJMbpAo64DcA3U6jdPSga9fMV5cS");
95}
96
97pub mod blake3_syscall_enabled {
98    solana_pubkey::declare_id!("HTW2pSyErTj4BV6KBM9NZ9VBUJVxt7sacNWcf76wtzb3");
99}
100
101pub mod dedupe_config_program_signers {
102    solana_pubkey::declare_id!("8kEuAshXLsgkUEdcFVLqrjCGGHVWFW99ZZpxvAzzMtBp");
103}
104
105pub mod verify_tx_signatures_len {
106    solana_pubkey::declare_id!("EVW9B5xD9FFK7vw1SBARwMA4s5eRo5eKJdKpsBikzKBz");
107}
108
109pub mod vote_stake_checked_instructions {
110    solana_pubkey::declare_id!("BcWknVcgvonN8sL4HE4XFuEVgfcee5MwxWPAgP6ZV89X");
111}
112
113pub mod rent_for_sysvars {
114    solana_pubkey::declare_id!("BKCPBQQBZqggVnFso5nQ8rQ4RwwogYwjuUt9biBjxwNF");
115}
116
117pub mod libsecp256k1_0_5_upgrade_enabled {
118    solana_pubkey::declare_id!("DhsYfRjxfnh2g7HKJYSzT79r74Afa1wbHkAgHndrA1oy");
119}
120
121pub mod tx_wide_compute_cap {
122    solana_pubkey::declare_id!("5ekBxc8itEnPv4NzGJtr8BVVQLNMQuLMNQQj7pHoLNZ9");
123}
124
125pub mod spl_token_v2_set_authority_fix {
126    solana_pubkey::declare_id!("FToKNBYyiF4ky9s8WsmLBXHCht17Ek7RXaLZGHzzQhJ1");
127}
128
129pub mod merge_nonce_error_into_system_error {
130    solana_pubkey::declare_id!("21AWDosvp3pBamFW91KB35pNoaoZVTM7ess8nr2nt53B");
131}
132
133pub mod disable_fees_sysvar {
134    solana_pubkey::declare_id!("JAN1trEUEtZjgXYzNBYHU9DYd7GnThhXfFP7SzPXkPsG");
135}
136
137pub mod stake_merge_with_unmatched_credits_observed {
138    solana_pubkey::declare_id!("meRgp4ArRPhD3KtCY9c5yAf2med7mBLsjKTPeVUHqBL");
139}
140
141pub mod zk_token_sdk_enabled {
142    solana_pubkey::declare_id!("zk1snxsc6Fh3wsGNbbHAJNHiJoYgF29mMnTSusGx5EJ");
143}
144
145pub mod curve25519_syscall_enabled {
146    solana_pubkey::declare_id!("7rcw5UtqgDTBBv2EcynNfYckgdAaH1MAsCjKgXMkN7Ri");
147}
148
149pub mod curve25519_restrict_msm_length {
150    solana_pubkey::declare_id!("eca6zf6JJRjQsYYPkBHF3N32MTzur4n2WL4QiiacPCL");
151}
152
153pub mod versioned_tx_message_enabled {
154    solana_pubkey::declare_id!("3KZZ6Ks1885aGBQ45fwRcPXVBCtzUvxhUTkwKMR41Tca");
155}
156
157pub mod libsecp256k1_fail_on_bad_count {
158    solana_pubkey::declare_id!("8aXvSuopd1PUj7UhehfXJRg6619RHp8ZvwTyyJHdUYsj");
159}
160
161pub mod libsecp256k1_fail_on_bad_count2 {
162    solana_pubkey::declare_id!("54KAoNiUERNoWWUhTWWwXgym94gzoXFVnHyQwPA18V9A");
163}
164
165pub mod instructions_sysvar_owned_by_sysvar {
166    solana_pubkey::declare_id!("H3kBSaKdeiUsyHmeHqjJYNc27jesXZ6zWj3zWkowQbkV");
167}
168
169pub mod stake_program_advance_activating_credits_observed {
170    solana_pubkey::declare_id!("SAdVFw3RZvzbo6DvySbSdBnHN4gkzSTH9dSxesyKKPj");
171}
172
173pub mod credits_auto_rewind {
174    solana_pubkey::declare_id!("BUS12ciZ5gCoFafUHWW8qaFMMtwFQGVxjsDheWLdqBE2");
175}
176
177pub mod demote_program_write_locks {
178    solana_pubkey::declare_id!("3E3jV7v9VcdJL8iYZUMax9DiDno8j7EWUVbhm9RtShj2");
179}
180
181pub mod ed25519_program_enabled {
182    solana_pubkey::declare_id!("6ppMXNYLhVd7GcsZ5uV11wQEW7spppiMVfqQv5SXhDpX");
183}
184
185pub mod return_data_syscall_enabled {
186    solana_pubkey::declare_id!("DwScAzPUjuv65TMbDnFY7AgwmotzWy3xpEJMXM3hZFaB");
187}
188
189pub mod reduce_required_deploy_balance {
190    solana_pubkey::declare_id!("EBeznQDjcPG8491sFsKZYBi5S5jTVXMpAKNDJMQPS2kq");
191}
192
193pub mod sol_log_data_syscall_enabled {
194    solana_pubkey::declare_id!("6uaHcKPGUy4J7emLBgUTeufhJdiwhngW6a1R9B7c2ob9");
195}
196
197pub mod stakes_remove_delegation_if_inactive {
198    solana_pubkey::declare_id!("HFpdDDNQjvcXnXKec697HDDsyk6tFoWS2o8fkxuhQZpL");
199}
200
201pub mod do_support_realloc {
202    solana_pubkey::declare_id!("75m6ysz33AfLA5DDEzWM1obBrnPQRSsdVQ2nRmc8Vuu1");
203}
204
205pub mod prevent_calling_precompiles_as_programs {
206    solana_pubkey::declare_id!("4ApgRX3ud6p7LNMJmsuaAcZY5HWctGPr5obAsjB3A54d");
207}
208
209pub mod optimize_epoch_boundary_updates {
210    solana_pubkey::declare_id!("265hPS8k8xJ37ot82KEgjRunsUp5w4n4Q4VwwiN9i9ps");
211}
212
213pub mod remove_native_loader {
214    solana_pubkey::declare_id!("HTTgmruMYRZEntyL3EdCDdnS6e4D5wRq1FA7kQsb66qq");
215}
216
217pub mod send_to_tpu_vote_port {
218    solana_pubkey::declare_id!("C5fh68nJ7uyKAuYZg2x9sEQ5YrVf3dkW6oojNBSc3Jvo");
219}
220
221pub mod requestable_heap_size {
222    solana_pubkey::declare_id!("CCu4boMmfLuqcmfTLPHQiUo22ZdUsXjgzPAURYaWt1Bw");
223}
224
225pub mod disable_fee_calculator {
226    solana_pubkey::declare_id!("2jXx2yDmGysmBKfKYNgLj2DQyAQv6mMk2BPh4eSbyB4H");
227}
228
229pub mod add_compute_budget_program {
230    solana_pubkey::declare_id!("4d5AKtxoh93Dwm1vHXUU3iRATuMndx1c431KgT2td52r");
231}
232
233pub mod nonce_must_be_writable {
234    solana_pubkey::declare_id!("BiCU7M5w8ZCMykVSyhZ7Q3m2SWoR2qrEQ86ERcDX77ME");
235}
236
237pub mod spl_token_v3_3_0_release {
238    solana_pubkey::declare_id!("Ftok2jhqAqxUWEiCVRrfRs9DPppWP8cgTB7NQNKL88mS");
239}
240
241pub mod leave_nonce_on_success {
242    solana_pubkey::declare_id!("E8MkiWZNNPGU6n55jkGzyj8ghUmjCHRmDFdYYFYHxWhQ");
243}
244
245pub mod reject_empty_instruction_without_program {
246    solana_pubkey::declare_id!("9kdtFSrXHQg3hKkbXkQ6trJ3Ja1xpJ22CTFSNAciEwmL");
247}
248
249pub mod fixed_memcpy_nonoverlapping_check {
250    solana_pubkey::declare_id!("36PRUK2Dz6HWYdG9SpjeAsF5F3KxnFCakA2BZMbtMhSb");
251}
252
253pub mod reject_non_rent_exempt_vote_withdraws {
254    solana_pubkey::declare_id!("7txXZZD6Um59YoLMF7XUNimbMjsqsWhc7g2EniiTrmp1");
255}
256
257pub mod evict_invalid_stakes_cache_entries {
258    solana_pubkey::declare_id!("EMX9Q7TVFAmQ9V1CggAkhMzhXSg8ECp7fHrWQX2G1chf");
259}
260
261pub mod allow_votes_to_directly_update_vote_state {
262    solana_pubkey::declare_id!("Ff8b1fBeB86q8cjq47ZhsQLgv5EkHu3G1C99zjUfAzrq");
263}
264
265pub mod max_tx_account_locks {
266    solana_pubkey::declare_id!("CBkDroRDqm8HwHe6ak9cguPjUomrASEkfmxEaZ5CNNxz");
267}
268
269pub mod require_rent_exempt_accounts {
270    solana_pubkey::declare_id!("BkFDxiJQWZXGTZaJQxH7wVEHkAmwCgSEVkrvswFfRJPD");
271}
272
273pub mod filter_votes_outside_slot_hashes {
274    solana_pubkey::declare_id!("3gtZPqvPpsbXZVCx6hceMfWxtsmrjMzmg8C7PLKSxS2d");
275}
276
277pub mod update_syscall_base_costs {
278    solana_pubkey::declare_id!("2h63t332mGCCsWK2nqqqHhN4U9ayyqhLVFvczznHDoTZ");
279}
280
281pub mod stake_deactivate_delinquent_instruction {
282    solana_pubkey::declare_id!("437r62HoAdUb63amq3D7ENnBLDhHT2xY8eFkLJYVKK4x");
283}
284
285pub mod vote_withdraw_authority_may_change_authorized_voter {
286    solana_pubkey::declare_id!("AVZS3ZsN4gi6Rkx2QUibYuSJG3S6QHib7xCYhG6vGJxU");
287}
288
289pub mod spl_associated_token_account_v1_0_4 {
290    solana_pubkey::declare_id!("FaTa4SpiaSNH44PGC4z8bnGVTkSRYaWvrBs3KTu8XQQq");
291}
292
293pub mod reject_vote_account_close_unless_zero_credit_epoch {
294    solana_pubkey::declare_id!("ALBk3EWdeAg2WAGf6GPDUf1nynyNqCdEVmgouG7rpuCj");
295}
296
297pub mod add_get_processed_sibling_instruction_syscall {
298    solana_pubkey::declare_id!("CFK1hRCNy8JJuAAY8Pb2GjLFNdCThS2qwZNe3izzBMgn");
299}
300
301pub mod bank_transaction_count_fix {
302    solana_pubkey::declare_id!("Vo5siZ442SaZBKPXNocthiXysNviW4UYPwRFggmbgAp");
303}
304
305pub mod disable_bpf_deprecated_load_instructions {
306    solana_pubkey::declare_id!("3XgNukcZWf9o3HdA3fpJbm94XFc4qpvTXc8h1wxYwiPi");
307}
308
309pub mod disable_bpf_unresolved_symbols_at_runtime {
310    solana_pubkey::declare_id!("4yuaYAj2jGMGTh1sSmi4G2eFscsDq8qjugJXZoBN6YEa");
311}
312
313pub mod record_instruction_in_transaction_context_push {
314    solana_pubkey::declare_id!("3aJdcZqxoLpSBxgeYGjPwaYS1zzcByxUDqJkbzWAH1Zb");
315}
316
317pub mod syscall_saturated_math {
318    solana_pubkey::declare_id!("HyrbKftCdJ5CrUfEti6x26Cj7rZLNe32weugk7tLcWb8");
319}
320
321pub mod check_physical_overlapping {
322    solana_pubkey::declare_id!("nWBqjr3gpETbiaVj3CBJ3HFC5TMdnJDGt21hnvSTvVZ");
323}
324
325pub mod limit_secp256k1_recovery_id {
326    solana_pubkey::declare_id!("7g9EUwj4j7CS21Yx1wvgWLjSZeh5aPq8x9kpoPwXM8n8");
327}
328
329pub mod disable_deprecated_loader {
330    solana_pubkey::declare_id!("GTUMCZ8LTNxVfxdrw7ZsDFTxXb7TutYkzJnFwinpE6dg");
331}
332
333pub mod check_slice_translation_size {
334    solana_pubkey::declare_id!("GmC19j9qLn2RFk5NduX6QXaDhVpGncVVBzyM8e9WMz2F");
335}
336
337pub mod stake_split_uses_rent_sysvar {
338    solana_pubkey::declare_id!("FQnc7U4koHqWgRvFaBJjZnV8VPg6L6wWK33yJeDp4yvV");
339}
340
341pub mod add_get_minimum_delegation_instruction_to_stake_program {
342    solana_pubkey::declare_id!("St8k9dVXP97xT6faW24YmRSYConLbhsMJA4TJTBLmMT");
343}
344
345pub mod error_on_syscall_bpf_function_hash_collisions {
346    solana_pubkey::declare_id!("8199Q2gMD2kwgfopK5qqVWuDbegLgpuFUFHCcUJQDN8b");
347}
348
349pub mod reject_callx_r10 {
350    solana_pubkey::declare_id!("3NKRSwpySNwD3TvP5pHnRmkAQRsdkXWRr1WaQh8p4PWX");
351}
352
353pub mod drop_redundant_turbine_path {
354    solana_pubkey::declare_id!("4Di3y24QFLt5QEUPZtbnjyfQKfm6ZMTfa6Dw1psfoMKU");
355}
356
357pub mod executables_incur_cpi_data_cost {
358    solana_pubkey::declare_id!("7GUcYgq4tVtaqNCKT3dho9r4665Qp5TxCZ27Qgjx3829");
359}
360
361pub mod fix_recent_blockhashes {
362    solana_pubkey::declare_id!("6iyggb5MTcsvdcugX7bEKbHV8c6jdLbpHwkncrgLMhfo");
363}
364
365pub mod update_rewards_from_cached_accounts {
366    solana_pubkey::declare_id!("28s7i3htzhahXQKqmS2ExzbEoUypg9krwvtK2M9UWXh9");
367}
368pub mod enable_partitioned_epoch_reward {
369    solana_pubkey::declare_id!("9bn2vTJUsUcnpiZWbu2woSKtTGW3ErZC9ERv88SDqQjK");
370}
371
372pub mod partitioned_epoch_rewards_superfeature {
373    solana_pubkey::declare_id!("PERzQrt5gBD1XEe2c9XdFWqwgHY3mr7cYWbm5V772V8");
374}
375
376pub mod spl_token_v3_4_0 {
377    solana_pubkey::declare_id!("Ftok4njE8b7tDffYkC5bAbCaQv5sL6jispYrprzatUwN");
378}
379
380pub mod spl_associated_token_account_v1_1_0 {
381    solana_pubkey::declare_id!("FaTa17gVKoqbh38HcfiQonPsAaQViyDCCSg71AubYZw8");
382}
383
384pub mod default_units_per_instruction {
385    solana_pubkey::declare_id!("J2QdYx8crLbTVK8nur1jeLsmc3krDbfjoxoea2V1Uy5Q");
386}
387
388pub mod stake_allow_zero_undelegated_amount {
389    solana_pubkey::declare_id!("sTKz343FM8mqtyGvYWvbLpTThw3ixRM4Xk8QvZ985mw");
390}
391
392pub mod require_static_program_ids_in_transaction {
393    solana_pubkey::declare_id!("8FdwgyHFEjhAdjWfV2vfqk7wA1g9X3fQpKH7SBpEv3kC");
394}
395
396pub mod stake_raise_minimum_delegation_to_1_sol {
397    // This is a feature-proposal *feature id*.  The feature keypair address is `GQXzC7YiSNkje6FFUk6sc2p53XRvKoaZ9VMktYzUMnpL`.
398    solana_pubkey::declare_id!("9onWzzvCzNC2jfhxxeqRgs5q7nFAAKpCUvkj6T6GJK9i");
399}
400
401pub mod stake_minimum_delegation_for_rewards {
402    solana_pubkey::declare_id!("G6ANXD6ptCSyNd9znZm7j4dEczAJCfx7Cy43oBx3rKHJ");
403}
404
405pub mod add_set_compute_unit_price_ix {
406    solana_pubkey::declare_id!("98std1NSHqXi9WYvFShfVepRdCoq1qvsp8fsR2XZtG8g");
407}
408
409pub mod disable_deploy_of_alloc_free_syscall {
410    solana_pubkey::declare_id!("79HWsX9rpnnJBPcdNURVqygpMAfxdrAirzAGAVmf92im");
411}
412
413pub mod include_account_index_in_rent_error {
414    solana_pubkey::declare_id!("2R72wpcQ7qV7aTJWUumdn8u5wmmTyXbK7qzEy7YSAgyY");
415}
416
417pub mod add_shred_type_to_shred_seed {
418    solana_pubkey::declare_id!("Ds87KVeqhbv7Jw8W6avsS1mqz3Mw5J3pRTpPoDQ2QdiJ");
419}
420
421pub mod warp_timestamp_with_a_vengeance {
422    solana_pubkey::declare_id!("3BX6SBeEBibHaVQXywdkcgyUk6evfYZkHdztXiDtEpFS");
423}
424
425pub mod separate_nonce_from_blockhash {
426    solana_pubkey::declare_id!("Gea3ZkK2N4pHuVZVxWcnAtS6UEDdyumdYt4pFcKjA3ar");
427}
428
429pub mod enable_durable_nonce {
430    solana_pubkey::declare_id!("4EJQtF2pkRyawwcTVfQutzq4Sa5hRhibF6QAK1QXhtEX");
431}
432
433pub mod vote_state_update_credit_per_dequeue {
434    solana_pubkey::declare_id!("CveezY6FDLVBToHDcvJRmtMouqzsmj4UXYh5ths5G5Uv");
435}
436
437pub mod quick_bail_on_panic {
438    solana_pubkey::declare_id!("DpJREPyuMZ5nDfU6H3WTqSqUFSXAfw8u7xqmWtEwJDcP");
439}
440
441pub mod nonce_must_be_authorized {
442    solana_pubkey::declare_id!("HxrEu1gXuH7iD3Puua1ohd5n4iUKJyFNtNxk9DVJkvgr");
443}
444
445pub mod nonce_must_be_advanceable {
446    solana_pubkey::declare_id!("3u3Er5Vc2jVcwz4xr2GJeSAXT3fAj6ADHZ4BJMZiScFd");
447}
448
449pub mod vote_authorize_with_seed {
450    solana_pubkey::declare_id!("6tRxEYKuy2L5nnv5bgn7iT28MxUbYxp5h7F3Ncf1exrT");
451}
452
453pub mod preserve_rent_epoch_for_rent_exempt_accounts {
454    solana_pubkey::declare_id!("HH3MUYReL2BvqqA3oEcAa7txju5GY6G4nxJ51zvsEjEZ");
455}
456
457pub mod enable_bpf_loader_extend_program_ix {
458    solana_pubkey::declare_id!("8Zs9W7D9MpSEtUWSQdGniZk2cNmV22y6FLJwCx53asme");
459}
460
461pub mod enable_early_verification_of_account_modifications {
462    solana_pubkey::declare_id!("7Vced912WrRnfjaiKRiNBcbuFw7RrnLv3E3z95Y4GTNc");
463}
464
465pub mod skip_rent_rewrites {
466    solana_pubkey::declare_id!("CGB2jM8pwZkeeiXQ66kBMyBR6Np61mggL7XUsmLjVcrw");
467}
468
469pub mod prevent_crediting_accounts_that_end_rent_paying {
470    solana_pubkey::declare_id!("812kqX67odAp5NFwM8D2N24cku7WTm9CHUTFUXaDkWPn");
471}
472
473pub mod cap_bpf_program_instruction_accounts {
474    solana_pubkey::declare_id!("9k5ijzTbYPtjzu8wj2ErH9v45xecHzQ1x4PMYMMxFgdM");
475}
476
477pub mod loosen_cpi_size_restriction {
478    solana_pubkey::declare_id!("GDH5TVdbTPUpRnXaRyQqiKUa7uZAbZ28Q2N9bhbKoMLm");
479}
480
481pub mod use_default_units_in_fee_calculation {
482    solana_pubkey::declare_id!("8sKQrMQoUHtQSUP83SPG4ta2JDjSAiWs7t5aJ9uEd6To");
483}
484
485pub mod compact_vote_state_updates {
486    solana_pubkey::declare_id!("86HpNqzutEZwLcPxS6EHDcMNYWk6ikhteg9un7Y2PBKE");
487}
488
489pub mod incremental_snapshot_only_incremental_hash_calculation {
490    solana_pubkey::declare_id!("25vqsfjk7Nv1prsQJmA4Xu1bN61s8LXCBGUPp8Rfy1UF");
491}
492
493pub mod disable_cpi_setting_executable_and_rent_epoch {
494    solana_pubkey::declare_id!("B9cdB55u4jQsDNsdTK525yE9dmSc5Ga7YBaBrDFvEhM9");
495}
496
497pub mod on_load_preserve_rent_epoch_for_rent_exempt_accounts {
498    solana_pubkey::declare_id!("CpkdQmspsaZZ8FVAouQTtTWZkc8eeQ7V3uj7dWz543rZ");
499}
500
501pub mod account_hash_ignore_slot {
502    solana_pubkey::declare_id!("SVn36yVApPLYsa8koK3qUcy14zXDnqkNYWyUh1f4oK1");
503}
504
505pub mod set_exempt_rent_epoch_max {
506    solana_pubkey::declare_id!("5wAGiy15X1Jb2hkHnPDCM8oB9V42VNA9ftNVFK84dEgv");
507}
508
509pub mod relax_authority_signer_check_for_lookup_table_creation {
510    solana_pubkey::declare_id!("FKAcEvNgSY79RpqsPNUV5gDyumopH4cEHqUxyfm8b8Ap");
511}
512
513pub mod stop_sibling_instruction_search_at_parent {
514    solana_pubkey::declare_id!("EYVpEP7uzH1CoXzbD6PubGhYmnxRXPeq3PPsm1ba3gpo");
515}
516
517pub mod vote_state_update_root_fix {
518    solana_pubkey::declare_id!("G74BkWBzmsByZ1kxHy44H3wjwp5hp7JbrGRuDpco22tY");
519}
520
521pub mod cap_accounts_data_allocations_per_transaction {
522    solana_pubkey::declare_id!("9gxu85LYRAcZL38We8MYJ4A9AwgBBPtVBAqebMcT1241");
523}
524
525pub mod epoch_accounts_hash {
526    solana_pubkey::declare_id!("5GpmAKxaGsWWbPp4bNXFLJxZVvG92ctxf7jQnzTQjF3n");
527}
528
529pub mod remove_deprecated_request_unit_ix {
530    solana_pubkey::declare_id!("EfhYd3SafzGT472tYQDUc4dPd2xdEfKs5fwkowUgVt4W");
531}
532
533pub mod disable_rehash_for_rent_epoch {
534    solana_pubkey::declare_id!("DTVTkmw3JSofd8CJVJte8PXEbxNQ2yZijvVr3pe2APPj");
535}
536
537pub mod increase_tx_account_lock_limit {
538    solana_pubkey::declare_id!("9LZdXeKGeBV6hRLdxS1rHbHoEUsKqesCC2ZAPTPKJAbK");
539}
540
541pub mod limit_max_instruction_trace_length {
542    solana_pubkey::declare_id!("GQALDaC48fEhZGWRj9iL5Q889emJKcj3aCvHF7VCbbF4");
543}
544
545pub mod check_syscall_outputs_do_not_overlap {
546    solana_pubkey::declare_id!("3uRVPBpyEJRo1emLCrq38eLRFGcu6uKSpUXqGvU8T7SZ");
547}
548
549pub mod enable_bpf_loader_set_authority_checked_ix {
550    solana_pubkey::declare_id!("5x3825XS7M2A3Ekbn5VGGkvFoAg5qrRWkTrY4bARP1GL");
551}
552
553pub mod enable_alt_bn128_syscall {
554    solana_pubkey::declare_id!("A16q37opZdQMCbe5qJ6xpBB9usykfv8jZaMkxvZQi4GJ");
555}
556
557pub mod simplify_alt_bn128_syscall_error_codes {
558    solana_pubkey::declare_id!("JDn5q3GBeqzvUa7z67BbmVHVdE3EbUAjvFep3weR3jxX");
559}
560
561pub mod enable_alt_bn128_compression_syscall {
562    solana_pubkey::declare_id!("EJJewYSddEEtSZHiqugnvhQHiWyZKjkFDQASd7oKSagn");
563}
564
565pub mod fix_alt_bn128_multiplication_input_length {
566    solana_pubkey::declare_id!("bn2puAyxUx6JUabAxYdKdJ5QHbNNmKw8dCGuGCyRrFN");
567}
568
569pub mod enable_program_redeployment_cooldown {
570    solana_pubkey::declare_id!("J4HFT8usBxpcF63y46t1upYobJgChmKyZPm5uTBRg25Z");
571}
572
573pub mod commission_updates_only_allowed_in_first_half_of_epoch {
574    solana_pubkey::declare_id!("noRuG2kzACwgaY7TVmLRnUNPLKNVQE1fb7X55YWBehp");
575}
576
577pub mod enable_turbine_fanout_experiments {
578    solana_pubkey::declare_id!("D31EFnLgdiysi84Woo3of4JMu7VmasUS3Z7j9HYXCeLY");
579}
580
581pub mod disable_turbine_fanout_experiments {
582    solana_pubkey::declare_id!("Gz1aLrbeQ4Q6PTSafCZcGWZXz91yVRi7ASFzFEr1U4sa");
583}
584
585pub mod move_serialized_len_ptr_in_cpi {
586    solana_pubkey::declare_id!("74CoWuBmt3rUVUrCb2JiSTvh6nXyBWUsK4SaMj3CtE3T");
587}
588
589pub mod update_hashes_per_tick {
590    solana_pubkey::declare_id!("3uFHb9oKdGfgZGJK9EHaAXN4USvnQtAFC13Fh5gGFS5B");
591}
592
593pub mod enable_big_mod_exp_syscall {
594    solana_pubkey::declare_id!("EBq48m8irRKuE7ZnMTLvLg2UuGSqhe8s8oMqnmja1fJw");
595}
596
597pub mod disable_builtin_loader_ownership_chains {
598    solana_pubkey::declare_id!("4UDcAfQ6EcA6bdcadkeHpkarkhZGJ7Bpq7wTAiRMjkoi");
599}
600
601pub mod cap_transaction_accounts_data_size {
602    solana_pubkey::declare_id!("DdLwVYuvDz26JohmgSbA7mjpJFgX5zP2dkp8qsF2C33V");
603}
604
605pub mod remove_congestion_multiplier_from_fee_calculation {
606    solana_pubkey::declare_id!("A8xyMHZovGXFkorFqEmVH2PKGLiBip5JD7jt4zsUWo4H");
607}
608
609pub mod enable_request_heap_frame_ix {
610    solana_pubkey::declare_id!("Hr1nUA9b7NJ6eChS26o7Vi8gYYDDwWD3YeBfzJkTbU86");
611}
612
613pub mod prevent_rent_paying_rent_recipients {
614    solana_pubkey::declare_id!("Fab5oP3DmsLYCiQZXdjyqT3ukFFPrsmqhXU4WU1AWVVF");
615}
616
617pub mod delay_visibility_of_program_deployment {
618    solana_pubkey::declare_id!("GmuBvtFb2aHfSfMXpuFeWZGHyDeCLPS79s48fmCWCfM5");
619}
620
621pub mod apply_cost_tracker_during_replay {
622    solana_pubkey::declare_id!("2ry7ygxiYURULZCrypHhveanvP5tzZ4toRwVp89oCNSj");
623}
624pub mod bpf_account_data_direct_mapping {
625    solana_pubkey::declare_id!("AjX3A4Nv2rzUuATEUWLP4rrBaBropyUnHxEvFDj1dKbx");
626}
627
628pub mod add_set_tx_loaded_accounts_data_size_instruction {
629    solana_pubkey::declare_id!("G6vbf1UBok8MWb8m25ex86aoQHeKTzDKzuZADHkShqm6");
630}
631
632pub mod switch_to_new_elf_parser {
633    solana_pubkey::declare_id!("Cdkc8PPTeTNUPoZEfCY5AyetUrEdkZtNPMgz58nqyaHD");
634}
635
636pub mod round_up_heap_size {
637    solana_pubkey::declare_id!("CE2et8pqgyQMP2mQRg3CgvX8nJBKUArMu3wfiQiQKY1y");
638}
639
640pub mod remove_bpf_loader_incorrect_program_id {
641    solana_pubkey::declare_id!("2HmTkCj9tXuPE4ueHzdD7jPeMf9JGCoZh5AsyoATiWEe");
642}
643
644pub mod include_loaded_accounts_data_size_in_fee_calculation {
645    solana_pubkey::declare_id!("EaQpmC6GtRssaZ3PCUM5YksGqUdMLeZ46BQXYtHYakDS");
646}
647
648pub mod native_programs_consume_cu {
649    solana_pubkey::declare_id!("8pgXCMNXC8qyEFypuwpXyRxLXZdpM4Qo72gJ6k87A6wL");
650}
651
652pub mod simplify_writable_program_account_check {
653    solana_pubkey::declare_id!("5ZCcFAzJ1zsFKe1KSZa9K92jhx7gkcKj97ci2DBo1vwj");
654}
655
656pub mod stop_truncating_strings_in_syscalls {
657    solana_pubkey::declare_id!("16FMCmgLzCNNz6eTwGanbyN2ZxvTBSLuQ6DZhgeMshg");
658}
659
660pub mod clean_up_delegation_errors {
661    solana_pubkey::declare_id!("Bj2jmUsM2iRhfdLLDSTkhM5UQRQvQHm57HSmPibPtEyu");
662}
663
664pub mod vote_state_add_vote_latency {
665    solana_pubkey::declare_id!("7axKe5BTYBDD87ftzWbk5DfzWMGyRvqmWTduuo22Yaqy");
666}
667
668pub mod checked_arithmetic_in_fee_validation {
669    solana_pubkey::declare_id!("5Pecy6ie6XGm22pc9d4P9W5c31BugcFBuy6hsP2zkETv");
670}
671
672pub mod last_restart_slot_sysvar {
673    solana_pubkey::declare_id!("HooKD5NC9QNxk25QuzCssB8ecrEzGt6eXEPBUxWp1LaR");
674}
675
676pub mod reduce_stake_warmup_cooldown {
677    solana_pubkey::declare_id!("GwtDQBghCTBgmX2cpEGNPxTEBUTQRaDMGTr5qychdGMj");
678}
679
680pub mod revise_turbine_epoch_stakes {
681    solana_pubkey::declare_id!("BTWmtJC8U5ZLMbBUUA1k6As62sYjPEjAiNAT55xYGdJU");
682}
683
684pub mod enable_poseidon_syscall {
685    solana_pubkey::declare_id!("FL9RsQA6TVUoh5xJQ9d936RHSebA1NLQqe3Zv9sXZRpr");
686}
687
688pub mod timely_vote_credits {
689    solana_pubkey::declare_id!("tvcF6b1TRz353zKuhBjinZkKzjmihXmBAHJdjNYw1sQ");
690}
691
692pub mod remaining_compute_units_syscall_enabled {
693    solana_pubkey::declare_id!("5TuppMutoyzhUSfuYdhgzD47F92GL1g89KpCZQKqedxP");
694}
695
696pub mod enable_loader_v4 {
697    solana_pubkey::declare_id!("8Cb77yHjPWe9wuWUfXeh6iszFGCDGNCoFk3tprViYHNm");
698}
699
700pub mod disable_new_loader_v3_deployments {
701    solana_pubkey::declare_id!("EmhbpdVtZ2hWRGFWBDjn2i3SJD8Z36z4mpMcZJEnebnP");
702}
703
704pub mod require_rent_exempt_split_destination {
705    solana_pubkey::declare_id!("D2aip4BBr8NPWtU9vLrwrBvbuaQ8w1zV38zFLxx4pfBV");
706}
707
708pub mod better_error_codes_for_tx_lamport_check {
709    solana_pubkey::declare_id!("Ffswd3egL3tccB6Rv3XY6oqfdzn913vUcjCSnpvCKpfx");
710}
711
712pub mod update_hashes_per_tick2 {
713    solana_pubkey::declare_id!("EWme9uFqfy1ikK1jhJs8fM5hxWnK336QJpbscNtizkTU");
714}
715
716pub mod update_hashes_per_tick3 {
717    solana_pubkey::declare_id!("8C8MCtsab5SsfammbzvYz65HHauuUYdbY2DZ4sznH6h5");
718}
719
720pub mod update_hashes_per_tick4 {
721    solana_pubkey::declare_id!("8We4E7DPwF2WfAN8tRTtWQNhi98B99Qpuj7JoZ3Aikgg");
722}
723
724pub mod update_hashes_per_tick5 {
725    solana_pubkey::declare_id!("BsKLKAn1WM4HVhPRDsjosmqSg2J8Tq5xP2s2daDS6Ni4");
726}
727
728pub mod update_hashes_per_tick6 {
729    solana_pubkey::declare_id!("FKu1qYwLQSiehz644H6Si65U5ZQ2cp9GxsyFUfYcuADv");
730}
731
732pub mod validate_fee_collector_account {
733    solana_pubkey::declare_id!("prpFrMtgNmzaNzkPJg9o753fVvbHKqNrNTm76foJ2wm");
734}
735
736pub mod disable_rent_fees_collection {
737    solana_pubkey::declare_id!("CJzY83ggJHqPGDq8VisV3U91jDJLuEaALZooBrXtnnLU");
738}
739
740pub mod enable_zk_transfer_with_fee {
741    solana_pubkey::declare_id!("zkNLP7EQALfC1TYeB3biDU7akDckj8iPkvh9y2Mt2K3");
742}
743
744pub mod drop_legacy_shreds {
745    solana_pubkey::declare_id!("GV49KKQdBNaiv2pgqhS2Dy3GWYJGXMTVYbYkdk91orRy");
746}
747
748pub mod allow_commission_decrease_at_any_time {
749    solana_pubkey::declare_id!("decoMktMcnmiq6t3u7g5BfgcQu91nKZr6RvMYf9z1Jb");
750}
751
752pub mod add_new_reserved_account_keys {
753    solana_pubkey::declare_id!("8U4skmMVnF6k2kMvrWbQuRUT3qQSiTYpSjqmhmgfthZu");
754}
755
756pub mod consume_blockstore_duplicate_proofs {
757    solana_pubkey::declare_id!("6YsBCejwK96GZCkJ6mkZ4b68oP63z2PLoQmWjC7ggTqZ");
758}
759
760pub mod index_erasure_conflict_duplicate_proofs {
761    solana_pubkey::declare_id!("dupPajaLy2SSn8ko42aZz4mHANDNrLe8Nw8VQgFecLa");
762}
763
764pub mod merkle_conflict_duplicate_proofs {
765    solana_pubkey::declare_id!("mrkPjRg79B2oK2ZLgd7S3AfEJaX9B6gAF3H9aEykRUS");
766}
767
768pub mod disable_bpf_loader_instructions {
769    solana_pubkey::declare_id!("7WeS1vfPRgeeoXArLh7879YcB9mgE9ktjPDtajXeWfXn");
770}
771
772pub mod enable_zk_proof_from_account {
773    solana_pubkey::declare_id!("zkiTNuzBKxrCLMKehzuQeKZyLtX2yvFcEKMML8nExU8");
774}
775
776pub mod cost_model_requested_write_lock_cost {
777    solana_pubkey::declare_id!("wLckV1a64ngtcKPRGU4S4grVTestXjmNjxBjaKZrAcn");
778}
779
780pub mod enable_gossip_duplicate_proof_ingestion {
781    solana_pubkey::declare_id!("FNKCMBzYUdjhHyPdsKG2LSmdzH8TCHXn3ytj8RNBS4nG");
782}
783
784pub mod chained_merkle_conflict_duplicate_proofs {
785    solana_pubkey::declare_id!("chaie9S2zVfuxJKNRGkyTDokLwWxx6kD2ZLsqQHaDD8");
786}
787
788pub mod enable_chained_merkle_shreds {
789    solana_pubkey::declare_id!("7uZBkJXJ1HkuP6R3MJfZs7mLwymBcDbKdqbF51ZWLier");
790}
791
792pub mod remove_rounding_in_fee_calculation {
793    solana_pubkey::declare_id!("BtVN7YjDzNE6Dk7kTT7YTDgMNUZTNgiSJgsdzAeTg2jF");
794}
795
796pub mod enable_tower_sync_ix {
797    solana_pubkey::declare_id!("tSynMCspg4xFiCj1v3TDb4c7crMR5tSBhLz4sF7rrNA");
798}
799
800pub mod deprecate_unused_legacy_vote_plumbing {
801    solana_pubkey::declare_id!("6Uf8S75PVh91MYgPQSHnjRAPQq6an5BDv9vomrCwDqLe");
802}
803
804pub mod reward_full_priority_fee {
805    solana_pubkey::declare_id!("3opE3EzAKnUftUDURkzMgwpNgimBAypW1mNDYH4x4Zg7");
806}
807
808pub mod get_sysvar_syscall_enabled {
809    solana_pubkey::declare_id!("CLCoTADvV64PSrnR6QXty6Fwrt9Xc6EdxSJE4wLRePjq");
810}
811
812pub mod abort_on_invalid_curve {
813    solana_pubkey::declare_id!("FuS3FPfJDKSNot99ECLXtp3rueq36hMNStJkPJwWodLh");
814}
815
816pub mod migrate_feature_gate_program_to_core_bpf {
817    solana_pubkey::declare_id!("4eohviozzEeivk1y9UbrnekbAFMDQyJz5JjA9Y6gyvky");
818}
819
820pub mod vote_only_full_fec_sets {
821    solana_pubkey::declare_id!("ffecLRhhakKSGhMuc6Fz2Lnfq4uT9q3iu9ZsNaPLxPc");
822}
823
824pub mod migrate_config_program_to_core_bpf {
825    solana_pubkey::declare_id!("2Fr57nzzkLYXW695UdDxDeR5fhnZWSttZeZYemrnpGFV");
826}
827
828pub mod enable_get_epoch_stake_syscall {
829    solana_pubkey::declare_id!("FKe75t4LXxGaQnVHdUKM6DSFifVVraGZ8LyNo7oPwy1Z");
830}
831
832pub mod migrate_address_lookup_table_program_to_core_bpf {
833    solana_pubkey::declare_id!("C97eKZygrkU4JxJsZdjgbUY7iQR7rKTr4NyDWo2E5pRm");
834}
835
836pub mod zk_elgamal_proof_program_enabled {
837    solana_pubkey::declare_id!("zkhiy5oLowR7HY4zogXjCjeMXyruLqBwSWH21qcFtnv");
838}
839
840pub mod verify_retransmitter_signature {
841    solana_pubkey::declare_id!("BZ5g4hRbu5hLQQBdPyo2z9icGyJ8Khiyj3QS6dhWijTb");
842}
843
844pub mod move_stake_and_move_lamports_ixs {
845    solana_pubkey::declare_id!("7bTK6Jis8Xpfrs8ZoUfiMDPazTcdPcTWheZFJTA5Z6X4");
846}
847
848pub mod ed25519_precompile_verify_strict {
849    solana_pubkey::declare_id!("ed9tNscbWLYBooxWA7FE2B5KHWs8A6sxfY8EzezEcoo");
850}
851
852pub mod vote_only_retransmitter_signed_fec_sets {
853    solana_pubkey::declare_id!("RfEcA95xnhuwooVAhUUksEJLZBF7xKCLuqrJoqk4Zph");
854}
855
856pub mod move_precompile_verification_to_svm {
857    solana_pubkey::declare_id!("9ypxGLzkMxi89eDerRKXWDXe44UY2z4hBig4mDhNq5Dp");
858}
859
860pub mod enable_transaction_loading_failure_fees {
861    solana_pubkey::declare_id!("PaymEPK2oqwT9TXAVfadjztH2H6KfLEB9Hhd5Q5frvP");
862}
863
864pub mod enable_turbine_extended_fanout_experiments {
865    solana_pubkey::declare_id!("BZn14Liea52wtBwrXUxTv6vojuTTmfc7XGEDTXrvMD7b");
866}
867
868pub mod deprecate_legacy_vote_ixs {
869    solana_pubkey::declare_id!("depVvnQ2UysGrhwdiwU42tCadZL8GcBb1i2GYhMopQv");
870}
871
872pub mod disable_sbpf_v0_execution {
873    solana_pubkey::declare_id!("TestFeature11111111111111111111111111111111");
874}
875
876pub mod reenable_sbpf_v0_execution {
877    solana_pubkey::declare_id!("TestFeature21111111111111111111111111111111");
878}
879
880pub mod enable_sbpf_v1_deployment_and_execution {
881    solana_pubkey::declare_id!("JE86WkYvTrzW8HgNmrHY7dFYpCmSptUpKupbo2AdQ9cG");
882}
883
884pub mod enable_sbpf_v2_deployment_and_execution {
885    solana_pubkey::declare_id!("F6UVKh1ujTEFK3en2SyAL3cdVnqko1FVEXWhmdLRu6WP");
886}
887
888pub mod enable_sbpf_v3_deployment_and_execution {
889    solana_pubkey::declare_id!("C8XZNs1bfzaiT3YDeXZJ7G5swQWQv7tVzDnCxtHvnSpw");
890}
891
892pub mod remove_accounts_executable_flag_checks {
893    solana_pubkey::declare_id!("FfgtauHUWKeXTzjXkua9Px4tNGBFHKZ9WaigM5VbbzFx");
894}
895
896pub mod lift_cpi_caller_restriction {
897    solana_pubkey::declare_id!("HcW8ZjBezYYgvcbxNJwqv1t484Y2556qJsfNDWvJGZRH");
898}
899
900pub mod disable_account_loader_special_case {
901    solana_pubkey::declare_id!("EQUMpNFr7Nacb1sva56xn1aLfBxppEoSBH8RRVdkcD1x");
902}
903
904pub mod enable_secp256r1_precompile {
905    solana_pubkey::declare_id!("srremy31J5Y25FrAApwVb9kZcfXbusYMMsvTK9aWv5q");
906}
907
908pub mod accounts_lt_hash {
909    solana_pubkey::declare_id!("LtHaSHHsUge7EWTPVrmpuexKz6uVHZXZL6cgJa7W7Zn");
910}
911
912pub mod snapshots_lt_hash {
913    solana_pubkey::declare_id!("LTsNAP8h1voEVVToMNBNqoiNQex4aqfUrbFhRH3mSQ2");
914}
915
916pub mod remove_accounts_delta_hash {
917    solana_pubkey::declare_id!("LTdLt9Ycbyoipz5fLysCi1NnDnASsZfmJLJXts5ZxZz");
918}
919
920pub mod migrate_stake_program_to_core_bpf {
921    solana_pubkey::declare_id!("6M4oQ6eXneVhtLoiAr4yRYQY43eVLjrKbiDZDJc892yk");
922}
923
924pub mod deplete_cu_meter_on_vm_failure {
925    solana_pubkey::declare_id!("B7H2caeia4ZFcpE3QcgMqbiWiBtWrdBRBSJ1DY6Ktxbq");
926}
927
928pub mod reserve_minimal_cus_for_builtin_instructions {
929    solana_pubkey::declare_id!("C9oAhLxDBm3ssWtJx1yBGzPY55r2rArHmN1pbQn6HogH");
930}
931
932pub mod raise_block_limits_to_50m {
933    solana_pubkey::declare_id!("5oMCU3JPaFLr8Zr4ct7yFA7jdk6Mw1RmB8K4u9ZbS42z");
934}
935
936pub mod drop_unchained_merkle_shreds {
937    solana_pubkey::declare_id!("3A9WtMU4aHuryD3VN7SFKdfXto8HStLb1Jj6HjkgfnGL");
938}
939
940pub mod relax_intrabatch_account_locks {
941    solana_pubkey::declare_id!("EbAhnReKK8Sf88CvAfAXbgKji8DV48rsp4q2sgHqgWef");
942}
943
944pub mod create_slashing_program {
945    solana_pubkey::declare_id!("sProgVaNWkYdP2eTRAy1CPrgb3b9p8yXCASrPEqo6VJ");
946}
947
948pub mod disable_partitioned_rent_collection {
949    solana_pubkey::declare_id!("2B2SBNbUcr438LtGXNcJNBP2GBSxjx81F945SdSkUSfC");
950}
951
952pub mod enable_vote_address_leader_schedule {
953    solana_pubkey::declare_id!("5JsG4NWH8Jbrqdd8uL6BNwnyZK3dQSoieRXG5vmofj9y");
954}
955
956lazy_static! {
957    /// Map of feature identifiers to user-visible description
958    pub static ref FEATURE_NAMES: AHashMap<Pubkey, &'static str> = [
959        (secp256k1_program_enabled::id(), "secp256k1 program"),
960        (deprecate_rewards_sysvar::id(), "deprecate unused rewards sysvar"),
961        (pico_inflation::id(), "pico inflation"),
962        (full_inflation::devnet_and_testnet::id(), "full inflation on devnet and testnet"),
963        (spl_token_v2_multisig_fix::id(), "spl-token multisig fix"),
964        (no_overflow_rent_distribution::id(), "no overflow rent distribution"),
965        (filter_stake_delegation_accounts::id(), "filter stake_delegation_accounts #14062"),
966        (require_custodian_for_locked_stake_authorize::id(), "require custodian to authorize withdrawer change for locked stake"),
967        (spl_token_v2_self_transfer_fix::id(), "spl-token self-transfer fix"),
968        (full_inflation::mainnet::certusone::enable::id(), "full inflation enabled by Certus One"),
969        (full_inflation::mainnet::certusone::vote::id(), "community vote allowing Certus One to enable full inflation"),
970        (warp_timestamp_again::id(), "warp timestamp again, adjust bounding to 25% fast 80% slow #15204"),
971        (check_init_vote_data::id(), "check initialized Vote data"),
972        (secp256k1_recover_syscall_enabled::id(), "secp256k1_recover syscall"),
973        (system_transfer_zero_check::id(), "perform all checks for transfers of 0 lamports"),
974        (blake3_syscall_enabled::id(), "blake3 syscall"),
975        (dedupe_config_program_signers::id(), "dedupe config program signers"),
976        (verify_tx_signatures_len::id(), "prohibit extra transaction signatures"),
977        (vote_stake_checked_instructions::id(), "vote/state program checked instructions #18345"),
978        (rent_for_sysvars::id(), "collect rent from accounts owned by sysvars"),
979        (libsecp256k1_0_5_upgrade_enabled::id(), "upgrade libsecp256k1 to v0.5.0"),
980        (tx_wide_compute_cap::id(), "transaction wide compute cap"),
981        (spl_token_v2_set_authority_fix::id(), "spl-token set_authority fix"),
982        (merge_nonce_error_into_system_error::id(), "merge NonceError into SystemError"),
983        (disable_fees_sysvar::id(), "disable fees sysvar"),
984        (stake_merge_with_unmatched_credits_observed::id(), "allow merging active stakes with unmatched credits_observed #18985"),
985        (zk_token_sdk_enabled::id(), "enable Zk Token proof program and syscalls"),
986        (curve25519_syscall_enabled::id(), "enable curve25519 syscalls"),
987        (versioned_tx_message_enabled::id(), "enable versioned transaction message processing"),
988        (libsecp256k1_fail_on_bad_count::id(), "fail libsecp256k1_verify if count appears wrong"),
989        (libsecp256k1_fail_on_bad_count2::id(), "fail libsecp256k1_verify if count appears wrong"),
990        (instructions_sysvar_owned_by_sysvar::id(), "fix owner for instructions sysvar"),
991        (stake_program_advance_activating_credits_observed::id(), "Enable advancing credits observed for activation epoch #19309"),
992        (credits_auto_rewind::id(), "Auto rewind stake's credits_observed if (accidental) vote recreation is detected #22546"),
993        (demote_program_write_locks::id(), "demote program write locks to readonly, except when upgradeable loader present #19593 #20265"),
994        (ed25519_program_enabled::id(), "enable builtin ed25519 signature verify program"),
995        (return_data_syscall_enabled::id(), "enable sol_{set,get}_return_data syscall"),
996        (reduce_required_deploy_balance::id(), "reduce required payer balance for program deploys"),
997        (sol_log_data_syscall_enabled::id(), "enable sol_log_data syscall"),
998        (stakes_remove_delegation_if_inactive::id(), "remove delegations from stakes cache when inactive"),
999        (do_support_realloc::id(), "support account data reallocation"),
1000        (prevent_calling_precompiles_as_programs::id(), "prevent calling precompiles as programs"),
1001        (optimize_epoch_boundary_updates::id(), "optimize epoch boundary updates"),
1002        (remove_native_loader::id(), "remove support for the native loader"),
1003        (send_to_tpu_vote_port::id(), "send votes to the tpu vote port"),
1004        (requestable_heap_size::id(), "Requestable heap frame size"),
1005        (disable_fee_calculator::id(), "deprecate fee calculator"),
1006        (add_compute_budget_program::id(), "Add compute_budget_program"),
1007        (nonce_must_be_writable::id(), "nonce must be writable"),
1008        (spl_token_v3_3_0_release::id(), "spl-token v3.3.0 release"),
1009        (leave_nonce_on_success::id(), "leave nonce as is on success"),
1010        (reject_empty_instruction_without_program::id(), "fail instructions which have native_loader as program_id directly"),
1011        (fixed_memcpy_nonoverlapping_check::id(), "use correct check for nonoverlapping regions in memcpy syscall"),
1012        (reject_non_rent_exempt_vote_withdraws::id(), "fail vote withdraw instructions which leave the account non-rent-exempt"),
1013        (evict_invalid_stakes_cache_entries::id(), "evict invalid stakes cache entries on epoch boundaries"),
1014        (allow_votes_to_directly_update_vote_state::id(), "enable direct vote state update"),
1015        (max_tx_account_locks::id(), "enforce max number of locked accounts per transaction"),
1016        (require_rent_exempt_accounts::id(), "require all new transaction accounts with data to be rent-exempt"),
1017        (filter_votes_outside_slot_hashes::id(), "filter vote slots older than the slot hashes history"),
1018        (update_syscall_base_costs::id(), "update syscall base costs"),
1019        (stake_deactivate_delinquent_instruction::id(), "enable the deactivate delinquent stake instruction #23932"),
1020        (vote_withdraw_authority_may_change_authorized_voter::id(), "vote account withdraw authority may change the authorized voter #22521"),
1021        (spl_associated_token_account_v1_0_4::id(), "SPL Associated Token Account Program release version 1.0.4, tied to token 3.3.0 #22648"),
1022        (reject_vote_account_close_unless_zero_credit_epoch::id(), "fail vote account withdraw to 0 unless account earned 0 credits in last completed epoch"),
1023        (add_get_processed_sibling_instruction_syscall::id(), "add add_get_processed_sibling_instruction_syscall"),
1024        (bank_transaction_count_fix::id(), "fixes Bank::transaction_count to include all committed transactions, not just successful ones"),
1025        (disable_bpf_deprecated_load_instructions::id(), "disable ldabs* and ldind* SBF instructions"),
1026        (disable_bpf_unresolved_symbols_at_runtime::id(), "disable reporting of unresolved SBF symbols at runtime"),
1027        (record_instruction_in_transaction_context_push::id(), "move the CPI stack overflow check to the end of push"),
1028        (syscall_saturated_math::id(), "syscalls use saturated math"),
1029        (check_physical_overlapping::id(), "check physical overlapping regions"),
1030        (limit_secp256k1_recovery_id::id(), "limit secp256k1 recovery id"),
1031        (disable_deprecated_loader::id(), "disable the deprecated BPF loader"),
1032        (check_slice_translation_size::id(), "check size when translating slices"),
1033        (stake_split_uses_rent_sysvar::id(), "stake split instruction uses rent sysvar"),
1034        (add_get_minimum_delegation_instruction_to_stake_program::id(), "add GetMinimumDelegation instruction to stake program"),
1035        (error_on_syscall_bpf_function_hash_collisions::id(), "error on bpf function hash collisions"),
1036        (reject_callx_r10::id(), "Reject bpf callx r10 instructions"),
1037        (drop_redundant_turbine_path::id(), "drop redundant turbine path"),
1038        (executables_incur_cpi_data_cost::id(), "Executables incur CPI data costs"),
1039        (fix_recent_blockhashes::id(), "stop adding hashes for skipped slots to recent blockhashes"),
1040        (update_rewards_from_cached_accounts::id(), "update rewards from cached accounts"),
1041        (enable_partitioned_epoch_reward::id(), "enable partitioned rewards at epoch boundary #32166"),
1042        (spl_token_v3_4_0::id(), "SPL Token Program version 3.4.0 release #24740"),
1043        (spl_associated_token_account_v1_1_0::id(), "SPL Associated Token Account Program version 1.1.0 release #24741"),
1044        (default_units_per_instruction::id(), "Default max tx-wide compute units calculated per instruction"),
1045        (stake_allow_zero_undelegated_amount::id(), "Allow zero-lamport undelegated amount for initialized stakes #24670"),
1046        (require_static_program_ids_in_transaction::id(), "require static program ids in versioned transactions"),
1047        (stake_raise_minimum_delegation_to_1_sol::id(), "Raise minimum stake delegation to 1.0 SOL #24357"),
1048        (stake_minimum_delegation_for_rewards::id(), "stakes must be at least the minimum delegation to earn rewards"),
1049        (add_set_compute_unit_price_ix::id(), "add compute budget ix for setting a compute unit price"),
1050        (disable_deploy_of_alloc_free_syscall::id(), "disable new deployments of deprecated sol_alloc_free_ syscall"),
1051        (include_account_index_in_rent_error::id(), "include account index in rent tx error #25190"),
1052        (add_shred_type_to_shred_seed::id(), "add shred-type to shred seed #25556"),
1053        (warp_timestamp_with_a_vengeance::id(), "warp timestamp again, adjust bounding to 150% slow #25666"),
1054        (separate_nonce_from_blockhash::id(), "separate durable nonce and blockhash domains #25744"),
1055        (enable_durable_nonce::id(), "enable durable nonce #25744"),
1056        (vote_state_update_credit_per_dequeue::id(), "Calculate vote credits for VoteStateUpdate per vote dequeue to match credit awards for Vote instruction"),
1057        (quick_bail_on_panic::id(), "quick bail on panic"),
1058        (nonce_must_be_authorized::id(), "nonce must be authorized"),
1059        (nonce_must_be_advanceable::id(), "durable nonces must be advanceable"),
1060        (vote_authorize_with_seed::id(), "An instruction you can use to change a vote accounts authority when the current authority is a derived key #25860"),
1061        (preserve_rent_epoch_for_rent_exempt_accounts::id(), "preserve rent epoch for rent exempt accounts #26479"),
1062        (enable_bpf_loader_extend_program_ix::id(), "enable bpf upgradeable loader ExtendProgram instruction #25234"),
1063        (skip_rent_rewrites::id(), "skip rewriting rent exempt accounts during rent collection #26491"),
1064        (enable_early_verification_of_account_modifications::id(), "enable early verification of account modifications #25899"),
1065        (disable_rehash_for_rent_epoch::id(), "on accounts hash calculation, do not try to rehash accounts #28934"),
1066        (account_hash_ignore_slot::id(), "ignore slot when calculating an account hash #28420"),
1067        (set_exempt_rent_epoch_max::id(), "set rent epoch to Epoch::MAX for rent-exempt accounts #28683"),
1068        (on_load_preserve_rent_epoch_for_rent_exempt_accounts::id(), "on bank load account, do not try to fix up rent_epoch #28541"),
1069        (prevent_crediting_accounts_that_end_rent_paying::id(), "prevent crediting rent paying accounts #26606"),
1070        (cap_bpf_program_instruction_accounts::id(), "enforce max number of accounts per bpf program instruction #26628"),
1071        (loosen_cpi_size_restriction::id(), "loosen cpi size restrictions #26641"),
1072        (use_default_units_in_fee_calculation::id(), "use default units per instruction in fee calculation #26785"),
1073        (compact_vote_state_updates::id(), "Compact vote state updates to lower block size"),
1074        (incremental_snapshot_only_incremental_hash_calculation::id(), "only hash accounts in incremental snapshot during incremental snapshot creation #26799"),
1075        (disable_cpi_setting_executable_and_rent_epoch::id(), "disable setting is_executable and_rent_epoch in CPI #26987"),
1076        (relax_authority_signer_check_for_lookup_table_creation::id(), "relax authority signer check for lookup table creation #27205"),
1077        (stop_sibling_instruction_search_at_parent::id(), "stop the search in get_processed_sibling_instruction when the parent instruction is reached #27289"),
1078        (vote_state_update_root_fix::id(), "fix root in vote state updates #27361"),
1079        (cap_accounts_data_allocations_per_transaction::id(), "cap accounts data allocations per transaction #27375"),
1080        (epoch_accounts_hash::id(), "enable epoch accounts hash calculation #27539"),
1081        (remove_deprecated_request_unit_ix::id(), "remove support for RequestUnitsDeprecated instruction #27500"),
1082        (increase_tx_account_lock_limit::id(), "increase tx account lock limit to 128 #27241"),
1083        (limit_max_instruction_trace_length::id(), "limit max instruction trace length #27939"),
1084        (check_syscall_outputs_do_not_overlap::id(), "check syscall outputs do_not overlap #28600"),
1085        (enable_bpf_loader_set_authority_checked_ix::id(), "enable bpf upgradeable loader SetAuthorityChecked instruction #28424"),
1086        (enable_alt_bn128_syscall::id(), "add alt_bn128 syscalls #27961"),
1087        (simplify_alt_bn128_syscall_error_codes::id(), "simplify alt_bn128 syscall error codes SIMD-0129"),
1088        (enable_program_redeployment_cooldown::id(), "enable program redeployment cooldown #29135"),
1089        (commission_updates_only_allowed_in_first_half_of_epoch::id(), "validator commission updates are only allowed in the first half of an epoch #29362"),
1090        (enable_turbine_fanout_experiments::id(), "enable turbine fanout experiments #29393"),
1091        (disable_turbine_fanout_experiments::id(), "disable turbine fanout experiments #29393"),
1092        (move_serialized_len_ptr_in_cpi::id(), "cpi ignore serialized_len_ptr #29592"),
1093        (update_hashes_per_tick::id(), "Update desired hashes per tick on epoch boundary"),
1094        (enable_big_mod_exp_syscall::id(), "add big_mod_exp syscall #28503"),
1095        (disable_builtin_loader_ownership_chains::id(), "disable builtin loader ownership chains #29956"),
1096        (cap_transaction_accounts_data_size::id(), "cap transaction accounts data size up to a limit #27839"),
1097        (remove_congestion_multiplier_from_fee_calculation::id(), "Remove congestion multiplier from transaction fee calculation #29881"),
1098        (enable_request_heap_frame_ix::id(), "Enable transaction to request heap frame using compute budget instruction #30076"),
1099        (prevent_rent_paying_rent_recipients::id(), "prevent recipients of rent rewards from ending in rent-paying state #30151"),
1100        (delay_visibility_of_program_deployment::id(), "delay visibility of program upgrades #30085"),
1101        (apply_cost_tracker_during_replay::id(), "apply cost tracker to blocks during replay #29595"),
1102        (add_set_tx_loaded_accounts_data_size_instruction::id(), "add compute budget instruction for setting account data size per transaction #30366"),
1103        (switch_to_new_elf_parser::id(), "switch to new ELF parser #30497"),
1104        (round_up_heap_size::id(), "round up heap size when calculating heap cost #30679"),
1105        (remove_bpf_loader_incorrect_program_id::id(), "stop incorrectly throwing IncorrectProgramId in bpf_loader #30747"),
1106        (include_loaded_accounts_data_size_in_fee_calculation::id(), "include transaction loaded accounts data size in base fee calculation #30657"),
1107        (native_programs_consume_cu::id(), "Native program should consume compute units #30620"),
1108        (simplify_writable_program_account_check::id(), "Simplify checks performed for writable upgradeable program accounts #30559"),
1109        (stop_truncating_strings_in_syscalls::id(), "Stop truncating strings in syscalls #31029"),
1110        (clean_up_delegation_errors::id(), "Return InsufficientDelegation instead of InsufficientFunds or InsufficientStake where applicable #31206"),
1111        (vote_state_add_vote_latency::id(), "replace Lockout with LandedVote (including vote latency) in vote state #31264"),
1112        (checked_arithmetic_in_fee_validation::id(), "checked arithmetic in fee validation #31273"),
1113        (bpf_account_data_direct_mapping::id(), "use memory regions to map account data into the rbpf vm instead of copying the data"),
1114        (last_restart_slot_sysvar::id(), "enable new sysvar last_restart_slot"),
1115        (reduce_stake_warmup_cooldown::id(), "reduce stake warmup cooldown from 25% to 9%"),
1116        (revise_turbine_epoch_stakes::id(), "revise turbine epoch stakes"),
1117        (enable_poseidon_syscall::id(), "Enable Poseidon syscall"),
1118        (timely_vote_credits::id(), "use timeliness of votes in determining credits to award"),
1119        (remaining_compute_units_syscall_enabled::id(), "enable the remaining_compute_units syscall"),
1120        (enable_loader_v4::id(), "Enable Loader-v4 SIMD-0167"),
1121        (disable_new_loader_v3_deployments::id(), "Disable new loader-v3 deployments SIMD-0167"),
1122        (require_rent_exempt_split_destination::id(), "Require stake split destination account to be rent exempt"),
1123        (better_error_codes_for_tx_lamport_check::id(), "better error codes for tx lamport check #33353"),
1124        (enable_alt_bn128_compression_syscall::id(), "add alt_bn128 compression syscalls"),
1125        (update_hashes_per_tick2::id(), "Update desired hashes per tick to 2.8M"),
1126        (update_hashes_per_tick3::id(), "Update desired hashes per tick to 4.4M"),
1127        (update_hashes_per_tick4::id(), "Update desired hashes per tick to 7.6M"),
1128        (update_hashes_per_tick5::id(), "Update desired hashes per tick to 9.2M"),
1129        (update_hashes_per_tick6::id(), "Update desired hashes per tick to 10M"),
1130        (validate_fee_collector_account::id(), "validate fee collector account #33888"),
1131        (disable_rent_fees_collection::id(), "Disable rent fees collection #33945"),
1132        (enable_zk_transfer_with_fee::id(), "enable Zk Token proof program transfer with fee"),
1133        (drop_legacy_shreds::id(), "drops legacy shreds #34328"),
1134        (allow_commission_decrease_at_any_time::id(), "Allow commission decrease at any time in epoch #33843"),
1135        (consume_blockstore_duplicate_proofs::id(), "consume duplicate proofs from blockstore in consensus #34372"),
1136        (add_new_reserved_account_keys::id(), "add new unwritable reserved accounts #34899"),
1137        (index_erasure_conflict_duplicate_proofs::id(), "generate duplicate proofs for index and erasure conflicts #34360"),
1138        (merkle_conflict_duplicate_proofs::id(), "generate duplicate proofs for merkle root conflicts #34270"),
1139        (disable_bpf_loader_instructions::id(), "disable bpf loader management instructions #34194"),
1140        (enable_zk_proof_from_account::id(), "Enable zk token proof program to read proof from accounts instead of instruction data #34750"),
1141        (curve25519_restrict_msm_length::id(), "restrict curve25519 multiscalar multiplication vector lengths #34763"),
1142        (cost_model_requested_write_lock_cost::id(), "cost model uses number of requested write locks #34819"),
1143        (enable_gossip_duplicate_proof_ingestion::id(), "enable gossip duplicate proof ingestion #32963"),
1144        (enable_chained_merkle_shreds::id(), "Enable chained Merkle shreds #34916"),
1145        (remove_rounding_in_fee_calculation::id(), "Removing unwanted rounding in fee calculation #34982"),
1146        (deprecate_unused_legacy_vote_plumbing::id(), "Deprecate unused legacy vote tx plumbing"),
1147        (enable_tower_sync_ix::id(), "Enable tower sync vote instruction"),
1148        (chained_merkle_conflict_duplicate_proofs::id(), "generate duplicate proofs for chained merkle root conflicts"),
1149        (reward_full_priority_fee::id(), "Reward full priority fee to validators #34731"),
1150        (abort_on_invalid_curve::id(), "Abort when elliptic curve syscalls invoked on invalid curve id SIMD-0137"),
1151        (get_sysvar_syscall_enabled::id(), "Enable syscall for fetching Sysvar bytes #615"),
1152        (migrate_feature_gate_program_to_core_bpf::id(), "Migrate Feature Gate program to Core BPF (programify) #1003"),
1153        (vote_only_full_fec_sets::id(), "vote only full fec sets"),
1154        (migrate_config_program_to_core_bpf::id(), "Migrate Config program to Core BPF #1378"),
1155        (enable_get_epoch_stake_syscall::id(), "Enable syscall: sol_get_epoch_stake #884"),
1156        (migrate_address_lookup_table_program_to_core_bpf::id(), "Migrate Address Lookup Table program to Core BPF #1651"),
1157        (zk_elgamal_proof_program_enabled::id(), "Enable ZkElGamalProof program SIMD-0153"),
1158        (verify_retransmitter_signature::id(), "Verify retransmitter signature #1840"),
1159        (move_stake_and_move_lamports_ixs::id(), "Enable MoveStake and MoveLamports stake program instructions #1610"),
1160        (ed25519_precompile_verify_strict::id(), "Use strict verification in ed25519 precompile SIMD-0152"),
1161        (vote_only_retransmitter_signed_fec_sets::id(), "vote only on retransmitter signed fec sets"),
1162        (move_precompile_verification_to_svm::id(), "SIMD-0159: Move precompile verification into SVM"),
1163        (enable_transaction_loading_failure_fees::id(), "Enable fees for some additional transaction failures SIMD-0082"),
1164        (enable_turbine_extended_fanout_experiments::id(), "enable turbine extended fanout experiments #"),
1165        (deprecate_legacy_vote_ixs::id(), "Deprecate legacy vote instructions"),
1166        (partitioned_epoch_rewards_superfeature::id(), "replaces enable_partitioned_epoch_reward to enable partitioned rewards at epoch boundary SIMD-0118"),
1167        (disable_sbpf_v0_execution::id(), "Disables execution of SBPFv1 programs SIMD-0161"),
1168        (reenable_sbpf_v0_execution::id(), "Re-enables execution of SBPFv1 programs"),
1169        (enable_sbpf_v1_deployment_and_execution::id(), "Enables deployment and execution of SBPFv1 programs SIMD-0161"),
1170        (enable_sbpf_v2_deployment_and_execution::id(), "Enables deployment and execution of SBPFv2 programs SIMD-0161"),
1171        (enable_sbpf_v3_deployment_and_execution::id(), "Enables deployment and execution of SBPFv3 programs SIMD-0161"),
1172        (remove_accounts_executable_flag_checks::id(), "Remove checks of accounts is_executable flag SIMD-0162"),
1173        (lift_cpi_caller_restriction::id(), "Lift the restriction in CPI that the caller must have the callee as an instruction account #2202"),
1174        (disable_account_loader_special_case::id(), "Disable account loader special case #3513"),
1175        (accounts_lt_hash::id(), "enables lattice-based accounts hash SIMD-0215"),
1176        (snapshots_lt_hash::id(), "snapshots use lattice-based accounts hash SIMD-0220"),
1177        (remove_accounts_delta_hash::id(), "removes accounts delta hash SIMD-0223"),
1178        (enable_secp256r1_precompile::id(), "Enable secp256r1 precompile SIMD-0075"),
1179        (migrate_stake_program_to_core_bpf::id(), "Migrate Stake program to Core BPF SIMD-0196 #3655"),
1180        (deplete_cu_meter_on_vm_failure::id(), "Deplete compute meter for vm errors SIMD-0182 #3993"),
1181        (reserve_minimal_cus_for_builtin_instructions::id(), "Reserve minimal CUs for builtin instructions SIMD-170 #2562"),
1182        (raise_block_limits_to_50m::id(), "Raise block limit to 50M SIMD-0207"),
1183        (fix_alt_bn128_multiplication_input_length::id(), "fix alt_bn128 multiplication input length SIMD-0222 #3686"),
1184        (drop_unchained_merkle_shreds::id(), "drops unchained Merkle shreds #2149"),
1185        (relax_intrabatch_account_locks::id(), "Allow batched transactions to read/write and write/write the same accounts SIMD-0083"),
1186        (create_slashing_program::id(), "creates an enshrined slashing program SIMD-0204"),
1187        (disable_partitioned_rent_collection::id(), "Disable partitioned rent collection SIMD-0175 #4562"),
1188        (enable_vote_address_leader_schedule::id(), "Enable vote address leader schedule SIMD-0180 #4573"),
1189        /*************** ADD NEW FEATURES HERE ***************/
1190    ]
1191    .iter()
1192    .cloned()
1193    .collect();
1194
1195    /// Unique identifier of the current software's feature set
1196    pub static ref ID: Hash = {
1197        let mut hasher = Hasher::default();
1198        let mut feature_ids = FEATURE_NAMES.keys().collect::<Vec<_>>();
1199        feature_ids.sort();
1200        for feature in feature_ids {
1201            hasher.hash(feature.as_ref());
1202        }
1203        hasher.result()
1204    };
1205}
1206
1207#[derive(Clone, PartialEq, Eq, Hash)]
1208pub struct FullInflationFeaturePair {
1209    pub vote_id: Pubkey, // Feature that grants the candidate the ability to enable full inflation
1210    pub enable_id: Pubkey, // Feature to enable full inflation by the candidate
1211}
1212
1213lazy_static! {
1214    /// Set of feature pairs that once enabled will trigger full inflation
1215    pub static ref FULL_INFLATION_FEATURE_PAIRS: AHashSet<FullInflationFeaturePair> = [
1216        FullInflationFeaturePair {
1217            vote_id: full_inflation::mainnet::certusone::vote::id(),
1218            enable_id: full_inflation::mainnet::certusone::enable::id(),
1219        },
1220    ]
1221    .iter()
1222    .cloned()
1223    .collect();
1224}
1225
1226/// `FeatureSet` holds the set of currently active/inactive runtime features
1227#[cfg_attr(feature = "frozen-abi", derive(solana_frozen_abi_macro::AbiExample))]
1228#[derive(Debug, Clone, Eq, PartialEq)]
1229pub struct FeatureSet {
1230    pub active: AHashMap<Pubkey, u64>,
1231    pub inactive: AHashSet<Pubkey>,
1232}
1233impl Default for FeatureSet {
1234    fn default() -> Self {
1235        // All features disabled
1236        Self {
1237            active: AHashMap::new(),
1238            inactive: FEATURE_NAMES.keys().cloned().collect(),
1239        }
1240    }
1241}
1242impl FeatureSet {
1243    pub fn is_active(&self, feature_id: &Pubkey) -> bool {
1244        self.active.contains_key(feature_id)
1245    }
1246
1247    pub fn activated_slot(&self, feature_id: &Pubkey) -> Option<u64> {
1248        self.active.get(feature_id).copied()
1249    }
1250
1251    /// List of enabled features that trigger full inflation
1252    pub fn full_inflation_features_enabled(&self) -> AHashSet<Pubkey> {
1253        let mut hash_set = FULL_INFLATION_FEATURE_PAIRS
1254            .iter()
1255            .filter_map(|pair| {
1256                if self.is_active(&pair.vote_id) && self.is_active(&pair.enable_id) {
1257                    Some(pair.enable_id)
1258                } else {
1259                    None
1260                }
1261            })
1262            .collect::<AHashSet<_>>();
1263
1264        if self.is_active(&full_inflation::devnet_and_testnet::id()) {
1265            hash_set.insert(full_inflation::devnet_and_testnet::id());
1266        }
1267        hash_set
1268    }
1269
1270    /// All features enabled, useful for testing
1271    pub fn all_enabled() -> Self {
1272        Self {
1273            active: FEATURE_NAMES.keys().cloned().map(|key| (key, 0)).collect(),
1274            inactive: AHashSet::new(),
1275        }
1276    }
1277
1278    /// Activate a feature
1279    pub fn activate(&mut self, feature_id: &Pubkey, slot: u64) {
1280        self.inactive.remove(feature_id);
1281        self.active.insert(*feature_id, slot);
1282    }
1283
1284    /// Deactivate a feature
1285    pub fn deactivate(&mut self, feature_id: &Pubkey) {
1286        self.active.remove(feature_id);
1287        self.inactive.insert(*feature_id);
1288    }
1289
1290    pub fn new_warmup_cooldown_rate_epoch(&self, epoch_schedule: &EpochSchedule) -> Option<u64> {
1291        self.activated_slot(&reduce_stake_warmup_cooldown::id())
1292            .map(|slot| epoch_schedule.get_epoch(slot))
1293    }
1294}
1295
1296#[cfg(test)]
1297mod test {
1298    use super::*;
1299
1300    #[test]
1301    fn test_full_inflation_features_enabled_devnet_and_testnet() {
1302        let mut feature_set = FeatureSet::default();
1303        assert!(feature_set.full_inflation_features_enabled().is_empty());
1304        feature_set
1305            .active
1306            .insert(full_inflation::devnet_and_testnet::id(), 42);
1307        assert_eq!(
1308            feature_set.full_inflation_features_enabled(),
1309            [full_inflation::devnet_and_testnet::id()]
1310                .iter()
1311                .cloned()
1312                .collect()
1313        );
1314    }
1315
1316    #[test]
1317    fn test_full_inflation_features_enabled() {
1318        // Normal sequence: vote_id then enable_id
1319        let mut feature_set = FeatureSet::default();
1320        assert!(feature_set.full_inflation_features_enabled().is_empty());
1321        feature_set
1322            .active
1323            .insert(full_inflation::mainnet::certusone::vote::id(), 42);
1324        assert!(feature_set.full_inflation_features_enabled().is_empty());
1325        feature_set
1326            .active
1327            .insert(full_inflation::mainnet::certusone::enable::id(), 42);
1328        assert_eq!(
1329            feature_set.full_inflation_features_enabled(),
1330            [full_inflation::mainnet::certusone::enable::id()]
1331                .iter()
1332                .cloned()
1333                .collect()
1334        );
1335
1336        // Backwards sequence: enable_id and then vote_id
1337        let mut feature_set = FeatureSet::default();
1338        assert!(feature_set.full_inflation_features_enabled().is_empty());
1339        feature_set
1340            .active
1341            .insert(full_inflation::mainnet::certusone::enable::id(), 42);
1342        assert!(feature_set.full_inflation_features_enabled().is_empty());
1343        feature_set
1344            .active
1345            .insert(full_inflation::mainnet::certusone::vote::id(), 42);
1346        assert_eq!(
1347            feature_set.full_inflation_features_enabled(),
1348            [full_inflation::mainnet::certusone::enable::id()]
1349                .iter()
1350                .cloned()
1351                .collect()
1352        );
1353    }
1354
1355    #[test]
1356    fn test_feature_set_activate_deactivate() {
1357        let mut feature_set = FeatureSet::default();
1358
1359        let feature = Pubkey::new_unique();
1360        assert!(!feature_set.is_active(&feature));
1361        feature_set.activate(&feature, 0);
1362        assert!(feature_set.is_active(&feature));
1363        feature_set.deactivate(&feature);
1364        assert!(!feature_set.is_active(&feature));
1365    }
1366}