Agreement
general problem that defines the need for a set of entities in a DS to reach a common decision over something
typically follow one of three theoretical models:
Consensus
Interactive Consistency
The Byzantine Generalβs Problem
Assuming a set of π processes of a DS that do not fail and communicate over a reliable communication system, a consensus problem as a special case of an agreement problem, can be defined as follows:
each process ππ possesses the following components:
a decision state π π
a proposed value π£π, from a set of possible values π
a consensus value ππ, set from the same set of values π plus an additional special value β₯
initially, the decision state π π of each process is set to "UNDECIDED" and ππ is set to β₯
in order to reach agreement, the processes communicate with one another by exchanging an arbitrary number of messages over an arbitrary number of rounds
each message contains one or more proposed values π£ of itself or other processes
each process, at some time point, sets the consensus value ππ by executing a decision function (such as majority voting) on the set of exchanged proposed values and changes its state to "DECIDEDβ
when this happens, no more changes to the consensus value are allowed (i. e. it is write-once)
when all processes entered the DECIDED state, the consensus value of each process should be the same, i. e. ππ = ππ, for every π, π = 1 β¦ π
Consensus protocols
used to solve a consensus problem in a distributed way under realistic conditions
An important requirement for such protocols is that they must be able to tolerate failures of processes, where the following two failure modes are distinguished:
Crash failures, where a process fails in such a way, that it can no longer participate in the protocol any more, i. e. the process stops working entirely and can not send or receive messages
Arbitrary or byzantine failures, where a process crashes or acts otherwise arbitrarily towards the other processes - in particular, a process could propose arbitrary values to other processes which might not even be reasonable for the respective use case, or could withhold values received from other processes indefinitely
In practice, it is assumed that there is an upper bound on the number π of failed processes in either failure mode, for which a given protocol must be tolerant: such a protocol is then designated as "π crash-resilient" or "π byzantine-resilient", respectively
In addition to fault tolerance, a consensus protocol must also provide adequate performance
Typical metrics in this context are the number of rounds and the amount of exchanged messages necessary for one run of the protocol
consensus protocol requirements
Termination
Validity/Integrity
Each process enters the DECIDED state after a finite amount of time, i. e. an agreement is eventually made
After execution of the protocol, all correct (i. e. non-failed) processes possess the same consensus value, i. e. they all agree on the value for their ππ
After execution of the protocol, the consensus value of a correct process must be equal to the proposed value of some process
In general, the process whose value was chosen could be correct or could be failed
This property can be made stronger, if necessary, for example, by requiring that the process whose value was chosen is also correct
Instead of a single consensus value, each process ππ sets an interactive consistency vector πΌπΆππ[π], with π = 1 β¦ π, where each entry represents the proposed value of the π-th process
interactive consensus protocol requirements
Termination: Each process sets the value of each entry of its consensus vector after a finite amount of time, i. e. an agreement is eventually made
Agreement: After execution of the protocol, all correct (i. e. non-failed)
processes possess the same consistency vector, i. e. they all agree on the values of all entries of their πΌπΆππ. Note, that when a failed process proposes different values to other processes, all correct processes must still agree on the same (!) value for the entry of the failed process, even when this value was never proposed by the failed process!
Validity: After execution of the protocol, the value πΆππ[π] corresponding to a correct process ππ must be equal to this processβ proposed value at each correct process ππ
Agreement in a Synchronous DS
agreement is always possible under the assumption that processes can only experience crash failures
processes can detect the crash of some process via timeout of messages and exclude this process in the remaining rounds of an agreement protocol
Assuming a maximum number π of crashed processes, any agreement protocol is guaranteed to reach agreement in a maximum of π + 1 rounds, i. e. when in each round another process crashes
Agreement in a Synchronous DS general algorithm
solve the consensus problem in a synchronous system under the assumption of a maximum of π crash failures is the following:
Assume a group of π processes, where each process ππ tracks the proposed values that were sent and received in each round π of the algorithm via sets ππ,π
A round is bounded in time to the maximum one-way transmission delay of a message
Initially, each process ππ sets ππ,0 = {} and ππ,1 = {π£π}, where π£π is the processβ proposed value
For each round π, with π = 1 β¦ (π + 1), each process ππ performs the following actions:
Send the set of values ππ πππ,π = ππ,π β ππ,πβ1 containing all proposed values that were not sent in the prior round via (unreliable) multicast to all other processes
Set ππ,π+1 to ππ,π as preparation for the next round
If a message with a set of proposed values ππ,πππ is received from some process ππ, add all received values to the set for the next round, i. e. set ππ,π+1 to ππ,π+1 βͺ ππ,πππ
After the π + 1-th round, each process ππ sets its consensus value ππ to the value πππ(ππ,π+1), where πππ() is some decision function, such as the minimum or majority function
For certain decision functions, like majority, a default value must be defined in case of no majority etc.
Byzantine Agreement
An agreement protocol that guarantees agreement under the assumption of byzantine failures is said to achieve byzantine agreement
This is only possible under the following condition:
π β₯ 3π + 1
i. e. when more than two-thirds of the processes are correct so they can βoutnumberβ the possibly wrong proposals made by byzantine processes
byzantine processes
process acts irrationally or maliciously, frequently in violation of the protocols or rules that are intended to govern the system
Zuletzt geΓ€ndertvor 8 Tagen