47 lines
1.3 KiB
Bash
47 lines
1.3 KiB
Bash
#!/bin/bash
|
|
|
|
# Start RinCoin Stratum Proxy Server
|
|
# Bridges cpuminer-opt-rin to RinCoin node
|
|
|
|
echo "=== RinCoin Stratum Proxy Server ==="
|
|
echo ""
|
|
|
|
# Check if RinCoin node is running
|
|
if ! sudo docker ps | grep -q "rincoin-node"; then
|
|
echo "❌ Error: rincoin-node container is not running!"
|
|
echo "Please start it first:"
|
|
echo "sudo docker start rincoin-node"
|
|
exit 1
|
|
fi
|
|
|
|
echo "✅ RinCoin node is running"
|
|
|
|
# Check if Python3 and requests are available
|
|
if ! command -v python3 &> /dev/null; then
|
|
echo "❌ Error: python3 is not installed!"
|
|
echo "Please install it: sudo apt-get install python3"
|
|
exit 1
|
|
fi
|
|
|
|
# Install requests if not available
|
|
python3 -c "import requests" 2>/dev/null || {
|
|
echo "Installing python3-requests..."
|
|
sudo apt-get update && sudo apt-get install -y python3-requests
|
|
}
|
|
|
|
echo "✅ Python dependencies ready"
|
|
echo ""
|
|
|
|
echo "🚀 Starting Stratum Proxy Server..."
|
|
echo "This will bridge cpuminer-opt-rin to your RinCoin node"
|
|
echo ""
|
|
echo "After it starts, connect your miner with:"
|
|
echo "sudo docker exec -it amd-strix-halo-llama-rocm bash -c \"/mnt/dl/rinhash/cpuminer-opt-rin/cpuminer -a rinhash -o stratum+tcp://127.0.0.1:3333 -u user -p pass -t 28\""
|
|
echo ""
|
|
echo "Press Ctrl+C to stop the proxy"
|
|
echo ""
|
|
|
|
# Start the proxy
|
|
cd "$(dirname "$0")"
|
|
python3 stratum_proxy.py
|