Post
Topic
Board Altcoin Discussion
Re: *** WorldCoin Pool Report *** All your WDC Pool Talk Here ***
by
WOPR
on 20/05/2013, 19:48:31 UTC
P2Pool admins please share your code. P2Pool is GPLv3.  Wink
Thanks.

edit: Correct me if I'm wrong, but i think if you fork GPL software, you have to make the source code available.

You are right, here's mine

p2pool/p2pool/networks.py
    
Code:
worldcoin=math.Object(
        PARENT=networks.nets['worldcoin'],
        SHARE_PERIOD=15,
        CHAIN_LENGTH=24*60*60//10,
        REAL_CHAIN_LENGTH=24*60*60//10,
        TARGET_LOOKBEHIND=200,
        SPREAD=30,
        IDENTIFIER='e021a7b8c602421f'.decode('hex'),
        PREFIX='e280193ae6b8617b'.decode('hex'),
        P2P_PORT=48907,
        MIN_TARGET=0,
        MAX_TARGET=2**256//2**20 - 1,
        PERSIST=False,
        WORKER_PORT=19331,
        BOOTSTRAP_ADDRS=''.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-worldcoin',
        VERSION_CHECK=lambda v: True,
    ),


p2pool/p2pool/bitcoin/networks.py
    
Code:
worldcoin=math.Object(
        P2P_PREFIX='fbc0b6db'.decode('hex'),
        P2P_PORT=11081,
        ADDRESS_VERSION=73,
        RPC_PORT=11082,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'worldcoinaddress' in (yield bitcoind.rpc_help()) and
            not (yield bitcoind.rpc_getinfo())['testnet']
        )),
        SUBSIDY_FUNC=lambda height: 32*100000000 >> (height + 1)//2650000,
        POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
        BLOCK_PERIOD=15,
        SYMBOL='WDC',
        CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Worldcoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Worldcoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.worldcoin'), 'worldcoin.conf'),
        BLOCK_EXPLORER_URL_PREFIX='http://wdc.a-df.net:2750/chain/Worldcoin/block/',
        ADDRESS_EXPLORER_URL_PREFIX='http://wdc.a-df.net:2750/chain/Worldcoin/address/',
        SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
        DUMB_SCRYPT_DIFF=2**16,
    ),