
correct processes within a distributed system regard-
ing a specific block of transactions at a given posi-
tion within the blockchain. It can be formulated with
three fundamental properties: Agreement ensures that
no two correct processes decide on different blocks.
Validity ensures that only valid and legitimate blocks
become part of the agreed-upon chain. Termination:
The consensus protocol guarantees that all correct
processes will eventually reach a decision.
The role of a consensus protocol in the blockchain
context is crucial as it establishes a mechanism to
order blocks in total order. By doing so, it pre-
vents conflicts and inconsistencies that may arise
when multiple blocks are concurrently appended to
the blockchain, ensuring the integrity and reliability
of the transaction history (Gramoli, 2020). There ex-
ists a multitude of consensus algorithms within the
blockchain domain, encompassing both private and
public blockchain systems. These algorithms can
be categorized into proof-based mechanisms, wherein
nodes furnish evidence of their leadership to append
new blocks to the blockchain, and committee-based
mechanisms, wherein nodes engage in voting to de-
termine the subsequent block to be appended. Note-
worthy algorithms falling within these classifications
include Proof-of-stake (PoS), Proof-of-work (PoW),
DPoS (Delegated PoS), Raft, and PBFT. This research
endeavors to conduct a simulation-based evaluation
of two compelling committee-based consensus proto-
cols, namely Raft and PBFT, utilizing the NS3 net-
work simulator. The objective is to measure various
performance indicators and gain comprehensive in-
sights into their functioning.
Section 1 presents a concise overview, elucidat-
ing the fundamental concepts of blockchain and con-
sensus. Section 2 delves into the review of existing
research conducted in consensus algorithms, encom-
passing a thorough examination of performance met-
rics and other relevant measures. Section 3 provides
detailed insights regarding the two consensus algo-
rithms selected for our study. The subsequent section
4, encompasses the simulation employed, followed
by the presentation and analysis of the obtained re-
sults. Finally, section 5 summarizes the key findings
and contributions of our study. This research pro-
vides valuable contributions to the field of consensus
algorithms in the blockchain. The paper sheds light
on performance characteristics by evaluating the Raft
and PBFT protocols using the NS3 network simulator.
It offers insights that can inform future advancements
in distributed consensus mechanisms.
2 LITERATURE REVIEW
This section aims to undertake an extensive literature
review concerning consensus algorithms in a broader
context while also focusing on studies specifically
dedicated to the comparative analysis of these algo-
rithms. The objective is to identify relevant scholarly
works contributing to our understanding of consensus
mechanisms, their underlying principles, and the fac-
tors influencing their performance.
The work presented by (Huang et al., 2019) fo-
cuses on examining the effects of key parameters,
namely network size, election timeout period, and
packet loss rate, on both the probability of network
splitting and network availability. The findings of
this study indicate that by increasing the election
timeout period, it is possible to effectively reduce
the likelihood of network splitting resulting from
packet loss. Numerous prominent approaches have
emerged within the consensus algorithms domain, in-
cluding PoS, PoA, and PoW, each with distinct ad-
vantages and drawbacks. However, it is worth noting
that these algorithms also exhibit certain limitations.
For instance, PoW necessitates substantial computa-
tional power, PoS addresses complexity concerns, and
PoA demands additional processing time during the
screening process. To alleviate these issues encoun-
tered in the algorithms, as mentioned earlier, the RSP
(Rock-Scissors-Paper) algorithm (Kim et al., 2019)
has been devised, offering effective mitigation strate-
gies. The paper by (Kaur et al., 2021) presents an ex-
tensive review of mainstream consensus protocols, in-
cluding PoS, PoW, PoA, and DPoS. It offers detailed
explanations of these protocols and conducts perfor-
mance analysis. Moreover, the paper introduces a per-
formance matrix that evaluates these protocols based
on parameters such as scalability, fault tolerance rate,
latency, degree of decentralization, and other relevant
factors.
The work of (Foytik et al., 2020) introduces a
blockchain simulator developed to assess consensus
algorithms within a configurable and realistic network
environment. The simulator offers the ability to an-
alyze the influence of both the consensus and net-
work layers, thereby enabling practitioners to make
informed decisions regarding selecting appropriate
consensus algorithms. Additionally, it facilitates the
evaluation of network layer events in scenarios char-
acterized by congestion or contention in the context
of the Internet of Things (IoT).
The simulator enables users to define consensus
algorithm operations with greater fidelity than real-
time performance, all while maintaining scalability.
Simulators are integral across various industries, in-
Simulation Based Performance Evaluation of Consensus Algorithms in NS3 for Blockchain Network
657