Module III-part 1
Module III-part 1
Nodes or replicas may experience downtime at any time, stop running for a
short time and recover later.
Malicious nodes in networks may change and forge data at any time.
These troublemaking problems that may change and forge data or response
information are called Byzantine faults.
In this case, there are four Byzantine Generals, out of which three are non-faulty
Lieutenants and a faulty Commander.
They communicate with each other using the message passing technique.
When all the correct Lieutenants follow the majority voting principle, although
Commander is a Byzantine node, Lieutenant (1), Lieutenant (2) & Lieutenant (3)
can correctly decode the message.
In the Byzantine Generals Model, If there are F faulty nodes (crash fault), we need
at least 2F+1 nodes to reach consensus.
Consensus based
on majority voting
Lieutenant (1) =
{Retreat, Attack,
Retreat) = Retreat
Lieutenant (2) =
{Retreat, Attack,
Retreat} = Retreat
Lieutenant (3) =
{Attack, Retreat,
Retreat) = Retreat
Fault Tolerance
Algorithms used to solve crash faults are called Crash Fault Tolerance (CFT)
algorithms or non-Byzantine fault tolerance algorithms.
Byzantine faults may cause unauthorized changes, have higher complexity and
are more difficult to solve.
Algorithms for solving these problems are called Byzantine Fault Tolerance (BFT)
algorithms.
CFT Consensus
Each of these acceptors made a promise that no other proposal with a smaller
number can make it to consensus.
Phase 2: ACCEPT-REQUEST – ACCEPT
In this phase of the protocol, the proposer tells all the acceptors (that are live)
what value to accept. It sends:
ACCEPT-REQUEST(ID, VALUE)
to a majority or all of the acceptors. Each acceptor now decides whether to accept
the proposal. It accepts the accept request if the ID number of the accept-request
is still the largest one that it has seen. Recall that an acceptor promised not to
accept proposals from PREPARE messages with smaller numbers but can and
will accept proposals with higher numbers. The logic the acceptor uses is:
is the ID the largest I have seen so far, max_id == N?
if yes
reply with an ACCEPT message & send ACCEPT(ID, VALUE) to all learners
if no
The ACCEPT message can be sent back to the proposer as well as to the learners
so they can propagate the value to wherever its action is needed (e.g., append to
a log, modify a replicated database, …).
Proposer
Acceptor
Acceptor
Acceptor
Proposer
Acceptor
Acceptor
Acceptor
Proposer
PREPARE ID100
Acceptor
Acceptor
Acceptor
Proposer
PREPARE ID100
IDp must be unique across proposers
for each PREPARE message
Acceptor
Acceptor
Acceptor
Proposer
PREPARE ID100
Acceptor
Acceptor
Acceptor
Proposer
PREPARE ID100
Acceptor
Acceptor
Acceptor
PROMISE ID100
Proposer
Proposer
PREPARE ID100
Acceptor
Acceptor
Acceptor
PROMISE ID100
PREPARE ID100
Acceptor
Acceptor
Acceptor
PROMISE ID100
PREPARE ID100
Acceptor
Acceptor
Acceptor
PROMISE ID100
Acceptor
Acceptor
Acceptor
PROMISE ID100 ACCEPT ID100, "Go for Dinner"
Acceptor
Acceptor
Acceptor
PROMISE ID100 ACCEPT ID100, "Go for Dinner"
Low overhead.
Here, F = 4
N = 3*4+1 = 13.
So, if the network has at least 13 nodes, then it can tolerate Byzantine faults
(misbehavior) of 4 nodes.
Advantages
Disadvantages
● Not very scalable - more suitable for consortium networks, instead of public
blockchains.
● Faster than PoW protocols.
● Sybil attacks can be carried out
Proof of Stake (PoS)
'Stake' represents the number of coins (money) in the consensus protocol staked
by a blockchain participant.
The chance of proposing the next block is directly proportional to the value staked
by the participant.
Key idea is that if someone has a stake in the system, then they will not try to
sabotage the system.
A hacker would need to own 51% of all the coins in the network, which is
practically impossible.