Bitcoin Forum
June 23, 2024, 11:34:38 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Pools / Re: [1500 TH] p2pool: Decentralized, DoS-resistant, Hop-Proof pool on: February 20, 2015, 10:41:41 PM
As far as rewriting goes:
Stratum being a "human readable protocol"(json based), it's string manipulation in the end, python should be good enough.
The stratum protocol bits are just string manipulation but that part alone is only one tiny component of writing pool software. It was good enough in the days when only one client was expected to connect to a p2pool instance, but if you want p2pool to be useful it needs to attract big miners to push the hashrate which means hundreds if not thousands of clients for a local p2pool instance. It does not remotely scale. There are far more fundamental problems that need addressing in the modern world of mining than the mostly cosmetic startup exception issue.

You're right on the point where cosmetic start-up issue is not the biggest problem. Starting from there, could you list known fundamental problem?

To my knowledge, stratum don't keep its socket open(am I wrong?), thus scalability shouldn't be much of an issue here if the computer is fast enough. This could be profiled to get a better idea.
2  Bitcoin / Pools / Re: [1500 TH] p2pool: Decentralized, DoS-resistant, Hop-Proof pool on: February 20, 2015, 07:33:30 PM
Not much to polish there other then maybe notifying the user that you can't mine without the latest block....

I admire your enthusiasm for rewriting p2pool in C, and if its bonafide would be happy to run a bounty and help raise you some cash for its completion.

Can you tell us a little about your crypto/coding background?

I've been having some shower thoughts lately about how Multisig or Smart Contracts could be used to solve the variance problem for smaller miners, by building a trustless escrow system to handle small payouts with a payment threshold...

Look forward to hearing more.


As far as rewriting goes:
Stratum being a "human readable protocol"(json based), it's string manipulation in the end, python should be good enough.

My point in posting the exception log is this: if you manage a simple case like: "bitcoind is not ready" with exception throwing, which are at least in C++ and Java have a lot of overhead and thus performance draw back, I wonder what might be next.

As far as my background, I do embedded software development as a living, mostly C/C++.
3  Bitcoin / Pools / Re: [1500 TH] p2pool: Decentralized, DoS-resistant, Hop-Proof pool on: February 20, 2015, 06:16:56 PM
Well, I see that it does requires some polishing, throwing exception just because bitcoind is still downloading block...

Code:
2015-02-20 12:50:05.782411 p2pool (version 13.4-67-gbcd9a50)
2015-02-20 12:50:05.782574
2015-02-20 12:50:05.782741 Testing bitcoind RPC connection to 'http://127.0.0.1:8332/' with username 'reallive1'...
2015-02-20 12:50:06.576906 > Error getting work from bitcoind:
2015-02-20 12:50:06.577017 > Traceback (most recent call last):
2015-02-20 12:50:06.577082 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 577, in _runCallbacks
2015-02-20 12:50:06.577147 >     current.result = callback(current.result, *args, **kw)
2015-02-20 12:50:06.577208 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1155, in gotResult
2015-02-20 12:50:06.577267 >     _inlineCallbacks(r, g, deferred)
2015-02-20 12:50:06.577326 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1097, in _inlineCallbacks
2015-02-20 12:50:06.577386 >     result = result.throwExceptionIntoGenerator(g)
2015-02-20 12:50:06.577448 >   File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
2015-02-20 12:50:06.577509 >     return g.throw(self.type, self.value, self.tb)
2015-02-20 12:50:06.577569 > --- <exception caught here> ---
2015-02-20 12:50:06.577626 >   File "/home/<userreact>/src/p2pool/p2pool/util/deferral.py", line 41, in f
2015-02-20 12:50:06.577683 >     result = yield func(*args, **kwargs)
2015-02-20 12:50:06.577739 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1097, in _inlineCallbacks
2015-02-20 12:50:06.577797 >     result = result.throwExceptionIntoGenerator(g)
2015-02-20 12:50:06.577854 >   File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
2015-02-20 12:50:06.577912 >     return g.throw(self.type, self.value, self.tb)
2015-02-20 12:50:06.577969 >   File "/home/<userreact>/src/p2pool/p2pool/bitcoin/helper.py", line 36, in getwork
2015-02-20 12:50:06.578027 >     work = yield go()
2015-02-20 12:50:06.578082 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1097, in _inlineCallbacks
2015-02-20 12:50:06.578140 >     result = result.throwExceptionIntoGenerator(g)
2015-02-20 12:50:06.578195 >   File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
2015-02-20 12:50:06.578253 >     return g.throw(self.type, self.value, self.tb)
2015-02-20 12:50:06.578310 >   File "/home/<userreact>/src/p2pool/p2pool/util/jsonrpc.py", line 133, in _http_do
2015-02-20 12:50:06.578370 >     raise Error_for_code(resp['error']['code'])(resp['error']['message'], resp['error'].get('data', None))
2015-02-20 12:50:06.578430 > p2pool.util.jsonrpc.NarrowError: -10 Bitcoin is downloading blocks...
4  Bitcoin / Pools / Re: [1500 TH] p2pool: Decentralized, DoS-resistant, Hop-Proof pool on: February 20, 2015, 05:00:26 PM
Do you have an idea on how to fix the variance/scaling issue?

At the moment, I'm more interested in understanding how the whole shebang works, then maybe fixing the issue will be something I'll look into. I'll start by digging into the github code (I'm not too familiar with python, anyway), sending a message to the guy will surely helps.
5  Bitcoin / Pools / Re: [1500 TH] p2pool: Decentralized, DoS-resistant, Hop-Proof pool on: February 20, 2015, 03:58:06 PM
Hi
Would documentation be slightly better (https://en.bitcoin.it/wiki/P2Pool_code_documentation, code documentation is one thing, project documentation is another which seems to be absent altogether), it would be easier to grant your wish.

Use of C++(mostly boost) could also be an option, but plain C could be feasible.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!