Bitcrex coin — MasterNode Deployment

Ravinayag
4 min readJul 29, 2021

Let’s build the Bitcrexcoin master node from the scratch. I used the ubuntu 21.04 LTS instance.
We have to warm up the server to build the master node for BitcrexCoin

Two types of Masternode deployment.
A) Build the node from the scratch with opensource code available in GitHub.

B) Download the binaries and run the node with dependencies.

So I will cover both, lets do the build first which is challenging case-to-case scenarios.

I recommend following my steps, which will avoid unnecessary issues.

Step 1 : Login as root and install the below prerequisites.

$ sudo apt-get update && sudo apt-get upgrade$ sudo su
$ sudo su ( if you not in root)
# DEBIAN_FRONTEND=noninteractive apt-get update
# DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y -qq upgrade
# apt install -y software-properties-common
# apt-add-repository -y ppa:bitcoin/bitcoin

Step 2 : Update the repos and install the below packages Sequentially.

# apt-get update
# apt-get install libzmq3-dev -y
# apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" make software-properties-common build-essential libtool autoconf libssl-dev libboost-dev libboost-chrono-dev libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-test-dev libboost-thread-dev sudo automake git wget curl bsdmainutils libminiupnpc-dev libgmp3-dev ufw pkg-config libevent-dev libdb5.3++ unzip libzmq5 cargo

In between if you asked for restart services while the packages installation, Select “OK” and continue the installation.

Step 3 : If the installation goes well, then you should be good to start with BitcrexCoin-Core

# cd /opt/

git clone https://github.com/BITCREXCOIN/BitcrexCoin-Core.git
git clone https://github.com/BINJITCOIN/BNJ-COIN.git
mv BNJ-COIN/depends/Makefile BitcrexCoin-Core/depends/Makefile && rm -rf BitcrexCoin-Core/depends/patches && mv BNJ-COIN/depends/patches BitcrexCoin-Core/depends/
rm –rf BNJ-COIN && chmod +x -R BitcrexCoin-Core

now, build dependencies for the current arch+OS: assuming with ‘linux x64 arch’, ensure you run this from BitcrexCoin-Core/depends on the folder.

Note: This will take time to compile. ~20 mins with 2cpu/2Gig ram for me.

# cd BitcrexCoin-Core/depends/
# make -j5

now, move back to the home folder and start autogen.sh file

# cd /opt/BitcrexCoin-Core
# ./autogen.sh

once the autogen.sh completes it will create the configure file on the same folder, you have to execute this configure file with custom options how you want to build your master node. for ex. I mention no GUI and my dependency location

# ./configure --prefix=$(pwd)/depends/x86_64-pc-linux-gnu --with-gui=no

finally, you have to compile again with the make command once the above configure is done.

# make -j5

this time the compilation takes less time and generates the binary of the BitcrexCoin-Core demon, cli, and tx commands, located in the src folder.

Copy these three files to your /usr/local/bin/ folder to get into the UNIX path.

cp src/bitcrexcoin-cli /usr/local/bin
cp src/bitcrexcoin-tx /usr/local/bin
cp src/bitcrexcoind /usr/local/bin

Step 4 : Now you are ready to configure your master node.

Before you start, you must have the required amount of coins (500 BIC) in your BIC wallet address.

The prerequisites are, an BIC Wallet address, and your wallet should have 500 BIC this time.

The wallet address can be created manually by the below steps.

Here are the steps for Windows/Linux or macOS Wallet, which you can download from here

1. Open the Soidus Core Desktop Wallet. (bitcrexcoin-qt.exe) for windows

2. Go to RECEIVE and create a New Address: Wallet for MN1

3. Send 500 BIC to your MN1 address

4. Wait for 15 confirmations. , Note the collateral TX hash

5. Go to Settings -> “Debug” -> “Console”

6. Type the following command: createmasternodekey, Note this privkey

7. In the top icons click masternode.confbitc

8. Add the following entry: MN1 your_node_ipaddress:8200 Privkey TxHash Output_index

Your entry should look something similar to this:

MN1 123.123.123.123:8200 7rRvBcfhpcytxafhZDgSJd8QAhLGEqRGiuPKhBsdNkMEQzMWmKA 366774eb066be6025e134056a5ddbde09fd3ea2c54c13d1d777c2e42c924f6fc 1

9. Save and close the file. Restart Wallet.

Step 5 : Once you Done the above, login back to the node and run the command below as root.

The script covers the Configuration of bitcrexcoin.conf , Firewall setup, Systemd services. (Note: Its forked version)

# source /usr/local/bin/setup_node# setup_nodeAnswer the questions,  the node will do all necessary configurations for your system.

Switch to your desktop wallet and enable the node under the master nodes config menu.

Once the node fully synced with the network, you can below command to know the node status.

# bitcrexcoin-cli getmasternodestatus
{
"txhash": "XXXXXXXXXXXXXXXX60b0bfffc8b3472b6944b690fcb7XXXXXXX",
"outputidx": 1,
"netaddr": "1.1.1.1:8200",
"addr": "SlkasdflksdsSSq4kcqfPMk24W1Hslw",
"status": 4,
"message": "Masternode successfully started"
}# bitcrexcoin-cli mnsync status
{
"IsBlockchainSynced": true,
"lastMasternodeList": 1624876654,
"lastMasternodeWinner": 1624878528,
"lastBudgetItem": 0,
"lastFailure": 0,
"nCountFailures": 0,
"sumMasternodeList": 597,
"sumMasternodeWinner": 17750,
"sumBudgetItemProp": 0,
"sumBudgetItemFin": 0,
"countMasternodeList": 1,
"countMasternodeWinner": 3,
"countBudgetItemProp": 3,
"countBudgetItemFin": 3,
"RequestedMasternodeAssets": 999,
"RequestedMasternodeAttempt": 0
}

Congratulations !! You have set up the bitcrex coin Master Node.

############################################

B) For Binary installation for the Master node.

According to your OS, you can download the binary packages from the releases.

Here are the steps for Windows/Linux or macOS Wallet, which you can download from here

Extract zip files and copy them to your path. For Linux

$ wget https://github.com/BITCREXCOIN/BitcrexCoin-Core/releases/download/v1.0.1.2/BitcrexCoin-1.0.1.2-pc-ubuntu-20.04-gnu.tar.gz
$ tar xf BitcrexCoin-1.0.1.2-pc-ubuntu-20.04-gnu.tar.gz
$ cp bitcrexcoin-cli /usr/local/bin
$ cp bitcrexcoin-tx /usr/local/bin
$ cp bitcrexcoind /usr/local/bin

Then follow from Step 4

Congratulations !! You have set up the bitcrexcoin Master Node.

Bonus points — — Appendix :

These two config files are located in /root/.bitcrexcoin, you can change this location if needed.

bitcrexcoin.conf

# cat bitcrexcoin.conf
rpcuser=mtVsGTEGO0 # Internal User Auth for local interaction
rpcpassword=UDV4djNz0cdKXQbXiJvNev #Password
rpcport=8300 # Internal port to communicate
rpcallowip=127.0.0.1 #Local IP to bind
listen=1 #Accept connections from outside
server=1 #Accept JSON-RPC commands
daemon=0 #Disable daemon
port=8200 #Externally port to bind
logtimestamps=1 #debug output with timestamp
maxconnections=256 #Maintain connections to peers
masternode=1 #Enable masternode
externalip=16.44.80.88:8200 #Your Node public IP
masternodeprivkey=asdfasdfasdfasdf234293583405-3r3
staking=0 #disable staking

masternode.conf

cat masternode.conf
# Masternode config file
# Format: alias IP:port masternodeprivkey collateral_output_txid collateral_output_index#MN1 == Standard_KEY_Identity
#vpsipaddress:8200 == NODE_public_ip_address_with_port
#Privkey == Masternodekey_from_cmd_createmasternodekey
#TxHash == from the 500 BICtransaction
#Output_index == enabling the masterkey# Example: mn1 127.0.0.2:8200 93HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg 2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c 0#

Tips : Second master node

You can create multiple master nodes based on your wallet balances. This can be created over the Desktop wallet

--

--

Ravinayag

Blockchain enthusiast & Research | DevOps Explorer | Hyperledger Explorer