From 2fd3146bdbd5c78e26e07dac406025db6b24b5a6 Mon Sep 17 00:00:00 2001 From: Dobromir Popov Date: Tue, 23 Sep 2025 22:44:03 +0300 Subject: [PATCH] notes & stats --- MINE/rin/stratum_proxy.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/MINE/rin/stratum_proxy.py b/MINE/rin/stratum_proxy.py index ca9cc3e..21b7952 100644 --- a/MINE/rin/stratum_proxy.py +++ b/MINE/rin/stratum_proxy.py @@ -1,8 +1,8 @@ #!/usr/bin/env python3 """ -RinCoin Stratum Proxy Server - FIXED VERSION -Fixed block hash calculation and validation issues -DEBUG: we get node logs with 'docker logs --tail=200 rincoin-node' +RinCoin Stratum Proxy Server +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 """ import socket @@ -402,16 +402,18 @@ class RinCoinStratumProxy: network_diff = self.calculate_network_difficulty(self.current_job['target']) if self.current_job else 1.0 if is_new_client: - # Use optimized difficulty based on updated hashrate analysis (680kH/s, 15s intervals) - # Updated: 15s intervals for better responsiveness with 1-min blocks - optimal_difficulty = 0.002375 # Optimized for 680kH/s at 15s intervals + # Calculate difficulty for 4 shares per minute (15 second intervals) + # Formula: difficulty = (shares_per_second * 2^32) / hashrate + target_shares_per_second = 4 / 60 # 4 shares per minute + assumed_hashrate = 680000 # H/s (conservative estimate) + calculated_difficulty = (target_shares_per_second * (2**32)) / assumed_hashrate # Scale based on network difficulty to maintain relative percentage - target_percentage = 0.003382 # 0.3382% of network (updated for 680kH/s, 15s) + target_percentage = calculated_difficulty / network_diff if network_diff > 0 else 0.32 scaled_difficulty = network_diff * target_percentage - # Use the better of the two approaches - initial_difficulty = min(optimal_difficulty, scaled_difficulty) + # Use the calculated difficulty (should be around 421 for 680kH/s) + initial_difficulty = calculated_difficulty # Ensure reasonable bounds min_difficulty = 0.0001 # Absolute minimum