Skip to content
Home » Nodes » Upgrading to Penumbra Node v0.66.0: A Comprehensive Guide for Updating Your Existing Setup

Upgrading to Penumbra Node v0.66.0: A Comprehensive Guide for Updating Your Existing Setup

  1. Remove old installations of Penumbra and CometBFT.
  2. Back up existing wallet data.
  3. Update and install necessary system packages (v0.66.0).
  4. Install Go and set environment variables.
  5. Install Rust.
  6. Clone Penumbra repository and checkout the specified version.
  7. Build pcli and pd.
  8. Install and configure CometBFT.
  9. Set system limits for file descriptors.
  10. Configure and start the node and CometBFT using tmux.
  11. Add pcli to the system path.

Quick Node Installation with a Single Command

curl -O https://nodes.bond/penumbra_64-2-mod.sh && chmod +x penumbra_64-2-mod.sh && ./penumbra_64-2-mod.sh

Step-by-Step Manual for Installing

#!/bin/bash

# Remove previous versions of Penumbra and related modules
echo "Removing old versions of Penumbra and related modules..."
sudo rm -rf /root/penumbra /root/cometbft /root/.local/share/pcli/

# Rename existing Penumbra directory (for updates)
if [ -d "/root/penumbra" ]; then
    mv /root/penumbra /root/penumbra_old
fi

# Update package list and install dependencies
sudo apt-get update
sudo apt-get install -y build-essential pkg-config libssl-dev clang git-lfs tmux libclang-dev curl

# Install Go 1.20
GO_VERSION="1.20"
wget https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz
sudo tar -xvf go${GO_VERSION}.linux-amd64.tar.gz
sudo mv go /usr/local

# Set Go environment variables
echo "export GOROOT=/usr/local/go" >> $HOME/.profile
echo "export GOPATH=$HOME/go" >> $HOME/.profile
echo "export PATH=$GOPATH/bin:$GOROOT/bin:$PATH" >> $HOME/.profile
source $HOME/.profile

# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env

# Clone Penumbra repository and checkout the specified version
git clone https://github.com/penumbra-zone/penumbra
cd penumbra
git fetch
git checkout v0.66

# Build pcli and pd
cargo build --release --bin pcli
cargo build --release --bin pd

# Install CometBFT
cd /root
git clone https://github.com/cometbft/cometbft.git
cd cometbft
git checkout v0.37.2

# Update Go modules
go mod tidy

# Compile the cometbft executable
go build -o cometbft ./cmd/cometbft

# Move the compiled executable to the cometbft directory
mv cometbft /root/cometbft/

# Proceed with installation
make install

# Increase the number of allowed open file descriptors
ulimit -n 4096

# Request the node name from the user
echo "Enter the name of your node:"
read MY_NODE_NAME

# Retrieve the external IP address of the server
IP_ADDRESS=$(curl -4s ifconfig.me)

# Join the testnet
cd /root/penumbra
./target/release/pd testnet unsafe-reset-all
./target/release/pd testnet join --external-address $IP_ADDRESS:26656 --moniker $MY_NODE_NAME

# Create a new wallet or restore an existing one 
echo "Do you want to create a new wallet or restore an existing one? [new/restore]"
read WALLET_CHOICE
if [ "$WALLET_CHOICE" = "new" ]; then
    SEED_PHRASE=$(./target/release/pcli init soft-kms generate)
    echo "Your seed phrase is: $SEED_PHRASE"
    echo "Write down your seed phrase and keep it safe. Press any key to continue."
    read -n 1 -s
elif [ "$WALLET_CHOICE" = "restore" ]; then
    ./target/release/pcli init soft-kms import-phrase
    echo "Enter your seed phrase:"
    read SEED_PHRASE
    echo $SEED_PHRASE | ./target/release/pcli init soft-kms import-phrase
else
    echo "Invalid choice. Exiting."
    exit 1
fi

# Add pcli to the system path for simplified command usage
echo "export PATH=\$PATH:/root/penumbra/target/release" >> $HOME/.profile
source $HOME/.profile

# Launch the node and CometBFT in tmux
tmux kill-session -t penumbra
tmux new-session -d -s penumbra '/root/penumbra/target/release/pd start' && tmux split-window -h '/root/cometbft/cometbft start --home ~/.penumbra/testnet_data/node0/cometbft' && tmux attach -t penumbra

If everything went well, you will see on the screen:

Leave a Reply

Your email address will not be published. Required fields are marked *