➡️ v2.0.3

➡️ Set Environment Variables

echo "export OG_PORT=56" >> $HOME/.bash_profile
source $HOME/.bash_profile

Stop Services

sudo systemctl stop 0gchaind geth

Update Binary

cd $HOME
wget https://github.com/0glabs/0gchain-NG/releases/download/v2.0.3/galileo-v2.0.3.tar.gz && tar -xvzf galileo-v2.0.3.tar.gz
rm -rf galileo-v2.0.3.tar.gz
mv $HOME/galileo-v2.0.3/bin/* $HOME/go/bin/
rm -rf $HOME/galileo-v2.0.3
chmod +x $HOME/go/bin/*

➡️ Set Environment Variables for 0gchaind Service

Note: BLOCK_NUM: The maximum block number range per call when syncing restaking events. Default is 1. Adjust this according to the limitations of your RPC service.

echo "export ETH_RPC_URL=your-holesky-rpc" >> $HOME/.bash_profile
echo "export BLOCK_NUM=your-blocknum" >> $HOME/.bash_profile
source $HOME/.bash_profile

➡️ Create Service Files

Note: If you are not setting up a validator node

    --chaincfg.restaking.enabled \\
    --chaincfg.restaking.symbiotic-rpc-dial-url ${ETH_RPC_URL} \\
    --chaincfg.restaking.symbiotic-get-logs-block-range ${BLOCK_NUM} \\

you can delete these parts.

0gchaind Service:

sudo tee /etc/systemd/system/0gchaind.service > /dev/null <<EOF
[Unit]
Description=0gchaind Node Service
After=network-online.target

[Service]
User=$USER
ExecStart=$HOME/go/bin/0gchaind start \\
    --chaincfg.chain-spec devnet \\
    --chaincfg.kzg.trusted-setup-path=$HOME/galileo-used/kzg-trusted-setup.json \\
    --chaincfg.engine.jwt-secret-path=$HOME/galileo-used/jwt-secret.hex \\
    --chaincfg.kzg.implementation=crate-crypto/go-kzg-4844 \\
    --chaincfg.block-store-service.enabled \\
    --chaincfg.node-api.enabled \\
    --chaincfg.node-api.logging \\
    --chaincfg.engine.rpc-dial-url=http://localhost:${OG_PORT}551 \\
    --chaincfg.node-api.address 127.0.0.1:${OG_PORT}500 \\
    --chaincfg.restaking.enabled \\
    --chaincfg.restaking.symbiotic-rpc-dial-url ${ETH_RPC_URL} \\
    --chaincfg.restaking.symbiotic-get-logs-block-range ${BLOCK_NUM} \\
    --home=$HOME/.0gchaind/0g-home/0gchaind-home \\
    --p2p.seeds=85a9b9a1b7fa0969704db2bc37f7c100855a75d9@8.218.88.60:26656 \\
    --p2p.external_address $(curl -s http://ipv4.icanhazip.com):${OG_PORT}656
WorkingDirectory=$HOME/galileo-used
Restart=always
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

Geth Service:

sudo tee /etc/systemd/system/geth.service > /dev/null <<EOF
[Unit]
Description=0g Geth Node Service
After=network-online.target

[Service]
User=$USER
ExecStart=$HOME/go/bin/geth \\
    --config $HOME/galileo-used/geth-config.toml \\
    --datadir $HOME/.0gchaind/0g-home/geth-home \\
    --networkid 16601 \\
    --bootnodes enode://de7b86d8ac452b1413983049c20eafa2ea0851a3219c2cc12649b971c1677bd83fe24c5331e078471e52a94d95e8cde84cb9d866574fec957124e57ac6056699@8.218.88.60:30303
Restart=always
WorkingDirectory=$HOME/galileo-used
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

Delete Old Addrbook

rm -rf $HOME/.0gchaind/0g-home/0gchaind-home/config/addrbook.json

Restart Services

cd $HOME
sudo systemctl daemon-reload
sudo systemctl restart geth
sudo systemctl restart 0gchaind

Check Logs

sudo journalctl -u 0gchaind -u geth -f

DONE!