[−][src]Module hbbft::subset
Subset algorithm.
The Subset protocol assumes a network of N nodes that send signed
messages to each other, with at most f of them malicious, where 3 f < N. Handling the
networking and signing is the responsibility of the user: only when a message has been
verified to be "from node i" (e.g. using cryptographic signatures), it can be handed to the
Subset
instance.
Each node proposes an element for inclusion. Under the above conditions, the protocol guarantees that all correct nodes output the same set, consisting of at least N - f of the proposed elements.
How it works
Subset
instantiates oneBroadcast
algorithm for each of the participating nodes. At least N - f of these - the ones whose proposer is not faulty - will eventually output the element proposed by that node.- It also instantiates Binary Agreement for each participating node, to decide whether
that node's proposed element should be included in the set. Whenever an element is
received via broadcast, we input "yes" (
true
) into the correspondingBinaryAgreement
instance. - When N - f
BinaryAgreement
instances have decided "yes", we input "no" (false
) into the remaining ones, where we haven't provided input yet. - Once all
BinaryAgreement
instances have decided,Subset
returns the set of all proposed values for which the decision was "yes".
Structs
Message | Message from Subset to remote nodes. |
Subset | Subset algorithm instance |
Enums
Error | A subset error. |
FaultKind | Faults that can be detected in Subset. |
MessageContent | A message about a particular proposer's contribution. |
SubsetOutput | An output with an accepted contribution or the end of the set. |
Type Definitions
Result | A subset result. |
Step | A |