try to support xmrig
This commit is contained in:
31
MINE/cmds
31
MINE/cmds
@@ -1,3 +1,6 @@
|
|||||||
|
pool:
|
||||||
|
|
||||||
|
|
||||||
# RANDOMX:
|
# RANDOMX:
|
||||||
root@db-NucBox-EVO-X2:/home/db/Downloads/SRBMiner-Multi-2-9-6# ./SRBMiner-MULTI --algorithm randomx --pool xmr-us-east1.nanopool.org:14444 --wallet bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j --disable-gpu --cpu-threads 28
|
root@db-NucBox-EVO-X2:/home/db/Downloads/SRBMiner-Multi-2-9-6# ./SRBMiner-MULTI --algorithm randomx --pool xmr-us-east1.nanopool.org:14444 --wallet bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j --disable-gpu --cpu-threads 28
|
||||||
cd /home/db/Downloads/SRBMiner-Multi-2-9-6
|
cd /home/db/Downloads/SRBMiner-Multi-2-9-6
|
||||||
@@ -11,6 +14,22 @@ export LD_LIBRARY_PATH=/opt/rocm-6.4.3/lib:$LD_LIBRARY_PATH
|
|||||||
./SRBMiner-MULTI --algorithm ethash --pool ethash.mine.zergpool.com:9999 --wallet bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j --disable-cpu
|
./SRBMiner-MULTI --algorithm ethash --pool ethash.mine.zergpool.com:9999 --wallet bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j --disable-cpu
|
||||||
-o stratum+tcp://ethash.mine.zergpool.com:9999 -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p c=BTC
|
-o stratum+tcp://ethash.mine.zergpool.com:9999 -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p c=BTC
|
||||||
./SRBMiner-MULTI --algorithm blake2s --pool auto.nicehash.com:3333 --wallet bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j --disable-cpu
|
./SRBMiner-MULTI --algorithm blake2s --pool auto.nicehash.com:3333 --wallet bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j --disable-cpu
|
||||||
|
# exp-eth
|
||||||
|
./SRBMiner-MULTI --algorithm ethash --pool ethash.mine.zergpool.com:9999 --wallet bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j --gpu-boost 3
|
||||||
|
./SRBMiner-MULTI --algorithm ethash --pool ethash.mine.zergpool.com:9999 --wallet bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j --gpu-id 0 --gpu-intensity 24 --gpu-worksize 256 --gpu-threads 1 --gpu-boost 3 --disable-cpu
|
||||||
|
|
||||||
|
#xmrig
|
||||||
|
cd /home/db/Downloads/xmrig-6.21.0 && ./xmrig -o stratum+tcp://randomx.mine.zergpool.com:4453 -a randomx -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p c=BTC,mc=ZEPH -t 32
|
||||||
|
|
||||||
|
./xmrig --opencl --opencl-platform=1 --opencl-devices=0 -o stratum+tcp://randomx.mine.zergpool.com:4453 -a randomx -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p c=BTC,mc=ZEPH -t 16
|
||||||
|
# ok working kawpow
|
||||||
|
./xmrig --opencl --opencl-platform=1 --opencl-devices=0 -o stratum+tcp://kawpow.mine.zergpool.com:3638 -a kawpow -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p c=BTC --no-cpu
|
||||||
|
./xmrig --opencl --opencl-platform=1 --opencl-devices=0 -o stratum+tcp://ethash.mine.zergpool.com:9999 -a ethash -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p c=BTC --no-cpu
|
||||||
|
|
||||||
|
./xmrig --opencl --opencl-platform=1 --opencl-devices=0 -o stratum+tcp://rinhash.mine.zergpool.com:7148 -a rinhash -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p c=BTC,mc=RIN --no-cpu
|
||||||
|
# RIN GPU local???
|
||||||
|
./xmrig --opencl --opencl-platform=1 --opencl-devices=0 -o stratum+tcp://localhost:3334 -a rinhash -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p c=BTC,mc=RIN --no-cpu
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# RIN
|
# RIN
|
||||||
@@ -19,7 +38,17 @@ export LD_LIBRARY_PATH=/opt/rocm-6.4.3/lib:$LD_LIBRARY_PATH
|
|||||||
cd /mnt/shared/DEV/repos/d-popov.com/mines/rin/miner/cpuminer-opt-rin
|
cd /mnt/shared/DEV/repos/d-popov.com/mines/rin/miner/cpuminer-opt-rin
|
||||||
cpuminer -a rinhash -o stratum+tcp://rinhash.mine.zergpool.com:7148 -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p c=BTC,mc=RIN,ID=StrixHalo -t 32
|
cpuminer -a rinhash -o stratum+tcp://rinhash.mine.zergpool.com:7148 -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p c=BTC,mc=RIN,ID=StrixHalo -t 32
|
||||||
|
|
||||||
/mnt/shared/DEV/repos/d-popov.com/mines/rin/miner/cpuminer-opt-rin/cpuminer -o stratum+tcp://randomx.eu.zergpool.com:4453 -a randomx -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p c=BTC,mc=ZEPH -t 32
|
/mnt/shared/DEV/repos/d-popov.com/mines/rin/miner/cpuminer-opt-rin/cpuminer -o stratum+tcp://randomx.mine.zergpool.com:4453 -a randomx -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p c=BTC,mc=ZEPH -t 32
|
||||||
|
|
||||||
|
|
||||||
|
# EXPERM MINERS
|
||||||
|
|
||||||
|
# Install OpenCL development libraries
|
||||||
|
sudo apt install opencl-headers ocl-icd-opencl-dev
|
||||||
|
|
||||||
|
# Download XMRig source and compile with OpenCL
|
||||||
|
git clone https://github.com/xmrig/xmrig.git
|
||||||
|
cd xmrig
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake .. -DWITH_OPENCL=ON
|
||||||
|
make -j$(nproc)
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
================================================================================
|
================================================================================
|
||||||
RinCoin Mining Log
|
RinCoin Mining Log
|
||||||
================================================================================
|
================================================================================
|
||||||
Started: 2025-09-23 18:38:03
|
Started: 2025-09-24 14:20:13
|
||||||
Target Address: rin1qahvvv9d5f3443wtckeqavwp9950wacxfmwv20q
|
Target Address: rin1qahvvv9d5f3443wtckeqavwp9950wacxfmwv20q
|
||||||
Stratum: 0.0.0.0:3334
|
Stratum: 0.0.0.0:3334
|
||||||
RPC: 127.0.0.1:9556
|
RPC: 127.0.0.1:9556
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
||||||
[2025-09-23 18:38:03] 💰 Wallet Balance: 25.00000000 RIN
|
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
"""
|
"""
|
||||||
|
stratum_proxy.py
|
||||||
RinCoin Stratum Proxy Server
|
RinCoin Stratum Proxy Server
|
||||||
DEBUG RPC: we get node logs with 'docker logs --tail=200 rincoin-node'
|
DEBUG RPC: we get node logs with 'docker logs --tail=200 rincoin-node'
|
||||||
MINE: /mnt/shared/DEV/repos/d-popov.com/mines/rin/miner/cpuminer-opt-rin/cpuminer -a rinhash -o stratum+tcp://localhost:3334 -u x -p x -t 32
|
MINE: /mnt/shared/DEV/repos/d-popov.com/mines/rin/miner/cpuminer-opt-rin/cpuminer -a rinhash -o stratum+tcp://localhost:3334 -u x -p x -t 32
|
||||||
@@ -807,11 +808,16 @@ class RinCoinStratumProxy:
|
|||||||
def handle_stratum_message(self, client, addr, message):
|
def handle_stratum_message(self, client, addr, message):
|
||||||
"""Handle incoming Stratum message from miner"""
|
"""Handle incoming Stratum message from miner"""
|
||||||
try:
|
try:
|
||||||
|
# Debug: log raw message
|
||||||
|
print(f"[{addr}] Raw message: {repr(message)}")
|
||||||
|
|
||||||
data = json.loads(message.strip())
|
data = json.loads(message.strip())
|
||||||
method = data.get("method")
|
method = data.get("method")
|
||||||
msg_id = data.get("id")
|
msg_id = data.get("id")
|
||||||
params = data.get("params", [])
|
params = data.get("params", [])
|
||||||
|
|
||||||
|
print(f"[{addr}] Parsed: method={method}, id={msg_id}, params={params}")
|
||||||
|
|
||||||
if method == "mining.subscribe":
|
if method == "mining.subscribe":
|
||||||
# Generate unique extranonce1 for this connection
|
# Generate unique extranonce1 for this connection
|
||||||
self.extranonce1_counter += 1
|
self.extranonce1_counter += 1
|
||||||
@@ -858,6 +864,43 @@ class RinCoinStratumProxy:
|
|||||||
timestamp = time.strftime("%Y-%m-%d %H:%M:%S")
|
timestamp = time.strftime("%Y-%m-%d %H:%M:%S")
|
||||||
print(f"[{timestamp}] 🔐 [{addr}] Authorized as {username}")
|
print(f"[{timestamp}] 🔐 [{addr}] Authorized as {username}")
|
||||||
|
|
||||||
|
elif method == "login":
|
||||||
|
# Handle xmrig's login method (JSON-RPC format with object params)
|
||||||
|
if isinstance(params, dict):
|
||||||
|
# xmrig format: {"login": "username", "pass": "password", "agent": "...", "algo": [...]}
|
||||||
|
username = params.get('login', 'anonymous')
|
||||||
|
password = params.get('pass', 'x')
|
||||||
|
agent = params.get('agent', 'unknown')
|
||||||
|
algorithms = params.get('algo', [])
|
||||||
|
else:
|
||||||
|
# Standard stratum format: ["username", "password"]
|
||||||
|
username = params[0] if params else "anonymous"
|
||||||
|
password = params[1] if len(params) > 1 else "x"
|
||||||
|
agent = "unknown"
|
||||||
|
algorithms = []
|
||||||
|
|
||||||
|
self.clients[addr]['username'] = username
|
||||||
|
self.clients[addr]['password'] = password
|
||||||
|
self.clients[addr]['agent'] = agent
|
||||||
|
self.clients[addr]['algorithms'] = algorithms
|
||||||
|
|
||||||
|
# Check if rinhash is supported
|
||||||
|
rinhash_supported = any('rinhash' in algo.lower() or 'rin' in algo.lower() for algo in algorithms)
|
||||||
|
if not rinhash_supported:
|
||||||
|
print(f"[{addr}] Warning: rinhash not in supported algorithms: {algorithms}")
|
||||||
|
|
||||||
|
self.send_stratum_response(client, msg_id, True)
|
||||||
|
timestamp = time.strftime("%Y-%m-%d %H:%M:%S")
|
||||||
|
print(f"[{timestamp}] 🔐 [{addr}] xmrig Login as {username} (agent: {agent})")
|
||||||
|
print(f"[{addr}] Supported algorithms: {algorithms}")
|
||||||
|
|
||||||
|
# Send initial job after login
|
||||||
|
if self.current_job:
|
||||||
|
self.send_job_to_client(client, self.current_job)
|
||||||
|
else:
|
||||||
|
if self.get_block_template():
|
||||||
|
self.send_job_to_client(client, self.current_job)
|
||||||
|
|
||||||
elif method == "mining.extranonce.subscribe":
|
elif method == "mining.extranonce.subscribe":
|
||||||
self.send_stratum_response(client, msg_id, True)
|
self.send_stratum_response(client, msg_id, True)
|
||||||
|
|
||||||
@@ -893,10 +936,12 @@ class RinCoinStratumProxy:
|
|||||||
print(f"[{addr}] Unknown method: {method}")
|
print(f"[{addr}] Unknown method: {method}")
|
||||||
self.send_stratum_response(client, msg_id, None, "Unknown method")
|
self.send_stratum_response(client, msg_id, None, "Unknown method")
|
||||||
|
|
||||||
except json.JSONDecodeError:
|
except json.JSONDecodeError as e:
|
||||||
print(f"[{addr}] Invalid JSON: {message}")
|
print(f"[{addr}] Invalid JSON: {message}")
|
||||||
|
print(f"[{addr}] JSON Error: {e}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"[{addr}] Message handling error: {e}")
|
print(f"[{addr}] Message handling error: {e}")
|
||||||
|
print(f"[{addr}] Error type: {type(e).__name__}")
|
||||||
|
|
||||||
def send_job_to_client(self, client, job):
|
def send_job_to_client(self, client, job):
|
||||||
"""Send mining job to specific client with proper stratum parameters"""
|
"""Send mining job to specific client with proper stratum parameters"""
|
||||||
@@ -1293,10 +1338,10 @@ if __name__ == "__main__":
|
|||||||
elif arg == "--submit-threshold" and i + 1 < len(sys.argv):
|
elif arg == "--submit-threshold" and i + 1 < len(sys.argv):
|
||||||
try:
|
try:
|
||||||
submit_threshold = float(sys.argv[i + 1])
|
submit_threshold = float(sys.argv[i + 1])
|
||||||
if submit_threshold <= 0 or submit_threshold > 1:
|
if submit_threshold <= 0:
|
||||||
print(f"❌ Invalid threshold {submit_threshold}. Must be between 0 and 1 (0-100%)")
|
print(f"❌ Invalid threshold {submit_threshold}. Must be greater than 0")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
print(f"🧪 DEBUG MODE: Will submit blocks at {submit_threshold*100:.1f}% of network difficulty")
|
print(f"🧪 DEBUG MODE: Will submit blocks at {submit_threshold:.1f}x network difficulty")
|
||||||
except ValueError:
|
except ValueError:
|
||||||
print(f"❌ Invalid threshold value: {sys.argv[i + 1]}")
|
print(f"❌ Invalid threshold value: {sys.argv[i + 1]}")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
================================================================================
|
================================================================================
|
||||||
RinCoin Mining Log
|
RinCoin Mining Log
|
||||||
================================================================================
|
================================================================================
|
||||||
Started: 2025-09-23 11:27:51
|
Started: 2025-09-24 14:14:54
|
||||||
Target Address: rin1qahvvv9d5f3443wtckeqavwp9950wacxfmwv20q
|
Target Address: rin1qahvvv9d5f3443wtckeqavwp9950wacxfmwv20q
|
||||||
Stratum: 0.0.0.0:3334
|
Stratum: 0.0.0.0:3334
|
||||||
RPC: 127.0.0.1:9556
|
RPC: 127.0.0.1:9556
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
||||||
[2025-09-23 11:27:51] 💰 Wallet Balance: 25.00000000 RIN
|
|
||||||
|
Reference in New Issue
Block a user