Advertisement
Guest User

Untitled

a guest
May 13th, 2014
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 58.96 KB | None | 0 0
  1. import os
  2. import platform
  3.  
  4. from twisted.internet import defer
  5.  
  6. from . import data
  7. from p2pool.util import math, pack, jsonrpc
  8.  
  9. @defer.inlineCallbacks
  10. def check_genesis_block(bitcoind, genesis_block_hash):
  11. try:
  12. yield bitcoind.rpc_getblock(genesis_block_hash)
  13. except jsonrpc.Error_for_code(-5):
  14. defer.returnValue(False)
  15. else:
  16. defer.returnValue(True)
  17.  
  18. nets = dict(
  19. bitcoin=math.Object(
  20. P2P_PREFIX='f9beb4d9'.decode('hex'),
  21. P2P_PORT=8333,
  22. ADDRESS_VERSION=0,
  23. RPC_PORT=8332,
  24. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  25. (yield check_genesis_block(bitcoind, '000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f')) and
  26. not (yield bitcoind.rpc_getinfo())['testnet']
  27. )),
  28. SUBSIDY_FUNC=lambda height: 50*100000000 >> (height + 1)//210000,
  29. POW_FUNC=data.hash256,
  30. BLOCK_PERIOD=600, # s
  31. SYMBOL='BTC',
  32. 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'),
  33. BLOCK_EXPLORER_URL_PREFIX='https://blockchain.info/block/',
  34. ADDRESS_EXPLORER_URL_PREFIX='https://blockchain.info/address/',
  35. TX_EXPLORER_URL_PREFIX='https://blockchain.info/tx/',
  36. SANE_TARGET_RANGE=(2**256//2**32//1000 - 1, 2**256//2**32 - 1),
  37. DUMB_SCRYPT_DIFF=1,
  38. DUST_THRESHOLD=0.001e8,
  39. ),
  40. bitcoin_testnet=math.Object(
  41. P2P_PREFIX='0b110907'.decode('hex'),
  42. P2P_PORT=18333,
  43. ADDRESS_VERSION=111,
  44. RPC_PORT=18332,
  45. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  46. 'bitcoinaddress' in (yield bitcoind.rpc_help()) and
  47. (yield bitcoind.rpc_getinfo())['testnet']
  48. )),
  49. SUBSIDY_FUNC=lambda height: 50*100000000 >> (height + 1)//210000,
  50. POW_FUNC=data.hash256,
  51. BLOCK_PERIOD=600, # s
  52. SYMBOL='tBTC',
  53. 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'),
  54. BLOCK_EXPLORER_URL_PREFIX='http://blockexplorer.com/testnet/block/',
  55. ADDRESS_EXPLORER_URL_PREFIX='http://blockexplorer.com/testnet/address/',
  56. TX_EXPLORER_URL_PREFIX='http://blockexplorer.com/testnet/tx/',
  57. SANE_TARGET_RANGE=(2**256//2**32//1000 - 1, 2**256//2**32 - 1),
  58. DUMB_SCRYPT_DIFF=1,
  59. DUST_THRESHOLD=1e8,
  60. ),
  61. litecoin=math.Object(
  62. P2P_PREFIX='fbc0b6db'.decode('hex'),
  63. P2P_PORT=9333,
  64. ADDRESS_VERSION=48,
  65. RPC_PORT=9332,
  66. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  67. 'litecoinaddress' in (yield bitcoind.rpc_help()) and
  68. not (yield bitcoind.rpc_getinfo())['testnet']
  69. )),
  70. SUBSIDY_FUNC=lambda height: 50*100000000 >> (height + 1)//840000,
  71. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  72. BLOCK_PERIOD=150, # s
  73. SYMBOL='LTC',
  74. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Litecoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Litecoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.litecoin'), 'litecoin.conf'),
  75. BLOCK_EXPLORER_URL_PREFIX='http://explorer.litecoin.net/block/',
  76. ADDRESS_EXPLORER_URL_PREFIX='http://explorer.litecoin.net/address/',
  77. TX_EXPLORER_URL_PREFIX='http://explorer.litecoin.net/tx/',
  78. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  79. DUMB_SCRYPT_DIFF=2**16,
  80. DUST_THRESHOLD=0.03e8,
  81. ),
  82. litecoin_testnet=math.Object(
  83. P2P_PREFIX='fcc1b7dc'.decode('hex'),
  84. P2P_PORT=19333,
  85. ADDRESS_VERSION=111,
  86. RPC_PORT=19332,
  87. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  88. 'litecoinaddress' in (yield bitcoind.rpc_help()) and
  89. (yield bitcoind.rpc_getinfo())['testnet']
  90. )),
  91. SUBSIDY_FUNC=lambda height: 50*100000000 >> (height + 1)//840000,
  92. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  93. BLOCK_PERIOD=150, # s
  94. SYMBOL='tLTC',
  95. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Litecoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Litecoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.litecoin'), 'litecoin.conf'),
  96. BLOCK_EXPLORER_URL_PREFIX='http://nonexistent-litecoin-testnet-explorer/block/',
  97. ADDRESS_EXPLORER_URL_PREFIX='http://nonexistent-litecoin-testnet-explorer/address/',
  98. TX_EXPLORER_URL_PREFIX='http://nonexistent-litecoin-testnet-explorer/tx/',
  99. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256 - 1),
  100. DUMB_SCRYPT_DIFF=2**16,
  101. DUST_THRESHOLD=1e8,
  102. ),
  103. terracoin=math.Object(
  104. P2P_PREFIX='42babe56'.decode('hex'),
  105. P2P_PORT=13333,
  106. ADDRESS_VERSION=0,
  107. RPC_PORT=13332,
  108. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  109. 'terracoinaddress' in (yield bitcoind.rpc_help()) and
  110. not (yield bitcoind.rpc_getinfo())['testnet']
  111. )),
  112. SUBSIDY_FUNC=lambda height: 20*100000000 >> (height + 1)//1050000,
  113. POW_FUNC=data.hash256,
  114. BLOCK_PERIOD=120, # s
  115. SYMBOL='TRC',
  116. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Terracoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Terracoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.terracoin'), 'terracoin.conf'),
  117. BLOCK_EXPLORER_URL_PREFIX='http://trc.cryptocoinexplorer.com/block/',
  118. ADDRESS_EXPLORER_URL_PREFIX='http://trc.cryptocoinexplorer.com/address/',
  119. TX_EXPLORER_URL_PREFIX='http://trc.cryptocoinexplorer.com/tx/',
  120. SANE_TARGET_RANGE=(2**256//2**32//1000 - 1, 2**256//2**32 - 1),
  121. DUMB_SCRYPT_DIFF=1,
  122. DUST_THRESHOLD=1e8,
  123. ),
  124. terracoin_testnet=math.Object(
  125. P2P_PREFIX='41babe56'.decode('hex'),
  126. P2P_PORT=23333,
  127. ADDRESS_VERSION=111,
  128. RPC_PORT=23332,
  129. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  130. 'terracoinaddress' in (yield bitcoind.rpc_help()) and
  131. (yield bitcoind.rpc_getinfo())['testnet']
  132. )),
  133. SUBSIDY_FUNC=lambda height: 20*100000000 >> (height + 1)//1050000,
  134. POW_FUNC=data.hash256,
  135. BLOCK_PERIOD=120, # s
  136. SYMBOL='tTRC',
  137. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Terracoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Terracoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.terracoin'), 'terracoin.conf'),
  138. BLOCK_EXPLORER_URL_PREFIX='http://trc.cryptocoinexplorer.com/testnet/block/',
  139. ADDRESS_EXPLORER_URL_PREFIX='http://trc.cryptocoinexplorer.com/testnet/address/',
  140. TX_EXPLORER_URL_PREFIX='http://trc.cryptocoinexplorer.com/testnet/tx/',
  141. SANE_TARGET_RANGE=(2**256//2**32//1000 - 1, 2**256//2**32 - 1),
  142. DUMB_SCRYPT_DIFF=1,
  143. DUST_THRESHOLD=1e8,
  144. ),
  145. stablecoin=math.Object(
  146. P2P_PREFIX='fcc3b4da'.decode('hex'),
  147. P2P_PORT=17500,
  148. ADDRESS_VERSION=125,
  149. RPC_PORT=17501,
  150. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  151. 'StableCoinaddress' in (yield bitcoind.rpc_help()) and
  152. not (yield bitcoind.rpc_getinfo())['testnet']
  153. )),
  154. SUBSIDY_FUNC=lambda height: 25*100000000 >> (height + 1)//3000000,
  155. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  156. BLOCK_PERIOD=45,
  157. SYMBOL='SBC',
  158. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'StableCoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/StableCoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.StableCoin'), 'StableCoin.conf'),
  159. BLOCK_EXPLORER_URL_PREFIX='http://sbc.blockexplorer.io/block/',
  160. ADDRESS_EXPLORER_URL_PREFIX='http://sbc.blockexplorer.io/address/',
  161. TX_EXPLORER_URL_PREFIX='http://sbc.blockexplorer.io/tx/',
  162. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  163. DUMB_SCRYPT_DIFF=2**16,
  164. DUST_THRESHOLD=0.001e8,
  165. ),
  166. zetacoin=math.Object(
  167. P2P_PREFIX='fab503df'.decode('hex'), #chainparams.cpp pchMessageStart
  168. P2P_PORT=17333,
  169. ADDRESS_VERSION=80, #PUBKEY_ADDRESS
  170. RPC_PORT=9332,
  171. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  172. 'zetacoinaddress' in (yield bitcoind.rpc_help()) and
  173. not (yield bitcoind.rpc_getinfo())['testnet']
  174. )),
  175. SUBSIDY_FUNC=lambda height: 1000*100000000 >> (height + 1)//80640,
  176. POW_FUNC=data.hash256,
  177. BLOCK_PERIOD=30, # s
  178. SYMBOL='ZET',
  179. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Zetacoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Zetacoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.zetacoin'), 'zetacoin.conf'),
  180. BLOCK_EXPLORER_URL_PREFIX='http://bit.usr.sh:2750/block/',
  181. ADDRESS_EXPLORER_URL_PREFIX='http://bit.usr.sh:2750/address/',
  182. TX_EXPLORER_URL_PREFIX='http://bit.usr.sh:2750/tx/',
  183. SANE_TARGET_RANGE=(2**256//2**32//1000 - 1, 2**256//2**32 - 1),
  184. DUMB_SCRYPT_DIFF=1,
  185. DUST_THRESHOLD=0.001e8,
  186. ),
  187. feathercoin=math.Object(
  188. P2P_PREFIX='fbc0b6db'.decode('hex'),
  189. P2P_PORT=9336,
  190. ADDRESS_VERSION=14,
  191. RPC_PORT=9337,
  192. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  193. 'feathercoinaddress' in (yield bitcoind.rpc_help()) and
  194. not (yield bitcoind.rpc_getinfo())['testnet']
  195. )),
  196. SUBSIDY_FUNC=lambda height: 200*100000000 >> (height + 1)//3360000,
  197. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  198. BLOCK_PERIOD=150, # s
  199. SYMBOL='FTC',
  200. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Feathercoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Feathercoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.feathercoin'), 'feathercoin.conf'),
  201. BLOCK_EXPLORER_URL_PREFIX='http://cryptocoinexplorer.com:5750/block/',
  202. ADDRESS_EXPLORER_URL_PREFIX='http://cryptocoinexplorer.com:5750/address/',
  203. TX_EXPLORER_URL_PREFIX='http://cryptocoinexplorer.com:5750/transaction/',
  204. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  205. DUMB_SCRYPT_DIFF=2**16,
  206. DUST_THRESHOLD=0.001e8,
  207. ),
  208. digitalcoin=math.Object(
  209. P2P_PREFIX='fbc0b6db'.decode('hex'),
  210. P2P_PORT=7999,
  211. ADDRESS_VERSION=30,
  212. RPC_PORT=7998,
  213. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  214. 'digitalcoinaddress' in (yield bitcoind.rpc_help()) and
  215. not (yield bitcoind.rpc_getinfo())['testnet']
  216. )),
  217. SUBSIDY_FUNC=lambda height: 15*100000000 >> (height + 1)//4730400,
  218. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  219. BLOCK_PERIOD=40, # s targetspacing
  220. SYMBOL='DGC',
  221. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'digitalcoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/digitalcoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.digitalcoin'), 'digitalcoin.conf'),
  222. BLOCK_EXPLORER_URL_PREFIX='http://dgc.cryptocoinexplorer.com/block/',
  223. ADDRESS_EXPLORER_URL_PREFIX='http://dgc.cryptocoinexplorer.com/address/',
  224. TX_EXPLORER_URL_PREFIX='http://dgc.cryptocoinexplorer.com/transaction/',
  225. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  226. DUMB_SCRYPT_DIFF=2**16,
  227. DUST_THRESHOLD=0.001e8,
  228. ),
  229. worldcoin=math.Object(
  230. P2P_PREFIX='fbc0b6db'.decode('hex'),
  231. P2P_PORT=11081,
  232. ADDRESS_VERSION=73,
  233. RPC_PORT=11082,
  234. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  235. 'worldcoinaddress' in (yield bitcoind.rpc_help()) and
  236. not (yield bitcoind.rpc_getinfo())['testnet']
  237. )),
  238. SUBSIDY_FUNC=lambda height: 32*100000000 >> (height + 1)//2650000,
  239. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  240. BLOCK_PERIOD=15, # s targetspacing
  241. SYMBOL='WDC',
  242. 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'),
  243. BLOCK_EXPLORER_URL_PREFIX='http://wdc.cryptocoinexplorer.com/block/',
  244. ADDRESS_EXPLORER_URL_PREFIX='http://wdc.cryptocoinexplorer.com/address/',
  245. TX_EXPLORER_URL_PREFIX='http://wdc.cryptocoinexplorer.com/transaction/',
  246. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  247. DUMB_SCRYPT_DIFF=2**16,
  248. DUST_THRESHOLD=0.001e8,
  249. ),
  250. doubloons=math.Object(
  251. P2P_PREFIX='fcd9b7dd'.decode('hex'),
  252. P2P_PORT=1336,
  253. ADDRESS_VERSION=24,
  254. RPC_PORT=1337,
  255. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  256. 'doubloons address' in (yield bitcoind.rpc_help()) and
  257. not (yield bitcoind.rpc_getinfo())['testnet']
  258. )),
  259. SUBSIDY_FUNC=lambda height: 1*100000000 >> (height + 1)//1080000,
  260. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  261. BLOCK_PERIOD=30, # s targetspacing
  262. SYMBOL='DBL',
  263. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'doubloons') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Doubloons/') if platform.system() == 'Darwin' else os.path.expanduser('~/.doubloons'), 'doubloons.conf'),
  264. BLOCK_EXPLORER_URL_PREFIX='http://explorer.doubloons.net/block/',
  265. ADDRESS_EXPLORER_URL_PREFIX='http://explorer.doubloons.net/address/',
  266. TX_EXPLORER_URL_PREFIX='http://explorer.doubloons.net/transaction/',
  267. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  268. DUMB_SCRYPT_DIFF=2**16,
  269. DUST_THRESHOLD=0.001e8,
  270. ),
  271. casinocoin=math.Object(
  272. P2P_PREFIX='fac3b6da'.decode('hex'),
  273. P2P_PORT=47950,
  274. ADDRESS_VERSION=28,
  275. RPC_PORT=47970,
  276. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  277. 'casinocoinaddress' in (yield bitcoind.rpc_help()) and
  278. not (yield bitcoind.rpc_getinfo())['testnet']
  279. )),
  280. SUBSIDY_FUNC=lambda height: 50*100000000 >> (height + 1)//3153600,
  281. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  282. BLOCK_PERIOD=30, # s targetspacing
  283. SYMBOL='CSC',
  284. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'casinocoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/casinocoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.casinocoin'), 'casinocoin.conf'),
  285. BLOCK_EXPLORER_URL_PREFIX='http://casinocoin.mooo.com/block/',
  286. ADDRESS_EXPLORER_URL_PREFIX='http://casinocoin.mooo.com/address/',
  287. TX_EXPLORER_URL_PREFIX='http://casinocoin.mooo.com/transaction/',
  288. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  289. DUMB_SCRYPT_DIFF=2**16,
  290. DUST_THRESHOLD=0.001e8,
  291. ),
  292. bytecoin=math.Object(
  293. P2P_PREFIX='f9beef69'.decode('hex'),
  294. P2P_PORT=6333,
  295. ADDRESS_VERSION=18,
  296. RPC_PORT=6332,
  297. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  298. 'bitcoinaddress' in (yield bitcoind.rpc_help()) and
  299. not (yield bitcoind.rpc_getinfo())['testnet']
  300. )),
  301. SUBSIDY_FUNC=lambda height: 50*100000000 >> (height + 1)//210000,
  302. POW_FUNC=data.hash256,
  303. BLOCK_PERIOD=600, # s
  304. SYMBOL='BTE',
  305. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'bytecoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/bytecoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.bytecoin'), 'bytecoin.conf'),
  306. BLOCK_EXPLORER_URL_PREFIX='http://blockexplorer.bytecoin.in/block/',
  307. ADDRESS_EXPLORER_URL_PREFIX='http://blockexplorer.bytecoin.in/address/',
  308. TX_EXPLORER_URL_PREFIX='http://blockexplorer.bytecoin.in/transaction/',
  309. SANE_TARGET_RANGE=(2**256//2**32//1000 - 1, 2**256//2**32 - 1),
  310. DUMB_SCRYPT_DIFF=1,
  311. DUST_THRESHOLD=0.001e8,
  312. ),
  313. asiccoin=math.Object(
  314. P2P_PREFIX='fab5e8db'.decode('hex'),
  315. P2P_PORT=13434,
  316. ADDRESS_VERSION=22,
  317. RPC_PORT=13435,
  318. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  319. 'asiccoinaddress' in (yield bitcoind.rpc_help()) and
  320. not (yield bitcoind.rpc_getinfo())['testnet']
  321. )),
  322. SUBSIDY_FUNC=lambda height: 50*100000000 >> (height * 1)//210000,
  323. POW_FUNC=data.hash256,
  324. BLOCK_PERIOD=45, # s
  325. SYMBOL='ASC',
  326. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'asiccoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/asiccoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.asiccoin'), 'asiccoin.conf'),
  327. BLOCK_EXPLORER_URL_PREFIX='http://bit.usr.sh:2750/block/',
  328. ADDRESS_EXPLORER_URL_PREFIX='http://bit.usr.sh:2750/address/',
  329. TX_EXPLORER_URL_PREFIX='http://bit.usr.sh:2750/tx/',
  330. SANE_TARGET_RANGE=(2**256//2**32//1000 - 1, 2**256//2**32 - 1),
  331. DUMB_SCRYPT_DIFF=1,
  332. DUST_THRESHOLD=0.001e8,
  333. ),
  334. joulecoin=math.Object(
  335. P2P_PREFIX='a5c07955'.decode('hex'),
  336. P2P_PORT=26789,
  337. ADDRESS_VERSION=43,
  338. RPC_PORT=8844,
  339. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  340. 'joulecoinaddress' in (yield bitcoind.rpc_help()) and
  341. not (yield bitcoind.rpc_getinfo())['testnet']
  342. )),
  343. SUBSIDY_FUNC=lambda height: 16*100000000 >> (height * 1)//1401600,
  344. POW_FUNC=data.hash256,
  345. BLOCK_PERIOD=45, # s
  346. SYMBOL='XJO',
  347. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'joulecoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/joulecoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.joulecoin'), 'joulecoin.conf'),
  348. BLOCK_EXPLORER_URL_PREFIX='http://xjo-explorer.cryptohaus.com:2750/block/',
  349. ADDRESS_EXPLORER_URL_PREFIX='http://xjo-explorer.cryptohaus.com:2750/address/',
  350. TX_EXPLORER_URL_PREFIX='http://xjo-explorer.cryptohaus.com:2750/tx/',
  351. SANE_TARGET_RANGE=(2**256//2**32//1000 - 1, 2**256//2**32 - 1),
  352. DUMB_SCRYPT_DIFF=1,
  353. DUST_THRESHOLD=0.001e8,
  354. ),
  355. unobtanium=math.Object(
  356. P2P_PREFIX='03d5b503'.decode('hex'), #messagestart
  357. P2P_PORT=65534,
  358. ADDRESS_VERSION=130, #pubkey_address
  359. RPC_PORT=65535,
  360. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  361. 'unobtaniumaddress' in (yield bitcoind.rpc_help()) and
  362. not (yield bitcoind.rpc_getinfo())['testnet']
  363. )),
  364. SUBSIDY_FUNC=lambda height: 0.001*100000000 if height<2000 else 1*100000000 >> (height * 1)//120000,
  365. POW_FUNC=data.hash256,
  366. BLOCK_PERIOD=180, # s
  367. SYMBOL='Un',
  368. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'unobtanium') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/unobtanium/') if platform.system() == 'Darwin' else os.path.expanduser('~/.unobtanium'), 'unobtanium.conf'),
  369. BLOCK_EXPLORER_URL_PREFIX='http://bit.usr.sh:2750/block/',
  370. ADDRESS_EXPLORER_URL_PREFIX='http://bit.usr.sh:2750/address/',
  371. TX_EXPLORER_URL_PREFIX='http://bit.usr.sh:2750/tx/',
  372. SANE_TARGET_RANGE=(2**256//2**32//1000 - 1, 2**256//2**32 - 1),
  373. DUMB_SCRYPT_DIFF=1,
  374. DUST_THRESHOLD=0.00001e8,
  375. ),
  376. dogecoin=math.Object(
  377. P2P_PREFIX='c0c0c0c0'.decode('hex'),
  378. P2P_PORT=22556,
  379. ADDRESS_VERSION=30,
  380. RPC_PORT=22555,
  381. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  382. 'dogecoinaddress' in (yield bitcoind.rpc_help()) and
  383. not (yield bitcoind.rpc_getinfo())['testnet']
  384. )),
  385. SUBSIDY_FUNC=lambda height: 500000*100000000 >> (height + 1)//100000, #not bullet proof bot will be ok for now
  386. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  387. BLOCK_PERIOD=60, # s
  388. SYMBOL='DOGE',
  389. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'DogeCoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Dogecoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.dogecoin'), 'dogecoin.conf'),
  390. BLOCK_EXPLORER_URL_PREFIX='http://dogechain.info/block/',
  391. ADDRESS_EXPLORER_URL_PREFIX='http://dogechain.info/address/',
  392. TX_EXPLORER_URL_PREFIX='http://dogechain.info/tx/',
  393. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  394. DUMB_SCRYPT_DIFF=2**16,
  395. DUST_THRESHOLD=0.03e8,
  396. ),
  397. billioncoin=math.Object(
  398. P2P_PREFIX='c0c0c0c0'.decode('hex'),
  399. P2P_PORT=22576,
  400. ADDRESS_VERSION=26,
  401. RPC_PORT=22565,
  402. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  403. 'billioncoinaddress' in (yield bitcoind.rpc_help()) and
  404. not (yield bitcoind.rpc_getinfo())['testnet']
  405. )),
  406. SUBSIDY_FUNC=lambda height: 1000*100000000,
  407. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  408. BLOCK_PERIOD=60, # s
  409. SYMBOL='BIL',
  410. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'BillionCoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Billioncoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.billioncoin'), 'billioncoin.conf'),
  411. BLOCK_EXPLORER_URL_PREFIX='http://115.28.52.63/bil/block/index.php?block_hash=',
  412. ADDRESS_EXPLORER_URL_PREFIX='http://115.28.52.63/bil/block/index.php?address=', #dummy - not supported by crawler
  413. TX_EXPLORER_URL_PREFIX='http://115.28.52.63/bil/block/index.php?transaction=',
  414. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  415. DUMB_SCRYPT_DIFF=2**16,
  416. DUST_THRESHOLD=0.03e8,
  417. ),
  418. mooncoin=math.Object(
  419. P2P_PREFIX='f9f7c0e8'.decode('hex'),
  420. P2P_PORT=44664,
  421. ADDRESS_VERSION=3,
  422. RPC_PORT=44663,
  423. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  424. 'tomooncoinaddress' in (yield bitcoind.rpc_help()) and
  425. not (yield bitcoind.rpc_getinfo())['testnet']
  426. )),
  427. SUBSIDY_FUNC=lambda height: 2000000*100000000,
  428. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  429. BLOCK_PERIOD=90, # s
  430. SYMBOL='MOON',
  431. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'MoonCoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Mooncoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.mooncoin'), 'mooncoin.conf'),
  432. BLOCK_EXPLORER_URL_PREFIX='http://mooncoin.info/abe/block/',
  433. ADDRESS_EXPLORER_URL_PREFIX='http://mooncoin.info/abe/address/',
  434. TX_EXPLORER_URL_PREFIX='http://mooncoin.info/abe/tx/',
  435. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  436. DUMB_SCRYPT_DIFF=2**16,
  437. DUST_THRESHOLD=0.03e8,
  438. ),
  439. catcoin=math.Object(
  440. P2P_PREFIX='fcc1b7dc'.decode('hex'),
  441. P2P_PORT=9933,
  442. ADDRESS_VERSION=21,
  443. RPC_PORT=9932,
  444. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  445. 'catcoinaddress' in (yield bitcoind.rpc_help()) and
  446. not (yield bitcoind.rpc_getinfo())['testnet']
  447. )),
  448. SUBSIDY_FUNC=lambda height: 50*100000000,
  449. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  450. BLOCK_PERIOD=60, # s
  451. SYMBOL='CAT',
  452. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'CatCoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Catcoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.catcoin'), 'catcoin.conf'),
  453. BLOCK_EXPLORER_URL_PREFIX='http://catchain.info/block/',
  454. ADDRESS_EXPLORER_URL_PREFIX='http://catchain.info/address/',
  455. TX_EXPLORER_URL_PREFIX='http://catchain.info/tx/',
  456. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  457. DUMB_SCRYPT_DIFF=2**16,
  458. DUST_THRESHOLD=0.03e8,
  459. ),
  460. dubstepcoin=math.Object(
  461. P2P_PREFIX='fbc0b6db'.decode('hex'),
  462. P2P_PORT=62030,
  463. ADDRESS_VERSION=29,
  464. RPC_PORT=62040,
  465. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  466. 'dubstepcoinaddress' in (yield bitcoind.rpc_help()) and
  467. not (yield bitcoind.rpc_getinfo())['testnet']
  468. )),
  469. SUBSIDY_FUNC=lambda height: 200*100000000,
  470. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  471. BLOCK_PERIOD=180, # s
  472. SYMBOL='WUBS',
  473. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'DubstepCoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Dubstepcoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.dubstepcoin'), 'dubstepcoin.conf'),
  474. BLOCK_EXPLORER_URL_PREFIX='http://wub.info/block/', #dummy for now
  475. ADDRESS_EXPLORER_URL_PREFIX='http://wub.info/address/',
  476. TX_EXPLORER_URL_PREFIX='http://wub.info/tx/',
  477. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  478. DUMB_SCRYPT_DIFF=2**16,
  479. DUST_THRESHOLD=0.03e8,
  480. ),
  481. monacoin=math.Object(
  482. P2P_PREFIX='fbc0b6db'.decode('hex'), #pchmessagestart
  483. P2P_PORT=9401,
  484. ADDRESS_VERSION=50, #pubkey_
  485. RPC_PORT=9402,
  486. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  487. 'monacoinaddress' in (yield bitcoind.rpc_help()) and
  488. not (yield bitcoind.rpc_getinfo())['testnet']
  489. )),
  490. SUBSIDY_FUNC=lambda height: 50*100000000,
  491. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  492. BLOCK_PERIOD=90, # s
  493. SYMBOL='MONA',
  494. 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'),
  495. BLOCK_EXPLORER_URL_PREFIX='http://monacoin.org/crawler/block_crawler.php?block_hash=',
  496. ADDRESS_EXPLORER_URL_PREFIX='http://monacoin.org/crawler/block_crawler.php?address=', #dummy for now, not supported by explorer
  497. TX_EXPLORER_URL_PREFIX='http://monacoin.org/crawler/block_crawler.php?transaction=',
  498. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  499. DUMB_SCRYPT_DIFF=2**16,
  500. DUST_THRESHOLD=0.03e8,
  501. ),
  502. luckycoin=math.Object(
  503. P2P_PREFIX='fbc0b6db'.decode('hex'),
  504. P2P_PORT=9917,
  505. ADDRESS_VERSION=47,
  506. RPC_PORT=9918,
  507. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  508. 'luckycoinaddress' in (yield bitcoind.rpc_help()) and
  509. not (yield bitcoind.rpc_getinfo())['testnet']
  510. )),
  511. SUBSIDY_FUNC=lambda height: 88*100000000 >> (height + 1)//1036800,
  512. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  513. BLOCK_PERIOD=60,
  514. SYMBOL='LKY',
  515. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Luckycoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Luckycoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.luckycoin'), 'luckycoin.conf'),
  516. BLOCK_EXPLORER_URL_PREFIX='http://d.evco.in/abe/block/',
  517. ADDRESS_EXPLORER_URL_PREFIX='http://d.evco.in/abe/address/',
  518. TX_EXPLORER_URL_PREFIX='http://d.evco.in/abe/tx/',
  519. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  520. DUMB_SCRYPT_DIFF=2**16,
  521. DUST_THRESHOLD=0.03e8,
  522. ),
  523. giftcoin=math.Object(
  524. P2P_PREFIX='fbc0b6db'.decode('hex'),
  525. P2P_PORT=8854,
  526. ADDRESS_VERSION=39,
  527. RPC_PORT=8855,
  528. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  529. 'giftcoinaddress' in (yield bitcoind.rpc_help()) and
  530. not (yield bitcoind.rpc_getinfo())['testnet']
  531. )),
  532. SUBSIDY_FUNC=lambda height: 50*100000000,
  533. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  534. BLOCK_PERIOD=300,
  535. SYMBOL='GFT',
  536. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Giftcoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Giftcoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.giftcoin'), 'giftcoin.conf'),
  537. BLOCK_EXPLORER_URL_PREFIX='http://giftchain.info/block/', #dummy for now
  538. ADDRESS_EXPLORER_URL_PREFIX='http://giftchain.info/address/',
  539. TX_EXPLORER_URL_PREFIX='http://giftchain.info/tx/',
  540. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  541. DUMB_SCRYPT_DIFF=2**16,
  542. DUST_THRESHOLD=0.03e8,
  543.  
  544. ),
  545. pesetacoin=math.Object(
  546. P2P_PREFIX='c0c0c0c0'.decode('hex'),
  547. P2P_PORT=16639,
  548. ADDRESS_VERSION=47,
  549. RPC_PORT=16638,
  550. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  551. 'pesetacoinaddress' in (yield bitcoind.rpc_help()) and
  552. not (yield bitcoind.rpc_getinfo())['testnet']
  553. )),
  554. SUBSIDY_FUNC=lambda height: 166386*100000 >> (height + 1)//840000,
  555. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  556. BLOCK_PERIOD=60, # s
  557. SYMBOL='PTC',
  558. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Pesetacoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Pesetacoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.pesetacoin'), 'pesetacoin.conf'),
  559. BLOCK_EXPLORER_URL_PREFIX='http://pesetacoin.info/block/', #dummy
  560. ADDRESS_EXPLORER_URL_PREFIX='http://pesetacoin.info/address/',
  561. TX_EXPLORER_URL_PREFIX='http://pesetacoin.info/tx/',
  562. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  563. DUMB_SCRYPT_DIFF=2**16,
  564. DUST_THRESHOLD=0.03e8,
  565. ),
  566. lennycoin=math.Object(
  567. P2P_PREFIX='c0c0c0c0'.decode('hex'),
  568. P2P_PORT=62556,
  569. ADDRESS_VERSION=8,
  570. RPC_PORT=62555,
  571. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  572. 'lennycoinaddress' in (yield bitcoind.rpc_help()) and
  573. not (yield bitcoind.rpc_getinfo())['testnet']
  574. )),
  575. SUBSIDY_FUNC=lambda height: 100*100000000,
  576. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  577. BLOCK_PERIOD=180, # s
  578. SYMBOL='LENNY',
  579. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'lennycoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/lennycoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.lennycoin'), 'lennycoin.conf'),
  580. BLOCK_EXPLORER_URL_PREFIX='http://lennycoin.info/block/', #dummy
  581. ADDRESS_EXPLORER_URL_PREFIX='http://lennycoin.info/address/',
  582. TX_EXPLORER_URL_PREFIX='http://lennycoin.info/tx/',
  583. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  584. DUMB_SCRYPT_DIFF=2**16,
  585. DUST_THRESHOLD=0.03e8,
  586. ),
  587. coinye=math.Object(
  588. P2P_PREFIX='f9f7c0e8'.decode('hex'),
  589. P2P_PORT=41338,
  590. ADDRESS_VERSION=11,
  591. RPC_PORT=41337,
  592. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  593. 'coinyecoinaddress' in (yield bitcoind.rpc_help()) and
  594. not (yield bitcoind.rpc_getinfo())['testnet']
  595. )),
  596. SUBSIDY_FUNC=lambda height: 666666*100000000,
  597. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  598. BLOCK_PERIOD=90, # s
  599. SYMBOL='COYE',
  600. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'coinyecoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/coinyecoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.coinyecoin'), 'coinyecoin.conf'),
  601. BLOCK_EXPLORER_URL_PREFIX='http://coinyechain.info/block/',
  602. ADDRESS_EXPLORER_URL_PREFIX='http://coinyechain.info/address/',
  603. TX_EXPLORER_URL_PREFIX='http://coinyechain.info/tx/',
  604. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  605. DUMB_SCRYPT_DIFF=2**16,
  606. DUST_THRESHOLD=0.03e8,
  607. ),
  608. aliencoin=math.Object(
  609. P2P_PREFIX='fbc0b6db'.decode('hex'), #pchmessagestart
  610. P2P_PORT=52112,
  611. ADDRESS_VERSION=23, #pubkey_address
  612. RPC_PORT=52111,
  613. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  614. 'aliencoinaddress' in (yield bitcoind.rpc_help()) and
  615. not (yield bitcoind.rpc_getinfo())['testnet']
  616. )),
  617. SUBSIDY_FUNC=lambda height: 40*100000000,
  618. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  619. BLOCK_PERIOD=30, # s
  620. SYMBOL='ALN',
  621. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'aliencoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/aliencoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.aliencoin'), 'aliencoin.conf'),
  622. BLOCK_EXPLORER_URL_PREFIX='http://cryptexplorer.com/block/',
  623. ADDRESS_EXPLORER_URL_PREFIX='http://cryptexplorer.com/address/',
  624. TX_EXPLORER_URL_PREFIX='http://cryptexplorer.com/tx/',
  625. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  626. DUMB_SCRYPT_DIFF=2**16,
  627. DUST_THRESHOLD=0.03e8,
  628. ),
  629. usde=math.Object(
  630. P2P_PREFIX='d9d9f9bd'.decode('hex'), #pchmessagestart
  631. P2P_PORT=54449,
  632. ADDRESS_VERSION=38, #pubkey_address
  633. RPC_PORT=54448,
  634. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  635. 'usdeaddress' in (yield bitcoind.rpc_help()) and
  636. not (yield bitcoind.rpc_getinfo())['testnet']
  637. )),
  638. SUBSIDY_FUNC=lambda height: 1000*100000000 if height>1000 else 100*100000000,
  639. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  640. BLOCK_PERIOD=60, # s
  641. SYMBOL='USDe',
  642. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'usde') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/usde/') if platform.system() == 'Darwin' else os.path.expanduser('~/.usde'), 'usde.conf'),
  643. BLOCK_EXPLORER_URL_PREFIX='http://altexplorer.net/block/',
  644. ADDRESS_EXPLORER_URL_PREFIX='https://altexplorer.net/address/',
  645. TX_EXPLORER_URL_PREFIX='https://altexplorer.net/tx/',
  646. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  647. DUMB_SCRYPT_DIFF=2**16,
  648. DUST_THRESHOLD=0.03e8,
  649. ),
  650. rpcoin=math.Object(
  651. P2P_PREFIX='fbc0b6db'.decode('hex'), #pchmessagestart
  652. P2P_PORT=9027,
  653. ADDRESS_VERSION=60, #pubkey_address
  654. RPC_PORT=9026,
  655. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  656. 'ronpaulcoinaddress' in (yield bitcoind.rpc_help()) and
  657. not (yield bitcoind.rpc_getinfo())['testnet']
  658. )),
  659. SUBSIDY_FUNC=lambda height: 1*100000000,
  660. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  661. BLOCK_PERIOD=120, # s
  662. SYMBOL='RPC',
  663. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'ronpaulcoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/ronpaulcoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.ronpaulcoin'), 'ronpaulcoin.conf'),
  664. BLOCK_EXPLORER_URL_PREFIX='http://cryptexplorer.com/block/',
  665. ADDRESS_EXPLORER_URL_PREFIX='http://cryptexplorer.com/address/',
  666. TX_EXPLORER_URL_PREFIX='http://cryptexplorer.com/tx/',
  667. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  668. DUMB_SCRYPT_DIFF=2**16,
  669. DUST_THRESHOLD=0.0001e8,
  670. ),
  671. polcoin=math.Object(
  672. P2P_PREFIX='a5725982'.decode('hex'), #pchmessagestart
  673. P2P_PORT=9338,
  674. ADDRESS_VERSION=0, #pubkey_address
  675. RPC_PORT=9337,
  676. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  677. 'polcoinaddress' in (yield bitcoind.rpc_help()) and
  678. not (yield bitcoind.rpc_getinfo())['testnet']
  679. )),
  680. SUBSIDY_FUNC=lambda height: 50*100000000 >> (height + 1)//210000,
  681. POW_FUNC=data.hash256,
  682. BLOCK_PERIOD=60, # s
  683. SYMBOL='PLC',
  684. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'polcoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/polcoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.polcoin'), 'polcoin.conf'),
  685. BLOCK_EXPLORER_URL_PREFIX='http://plcexplorer.com/block/', #dummy
  686. ADDRESS_EXPLORER_URL_PREFIX='http://plcexplorer.com/address/',
  687. TX_EXPLORER_URL_PREFIX='http://plcexplorer.com/tx/',
  688. SANE_TARGET_RANGE=(2**256//2**32//1000 - 1, 2**256//2**32 - 1),
  689. DUMB_SCRYPT_DIFF=1,
  690. DUST_THRESHOLD=0.001e8,
  691. ),
  692. coin42=math.Object(
  693. P2P_PREFIX='fbc0b6db'.decode('hex'), #pchmessagestart
  694. P2P_PORT=24242,
  695. ADDRESS_VERSION=8, #pubkey_address
  696. RPC_PORT=4242,
  697. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  698. '42address' in (yield bitcoind.rpc_help()) and
  699. not (yield bitcoind.rpc_getinfo())['testnet']
  700. )),
  701. SUBSIDY_FUNC=lambda height: 0.00004200*100000000 if height>420 else 0.00000010*100000000,
  702. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  703. BLOCK_PERIOD=42, # s
  704. SYMBOL='42c',
  705. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], '42') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/42/') if platform.system() == 'Darwin' else os.path.expanduser('~/.42'), '42.conf'),
  706. BLOCK_EXPLORER_URL_PREFIX='http://altexplorer.net/block/',
  707. ADDRESS_EXPLORER_URL_PREFIX='http://altexplorer.net/address/',
  708. TX_EXPLORER_URL_PREFIX='http://altexplorer.net/tx/',
  709. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  710. DUMB_SCRYPT_DIFF=2**16,
  711. DUST_THRESHOLD=0,
  712. ),
  713. foxcoin=math.Object(
  714. P2P_PREFIX='fcd9b7dd'.decode('hex'), #pchmessagestart
  715. P2P_PORT=9929,
  716. ADDRESS_VERSION=136, #pubkey_address
  717. RPC_PORT=9919,
  718. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  719. 'FoxCoin' in (yield bitcoind.rpc_help()) and
  720. not (yield bitcoind.rpc_getinfo())['testnet']
  721. )),
  722. SUBSIDY_FUNC=lambda height: 250*100000000,
  723. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  724. BLOCK_PERIOD=60, # s
  725. SYMBOL='FOX',
  726. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'FoxCoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/FoxCoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.FoxCoin'), 'FoxCoin.conf'),
  727. BLOCK_EXPLORER_URL_PREFIX='http://altexplorer.net/block/', #dummy
  728. ADDRESS_EXPLORER_URL_PREFIX='http://altexplorer.net/address/',
  729. TX_EXPLORER_URL_PREFIX='http://altexplorer.net/tx/',
  730. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  731. DUMB_SCRYPT_DIFF=2**16,
  732. DUST_THRESHOLD=0.001e8,
  733. ),
  734. argentum=math.Object(
  735. P2P_PREFIX='fbc1b8dc'.decode('hex'), #pchmessagestart
  736. P2P_PORT=13580,
  737. ADDRESS_VERSION=23, #pubkey_address
  738. RPC_PORT=13581,
  739. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  740. 'Argentumaddress' in (yield bitcoind.rpc_help()) and
  741. not (yield bitcoind.rpc_getinfo())['testnet']
  742. )),
  743. SUBSIDY_FUNC=lambda height: 1*100000000,
  744. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  745. BLOCK_PERIOD=120, # s
  746. SYMBOL='ARG',
  747. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'argentum')
  748. if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Argentum/')
  749. if platform.system() == 'Darwin' else os.path.expanduser('~/.Argentum'), 'Argentum.conf'),
  750. BLOCK_EXPLORER_URL_PREFIX='http://arg.webboise.com/chain/Argentum/block/',
  751. ADDRESS_EXPLORER_URL_PREFIX='http://arg.webboise.com/chain/Argentum/address/',
  752. TX_EXPLORER_URL_PREFIX='http://arg.webboise.com/chain/Argentum/tx/',
  753. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  754. DUMB_SCRYPT_DIFF=2**16,
  755. DUST_THRESHOLD=0.0001e8,
  756. ),
  757. smartcoin=math.Object(
  758. P2P_PREFIX='defaced0'.decode('hex'), #pchmessagestart
  759. P2P_PORT=58585,
  760. ADDRESS_VERSION=63, #pubkey_address
  761. RPC_PORT=58583,
  762. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  763. 'smartcoin' in (yield bitcoind.rpc_help()) and
  764. not (yield bitcoind.rpc_getinfo())['testnet']
  765. )),
  766. SUBSIDY_FUNC=lambda height: 64*100000000,
  767. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  768. BLOCK_PERIOD=40, # s
  769. SYMBOL='SMC',
  770. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'smartcoin')
  771. if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/smartcoin/')
  772. if platform.system() == 'Darwin' else os.path.expanduser('~/.smartcoin'), 'smartcoin.conf'),
  773. BLOCK_EXPLORER_URL_PREFIX='http://altexplorer.net/block/',
  774. ADDRESS_EXPLORER_URL_PREFIX='http://altexplorer.net/address/',
  775. TX_EXPLORER_URL_PREFIX='http://altexplorer.net/tx/',
  776. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  777. DUMB_SCRYPT_DIFF=2**16,
  778. DUST_THRESHOLD=0.0001e8,
  779. ),
  780. kittehcoin=math.Object(
  781. P2P_PREFIX='c0c0c0c0'.decode('hex'), #pchmessagestart
  782. P2P_PORT=22566,
  783. ADDRESS_VERSION=45, #pubkey_address
  784. RPC_PORT=22565,
  785. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  786. 'kittehcoinaddress' in (yield bitcoind.rpc_help()) and
  787. not (yield bitcoind.rpc_getinfo())['testnet']
  788. )),
  789. SUBSIDY_FUNC=lambda height: 1000*100000000,
  790. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  791. BLOCK_PERIOD=60, # s
  792. SYMBOL='MEOW',
  793. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'kittehcoin')
  794. if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/kittehcoin/')
  795. if platform.system() == 'Darwin' else os.path.expanduser('~/.kittehcoin'), 'kittehcoin.conf'),
  796. BLOCK_EXPLORER_URL_PREFIX='http://kitexplorer.tk/block/',
  797. ADDRESS_EXPLORER_URL_PREFIX='http://kitexplorer.tk/address/',
  798. TX_EXPLORER_URL_PREFIX='http://kitexplorer.tk/tx/',
  799. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  800. DUMB_SCRYPT_DIFF=2**16,
  801. DUST_THRESHOLD=0.00001e8,
  802. ),
  803. leafcoin=math.Object(
  804. P2P_PREFIX='aaaaaacc'.decode('hex'), #pchmessagestart
  805. P2P_PORT=22813,
  806. ADDRESS_VERSION=95, #pubkey_address
  807. RPC_PORT=22812,
  808. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  809. 'leafcoinaddress' in (yield bitcoind.rpc_help()) and
  810. not (yield bitcoind.rpc_getinfo())['testnet']
  811. )),
  812. SUBSIDY_FUNC=lambda height: 100000*100000000,
  813. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  814. BLOCK_PERIOD=60, # s
  815. SYMBOL='LEAF',
  816. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'LeafCoin')
  817. if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Leafcoin/')
  818. if platform.system() == 'Darwin' else os.path.expanduser('~/.leafcoin'), 'leafcoin.conf'),
  819. BLOCK_EXPLORER_URL_PREFIX='http://explorer2.leafco.in/block/',
  820. ADDRESS_EXPLORER_URL_PREFIX='http://explorer2.leafco.in/address/',
  821. TX_EXPLORER_URL_PREFIX='http://explorer2.leafco.in/tx/',
  822. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  823. DUMB_SCRYPT_DIFF=2**16,
  824. DUST_THRESHOLD=0.03e8,
  825. ),
  826. ekrona=math.Object(
  827. P2P_PREFIX='dcc1c104'.decode('hex'), #pchmessagestart
  828. P2P_PORT=9445,
  829. ADDRESS_VERSION=45, #pubkey_address
  830. RPC_PORT=9444,
  831. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  832. 'ekronaaddress' in (yield bitcoind.rpc_help()) and
  833. not (yield bitcoind.rpc_getinfo())['testnet']
  834. )),
  835. SUBSIDY_FUNC=lambda height: 40*100000000 >> (height + 1)//500000 ,
  836. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  837. BLOCK_PERIOD=200, #seconds
  838. SYMBOL='KRN',
  839. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Ekrona')
  840. if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/ekrona/')
  841. if platform.system() == 'Darwin' else os.path.expanduser('~/.ekrona'), 'ekrona.conf'),
  842. BLOCK_EXPLORER_URL_PREFIX='http://altexplorer.net/block/', #dummy
  843. ADDRESS_EXPLORER_URL_PREFIX='http://altexplorer.net/address/',
  844. TX_EXPLORER_URL_PREFIX='http://altexplorer.net/tx/',
  845. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  846. DUMB_SCRYPT_DIFF=2**16,
  847. DUST_THRESHOLD=0.001e8,
  848. ),
  849. reddcoin=math.Object(
  850. P2P_PREFIX='fbc0b6db'.decode('hex'),
  851. P2P_PORT=45444,
  852. ADDRESS_VERSION=61,
  853. RPC_PORT=45443,
  854. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  855. 'reddcoinaddress' in (yield bitcoind.rpc_help()) and
  856. not (yield bitcoind.rpc_getinfo())['testnet']
  857. )),
  858. SUBSIDY_FUNC=lambda height: 100000*100000000 >> (height + 1)//500000,
  859. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  860. BLOCK_PERIOD=60, # s
  861. SYMBOL='RDD',
  862. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Reddcoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Reddcoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.reddcoin'), 'reddcoin.conf'),
  863. BLOCK_EXPLORER_URL_PREFIX='http://cryptexplorer.com/block/',
  864. ADDRESS_EXPLORER_URL_PREFIX='http://cryptexplorer.com/address/',
  865. TX_EXPLORER_URL_PREFIX='http://cryptexplorer.com/tx/',
  866. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  867. DUMB_SCRYPT_DIFF=2**16,
  868. DUST_THRESHOLD=0,
  869. ),
  870. tigercoin=math.Object(
  871. P2P_PREFIX='fab5dfdb'.decode('hex'),
  872. P2P_PORT=15660,
  873. ADDRESS_VERSION=127,
  874. RPC_PORT=15661,
  875. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue('tigercoinaddress' in (yield bitcoind.rpc_help()) and
  876. not (yield bitcoind.rpc_getinfo())['testnet']
  877. )),
  878. SUBSIDY_FUNC=lambda height: 128*100000000 >> (height + 1)//172800,
  879. POW_FUNC=data.hash256,
  880. BLOCK_PERIOD=45, # s
  881. SYMBOL='TGC',
  882. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'tigercoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/tigercoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.tigercoin'), 'tigercoin.conf'),
  883. BLOCK_EXPLORER_URL_PREFIX='http://bit.usr.sh:2750/block/',
  884. ADDRESS_EXPLORER_URL_PREFIX='http://bit.usr.sh:2750/address/',
  885. TX_EXPLORER_URL_PREFIX='http://bit.usr.sh:2750/tx/',
  886. SANE_TARGET_RANGE=(2**256//2**32//1000 - 1, 2**256//2**32 - 1),
  887. DUMB_SCRYPT_DIFF=1,
  888. DUST_THRESHOLD=0.001e8,
  889. ),
  890. frycoin=math.Object(
  891. P2P_PREFIX='fbc0b6db'.decode('hex'),
  892. P2P_PORT=55901,
  893. ADDRESS_VERSION=35,
  894. RPC_PORT=55900,
  895. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  896. 'Frycoinaddress' in (yield bitcoind.rpc_help()) and
  897. not (yield bitcoind.rpc_getinfo())['testnet']
  898. )),
  899. SUBSIDY_FUNC=lambda height: 300*100000000 >> (height + 1)//16666,
  900. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  901. BLOCK_PERIOD=120, # s
  902. SYMBOL='FRY',
  903. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Frycoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Frycoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.Frycoin'), 'Frycoin.conf'),
  904. BLOCK_EXPLORER_URL_PREFIX='http://altexplorer.net/block/', #dummy
  905. ADDRESS_EXPLORER_URL_PREFIX='http://altexplorer.net/address/',
  906. TX_EXPLORER_URL_PREFIX='http://altexplorer.net/tx/',
  907. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  908. DUMB_SCRYPT_DIFF=2**16,
  909. DUST_THRESHOLD=0.0001e8,
  910. ),
  911. digibyte=math.Object(
  912. P2P_PREFIX='fac3b6da'.decode('hex'), #pchmessagestart
  913. P2P_PORT=12024,
  914. ADDRESS_VERSION=30, #pubkey_address
  915. RPC_PORT=14022,
  916. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  917. 'digibyteaddress' in (yield bitcoind.rpc_help()) and
  918. not (yield bitcoind.rpc_getinfo())['testnet']
  919. )),
  920. SUBSIDY_FUNC=lambda height: __import__('digibyte_subsidy').GetBlockBaseValue(height),
  921. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  922. BLOCK_PERIOD=60, # s
  923. SYMBOL='DGB',
  924. 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'),
  925. BLOCK_EXPLORER_URL_PREFIX='http://altexplorer.net/block/',
  926. ADDRESS_EXPLORER_URL_PREFIX='http://altexplorer.net/address/',
  927. TX_EXPLORER_URL_PREFIX='http://altexplorer.net/tx/',
  928. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  929. DUMB_SCRYPT_DIFF=2**16,
  930. DUST_THRESHOLD=0.0001e8,
  931. ),
  932. antikeiser=math.Object(
  933. P2P_PREFIX='fbc0c0c0'.decode('hex'), #pchmessagestart
  934. P2P_PORT=39919,
  935. ADDRESS_VERSION=23, #pubkey_address
  936. RPC_PORT=39918,
  937. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  938. 'antikeiser' in (yield bitcoind.rpc_help()) and
  939. not (yield bitcoind.rpc_getinfo())['testnet']
  940. )),
  941. SUBSIDY_FUNC=lambda height: 40000*100000000 >> (height + 1)//12000,
  942. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  943. BLOCK_PERIOD=120, # seconds
  944. SYMBOL='AKC',
  945. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'AntiKeiserCoin')
  946. if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/AntiKesierCoin/')
  947. if platform.system() == 'Darwin' else os.path.expanduser('~/.antikeisercoin'), 'antikeisercoin.conf'),
  948. BLOCK_EXPLORER_URL_PREFIX='http://altexplorer.net/block/',
  949. ADDRESS_EXPLORER_URL_PREFIX='http://altexplorer.net/address/',
  950. TX_EXPLORER_URL_PREFIX='http://altexplorer.net/tx/',
  951. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  952. DUMB_SCRYPT_DIFF=2**16,
  953. DUST_THRESHOLD=0.03e8,
  954. ),
  955. polishcoin=math.Object(
  956. P2P_PREFIX='fcd9b7dd'.decode('hex'), #pchmessagestart
  957. P2P_PORT=4824,
  958. ADDRESS_VERSION=22, #pubkey_address
  959. RPC_PORT=4822,
  960. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  961. 'polishcoin' in (yield bitcoind.rpc_help()) and
  962. not (yield bitcoind.rpc_getinfo())['testnet']
  963. )),
  964. SUBSIDY_FUNC=lambda height: 100*150000000 >> (height + 1)//750000,
  965. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  966. BLOCK_PERIOD=60, # seconds
  967. SYMBOL='PCC',
  968. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'PolishCoin')
  969. if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/PolishCoin/')
  970. if platform.system() == 'Darwin' else os.path.expanduser('~/.polishcoin'), 'polishcoin.conf'),
  971. BLOCK_EXPLORER_URL_PREFIX='http://altexplorer.net/block/',
  972. ADDRESS_EXPLORER_URL_PREFIX='http://altexplorer.net/address/',
  973. TX_EXPLORER_URL_PREFIX='http://altexplorer.net/tx/',
  974. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  975. DUMB_SCRYPT_DIFF=2**16,
  976. DUST_THRESHOLD=0.03e8,
  977. ),
  978. Coin=math.Object(
  979. P2P_PREFIX='a9c5bdd1'.decode('hex'), #pchmessagestart
  980. P2P_PORT=24057,
  981. ADDRESS_VERSION=28, #pubkey_address
  982. RPC_PORT=24055,
  983. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  984. 'Coinaddress' in (yield bitcoind.rpc_help()) and
  985. not (yield bitcoind.rpc_getinfo())['testnet']
  986. )),
  987. SUBSIDY_FUNC=lambda height: 0*1200000000,
  988. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  989. BLOCK_PERIOD=60, # seconds
  990. SYMBOL='COIN',
  991. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Coin')
  992. if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Coin/')
  993. if platform.system() == 'Darwin' else os.path.expanduser('~/.Coin'), 'Coin.conf'),
  994. BLOCK_EXPLORER_URL_PREFIX='http://explorer.coin-project.org/block/',
  995. ADDRESS_EXPLORER_URL_PREFIX='http://explorer.coin-project.org/address/',
  996. TX_EXPLORER_URL_PREFIX='http://explorer.coin-project.org/tx/',
  997. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  998. DUMB_SCRYPT_DIFF=2**16,
  999. DUST_THRESHOLD=0.03e8,
  1000. ),
  1001. fckbankscoin=math.Object(
  1002. P2P_PREFIX='fcd9b7dd'.decode('hex'), #stripped from fckbankscoind's main.cpp -> pchMessageStart[4] = { 0xfc, 0xd9, 0xb7, 0xdd };
  1003. P2P_PORT=21779, #fckbankscoind 's p2p port
  1004. ADDRESS_VERSION=36, #look again in the sourcecode in the file base58.h, and find the value of PUBKEY_ADDRESS.
  1005. RPC_PORT=21778, #fckbankscoind 's rpc port
  1006. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  1007. 'fckbankscoinaddress' in (yield bitcoind.rpc_help()) and
  1008. not (yield bitcoind.rpc_getinfo())['testnet']
  1009. )),
  1010. SUBSIDY_FUNC=lambda height: 100000*100000000 >> (height + 1)//100000,
  1011. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  1012. BLOCK_PERIOD=60, # one block generation time
  1013. SYMBOL='FCK',
  1014. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'fckbankscoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/fckbankscoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.fckbankscoin'), 'fckbankscoin.conf'),
  1015. BLOCK_EXPLORER_URL_PREFIX='http://explorer.fckbanks.org/block/',
  1016. ADDRESS_EXPLORER_URL_PREFIX='http://explorer.fckbanks.org/address/',
  1017. TX_EXPLORER_URL_PREFIX='http://explorer.fckbanks.org/tx/',
  1018. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1), #??
  1019. DUMB_SCRYPT_DIFF=2**16, #??
  1020. DUST_THRESHOLD=0.03e8, #??
  1021. ),
  1022. hawaiicoin=math.Object(
  1023. P2P_PREFIX='7c1f9184'.decode('hex'),
  1024. P2P_PORT=9335,
  1025. ADDRESS_VERSION=0,
  1026. RPC_PORT=9334,
  1027. RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
  1028. 'hawaiicoinaddress' in (yield bitcoind.rpc_help()) and
  1029. not (yield bitcoind.rpc_getinfo())['testnet']
  1030. )),
  1031. SUBSIDY_FUNC=lambda height: 500*100000000 >> (height + 1)//500000,
  1032. POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
  1033. BLOCK_PERIOD=50, # s
  1034. SYMBOL='HIC',
  1035. CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Hawaiicoin') if platform.system() == 'Windows'
  1036. else os.path.expanduser('~/Library/Application Support/Hawaiicoin/') if platform.system() == 'Darwin'
  1037. else os.path.expanduser('~/.hawaiicoin'), 'hawaiicoin.conf'),
  1038. BLOCK_EXPLORER_URL_PREFIX='http://pool.privanon.com:8080/block/',
  1039. ADDRESS_EXPLORER_URL_PREFIX='http://pool.privanon.com:8080/address/',
  1040. TX_EXPLORER_URL_PREFIX='http://pool.privanon.com:8080/tx/',
  1041. SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
  1042. DUMB_SCRYPT_DIFF=2**16,
  1043. DUST_THRESHOLD=0.03e8,
  1044. ),
  1045.  
  1046. )
  1047. for net_name, net in nets.iteritems():
  1048. net.NAME = net_name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement