ab_client_proof_of_time/source/
gossip.rs

1//! PoT gossip functionality.
2
3use crate::PotNextSlotInput;
4use ab_core_primitives::pot::{PotCheckpoints, PotSeed, SlotNumber};
5use parity_scale_codec::{Decode, Encode};
6use std::num::NonZeroU32;
7
8#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Encode, Decode)]
9pub struct GossipProof {
10    /// Slot number
11    pub slot: SlotNumber,
12    /// Proof of time seed
13    pub seed: PotSeed,
14    /// Iterations per slot
15    pub slot_iterations: NonZeroU32,
16    /// Proof of time checkpoints
17    pub checkpoints: PotCheckpoints,
18}
19
20#[derive(Debug)]
21pub enum ToGossipMessage {
22    Proof(GossipProof),
23    NextSlotInput(PotNextSlotInput),
24}