From 3827c467530dc2babf20e166ac00782754ff1f84 Mon Sep 17 00:00:00 2001 From: pandacoin-official Date: Thu, 6 Mar 2014 01:45:18 +0100 Subject: [PATCH 1/2] Spacing. --- p2pool/bitcoin/networks.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/p2pool/bitcoin/networks.py b/p2pool/bitcoin/networks.py index 85344afd5..e0411a8d8 100644 --- a/p2pool/bitcoin/networks.py +++ b/p2pool/bitcoin/networks.py @@ -120,7 +120,7 @@ def check_genesis_block(bitcoind, genesis_block_hash): SANE_TARGET_RANGE=(2**256//2**32//1000 - 1, 2**256//2**32 - 1), DUMB_SCRYPT_DIFF=1, DUST_THRESHOLD=1e8, - ), + ), terracoin_testnet=math.Object( P2P_PREFIX='41babe56'.decode('hex'), P2P_PORT=23333, @@ -526,7 +526,7 @@ def check_genesis_block(bitcoind, genesis_block_hash): ADDRESS_VERSION=39, RPC_PORT=8855, RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue( - 'giftcoinaddress' in (yield bitcoind.rpc_help()) and + 'giftcoinaddress' in (yield bitcoind.rpc_help()) and not (yield bitcoind.rpc_getinfo())['testnet'] )), SUBSIDY_FUNC=lambda height: 50*100000000, @@ -744,8 +744,8 @@ def check_genesis_block(bitcoind, genesis_block_hash): POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)), BLOCK_PERIOD=120, # s SYMBOL='ARG', - CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'argentum') - if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Argentum/') + CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'argentum') + if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Argentum/') if platform.system() == 'Darwin' else os.path.expanduser('~/.Argentum'), 'Argentum.conf'), BLOCK_EXPLORER_URL_PREFIX='http://arg.webboise.com/chain/Argentum/block/', ADDRESS_EXPLORER_URL_PREFIX='http://arg.webboise.com/chain/Argentum/address/', @@ -767,8 +767,8 @@ def check_genesis_block(bitcoind, genesis_block_hash): POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)), BLOCK_PERIOD=40, # s SYMBOL='SMC', - CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'smartcoin') - if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/smartcoin/') + CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'smartcoin') + if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/smartcoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.smartcoin'), 'smartcoin.conf'), BLOCK_EXPLORER_URL_PREFIX='http://altexplorer.net/block/', ADDRESS_EXPLORER_URL_PREFIX='http://altexplorer.net/address/', @@ -790,8 +790,8 @@ def check_genesis_block(bitcoind, genesis_block_hash): POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)), BLOCK_PERIOD=60, # s SYMBOL='MEOW', - CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'kittehcoin') - if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/kittehcoin/') + CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'kittehcoin') + if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/kittehcoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.kittehcoin'), 'kittehcoin.conf'), BLOCK_EXPLORER_URL_PREFIX='http://kitexplorer.tk/block/', ADDRESS_EXPLORER_URL_PREFIX='http://kitexplorer.tk/address/', @@ -813,8 +813,8 @@ def check_genesis_block(bitcoind, genesis_block_hash): POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)), BLOCK_PERIOD=60, # s SYMBOL='LEAF', - CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'LeafCoin') - if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Leafcoin/') + CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'LeafCoin') + if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Leafcoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.leafcoin'), 'leafcoin.conf'), BLOCK_EXPLORER_URL_PREFIX='http://explorer2.leafco.in/block/', ADDRESS_EXPLORER_URL_PREFIX='http://explorer2.leafco.in/address/', @@ -836,8 +836,8 @@ def check_genesis_block(bitcoind, genesis_block_hash): POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)), BLOCK_PERIOD=200, #seconds SYMBOL='KRN', - CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Ekrona') - if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/ekrona/') + CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Ekrona') + if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/ekrona/') if platform.system() == 'Darwin' else os.path.expanduser('~/.ekrona'), 'ekrona.conf'), BLOCK_EXPLORER_URL_PREFIX='http://altexplorer.net/block/', #dummy ADDRESS_EXPLORER_URL_PREFIX='http://altexplorer.net/address/', @@ -942,8 +942,8 @@ def check_genesis_block(bitcoind, genesis_block_hash): POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)), BLOCK_PERIOD=120, # seconds SYMBOL='AKC', - CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'AntiKeiserCoin') - if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/AntiKesierCoin/') + CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'AntiKeiserCoin') + if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/AntiKesierCoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.antikeisercoin'), 'antikeisercoin.conf'), BLOCK_EXPLORER_URL_PREFIX='http://altexplorer.net/block/', ADDRESS_EXPLORER_URL_PREFIX='http://altexplorer.net/address/', @@ -965,8 +965,8 @@ def check_genesis_block(bitcoind, genesis_block_hash): POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)), BLOCK_PERIOD=60, # seconds SYMBOL='PCC', - CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'PolishCoin') - if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/PolishCoin/') + CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'PolishCoin') + if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/PolishCoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.polishcoin'), 'polishcoin.conf'), BLOCK_EXPLORER_URL_PREFIX='http://altexplorer.net/block/', ADDRESS_EXPLORER_URL_PREFIX='http://altexplorer.net/address/', @@ -988,8 +988,8 @@ def check_genesis_block(bitcoind, genesis_block_hash): POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)), BLOCK_PERIOD=60, # seconds SYMBOL='COIN', - CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Coin') - if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Coin/') + CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Coin') + if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Coin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.Coin'), 'Coin.conf'), BLOCK_EXPLORER_URL_PREFIX='http://explorer.coin-project.org/block/', ADDRESS_EXPLORER_URL_PREFIX='http://explorer.coin-project.org/address/', From 396e714722b43afa3e5f82ed8c8f3bc5def757d2 Mon Sep 17 00:00:00 2001 From: pandacoin-official Date: Thu, 6 Mar 2014 01:45:55 +0100 Subject: [PATCH 2/2] Add PandaCoin. --- p2pool/bitcoin/networks.py | 21 +++++++++++++++++++++ p2pool/networks.py | 18 ++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/p2pool/bitcoin/networks.py b/p2pool/bitcoin/networks.py index e0411a8d8..28a263b69 100644 --- a/p2pool/bitcoin/networks.py +++ b/p2pool/bitcoin/networks.py @@ -998,6 +998,27 @@ def check_genesis_block(bitcoind, genesis_block_hash): DUMB_SCRYPT_DIFF=2**16, DUST_THRESHOLD=0.03e8, ), + pandacoin=math.Object( + P2P_PREFIX='c0c0c0c0'.decode('hex'), + P2P_PORT=22445, + ADDRESS_VERSION=55, + RPC_PORT=22444, + RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue( + 'pandacoinaddress' in (yield bitcoind.rpc_help()) and + not (yield bitcoind.rpc_getinfo())['testnet'] + )), + SUBSIDY_FUNC=lambda height: 10000*100000000, + POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)), + BLOCK_PERIOD=60, # s + SYMBOL='PND', + CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'PandaCoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/PandaCoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.pandacoin'), 'pandacoin.conf'), + BLOCK_EXPLORER_URL_PREFIX='http://pnd.showed.us/block/', + ADDRESS_EXPLORER_URL_PREFIX='http://pnd.showed.us/address/', + TX_EXPLORER_URL_PREFIX='http://pnd.showed.us/tx/', + SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1), + DUMB_SCRYPT_DIFF=2**16, + DUST_THRESHOLD=0.03e8, + ), ) for net_name, net in nets.iteritems(): diff --git a/p2pool/networks.py b/p2pool/networks.py index 4fc56cf8d..07ec36b8d 100644 --- a/p2pool/networks.py +++ b/p2pool/networks.py @@ -844,6 +844,24 @@ ANNOUNCE_CHANNEL='#p2pool-alt', VERSION_CHECK=lambda v: True, ), + pandacoin=math.Object( + PARENT=networks.nets['pandacoin'], + SHARE_PERIOD=15, # seconds target spacing + CHAIN_LENGTH=12*60*60//15, # shares + REAL_CHAIN_LENGTH=12*60*60//15, # shares + TARGET_LOOKBEHIND=20, # shares coinbase maturity + SPREAD=10, # blocks + IDENTIFIER='E2B1A3616E64436f696E'.decode('hex'), + PREFIX='E2B1A3616E64436f696E'.decode('hex'), + P2P_PORT=8334, + MIN_TARGET=0, + MAX_TARGET=2**256//2**20 - 1, + PERSIST=True, + WORKER_PORT=9444, + BOOTSTRAP_ADDRS=''.split(' '), # there are none yet + ANNOUNCE_CHANNEL='#p2pool-alt', + VERSION_CHECK=lambda v: True, + ), ) for net_name, net in nets.iteritems():