Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck on TESTING bitcoind P2P connection to '127.0.0.1 ... #157

Closed
deeppurple72 opened this issue Jan 26, 2014 · 66 comments
Closed

Stuck on TESTING bitcoind P2P connection to '127.0.0.1 ... #157

deeppurple72 opened this issue Jan 26, 2014 · 66 comments

Comments

@deeppurple72
Copy link

Example:

2014-01-26 00:20:57.161751 p2pool (version 13.4-9-gaafc095-dirty)
2014-01-26 00:20:57.161869
2014-01-26 00:20:57.161961 Testing bitcoind RPC connection to 'http://127.0.0.1:10338/' with username 'x'...
2014-01-26 00:20:57.183947 ...success!
2014-01-26 00:20:57.184117 Current block hash: 956019dcff1ac2305136e203f25193d8bb7c89c9a4a10e8bd7e15a11a6ccf8ee
2014-01-26 00:20:57.184268 Current block height: 26194
2014-01-26 00:20:57.184363
2014-01-26 00:20:57.184478 Testing bitcoind P2P connection to '127.0.0.1:8338'...
2014-01-26 00:21:02.185001 ...taking a while. Common reasons for this include all of bitcoind's connection slots being used...

Some coins seem to get stuck at this point....
The network.py files are setup properly, using the PREFIX="" values
found in source code, the RPCPORT= & PORT= values from the coin's .conf file, firewall is turned off, etc....

using the netstat command, the coin shows it is indeed listening on that p2p port

netstat -anp | grep marscoind

tcp 0 0 0.0.0.0:8338 0.0.0.0:* LISTEN 4256/marscoind
tcp 0 0 192.168.0.6:59026 54.214.255.50:8338 ESTABLISHED 4256/marscoind
tcp 0 0 192.168.0.6:39424 178.132.204.95:8338 ESTABLISHED 4256/marscoind
tcp 0 1 192.168.0.6:39449 54.220.96.102:8338 SYN_SENT 4256/marscoind
tcp6 0 0 :::10338 :::* LISTEN 4256/marscoind
tcp6 0 0 :::8338 :::* LISTEN 4256/marscoind
tcp6 0 0 192.168.0.6:10338 192.168.0.100:48359 ESTABLISHED 4256/marscoind

The coind is listening on port 8338 (ipv4)

Why do some coins work, and others like this not?
It doesn't make any sense.

Several other alt-coins fail as well, such as paycoin, piratecoin, chaincoin, etc

getinfo reports:

{
"version" : 80602,
"protocolversion" : 70020,
"walletversion" : 60000,
"balance" : 11050.00000000,
"blocks" : 26198,
"timeoffset" : 0,
"connections" : 2,
"proxy" : "",
"difficulty" : 0.01658436,
"testnet" : false,
"keypoololdest" : 1390689129,
"keypoolsize" : 101,
"paytxfee" : 0.00000000,
"mininput" : 0.00001000,
"errors" : ""
}

version 80602 protocol 70020

other coins with same version & protocol work however.

The ports are NOT in use by any other processes, and there is no
firewall blocking ports.

even tried different PORT=xxxx settings in the coin.conf & matching it in network.py
doesn't seem to make any difference.

@deeppurple72
Copy link
Author

It would appear this happens only with some coins.....

I managed to figure this out

It is not related to the ports or firewalls, etc...

I got the "incompatible" coins that got stuck on this message working! :-)

@sennevb
Copy link

sennevb commented Feb 10, 2014

can you tell me how you fixed it, have same problem with other altcoin..

@r1979
Copy link

r1979 commented Feb 20, 2014

@deeppurple72 Could you please share the solution? I am having the same issue on some Altcoins. Thanks!

@CartmanSPC
Copy link

In p2pool/bitcoin/p2p.py try changing from
version=70002,
to
version=80005,

@makishart
Copy link

I stuck on the same issue..!
version=80005
make no difference to me..

@deeppurple72
Copy link
Author

It took about a week of banging my head against the wall
to figure this out...... and no, changing version=80005 or any other number
wont help btw!

if it is a fork of PPCOIN --- then that coin will NEVER work until p2pool supports it.

if its mixed-algo coins, i doubt they will work until p2pool supports it....

Some coins will not work, period.

*** Some coins will. Some coins that "don't" easily work, can "work"

I may in the future disclose detailed info on ***some coins that "don't" easily work, can "work"

but i just got a website setup and running alot of new alt-coins not on any other p2pools
( or at least to my knowledge ) and would like to run the pools for a while and
take advantage of being the only one, until I can turn a small profit...
the site is maybe a month old... If I share "secrets" then alot of others will start
making pools with the same coins on my site, which would not be in my best interest
in this particular point of time. I am not rich, nor wealthy, and have alot of financial struggles, always a day late and a dollar short... I would like to try and make a little something off
the pools by attracting miners to new alt-coins NOT on other p2pool sites.

Unless you are crypto-rich, and are willing to send me a generous amount of BTC or LTC, then
I will explain EVERYTHING in GREAT DETAILS,
here on this site -- but i will have to start a "NEW ISSUE" to post everything because
their are a great number of things --- not just a quick line edit here or there,
keep in mind.

But if you are poor like myself, then I'm afraid you will have to wait until I make some coins, or spend alot of time and frustration trying to figure it out on your own.

I dont intend to be a jerk , and in time will share everything i know, but like i said,
i want to take advantage of what I know and make some coins first...
which should be perfectly understandable!

Or send me a "BOUNTY" of BTC / LTC if you want me to "sell out" right now.

and yes, I do have alot of new coins on my website being mined if there are
any doubts to my claims of getting new alt-coins working with p2pool that
get stuck on testing p2p port.... + other misc "issues" as well.

@r1979
Copy link

r1979 commented Feb 21, 2014

What a disappointing answer. Also, do you realize you damage the community as a whole with your attitude? Nevermind, enjoy your 0 nodes in 0 nodes out P2Pools (as they will hardly ever be in a P2Pool peer network unless you release some code).
I don't know the GPL license by heart, but I also think (even though not 100%) you might be in violation of it. And even if you are not in violation of it, still you are taking software written by others, modifying it, and taking away the chance from the community to peer review the code.
Thanks for answering. I guess @CartmanSPC , @makishart , myself and the rest will have to find the solution on our own. And, no, I am not rich, but every single altcoin I can make work I'll share the source with the community. Thank you again for taking the time to answer.

@makishart
Copy link

He is violating for sure... He is taking a free code which he has every right to use and modify for his benefit but I guess trying to sell it is way too far.. I wish you the best with your choise.. I will try to find what I'm looking on my own or with community help and when I solve it I'll post it here.

@r1979
Copy link

r1979 commented Feb 21, 2014

@makishart I hope you don't mind my crossposting you this message I just wrote on @CartmanSPC thread on Bitcointalk. https://bitcointalk.org/index.php?topic=457574.msg5272900#msg5272900
Maybe you are interested too.

@deeppurple72
Copy link
Author

Like I said, I will share with the community soon.
2nd of all, your code was not rewritten, and not being "sold"
3rd because the new coins have low diff, 0 nodes/ 0 peers is actually an advantage
4th I would like to run the new pools for several months and then share with the
community the knowledge.... I am not attempting to "sell" some custom
modification of p2pool software, so let me make that perfectly clear!

There is a forum on bitcointalk.org about "HOW TO MAKE ALT-COINS WORK WITH P2POOL"
that has alot of good information. I just happened to discover on my own lots of additional information. When I said "bounty", it referred to information, and NOT p2pool software.

Also, you will notice that I did NOT post any wallet addresses, as I did not seriously
expect anyone to actually do that.

Let me run some pools for a few months so I can make a little something first,
then I will glady clue you people in....

Also, you guys were very hard on me when I requested some kind of way to penalize
those cloud-miners, pools running into pools, "excessive hashrates"
calling my request "ludicrous" and such....

and then you wonder why I suddenly don't feel so friendly?

Hmmmm........

@int03h
Copy link

int03h commented Feb 21, 2014

So ... let me see if I have this straight.. you are going to pre-mine alts using p2pool ? Why ? Most Alts just use the default client for whatever they are mining - it seems retarded to have a private PRIVATE (wink wink) P2POOL and then unleash it onto us simpletons ?

@r1979
Copy link

r1979 commented Feb 21, 2014

@deeppurple72 I'm not familiar with the cloud-miners story, and I'm sorry people was hard on you. That said, selling info is indeed something else than selling GPL'd software without releasing the code. Thanks for making that poin clear. What's your pool URL? Maybe can I at least mine there some intersting new cryptos?

@deeppurple72
Copy link
Author

Actually, most of the new coins have hit the exchanges already

I dont create coins. I just made pools availible for some of the newer coins,
such as MarsCoin , DopeCoin, Benjamins, Stories, and many others...

There is no pre-mining of alt-coins...

The reason I started a "private" peerless nodeless pools was because many of us
smaller miners got sick of sites like p2pool.org where too many big miners and even
some crazy hashrates that appear to be some kind of pools, taking over pools
and not making half as much in 24hrs....
those big miners might make pools find blocks faster, but they are getting it all and like
I said, in 24hrs I noticed only making 1/2 or less the coins I was BEFORE they hit pools.

This was the motivation behind an alternative "private" p2pools site...
... not happy with p2pool.org payouts after too many big miners take over pools
and reduced earnings signifigantly. And I am NOT the only one with that complaint
either.

And when I do POST the INFORMATION it will include both NETWORK.PY files
so that the community may use its settings and/or connect peers/nodes to pools.

I thought it would be something FRESH to create an ALTERNATIVE p2pools site
not connected to p2pool.org, and also that it would be very cool to offer alot of
brand new coins they dont. If I shared code now, they would use it and slaughter
me before I can get off the ground! this is why I want to run pools for a few months
so I can make a few coins, and also give the new site a little bit of time to catch on
first. which should be understandable. I don't really have an issue sharing the info,
but rather the issue for me is the timing of sharing it, if that makes any sense.

Alot of the newer cryptos hit cryptorush site, but I would hold on to
my newer coins --- like cryptsy, people keep dumping coins for dust
because they want btc now! instead of waiting 24hrs and getting ALOT more.

and yeah, those guys were really hard on me re: the EXCESSIVE HASHRATES issue
they refused, and wouldnt even give me a hint , and defended those "pools"
"cloud-miners" or whatever the F-ck you want to call them....

They have up to 40Mhs Scrypt Hashrates under 1 miner address and
in my words, "rape and rob pools" ...

anyways, the site is a BETA and its WIP...
but its definitely "alternative" lol!
I plan on removing pools such as doge, moon, etc soon
basically sticking with the recently launched and/or
lower difficulty coins -- p2pool.org can have the doge, ltc, moon, etc
those difficult coins do need ALOT of miners and combined hashrates
using nodes and peers... which I recognize that.
keep in mind this site is maybe a month old:
you can checkout some of the newer cryptos here:
p2pool.neocities.org

and just to guess, it may be around late spring or summer 2014 that I will post
all that good info and contribute to the community. Just allow me a little time
to let my little alternative site to blossom a little bit first :-)
I never said that I would NOT share, now did I? LoL....

Maybe if their was an "excessive Hashrate Penalty...." for 40Mhs Scrypt "pooled" miners
I would have been willing to share information quicker... however, I did NOT appreciate
the unkindness and comments that I received by making that request.... which was DENIED.
But, I am expected to share information right away for the community's benefit?
Hmmmmmm... I see.... so you don't know how to make your own software work with
newer alt-coins? Wow! Enough said.

@r1979
Copy link

r1979 commented Feb 21, 2014

Ever heard about the concept of variance? Those immensely powerful miners can hash with you, and you still get frequent tiny rewards for many blocks one after the other, or they can hash against you, and you get into a race where you and the small miners in your pool are at high risk of hashing an orphaned block.

@deeppurple72
Copy link
Author

yes. But even p2pool.org gets orphaned blocks too.
thats just a fact of mining... more than 1 person finds the same block
sometimes - only 1 can claim it, the others turn orphan....

not too many orphans on my pools, but it does happen from time to time...
usually it is the really low diff. coins that seem to sometimes get some orphans.

@r1979
Copy link

r1979 commented Feb 21, 2014

I think you are talking about orphaned shares, I am talking about orphaned blocks.

@deeppurple72
Copy link
Author

yes, im speaking of orphaned blocks too.

@deeppurple72
Copy link
Author

using the listtransactions "" option
if you see category: Generated or category: Immature
your p2pool ( or solo mined ) blocks are good...

sometime you will see a category: Orphan

thats the orphaned blocks

@r1979
Copy link

r1979 commented Feb 21, 2014

Let me rephrase it:
Miner A has a hashpower of 1Gh/s against the power of the whole pool A which is 1Th/s; every time a block is found, assuming a 0% fee, miner A gets 1/1000 of the reward.
Miner B has a hashpower of 1Gh/s against the power of the whole pool B which is 10Gh/s; every time a block is found assuming a 0% fee, miner A gets 1/10 of the reward.
Now, while miner A earns 100 times less per block found compared to miner B, when you look at the whole picture, miner A will mine at a very low variance because the pool A will also find blocks 100 times faster (give or take some luck) compared to pool B which will have a very high variance instead.That's all I meant to say in relation to your point about the advantage of keeping the faster miners on other P2Pools than yours.

@deeppurple72
Copy link
Author

OK....
If most miners have close to same speeds, its ok.

Lets say one of the "easy" low diff. pools has a measily 3 to 5 Mhs scrypt pool hashrate
then a 40Mhs miner appears.... thats when the pool gets "robbed" lol.

when a "pooled" miner has over 90% of the pools hashrate, it cuts everyone else throats!

the 40Mhs "miner" makes your GPU look like a CPU in relationship.

@deeppurple72
Copy link
Author

from a pool OP's POV, the BIG miners ( or Pooled-miners using 1 address ) find more blocks
and generate alot more pool fees collected for each block...

but they usually target the "easy" pools ( some of which they should just outright solo-mine directly) ... It upsets most of the patron miners

I care more about patrons, than the pool fees from that big hasher, who just shows up to
drain a pool, then disappears and is not a loyal patron miner.

@r1979
Copy link

r1979 commented Feb 21, 2014

Well, then you should simply implement payment rules which penalize the strong miners that do pool hopping, so that they are forced to stay on the pool long enough for the smaller ones to gaing benefit of the low variance given by the strong miners. But I won't say more, or I might risk to lose my advantage. Feel free to ask me more in several months ;)

@deeppurple72
Copy link
Author

I begged for an option like that!!!!!

here is a link to that issue: #170

it was deemed a "ludicrous" request and that penalties would hurt p2pool and
miners might abandon using p2pool, blah blah blah

@CartmanSPC
Copy link

....im staying out of this conversion :)

....but wanted to point out that p2pool.org is also closed for most of the coins it has listed. That is against the spirit of P2Pool as there are no "peers" to speak of. I suppose that is fine but unfortunately misleading in the case of p2pool.org due to the domain name.

What coin was giving the error? Will take a look when I have time.

@deeppurple72
Copy link
Author

Well, perhaps if some other LITTLE guys similar to myself would like to
connect as peers to the newer alt-coins and have coins that p2pool.org doesnt have,
and keep the "secrets" away from p2pool.org and their sites, then I would agree
to sharing info and settings with others, in the spirit of p2pool....

my issues are p2pool.org and those cloud-miners

@r1979
Copy link

r1979 commented Feb 21, 2014

Because in a P2Pool the payments are delegated to the blockchain itself, I am not sure that there is a way to "penalize" faster miners. There is however a combination of several strategies in terms of parameters that I can think of, which might go to a great length in discouraging the big miners from either hopping or joining the pool. I am more than happy in helping you solving your issues in a spirit of mutual collaboration when you can help me in turn.
I have the same issue you described in the first post:

2014-01-26 00:20:57.184478 Testing bitcoind P2P connection to '127.0.0.1:8338'...
2014-01-26 00:21:02.185001 ...taking a while. Common reasons for this include all of bitcoind's connection slots being used...

The --debug flag gives me these additional infos:
2014-02-21 05:12:43.794540 Testing bitcoind P2P connection to '127.0.0.1:9560'...
2014-02-21 05:12:43.945516 > Bitcoin connection lost. Reason: Connection was closed cleanly.
[... it repeats many times...]
2014-02-21 05:12:48.109581 > Bitcoin connection lost. Reason: Connection was closed cleanly.
2014-02-21 05:12:48.794980 ...taking a while. Common reasons for this include all of bitcoind's connection slots being used...
2014-02-21 05:12:49.305532 > Bitcoin connection lost. Reason: Connection was closed cleanly.
2014-02-21 05:12:50.271052 > Bitcoin connection lost. Reason: Connection was closed cleanly.
[... it repeats and repeats ...]

I did all the tests you did and it's exactly the same scenario. I had the issue with: Catcoin, Sexcoin, Nyancoin, and Florin so far.

@CartmanSPC
Copy link

@deeppurple72 your not the only one to have issue with p2pool.org! I wouldn't care that they run mostly closed p2pool nodes but doing so with that domain name is misleading.

You should have a chain length of 24 hours so your loyal miners get the benefit of big miners when they come on board.

@r1979
Copy link

r1979 commented Feb 21, 2014

@CartmanSPC +1

@CartmanSPC
Copy link

@r1979 nyancoin has the issue? I might make the time to look into it just because of the name :)

@deeppurple72
Copy link
Author

r1979, help me with the excessive penalty rules,
and in return I will share with you how to make nyan, and several
other alt-coins work that either get stuck on testing p2p port, or
get past that, only to give other errors.

@r1979
Copy link

r1979 commented Feb 21, 2014

@deeppurple72 now that we shared our thoughts, information, intuitions, and ideas with you, could you please also help us and share with us how you solved the testing p2p port issue?

@deeppurple72
Copy link
Author

I am guessing that the work.py needs to be patched
to
(1) check symbol of coin
(2) if coin ="xxx" or "yyy" or "zzz" ...
then check hashrate of miner
(3) if hashrate >16Mhs then "skyrocket" share diff. to that miner

is this possible? I know very little .py

@deeppurple72
Copy link
Author

can you assist with the .py code as described above?

@r1979
Copy link

r1979 commented Feb 21, 2014

Next to @CartmanSPC suggestion of making sure to have the period set to 24 hours, here are my other suggestions:

  • reduce share time, I have seen how a share time of 10 seconds results in a disaster with LEAF when I mined on the pool with 4Mh only. On the other hand, the cpuminer was not affected by the problem.
  • set a high fee on the pool which gets then redistributed to the miners of the pool with the "patron sendmany" feature of p2pool. Bigger miners will lose a % which redistributed accross all miner will make the profit more equal for the less strong miner. Also, this should work as a psychological deterrant vs. fast miners.
  • about the code: I'm more than a beginner in python or any other language. I am a very skilled user but I wouldn't use myself a code written by me in a production environment. Maybe @CartmanSPC?

@r1979
Copy link

r1979 commented Feb 21, 2014

Also, before creating such a hard fork of the P2Pool sowtware I'd try as much as possible to tweak the parameters without messing up with the code. If that's the case of changing the code, we should first understand how it works in detail and then solve the issue with something better than a "if...elseif...else" loop.

@r1979
Copy link

r1979 commented Feb 21, 2014

Of course I can help you in tweaking the settings.

@CartmanSPC
Copy link

@deeppurple72 run separate p2pool versions in different folders. That way you can try it out on only the coins you want.

@r1979 is right about the share period as even with the patch p2pool will have a minimum share diff partly based on that value. You may also want to look at increasing the spread.

Consider forking from the main git so we can review your values and give you suggestions.

Also, realize that p2pool was created to be used by individual miners not as a "public" pool. A lot of these changes are being made to accommodate it's use as such. 🎱 I would suggest MPOS if that is your intention. (Insider info: the MPOS team is considering a version that uses p2pool as it's backend)

@CartmanSPC
Copy link

@deeppurple72 also, in order to see per miner the share diff and expected time to share apply this patch: donSchoe/p2pool-n@776fe66
using this patched version of johndoe75's front end:
donSchoe/p2pool-n@a3fb9b6
ex:
http://vtc.coinpools.de:9171/static/

Good luck!

@CartmanSPC
Copy link

There is already a "proxy" to p2pool being developed similar to what r1979 mentioned:
https://github.com/dogestreet/proxypool

@sennevb
Copy link

sennevb commented Feb 21, 2014

I am sorry to hear that there is a solution, but they will not share it at the moment.

i've been searching on same issue too:
2014-02-21 05:12:49.305532 > Bitcoin connection lost. Reason: Connection was closed cleanly.
2014-02-21 05:12:50.271052 > Bitcoin connection lost. Reason: Connection was closed cleanly.
Looked in the wallets debug.log, even asked forrestv, and he doesnt have a clue either..

@roy7
Copy link
Contributor

roy7 commented Feb 21, 2014

Another example using the patches Cartman mentioned:

http://vtc-us-east.royalminingco.com:9171/static/

(Note that the whole VTC network uses my patch to assign user difficulty based the user's speed and not the local node's combined speed.)

@deeppurple72
Copy link
Author

p2pool/network.py

nyancoin=math.Object(
    PARENT=networks.nets['nyancoin'],
    SHARE_PERIOD=10, # seconds
    CHAIN_LENGTH=12*60*60//10, # shares
    REAL_CHAIN_LENGTH=12*60*60//10, # shares
    TARGET_LOOKBEHIND=20, # shares
    SPREAD=5, # blocks
    IDENTIFIER='fcfcd9d9b7b7dded13'.decode('hex'),
    PREFIX='fcd9b7dd'.decode('hex'),
    P2P_PORT=18424,
    MIN_TARGET=0,
    MAX_TARGET=2**256//2**20 - 1,
    PERSIST=False,
    WORKER_PORT=20424,
    BOOTSTRAP_ADDRS=''.split(' '),
    ANNOUNCE_CHANNEL='#p2pool-alt',
    VERSION_CHECK=lambda v: True,
),

bitcoin/network.py:

nyancoin=math.Object(
    P2P_PREFIX='fcd9b7dd'.decode('hex'),
    P2P_PORT=33701,
    ADDRESS_VERSION=45, #pubkey_address
    RPC_PORT=5585,
    RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
        'nyancoin address' in (yield bitcoind.rpc_help()) and
        not (yield bitcoind.rpc_getinfo())['testnet']
    )),
    SUBSIDY_FUNC=lambda  height: 337*10000000 >> (height + 1)//370000,
    POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
    BLOCK_PERIOD=60, # s
    SYMBOL='NYAN',
    CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'FoxCoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/FoxCoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.nyancoin'), 'nyancoin.conf'),
    BLOCK_EXPLORER_URL_PREFIX='http://altexplorer.net/block/', #dummy
    ADDRESS_EXPLORER_URL_PREFIX='http://altexplorer.net/address/',
    TX_EXPLORER_URL_PREFIX='http://altexplorer.net/tx/',
    SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
    DUMB_SCRYPT_DIFF=2**16,
    DUST_THRESHOLD=0.01e8,
),    

if the P2P_PREFIX in the network.py files DO NOT match the coin's message prefix,
this will cause it to get stuck on the TESTING P2P PORT..........

you can find the correct P2P_PREFIX values by looking at the coin's source code
in MAIN.CPP --- search for "pchmessage" .....

here is an example of nyan's main.cpp:

// The message start string is designed to be unlikely to occur in normal data.
// The characters are rarely used upper ascii, not valid as UTF-8, and produce
// a large 4-byte int at any alignment.
unsigned char pchMessageStart[4] = { 0xfc, 0xd9, 0xb7, 0xdd };

take the 0xfc, 0xd9, 0xb7, 0xdd , remove the 0x and turn it into
fcd9b7dd --- this is the correct P2P_PREFIX -- both NETWORK.PY files
must use this prefix value ( each coin may use different prefixes btw )

also, RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
'nyancoin address' in (yield bitcoind.rpc_help()) and
not (yield bitcoind.rpc_getinfo())['testnet']
)),

sometime there may be a space in the RPC_CHECK ( "nyancoin address")
you can look at rpcdump.cpp to find this: "dumpprivkey"

Value dumpprivkey(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 1)
throw runtime_error(
"dumpprivkey \n"
"Reveals the private key corresponding to .");

of course, this info was posted in the bitcointalk.org forum about how to get alt-coins to work with p2pool.....

try this and see it it works for you.... I believe p2pool.org also has nyan p2pool on its site.

nyan might not work for you if you "copied and pasted" another coin settings in the p2pool network.py files, but didnt change the P2P_PREFIX

again, if the P2P_PREFIX does not match the MAIN.CPP pchmessage "prefix",
p2pool will always get stuck on testing p2p port .......

@deeppurple72
Copy link
Author

i use different ports other than the coin's defaults in my nyancoin.conf
so you may need to change the p2p_port & rpc_ports in the bitcoin network.py
to agree with your nyancoin.conf file

@deeppurple72
Copy link
Author

the copy and paste for the rpcdump.cpp had greater than & less than symbols so it didnt show up right in the post above:

dumpprivkey "nyancoin address"

it what it should have show btw

let me know, R1979, if this helped you to get NYAN working

@deeppurple72
Copy link
Author

quote
"

I am sorry to hear that there is a solution, but they will not share it at the moment.

i've been searching on same issue too:
2014-02-21 05:12:49.305532 > Bitcoin connection lost. Reason: Connection was closed cleanly.
2014-02-21 05:12:50.271052 > Bitcoin connection lost. Reason: Connection was closed cleanly.
Looked in the wallets debug.log, even asked forrestv, and he doesnt have a clue either.."

I think THIS may be A DIFFERENT ISSUE ...

IT IS NOT the "STUCK on TESTING P2P PORT....." issue

so don't assume that I have a solution for this! Apples & Oranges.
and if so, IDK -- so don't accuse people of having solutions - understand? gee

I have shared info about nyan - maybe you should take a look at it and
compare to the coin you are having issues with.

Also, not all coins will work with p2pool, so maybe you are trying to get a coin
to work, that just will not reguardless of what you do.

for example, I cannot get paycoin to work, or chaincoin, and many others
despite days of desperate attempts! So bear that in mind

@deeppurple72
Copy link
Author

ive applied the SHARE DIFF by HASHRATES patch....

testing it now... Thanks

@r1979
Copy link

r1979 commented Feb 21, 2014

@deeppurple72 Thanks for the info. I'll have a careful look at it tomorrow and let you know if it worked.

@CartmanSPC
Copy link

@deeppurple72 I had no problems adding nyancoin using the guide on BTCTalk (did not look at what you posted above). Have updated my github with it.

FYI, your subsidy is wrong (they changed it..should be 500000). RPC_PORT should be 33700. Your values in conf_file are wrong other than darwin.

Prefix does not have to be the same as p2p_prefix...any random 19 digit number converted to hex will work.

Not sure why you guys had any problems :)

@deeppurple72
Copy link
Author

no, the 8 digit p2p_prefix MUST match the coin's src code....

example: P2P_PREFIX='fcd9b7dd'.decode('hex'),

this is the crucial value needed for p2p messaging......
if that value doesnt match coin's src code, you will get the
StUCK ON TESTING P2P PORT................. issue !

the p2pool prefix doesnt matter.... that was NOT the prefix i was talking about!

also, i use custom ports in some coin's .conf....
as long as they match network.py, the pools work....
running multiple pools, sometimes coins try to use the
same rpc or p2ports in their coin.conf files....
so they must be changed for multipools to work, or
you get error, port already bound

i use a "template" to create network.py files
i probably made a human error on the subsidies, which is
also found in main.cpp src code

i use linux, so i didnt change the windows part.
what i posted was from my solo pool, and was to be
used as a reference only. I have not forked p2pool
like others have.

this ISSUE was for STUCK ON TESTING bitcoind p2p port .....

the answer was P2P_PREFIX='fcd9b7dd'.decode('hex'), must = src code !!!

@foollatest
Copy link

IDENTIFIER=''
PREFIX=''
How to fill in these parameters

@deeppurple72
Copy link
Author

IDENTIFIER CAN BE ANYTHING, BUT SHOULD MATCH OTHER P2POOLS IF YOU ARE CONNECTING TO NODES/PEERS....

PREFIX= the same P2P_PREFIX used in Bitcoin/network.py

@deeppurple72
Copy link
Author

i tried the SET SHARE DIFF. TARGET BY LOCAL HASHRATES commit ,
but it did not work well....

it started new miners with TOO high diffs:
low hashers couldnt find shares, and the DIFF would not adjust.
for example, in a pool actually connected to 6 other peers,
the DIFF started out over 2.0, and small guys with 100-200Khs
could not "overcome" the DIFF ( ie could not find shares )
and their DIFF never dropped / adjusted.

the big hashers submitted shares and their target diffs became low...

big hashers actually earned MORE and small hashers were "penalized"
and ended up earning less or not at all.

@roy7
Copy link
Contributor

roy7 commented Mar 4, 2014

The only time a user will have a higher diff instead of a lower one when using my patch is if they are so slow they are going to generate transactions below the DUSTTHRESHOLD setting. Then they need bigger share targets so the shares they do get will pay them more than the dust setting. It's a feature, not a bug. The smaller miners aren't being penalized, over time as they eventually find shares those shares will have values high enough so their average earnings will be as expected.

Miners are always welcome to override the dust threshold by mining with ADDR/DIFF. On a scrypt coin they could use ADDR/.000016 to guarantee they always get the lowest target they can (the global share minimum difficulty on the network) regardless of how small those payments are and regardless if the tx to spend those inputs is more than the dust they collect.

@roy7
Copy link
Contributor

roy7 commented Mar 4, 2014

So in truth, by giving those miners a lower target in the non-patched setting (since p2pool doesn't realize their payments are going to be under the dust threshold) the tiny miners are being penalized by getting dusty payments which will incur large tx fees to spend.

@ghost
Copy link

ghost commented Nov 24, 2015

so this problem is still unsolved.. i can not start any altcoin at the moment..
P2P_PREFIX is correct, firewall is correct..
with the "--debug" command we see further information:

python run_p2pool.py --net luckycoin --debug user pass
2015-11-24 22:16:25.132581 p2pool (version 14.0-23-g6514fd8-dirty)
2015-11-24 22:16:25.132636
2015-11-24 22:16:25.132672 Testing bitcoind RPC connection to 'http://127.0.0.1:9918/' with username 'user'...
2015-11-24 22:16:25.290042     ...success!
2015-11-24 22:16:25.290085     Current block hash: 8c6e7f158307cab5baf0259f65ff58a54fb905429d49dc34743ac20d515e4d8
2015-11-24 22:16:25.290102     Current block height: 820819
2015-11-24 22:16:25.290112
2015-11-24 22:16:25.290245 Testing bitcoind P2P connection to '127.0.0.1:9917'...
2015-11-24 22:16:25.418147 > Bitcoin connection lost. Reason: Connection was closed cleanly.
2015-11-24 22:16:26.641221 > Bitcoin connection lost. Reason: Connection was closed cleanly.
2015-11-24 22:16:27.821867 > Bitcoin connection lost. Reason: Connection was closed cleanly.
2015-11-24 22:16:28.864541 > Bitcoin connection lost. Reason: Connection was closed cleanly.
2015-11-24 22:16:30.050578 > Bitcoin connection lost. Reason: Connection was closed cleanly.
2015-11-24 22:16:30.290430     ...taking a while. Common reasons for this include all of bitcoind's connection slots being used...
2015-11-24 22:16:31.219153 > Bitcoin connection lost. Reason: Connection was closed cleanly.

in the daemon debug.log we see

accepted connection 127.0.0.1:49487
partner 127.0.0.1:49487 using wrong subver /P2Pool:14.0-23-g6514fd8-dirty/;  disconnecting

so i changed the line in p2pool/bitcoin/p2p.py to

sub_version_num='/LKY:1.0.1/',

and now it runs. you can find the correct "subver"-string for each altcoin with the "getpeerinfo" command. so you probably have to create a new copy of p2pool for each altcoin and change p2p.py accordingly.

@forrestv
Copy link
Member

Or you can just make p2p.py read the subver string from the network definition file (defaulting to whatever it is right now if it's not present)... the entire point of having the network definition files is so you don't have to fork p2pool for each altcoin. If you need some additional flexibility, add it in a generic way.

@ghost
Copy link

ghost commented Nov 25, 2015

right.. thank you!

do you have any further ideas to the altcoin-problem itself?
LKY now working, CSC still not:
no error message here from daemon, no "connection was clsoed"

should i try different values also for version, services, time, nonce, start_height.. or what could be the problem?

python run_p2pool.py --net casinocoin user pass
2015-11-25 06:43:48.757967 p2pool (version 14.0-25-g482f410-dirty)
2015-11-25 06:43:48.758018
2015-11-25 06:43:48.758050 Testing bitcoind RPC connection to 'http://127.0.0.1:47971/' with username 'user'...
2015-11-25 06:43:48.791146     ...success!
2015-11-25 06:43:48.791207     Current block hash: 18ad414d20e880b84674b8e5d1ca3be2a07445d4a9499d21e13232b5574b6a68
2015-11-25 06:43:48.791228     Current block height: 1163682
2015-11-25 06:43:48.791242
2015-11-25 06:43:48.791391 Testing bitcoind P2P connection to '127.0.0.1:47951'...
2015-11-25 06:43:53.791533     ...taking a while. Common reasons for this include all of bitcoind's connection slots being used...

@forrestv
Copy link
Member

Hmm.. P2Pool is either not able to connect to that port or connecting but
not receiving a verack message. You'd have to look at the coin daemon log
files and source code to figure it out. It's most likely related to the
P2P_PREFIX setting.

On Wed, Nov 25, 2015 at 12:46 AM, buechling notifications@github.com
wrote:

right.. thank you!

do you have any further ideas to the altcoin-problem itself?
LKY now working, CSC still not:
no error message here from daemon, no "connection was clsoed"

should i try different values also for version, services, time, nonce,
start_height.. or what could be the problem?

python run_p2pool.py --net casinocoin user pass
2015-11-25 06:43:48.757967 p2pool (version 14.0-25-g482f410-dirty)
2015-11-25 06:43:48.758018
2015-11-25 06:43:48.758050 Testing bitcoind RPC connection to 'http://127.0.0.1:47971/' with username 'user'...
2015-11-25 06:43:48.791146 ...success!
2015-11-25 06:43:48.791207 Current block hash: 18ad414d20e880b84674b8e5d1ca3be2a07445d4a9499d21e13232b5574b6a68
2015-11-25 06:43:48.791228 Current block height: 1163682
2015-11-25 06:43:48.791242
2015-11-25 06:43:48.791391 Testing bitcoind P2P connection to '127.0.0.1:47951'...
2015-11-25 06:43:53.791533 ...taking a while. Common reasons for this include all of bitcoind's connection slots being used...


Reply to this email directly or view it on GitHub
#157 (comment).

@CartmanSPC
Copy link

buechling, take a look at my repo for CSC. You can also see it running at xpool.net.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants