Forum Home
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular

    [Dev] Feathercoin - P2Pool-Neoscrypt - Now Available

    Technical Development
    8
    88
    68273
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Wellenreiter
      Wellenreiter Moderators last edited by

      The miner says ’ hash accepted’ , but in the p2pool log you will see entries like ‘worker xyz submitted share with hash > target’

      Feathercoin development donation address: 6p8u3wtct7uxRGmvWr2xvPxqRzbpbcd82A
      Openpgp key: 0x385C34E77F0D74D7 (at keyserver.ubuntu.com)/fingerprint: C7B4 E9EA 17E1 3D12 07AB 1FDB 385C 34E7 7F0D 74D7

      1 Reply Last reply Reply Quote 1
      • lizhi
        lizhi last edited by

        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
        
        1 Reply Last reply Reply Quote 1
        • Wellenreiter
          Wellenreiter Moderators last edited by

          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’

          Feathercoin development donation address: 6p8u3wtct7uxRGmvWr2xvPxqRzbpbcd82A
          Openpgp key: 0x385C34E77F0D74D7 (at keyserver.ubuntu.com)/fingerprint: C7B4 E9EA 17E1 3D12 07AB 1FDB 385C 34E7 7F0D 74D7

          1 Reply Last reply Reply Quote 1
          • ghostlander
            ghostlander Regular Member last edited by

            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
            
            1 Reply Last reply Reply Quote 1
            • Wellenreiter
              Wellenreiter Moderators last edited by

              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

              Feathercoin development donation address: 6p8u3wtct7uxRGmvWr2xvPxqRzbpbcd82A
              Openpgp key: 0x385C34E77F0D74D7 (at keyserver.ubuntu.com)/fingerprint: C7B4 E9EA 17E1 3D12 07AB 1FDB 385C 34E7 7F0D 74D7

              1 Reply Last reply Reply Quote 1
              • lizhi
                lizhi last edited by

                Yes, It work! >:D

                1 Reply Last reply Reply Quote 1
                • wrapper
                  wrapper Moderators last edited by

                  neoscrypt p2pool dev testing cpu mine phoenixcoin

                  http://95.85.57.10:10554

                  Longpoll works, so start minerd with ‘–no-stratum’

                  useing Ghostlander’s Github (for minerd)

                  https://github.com/g…r-neoscrypt.git

                  1 Reply Last reply Reply Quote 0
                  • lizhi
                    lizhi last edited by

                    Latest code pushed

                    git clone git://github.com/wellenreiter01/p2pool-neoscrypt

                    1 Reply Last reply Reply Quote 1
                    • wrapper
                      wrapper Moderators last edited by

                      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.

                      1 Reply Last reply Reply Quote 0
                      • Wellenreiter
                        Wellenreiter Moderators last edited by

                        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.

                        Feathercoin development donation address: 6p8u3wtct7uxRGmvWr2xvPxqRzbpbcd82A
                        Openpgp key: 0x385C34E77F0D74D7 (at keyserver.ubuntu.com)/fingerprint: C7B4 E9EA 17E1 3D12 07AB 1FDB 385C 34E7 7F0D 74D7

                        1 Reply Last reply Reply Quote 1
                        • Wellenreiter
                          Wellenreiter Moderators last edited by

                          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

                          Feathercoin development donation address: 6p8u3wtct7uxRGmvWr2xvPxqRzbpbcd82A
                          Openpgp key: 0x385C34E77F0D74D7 (at keyserver.ubuntu.com)/fingerprint: C7B4 E9EA 17E1 3D12 07AB 1FDB 385C 34E7 7F0D 74D7

                          1 Reply Last reply Reply Quote 1
                          • lizhi
                            lizhi last edited by

                            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
                            
                            1 Reply Last reply Reply Quote 0
                            • Wellenreiter
                              Wellenreiter Moderators last edited by

                              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

                              Feathercoin development donation address: 6p8u3wtct7uxRGmvWr2xvPxqRzbpbcd82A
                              Openpgp key: 0x385C34E77F0D74D7 (at keyserver.ubuntu.com)/fingerprint: C7B4 E9EA 17E1 3D12 07AB 1FDB 385C 34E7 7F0D 74D7

                              1 Reply Last reply Reply Quote 0
                              • wrapper
                                wrapper Moderators last edited by

                                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.

                                1 Reply Last reply Reply Quote 0
                                • D
                                  darksaber last edited by

                                  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?

                                  1 Reply Last reply Reply Quote 1
                                  • lizhi
                                    lizhi last edited by

                                    After I had installed PXC-P2Pool from https://github.com/wellenreiter01/p2pool-neoscrypt

                                    Now ,I have a problem, miner can not work. @Wellenreiter , Are your code latest in github ?

                                    cgminer.exe --neoscrypt -I 12,12 --worksize 256,256 --thread-concurrency 5760,8960  -g 1 -o stratum+tcp://pool.ftc-c.com:11554 -u PfF9PKBjkmz7gFAkA7h6ajY5AHc9B1mijW -p x
                                    
                                     [2014-09-13 11:43:41] No servers were found that could be used to get work from.
                                     [2014-09-13 11:43:41] Please check the details from the list below of the servers you have input
                                     [2014-09-13 11:43:41] Most likely you have input the wrong URL, forgotten to add a port, or have not set up workers
                                     [2014-09-13 11:43:41] Pool: 0  URL: http://pool.ftc-c.com:11554  User: PfF9PKBjkmz7gFAkA7h6ajY5AHc9B1mijW  Password: x
                                     [2014-09-13 11:43:41] Press any key to exit, or cgminer will try again in 15s.
                                    
                                    
                                    
                                    minerd -a neoscrypt -t 1 -o http://pool.ftc-c.com:11554 -u PfF9PKBjkmz7gFAkA7h6ajY5AHc9B1mijW -p x
                                    
                                    [2014-09-13 12:35:31] getblocktemplate failed, falling back to getwork
                                    [2014-09-13 12:35:31] JSON-RPC call failed: {
                                       "message": "p2pool is downloading shares",
                                       "data": null,
                                       "code": -12345
                                    }
                                    [2014-09-13 12:35:31] Starting Stratum on stratum+tcp://pool.ftc-c.com:11554
                                    [2014-09-13 12:35:31] stratum_recv_line failed
                                    [2014-09-13 12:35:31] ...retry after 30 seconds
                                    

                                    The command run p2pool

                                    python run_p2pool.py --net phoenixcoin  --bitcoind-p2p-port 9555 --bitcoind-rpc-port 9554 p2pool PoAzL52WzHRJovA6kZkptwVTdX9xMxPkwi
                                    

                                    p2pool.log

                                    tail: p2p-pxc.log: file truncated
                                    2014-09-13 10:46:33.743547 p2pool (version 13.4-29-gd936671)
                                    2014-09-13 10:46:33.743850 
                                    2014-09-13 10:46:33.744008 Testing bitcoind RPC connection to 'http://127.0.0.1:9554/' with username 'p2pool'...
                                    2014-09-13 10:46:33.760616     ...success!
                                    2014-09-13 10:46:33.760841     Current block hash: 93a7ea6404be1de8f5112d17248d854be1a7f3044e674a58fa69c41228140b64
                                    2014-09-13 10:46:33.760991     Current block height: 430093
                                    2014-09-13 10:46:33.761119 
                                    2014-09-13 10:46:33.761262 Testing bitcoind P2P connection to '127.0.0.1:9555'...
                                    2014-09-13 10:46:33.843282     ...success!
                                    2014-09-13 10:46:33.843539 
                                    2014-09-13 10:46:33.843739 Determining payout address...
                                    2014-09-13 10:46:33.843999     Loaded cached address: PoAzL52WzHRJovA6kZkptwVTdX9xMxPkwi...
                                    2014-09-13 10:46:33.848390     ...success! Payout address: PoAzL52WzHRJovA6kZkptwVTdX9xMxPkwi
                                    2014-09-13 10:46:33.848541 
                                    2014-09-13 10:46:33.848688 Loading shares...
                                    2014-09-13 10:46:33.848983     ...done loading 0 shares (0 verified)!
                                    2014-09-13 10:46:33.849113 
                                    2014-09-13 10:46:33.849242 Initializing work...
                                    2014-09-13 10:46:33.881213     ...success!
                                    2014-09-13 10:46:33.881423 
                                    2014-09-13 10:46:33.881591 Joining p2pool network using port 11555...
                                    2014-09-13 10:46:33.883949     ...success!
                                    2014-09-13 10:46:33.884095 
                                    2014-09-13 10:46:33.885169 Listening for workers on '' port 11554...
                                    2014-09-13 10:46:33.945528     ...success!
                                    2014-09-13 10:46:33.945717 
                                    2014-09-13 10:46:33.945853 Started successfully!
                                    2014-09-13 10:46:33.945985 Go to http://127.0.0.1:11554/ to view graphs and statistics!
                                    2014-09-13 10:46:33.946133 Donating 1.0% of work towards P2Pool's development. Thank you!
                                    2014-09-13 10:46:33.946264 You can increase this amount with --give-author argument! (or decrease it, if you must)
                                    2014-09-13 10:46:33.946401 
                                    2014-09-13 10:46:34.817044 Outgoing connection to peer 46.4.0.101:11555 established. p2pool version: 1300 '5b90f6c'
                                    2014-09-13 10:46:37.555298 Peer 115.28.24.213:11555 misbehaving, will drop and ban. Reason: was connected to self
                                    2014-09-13 10:46:37.556110 Peer 115.28.24.213:49517 misbehaving, will drop and ban. Reason: was connected to self
                                    2014-09-13 10:46:39.064048 > Error in DeferredResource handler:
                                    2014-09-13 10:46:39.064319 > Traceback (most recent call last):
                                    2014-09-13 10:46:39.064480 >   File "/data/ftcc/p2pool-neoscrypt/p2pool/util/deferred_resource.py", line 24, in render
                                    2014-09-13 10:46:39.064635 >     defer.maybeDeferred(resource.Resource.render, self, request).addCallbacks(finish, finish_error)
                                    2014-09-13 10:46:39.064779 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 134, in maybeDeferred
                                    2014-09-13 10:46:39.065134 >     result = f(*args, **kw)
                                    2014-09-13 10:46:39.065324 >   File "/usr/lib/python2.7/dist-packages/twisted/web/resource.py", line 216, in render
                                    2014-09-13 10:46:39.065497 >     return m(request)
                                    2014-09-13 10:46:39.065644 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1181, in unwindGenerator
                                    2014-09-13 10:46:39.065787 >     return _inlineCallbacks(None, gen, Deferred())
                                    2014-09-13 10:46:39.065927 > ---  ---
                                    2014-09-13 10:46:39.066056 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1039, in _inlineCallbacks
                                    2014-09-13 10:46:39.066179 >     result = g.send(result)
                                    2014-09-13 10:46:39.066300 >   File "/data/ftcc/p2pool-neoscrypt/p2pool/web.py", line 189, in render_GET
                                    2014-09-13 10:46:39.066434 >     res = yield self.func(*self.args)
                                    2014-09-13 10:46:39.066571 >   File "/data/ftcc/p2pool-neoscrypt/p2pool/web.py", line 194, in 
                                    2014-09-13 10:46:39.066694 >     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-09-13 10:46:39.066820 >   File "/data/ftcc/p2pool-neoscrypt/p2pool/data.py", line 553, in get_pool_attempts_per_second
                                    2014-09-13 10:46:39.066963 >     assert dist >= 2
                                    2014-09-13 10:46:39.067076 > exceptions.AssertionError: 
                                    2014-09-13 10:46:41.764990 Outgoing connection to peer 95.85.57.10:11555 established. p2pool version: 1300 '13.4-22-g0c7c431-dirty'
                                    2014-09-13 10:46:44.668822 Skipping from block 93a7ea6404be1de8f51
                                    

                                    phoenixcoin.conf

                                    rpcuser=p2pool
                                    rpcpassword=PoAzL52WzHRJovA6kZkptwVTdX9xMxPkwi
                                    daemon=1
                                    server=1
                                    rpcport=9554
                                    port=9555
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • D
                                      darksaber last edited by

                                      I get the exact same thing. Change persist to false in networks.py and it will work, though it won’t be part of the overall pool.

                                      1 Reply Last reply Reply Quote 0
                                      • Wellenreiter
                                        Wellenreiter Moderators last edited by

                                        I’m orking on the problem.

                                        Setting Persist to False in networks.py , starting the pool and setting it back to True solves the problem in most cases.

                                        After the pool has run for some time, it should be able to start also with persist= True.

                                        Current problems:

                                        • stats page shows wrong time for found blocks. Display: 2 weeks ago, while chain explorer shows soe hours ago

                                        • pool nodes are not fully syncing

                                        • network hash rate shown is too high.

                                        Feathercoin development donation address: 6p8u3wtct7uxRGmvWr2xvPxqRzbpbcd82A
                                        Openpgp key: 0x385C34E77F0D74D7 (at keyserver.ubuntu.com)/fingerprint: C7B4 E9EA 17E1 3D12 07AB 1FDB 385C 34E7 7F0D 74D7

                                        1 Reply Last reply Reply Quote 1
                                        • Wellenreiter
                                          Wellenreiter Moderators last edited by

                                          Update:

                                          I restarted the pools at p2pool.neoscrypt.de (46.4.0.101) and pool20.neoscrypt.de (95.85.57.10) from scratch.

                                          Both pools are synced now.

                                          I connected from a third instance to the p2pool cloud and got connected and synced within seconds.

                                          Please try the following:

                                          • modify networks.py and extend the bootstrap_addrs line :

                                            BOOTSTRAP_ADDRS=‘atlas.phoenixcoin.org prometheus.phoenixcoin.org p2pool.neoscrypt.de pool20.neoscrypt.de’.split(’ '),

                                          • set the Persist entry to ‘True’

                                          • delete/move the data directory from the p2pool directory tree

                                          • start p2pool without the -n parameter you may have used

                                          I also updated Github to reflect the new networks.py. No other changes in todays commit.

                                          Feathercoin development donation address: 6p8u3wtct7uxRGmvWr2xvPxqRzbpbcd82A
                                          Openpgp key: 0x385C34E77F0D74D7 (at keyserver.ubuntu.com)/fingerprint: C7B4 E9EA 17E1 3D12 07AB 1FDB 385C 34E7 7F0D 74D7

                                          1 Reply Last reply Reply Quote 0
                                          • ghostlander
                                            ghostlander Regular Member last edited by

                                            Wellenreiter, is your GitHub code up to date? It produces incorrect targets like before:

                                            [2014-09-14 14:42:38] JSON protocol response:
                                            {
                                               "result": {
                                                  "midstate": "311837dffa033b15a23fc919c0aed94890a7aa2897e06f3f699feb37f177a055",
                                                  "hash1": "00000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000010000",
                                                  "target": "a6c64b37894160e5d022dbf97e6abc74931804560e2db29defa7c64b37894100",
                                                  "submitold": true,
                                                  "identifier": "0",
                                                  "data": "020000008afe19481a16bcc09a5515e4b3eccaac451f445cbab4dcb469abfc6dddd6f644b1cfefa8c856e823443e1af8f3ec08a82425087720777045f08363a2cb1f34c3277f1554ffff0f1e00000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000"
                                               },
                                               "error": null,
                                               "jsonrpc": "2.0",
                                               "id": 0
                                            }
                                            

                                            By the way, midstate and hash1 are deprecated. I’ve removed them already from my P2Pool. data may be reduced to 80 bytes.

                                            1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post