You need to install okbc before you go further
We support running a full node on Mac OS X
, Windows
and Linux
.
The hardware must meet certain requirements to run okbchaind
.
For node requirement details, please visit Node Requirement
These instructions are for setting up a brand new full node from scratch.
First, initialize the node and create the necessary config files:
okbchaind init <your_custom_moniker> --chain-id okbchaintest-195
NOTE: Monikers can contain only ASCII characters. Using Unicode characters will render your node unreachable.
You can edit this moniker
later, in the ~/.okbchaind/config/config.toml
file:
# A custom human readable name for this node
moniker = "<your_custom_moniker>"
You can edit the ~/.okbchaind/config/okbchaind.toml
file in order to enable the anti spam mechanism and reject incoming transactions with less than the minimum gas prices:
# This is a TOML config file.
# For more information, see https://github.com/toml-lang/toml
##### main base config options #####
# The minimum gas prices a validator is willing to accept for processing a
# transaction. A transaction's fees must meet the minimum of any denomination
# specified in this config (Our recommended quantity is 10^-9 okb).
minimum-gas-prices = ""
Your full node has been initialized!
Fetch the testnet's genesis.json
file into okbchaind
's config directory.
To verify the correctness of the configuration run:
okbchaind start --chain-id okbchaintest-195
Your node needs to know how to find peers. You'll need to add healthy seed nodes to $HOME/.okbchaind/config/config.toml
.
You can add seeds
in the ~/.okbchaind/config/config.toml
file:
# Comma separated list of seed nodes to connect to
seeds = "[email protected]:26656"
or add the seed node by flag when start node
[email protected]1:26656
For more information on seeds and peers, you can read this.
Start the full node with this command:
okbchaind start --chain-id okbchaintest-195
Check that everything is running smoothly:
okbchaincli status
These instructions are for full nodes that have ran on previous versions of and would like to upgrade to the latest testnet.
Now it is time to upgrade the software:
git clone https://github.com/okx/okbchain.git
cd okbchain
git fetch --all && git checkout dev
make install
# start your node with the new version
okbchaind start --chain-id okbchaintest-195
NOTE: If you have issues at this step, please check that you have the latest stable version of GO installed.
Note we use dev
here since it contains the latest stable release.
See the OKBC release page for details on each release.
Your full node has been cleanly upgraded!
docker pull okbchain/fullnode-testnet:latest
Download the testnet snapshot from here, and unzip it into a data directory ${DATA_DIR}.
docker run -d --name okbchain-testnet-fullnode -v ${DATA_DIR}:/root/.okbchaind/data/ -p 8545:8545 okbchain/fullnode-testnet:latest
Notice: ${DATA_DIR} has to be an absolute path
docker logs --tail 100 -f okbchain-testnet-fullnode
docker stop okbchain-testnet-fullnode
docker start okbchain-testnet-fullnode
When docker gets to the latest block, local RPC can be used:http://localhost:8545