Author

Topic: P2pool, 6 ports are defined for each coin? (Read 658 times)

newbie
Activity: 25
Merit: 0
February 23, 2014, 10:23:36 PM
#1
Perhaps someone could help clarify/correct my understanding.

There are a total of 6 ports defined for p2pool and a coin.

For example, there is the coin daemon .conf file that you must you configure, it contains 2 ports. These ports are used by P2pool to connect to the coin daemon. One is a standard rpc, the other is a json format rpc.

        rpcport=9334
        port=9335


There is also ports defined in the networks.py file for each coin in ~/p2pool/p2pool. In this file it defines a p2p_port which is the port that is used to connect to the p2pool peers for that particular coin. The worker port is fairly easy, it is the port through which your cgminers connect. You will also use this port for the web-static http site.

    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,

There is also ports defined in the networks.py file located in ~/p2pool/p2pool/bitcoin. This file seems a bit redundant. I am using a networks.py from https://github.com/Rav3nPL/p2pool-rav/ there are several coins defined in his networks.py. I know some of the coins are out of date. So before I actually install the coin, I insure the ports are correct. In some cases the ports defined in this networks.py file are completely new ports than above. In some cases the ports are defined as the same in daemon .conf file, in other cases they match the networks.py from above. I am fairly certain that the ports here have no purpose.

    litecoin=math.Object(
        P2P_PREFIX='fbc0b6db'.decode('hex'),
        P2P_PORT=9333,
        ADDRESS_VERSION=48,
        RPC_PORT=9332,

Jump to: