fedde

[Alliance-Developer-Bounty] Update p2pool

Recommended Posts

Hi all

 

We should look into getting the p2pool code updated to a newer version.

 

The current one at https://github.com/freicoin/p2poolwas last authored by maaku Desember 12, 2013, so it's preatty outdated.

 

This is part of establishing the "essential" tools behind a coin to encourage more pools to come alive.

 

Cheers!

 

Fedde

Share this post


Link to post
Share on other sites

count me in!

Changed tittle to [?Alliance?]

 

This time, the bounty should be more cooperative.

That means, people who want to apply for the bounty, should inform, that they are working on it.

If more then one is working on it, they can make suggestion who has done how may to apply commonly to the bounty.

If needed certain milestones could be set from bounty holders for done work.

Programmers can suggest milestones.

 

 

The code should be based (fork) on running code (for example through using github), so that merging in updates and code auditing is more easy to do. 

Share this post


Link to post
Share on other sites

Hehe, yup ;)

 

"If you only knew the magnificence of the 3, 6 and 9, then you would have a key to the universe."

- Nikola Tesla

In this case you make the bookkeeping (at least as long as my hand has 10 fingers :))

Share this post


Link to post
Share on other sites

I don't have control over the miners Arc so I need to discuss that with Fed. I am looking at getting some miners maybe at school but waiting for complete collapse of Bitcoin mining to get some CHEAP units. If BTC keeps dropping then we might see some real deep discounted miners.

Share this post


Link to post
Share on other sites

I would like to contribute to this as well. Fedde can I match your FRC with some mining output?

 

Should be able to do. I think i have some older gear that i can let us contribute to this project.

Share this post


Link to post
Share on other sites

Hi everybody,

 

i think i found a solution. Still doing some testings but shares are created correct already. The p2pool fork wont work for BTC anymore cause i can not guarantee that it works correnct with BTC supply still on. But everybody that wants to mine BTC will use forrest v's p2pool anyway ;-).

 

I write again when i have the tests finished (lets see if i can mine a FRC block with it..).

 

Rik

Share this post


Link to post
Share on other sites

Hi everybody,

 

i think i found a solution. Still doing some testings but shares are created correct already. The p2pool fork wont work for BTC anymore cause i can not guarantee that it works correnct with BTC supply still on. But everybody that wants to mine BTC will use forrest v's p2pool anyway ;-).

 

I write again when i have the tests finished (lets see if i can mine a FRC block with it..).

 

Rik

Ohh nice, sounds good :)

If you need any hashrate on the pool, let us know ^^

Share this post


Link to post
Share on other sites

Much much "DEAD ON ARRIVAL" shares and notifications: miner submitted share more than once.. but i let it running a while maybe the difficulty is set too low.. I write again in a few hours when the difficulty should be regulated.. *thanks for the hashrate*

Share this post


Link to post
Share on other sites

Shows a lot of rejects in the miners too.
Hmm, remind me with one thing.. should I use different worker names for the miners? Like sameFRCaddy.1 sameFRCaddy.2 etc? (currently I use only the addy)

Share this post


Link to post
Share on other sites

Code is up.. Give me a feedback i hope i got it all ;-)

 

Edit: seems like i overlooked something. Pool is running without errors, but blocks are not accepted by freicoin-qt. So please stop testing for the moment. More in the evening.

 

Rik

Share this post


Link to post
Share on other sites

Just updated and runned the current one and a little error when accessing the web interface.

 

Edit: 

Ignore it, i think its there becouse it's lacking data to generate.

2015-01-27 19:03:03.427279 P2Pool: 0 shares in chain (0 verified/0 total) Peers: 0 (0 incoming)2015-01-27 19:03:03.427376  Local: 0H/s in last 0.0 seconds Local dead on arrival: ??? Expected time to share: ???2015-01-27 19:03:03.579468 > Error in DeferredResource handler:2015-01-27 19:03:03.579559 > Traceback (most recent call last):2015-01-27 19:03:03.579593 >   File "/home/fedde/p2pool/p2pool/util/deferred_resource.py", line 24, in render2015-01-27 19:03:03.579670 >     defer.maybeDeferred(resource.Resource.render, self, request).addCallbacks(finish, finish_error)2015-01-27 19:03:03.579745 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 134, in maybeDeferred2015-01-27 19:03:03.579816 >     result = f(*args, **kw)2015-01-27 19:03:03.579894 >   File "/usr/lib/python2.7/dist-packages/twisted/web/resource.py", line 216, in render2015-01-27 19:03:03.579958 >     return m(request)2015-01-27 19:03:03.580021 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1187, in unwindGenerator2015-01-27 19:03:03.580085 >     return _inlineCallbacks(None, gen, Deferred())2015-01-27 19:03:03.580149 > --- <exception caught here> ---2015-01-27 19:03:03.580211 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1045, in _inlineCallbacks2015-01-27 19:03:03.580274 >     result = g.send(result)2015-01-27 19:03:03.580335 >   File "/home/fedde/p2pool/p2pool/web.py", line 189, in render_GET2015-01-27 19:03:03.580399 >     res = yield self.func(*self.args)2015-01-27 19:03:03.580485 >   File "/home/fedde/p2pool/p2pool/web.py", line 325, in <lambda>2015-01-27 19:03:03.580548 >     new_root.putChild('best_share_hash', WebInterface(lambda: '%064x' % node.best_share_var.value))2015-01-27 19:03:03.580623 > exceptions.TypeError: %x format: a number is required, not NoneType

Share this post


Link to post
Share on other sites

When i connect a miner to it : 

2015-01-27 19:11:13.812920 > Unhandled Error2015-01-27 19:11:13.813011 > Traceback (most recent call last):2015-01-27 19:11:13.813067 >   File "/home/fedde/p2pool/p2pool/main.py", line 586, in run2015-01-27 19:11:13.813121 >     reactor.run()2015-01-27 19:11:13.813171 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1169, in run2015-01-27 19:11:13.813223 >     self.mainLoop()2015-01-27 19:11:13.813280 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1178, in mainLoop2015-01-27 19:11:13.813332 >     self.runUntilCurrent()2015-01-27 19:11:13.813382 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 800, in runUntilCurrent2015-01-27 19:11:13.813434 >     call.func(*call.args, **call.kw)2015-01-27 19:11:13.813484 > --- <exception caught here> ---2015-01-27 19:11:13.813534 >   File "/home/fedde/p2pool/p2pool/bitcoin/stratum.py", line 38, in _send_work2015-01-27 19:11:13.813587 >     x, got_response = self.wb.get_work(*self.wb.preprocess_request('' if self.username is None else self.username))2015-01-27 19:11:13.813639 >   File "/home/fedde/p2pool/p2pool/work.py", line 173, in preprocess_request2015-01-27 19:11:13.813691 >     raise jsonrpc.Error_for_code(-12345)(u'p2pool is not connected to any peers')2015-01-27 19:11:13.813742 > p2pool.util.jsonrpc.NarrowError: -12345 p2pool is not connected to any peers2015-01-27 19:11:13.828092 > Unhandled Error

Share this post


Link to post
Share on other sites

Hi Fed,

 

have you set the Persist = False in "networks\freicoin.py".

 

I have uploaded a change. I tested it and it works now! Also with merged mining with my coin (www.winc-ev.jimdo.com) its mining blocks for both coins. So i would conclude merged mining works (Freicoin as parent - should also work with devcoin at least).

 

Waiting for your test results ;-)

 

Rik

Share this post


Link to post
Share on other sites

I just updated and fired it up.

 

Added a miner to it. 

2015-01-27 22:31:04.558169 > Unhandled Error2015-01-27 22:31:04.558268 > Traceback (most recent call last):2015-01-27 22:31:04.558382 >   File "/home/fedde/p2pool/p2pool/main.py", line 586, in run2015-01-27 22:31:04.558469 >     reactor.run()2015-01-27 22:31:04.558557 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1169, in run2015-01-27 22:31:04.558649 >     self.mainLoop()2015-01-27 22:31:04.558736 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1178, in mainLoop2015-01-27 22:31:04.558821 >     self.runUntilCurrent()2015-01-27 22:31:04.558905 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 800, in runUntilCurrent2015-01-27 22:31:04.558989 >     call.func(*call.args, **call.kw)2015-01-27 22:31:04.559074 > --- <exception caught here> ---2015-01-27 22:31:04.559165 >   File "/home/fedde/p2pool/p2pool/bitcoin/stratum.py", line 38, in _send_work2015-01-27 22:31:04.559246 >     x, got_response = self.wb.get_work(*self.wb.preprocess_request('' if self.username is None else self.username))2015-01-27 22:31:04.559329 >   File "/home/fedde/p2pool/p2pool/bitcoin/worker_interface.py", line 129, in get_work2015-01-27 22:31:04.559411 >     x, handler = self._inner.get_work(*args)2015-01-27 22:31:04.559492 >   File "/home/fedde/p2pool/p2pool/work.py", line 291, in get_work2015-01-27 22:31:04.559571 >     base_subsidy=self.node.net.PARENT.SUBSIDY_FUNC(self.current_work.value['height']),2015-01-27 22:31:04.559652 >   File "/home/fedde/p2pool/p2pool/bitcoin/networks/freicoin.py", line 18, in <lambda>2015-01-27 22:31:04.559784 >     SUBSIDY_FUNC = lambda height: int(mpq((161280-height) * 15916928405, 161280) + mpq(9999999999999999, 1048576)) if height < 161280 else 95367431642015-01-27 22:31:04.559842 > exceptions.NameError: global name 'mpq' is not defined

Share this post


Link to post
Share on other sites

Hi Rik

 

To fix the mpq error on debian i added to p2pool/bitcoin/networks/freicoin.py just before the P2P Prefix.

 

Test running here to see if it blocks and the stales / doa goes down

 

http://pool.sicanet.net:9638/

 

Also a typo in the file,

import gmpyfrom gmpy import mpqADDRESS_EXPLORER_URL_PREFIX='http://coinplorer.com/FRC/Addresses/'  <---- notice the ending / that is missing in yours Rik :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now