mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-12-07 19:21:05 +01:00
Compare commits
3 Commits
specter-2.
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7489aae8dc | ||
|
|
aeaddc7d45 | ||
|
|
b1cfc0fde8 |
@@ -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: 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: 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: Bitcoin Knots 29.2 (optional) [details](https://github.com/bitcoinknots/bitcoin/releases/tag/v29.2.knots20251010)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# images, checksums and signatures are at:
|
||||
# https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/
|
||||
variable "iso_name" { default = "debian-13.1.0-amd64-netinst.iso" }
|
||||
variable "iso_checksum" { default = "658b28e209b578fe788ec5867deebae57b6aac5fce3692bbb116bab9c65568b3" }
|
||||
variable "iso_name" { default = "debian-13.2.0-amd64-netinst.iso" }
|
||||
variable "iso_checksum" { default = "677c4d57aa034dc192b5191870141057574c1b05df2b9569c0ee08aa4e32125d" }
|
||||
|
||||
variable "pack" { default = "lean" }
|
||||
variable "github_user" { default = "raspiblitz" }
|
||||
|
||||
@@ -430,6 +430,12 @@ elif [ "${abcd}" = "b" ]; then
|
||||
sudo systemctl restart elementsd.service
|
||||
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"
|
||||
sleep 3
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ BITCOIN_RPC_URL=http://127.0.0.1
|
||||
BITCOIN_RPC_USER=$RPC_USER
|
||||
BITCOIN_RPC_PASSWORD=$RPC_PASS
|
||||
BITCOIN_RPC_PORT=8332
|
||||
BITCOIN_RPC_TIMEOUT=10000
|
||||
BITCOIN_RPC_TIMEOUT=20000
|
||||
API_PORT=${PORT_API}
|
||||
STRATUM_PORT=${PORT_STRATUM}
|
||||
POOL_IDENTIFIER=raspiblitz
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# https://github.com/cryptoadvance/specter-desktop
|
||||
|
||||
pinnedVersion="2.0.5"
|
||||
pinnedVersion="2.1.1"
|
||||
|
||||
# command info
|
||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||
@@ -119,15 +119,33 @@ function configure_specter {
|
||||
torOnly="false"
|
||||
tor_control_port=""
|
||||
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
|
||||
{
|
||||
"auth": {
|
||||
"method": "rpcpasswordaspin",
|
||||
"method": "passwordonly",
|
||||
"password_min_chars": 6,
|
||||
"rate_limit": 10,
|
||||
"registration_link_timeout": 1
|
||||
},
|
||||
"active_node_alias": "raspiblitz_${chain}net",
|
||||
"active_node_alias": "${active_alias}",
|
||||
"proxy_url": "${proxy}",
|
||||
"only_tor": "${torOnly}",
|
||||
"tor_control_port": "${tor_control_port}",
|
||||
@@ -139,56 +157,52 @@ EOF
|
||||
sudo mv /home/admin/config.json /home/specter/.specter/config.json
|
||||
sudo chown -RL specter:specter /home/specter/
|
||||
|
||||
echo "# Adding the raspiblitz_${chain}net node to Specter"
|
||||
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-)
|
||||
|
||||
echo "# Connect Specter to the default mainnet node"
|
||||
cat >/home/admin/default.json <<EOF
|
||||
{
|
||||
"python_class": "cryptoadvance.specter.node.Node",
|
||||
"fullpath": "/home/specter/.specter/nodes/default.json"
|
||||
"name": "raspiblitz_mainnet",
|
||||
"alias": "default",
|
||||
"autodetect": false,
|
||||
"datadir": "",
|
||||
"user": "${RPCUSER}",
|
||||
"password": "${PASSWORD_B}",
|
||||
"port": "8332",
|
||||
"host": "localhost",
|
||||
"protocol": "http",
|
||||
}
|
||||
# Create the users.json file with admin user (Specter's format)
|
||||
cat >/home/admin/users.json <<EOF
|
||||
[
|
||||
{
|
||||
"id": "admin",
|
||||
"username": "admin",
|
||||
"password": ${PASSWORD_JSON},
|
||||
"is_admin": true,
|
||||
"jwt_tokens": {},
|
||||
"encrypted_user_secret": null,
|
||||
"services": []
|
||||
}
|
||||
]
|
||||
EOF
|
||||
sudo mv /home/admin/default.json /home/specter/.specter/nodes/default.json
|
||||
sudo chown -RL specter:specter /home/specter/
|
||||
sudo mv /home/admin/users.json /home/specter/.specter/users.json
|
||||
sudo chown specter:specter /home/specter/.specter/users.json
|
||||
|
||||
if [ "${chain}" != "main" ]; then
|
||||
if [ "${chain}" = "test" ]; then
|
||||
portprefix=1
|
||||
echo "# Adding the raspiblitz_${chain}net node to Specter"
|
||||
|
||||
# Set the port based on the chain
|
||||
if [ "${chain}" = "main" ]; then
|
||||
PORT="8332"
|
||||
elif [ "${chain}" = "test" ]; then
|
||||
PORT="18332"
|
||||
elif [ "${chain}" = "sig" ]; then
|
||||
portprefix=3
|
||||
PORT="38332"
|
||||
fi
|
||||
PORT="${portprefix}8332"
|
||||
|
||||
echo "# Connect Specter to the raspiblitz_${chain}net node"
|
||||
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",
|
||||
"alias": "raspiblitz_${chain}net",
|
||||
"autodetect": false,
|
||||
"datadir": "/mnt/hdd/bitcoin",
|
||||
"datadir": "/mnt/hdd/app-storage/bitcoin",
|
||||
"user": "${RPCUSER}",
|
||||
"password": "${PASSWORD_B}",
|
||||
"port": "${PORT}",
|
||||
"host": "localhost",
|
||||
"protocol": "http",
|
||||
"external_node": true,
|
||||
"fullpath": "/home/specter/.specter/nodes/raspiblitz_${chain}net.json"
|
||||
"protocol": "http"
|
||||
}
|
||||
EOF
|
||||
sudo mv /home/admin/raspiblitz_${chain}net.json /home/specter/.specter/nodes/raspiblitz_${chain}net.json
|
||||
sudo chown -RL specter:specter /home/specter/
|
||||
fi
|
||||
}
|
||||
|
||||
# config
|
||||
@@ -243,6 +257,11 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
echo "# --> pip-installing specter"
|
||||
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 ...
|
||||
configure_specter
|
||||
|
||||
|
||||
Reference in New Issue
Block a user