Skip to content

Latest commit

 

History

History
115 lines (95 loc) · 3.29 KB

1.install-compile.md

File metadata and controls

115 lines (95 loc) · 3.29 KB

Install / Compile last BitCanna binary

bcnad is a blockchain application built using Cosmos SDK v.0.50.10 and Comet-BFT v.0.38.15 and IBC-go v8.5.2.

In this guide you will find how to install the last binary or compile it by yourself.

  • Before you start, you might want to ensure your system is up to date. Besides, you can install a utility named jq to read and navigate in JSON files and outputs.

    sudo apt-get update
    sudo apt-get upgrade -y
    sudo apt-get install -y build-essential curl wget jq
    
  • Increasing the default open files limit. If we don't raise this value, nodes will crash once the network grows large enough.

    sudo su -c "echo 'fs.file-max = 65536' >> /etc/sysctl.conf"
    sudo sysctl -p
    

Option 1. Download and install the last binary

By downloading the binary we avoid compiling the source code.

  1. Download the latest version (v4.0.1) from Github:

    cd $HOME
    wget -nc https://github.com/BitCannaGlobal/bcna/releases/download/v4.0.1/bcnad_linux_amd64.tar.gz
    
  2. Check the sha256sum for the downloaded file.

    sha256sum bcnad_linux_amd64.tar.gz
    

    It must return: c2dcb6842e2e83ba5fe9b526899650d5e69aff3b3d7721e050e09dc84c74a92b

  3. Verify that the version is 4.0.1

    rm -f ./bcnad #delete old file if exist
    tar zxvf  bcnad_linux_amd64.tar.gz
    rm bcnad_linux_amd64.tar.gz
    chmod +x bcnad
    ./bcnad version
    
  4. Move the new binary to your machine's PATH and overwrite the previous version

    sudo mv bcnad $(which bcnad)   #copy&paste don't replace anything
    

    If you know the exact destination you could also run:

    sudo mv bcnad /usr/local/bin/ #or wherever you have it
    

Option 2. Compile instructions:

Install GoLang v1.23.3

The official instructions can be found here: https://golang.org/doc/install

  1. Firstly, remove any existing old Go installation as root
    sudo rm -rf /usr/local/go
    
  2. Download the software and unpack:
    wget https://go.dev/dl/go1.23.3.linux-amd64.tar.gz  
    sudo tar -C /usr/local -xzvf go1.23.3.linux-amd64.tar.gz 
    
  3. Update environment variables to include Go (copy everything & paste)
    cat <<'EOF' >>$HOME/.profile
    export GOROOT=/usr/local/go
    export GOPATH=$HOME/go
    export GO111MODULE=on
    export GOBIN=$HOME/go/bin
    export PATH=$PATH:/usr/local/go/bin:$GOBIN
    EOF
    source $HOME/.profile
    
  4. To verify that Go is installed:
    go version
    
    Should return go version go1.23.3 linux/amd64

Download source code and compile

  1. Download the source code using git

    git clone https://github.com/BitCannaGlobal/bcna.git
    cd bcna
    git checkout v4.0.1
    make build   #it build the binary in build/ folder
    
  2. Verify the version:

    build/bcnad version
    

    The output must be 4.0.1

  3. You now have two options:

    • Move the binary to the /usr/local/bin path with:
      sudo mv build/bcnad /usr/local/bin/
      
    • Or compile and install the binary in the $GOPATH path:
      make install
      

Next step: Syncing the chain.

tags: doc github