We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple instances of xmrig::DaemonClient may propogate exactly the same xmrig::Job.
xmrig::DaemonClient
xmrig::Job
Python script to reproduce error with xmrig-proxy that's listening on 127.0.0.1:3333 and connected to daemon+http://127.0.0.1:18081
127.0.0.1:3333
daemon+http://127.0.0.1:18081
import asyncio loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) import json login_json = { 'id': 1, 'jsonrpc': '2.0', 'method': 'login', 'params': { 'login': '00' * 32, 'pass': 'x', 'agent': '', 'algo': ['rx/0'] } } login_json_buf = json.dumps(login_json) + '\n' async def get_job(): try: reader, writer = await asyncio.open_connection(host = '127.0.0.1', port = 3333) writer.write(login_json_buf.encode()) await writer.drain() job_json_buf = await reader.readline() except OSError: return None except asyncio.IncompleteReadError: return None try: writer.close() writer._protocol.connection_lost(None) except OSError: pass try: job_json = json.loads(job_json_buf) print(job_json) except json.JSONDecodeError: return None return job_json g = asyncio.gather(*[get_job() for i in range(256 * 4)]) r = loop.run_until_complete(g) received_jobs = sorted([e['result']['job']['blob'] for e in r if e != None], key = lambda e: [e[:79 ], e[79 + 8:], e[79:][:8]] ) uniq_jobs = set(received_jobs) print({'uniq_jobs': len(uniq_jobs), 'received_jobs': len(received_jobs)})
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Multiple instances of
xmrig::DaemonClient
may propogate exactly the samexmrig::Job
.Python script to reproduce error with xmrig-proxy that's listening on
127.0.0.1:3333
and connected todaemon+http://127.0.0.1:18081
The text was updated successfully, but these errors were encountered: