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

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 unused: 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 cluster_type: ClusterType,
    pub evm_root_hash: H256,
    pub evm_chain_id: u64,
}

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: u64unused: 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

cluster_type: ClusterType

network runlevel

evm_root_hash: H256

Initial data for evm part

evm_chain_id: u64

EVM chain id

Implementations

impl GenesisConfig[src]

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

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

pub fn disable_cap_altering_features_for_preciseness(&mut self)[src]

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

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

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

pub fn set_evm_root_hash(&mut self, root_hash: H256)[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 hashes_per_tick(&self) -> Option<u64>[src]

pub fn ticks_per_slot(&self) -> u64[src]

pub fn ns_per_slot(&self) -> u128[src]

pub fn slots_per_year(&self) -> f64[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

impl RefUnwindSafe for GenesisConfig

impl Send for GenesisConfig

impl Sync for GenesisConfig

impl Unpin for GenesisConfig

impl UnwindSafe for GenesisConfig

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> MaybeDebug for T where
    T: Debug
[src]

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

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.

impl<T> Typeable for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]