Skip to main content

solana_feature_gate_interface/
lib.rs

1//! Runtime features.
2//!
3//! Runtime features provide a mechanism for features to be simultaneously activated across the
4//! network. Since validators may choose when to upgrade, features must remain dormant until a
5//! sufficient majority of the network is running a version that would support a given feature.
6//!
7//! Feature activation is accomplished by:
8//! 1. Activation is requested by the feature authority, who issues a transaction to create the
9//!    feature account. The newly created feature account will have the value of
10//!    `Feature::default()`
11//! 2. When the next epoch is entered the runtime will check for new activation requests and
12//!    active them.  When this occurs, the activation slot is recorded in the feature account
13#![cfg_attr(docsrs, feature(doc_cfg))]
14
15pub mod error;
16pub mod instruction;
17pub mod state;
18
19#[cfg(feature = "bincode")]
20#[allow(deprecated)]
21pub use crate::instruction::activate;
22#[cfg(feature = "bincode")]
23pub use crate::{
24    instruction::activate_with_lamports,
25    state::{create_account, from_account, to_account},
26};
27pub use {
28    crate::state::Feature,
29    solana_sdk_ids::feature::{check_id, id, ID},
30};