[][src]Module exonum_node::proposer

Utilities allowing to customize proposal creation logic for an Exonum node.

To customize block proposals, you should supply a ProposeBlock implementation to the NodeBuilder:

use exonum_node::proposer::SkipEmptyBlocks;

let node_config: NodeConfig = // ...
let node_keys: Keys = // ...
let database = TemporaryDB::new();
let node = NodeBuilder::new(database, node_config, node_keys)
    .with_block_proposer(SkipEmptyBlocks)
    // specify other node params...
    .build();
node.run().await?;

Stability

The contents of this module is considered unstable and experimental. It may change in any way between exonum-node releases.

Safety

USING CUSTOM PROPOSER LOGIC CAN LEAD TO CONSENSUS HANG-UP AND OTHER ADVERSE EFFECTS. Consensus safety and liveness properties proven in the Exonum white paper DO NOT HOLD for arbitrary proposal creation logic.

Structs

ProposeParams

Block proposal parameters supplied to the proposer from the node.

SkipEmptyBlocks

Block proposer that skips a block if there are no uncommitted transactions.

StandardProposer

Standard block proposer used by the nodes if no other proposer is specified.

Enums

ProposeTemplate

Propose template returned by the proposal creator.

Traits

ProposeBlock

Proposal creation logic.

Type Definitions

Pool

Type alias for the persistent pool.