Skip to main content

EdgeImmediateProtocolObservable

Trait EdgeImmediateProtocolObservable 

pub trait EdgeImmediateProtocolObservable {
    // Required method
    fn ack_rate(&self) -> Option<f64>;
}
Expand description

Trait for reading immediate hop protocol conformance metrics.

Tracks point-to-point message acknowledgment behavior between directly connected peers. The ack rate can be used by cost functions to detect adversarial nodes that drop or fail to acknowledge messages.

Required Methods§

fn ack_rate(&self) -> Option<f64>

The ratio of acknowledged messages to sent messages for this immediate edge.

Returns None when insufficient messages have been sent to compute a meaningful ratio. Returns Some(rate) in the range [0.0, 1.0] where 1.0 means all messages were acknowledged.

Implementors§