1. Update dependencies:

sudo apt update
sudo apt install curl git jq build-essential gcc unzip wget lz4 -y

2. Install GO (if needed):

cd $HOME && \\\\
ver="1.21.3" && \\\\
wget "<https://golang.org/dl/go$ver.linux-amd64.tar.gz>" && \\\\
sudo rm -rf /usr/local/go && \\\\
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz" && \\\\
rm "go$ver.linux-amd64.tar.gz" && \\\\
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile && \\\\
source $HOME/.bash_profile && \\\\
go version

3. Install evmosd binary:

git clone -b v0.1.0 <https://github.com/0glabs/0g-chain.git>
./0g-chain/networks/testnet/install.sh
source .profile

4. Set variables:

<aside> šŸ’” Feel free to personalize MONIKER and Wallet_NAME

</aside>

echo 'export MONIKER="parict1993"' >> ~/.bash_profile
echo 'export CHAIN_ID="zgtendermint_16600-1"' >> ~/.bash_profile
echo 'export WALLET_NAME="wallet"' >> ~/.bash_profile
echo 'export RPC_PORT="26657"' >> ~/.bash_profile
source $HOME/.bash_profile

5. Initialize the node:

cd $HOME
0gchaind config chain-id $CHAIN_ID
0gchaind init $MONIKER --chain-id $CHAIN_ID
0gchaind config node tcp://localhost:$RPC_PORT
0gchaind config keyring-backend os

6. Install current release:

wget -P ~/.0gchain/config <https://github.com/0glabs/0g-chain/releases/download/v0.1.0/genesis.json>

7. ConfigureĀ config.tomlĀ file:

PEERS="" && \\\\
SEEDS="[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656" && \\\\
sed -i -e "s/^seeds *=.*/seeds = \\\\"$SEEDS\\\\"/; s/^persistent_peers *=.*/persistent_peers = \\\\"$PEERS\\\\"/" $HOME/.0gchain/config/config.toml

8. Additional customization

8.1. Set the port (Optional):

EXTERNAL_IP=$(wget -qO- eth0.me) \\\\
PROXY_APP_PORT=26658 \\\\
P2P_PORT=26656 \\\\
PPROF_PORT=6060 \\\\
API_PORT=1317 \\\\
GRPC_PORT=9090 \\\\
GRPC_WEB_PORT=9091
sed -i \\\\
    -e "s/\\\\(proxy_app = \\\\"tcp:\\\\/\\\\/\\\\)\\\\([^:]*\\\\):\\\\([0-9]*\\\\).*/\\\\1\\\\2:$PROXY_APP_PORT\\\\"/" \\\\
    -e "s/\\\\(laddr = \\\\"tcp:\\\\/\\\\/\\\\)\\\\([^:]*\\\\):\\\\([0-9]*\\\\).*/\\\\1\\\\2:$RPC_PORT\\\\"/" \\\\
    -e "s/\\\\(pprof_laddr = \\\\"\\\\)\\\\([^:]*\\\\):\\\\([0-9]*\\\\).*/\\\\1localhost:$PPROF_PORT\\\\"/" \\\\
    -e "/\\\\[p2p\\\\]/,/^\\\\[/{s/\\\\(laddr = \\\\"tcp:\\\\/\\\\/\\\\)\\\\([^:]*\\\\):\\\\([0-9]*\\\\).*/\\\\1\\\\2:$P2P_PORT\\\\"/}" \\\\
    -e "/\\\\[p2p\\\\]/,/^\\\\[/{s/\\\\(external_address = \\\\"\\\\)\\\\([^:]*\\\\):\\\\([0-9]*\\\\).*/\\\\1${EXTERNAL_IP}:$P2P_PORT\\\\"/; t; s/\\\\(external_address = \\\\"\\\\).*/\\\\1${EXTERNAL_IP}:$P2P_PORT\\\\"/}" \\\\
    $HOME/.0gchain/config/config.toml
sed -i \\\\
    -e "/\\\\[api\\\\]/,/^\\\\[/{s/\\\\(address = \\\\"tcp:\\\\/\\\\/\\\\)\\\\([^:]*\\\\):\\\\([0-9]*\\\\)\\\\(\\\\".*\\\\)/\\\\1\\\\2:$API_PORT\\\\4/}" \\\\
    -e "/\\\\[grpc\\\\]/,/^\\\\[/{s/\\\\(address = \\\\"\\\\)\\\\([^:]*\\\\):\\\\([0-9]*\\\\)\\\\(\\\\".*\\\\)/\\\\1\\\\2:$GRPC_PORT\\\\4/}" \\\\
    -e "/\\\\[grpc-web\\\\]/,/^\\\\[/{s/\\\\(address = \\\\"\\\\)\\\\([^:]*\\\\):\\\\([0-9]*\\\\)\\\\(\\\\".*\\\\)/\\\\1\\\\2:$GRPC_WEB_PORT\\\\4/}" $HOME/.0gchain/config/app.toml