29f95febe9
* Include ephemera node code in repo * Upgrade deps * Bump minor version of cosmwasm-std * Include ephemera in nym-api dep and downgrade rusqlite * Fix clippy and ephemera docs code * More clippy on ephemera --------- Co-authored-by: Andrus Salumets <andrus@nymtech.net>
27 lines
1.2 KiB
Rust
27 lines
1.2 KiB
Rust
//! # Block manager
|
|
//!
|
|
//! Block manager is quite simple. It keeps pending messages in memory and puts all of them into a block
|
|
//! at predefined intervals. That's all it does.
|
|
//!
|
|
//! If the block actually will be broadcast or not is decided by the application. If not, it will produce next block with
|
|
//! the same messages plus the new ones.
|
|
//!
|
|
//! When application shuts down, pending messages are lost.
|
|
//!
|
|
//! When a block gets accepted by reliable broadcast then Block Manager will remove all messages included in the block from the
|
|
//! pending messages queue.
|
|
//!
|
|
//! # Synchronization and duplicate messages in sequence of blocks
|
|
//!
|
|
//! When previous block hasn't been accepted yet, then the next block will contain the same messages as the previous one.
|
|
//! One way to solve this is that an application itself keeps track of duplicate messages and discards them if necessary.
|
|
//!
|
|
//! But it seems a reasonable assumption that in general duplicate messages are unwanted. Therefore, Ephemera solves this
|
|
//! by dropping previous blocks which get Finalised/Committed after a new block has been created.
|
|
|
|
pub(crate) mod builder;
|
|
pub(crate) mod manager;
|
|
pub(crate) mod message_pool;
|
|
pub(crate) mod producer;
|
|
pub(crate) mod types;
|