[][src]Module hbbft::queueing_honey_badger

Queueing Honey Badger

This works exactly like Dynamic Honey Badger, but it has a transaction queue built in. Whenever an epoch is output, it will automatically select a list of pending transactions and propose it for the next one. The user can continuously add more pending transactions to the queue.

If there are no pending transactions, no validators in the process of being added or removed and not enough other nodes have proposed yet, no automatic proposal will be made: The network then waits until at least f + 1 have any content for the next epoch.

How it works

Queueing Honey Badger runs a Dynamic Honey Badger internally, and automatically inputs a list of pending transactions as its contribution at the beginning of each epoch. These are selected by making a random choice of B / N out of the first B entries in the queue, where B is the configurable batch_size parameter, and N is the current number of validators.

After each output, the transactions that made it into the new batch are removed from the queue.

The random choice of transactions is made to reduce redundancy even if all validators have roughly the same entries in their queues. By selecting a random fraction of the first B entries, any two nodes will likely make almost disjoint contributions instead of proposing the same transaction multiple times.

Re-exports

pub use crate::dynamic_honey_badger::Input;

Structs

QueueingHoneyBadger

A Honey Badger instance that can handle adding and removing nodes and manages a transaction queue.

QueueingHoneyBadgerBuilder

A Queueing Honey Badger builder, to configure the parameters and create new instances of QueueingHoneyBadger.

Enums

Change

A node change action: adding or removing a node.

ChangeState

A change status: whether a change to the network is currently in progress or completed.

Error

Queueing honey badger error variants.

Type Definitions

Batch

A batch containing a list of transactions from at least two thirds of the validators.

Result

The result of QueueingHoneyBadger handling an input or message.

Step

A QueueingHoneyBadger step, possibly containing multiple outputs.