Merge branch 'master' into v1.6

This commit is contained in:
rootzoll 2020-05-24 17:50:53 +02:00
commit 9928582518
7 changed files with 3407 additions and 23 deletions

8
FAQ.md
View File

@ -273,6 +273,14 @@ If your RaspiBlitz is not working right and you like to get help from the commun
*PLEASE NOTICE: It's possible that this logs can contain private information (like IPs, node IDs, ...) - just share publicly what you feel OK with.*
## Can I run my RaspiBlitz on Solar Energy?
Yes - take a look at the project of [Chimezie Chuta](https://twitter.com/mezie16/status/1264513274080636928?s=20)
![RaspiSolar](pictures/raspisolar.jpg)
More details in his book ["A-Z of Building your own Full Bitcoin Lightning Node: A hand Book for Enthusiasts"](https://blockspace.shop/products/a-z-of-building-your-own-full-bitcoin-lightning-node-a-hand-book-for-enthusiasts)
## Why is my "final sync" taking so long?
First of all if you see a final sync over 90% and you can see from time to time small increase - you should be OK ... this can take some looong time to catch up with the network. Only in the case that you actively choose the `SYNC` option in the `Getting the Blockchain` a final sync under 90% is OK. If you did a torrent or a copy from another computer and seeing under 90% something went wrong and the setup process is ignoring your prepared Blockchain and doing a full sync - which can almost take forever on a raspberryPi.

View File

@ -10,7 +10,7 @@ source /home/admin/raspiblitz.info
# using https://getbitcoinblockchain.com/ as abase
# and make my own upt-to-date update file becuase they dont do that anymore
bitcoinBase="raspiblitz-bitcoin2-2019-05-01-base"
bitcoinUpdate="raspiblitz-bitcoin2-2020-01-28-update"
bitcoinUpdate="raspiblitz-bitcoin2-2020-01-28-update-c"
litecoinBase="raspiblitz-litecoin2-2019-06-29-base"
litecoinUpdate="raspiblitz-litecoin2-2019-06-29-update"

View File

@ -197,7 +197,7 @@ do
if [ ${scbExists} -eq 1 ]; then
#echo "Found Channel Backup File .. check if changed .."
md5checksumORG=$(sudo md5sum /mnt/hdd/lnd/data/chain/${network}/${chain}net/channel.backup 2>/dev/null | head -n1 | cut -d " " -f1)
md5checksumCPY=$(sudo md5sum /home/admin/.lnd/data/chain/${network}/${chain}net/channel.backup 2>/dev/null | head -n1 | cut -d " " -f1)
md5checksumCPY=$(sudo md5sum /home/admin/backups/scb/channel.backup 2>/dev/null | head -n1 | cut -d " " -f1)
if [ "${md5checksumORG}" != "${md5checksumCPY}" ]; then
echo "--> Channel Backup File changed"
@ -215,7 +215,7 @@ do
echo "--> Offsite-Backup SCP Server"
# its ok to ignore known host, because data is encrypted (worst case of MiM would be: no offsite channel backup)
# but its more likely that without ignoring known host, script might not run thru and that way: no offsite channel backup
sudo scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null /home/admin/.lnd/data/chain/${network}/${chain}net/channel.backup ${scpBackupTarget}/channel.backup
sudo scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null /mnt/hdd/lnd/data/chain/${network}/${chain}net/channel.backup ${scpBackupTarget}/channel.backup
result=$?
if [ ${result} -eq 0 ]; then
echo "OK - SCP Backup exited with 0"
@ -230,7 +230,7 @@ do
# see dropbox setup: https://gist.github.com/vindard/e0cd3d41bb403a823f3b5002488e3f90
if [ ${#dropboxBackupTarget} -gt 0 ]; then
echo "--> Offsite-Backup Dropbox"
source <(sudo /home/admin/config.scripts/dropbox.upload.sh upload ${dropboxBackupTarget} /home/admin/.lnd/data/chain/${network}/${chain}net/channel.backup)
source <(sudo /home/admin/config.scripts/dropbox.upload.sh upload ${dropboxBackupTarget} /mnt/hdd/lnd/data/chain/${network}/${chain}net/channel.backup)
if [ ${#err} -gt 0 ]; then
echo "FAIL - ${err}"
echo "${errMore}"

File diff suppressed because one or more lines are too long

View File

@ -45,15 +45,7 @@ def parseDate(datestr):
return datetime.datetime.strptime(datestr,"%Y-%m-%dT%H:%M:%S.%fZ")
def secondsLeft(dateObj):
return round((dateObj - datetime.datetime.utcnow().total_seconds())-SERVERSECONDSDIFF
#date1=parseDate("2020-05-24T22:25:11.630504Z")
#date2=parseDate("2020-05-25T22:25:11.630504Z")
#print(date1)
#print(date2)
#print(secondsLeft(date1))
#print(secondsLeft(date2))
#print(secondsLeft(date2)-secondsLeft(date1))
return round((dateObj - datetime.datetime.utcnow()).total_seconds())
# takes a shopurl from user input and turns it into the format needed
# also makes sure that .onion addresses run just with http not https
@ -354,11 +346,6 @@ bridge_id = order['item_details'][0]['product']['id']
bridge_ip = order['item_details'][0]['product']['host']['ip']
bridge_port = order['item_details'][0]['product']['port']
print("#### SET SERVER TIME DIFF")
serverTimeDiffSeconds=round((parseDate(order['ln_invoices'][0]['created_at'])-datetime.datetime.now()).total_seconds())
setServerTimeDiff(serverTimeDiffSeconds)
print(serverTimeDiffSeconds)
print("#### DECODE INVOICE")
print(paymentRequestStr)
paymentRequestDecoded = lndDecodeInvoice(paymentRequestStr)
@ -388,13 +375,12 @@ bridge_id = bridge['id']
bridge_suspendafter = bridge['suspend_after']
bridge_port = bridge['port']
print("#### CHECK IF DURATION DELIVERED AS PROMISED (1 hour tolerance)")
print("#### CHECK IF DURATION DELIVERED AS PROMISED")
contract_broken=False
secondsDelivered=secondsLeft(parseDate(bridge_suspendafter))
print("delivered({0}) promised({1})".format(secondsDelivered, duration))
if (secondsDelivered + 3600) < duration:
if (secondsDelivered + 600) < duration:
print("CONTRACT BROKEN - duration delivered is too small")
contract_broken=True
sys.exit()
print("BRIDGE READY: {0}:{1} -> {2}".format(bridge_ip, bridge_port, torTarget))
@ -444,7 +430,16 @@ while True:
print("BRIDGE GOT EXTENDED: {0} -> {1}".format(bridge_suspendafter, bridge['suspend_after']))
# TODO: check if extension time is as advertised
print("#### CHECK IF EXTENSION DURATION WAS CORRECT")
secondsLeftOld = secondsLeft(parseDate(bridge_suspendafter))
secondsLeftNew = secondsLeft(parseDate(bridge['suspend_after']))
secondsExtended = secondsLeftNew - secondsLeftOld
print("# secondsExtended({0}) promised({1})".format(secondsExtended, duration))
if secondsExtended < duration:
print("CONTRACT BROKEN - duration delivered is too small")
sys.exit()
else:
print("OK")
if False: '''

View File

@ -29,7 +29,7 @@ if [ "${MODE}" == "on" ]; then
whiptail --title " Static Channel Backup on Dropbox " --inputbox "
Follow the steps described at the following link
to get the DropBox-Authtoken from your account:
https://github.com/rootzoll/raspiblitz/#b-dropbox-backup-target" 11 70 2>/home/admin/.tmp
https://github.com/rootzoll/raspiblitz/#a-dropbox-backup-target" 11 70 2>/home/admin/.tmp
authtoken=$(cat /home/admin/.tmp)
shred -u /home/admin/.tmp
fi

BIN
pictures/raspisolar.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB