Trait aleph_bft::DataIO[][src]

pub trait DataIO<Data> {
    type Error: Debug + 'static;
    fn get_data(&self) -> Data;
fn send_ordered_batch(
        &mut self,
        data: OrderedBatch<Data>
    ) -> Result<(), Self::Error>; }
Expand description

The source of data items that consensus should order.

AlephBFT internally calls DataIO::get_data whenever a new unit is created and data needs to be placed inside. The DataIO::send_ordered_batch method is called whenever a new round has been decided and thus a new batch of units (or more precisely the data they carry) is available.

We refer to the documentation https://cardinal-cryptography.github.io/AlephBFT/aleph_bft_api.html for a discussion and examples of how this trait can be implemented.

Associated Types

Required methods

Outputs a new data item to be ordered

Takes a new ordered batch of data item.

Implementors