Pages:
Author

Topic: P2Pool Detailed Settings for Altcoins - page 2. (Read 12979 times)

legendary
Activity: 1270
Merit: 1000
April 17, 2014, 06:28:14 PM
#30
What's the purpose/advantage of removing the block punishing code? That's an area I've never looked at and am clueless about.

I think that it hurts the nodes that don't have it vs the ones that do?
sr. member
Activity: 434
Merit: 250
April 07, 2014, 09:31:56 PM
#29
What's the purpose/advantage of removing the block punishing code? That's an area I've never looked at and am clueless about.
legendary
Activity: 1270
Merit: 1000
April 07, 2014, 07:43:32 PM
#28
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

In ravs repo it does this with the following:

Code:
    def should_punish_reason(self, previous_block, bits, tracker, known_txs):
#       if (self.header['previous_block'], self.header['bits']) != (previous_block, bits) and self.header_hash != previous_block and self.peer_addr is not None:
#           return True, 'Block-stale detected! height(%x) < height(%x) or %08x != %08x' % (self.header['previous_block'], previous_block, self.header['bits'].bits, bits.bits)

Same result?
legendary
Activity: 1270
Merit: 1000
March 28, 2014, 04:58:53 PM
#27
Separated CHAIN_LENGTH and REAL_CHAIN_LENGTH into two different sections and expanded on the explanation.
newbie
Activity: 4
Merit: 0
March 15, 2014, 05:56:30 PM
#26
Hey i made new altcoin and i want to run a p2pool with it.

Source for coin : http://github.com/skatecoin/skatecoin

i set in coin P2Port to: 21607
               RPCport to : 21606
Now i download p2pool-rav and edit p2pool/networks.py and p2pool/bitcoin/networks.py

.skatecoin/src/skatecoin.conf

rpcuser=skatecoinrpc
rpcpassword=my password
listen=1
addnode=91.230.204.187
server=1
daemon=1
rpcallowip=77.45.47.126
rpcallowip=91.230.205.78
rpcport=21606
port=21607
rpcallowip=127.0.0.1
rpcallowip=*.*.*.*



Here is: skatecoin=math.Object(
        PARENT=networks.nets['skatecoin'],
        SHARE_PERIOD=25, # seconds target spacing
        CHAIN_LENGTH=24*60*60//25, # shares
        REAL_CHAIN_LENGTH=24*60*60//25, # shares
        TARGET_LOOKBEHIND=25, # shares coinbase maturity
        SPREAD=20, # blocks
        IDENTIFIER='cacacacae0e0e0ee'.decode('hex'),
        PREFIX='fefeefcf0e0f3434'.decode('hex'),
        P2P_PORT=31606,
        MIN_TARGET=0,
        MAX_TARGET=2**256//2**20 - 1,
        PERSIST=False,
        WORKER_PORT=31707,
   BOOTSTRAP_ADDRS=''.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-alt',
        VERSION_CHECK=lambda v: True,
    ),

AND..


skatecoin=math.Object(
        P2P_PREFIX='fcd9b7dd'.decode('hex'),
        P2P_PORT=21607,
        ADDRESS_VERSION=25,
        RPC_PORT=21606,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'skatecoinaddress' in (yield bitcoind.rpc_help()) and
            not (yield bitcoind.rpc_getinfo())['testnet']
        )),
        SUBSIDY_FUNC=lambda height: 25*100000000,
        POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
        BLOCK_PERIOD=90, # s
        SYMBOL='SK8',
        CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'SkateCoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/SkateCoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.skatecoin'), 'skatecoin.conf'),

        BLOCK_EXPLORER_URL_PREFIX='http://skatechain.info/block/',
        ADDRESS_EXPLORER_URL_PREFIX='http://skatechain.info/address/',
        TX_EXPLORER_URL_PREFIX='http://skatechain.info/tx/',
        SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
        DUMB_SCRYPT_DIFF=2**16,
        DUST_THRESHOLD=0.03e8,


Now i run p2pool

python ./p2pool-rav/run_p2pool.py --net skatecoin -a BGysxf56z6cX1e68EoRv8fzwa8J6V1HLoQ -f 1 -w 31707 --give-author 0 --bitcoind-p2p-port 21607 --bitcoind-rpc-port 2106 skatecoinrpc my rpc pass from skatecoin.conf


Output:


2014-03-15 18:55:21.413497 p2pool (version 13.3-247-g2ffa4af-dirty)
2014-03-15 18:55:21.413580
2014-03-15 18:55:21.413636 Testing bitcoind RPC connection to 'http://127.0.0.1:21606/' with username 'skatecoinrpc'...
2014-03-15 18:55:21.416764 >     Check failed! Make sure that you're connected to the right bitcoind with --bitcoind-rpc-port!
2014-03-15 18:55:22.419917 >     Check failed! Make sure that you're connected to the right bitcoind with --bitcoind-rpc-port!
2014-03-15 18:55:23.422838 >     Check failed! Make sure that you're connected to the right bitcoind with --bitcoind-rpc-port!


Tell me please what i'm doing wrong?
full member
Activity: 140
Merit: 100
March 13, 2014, 11:45:42 PM
#25
Oh ok I see, thanks for the explanaion Smiley

Are the 2 networks.py files the only to modify to get an alt-coin based on scrypt working on p2pool?
legendary
Activity: 1270
Merit: 1000
March 08, 2014, 11:16:39 PM
#24
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.

There is a promising new pull request that takes the subsidy function out into a 'module' to return a value. Have been meaning to dig into it as a solution not only for DOGE, etc. but also for WDC and it's decreasing reward.

Yeah I saw that for dgb, I've set up a pool with the subsidy function from the py_module made by chaeplin. Sounds promising for other alts Tongue

But if you look at dogecoin in networks.py from Rav3nPL github the subsidy function is: SUBSIDY_FUNC=lambda height: 10000*100000000. How can it works?

I doesn't really...it produces blocks of only 10,000 DOGE when the SUBSIDY_FUNC is actually used. The blockchain has many examples of this happening. Funny thing is others have used that same value for other coins that have random block rewards. I was staging a protest by not running a DOGE node for a while but finally gave in  Roll Eyes

Fortunately changing SUBIDY_FUNC is not a value that requires a new fork of the coins p2pool sharechain so it can be done node by node whenever they like. I think the DGB p2pool started a new fork (changing ident/prefix) not knowing this  Tongue
full member
Activity: 140
Merit: 100
March 07, 2014, 05:14:44 AM
#23
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.

There is a promising new pull request that takes the subsidy function out into a 'module' to return a value. Have been meaning to dig into it as a solution not only for DOGE, etc. but also for WDC and it's decreasing reward.

Yeah I saw that for dgb, I've set up a pool with the subsidy function from the py_module made by chaeplin. Sounds promising for other alts Tongue

But if you look at dogecoin in networks.py from Rav3nPL github the subsidy function is: SUBSIDY_FUNC=lambda height: 10000*100000000. How can it works?
member
Activity: 81
Merit: 10
March 07, 2014, 02:13:37 AM
#22
Quote
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

I've try but it dont work...
But there must be a chance to make it there are many p2pools for so much coins.  Huh Undecided

Its not the PREFIX i've test it on an other coin, i search the point...
legendary
Activity: 1270
Merit: 1000
March 07, 2014, 01:48:40 AM
#21
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.

There is a promising new pull request that takes the subsidy function out into a 'module' to return a value. Have been meaning to dig into it as a solution not only for DOGE, etc. but also for WDC and it's decreasing reward.
legendary
Activity: 1270
Merit: 1000
March 07, 2014, 01:44:29 AM
#20
full member
Activity: 140
Merit: 100
March 06, 2014, 04: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.
member
Activity: 81
Merit: 10
March 06, 2014, 03: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
zvs
legendary
Activity: 1680
Merit: 1000
https://web.archive.org/web/*/nogleg.com
March 06, 2014, 04: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
full member
Activity: 210
Merit: 100
March 06, 2014, 12:56:09 AM
#16
Great resource, will be using this to get P2Pools running for some of the newer coins
full member
Activity: 122
Merit: 100
March 05, 2014, 06:32:28 PM
#15
What is MAX_TARGET?  I've noticed it's different for various coins but not sure how it's computed.
legendary
Activity: 1270
Merit: 1000
February 28, 2014, 02: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.
full member
Activity: 155
Merit: 100
February 28, 2014, 11:02:28 AM
#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?
legendary
Activity: 1270
Merit: 1000
February 23, 2014, 03: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.
legendary
Activity: 1270
Merit: 1000
February 21, 2014, 01:59:32 PM
#11
Updated RPC_CHECK= ... 'litecoinaddress' to also include:
You can also find this in rpcdump.cpp after "dumpprivkey <"

Thanks deeppurple72
Pages:
Jump to: