Skip to main content

SimulatedPolicyGate

Struct SimulatedPolicyGate 

Source
pub struct SimulatedPolicyGate {
    pub controller_alive: bool,
    pub policy_generation: u64,
    pub revoke_during_execution: bool,
    pub fail_receipt_commit: bool,
    pub allowed_actor_hash: u64,
    pub explicit_deny_func_hash: u64,
    pub max_expiry_lamport: u64,
    pub allowed_effects: EffectSet,
    pub budget: ResourceEnvelope,
    pub committed_receipts_count: usize,
}
Expand description

Deterministic in-memory policy gate for ExecutionMode::SimulatedGovernanceTest.

Fields§

§controller_alive: bool§policy_generation: u64§revoke_during_execution: bool§fail_receipt_commit: bool§allowed_actor_hash: u64§explicit_deny_func_hash: u64§max_expiry_lamport: u64§allowed_effects: EffectSet§budget: ResourceEnvelope§committed_receipts_count: usize

Implementations§

Source§

impl SimulatedPolicyGate

Source

pub const fn new_for_actor(allowed_actor_hash: u64) -> Self

Creates a permissive test policy gate for allowed_actor_hash.

Trait Implementations§

Source§

impl SentinelPolicyGate for SimulatedPolicyGate

Source§

fn is_controller_alive(&self) -> bool

Returns true if the underlying Sentinel controller is alive and reachable.
Source§

fn current_policy_generation(&self) -> u64

Returns the current active policy generation counter.
Source§

fn admit_call( &mut self, request: &AdmissionRequest, ) -> Result<AdmissionTicket, VibeTrap>

Stage 3 (Admit): Evaluates deontic norms, delegation scope, expiry, and resource bounds.
Source§

fn validate_post_execution( &mut self, ticket: &AdmissionTicket, _opcode: VibeOpCode, ticks_consumed: u64, output_bytes_written: usize, _output_digest: u64, ) -> Result<(), VibeTrap>

Stage 5 (Validate): Verifies postconditions, mid-execution policy generation validity, and actual resource usage before state publication.
Source§

fn commit_receipt( &mut self, receipt: &ExecutionReceiptHeader, ) -> Result<[NQuin48; 2], VibeTrap>

Stage 6 (Commit / Abort): Persists the execution receipt. Read more

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
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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,