Mainnet
This document introduces how to join the mainnet of smartBCH as a normal node (non-validator node).
Before you start, you must have a trusted server running bitcoincashnode's client with RPC enabled. The executable smartbchd will connect to it for querying staking information.
First, build the latest binary by running the step 0, 1, 2, 3 and 4 of this document.
Second, prepare the working directory:
1
cp ~/smart_bch/smartbch/smartbchd ~/build/smartbchd
2
cd ~
3
rm -rf .smartbchd
4
~/build/smartbchd init mynode --chain-id 0x2710
5
wget https://github.com/smartbch/artifacts/releases/download/v0.0.6/dot.smartbchd.tgz
6
tar zxvf dot.smartbchd.tgz
7
cp -rf dot.smartbchd/* .smartbchd/
Copied!
Third, open the ~/.smartbchd/config/app.toml file to modify the information of the bitcoincashnode's client with RPC enabled.
1
# BCH mainnet rpc url (Only BCHN & BCHD are well tested)
2
mainnet-rpc-url = "http://ip-address:8332"
3
​
4
# BCH mainnet rpc username
5
mainnet-rpc-username = "<my user name>"
6
​
7
# BCH mainnet rpc password
8
mainnet-rpc-password = "<my password>"
Copied!
Last, start smartbchd.
1
cd ~/build
2
./smartbchd start --mainnet-genesis-height=698502
Copied!

Docker

You can also run your smartBCH node using Docker. First, clone smartBCH and build Docker image for mainnet (or pull prebuilt images from DockerHub):
1
git clone https://github.com/smartbch/smartbch.git
2
cd smartbch
3
docker image build -f Dockerfile.optimized -t smartbchd:latest .
Copied!
Second, prepare smartBCH mainnet home directory:
1
cd somewhere
2
mkdir smartbchd_home
3
docker run \
4
-v path/to/smartbchd_home:/root/.smartbchd \
5
smartbchd:latest init mynode --chain-id 0x2710
6
​
7
wget https://github.com/smartbch/artifacts/releases/download/v0.0.6/dot.smartbchd.tgz
8
tar xvf dot.smartbchd.tgz
9
cp -rfv dot.smartbchd/* smartbchd_home/
Copied!
Third, edit smartbchd_home/config/app.toml, modify the information of the bitcoincashnode's client:
1
...
2
mainnet-rpc-url = "http://ip-address:8332" # BCH mainnet rpc url
3
mainnet-rpc-username = "<my user name>" # BCH mainnet rpc username
4
mainnet-rpc-password = "<my password>" # BCH mainnet rpc password
5
...
Copied!
Last, start smartbchd using Docker like this:
1
docker run \
2
-v path/to/smartbchd_home:/root/.smartbchd \
3
-p 0.0.0.0:18545:8545 \
4
-p 0.0.0.0:18546:8546 \
5
--ulimit nofile=65535:65535 \
6
-d smartbchd:latest start --mainnet-genesis-height=698502
Copied!
Last modified 5d ago
Copy link
Contents
Docker