Latest news about Bitcoin and all cryptocurrencies. Your daily crypto news habit.
So, letâs see how to create a 2 node Quorum network in just a few minutes so that you can also stress-test your own Quorum network. But if you are new to Quorum, I suggest you go through the below article, to get a better understanding of this article.
Quorum 101: Getting started with Quorum
If you are all set, then letâs get started.
Environment Used
I am using 2 separate AWS machines (Ubuntu Server 16.04 LTS, t2-micro) for 2 separate Quorum nodes. Let us call them quorum-peer-1 and quorum-peer-2.
Now, if you are running 2 nodes as above then letâs assume IP address of quorum-peer-1 is IP-1 and IP address of quorum-peer-2 is IP-2.
Also, open the following ports in the security group(itâs better to use same security group for both the nodes).
Ports to open(all TCP ports ,accessible from anywhere):
- 9001
- 9004
- 21000
- 21003
- 22000
- 22003
- 50401
- 50404
Installing prerequisites
Now, we have to install prerequisites on both the nodes(better option is to use a snapshot and use that for installing prerequisites on both the machines). To install the prerequisites just copy and run the below script on both the machines.
Installing the Quorum application
Now ssh into the quorum-peer-1 and clone the below repository.
git clone https://github.com/vasa-develop/quorum-testnode-1;cd quorum-testnode-1
Similarly, ssh into quorum-peer-2 and clone the below repository.
git clone https://github.com/vasa-develop/quorum-testnode-2;cd quorum-testnode-2
And Voila, you are set to test the network.
Initializing network
Now execute the below command on both of the machines simultaneously as a super user (using sudo su).
./start-peer.sh <IP-1> <IP-2>; tail -f qdata/logs/constellation*.log
for example if IP-1 is 12.45.78.55 and IP-2 is 12.45.78.56, then the above command will be like
./start-peer.sh 12.45.78.55 12.45.78.56; tail -f qdata/logs/constellation*.log
Make sure that the IPâs are in correct order, or the script will not work as expected
You will see output similar to below ones.
quorum-peer-1 outputquorum-peer-2 output
If you encounter some error then execute ./stop.sh and again repeat the âInitializing networkâ step.
Press CTRL+C to exit the logs.
Testing the Network
Now, itâs time to test our network. In the quorum-peer-1 execute the below command
./runscript.sh script1.js
Now, go to quorum-peer-2 and execute the below command
python3 tps.py
You will see output like the below one
Now, here is the last command to measure the TPS. Execute the below command to start bombarding private transactions from quorum-peer-1 to quorum-peer-2 . Execute the following command in quorum-peer-1 and you will see output similar to screens shown below.
python3 send.py
quorum-peer-1 transaction bombardingquorum-peer-2 tps resultsNow as you can see, in the above screen that for first 1000 trxs the average tps rate is around 140 tps.
Well, thatâs better than many blockchains, but not really mind blowing.
Well, that was itâŠyour first Quorum network stress-test. If you made it to the end then comment you TPS below using different machine sizes. Letâs see how high it can go.
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Want to learn more? Checkout my previous articlesâŠ
- Setting up your first distributed private storage network on IPFS: Part 1
- 13 sidechain projects every blockchain developer should know about
- Hosting a site for free on IPFS
Learned something? Click the đ to say âthanks!â and help others find this article.
Hold down the clap button if you liked the content! It helps me gain exposure .
Clap 50 times and follow me on Twitter: @vasa_develop
Quorum stress-test 1: 140 TPS was originally published in Hacker Noon on Medium, where people are continuing the conversation by highlighting and responding to this story.
Disclaimer
The views and opinions expressed in this article are solely those of the authors and do not reflect the views of Bitcoin Insider. Every investment and trading move involves risk - this is especially true for cryptocurrencies given their volatility. We strongly advise our readers to conduct their own research when making a decision.