Trait Reporter

Source
pub trait Reporter:
    Clone
    + Send
    + 'static {
    type Activity;

    // Required method
    fn report(
        &mut self,
        activity: Self::Activity,
    ) -> impl Future<Output = ()> + Send;
}
Expand description

Reporter is the interface responsible for reporting activity to some external actor.

Required Associated Types§

Source

type Activity

Activity is specified by the underlying consensus implementation and can be interpreted if desired.

Examples of activity would be “vote”, “finalize”, or “fault”. Various consensus implementations may want to reward (or penalize) participation in different ways and in different places. For example, validators could be required to send multiple types of messages (i.e. vote and finalize) and rewarding both equally may better align incentives with desired behavior.

Required Methods§

Source

fn report( &mut self, activity: Self::Activity, ) -> impl Future<Output = ()> + Send

Report some activity observed by the consensus implementation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§