Giter VIP home page Giter VIP logo

mainnet's Introduction

ExChain mainnet

This repo collects the genesis and configuration files for the various ExChain mainnet. It exists so the ExChain repo does not get bogged down with large genesis files and status updates.

Startup an exchain full node by the exchaind binary

1. Build exchaind by the latest released version

# latest_version refers to https://github.com/okx/exchain/releases/latest
git clone -b latest_version https://github.com/okx/exchain.git  
cd exchain
make mainnet

2. Startup a full node by a snapshot. (recommended)

There are 3 types of snapshots and s0 is the one with minimum data size:

  • s0: the most recent block and world state
  • s1: all historical blocks and the most recent world state
  • s3: all historical blocks and world states
# 1. Initialize exchain node configurations
export EXCHAIND_PATH=~/.exchaind (or a cutomized one)
exchaind init your_custom_moniker --chain-id exchain-66 --home ${EXCHAIND_PATH}

# 2. download snapshot
rm -rf ${EXCHAIND_PATH}/data
cd ${EXCHAIND_PATH}
wget https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/okc/snapshot/mainnet-$version-$date-$height-rocksdb.tar.gz
tar -zxvf mainnet-$version-$date-$height-rocksdb.tar.gz

# 3. start exchaind
exchaind start --home ${EXCHAIND_PATH}

3. Startup a full node by the Genesis block. (taking long, not recommended)

export EXCHAIND_PATH=~/.exchaind (You can also specify other directory)

exchaind init your_custom_moniker --chain-id exchain-66 --home ${EXCHAIND_PATH}

wget https://raw.githubusercontent.com/okex/mainnet/main/genesis.json -O ${EXCHAIND_PATH}/config/genesis.json

exchaind start --chain-id exchain-66 --home ${EXCHAIND_PATH}

Note: it needs to check the genesis file

$ shasum -a 256 ${EXCHAIND_PATH}/config/genesis.json
0958b6c9f5f125d1d6b8f56e042fa8a71b1880310227b8b2f27ba93ff7cd673b  ${EXCHAIND_PATH}/config/genesis.json

Startup an exchain full node with docker

1. make the data dir

mkdir -p ~/.exchaind/data
echo '{\n"height": "0",\n"round": "0",\n"step": 0\n}' > ~/.exchaind/data/priv_validator_state.json

2. run docker image

docker run -d --name exchain-mainnet-fullnode -v ~/.exchaind/data:/root/.exchaind/data/ -p 8545:8545 -p 26656:26656 okexchain/fullnode-mainnet:latest

3. check log

docker logs --tail 100 -f exchain-mainnet-fullnode

4. stop and remove the docker container

docker rm -f exchain-mainnet-fullnode

5. restart

You can restart in the previous data dir

docker run -d --name exchain-mainnet-fullnode -v ~/.exchaind/data:/root/.exchaind/data/ -p 8545:8545 -p 26656:26656 okexchain/fullnode-mainnet:latest

Upgrade an exchain full node to latest

1. Stop exchain full node

2. Build exchaind binary

Build exchaind by the latest released version

git clone -b latest_version https://github.com/okex/exchain.git  # latest_version refers to https://github.com/okex/exchain/releases/latest
cd exchain
make mainnet

3. Start

export EXCHAIND_PATH=~/.exchaind (You can also specify other directory)
exchaind start --chain-id exchain-66 --home ${EXCHAIND_PATH}

mainnet's People

Contributors

aaronzgl avatar ilovers avatar kamid avatar oakatplatform avatar summerpro avatar xiangjianmeng avatar ylsgit avatar zccst avatar zhongqiuwood avatar zhshy11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mainnet's Issues

where can I find peer nodes?

Hi,
I saw that the peer nodes for mainnet has been removed last year in this PR #38
Does it mean it will automatically find the peer nodes ?

I got this error very often when exchaind start for mainnet, could you help?
Screen Shot 2022-09-15 at 11 17 48

How to set a validator of the mainnet?

When I run " okexchaind start --chain-id okexchain-66" following the guide of "join mainnet" in Okex help doc.

the console print "validator set is nil in genesis and still empty after InitChain",. How to set a validator of the mainnet?

Synching speed is too slow

I download snapshot 7.29 at 8.1, now is 8.3, but node is still behind mainnet..

I saw something like syncing speed in cosmos issue, cosmos/gaia#873
then I the check my peers, I only have 4~8 peers.
Can you add more nodes to the network?

also, I can get testnet nodes by seeds in doc, maybe it’s better for the network to separate the testnet and mainnet node lists in seeds

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.