Skip to main content

EngineStep

Enum EngineStep 

Source
pub enum EngineStep {
Show 17 variants OpCompleted { op_ref: OpRef, exec_id: ExecId, sites_written: Vec<NodeSiteId>, }, AsyncSuspended { op_ref: OpRef, exec_id: ExecId, cmd_id: CommandId, }, SendEnvelope(WireEnvelope), AppEvent { module_name: String, topic: String, value_bytes: Vec<u8>, }, LifecycleFired { phase: String, }, BootstrapComplete, WaitingOnBootstrap, OpFailed { op_ref: OpRef, exec_id: ExecId, error: OpError, }, CycleBudgetExceeded { ops_invoked: usize, }, OutboundDropped { count: usize, }, WireDecodeFailed { hash: u64, payload_size: usize, detail: String, }, WireReceiveFailed { src_peer: Option<PeerId>, fill_index: u32, actual_hash: u64, payload_size: usize, kind: WireReceiveErrorKind, }, WireTimeout { wire_req_id: u64, target_site: NodeSiteId, started_at_ns: u64, parked_op: Option<CommandId>, }, PeerBlocked { peer: PeerId, reason: BlockReason, }, PeerDown { peer: PeerId, }, PeerUp { peer: PeerId, }, PeerResolveFailed { peer: Option<PeerId>, op_ref: OpRef, exec_id: ExecId, },
}
Expand description

One step of work the engine performed during a poll cycle. Engine::poll returns Vec<EngineStep> capturing every event the host can observe.

Variants§

§

OpCompleted

An Op completed successfully + wrote sites_written slots.

Fields

§op_ref: OpRef

The completed Op.

§exec_id: ExecId

The execution it belonged to.

§sites_written: Vec<NodeSiteId>

Output sites the Op wrote.

§

AsyncSuspended

An Op suspended on a CommandId awaiting completion.

Fields

§op_ref: OpRef

The suspended Op.

§exec_id: ExecId

The execution it belonged to.

§cmd_id: CommandId

The CommandId the Op returned.

§

SendEnvelope(WireEnvelope)

An outbound envelope is ready to ship.

§

AppEvent

An app-facing event was published. Carries the topic name (the function.output value name, or the AppEmit topic for mid-cycle emissions) plus the serialized value bytes. When the emitter is a Notify-style call with no payload, value_bytes is empty.

Fields

§module_name: String

Module that emitted the event.

§topic: String

Topic name - typically a function.output name for top-level surface, or an explicit topic for AppEmit.

§value_bytes: Vec<u8>

Serialized payload - the slot value at the emission site, encoded via the type’s WireType::to_wire_bytes path. Empty for marker-only notifications.

§

LifecycleFired

A lifecycle phase fired. fills in the per-phase payload.

Fields

§phase: String

Phase name (e.g. "Bootstrap", "PreShutdown").

§

BootstrapComplete

The single bootstrap FunctionCall the engine seeded at install completion drained to quiescence. Body ops fire on the same poll cycle once this step is emitted. Bootstrap is a one-shot per Node lifetime; a restored Node does not re-emit (its bootstrap pass already ran pre-snapshot).

§

WaitingOnBootstrap

At least one bootstrap-phase op returned DispatchResult::Async and the engine is waiting on its completion before activating body ops. The host drives the completion via the ingress and re-invokes Node::run_bootstrap.

§

OpFailed

An Op failed. The error is also published on the bus as InfraEvent::OpFailure.

Fields

§op_ref: OpRef

The failed Op.

§exec_id: ExecId

The execution it belonged to.

§error: OpError

The failure detail.

§

CycleBudgetExceeded

cycle_op_budget was hit during a poll(). The engine yielded mid-cascade; the host should poll again to drain the remaining frontier. Emitted at most once per poll.

Fields

§ops_invoked: usize

Number of op-invocations the cycle issued before yielding (== cycle_op_budget).

§

OutboundDropped

max_outbound_queue was hit since the previous poll; count envelopes were FIFO-dropped to make room. Emitted at most once per poll.

Fields

§count: usize

Number of envelopes dropped since the last poll.

§

WireDecodeFailed

An inbound wire envelope’s payload could not be decoded. The envelope’s slot fill was dropped; this step lets the host observe the drop. Carries the same context as the matching InfraEvent::WireDecodeFailure on the bus.

Fields

§hash: u64

Wire-type hash the envelope advertised (0 if the failure occurred before the hash could be read).

§payload_size: usize

Length of the offending payload, in bytes.

§detail: String

Human-readable failure detail.

§

WireReceiveFailed

An inbound wire fill failed the typed-decode step. Mirrors the bus’s crate::bus::InfraEvent::WireReceiveError so the host poll() caller observes the per-fill failure without subscribing to the bus. Other fills in the same envelope still deliver (partial-delivery semantics).

Fields

§src_peer: Option<PeerId>

Sender of the failing envelope, if known.

§fill_index: u32

Position of the failing fill within the envelope (0-based).

§actual_hash: u64

The type_hash the sender stamped on the fill.

§payload_size: usize

Length of the offending payload, in bytes.

§kind: WireReceiveErrorKind

Which failure mode fired.

§

WireTimeout

A registered in-flight request entry was evicted by the engine’s per-poll RequestTracker::drain_stale sweep because its per-entry TTL elapsed without a matching response. The originator’s local DAG continuation parked behind parked_op (if Some) is failed with “chain timeout” via the same path async-suspension completions take.

Fields

§wire_req_id: u64

The chain correlation token that timed out.

§target_site: NodeSiteId

Destination site the request was dispatched to.

§started_at_ns: u64

Engine-clock timestamp when the originating Send fired.

§parked_op: Option<CommandId>

CommandId of the originator’s parked local op, if the request was registered with one.

§

PeerBlocked

An inbound envelope from peer was dropped by the crate::framework::PeerGovernor before any slot was written. path - the “first contact with IP” check the user flagged.

Fields

§peer: PeerId

The peer whose envelope was rejected.

§reason: BlockReason

Why the envelope was rejected.

§

PeerDown

A peer crossed below the failure threshold and is now marked down. Emitted at most once per transition.

Fields

§peer: PeerId

The peer that went down.

§

PeerUp

A peer recovered after a failure streak.

Fields

§peer: PeerId

The peer that came back up.

§

PeerResolveFailed

wire::Send could not resolve its destination peer’s addresses against the framework’s crate::framework::AddressBook. Either the peer is unknown, its address list is empty, or the Send op’s peer input didn’t carry a valid PeerId. The Send op produces no envelope; the host application reacts via this event. Mirrors InfraEvent::PeerResolveFailure on the bus - telemetry-tap parity with the /// PeerBlocked/PeerDown/PeerUp family.

Fields

§peer: Option<PeerId>

The peer whose addresses could not be resolved. None when the Send op had no parseable peer input.

§op_ref: OpRef

The Send op that failed to resolve.

§exec_id: ExecId

Execution this Send belonged to.

Trait Implementations§

Source§

impl Clone for EngineStep

Source§

fn clone(&self) -> EngineStep

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EngineStep

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. 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
Source§

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

Source§

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

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ErasedComponent for T
where T: Any + Send + Sync,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more