Beginner

 

How to Upgrade Geth (Full Node) on BNB Smart Chain

Welcome to the tutorial on upgrading Geth, a full node, on the Binance Smart Chain. In this tutorial, we will go through the steps of upgrading Geth to the latest version of the Binance Smart Chain. Geth is an important component of the Ethereum network, serving as the implementation of a full node for the Ethereum blockchain. Upgrading Geth to the latest version is crucial to ensure the proper functioning and security of the node and the network. This tutorial is designed to be comprehensive and easy to follow, making it accessible to users of all skill levels. Whether you’re an experienced developer or new to blockchain technology, this tutorial will guide you through the process of upgrading Geth on the Binance Smart Chain. Let’s get started!

How to Upgrade Geth

Updating geth is as easy as it gets. You just need to download and install the newer version of geth, shut down your node, and restart with the new software. Geth will automatically use the data of your old node and sync the latest blocks that were mined since you shut down the old software.

Step 1: Compile the New Version or download new pre-build binaries from the release

git clone https://github.com/bnb-chain/bsc
# Enter the folder bsc was cloned into
cd bsc
# Compile and install bsc
make geth

 

# Download pre-build binaries

# Linux
wget   $(curl -s https://api.github.com/repos/bnb-chain/bsc/releases/latest |grep browser_ |grep geth_linux |cut -d\" -f4)
mv geth_linux geth
chmod -v u+x geth

# MacOS
wget   $(curl -s https://api.github.com/repos/bnb-chain/bsc/releases/latest |grep browser_ |grep geth_mac |cut -d\" -f4)
mv geth_mac geth
chmod -v u+x geth
make geth

 

Step 2: Stop Geth

$ pid=`ps -ef | grep geth | grep -v grep | awk '{print $2}'`
$ kill  $pid

 

NOTE

Make sure to use the same start-up command you used before the upgrade. So in this case we use the same command as in our tutorial

##
./geth --config ./config.toml --datadir ./node --cache 8000 --rpc.allow-unprotected-txs --txlookuplimit 0

 

With this, you complete this workshop successfully!!