Skip to content

Instantly share code, notes, and snippets.

@ambethia
Last active August 6, 2018 09:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ambethia/8276498 to your computer and use it in GitHub Desktop.
Save ambethia/8276498 to your computer and use it in GitHub Desktop.
NyanCoin settings for P2Pool
nyancoin=math.Object(
P2P_PREFIX='fbc0b8db'.decode('hex'), # TODO: I think you can find it in main.cpp at pchMessageStart[4]=... Using this specific value as the P2P_PREFIX fixed the problem for me.
P2P_PORT=17778,
ADDRESS_VERSION=21,
RPC_PORT=17779,
RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
'nyancoinaddress' in (yield bitcoind.rpc_help()) and
not (yield bitcoind.rpc_getinfo())['testnet']
)),
SUBSIDY_FUNC=lambda height: 50*100000000, # TODO: SUBSIDY_FUNC can be found in the source code, specifically in main.cpp, search for nSubsidy, you'll find a line that looks a lot like nSubsidy >>= (nHeight / 8400000);
POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
BLOCK_PERIOD=30,
SYMBOL='NYAN',
CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'NyanCoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/NyanCoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.nyancoin'), 'nyancoin.conf'),
BLOCK_EXPLORER_URL_PREFIX='http://nyanchain.info/block/',
ADDRESS_EXPLORER_URL_PREFIX='http://nyanchain.info/address/',
TX_EXPLORER_URL_PREFIX='http://nyanchain.info/tx/',
SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
DUMB_SCRYPT_DIFF=2**16,
DUST_THRESHOLD=0.03e8,
),
nyancoin=math.Object(
PARENT=networks.nets['nyancoin'],
SHARE_PERIOD=15,
CHAIN_LENGTH=12*60*60//25,
REAL_CHAIN_LENGTH=12*60*60//25,
TARGET_LOOKBEHIND=20,
SPREAD=10,
IDENTIFIER='6E79616E636F696E'.decode('hex'),
PREFIX='6E79616E6E79616E'.decode('hex'),
P2P_PORT=17776,
MIN_TARGET=0,
MAX_TARGET=2**256//2**20 - 1,
PERSIST=True,
WORKER_PORT=17777,
BOOTSTRAP_ADDRS=''.split(' '),
ANNOUNCE_CHANNEL='#p2pool-alt',
VERSION_CHECK=lambda v: True,
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment