SimBlock: A Blockchain Network Simulator
Yusuke Aoki∗ , Kai Otsuki∗ , Takeshi Kaneko∗ , Ryohei Banno† and Kazuyuki Shudo‡
Tokyo Institute of Technology
2-12-1 Ookayama, Meguro-ku, Tokyo, Japan
Email: ∗ {aoki.y.au, ootuki.k.aa, kaneko.t.ay}@m.titech.ac.jp, † banno@computer.org, ‡ shudo@is.titech.ac.jp

A hash chain of blocks
Block

Block

Hash value

Hash value
TX

TX

A cryptographic
hash function

TX

TX

Blockchains, which are a core technology of cryptocurrency,
are eliciting attention owing to its various application possibilities in numerous aside from cryptocurrency. Two of the fFuresof blockchains are the possibility to manage ledger information
without a centralized system even in a group including multiple malicious nodes and the difficulty in tampering previously
obtained data. Due to these features, blockchains are used inmany cryptocurrencies, and their applications are extensively
investigated. Accordingly, various research subjects are discussed, such as approval time and scalability. In conducting
the research on these issues, blockchain experiment are often
necessary. However, excluding simple experiments completed
at a single node, experiments on blockchains are costly. In
case of preparing a node for the experiment in a publicblockchain network built over a wide area, information on theentire network are hard to obtain. If a private experimental
network is constructed, the information on the entire network
can be obtained. Nevertheless, preparing a large number ofnodes is costly, as well as experimental conditions and network
configuration cannot be easily changed.
In this study, we developed a blockchain network simulator SimBlock for the research on blockchains. SimBlock is
event-driven, that considering block generation and message
transmission/reception as events. This simulator enables toeasily implement the algorithm of the neighbor nodes selection. Given that block creation time is calculated fromthe success probability of block generation, reproducing themining that requires a large calculation power is unnecessary,and a network that involves many nodes can be simulated. By

Node= An application-levelnetwork

TX

I. I NTRODUCTION

A peer-to-peer(P2P) networkof participating
nodes

TX

Abstract—Blockchain, which is a technology for distributedly
managing ledger information over multiple nodes without acentralized system, has elicited increasing attention. Performing
experiments on actual blockchains is difficult because a large
number of nodes in wide areas are necessary. In this study, wedeveloped a blockchain network simulator SimBlock for such
experiments. Unlike the existing simulators, SimBlock can easilychange behavior of nodes, so that it enables to investigate theinfluence of nodes’ behavior on blockchains. We compared somesimulation results with the measured values in actual blockchainsto demonstrate the validity of this simulator．Furthermore, toshow practical usage, we conducted two experiments which clarify the influence of neighbor node selection algorithms and relay
networks on the block propagation time. The simulator could
depict the effects of the two techniques on block propagation
time. The simulator will be publicly available in a few months.
Index Terms—blockchain, simulator, peer-to-peer

Fig. 1. Overview of Blockchain

modifying the block generation probability, simulating various
mining algorithms is possible.
The rest of this paper is organized as follows. Section II
provides an overview of the blockchain as background knowledge. Section III explains and evaluates SimBlock. Section
IV discusses the performed experiments with SimBlock as
the application example. Finally, Section V elaborates thesummary and future work.
II. B LOCKCHAIN
In this section, we outline the blockchain as backgroundknowledge. A blockchain is a distributed ledger technology
regarded as part of Bitcoin [1], proposed by Satoshi Nakamoto.
The nodes involved in the blockchain constitute a peer-topeer network, and a consensus algorithm is established toensure that the nodes in the network have the same ledger
information.
A. Transaction propagation and consensus
The data to be recorded in blockchains are called transactions and are broadcasted among the nodes involved in a
blockchain network. This transaction is stored in the transaction pool of each node but has not been recorded in the ledger
yet. To store the transaction in the ledger, a block where theplurality of transactions is collected should be generated. By
broadcasting this block, the transactions included in the block
are approved and recorded in the ledger. Each block contains
a hash value of the immediately preceding block. Moreover,reception. By using such protocol, unnecessary transmissionof a block with a large data amount does not occur.

K
OC
BL

INV

GET
DAT
A

Node A

Node B
Fig. 2. Protocols when Node A sends block to Node B

to change the transactions involved in the past block, rewriting
all subsequent blocks is necessary. Therefore, by adopting amechanism that appropriately determines the node generatinga new block, the blockchains can be stored with difficultyin tampering transactions even in environments with possible
multiple malicious nodes. As shown in Fig. 1, given that theblocks are connected in a row by including the immediately
preceding hash, this technique is called a blockchain.
Several algorithms have been proposed to determine thenode that generates the block. One of the most extensively
known algorithms is Proof of Work (PoW) used in Bitcoin. In
PoW, a node that generates a new block is determined based on
the computing power of the node. Each block includes a value
freely set by each node called a nonce, and each node locatesa block whose hash value of the entire block is below a certain
threshold while changing this nonce. Only the blocks below
the threshold are regarded as formal blocks. Therefore, a nodethat discovers a nonce satisfying the previously mentioned
condition can generate a new block. The difficulty of the block
generation can be adjusted by changing the threshold value.
The process of calculating the hash value of the entire block
while changing the nonce is called mining. In PoW, each node
can generate a new block with a probability proportional tothe computing power of the node.

C. Fork
A different block is generated prior to the overall propagation of one block to the entire network; hence, two different
types of blocks are propagated on the network, which iscalled a fork. When a fork appears, each node has a different
block as the latest block, and the data also lose consistency.
To prevent this fork from appearing in existing blockchains,the difficulty of block generation is increased, and the block
generation interval is lengthened to ensure that multiple blocks
are not simultaneously generated. In the case of Bitcoin, thedifficulty of block generation is adjusted to wherein one blockto generate every 10 min.
III. S IMULATOR
In this section, we explain the composition of our simulator
named SimBlock and evaluate its validity by comparing it withthe existing simulator.
A. Design and features
SimBlock is an event-driven simulator wherein each participating node generates the message and mining events. In
SimBlock, the following values are used as parameters.
•

Block parameters
Block size: The size of the block generated by the node.
Block generation interval: Block generation intervaltargeted by the blockchain.

•

Node parameters
Number of nodes: The number of nodes involved in theblockchain network.
Number of neighbor nodes: The number of neighbornodes of each node.
Location of the node: The location of each node.
Network parameters are determined by the region.
Block generation capacity: The block generation capacity of each node. The block generation difficulty is
obtained from the sum of the block generation capacityof all the nodes and the target of the block generationinterval. For example in PoW, block generation capacity
is a computing power.

•

Network parameters
Network bandwidth: The upstream and downstream
bandwidths for each region. The bandwidth when sending
messages from Region A to Region B is regarded as theminimum value of Region A’s upstream bandwidth andRegion B’s downstream bandwidth.
Network propagation delay: The average value of
propagation delay between regions. By using this averagevalue, the value according to the Pareto dispersion witha dispersion of 20% is regarded as the propagation delay.

B. Network
The nodes involved in the blockchain form a peer-to-peer
network. Transactions and blocks are broadcasted in this peerto-peer network.
The nodes participating in the network communicate periodically the obtained information of the nodes. The node selects
a new neighbor node from this node information when a newneighbor node is required. In Bitcoin’s reference implementation Bitcoin Core [2], new connections are generated at alimited occasion, such as when a node joins the network or
when an existing neighbor node is disconnected. Therefore, thetopology of Bitcoin’s network does not significantly change ina short period of time [3].
In simple protocols, block transmission/reception is performed using the protocol shown in Fig. 2. If the node thatreceived the INV message does not have the block, thenit responds with a GETDATA message and waits for blockTo calculate the arrival time of a message, we use twoparameters as follows: the propagation delay between theProc. 2nd Workshop on Cryptocurrencies and Blockchainsfor Distributed Systems (CryBlock 2019), April 2019nodes and bandwidth. The transmission time is determined by
the message size and bandwidth between the regions, and themessage reception event is derived from the total time of thetransmission time and propagation delay from the transmission
event of the message. In this simulator, compared with theblock message, the other messages are sufficiently small, andthe message size is simulated as 0 byte.
When the actual mining is reproduced, the calculation time
is high and the number of nodes to be simulated cannot be
increased. Therefore, in the proposed simulator, no algorithm,
such as actual hash calculation, is performed. The time whenthe mining becomes successful is calculated from the sum of
the block generation capacity of all the nodes and block generation difficulty. In actual blockchains, each node individually
determines the block generation difficulty from the generationinterval of previous several blocks. However, considering thatthe difficulty of all the nodes is the same in usual cases, thissimulator uniquely assigns the difficulty to all nodes. Eachnode calculates the success time distribution from its block
generation capacity and block generation difficulty. Further,
we simulate the time when the mining becomes successful
by deriving a random number that follows that distribution.
Therefore, the identification of the target block generationinterval and block generation capacity of each node, it canbe applied not only to PoW but also to various consensus
algorithms. In the case of PoW, random number are generated
by obtaining the geometric distribution from the difficulty ofblock generation and the hash rate of the node.
This simulator has the class for managing neighbor nodes.
When a node becomes a target of transmission/reception ineach message event or when a node succeeds in generating
a block, the corresponding function of the adjacent nodemanagement class is called. Hence, modifying the neighbornode selection algorithm by changing this function becomes
possible.
B. Evaluation
As an evaluation of the simulator, a comparative experiment was performed with the same condition as the existing
simulator introduced by Gervais et al. [4]. Their simulator was
designed mainly to evaluate its durability against double spoofing attack when modifying the block size and block generationinterval. Therefore, changing the parameters such as block size
is easy. However, altering the consensus algorithm of the nodeor the algorithm related to the network topology is challenging.
Moreover, given that many of the actual blockchain protocols
are reproduced, to change the algorithm of the node, adding
all the algorithms that correspond to the existing protocol isnecessary.
In the experiment, when reproducing the parameters usedin the simulator of Gervais et al., we confirm the same
simulation result. We reproduced the actual environment of
Bitcoin, Litecoin, and Dogecoin, and evaluated the occurrence
rate of the fork and time until the generated block reaches
half of the nodes involved in the network. The parameters in
Table I were reproduced similar to that of Gervais et al. ’s

TABLE IPARAMETERS OF G ERVAIS ET AL .’ S SIMULATOR
Parameter# of the nodes
Block interval
Block size
# of the connection
Geographical distribution
Bandwidth
propagation delay

BitcoinLitecoin
Dogecoin
6000
800
600
10 min2 min 30 sec
1 min
534 KiB
6.11 KiB
8 KiB
Distribution according to Miller et al. [3]Distribution according to actual blockchains
6 regional bandwidth and propagation delay

TABLE II
M EDIAN BLOCK PROPAGATION TIME (tM BP ) AND RATE OF THE FORK(rf ) IN ACTUAL NETWORKS AND SIMULATOR .

Block interval
Measured tM BP
Gervais et al. tM BP
SimBlock tM BP
Measured rf
Gervais et al. rf
SimBlock rf

Bitcoin10 min8.7 s
9.42 s
8.94 s0.41 %
1.85 %
0.58 %

Litecoin
2.5 min1.02 s0.86 s
0.85 s0.27 %
0.24 %
0.30 %

Dogecoin
1 min
0.98 s0.83 s0.82 s0.62 %
0.79 %
0.80 %

simulator. The number of nodes, block size, and distribution
area of the nodes is the result of Gervais et al.’s observationof the actual blockchain in 2015. We set up six regions,
namely, Europe, North America, Asia, Australia, Japan, andSouth America, and the bandwidth and propagation delay ofeach region were set by reproducing the network at the time.
The nodes were distributed in these six regions based on theactual data, and the bandwidth and propagation delay between
the regions were applied to the nodes. The propagation delay
followed a Pareto distribution with a mean value based on
actual data and variance of 20%. The number of connection
distribution of the nodes is based on the observation of Miller
et al. [3]. Each node randomly selected the nodes from theentire network and set it as its own neighbor nodes. However,the distribution of the nodes’ block generation capacity in theactual environment cannot be measured. In this experiment,
the normal distribution with a standard deviation of one-thirdof the average was regarded as the distribution of the block
generation capacity.
We simulated it until 10,000 blocks were generated. The
result of SimBlock and that of Gervais et al. and real data isshown in Table II.
Every result is close to the measured value and that ofGervais et al., and the proposed simulator can simulate theblockchains with good accuracy. Specifically, SimBlock cansimulate values that are very close to that of Gervais et al.
who used the same network parameters. Thus, a more accurate
simulation of the actual value is possible by reviewing theparameters. Only the rate of the fork in Bitcoin obtained alarge error because Bitcoin uses a relay network that is not
reproduced in the experiment.

Proc. 2nd Workshop on Cryptocurrencies and Blockchainsfor Distributed Systems (CryBlock 2019), April 2019For the application examples of the simulator, we performed
an experiment where the neighbor node selection algorithm
and experiment in which the participation rate in the relay
network were modified.
A. Purpose
One of the problems of existing blockchains is low transaction throughput. The throughput of the blockchain is thequotient obtained by dividing the number of transactions
included in the block by the block generation interval. In thecase of Bitcoin, the upper limit of the number of transactions
included in one block is approximately 4000, and the block
generation interval is 10 min. Therefore, the upper limit of
the throughput is approximately seven transactions per second.
This throughput is very small compared with approximately
1700 transactions per second [5], which is the average throughput of Visa, and approximately 290 transactions per second,which is the average throughput of PayPal [6]. One techniqueto address this problem is reducing the block propagation time.
By shortening the propagation delay, we can safely reduce theblock generation interval and improve the throughput [7]. We
provide two examples of methods that can reduce the blockpropagation time and simulate blockchains by adopting thesemethods.
The first method is attempting to improve the efficiency ofthe network topology. As mentioned in Section II, a blockchain
network is peer-to-peer without a central administrator. Therefore, the topology of the network is dependent on the mannerof selecting the neighbor nodes of individual nodes.
The second one is preparing a block propagation-dedicatednetwork different from the network used in the blockchain.
As existing research, bloXroute [8] and Falcon [9] proposeda block propagation-dedicated network and attempted to improve the block propagation efficiency. To measure the effectof such a relay network, we observe the propagation time whilechanging the participation rate of the node to the relay networkon the simulator.
B. Algorithm of the neighbor node selection
In the proposed algorithm, we designed each node toconnect with the node that sent the INV message earlier toit. Each node scores the node that sent the INV message toit and determines the connection priority. Each time an INV
message is received, each node records the elapsed time since
the block creation time of the INV message. Each time anode receives 10 blocks, each node updates the neighbor node
based on the average of the recorded elapsed time. For eachnode sent the INV message, sets the weighted average of therecorded elapsed time as a score. Up to the maximum numberof connections, connections are established as a new neighbornode from the smallest to the higher score. However, to obtain
information on the new node, one neighbor node is randomly
selected from all the nodes.
We performed the experiments by using the same parameters that of Bitcoin, as discussed in Section III. We comparedMedian block propagation time (msec)

IV. APPLICATION EXAMPLE OF THE SIMULATOR

9400

Normal Bitcoin nodes

9200

Proposed Algorithm

9000
8800
8600
8400
8200
8000
7800
7600
7400
0

1000

2000

3000

The number of blocks

4000

5000

Fig. 3. Median of the block propagation timethe median value of the block propagation time in networks
composed of nodes with fixed neighbor nodes and a network
consisting only of nodes adopting the proposed node selection
algorithm. The former reproduces the ordinary Bitcoin node.
The graph is shown in Fig. 3 where the horizontal axis denotes
the number of generated blocks and the vertical axis indicatesthe median of the block propagation time. The median of theblock propagation time is averaged every 100 blocks and thenplotted.
The experimental result shows that the block propagation
time of the entire network is improved using the proposed
neighbor node selection algorithm. It also demonstrates thatthe propagation time is sufficiently improved in a small
number of times by replacing the neighbor nodes. However,no improvement in the propagation time is further observed
after 100 blocks are generated. In the proposed algorithm ofthis experiment, the number randomly selected as an adjacentnode from all the nodes is set to 1. However, by changing thisnumber, the improved speed and limit of the propagation time
may change.
As observed in the figure, the propagation time in the nodes
with smaller calculation power is larger than the propagation
time in all the nodes. This observation seems to be because
the nodes with large calculation power transitions to the centerof the network as the result of the neighbor node selection.
Although we could prove that the proposed algorithm can
improve the block propagation time, we will also investigate
the effect of such network bias on the security and benefits ofindividual nodes in the future.
C. Relay network
Constructing a relay network for block distribution is proposed as the method used in reducing the block propagation
time in blockchains. The block propagation mechanism of theblockchains operates even in an environment where malicious
nodes exist, but it is not always suitable when focusing
on propagation efficiency. The relay network is a network
for block propagation developed outside the mechanism of

Proc. 2nd Workshop on Cryptocurrencies and Blockchainsfor Distributed Systems (CryBlock 2019), April 2019

Median block propagation time (msec)

10000
9000

All nodes

8000

Not involved nodes

7000

Involved nodes

6000
5000

mechanisms used for sending and receiving blocks can bepartially added by sending and receiving transactions.
In a few months, the simulator will be released on thewebsite after setting up the input method of the experimental
scenario and data output method.

4000

ACKNOWLEDGMENT

3000

This work was supported by JSPS KAKENHI Grant Numbers 16K12406, New Energy and Industrial Technology Development Organization (NEDO), and SECOM Science andTechnology Foundation.

2000
1000
0
0%

1%

5%

10%

50%

Participation ratio
Fig. 4. Median of the block propagation time

blockchains, and sending and receiving blocks among theparticipating nodes earlier than the normal block propagationin blockchains are possible.
The mechanism for improving the efficiency of the blockpropagation in a relay network varies depending on the implementation, but we conceptualized this mechanism in theexperiment. The nodes involved in the relay network areassumed to transmit the block by using the usual 10 times
the bandwidth to the other nodes participating in the relay
network. While changing the proportion of the nodes involvedin the relay network, the median value of the block propagation
time was measured. The median value of the propagation time
was measured for the three types of node groups, namely,
all the nodes in the blockchain, nodes involved in the relay
network, and nodes not involved in the relay network. The
parameters were set under the same conditions as that of
Bitcoin, as discussed in Section III.
Fig. 4 shows the simulation results. Even if the participation
rate in the relay network is as low as 5%, the propagation timeof all nodes is remarkably improved to less than 70% of theoriginal propagation time. The propagation time among thenodes participating in the relay network is further improved remarkably. As the involved rate in the relay network increases,
the difference in the propagation efficiency between the nonparticipating and participating nodes increases.

R EFERENCES[1] Satoshi Nakamoto. Bitcoin: A peer-to-peer electronic cash system. 2008.
[2] Bitcoin Core : Bitcoin. https://bitcoincore.org, (accessed Jan. 10, 2019).
[3] Andrew Miller, James Litton, Andrew Pachulski, Neal Gupta, Dave Levin,
Neil Spring, and Bobby Bhattacharjee. Discovering bitcoin s public
topology and influential nodes. 2015.
[4] Arthur Gervais, Ghassan O Karame, Karl Wüst, Vasileios Glykantzis,
Hubert Ritzdorf, and Srdjan Capkun. On the security and performanceof proof of work blockchains. In Proceedings of the 2016 ACM SIGSAC
Conference on Computer and Communications Security, pages 3–16.
ACM, 2016.
[5] VisaNet — Electronic Payments Network. https://usa.visa.com/aboutvisa/visanet.html, (accessed Jan. 10, 2019).
[6] PayPal, Inc — PayPal Reports Second Quarter 2018 Results.
https://investor.paypal-corp.com/news-releases/news-releasedetails/paypal-reports-second-quarter-2018-results?ReleaseID=1072972,(accessed Jan. 10, 2019).
[7] Christian Decker and Roger Wattenhofer. Information propagation in the
bitcoin network. In Peer-to-Peer Computing (P2P), 2013 IEEE ThirteenthInternational Conference on, pages 1–10. IEEE, 2013.
[8] Uri Klarman, Soumya Basu, Aleksandar Kuzmanovic, and Emin GünSirer. bloXroute: A scalable trustless blockchain distribution network
whitepaper.
[9] Falcon - A Fast Bitcoin Backbone. https://www.falcon-net.org/, (accessed
Jan. 10, 2019).

V. S UMMARY AND FUTURE WORKIn this study, we proposed a blockchain simulator named as
SimBlock. We confirmed that the simulator could simulate an
actual blockchain with good accuracy. We also presented thetechniques in using the simulator and demonstrated that thesimulator is useful in research.
Future work includes further expansion of the simulator.
Although the current simulator simulates a simple block transmission protocol, we plan to add an implementation that also
supports the latest transmission protocol, such as the compact
block. We also want to include a simulation of transactions
that have not been conducted this time. We believe that some

Proc. 2nd Workshop on Cryptocurrencies and Blockchainsfor Distributed Systems (CryBlock 2019), April 2019