pub struct EpochBoundaryPreparation {
pub upcoming_epoch: Epoch,
pub upcoming_environments: Option<ProgramRuntimeEnvironments>,
pub programs_to_recompile: Vec<(Pubkey, Arc<ProgramCacheEntry>)>,
}๐Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Expand description
Globally manages the transition between environments at the epoch boundary
Fieldsยง
ยงupcoming_epoch: Epoch๐Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.The epoch of the upcoming_environments
upcoming_environments: Option<ProgramRuntimeEnvironments>๐Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Anticipated replacement for environments at the next epoch
This is None during most of an epoch, and only Some around the boundaries (at the end and beginning of an epoch).
More precisely, it starts with the cache preparation phase a few hundred slots before the epoch boundary,
and it ends with the first rerooting after the epoch boundary.
programs_to_recompile: Vec<(Pubkey, Arc<ProgramCacheEntry>)>๐Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.List of loaded programs which should be recompiled before the next epoch (but donโt have to).
Implementationsยง
Sourceยงimpl EpochBoundaryPreparation
impl EpochBoundaryPreparation
pub fn new(epoch: Epoch) -> Self
๐Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Sourcepub fn get_upcoming_environments_for_epoch(
&self,
epoch: Epoch,
) -> Option<ProgramRuntimeEnvironments>
๐Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn get_upcoming_environments_for_epoch( &self, epoch: Epoch, ) -> Option<ProgramRuntimeEnvironments>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Returns the upcoming environments depending on the given epoch
Sourcepub fn reroot(&mut self, epoch: Epoch) -> Option<ProgramRuntimeEnvironments>
๐Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn reroot(&mut self, epoch: Epoch) -> Option<ProgramRuntimeEnvironments>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Before rerooting the blockstore this concludes the epoch boundary preparation
Trait Implementationsยง
Sourceยงimpl Debug for EpochBoundaryPreparation
impl Debug for EpochBoundaryPreparation
Sourceยงimpl Default for EpochBoundaryPreparation
impl Default for EpochBoundaryPreparation
Sourceยงfn default() -> EpochBoundaryPreparation
fn default() -> EpochBoundaryPreparation
Returns the โdefault valueโ for a type. Read more
Auto Trait Implementationsยง
impl Freeze for EpochBoundaryPreparation
impl RefUnwindSafe for EpochBoundaryPreparation
impl Send for EpochBoundaryPreparation
impl Sync for EpochBoundaryPreparation
impl Unpin for EpochBoundaryPreparation
impl UnwindSafe for EpochBoundaryPreparation
Blanket Implementationsยง
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
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