Compare commits

..

2 Commits

Author SHA1 Message Date
openoms
29c729b873 use whitebind for electrs and btcpay 2025-09-15 01:16:34 +02:00
openoms
b63775d0a2 fix the use of the new bitcoin paths 2025-09-14 21:21:46 +02:00
12 changed files with 35 additions and 47 deletions

View File

@@ -38,7 +38,7 @@ amd64-lean-desktop-uefi-img:
--preseed_file preseed.cfg \
--boot uefi \
--desktop gnome \
--image_type raw
--image_type raw
# Compute the checksum of the qemu image
cd ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu && \

View File

@@ -64,11 +64,11 @@ case $CHOICE in
;;
${network}LOG)
if [ ${CHAIN} = signet ]; then
bitcoinlogpath="/mnt/hdd/bitcoin/signet/debug.log"
bitcoinlogpath="/mnt/hdd/app-data/bitcoin/signet/debug.log"
elif [ ${CHAIN} = testnet ]; then
bitcoinlogpath="/mnt/hdd/bitcoin/testnet3/debug.log"
bitcoinlogpath="/mnt/hdd/app-data/bitcoin/testnet3/debug.log"
elif [ ${CHAIN} = mainnet ]; then
bitcoinlogpath="/mnt/hdd/bitcoin/debug.log"
bitcoinlogpath="/mnt/hdd/app-data/bitcoin/debug.log"
fi
clear
echo

View File

@@ -10,10 +10,10 @@ daemon=1
txindex=0
disablewallet=1
peerbloomfilters=1
datadir=/mnt/hdd/bitcoin
main.debuglogfile=/mnt/hdd/bitcoin/debug.log
test.debuglogfile=/mnt/hdd/bitcoin/testnet3/debug.log
signet.debuglogfile=/mnt/hdd/bitcoin/signet/debug.log
datadir=/mnt/hdd/app-storage/bitcoin
main.debuglogfile=/mnt/hdd/app-data/bitcoin/debug.log
test.debuglogfile=/mnt/hdd/app-data/bitcoin/testnet3/debug.log
signet.debuglogfile=/mnt/hdd/app-data/bitcoin/signet/debug.log
# Connection settings
rpcuser=raspibolt

View File

@@ -85,6 +85,9 @@ if [ "$1" == "prestart" ]; then
sed -i '/^test.datadir=/d' /mnt/hdd/app-data/bitcoin/bitcoin.conf
sed -i '/^signet.datadir=/d' /mnt/hdd/app-data/bitcoin/bitcoin.conf
# remove any whitelist entries (whitebind is used instead)
sed -i '/^whitelist=/d' /mnt/hdd/app-data/bitcoin/bitcoin.conf
# make sure bitcoin debug file exists
echo "# make sure bitcoin debug file exists"
touch ${bitcoinlog_path}

View File

@@ -44,11 +44,11 @@ elif [ ${CHAIN} = mainnet ]; then
fi
# bitcoinlogpath
if [ ${CHAIN} = signet ]; then
bitcoinlogpath="/mnt/hdd/app-storage/bitcoin/signet/debug.log"
bitcoinlogpath="/mnt/hdd/app-data/bitcoin/signet/debug.log"
elif [ ${CHAIN} = testnet ]; then
bitcoinlogpath="/mnt/hdd/app-storage/bitcoin/testnet3/debug.log"
bitcoinlogpath="/mnt/hdd/app-data/bitcoin/testnet3/debug.log"
elif [ ${CHAIN} = mainnet ]; then
bitcoinlogpath="/mnt/hdd/app-storage/bitcoin/debug.log"
bitcoinlogpath="/mnt/hdd/app-data/bitcoin/debug.log"
fi
function addBitcoinAliases {

View File

@@ -90,9 +90,9 @@ function add_repo {
function bitcoinI2Pstatus {
echo "# I2P related logs from the bitcoin debug log"
echo "# Follow live with the command:"
echo "sudo tail -n 1000 -f /mnt/hdd/bitcoin/debug.log | grep i2p"
echo "sudo tail -n 1000 -f /mnt/hdd/app-data/bitcoin/debug.log | grep i2p"
echo
sudo cat /mnt/hdd/bitcoin/debug.log | grep i2p
sudo cat /mnt/hdd/app-data/bitcoin/debug.log | grep i2p
echo
echo "# Running the command:"
echo "bitcoin-cli -netinfo 4"
@@ -215,7 +215,7 @@ EOF
echo "# Config: /etc/i2pd/i2pd.conf"
echo "# i2pd web console: ${localip}:7070"
echo "# Monitor i2p in bitcoind:"
echo "sudo tail -n 100 /mnt/hdd/bitcoin/debug.log | grep i2p"
echo "sudo tail -n 100 /mnt/hdd/app-data/bitcoin/debug.log | grep i2p"
echo "bitcoin-cli -netinfo 4"
exit 0

View File

@@ -390,7 +390,7 @@ EOF
sudo /home/admin/config.scripts/blitz.conf.sh set BTCRPCexplorer "on"
echo "# needs to finish creating txindex to be functional"
echo "# monitor with: sudo tail -n 20 -f /mnt/hdd/bitcoin/debug.log"
echo "# monitor with: sudo tail -n 20 -f /mnt/hdd/app-data/bitcoin/debug.log"
echo "# npm audit fix"
cd /home/btcrpcexplorer/btc-rpc-explorer/
sudo npm audit fix

View File

@@ -59,6 +59,7 @@ function NBXplorerConfig() {
sudo -u btcpay mkdir -p /home/btcpay/.nbxplorer/Main
echo "\
network=mainnet
btcnodeendpoint=127.0.0.1:8336
btc.rpc.user=${RPC_USER}
btc.rpc.password=${PASSWORD_B}
postgres=User ID=nbxplorer;Host=localhost;Port=5432;Application Name=nbxplorer;MaxPoolSize=20;Database=nbxplorermainnet;Password='raspiblitz';
@@ -670,9 +671,9 @@ WantedBy=multi-user.target
NBXplorerConfig
# whitelist localhost in bitcoind
if ! sudo grep -Eq "^whitelist=127.0.0.1" /mnt/hdd/app-data/bitcoin/bitcoin.conf; then
echo "whitelist=127.0.0.1" | sudo tee -a /mnt/hdd/app-data/bitcoin/bitcoin.conf
# whitelist connection in bitcoind
if ! sudo grep -Eq "^whitebind=127.0.0.1:8336" /mnt/hdd/app-data/bitcoin/bitcoin.conf; then
echo "whitebind=127.0.0.1:8336" | sudo tee -a /mnt/hdd/app-data/bitcoin/bitcoin.conf
bitcoindRestart=yes
fi

View File

@@ -376,6 +376,7 @@ index-batch-size = 10
wait_duration_secs = 10
jsonrpc_timeout_secs = 15
db_dir = \"/mnt/hdd/app-storage/electrs/db\"
daemon_p2p_addr = \"127.0.0.1:8335\"
auth = \"${RPC_USER}:${PASSWORD_B}\"
# allow BTC-RPC-explorer show tx-s for addresses with a history of more than 100
txid_limit = 1000
@@ -497,9 +498,9 @@ WantedBy=multi-user.target
/home/admin/config.scripts/tor.onion-service.sh electrs 50002 50002 50001 50001
fi
# whitelist downloading to localhost from bitcoind
if ! sudo grep -Eq "^whitelist=download@127.0.0.1" /mnt/hdd/app-data/bitcoin/bitcoin.conf; then
echo "whitelist=download@127.0.0.1" | sudo tee -a /mnt/hdd/app-data/bitcoin/bitcoin.conf
# whitelist connection in bitcoind
if ! sudo grep -Eq "^whitebind=download@127.0.0.1:8335" /mnt/hdd/app-data/bitcoin/bitcoin.conf; then
echo "whitebind=download@127.0.0.1:8335" | sudo tee -a /mnt/hdd/app-data/bitcoin/bitcoin.conf
bitcoindRestart=yes
fi

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# https://github.com/lightninglabs/lightning-terminal/releases
LITVERSION="0.15.2-alpha"
LITVERSION="0.14.1-alpha"
# command info
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
@@ -12,7 +12,7 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
fi
# check who signed the release in https://github.com/lightninglabs/lightning-terminal/releases
PGPsigner="ViktorTigerstrom"
PGPsigner="guggero"
if [ $PGPsigner = ellemouton ]; then
pgpPubKey="D7D916376026F177"
@@ -45,7 +45,7 @@ Use your Password B to login.\n
Hidden Service address for the Tor Browser (see LCD for QR):
https://${toraddress}\n
For the command line switch to 'lit' user with: 'sudo su - lit'
use the commands: 'lncli', 'litcli', 'lit-loop', 'lit-pool', 'lit-frcli' and 'tapcli'.
use the commands: 'lncli', 'lit-loop', 'lit-pool' and 'lit-frcli'.
" 19 74
sudo /home/admin/config.scripts/blitz.display.sh hide
else
@@ -57,7 +57,7 @@ ${fingerprint}\n
Use your Password B to login.\n
Activate TOR to access the web interface from outside your local network.\n
For the command line switch to 'lit' user with: 'sudo su - lit'
use the commands: 'lncli', 'litcli', 'loop', 'pool', 'frcli' and 'tapcli'.
use the commands: 'lncli', 'lit-loop', 'lit-pool' and 'lit-frcli'.
" 19 63
fi
echo "please wait ..."
@@ -150,16 +150,6 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
sudo ln -s /mnt/hdd/app-data/.pool/ /home/lit/.pool
sudo chown lit:lit -R /mnt/hdd/app-data/.pool
echo "# Taproot Assets"
# move old data if present
sudo mv /home/loop/.tapd /mnt/hdd/app-data/ 2>/dev/null
echo "# make sure the data directory exists"
sudo mkdir -p /mnt/hdd/app-data/.tapd
echo "# symlink"
sudo rm -rf /home/lit/.tapd # not a symlink.. delete it silently
sudo ln -s /mnt/hdd/app-data/.tapd/ /home/lit/.tapd
sudo chown lit:lit -R /mnt/hdd/app-data/.tapd
echo "Detect CPU architecture ..."
isARM=$(uname -m | grep -c 'arm')
isAARCH64=$(uname -m | grep -c 'aarch64')
@@ -230,7 +220,6 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
sudo install -m 0755 -o root -g root -t /usr/local/bin litd
sudo install -m 0755 -o root -g root -t /usr/local/bin loop
sudo install -m 0755 -o root -g root -t /usr/local/bin pool
sudo install -m 0755 -o root -g root -t /usr/local/bin tapcli
###########
# config #
@@ -327,21 +316,15 @@ WantedBy=multi-user.target
# aliases
echo "
alias litcli=\"litcli --rpcserver=localhost:8443 \
--tlscertpath=/home/lit/.lit/tls.cert \
--macaroonpath=/home/lit/.lit/${chain}net/lit.macaroon\"
alias loop=\"loop --rpcserver=localhost:8443 \
alias lit-loop=\"loop --rpcserver=localhost:8443 \
--tlscertpath=/home/lit/.lit/tls.cert \
--macaroonpath=/home/lit/.loop/${chain}net/loop.macaroon\"
alias pool=\"pool --rpcserver=localhost:8443 \
alias lit-pool=\"pool --rpcserver=localhost:8443 \
--tlscertpath=/home/lit/.lit/tls.cert \
--macaroonpath=/home/lit/.pool/${chain}net/pool.macaroon\"
alias frcli=\"frcli --rpcserver=localhost:8443 \
alias lit-frcli=\"frcli --rpcserver=localhost:8443 \
--tlscertpath=/home/lit/.lit/tls.cert \
--macaroonpath=/home/lit/.faraday/${chain}net/faraday.macaroon\"
alias tapcli=\"tapcli --rpcserver=localhost:8443 \
--tlscertpath=/home/lit/.lit/tls.cert \
--macaroonpath=/home/lit/.tapd/data/${chain}net/admin.macaroon\"
" | sudo tee -a /home/lit/.bashrc
# open ports on firewall

View File

@@ -376,7 +376,7 @@ EOF
/home/admin/config.scripts/blitz.conf.sh set mempoolExplorer "on"
echo "# needs to finish creating txindex to be functional"
echo "# monitor with: sudo tail -n 20 -f /mnt/hdd/bitcoin/debug.log"
echo "# monitor with: sudo tail -n 20 -f /mnt/hdd/app-data/bitcoin/debug.log"
# Hidden Service for Mempool if Tor is active
if [ "${runBehindTor}" = "on" ]; then

View File

@@ -410,7 +410,7 @@ EOF
echo "# ${network}d is not running - so NOT restarting"
fi
echo "# The indexing takes ~10h on an RPi4 with SSD"
echo "# check with: sudo cat /mnt/hdd/bitcoin/debug.log | grep filter"
echo "# check with: sudo cat /mnt/hdd/app-data/bitcoin/debug.log | grep filter"
else
echo "# blockfilterindex is already active"
fi