[Dev] Feathercoin - P2Pool-Neoscrypt - Now Available
-
new commit on github, including reversebyte.py, which was missing.
Still not working
-
Great work guys!
-
oh, it not work :-
-
I spend half a day on the p2pool stuff again
no results
what I noticed is, that the p2pool neoscrypt module produces wrong results while the same code runs fine in the wallet, so it may be ‘just’ a problem of function calls and parameter transfer between python and C++.also if I read it right, the Wallet code passes variables to the neoscrypt procedure, as in GetPowHash() in main.h, while the python passes pointer to structures??
Eample from wallet main.h:
/* Calculates block proof-of-work hash using either NeoScrypt or Scrypt */ uint256 GetPoWHash() const { unsigned int profile = 0x0; uint256 hash; /* All blocks generated up to this time point are Scrypt only */ if((fTestNet && (nTime < nTestnetSwitchV2)) || (!fTestNet && (nTime < nSwitchV2))) { profile = 0x3; } else { /* All these blocks must be v2+ with valid nHeight */ int nHeight = GetBlockHeight(); if(fTestNet) { if(nHeight < nTestnetFork) profile = 0x3; } else { if(nHeight < nForkFour) profile = 0x3; } } neoscrypt((unsigned char *) &nVersion, (unsigned char *) &hash, profile); return hash; }
Example from p2pool/work.py:
pow_hash = self.node.net.PARENT.POW_FUNC(bitcoin_data.block_header_type.pack(header))
Where header is a dict in python.
-
Wellen,
I’m at the same point as you now :(
I get everything looking like it’s running well but nothing is accepted by the wallet, I’ll keep pluggin away but I’m some what in the dark here as my coding skills are limited in this area :(
UM
-
The miner says ’ hash accepted’ , but in the p2pool log you will see entries like ‘worker xyz submitted share with hash > target’
-
I spend half a day on the p2pool stuff again
no results
what I noticed is, that the p2pool neoscrypt module produces wrong results while the same code runs fine in the wallet, so it may be ‘just’ a problem of function calls and parameter transfer between python and C++.also if I read it right, the Wallet code passes variables to the neoscrypt procedure, as in GetPowHash() in main.h, while the python passes pointer to structures??
Eample from wallet main.h:
/* Calculates block proof-of-work hash using either NeoScrypt or Scrypt */ uint256 GetPoWHash() const { unsigned int profile = 0x0; uint256 hash; /* All blocks generated up to this time point are Scrypt only */ if((fTestNet && (nTime < nTestnetSwitchV2)) || (!fTestNet && (nTime < nSwitchV2))) { profile = 0x3; } else { /* All these blocks must be v2+ with valid nHeight */ int nHeight = GetBlockHeight(); if(fTestNet) { if(nHeight < nTestnetFork) profile = 0x3; } else { if(nHeight < nForkFour) profile = 0x3; } } neoscrypt((unsigned char *) &nVersion, (unsigned char *) &hash, profile); return hash; }
Example from p2pool/work.py:
pow_hash = self.node.net.PARENT.POW_FUNC(bitcoin_data.block_header_type.pack(header))
Where header is a dict in python.
I think it is in main.py.
if share.pow_hash
-
For testing I temporarily modified the neoscrypt.c of the p2pool neoscrypt module and defined the input value of the hashing procedure as constant in the c-code. It seems to calculate correctly.
Also the target on p2pool measured against seems to be fine.
I assume, that the return value from the neoscrypt module either has an overflow or is interpreted wrong. may be wrong type, little/big endian problem or whatever.
------------- Edit---------------
Checked type of pow_hash and target in work.py -> both variables have type ‘long’
-
If you switch CPUminer in debug mode with -D, you can see P2Pool asking for incorrect targets:
[2014-08-10 21:21:12] 1 miner threads started, using 'neoscrypt' algorithm. [2014-08-10 21:21:15] Long-polling activated for http://prometheus.phoenixcoin.org:20554/long-polling [2014-08-10 21:21:15] DEBUG: got new work in 3062 ms [2014-08-10 21:21:16] DEBUG (little endian): hash
-
It is working now for long-poll.
No support for stratum at the moment, even if work is distributed, no valid blocks can be mined via stratum.
A new version is on github
-
Yes, It work! >:D
-
neoscrypt p2pool dev testing cpu mine phoenixcoin
Longpoll works, so start minerd with ‘–no-stratum’
useing Ghostlander’s Github (for minerd)
-
Latest code pushed
git clone git://github.com/wellenreiter01/p2pool-neoscrypt
-
What is the status of the p2pool?
Is there still a problem with stratum?
Are we near to pushing some changes upstream? How far back can that go?
That makes things easier running multicoin p2pools. That will mean the “central p2pool” distribution gets updated.
-
Stratum suport still is not implemented, but longpoll runs stable, so this is not a show stopper for pooled neoscrypt mining.
Due to the fact, that neoscrypt uses little endian data only, while other algorithms use big endian encoding, neoscrypt p2pool is not compatible with non-neoscrypt coins.
Therefore two different versions of p2pool will exist in the futute, unless significant changes in the code is done to implement coin dependent encoding of data. These changes would need a couple of if-then clauses reducing the speed of p2pool operation, and/or increasing the load put un the underlaying host system.
Another solutution would be to adapt neoscrypt to the big endian encoding used for other algorithms, but this would mean another hard fork for any coin productive with neoscrypt.
-
Update:
Stratum support works for minerd.
It can be testet on
-
http://p2pool.neoscrypt.de:10554 ( German pool )
-
http://pool20.neoscrypt.de:10554 ( Dutch pool )
GPU miner adaption is ongoing, but not working yet
-
-
Yay!!!
http://pool.ftc-c.com:19328 (china pool ) :)
Stratum support works for minerd.
CGminer Command Line:
cgminer.exe --neoscrypt --worksize 256,256,256 --thread-concurrency 8960,8960,4000 -I 12,12,12 -g 1 -o stratum+tcp://pool.ftc-c.com:19328 -u TRsuTqxAMKZNvC7JzGNgvM49rkQNcxqjhi -p x
-
Update:
Thanks to the help of Avehre, p2pool now fully supports stratum for cpuminer and gpuminer. ;D O0 8)
Latest Version is on github.
p2pool.neoscrypt.de:10554 (46.4.0.101:10554) is already updated and supporting stratum for gpuminer
pool20.neoscrypt.de:10554 (95.85.58.10:10554) will be updated soon.
Please be aware, that you also need the latest beta-Version of gpuminer to use stratum successfully
-
Another solution would be to adapt neoscrypt to the big endian encoding used for other algorithms, but this would mean another hard fork for any coin productive with neoscrypt.
This is actually a good idea to consider for the Feathercoin implementation of neoscrypt - as it would mean pxc and ftc don’t end up like ltc and ftc with scrypt. e.g. big player coin switch over attacks …
It won’t be a hard fork, because ftc hasn’t implemented it. i.e. with some thought it might be possible to retain each format as an option (without too much work).
Additional advantages would be -
It would be possible to have different “colours of neoscrypt” for different coins to use so ASICS are harder (e.g. switchable).
pxc or ftc would have an easy switch mechanism to extend ASIC avoidance.
-
Hey All,
New to the forum, but have been following the development of the p2pool for neoscrypt. I am having some difficult that I’m hoping someone can shed some light on. I am able to get the latest p2pool up and running but it is not able to sync with other nodes or download shares. (I have to change persist to False and run it as a solo)
I have edited the network.py file to add in nodes: 95.85.57.10 and 46.4.0.101. (Both running p2pool nodes). It finds and connects to them, but seems to only find a few shares. In fact if you look at the stats for each of them 95.85.57.10:10554 and 46.4.0.101:10554, they are not synced either, though clearly on the same blockchain for PXC. I have noticed other nodes show up in the logs and have connected to them and they seem to have the same problem.
I have tried different p2p ports (10555 & 11555), disabling firewall, DMZ, different flavors of linux, etc, still can’t sync.
I know it’s not on their end because when I fire up an old version of p2pool (git commit from about 2 weeks ago) it connects to both those nodes and downloads all the shares in mere seconds (of course there is no stratum support on this earlier version).
I have reviewed the code changes but can’t find anything that would affect syncing.
Any ideas?