Bitcoin Forum
October 22, 2017, 06:54:48 AM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 3 »  All
  Print  
Author Topic: P2Pool Detailed Settings for Altcoins  (Read 11699 times)
CartmanSPC
Legendary
*
Offline Offline

Activity: 1258



View Profile WWW
February 10, 2014, 02:26:20 AM
 #1

Since it is so hard to find all the information in one location I thought I would start a thread detailing the changes necessary to make most POW altcoins work with p2pool. Thanks go out to all those who have posted this information elsewhere on the forum.

There are two files that will need to be changed:

p2pool/bitcoin/networks.py
p2pool/networks.py


Will break these down in the next two posts. Over time I will update to reflect new information.

Note: When a coin changes it's spec p2pool needs to be changed to match.
Note: All nodes must run the same code. If there are any changes [some exceptions] it is recommended to start a new p2pool share chain by changing IDENTIFIER and PREFIX and deleting the p2pool/data folder.

I maintain a GitHub that I keep updated of the coins I run on xpool.net here:
https://github.com/CartmanSPC/p2pool

Here are some other popular repositories:
https://github.com/narken/p2pool-altcoins
https://github.com/Rav3nPL/p2pool-rav

Please use caution when using some of these repositories as they may not have been updated to reflect changed coin specs.

Link to the original source by forrestv (BTC, LTC, TRC):
https://github.com/forrestv/p2pool

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
CartmanSPC
Legendary
*
Offline Offline

Activity: 1258



View Profile WWW
February 10, 2014, 02:26:33 AM
 #2

p2pool/bitcoin/networks.py

This is where the coin specific settings are stored. All the information in this file needs to come from the source code of each coin and be updated if any of that information is changed.

For reference here is the section of the code for litecoin:
Code:
   litecoin=math.Object(
        P2P_PREFIX='fbc0b6db'.decode('hex'),
        P2P_PORT=9333,
        ADDRESS_VERSION=48,
        RPC_PORT=9332,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'litecoinaddress' in (yield bitcoind.rpc_help()) and
            not (yield bitcoind.rpc_getinfo())['testnet']
        )),
        SUBSIDY_FUNC=lambda height: 50*100000000 >> (height + 1)//840000,
        POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
        BLOCK_PERIOD=150, # s
        SYMBOL='LTC',
        CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Litecoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Litecoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.litecoin'), 'litecoin.conf'),
        BLOCK_EXPLORER_URL_PREFIX='http://explorer.litecoin.net/block/',
        ADDRESS_EXPLORER_URL_PREFIX='http://explorer.litecoin.net/address/',
        TX_EXPLORER_URL_PREFIX='http://explorer.litecoin.net/tx/',
        SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
        DUMB_SCRYPT_DIFF=2**16,
        DUST_THRESHOLD=0.03e8,
    ),

litecoin=math.Object(
Change litecoin to match the name of the altcoin.

P2P_PREFIX='fbc0b6db'.decode('hex'),
Replace 'fbc0b6db' with the values from main.cpp at pchMessageStart[4] =
Remove all '0x' and combine the rest.

P2P_PORT=9333,
Replace 9333 by looking in protocol.h and finding the 2nd value after GetDefaultPort
Some coins may have this in chainparams.cpp at nDefaultPort =

ADDRESS_VERSION=48,
Look in base58.h and find the value of PUBKEY_ADDRESS

RPC_PORT=9332,
Look in bitcoinrpc.cpp for GetArg("-rpcport", xxxx), xxxx is the RPC_PORT.
Some coins may have this in chainparams.cpp at  nRPCPort =

RPC_CHECK= ... 'litecoinaddress'
Look in bitcoinrpc.cpp after setaccount <
If the altcoin has a 'space' between altcoin and address make sure you include the 'space'.
You can also find this in rpcdump.cpp after dumpprivkey <

SUBSIDY_FUNC=lambda height: 50*100000000 >> (height + 1)//840000,
SUBSIDY_FUNC=lambda height: 'block reward' * 'satoshies' >> (height + 1)//'height where block halves'.
For 'block reward' look in main.cpp for nSubsidy
For 'height where block halves' look in main.cpp for nSubsidy -> nSubsidy >>= (nHeight /
If a coin does not have a height where the block halves take out >> (height + 1)//'height where block halves'

Comment
Pay particular attention to verifying that you have this correct. Not doing so will result in some blocks being rewarded less than their full value.

SUBSIDY_FUNC is only used in some instances.
Quote
Sometimes  removed_fees  contains  None  when P2Pool doesn't know the fee associated with a transaction, such as with old versions of *coind as a result of this old bug. Then, P2Pool has to make a conservative estimate of the subsidy using its computed base subsidy and the sum of the fees it does know.

I have not seen a solution for coins with a random block reward. For random block reward coins some have suggested that the 'block reward' should be set to a low number as a high number would cause the block to be rejected [try to verify].

To do
Determine the correct SUBSIDY_FUNC for coins that decrease by a percentage (WDC, Digibyte).
Determine the correct SUBSIDY_FUNC for coins that have a random block reward (DOGE, LEAF, FLAP PENG, MEOW, etc).



....more to come. For now here are my dirty notes:

BLOCK_PERIOD=
------------------------------------------
target time between blocks
<SECONDS> pulled from src/main.cpp (search for "static const int64 nTargetSpacing")
------------------------------------------

SANE_TARGET_RANGE = (2**256//1000000000 - 1, 2**256//1000 - 1)
No changes for scrypt.
DUMB_SCRYPT_DIFF = 2**16
No changes for scrypt.

DUST_THRESHOLD =
Note about DUST_TRESHOLD: In an effort to reduce the number of very small dust payments hanging around in peoples wallets, it does this by looking at your expected block payment and adjusted the required share difficulty until this is above its DUST_THRESHOLD value.
0.03e8    = 3000000   = 0.03       in satoshis [someone please verify]
1e8       = 100000000 = 0.00000001 in satoshis [someone please verify]
0.001e8   = 100000    = 0.001      in satoshis [someone please verify]

CartmanSPC
Legendary
*
Offline Offline

Activity: 1258



View Profile WWW
February 10, 2014, 02:26:44 AM
 #3

p2pool/networks.py

Unlike p2pool/bitcoin/networks.py some of the values here may be subjective and not clearly defined.
I will add my own personal comments to each setting. Please feel free to add your own or discuss opposing viewpoints.


For reference here is the section of the code for litecoin:
Code:
   litecoin=math.Object(
        PARENT=networks.nets['litecoin'],
        SHARE_PERIOD=15, # seconds
        CHAIN_LENGTH=24*60*60//10, # shares
        REAL_CHAIN_LENGTH=24*60*60//10, # shares
        TARGET_LOOKBEHIND=200, # shares
        SPREAD=3, # blocks
        IDENTIFIER='e037d5b8c6923410'.decode('hex'),
        PREFIX='7208c1a53ef629b0'.decode('hex'),
        P2P_PORT=9338,
        MIN_TARGET=0,
        MAX_TARGET=2**256//2**20 - 1,
        PERSIST=True,
        WORKER_PORT=9327,
        BOOTSTRAP_ADDRS='forre.st vps.forre.st liteco.in 95.211.21.103 37.229.117.57 66.228.48.21 180.169.60.179 112.84.181.102 74.214.62.115 209.141.46.154 78.27.191.182 66.187.70.88 88.190.223.96 78.47.242.59 158.182.39.43 180.177.114.80 216.230.232.35 94.231.56.87 62.38.194.17 82.67.167.12 183.129.157.220 71.19.240.182 216.177.81.88 109.106.0.130 113.10.168.210 218.22.102.12 85.69.35.7:54396 201.52.162.167 95.66.173.110:8331 109.65.171.93 95.243.237.90 208.68.17.67 87.103.197.163 101.1.25.211 144.76.17.34 209.99.52.72 198.23.245.250 46.151.21.226 66.43.209.193 59.127.188.231 178.194.42.169 85.10.35.90 110.175.53.212 98.232.129.196 116.228.192.46 94.251.42.75 195.216.115.94 24.49.138.81 61.158.7.36 213.168.187.27 37.59.10.166 72.44.88.49 98.221.44.200 178.19.104.251 87.198.219.221 85.237.59.130:9310 218.16.251.86 151.236.11.119 94.23.215.27 60.190.203.228 176.31.208.222 46.163.105.201 198.84.186.74 199.175.50.102 188.142.102.15 202.191.108.46 125.65.108.19 15.185.107.232 108.161.131.248 188.116.33.39 78.142.148.62 69.42.217.130 213.110.14.23 185.10.51.18 74.71.113.207 77.89.41.253 69.171.153.219 58.210.42.10 174.107.165.198 50.53.105.6 116.213.73.50 83.150.90.211 210.28.136.11 86.58.41.122 70.63.34.88 78.155.217.76 68.193.128.182 198.199.73.40 193.6.148.18 188.177.188.189 83.109.6.82 204.10.105.113 64.91.214.180 46.4.74.44 98.234.11.149 71.189.207.226'.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-ltc',
        VERSION_CHECK=lambda v: True,
        VERSION_WARNING=lambda v: 'Upgrade Litecoin to >=0.8.5.1!' if v < 80501 else None,
    ),


For now here are some of my notes (work in progress):

SHARE_PERIOD
SHARE_PERIOD sets a target time for how often to provide a share. It will regulating the difficulty to try to hit that target time taking into account the setting in TARGET_LOOKBEHIND.
A lower number will have the effect of a lower share difficulty but also result in a larger share chain depending on the value in CHAIN_LENGTH. It may also cause additional orphans in the p2pool share chain as too low a difficulty will mean multiple miners will find shares at the same time. Not necessarily a bad thing as your all working on finding the same block but the winning finder will get the credit for the share.

Comment
I have seen people say a good rule of thumb is setting this to 1/5 of the altcoin block period. Too high a number will provide a higher diff share favoring higher hash rate miners. Too low a number increases resources (traffic, memory, storage) and orphans from competing miners finding the same shares. I believe setting this to 10 for most altcoins with block times of between 0.5 - 2 minutes is a good compromise.


CHAIN_LENGTH
CHAIN_LENGTH is the number of shares p2pool keeps before discarding them. It needs to be larger than or equal to REAL_CHAIN_LENGTH (it is normally equal to). One reason it increase this would be to show more data in the recent blocks found list.

Example: 24*60*60//10 = 1 day of shares. 7*24*60*60//10 = 7 days of shares. [verification needed]

REAL_CHAIN_LENGTH

REAL_CHAIN_LENGTH sets the total number of previously found shares to include in the payout when a block is found. A longer chain provides a larger amount of time to find a share (get paid for work).
It also contributes to how long you need mine to reach your "full" payout amount.

Comment
24*60*60//10 is calculated as follows:
(24*60*60)/10 = 8,640 shares are paid when a block is found.

Take the value in SHARE_PERIOD and multiply by the number of shares to find how many seconds a share is valid for.
For example:

8,640 shares will be paid with a share expected to be found every 10 seconds
8,640 * 10 = 86,400 seconds
86,400 / 60 = 1,440 minutes
1,440 / 60 = 24 hours
24 / 24 = 1 days

I have tried various REAL_CHAIN_LENGTH settings but have settled on 24*60*60//10 for the following reasons:
Allows a 24 hours period of time for finding of a share and for those shares to be valid based on having a share period of 10 seconds.
  • Allows smaller miners time to find a share within 24 hours
  • Amount of time to full payout increased but so does the time you continue to receive payment after you stop mining
  • Takes longer to ramp up to your full payout amount but you continue to get paid for about the same amount of time after you stop mining. With a  CHAIN_LENGTH setting of 24*60*60//10 I would say most miners reach their full payout between 6-8 hours and continue to receive a payout for about the same amount of time after they stop mining (depending on their hashrate and the setting in spread).



TARGET_LOOKBEHIND
Determines the number of shares counted for difficulty regulation.
Used to determine share difficulty based on the hash rate of p2pool (not individual nodes).

Comment
Some people set this really low but I recommend it be kept at 200 as it will modify the share diff based on the previous 200 shares rather quickly. I think they believe it will take TARGET_LOOKBEHIND*SHARE_PERIOD='time it takes to adjust' but I feel it actually uses the last 200 shares and adjust based on the average. Setting too low a number does not give it a large enough number of shares to determine the proper value and adjust smoothly.
With large miners coming and going the difficulty adjustment takes too long with 200 shares on smaller p2pool networks. On larger p2pool networks this is not noticeable but I have resulted to setting this to 20 to accommodate large miners coming and going.

SPREAD
SPREAD determines how many blocks (max) to pay if a miner finds at lease one share.
Does not go beyond the CHAIN_LENGTH/REAL_CHAIN_LENGTH setting.

Comment
600/[block time]=x
x*3=spread

Quote
bitcoin      SPREAD=3      block every 600 seconds         Baseline
litecoin     SPREAD=12     block every 150 seconds        600/150=4       4x3=12
bbqcoin      SPREAD=30     block every 60 seconds         600/60=10       10x3=30
casinocoin   SPREAD=60     block every 30 seconds         600/30=20       20x3=60
digitalcoin  SPREAD=90     block every 20 seconds         600/20=30       30x3=90  (old spec)
digitalcoin  SPREAD=45     block every 40 seconds         600/40=15       15x3=45  (new spec)
worldcoin    SPREAD=120    block every 15 seconds         600/15=40       40x3=120 (old spec)
worldcoin    SPREAD=60     block every 30 seconds         600/30=20       20x3=60  (new spec)
anoncoin     SPREAD=10     block every 205 seconds        600/205=2.926829268292683   2.926829268292683x3=8.780487804878049
globalcoin   SPREAD=45     block every 40 seconds         600/40=15       15x3=45
dogecoin     SPREAD=30     block every 60 seconds         600/60=10       10x3=30
potcoin      SPREAD=45     block every 40 seconds         600/40=15       15x3=45
craftcoin    SPREAD=6      block every 300 seconds        600/300=2        2x3=6  (old spec)
craftcoin    SPREAD=30     block every 60 seconds         600/60=10       10x3=30 (new spec)
nyancoin     SPREAD=30     block every 60 seconds         600/60=10       10x3=30

It is not a hard limit # of blocks, it is the # times the average work required to solve a block.  In other words, for a SPREAD=3 if the average time to block is 8 hours, then your shares will fall off the payout after 24 hours.  So, if p2pool happens to get lucky and solve 10 blocks in that 24 hour period, your share will be paid for all 10 blocks.



--------------------
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

....more to come!

tvb
Jr. Member
*
Offline Offline

Activity: 38


View Profile
February 10, 2014, 08:05:20 AM
 #4

PERSIST=True
You need to set it to False to bootstrap the sharechain, but once you've done that and have a bootstrap node up, set it to True
It prevents anyone else from bootstrapping a sharechain

DGB D6caUG54gxgwqWhws3fnuugeEDtFZiX1DD
pt78
Newbie
*
Offline Offline

Activity: 6


View Profile
February 10, 2014, 09:12:32 PM
 #5

Thanks for posting this ,I started working on adding our stuff and quickly realised there was more
to it than I thought there would be .. 
Shadow_moon
Newbie
*
Offline Offline

Activity: 26


View Profile
February 12, 2014, 12:52:09 PM
 #6

How can I contol what diff p2pool will send to miner?

Multiple P2Pool yourpool.pw (http://yourpool.pw) all coins with 0.5% fee.  Appcoin (http://app.yourpool.pw:9402) Taxicoin (http://taxi.yourpool.pw:9400)
roy7
Sr. Member
****
Offline Offline

Activity: 434


View Profile
February 17, 2014, 01:56:42 AM
 #7

How can I contol what diff p2pool will send to miner?

To your own miner? /DIFF will control your share target to gets shares on the chain, +DIFF will control your pseudo share target to report work back even if it's lower than share target.

RoyalMiningCo: Pools retired. Was fun!
ruggero
Jr. Member
*
Offline Offline

Activity: 44


View Profile WWW
February 21, 2014, 02:16:39 AM
 #8

Hi CartmanSPC,

first of all thanks for all the work you put in organizing this information about P2Pool. Reading it put me up with most of the knowledge I have of configuring new P2Pools for altcoins.
I guess you read the disappointing answer of deeppurple72 on Github (if not go and check it https://github.com/forrestv/p2pool/issues/157#issuecomment-35691652).

If you don't mind I'd like to help/contribute to the work you have started, and join forces to figure out how to make as many interesting cryptos as possible with p2pool.
And then redistribute the code + the documentation for the good of the community as a whole.

If you think it's too much work or you are not interested I will understand. But then I'll try to carry on on my own and of course give you all the credit you deserve!
Ciao!

deeppurple72
Full Member
***
Offline Offline

Activity: 140


View Profile
February 21, 2014, 02:27:29 AM
 #9

Hi CartmanSPC,

first of all thanks for all the work you put in organizing this information about P2Pool. Reading it put me up with most of the knowledge I have of configuring new P2Pools for altcoins.
I guess you read the disappointing answer of deeppurple72 on Github (if not go and check it https://github.com/forrestv/p2pool/issues/157#issuecomment-35691652).

If you don't mind I'd like to help/contribute to the work you have started, and join forces to figure out how to make as many interesting cryptos as possible with p2pool.
And then redistribute the code + the documentation for the good of the community as a whole.

If you think it's too much work or you are not interested I will understand. But then I'll try to carry on on my own and of course give you all the credit you deserve!
Ciao!



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........
ruggero
Jr. Member
*
Offline Offline

Activity: 44


View Profile WWW
February 21, 2014, 02:37:45 AM
 #10

Please deeppurple72, let's keep this conversation on github. You made your point and I understand it and I accept it.
Of course you are welcome any time to join and contribute in documenting more in detail the internals of the P2Pool configuration.
If not now in several months, or whenever it will not be an obstacle to your goals/plans.


CartmanSPC
Legendary
*
Offline Offline

Activity: 1258



View Profile WWW
February 21, 2014, 06:59:32 PM
 #11

Updated RPC_CHECK= ... 'litecoinaddress' to also include:
You can also find this in rpcdump.cpp after "dumpprivkey <"

Thanks deeppurple72

CartmanSPC
Legendary
*
Offline Offline

Activity: 1258



View Profile WWW
February 23, 2014, 08:34:51 PM
 #12

Added comments to p2pool/bitcoin/networks.py in SUBSIDY_FUNC and DUST_THRESHOLD sections.

Added coin examples to p2pool/networks.py in the SPREAD section.

Added how to generate unique values for IDENTIFIER and PREFIX in p2pool/networks.py.

StakeHunter
Full Member
***
Offline Offline

Activity: 155


View Profile WWW
February 28, 2014, 04:02:28 PM
 #13

I want to work on some coins with POW/POS - is it best to use your repo - or use the one developed for NVC?

"Do not store up for yourselves treasures on earth, where moths and vermin destroy, and where thieves break in and steal." -Jesus (Mat 6:19)
CartmanSPC
Legendary
*
Offline Offline

Activity: 1258



View Profile WWW
February 28, 2014, 07:45:34 PM
 #14

I want to work on some coins with POW/POS - is it best to use your repo - or use the one developed for NVC?

Assuming Novacoin is POW/POS then yes...work off of that one. I have no experience with POW/POS coins and P2Pool.

svenp
Full Member
***
Offline Offline

Activity: 122


View Profile
March 05, 2014, 11:32:28 PM
 #15

What is MAX_TARGET?  I've noticed it's different for various coins but not sure how it's computed.
OmarG
Full Member
***
Offline Offline

Activity: 210



View Profile
March 06, 2014, 05:56:09 AM
 #16

Great resource, will be using this to get P2Pools running for some of the newer coins

Canadian P2Pools: http://omargpools.ca/
zvs
Legendary
*
Offline Offline

Activity: 1456


I have some bitcoins. Somewhere.


View Profile WWW
March 06, 2014, 09:25:41 AM
 #17

What is MAX_TARGET?  I've noticed it's different for various coins but not sure how it's computed.

the maximum custom difficulty you can set

hmm, nm, i'm not 100% sure about that actually, would have to look at the source again.   i think that's what it is, though.

btw, for any coin with, say, block times of 2 or 3 minutes or less, you should remove the following in data.py:

if best is not None:
            best_share = self.items[best]
            punish, punish_reason = best_share.should_punish_reason(previous_block, bits, self, known_txs)
            if punish > 0:
                print 'Punishing share for %r! Jumping from %s to %s!' % (punish_reason, format_hash(best), format_hash(best_share.previous_hash))
                best = best_share.previous_hash

...  first off, these blocks are too fast to have that anyway.  not to mention that the vast majority of the time this will be beneficial to your node.  if you build off of that old valid *share that's just getting punished because of a new block, all the other clients will follow your chain (as it'll be the longest).  this way you don't end up making a share some 3 seconds later and have some slow (or modified, heh heh) node build off the original share

Dacentec, best deals for US dedicated servers. They regularly restock $20-$25 Opterons with 8-16GB RAM & 2x1-2TB HDD's (ofc, usually lots of other good stuff to choose from).  I did a Serverbear benchmark of one of my $20/mo Opteron (June last year), it's here.  Have had about a half dozen different servers with Dacentec, & none have failed to sustain at least 40MB/s (burst higher). My favorite is a 12-month rent-to-own ZT Systems 2XL5520 16GB 2x2TB SATA for $40/month (got lucky with the 'off-brand', haven't seen a RTO 2xL5520 for under $50/mo since -- at least for monthly contracts).  wholesaleinternet.com has some ancient 2-core intel CPUs @ $10/mo sometimes (I got an Intel Core 2 6300 @ 1.86GHz, with a 250GB HDD with 46000 hours on it, LOL. $20 @ Dacentec is much better, if you can grab one). joesdatacenter.com (same location as Wholesale Internet) also occasionally has specials (or if you don't want to wait, it has an AMD Opteron 170 @ $16/mo).
CDarvin81
Member
**
Offline Offline

Activity: 82


View Profile WWW
March 06, 2014, 08:17:31 PM
 #18

Hi, i try and try but it don't work.

I do all like in the "tutorial" but i think the identifier and prefix is more...
If i change the identifier of an existing coin twisted fall in a loop.
And i try to add a simple coin 4 test =>

2014-03-06 21:06:47.817990     Current block hash: 1f08c0cb6ff064bf911b3e73756bc553cacb166dbd4552d399ed6c2cf4dd30c8
2014-03-06 21:06:47.818232     Current block height: 74250
2014-03-06 21:06:47.818441
2014-03-06 21:06:47.818728 Testing bitcoind P2P connection to '127.0.0.1:11656'...
2014-03-06 21:06:52.819332     ...taking a while. Common reasons for this include all of bitcoind's connection slots being used...

and this is on every coins i try

Code:
piratecoin=math.Object(
        P2P_PREFIX='ddb9b7ef'.decode('hex'), #pchmessagestart
        P2P_PORT=11656,
        ADDRESS_VERSION=23, #pubkey_address
        RPC_PORT=11655,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'piratecoinaddress' in (yield bitcoind.rpc_help()) and
            not (yield bitcoind.rpc_getinfo())['testnet']
        )),
        SUBSIDY_FUNC=lambda height: 0*1200000000,
        POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
        BLOCK_PERIOD=60, # seconds
        SYMBOL='PIR',
        CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'piratecoin')
                if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/piratecoin$
                if platform.system() == 'Darwin' else os.path.expanduser('~/.piratecoin'), 'piratecoin.conf'),
        BLOCK_EXPLORER_URL_PREFIX='http://explorer.coin-project.org/block/',
        ADDRESS_EXPLORER_URL_PREFIX='http://explorer.coin-project.org/address/',
        TX_EXPLORER_URL_PREFIX='http://explorer.coin-project.org/tx/',
        SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
        DUMB_SCRYPT_DIFF=2**16,
        DUST_THRESHOLD=0.03e8,
    ),
in /bitcoin
and:
Code:
piratecoin=math.Object(
        PARENT=networks.nets['piratecoin'],
        SHARE_PERIOD=30, # seconds
        CHAIN_LENGTH=8*60*60//10, # shares
        REAL_CHAIN_LENGTH=8*60*60//10, # shares
        TARGET_LOOKBEHIND=60, # shares
        SPREAD=30, # blocks
        IDENTIFIER='4d2307e841c11fdd'.decode('hex'),
        PREFIX='adcc0aecfe4c04c9'.decode('hex'),
        P2P_PORT=25005,
        MIN_TARGET=0,
        MAX_TARGET=2**256//2**20 - 1,
        PERSIST=False,
        WORKER_PORT=25006,
        BOOTSTRAP_ADDRS=''.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-alt',
        VERSION_CHECK=lambda v: True,
    ),
in the /p2pool folder
any idea???
chain length and so not editet because try for run only Smiley

thanks 4 help

ETC: 0x485BbD16327e1b87084134420586abfD077C39A9
Crave: C8ohL6wZsghWx7d7zvqDzf47qK5guLNkG6
P2PHash
Full Member
***
Offline Offline

Activity: 140


View Profile
March 06, 2014, 09:58:35 PM
 #19

Thanks for this thread! Very helpful but how can you configure a coin with random block reward? I saw on Rav3nPL github settings for dogecoin for example but there's nothing particular, I wonder how it works.
CartmanSPC
Legendary
*
Offline Offline

Activity: 1258



View Profile WWW
March 07, 2014, 06:44:29 AM
 #20

Hi, i try and try but it don't work.

I do all like in the "tutorial" but i think the identifier and prefix is more...
If i change the identifier of an existing coin twisted fall in a loop.
And i try to add a simple coin 4 test =>

2014-03-06 21:06:47.817990     Current block hash: 1f08c0cb6ff064bf911b3e73756bc553cacb166dbd4552d399ed6c2cf4dd30c8
2014-03-06 21:06:47.818232     Current block height: 74250
2014-03-06 21:06:47.818441
2014-03-06 21:06:47.818728 Testing bitcoind P2P connection to '127.0.0.1:11656'...
2014-03-06 21:06:52.819332     ...taking a while. Common reasons for this include all of bitcoind's connection slots being used...

and this is on every coins i try

Code:
piratecoin=math.Object(
        P2P_PREFIX='ddb9b7ef'.decode('hex'), #pchmessagestart
        P2P_PORT=11656,
        ADDRESS_VERSION=23, #pubkey_address
        RPC_PORT=11655,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'piratecoinaddress' in (yield bitcoind.rpc_help()) and
            not (yield bitcoind.rpc_getinfo())['testnet']
        )),
        SUBSIDY_FUNC=lambda height: 0*1200000000,
        POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
        BLOCK_PERIOD=60, # seconds
        SYMBOL='PIR',
        CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'piratecoin')
                if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/piratecoin$
                if platform.system() == 'Darwin' else os.path.expanduser('~/.piratecoin'), 'piratecoin.conf'),
        BLOCK_EXPLORER_URL_PREFIX='http://explorer.coin-project.org/block/',
        ADDRESS_EXPLORER_URL_PREFIX='http://explorer.coin-project.org/address/',
        TX_EXPLORER_URL_PREFIX='http://explorer.coin-project.org/tx/',
        SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
        DUMB_SCRYPT_DIFF=2**16,
        DUST_THRESHOLD=0.03e8,
    ),
in /bitcoin
and:
Code:
piratecoin=math.Object(
        PARENT=networks.nets['piratecoin'],
        SHARE_PERIOD=30, # seconds
        CHAIN_LENGTH=8*60*60//10, # shares
        REAL_CHAIN_LENGTH=8*60*60//10, # shares
        TARGET_LOOKBEHIND=60, # shares
        SPREAD=30, # blocks
        IDENTIFIER='4d2307e841c11fdd'.decode('hex'),
        PREFIX='adcc0aecfe4c04c9'.decode('hex'),
        P2P_PORT=25005,
        MIN_TARGET=0,
        MAX_TARGET=2**256//2**20 - 1,
        PERSIST=False,
        WORKER_PORT=25006,
        BOOTSTRAP_ADDRS=''.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-alt',
        VERSION_CHECK=lambda v: True,
    ),
in the /p2pool folder
any idea???
chain length and so not editet because try for run only Smiley

thanks 4 help

I have not tried this myself but someone said (although I have my doubts) that changing p2pool/networks.py PREFIX= to the same value as p2pool/bitcoin/networks.com P2P_PREFIX= works for some coins that get stuck on 'Testing bitcoind P2P connection'. Again, I seriously doubt it but give it a shot and report back.

In your coin example you would change p2pool/networks.py from:
PREFIX='adcc0aecfe4c04c9'.decode('hex'),
to:
PREFIX='ddb9b7ef'.decode('hex'),

Heh, if that works I would be shocked  Grin

Pages: [1] 2 3 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!