[][src]Struct solana_sdk::genesis_config::GenesisConfig

pub struct GenesisConfig {
    pub creation_time: UnixTimestamp,
    pub accounts: BTreeMap<Pubkey, Account>,
    pub native_instruction_processors: Vec<(String, Pubkey)>,
    pub rewards_pools: BTreeMap<Pubkey, Account>,
    pub ticks_per_slot: u64,
    pub slots_per_segment: u64,
    pub poh_config: PohConfig,
    pub __backwards_compat_with_v0_23: u64,
    pub fee_rate_governor: FeeRateGovernor,
    pub rent: Rent,
    pub inflation: Inflation,
    pub epoch_schedule: EpochSchedule,
    pub operating_mode: OperatingMode,
}

Fields

creation_time: UnixTimestamp

when the network (bootstrap validator) was started relative to the UNIX Epoch

accounts: BTreeMap<Pubkey, Account>

initial accounts

native_instruction_processors: Vec<(String, Pubkey)>

built-in programs

rewards_pools: BTreeMap<Pubkey, Account>

accounts for network rewards, these do not count towards capitalization

ticks_per_slot: u64slots_per_segment: u64poh_config: PohConfig

network speed configuration

__backwards_compat_with_v0_23: u64

this field exists only to ensure that the binary layout of GenesisConfig remains compatible with the Solana v0.23 release line

fee_rate_governor: FeeRateGovernor

transaction fee config

rent: Rent

rent config

inflation: Inflation

inflation config

epoch_schedule: EpochSchedule

how slots map to epochs

operating_mode: OperatingMode

network runlevel

Methods

impl GenesisConfig[src]

pub fn new(
    accounts: &[(Pubkey, Account)],
    native_instruction_processors: &[(String, Pubkey)]
) -> Self
[src]

pub fn hash(&self) -> Hash[src]

pub fn load(ledger_path: &Path) -> Result<Self, Error>[src]

pub fn write(&self, ledger_path: &Path) -> Result<(), Error>[src]

pub fn add_account(&mut self, pubkey: Pubkey, account: Account)[src]

pub fn add_native_instruction_processor(
    &mut self,
    name: String,
    program_id: Pubkey
)
[src]

pub fn add_rewards_pool(&mut self, pubkey: Pubkey, account: Account)[src]

Trait Implementations

impl Clone for GenesisConfig[src]

impl Debug for GenesisConfig[src]

impl Default for GenesisConfig[src]

impl<'de> Deserialize<'de> for GenesisConfig[src]

impl Display for GenesisConfig[src]

impl Serialize for GenesisConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> InitializableFromZeroed for T where
    T: Default

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.