pub struct GenesisConfig {Show 13 fields
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,
}Fields§
§creation_time: UnixTimestampwhen 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: u64§unused: u64§poh_config: PohConfignetwork speed configuration
__backwards_compat_with_v0_23: u64this field exists only to ensure that the binary layout of GenesisConfig remains compatible with the Cartallum CBE v0.23 release line
fee_rate_governor: FeeRateGovernortransaction fee config
rent: Rentrent config
inflation: Inflationinflation config
epoch_schedule: EpochSchedulehow slots map to epochs
cluster_type: ClusterTypenetwork runlevel
Implementations§
Source§impl GenesisConfig
impl GenesisConfig
pub fn new( accounts: &[(Pubkey, AccountSharedData)], native_instruction_processors: &[(String, Pubkey)], ) -> Self
pub fn hash(&self) -> Hash
pub fn load(ledger_path: &Path) -> Result<Self, Error>
pub fn write(&self, ledger_path: &Path) -> Result<(), Error>
pub fn add_account(&mut self, pubkey: Pubkey, account: AccountSharedData)
pub fn add_native_instruction_processor( &mut self, name: String, program_id: Pubkey, )
pub fn hashes_per_tick(&self) -> Option<u64>
pub fn ticks_per_slot(&self) -> u64
pub fn ns_per_slot(&self) -> u128
pub fn slots_per_year(&self) -> f64
Trait Implementations§
Source§impl AbiExample for GenesisConfig
impl AbiExample for GenesisConfig
Source§impl Clone for GenesisConfig
impl Clone for GenesisConfig
Source§fn clone(&self) -> GenesisConfig
fn clone(&self) -> GenesisConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GenesisConfig
impl Debug for GenesisConfig
Source§impl Default for GenesisConfig
impl Default for GenesisConfig
Source§impl<'de> Deserialize<'de> for GenesisConfig
impl<'de> Deserialize<'de> for GenesisConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for GenesisConfig
impl Display for GenesisConfig
Source§impl PartialEq for GenesisConfig
impl PartialEq for GenesisConfig
Source§impl Serialize for GenesisConfig
impl Serialize for GenesisConfig
impl StructuralPartialEq for GenesisConfig
Auto Trait Implementations§
impl Freeze for GenesisConfig
impl RefUnwindSafe for GenesisConfig
impl Send for GenesisConfig
impl Sync for GenesisConfig
impl Unpin for GenesisConfig
impl UnsafeUnpin for GenesisConfig
impl UnwindSafe for GenesisConfig
Blanket Implementations§
Source§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, _digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
Source§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more