jabs
a blockchain network simulator aimed at researching consensus algorithms for performance and security
Science Score: 57.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.2%) to scientific vocabulary
Keywords
Repository
a blockchain network simulator aimed at researching consensus algorithms for performance and security
Basic Info
Statistics
- Stars: 83
- Watchers: 6
- Forks: 26
- Open Issues: 3
- Releases: 3
Topics
Metadata Files
README.md
Just Another Blockchain Simulator

JABS - Just Another Blockchain Simulator.
JABS is a blockchain network simulator aimed at researching consensus algorithms for performance and security. It is designed to easily handel simulation of networks as large as normal public blockchain networks (~10000 nodes) in reasonable time.
Installation
There are two suggested installation methods Introduced here. Installation on a Debian-based linux like Ubuntu and installation using Dockerfile.
Installation on Ubuntu 20.04 and 22.04 ###
First, you should install git, openjdk-17-jdk, and maven.
shell script
$ sudo apt install git openjdk-17-jdk
$ sudo apt install maven
After that, clone the git repository.
shell script
$ git clone https://github.com/hyajam/jabs.git
Use maven mvn to make a jar file.
shell script
$ cd jabs
$ mvn clean install
You might need to set JAVA_HOME to java home directory (this
might vary depending on your linux distribution and jdk version):
shell
$ JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/; mvn clean install
Then to run the compiled jar file.
shell script
$ java -jar target/jabs.jar
Installation using Docker-Compose
The easiest method for running jabs is using docker-compose. You need
to have git and docker-compose installed on your system. Clone
the repository using git.
shell script
$ git clone https://github.com/hyajam/jabs.git
Then, use docker compose to build an image and run the container. The output
of simulation will be automatically sent to output/ folder.
shell script
$ cd jabs
$ docker-compose up
If your user id and group id are not 1000 you might need to change the
values in Dockerfile and compose.yaml accordingly. You might be able to
find your user id and group id using commands id -u and id -g in linux.
Quick Start
Usage
Currently, you can use JABS by editing Main.java file and creating new scenarios for your tests.
Supported Consensus algorithms
Currently, the following consensus algorithms are implemented in JABS: 1. Nakamoto Consensus 2. Ghost protocol 3. PBFT 4. Casper FFG 5. IOTA Tangle 6. Nakamoto Heaviest-Chain 7. Robust Round Robin
Roadmap
- [x] Add new block mining process that can support adjustable difficulty.
- [x] Add multiple loggers and scenarios in main class.
- [ ] Add detailed comparison with other simulators in README.md.
- [x] Add new network latency stats that has countries instead of continents.
- [ ] Add events for network churn.
- [ ] Exploring possible multithreading options.
- [ ] Add new consensus algorithms:
- [x] IOTA
- [ ] Honey Badger BFT
- [ ] DPoS
Other Blockchain Simulators
- Bitcoin Simulator: developed in C++ and based on NS3. Can simulate Bitcoin, Litecoin, Dogecoin and probably other blockchain networks based on Nakamoto Consensus. Although it is probably the most accurate of the blockchain simulators it is fairly slow. Does not simulate transactions. (https://github.com/arthurgervais/Bitcoin-Simulator)
- BlockSim: developed in Python. Supports simulating both Bitcoin and Ethereum. Accurate but slow. Simulates transactions and connection handshakes. (https://github.com/carlosfaria94/blocksim)
- SimBlock: developed in Java. In current version supports only Nakamoto Consensus. Plans on adding GHOST protocol. Fast. Does not simulate transactions. SimBlock partially inspired this project. (https://github.com/dsg-titech/simblock)
Contributing
Any contributions you make to JABS project are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star. Thanks.
Steps for code contribution to the project:
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE for more information.
Publications
Please use the following bibtex reference to cite our paper:
@ARTICLE{10144349,
author={Yajam, Habib and Ebadi, Elnaz and Akhaee, Mohammad Ali},
journal={IEEE Transactions on Network Science and Engineering},
title={JABS: A Blockchain Simulator for Researching Consensus Algorithms},
year={2023},
volume={},
number={},
pages={1-12},
doi={10.1109/TNSE.2023.3282916}
}
Contact
Habib Yajam - @habibyajam - habib.yajam@gmail.com
Owner
- Login: hyajam
- Kind: user
- Repositories: 1
- Profile: https://github.com/hyajam
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Yajam"
given-names: "Habib"
orcid: "https://orcid.org/0000-0003-4344-7446"
- family-names: "Ebadi"
given-names: "Elnaz"
- family-names: "Akhaee"
given-names: "Mohammad Ali"
title: "JABS: Just Another Blockchain Simulator"
version: 0.2.0
date-released: 2023-06-08
url: "https://github.com/hyajam/jabs"
preferred-citation:
type: article
authors:
- family-names: "Yajam"
given-names: "Habib"
orcid: "https://orcid.org/0000-0003-4344-7446"
- family-names: "Ebadi"
given-names: "Elnaz"
- family-names: "Akhaee"
given-names: "Mohammad Ali"
doi: "10.1109/TNSE.2023.3282916"
journal: "IEEE Transactions on Network Science and Engineering"
month: 6
start: 1 # First page number
end: 12 # Last page number
title: "Yajam, Habib and Ebadi, Elnaz and Akhaee, Mohammad Ali"
year: 2023
GitHub Events
Total
- Watch event: 12
- Pull request event: 1
- Fork event: 3
Last Year
- Watch event: 12
- Pull request event: 1
- Fork event: 3
Dependencies
- actions/checkout v2 composite
- actions/setup-java v2 composite
- maven 3-openjdk-17 build
- de.siegmar:fastcsv 2.1.0
- org.apache.commons:commons-math3 3.6.1
- junit:junit 4.13.2 test