Pages:
Author

Topic: [ANN] Eloipool - FAST Python3 pool server software - GBT/stratum/dyntarget/proxy - page 17. (Read 123146 times)

full member
Activity: 196
Merit: 100
Web Dev, Db Admin, Computer Technician
I thought I might have something I could add to the How To's and Guides Mega List to beef up the Pools category, but it's limited in being able to meet the goals of that thread, which is focused on helping novice users to get involved. Will be nice to include when this fleshes out a little more.
legendary
Activity: 2576
Merit: 1186
Where did eloipool/json.py come from? json is a standard Python module...
I accidentally moved it from python-bitcoinrpc. After moving it back to eloipool/json it seems to be working better-ish:
Code:

~/bc/eloipool$ ./gmp-proxy.py http://
:[email protected]:8337
WARNING:jsonrpc_getwork:Error importing 'midstate' module; work will not provide midstates
Traceback (most recent call last):
  File "./gmp-proxy.py", line 134, in
    server.serve_forever()
  File "/home/alan/bc/eloipool/networkserver.py", line 267, in serve_forever
    self.final_init()
  File "/home/alan/bc/eloipool/jsonrpcserver.py", line 300, in final_init
    ShareTargetHex = '%064x' % (self.ShareTarget,)
AttributeError: 'JSONRPCServer' object has no attribute 'ShareTarget'
That one's a real bug. try this until it works, for now: git checkout HEAD^
full member
Activity: 165
Merit: 100
Where did eloipool/json.py come from? json is a standard Python module...
I accidentally moved it from python-bitcoinrpc. After moving it back to eloipool/json it seems to be working better-ish:
Code:

~/bc/eloipool$ ./gmp-proxy.py http://
:[email protected]:8337
WARNING:jsonrpc_getwork:Error importing 'midstate' module; work will not provide midstates
Traceback (most recent call last):
  File "./gmp-proxy.py", line 134, in
    server.serve_forever()
  File "/home/alan/bc/eloipool/networkserver.py", line 267, in serve_forever
    self.final_init()
  File "/home/alan/bc/eloipool/jsonrpcserver.py", line 300, in final_init
    ShareTargetHex = '%064x' % (self.ShareTarget,)
AttributeError: 'JSONRPCServer' object has no attribute 'ShareTarget'
legendary
Activity: 2576
Merit: 1186
Sorry, I forgot to move jsonrpc from python-bitcoinrpc. I did the same with python-base58, per README.

Code:
~/bc/eloipool$ ./gmp-proxy.py --help
Traceback (most recent call last):
  File "./gmp-proxy.py", line 9, in
    import jsonrpc
  File "/home/alan/bc/eloipool/jsonrpc/__init__.py", line 1, in
    from .json import loads, dumps, JSONEncodeException, JSONDecodeException
  File "/home/alan/bc/eloipool/jsonrpc/json.py", line 1, in
    _json = __import__('json')
  File "/home/alan/bc/eloipool/json.py", line 2, in
    loads = _json.loads
AttributeError: 'module' object has no attribute 'loads'
I have no .json directory in eloipool/jsonrpc/ . Sorry for my ineptitude. Thanks for the help
Where did eloipool/json.py come from? json is a standard Python module...
full member
Activity: 165
Merit: 100
Sorry, I forgot to move jsonrpc from python-bitcoinrpc. I did the same with python-base58, per README.

Code:
~/bc/eloipool$ ./gmp-proxy.py --help
Traceback (most recent call last):
  File "./gmp-proxy.py", line 9, in
    import jsonrpc
  File "/home/alan/bc/eloipool/jsonrpc/__init__.py", line 1, in
    from .json import loads, dumps, JSONEncodeException, JSONDecodeException
  File "/home/alan/bc/eloipool/jsonrpc/json.py", line 1, in
    _json = __import__('json')
  File "/home/alan/bc/eloipool/json.py", line 2, in
    loads = _json.loads
AttributeError: 'module' object has no attribute 'loads'
I have no .json directory in eloipool/jsonrpc/ . Sorry for my ineptitude. Thanks for the help
legendary
Activity: 2576
Merit: 1186
I am having trouble getting gmp-proxy.py to work. Ubuntu 12.04 32bit. Using apt-get, I installed python3-minimal and python3-anyjson.

Code:
~/bc/eloipool$ ./gmp-proxy.py --help
WARNING:jsonrpc_getwork:Error importing 'midstate' module; work will not provide midstates
Traceback (most recent call last):
  File "./gmp-proxy.py", line 26, in
    pool = jsonrpc.ServiceProxy(sys.argv[1])
AttributeError: 'module' object has no attribute 'ServiceProxy'

Any ideas?  Huh
README?
full member
Activity: 165
Merit: 100
I am having trouble getting gmp-proxy.py to work. Ubuntu 12.04 32bit. Using apt-get, I installed python3-minimal and python3-anyjson.

Code:
~/bc/eloipool$ ./gmp-proxy.py --help
WARNING:jsonrpc_getwork:Error importing 'midstate' module; work will not provide midstates
Traceback (most recent call last):
  File "./gmp-proxy.py", line 26, in
    pool = jsonrpc.ServiceProxy(sys.argv[1])
AttributeError: 'module' object has no attribute 'ServiceProxy'

Any ideas?  Huh
legendary
Activity: 2576
Merit: 1186
if you are using dash by default (debian, ubuntu) you get a /bin/sh Let command not found error
this is fixed by changing default shell to bash
Sounds like the example config requires BASH for its example coinbaser command. It doesn't make sense to leave that in unmodified.
hero member
Activity: 896
Merit: 1000
Buy this account on March-2019. New Owner here!!
thanks for clearing that up Luke! You never mentioned in your thread it was unfinished, understood now! Smiley


if you are using dash by default (debian, ubuntu) you get a /bin/sh Let command not found error
this is fixed by changing default shell to bash

not sure if it has anything to do with it actually working or not, but I hate errors

thanks again for all your contributions
legendary
Activity: 2576
Merit: 1186
I am a little confused about this, is it unfinished - or is it just meant to be this way?
It will probably always be "unfinished" unless someone steps up to "finish" it. Otherwise, I plan to make it stable and reliable for Eligius's use (which probably involves some cleanup over time), and other pool ops are welcome to add functionality they need (accounts?). In the meantime, most of the code (moved into specialized do-one-thing-very-well Python modules) is working and clean; it's mainly eloipool.py that ties them all together that's a bit of a rat's nest right now. Wink

I was able to get it working even though - there are no instructions what so ever
I figured the README and example config should be enough for most people who know what they're doing... what did you find lacking? (just what was listed below?)

(tip if your using Debian or Ubuntu you will probably have to dpkg-reconfigure dash and set it to no - so your using bash as default)
Hmm, I don't know what would depend on BASH? O.o

but where does it connect to a db?
There is PostgreSQL support for logging shares, but I haven't documented that... <.<

How do you manage users and shares? I see no support for this anywhere, did I miss it?
Eligius doesn't have users, so unless some other poolop/developer wants to add support for accounts, you don't.



In short, this isn't being released as end-user software, but as "this is what I am using" code that others can use and extend. My hopes in releasing this publicly, is that other miners and pool operators will also contribute, and all of us can benefit without each one of us reinventing everything independently from scratch. This is why I chose the AGPL license, which requires anyone running it as a public pool server to release their changes.
hero member
Activity: 896
Merit: 1000
Buy this account on March-2019. New Owner here!!
hi Luke

I was excited to see this post as I am always excited to see new pool server software

I am a little confused about this, is it unfinished - or is it just meant to be this way?

I was able to get it working even though - there are no instructions what so ever

(tip if your using Debian or Ubuntu you will probably have to dpkg-reconfigure dash and set it to no - so your using bash as default)

but where does it connect to a db? How do you manage users and shares? I see no support for this anywhere, did I miss it?

Please give us more info - I am really excited about this project!

thanks!!! Smiley
legendary
Activity: 2576
Merit: 1186
Eloipool - FAST Python3 pool server

  • First poolserver to use getmemorypool for internal work generation (note: PSJ and ecoinpool do this too, and announced first)
  • Optimized merkle tree generator, does only the minimum required steps to create lots of merkle trees fast.
  • Keeps a fixed-size buffer full of up-to-date merkle trees ready to ship off as soon as a getwork requests them
  • Builds a fixed-size buffer full of clear (zero transactions, just subsidy) merkle trees ready to ship off immediately with longpoll replies (so miners can start working on the new block even before bitcoind has figured out which transactions to use)
  • Support for more getwork extensions than any other public poolserver (update: ecoinpool caught up Wink)
  • Uses chunked HTTP transfer encoding to prevent proxy/firewall timeouts on longpoll connections.
  • Coinbaser support, along with gotwork, for reliable generated payouts and merged mining
  • Asynchronous JSON-RPC server using epoll to optimally handle even heavy loads.
  • Interactive Python 3 console so you can inspect and modify the pool while it's running.
  • Free software (open source) under the AGPLv3 license!
  • Restart pool server (including upgrades) without miners losing work.
  • Modular and highly configurable share logging using fast formatting functions, including support for PostgreSQL, MySQL, SQLite, and plaintext files.
  • Anonymous or authenticated miner users.
  • Support for X-Forwarded-For reverse proxies (and trust controls).
  • Dynamic share targetting enabling fractional, power-of-two (zero bit count), and bdiff rounded miner targets.
  • gzip HTTP response compression to save bandwidth without sacrificing functionality.
  • Support for miners using next-generation getblocktemplate decentralized mining protocol and (pre-BIP draft) stratum mining protocol.
  • Experimental support for creating "sub-pools" based on any upstream getblocktemplate server.

Now running live on:
Pages:
Jump to: