Expand description
Implements the Aleph BFT Consensus protocol as a “finality gadget”. The [Member] struct requires access to a network layer, a cryptographic primitive, and a data provider that gives appropriate access to the set of available data that we need to make consensus on.
Structs§
- Config
- Main configuration of the consensus. We refer to the documentation Section 3.4 for a discussion of some of these parameters and their significance.
- Delay
Config - Configuration of several parameters related to delaying various tasks.
- Incomplete
Multisignature Error - Error resulting from multisignature being incomplete.
- Indexed
- A pair consistsing of signable data and a
NodeIndex
. - LocalIO
- Multisigned
- Signable data together with a complete multisignature.
- Network
Data - NetworkData is the opaque format for all data that a committee member needs to send to other nodes.
- Node
Count - Node count. Right now it doubles as node weight in many places in the code, in the future we might need a new type for that.
- Node
Index - The index of a node
- NodeMap
- A container keeping items indexed by NodeIndex.
- Node
Subset - Ordered
Unit - Represents state of the main internal data structure of AlephBFT (i.e. direct acyclic graph) used for achieving consensus.
- Signature
Error - Error type returned when a verification of a signature fails.
- Signed
- A correctly signed object of type
T
. - Terminator
- Struct that holds connections to offspring and parent components/tasks and enables a clean/synchronized shutdown
- Unchecked
Signed - A pair consisting of an instance of the
Signable
trait and an (arbitrary) signature.
Enums§
- Partially
Multisigned - Signable data together with a valid partial multisignature.
- Recipient
- A recipient of a message, either a specific node or everyone.
Traits§
- Data
- Data type that we want to order.
- Data
Provider - The source of data items that consensus should order.
- Finalization
Handler - The source of finalization of the units that consensus produces.
- Hasher
- A hasher, used for creating identifiers for blocks or units.
- Index
- Indicates that an implementor has been assigned some index.
- Keychain
- Abstraction of the signing data and verifying signatures.
- Multi
Keychain - Extends Keychain with multisigning functionalities.
- Network
- Network represents an interface for sending and receiving NetworkData.
- Partial
Multisignature - A type to which signatures can be aggregated.
- Signable
- Data which can be signed.
- Signature
- The type used as a signature.
- Spawn
Handle - An abstraction for an execution engine for Rust’s asynchronous tasks.
- Unit
Finalization Handler - The source of finalization of the units that consensus produces.
Functions§
- create_
config - Creates a
Config
which wraps the passed arguments.time_to_reach_max_round
is a lower bound on the time needed to reach the maximum round expected by the user and is only used for verification. - default_
config - Creates a
Config
, allowing the user to omit specifying thedelay_config
in which case it will be set to default, suggested by the creators of this package.time_to_reach_max_round
is a lower bound on the time needed to reach the maximum round expected by the user and is only used for verification. - default_
delay_ config - Creates a
DelayConfig
with default parameters, suggested by the creators of this package. - exponential_
slowdown - handle_
task_ termination - run_
session - Starts the consensus algorithm as an async task. It stops establishing consensus for new data items after
reaching the threshold specified in
Config::max_round
or upon receiving a stop signal fromexit
. For a detailed description of the consensus implemented byrun_session
see docs for devs or the original paper.
Type Aliases§
- Round
- An asynchronous round of the protocol.
- Session
Id - The number of a session for which the consensus is run.
- Signature
Set - A set of signatures of a subset of nodes serving as a (partial) multisignature
- Task
Handle - A handle for waiting the task’s completion.