53 lines
1.8 KiB
Bash
53 lines
1.8 KiB
Bash
#!/bin/bash
|
|
|
|
# RinCoin Stratum Proxy for cpuminer-opt-rin
|
|
# Bridges cpuminer's Stratum protocol to RinCoin's RPC mining
|
|
|
|
echo "=== RinCoin Stratum Proxy ==="
|
|
echo "This script creates a bridge between cpuminer and RinCoin node"
|
|
echo ""
|
|
|
|
# Configuration
|
|
RPC_HOST="127.0.0.1"
|
|
RPC_PORT="9556"
|
|
RPC_USER="rinrpc"
|
|
RPC_PASS="745ce784d5d537fc06105a1b935b7657903cfc71a5fb3b90"
|
|
STRATUM_PORT="3333"
|
|
TARGET_ADDRESS="rin1qahvvv9d5f3443wtckeqavwp9950wacxfmwv20q"
|
|
|
|
# Function to call RPC
|
|
call_rpc() {
|
|
local method="$1"
|
|
local params="$2"
|
|
|
|
curl -s --user "$RPC_USER:$RPC_PASS" \
|
|
-H 'content-type: text/plain' \
|
|
--data "{\"jsonrpc\":\"1.0\",\"id\":\"curl\",\"method\":\"$method\",\"params\":$params}" \
|
|
"http://$RPC_HOST:$RPC_PORT/"
|
|
}
|
|
|
|
echo "⚠️ IMPORTANT: This is a simplified proxy demonstration."
|
|
echo "For production use, you would need a full Stratum server implementation."
|
|
echo ""
|
|
|
|
echo "Current RinCoin mining options:"
|
|
echo "1. Built-in Core Mining (Recommended for solo):"
|
|
echo " bash MINE/rin/solo_mining_core.sh -t 28"
|
|
echo ""
|
|
echo "2. Pool Mining (Recommended for consistent rewards):"
|
|
echo " sudo docker exec -it amd-strix-halo-llama-rocm bash -c \"/mnt/dl/rinhash/cpuminer-opt-rin/cpuminer -a rinhash -o stratum+tcp://rinhash.mine.zergpool.com:7148 -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p c=BTC,mc=RIN,ID=StrixHalo -t 28\""
|
|
echo ""
|
|
echo "3. Direct RPC Mining (Advanced - requires custom miner):"
|
|
echo " Use getblocktemplate RPC calls directly"
|
|
echo ""
|
|
|
|
echo "❌ cpuminer-opt-rin cannot directly mine to RinCoin node because:"
|
|
echo " - cpuminer uses Stratum protocol"
|
|
echo " - RinCoin node uses RPC protocol"
|
|
echo " - No built-in protocol conversion"
|
|
echo ""
|
|
|
|
echo "✅ Recommended approach:"
|
|
echo " Use the built-in core mining script for solo mining"
|
|
echo " Use pool mining for consistent rewards"
|