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
transaction: Transactionsender: SocketAddrmissing_targets: Vec<SocketAddr>source_op: BroadcastSourceBroadcastNotApplied
A broadcast was received but never applied (no corresponding BroadcastApplied).
UnexpectedStateChange
A peer’s state hash changed to a value not consistent with the expected progression (potential state regression or corruption).
FinalDivergence
After all events, peers hold different states for the same contract. Includes the likely root cause transition.
Fields
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
sending_group: Vec<SocketAddr>Peers that emitted broadcasts during the window.
isolated_group: Vec<SocketAddr>Peers that never received those broadcasts.
StalePeer
A peer received the initial contract state but has not received any subsequent updates while other peers have progressed.
Fields
peer: SocketAddrThe peer that appears stale.
OneWayPropagationFailure
Broadcasts from peer A reach peer B, but broadcasts from peer B never reach peer A (asymmetric / unidirectional link).
Fields
sender: SocketAddrPeer whose broadcasts are received.
receiver: SocketAddrPeer that never receives from the other direction.
StateOscillation
A peer’s state hash oscillates between the same values, indicating conflicting updates applied alternately without converging.
Fields
peer: SocketAddrUpdateOrderingAnomaly
Two updates applied in different order on different peers produced different state hashes, indicating a non-commutative merge (CRDT bug).
Fields
tx_a: Transactiontx_b: Transactionpeer_ab: SocketAddrPeer that applied A then B.
peer_ba: SocketAddrPeer that applied B then A.
ZombieTransaction
A transaction has a Request event but never completed (no Success, Failure, or Timeout). Indicates a stuck operation / leaked resource.
BroadcastStorm
A single transaction triggered an unexpectedly large number of broadcast emissions, suggesting a re-broadcast loop.
DeltaSyncFailureCascade
Multiple peers requested full state resync for the same contract within a short window, indicating systematic delta application failure.
Fields
requesting_peers: Vec<SocketAddr>SubscriptionAsymmetry
A peer subscribed to a contract but is never listed in any broadcast_to targets for that contract.
Trait Implementations§
Source§impl Clone for StateAnomaly
impl Clone for StateAnomaly
Source§fn clone(&self) -> StateAnomaly
fn clone(&self) -> StateAnomaly
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StateAnomaly
impl Debug for StateAnomaly
Auto Trait Implementations§
impl Freeze for StateAnomaly
impl RefUnwindSafe for StateAnomaly
impl Send for StateAnomaly
impl Sync for StateAnomaly
impl Unpin for StateAnomaly
impl UnsafeUnpin for StateAnomaly
impl UnwindSafe for StateAnomaly
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.