pub trait Reporter:
Clone
+ Send
+ 'static {
type Activity;
// Required method
fn report(&mut self, activity: Self::Activity) -> Feedback;
}Expand description
Reporter is the interface responsible for reporting activity to some external actor.
Required Associated Types§
Sourcetype Activity
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§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<R: Reporter> Reporter for Option<R>
impl<R: Reporter> Reporter for Option<R>
Implementors§
Source§impl<E, A, B, C, H, Z, S, ES> Reporter for Marshaled<E, A, B, C, H, Z, S, ES>where
E: Send + Sync + 'static,
A: Application<E, Block = B, Context = Context<Commitment<B, C, H>, <Z::Scheme as Verifier>::PublicKey>>,
B: CertifiableBlock<Context = <A as Application<E>>::Context> + Codec,
C: CodingScheme,
H: Hasher,
Z: Provider<Scope = Epoch, Scheme: Scheme<Commitment<B, C, H>>>,
S: Strategy,
ES: Epocher,
The wrapper is the consensus engine’s reporter, as it is its automaton and relay: it forwards
every activity to marshal and first releases the state it keeps per round (certification
gates, staged proposals, and sent marks). A finalization releases its round and the rounds
below it. Any activity of a later epoch releases every earlier epoch, whose engine has been
retired, which covers finalized progress that marshal imported while no engine reported it.
The voter reports from the same task that requests the lock-in broadcast and certification,
so pruning is ordered with both.
impl<E, A, B, C, H, Z, S, ES> Reporter for Marshaled<E, A, B, C, H, Z, S, ES>where
E: Send + Sync + 'static,
A: Application<E, Block = B, Context = Context<Commitment<B, C, H>, <Z::Scheme as Verifier>::PublicKey>>,
B: CertifiableBlock<Context = <A as Application<E>>::Context> + Codec,
C: CodingScheme,
H: Hasher,
Z: Provider<Scope = Epoch, Scheme: Scheme<Commitment<B, C, H>>>,
S: Strategy,
ES: Epocher,
The wrapper is the consensus engine’s reporter, as it is its automaton and relay: it forwards every activity to marshal and first releases the state it keeps per round (certification gates, staged proposals, and sent marks). A finalization releases its round and the rounds below it. Any activity of a later epoch releases every earlier epoch, whose engine has been retired, which covers finalized progress that marshal imported while no engine reported it. The voter reports from the same task that requests the lock-in broadcast and certification, so pruning is ordered with both.
Source§impl<E, S, A, B, ES> Reporter for Deferred<E, S, A, B, ES>where
E: Send + Sync + 'static,
S: Scheme,
A: Application<E, Block = B, Context = Context<B::Digest, S::PublicKey>>,
B: CertifiableBlock<Context = <A as Application<E>>::Context> + Codec,
ES: Epocher,
The wrapper is the consensus engine’s reporter, as it is its automaton and relay: it forwards
every activity to marshal and first releases the state it keeps per round (certification
gates, staged proposals, and sent marks). A finalization releases its round and the rounds
below it. Any activity of a later epoch releases every earlier epoch, whose engine has been
retired, which covers finalized progress that marshal imported while no engine reported it.
The voter reports from the same task that requests the lock-in broadcast and certification,
so pruning is ordered with both.
impl<E, S, A, B, ES> Reporter for Deferred<E, S, A, B, ES>where
E: Send + Sync + 'static,
S: Scheme,
A: Application<E, Block = B, Context = Context<B::Digest, S::PublicKey>>,
B: CertifiableBlock<Context = <A as Application<E>>::Context> + Codec,
ES: Epocher,
The wrapper is the consensus engine’s reporter, as it is its automaton and relay: it forwards every activity to marshal and first releases the state it keeps per round (certification gates, staged proposals, and sent marks). A finalization releases its round and the rounds below it. Any activity of a later epoch releases every earlier epoch, whose engine has been retired, which covers finalized progress that marshal imported while no engine reported it. The voter reports from the same task that requests the lock-in broadcast and certification, so pruning is ordered with both.
Source§impl<E, S, A, B, ES> Reporter for Inline<E, S, A, B, ES>
The wrapper is the consensus engine’s reporter, as it is its automaton and relay: it forwards
every activity to marshal and first releases the state it keeps per round (certification
gates, staged proposals, and sent marks). A finalization releases its round and the rounds
below it. Any activity of a later epoch releases every earlier epoch, whose engine has been
retired, which covers finalized progress that marshal imported while no engine reported it.
The voter reports from the same task that requests the lock-in broadcast and certification,
so pruning is ordered with both.
impl<E, S, A, B, ES> Reporter for Inline<E, S, A, B, ES>
The wrapper is the consensus engine’s reporter, as it is its automaton and relay: it forwards every activity to marshal and first releases the state it keeps per round (certification gates, staged proposals, and sent marks). A finalization releases its round and the rounds below it. Any activity of a later epoch releases every earlier epoch, whose engine has been retired, which covers finalized progress that marshal imported while no engine reported it. The voter reports from the same task that requests the lock-in broadcast and certification, so pruning is ordered with both.