JABS: Just Another Blockchain Simulator
We are all very well aware of the blockchain, NFT, Metaverse, artificial intelligence, machine learning, and NLP, and the world is adopting it quickly. Here we introduce a blockchain consensus algorithm simulator that is fast and scalable to function. If you are planning to compare real-world global-scale conditions analogous to Bitcoin and Ethereum networks, then JABS fits perfectly in place.
What is JABS?
JABSis an open-source academic research project with an MIT license. It is a network simulator that focuses on research consensus algorithms to test security and performance. It is designed so that it can easily handle the simulation of large networks just like a public blockchain network (~10000 nodes) in a fair period.
It is developed and programmed in Java with modular structuring. JABS uses the event-driven and Discrete-time simulation model. The primary purpose is to create a comprehensive tool for simulating, testing, and comparing consensus algorithms on a large and near-real scale. This is how efficiency and security can be easily measured using consensus algorithms.
More than 3100 lines of program code are added in the JABS simulator’s current version. Various units such as network simulation unit, 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 connections module and event-driven simulation scenarios are all included in the software.
Here is the list of consensus algorithms that are added in the current version of the simulator, and a new test scenario designed for each:
- Nakamoto Chain Consensus Algorithm
- Ghost Chain Consensus Algorithm
- PBFT Consensus Algorithm
- Casper Consensus Algorithm
- DAGsper Consensus Algorithm
Latency in the network is designed in JABS simulator so each node can have specific average latency with other global regions. Pareto distribution is the random distribution used in modelling the latency in the network. For everyday end-to-end communication latency modelling in peer-to-peer networks, random distribution is very common. So this distribution, which is also a fat-tailed distribution, is more suitable for accurately modelling the part of the delays related to more extended periods.
Different bandwidth is set for each node to simulate the bandwidth limit, and also it is the most important cause of latency in blockchain networks due to the large size blocks. The different bandwidth depends on a measured distribution of the bitcoin network for sending and receiving data. The value will remain constant during a simulation run. Each node sends each packet with a delay depending on the transmission bandwidth and packet size, and similarly, it will help receive packages.
When a new or another package arrives, it stays in line until the previous package is entirely delivered.
In the current program version, general types of events are included: block generation events, transaction generation, packet sending, packet transfer over the network, and packet receiving. For minor nodes in proportion to its Hash-rate share.the block generation event occurs.
Algorithms that do not have the miner in that case, PBFT algorithm, blocks are exchanged as and when needed.
If we talk about the strength of the simulator, the main power comes from the design that simulates the blockchain network based on measurements abode from Bitcoin and Ethereum networks. These measurements are either made by researchers or other developers working on the project.