Skip to main content

cbe_sdk/
feature_set.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 Cartallum CBE 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://ccpl.cartallum.com/feature-proposal#feature-proposal-life-cycle>
9//!
10//! 1. Generate a new keypair with `cbe-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//!    `cbe_sdk::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
21use {
22    lazy_static::lazy_static,
23    cbe_sdk::{
24        clock::Slot,
25        hash::{Hash, Hasher},
26        pubkey::Pubkey,
27    },
28    std::collections::{HashMap, HashSet},
29};
30
31pub mod deprecate_rewards_sysvar {
32    cbe_sdk::declare_id!("GaBtBJvmS4Arjj5W1NmFcyvPjsHN38UGYDq2MDwbs9Qu");
33}
34
35pub mod pico_inflation {
36    cbe_sdk::declare_id!("4RWNif6C2WCNiKVW7otP4G7dkmkHGyKQWRpuZ1pxKU5m");
37}
38
39pub mod full_inflation {
40    pub mod devnet_and_testnet {
41        cbe_sdk::declare_id!("DT4n6ABDqs6w4bnfwrXT9rsprcPf6cdDga1egctaPkLC");
42    }
43
44    pub mod mainnet {
45        pub mod certusone {
46            pub mod vote {
47                cbe_sdk::declare_id!("BzBBveUDymEYoYzcMWNQCx3cd4jQs7puaVFHLtsbB6fm");
48            }
49            pub mod enable {
50                cbe_sdk::declare_id!("7XRJcS5Ud5vxGB54JbK9N2vBZVwnwdBNeJW1ibRgD9gx");
51            }
52        }
53    }
54}
55
56pub mod secp256k1_program_enabled {
57    cbe_sdk::declare_id!("E3PHP7w8kB7np3CTQ1qQ2tW3KCtjRSXBQgW9vM2mWv2Y");
58}
59
60pub mod spl_token_v2_multisig_fix {
61    cbe_sdk::declare_id!("E5JiFDQCwyC6QfT9REFyMpfK2mHcmv1GUDySU1Ue7TYv");
62}
63
64pub mod no_overflow_rent_distribution {
65    cbe_sdk::declare_id!("4kpdyrcj5jS47CZb2oJGfVxjYbsMm2Kx97gFyZrxxwXz");
66}
67
68pub mod filter_stake_delegation_accounts {
69    cbe_sdk::declare_id!("GE7fRxmW46K6EmCD9AMZSbnaJ2e3LfqCZzdHi9hmYAgi");
70}
71
72pub mod require_custodian_for_locked_stake_authorize {
73    cbe_sdk::declare_id!("D4jsDcXaqdW8tDAWn8H4R25Cdns2YwLneujSL1zvjW6R");
74}
75
76pub mod spl_token_v2_self_transfer_fix {
77    cbe_sdk::declare_id!("BL99GYhdjjcv6ys22C9wPgn2aTVERDbPHHo4NbS3hgp7");
78}
79
80pub mod warp_timestamp_again {
81    cbe_sdk::declare_id!("GvDsGDkH5gyzwpDhxNixx8vtx1kwYHH13RiNAPw27zXb");
82}
83
84pub mod check_init_vote_data {
85    cbe_sdk::declare_id!("3ccR6QpxGYsAbWyfevEtBNGfWV4xBffxRj2tD6A9i39F");
86}
87
88pub mod secp256k1_recover_syscall_enabled {
89    cbe_sdk::declare_id!("6RvdSWHh8oh72Dp7wMTS2DBkf3fRPtChfNrAo3cZZoXJ");
90}
91
92pub mod system_transfer_zero_check {
93    cbe_sdk::declare_id!("BrTR9hzw4WBGFP65AJMbpAo64DcA3U6jdPSga9fMV5cS");
94}
95
96pub mod blake3_syscall_enabled {
97    cbe_sdk::declare_id!("HTW2pSyErTj4BV6KBM9NZ9VBUJVxt7sacNWcf76wtzb3");
98}
99
100pub mod dedupe_config_program_signers {
101    cbe_sdk::declare_id!("8kEuAshXLsgkUEdcFVLqrjCGGHVWFW99ZZpxvAzzMtBp");
102}
103
104pub mod verify_tx_signatures_len {
105    cbe_sdk::declare_id!("EVW9B5xD9FFK7vw1SBARwMA4s5eRo5eKJdKpsBikzKBz");
106}
107
108pub mod vote_stake_checked_instructions {
109    cbe_sdk::declare_id!("BcWknVcgvonN8sL4HE4XFuEVgfcee5MwxWPAgP6ZV89X");
110}
111
112pub mod rent_for_sysvars {
113    cbe_sdk::declare_id!("BKCPBQQBZqggVnFso5nQ8rQ4RwwogYwjuUt9biBjxwNF");
114}
115
116pub mod libsecp256k1_0_5_upgrade_enabled {
117    cbe_sdk::declare_id!("DhsYfRjxfnh2g7HKJYSzT79r74Afa1wbHkAgHndrA1oy");
118}
119
120pub mod tx_wide_compute_cap {
121    cbe_sdk::declare_id!("5ekBxc8itEnPv4NzGJtr8BVVQLNMQuLMNQQj7pHoLNZ9");
122}
123
124pub mod spl_token_v2_set_authority_fix {
125    cbe_sdk::declare_id!("FToKNBYyiF4ky9s8WsmLBXHCht17Ek7RXaLZGHzzQhJ1");
126}
127
128pub mod merge_nonce_error_into_system_error {
129    cbe_sdk::declare_id!("21AWDosvp3pBamFW91KB35pNoaoZVTM7ess8nr2nt53B");
130}
131
132pub mod disable_fees_sysvar {
133    cbe_sdk::declare_id!("JAN1trEUEtZjgXYzNBYHU9DYd7GnThhXfFP7SzPXkPsG");
134}
135
136pub mod stake_merge_with_unmatched_credits_observed {
137    cbe_sdk::declare_id!("meRgp4ArRPhD3KtCY9c5yAf2med7mBLsjKTPeVUHqBL");
138}
139
140pub mod zk_token_sdk_enabled {
141    cbe_sdk::declare_id!("zk1snxsc6Fh3wsGNbbHAJNHiJoYgF29mMnTSusGx5EJ");
142}
143
144pub mod curve25519_syscall_enabled {
145    cbe_sdk::declare_id!("7rcw5UtqgDTBBv2EcynNfYckgdAaH1MAsCjKgXMkN7Ri");
146}
147
148pub mod versioned_tx_message_enabled {
149    cbe_sdk::declare_id!("3KZZ6Ks1885aGBQ45fwRcPXVBCtzUvxhUTkwKMR41Tca");
150}
151
152pub mod libsecp256k1_fail_on_bad_count {
153    cbe_sdk::declare_id!("8aXvSuopd1PUj7UhehfXJRg6619RHp8ZvwTyyJHdUYsj");
154}
155
156pub mod libsecp256k1_fail_on_bad_count2 {
157    cbe_sdk::declare_id!("54KAoNiUERNoWWUhTWWwXgym94gzoXFVnHyQwPA18V9A");
158}
159
160pub mod instructions_sysvar_owned_by_sysvar {
161    cbe_sdk::declare_id!("H3kBSaKdeiUsyHmeHqjJYNc27jesXZ6zWj3zWkowQbkV");
162}
163
164pub mod stake_program_advance_activating_credits_observed {
165    cbe_sdk::declare_id!("SAdVFw3RZvzbo6DvySbSdBnHN4gkzSTH9dSxesyKKPj");
166}
167
168pub mod credits_auto_rewind {
169    cbe_sdk::declare_id!("BUS12ciZ5gCoFafUHWW8qaFMMtwFQGVxjsDheWLdqBE2");
170}
171
172pub mod demote_program_write_locks {
173    cbe_sdk::declare_id!("3E3jV7v9VcdJL8iYZUMax9DiDno8j7EWUVbhm9RtShj2");
174}
175
176pub mod ed25519_program_enabled {
177    cbe_sdk::declare_id!("6ppMXNYLhVd7GcsZ5uV11wQEW7spppiMVfqQv5SXhDpX");
178}
179
180pub mod return_data_syscall_enabled {
181    cbe_sdk::declare_id!("DwScAzPUjuv65TMbDnFY7AgwmotzWy3xpEJMXM3hZFaB");
182}
183
184pub mod reduce_required_deploy_balance {
185    cbe_sdk::declare_id!("EBeznQDjcPG8491sFsKZYBi5S5jTVXMpAKNDJMQPS2kq");
186}
187
188pub mod cbe_log_data_syscall_enabled {
189    cbe_sdk::declare_id!("6uaHcKPGUy4J7emLBgUTeufhJdiwhngW6a1R9B7c2ob9");
190}
191
192pub mod stakes_remove_delegation_if_inactive {
193    cbe_sdk::declare_id!("HFpdDDNQjvcXnXKec697HDDsyk6tFoWS2o8fkxuhQZpL");
194}
195
196pub mod do_support_realloc {
197    cbe_sdk::declare_id!("75m6ysz33AfLA5DDEzWM1obBrnPQRSsdVQ2nRmc8Vuu1");
198}
199
200pub mod prevent_calling_precompiles_as_programs {
201    cbe_sdk::declare_id!("4ApgRX3ud6p7LNMJmsuaAcZY5HWctGPr5obAsjB3A54d");
202}
203
204pub mod optimize_epoch_boundary_updates {
205    cbe_sdk::declare_id!("265hPS8k8xJ37ot82KEgjRunsUp5w4n4Q4VwwiN9i9ps");
206}
207
208pub mod remove_native_loader {
209    cbe_sdk::declare_id!("HTTgmruMYRZEntyL3EdCDdnS6e4D5wRq1FA7kQsb66qq");
210}
211
212pub mod send_to_tpu_vote_port {
213    cbe_sdk::declare_id!("C5fh68nJ7uyKAuYZg2x9sEQ5YrVf3dkW6oojNBSc3Jvo");
214}
215
216pub mod requestable_heap_size {
217    cbe_sdk::declare_id!("CCu4boMmfLuqcmfTLPHQiUo22ZdUsXjgzPAURYaWt1Bw");
218}
219
220pub mod disable_fee_calculator {
221    cbe_sdk::declare_id!("2jXx2yDmGysmBKfKYNgLj2DQyAQv6mMk2BPh4eSbyB4H");
222}
223
224pub mod add_compute_budget_program {
225    cbe_sdk::declare_id!("4d5AKtxoh93Dwm1vHXUU3iRATuMndx1c431KgT2td52r");
226}
227
228pub mod nonce_must_be_writable {
229    cbe_sdk::declare_id!("BiCU7M5w8ZCMykVSyhZ7Q3m2SWoR2qrEQ86ERcDX77ME");
230}
231
232pub mod spl_token_v3_3_0_release {
233    cbe_sdk::declare_id!("Ftok2jhqAqxUWEiCVRrfRs9DPppWP8cgTB7NQNKL88mS");
234}
235
236pub mod leave_nonce_on_success {
237    cbe_sdk::declare_id!("E8MkiWZNNPGU6n55jkGzyj8ghUmjCHRmDFdYYFYHxWhQ");
238}
239
240pub mod reject_empty_instruction_without_program {
241    cbe_sdk::declare_id!("9kdtFSrXHQg3hKkbXkQ6trJ3Ja1xpJ22CTFSNAciEwmL");
242}
243
244pub mod fixed_memcpy_nonoverlapping_check {
245    cbe_sdk::declare_id!("36PRUK2Dz6HWYdG9SpjeAsF5F3KxnFCakA2BZMbtMhSb");
246}
247
248pub mod reject_non_rent_exempt_vote_withdraws {
249    cbe_sdk::declare_id!("7txXZZD6Um59YoLMF7XUNimbMjsqsWhc7g2EniiTrmp1");
250}
251
252pub mod evict_invalid_stakes_cache_entries {
253    cbe_sdk::declare_id!("EMX9Q7TVFAmQ9V1CggAkhMzhXSg8ECp7fHrWQX2G1chf");
254}
255
256pub mod allow_votes_to_directly_update_vote_state {
257    cbe_sdk::declare_id!("Ff8b1fBeB86q8cjq47ZhsQLgv5EkHu3G1C99zjUfAzrq");
258}
259
260pub mod cap_accounts_data_len {
261    cbe_sdk::declare_id!("capRxUrBjNkkCpjrJxPGfPaWijB7q3JoDfsWXAnt46r");
262}
263
264pub mod max_tx_account_locks {
265    cbe_sdk::declare_id!("CBkDroRDqm8HwHe6ak9cguPjUomrASEkfmxEaZ5CNNxz");
266}
267
268pub mod require_rent_exempt_accounts {
269    cbe_sdk::declare_id!("BkFDxiJQWZXGTZaJQxH7wVEHkAmwCgSEVkrvswFfRJPD");
270}
271
272pub mod filter_votes_outside_slot_hashes {
273    cbe_sdk::declare_id!("3gtZPqvPpsbXZVCx6hceMfWxtsmrjMzmg8C7PLKSxS2d");
274}
275
276pub mod update_syscall_base_costs {
277    cbe_sdk::declare_id!("2h63t332mGCCsWK2nqqqHhN4U9ayyqhLVFvczznHDoTZ");
278}
279
280pub mod stake_deactivate_delinquent_instruction {
281    cbe_sdk::declare_id!("437r62HoAdUb63amq3D7ENnBLDhHT2xY8eFkLJYVKK4x");
282}
283
284pub mod stake_redelegate_instruction {
285    cbe_sdk::declare_id!("3EPmAX94PvVJCjMeFfRFvj4avqCPL8vv3TGsZQg7ydMx");
286}
287
288pub mod vote_withdraw_authority_may_change_authorized_voter {
289    cbe_sdk::declare_id!("AVZS3ZsN4gi6Rkx2QUibYuSJG3S6QHib7xCYhG6vGJxU");
290}
291
292pub mod spl_associated_token_account_v1_0_4 {
293    cbe_sdk::declare_id!("FaTa4SpiaSNH44PGC4z8bnGVTkSRYaWvrBs3KTu8XQQq");
294}
295
296pub mod reject_vote_account_close_unless_zero_credit_epoch {
297    cbe_sdk::declare_id!("ALBk3EWdeAg2WAGf6GPDUf1nynyNqCdEVmgouG7rpuCj");
298}
299
300pub mod add_get_processed_sibling_instruction_syscall {
301    cbe_sdk::declare_id!("CFK1hRCNy8JJuAAY8Pb2GjLFNdCThS2qwZNe3izzBMgn");
302}
303
304pub mod bank_transaction_count_fix {
305    cbe_sdk::declare_id!("Vo5siZ442SaZBKPXNocthiXysNviW4UYPwRFggmbgAp");
306}
307
308pub mod disable_bpf_deprecated_load_instructions {
309    cbe_sdk::declare_id!("3XgNukcZWf9o3HdA3fpJbm94XFc4qpvTXc8h1wxYwiPi");
310}
311
312pub mod disable_bpf_unresolved_symbols_at_runtime {
313    cbe_sdk::declare_id!("4yuaYAj2jGMGTh1sSmi4G2eFscsDq8qjugJXZoBN6YEa");
314}
315
316pub mod record_instruction_in_transaction_context_push {
317    cbe_sdk::declare_id!("3aJdcZqxoLpSBxgeYGjPwaYS1zzcByxUDqJkbzWAH1Zb");
318}
319
320pub mod syscall_saturated_math {
321    cbe_sdk::declare_id!("HyrbKftCdJ5CrUfEti6x26Cj7rZLNe32weugk7tLcWb8");
322}
323
324pub mod check_physical_overlapping {
325    cbe_sdk::declare_id!("nWBqjr3gpETbiaVj3CBJ3HFC5TMdnJDGt21hnvSTvVZ");
326}
327
328pub mod limit_secp256k1_recovery_id {
329    cbe_sdk::declare_id!("7g9EUwj4j7CS21Yx1wvgWLjSZeh5aPq8x9kpoPwXM8n8");
330}
331
332pub mod disable_deprecated_loader {
333    cbe_sdk::declare_id!("GTUMCZ8LTNxVfxdrw7ZsDFTxXb7TutYkzJnFwinpE6dg");
334}
335
336pub mod check_slice_translation_size {
337    cbe_sdk::declare_id!("GmC19j9qLn2RFk5NduX6QXaDhVpGncVVBzyM8e9WMz2F");
338}
339
340pub mod stake_split_uses_rent_sysvar {
341    cbe_sdk::declare_id!("FQnc7U4koHqWgRvFaBJjZnV8VPg6L6wWK33yJeDp4yvV");
342}
343
344pub mod add_get_minimum_delegation_instruction_to_stake_program {
345    cbe_sdk::declare_id!("St8k9dVXP97xT6faW24YmRSYConLbhsMJA4TJTBLmMT");
346}
347
348pub mod error_on_syscall_bpf_function_hash_collisions {
349    cbe_sdk::declare_id!("8199Q2gMD2kwgfopK5qqVWuDbegLgpuFUFHCcUJQDN8b");
350}
351
352pub mod reject_callx_r10 {
353    cbe_sdk::declare_id!("3NKRSwpySNwD3TvP5pHnRmkAQRsdkXWRr1WaQh8p4PWX");
354}
355
356pub mod drop_redundant_turbine_path {
357    cbe_sdk::declare_id!("4Di3y24QFLt5QEUPZtbnjyfQKfm6ZMTfa6Dw1psfoMKU");
358}
359
360pub mod executables_incur_cpi_data_cost {
361    cbe_sdk::declare_id!("7GUcYgq4tVtaqNCKT3dho9r4665Qp5TxCZ27Qgjx3829");
362}
363
364pub mod fix_recent_blockhashes {
365    cbe_sdk::declare_id!("6iyggb5MTcsvdcugX7bEKbHV8c6jdLbpHwkncrgLMhfo");
366}
367
368pub mod update_rewards_from_cached_accounts {
369    cbe_sdk::declare_id!("28s7i3htzhahXQKqmS2ExzbEoUypg9krwvtK2M9UWXh9");
370}
371
372pub mod spl_token_v3_4_0 {
373    cbe_sdk::declare_id!("Ftok4njE8b7tDffYkC5bAbCaQv5sL6jispYrprzatUwN");
374}
375
376pub mod spl_associated_token_account_v1_1_0 {
377    cbe_sdk::declare_id!("FaTa17gVKoqbh38HcfiQonPsAaQViyDCCSg71AubYZw8");
378}
379
380pub mod default_units_per_instruction {
381    cbe_sdk::declare_id!("J2QdYx8crLbTVK8nur1jeLsmc3krDbfjoxoea2V1Uy5Q");
382}
383
384pub mod stake_allow_zero_undelegated_amount {
385    cbe_sdk::declare_id!("sTKz343FM8mqtyGvYWvbLpTThw3ixRM4Xk8QvZ985mw");
386}
387
388pub mod require_static_program_ids_in_transaction {
389    cbe_sdk::declare_id!("8FdwgyHFEjhAdjWfV2vfqk7wA1g9X3fQpKH7SBpEv3kC");
390}
391
392pub mod stake_raise_minimum_delegation_to_1_cbc {
393    // This is a feature-proposal *feature id*.  The feature keypair address is `3YHAo6wWw5rDbQxb59BmJkQ3XwVhX3m8tdBVbtxnJmma`.
394    cbe_sdk::declare_id!("4xmyBuR2VCXzy9H6qYpH9ckfgnTuMDQFPFBfTs4eBCY1");
395}
396
397pub mod stake_minimum_delegation_for_rewards {
398    cbe_sdk::declare_id!("ELjxSXwNsyXGfAh8TqX8ih22xeT8huF6UngQirbLKYKH");
399}
400
401pub mod add_set_compute_unit_price_ix {
402    cbe_sdk::declare_id!("98std1NSHqXi9WYvFShfVepRdCoq1qvsp8fsR2XZtG8g");
403}
404
405pub mod disable_deploy_of_alloc_free_syscall {
406    cbe_sdk::declare_id!("79HWsX9rpnnJBPcdNURVqygpMAfxdrAirzAGAVmf92im");
407}
408
409pub mod include_account_index_in_rent_error {
410    cbe_sdk::declare_id!("2R72wpcQ7qV7aTJWUumdn8u5wmmTyXbK7qzEy7YSAgyY");
411}
412
413pub mod add_shred_type_to_shred_seed {
414    cbe_sdk::declare_id!("Ds87KVeqhbv7Jw8W6avsS1mqz3Mw5J3pRTpPoDQ2QdiJ");
415}
416
417pub mod warp_timestamp_with_a_vengeance {
418    cbe_sdk::declare_id!("3BX6SBeEBibHaVQXywdkcgyUk6evfYZkHdztXiDtEpFS");
419}
420
421pub mod separate_nonce_from_blockhash {
422    cbe_sdk::declare_id!("Gea3ZkK2N4pHuVZVxWcnAtS6UEDdyumdYt4pFcKjA3ar");
423}
424
425pub mod enable_durable_nonce {
426    cbe_sdk::declare_id!("4EJQtF2pkRyawwcTVfQutzq4Sa5hRhibF6QAK1QXhtEX");
427}
428
429pub mod vote_state_update_credit_per_dequeue {
430    cbe_sdk::declare_id!("CveezY6FDLVBToHDcvJRmtMouqzsmj4UXYh5ths5G5Uv");
431}
432
433pub mod quick_bail_on_panic {
434    cbe_sdk::declare_id!("DpJREPyuMZ5nDfU6H3WTqSqUFSXAfw8u7xqmWtEwJDcP");
435}
436
437pub mod nonce_must_be_authorized {
438    cbe_sdk::declare_id!("HxrEu1gXuH7iD3Puua1ohd5n4iUKJyFNtNxk9DVJkvgr");
439}
440
441pub mod nonce_must_be_advanceable {
442    cbe_sdk::declare_id!("3u3Er5Vc2jVcwz4xr2GJeSAXT3fAj6ADHZ4BJMZiScFd");
443}
444
445pub mod vote_authorize_with_seed {
446    cbe_sdk::declare_id!("6tRxEYKuy2L5nnv5bgn7iT28MxUbYxp5h7F3Ncf1exrT");
447}
448
449pub mod cap_accounts_data_size_per_block {
450    cbe_sdk::declare_id!("qywiJyZmqTKspFg2LeuUHqcA5nNvBgobqb9UprywS9N");
451}
452
453pub mod preserve_rent_epoch_for_rent_exempt_accounts {
454    cbe_sdk::declare_id!("HH3MUYReL2BvqqA3oEcAa7txju5GY6G4nxJ51zvsEjEZ");
455}
456
457pub mod enable_bpf_loader_extend_program_ix {
458    cbe_sdk::declare_id!("8Zs9W7D9MpSEtUWSQdGniZk2cNmV22y6FLJwCx53asme");
459}
460
461pub mod enable_early_verification_of_account_modifications {
462    cbe_sdk::declare_id!("7Vced912WrRnfjaiKRiNBcbuFw7RrnLv3E3z95Y4GTNc");
463}
464
465pub mod skip_rent_rewrites {
466    cbe_sdk::declare_id!("CGB2jM8pwZkeeiXQ66kBMyBR6Np61mggL7XUsmLjVcrw");
467}
468
469pub mod prevent_crediting_accounts_that_end_rent_paying {
470    cbe_sdk::declare_id!("812kqX67odAp5NFwM8D2N24cku7WTm9CHUTFUXaDkWPn");
471}
472
473pub mod cap_bpf_program_instruction_accounts {
474    cbe_sdk::declare_id!("9k5ijzTbYPtjzu8wj2ErH9v45xecHzQ1x4PMYMMxFgdM");
475}
476
477pub mod loosen_cpi_size_restriction {
478    cbe_sdk::declare_id!("GDH5TVdbTPUpRnXaRyQqiKUa7uZAbZ28Q2N9bhbKoMLm");
479}
480
481pub mod use_default_units_in_fee_calculation {
482    cbe_sdk::declare_id!("8sKQrMQoUHtQSUP83SPG4ta2JDjSAiWs7t5aJ9uEd6To");
483}
484
485pub mod compact_vote_state_updates {
486    cbe_sdk::declare_id!("86HpNqzutEZwLcPxS6EHDcMNYWk6ikhteg9un7Y2PBKE");
487}
488
489pub mod incremental_snapshot_only_incremental_hash_calculation {
490    cbe_sdk::declare_id!("25vqsfjk7Nv1prsQJmA4Xu1bN61s8LXCBGUPp8Rfy1UF");
491}
492
493pub mod disable_cpi_setting_executable_and_rent_epoch {
494    cbe_sdk::declare_id!("B9cdB55u4jQsDNsdTK525yE9dmSc5Ga7YBaBrDFvEhM9");
495}
496
497pub mod on_load_preserve_rent_epoch_for_rent_exempt_accounts {
498    cbe_sdk::declare_id!("CpkdQmspsaZZ8FVAouQTtTWZkc8eeQ7V3uj7dWz543rZ");
499}
500
501pub mod account_hash_ignore_slot {
502    cbe_sdk::declare_id!("SVn36yVApPLYsa8koK3qUcy14zXDnqkNYWyUh1f4oK1");
503}
504
505pub mod set_exempt_rent_epoch_max {
506    cbe_sdk::declare_id!("5wAGiy15X1Jb2hkHnPDCM8oB9V42VNA9ftNVFK84dEgv");
507}
508
509pub mod relax_authority_signer_check_for_lookup_table_creation {
510    cbe_sdk::declare_id!("FKAcEvNgSY79RpqsPNUV5gDyumopH4cEHqUxyfm8b8Ap");
511}
512
513pub mod stop_sibling_instruction_search_at_parent {
514    cbe_sdk::declare_id!("EYVpEP7uzH1CoXzbD6PubGhYmnxRXPeq3PPsm1ba3gpo");
515}
516
517pub mod vote_state_update_root_fix {
518    cbe_sdk::declare_id!("G74BkWBzmsByZ1kxHy44H3wjwp5hp7JbrGRuDpco22tY");
519}
520
521pub mod cap_accounts_data_allocations_per_transaction {
522    cbe_sdk::declare_id!("9gxu85LYRAcZL38We8MYJ4A9AwgBBPtVBAqebMcT1241");
523}
524
525pub mod epoch_accounts_hash {
526    cbe_sdk::declare_id!("5GpmAKxaGsWWbPp4bNXFLJxZVvG92ctxf7jQnzTQjF3n");
527}
528
529pub mod remove_deprecated_request_unit_ix {
530    cbe_sdk::declare_id!("EfhYd3SafzGT472tYQDUc4dPd2xdEfKs5fwkowUgVt4W");
531}
532
533pub mod disable_rehash_for_rent_epoch {
534    cbe_sdk::declare_id!("DTVTkmw3JSofd8CJVJte8PXEbxNQ2yZijvVr3pe2APPj");
535}
536
537pub mod increase_tx_account_lock_limit {
538    cbe_sdk::declare_id!("9LZdXeKGeBV6hRLdxS1rHbHoEUsKqesCC2ZAPTPKJAbK");
539}
540
541pub mod limit_max_instruction_trace_length {
542    cbe_sdk::declare_id!("GQALDaC48fEhZGWRj9iL5Q889emJKcj3aCvHF7VCbbF4");
543}
544
545pub mod check_syscall_outputs_do_not_overlap {
546    cbe_sdk::declare_id!("3uRVPBpyEJRo1emLCrq38eLRFGcu6uKSpUXqGvU8T7SZ");
547}
548
549pub mod enable_bpf_loader_set_authority_checked_ix {
550    cbe_sdk::declare_id!("5x3825XS7M2A3Ekbn5VGGkvFoAg5qrRWkTrY4bARP1GL");
551}
552
553pub mod cap_transaction_accounts_data_size {
554    cbe_sdk::declare_id!("DdLwVYuvDz26JohmgSbA7mjpJFgX5zP2dkp8qsF2C33V");
555}
556
557pub mod enable_alt_bn128_syscall {
558    cbe_sdk::declare_id!("A16q37opZdQMCbe5qJ6xpBB9usykfv8jZaMkxvZQi4GJ");
559}
560
561pub mod enable_program_redeployment_cooldown {
562    cbe_sdk::declare_id!("J4HFT8usBxpcF63y46t1upYobJgChmKyZPm5uTBRg25Z");
563}
564
565pub mod commission_updates_only_allowed_in_first_half_of_epoch {
566    cbe_sdk::declare_id!("noRuG2kzACwgaY7TVmLRnUNPLKNVQE1fb7X55YWBehp");
567}
568
569pub mod enable_turbine_fanout_experiments {
570    cbe_sdk::declare_id!("D31EFnLgdiysi84Woo3of4JMu7VmasUS3Z7j9HYXCeLY");
571}
572
573pub mod disable_turbine_fanout_experiments {
574    cbe_sdk::declare_id!("Gz1aLrbeQ4Q6PTSafCZcGWZXz91yVRi7ASFzFEr1U4sa");
575}
576
577pub mod move_serialized_len_ptr_in_cpi {
578    cbe_sdk::declare_id!("74CoWuBmt3rUVUrCb2JiSTvh6nXyBWUsK4SaMj3CtE3T");
579}
580
581pub mod update_hashes_per_tick {
582    cbe_sdk::declare_id!("3uFHb9oKdGfgZGJK9EHaAXN4USvnQtAFC13Fh5gGFS5B");
583}
584
585lazy_static! {
586    /// Map of feature identifiers to user-visible description
587    pub static ref FEATURE_NAMES: HashMap<Pubkey, &'static str> = [
588        (secp256k1_program_enabled::id(), "secp256k1 program"),
589        (deprecate_rewards_sysvar::id(), "deprecate unused rewards sysvar"),
590        (pico_inflation::id(), "pico inflation"),
591        (full_inflation::devnet_and_testnet::id(), "full inflation on devnet and testnet"),
592        (spl_token_v2_multisig_fix::id(), "spl-token multisig fix"),
593        (no_overflow_rent_distribution::id(), "no overflow rent distribution"),
594        (filter_stake_delegation_accounts::id(), "filter stake_delegation_accounts #14062"),
595        (require_custodian_for_locked_stake_authorize::id(), "require custodian to authorize withdrawer change for locked stake"),
596        (spl_token_v2_self_transfer_fix::id(), "spl-token self-transfer fix"),
597        (full_inflation::mainnet::certusone::enable::id(), "full inflation enabled by Certus One"),
598        (full_inflation::mainnet::certusone::vote::id(), "community vote allowing Certus One to enable full inflation"),
599        (warp_timestamp_again::id(), "warp timestamp again, adjust bounding to 25% fast 80% slow #15204"),
600        (check_init_vote_data::id(), "check initialized Vote data"),
601        (secp256k1_recover_syscall_enabled::id(), "secp256k1_recover syscall"),
602        (system_transfer_zero_check::id(), "perform all checks for transfers of 0 scoobies"),
603        (blake3_syscall_enabled::id(), "blake3 syscall"),
604        (dedupe_config_program_signers::id(), "dedupe config program signers"),
605        (verify_tx_signatures_len::id(), "prohibit extra transaction signatures"),
606        (vote_stake_checked_instructions::id(), "vote/state program checked instructions #18345"),
607        (rent_for_sysvars::id(), "collect rent from accounts owned by sysvars"),
608        (libsecp256k1_0_5_upgrade_enabled::id(), "upgrade libsecp256k1 to v0.5.0"),
609        (tx_wide_compute_cap::id(), "transaction wide compute cap"),
610        (spl_token_v2_set_authority_fix::id(), "spl-token set_authority fix"),
611        (merge_nonce_error_into_system_error::id(), "merge NonceError into SystemError"),
612        (disable_fees_sysvar::id(), "disable fees sysvar"),
613        (stake_merge_with_unmatched_credits_observed::id(), "allow merging active stakes with unmatched credits_observed #18985"),
614        (zk_token_sdk_enabled::id(), "enable Zk Token proof program and syscalls"),
615        (curve25519_syscall_enabled::id(), "enable curve25519 syscalls"),
616        (versioned_tx_message_enabled::id(), "enable versioned transaction message processing"),
617        (libsecp256k1_fail_on_bad_count::id(), "fail libsec256k1_verify if count appears wrong"),
618        (libsecp256k1_fail_on_bad_count2::id(), "fail libsec256k1_verify if count appears wrong"),
619        (instructions_sysvar_owned_by_sysvar::id(), "fix owner for instructions sysvar"),
620        (stake_program_advance_activating_credits_observed::id(), "Enable advancing credits observed for activation epoch #19309"),
621        (credits_auto_rewind::id(), "Auto rewind stake's credits_observed if (accidental) vote recreation is detected #22546"),
622        (demote_program_write_locks::id(), "demote program write locks to readonly, except when upgradeable loader present #19593 #20265"),
623        (ed25519_program_enabled::id(), "enable builtin ed25519 signature verify program"),
624        (return_data_syscall_enabled::id(), "enable cbe_{set,get}_return_data syscall"),
625        (reduce_required_deploy_balance::id(), "reduce required payer balance for program deploys"),
626        (cbe_log_data_syscall_enabled::id(), "enable cbe_log_data syscall"),
627        (stakes_remove_delegation_if_inactive::id(), "remove delegations from stakes cache when inactive"),
628        (do_support_realloc::id(), "support account data reallocation"),
629        (prevent_calling_precompiles_as_programs::id(), "prevent calling precompiles as programs"),
630        (optimize_epoch_boundary_updates::id(), "optimize epoch boundary updates"),
631        (remove_native_loader::id(), "remove support for the native loader"),
632        (send_to_tpu_vote_port::id(), "send votes to the tpu vote port"),
633        (requestable_heap_size::id(), "Requestable heap frame size"),
634        (disable_fee_calculator::id(), "deprecate fee calculator"),
635        (add_compute_budget_program::id(), "Add compute_budget_program"),
636        (nonce_must_be_writable::id(), "nonce must be writable"),
637        (spl_token_v3_3_0_release::id(), "spl-token v3.3.0 release"),
638        (leave_nonce_on_success::id(), "leave nonce as is on success"),
639        (reject_empty_instruction_without_program::id(), "fail instructions which have native_loader as program_id directly"),
640        (fixed_memcpy_nonoverlapping_check::id(), "use correct check for nonoverlapping regions in memcpy syscall"),
641        (reject_non_rent_exempt_vote_withdraws::id(), "fail vote withdraw instructions which leave the account non-rent-exempt"),
642        (evict_invalid_stakes_cache_entries::id(), "evict invalid stakes cache entries on epoch boundaries"),
643        (allow_votes_to_directly_update_vote_state::id(), "enable direct vote state update"),
644        (cap_accounts_data_len::id(), "cap the accounts data len"),
645        (max_tx_account_locks::id(), "enforce max number of locked accounts per transaction"),
646        (require_rent_exempt_accounts::id(), "require all new transaction accounts with data to be rent-exempt"),
647        (filter_votes_outside_slot_hashes::id(), "filter vote slots older than the slot hashes history"),
648        (update_syscall_base_costs::id(), "update syscall base costs"),
649        (stake_deactivate_delinquent_instruction::id(), "enable the deactivate delinquent stake instruction #23932"),
650        (vote_withdraw_authority_may_change_authorized_voter::id(), "vote account withdraw authority may change the authorized voter #22521"),
651        (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"),
652        (reject_vote_account_close_unless_zero_credit_epoch::id(), "fail vote account withdraw to 0 unless account earned 0 credits in last completed epoch"),
653        (add_get_processed_sibling_instruction_syscall::id(), "add add_get_processed_sibling_instruction_syscall"),
654        (bank_transaction_count_fix::id(), "fixes Bank::transaction_count to include all committed transactions, not just successful ones"),
655        (disable_bpf_deprecated_load_instructions::id(), "disable ldabs* and ldind* SBF instructions"),
656        (disable_bpf_unresolved_symbols_at_runtime::id(), "disable reporting of unresolved SBF symbols at runtime"),
657        (record_instruction_in_transaction_context_push::id(), "move the CPI stack overflow check to the end of push"),
658        (syscall_saturated_math::id(), "syscalls use saturated math"),
659        (check_physical_overlapping::id(), "check physical overlapping regions"),
660        (limit_secp256k1_recovery_id::id(), "limit secp256k1 recovery id"),
661        (disable_deprecated_loader::id(), "disable the deprecated BPF loader"),
662        (check_slice_translation_size::id(), "check size when translating slices"),
663        (stake_split_uses_rent_sysvar::id(), "stake split instruction uses rent sysvar"),
664        (add_get_minimum_delegation_instruction_to_stake_program::id(), "add GetMinimumDelegation instruction to stake program"),
665        (error_on_syscall_bpf_function_hash_collisions::id(), "error on bpf function hash collisions"),
666        (reject_callx_r10::id(), "Reject bpf callx r10 instructions"),
667        (drop_redundant_turbine_path::id(), "drop redundant turbine path"),
668        (executables_incur_cpi_data_cost::id(), "Executables incur CPI data costs"),
669        (fix_recent_blockhashes::id(), "stop adding hashes for skipped slots to recent blockhashes"),
670        (update_rewards_from_cached_accounts::id(), "update rewards from cached accounts"),
671        (spl_token_v3_4_0::id(), "SPL Token Program version 3.4.0 release #24740"),
672        (spl_associated_token_account_v1_1_0::id(), "SPL Associated Token Account Program version 1.1.0 release #24741"),
673        (default_units_per_instruction::id(), "Default max tx-wide compute units calculated per instruction"),
674        (stake_allow_zero_undelegated_amount::id(), "Allow zero-scoobie undelegated amount for initialized stakes #24670"),
675        (require_static_program_ids_in_transaction::id(), "require static program ids in versioned transactions"),
676        (stake_raise_minimum_delegation_to_1_cbc::id(), "Raise minimum stake delegation to 1.0 CBC #24357"),
677        (stake_minimum_delegation_for_rewards::id(), "stakes must be at least the minimum delegation to earn rewards"),
678        (add_set_compute_unit_price_ix::id(), "add compute budget ix for setting a compute unit price"),
679        (disable_deploy_of_alloc_free_syscall::id(), "disable new deployments of deprecated cbe_alloc_free_ syscall"),
680        (include_account_index_in_rent_error::id(), "include account index in rent tx error #25190"),
681        (add_shred_type_to_shred_seed::id(), "add shred-type to shred seed #25556"),
682        (warp_timestamp_with_a_vengeance::id(), "warp timestamp again, adjust bounding to 150% slow #25666"),
683        (separate_nonce_from_blockhash::id(), "separate durable nonce and blockhash domains #25744"),
684        (enable_durable_nonce::id(), "enable durable nonce #25744"),
685        (vote_state_update_credit_per_dequeue::id(), "Calculate vote credits for VoteStateUpdate per vote dequeue to match credit awards for Vote instruction"),
686        (quick_bail_on_panic::id(), "quick bail on panic"),
687        (nonce_must_be_authorized::id(), "nonce must be authorized"),
688        (nonce_must_be_advanceable::id(), "durable nonces must be advanceable"),
689        (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"),
690        (cap_accounts_data_size_per_block::id(), "cap the accounts data size per block #25517"),
691        (stake_redelegate_instruction::id(), "enable the redelegate stake instruction #26294"),
692        (preserve_rent_epoch_for_rent_exempt_accounts::id(), "preserve rent epoch for rent exempt accounts #26479"),
693        (enable_bpf_loader_extend_program_ix::id(), "enable bpf upgradeable loader ExtendProgram instruction #25234"),
694        (skip_rent_rewrites::id(), "skip rewriting rent exempt accounts during rent collection #26491"),
695        (enable_early_verification_of_account_modifications::id(), "enable early verification of account modifications #25899"),
696        (disable_rehash_for_rent_epoch::id(), "on accounts hash calculation, do not try to rehash accounts #28934"),
697        (account_hash_ignore_slot::id(), "ignore slot when calculating an account hash #28420"),
698        (set_exempt_rent_epoch_max::id(), "set rent epoch to Epoch::MAX for rent-exempt accounts #28683"),
699        (on_load_preserve_rent_epoch_for_rent_exempt_accounts::id(), "on bank load account, do not try to fix up rent_epoch #28541"),
700        (prevent_crediting_accounts_that_end_rent_paying::id(), "prevent crediting rent paying accounts #26606"),
701        (cap_bpf_program_instruction_accounts::id(), "enforce max number of accounts per bpf program instruction #26628"),
702        (loosen_cpi_size_restriction::id(), "loosen cpi size restrictions #26641"),
703        (use_default_units_in_fee_calculation::id(), "use default units per instruction in fee calculation #26785"),
704        (compact_vote_state_updates::id(), "Compact vote state updates to lower block size"),
705        (incremental_snapshot_only_incremental_hash_calculation::id(), "only hash accounts in incremental snapshot during incremental snapshot creation #26799"),
706        (disable_cpi_setting_executable_and_rent_epoch::id(), "disable setting is_executable and_rent_epoch in CPI #26987"),
707        (relax_authority_signer_check_for_lookup_table_creation::id(), "relax authority signer check for lookup table creation #27205"),
708        (stop_sibling_instruction_search_at_parent::id(), "stop the search in get_processed_sibling_instruction when the parent instruction is reached #27289"),
709        (vote_state_update_root_fix::id(), "fix root in vote state updates #27361"),
710        (cap_accounts_data_allocations_per_transaction::id(), "cap accounts data allocations per transaction #27375"),
711        (epoch_accounts_hash::id(), "enable epoch accounts hash calculation #27539"),
712        (remove_deprecated_request_unit_ix::id(), "remove support for RequestUnitsDeprecated instruction #27500"),
713        (increase_tx_account_lock_limit::id(), "increase tx account lock limit to 128 #27241"),
714        (limit_max_instruction_trace_length::id(), "limit max instruction trace length #27939"),
715        (check_syscall_outputs_do_not_overlap::id(), "check syscall outputs do_not overlap #28600"),
716        (enable_bpf_loader_set_authority_checked_ix::id(), "enable bpf upgradeable loader SetAuthorityChecked instruction #28424"),
717        (cap_transaction_accounts_data_size::id(), "cap transaction accounts data size up to its compute unit limits #27839"),
718        (enable_alt_bn128_syscall::id(), "add alt_bn128 syscalls #27961"),
719        (enable_program_redeployment_cooldown::id(), "enable program redeployment cooldown #29135"),
720        (commission_updates_only_allowed_in_first_half_of_epoch::id(), "validator commission updates are only allowed in the first half of an epoch #29362"),
721        (enable_turbine_fanout_experiments::id(), "enable turbine fanout experiments #29393"),
722        (disable_turbine_fanout_experiments::id(), "disable turbine fanout experiments #29393"),
723        (move_serialized_len_ptr_in_cpi::id(), "cpi ignore serialized_len_ptr #29592"),
724        (update_hashes_per_tick::id(), "Update desired hashes per tick on epoch boundary"),
725        /*************** ADD NEW FEATURES HERE ***************/
726    ]
727    .iter()
728    .cloned()
729    .collect();
730
731    /// Unique identifier of the current software's feature set
732    pub static ref ID: Hash = {
733        let mut hasher = Hasher::default();
734        let mut feature_ids = FEATURE_NAMES.keys().collect::<Vec<_>>();
735        feature_ids.sort();
736        for feature in feature_ids {
737            hasher.hash(feature.as_ref());
738        }
739        hasher.result()
740    };
741}
742
743#[derive(Clone, PartialEq, Eq, Hash)]
744pub struct FullInflationFeaturePair {
745    pub vote_id: Pubkey, // Feature that grants the candidate the ability to enable full inflation
746    pub enable_id: Pubkey, // Feature to enable full inflation by the candidate
747}
748
749lazy_static! {
750    /// Set of feature pairs that once enabled will trigger full inflation
751    pub static ref FULL_INFLATION_FEATURE_PAIRS: HashSet<FullInflationFeaturePair> = [
752        FullInflationFeaturePair {
753            vote_id: full_inflation::mainnet::certusone::vote::id(),
754            enable_id: full_inflation::mainnet::certusone::enable::id(),
755        },
756    ]
757    .iter()
758    .cloned()
759    .collect();
760}
761
762/// `FeatureSet` holds the set of currently active/inactive runtime features
763#[derive(AbiExample, Debug, Clone, Eq, PartialEq)]
764pub struct FeatureSet {
765    pub active: HashMap<Pubkey, Slot>,
766    pub inactive: HashSet<Pubkey>,
767}
768impl Default for FeatureSet {
769    fn default() -> Self {
770        // All features disabled
771        Self {
772            active: HashMap::new(),
773            inactive: FEATURE_NAMES.keys().cloned().collect(),
774        }
775    }
776}
777impl FeatureSet {
778    pub fn is_active(&self, feature_id: &Pubkey) -> bool {
779        self.active.contains_key(feature_id)
780    }
781
782    pub fn activated_slot(&self, feature_id: &Pubkey) -> Option<Slot> {
783        self.active.get(feature_id).copied()
784    }
785
786    /// List of enabled features that trigger full inflation
787    pub fn full_inflation_features_enabled(&self) -> HashSet<Pubkey> {
788        let mut hash_set = FULL_INFLATION_FEATURE_PAIRS
789            .iter()
790            .filter_map(|pair| {
791                if self.is_active(&pair.vote_id) && self.is_active(&pair.enable_id) {
792                    Some(pair.enable_id)
793                } else {
794                    None
795                }
796            })
797            .collect::<HashSet<_>>();
798
799        if self.is_active(&full_inflation::devnet_and_testnet::id()) {
800            hash_set.insert(full_inflation::devnet_and_testnet::id());
801        }
802        hash_set
803    }
804
805    /// All features enabled, useful for testing
806    pub fn all_enabled() -> Self {
807        Self {
808            active: FEATURE_NAMES.keys().cloned().map(|key| (key, 0)).collect(),
809            inactive: HashSet::new(),
810        }
811    }
812
813    /// Activate a feature
814    pub fn activate(&mut self, feature_id: &Pubkey, slot: u64) {
815        self.inactive.remove(feature_id);
816        self.active.insert(*feature_id, slot);
817    }
818
819    /// Deactivate a feature
820    pub fn deactivate(&mut self, feature_id: &Pubkey) {
821        self.active.remove(feature_id);
822        self.inactive.insert(*feature_id);
823    }
824}
825
826#[cfg(test)]
827mod test {
828    use super::*;
829
830    #[test]
831    fn test_full_inflation_features_enabled_devnet_and_testnet() {
832        let mut feature_set = FeatureSet::default();
833        assert!(feature_set.full_inflation_features_enabled().is_empty());
834        feature_set
835            .active
836            .insert(full_inflation::devnet_and_testnet::id(), 42);
837        assert_eq!(
838            feature_set.full_inflation_features_enabled(),
839            [full_inflation::devnet_and_testnet::id()]
840                .iter()
841                .cloned()
842                .collect()
843        );
844    }
845
846    #[test]
847    fn test_full_inflation_features_enabled() {
848        // Normal sequence: vote_id then enable_id
849        let mut feature_set = FeatureSet::default();
850        assert!(feature_set.full_inflation_features_enabled().is_empty());
851        feature_set
852            .active
853            .insert(full_inflation::mainnet::certusone::vote::id(), 42);
854        assert!(feature_set.full_inflation_features_enabled().is_empty());
855        feature_set
856            .active
857            .insert(full_inflation::mainnet::certusone::enable::id(), 42);
858        assert_eq!(
859            feature_set.full_inflation_features_enabled(),
860            [full_inflation::mainnet::certusone::enable::id()]
861                .iter()
862                .cloned()
863                .collect()
864        );
865
866        // Backwards sequence: enable_id and then vote_id
867        let mut feature_set = FeatureSet::default();
868        assert!(feature_set.full_inflation_features_enabled().is_empty());
869        feature_set
870            .active
871            .insert(full_inflation::mainnet::certusone::enable::id(), 42);
872        assert!(feature_set.full_inflation_features_enabled().is_empty());
873        feature_set
874            .active
875            .insert(full_inflation::mainnet::certusone::vote::id(), 42);
876        assert_eq!(
877            feature_set.full_inflation_features_enabled(),
878            [full_inflation::mainnet::certusone::enable::id()]
879                .iter()
880                .cloned()
881                .collect()
882        );
883    }
884
885    #[test]
886    fn test_feature_set_activate_deactivate() {
887        let mut feature_set = FeatureSet::default();
888
889        let feature = Pubkey::new_unique();
890        assert!(!feature_set.is_active(&feature));
891        feature_set.activate(&feature, 0);
892        assert!(feature_set.is_active(&feature));
893        feature_set.deactivate(&feature);
894        assert!(!feature_set.is_active(&feature));
895    }
896}