diff --git a/MINE/rin/stratum_proxy.py b/MINE/rin/stratum_proxy.py index e775691..95aeef9 100644 --- a/MINE/rin/stratum_proxy.py +++ b/MINE/rin/stratum_proxy.py @@ -613,28 +613,97 @@ class RinCoinStratumProxy: print(f"[{addr}] Message handling error: {e}") def send_job_to_client(self, client, job): - """Send mining job to specific client""" + """Send mining job to specific client with proper stratum parameters""" try: - # Build coinbase components for stratum + # Get network difficulty for display + network_difficulty = self.calculate_network_difficulty(job['target']) + + # Build proper coinbase transaction parts for stratum protocol + template = job.get('template', {}) height = job.get('height', 0) - height_bytes = struct.pack(' 1 and height_bytes[-1] == 0: + height_bytes = height_bytes[:-1] + height_push = bytes([len(height_bytes)]) + height_bytes + + # Build coinbase input script: height + arbitrary data + extranonces + coinb1_script = height_push + b'/RinCoin/' + + # Build coinbase transaction structure + # Version (4 bytes) + coinb1 = struct.pack('