Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 28 additions & 9 deletions installnodeip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ apt-get install -y curl >> $LOG_FILE 2>&1

# --- NODE BINARY SETUP --- #

NODE=https://github.com/kadena-io/chainweb-node/releases/download/2.1.1/chainweb-2.1.1.ghc-8.8.4.ubuntu-18.04.d99165c.tar.gz
NODE=https://github.com/kadena-io/chainweb-node/releases/download/2.24.1/chainweb-2.24.1.ghc-9.6.5.ubuntu-20.04.89b0ac3.tar.gz
MINER=https://github.com/kadena-io/chainweb-miner/releases/download/v1.0.3/chainweb-miner-1.0.3-ubuntu-18.04.tar.gz

decho 'Downloading Node...'
mkdir -p /root/kda
cd /root/kda/
wget --no-check-certificate $NODE >> $LOG_FILE 2>&1
tar -xvf chainweb-2.1.1.ghc-8.8.4.ubuntu-18.04.d99165c.tar.gz >> $LOG_FILE 2>&1
tar -xvf chainweb-2.24.1.ghc-9.6.5.ubuntu-20.04.89b0ac3.tar.gz >> $LOG_FILE 2>&1
wget --no-check-certificate $MINER >> $LOG_FILE 2>&1
tar -xvf chainweb-miner-1.0.3-ubuntu-18.04.tar.gz >> $LOG_FILE 2>&1

Expand Down Expand Up @@ -286,16 +286,35 @@ echo "Downloading recent database snapshot..."
echo "This may take a while..."

# Send a stop message, just in case.
systemctl stop kadena-node
# No-op if it already exists.
mkdir -p /root/.local/share/chainweb-node/mainnet01/0/
sudo systemctl stop kadena-node

# Ensure the target directory exists and set correct permissions
sudo mkdir -p /root/.local/share/chainweb-node/mainnet01/0/
sudo chown -R $USER:$USER /root/.local/share/chainweb-node/
sudo chmod -R 755 /root/.local/share/chainweb-node/

# Change to the directory
cd /root/.local/share/chainweb-node/mainnet01/0/

# Remove these, in case they were already there.
rm -rf rocksDb sqlite
sudo rm -rf rocksDb sqlite

# Fetch the snapshot.
wget http://node-dbs.chainweb.com/db-chainweb-node-ubuntu.18.04-latest.tar.gz
tar xvfz db-chainweb-node-ubuntu.18.04-latest.tar.gz >> $LOG_FILE 2>&1
systemctl start kadena-node
wget https://chainweb-data.kda.kaddex.xyz/chainweb-node-data-2024-08-11T16_00_01_Z0200.tar.gz

# Extract the snapshot
tar xvfz chainweb-node-data-2024-08-11T16_00_01_Z0200.tar.gz >> $LOG_FILE 2>&1

# Remove the downloaded archive to save space
rm chainweb-node-data-2024-08-11T16_00_01_Z0200.tar.gz

# Ensure correct permissions after extraction
sudo chown -R $USER:$USER /root/.local/share/chainweb-node/
sudo chmod -R 755 /root/.local/share/chainweb-node/

# Start the Kadena node
sudo systemctl start kadena-node

clear

# Installation Completed
Expand Down