Compare commits

...

4 Commits

Author SHA1 Message Date
/rootzoll
44e7871686 #5199 add missing exit (#5200) 2025-12-07 23:54:28 +01:00
/rootzoll
7489aae8dc #5190 increase BITCOIN_RPC_TIMEOUT (#5196) 2025-12-02 00:33:32 +01:00
openoms
aeaddc7d45 build: update amd64 base image to Debian 13.2.0 (#5193) 2025-12-01 23:39:59 +01:00
openoms
b1cfc0fde8 specter update to 2.1.1 and config fixes (#5195)
* specter config fixes
* fix password format
* specter update to 2.1.1 with sqlalchemy>=1.4,<2.0
* run bonus.specter.sh config on passwordB change
* add CHANGES info
2025-11-30 23:24:20 +01:00
6 changed files with 71 additions and 44 deletions

View File

@@ -3,6 +3,7 @@
- Update: Bitcoin Core v29.2 [details](https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-29.2.md) - Update: Bitcoin Core v29.2 [details](https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-29.2.md)
- Update: Electrum Server in Rust (electrs) v0.10.10 [details](https://github.com/romanz/electrs/blob/master/RELEASE-NOTES.md#01010-jul-19-2025) - Update: Electrum Server in Rust (electrs) v0.10.10 [details](https://github.com/romanz/electrs/blob/master/RELEASE-NOTES.md#01010-jul-19-2025)
- Update: AlbyHub v1.20.0 [details](https://github.com/getAlby/hub/releases/tag/v1.20.0) - Update: AlbyHub v1.20.0 [details](https://github.com/getAlby/hub/releases/tag/v1.20.0)
- Update: Specter Desktop 2.1.1 [details](https://github.com/cryptoadvance/specter-desktop/releases/tag/v2.1.1)
- Update: Fulcrum Electrum server v2.1.0 [details](https://github.com/cculianu/Fulcrum/releases/tag/v2.1.0) - Update: Fulcrum Electrum server v2.1.0 [details](https://github.com/cculianu/Fulcrum/releases/tag/v2.1.0)
- Update: Bitcoin Knots 29.2 (optional) [details](https://github.com/bitcoinknots/bitcoin/releases/tag/v29.2.knots20251010) - Update: Bitcoin Knots 29.2 (optional) [details](https://github.com/bitcoinknots/bitcoin/releases/tag/v29.2.knots20251010)

View File

@@ -1,7 +1,7 @@
# images, checksums and signatures are at: # images, checksums and signatures are at:
# https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/ # https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/
variable "iso_name" { default = "debian-13.1.0-amd64-netinst.iso" } variable "iso_name" { default = "debian-13.2.0-amd64-netinst.iso" }
variable "iso_checksum" { default = "658b28e209b578fe788ec5867deebae57b6aac5fce3692bbb116bab9c65568b3" } variable "iso_checksum" { default = "677c4d57aa034dc192b5191870141057574c1b05df2b9569c0ee08aa4e32125d" }
variable "pack" { default = "lean" } variable "pack" { default = "lean" }
variable "github_user" { default = "raspiblitz" } variable "github_user" { default = "raspiblitz" }

View File

@@ -430,6 +430,12 @@ elif [ "${abcd}" = "b" ]; then
sudo systemctl restart elementsd.service sudo systemctl restart elementsd.service
fi fi
# specter
if [ "${specter}" == "on" ]; then
echo "# changing the password for specter"
sudo /home/admin/config.scripts/bonus.specter.sh config
fi
echo "# OK -> RPC Password B changed" echo "# OK -> RPC Password B changed"
sleep 3 sleep 3

View File

@@ -157,7 +157,7 @@ BITCOIN_RPC_URL=http://127.0.0.1
BITCOIN_RPC_USER=$RPC_USER BITCOIN_RPC_USER=$RPC_USER
BITCOIN_RPC_PASSWORD=$RPC_PASS BITCOIN_RPC_PASSWORD=$RPC_PASS
BITCOIN_RPC_PORT=8332 BITCOIN_RPC_PORT=8332
BITCOIN_RPC_TIMEOUT=10000 BITCOIN_RPC_TIMEOUT=20000
API_PORT=${PORT_API} API_PORT=${PORT_API}
STRATUM_PORT=${PORT_STRATUM} STRATUM_PORT=${PORT_STRATUM}
POOL_IDENTIFIER=raspiblitz POOL_IDENTIFIER=raspiblitz

View File

@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# https://github.com/cryptoadvance/specter-desktop # https://github.com/cryptoadvance/specter-desktop
pinnedVersion="2.0.5" pinnedVersion="2.1.1"
# command info # command info
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
@@ -119,15 +119,33 @@ function configure_specter {
torOnly="false" torOnly="false"
tor_control_port="" tor_control_port=""
fi fi
# Set the active node alias based on the chain
# Always use raspiblitz_${chain}net format, never "default"
active_alias="raspiblitz_${chain}net"
# Get Bitcoin RPC credentials early to use for Specter auth
echo "# Getting Bitcoin RPC credentials"
RPCUSER=$(sudo cat /mnt/hdd/app-data/${network}/${network}.conf | grep rpcuser | cut -c 9-)
PASSWORD_B=$(sudo cat /mnt/hdd/app-data/${network}/${network}.conf | grep rpcpassword | cut -c 13-)
# Hash the password for Specter using Specter's own hash_password function
# Use Specter's virtual environment to access the user module
PASSWORD_JSON=$(sudo -u specter /home/specter/.env/bin/python3 -c "
import json
from cryptoadvance.specter.user import hash_password
print(json.dumps(hash_password('${PASSWORD_B}')))
")
cat >/home/admin/config.json <<EOF cat >/home/admin/config.json <<EOF
{ {
"auth": { "auth": {
"method": "rpcpasswordaspin", "method": "passwordonly",
"password_min_chars": 6, "password_min_chars": 6,
"rate_limit": 10, "rate_limit": 10,
"registration_link_timeout": 1 "registration_link_timeout": 1
}, },
"active_node_alias": "raspiblitz_${chain}net", "active_node_alias": "${active_alias}",
"proxy_url": "${proxy}", "proxy_url": "${proxy}",
"only_tor": "${torOnly}", "only_tor": "${torOnly}",
"tor_control_port": "${tor_control_port}", "tor_control_port": "${tor_control_port}",
@@ -139,56 +157,52 @@ EOF
sudo mv /home/admin/config.json /home/specter/.specter/config.json sudo mv /home/admin/config.json /home/specter/.specter/config.json
sudo chown -RL specter:specter /home/specter/ sudo chown -RL specter:specter /home/specter/
echo "# Adding the raspiblitz_${chain}net node to Specter" # Create the users.json file with admin user (Specter's format)
RPCUSER=$(sudo cat /mnt/hdd/app-data/${network}/${network}.conf | grep rpcuser | cut -c 9-) cat >/home/admin/users.json <<EOF
PASSWORD_B=$(sudo cat /mnt/hdd/app-data/${network}/${network}.conf | grep rpcpassword | cut -c 13-) [
echo "# Connect Specter to the default mainnet node"
cat >/home/admin/default.json <<EOF
{ {
"python_class": "cryptoadvance.specter.node.Node", "id": "admin",
"fullpath": "/home/specter/.specter/nodes/default.json" "username": "admin",
"name": "raspiblitz_mainnet", "password": ${PASSWORD_JSON},
"alias": "default", "is_admin": true,
"autodetect": false, "jwt_tokens": {},
"datadir": "", "encrypted_user_secret": null,
"user": "${RPCUSER}", "services": []
"password": "${PASSWORD_B}",
"port": "8332",
"host": "localhost",
"protocol": "http",
} }
]
EOF EOF
sudo mv /home/admin/default.json /home/specter/.specter/nodes/default.json sudo mv /home/admin/users.json /home/specter/.specter/users.json
sudo chown -RL specter:specter /home/specter/ sudo chown specter:specter /home/specter/.specter/users.json
if [ "${chain}" != "main" ]; then echo "# Adding the raspiblitz_${chain}net node to Specter"
if [ "${chain}" = "test" ]; then
portprefix=1 # Set the port based on the chain
if [ "${chain}" = "main" ]; then
PORT="8332"
elif [ "${chain}" = "test" ]; then
PORT="18332"
elif [ "${chain}" = "sig" ]; then elif [ "${chain}" = "sig" ]; then
portprefix=3 PORT="38332"
fi fi
PORT="${portprefix}8332"
echo "# Connect Specter to the raspiblitz_${chain}net node" echo "# Connect Specter to the raspiblitz_${chain}net node"
cat >/home/admin/raspiblitz_${chain}net.json <<EOF cat >/home/admin/raspiblitz_${chain}net.json <<EOF
{ {
"python_class": "cryptoadvance.specter.node.Node",
"fullpath": "/home/specter/.specter/nodes/raspiblitz_${chain}net.json",
"name": "raspiblitz_${chain}net", "name": "raspiblitz_${chain}net",
"alias": "raspiblitz_${chain}net", "alias": "raspiblitz_${chain}net",
"autodetect": false, "autodetect": false,
"datadir": "/mnt/hdd/bitcoin", "datadir": "/mnt/hdd/app-storage/bitcoin",
"user": "${RPCUSER}", "user": "${RPCUSER}",
"password": "${PASSWORD_B}", "password": "${PASSWORD_B}",
"port": "${PORT}", "port": "${PORT}",
"host": "localhost", "host": "localhost",
"protocol": "http", "protocol": "http"
"external_node": true,
"fullpath": "/home/specter/.specter/nodes/raspiblitz_${chain}net.json"
} }
EOF EOF
sudo mv /home/admin/raspiblitz_${chain}net.json /home/specter/.specter/nodes/raspiblitz_${chain}net.json sudo mv /home/admin/raspiblitz_${chain}net.json /home/specter/.specter/nodes/raspiblitz_${chain}net.json
sudo chown -RL specter:specter /home/specter/ sudo chown -RL specter:specter /home/specter/
fi
} }
# config # config
@@ -243,6 +257,11 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
echo "# --> pip-installing specter" echo "# --> pip-installing specter"
sudo -u specter /home/specter/.env/bin/python3 -m pip install --upgrade cryptoadvance.specter==$pinnedVersion || exit 1 sudo -u specter /home/specter/.env/bin/python3 -m pip install --upgrade cryptoadvance.specter==$pinnedVersion || exit 1
# Pin SQLAlchemy to 1.x to fix compatibility with spectrum extension
# SQLAlchemy 2.x removed __all__ attribute which breaks spectrum
echo "# --> Pinning SQLAlchemy to compatible version"
sudo -u specter /home/specter/.env/bin/python3 -m pip install "sqlalchemy>=1.4,<2.0"
# activating Authentication here ... # activating Authentication here ...
configure_specter configure_specter

View File

@@ -44,6 +44,7 @@ Links with more info:
https://github.com/rootzoll/raspiblitz/blob/dev/FAQ.cl.md#clboss https://github.com/rootzoll/raspiblitz/blob/dev/FAQ.cl.md#clboss
https://github.com/ZmnSCPxj/clboss#operating https://github.com/ZmnSCPxj/clboss#operating
" 0 0 " 0 0
exit $?
fi fi
function buildFromSource() { function buildFromSource() {