Ejemplo n.º 1
0
    def start(cls, net, factory, dcrd, peer_ports, merged_urls):
        self = cls()

        self.n = node.Node(factory, dcrd, [], [], net)
        yield self.n.start()

        self.n.p2p_node = node.P2PNode(self.n,
                                       port=0,
                                       max_incoming_conns=1000000,
                                       addr_store={},
                                       connect_addrs=[
                                           ('127.0.0.1', peer_port)
                                           for peer_port in peer_ports
                                       ])
        self.n.p2p_node.start()

        wb = work.WorkerBridge(node=self.n,
                               my_pubkey_hash=random.randrange(2**160),
                               donation_percentage=random.uniform(0, 10),
                               merged_urls=merged_urls,
                               worker_fee=3,
                               args=math.Object(
                                   donation_percentage=random.uniform(0, 10),
                                   address='foo',
                                   worker_fee=3,
                                   timeaddresses=1000),
                               pubkeys=main.keypool(),
                               dcrd=dcrd)
        self.wb = wb
        web_root = resource.Resource()
        worker_interface.WorkerInterface(wb).attach_to(web_root)
        self.web_port = reactor.listenTCP(0, server.Site(web_root))

        defer.returnValue(self)
Ejemplo n.º 2
0
    def test_node(self):
        bitd = dcrd()

        mm_root = resource.Resource()
        mm_root.putChild('', jsonrpc.HTTPServer(mm_provider))
        mm_port = reactor.listenTCP(0, server.Site(mm_root))

        n = node.Node(bitd, bitd, [], [], mynet)
        yield n.start()

        wb = work.WorkerBridge(node=n,
                               my_pubkey_hash=42,
                               donation_percentage=2,
                               merged_urls=[('http://127.0.0.1:%i' %
                                             (mm_port.getHost().port, ), '')],
                               worker_fee=3,
                               args=math.Object(donation_percentage=2,
                                                address='foo',
                                                worker_fee=3,
                                                timeaddresses=1000),
                               pubkeys=main.keypool(),
                               dcrd=bitd)
        web_root = resource.Resource()
        worker_interface.WorkerInterface(wb).attach_to(web_root)
        port = reactor.listenTCP(0, server.Site(web_root))

        proxy = jsonrpc.HTTPProxy(
            'http://127.0.0.1:' + str(port.getHost().port),
            headers=dict(Authorization='Basic ' +
                         base64.b64encode('user/0:password')))

        yield deferral.sleep(3)

        for i in xrange(100):
            blah = yield proxy.rpc_getwork()
            yield proxy.rpc_getwork(blah['data'])

        yield deferral.sleep(3)

        assert len(n.tracker.items) == 100
        assert n.tracker.verified.get_height(n.best_share_var.value) == 100

        wb.stop()
        n.stop()

        yield port.stopListening()
        del n, wb, web_root, port, proxy
        import gc
        gc.collect()
        gc.collect()
        gc.collect()

        yield deferral.sleep(20)  # waiting for work_poller to exit
        yield mm_port.stopListening()
Ejemplo n.º 3
0
nets = dict(
    digibyteScrypt=math.Object(
        P2P_PREFIX='fac3b6da'.decode('hex'),  #pchmessagestart
        P2P_PORT=12024,
        ADDRESS_VERSION=30,  #pubkey_address
        RPC_PORT=14022,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'digibyteaddress' in (yield bitcoind.rpc_help()) and not (
                yield bitcoind.rpc_getinfo())['testnet'])),
        SUBSIDY_FUNC=lambda height: __import__('digibyte_subsidy').
        GetBlockBaseValue(height),
        POW_FUNC=lambda data: pack.IntType(256).unpack(
            __import__('ltc_scrypt').getPoWHash(data)),
        BLOCK_PERIOD=30,  # s
        SYMBOL='DGB',
        CONF_FILE_FUNC=lambda: os.path.join(
            os.path.join(os.environ['APPDATA'], 'digibyte')
            if platform.system() == 'Windows' else os.path.expanduser(
                '~/Library/Application Support/digibyte/')
            if platform.system() == 'Darwin' else os.path.expanduser(
                '~/.digibyte'), 'digibyte.conf'),
        BLOCK_EXPLORER_URL_PREFIX='http://altexplorer.net/block/',
        ADDRESS_EXPLORER_URL_PREFIX='http://altexplorer.net/address/',
        TX_EXPLORER_URL_PREFIX='http://altexplorer.net/tx/',
        SANE_TARGET_RANGE=(2**256 // 2**32 // 1000 - 1, 2**256 // 2**32 - 1),
        DUMB_SCRYPT_DIFF=2**16,
        DUST_THRESHOLD=0.001e8,
    ),
    digibyteScrypt_testnet=math.Object(
        P2P_PREFIX='fcc1b7dc'.decode('hex'),  #pchmessagestart
Ejemplo n.º 4
0
# REAL_CHAIN_LENGTH = maximum number of shares back client uses to compute payout
# REAL_CHAIN_LENGTH must always be <= CHAIN_LENGTH
# REAL_CHAIN_LENGTH must be changed in sync with all other clients
# changes can be done by changing one, then the other

nets = dict(
    bitcoin=math.Object(
        PARENT=networks.nets['bitcoin'],
        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
        IDENTIFIER='fc70035c7a81bc6f'.decode('hex'),
        PREFIX='2472ef181efcd37b'.decode('hex'),
        P2P_PORT=9333,
        MIN_TARGET=4,
        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,
        VERSION_WARNING=lambda v: 'Upgrade Bitcoin to >=0.8.5!' if v < 80500 else None,
    ),

    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
Ejemplo n.º 5
0
# REAL_CHAIN_LENGTH must be changed in sync with all other clients
# changes can be done by changing one, then the other

nets = dict(
    bitcoin=math.Object(
        PARENT=networks.nets['bitcoin'],
        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
        IDENTIFIER='fc70035c7a81bc6f'.decode('hex'),
        PREFIX='2472ef181efcd37b'.decode('hex'),
        P2P_PORT=9333,
        MIN_TARGET=4,
        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,
        VERSION_WARNING=lambda v: 'Upgrade Bitcoin to >=0.8.5!'
        if v < 80500 else None,
    ),
    litecoin=math.Object(
        PARENT=networks.nets['litecoin'],
        SHARE_PERIOD=15,  # seconds
        CHAIN_LENGTH=24 * 60 * 60 // 10,  # shares
Ejemplo n.º 6
0
# CHAIN_LENGTH = number of shares back client keeps
# REAL_CHAIN_LENGTH = maximum number of shares back client uses to compute payout
# REAL_CHAIN_LENGTH must always be <= CHAIN_LENGTH
# REAL_CHAIN_LENGTH must be changed in sync with all other clients
# changes can be done by changing one, then the other

nets = dict(
    noblecoin=math.Object(
        PARENT=networks.nets['noblecoin'],
        SHARE_PERIOD=15,  # seconds target spacing
        CHAIN_LENGTH=24 * 60 * 60 // 10,  # shares
        REAL_CHAIN_LENGTH=24 * 60 * 60 // 10,  # shares
        TARGET_LOOKBEHIND=200,  # shares coinbase maturity
        SPREAD=30,  # blocks
        IDENTIFIER='e021a7b8c322482a'.decode('hex'),
        PREFIX='e280193ae6a4927a'.decode('hex'),
        P2P_PORT=9184,
        MIN_TARGET=0,
        MAX_TARGET=2**256 // 2**20 - 1,
        PERSIST=False,
        WORKER_PORT=9188,
        BOOTSTRAP_ADDRS=
        'p2pool-us.coin-project.org p2pool-eu.coin-project.org p2pool-eu.gotgeeks.com p2pool-us.gotgeeks.com rav3n.dtdns.net doge.dtdns.net pool.hostv.pl p2pool.org p2pool.gotgeeks.com p2pool.dtdns.net solidpool.org taken.pl polishcoin.info pcc.paybtc.pl us-east1.cryptovein.com'
        .split(' '),
        ANNOUNCE_CHANNEL='#cryptovein',
        VERSION_CHECK=lambda v: True,
    ), )
for net_name, net in nets.iteritems():
    net.NAME = net_name
Ejemplo n.º 7
0

nets = dict(
    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(
            (yield check_genesis_block(
                bitcoind,
                '000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f'
            )) 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/',
        TX_EXPLORER_URL_PREFIX='https://blockchain.info/tx/',
        SANE_TARGET_RANGE=(2**256 // 2**32 // 1000 - 1, 2**256 // 2**32 - 1),
        DUMB_SCRYPT_DIFF=1,
        DUST_THRESHOLD=0.001e8,
    ),
    bitcoin_testnet=math.Object(
        P2P_PREFIX='0b110907'.decode('hex'),
        P2P_PORT=18333,
Ejemplo n.º 8
0
# REAL_CHAIN_LENGTH must always be <= CHAIN_LENGTH
# REAL_CHAIN_LENGTH must be changed in sync with all other clients
# changes can be done by changing one, then the other

nets = dict(
    bitcoin=math.Object(
        PARENT=networks.nets['bitcoin'],
        SHARE_PERIOD=10,  # seconds
        CHAIN_LENGTH=24 * 60 * 60 // 10,  # shares
        REAL_CHAIN_LENGTH=24 * 60 * 60 // 10,  # shares
        TARGET_LOOKBEHIND=200,  # shares
        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 74.220.242.6:9334 93.97.192.93 66.90.73.83 67.83.108.0 219.84.64.174 24.167.17.248 109.74.195.142 83.211.86.49 94.23.34.145 168.7.116.243 94.174.40.189:9344 89.79.79.195 portals94.ns01.us'
        .split(' '),
        ANNOUNCE_CHANNEL='#p2pool',
        VERSION_CHECK=lambda v: 50700 <= v < 60000 or 60010 <= v < 60100 or
        60400 <= v,
    ),
    bitcoin_testnet=math.Object(
        PARENT=networks.nets['bitcoin_testnet'],
        SHARE_PERIOD=10,  # seconds
        CHAIN_LENGTH=60 * 60 // 10,  # shares
        REAL_CHAIN_LENGTH=60 * 60 // 10,  # shares
Ejemplo n.º 9
0
# CHAIN_LENGTH = number of shares back client keeps
# REAL_CHAIN_LENGTH = maximum number of shares back client uses to compute payout
# REAL_CHAIN_LENGTH must always be <= CHAIN_LENGTH
# REAL_CHAIN_LENGTH must be changed in sync with all other clients
# changes can be done by changing one, then the other

nets = dict(
    verium=math.Object(
        PARENT=networks.nets['verium'],
        SHARE_PERIOD=15,  # seconds
        CHAIN_LENGTH=12 * 60 * 60 // 15,  # shares
        REAL_CHAIN_LENGTH=12 * 60 * 60 // 15,  # shares
        TARGET_LOOKBEHIND=20,  # shares
        SPREAD=10,  # blocks
        IDENTIFIER='e037d5b8c6923610'.decode('hex'),
        PREFIX='70352205'.decode('hex'),
        P2P_PORT=36988,
        MIN_TARGET=0,
        MAX_TARGET=2**256 // 2**20 - 1,
        PERSIST=True,
        WORKER_PORT=8336,
        BOOTSTRAP_ADDRS='198.52.200.75'.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-alt',
        VERSION_CHECK=lambda v: v >= 80001,
    ),
    verium_testnet=math.Object(
        PARENT=networks.nets['verium_testnet'],
        SHARE_PERIOD=15,  # seconds
        CHAIN_LENGTH=12 * 60 * 60 // 15,  # shares
        REAL_CHAIN_LENGTH=12 * 60 * 60 // 15,  # shares
        TARGET_LOOKBEHIND=20,  # shares
        SPREAD=10,  # blocks
Ejemplo n.º 10
0
# CHAIN_LENGTH = number of shares back client keeps
# REAL_CHAIN_LENGTH = maximum number of shares back client uses to compute payout
# REAL_CHAIN_LENGTH must always be <= CHAIN_LENGTH
# REAL_CHAIN_LENGTH must be changed in sync with all other clients
# changes can be done by changing one, then the other

nets = dict(
    saffroncoinscrypt=math.Object(
        PARENT=networks.nets['saffroncoinscrypt'],
        SHARE_PERIOD=20,  # seconds
        NEW_SHARE_PERIOD=20,  # seconds
        CHAIN_LENGTH=24 * 60 * 60 // 10,  # shares
        REAL_CHAIN_LENGTH=24 * 60 * 60 // 10,  # shares
        TARGET_LOOKBEHIND=
        50,  # shares  //with that the pools share diff is adjusting faster, important if huge hashing power comes to the pool
        SPREAD=30,  # blocks
        NEW_SPREAD=30,  # blocks
        IDENTIFIER='55984712ffff1147'.decode('hex'),
        PREFIX='36325418ffff2566'.decode('hex'),
        P2P_PORT=1716,
        MIN_TARGET=0,
        MAX_TARGET=2**256 // 2**20 - 1,
        PERSIST=False,
        WORKER_PORT=1718,
        BOOTSTRAP_ADDRS='p2poolcoin.com ca.p2poolcoin.com'.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-sfr',
        VERSION_CHECK=lambda v: True,
    ), )
for net_name, net in nets.iteritems():
    net.NAME = net_name
Ejemplo n.º 11
0
# REAL_CHAIN_LENGTH must be changed in sync with all other clients
# changes can be done by changing one, then the other

nets = dict(
    bitcoin=math.Object(
        PARENT=networks.nets['bitcoin'],
        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
        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,
        VERSION_WARNING=lambda v: 'Upgrade Bitcoin to >=0.8.5!'
        if v < 80500 else None,
    ),
    bitcoin_testnet=math.Object(
        PARENT=networks.nets['bitcoin_testnet'],
        SHARE_PERIOD=30,  # seconds
        CHAIN_LENGTH=60 * 60 // 10,  # shares
Ejemplo n.º 12
0
        defer.returnValue(False)
    else:
        defer.returnValue(True)

nets = dict(
    dash=math.Object(
        P2P_PREFIX='bf0c6bbd'.decode('hex'),
        P2P_PORT=9999,
        ADDRESS_VERSION=76,
        RPC_PORT=9998,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'dashaddress' in (yield bitcoind.rpc_help()) and
            not (yield bitcoind.rpc_getinfo())['testnet']
        )),
        SUBSIDY_FUNC=lambda nBits, height: __import__('dash_subsidy').GetBlockBaseValue(nBits, height),
        BLOCKHASH_FUNC=lambda data: pack.IntType(256).unpack(__import__('xcoin_hash').getPoWHash(data)),
        POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('xcoin_hash').getPoWHash(data)),
        BLOCK_PERIOD=150, # s
        SYMBOL='DASH',
        CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'dash') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/dash/') if platform.system() == 'Darwin' else os.path.expanduser('~/.dash'), 'dash.conf'),
        BLOCK_EXPLORER_URL_PREFIX='http://explorer.darkcoin.io/block/',
        ADDRESS_EXPLORER_URL_PREFIX='http://explorer.darkcoin.io/address/',
        TX_EXPLORER_URL_PREFIX='http://explorer.darkcoin.io/tx/',
        SANE_TARGET_RANGE=(2**256//2**32//1000 - 1, 2**256//2**20 - 1),
        DUMB_SCRYPT_DIFF=1,
        DUST_THRESHOLD=0.001e8,
    ),
    dash_testnet=math.Object(
        P2P_PREFIX='cee2caff'.decode('hex'),
        P2P_PORT=19999,
        ADDRESS_VERSION=111,
        RPC_PORT=19998,
Ejemplo n.º 13
0
 Dougcoin=math.Object(
     P2P_PREFIX='fea503dd'.decode('hex'),
     P2P_PORT=6969,
     ADDRESS_VERSION=7,
     RPC_PORT=6968,
     RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
         'dougcoinaddress' in (yield bitcoind.rpc_help()) and not (
             yield bitcoind.rpc_getinfo())['testnet'])),
     SUBSIDY_FUNC=lambda height: 10240 * 100000000 >> (height + 1) // 86400,
     BLOCKHASH_FUNC=lambda data: pack.IntType(256).unpack(
         __import__('quark_hash').getPoWHash(data)),
     POW_FUNC=lambda data: pack.IntType(256).unpack(
         __import__('quark_hash').getPoWHash(data)),
     BLOCK_PERIOD=30,  # s
     SYMBOL='DOUG',
     CONF_FILE_FUNC=lambda: os.path.join(
         os.path.join(os.environ['APPDATA'], 'Dougcoin')
         if platform.system() == 'Windows' else os.path.expanduser(
             '~/Library/Application Support/Dougcoin/')
         if platform.system() == 'Darwin' else os.path.expanduser(
             '~/.Dougcoin'), 'Dougcoin.conf'),
     BLOCK_EXPLORER_URL_PREFIX='http://dougexplorer.lowend.fm/block/',
     ADDRESS_EXPLORER_URL_PREFIX='http://dougexplorer.lowend.fm/address/',
     ### Neisklar: normally 2**24 should be 2**20 BUT the quark enabled minerd is coded so that it only detects hashes below 0x000000xxxxxxx
     ###           and 2*20 would be 0x00000FFFF, maybe changing that in the miner  would be a good idea for slower ones...
     ### Update:   the minerd is (at least in GitHub) updated so that it would also detect targets below 2**24 (0x000000xxxx..), (Quarkcoins starts with 2**20 (0x00000xxxx...))
     ###           maybe for new standalone p2pools it's a good choice at the beginning, but ONLY when new hashing power is gradually added...
     #SANE_TARGET_RANGE=(2**256//2**32//1000 - 1, 2**256//2**24 - 1),
     SANE_TARGET_RANGE=(2**256 // 2**32 // 1000 - 1, 2**256 // 2**20 - 1),
     DUMB_SCRYPT_DIFF=1,
     DUST_THRESHOLD=0.001e8,
 ))
Ejemplo n.º 14
0
# REAL_CHAIN_LENGTH must always be <= CHAIN_LENGTH
# REAL_CHAIN_LENGTH must be changed in sync with all other clients
# changes can be done by changing one, then the other

nets = dict(
    bitcoin=math.Object(
        PARENT=networks.nets['bitcoin'],
        SHARE_PERIOD=10,  # seconds
        CHAIN_LENGTH=24 * 60 * 60 // 10,  # shares
        REAL_CHAIN_LENGTH=24 * 60 * 60 // 10,  # shares
        TARGET_LOOKBEHIND=200,  # shares
        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 74.220.242.6:9334 93.97.192.93 66.90.73.83 67.83.108.0 219.84.64.174 24.167.17.248 109.74.195.142 83.211.86.49 94.23.34.145 168.7.116.243 94.174.40.189:9344 89.79.79.195 portals94.ns01.us'
        .split(' '),
        ANNOUNCE_CHANNEL='#p2pool',
        VERSION_CHECK=lambda v: 50700 <= v < 60000 or 60010 <= v < 60100 or
        60400 <= v,
    ),
    bitcoin_testnet=math.Object(
        PARENT=networks.nets['bitcoin_testnet'],
        SHARE_PERIOD=10,  # seconds
        CHAIN_LENGTH=60 * 60 // 10,  # shares
        REAL_CHAIN_LENGTH=60 * 60 // 10,  # shares
Ejemplo n.º 15
0
# REAL_CHAIN_LENGTH must be changed in sync with all other clients
# changes can be done by changing one, then the other

nets = dict(
    bitcoin=math.Object(
        PARENT=networks.nets['bitcoin'],
        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
        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,
        VERSION_WARNING=lambda v: 'Upgrade Bitcoin to >=0.8.5!'
        if v < 80500 else None,
    ),
    bitcoin_testnet=math.Object(
        PARENT=networks.nets['bitcoin_testnet'],
        SHARE_PERIOD=30,  # seconds
        CHAIN_LENGTH=60 * 60 // 10,  # shares
Ejemplo n.º 16
0
        defer.returnValue(False)
    else:
        defer.returnValue(True)

nets = dict(
    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(
            (yield check_genesis_block(bitcoind, '000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f')) 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/',
        TX_EXPLORER_URL_PREFIX='https://blockchain.info/tx/',
        SANE_TARGET_RANGE=(2**256//2**32//1000 - 1, 2**256//2**32 - 1),
        DUMB_SCRYPT_DIFF=1,
        DUST_THRESHOLD=0.001e8,
    ),
    bitcoin_testnet=math.Object(
        P2P_PREFIX='0b110907'.decode('hex'),
        P2P_PORT=18333,
        ADDRESS_VERSION=111,
        RPC_PORT=18332,
Ejemplo n.º 17
0
    if nSubsidy > bnUpperBound:
        nSubsidy = nSubsidy - 0.000001

    return int(nSubsidy * 1000000)

nets = dict(
    bitbar=math.Object(
        P2P_PREFIX='e4e8e9e5'.decode('hex'),
        P2P_PORT=8777,
        ADDRESS_VERSION=25,
        RPC_PORT=9344,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'bitbaraddress' in (yield bitcoind.rpc_help()) and
            not (yield bitcoind.rpc_getinfo())['testnet']
        )),
        SUBSIDY_FUNC=lambda target: get_subsidy(6, 1, target),
        BLOCKHASH_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
        POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
        BLOCK_PERIOD=600, # s
        SYMBOL='BTB',
        CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'BitBar') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/BitBar/') if platform.system() == 'Darwin' else os.path.expanduser('~/.bitbar'), 'bitbar.conf'),
        BLOCK_EXPLORER_URL_PREFIX='http://btb.cryptocoinexplorer.com/block/',
        ADDRESS_EXPLORER_URL_PREFIX='http://btb.cryptocoinexplorer.com/address/',
        SANE_TARGET_RANGE=(2**256//2**20//1000 - 1, 2**256//2**20 - 1),
    ),
    bitbar_testnet=math.Object(
        P2P_PREFIX='cdf2c0ef'.decode('hex'),
        P2P_PORT=18777,
        ADDRESS_VERSION=115,
        RPC_PORT=19344,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
Ejemplo n.º 18
0
from . import data
from p2pool.util import math, pack

nets = dict(
    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/',
        TX_EXPLORER_URL_PREFIX='https://blockchain.info/tx/',
        SANE_TARGET_RANGE=(2**256 // 2**32 // 1000 - 1, 2**256 // 2**32 - 1),
        DUMB_SCRYPT_DIFF=1,
        DUST_THRESHOLD=0.001e8,
    ),
    bitcoin_testnet=math.Object(
        P2P_PREFIX='0b110907'.decode('hex'),
        P2P_PORT=18333,
        ADDRESS_VERSION=111,
Ejemplo n.º 19
0
# REAL_CHAIN_LENGTH must be changed in sync with all other clients
# changes can be done by changing one, then the other

nets = dict(
    bitcoin=math.Object(
        PARENT=networks.nets['bitcoin'],
        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
        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,
        VERSION_WARNING=lambda v: 'Upgrade Bitcoin to >=0.8.5!'
        if v < 80500 else None,
    ),
    bitcoin_testnet=math.Object(
        PARENT=networks.nets['bitcoin_testnet'],
        SHARE_PERIOD=30,  # seconds
        CHAIN_LENGTH=60 * 60 // 10,  # shares
Ejemplo n.º 20
0
# REAL_CHAIN_LENGTH = maximum number of shares back client uses to compute payout
# REAL_CHAIN_LENGTH must always be <= CHAIN_LENGTH
# REAL_CHAIN_LENGTH must be changed in sync with all other clients
# changes can be done by changing one, then the other

nets = dict(
    novacoin=math.Object(
        PARENT=networks.nets['novacoin'],
        SHARE_PERIOD=15,  # seconds
        CHAIN_LENGTH=12 * 60 * 60 // 10,  # shares
        REAL_CHAIN_LENGTH=12 * 60 * 60 // 10,  # shares
        TARGET_LOOKBEHIND=200,  # shares
        SPREAD=3,  # blocks
        IDENTIFIER='e037d5b8c6923610'.decode('hex'),
        PREFIX='7208c1a53ef659b0'.decode('hex'),
        P2P_PORT=8777,
        MIN_TARGET=0,
        MAX_TARGET=2**256 // 2**20 - 1,
        PERSIST=True,
        WORKER_PORT=8336,
        BOOTSTRAP_ADDRS=
        '81.200.245.198 81.200.241.54 85.234.62.99 188.120.239.144'.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-alt',
        VERSION_CHECK=lambda v: v >= 60011,
    ),
    novacoin_testnet=math.Object(
        PARENT=networks.nets['novacoin_testnet'],
        SHARE_PERIOD=4,  # seconds
        CHAIN_LENGTH=20 * 60 // 3,  # shares
        REAL_CHAIN_LENGTH=20 * 60 // 3,  # shares
        TARGET_LOOKBEHIND=200,  # shares
Ejemplo n.º 21
0
            "hash":
            "2756ea0315d46dc3d8d974f34380873fc88863845ac01a658ef11bc3b368af52",
            "chainid": 1
        }


mynet = math.Object(
    NAME='mynet',
    PARENT=networks.nets['unio'],
    SHARE_PERIOD=5,  # seconds
    CHAIN_LENGTH=20 * 60 // 3,  # shares
    REAL_CHAIN_LENGTH=20 * 60 // 3,  # shares
    TARGET_LOOKBEHIND=200,  # shares
    SPREAD=3,  # blocks
    IDENTIFIER='cca5e24ec6408b1e'.decode('hex'),
    PREFIX='ad9614f6466a39cf'.decode('hex'),
    P2P_PORT=19338,
    MIN_TARGET=2**256 - 1,
    MAX_TARGET=2**256 - 1,
    PERSIST=False,
    WORKER_PORT=19327,
    BOOTSTRAP_ADDRS='72.14.191.28'.split(' '),
    ANNOUNCE_CHANNEL='#p2pool-alt',
    VERSION_CHECK=lambda v: True,
)


class MiniNode(object):
    @classmethod
    @defer.inlineCallbacks
    def start(cls, net, factory, uniod, peer_ports, merged_urls):
Ejemplo n.º 22
0
    ###          The two SPREAD values should definatly be a higher value for such fast coin
    ###          with a relativly low difficulty, so maybe 60, which when we assume the pool 
    ###          gets every third block it's around 90 minutes, means a better distribution of
    ###          earnings, but newer miners will take some time to build up the income.
#  
#
  cnotecoin=math.Object(
        PARENT=networks.nets['cnotecoin'],
        SHARE_PERIOD=15, # seconds
        NEW_SHARE_PERIOD=15, # seconds
        CHAIN_LENGTH=96*60*60//10, # shares
        REAL_CHAIN_LENGTH=96*60*60//10, # shares
        TARGET_LOOKBEHIND=50, # shares  //with that the pools share diff is adjusting faster, important if huge hashing power comes to the pool
        SPREAD=30, # blocks
        NEW_SPREAD=30, # blocks
        IDENTIFIER='fc70135c7a81bc6f'.decode('hex'),
        PREFIX='9472ef181efcd37b'.decode('hex'),
        P2P_PORT=18492,
        MIN_TARGET=0,
        MAX_TARGET=2**256//2**20 - 1,
        PERSIST=False,
        WORKER_PORT=18493,
        BOOTSTRAP_ADDRS=''.split(' '),
        #ANNOUNCE_CHANNEL='#p2pool',
        VERSION_CHECK=lambda v: True,
    ),
 #   cnotecoin_testnet=math.Object(
  #      PARENT=networks.nets['cnotecoin_testnet'],
   #     SHARE_PERIOD=15, # seconds
  #      NEW_SHARE_PERIOD=15, # seconds
 #       CHAIN_LENGTH=24*60*60//10, # shares
  #      REAL_CHAIN_LENGTH=24*60*60//10, # shares
Ejemplo n.º 23
0
# CHAIN_LENGTH = number of shares back client keeps
# REAL_CHAIN_LENGTH = maximum number of shares back client uses to compute payout
# REAL_CHAIN_LENGTH must always be <= CHAIN_LENGTH
# REAL_CHAIN_LENGTH must be changed in sync with all other clients
# changes can be done by changing one, then the other

nets = dict(
    quark=math.Object(
        PARENT=networks.nets['quark'],
        SHARE_PERIOD=10,  # seconds
        CHAIN_LENGTH=24 * 60 * 60 // 10,  # shares
        REAL_CHAIN_LENGTH=24 * 60 * 60 // 10,  # shares
        TARGET_LOOKBEHIND=
        200,  # shares //with that the pools share diff is adjusting faster, important if huge hashing power comes to the pool
        SPREAD=30,  # blocks
        IDENTIFIER='fc70135c7a81bc6f'.decode('hex'),
        PREFIX='9472ef181efcd37b'.decode('hex'),
        COINBASEEXT='0A2F5032506F6F6C2D51524B2D452D506F6F6C2F'.decode('hex'),
        P2P_PORT=5890,
        MIN_TARGET=0,
        MAX_TARGET=2**256 // 2**32 - 1,
        PERSIST=False,
        WORKER_PORT=5860,
        BOOTSTRAP_ADDRS=''.split('p2pool.e-pool.net'),
        ANNOUNCE_CHANNEL='#p2pool-qrk',
        VERSION_CHECK=lambda v: True,
    ), )
for net_name, net in nets.iteritems():
    net.NAME = net_name
Ejemplo n.º 24
0
    defer.returnValue(res)


nets = dict(
    LightCoin=math.Object(
        P2P_PREFIX='a1a0a2a3'.decode('hex'),
        P2P_PORT=24552,
        ADDRESS_VERSION=48,
        RPC_PORT=24551,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'LightCoinaddress' in (yield bitcoind.rpc_help()) and not (
                yield bitcoind.rpc_getinfo())['testnet'])),
        SUBSIDY_FUNC=lambda bitcoind, target: get_subsidy(bitcoind, target),
        BLOCK_PERIOD=60,  # s
        SYMBOL='LIT',
        CONF_FILE_FUNC=lambda: os.path.join(
            os.path.join(os.environ['APPDATA'], 'LightCoin')
            if platform.system() == 'Windows' else os.path.expanduser(
                '~/Library/Application Support/LightCoin/')
            if platform.system() == 'Darwin' else os.path.expanduser(
                '~/.LightCoin'), 'LightCoin.conf'),
        BLOCK_EXPLORER_URL_PREFIX='',
        ADDRESS_EXPLORER_URL_PREFIX='',
        TX_EXPLORER_URL_PREFIX='',
        SANE_TARGET_RANGE=(2**256 // 2**32 // 1000 - 1, 2**256 // 2**20 - 1),
        DUMB_SCRYPT_DIFF=1,
        DUST_THRESHOLD=0.001e8,
    ), )
for net_name, net in nets.iteritems():
    net.NAME = net_name
Ejemplo n.º 25
0
from p2pool.bitcoin import networks
from p2pool.util import math

# CHAIN_LENGTH = number of shares back client keeps
# REAL_CHAIN_LENGTH = maximum number of shares back client uses to compute payout
# REAL_CHAIN_LENGTH must always be <= CHAIN_LENGTH
# REAL_CHAIN_LENGTH must be changed in sync with all other clients
# changes can be done by changing one, then the other

nets = dict(realcoin=math.Object(
    PARENT=networks.nets['realcoin'],
    SHARE_PERIOD=15,
    CHAIN_LENGTH=24 * 60 * 60 // 10,
    REAL_CHAIN_LENGTH=24 * 60 * 60 // 10,
    TARGET_LOOKBEHIND=200,
    SPREAD=30,
    IDENTIFIER='e021a7b8c60244af'.decode('hex'),
    PREFIX='b6c0601991aa12a2'.decode('hex'),
    P2P_PORT=18889,
    MIN_TARGET=0,
    MAX_TARGET=2**256 // 2**20 - 1,
    PERSIST=False,
    WORKER_PORT=18888,
    BOOTSTRAP_ADDRS='',
    ANNOUNCE_CHANNEL='#p2pool-alt',
    VERSION_CHECK=lambda v: True,
), )
for net_name, net in nets.iteritems():
    net.NAME = net_name
Ejemplo n.º 26
0
# CHAIN_LENGTH = number of shares back client keeps
# REAL_CHAIN_LENGTH = maximum number of shares back client uses to compute payout
# REAL_CHAIN_LENGTH must always be <= CHAIN_LENGTH
# REAL_CHAIN_LENGTH must be changed in sync with all other clients
# changes can be done by changing one, then the other

nets = dict(
    ezoncoin=math.Object(
        PARENT=networks.nets['ezoncoin'],
        SHARE_PERIOD=20, # seconds
        CHAIN_LENGTH=24*60*60//20, # shares
        REAL_CHAIN_LENGTH=24*60*60//20, # shares
        TARGET_LOOKBEHIND=100, # shares  //with that the pools share diff is adjusting faster, important if huge hashing power comes to the pool
        SPREAD=10, # blocks
        IDENTIFIER='aa185015e0a384f5'.decode('hex'),
        PREFIX='85fd8cff82f170de'.decode('hex'),
        P2P_PORT=8888,
        MIN_TARGET=0,
        MAX_TARGET=2**256//2**20 - 1,
        PERSIST=False,
        WORKER_PORT=3333,
        BOOTSTRAP_ADDRS=''.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-ezon',
        VERSION_CHECK=lambda v: v >= 1000000,
    ),
    ezoncoin_testnet=math.Object(
        PARENT=networks.nets['ezoncoin_testnet'],
        SHARE_PERIOD=20, # seconds
        CHAIN_LENGTH=24*60*60//20, # shares
        REAL_CHAIN_LENGTH=24*60*60//20, # shares
        TARGET_LOOKBEHIND=100, # shares  //with that the pools share diff is adjusting faster, important if huge hashing power comes to the pool
        SPREAD=10, # blocks
Ejemplo n.º 27
0
# REAL_CHAIN_LENGTH must always be <= CHAIN_LENGTH
# REAL_CHAIN_LENGTH must be changed in sync with all other clients
# changes can be done by changing one, then the other

nets = dict(
    darkcoin=math.Object(
        PARENT=networks.nets['darkcoin'],
        SHARE_PERIOD=15,  # seconds
        CHAIN_LENGTH=24 * 60 * 60 // 15,  # shares
        REAL_CHAIN_LENGTH=24 * 60 * 60 // 15,  # shares
        TARGET_LOOKBEHIND=
        200,  # shares  //with that the pools share diff is adjusting faster, important if huge hashing power comes to the pool
        SPREAD=30,  # blocks
        IDENTIFIER='ef05d164bbcd7ed1'.decode('hex'),
        PREFIX='3966e45ab1ed2db9'.decode('hex'),
        P2P_PORT=8999,
        MIN_TARGET=4,
        MAX_TARGET=2**256 // 2**20 - 1,
        PERSIST=True,
        #WORKER_PORT=8998,
        WORKER_PORT=7903,
        BOOTSTRAP_ADDRS=
        'drk.altmine.net drk2.altmine.net drk3.altmine.net asia01.poolhash.org asia02.poolhash.org q30.qhor.net poulpe.nirnroot.com drk.p2pool.n00bsys0p.co.uk darkcoin.kicks-ass.net darkcoin.fr cryptohasher.net coinminer.net drk.coinquarry.net drk.kopame.com 54.186.8.140 rebootcamp.de'
        .split(' '),
        ANNOUNCE_CHANNEL='#p2pool-drk',
        VERSION_CHECK=lambda v: v >= 91314,
    ),
    darkcoin_testnet=math.Object(
        PARENT=networks.nets['darkcoin_testnet'],
        SHARE_PERIOD=15,  # seconds
        CHAIN_LENGTH=24 * 60 * 60 // 15,  # shares
        REAL_CHAIN_LENGTH=24 * 60 * 60 // 15,  # shares
Ejemplo n.º 28
0
 ecocoin=math.Object(
     P2P_PREFIX='45434fe6'.decode('hex'),
     P2P_PORT=22337,
     ADDRESS_VERSION=92,
     RPC_PORT=22339,
     RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
         'ecocoinaddress' in (yield bitcoind.rpc_help()) and not (
             yield bitcoind.rpc_getinfo())['testnet'])),
     SUBSIDY_FUNC=lambda target: get_subsidy(7, 20, target),
     BLOCKHASH_FUNC=lambda header: pack.IntType(256).unpack(
         __import__('yac_scrypt').getPoWHash(
             header,
             data.block_header_type.unpack(header)['timestamp'])),
     POW_FUNC=lambda header: pack.IntType(256).unpack(
         __import__('yac_scrypt').getPoWHash(
             header,
             data.block_header_type.unpack(header)['timestamp'])),
     BLOCK_PERIOD=900,  # s
     SYMBOL='ECO',
     CONF_FILE_FUNC=lambda: os.path.join(
         os.path.join(os.environ['APPDATA'], 'ecocoin')
         if platform.system() == 'Windows' else os.path.expanduser(
             '~/Library/Application Support/ecocoin/') if platform.system()
         == 'Darwin' else os.path.expanduser('~/.ecocoin'), 'ecocoin.conf'),
     BLOCK_EXPLORER_URL_PREFIX='http://explorer.ecocoin.tk/block/',
     ADDRESS_EXPLORER_URL_PREFIX='http://explorer.ecocoin.tk/address/',
     TX_EXPLORER_URL_PREFIX='http://explorer.ecocoin.tk/tx/',
     SANE_TARGET_RANGE=(2**256 // 2**20 // 1000 - 1, 2**256 // 2**20 - 1),
     DUMB_SCRYPT_DIFF=2**16,
     DUST_THRESHOLD=0.03e8,
 ), )
Ejemplo n.º 29
0
# REAL_CHAIN_LENGTH = maximum number of shares back client uses to compute payout
# REAL_CHAIN_LENGTH must always be <= CHAIN_LENGTH
# REAL_CHAIN_LENGTH must be changed in sync with all other clients
# changes can be done by changing one, then the other

nets = dict(
    sophiacoin=math.Object(
        PARENT=networks.nets['sophiacoin'],
        SHARE_PERIOD=15,  # seconds
        CHAIN_LENGTH=24 * 60 * 60 // 15,  # shares
        REAL_CHAIN_LENGTH=24 * 60 * 60 // 15,  # shares
        TARGET_LOOKBEHIND=
        60,  # shares  //with that the pools share diff is adjusting faster, important if huge hashing power comes to the pool
        SPREAD=30,  # blocks
        IDENTIFIER='a15320ffb197c089'.decode('hex'),
        PREFIX='867c36a56116e81e'.decode('hex'),
        P2P_PORT=11331,
        MIN_TARGET=0,
        MAX_TARGET=2**256 // 2**20 - 1,
        PERSIST=False,
        WORKER_PORT=11330,
        BOOTSTRAP_ADDRS=''.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-grs',
        VERSION_CHECK=lambda v: True,
    ),
    sophiacoin_testnet=math.Object(
        PARENT=networks.nets['sophiacoin_testnet'],
        SHARE_PERIOD=15,  # seconds
        CHAIN_LENGTH=24 * 60 * 60 // 15,  # shares
        REAL_CHAIN_LENGTH=24 * 60 * 60 // 15,  # shares
        TARGET_LOOKBEHIND=
Ejemplo n.º 30
0
from . import data
from p2pool.util import math, pack

nets = dict(
    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/',
        TX_EXPLORER_URL_PREFIX='https://blockchain.info/tx/',
        SANE_TARGET_RANGE=(2**256 // 2**32 // 1000 - 1, 2**256 // 2**32 - 1),
        DUMB_SCRYPT_DIFF=1,
        DUST_THRESHOLD=0.001e8,
    ),
    bitcoin_testnet=math.Object(
        P2P_PREFIX='0b110907'.decode('hex'),
        P2P_PORT=18333,
        ADDRESS_VERSION=111,