Browse Source

Merge pull request #696 from openoms/1.3updates

update lnd to 0.7.1 and bitcoind to 0.18.0
v1.3
Christian Rotzoll 6 years ago
committed by GitHub
parent
commit
c3c35b0caf
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 65
      build_sdcard.sh
  2. 2
      home.admin/BBcreateInvoice.sh
  3. 2
      home.admin/config.scripts/internet.tor.sh

65
build_sdcard.sh

@ -347,8 +347,7 @@ sudo bash -c "echo '# end of pam-auth-update config' >> /etc/pam.d/common-sessio
# set version (change if update is available) # set version (change if update is available)
# https://bitcoincore.org/en/download/ # https://bitcoincore.org/en/download/
# bitcoinVersion="0.18.0" # commented out checksums for this version until lnd version >0.5.1 bitcoinVersion="0.18.0"
bitcoinVersion="0.17.1"
# set OS version and checksum # set OS version and checksum
# needed to make sure download is not changed # needed to make sure download is not changed
@ -356,23 +355,19 @@ bitcoinVersion="0.17.1"
# https://bitcoincore.org/bin/bitcoin-core-0.18.0/SHA256SUMS.asc # https://bitcoincore.org/bin/bitcoin-core-0.18.0/SHA256SUMS.asc
if [ ${isARM} -eq 1 ] ; then if [ ${isARM} -eq 1 ] ; then
bitcoinOSversion="arm-linux-gnueabihf" bitcoinOSversion="arm-linux-gnueabihf"
# bitcoinSHA256="3d7eb57290b2f14c495a24ecbab8100b35861f0c81bc10d86e5c0a8ec8284b27" bitcoinSHA256="3d7eb57290b2f14c495a24ecbab8100b35861f0c81bc10d86e5c0a8ec8284b27"
bitcoinSHA256="aab3c1fb92e47734fadded1d3f9ccf0ac5a59e3cdc28c43a52fcab9f0cb395bc"
fi fi
if [ ${isAARCH64} -eq 1 ] ; then if [ ${isAARCH64} -eq 1 ] ; then
bitcoinOSversion="aarch64-linux-gnu" bitcoinOSversion="aarch64-linux-gnu"
# bitcoinSHA256="bfc3b8fddbb7ab9b532c9866859fc507ec959bdb82954966f54c8ebf8c7bb53b" bitcoinSHA256="bfc3b8fddbb7ab9b532c9866859fc507ec959bdb82954966f54c8ebf8c7bb53b"
bitcoinSHA256="5659c436ca92eed8ef42d5b2d162ff6283feba220748f9a373a5a53968975e34"
fi fi
if [ ${isX86_64} -eq 1 ] ; then if [ ${isX86_64} -eq 1 ] ; then
bitcoinOSversion="x86_64-linux-gnu" bitcoinOSversion="x86_64-linux-gnu"
# bitcoinSHA256="5146ac5310133fbb01439666131588006543ab5364435b748ddfc95a8cb8d63f" bitcoinSHA256="5146ac5310133fbb01439666131588006543ab5364435b748ddfc95a8cb8d63f"
bitcoinSHA256="53ffca45809127c9ba33ce0080558634101ec49de5224b2998c489b6d0fc2b17"
fi fi
if [ ${isX86_32} -eq 1 ] ; then if [ ${isX86_32} -eq 1 ] ; then
bitcoinOSversion="i686-pc-linux-gnu" bitcoinOSversion="i686-pc-linux-gnu"
# bitcoinSHA256="36ce9ffb375f6ee280df5a86e61038e3c475ab9dee34f6f89ea82b65a264183b" bitcoinSHA256="36ce9ffb375f6ee280df5a86e61038e3c475ab9dee34f6f89ea82b65a264183b"
bitcoinSHA256="b1e1dcf8265521fef9021a9d49d8661833e3f844ca9a410a9dd12a617553dda1"
fi fi
echo "" echo ""
@ -483,44 +478,48 @@ fi
# "*** LND ***" # "*** LND ***"
## based on https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_40_lnd.md#lightning-lnd ## based on https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_40_lnd.md#lightning-lnd
## see LND releases: https://github.com/lightningnetwork/lnd/releases ## see LND releases: https://github.com/lightningnetwork/lnd/releases
lndVersion="0.7.0-beta" lndVersion="0.7.1-beta"
# olaoluwa
PGPpkeys="https://keybase.io/roasbeef/pgp_keys.asc"
PGPcheck="BD599672C804AF2770869A048B80CD2BB8BD8132"
# bitconner
#PGPpkeys="https://keybase.io/bitconner/pgp_keys.asc"
#PGPcheck="9C8D61868A7C492003B2744EE7D737B67FA592C7"
# get LND resources
cd /home/admin/download
# get lndOSversion and lndSHA256 for the corresponding platform
sudo -u admin wget -N https://github.com/lightningnetwork/lnd/releases/download/v${lndVersion}/manifest-v${lndVersion}.txt
if [ ${isARM} -eq 1 ] ; then if [ ${isARM} -eq 1 ] ; then
lndOSversion="armv7" lndOSversion="armv7"
lndSHA256="ac51d96ee9b57bfcab0b05dbcfcd9ce3bd42a216354c0972e97c1a1c86c2479a" lndSHA256=$(grep -i "linux-$lndOSversion" manifest-v$lndVersion.txt | cut -d " " -f1)
fi fi
if [ ${isAARCH64} -eq 1 ] ; then if [ ${isAARCH64} -eq 1 ] ; then
lndOSversion="arm64" lndOSversion="arm64"
lndSHA256="c995fa67d6b23e547723801de49817dda34188fba78d0fe8ae506774e54c0afd" lndSHA256=$(grep -i "linux-$lndOSversion" manifest-v$lndVersion.txt | cut -d " " -f1)
fi fi
if [ ${isX86_64} -eq 1 ] ; then if [ ${isX86_64} -eq 1 ] ; then
lndOSversion="amd64" lndOSversion="amd64"
lndSHA256="2e7ed105b9e57103645bda30501cbf3386909cfed19a2fabcc3dc9117ce99a8f" lndSHA256=$(grep -i "linux-$lndOSversion" manifest-v$lndVersion.txt | cut -d " " -f1)
fi fi
if [ ${isX86_32} -eq 1 ] ; then if [ ${isX86_32} -eq 1 ] ; then
lndOSversion="386" lndOSversion="386"
lndSHA256="47be6c3391fadbc5a169fa1dd6dd13031d759b3d42c71a2d556751746b705c48" lndSHA256=$(grep -i "linux-$lndOSversion" manifest-v$lndVersion.txt | cut -d " " -f1)
fi fi
echo "" echo ""
echo "*** LND v${lndVersion} for ${lndOSversion} ***" echo "*** LND v${lndVersion} for ${lndOSversion} ***"
echo "SHA256 hash: $lndSHA256"
echo ""
# olaoluwa # get LND binary
PGPpkeys="https://keybase.io/roasbeef/pgp_keys.asc"
PGPcheck="BD599672C804AF2770869A048B80CD2BB8BD8132"
# bitconner
#PGPpkeys="https://keybase.io/bitconner/pgp_keys.asc"
#PGPcheck="9C8D61868A7C492003B2744EE7D737B67FA592C7"
# get LND resources
cd /home/admin/download
binaryName="lnd-linux-${lndOSversion}-v${lndVersion}.tar.gz" binaryName="lnd-linux-${lndOSversion}-v${lndVersion}.tar.gz"
sudo -u admin wget https://github.com/lightningnetwork/lnd/releases/download/v${lndVersion}/${binaryName} sudo -u admin wget -N https://github.com/lightningnetwork/lnd/releases/download/v${lndVersion}/${binaryName}
sudo -u admin wget https://github.com/lightningnetwork/lnd/releases/download/v${lndVersion}/manifest-v${lndVersion}.txt
sudo -u admin wget https://github.com/lightningnetwork/lnd/releases/download/v${lndVersion}/manifest-v${lndVersion}.txt.sig
sudo -u admin wget -O /home/admin/download/pgp_keys.asc ${PGPpkeys}
# check binary is was not manipulated (checksum test) # check binary was not manipulated (checksum test)
sudo -u admin wget -N https://github.com/lightningnetwork/lnd/releases/download/v${lndVersion}/manifest-v${lndVersion}.txt.sig
sudo -u admin wget -N -O "pgp_keys.asc" ${PGPpkeys}
binaryChecksum=$(sha256sum ${binaryName} | cut -d " " -f1) binaryChecksum=$(sha256sum ${binaryName} | cut -d " " -f1)
if [ "${binaryChecksum}" != "${lndSHA256}" ]; then if [ "${binaryChecksum}" != "${lndSHA256}" ]; then
echo "!!! FAIL !!! Downloaded LND BINARY not matching SHA256 checksum: ${lndSHA256}" echo "!!! FAIL !!! Downloaded LND BINARY not matching SHA256 checksum: ${lndSHA256}"
@ -529,7 +528,7 @@ fi
# check gpg finger print # check gpg finger print
gpg ./pgp_keys.asc gpg ./pgp_keys.asc
fingerprint=$(sudo gpg /home/admin/download/pgp_keys.asc 2>/dev/null | grep "${PGPcheck}" -c) fingerprint=$(sudo gpg "pgp_keys.asc" 2>/dev/null | grep "${PGPcheck}" -c)
if [ ${fingerprint} -lt 1 ]; then if [ ${fingerprint} -lt 1 ]; then
echo "" echo ""
echo "!!! BUILD WARNING --> LND PGP author not as expected" echo "!!! BUILD WARNING --> LND PGP author not as expected"
@ -542,11 +541,11 @@ sleep 3
verifyResult=$(gpg --verify manifest-v${lndVersion}.txt.sig 2>&1) verifyResult=$(gpg --verify manifest-v${lndVersion}.txt.sig 2>&1)
goodSignature=$(echo ${verifyResult} | grep 'Good signature' -c) goodSignature=$(echo ${verifyResult} | grep 'Good signature' -c)
echo "goodSignature(${goodSignature})" echo "goodSignature(${goodSignature})"
correctKey=$(echo ${verifyResult} | tr -d " \t\n\r" | grep "${olaoluwaPGP}" -c) correctKey=$(echo ${verifyResult} | tr -d " \t\n\r" | grep "${GPGcheck}" -c)
echo "correctKey(${correctKey})" echo "correctKey(${correctKey})"
if [ ${correctKey} -lt 1 ] || [ ${goodSignature} -lt 1 ]; then if [ ${correctKey} -lt 1 ] || [ ${goodSignature} -lt 1 ]; then
echo "" echo ""
echo "!!! BUILD FAILED --> LND PGP Verify not OK / signatute(${goodSignature}) verify(${correctKey})" echo "!!! BUILD FAILED --> LND PGP Verify not OK / signature(${goodSignature}) verify(${correctKey})"
exit 1 exit 1
fi fi

2
home.admin/BBcreateInvoice.sh

@ -83,7 +83,7 @@ else
echo echo
echo "${payReq}" echo "${payReq}"
echo echo
echo "Monitoring Incomming Payment with:" echo "Monitoring the Incoming Payment with:"
echo "lncli --chain=${network} --network=${chain}net lookupinvoice ${rhash}" echo "lncli --chain=${network} --network=${chain}net lookupinvoice ${rhash}"
echo "Press x and hold to skip to menu." echo "Press x and hold to skip to menu."

2
home.admin/config.scripts/internet.tor.sh

@ -261,7 +261,7 @@ HiddenServicePort 80 127.0.0.1:80
HiddenServiceDir /mnt/hdd/tor/lndrpc10009/ HiddenServiceDir /mnt/hdd/tor/lndrpc10009/
HiddenServicePort 80 127.0.0.1:10009 HiddenServicePort 80 127.0.0.1:10009
# Hidden Service v3 for LND incomming connections (just in case) # Hidden Service v3 for LND incoming connections (just in case)
# https://trac.torproject.org/projects/tor/wiki/doc/NextGenOnions#Howtosetupyourownprop224service # https://trac.torproject.org/projects/tor/wiki/doc/NextGenOnions#Howtosetupyourownprop224service
HiddenServiceDir /mnt/hdd/tor/lnd9735 HiddenServiceDir /mnt/hdd/tor/lnd9735
HiddenServiceVersion 3 HiddenServiceVersion 3

Loading…
Cancel
Save