Add Channel Tools for debugging

This commit is contained in:
Taylor Helsper 2023-07-29 00:32:31 -05:00
parent 90f8302421
commit 581fb2257f
7 changed files with 99 additions and 0 deletions

View File

@ -564,6 +564,44 @@ if [ "$CURRENT" != "$LIT_VERSION" ]; then
fi
fi
# Upgrade Lightning Chantools
echo "Upgrading chantools..."
CHANTOOLS_ARCH="chantools-linux-armv7"
if [ $IS_X86 = 1 ]; then
CHANTOOLS_ARCH="chantools-linux-amd64"
fi
if [ $IS_RASPI4_ARM64 = 1 ]; then
CHANTOOLS_ARCH="chantools-linux-arm64"
fi
CHANTOOLS_UPGRADE_URL=https://github.com/lightninglabs/chantools/releases/download/$CHANTOOLS_VERSION/$CHANTOOLS_ARCH-$CHANTOOLS_VERSION.tar.gz
CURRENT=""
if [ -f $CHANTOOLS_VERSION_FILE ]; then
CURRENT=$(cat $CHANTOOLS_VERSION_FILE)
fi
if [ "$CURRENT" != "$CHANTOOLS_VERSION" ]; then
# Download and install lit
rm -rf /opt/download
mkdir -p /opt/download
cd /opt/download
wget $CHANTOOLS_UPGRADE_URL
wget $CHANTOOLS_UPGRADE_MANIFEST_URL -O manifest.txt
wget $CHANTOOLS_UPGRADE_MANIFEST_SIG_URL -O manifest.txt.sig
gpg --verify manifest.txt.sig manifest.txt
if [ $? == 0 ]; then
# Install lit
tar -xzf chantools-*.tar.gz
mv $CHANTOOLS_ARCH-$CHANTOOLS_VERSION chantools
install -m 0755 -o root -g root -t /usr/local/bin chantools/chantools
# Mark current version
echo $CHANTOOLS_VERSION > $CHANTOOLS_VERSION_FILE
else
echo "ERROR UPGRADING CHANTOOLS - GPG FAILED"
fi
fi
# Install LndHub
if should_install_app "lndhub" ; then
LNDHUB_UPGRADE_URL=https://github.com/BlueWallet/LndHub/archive/$LNDHUB_VERSION.tar.gz

View File

@ -7,6 +7,7 @@ echo $LND_VERSION > $LND_LATEST_VERSION_FILE
echo $LOOP_VERSION > $LOOP_LATEST_VERSION_FILE
echo $POOL_VERSION > $POOL_LATEST_VERSION_FILE
echo $LIT_VERSION > $LIT_LATEST_VERSION_FILE
echo $CHANTOOLS_VERSION > $CHANTOOLS_LATEST_VERSION_FILE
echo $ELECTRS_VERSION > $ELECTRS_LATEST_VERSION_FILE
echo $LNDHUB_VERSION > $LNDHUB_LATEST_VERSION_FILE
echo $MEMPOOL_VERSION > $MEMPOOL_LATEST_VERSION_FILE

View File

@ -63,6 +63,19 @@
"requires_lightning": true,
"show_on_status_page": true
},
{
"name": "Channel Tools",
"short_name": "chantools",
"author": {"name": "Lightning Labs", "link":"https://lightning.engineering/"},
"website": {"name": "GitHub", "link": "https://github.com/lightninglabs/chantools"},
"description": "This tool provides helper functions that can be used to rescue funds locked in lnd channels in case lnd itself cannot run properly anymore.",
"category": "lightning_app",
"short_description": "Lightning Diagnostic Tool",
"requires_lightning": true,
"hide_status_icon": true,
"can_enable_disable": false,
"show_on_status_page": true
},
{
"name": "Ride the Lightning",
"short_name": "rtl",

View File

@ -50,6 +50,13 @@ LIT_LATEST_VERSION_FILE=/home/bitcoin/.mynode/lit_version_latest
LIT_UPGRADE_MANIFEST_URL=https://github.com/lightninglabs/lightning-terminal/releases/download/$LIT_VERSION/manifest-$LIT_VERSION.txt
LIT_UPGRADE_MANIFEST_SIG_URL=https://github.com/lightninglabs/lightning-terminal/releases/download/$LIT_VERSION/manifest-$LIT_VERSION.sig
CHANTOOLS_VERSION="v0.11.3"
CHANTOOLS_VERSION=$(get_app_version "$CHANTOOLS_VERSION" "chantools")
CHANTOOLS_VERSION_FILE=/home/bitcoin/.mynode/chantools_version
CHANTOOLS_LATEST_VERSION_FILE=/home/bitcoin/.mynode/chantools_version_latest
CHANTOOLS_UPGRADE_MANIFEST_URL=https://github.com/lightninglabs/chantools/releases/download/$CHANTOOLS_VERSION/manifest-$CHANTOOLS_VERSION.txt
CHANTOOLS_UPGRADE_MANIFEST_SIG_URL=https://github.com/lightninglabs/chantools/releases/download/$CHANTOOLS_VERSION/manifest-$CHANTOOLS_VERSION.sig
ELECTRS_VERSION="v0.9.9"
ELECTRS_VERSION_FILE=/home/bitcoin/.mynode/electrs_version
ELECTRS_LATEST_VERSION_FILE=/home/bitcoin/.mynode/electrs_version_latest

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -9,6 +9,7 @@ apps = [{"name": "bitcoin/bitcoin", "current_version_var
{"name": "lightninglabs/loop", "current_version_variable": "LOOP_VERSION"},
{"name": "lightninglabs/pool", "current_version_variable": "POOL_VERSION"},
{"name": "lightninglabs/lightning-terminal", "current_version_variable": "LIT_VERSION"},
{"name": "lightninglabs/chantools", "current_version_variable": "CHANTOOLS_VERSION"},
{"name": "romanz/electrs", "current_version_variable": "ELECTRS_VERSION"},
{"name": "mempool/mempool", "current_version_variable": "MEMPOOL_VERSION"},
{"name": "Ride-The-Lightning/RTL", "current_version_variable": "RTL_VERSION"},

View File

@ -630,6 +630,45 @@ if [ "$CURRENT" != "$LIT_VERSION" ]; then
fi
cd ~
# Upgrade Lightning Chantools
echo "Upgrading chantools..."
CHANTOOLS_ARCH="chantools-linux-armv7"
if [ $IS_X86 = 1 ]; then
CHANTOOLS_ARCH="chantools-linux-amd64"
fi
if [ $IS_RASPI4_ARM64 = 1 ]; then
CHANTOOLS_ARCH="chantools-linux-arm64"
fi
CHANTOOLS_UPGRADE_URL=https://github.com/lightninglabs/chantools/releases/download/$CHANTOOLS_VERSION/$CHANTOOLS_ARCH-$CHANTOOLS_VERSION.tar.gz
CURRENT=""
if [ -f $CHANTOOLS_VERSION_FILE ]; then
CURRENT=$(cat $CHANTOOLS_VERSION_FILE)
fi
if [ "$CURRENT" != "$CHANTOOLS_VERSION" ]; then
# Download and install lit
rm -rf /opt/download
mkdir -p /opt/download
cd /opt/download
wget $CHANTOOLS_UPGRADE_URL
wget $CHANTOOLS_UPGRADE_MANIFEST_URL -O manifest.txt
wget $CHANTOOLS_UPGRADE_MANIFEST_SIG_URL -O manifest.txt.sig
gpg --verify manifest.txt.sig manifest.txt
if [ $? == 0 ]; then
# Install lit
tar -xzf chantools-*.tar.gz
mv $CHANTOOLS_ARCH-$CHANTOOLS_VERSION chantools
install -m 0755 -o root -g root -t /usr/local/bin chantools/chantools
# Mark current version
echo $CHANTOOLS_VERSION > $CHANTOOLS_VERSION_FILE
else
echo "ERROR UPGRADING CHANTOOLS - GPG FAILED"
fi
fi
cd ~
# Setup "install" location for some apps
mkdir -p /opt/mynode