📝
smartbch
  • Introduction
  • Whitepaper
  • FAQ
  • Mainnet
  • Testnets
  • Join Amber testnet as a Validator
  • Developer's Guide
    • Introduction
    • Deploy contracts using Truffle
    • Deploy contracts using Remix
    • JSON-RPC Endpoints
    • Staking Scheme
    • XHedge Smart Contract
    • Decision of the minimum gas price
  • Sha-Gate Bridge
    • Sha-Gate Specification
    • Sha-Gate Risk Analysis
    • Sha-Gate's Covenant
  • In-Depth Design Documents
    • Introduction
    • MoeingADS's General Ideas
    • MoeingADS's RabbitStore
    • MoeingADS's internal architecture
    • Benchmarking MoeingADS
    • Benchmarking MoeingEVM and MoeingADS
    • Benchmarking Testnet
    • Transaction Reordering in smartBCH
    • Transaction Parallel Execution in smartBCH
    • Send back-to-back Transactions
    • Data structures in world state
  • SmartBCH Evolution Proposals (SEPs)
    • SEP101: Store values with arbitrary length
    • SEP102: Adjustment of Used Gas
    • SEP109: On-chain Verification of Verifiable Random Functions
    • SEP18: Blockchain cheques on smartBCH
    • SEP20: Tokens on smartBCH
    • SEP206: Manipulate Native Token as a SEP20 Token
    • SEP201: Simple Stochastic Payment
  • Archives
    • Single Node Private Testnet
    • Multi-Node Testnet
    • Fake RPC Server for Testing
    • Test using MetaMask
Powered by GitBook
On this page

Was this helpful?

Mainnet

PreviousFAQNextTestnets

Last updated 2 years ago

Was this helpful?

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 steps of .

Second, prepare the working directory:

cp ~/smart_bch/smartbch/smartbchd ~/build/smartbchd
cd ~
rm -rf .smartbchd
~/build/smartbchd init mynode --chain-id 0x2710
wget https://github.com/smartbch/artifacts/releases/download/v0.0.6/dot.smartbchd.tgz
tar zxvf dot.smartbchd.tgz
cp -rf dot.smartbchd/* .smartbchd/

Third, open the ~/.smartbchd/config/app.toml file to modify the information of the bitcoincashnode's client with RPC enabled.

# BCH mainnet rpc url (Only BCHN & BCHD are well tested)
mainnet-rpc-url = "http://ip-address:8332"

# BCH mainnet rpc username
mainnet-rpc-username = "<my user name>"

# BCH mainnet rpc password
mainnet-rpc-password = "<my password>"

Last, start smartbchd.

cd ~/build
./smartbchd start --mainnet-genesis-height=698502

Docker

git clone https://github.com/smartbch/smartbch.git
cd smartbch
docker image build -f Dockerfile.optimized -t smartbchd:latest .

Second, prepare smartBCH mainnet home directory:

cd somewhere
mkdir smartbchd_home
docker run \
  -v path/to/smartbchd_home:/root/.smartbchd \
  smartbchd:latest init mynode --chain-id 0x2710

wget https://github.com/smartbch/artifacts/releases/download/v0.0.6/dot.smartbchd.tgz
tar xvf dot.smartbchd.tgz
cp -rfv dot.smartbchd/* smartbchd_home/

Third, edit smartbchd_home/config/app.toml, modify the information of the bitcoincashnode's client:

...
mainnet-rpc-url = "http://ip-address:8332" # BCH mainnet rpc url
mainnet-rpc-username = "<my user name>"    # BCH mainnet rpc username
mainnet-rpc-password = "<my password>"     # BCH mainnet rpc password
...

Last, start smartbchd using Docker like this:

docker run \
  -v path/to/smartbchd_home:/root/.smartbchd \
  -p 0.0.0.0:8545:8545 \
  -p 0.0.0.0:8546:8546 \
  -p 0.0.0.0:26656:26656 \
  --ulimit nofile=65535:65535 \
  --log-opt max-size=200m \
  -d smartbchd:latest start --mainnet-genesis-height=698502

You can also run your smartBCH node using Docker. First, clone smartBCH and build Docker image for mainnet (or ):

this document
pull prebuilt images from DockerHub