Bitcoin Forum
April 25, 2024, 05:43:58 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 [5] 6 7 8 9 10 »  All
  Print  
Author Topic: Finding p2pool networks.py values for new altcoins  (Read 38023 times)
guugll
Full Member
***
Offline Offline

Activity: 190
Merit: 100



View Profile WWW
November 03, 2013, 07:03:40 AM
 #81

what version and source of p2pool you use?

1714023838
Hero Member
*
Offline Offline

Posts: 1714023838

View Profile Personal Message (Offline)

Ignore
1714023838
Reply with quote  #2

1714023838
Report to moderator
1714023838
Hero Member
*
Offline Offline

Posts: 1714023838

View Profile Personal Message (Offline)

Ignore
1714023838
Reply with quote  #2

1714023838
Report to moderator
1714023838
Hero Member
*
Offline Offline

Posts: 1714023838

View Profile Personal Message (Offline)

Ignore
1714023838
Reply with quote  #2

1714023838
Report to moderator
Each block is stacked on top of the previous one. Adding another block to the top makes all lower blocks more difficult to remove: there is more "weight" above each block. A transaction in a block 6 blocks deep (6 confirmations) will be very difficult to remove.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714023838
Hero Member
*
Offline Offline

Posts: 1714023838

View Profile Personal Message (Offline)

Ignore
1714023838
Reply with quote  #2

1714023838
Report to moderator
1714023838
Hero Member
*
Offline Offline

Posts: 1714023838

View Profile Personal Message (Offline)

Ignore
1714023838
Reply with quote  #2

1714023838
Report to moderator
1714023838
Hero Member
*
Offline Offline

Posts: 1714023838

View Profile Personal Message (Offline)

Ignore
1714023838
Reply with quote  #2

1714023838
Report to moderator
triggermage
Full Member
***
Offline Offline

Activity: 160
Merit: 100


View Profile
November 03, 2013, 04:53:06 PM
 #82

what version and source of p2pool you use?

Sorry forgot to mention its https://github.com/narken/p2pool-altcoins

Latest available Wink

Thanks!!
guugll
Full Member
***
Offline Offline

Activity: 190
Merit: 100



View Profile WWW
November 03, 2013, 06:07:56 PM
 #83

you probably need another source for PoW and PoS coin.
better look for NVC, BTB p2pool source

triggermage
Full Member
***
Offline Offline

Activity: 160
Merit: 100


View Profile
November 03, 2013, 08:56:46 PM
 #84

you probably need another source for PoW and PoS coin.
better look for NVC, BTB p2pool source

Hey man I think you got confused with netcoin.io, that's not it. The netcoin.pw I am talking about is this one https://cryptocointalk.com/topic/1132-netcoin-net-launched-today/ its scrypt based on litecoin Wink

It is confusing I know.

Thanks!
guugll
Full Member
***
Offline Offline

Activity: 190
Merit: 100



View Profile WWW
November 04, 2013, 08:59:16 PM
 #85

ok 2 times Netcoin - sorry i was not aware.
then should work with that source but how you wanna payout the superblocks?

- 1024 coins per block, and a random super block each hour that has 8X the normal payout (8096 coins)

triggermage
Full Member
***
Offline Offline

Activity: 160
Merit: 100


View Profile
November 05, 2013, 12:26:16 PM
 #86

ok 2 times Netcoin - sorry i was not aware.
then should work with that source but how you wanna payout the superblocks?

- 1024 coins per block, and a random super block each hour that has 8X the normal payout (8096 coins)

Do you think this superblock is whats breaking the web interface and trowing the errors? Honestly I have no idea how to deal with it, I thought the pool would just split whatever the miners find and keep going. I personally don't like this superblock thing and if it was up to me it would be gone by now...thanks for helping man!!
guugll
Full Member
***
Offline Offline

Activity: 190
Merit: 100



View Profile WWW
November 06, 2013, 06:11:58 PM
 #87

i tryed to make just PoS+PoW p2pool modification from NVC/BTB source and i was not successfull - but i did not tryed yet the last advice from minerapia. (my test env. is down now and i do not have much time)
the p2pool code modifications for PoS are written in this thread but in case of any special stuff in coin you need to modify the p2pool code.
for NVC the dev. of the coin modified the coin to be able to run with p2pool and BTB is very similar coin to NVC

so you need basically very good python skills and good contact with the coin dev. in order to be able to understand the special features and python skill to make it work with p2pool.
and in case of "random" superblocks i do not see any way how to work with the 8times higher value for that coin - you need to ask the dev how you would find out that you are mining or have mined the superblock and in that case use different payout method for the miners and then again go on standard.

well maybe try first some normal PoS coin p2pool modification and then build on that knowledge - that will be my way after i will have more time... but still i will test the last advice from minerapia because i spent a lot of time on that and i am curious if it will work.

good luck man - i like the p2pool idea because i feel all that coins who are having p2pool are the most successfull coins. But only one dev. made coin and p2pool source modification at the beginning - no one else is doing it beucause they waste time on special features of the coin and then there is no power to make the p2pool working with it.

triggermage
Full Member
***
Offline Offline

Activity: 160
Merit: 100


View Profile
November 06, 2013, 08:46:30 PM
 #88

Thanks man I wish you good lucky too!

I agree with you, non standard code in the coin code only makes things harder, I will keep trying till I get the pool up!! Thanks again!
K1773R
Legendary
*
Offline Offline

Activity: 1792
Merit: 1008


/dev/null


View Profile
November 06, 2013, 08:49:25 PM
 #89

i tryed to make just PoS+PoW p2pool modification from NVC/BTB source and i was not successfull - but i did not tryed yet the last advice from minerapia. (my test env. is down now and i do not have much time)
the p2pool code modifications for PoS are written in this thread but in case of any special stuff in coin you need to modify the p2pool code.
for NVC the dev. of the coin modified the coin to be able to run with p2pool and BTB is very similar coin to NVC

so you need basically very good python skills and good contact with the coin dev. in order to be able to understand the special features and python skill to make it work with p2pool.
and in case of "random" superblocks i do not see any way how to work with the 8times higher value for that coin - you need to ask the dev how you would find out that you are mining or have mined the superblock and in that case use different payout method for the miners and then again go on standard.

well maybe try first some normal PoS coin p2pool modification and then build on that knowledge - that will be my way after i will have more time... but still i will test the last advice from minerapia because i spent a lot of time on that and i am curious if it will work.

good luck man - i like the p2pool idea because i feel all that coins who are having p2pool are the most successfull coins. But only one dev. made coin and p2pool source modification at the beginning - no one else is doing it beucause they waste time on special features of the coin and then there is no power to make the p2pool working with it.

if "randomly" superblocks would be possible (which retard introduced this? sheesh...), you could abuse this system to only create superblocks lol

[GPG Public Key]
BTC/DVC/TRC/FRC: 1K1773RbXRZVRQSSXe9N6N2MUFERvrdu6y ANC/XPM AK1773RTmRKtvbKBCrUu95UQg5iegrqyeA NMC: NK1773Rzv8b4ugmCgX789PbjewA9fL9Dy1 LTC: LKi773RBuPepQH8E6Zb1ponoCvgbU7hHmd EMC: EK1773RxUes1HX1YAGMZ1xVYBBRUCqfDoF BQC: bK1773R1APJz4yTgRkmdKQhjhiMyQpJgfN
yahma
Newbie
*
Offline Offline

Activity: 43
Merit: 0


View Profile
December 24, 2013, 06:18:25 AM
 #90

There seems to be some confusion about the values for networks.py, so lets see if we can sort things out and provide a bit of clarification:

SHARE_PERIOD: How often should P2Pool generate a new share (rule of thumb: 1/5 - 1/10 of the block period)
CHAIN_LENGTH: How many shares P2Pool client keeps
REAL_CHAIN_LENGTH: The {N} value in PPLNS
Note:  REAL_CHAIN_LENGTH must always be <= CHAIN_LENGTH

SPREAD:  How long a 'share' is valid (ie. for how many block can be paid for this share)
TARGET_LOOKBEHIND: Is used for diff calculations.  (ie. how many previous shares to use in calculating difficulty) - lower values can be used to prevent a big miner from getting too many shares before diff rises
PERSIST: False (if you want to allow your server to run independently of any bootstrap nodes... but still allow syncing if they exist).  True will require other nodes on the network to run.
IDENTIFIER & PREFIX: P2Pool will only sync with other nodes who have Identifier and Prefix matching yours (and using same p2p port).. if any of the above values change, a new identifier & prefix need to be created in order to prevent problems.

Example:

Code:
      casinocoin=math.Object(
        PARENT=networks.nets['casinocoin'],
        SHARE_PERIOD=5, # seconds target spacing
        CHAIN_LENGTH=3*60*60//5, # shares
        REAL_CHAIN_LENGTH=3*60*60//5, # shares
        TARGET_LOOKBEHIND=60,
        SPREAD=60, # blocks
        IDENTIFIER='7696C5EF0B281C2F'.decode('hex'),
        PREFIX='4C2E2CD651764B9F'.decode('hex'),
        P2P_PORT=23640,
        MIN_TARGET=0,
        MAX_TARGET=2**256//2**20 - 1,
        PERSIST=False,
        WORKER_PORT=8840,
        BOOTSTRAP_ADDRS='csc.xpool.net bigiron.homelinux.com'.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-alt',
        VERSION_CHECK=lambda v: True,
    ),

CasinoCoin generates a new block every 30 seconds.  SHARE_PERIOD should be 1/5 to 1/10th of that.  In this case 5s is (1/6) share period.  Having a value above 1/5 risks more stale shares & larger inefficiency.
CHAIN_LENGTH & REAL_CHAIN_LENGTH are set up to allow for 3 Hour PPLNS.
TARGET_LOOKBEHIND is set to 60 (shares) giving a 300 second (5min) difficulty adjustment.
SPREAD is set to 60 blocks, so a share will be valid up to 60 blocks or REAL_CHAIN_LENGTH (3 hours), whichever is shorter.
P2P_PORT, IDENTIFIER & PREFIX must match the other nodes you wish to sync with... (all the above values must also match)

Hope this clears a few things up!!
cheetah3
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
December 26, 2013, 11:46:34 AM
 #91

Hi guys!

Thanks for really helpful information.
But I still can't understand or I miss something:

- How to calculate IDENTIFIER & PREFIX value adding new coin in p2pool ?

Also inside file bitcoin/helper.py I do not see that line

Quote
if 'lite' in net.NAME or 'feather' in net.NAME or 'chn' in net.NAME or 'franko' in net.NAME or 'digital' in net.NAME or 'worldcoin' in net.NAME:

Where is it? Or there already no needs to add new coin description?

Thanks!

Merry XMas and Happy New Year to all Smiley

Create new AltCoins, update existing. Please pm with proposals. BTC: 1LbVvrNZAb3RB8fgHkc93PHkMKUsbdDgsq
squiggie
Full Member
***
Offline Offline

Activity: 147
Merit: 100


View Profile WWW
December 26, 2013, 07:37:36 PM
 #92

So I've been trying to get a few alt coin pools up lately. I've been working on lottocoin, grandcoin, earthcoin and luckycoin. None of which have i seen very much success. I'm fairly confident that through this topic, I've been able to add the correct information in the networks.py files. I can post copies of those if needed. However, what I'm really having issues with is this message that is being logged in the output of p2pool each second.

Code:
Error getting work from bitcoind:
2013-12-26 23:31:26.253079 > Traceback (most recent call last):
2013-12-26 23:31:26.253110 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 545, in _runCallbacks
2013-12-26 23:31:26.253156 >     current.result = callback(current.result, *args, **kw)
2013-12-26 23:31:26.253189 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1095, in gotResult
2013-12-26 23:31:26.253219 >     _inlineCallbacks(r, g, deferred)
2013-12-26 23:31:26.253248 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1037, in _inlineCallbacks
2013-12-26 23:31:26.253280 >     result = result.throwExceptionIntoGenerator(g)
2013-12-26 23:31:26.253321 >   File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
2013-12-26 23:31:26.253352 >     return g.throw(self.type, self.value, self.tb)
2013-12-26 23:31:26.253378 > --- <exception caught here> ---
2013-12-26 23:31:26.253404 >   File "/home/squiggie/p2pool-eac/p2pool/util/deferral.py", line 41, in f
2013-12-26 23:31:26.253430 >     result = yield func(*args, **kwargs)
2013-12-26 23:31:26.253456 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1039, in _inlineCallbacks
2013-12-26 23:31:26.253483 >     result = g.send(result)
2013-12-26 23:31:26.253509 >   File "/home/squiggie/p2pool-eac/p2pool/bitcoin/helper.py", line 49, in getwork
2013-12-26 23:31:26.253536 >     transactions=map(bitcoin_data.tx_type.unpack, packed_transactions),
2013-12-26 23:31:26.253562 >   File "/home/squiggie/p2pool-eac/p2pool/util/pack.py", line 63, in unpack
2013-12-26 23:31:26.253593 >     obj = self._unpack(data, ignore_trailing)
2013-12-26 23:31:26.253620 >   File "/home/squiggie/p2pool-eac/p2pool/util/pack.py", line 47, in _unpack
2013-12-26 23:31:26.253652 >     raise LateEnd()
2013-12-26 23:31:26.253680 > p2pool.util.pack.LateEnd:

This error is logged several times a second and is happening for each one of the new coins I've tried. However, the same p2pool code is running WDC, CSC and FTC pools successfully without that error.

Also, I'm able to successfully connect to the pool and hash in it, but it seems the connection to the wallet daemon is lost every few minutes and takes a minute or two to reconnect. My miner will show that it's having issues connecting to the stratum server and then eventually connect back up and start hashing again.

Does anyone know the cause of this error? Is it just something code related to these new coins? I'd like to continue making p2pools for these new coins, but it seems the hurdle of adapting the p2pool code for these might just be too big to overcome.

cheetah3
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
December 27, 2013, 04:04:43 AM
Last edit: December 27, 2013, 04:36:10 AM by cheetah3
 #93

So I've been trying to get a few alt coin pools up lately. I've been working on lottocoin, grandcoin, earthcoin and luckycoin. None of which have i seen very much success. I'm fairly confident that through this topic, I've been able to add the correct information in the networks.py files. I can post copies of those if needed. However, what I'm really having issues with is this message that is being logged in the output of p2pool each second.

Code:
Error getting work from bitcoind:
2013-12-26 23:31:26.253079 > Traceback (most recent call last):
2013-12-26 23:31:26.253110 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 545, in _runCallbacks
2013-12-26 23:31:26.253156 >     current.result = callback(current.result, *args, **kw):

This error is logged several times a second and is happening for each one of the new coins I've tried. However, the same p2pool code is running WDC, CSC and FTC pools successfully without that error.

Also, I'm able to successfully connect to the pool and hash in it, but it seems the connection to the wallet daemon is lost every few minutes and takes a minute or two to reconnect. My miner will show that it's having issues connecting to the stratum server and then eventually connect back up and start hashing again.

Does anyone know the cause of this error? Is it just something code related to these new coins? I'd like to continue making p2pools for these new coins, but it seems the hurdle of adapting the p2pool code for these might just be too big to overcome.


Same here but I have another error Smiley
I always have an error "Authorisation required" after running pool
Quote
run_p2pool.py bituser bitpassw --net lottocoin
I have feeling its because of incorrect IDENTIFIER and  PREFIX values.
How did you calculate them?

btw, did you found line where to add new coin name in bitcoin/helper.py (about what talking here at the top of topic ? Something like that:
Quote
if 'lite' in net.NAME


Create new AltCoins, update existing. Please pm with proposals. BTC: 1LbVvrNZAb3RB8fgHkc93PHkMKUsbdDgsq
squiggie
Full Member
***
Offline Offline

Activity: 147
Merit: 100


View Profile WWW
December 27, 2013, 02:08:55 PM
 #94


Same here but I have another error Smiley
I always have an error "Authorisation required" after running pool
Quote
run_p2pool.py bituser bitpassw --net lottocoin
I have feeling its because of incorrect IDENTIFIER and  PREFIX values.
How did you calculate them?

btw, did you found line where to add new coin name in bitcoin/helper.py (about what talking here at the top of topic ? Something like that:
Quote
if 'lite' in net.NAME



The IDENTIFIER and PREFIX in the network.py are only used to identify your p2pool node with others of the same coin. Technically, if you want to run a p2pool node with others, these values must be the same across all nodes. If you don't want to run the p2pool with others, then you can create these yourself and keep them private so no nodes can connect with you.

However, if you're referring to the P2P_PREFIX in the bitcoin/networks.py, then yes, that is coin specific. I believe that is mentioned earlier in this thread on where to find it, so read up a little, but I know you'll be looking in the coins source in the main.cpp file. Lool for pchMessageStart[4] and you'll see the hex codes that you need to pull out there.

As far as the helper.py file, I don't think that needs to be modified anymore. At least I haven't been modifying it and have been able to successfully create some pools. I don't think the line that is referenced above exists anymore.

helloword2013
Sr. Member
****
Offline Offline

Activity: 333
Merit: 250


View Profile
December 27, 2013, 02:11:43 PM
 #95

useful
cheetah3
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
December 27, 2013, 02:21:51 PM
 #96


The IDENTIFIER and PREFIX in the network.py are only used to identify your p2pool node with others of the same coin. Technically, if you want to run a p2pool node with others, these values must be the same across all nodes. If you don't want to run the p2pool with others, then you can create these yourself and keep them private so no nodes can connect with you.

However, if you're referring to the P2P_PREFIX in the bitcoin/networks.py, then yes, that is coin specific. I believe that is mentioned earlier in this thread on where to find it, so read up a little, but I know you'll be looking in the coins source in the main.cpp file. Lool for pchMessageStart[4] and you'll see the hex codes that you need to pull out there.

As far as the helper.py file, I don't think that needs to be modified anymore. At least I haven't been modifying it and have been able to successfully create some pools. I don't think the line that is referenced above exists anymore.

Thank you, very useful. Yes about P2P_PREFIX  I got it and found how to create it.

Ok, let's say I want to run p2pool node with others. But for some new coin, that still do not have much nodes, how to generate IDENTIFIER and PREFIX ?
If I writing random string, its not working, pool return me exception.

Can I take ready values from some other coin? And will it conflict with existing coins inside networks.py?
Let's say I have FST and want to add LOTOCoin. Should that values (IDENTIFIER ) to be unique for each coin listed in networks.py or unique values per coin doesn't required?

Create new AltCoins, update existing. Please pm with proposals. BTC: 1LbVvrNZAb3RB8fgHkc93PHkMKUsbdDgsq
squiggie
Full Member
***
Offline Offline

Activity: 147
Merit: 100


View Profile WWW
December 27, 2013, 02:42:14 PM
 #97

Thank you, very useful. Yes about P2P_PREFIX  I got it and found how to create it.

Ok, let's say I want to run p2pool node with others. But for some new coin, that still do not have much nodes, how to generate IDENTIFIER and PREFIX ?
If I writing random string, its not working, pool return me exception.

Can I take ready values from some other coin? And will it conflict with existing coins inside networks.py?
Let's say I have FST and want to add LOTOCoin. Should that values (IDENTIFIER ) to be unique for each coin listed in networks.py or unique values per coin doesn't required?


I have always just slightly modified them from another coin already in network.py. Yes, it has to be unique within network.py or I think you'll get an error. So for example, if the litecoin IDENTIFIER is
Code:
IDENTIFIER='e037d5b8c6923410'.decode('hex')
, then just take that and slightly modify a few numbers. Make it something like
Code:
IDENTIFIER='e037d5b8c6923415'.decode('hex')
and see if that works (just changed the last digit). I'm pretty sure that will be fine, as it's what I've done, but if there is someone else who thinks I'm off, please speak up.


However, if you want other to be able to connect to you, it will need to be unique and posted online so others can follow. If you want to fork the original p2pool code or forkl Rav3n or Cartman's code in github and add your own entries, then report back if you're successful, then others will know and be able to obtain your values and run their own nodes for your coin. That's how most of the entries in network.py get shares, through github forks.

CartmanSPC
Legendary
*
Offline Offline

Activity: 1270
Merit: 1000



View Profile
December 27, 2013, 07:07:12 PM
 #98

To generate unique values for IDENTIFIER and PREFIX create a random string of 19 numbers and convert to Hex.

I use the windows Programmer Calculator to do the conversion (View menu).

Example:
5486237465184378845 = 4C2307E841C11FDD

cheetah3
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
December 27, 2013, 07:19:37 PM
 #99

To generate unique values for IDENTIFIER and PREFIX create a random string of 19 numbers and convert to Hex.

I use the windows Programmer Calculator to do the conversion (View menu).

Example:
5486237465184378845 = 4C2307E841C11FDD

FINALLY LOL!

Thanks so much, testing now...

Create new AltCoins, update existing. Please pm with proposals. BTC: 1LbVvrNZAb3RB8fgHkc93PHkMKUsbdDgsq
cheetah3
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
December 28, 2013, 09:16:16 AM
Last edit: December 29, 2013, 07:10:43 AM by cheetah3
 #100

To generate unique values for IDENTIFIER and PREFIX create a random string of 19 numbers and convert to Hex.

I use the windows Programmer Calculator to do the conversion (View menu).

Example:
5486237465184378845 = 4C2307E841C11FDD

Cartman, thank you looks like I almost done with config settings Smiley
But now... I trying to run your version of p2pool, for craftcoin.
Craftcoin without pool for solo working good.

When I do
Quote
run_p2pool.py bituser bitpwd --net craftcoin

I getting error "twisted.web.error.Error: 401 Authorization Required"
 

And funny thing - with NameCoin error too:
Quote
run_p2pool.py --net namecoin namecoinuser namecoinpwd
>Testing bitcoind RPC connection to 'http://127.0.0.1:8336/
>Check failed! Make sure that you're connected to the right bitcoind with --bitcoind-rpc-port!
Maybe someonehad same error  and  have an idea?

Thanks!
Found several things:
RPC_PORT in the bitcoinrpc.cpp - but updated wallets have only constants DEF_RPC_PORT etc there, real values can be found in the protocol.h file.
Also there values for testnet:
DEF_PORT
const int DEF_RPCPORT
const int DEF_TESTNET_PORT
const int DEF_TESTNET_RPCPORT

All testnet and other ports are correct now, but still same error "Check failed".
That strange, some coins working good with p2pool, some have that error.




Create new AltCoins, update existing. Please pm with proposals. BTC: 1LbVvrNZAb3RB8fgHkc93PHkMKUsbdDgsq
Pages: « 1 2 3 4 [5] 6 7 8 9 10 »  All
  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!