Skip to main content

StateAnomaly

Enum StateAnomaly 

Source
pub enum StateAnomaly {
Show 13 variants MissingBroadcast { contract_key: String, transaction: Transaction, sender: SocketAddr, missing_targets: Vec<SocketAddr>, state_hash: Option<String>, source_op: BroadcastSource, }, BroadcastNotApplied { contract_key: String, transaction: Transaction, peer: SocketAddr, received_state_hash: Option<String>, }, UnexpectedStateChange { contract_key: String, peer: SocketAddr, transaction: Transaction, previous_hash: String, new_hash: String, transition_kind: TransitionKind, }, FinalDivergence { contract_key: String, peer_states: Vec<(SocketAddr, String)>, first_divergence_point: Option<DivergencePoint>, }, SuspectedPartition { contract_key: String, sending_group: Vec<SocketAddr>, isolated_group: Vec<SocketAddr>, first_missed: DateTime<Utc>, last_missed: DateTime<Utc>, missed_count: usize, }, StalePeer { contract_key: String, peer: SocketAddr, stuck_on_hash: String, last_event_time: DateTime<Utc>, missed_updates: usize, }, OneWayPropagationFailure { contract_key: String, sender: SocketAddr, receiver: SocketAddr, forward_deliveries: usize, reverse_deliveries: usize, }, StateOscillation { contract_key: String, peer: SocketAddr, oscillating_hashes: Vec<String>, flip_count: usize, }, UpdateOrderingAnomaly { contract_key: String, tx_a: Transaction, tx_b: Transaction, peer_ab: SocketAddr, hash_ab: String, peer_ba: SocketAddr, hash_ba: String, }, ZombieTransaction { operation_type: String, transaction: Transaction, peer: SocketAddr, started_at: DateTime<Utc>, }, BroadcastStorm { contract_key: String, transaction: Transaction, broadcast_count: usize, expected_max: usize, source_op: BroadcastSource, }, DeltaSyncFailureCascade { contract_key: String, resync_count: usize, requesting_peers: Vec<SocketAddr>, window_start: DateTime<Utc>, window_end: DateTime<Utc>, total_resync_bytes: usize, }, SubscriptionAsymmetry { contract_key: String, peer: SocketAddr, subscribe_tx: Transaction, broadcasts_without_peer: usize, },
}
Expand description

A detected anomaly in the state propagation.

Variants§

§

MissingBroadcast

A broadcast was emitted but never received by one or more targets.

Fields

§contract_key: String
§transaction: Transaction
§sender: SocketAddr
§missing_targets: Vec<SocketAddr>
§state_hash: Option<String>
§

BroadcastNotApplied

A broadcast was received but never applied (no corresponding BroadcastApplied).

Fields

§contract_key: String
§transaction: Transaction
§received_state_hash: Option<String>
§

UnexpectedStateChange

A peer’s state hash changed to a value not consistent with the expected progression (potential state regression or corruption).

Fields

§contract_key: String
§transaction: Transaction
§previous_hash: String
§new_hash: String
§transition_kind: TransitionKind
§

FinalDivergence

After all events, peers hold different states for the same contract. Includes the likely root cause transition.

Fields

§contract_key: String
§peer_states: Vec<(SocketAddr, String)>

(peer_addr, state_hash) for each replica.

§first_divergence_point: Option<DivergencePoint>

The first transition where states started to diverge.

§

SuspectedPartition

Multiple broadcasts from different senders all fail to reach the same set of target peers, suggesting a network partition.

Fields

§contract_key: String
§sending_group: Vec<SocketAddr>

Peers that emitted broadcasts during the window.

§isolated_group: Vec<SocketAddr>

Peers that never received those broadcasts.

§first_missed: DateTime<Utc>

Time window of the suspected partition.

§last_missed: DateTime<Utc>
§missed_count: usize

Number of broadcasts missed during this window.

§

StalePeer

A peer received the initial contract state but has not received any subsequent updates while other peers have progressed.

Fields

§contract_key: String
§peer: SocketAddr

The peer that appears stale.

§stuck_on_hash: String

The hash the peer is stuck on.

§last_event_time: DateTime<Utc>

When the peer last had any state event.

§missed_updates: usize

How many subsequent update transitions this peer missed.

§

OneWayPropagationFailure

Broadcasts from peer A reach peer B, but broadcasts from peer B never reach peer A (asymmetric / unidirectional link).

Fields

§contract_key: String
§sender: SocketAddr

Peer whose broadcasts are received.

§receiver: SocketAddr

Peer that never receives from the other direction.

§forward_deliveries: usize

Broadcasts from sender that receiver got.

§reverse_deliveries: usize

Broadcasts from receiver that sender got (should be 0).

§

StateOscillation

A peer’s state hash oscillates between the same values, indicating conflicting updates applied alternately without converging.

Fields

§contract_key: String
§oscillating_hashes: Vec<String>

The hashes that are oscillating.

§flip_count: usize

Number of times the state reverted to a previously-seen hash.

§

UpdateOrderingAnomaly

Two updates applied in different order on different peers produced different state hashes, indicating a non-commutative merge (CRDT bug).

Fields

§contract_key: String
§peer_ab: SocketAddr

Peer that applied A then B.

§hash_ab: String
§peer_ba: SocketAddr

Peer that applied B then A.

§hash_ba: String
§

ZombieTransaction

A transaction has a Request event but never completed (no Success, Failure, or Timeout). Indicates a stuck operation / leaked resource.

Fields

§operation_type: String
§transaction: Transaction
§started_at: DateTime<Utc>
§

BroadcastStorm

A single transaction triggered an unexpectedly large number of broadcast emissions, suggesting a re-broadcast loop.

Fields

§contract_key: String
§transaction: Transaction
§broadcast_count: usize

Number of BroadcastEmitted events for this transaction.

§expected_max: usize

Expected maximum (unique peers holding the contract).

§

DeltaSyncFailureCascade

Multiple peers requested full state resync for the same contract within a short window, indicating systematic delta application failure.

Fields

§contract_key: String
§resync_count: usize
§requesting_peers: Vec<SocketAddr>
§window_start: DateTime<Utc>
§window_end: DateTime<Utc>
§total_resync_bytes: usize
§

SubscriptionAsymmetry

A peer subscribed to a contract but is never listed in any broadcast_to targets for that contract.

Fields

§contract_key: String
§subscribe_tx: Transaction
§broadcasts_without_peer: usize

Trait Implementations§

Source§

impl Clone for StateAnomaly

Source§

fn clone(&self) -> StateAnomaly

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for StateAnomaly

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for StateAnomaly

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<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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
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> IntoEither for T

Source§

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

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: 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: 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> Same for T

Source§

type Output = T

Should always be Self
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToStringFallible for T
where T: Display,

Source§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

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

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,