pub trait PeerNetwork: Send + Sync {
// Required methods
fn node_id(&self) -> &String;
fn discover_peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<PeerInfo>, TribeError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn broadcast_challenge<'life0, 'life1, 'async_trait>(
&'life0 self,
challenge: &'life1 Challenge,
) -> Pin<Box<dyn Future<Output = Result<(), TribeError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn relay_proof<'life0, 'life1, 'async_trait>(
&'life0 self,
proof: &'life1 ProofPayload,
) -> Pin<Box<dyn Future<Output = Result<(), TribeError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn sync_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NetworkState, TribeError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}Expand description
How validator nodes discover and communicate with each other.