Introducing JABS: Just Another Blockchain Simulator by@habibyajam

Introducing JABS: Just Another Blockchain Simulator

tldt arrow
Read on Terminal Reader

Too Long; Didn't Read

The main goal of this project is to create a comprehensive tool for simulating, testing, and comparing consensus algorithms on a large, near-real scale. The current version of the JABS simulator consists of more than 3100 lines of program code. It is open-source with an MIT license and it is programmed in Java. The software includes various units: network simulation units, network settings, block structure design, data exchange and messaging, consensus algorithm implementation, event design, sampling of random distributions, network node design, communication settings, Peer-to-Peer module.

Coins Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Introducing JABS: Just Another Blockchain Simulator
Habib Yajam HackerNoon profile picture

@habibyajam

Habib Yajam

Researcher in Privacy Tech, Blockchain, and Security.

About @habibyajam
LEARN MORE ABOUT @HABIBYAJAM'S EXPERTISE AND PLACE ON THE INTERNET.
react to story with heart

I am here to introduce JABS, a blockchain consensus algorithm simulator that is designed to be fast and scalable. If you intend to compare consensus algorithms in close to real-world global-scale conditions similar to Bitcoin and Ethereum networks, JABS might be the right choice for you.

JABS is an open-source academic research project with an MIT license of which I hombly am the current main developer.

JABS is programmed in Java. It is developed with a Modular structure in mind. It uses an Event-Driven and Discrete-time simulation model. The main goal of this project is to create a comprehensive tool for simulating, testing, and comparing consensus algorithms on a large, near-real scale. In such a way that it can measure the efficiency and security of consensus algorithms.

The current version of the JABS simulator consists of more than 3100 lines of program code. The software includes various units: network simulation unit, network settings, block structure design, data exchange and messaging, consensus algorithm implementation, events design, sampling of random distributions, network node design, communication settings, Peer-to-Peer connections module, and the main simulator of event-driven simulation scenarios.

In the current version of this simulator, the following consensus algorithms are implemented and a test scenario is designed for each:

  • Nakamoto Chain Consensus Algorithm
  • Ghost Chain Consensus Algorithm
  • PBFT Consensus Algorithm
  • Casper Consensus Algorithm
  • DAGsper Consensus Algorithm

In the JABS simulator, the latency in the network is designed so that each node has a certain average latency with the other global regions, depending on its region in the globe. The random distribution used to model the latency in this network is the Pareto distribution. This random distribution is common for end-to-end communication latency modeling in peer-to-peer networks. In particular, this distribution, which is a fat-tailed distribution, is more suitable for more accurate modeling of part of the delays that are related to longer periods.

In order to simulate the bandwidth limit, which is one of the most important causes of latency in blockchain networks due to the large size of the blocks, different bandwidth is set for each node of the network which is based on a measured distribution of bitcoin network for sending and receiving data. This value will be constant during the simulation run. Each node sends each packet with a delay when sending the packet according to its transmission bandwidth and packet size. Likewise to receive packages. If another package arrives for sending or receiving before sending or receiving a package, it stays in line until the previous package is fully delivered.

General types of events in the current version of the program include block generation events, transaction generation, packet sending, packet transfer over the network, and packet receiving. The block generation event occurs only for miner nodes in proportion to its Hash-rate share. In the case of algorithms that do not have a miner, such as the PBFT algorithm, blocks are exchanged whenever needed.

One of the strengths of this simulator is that it is designed to simulate the blockchain network based on measurements taken from main Bitcoin and Ethereum networks. These measurements have either been made by other researchers or by the developers of the project.

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa