Giter Site home page Giter Site logo

simple-xmr-miner's Introduction

Simple-XMR-Miner

Monero CPU miner written in python3 for learning purpose. Heavily inspired from https://github.com/ricmoo/nightminer/ but uses JSON RPC 2.0 and cryptonight algorithm.

The miner is in python 3, the hash function is in C (see the folder cryptonight_lib/) It is slow, about 40% of best miners on my system. I may try to implement a miner only in C.

Command Line Interface

ggminer.py [-h] [-a {cryptonight}] [-o URL] [-u USERNAME] [-p PASSWORD] [-t THREAD] [-d DEBUG]

optional arguments:
  -h, --help                       show this help message and exit
  -a, --algo                       hashing algorithm to use for proof of work {cryptonight}
  -o URL, --url URL                stratum mining server url (eg: stratum+tcp://foobar.com:3333)
  -u USERNAME, --user USERNAME     username for mining server
  -p PASSWORD, --pass PASSWORD     password for mining server
  -t THREAD, --thread THREAD       number of mining threads to start
  -d, --debug                      show extra debug information

License

The python code is MIT. The C code (cryptonight librarie) is GPL, see https://github.com/LysanderGG/Simple-XMR-Miner/blob/master/cryptonight_lib/COPYING

simple-xmr-miner's People

Contributors

lysandergg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

simple-xmr-miner's Issues

no able to run

error
OSError: cryptonight_lib/libcryptonight_lib.so: cannot open shared object file: No such file or directory

Running Purely on Python?

Would is be possible to create a similar script that mined Monero but did it with just Python (without the need for C)?

run problem

Hi,please help.
It showed:
[2018-04-08 03:17:45] Mining Sate Error: Malformed job message
{'jsonrpc': '2.0', 'method': 'job', 'params': {'blob': '0707e98ea6d605e47d81e6890149ebc73ddf4b2ee41357f5f7070a47fabf3434958cd0d254d276000000007f05872e016e177b9b5d474413e932b0f5d4ed693325998a8c7c5d86f644a55204', 'job_id': '8PCI9uu7Y8glm2dfL+YzYLqgAd4T', 'target': '0b4d0800', 'id': '00aed003-d28f-4f81-9675-b6aff00bf031'}

Why show this error?Is not support monero V7?

Version 7 compatible?

Hi, thanks for this great example miner, it makes a lot more sense to me looking at the code in python(with a little bit of C) than it does to look at a pure C implementation. Helps me figure out how mining this actually works with less investigation required on my part.

Will this setup in its current for work with the version 7 fork, or will there need to be adjustments in the code to make it work with version 7?

OSError: cryptonight_lib/project/Release/cryptonight_lib.dll: cannot open shared object file

Simple-XMR-Miner git:(master) ✗ python3 ggminer.py -h
Traceback (most recent call last):
  File "ggminer.py", line 7, in <module>
    from Miner import *
  File "/home/islamtaha/PycharmProjects/minerTools/Simple-XMR-Miner/Miner.py", line 3, in <module>
    from Cryptonight import SubscriptionCryptonight
  File "/home/islamtaha/PycharmProjects/minerTools/Simple-XMR-Miner/Cryptonight.py", line 66, in <module>
    lib = ctypes.cdll.LoadLibrary('cryptonight_lib/project/Release/cryptonight_lib.dll')
  File "/usr/lib/python3.5/ctypes/__init__.py", line 425, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python3.5/ctypes/__init__.py", line 347, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: cryptonight_lib/project/Release/cryptonight_lib.dll: cannot open shared object file: No such file or directory

I cloned the repo and tried to run it but It threw this error. It would be nice if u can help

OS
ubuntu 16.04

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.