Pages:
Author

Topic: Modular Python Bitcoin Miner - Official Thread - page 2. (Read 74184 times)

legendary
Activity: 3080
Merit: 1080
Is this project still being worked on or has it been abandoned? Any chance of updating the software to support the stratum mining protocol and any of the recent advancements in bitcoin mining - perhaps even support for ASIC miners? (granted being ASIC ready means supporting a mining protocol like stratum or getblocktemplate - luke's idea)

hero member
Activity: 504
Merit: 500
How do I use this with the ModMiner Quad? I currently use BFGMiner, but I prefer the webinterface of MPBM. It works great with my X6500s, now I want to add in my MMQ.

How do I do this?
legendary
Activity: 3080
Merit: 1080
Does anyone know why using both BFL singles and Icarus FPGA miners with MPBM does not work? Is there some special trick that has to be done? Oddly even when I go to add a worker the bfl single worker does not even show up even though it appears the appropriate modules are there in the modules directory. I tried even the latest github build, no go. Eventually I gave up and used bfgminer for the singles and mpbm for the icarus boards.
full member
Activity: 411
Merit: 101
🦜| Save Smart & Win 🦜
Never mind. I was entering the wrong user_worker and password.

Perhaps a less cryptic message is in order here.
full member
Activity: 411
Merit: 101
🦜| Save Smart & Win 🦜
I regret to report that after several months of using a very early version of mpbm (v0.0.4alpha) I can no longer get the miner to work with my x6500 and BTCGuild using today's git version (v0.1.0beta)

I have set up everything to the best of my knowledge but I get right of the bat:
Code:
2012-10-10 21:57:45.146 [0] Core: Modular Python Bitcoin Miner v0.1.0beta, Copyright (C) 2012 Michael Sparmann (TheSeven)
2012-10-10 21:57:45.146 [0] Core: Modular Python Bitcoin Miner comes with ABSOLUTELY NO WARRANTY.
2012-10-10 21:57:45.146 [0] Core: This is free software, and you are welcome to redistribute it under certain conditions.
2012-10-10 21:57:45.147 [0] Core: See included file COPYING_GPLv2.txt for details.
2012-10-10 21:57:45.147 [0] Core: Please consider donating to 1PLAPWDejJPJnY2ppYCgtw5ko8G5Q4hPzh or,
2012-10-10 21:57:45.147 [0] Core: even better, donating a small share of your hashing power if you want
2012-10-10 21:57:45.147 [0] Core: to support further development of the Modular Python Bitcoin Miner.
2012-10-10 21:57:45.163 [500] Core: Loading modules...
2012-10-10 21:57:45.550 [100] Core: Starting up...
2012-10-10 21:57:45.572 [200] Core: Startup completed
2012-10-10 21:57:46.307 [200] BTCGuild: Error while fetching job: Traceback (most recent call last):
  File "/home/david/Modular-Python-Bitcoin-Miner/modules/theseven/bcjsonrpc/bcjsonrpcworksource.py", line 257, in fetcher
    jobs = self._build_jobs(response, data, epoch, now, "getwork")
  File "/home/david/Modular-Python-Bitcoin-Miner/modules/theseven/bcjsonrpc/bcjsonrpcworksource.py", line 375, in _build_jobs
    decoded = json.loads(decoded)
  File "/usr/lib/python2.7/json/__init__.py", line 326, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

2012-10-10 21:57:46.570 [200] BTCGuild: Error while fetching job: Traceback (most recent call last):
  File "/home/david/Modular-Python-Bitcoin-Miner/modules/theseven/bcjsonrpc/bcjsonrpcworksource.py", line 257, in fetcher
    jobs = self._build_jobs(response, data, epoch, now, "getwork")
  File "/home/david/Modular-Python-Bitcoin-Miner/modules/theseven/bcjsonrpc/bcjsonrpcworksource.py", line 375, in _build_jobs
    decoded = json.loads(decoded)
  File "/usr/lib/python2.7/json/__init__.py", line 326, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

2012-10-10 21:57:46.957 [200] BTCGuild: Error while fetching job: Traceback (most recent call last):
  File "/home/david/Modular-Python-Bitcoin-Miner/modules/theseven/bcjsonrpc/bcjsonrpcworksource.py", line 257, in fetcher
    jobs = self._build_jobs(response, data, epoch, now, "getwork")
  File "/home/david/Modular-Python-Bitcoin-Miner/modules/theseven/bcjsonrpc/bcjsonrpcworksource.py", line 375, in _build_jobs
    decoded = json.loads(decoded)
  File "/usr/lib/python2.7/json/__init__.py", line 326, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
legendary
Activity: 966
Merit: 1000
Hi, I hope this is a good place for bug reporting.

I have been using MPBM for a few days now, cloned from github on 26-September.

Over the weekend I left it running, and left the Safari window open with the WebUI running.

When I returned today, it was running real chunky, and Safari was using several gigs of memory.  Upon closing the MPBM tab, the memory was freed and things returned to normal.

I think the AJAX code is leaking memory.  Here is a screenshot of the Activity window after it has been running for a few minutes:



I think either the getallstats responses, or /api/log/stream (or both) are continuing to accumulate in browser memory for as long as the tab remains open.

Sorry I didn't capture the Activity window before closing the tab earlier.

Let me know if I can do anything more to help debug this.
full member
Activity: 148
Merit: 100
Status update on my miner:

1.) i always wrote that i am mining on ARM, thats not true Smiley sorry for that
i checked cpuinfo and it's an "MIPS 24Kc V7.4" with 128MB-RAM with one X6500
OS: Openwrt
RAM-Usage:56MB

2) MPBM stop working today (after i added an additional pool and made some config changes) with some "OS error can't handl memory allocation or something"
i am on version 0.1.0 (beta), yeah its at this version since a long time, commit "7690b2e" (Apr 27, 2012)
it did run stable for 2 Month 16 Day
This Miner-Software is great!

3) i added a 2. P2Pool today and i am working with priority's, so the 2. P2Pool with prio 1 (which is lowest afaik) gets the most Hashrate, after searching this thread i came to the post where it is noted that P2Pool should run at an other Blockchain but that isn't implemented yet? i didn't look at the code but i guess it would be a bigger implementation and i am thinking about a simple solution

there are only 2 blockchains => Bitcoin and P2Pool, i guess nobody is mining namecoin or others without merged mining
so i am thinking about an "workers source"-option called "new block doesn't effect other worker sources"

made a git pull yesterday and my problem is gone Smiley nice work

just my 0.5BTC  Wink
sr. member
Activity: 410
Merit: 252
Watercooling the world of mining
I'm looking, and looking and can't find how to use this software on Windows... Any help?
You have been acting according to http://fpgamining.com/documentation/software/mpbm-windows ?
This is a guide by fizzist.

If that does not work some info on your system (software) might be intresting.
While Windows 7 is mostly problemless Windows XP is very nasty here.
legendary
Activity: 1029
Merit: 1000
I'm looking, and looking and can't find how to use this software on Windows... Any help?
hero member
Activity: 816
Merit: 1000
Hi all,

I'm running mpbm 0.1.0 beta on Ubuntu 12.04 with Python 2.7.3 but when viewing it locally using Firefox or remotely using Firefox or IE it is displayed with the menu ('frontends', 'workers', 'work sources', etc) 'behind' a table displaying the donation pools, the only way I can interact with those options is to switch to 'no style' in 'view' -> 'page style' in FF

I'm assuming it's a missing python package - any ideas??

I had the same issue.  Try the chromium browser.
newbie
Activity: 24
Merit: 0
Is there any newer version then this out for windows mpbm-v0.1.0beta.zip.  I'm seeing alot of this lately with any pool I use and wonder if its a software issue.
 


50 BTC.COM: Error while fetching job: Traceback (most recent call last):
  File "C:\Users\\Desktop\X6500_Easy_Package_For_Windows\mpbm-v0.1.0beta\core\actualworksource.py", line 155, in get_job
    jobs = self._get_job()
  File "C:\Users\\Desktop\X6500_Easy_Package_For_Windows\mpbm-v0.1.0beta\modules\theseven\bcjsonrpc\bcjsonrpcworksource.py", line 120, in _get_job
    conn.request("POST", self.settings.path, req, headers)
  File "c:\Program Files (x86)\Python32\lib\http\client.py", line 964, in request
  File "c:\Program Files (x86)\Python32\lib\http\client.py", line 1002, in _send_request
  File "c:\Program Files (x86)\Python32\lib\http\client.py", line 960, in endheaders
  File "c:\Program Files (x86)\Python32\lib\http\client.py", line 805, in _send_output
  File "c:\Program Files (x86)\Python32\lib\http\client.py", line 743, in send
  File "c:\Program Files (x86)\Python32\lib\http\client.py", line 721, in connect
  File "c:\Program Files (x86)\Python32\lib\socket.py", line 404, in create_connection
  File "c:\Program Files (x86)\Python32\lib\socket.py", line 395, in create_connection
socket.timeout: timed out

I am seeing something similar using the latest version in Ubuntu 12.04. Doesn't matter which pool. Once this happens a few times sometimes I lose all connections to the pool. I have to restart. It seems to get worse the more x6500 units hook up to it.
sr. member
Activity: 476
Merit: 250
It is actually a known problem that it doesn't work with Firefox.
Not a missing python package issue.

Wouldn't know about IE, haven't used it for years.

Works fine with Safari from OS X.

You might try that or Opera.
newbie
Activity: 37
Merit: 0
Hi all,

I'm running mpbm 0.1.0 beta on Ubuntu 12.04 with Python 2.7.3 but when viewing it locally using Firefox or remotely using Firefox or IE it is displayed with the menu ('frontends', 'workers', 'work sources', etc) 'behind' a table displaying the donation pools, the only way I can interact with those options is to switch to 'no style' in 'view' -> 'page style' in FF

I'm assuming it's a missing python package - any ideas??
hero member
Activity: 720
Merit: 525
How to use json to get data from MPBM.

It would have saved me quite a few hours if an example of this type had been available, so, here it is for anyone else who might be looking.


Thanks for this, Otto. Actually, there is one example of grabbing data from the API in the munin plugin here.

TheSeven, might be good to add links to both of these in the OP?
sr. member
Activity: 476
Merit: 250
How to use json to get data from MPBM.

It would have saved me quite a few hours if an example of this type had been available, so, here it is for anyone else who might be looking.

The 'magic' involved is having to set the headers on the request in order to receive a non-null response.
E.g.,
curl -d "1"  -H "DNT: 1" -H "If-Modified-Since:Sat, 1 Jan 2000 00:00:00 GMT" -H "Content-Type:application/json"

You can find examples of required in the Python example below.

This gives a quick test to ensure the web-server / mpbm is working before you get bogged down in "why is urllib3 throwing that exception?". Smiley

(BTW, "requests" is a third party library. Free to use it seems. You can find it if you need it.)
--

#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Path hack.
import sys
import os
sys.path.insert(0, os.path.abspath('..'))
import json
import unittest
import pickle
import tempfile
from pprint import pprint
import datetime
import time

import requests
from requests.compat import str, StringIO
from requests import HTTPError
from requests import get, post, head, put
from requests.auth import HTTPBasicAuth, HTTPDigestAuth
from requests.exceptions import InvalidURL

# curl -d "1"  -H "DNT: 1" -H "If-Modified-Since:Sat, 1 Jan 2000 00:00:00 GMT" -H "Content-Type:application/json"

def getDataFromMPBM():
  auth = HTTPBasicAuth('admin', 'mpbm')
  headers = {'content-type' : 'application/json', 'DNT' : '1', 'If-Modified-Since' : 'Sat, 1 Jan 2000 00:00:00 GMT' }

  workerURL = 'http://host.domain.com:8832/api/statsgadget/getworkerstats'
  blockchainURL = 'http://host.domain.com:8832/api/statsgadget/getblockchainstats'
  worksourceURL = 'http://host.domain.com:8832/api/statsgadget/getworksourcestats'
  allURL = 'http://host.domain.com:8832/api/statsgadget/getallstats'

  r = requests.post(workerURL, auth=auth, data='1', headers=headers, prefetch=True)

  #print(json.dumps( r.json, sort_keys = True, indent = 4 ) )
  workerResponse = json.loads( r.text )
  #pprint( workerResponse )

  return workerResponse

tempHigh = 0.0
tempLow = 100.0
while( True ):
  workerResponse = getDataFromMPBM()

  startTime = datetime.datetime.fromtimestamp( workerResponse[ 'starttime' ] )
  dataTime = datetime.datetime.fromtimestamp( workerResponse[ 'timestamp' ] )
  upTime = dataTime - startTime
  tempNow = workerResponse['workers'][0]['temperature']
  if tempNow < tempLow : tempLow = tempNow
  if tempNow > tempHigh : tempHigh = tempNow
  #print( upTime )
  print( '{0:.1f} \tHigh: {2:.1f} \tLow: {3:.1f} \t{1}'.format( tempNow, dataTime, tempHigh, tempLow ) )

  time.sleep( 9.991 )


exit()
sr. member
Activity: 308
Merit: 250
Is there any newer version then this out for windows mpbm-v0.1.0beta.zip.  I'm seeing alot of this lately with any pool I use and wonder if its a software issue.
 


50 BTC.COM: Error while fetching job: Traceback (most recent call last):
  File "C:\Users\\Desktop\X6500_Easy_Package_For_Windows\mpbm-v0.1.0beta\core\actualworksource.py", line 155, in get_job
    jobs = self._get_job()
  File "C:\Users\\Desktop\X6500_Easy_Package_For_Windows\mpbm-v0.1.0beta\modules\theseven\bcjsonrpc\bcjsonrpcworksource.py", line 120, in _get_job
    conn.request("POST", self.settings.path, req, headers)
  File "c:\Program Files (x86)\Python32\lib\http\client.py", line 964, in request
  File "c:\Program Files (x86)\Python32\lib\http\client.py", line 1002, in _send_request
  File "c:\Program Files (x86)\Python32\lib\http\client.py", line 960, in endheaders
  File "c:\Program Files (x86)\Python32\lib\http\client.py", line 805, in _send_output
  File "c:\Program Files (x86)\Python32\lib\http\client.py", line 743, in send
  File "c:\Program Files (x86)\Python32\lib\http\client.py", line 721, in connect
  File "c:\Program Files (x86)\Python32\lib\socket.py", line 404, in create_connection
  File "c:\Program Files (x86)\Python32\lib\socket.py", line 395, in create_connection
socket.timeout: timed out
sr. member
Activity: 476
Merit: 250
I don't think so. Just watch for a while to ensure you are getting as many shares accepted per minute as you expect. In my case, I'm getting almost exactly, or perhaps slightly better, results as I was getting with cgminer.

However, a tip, if you want to leave the monitor web page up for long periods you'll need to change the log level to something like 200 in two places. Both for the web output and for the stdout output. If you don't do that it will develop a problem (bad) in a half day to a couple of days of continuous running.

--

Hmmm, just went to increase the log level for web output to verify that I also was getting those messages (I 'think' I was) and see that there is no longer a log level setting for the web gui. So, that problem may have been resolved.

I'm using a version pulled straight from the git repository since I wanted to take a look at some of the work in progress. Depending on where you got your distribution there could be some minor variances.
hero member
Activity: 816
Merit: 1000
Should this be of any concern?

"Discarding 120 jobs from long poll response because work buffer is full"

Thanks,
Dave
hero member
Activity: 816
Merit: 1000
That's a good idea, thanks.
sr. member
Activity: 476
Merit: 250
I never found a good way (one which satisfied me) to have mpbm do an actual hot/backup configuration.

However, it does an excellent job of equally sharing work among two to many work-sources.

So, my suggestion, pick two pools which you find both to be satisfactory and split your shares between them. Or, Ozcoin and EclipseMC both have multiple independent servers which you can point work-sources at and then all the shares get credited to the same account.
Pages:
Jump to: