Screenshot_5.png

Step 1: Preparing the Environment

  1. Operating System: It is recommended to use a Linux-based server, such as Ubuntu 20.04 LTS.

  2. Update the system:

    sudo apt update && sudo apt upgrade -y
    
    
  3. Install necessary dependencies:

    sudo apt install build-essential git curl wget jq -y
    
    

Step 2: Installing Golang

BeraChain is written in the Go programming language, so you need to install Golang first.

  1. Download and install Go:

    wget <https://golang.org/dl/go1.18.1.linux-amd64.tar.gz>
    sudo tar -C /usr/local -xzf go1.18.1.linux-amd64.tar.gz
    
    
  2. Set up environment variables:

    echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.profile
    echo "export GOPATH=$HOME/go" >> ~/.profile
    echo "export PATH=$PATH:$GOPATH/bin" >> ~/.profile
    source ~/.profile
    
    

Step 3: Downloading and Compiling BeraChain Source Code

  1. Clone the repository:

    git clone <https://github.com/BeraChain/berachain.git>
    cd berachain
    
    
  2. Build the binaries:

    make install
    
    

Step 4: Node Configuration

  1. Initialize the node:

    berachaind init <your_node_name> --chain-id <chain-id>
    
    
  2. Download the genesis file: Download the genesis file and place it in the configuration directory.

    wget <genesis_file_URL> -O ~/.berachain/config/genesis.json
    
    
  3. Configure the configuration files: Edit the config.toml and app.toml files in the ~/.berachain/config directory as needed (e.g., set ports, logging levels, etc.).

Step 5: Generating Keys and Creating a Validator

  1. Create keys:

    berachaind keys add <your_key_name>
    
    
  2. Create the validator:

    berachaind tx staking create-validator \\\\
    --amount=1000000ubera \\\\
    --pubkey=$(berachaind tendermint show-validator) \\\\
    --moniker="<your_validator_name>" \\\\
    --chain-id=<chain-id> \\\\
    --from=<your_key_name> \\\\
    --commission-rate="0.10" \\\\
    --commission-max-rate="0.20" \\\\
    --commission-max-change-rate="0.01" \\\\
    --min-self-delegation="1"
    
    

Step 6: Running the Node