Geth
Last updated
RELEASE_URL="https://geth.ethereum.org/downloads"
FILE="https://gethstore.blob.core.windows.net/builds/geth-linux-amd64[a-zA-Z0-9./?=_%:-]*.tar.gz"
BINARIES_URL="$(curl -s $RELEASE_URL | grep -Eo $FILE | head -1)"
echo Downloading URL: $BINARIES_URL
cd $HOME
wget -O geth.tar.gz $BINARIES_URL
tar -xzvf geth.tar.gz -C $HOME
rm geth.tar.gz
sudo mv $HOME/geth-* gethsudo mv $HOME/geth/geth /usr/local/binwget -O go.tar.gz <LATEST VERSION URL FROM ABOVE>
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go.tar.gz
echo export PATH=$PATH:/usr/local/go/bin >> $HOME/.bashrc
source $HOME/.bashrcgo version
rm go.tar.gzsudo apt-get update
sudo apt install build-essential gitmkdir -p ~/git
cd ~/git
git clone -b master https://github.com/ethereum/go-ethereum.git
cd go-ethereum
# Get new tags
git fetch --tags
# Get latest tag name
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`)
# Checkout latest tag
git checkout $latestTag
# Build
make gethsudo cp $HOME/git/go-ethereum/build/bin/geth /usr/local/binsudo nano /etc/systemd/system/execution.service[Unit]
Description=Geth Execution Layer Client service for Hoodi
Wants=network-online.target
After=network-online.target
Documentation=https://www.coincashew.com
[Service]
Type=simple
User=execution
Group=execution
Restart=on-failure
RestartSec=3
KillSignal=SIGINT
TimeoutStopSec=900
ExecStart=/usr/local/bin/geth \
--hoodi \
--port 30303 \
--http.port 8545 \
--authrpc.port 8551 \
--maxpeers 50 \
--metrics \
--http \
--datadir=/var/lib/geth \
--pprof \
--state.scheme=path \
--authrpc.jwtsecret=/secrets/jwtsecret
[Install]
WantedBy=multi-user.targetsudo systemctl daemon-reload
sudo systemctl enable executionsudo systemctl start execution
sudo systemctl status executionsudo journalctl -fu execution | cczegeth[4531]: INFO [02-04|01:20:48.280] Chain head was updated number=16000 hash=2317ae..c41107
geth[4531]: INFO [02-04|01:20:49.648] Imported new potential chain segment number=16000 hash=ab173f..33a21bsudo systemctl stop executionsudo systemctl start executionsudo systemctl status executionsudo systemctl stop execution
sudo rm -rf /var/lib/geth/*
sudo systemctl restart execution