Bitcoin Forum
May 21, 2024, 07:51:56 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: P2Pool for SHA3-based currencies (keccak) (PROJECT) [PROGRESS]  (Read 783 times)
florianuhlemann (OP)
Full Member
***
Offline Offline

Activity: 378
Merit: 100



View Profile
March 20, 2014, 08:57:39 AM
Last edit: March 30, 2014, 07:11:52 AM by florianuhlemann
 #1

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:
rav3n_pl
Legendary
*
Offline Offline

Activity: 1361
Merit: 1003


Don`t panic! Organize!


View Profile WWW
March 30, 2014, 12:02:48 AM
 #2

Added comment on git, it is probably "trick" in sane_target_range

1Rav3nkMayCijuhzcYemMiPYsvcaiwHni  Bitcoin stuff on my OneDrive
My RPC CoinControl for any coin https://bitcointalk.org/index.php?topic=929954
Some stuff on https://github.com/Rav3nPL/
florianuhlemann (OP)
Full Member
***
Offline Offline

Activity: 378
Merit: 100



View Profile
March 30, 2014, 07:06:51 AM
 #3

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.
ahmed_bodi
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500

Bitrated user: ahmedbodi.


View Profile
April 05, 2014, 11:21:44 AM
 #4

address. tx's, headers, checksum and POW are all sha3

Bitrated user: ahmedbodi.
tarzen
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
April 06, 2014, 04:16:40 PM
 #5

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!
ahmed_bodi
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500

Bitrated user: ahmedbodi.


View Profile
April 06, 2014, 05:57:30 PM
 #6

..... ive just given u everything which needs changing

Bitrated user: ahmedbodi.
jacob019
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250

Cryptomancer


View Profile
April 26, 2014, 12:13:57 AM
 #7

address. tx's, headers, checksum and POW are all sha3

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

Favorite coin: Kimocoin (KMC) - in-thread auctions for real world merchandise
website - faucet - explorer - dice
ahmed_bodi
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500

Bitrated user: ahmedbodi.


View Profile
April 26, 2014, 12:54:21 PM
 #8

thats all that i changed in stratum to make it support sha3

Bitrated user: ahmedbodi.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!