Wednesday, May 6, 2020

How to Setup a Quorum Block Explorer in ECS?

As promised from the previous post, once the Quorum nodes are done setting up, we need a blockchain explorer to visualize the block activity. In this post, I will share how to setup Cakeshop, a set of tools and APIs for working with Quorum.

First, you can consider either setting it up on your existing ECS which is hosting with 4 Quorum nodes, or provision a separate new ECS from Alibaba Cloud.

Next, I would suggest go to the /mnt directory then create a new directory call cakeshop, then download the latest version of Cakeshop WAR file by issuing the following command:
wget https://github.com/jpmorganchase/cakeshop/releases/download/v0.11.0/cakeshop-0.11.0.war
I expect you have installed Java if you followed my previous post installing Tessera, otherwise please install Java by executing the following command. 
sudo apt install openjdk-11-jre-headless
Due to the reason that we already had an existing Quorum node running, hence we install the Cakeshop with attach mode. Therefore, execute the following command to extract the WAR file:
java -jar cakeshop-0.11.0.war example

Now go to diretory /mnt/cakeshop/data/local, open file editor with application.properties, change the geth.auto.start=false and geth.auto.stop=false


Alternatively, if you want to enable auto start, then change the following value accordingly to your Quorum node startup script which is located at /mnt:


For instance, the above setting is base on my following Geth startup script:
#!/bin/bash
PRIVATE_CONFIG=ignore nohup geth --datadir node1 --nodiscover --verbosity 5 --networkid 33333 --raft --raftport 50401 --rpc --rpcaddr 0.0.0.0 --rpcport 22001 --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum,raft --emitcheckpoints --port 21001 >> node1.log 2>&1 &

After saving the application.properties file, execute the following command to start the blockchain explorer:
java -jar cakeshop-0.11.0.war
Wait for a while until you see this screen:



Now, your blockchain explorer is up and running, open your browser, then navigate to your server IP at port 8080, or browse the blockchain explorer at http://localhost:8080/

Look for the function Manage Nodes on the top right corner of the explorer. Then, click the Add Node button. Enter the Node Name, then Geth RPC Url which for my case is 21001 where you can find it in the Geth startup script. I also setup my Tessera which the default port is unchanged, or you can find it in my previous post that mentioning the Tessera config file at /mnt/node1t/config.json.



Once you are done, click the View button, it will bring you to the Dashboard page, and you will see blockchain explorer should attach to your existing Quorum node.

Enjoy playing around with the blockchain explorer, you can deploy contract, transfer ETH from wallet to wallet and even check who are the peers connecting and also managing your node.

1 comment:

  1. Did you know that 70% of all smartphone users will download at least one app per month? That’s a lot of users! And, the top three most downloaded apps are games, followed by social networking apps. game and app developers can earn up to $1 million from a single app. If you’re a game or app developer, you know that you need to have a great product in order to be successful. However, it takes more than just a great product to get your app noticed. You also need great marketing, something that mobile app developers & game developers are typically not very good at doing.

    ReplyDelete

Send Transactional SMS with API

This post cover how to send transactional SMS using the Alibaba Cloud Short Message Service API. Transactional SMS usually come with One Tim...