Author

Topic: Could someone please explain how to add coins to P2Pool? (Read 1355 times)

legendary
Activity: 1140
Merit: 1000
The Real Jude Austin
also don't forget to update your trc daemon, another build was mandatory yesterday.
(as pointed out by roy7 on other threads here, you may have to use "-reindex" if you updated after block 181200)


AGAIN?

Jeez!
member
Activity: 112
Merit: 10
also don't forget to update your trc daemon, another build was mandatory yesterday.
(as pointed out by roy7 on other threads here, you may have to use "-reindex" if you updated after block 181200)
hero member
Activity: 756
Merit: 501
member
Activity: 112
Merit: 10
don't forget to tell us how it goes Smiley
member
Activity: 112
Merit: 10
when you've done this, if you still have doubts or precise questions, i'm pretty sure anyone would be happy to give you precise answers, including Forrest Smiley
member
Activity: 112
Merit: 10
i suggest you start with a currency close to bitcoin or litecoin, with small differences in the delays involved, but no funky features. Parameters would then be easy to define.

Take a few moments to choose your share period, as this will have significant impacts on miners.
When you have your first set of parameters, fire up two p2pool nodes using your new network definition, and mine enough blocks to see effects on share difficulty. Starting with testnet will help you with this.
legendary
Activity: 1140
Merit: 1000
The Real Jude Austin
I am just going to setup a VM tonight and start poking and prodding and noting the results.

I suppose I will figure it out the hard way.

Thanks for causing me more confusion, haha, just kidding.

Thanks for your help!
member
Activity: 112
Merit: 10
if you can afford the time, don't give up, have a closer look at p2pool overall features and behaviour, then eventually look for the few remaining parameters you have some doubts about, through p2pool code, you'll get a pretty good idea of what it's used for, then the answer to your question will be obvious, plus you'll really know what you're doing.
member
Activity: 112
Merit: 10
So the chain_length settings only relate to P2Pool and not to the coin itself?

source: https://github.com/forrestv/p2pool/blob/master/p2pool/networks.py
What are the settings I will need to change to work with an additional coin?

If you don't see, i guess the best answer i can give is "then don't" Sad
Ask the "coin" author to implement those if you have any doubt on any of those parameters otherwise you'll just release some useless settings.

It all confuses me a bit because I am having difficulty understanding what these settings pertain to.
Are they crucial for P2Pool? Or the coin? Or both?

That defines the core p2pool behaviour and some basic "coin" parameters, so yes every single option is important.
legendary
Activity: 1140
Merit: 1000
The Real Jude Austin
So the chain_length settings only relate to P2Pool and not to the coin itself?

What are the settings I will need to change to work with an additional coin?

It all confuses me a bit because I am having difficulty understanding what these settings pertain to.

Are they crucial for P2Pool? Or the coin? Or both?
member
Activity: 112
Merit: 10
the remaining parameter that should confuse you is the PERSIST option ; you'll probably have to set it to False when bootstrapping your network.
member
Activity: 112
Merit: 10
IDENTIFIER and PREFIX can be seen as random values identifying this network and its current parameters.

those values should match between peers so this network is considered as "the same".

other settings should be self explaining assuming you know the major differences between a standard pool and p2pool.
legendary
Activity: 1140
Merit: 1000
The Real Jude Austin
I've asked ForrestV, he never answers me, lol.

All I want to know is where do I get the information required to edit networks.py and bitcoin/networks.py on P2Pool to add altcoins?

Even just the slightest bit of information would be helpful!

The part that confuses me the most is the IDENTIFIER and PREFIX seen here:

Code:
    bitcoin=math.Object(
        PARENT=networks.nets['bitcoin'],
        SHARE_PERIOD=30, # seconds
        NEW_SHARE_PERIOD=30, # seconds
        CHAIN_LENGTH=24*60*60//10, # shares
        REAL_CHAIN_LENGTH=24*60*60//10, # shares
        TARGET_LOOKBEHIND=200, # shares
        SPREAD=3, # blocks
        NEW_SPREAD=3, # blocks
        IDENTIFIER='fc70035c7a81bc6f'.decode('hex'),
        PREFIX='2472ef181efcd37b'.decode('hex'),
        P2P_PORT=9333,
        MIN_TARGET=0,
        MAX_TARGET=2**256//2**32 - 1,
        PERSIST=True,
        WORKER_PORT=9332,
        BOOTSTRAP_ADDRS='forre.st vps.forre.st portals94.ns01.us 54.227.25.14 119.1.96.99 204.10.105.113 76.104.150.248 89.71.151.9 76.114.13.54 72.201.24.106 79.160.2.128 207.244.175.195 168.7.116.243 94.23.215.27 218.54.45.177 5.9.157.150 78.155.217.76 91.154.90.163 173.52.43.124 78.225.49.209 220.135.57.230 169.237.101.193:8335 98.236.74.28 204.19.23.19 98.122.165.84:8338 71.90.88.222 67.168.132.228 193.6.148.18 80.218.174.253 50.43.56.102 68.13.4.106 24.246.31.2 176.31.208.222 1.202.128.218 86.155.135.31 204.237.15.51 5.12.158.126:38007 202.60.68.242 94.19.53.147 65.130.126.82 184.56.21.182 213.112.114.73 218.242.51.246 86.173.200.160 204.15.85.157 37.59.15.50 62.217.124.203 80.87.240.47 198.61.137.12 108.161.134.32 198.154.60.183:10333 71.39.52.34:9335 46.23.72.52:9343 83.143.42.177 192.95.61.149 144.76.17.34 46.65.68.119 188.227.176.66:9336 75.142.155.245:9336 213.67.135.99 76.115.224.177 50.148.193.245 64.53.185.79 80.65.30.137 109.126.14.42 76.84.63.146'.split(' '),
        ANNOUNCE_CHANNEL='#p2pool',
        VERSION_CHECK=lambda v: 50700 <= v < 60000 or 60010 <= v < 60100 or 60400 <= v,
    ),

And also here in bitcoin/networks.py:

Code:
    bitcoin=math.Object(
        P2P_PREFIX='f9beb4d9'.decode('hex'),
        P2P_PORT=8333,
        ADDRESS_VERSION=0,
        RPC_PORT=8332,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'bitcoinaddress' in (yield bitcoind.rpc_help()) and
            not (yield bitcoind.rpc_getinfo())['testnet']
        )),
        SUBSIDY_FUNC=lambda height: 50*100000000 >> (height + 1)//210000,
        POW_FUNC=data.hash256,
        BLOCK_PERIOD=600, # s
        SYMBOL='BTC',
        CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Bitcoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Bitcoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.bitcoin'), 'bitcoin.conf'),
        BLOCK_EXPLORER_URL_PREFIX='https://blockchain.info/block/',
        ADDRESS_EXPLORER_URL_PREFIX='https://blockchain.info/address/',
        SANE_TARGET_RANGE=(2**256//2**32//1000 - 1, 2**256//2**32 - 1),
        DUMB_SCRYPT_DIFF=1,
        DUST_THRESHOLD=0.001e8,
    ),

I also know that the net name needs to be added to bitcoin/helper.py.

I just need to know how to get this information from the coin so that I can implement it.

I would even be willing to pay someone to help me with this.

I own P2Pool.org and I would like to offer as many coins as I possibly can and I know I can't do that with some coins because of their work scheme.

Jump to: