Bitcoin Forum

Alternate cryptocurrencies => Marketplace (Altcoins) => Topic started by: florianuhlemann on March 20, 2014, 08:57:39 AM



Title: P2Pool for SHA3-based currencies (keccak) (PROJECT) [PROGRESS]
Post by: florianuhlemann on March 20, 2014, 08:57:39 AM
So, guys. I'm going to request some help as I'm unfortunately not capable enough to do this on my own.

what I'd like to do:

- clone that latest p2pool software from the original dev forestv (https://github.com/forrestv/p2pool)
- use a keccak python implementation (https://bitbucket.org/tiran/pykeccak)
- implement all known SHA3 currencies in the preconfig (Maxcoin, Helixcoin, Slothcoin)

where I currently get "stuck":

- rpc connection works, p2pool connection doesn't.
- when I supply a address for the pool payout, it spits out "invalid checksum" which should give us a first starting point.
- share's are being rejected (or not verified as being a real share chain share) because the hash is higher than the difficulty hash should be (and the target hash shows less characters in lengths?)

Let me know if someone has a more complete project already, but I don't see anything that's working yet.

Here's the new project I'd like to invite you to contribute or at least give hints on how to get started (https://github.com/florianuhlemann/p2pool_sha3keccak)

Please consider donating some BTC for the work required: 1HLstfdaXpV48BnTpG1zKRrZaRFXmAezeU

first step: let's get the "invalid checksum" fixed when handing over the payout address to the p2pool startup. (python run_p2pool.py --net YOURSHA3NET --address ANYADDRESSFORSHA3) - I do understand that it's doing the sha256 validation check that bitcoin (and litecoin?) uses, which isn't going to be valid here, correct?

second step: properly adjusting the difficulties as there seems to be a problem with length/value comparison of the minimum targets and the work being submitted.

third step: share header checking is broken, all submitted shares and even blocks fail to get accepted.

Code:
2014-03-21 15:40:15.994407 > Squelched JSON error:
2014-03-21 15:40:15.994474 > Traceback (most recent call last):
2014-03-21 15:40:15.994512 > File "/usr/lib/python2.7/dist-packages/twisted/protocols/basic.py", line 455, in dataReceived
2014-03-21 15:40:15.994546 > self.lineReceived(line)
2014-03-21 15:40:15.994577 > File "/home/florianuhlemann/p2pool_helixcoin/p2pool/util/jsonrpc.py", line 164, in lineReceived
2014-03-21 15:40:15.994611 > _handle(line, self, response_handler=self._matcher.got_response).addCallback(lambda line2: self.sendLine(line2) if line2 is not None else None)
2014-03-21 15:40:15.994644 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1181, in unwindGenerator
2014-03-21 15:40:15.994677 > return _inlineCallbacks(None, gen, Deferred())
2014-03-21 15:40:15.994708 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1039, in _inlineCallbacks
2014-03-21 15:40:15.994739 > result = g.send(result)
2014-03-21 15:40:15.994768 > --- ---
2014-03-21 15:40:15.994796 > File "/home/florianuhlemann/p2pool_helixcoin/p2pool/util/jsonrpc.py", line 85, in _handle
2014-03-21 15:40:15.994824 > result = yield method_meth(*list(preargs) + list(params))
2014-03-21 15:40:15.994852 > File "/home/florianuhlemann/p2pool_helixcoin/p2pool/bitcoin/stratum.py", line 74, in rpc_submit
2014-03-21 15:40:15.994880 > return got_response(header, worker_name, coinb_nonce)
2014-03-21 15:40:15.994907 > File "/home/florianuhlemann/p2pool_helixcoin/p2pool/bitcoin/worker_interface.py", line 136, in
2014-03-21 15:40:15.994935 > lambda header, user, coinbase_nonce: handler(header, user, pack.IntType(self._my_bits).pack(nonce) + coinbase_nonce),
2014-03-21 15:40:15.994964 > File "/home/florianuhlemann/p2pool_helixcoin/p2pool/work.py", line 389, in got_response
2014-03-21 15:40:15.994991 > share = get_share(header, last_txout_nonce)
2014-03-21 15:40:15.995018 > File "/home/florianuhlemann/p2pool_helixcoin/p2pool/data.py", line 215, in get_share
2014-03-21 15:40:15.995045 > assert share.header == header # checks merkle_root
2014-03-21 15:40:15.995082 > exceptions.AssertionError:


Title: Re: P2Pool for SHA3-based currencies (keccak) (PROJECT) [PROGRESS]
Post by: rav3n_pl on March 30, 2014, 12:02:48 AM
Added comment on git, it is probably "trick" in sane_target_range


Title: Re: P2Pool for SHA3-based currencies (keccak) (PROJECT) [PROGRESS]
Post by: florianuhlemann on March 30, 2014, 07:06:51 AM
Thanks rav3n. Though I did have that figured out. (Forgot to update post, sorry) Where I was really stuck at is the share header checking. Submitted shares and even blocks fail to get approved.


Title: Re: P2Pool for SHA3-based currencies (keccak) (PROJECT) [PROGRESS]
Post by: ahmed_bodi on April 05, 2014, 11:21:44 AM
address. tx's, headers, checksum and POW are all sha3


Title: Re: P2Pool for SHA3-based currencies (keccak) (PROJECT) [PROGRESS]
Post by: tarzen on April 06, 2014, 04:16:40 PM
address. tx's, headers, checksum and POW are all sha3

It's difficult to decipher what's happening to the pow being submitted, because it's always 64bits and out of whack with what p2pool expects, so i'm guessing that requires looking at what the miner is doing with the target and the provided getBlockTemplate...

SHA3 in p2pool is a good challenge but hard!


Title: Re: P2Pool for SHA3-based currencies (keccak) (PROJECT) [PROGRESS]
Post by: ahmed_bodi on April 06, 2014, 05:57:30 PM
..... ive just given u everything which needs changing


Title: Re: P2Pool for SHA3-based currencies (keccak) (PROJECT) [PROGRESS]
Post by: jacob019 on April 26, 2014, 12:13:57 AM
address. tx's, headers, checksum and POW are all sha3

He's right, it's failing because the conversion is incomplete somewhere.


Title: Re: P2Pool for SHA3-based currencies (keccak) (PROJECT) [PROGRESS]
Post by: ahmed_bodi on April 26, 2014, 12:54:21 PM
thats all that i changed in stratum to make it support sha3