Slide

IEEE INFOCOM 2015
Workshop on Inter-Dependent Networks (WIDN)
A New Direction for Solving the Consensus
Problem in Networked Systems
1
Chien-Fu Cheng
Department of Computer Science and Information
Engineering,
Tamkang University
New Taipei City, Taiwan
2015/04/27
OUTLINE
 Introduction
 Agreement



Problems
Byzantine Agreement (BA) Problem
Interactive Consistency (IC) Problem
Consensus Problem
 Motivation
 Immediacy
Harmonized Consensus Protocol (IHCP)
 Conclusion
2
OUTLINE
 Introduction
 Agreement



Problems
Byzantine Agreement (BA) Problem
Interactive Consistency (IC) Problem
Consensus Problem
 Motivation
 Immediacy
Harmonized Consensus Protocol (IHCP)
 Conclusion
3
INTRODUCTION
 Distributed

It is a collection of loosely coupled
interconnected by a communication network.
 Reliable


machines
System
In a cooperative network, we need a mechanism that
allows all non-faulty processors to reach a common
agreement.
A common agreement should be reached among all nonfaulty processors before executing certain special missions.


System
Synchronization, resource allocation, replicated file system
That is, we can provide fault tolerance by solving the
agreement problems
4
OUTLINE
 Introduction
 Agreement



Problems
Byzantine Agreement (BA) Problem
Interactive Consistency (IC) Problem
Consensus Problem
 Motivation
 Immediacy
Harmonized Consensus Protocol (IHCP)
 Conclusion
5
BYZANTINE AGREEMENT PROBLEM

1453 AD
A city is surrounded by the Byzantine Generals, and
their troops.
 The Generals must come to an agreement about
whether to attack or retreat.
 An attack/retreat by only some of the divisions were
result in defeat.
 Generals may be traitors, trying to prevent the loyal
generals from reaching an agreement.

6
attack or retreat ??
traitors ??
attack / retreat
7
BYZANTINE AGREEMENT PROBLEM (CONT.)

1982 AD


BA_Agreement:


The situation above describes a classical coordination
problem in distributed computing known as Byzantine
agreement which was introduced by Lamport, Pease and
Shostak.
All non-faulty processors agree on a common value;
BA_Validity:

If the source (commander) processor is fault-free, then
all non-faulty processors agree on the initial value that
the source processor sends.
link: Impossibility Results-1
link: Impossibility Results-2
link: Impossibility Results-3
8
BYZANTINE AGREEMENT PROBLEM (CONT.)

Such an agreement may not take place for
several reasons.

The communication medium may be faulty


Resulting in lost or garbled messages
The processors themselves may be faulty

Resulting in unpredictable processors behavior
9
IMPOSSIBILITY RESULTS

Constraints:


n≥4
n > 3pm , ( pm < n/3 )
attack or retreat ??
attack
If n < 4 ?
No solution exists for
three generals that works
in the presence of a
single traitor
attack
he said retreat
For BA_Validity to be satisfied, General 1 must obey the order to attack
10
IMPOSSIBILITY RESULTS (CONT.)

If n ≤ 3pm ?
Ex: n = 4, pm = 2
Constraints:


n≥4
n > 3pm , ( pm < n/3 )
0
1
1 011
100 0
1
0
1
0
1
1
101
0
For BA_Agreement to be satisfied, General 1 and
General 2 should have the same decision.
Worst case
11
IMPOSSIBILITY RESULTS (CONT.)

Constraints:




n≥4
n > 3pm , ( pm < n/3 )
1 011
Ex: n = 4, pm =
1
0
1
110 1
1
0
1
0
1
1
101
1
Worst case
12
OUTLINE
 Introduction
 Agreement



Problems
Byzantine Agreement (BA) Problem
Interactive Consistency (IC) Problem
Consensus Problem
 Motivation
 Immediacy
Harmonized Consensus Protocol (IHCP)
 Conclusion
13
INTERACTIVE CONSISTENCY PROBLEM

The Interactive Consistency (IC) problem is
another agreement-related problem.
All the processors in the IC problem have an initialvalue.
 Through message exchange, they obtain a common
vector (i.e. a set of common values) to ensure
consistency.


IC_Agreement:


Each non-faulty processors agrees on a common vector
Vec=[v1,v2,…,vn];
IC_Validity:

If the i-th processor is non-faulty and its initial-value is
vi, then the i-th value in the common vector Vec should
be vi.
14
CONSENSUS PROBLEM

Like the IC problem, the Consensus problem is
characterized by all processors having an initialvalue.


Consensus_Agreement:


While the goal of the IC problem is to obtain a
common vector, the goal of the consensus problem is
to obtain a common value (i.e. consensus value).
All non-faulty processors agree on a common value;
Consensus_Validity:

If the initial-value of each non-faulty processor is vi ,
then the common value v should be equal to vi.
15
THE RELATION AMONG BA, IC AND
CONSENSUS PROBLEMS
16
OUTLINE
 Introduction
 Agreement



Problems
Byzantine Agreement (BA) Problem
Interactive Consistency (IC) Problem
Consensus Problem
 Motivation
 Immediacy
Harmonized Consensus Protocol (IHCP)
 Conclusion
17
MOTIVATION


In the classical BA, IC and Consensus protocols,
non-faulty processors are not allowed to change
their initial-values during message exchange.
This implies if a processor proposes an initialvalue that is a minority value or even an unique
value in the system, this value will not become
the final consensus value.
18
MOTIVATION (CONT.)

For example, the consensus protocol is usually
used to solve the leader election problem.

Protocol design for the leader election problem is
used to elect a single processor as the organizer,
coordinator, initiator or sequencer of some task
distributed among several processors.

Processors prefer to elect a closer processor
containing computing resources they need to be the
leader in mobile ad hoc networks.
19
MOTIVATION (CONT.)



In order to increase the chances that all
processors agree on a consensus value they prefer
and accept, we design a new consensus protocol
that allows change of the initial-value within
certain limitations during message exchange.
Simply put, processors can adjust their initialvalues based on messages they have collected
during message exchange.
This way, even if the final consensus value is not
a value they have originally expected, it is still a
value they prefer and accept.
20
OUTLINE
 Introduction
 Agreement



Problems
Byzantine Agreement (BA) Problem
Interactive Consistency (IC) Problem
Consensus Problem
 Motivation
 Immediacy
Harmonized Consensus Protocol (IHCP)
 Conclusion
21
IMMEDIACY HARMONIZED CONSENSUS
PROTOCOL (IHCP)

The proposed protocol is called Immediacy
Harmonized Consensus Protocol (IHCP).



Tend_Inquiring Phase
Msg_Exchanging Phase
Cons_Making Phase
22
IMMEDIACY HARMONIZED CONSENSUS
PROTOCOL (IHCP) (CONT.)

IHCP

Tend_Inquiring Phase (link)

The Tend_Inquiring Phase is the phase where processors
adjust their initial-values in the hope that the consensus
value is a value they prefer and accept.

Msg_Collecting Phase (link)
 The Msg_Exchanging Phase is a phase where
processors collect messages from other processors.

Cons_Making Phase (link)

The Cons_Making Phase is used to compute the
consensus value.
23
PROCEDURE OF REMOVING INFLUENCE
: The messages under the influence from malicious faulty sender processor
and malicious faulty intermediate processors
: The messages under the influence from malicious faulty sender processor
: The messages without influence from any faulty processors
Round (t+1)#
Round 1
1
#
Round 1
1
* Round
2#
1
Round 2*
1
……
2
2
Msg_Exchanging Phase
Round (t+1)*
1
1
2
2
3
.
.
.
.
t+1
3
.
.
.
.
t+1
voteHCP
function
Cons_Making Phase
24
THE TEND_INQUIRING PHASE
Each processor Pi will send the 1st priority value
to other processors.
 After receiving the preferred values from other
processors, each processor will reselect their
initial-values.
 Through
re-selection of initial-value, each
processor will become more likely to agree on a
consensus value that it prefers and also matches
with the values preferred by other processors.

25
link: IHCP protocol
THE MSG_EXCHANGING PHASE
We use the term “round” to indicate a complete
course of message exchange.
 A round of message exchange comprises three steps
as follows:

(1) send messages to any set of processors;
(2) receive messages from other processors in this round;
(3) do local processing.

The number of rounds required of our protocol in the
Msg_Exchanging Phase is t+1, where t= (n-1)/3.
26
link: IHCP protocol
HCP-TREE

In the Msg_Exchanging phase, each processor
stores the received messages in its HCP-tree.

The HCP-tree is a tree structure. The following figure
shows a 2-level HCP-tree constructed by P1 with
seven processors after two rounds of message
exchange.
27
HCP-TREE (CONT.)



In this HCP-tree, vertex P3P2 denotes that the message
is sent from P3 to P2 and stored in P1’s HCP-tree.
Moreover, we keep no vertices with repeated names in
order to avoid the repeatedly influenced by the same
Byzantine faulty processor.
For example, vertex P3P3 is a vertex with repeated name.
28
link: IHCP protocol
THE CONS_MAKING PHASE
In the Cons_Making Phase, the voteHCP function
is used to compute the consensus value at the
root of the HCP-tree (from the leaves to the root).
 After t+1 rounds of message exchange, each nonfaulty processor can receive enough messages to
remove the influence from Byzantine faulty
processors by using the voteHCP function.

29
VOTEHCP FUNCTION

The voteHCP function has three conditions:
If the vertex α is a leaf, then there is only one value
in the vertex α. So, the majority value is the value of
vertex α (condition 1);
 Condition 2 is used to get the majority value;
 If the majority value is not existed, then output the
default value , where V (condition3).

30
IHCP PROTOCOL
31
OUTLINE
 Introduction
 Agreement



Problems
Byzantine Agreement (BA) Problem
Interactive Consistency (IC) Problem
Consensus Problem
 Motivation
 Immediacy
Harmonized Consensus Protocol (IHCP)
 Conclusion
32
CONCLUSION
The classical consensus protocols do not allow
non-faulty processors to change their initialvalues during message exchange.
 Under this limitation, non-faulty processors may
agree on a consensus value they do not prefer.
 In this paper, the IHCP protocol is proposed to
deal with this problem.
 The proposed IHCP protocol allows each nonfaulty processor to change its initial-value during
message exchange for the purpose of making the
consensus value match the preference of most
processors.

33
Thank you for your listening!
Email: [email protected]
34