Skip to main content

SigmaKernelAssist

Struct SigmaKernelAssist 

Source
pub struct SigmaKernelAssist { /* private fields */ }
Expand description

σ-aware KernelAssist. Owns only ephemeral per-block kernel state.

Implementations§

Source§

impl SigmaKernelAssist

Source

pub fn new() -> Self

Source

pub fn reset_block_state(&mut self)

Reset per-block ephemeral tables. Called at the start of each block apply.

Source

pub fn seed_root_gas(&mut self, budget: u64)

Seed the root gas meter (meter_id 0) with the chain’s block-wide gas budget.

Source

pub fn seed_root_quota(&mut self, budget: u64)

Seed the root storage quota (quota_id 0).

Trait Implementations§

Source§

impl Default for SigmaKernelAssist

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl KernelAssist for SigmaKernelAssist

Source§

fn gas_meter_get(&self, meter_id: MeterId) -> u64

Read the remaining gas for meter_id. Missing entry → 0.
Source§

fn gas_meter_set(&mut self, meter_id: MeterId, value: u64) -> u64

Atomically GasMeter[meter_id] := value; return previous value (or 0 if no entry existed).
Source§

fn storage_quota_get(&self, quota_id: QuotaId) -> u64

Source§

fn storage_quota_set(&mut self, quota_id: QuotaId, value: u64) -> u64

Source§

fn yield_catcher_markers(&self, catcher_hash: CapHash) -> Vec<CapHash>

Read the marker list for a YieldCatcher instance identified by catcher_hash. Order matters: routing walks the list and takes the first match.
Source§

fn yield_catcher_add( &mut self, catcher_hash: CapHash, marker_instance_hash: CapHash, )

Add a marker template to the catcher’s list.
Source§

fn yield_catcher_remove( &mut self, catcher_hash: CapHash, marker_instance_hash: CapHash, )

Remove a marker template. No-op if absent.
Source§

fn yield_catcher_new(&mut self) -> CapHash

Mint a fresh empty YieldCatcher. Returns its content hash (which the caller stores as a Cap::Instance[YieldCatcher]).
Source§

fn host_open(&mut self, file_id: u64) -> Option<CapHashOrRef>

Materialize a σ-resident file as a cache reference (typically a CapHashOrRef::Hash of a published Cap::Data). None if the file_id isn’t registered.
Source§

fn host_save( &mut self, data: CapHashOrRef, quota_id: u64, size: u64, ) -> Option<u64>

Mint a new file from the cache reference data after debiting quota_id by the resolved DataCap size. Returns the new file_id. Default returns None (no file registry).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> LayoutRaw for T

§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
§

impl<T> Pointee for T

§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.