From ef47911beb6d7055887f9522538b04bb86c8b48d Mon Sep 17 00:00:00 2001 From: rootzoll Date: Sun, 13 Aug 2023 15:18:33 +0200 Subject: [PATCH 1/6] version 1.10.0rc3 --- home.admin/_version.info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home.admin/_version.info b/home.admin/_version.info index 34222dd01..03e97e019 100644 --- a/home.admin/_version.info +++ b/home.admin/_version.info @@ -1,3 +1,3 @@ # RaspiBlitz Version - always [major].[main].[sub] (sub can be a string like '2rc1') -codeVersion="1.10.0rc2" +codeVersion="1.10.0rc3" # keep last line with comment \ No newline at end of file From 684322e1e28680f6c80eff72189778c4f93e995d Mon Sep 17 00:00:00 2001 From: /rootzoll Date: Sun, 13 Aug 2023 15:20:02 +0200 Subject: [PATCH 2/6] lndbackup also using backup device if connected (#4053) * copy backup file to backupdevice (#3979) * #3979 adding free space check to backup device * just 50MB for safety is enough --- home.admin/config.scripts/lnd.backup.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/home.admin/config.scripts/lnd.backup.sh b/home.admin/config.scripts/lnd.backup.sh index d1dbeb00c..48bc37a66 100755 --- a/home.admin/config.scripts/lnd.backup.sh +++ b/home.admin/config.scripts/lnd.backup.sh @@ -169,6 +169,25 @@ if [ ${mode} = "lnd-export" ]; then exit 1 fi + # if a backup device is connected (and has enogh free space) copy it there + source <(/home/admin/config.scripts/blitz.backupdevice.sh status) + if [ $isMounted == 1 ]; then + + # get free space in bytes from backup device + freeSpace=$(df | grep -m1 "/mnt/backup" | awk '{print $4}') + + # subtract 50MB for safety + freeSpace=$(expr ${freeSpace} - 50000000) + + # check if enough space on backup device + if [ ${freeSpace} -gt ${byteSize} ]; then + echo "# making copy to backup device ..." + sudo cp ${downloadPath}/lnd-rescue-${md5checksum}.tar.gz /mnt/backup/lnd-rescue-${md5checksum}.tar.gz + else + echo "# not enough space on backup device for extra copy'" + fi + fi + # output result data echo "# lnd service is stopped for security" echo "filename='${downloadPath}/lnd-rescue-${md5checksum}.tar.gz'" From 88280756374158d6207b988dfedbe28b17f04536 Mon Sep 17 00:00:00 2001 From: Christoph Stenglein <9399034+cstenglein@users.noreply.github.com> Date: Sun, 13 Aug 2023 15:21:31 +0200 Subject: [PATCH 3/6] change webui link in readme, fix trailing spaces & markdown issues (#4076) --- README.md | 55 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index e0740189f..9f30b2e41 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ -# ![RaspiBlitz](pictures/raspilogo_tile_400px.png) + +# ![RaspiBlitz](pictures/raspilogo_tile_400px.png) _Build your own Lightning & Bitcoin Fullnode on a RaspberryPi with an optional Display._ -`Version 1.10.0rc2 with bitcoin 25.0.0, lnd 0.16.4 & Core Lightning 23.05.2` ([api](https://github.com/fusion44/blitz_api)|[web](https://github.com/cstenglein/raspiblitz-web)) +`Version 1.10.0rc2 with bitcoin 25.0.0, lnd 0.16.4 & Core Lightning 23.05.2` ([api](https://github.com/fusion44/blitz_api)|[web](https://github.com/raspiblitz/raspiblitz-web)) ![RaspiBlitz](pictures/raspiblitz.jpg) @@ -14,25 +15,27 @@ Discover & develop the growing ecosystem of the Lightning Network by becoming a Build it as part of a [workshop](WORKSHOP.md) or as a weekend project yourself. --- + + ## Table of Contents - - [Feature Overview](#feature-overview) - - [Time Estimate to Set Up a RaspiBlitz](#time-estimate-to-set-up-a-raspiblitz) - - [Hardware Needed](#hardware-needed) - - [Assemble your RaspiBlitz](#assemble-your-raspiblitz) - - [Downloading the Software](#downloading-the-software) - - [Write the SD-Card image to your SD Card](#write-the-sd-card-image-to-your-sd-card) - - [Boot your RaspiBlitz](#boot-your-raspiblitz) - - [Support](#support) - - [Setup Process (Detailed Documentation)](#setup-process-detailed-documentation) - - [Import a Migration File](#import-a-migration-file) - - [Make a RaspiBlitz out of your Umbrel, Citadel or MyNode](#make-a-raspiblitz-out-of-your-umbrel-citadel-or-mynode) - - [Interface / APIs](#interface--apis) - - [Updating RaspiBlitz to new Version](#updating-raspiblitz-to-new-version) - - [Build the SD Card Image](#build-the-sd-card-image) - - [FAQ](#faq) - - [Community Development](#community-development) +- [Feature Overview](#feature-overview) +- [Time Estimate to Set Up a RaspiBlitz](#time-estimate-to-set-up-a-raspiblitz) +- [Hardware Needed](#hardware-needed) +- [Assemble your RaspiBlitz](#assemble-your-raspiblitz) +- [Downloading the Software](#downloading-the-software) +- [Write the SD-Card image to your SD Card](#write-the-sd-card-image-to-your-sd-card) +- [Boot your RaspiBlitz](#boot-your-raspiblitz) +- [Support](#support) +- [Setup Process (Detailed Documentation)](#setup-process-detailed-documentation) +- [Import a Migration File](#import-a-migration-file) +- [Make a RaspiBlitz out of your Umbrel, Citadel or MyNode](#make-a-raspiblitz-out-of-your-umbrel-citadel-or-mynode) +- [Interface / APIs](#interface--apis) +- [Updating RaspiBlitz to new Version](#updating-raspiblitz-to-new-version) +- [Build the SD Card Image](#build-the-sd-card-image) +- [FAQ](#faq) +- [Community Development](#community-development) --- @@ -132,7 +135,7 @@ _If the above mentioned LCD screen is sold out you can also use these different - Quimat 3,5'' Zoll Inch Touch - ELEGOO Display 3.5" Zoll TFT LCD -- kuman 3.5 Inch Touch Screen TFT Monitor +- kuman 3.5 Inch Touch Screen TFT Monitor - Waveshare 3.5inch Display for Raspberry Pi With all LCD screen models dont use the ones that have an HDMI port/connector - what you need is a 3.5 inch LCD screen model (resolution of 480×320) that connects only thru the GPIO ports (SPI) and has an XPT2046 touch controller. @@ -164,10 +167,10 @@ In this section you find the latest ready-to-use RaspiBlitz SDcard images. Basic This is the sd card image you should choose if your at the beginning of your RaspiBlitz journey or you are a casual node runner wanna download the next update/upgrade - with WebUI & fast installing bonus apps. -*WARNING: THIS IS STILL A RELEASE CANDIDATE VERSION
-JUST USE FOR TESTING, HIGHER RISK OF LOSING FUNDS!* +_WARNING: THIS IS STILL A RELEASE CANDIDATE VERSION
+JUST USE FOR TESTING, HIGHER RISK OF LOSING FUNDS!_ -- __FATPACK SD CARD IMAGE ⮕ [raspiblitz-fat-v1.10.0rc2-2023-08-02.img.gz](https://raspiblitz.fulmo.org/images/raspiblitz-fat-v1.10.0rc2-2023-08-02.img.gz)__ +- **FATPACK SD CARD IMAGE ⮕ [raspiblitz-fat-v1.10.0rc2-2023-08-02.img.gz](https://raspiblitz.fulmo.org/images/raspiblitz-fat-v1.10.0rc2-2023-08-02.img.gz)** - SHA-256: a1a187a655a7b9b9ba6b3b1609d555a801f6be754d6fd209dfede9ff9e7379b8 @@ -184,8 +184,8 @@ This is the sd card image for RaspiBlitz users that are already more experienced _WARNING: THIS IS STILL A RELEASE CANDIDATE VERSION
JUST USE FOR TESTING, HIGHER RISK OF LOSING FUNDS!_ -- **MINIMAL SD CARD IMAGE ⮕ [raspiblitz-min-v1.10.0rc2-2023-08-02.img.gz](https://raspiblitz.fulmo.org/images/raspiblitz-min-v1.10.0rc2-2023-08-02.img.gz)** -- SHA-256: d2775524f5e51770294d873a9418b445041d98b97606c4510c3e322a180f9806 +- **MINIMAL SD CARD IMAGE ⮕ [raspiblitz-min-v1.10.0rc3-2023-08-13.img.gz](https://raspiblitz.fulmo.org/images/raspiblitz-min-v1.10.0rc3-2023-08-13.img.gz)** +- SHA-256: 1303c5c3b5657658b683df0caeb50989cdad5437037ae678a6ec5a4d1c04a5f9 From 8119b33f3a0edf0603592f01e06323e5f02cf425 Mon Sep 17 00:00:00 2001 From: Christoph Stenglein Date: Wed, 16 Aug 2023 18:36:53 +0200 Subject: [PATCH 5/6] (background.scan): only init values if they do not exist --- home.admin/_background.scan.sh | 40 ++++++++++---------- home.admin/_cache.sh | 69 +++++++++++++++++++--------------- 2 files changed, 58 insertions(+), 51 deletions(-) diff --git a/home.admin/_background.scan.sh b/home.admin/_background.scan.sh index 52176c47d..4df91a4a2 100755 --- a/home.admin/_background.scan.sh +++ b/home.admin/_background.scan.sh @@ -13,7 +13,7 @@ if [ "$1" == "only-one-loop" ]; then fi # start with parameter "install" (to setup service as systemd background running) if [ "$1" == "install" ]; then - + # write systemd service cat > /etc/systemd/system/background.scan.service </dev/null + redis-cli set ${NX} ${keystr} "${valuestr}" ${additionalParams} 1>/dev/null # set in redis the timestamp timestamp=$(date +%s) - redis-cli set ${keystr}${META_LASTTOUCH_TS} "${timestamp}" ${additionalParams} 1>/dev/null + redis-cli set ${NX} ${keystr}${META_LASTTOUCH_TS} "${timestamp}" ${additionalParams} 1>/dev/null #echo "# lasttouch(${timestamp})" # check if the value has a outdate policy outdatesecs=$(redis-cli get ${keystr}${META_OUTDATED_SECONDS}) if [ "${outdatesecs}" == "" ]; then outdatesecs="-1" - fi + fi #echo "# outdatesecs(${outdatesecs})" if [ "${outdatesecs}" != "-1" ]; then - # set exipire valid flag (if its gone - value is considered as outdated) + # set expire valid flag (if its gone - value is considered as outdated) redis-cli set ${keystr}${META_VALID_FLAG} "1" EX ${outdatesecs} 1>/dev/null fi @@ -186,7 +193,7 @@ elif [ "$1" = "get" ]; then position=0 for keystr in $@ do - + # skip first parameter ((position++)) if [ $position -eq 1 ]; then @@ -243,7 +250,7 @@ elif [ "$1" = "export" ]; then # get parameter keyfilter="${2}*" - # go thru all keys by keyfilter + # go through all keys by keyfilter keylist=$(redis-cli KEYS "${keyfilter}") readarray -t arr <<< "${keylist}" for key in "${arr[@]}";do @@ -266,7 +273,7 @@ elif [ "$1" = "export" ]; then ################################## # COUNT -# count value up +# increment value ################################## # set @@ -309,7 +316,7 @@ elif [ "$1" = "focus" ]; then for key in "${arr[@]}";do if [ "${key}" == "" ]; then continue - fi + fi keyClean=$(echo $key | cut -d ":" -f1) value=$(redis-cli get "${key}") echo "${keyClean}=${value}" @@ -324,7 +331,7 @@ elif [ "$1" = "focus" ]; then exit fi - # sanatize parameters (if not -1) + # sanitize parameters (if not -1) outdatesecs="${outdatesecs//[^0-9.]/}" # check that key & value are given @@ -333,7 +340,7 @@ elif [ "$1" = "focus" ]; then exit 1 fi - # add an expire flag if given + # add an expire flag if given additionalParams="" if [ "${durationsecs//[^0-9.]/}" != "" ]; then additionalParams="EX ${durationsecs//[^0-9.]/}" @@ -358,13 +365,13 @@ elif [ "$1" = "meta" ]; then keystr=$2 default=$3 - # check that key & value are given + # check that key & value are provided if [ "${keystr}" == "" ]; then echo "# Fail: missing parameter" exit 1 fi - - # get redis basic value + + # get redis basic value valuestr=$(redis-cli get ${keystr}) echo "value=\"${valuestr}\"" @@ -380,7 +387,7 @@ elif [ "$1" = "meta" ]; then # get META_OUTDATED_SECONDS outdatesecs=$(redis-cli get ${keystr}${META_OUTDATED_SECONDS}) if [ "${outdatesecs}" == "" ]; then - # default is -1 --> never outdate + # default is -1 --> never outdate outdatesecs="-1" fi echo "outdatesecs=\"${outdatesecs}\"" @@ -406,7 +413,7 @@ elif [ "$1" = "valid" ]; then lasttouch_overall="" for keystr in $@ do - + # skip first parameter from script - thats the action string ((position++)) if [ $position -eq 1 ]; then @@ -436,7 +443,7 @@ elif [ "$1" = "valid" ]; then # get outdate police of value (outdated = not valid anymore) outdatesecs=$(redis-cli get ${keystr}${META_OUTDATED_SECONDS}) #echo "# ${keystr}${META_OUTDATED_SECONDS}=\"${outdatesecs}\"" - + # if outdate policy is default or -1 ==> never outdated if [ "${outdatesecs}" == "" ] || [ "${outdatesecs}" == "-1" ]; then continue @@ -453,7 +460,7 @@ elif [ "$1" = "valid" ]; then # so valid flag does not exists anymore # ==> this means value is outdated - # break loop and + # break loop and echo "stillvalid=\"0\"" exit 0 From e318fea70f7376b8a13fc86fa77d08037c462120 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Fri, 25 Aug 2023 16:47:47 +0200 Subject: [PATCH 6/6] NX to init --- home.admin/_background.scan.sh | 22 +++++++++++----------- home.admin/_cache.sh | 9 +++++---- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/home.admin/_background.scan.sh b/home.admin/_background.scan.sh index 4df91a4a2..6ff8fec58 100755 --- a/home.admin/_background.scan.sh +++ b/home.admin/_background.scan.sh @@ -78,17 +78,17 @@ usermod -G bitcoin root #################################################################### # init values -/home/admin/_cache.sh set system_temp_celsius "0" NX -/home/admin/_cache.sh set system_temp_fahrenheit "0" NX -/home/admin/_cache.sh set system_count_longscan "0" NX -/home/admin/_cache.sh set system_count_undervoltage "0" NX -/home/admin/_cache.sh set system_count_start_blockchain "0" NX -/home/admin/_cache.sh set system_count_start_lightning "0" NX -/home/admin/_cache.sh set system_count_start_tui "0" NX -/home/admin/_cache.sh set btc_default_peers "0" NX -/home/admin/_cache.sh set btc_default_sync_percentage "0" NX -/home/admin/_cache.sh set btc_default_address "" NX -/home/admin/_cache.sh set btc_default_port "" NX +/home/admin/_cache.sh init system_temp_celsius "0" +/home/admin/_cache.sh init system_temp_fahrenheit "0" +/home/admin/_cache.sh init system_count_longscan "0" +/home/admin/_cache.sh init system_count_undervoltage "0" +/home/admin/_cache.sh init system_count_start_blockchain "0" +/home/admin/_cache.sh init system_count_start_lightning "0" +/home/admin/_cache.sh init system_count_start_tui "0" +/home/admin/_cache.sh init btc_default_peers "0" +/home/admin/_cache.sh init btc_default_sync_percentage "0" +/home/admin/_cache.sh init btc_default_address "" +/home/admin/_cache.sh init btc_default_port "" # import all base values from raspiblitz.info echo "importing: ${infoFile}" diff --git a/home.admin/_cache.sh b/home.admin/_cache.sh index 82e8848ed..8c8bc9a27 100755 --- a/home.admin/_cache.sh +++ b/home.admin/_cache.sh @@ -14,6 +14,7 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "-help" ]; echo "_cache.sh ramdisk [on|off]" echo "_cache.sh keyvalue [on|off]" echo + echo "_cache.sh init [key] [value] (only sets value if not exists)" echo "_cache.sh set [key] [value] [?expire-seconds]" echo "_cache.sh get [key1] [?key2] [?key3] ..." echo @@ -133,7 +134,7 @@ elif [ "$1" = "keyvalue" ] && [ "$2" = "off" ]; then ################### # set -elif [ "$1" = "set" ]; then +elif [ "$1" = "set" ] || [ "$1" = "init" ]; then # get parameters keystr=$2 @@ -148,8 +149,8 @@ elif [ "$1" = "set" ]; then NX="" - if [ "${expireOrNx}" == "NX" ]; then - NX="NX" + if [ "$1" = "init" ]; then + NX="NX " else # filter from expire just numbers expireOrNx="${expire//[^0-9.]/}" @@ -167,7 +168,7 @@ elif [ "$1" = "set" ]; then # set in redis the timestamp timestamp=$(date +%s) - redis-cli set ${NX} ${keystr}${META_LASTTOUCH_TS} "${timestamp}" ${additionalParams} 1>/dev/null + redis-cli set ${NX}${keystr}${META_LASTTOUCH_TS} "${timestamp}" ${additionalParams} 1>/dev/null #echo "# lasttouch(${timestamp})" # check if the value has a outdate policy