trezoa_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 Trezoa 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://tpl.trezoa.xyz/feature-proposal#feature-proposal-life-cycle>
9//!
10//! 1. Generate a new keypair with `trezoa-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//!    `trezoa_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 trezoa-feature-set instead")]
22
23use {
24    ahash::{AHashMap, AHashSet},
25    lazy_static::lazy_static,
26    trezoa_epoch_schedule::EpochSchedule,
27    trezoa_hash::Hash,
28    trezoa_pubkey::Pubkey,
29    trezoa_sha256_hasher::Hasher,
30};
31
32pub mod deprecate_rewards_sysvar {
33    trezoa_pubkey::declare_id!("HsaeUom4UuxCDdacurd1L6hiqSmb6xMTHUs4oRBeohPa");
34}
35
36pub mod pico_inflation {
37    trezoa_pubkey::declare_id!("6zEwosL7Eo75AbYqNb12nEWuK8KuNgvSQ1xPQzZHh734");
38}
39
40pub mod full_inflation {
41    pub mod devnet_and_testnet {
42        trezoa_pubkey::declare_id!("AME41R2sKytfRyy68CMGnrpNKC7zQ2o8WYukyjnBnCzo");
43    }
44
45    pub mod mainnet {
46        pub mod certusone {
47            pub mod vote {
48                trezoa_pubkey::declare_id!("Aya35EN6wXVV8mMVDuGdJvfJornfTYmYZruYn78uzz6");
49            }
50            pub mod enable {
51                trezoa_pubkey::declare_id!("56ocpWEY9F1WuPySM2AGBViGdYkRND6FFzaPoqSgAzvp");
52            }
53        }
54    }
55}
56
57pub mod secp256k1_program_enabled {
58    trezoa_pubkey::declare_id!("8hbcjERBvydRFFULZtjFi2awzhBYo1stdh6w68CAMid3");
59}
60
61pub mod tpl_token_v2_multisig_fix {
62    trezoa_pubkey::declare_id!("7Du9vEjTYXA7BR3rNouG62YcCXwaahAEWgfnetjkY86X");
63}
64
65pub mod no_overflow_rent_distribution {
66    trezoa_pubkey::declare_id!("2GEjYctbyvX6VCqUNvQ8bENpTdXiXvRna16ZYsj5EZfK");
67}
68
69pub mod filter_stake_delegation_accounts {
70    trezoa_pubkey::declare_id!("F3cJ2uPXXNTGzpY6xMhYC92NsjVYqYPAtEJ978KK1p69");
71}
72
73pub mod require_custodian_for_locked_stake_authorize {
74    trezoa_pubkey::declare_id!("HNSp9tZx8Ctkq2bjfmc8bkQJHbFJYmLTR6Y5en8k45MJ");
75}
76
77pub mod tpl_token_v2_self_transfer_fix {
78    trezoa_pubkey::declare_id!("2KeGaSe23Cj6v3zVW3mhjLs4bL8CMgHKEoABv4f474ZM");
79}
80
81pub mod warp_timestamp_again {
82    trezoa_pubkey::declare_id!("4qxWL62Wyx4CaiSJzNNxdaEwFRiKN2JieosYwT1iCxAy");
83}
84
85pub mod check_init_vote_data {
86    trezoa_pubkey::declare_id!("9tQP9gtmjVwGiUh56NJdoySgywUucmZAF84phkEWVWDv");
87}
88
89pub mod secp256k1_recover_syscall_enabled {
90    trezoa_pubkey::declare_id!("7jZyvu4pnsiFLvHKoeUDE3naxYC4fCorPineBdK48x8a");
91}
92
93pub mod system_transfer_zero_check {
94    trezoa_pubkey::declare_id!("5ubeMqcn7nsUQGTGW7cj9TxmJ8ReJNNjgBBAk4d9Aezs");
95}
96
97pub mod blake3_syscall_enabled {
98    trezoa_pubkey::declare_id!("4YyaXeTpko6DnYomSMPRRC2mp9AtuCcR1QZZvYo93dV6");
99}
100
101pub mod dedupe_config_program_signers {
102    trezoa_pubkey::declare_id!("8Pb9s6wuHykE3rYBJsMj3L9WV2DF9MRBiTfHGSkznQxN");
103}
104
105pub mod verify_tx_signatures_len {
106    trezoa_pubkey::declare_id!("DLdzJr9EeYTbc2WzX4qgD9JTwDgPMgz1Ei9VGSsjXhkb");
107}
108
109pub mod vote_stake_checked_instructions {
110    trezoa_pubkey::declare_id!("J4CM2zubT4uvtFqdazL8PoLCkxkVWqNoGh6u34X3ocgB");
111}
112
113pub mod rent_for_sysvars {
114    trezoa_pubkey::declare_id!("6i7V9zbRs7hfURf5NejRDQsRov4b62e8SpZqauwtk5ZT");
115}
116
117pub mod libsecp256k1_0_5_upgrade_enabled {
118    trezoa_pubkey::declare_id!("DSTJV6cpaC2XE6A8qUdziWDtUDUxMCisdjr7gXtKPRry");
119}
120
121pub mod tx_wide_compute_cap {
122    trezoa_pubkey::declare_id!("3LhK6aRroZFNHjmLz61QAvRBadQ8hXqiT6kui1cjDCu6");
123}
124
125pub mod tpl_token_v2_set_authority_fix {
126    trezoa_pubkey::declare_id!("EEtsq3Pobc3i281LKTGz2sNZ6rNwhJCZxK96SufwD1cF");
127}
128
129pub mod merge_nonce_error_into_system_error {
130    trezoa_pubkey::declare_id!("9zeZYy16bdXqoXTqTTuHWA5ARUeM9EcAc8FxgqcoRXR1");
131}
132
133pub mod disable_fees_sysvar {
134    trezoa_pubkey::declare_id!("A5rzsE8eKfLGWQxuRGLg4ZXVBtMCACfZnPxtjy7yzEEd");
135}
136
137pub mod stake_merge_with_unmatched_credits_observed {
138    trezoa_pubkey::declare_id!("9zUq9RF2UfLuuiDrzCT1mGUs4DXu8SkFBS1rHdRoUTps");
139}
140
141pub mod zk_token_sdk_enabled {
142    trezoa_pubkey::declare_id!("7zWtUAEMB1EZdNCrNzGeyvprSyqtYDCAs7bPf2ygkKrR");
143}
144
145pub mod curve25519_syscall_enabled {
146    trezoa_pubkey::declare_id!("5kTQPZeBx2PUQKgD8TisHKW7bvnFpoxK2ZK6niYSjeYa");
147}
148
149pub mod curve25519_restrict_msm_length {
150    trezoa_pubkey::declare_id!("7LG8UVfGVUrniepL6Fr423g71b1kHJFvoo6b9gUJuLD2");
151}
152
153pub mod versioned_tx_message_enabled {
154    trezoa_pubkey::declare_id!("3fMJcV5pLAmj8JMgCWFW7N2XsnZxQ7PvAdudc23FZXtt");
155}
156
157pub mod libsecp256k1_fail_on_bad_count {
158    trezoa_pubkey::declare_id!("5p4qMsNUuPB9AecHGH3LTiU9VzwrAWgUdn9eCLatJZ6Q");
159}
160
161pub mod libsecp256k1_fail_on_bad_count2 {
162    trezoa_pubkey::declare_id!("4JHzHNmG6KgjVSjgV6oWPiYAajhJTruSjk1SMLt1xvG5");
163}
164
165pub mod instructions_sysvar_owned_by_sysvar {
166    trezoa_pubkey::declare_id!("EBRvnfcfxL3HXHP4c217KYwWcUFgHndZpQdiVjci5xw8");
167}
168
169pub mod stake_program_advance_activating_credits_observed {
170    trezoa_pubkey::declare_id!("DKHFucSKPgCRQ9Z8Di5QVCNSfAN28zT1EeGjbyrWpRx4");
171}
172
173pub mod credits_auto_rewind {
174    trezoa_pubkey::declare_id!("48TEF2Pu7zDb5i5WSkz752nNG1srpMpMV815B3HhTv8i");
175}
176
177pub mod demote_program_write_locks {
178    trezoa_pubkey::declare_id!("6MncZd376ooRoLv1YMzPbKM2wkiFzFEgw36zKwvoqYFA");
179}
180
181pub mod ed25519_program_enabled {
182    trezoa_pubkey::declare_id!("AqUbYgEQnT6MyAvFL4hNXNYNBKz4Z9NP1Vmm56p2AAja");
183}
184
185pub mod return_data_syscall_enabled {
186    trezoa_pubkey::declare_id!("8o1JTm9LAh5oBVPWDLQ42jtxVSsFR2d4LYQwnGFSw3WA");
187}
188
189pub mod reduce_required_deploy_balance {
190    trezoa_pubkey::declare_id!("AYfzK1qKdARBhsd8Cs7dk2c58tKKAMvi7d6QoNipa8xq");
191}
192
193pub mod trz_log_data_syscall_enabled {
194    trezoa_pubkey::declare_id!("BtgDcsE3vz1SejiGXtQvsi1rkdjnpSJAsZKovrEevxoa");
195}
196
197pub mod stakes_remove_delegation_if_inactive {
198    trezoa_pubkey::declare_id!("5PcPMJcARdWU7EcmZoDYCiwEZh6xgs6KRiK5AQateyop");
199}
200
201pub mod do_support_realloc {
202    trezoa_pubkey::declare_id!("Ca9PBaYZSRk9HxgcLRrp3wUKLHZDiATpVWYkKZHFvne");
203}
204
205pub mod prevent_calling_precompiles_as_programs {
206    trezoa_pubkey::declare_id!("9JSyJeiLSuThuo9v3wHYS7LEL59kuJCiuiRP7CqwZR7W");
207}
208
209pub mod optimize_epoch_boundary_updates {
210    trezoa_pubkey::declare_id!("8CM3oV5ozV8RYfWEwCynRTL6YcrCrk626e5bpUTsS44S");
211}
212
213pub mod remove_native_loader {
214    trezoa_pubkey::declare_id!("CmN1oTbsnDVeHczVYAQ8MpexsrVjhQ1CLavxuJTC5Lh4");
215}
216
217pub mod send_to_tpu_vote_port {
218    trezoa_pubkey::declare_id!("6pYs4sDvzzyWj86HTN4H3ZPkd1q7ZzFvyV1xgahAWUVz");
219}
220
221pub mod requestable_heap_size {
222    trezoa_pubkey::declare_id!("6rWoq15vBVzQ6rMAp9wa3VcTQT4cEd8VVRVVosWpav6M");
223}
224
225pub mod disable_fee_calculator {
226    trezoa_pubkey::declare_id!("EXQgvTbZUSdadm2xhSrqYrUS5JFmt5RfThQknJsnAanJ");
227}
228
229pub mod add_compute_budget_program {
230    trezoa_pubkey::declare_id!("ArmGMFB9jFVyEEzbZWhFYbadGYX5vS7X1WXDT7uAJfkC");
231}
232
233pub mod nonce_must_be_writable {
234    trezoa_pubkey::declare_id!("8XSRyNXtuRNUv72iZoLrofwArZNmSXhPrJJxDrDGGp7A");
235}
236
237pub mod tpl_token_v3_3_0_release {
238    trezoa_pubkey::declare_id!("EwrPAzuVxC9sVbQdvsue2NU2QpSqMNLTY78UfYUjGkPz");
239}
240
241pub mod leave_nonce_on_success {
242    trezoa_pubkey::declare_id!("4H9b1XNHKcZ13TPk8yNwy4oWjxM6tv4TgUt3bL7hA8XW");
243}
244
245pub mod reject_empty_instruction_without_program {
246    trezoa_pubkey::declare_id!("Ap3mFypnGuddcYYcnNWSpyajDD5E6qXk4FRYxyY2Q4X9");
247}
248
249pub mod fixed_memcpy_nonoverlapping_check {
250    trezoa_pubkey::declare_id!("7Wtd1B396yruYbBTPtAfczoh3Br6nLRV1oP4yaJqk8TL");
251}
252
253pub mod reject_non_rent_exempt_vote_withdraws {
254    trezoa_pubkey::declare_id!("2mDG3UAejEtTTo9pxj7qvDFPhDWc8nRrgvETeYBzFBdq");
255}
256
257pub mod evict_invalid_stakes_cache_entries {
258    trezoa_pubkey::declare_id!("56aNT8tLKxsDMjgx6MwMxvF6Zr18xYqgSQhfbAy4ESW3");
259}
260
261pub mod allow_votes_to_directly_update_vote_state {
262    trezoa_pubkey::declare_id!("22tjpg6yJq5gLdVWpygQdBejywjotPaBcRkheU1ML671");
263}
264
265pub mod max_tx_account_locks {
266    trezoa_pubkey::declare_id!("6fc3vq5tU7owc1nZGc3ostLMcmLWEgVTV1qD5jHJ8H8R");
267}
268
269pub mod require_rent_exempt_accounts {
270    trezoa_pubkey::declare_id!("J9jZacLLwehS6S2csgQChYffpeB8dBHkuJZ5hGDZ4McH");
271}
272
273pub mod filter_votes_outside_slot_hashes {
274    trezoa_pubkey::declare_id!("DJuAz7bfUXvMtgVkiANKRj3zgiUqfagAuZ2EkorMmmcV");
275}
276
277pub mod update_syscall_base_costs {
278    trezoa_pubkey::declare_id!("DMQcBjsmtG1xkJzjuFzkYUvfFWfNLa73uHo1avh19xZK");
279}
280
281pub mod stake_deactivate_delinquent_instruction {
282    trezoa_pubkey::declare_id!("2Gx7hn8r52kiLMWFwVFzHVjpimxqkV4Ke7ouDLGtEWjM");
283}
284
285pub mod vote_withdraw_authority_may_change_authorized_voter {
286    trezoa_pubkey::declare_id!("9r4eEAVo9md6k2SXwtthQiHwXLNf1UDFP4H1eUjLHAAM");
287}
288
289pub mod tpl_associated_token_account_v1_0_4 {
290    trezoa_pubkey::declare_id!("D5NoYKvb2MX3d8sgxopQ8ejaXDjMcu8YAG1A4d1zmTvv");
291}
292
293pub mod reject_vote_account_close_unless_zero_credit_epoch {
294    trezoa_pubkey::declare_id!("9TCC9HpyxseeME6npvy1iqQdi9r1aoZt4uLGhZtCDQw9");
295}
296
297pub mod add_get_processed_sibling_instruction_syscall {
298    trezoa_pubkey::declare_id!("GkS3yEPmATs2Vutax4cMPtuNn4aCYeiSiT8BrvHsWbaA");
299}
300
301pub mod bank_transaction_count_fix {
302    trezoa_pubkey::declare_id!("5yMPoqB7U5W7JNouoMDjnCQhnmSQwUv2Xnbq2hyuoc5j");
303}
304
305pub mod disable_bpf_deprecated_load_instructions {
306    trezoa_pubkey::declare_id!("J4PzKPtdA3Lm84d2Fk7Me4rHEaepB1GPfyhytExiCQCE");
307}
308
309pub mod disable_bpf_unresolved_symbols_at_runtime {
310    trezoa_pubkey::declare_id!("3TtGnHfJNnJLiQPAuUuz5WTo244mX8mHcT61PUjRJpA3");
311}
312
313pub mod record_instruction_in_transaction_context_push {
314    trezoa_pubkey::declare_id!("DZwum3yzteEy5fGctohR74RVVZfmG5vvK3GxEnwEYaq6");
315}
316
317pub mod syscall_saturated_math {
318    trezoa_pubkey::declare_id!("3wFJEP7MtDyckHuGWRBDva6zPVABYuNgTJVCa8adDQNM");
319}
320
321pub mod check_physical_overlapping {
322    trezoa_pubkey::declare_id!("BSGXzf3bGCJAVk5nzboPTtPv24vJUVCHTtub883yBup2");
323}
324
325pub mod limit_secp256k1_recovery_id {
326    trezoa_pubkey::declare_id!("7pRzXjzMtUTem31UBhGnqByD5tXH7p8jPVJzZsJiacky");
327}
328
329pub mod disable_deprecated_loader {
330    trezoa_pubkey::declare_id!("nuwSAnsRuj6RdhrGcBis18Y3F423WaPFFPprxBStcES");
331}
332
333pub mod check_slice_translation_size {
334    trezoa_pubkey::declare_id!("HFpvdRJaLx5JjPAvoN5Se1GsMHNbdNrLp6DbG28VZ8GQ");
335}
336
337pub mod stake_split_uses_rent_sysvar {
338    trezoa_pubkey::declare_id!("HmauMBWRj3ZE1hQx2VWc3PioEwuUbwDrBwuEyKhFpx3Y");
339}
340
341pub mod add_get_minimum_delegation_instruction_to_stake_program {
342    trezoa_pubkey::declare_id!("EHaaGTV7yinZRCxYQyMsDv3XrceTcWrdW6DseGqTr1Kc");
343}
344
345pub mod error_on_syscall_bpf_function_hash_collisions {
346    trezoa_pubkey::declare_id!("B3Z2gEzVayzvLE4x2r1jjf8Ncm4mHNbqk8Hns9JWG37d");
347}
348
349pub mod reject_callx_r10 {
350    trezoa_pubkey::declare_id!("7Gdpmm3yqB9gFmnzu9Qq9kFXK4csSe6DDZX4chbevxmv");
351}
352
353pub mod drop_redundant_turbine_path {
354    trezoa_pubkey::declare_id!("HLkCWM2vbhoF6jMC8XpKYXeun4umNZrgRqTDMjhWzn38");
355}
356
357pub mod executables_incur_cpi_data_cost {
358    trezoa_pubkey::declare_id!("5VCkxtisJdugjjqdibqEEpYkD5TBfNytXsy3KKmTFg59");
359}
360
361pub mod fix_recent_blockhashes {
362    trezoa_pubkey::declare_id!("7g8sMg4o1iz2tMa4Em8cGbAV44MvfAKv7iKFPpFGum1w");
363}
364
365pub mod update_rewards_from_cached_accounts {
366    trezoa_pubkey::declare_id!("CaAgpNSDTQBXjGKoTAu43fxfP2vRr1sbNCAMm75N12ia");
367}
368pub mod enable_partitioned_epoch_reward {
369    trezoa_pubkey::declare_id!("2xWZdc2y7VPnCvq4FUZGF5mJ43JHVCsWhSxVrsJUhi99");
370}
371
372pub mod partitioned_epoch_rewards_superfeature {
373    trezoa_pubkey::declare_id!("GZHsTERLYbBkdfg9N7HRwEtqARuEBzvLUTaAWR3o7j9t");
374}
375
376pub mod tpl_token_v3_4_0 {
377    trezoa_pubkey::declare_id!("4sYbW7qEG4Wrf2rTNjkGZE9vQ41XdPFQjMDf9Z6Yg7yG");
378}
379
380pub mod tpl_associated_token_account_v1_1_0 {
381    trezoa_pubkey::declare_id!("3eAcQKAhAhP3AoPoHWTu7FKfGSN7cU8GTBpUK5WeZL1u");
382}
383
384pub mod default_units_per_instruction {
385    trezoa_pubkey::declare_id!("B3HsMY9ntVJ2Yf9aTosVsdS1yi2axeJfWiCDApH8YXq1");
386}
387
388pub mod stake_allow_zero_undelegated_amount {
389    trezoa_pubkey::declare_id!("C36ZK7TUcNXZV2x8e9jA6B4pGFWKhNXg1AxPQXpwRcNb");
390}
391
392pub mod require_static_program_ids_in_transaction {
393    trezoa_pubkey::declare_id!("8jUaFoHWcv8QLh54cHfXW2NwjP5xUZjLnE12wUq27ngc");
394}
395
396pub mod stake_raise_minimum_delegation_to_1_trz {
397    // This is a feature-proposal *feature id*.  The feature keypair address is updated for Trezoa.
398    trezoa_pubkey::declare_id!("8JVQSEukeV3yqZY7n99W3Qbb5ZmdUWoveNwVSsrX4JK9");
399}
400
401pub mod stake_minimum_delegation_for_rewards {
402    trezoa_pubkey::declare_id!("2oRVv923a2A2wAjmcEYaV4SpBwteFS69gcq8BfaTU1Ws");
403}
404
405pub mod add_set_compute_unit_price_ix {
406    trezoa_pubkey::declare_id!("5wnfMrgrfFTQsnRodikCgzN1LkFRNCs2gGjh4RB1VvWf");
407}
408
409pub mod disable_deploy_of_alloc_free_syscall {
410    trezoa_pubkey::declare_id!("4HTdNasKjuQjbSUW8TXY8W9o8m7vazwKJ7KEF5ZknezX");
411}
412
413pub mod include_account_index_in_rent_error {
414    trezoa_pubkey::declare_id!("GVc9dKVJFqsjQ5HLJJLsjepLVKUCFSMtiM7reztcV2y4");
415}
416
417pub mod add_shred_type_to_shred_seed {
418    trezoa_pubkey::declare_id!("6zma35a6gcVJXTuQCApsd5fNCke3KpsJdaGNpRzJezh5");
419}
420
421pub mod warp_timestamp_with_a_vengeance {
422    trezoa_pubkey::declare_id!("BGkcG8czHpusnRYyAM2qduG7meLew6qpnvErhxBsZ1hf");
423}
424
425pub mod separate_nonce_from_blockhash {
426    trezoa_pubkey::declare_id!("ChwbCVVojvywP5Srhpyua7GSoMmCNr6tNDX4V5mvcLpM");
427}
428
429pub mod enable_durable_nonce {
430    trezoa_pubkey::declare_id!("8nJGbppDnrB4RgNzBNx8Xrqs9NYh3bvdNWUsNxunCfZc");
431}
432
433pub mod vote_state_update_credit_per_dequeue {
434    trezoa_pubkey::declare_id!("2FzevWJGXnYkDQeuUZexGTtD371padyVq7T22Z4uDFSC");
435}
436
437pub mod quick_bail_on_panic {
438    trezoa_pubkey::declare_id!("6UnztR8p5x63YfpRM1GRJKnMcdmd3a2C5ePTx9HWkZMy");
439}
440
441pub mod nonce_must_be_authorized {
442    trezoa_pubkey::declare_id!("BGg91FW3GffXbZSKMjgoVqBBC1GNtHUknr3MMUfvbUSJ");
443}
444
445pub mod nonce_must_be_advanceable {
446    trezoa_pubkey::declare_id!("6frac6H96umBWfjY46QVWAqrdDjx3z9kCqHxx8jyQz9G");
447}
448
449pub mod vote_authorize_with_seed {
450    trezoa_pubkey::declare_id!("2mYZGBFBT8wA4t4ykPnNstoPx14sNvBB65NABHXEJGdw");
451}
452
453pub mod preserve_rent_epoch_for_rent_exempt_accounts {
454    trezoa_pubkey::declare_id!("CmfcaqnMRrSgT1CdHdWXcCZ9FymRdtBnvLXbxFpqBXTm");
455}
456
457pub mod enable_bpf_loader_extend_program_ix {
458    trezoa_pubkey::declare_id!("ACX2xV8sQspAfmBKmT8wmdnttZsk2RhLoqShgt8uP9wc");
459}
460
461pub mod enable_early_verification_of_account_modifications {
462    trezoa_pubkey::declare_id!("EdKycumc9jox8FNnmExkG9Upkhyt4VS7dcuSRXwdUXyw");
463}
464
465pub mod skip_rent_rewrites {
466    trezoa_pubkey::declare_id!("ATDmWTyHM7tC5jtq8566vY8antvHryyX9attKHgPNEnS");
467}
468
469pub mod prevent_crediting_accounts_that_end_rent_paying {
470    trezoa_pubkey::declare_id!("5djFKBYXUqhmcSDYip4x1oKzZb9ZkHuU1t3UNiyP8MuF");
471}
472
473pub mod cap_bpf_program_instruction_accounts {
474    trezoa_pubkey::declare_id!("4QgLxE6Xa9EndJdEfNHFJz9pbLHKbr7Td9kVFSEnePH4");
475}
476
477pub mod loosen_cpi_size_restriction {
478    trezoa_pubkey::declare_id!("8XKEp5V127TL8DELXCPm4n7pVoT7CKAd5gbaeibY4jzu");
479}
480
481pub mod use_default_units_in_fee_calculation {
482    trezoa_pubkey::declare_id!("EnuZhNiuTcKNkGkbJYtjzEgJkJdRwgrdbznRqLGRdvgi");
483}
484
485pub mod compact_vote_state_updates {
486    trezoa_pubkey::declare_id!("AJqHtMKAnqdw7tTkSMZ33jaV3gx19ytQrnQoBTmU727Z");
487}
488
489pub mod incremental_snapshot_only_incremental_hash_calculation {
490    trezoa_pubkey::declare_id!("EZNmrkijE9dY4Lx5ApcaJBS7Xubpgm9C3pz7CnzSky2P");
491}
492
493pub mod disable_cpi_setting_executable_and_rent_epoch {
494    trezoa_pubkey::declare_id!("Cejs4bWQyk8Dqog6My8fQs2hi9pJj8AKif4TksaBVuF");
495}
496
497pub mod on_load_preserve_rent_epoch_for_rent_exempt_accounts {
498    trezoa_pubkey::declare_id!("43P22Z1b8DzaHknGtYWMPHiQWoVd6zLQJpiBF3PiKnfF");
499}
500
501pub mod account_hash_ignore_slot {
502    trezoa_pubkey::declare_id!("PTE3puhmFRUJ1j21KwdjEgwzqaTPqz57fgkustsB6Zq");
503}
504
505pub mod set_exempt_rent_epoch_max {
506    trezoa_pubkey::declare_id!("HWe7nBajEcML4CAY6zP4bJoiZXaPQwhDfShr6jybX1Gv");
507}
508
509pub mod relax_authority_signer_check_for_lookup_table_creation {
510    trezoa_pubkey::declare_id!("DAdvmKSYPJt1YfVBvPW9mU1jyneGnzVK2QphaHtebRk2");
511}
512
513pub mod stop_sibling_instruction_search_at_parent {
514    trezoa_pubkey::declare_id!("28fAFYhvm2V8Wk99W897ysMHBMLCErMjVmSskM5TbAx4");
515}
516
517pub mod vote_state_update_root_fix {
518    trezoa_pubkey::declare_id!("8B3S8NRkgczG1Tgcxfc1ZTDowJxG4C2NfVdVmYuJm7if");
519}
520
521pub mod cap_accounts_data_allocations_per_transaction {
522    trezoa_pubkey::declare_id!("9sFpMpUV1TjakdXdgvdEqtG2M6PaiREkhQ5hwhfZRRmB");
523}
524
525pub mod epoch_accounts_hash {
526    trezoa_pubkey::declare_id!("99pR8UrnVaG7YpfiXwT3QNtsmMRrbWtAFCBjw2aLix22");
527}
528
529pub mod remove_deprecated_request_unit_ix {
530    trezoa_pubkey::declare_id!("9W4LeYW8QxS6YiMG3PKUSm3FQko5UaCzYKjiCdYDNa5j");
531}
532
533pub mod disable_rehash_for_rent_epoch {
534    trezoa_pubkey::declare_id!("GYPEqrNsnx7Xf9JYnVQmTof4eZ1Dp3RRtwbZhaAw3SXh");
535}
536
537pub mod increase_tx_account_lock_limit {
538    trezoa_pubkey::declare_id!("9rvEpbW71Wakv1NbX53ejRdkR8P15SWwUrqYQNgNcr8q");
539}
540
541pub mod limit_max_instruction_trace_length {
542    trezoa_pubkey::declare_id!("3nLWNrSoFS86nBnpPwQ86FM7ABUBr1WA71YeyzyukM5M");
543}
544
545pub mod check_syscall_outputs_do_not_overlap {
546    trezoa_pubkey::declare_id!("JCPe5ewNeTDPSFTwRKH1c4z4nGjtK59WLpLiJPrwDms5");
547}
548
549pub mod enable_bpf_loader_set_authority_checked_ix {
550    trezoa_pubkey::declare_id!("dsgxhh2dH6fuHk3qpznSK9ix8TLzBCxXWgqEcJJwvbL");
551}
552
553pub mod enable_alt_bn128_syscall {
554    trezoa_pubkey::declare_id!("HdXdrpLfF864SNV6KXerassipLEahBTWhiTPoCJWE9RW");
555}
556
557pub mod simplify_alt_bn128_syscall_error_codes {
558    trezoa_pubkey::declare_id!("7pU36NCueJKchJrcu9jJjGWcrH6jdyjXUpcjxHfkGUJS");
559}
560
561pub mod enable_alt_bn128_compression_syscall {
562    trezoa_pubkey::declare_id!("9HDXowiutoUSvPYJUYkHQTAqwA5kxhY4Yqw9WG7Ak8v8");
563}
564
565pub mod fix_alt_bn128_multiplication_input_length {
566    trezoa_pubkey::declare_id!("BtFw14NZmjvPuUpPEkmaLhy9tYkEdX5bK65bGMaS8wgb");
567}
568
569pub mod enable_program_redeployment_cooldown {
570    trezoa_pubkey::declare_id!("6o4fwRBywk8HQvdDstSXWM91MsksZYJi4Bxy7Lw1GAHy");
571}
572
573pub mod commission_updates_only_allowed_in_first_half_of_epoch {
574    trezoa_pubkey::declare_id!("9FTVRiDXyK919i2waxMNJHpRLnAN5tdUSKBuHRpmkjq");
575}
576
577pub mod enable_turbine_fanout_experiments {
578    trezoa_pubkey::declare_id!("GN1Uri9oet7cfTL4Vb8ciD5pH9pNsWksCqQg2sgaWgef");
579}
580
581pub mod disable_turbine_fanout_experiments {
582    trezoa_pubkey::declare_id!("CxNKYaW497ribFFgrBCQfzr6TQ2ehdeu4hnNnxhcoKKn");
583}
584
585pub mod move_serialized_len_ptr_in_cpi {
586    trezoa_pubkey::declare_id!("D1rFoPAFZnJ5SirVjvEYGLwPcHbYBxWbqn3z27UnFyxj");
587}
588
589pub mod update_hashes_per_tick {
590    trezoa_pubkey::declare_id!("AnzxWshfkRaPjv6z3YnudkxrHbSthhusHMh5zG5jAxYe");
591}
592
593pub mod enable_big_mod_exp_syscall {
594    trezoa_pubkey::declare_id!("78SyzyjXuNKo6qgH8PuFpGUJMLp76iSJUKG8rndnjPXk");
595}
596
597pub mod disable_builtin_loader_ownership_chains {
598    trezoa_pubkey::declare_id!("UbFxqXMbvqqD89AS2mMEEqo3DQ6JEzxQuEt3K6tQ2TB");
599}
600
601pub mod cap_transaction_accounts_data_size {
602    trezoa_pubkey::declare_id!("8dBfhyB6Ptt4Yaf7ddqdjUmgpjJMgYgt8YcZCURcybXD");
603}
604
605pub mod remove_congestion_multiplier_from_fee_calculation {
606    trezoa_pubkey::declare_id!("NTbCTEBZMr5BcQdGyDjq6eQJUp68k7LnnTA4cdF2BkU");
607}
608
609pub mod enable_request_heap_frame_ix {
610    trezoa_pubkey::declare_id!("2Ssm1e8kFqwG1CNgcp8whpoZYcYVqe8h5YCvphsFdasU");
611}
612
613pub mod prevent_rent_paying_rent_recipients {
614    trezoa_pubkey::declare_id!("7E7v19kF8b9fQV8uHwKgzAoZwqxK5os7fuhPvxsQ8RwJ");
615}
616
617pub mod delay_visibility_of_program_deployment {
618    trezoa_pubkey::declare_id!("HsMGnYr35772xnm1VNotGkxw1jg2UZ3UWWXpzRowQvr7");
619}
620
621pub mod apply_cost_tracker_during_replay {
622    trezoa_pubkey::declare_id!("6eD1pzj9co2KCpLxfBDKCE1n3oR27KVdjf4fMZ6SdTaw");
623}
624pub mod bpf_account_data_direct_mapping {
625    trezoa_pubkey::declare_id!("DAcE5eqQZn9cSVND34NGTPXrEqiKK94gnJyDP9VYujr2");
626}
627
628pub mod add_set_tx_loaded_accounts_data_size_instruction {
629    trezoa_pubkey::declare_id!("EoPPK398wodr9hLRg97g5ZGEDJVNGnM8DgWWc2gWjvB1");
630}
631
632pub mod switch_to_new_elf_parser {
633    trezoa_pubkey::declare_id!("F1UBSm7PQ2TkebJ1f627CuZi8JoXYpXUmgbqhAnDZB7L");
634}
635
636pub mod round_up_heap_size {
637    trezoa_pubkey::declare_id!("F5aNz6FqKAuXos8cevasC7RZ5ndPwsTrABxSjZVNAfDH");
638}
639
640pub mod remove_bpf_loader_incorrect_program_id {
641    trezoa_pubkey::declare_id!("9w5wh2pjWEtxvUzmfU99vFMqdakTMxZhas9gQa5jJE1V");
642}
643
644pub mod include_loaded_accounts_data_size_in_fee_calculation {
645    trezoa_pubkey::declare_id!("VB8AAkejW59R9PksLAjqz9kMLkT7iifQq5qci3KxGxd");
646}
647
648pub mod native_programs_consume_cu {
649    trezoa_pubkey::declare_id!("7M3REVxB8TENx2gUBkNGYY8pcvcd86g5gnB6HE3FBxHP");
650}
651
652pub mod simplify_writable_program_account_check {
653    trezoa_pubkey::declare_id!("FLAYui6hbDCUvMLtHaTFBAG99Ev6LQ6W31fsCA9uavjE");
654}
655
656pub mod stop_truncating_strings_in_syscalls {
657    trezoa_pubkey::declare_id!("HCzqUQM24fqcHv3QqS9vC5n4BBGsmf3CFBUdo9M2FjSy");
658}
659
660pub mod clean_up_delegation_errors {
661    trezoa_pubkey::declare_id!("4UUR6jQDdS3pFwuoe7t42o4yjztyELU1zdFx23tTz8Ut");
662}
663
664pub mod vote_state_add_vote_latency {
665    trezoa_pubkey::declare_id!("7Wwhj6E52u5tN5Je85icouZM6CqkCTf3mLTNuPgUnWYW");
666}
667
668pub mod checked_arithmetic_in_fee_validation {
669    trezoa_pubkey::declare_id!("CLt53NEWw9F8s1AVWBaoBs7v9zgrYrLFsC5QX1JUjc2G");
670}
671
672pub mod last_restart_slot_sysvar {
673    trezoa_pubkey::declare_id!("EAoQX1ifcMir24Pnqbhup9EXNKunqgMVkYoZcWgaEWXr");
674}
675
676pub mod reduce_stake_warmup_cooldown {
677    trezoa_pubkey::declare_id!("AqEmXGogQvsRNEJkstFErG71PQq24AtBj5rxDZ9CXm14");
678}
679
680pub mod revise_turbine_epoch_stakes {
681    trezoa_pubkey::declare_id!("DZk6AvW2hB8CSVbQvicA8t2awscGc5sHroNcd6dvEpvi");
682}
683
684pub mod enable_poseidon_syscall {
685    trezoa_pubkey::declare_id!("FSaEN4r4UXy9iLr7NSwjXS14XjU9Nvj78Rq1r3NJ79g5");
686}
687
688pub mod timely_vote_credits {
689    trezoa_pubkey::declare_id!("DEVcKmfjDCnU7WdBLiwLud5Bpv8WsbzEZ4U8yZuxtkYr");
690}
691
692pub mod remaining_compute_units_syscall_enabled {
693    trezoa_pubkey::declare_id!("3tccW6SW4YoindaYRrBtCwiL2FQfDKDrGXpKTaGqLoxW");
694}
695
696pub mod enable_loader_v4 {
697    trezoa_pubkey::declare_id!("CGhjsHfT7KBSNN7CDTENWU4hTGevn287VF7KcNZSr9XZ");
698}
699
700pub mod disable_new_loader_v3_deployments {
701    trezoa_pubkey::declare_id!("8rv47bthDNLuU7smoyTiZ1F4xYRLzTWA97rDmqV3QnE4");
702}
703
704pub mod require_rent_exempt_split_destination {
705    trezoa_pubkey::declare_id!("29dyJWaH7a4Nm1obMUtLcuhiW7W6YRxzWMB2NgQ5kBbZ");
706}
707
708pub mod better_error_codes_for_tx_lamport_check {
709    trezoa_pubkey::declare_id!("25sM6bKY7WH8kKvFQxGbBExRGCTs465qFGyLHPpGnwFh");
710}
711
712pub mod update_hashes_per_tick2 {
713    trezoa_pubkey::declare_id!("AYL1Po5iV7JmYz46UM9VgBgMdyFVyJjq3LzrCav7R56n");
714}
715
716pub mod update_hashes_per_tick3 {
717    trezoa_pubkey::declare_id!("5HGa8jZR4LsvPvEVYBtEu9B5Ea2KSMSpDHXZe9r6VvWo");
718}
719
720pub mod update_hashes_per_tick4 {
721    trezoa_pubkey::declare_id!("BMmgcFubsJYMcGMVYBsVCPbPzo2V8ymsue45AbSDGjUW");
722}
723
724pub mod update_hashes_per_tick5 {
725    trezoa_pubkey::declare_id!("76MCq3iEShhrLdprWELUwJDbREXQb1PyYqLA25DSwkB");
726}
727
728pub mod update_hashes_per_tick6 {
729    trezoa_pubkey::declare_id!("2Jg3KigvwFoSZYhncDLzsPdTarm2TG9BLS4owSHLdHfz");
730}
731
732pub mod validate_fee_collector_account {
733    trezoa_pubkey::declare_id!("3n7E2az8RaBiWgDFuBkydos33CiJc6nM2otpZgmZnECu");
734}
735
736pub mod disable_rent_fees_collection {
737    trezoa_pubkey::declare_id!("Br2mtyqxpHKs5SxVQYCTTCn1iaZnhWx9fpHY8nNWPciN");
738}
739
740pub mod enable_zk_transfer_with_fee {
741    trezoa_pubkey::declare_id!("4eJMrDZUjgGASonAd6pLNpiZFePNccZWYRqkH4178Eke");
742}
743
744pub mod drop_legacy_shreds {
745    trezoa_pubkey::declare_id!("EE4TJcHzakdc2L5X9PYtVwWza3JxKX4dC1aFQ3L83Ept");
746}
747
748pub mod allow_commission_decrease_at_any_time {
749    trezoa_pubkey::declare_id!("2gY99PcthFzDNHRQQdRvXMsVddkvPEuUFh6uAJnoGDNs");
750}
751
752pub mod add_new_reserved_account_keys {
753    trezoa_pubkey::declare_id!("3heC7TDG8vCmgCrt5VQjNMZnhLMuBGsKATE3ZeaQ5XB6");
754}
755
756pub mod consume_blockstore_duplicate_proofs {
757    trezoa_pubkey::declare_id!("UhpKXHMMff4VHXMRUeiGmUicHHBVWAydM92mWVyt45R");
758}
759
760pub mod index_erasure_conflict_duplicate_proofs {
761    trezoa_pubkey::declare_id!("T2Rca77Tyvo1CfR6CgEKMMn7dLek5M9cruDDhBtfxqE");
762}
763
764pub mod merkle_conflict_duplicate_proofs {
765    trezoa_pubkey::declare_id!("4g2imJJXYutn9C2ELcPpfXHjjbAoC7qwHp8BmvvQPu15");
766}
767
768pub mod disable_bpf_loader_instructions {
769    trezoa_pubkey::declare_id!("CP3PZ1VdXuTY8gq7JajdND3qMQnuhgU3pXoDsa1KXud3");
770}
771
772pub mod enable_zk_proof_from_account {
773    trezoa_pubkey::declare_id!("2A7iceBRC9o8jL1r9qwHtYRMNcQVGEGEgr2NgjQNEDoK");
774}
775
776pub mod cost_model_requested_write_lock_cost {
777    trezoa_pubkey::declare_id!("4PCmCTDfeuqCsFLqyze9gvqARrkEatZRy5KwXP68aw5p");
778}
779
780pub mod enable_gossip_duplicate_proof_ingestion {
781    trezoa_pubkey::declare_id!("Gf754yv8M1y4Eq48LZr2Hexz6qYznvBsmjGXprML4BFV");
782}
783
784pub mod chained_merkle_conflict_duplicate_proofs {
785    trezoa_pubkey::declare_id!("6R73gPo8uxyh1wAKjbkWxhZqK3ct2cndoPzd21566gJc");
786}
787
788pub mod enable_chained_merkle_shreds {
789    trezoa_pubkey::declare_id!("6riZVruBz1BSUCXySpdTZYzZB8Tc7gdkGSiyVQA1isHr");
790}
791
792pub mod remove_rounding_in_fee_calculation {
793    trezoa_pubkey::declare_id!("AUrSmzhTZwgb8m36dwD1NsvbdJ243tTunRJeNBGTrLi5");
794}
795
796pub mod enable_tower_sync_ix {
797    trezoa_pubkey::declare_id!("HhWomoMhzxheNYnzSrqNDHUK23rZTC8WKiZ49TKCYfXm");
798}
799
800pub mod deprecate_unused_legacy_vote_plumbing {
801    trezoa_pubkey::declare_id!("E8GTCwtwjVNEpnBd7qX85R6BDJ22gmgEtWbYv6oFfWz3");
802}
803
804pub mod reward_full_priority_fee {
805    trezoa_pubkey::declare_id!("7caPtWkakG8WeMDbbS8zGhHsZpYkm7WNGa9sJve2iqyD");
806}
807
808pub mod get_sysvar_syscall_enabled {
809    trezoa_pubkey::declare_id!("J1MHae8Ke4ppu8nZNGwMD4Mr8f1eesm9s89y46iJkrCQ");
810}
811
812pub mod abort_on_invalid_curve {
813    trezoa_pubkey::declare_id!("FnJQBSGUrjVfxWKWd3iWtZASi5PrdWs3ZAE2ef7MYqbQ");
814}
815
816pub mod migrate_feature_gate_program_to_core_bpf {
817    trezoa_pubkey::declare_id!("DGgzTsyeBjFHoWDmQsRbkXWwJmMK1Cc6QmJWJ5fToJ6");
818}
819
820pub mod vote_only_full_fec_sets {
821    trezoa_pubkey::declare_id!("94cTw8dXqnKsv2yCpN7auTWYUm6aufFzXqCwfBUDmg4g");
822}
823
824pub mod migrate_config_program_to_core_bpf {
825    trezoa_pubkey::declare_id!("2kcZeJLZYiBAky9b1Mb6WJWQiWYF2ndgLAnTB3hUYshh");
826}
827
828pub mod enable_get_epoch_stake_syscall {
829    trezoa_pubkey::declare_id!("7ug5MAcyNYZJNfJTTZ64fwL9fwM9WmQsEJVxp9Cu5ZQm");
830}
831
832pub mod migrate_address_lookup_table_program_to_core_bpf {
833    trezoa_pubkey::declare_id!("yDYyiYYNE4P2yLaevGr6hFfgq5GcYhaqvxgVfzzwX8i");
834}
835
836pub mod zk_elgamal_proof_program_enabled {
837    trezoa_pubkey::declare_id!("9Ebiiyc8NETWjTwAf7Xx88L5KwMEyW6tNrPPzw3sfgoN");
838}
839
840pub mod verify_retransmitter_signature {
841    trezoa_pubkey::declare_id!("FkXWkgWrV8ta7Xws3NpbMu6nUzKXypgqc46AXvJ3aPbm");
842}
843
844pub mod move_stake_and_move_lamports_ixs {
845    trezoa_pubkey::declare_id!("31rrTLZgcCQMBjAnSkk84tYTfXM27YfnDaLTi5DUHGTQ");
846}
847
848pub mod ed25519_precompile_verify_strict {
849    trezoa_pubkey::declare_id!("E2EvVJG1yL3nQLwbRutfnnsYD2bywg86QHUwAkYDLDAx");
850}
851
852pub mod vote_only_retransmitter_signed_fec_sets {
853    trezoa_pubkey::declare_id!("3JsBhvsLgt2iqbicovqij4o4W83spFUVW8wHg9cLpmJb");
854}
855
856pub mod move_precompile_verification_to_svm {
857    trezoa_pubkey::declare_id!("7Bg1P1919u3dVCXQkLba9Y1WkwktoiqmVMSzmyTzGaT8");
858}
859
860pub mod enable_transaction_loading_failure_fees {
861    trezoa_pubkey::declare_id!("DgHJuusSyYFfqTxpivPSRRtVMay4BGfDQvVrSkBXNqqc");
862}
863
864pub mod enable_turbine_extended_fanout_experiments {
865    trezoa_pubkey::declare_id!("AZoQ7yFVZCNgEWWPN9dkDV29SdUaUr241k31ppBxCYHE");
866}
867
868pub mod deprecate_legacy_vote_ixs {
869    trezoa_pubkey::declare_id!("2SjHhxU2NayGy1ZV5jMWecjibzuLPzvpSrczTTQEXptM");
870}
871
872pub mod disable_sbpf_v0_execution {
873    trezoa_pubkey::declare_id!("TestFeature11111111111111111111111111111111");
874}
875
876pub mod reenable_sbpf_v0_execution {
877    trezoa_pubkey::declare_id!("TestFeature21111111111111111111111111111111");
878}
879
880pub mod enable_sbpf_v1_deployment_and_execution {
881    trezoa_pubkey::declare_id!("32dav5hi3vpdf8qwg7vPnzdnuYcEzkrkbeBt3kCgVMp5");
882}
883
884pub mod enable_sbpf_v2_deployment_and_execution {
885    trezoa_pubkey::declare_id!("EdDjCDM7mf2D7CNy7T3XkpQtNEmUhsLbFDnx3H7FkdHs");
886}
887
888pub mod enable_sbpf_v3_deployment_and_execution {
889    trezoa_pubkey::declare_id!("9KMbgDS8LCNPcb3A2yVkaAqhDdiALq82QeTQ6qMC9pmz");
890}
891
892pub mod remove_accounts_executable_flag_checks {
893    trezoa_pubkey::declare_id!("9jBiM8fdQnpmdG9fNHEk4nLSsgH44EAuRtAfuXg5Q8zi");
894}
895
896pub mod lift_cpi_caller_restriction {
897    trezoa_pubkey::declare_id!("ABiinkHHHZNASVCL2TdfxsT3pKJ6vJb8xWdaac99Pkmc");
898}
899
900pub mod disable_account_loader_special_case {
901    trezoa_pubkey::declare_id!("HKr3oTjTxGcHc8Tr4fRG2NFyDxMjfSoDfA9rA7mH4r13");
902}
903
904pub mod enable_secp256r1_precompile {
905    trezoa_pubkey::declare_id!("DCcJDhWfDCtN61T8u6PDyGZSS7QjNbzwCYBu6B2e4zF2");
906}
907
908pub mod accounts_lt_hash {
909    trezoa_pubkey::declare_id!("2yd7r6NdesqVrkqqBBrpV7RE1ug28pCz7N7JimNcF57x");
910}
911
912pub mod snapshots_lt_hash {
913    trezoa_pubkey::declare_id!("DvXcC8Xx2tKFMcSnDyCoLFPUQhd4WygYv2ed2zpx96ar");
914}
915
916pub mod remove_accounts_delta_hash {
917    trezoa_pubkey::declare_id!("FWPEyRnWgresrxYqDwcDNrkXuH84Egp1ZG9UGKHLZjeK");
918}
919
920pub mod migrate_stake_program_to_core_bpf {
921    trezoa_pubkey::declare_id!("5ePf3fCLTRQwgT83VjrSEN5zo2eFZbs2CoMM5cJqUTVH");
922}
923
924pub mod deplete_cu_meter_on_vm_failure {
925    trezoa_pubkey::declare_id!("9aQ6ady28nJiYyL5KQdLmuF3oNhDTco7iVZFZ7aRQZAc");
926}
927
928pub mod reserve_minimal_cus_for_builtin_instructions {
929    trezoa_pubkey::declare_id!("13sgwSameJFMtYdoAmSNsQaPoS89YXU6uW22CbMPmVkS");
930}
931
932pub mod raise_block_limits_to_50m {
933    trezoa_pubkey::declare_id!("BkphLKGbCvWPo6HtEhN6aRW5ZhWhriSPVHHFdBpqAxhr");
934}
935
936pub mod drop_unchained_merkle_shreds {
937    trezoa_pubkey::declare_id!("sFNKqDsxc4UHsUcB4DZUUzG9dFDdpacgJfJLsQCnCcZ");
938}
939
940pub mod relax_intrabatch_account_locks {
941    trezoa_pubkey::declare_id!("BW2ph3rG3iXynNpphwpEWqmSKYXndr32D6hEbU7f6Mcx");
942}
943
944pub mod create_slashing_program {
945    trezoa_pubkey::declare_id!("f6449zKZH7qqnVAZ1CU7sR5vMqSSMXS5zaLmJe3b7vo");
946}
947
948pub mod disable_partitioned_rent_collection {
949    trezoa_pubkey::declare_id!("Aj3sLrYbmJgGytFDT1a97PPGkR7DZUn8M2mJfPCGnsuD");
950}
951
952pub mod enable_vote_address_leader_schedule {
953    trezoa_pubkey::declare_id!("GkrGYmN4hjWgeQJGrDBYmijQy8pBWvsU6NXtJ6UP4cQT");
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        (tpl_token_v2_multisig_fix::id(), "tpl-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        (tpl_token_v2_self_transfer_fix::id(), "tpl-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        (tpl_token_v2_set_authority_fix::id(), "tpl-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 trz_{set,get}_return_data syscall"),
996        (reduce_required_deploy_balance::id(), "reduce required payer balance for program deploys"),
997        (trz_log_data_syscall_enabled::id(), "enable trz_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        (tpl_token_v3_3_0_release::id(), "tpl-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        (tpl_associated_token_account_v1_0_4::id(), "TPL Standard Library 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        (tpl_token_v3_4_0::id(), "TPL Standard Library Token Program version 3.4.0 release #24740"),
1043        (tpl_associated_token_account_v1_1_0::id(), "TPL Standard Library 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_trz::id(), "Raise minimum stake delegation to 1.0 TRZ #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 trz_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: trz_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(trezoa_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}