[Dev] Feathercoin - P2Pool-Neoscrypt - Now Available
-
Based on Ghostlanders Phoneixcoin p2pool and the scrypt based p2pool on github I got the p2pool-neoscrypt working.
Please test and reply with any results, problems, suggestions.
Download at:
https://github.com/wellenreiter01/p2pool-neoscrypt
Release version is available under the above link :
Note for sgminer users:
I’ve tested p2pool with one of the first versions of Neoscrypt sgminer.
Situation is as follows:
Using ‘stratum+tcp://p2pool.neoscrypt.de:19327’ without additional parameter fails
Using ‘http://p2pool.neoscrypt.de:19327’ works as pool automatically switches to the long poll protocol
Using ‘stratum+tcp://p2pool.neoscrypt.de:19327’ AND '–no-extranonce’ works. the pool and the miner are using stratum protocol.Sgminer is using an extension to the stratum protocol, called ‘extranonce’ which is not supproted by p2pool
With the ‘–no-extranonce’ parameter you can switch it of without any decrease of hashrate, as it make a difference for ASIC maining only.
-
Where is our p2pool-neoscrypt ?
-
It will be setup on a server soon.
I’ll announce here, when the test installation is ready.
-
feathercoin-qt.exe -testnet -addnode=wb01.dtdns.net -rpcport=19336
minerd -o http://wb01.dtdns.net:19328 -u lizhi -p TRsuTqxAMKZNvC7JzGNgvM49rkQNcxqjhi -a neoscrypt
my worker is 2KB/s
-
Run P2Pool with feathercoin_testnet. I have a error information, how to fix ? Help ?
C:\Python27\python.exe run_p2pool.py --net feathercoin --testnet -a TRsuTqxAMKZNvC7JzGNgvM49rkQNcxqjhi --feathercoind-p2p-port 19336 --feathercoind-rpc-port 19337 lizhi 12345 2014-08-01 14:13:41.136000 p2pool (version unknown 7032706f6f6c2d6e656f7363727970742d6d6173746572) 2014-08-01 14:13:41.136000 2014-08-01 14:13:41.137000 Testing feathercoind P2P connection to '127.0.0.1:19336'... 2014-08-01 14:13:46.138000 ...taking a while. Common reasons for this include all of feathercoind's connection slots being used...
my Feathercoin/testnet3/feathercoin.conf :
addrdb=1 defaultkey=1 dns=1 server=1 daemon=1 rpcuser=lizhi rpcpassword=12345 rpcport=19337 port=19336
-
I forget start QT, but I have a new problem :
feathercoin-qt.exe -testnet -addnode=wb01.dtdns.net -addnode=271.253.100.231
get new error information :
2014-08-01 15:40:34.232000 Testing feathercoind P2P connection to '127.0.0.1:19336'... 2014-08-01 15:40:34.341000 ...success! 2014-08-01 15:40:34.342000 2014-08-01 15:40:34.343000 Testing feathercoind RPC connection to 'http://127.0.0.1:19337/' with username 'rpcadmin'... 2014-08-01 15:40:35.346000 > Error while checking Bitcoin connection: 2014-08-01 15:40:35.347000 > Traceback (most recent call last): 2014-08-01 15:40:35.347000 > Failure: twisted.internet.error.ConnectionRefusedError: Connection was refused by other side: 10061: ç”±äºŽç›®æ ‡è®¡ç®—æœºç§¯æžæ‹’ç»ï¼Œæ— 法连接。. Error while checking Bitcoin connection: Traceback (most recent call last): Failure: twisted.internet.error.ConnectionRefusedError: Connection was refused by other side: 10061: ç”±äºŽç›®æ ‡è®¡ç®—æœºç§¯æžæ‹’ç»ï¼Œæ— 法连接。.
-
addrdb=1
defaultkey=1These are Phoenixcoin specific options. addrdb enables use of Berkeley address DB engine (addr.dat) instead of the Bitcoin default address engine (peers.dat). defaultkey assigns solo mined blocks to a single wallet address instead of generating a new address for every new block. Feathercoin doesn’t support these options and ignores them.
-
My p2pool-neoscrypt work ! His status http://pool.ftc-c.com:19327/static/
You can mine testcoin in testnet.
minerd -o http://pool.ftc-c.com:19327 -u ftcpool -p 12345 -a neoscrypt
feathercoind -testnet -daemon -debug -addnode=wb01.dtdns.net -addnode=271.253.100.231 -addnode=217.253.100.213
python run_p2pool.py --net feathercoin --testnet --feathercoind-p2p-port 9336 --feathercoind-rpc-port 9337 ftcpool 6qXvFmctiX6pM1Bm5QPs8tEv7Th2R5HHKK
-
There is a problem that the wallet doesn’t accept the blocks found by the p2pool.
The current version on github has disabled a couple of sanity checks to get the communication between the miner and the pool working.
–debug option or the wallet shows in the log:
014-08-02 11:27:40 received block 379fff03f539c3d7276728de3335a65963ada29dc8bb1d153babbfb68210d7e3
2014-08-02 11:27:40 ERROR: CheckProofOfWork() : hash doesn’t match nBits
2014-08-02 11:27:40 ERROR: CheckBlock() : proof-of-work verification failed
2014-08-02 11:27:40 ERROR: ProcessBlock() : CheckBlock FAILED
2014-08-02 11:27:40 Warning: Local node 127.0.0.1:50510 misbehaving (delta: 50)!
2014-08-02 11:27:40 ThreadRPCServer method=submitblock
2014-08-02 11:27:40 ERROR: CheckProofOfWork() : hash doesn’t match nBits
2014-08-02 11:27:40 ERROR: CheckBlock() : proof-of-work verification failed
2014-08-02 11:27:40 ERROR: ProcessBlock() : CheckBlock FAILED -
Yes, same problem,why ?
2014-08-03 08:40:46 RETARGET: nActualTimespan = 65 after bounds 2014-08-03 08:40:46 RETARGET: nTargetTimespan = 60, nTargetTimespan/nActualTimespan = 0.9231 2014-08-03 08:40:46 GetNextWorkRequired RETARGET 2014-08-03 08:40:46 Before: 1e0fffff 00000fffff000000000000000000000000000000000000000000000000000000 2014-08-03 08:40:46 After: 1e0fffff 00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 2014-08-03 08:40:46 ThreadRPCServer method=validateaddress 2014-08-03 08:40:46 RETARGET: nActualTimespan = 139 before bounds 2014-08-03 08:40:46 RETARGET: nActualTimespanShort = 218, nActualTimespanMedium = 139, nActualTimespanLong = 145, nActualTimeSpanAvg = 167, nActualTimespan (damped) = 86 2014-08-03 08:40:46 RETARGET: nActualTimespan = 65 after bounds 2014-08-03 08:40:46 RETARGET: nTargetTimespan = 60, nTargetTimespan/nActualTimespan = 0.9231 2014-08-03 08:40:46 GetNextWorkRequired RETARGET 2014-08-03 08:40:46 Before: 1e0fffff 00000fffff000000000000000000000000000000000000000000000000000000 2014-08-03 08:40:46 After: 1e0fffff 00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 2014-08-03 08:40:46 received: getheaders (37 bytes) 2014-08-03 08:40:46 getheaders 1607 to bde747cf86ad5513cab5e9f8ace55f8ce294e77429ad8522d063e1bf4350b8b2 2014-08-03 08:40:46 sending: headers (82 bytes) 2014-08-03 08:40:46 ThreadRPCServer method=submitblock 2014-08-03 08:40:46 ERROR: CheckProofOfWork() : hash doesn't match nBits 2014-08-03 08:40:46 ERROR: CheckBlock() : proof-of-work verification failed 2014-08-03 08:40:46 ERROR: ProcessBlock() : CheckBlock FAILED 2014-08-03 08:40:46 RETARGET: nActualTimespan = 139 before bounds 2014-08-03 08:40:46 RETARGET: nActualTimespanShort = 218, nActualTimespanMedium = 139, nActualTimespanLong = 145, nActualTimeSpanAvg = 167, nActualTimespan (damped) = 86
-
Just some ideas to test.
Are some of the transaction validations scrypt specific? and need updating in the code.
Some of the p2pool settings are incorrect for the testnet, Lizhi, although you must have fixed that, to get it working at all.
these are the wrong ports for the testnet.
–feathercoind-p2p-port 9336 --feathercoind-rpc-port 9337
I also had problems because there are requirements to the p2pool - rpc password, its got to have numbers and letters, of which some have to be capital letters. I don’t know if “12345” works
-
Disable submitblock and let it use getblocktemplate to return block data. There is also getblockex, but it seems deprecated and unsupported now.
-
Thank wrapper, I think I fixed the problem.
fix .feathercoin/feathercoin.conf
rpcuser=ftcpool rpcpassword=6qXvFmctiX6pM1Bm5QPs8tEv7Th2R5HHKK daemon=1 server=1 rpcport=19337 port=19336
start p2pool:
python run_p2pool.py --net feathercoin --testnet --feathercoind-p2p-port 19336 --feathercoind-rpc-port 19337 ftcpool 6qXvFmctiX6pM1Bm5QPs8tEv7Th2R5HHKK
miner command:
minerd -o http://pool.ftc-c.com:19327 -u ftcpool -p 123 -a neoscrypt
-
A new problem. It will not work in mining three minutes later.
after three minutes , Minerd.exe stop .
some error information in p2pool log:
2014-08-03 20:01:29.794448 > --- --- 2014-08-03 20:01:29.794660 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1039, in _inlineCallbacks 2014-08-03 20:01:29.794859 > result = g.send(result) 2014-08-03 20:01:29.795101 > File "/data/ftcc/p2pool-neoscrypt/p2pool/web.py", line 189, in render_GET 2014-08-03 20:01:29.795300 > res = yield self.func(*self.args) 2014-08-03 20:01:29.795506 > File "/data/ftcc/p2pool-neoscrypt/p2pool/web.py", line 194, in 2014-08-03 20:01:29.795714 > web_root.putChild('rate', WebInterface(lambda: p2pool_data.get_pool_attempts_per_second(node.tracker, node.best_share_var.value, decent_height())/(1-p2pool_data.get_average_stale_prop(node.tracker, node.best_share_var.value, decent_height())))) 2014-08-03 20:01:29.795933 > File "/data/ftcc/p2pool-neoscrypt/p2pool/data.py", line 547, in get_pool_attempts_per_second 2014-08-03 20:01:29.796147 > assert dist >= 2 2014-08-03 20:01:29.796346 > exceptions.AssertionError: 2014-08-03 20:01:37.216029 P2Pool: 0 shares in chain (0 verified/0 total) Peers: 0 (0 incoming) 2014-08-03 20:01:37.216498 Local: 1388H/s in last 10.0 minutes Local dead on arrival: ~0.3% (0-2%) Expected time to share: 48.2 minutes 2014-08-03 20:01:39.807271 > Error in DeferredResource handler: 2014-08-03 20:01:39.807743 > Traceback (most recent call last): 2014-08-03 20:01:39.808046 > File "/data/ftcc/p2pool-neoscrypt/p2pool/util/deferred_resource.py", line 24, in render 2014-08-03 20:01:39.808327 > defer.maybeDeferred(resource.Resource.render, self, request).addCallbacks(finish, finish_error) 2014-08-03 20:01:39.808621 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 134, in maybeDeferred 2014-08-03 20:01:39.808927 > result = f(*args, **kw) 2014-08-03 20:01:39.809153 > File "/usr/lib/python2.7/dist-packages/twisted/web/resource.py", line 216, in render 2014-08-03 20:01:39.809357 > return m(request) 2014-08-03 20:01:39.809557 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1181, in unwindGenerator 2014-08-03 20:01:39.809813 > return _inlineCallbacks(None, gen, Deferred()) 2014-08-03 20:01:39.810029 > --- --- 2014-08-03 20:01:39.810288 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1039, in _inlineCallbacks 2014-08-03 20:01:39.810492 > result = g.send(result) 2014-08-03 20:01:39.810693 > File "/data/ftcc/p2pool-neoscrypt/p2pool/web.py", line 189, in render_GET 2014-08-03 20:01:39.810938 > res = yield self.func(*self.args) 2014-08-03 20:01:39.811144 > File "/data/ftcc/p2pool-neoscrypt/p2pool/web.py", line 194, in 2014-08-03 20:01:39.811350 > web_root.putChild('rate', WebInterface(lambda: p2pool_data.get_pool_attempts_per_second(node.tracker, node.best_share_var.value, decent_height())/(1-p2pool_data.get_average_stale_prop(node.tracker, node.best_share_var.value, decent_height())))) 2014-08-03 20:01:39.811594 > File "/data/ftcc/p2pool-neoscrypt/p2pool/data.py", line 547, in get_pool_attempts_per_second 2014-08-03 20:01:39.811815 > assert dist >= 2 2014-08-03 20:01:39.812024 > exceptions.AssertionError:
-
Lizhi, the errors regarding webroot.putchild are normal as long as no other p2pool node has a worker connected. It simply can’t determine the global pool hash rate.
To give an update on my tests:
-
neoscrypt module for p2pool installed in python with profile 0
-
used ghostlanders neoscrypt p2pool as basis and added the feathercoin infos in networks.py and bitcoin/networks.py
-
forced the pool to use getblocktemplate, as suggested by ghostlander
-
current log shows:
2014-08-05 19:06:05.383892 Worker mrKP5thmnTRxV2Em8x3d8pamPXWHtv2Ed submitted share with hash > target:
2014-08-05 19:06:05.384129 Hash: 67146109f860500455e07f9c06a298ec2bd85202c42c18bd0bd63bf0cb059a5e
2014-08-05 19:06:05.384219 Target: a6c64b37894160e5d022dbf97e6abc74931804560e2db29defa7c64b378941 -
implemented reversebyte to change from big endian to little endian for target.
this changes the target, but as the Pow_hash has 2 bytes more than the target, it is always bigger than the target.
I noticed, that Ghoslander has aa pcx p2pool running on his testnet, which is on neoscrypt, so I send him a message to ask what he has modified to get it running.
-
-
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