CLN update to v22.11, install and update fixes (#3487)

* cln readd mako, update and testPR checks

* cln update to v22.11

* always use cl.hsmtool.sh unlock

* add git reset --hard to not show as v22.11-modded

* update RECKLESS upgrade message, run unlock after

* one line RECKLESS upgrade message

* add to CHANGES

* cln 22.11 PGPsigner cdecker A26D6D9FE088ED58

Co-authored-by: rootzoll <johndoe@example.com>
Co-authored-by: rootzoll <christian@geektank.de>
This commit is contained in:
openoms 2022-12-07 23:29:00 +00:00 committed by GitHub
parent 41e75d9d8f
commit 4323dbbc49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 77 additions and 32 deletions

View File

@ -5,7 +5,7 @@
- New: Support of X708 UPS HAT [details](https://github.com/rootzoll/raspiblitz/pull/3087)
- Update: Bitcoin Core v24.0 [details](https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-24.0.md)
- Update: LND v0.15.5 [details](https://github.com/lightningnetwork/lnd/releases/tag/v0.15.5-beta
- Update: Core Lightning v0.12.1 [details](https://github.com/ElementsProject/lightning/releases/tag/v0.12.1)
- Update: Core Lightning v22.11 [details](https://github.com/ElementsProject/lightning/releases/tag/v22.11)
- Update: Electrum Server in Rust (electrs) v0.9.10 [details](https://github.com/romanz/electrs/blob/master/RELEASE-NOTES.md#0910-nov-3-2022)
- Update: Lightning Terminal v0.8.4-alpha [details](https://github.com/lightninglabs/lightning-terminal/releases/tag/v0.8.4-alpha)
- Update: RTL v0.13.0 with update option [details](https://github.com/Ride-The-Lightning/RTL/releases/tag/v0.12.3)

View File

@ -118,7 +118,7 @@ do
fi
#####################################
# ALWAYS: Handle System States
# ALWAYS: Handle System States
#####################################
############################
@ -133,7 +133,7 @@ do
# unlock c-lightning
if [ "${lightning}" == "cl" ]; then
/home/admin/config.scripts/cl.hsmtool.sh unlock
/home/admin/config.scripts/cl.hsmtool.sh unlock ${chain}net
sleep 5
fi
@ -143,7 +143,7 @@ do
# SETUP MENU
#####################################
# when is needed & bootstrap process signals that it waits for user dialog
# when is needed & bootstrap process signals that it waits for user dialog
if [ "${setupPhase}" != "done" ] && [ "${state}" == "waitsetup" ]; then
# push user to main menu
echo "# controlSetupDialog.sh"
@ -158,14 +158,14 @@ do
# SETUP DONE DIALOGS
#####################################
# when is needed & bootstrap process signals that it waits for user dialog
# when is needed & bootstrap process signals that it waits for user dialog
if [ "${setupPhase}" != "done" ] && [ "${state}" == "waitfinal" ]; then
# push to final setup gui dialogs
#echo "# controlFinalDialog.sh"
/home/admin/setup.scripts/controlFinalDialog.sh
# exit because controller will reboot at the end
exit 0
fi
fi
# exit loop/script in case if system shutting down
if [ "${state}" == "reboot" ] || [ "${state}" == "shutdown" ]; then
@ -185,7 +185,7 @@ do
fi
#####################################
# MAKE SURE BLOCKCHAIN/LN IS SYNC
# MAKE SURE BLOCKCHAIN/LN IS SYNC
#####################################
if [ "${setupPhase}" == "done" ] && [ "${state}" == "ready" ]; then
if [ "${lightning}" = "cl" ]; then
@ -236,7 +236,7 @@ do
echo "The WORD SEED is not matching the channel.backup file."
echo "Either there was an error in the word seed list or"
echo "or the channel.backup file is from another RaspiBlitz."
echo
echo
fi
# basic info on error
@ -250,7 +250,7 @@ do
else
rm /home/admin/channel.backup
dialog --title " OK Static-Channel-Backup IMPORT " --msgbox "
LND accepted the channel.backup file you uploaded.
LND accepted the channel.backup file you uploaded.
It can now take up to an hour until you can see,
if LND was able to recover funds from your channels.
@ -282,7 +282,7 @@ MAINMENU > REPAIR > REPAIR-LND > RETRYSCB
fi
#####################################
# DURING SETUP: Handle System States
# DURING SETUP: Handle System States
#####################################
if [ "${setupPhase}" != "done" ]; then
@ -392,4 +392,4 @@ fi
echo "Blitz command line options: blitzhelp"
echo "Back to menus use command: raspiblitz"
echo
exit 0
exit 0

View File

@ -347,10 +347,10 @@ Do you really want to update Core Lightning now?
fi
;;
RECKLESS)
whiptail --title "RECKLESS Core Lightning UPDATE to ${clLatestVersion}" --yes-button "Cancel" --no-button "Update" --yesno "Using the 'RECKLESS' Core Lightning update will simply
grab the latest Core Lightning release published on the Core Lightning GitHub page (also release candidates).
whiptail --title "RECKLESS Core Lightning UPDATE to ${clLatestVersion}" --yes-button "Cancel" --no-button "Update" \
--yesno "Using the 'RECKLESS' Core Lightning update will download the latest Core Lightning release published on the Core Lightning GitHub page.
There will be no security checks on signature, etc.
The update was not tested as a part of the release.
This update mode is only recommended for testing and
development nodes with no serious funding.
@ -367,6 +367,10 @@ Do you really want to update Core Lightning now?
whiptail --title "ERROR" --msgbox "${error}" 8 30
else
echo "# Core Lightning was updated successfully"
# unlock or fix issues from the logs
/home/admin/config.scripts/cl.hsmtool.sh unlock ${chain}net
exit 0
fi
;;
@ -553,7 +557,7 @@ case $CHOICE in
;;
ELECTRS)
/home/admin/config.scripts/bonus.electrs.sh update
;;
;;
RTL)
/home/admin/config.scripts/bonus.rtl.sh update
;;

View File

@ -380,8 +380,8 @@ if [ ${mode} = "cl-import-gui" ]; then
/home/admin/config.scripts/blitz.conf.sh set ${netprefix}clEncryptedHSM "off"
else
cat $output
echo "# Starting cl.hsmtool.sh unlock"
/home/admin/config.scripts/cl.hsmtool.sh unlock $CHAIN
echo "# Starting cl.hsmtool.sh unlock ${CHAIN}"
/home/admin/config.scripts/cl.hsmtool.sh unlock ${CHAIN}
fi
# set the lightningd service file on each active network

View File

@ -153,7 +153,7 @@ function decryptHSMsecret() {
echo "# Decrypted successfully"
else
# unlock manually
/home/admin/config.scripts/cl.hsmtool.sh unlock
/home/admin/config.scripts/cl.hsmtool.sh unlock ${CHAIN}
# attempt to decrypt again
sudo cat $passwordFile | sudo -u bitcoin lightning-hsmtool decrypt \
"$hsmSecretPath" || echo "# Couldn't decrypt"; exit 1

View File

@ -2,22 +2,22 @@
# https://lightning.readthedocs.io/
# https://github.com/ElementsProject/lightning/releases
CLVERSION=v0.12.1
CLVERSION=v22.11
# install the latest master by using the last commit id
# https://github.com/ElementsProject/lightning/commit/master
# CLVERSION="063366ed7e3b7cc12a8d1681acc2b639cf07fa23"
# https://github.com/ElementsProject/lightning/tree/master/contrib/keys
PGPsigner="niftynei" # rustyrussel D9200E6CD1ADB8F1 # cdecker A26D6D9FE088ED58
PGPsigner="cdecker" # rustyrussel D9200E6CD1ADB8F1 # cdecker A26D6D9FE088ED58 # niftynei BFF0F67810C1EED1
PGPpubkeyLink="https://raw.githubusercontent.com/ElementsProject/lightning/master/contrib/keys/${PGPsigner}.txt"
PGPpubkeyFingerprint="BFF0F67810C1EED1"
PGPpubkeyFingerprint="A26D6D9FE088ED58"
# help
if [ $# -eq 0 ]||[ "$1" = "-h" ]||[ "$1" = "--help" ];then
echo
echo "Core Lightning install script"
echo "The default version is: $CLVERSION"
echo "The default version is: ${CLVERSION}"
echo "mainnet / testnet / signet instances can run parallel"
echo
echo "Usage:"
@ -42,6 +42,7 @@ function installDependencies()
sudo apt-get install -y postgresql libpq-dev
# upgrade pip
sudo pip3 install --upgrade pip
sudo -u bitcoin pip install mako
# poetry
sudo -u bitcoin pip3 install --user poetry
if ! grep -Eq '^PATH="$HOME/.local/bin:$PATH"' /mnt/hdd/raspiblitz.conf; then
@ -61,10 +62,51 @@ function buildAndInstallCLbinaries()
echo
sudo -u bitcoin make
echo
# git reset --hard needed to not show as 'v22.11-modded'
sudo -u bitcoin git reset --hard
echo "- Install to /usr/local/bin/"
sudo make install || exit 1
}
echo "# Running: 'cl.install.sh $*'"
# check for version if specified
if [ "$1" = "update" ] && [ $# -gt 1 ]; then
CLVERSION=$2
if curl --output /dev/null --silent --head --fail \
https://github.com/ElementsProject/lightning/releases/tag/${CLVERSION};then
echo "# OK version exists at https://github.com/ElementsProject/lightning/releases/tag/${CLVERSION}"
else
echo "# ${CLVERSION} does not exist"
echo
echo "# Exiting 'cl.install.sh $*' script"
exit 1
fi
fi
# check for PR if testPR
if [ "$1" = "testPR" ]; then
if [ $# -gt 1 ]; then
PRnumber=$2
else
echo "# Need PRnumber as the second paramater"
fi
echo "# Using the PR:"
echo "# https://github.com/ElementsProject/lightning/pull/${PRnumber}"
if curl --output /dev/null --silent --head --fail \
https://github.com/ElementsProject/lightning/pull/${PRnumber};then
echo "# OK the PR exists at https://github.com/ElementsProject/lightning/pull/${PRnumber}"
echo "# Press ENTER to proceed to install Core Lightning with the PR ${PRnumber} or CTRL+C to abort."
read key
else
echo "# ${PRnumber} does not exist"
echo
echo "# Press ENTER to return to the main menu"
read key
exit 1
fi
fi
if [ "$1" = "install" ]; then
echo "# *** INSTALL CORE LIGHTNING ${CLVERSION} BINARY ***"
@ -144,8 +186,8 @@ if [ "$1" = "install" ]; then
sudo -u bitcoin git clone https://github.com/ElementsProject/lightning.git
cd lightning || exit 1
echo
echo "- Reset to version $CLVERSION"
sudo -u bitcoin git reset --hard $CLVERSION
echo "- Reset to version ${CLVERSION}"
sudo -u bitcoin git reset --hard ${CLVERSION}
sudo -u bitcoin /home/admin/config.scripts/blitz.git-verify.sh \
"${PGPsigner}" "${PGPpubkeyLink}" "${PGPpubkeyFingerprint}" "${CLVERSION}" || exit 1
@ -184,7 +226,6 @@ else
source <(/home/admin/config.scripts/network.aliases.sh getvars cl $2)
fi
echo "# Running: 'cl.install.sh $*'"
echo "# Using the settings for: ${network} ${CHAIN}"
if [ "$1" = on ]||[ "$1" = update ]||[ "$1" = testPR ];then
@ -223,8 +264,8 @@ if [ "$1" = on ]||[ "$1" = update ]||[ "$1" = testPR ];then
if [ "$1" = "update" ]; then
if [ $# -gt 1 ];then
CLVERSION=$2
echo "# Installing the version $CLVERSION"
sudo -u bitcoin git reset --hard $CLVERSION
echo "# Installing the version ${CLVERSION}"
sudo -u bitcoin git reset --hard ${CLVERSION}
else
echo "# Updating to the latest commit in:"
echo "# https://github.com/ElementsProject/lightning"
@ -236,9 +277,9 @@ if [ "$1" = on ]||[ "$1" = update ]||[ "$1" = testPR ];then
elif [ "$1" = "testPR" ]; then
PRnumber=$2 || exit 1
echo "# Using the PR:"
echo "# https://github.com/ElementsProject/lightning/pull/$PRnumber"
sudo -u bitcoin git fetch origin pull/$PRnumber/head:pr$PRnumber || exit 1
sudo -u bitcoin git checkout pr$PRnumber || exit 1
echo "# https://github.com/ElementsProject/lightning/pull/${PRnumber}"
sudo -u bitcoin git fetch origin pull/${PRnumber}/head:pr${PRnumber} || exit 1
sudo -u bitcoin git checkout pr${PRnumber} || exit 1
fi
installDependencies
@ -311,12 +352,12 @@ always-use-proxy=true
#################
# Backup plugin #
#################
/home/admin/config.scripts/cl-plugin.backup.sh on $CHAIN
/home/admin/config.scripts/cl-plugin.backup.sh on ${CHAIN}
###################
# Systemd service #
###################
/home/admin/config.scripts/cl.install-service.sh $CHAIN
/home/admin/config.scripts/cl.install-service.sh ${CHAIN}
#############
# logrotate #