Skip to content

Commit

Permalink
added [mona] monacoin support
Browse files Browse the repository at this point in the history
  • Loading branch information
Rav3nPL committed Jan 1, 2014
1 parent b92b494 commit 76f961a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
21 changes: 21 additions & 0 deletions p2pool/bitcoin/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,27 @@
DUMB_SCRYPT_DIFF=2**16,
DUST_THRESHOLD=0.03e8,
),
monacoin=math.Object(
P2P_PREFIX='fbc0b6db'.decode('hex'), #pchmessagestart
P2P_PORT=9401,
ADDRESS_VERSION=50, #pubkey_
RPC_PORT=9402,
RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
'monacoinaddress' in (yield bitcoind.rpc_help()) and
not (yield bitcoind.rpc_getinfo())['testnet']
)),
SUBSIDY_FUNC=lambda height: 50*100000000,
POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
BLOCK_PERIOD=90, # s
SYMBOL='MONA',
CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'monacoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Monacoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.monacoin'), 'monacoin.conf'),
BLOCK_EXPLORER_URL_PREFIX='http://monachain.info/block/', #dummy for now
ADDRESS_EXPLORER_URL_PREFIX='http://monachain.info/address/',
TX_EXPLORER_URL_PREFIX='http://monachain.info/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():
Expand Down
19 changes: 19 additions & 0 deletions p2pool/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,25 @@
ANNOUNCE_CHANNEL='#p2pool-alt',
VERSION_CHECK=lambda v: True,
),
monacoin=math.Object(
PARENT=networks.nets['monacoin'],
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=50, # blocks
IDENTIFIER='fbc0fbc0b6b6dbdb'.decode('hex'),
PREFIX='dbb6dbb6c0c0fbfb'.decode('hex'),
P2P_PORT=8904,
MIN_TARGET=0,
MAX_TARGET=2**256//2**20 - 1,
PERSIST=False,
WORKER_PORT=9904,
BOOTSTRAP_ADDRS='p2pool.gotgeeks.com doge.dtdns.net pool.hostv.pl rav3n.dtdns.net p2pool.org solidpool.org'.split(' '),
ANNOUNCE_CHANNEL='#p2pool-alt',
VERSION_CHECK=lambda v: True,
),

)
for net_name, net in nets.iteritems():
net.NAME = net_name

0 comments on commit 76f961a

Please sign in to comment.