Pages:
Author

Topic: Finding p2pool networks.py values for new altcoins - page 8. (Read 38084 times)

full member
Activity: 223
Merit: 100
Birb.co Bounty and Airdrop Manager
does anyone wanna help me making a p2pool for hypercoin ?

The main difference in HYC is a blank in 'hypercoin address':

p2pool/bitcoin/networks.py
Code:
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'hypercoin address' in (yield bitcoind.rpc_help()) and
            not (yield bitcoind.rpc_getinfo())['testnet']
        )),

Also must be change the P2P_PREFIX:
Code:
        P2P_PREFIX='fcd9b7dd'.decode('hex'),
sr. member
Activity: 266
Merit: 250
does anyone wanna help me making a p2pool for hypercoin ?
member
Activity: 112
Merit: 10
very great!
nice!
sr. member
Activity: 266
Merit: 250
ok guys for SPREAD this is the corect settings.


bitcoin SPREAD=3 block every 600 seconds           Baseline
litecoin SPREAD=12 block every 150 seconds         600/150=4       4x3=12
bbqcoin SPREAD=30 block every 60 seconds          600/60=10       10x3=30
digitalcoin SPREAD=90 block every 20 seconds       600/20=30       30x3=90
worldcoin SPREAD=120 block every 15 seconds      600/15=40       40x3=120

sa i found out in one post here and there.


anyone found anything for HYC?
sr. member
Activity: 266
Merit: 250
ok i managed to get the pools working with worldcoin. these are the settings i used..

Code:
worldcoin=math.Object(
        PARENT=networks.nets['worldcoin'],
        SHARE_PERIOD=180, # seconds
        CHAIN_LENGTH=24*60*60//10, # shares
        REAL_CHAIN_LENGTH=24*60*60//10, # shares
        TARGET_LOOKBEHIND=200, # shares
        SPREAD=30, # blocks
        IDENTIFIER=''.decode('hex'),
        PREFIX=''.decode('hex'),
        P2P_PORT=20000,
        MIN_TARGET=0,
        MAX_TARGET=2**256//2**20 - 1,
        PERSIST=False,
        WORKER_PORT=25359,
        BOOTSTRAP_ADDRS=''.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-alt',
        VERSION_CHECK=lambda v: True,
    ),
also

Code:
worldcoin=math.Object(
        P2P_PREFIX='fbc0b6db'.decode('hex'),
        P2P_PORT=11081,
        ADDRESS_VERSION=73,
        RPC_PORT=11082,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'worldcoinaddress' in (yield bitcoind.rpc_help()) and
            not (yield bitcoind.rpc_getinfo())['testnet']
        )),
        SUBSIDY_FUNC=lambda height: 1*10000000 >> (height + 1)//1080000,
        POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
        BLOCK_PERIOD=30, # s
        SYMBOL='WDC',
        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'),
        BLOCK_EXPLORER_URL_PREFIX='',
        ADDRESS_EXPLORER_URL_PREFIX='',
        SANE_TARGET_RANGE=(2**256//100000000 - 1, 2**256//1000 - 1),
DUMB_SCRYPT_DIFF=2**16,
    ),

but now i am getting this error when it starts up

Code:
2013-06-04 21:43:20.587175 >   File "run_p2pool.py", line 5, in
2013-06-04 21:43:20.587319 >     main.run()
2013-06-04 21:43:20.587442 >   File "/root/p2pool-altcoins/p2pool/main.py", line 576, in run
2013-06-04 21:43:20.587566 >     reactor.run()
2013-06-04 21:43:20.587689 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1169, in run
2013-06-04 21:43:20.587814 >     self.mainLoop()
2013-06-04 21:43:20.587937 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1178, in mainLoop
2013-06-04 21:43:20.588064 >     self.runUntilCurrent()
2013-06-04 21:43:20.588177 > --- ---
2013-06-04 21:43:20.588326 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 800, in runUntilCurrent
2013-06-04 21:43:20.588442 >     call.func(*call.args, **call.kw)
2013-06-04 21:43:20.588557 >   File "/root/p2pool-altcoins/p2pool/bitcoin/stratum.py", line 35, in _send_work
2013-06-04 21:43:20.588674 >     x, got_response = self.wb.get_work(*self.wb.preprocess_request('' if self.username is None else self.username))
2013-06-04 21:43:20.588792 >   File "/root/p2pool-altcoins/p2pool/bitcoin/worker_interface.py", line 122, in get_work
2013-06-04 21:43:20.588907 >     x, handler = self._inner.get_work(*args)
2013-06-04 21:43:20.589022 >   File "/root/p2pool-altcoins/p2pool/work.py", line 238, in get_work
2013-06-04 21:43:20.589136 >     base_subsidy=self.node.net.PARENT.SUBSIDY_FUNC(self.current_work.value['height']),
2013-06-04 21:43:20.589251 >   File "/root/p2pool-altcoins/p2pool/data.py", line 197, in generate_transaction
2013-06-04 21:43:20.589367 >     script='\x24' + cls.get_ref_hash(net, share_info, ref_merkle_link) + pack.IntType(32).pack(last_txout_nonce),
2013-06-04 21:43:20.589523 >   File "/root/p2pool-altcoins/p2pool/data.py", line 221, in get_ref_hash
2013-06-04 21:43:20.589643 >     share_info=share_info,
2013-06-04 21:43:20.589756 >   File "/root/p2pool-altcoins/p2pool/util/pack.py", line 72, in pack
2013-06-04 21:43:20.589870 >     data = self._pack(obj)
2013-06-04 21:43:20.589985 >   File "/root/p2pool-altcoins/p2pool/util/pack.py", line 52, in _pack
2013-06-04 21:43:20.590099 >     f = self.write(None, obj)
2013-06-04 21:43:20.590213 >   File "/root/p2pool-altcoins/p2pool/util/pack.py", line 299, in write
2013-06-04 21:43:20.590327 >     file = type_.write(file, item[key])
2013-06-04 21:43:20.590441 >   File "/root/p2pool-altcoins/p2pool/util/pack.py", line 325, in write
2013-06-04 21:43:20.590555 >     raise ValueError('incorrect length item!')
2013-06-04 21:43:20.590669 > exceptions.ValueError: incorrect length item
sr. member
Activity: 266
Merit: 250
ok making the pool right now... wish me luck guys lol

ok it doesn't open the screen command.. here is it.

Code:
screen -d -m -S wdcpool ~/p2pool/run_p2pool.py --net worldcoin -a Wd7Jrk6Yeaq8Ztn1umQuv2sM2mRzgyo3Ut -f 2 --give-author 0 --w 19327 --bitcoind-p2p-port 11081 --bitcoind-rpc-port 11082 walletusername walletpassword

anyideas ?

also when i pull the run_p2pool.py help i get these errors

Code:
Traceback (most recent call last):
  File "./run_p2pool.py", line 3, in
    from p2pool import main
ImportError: No module named p2pool
sr. member
Activity: 266
Merit: 250
i am waiting my bitcoind to sync..... i made a mistake last night... i was so tired and by accident i deleted bin folder looooooooool give me a day the codes are ready
member
Activity: 90
Merit: 10
looks all good, don't forget to add worldcoin to helper.py in the bitcoind folder,

Also i forgot to add, in your P2PNTWK file change
Code:
PERSIST=True,
to
Code:
PERSIST=False,

And its gotta be capital "F",
This value tells the p2pool if it should mine solo or connect to other p2pools.

Fire it up and let us know,
In regards to your compile error i don't have a Linux box so can not help you there sorry  Sad
sr. member
Activity: 266
Merit: 250
ok this is my new code... i havent tested it yet... i am just sending you to take a look.... as i see at this pool https://github.com/hakabane/p2pool-altcoins/blob/master/p2pool/networks.py (it has many p2pools) he guy there it doen't changed many things... so i made the codes look like digitalcoi. and with no testnet on it ... (i think that it may couse some problems)

take a look at the code.

Code:
nets = dict(
    worldcoin=math.Object(
        P2P_PREFIX='fbc0b6db'.decode('hex'),
        P2P_PORT=11081,
        ADDRESS_VERSION=73,
        RPC_PORT=11082,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'worldcoinadress' in (yield bitcoind.rpc_help()) and
            not (yield bitcoind.rpc_getinfo())['testnet']
        )),
        SUBSIDY_FUNC=lambda height: 1*10000000 >> (height + 1)//1080000,
        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=30, # s
        SYMBOL='WDC',
        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'),
        BLOCK_EXPLORER_URL_PREFIX='',
        ADDRESS_EXPLORER_URL_PREFIX='',
        SANE_TARGET_RANGE=(2**256//100000000 - 1, 2**256//1000 - 1),
        DUMB_SCRYPT_DIFF=2**16,

also the other one

Code:
worldcoin=math.Object(
        PARENT=networks.nets['worldcoin'],
        SHARE_PERIOD=30, # seconds
        CHAIN_LENGTH=24*60*60//10, # shares
        REAL_CHAIN_LENGTH=24*60*60//10, # shares
        TARGET_LOOKBEHIND=200, # shares
        SPREAD=72, # blocks
        IDENTIFIER='f982abe394923510'.decode('hex'),
        PREFIX='8208c1a53ef649b0'.decode('hex'),
        P2P_PORT=25358,
        MIN_TARGET=0,
        MAX_TARGET=2**256//2**20 - 1,
        PERSIST=True,
        WORKER_PORT=25359,
        BOOTSTRAP_ADDRS=''.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-alt',
        VERSION_CHECK=lambda v: v : True,
    ),

check the files at ghub.. you will see not many changes just the basic one
sr. member
Activity: 266
Merit: 250
let me check again...

any idea about the other mesage on the compile ?
member
Activity: 90
Merit: 10
i also found something about p2poolprefix. but i don't know how to chenge it to hex code the prefix is at

src\main.cpp  and it looks like this
 
Code:
pchMessageStart[0] = 0xfc;
Line 1993:         pchMessageStart[1] = 0xc1;
Line 1994:         pchMessageStart[2] = 0xb7;
Line 1995:         pchMessageStart[3] = 0xdc;

also this is "10519200" to half rewards. as i know

and may i ask something off topic that i hav problem and i can't find an obvius answer....I am trying to compile let's say worldcoin for example.. make -f makefile.unix USE_UPNP=- and i get this error on the code...

Code:
ain.cpp:17:53: fatal error: boost/random/uniform_int_distribution.hpp: No such file or directory
compilation terminated.
make: *** [obj/main.o] Error 1

if you know anything plz pm me. not to mess with the posts on this..  Grin

In regards to the p2poolprefix, are you talking about:

From BCDNTWK
Code:
P2P_PREFIX='fbc0b6db'.decode('hex'),
or
From P2PNTWK
Code:
PREFIX='b6c0601991aa19a2'.decode('hex'),

the BCDNTWK P2P_PREFIX can be found in the main.cpp at about line 2384 just search for "unsigned char pchMessageStart" it will contain some numbers and letters heres an example from MemeCoin:
Code:
unsigned char pchMessageStart[4] = { 0xfb, 0xc0, 0xb6, 0xdb }; // MemeCoin: increase each by adding 2 to bitcoin's value.

you would take
Code:
0xfb, 0xc0, 0xb6, 0xdb
and change it to
Code:
fbc0b6db
this is for the BCDNTWK py.

For the other prefix from P2PNTWK, this is used (as i understand) to connect the p2pools with other p2pools, same with the identifier.
I am unsure about this setting, still looking around.

The prefix you found in main.cpp i am unsure what it is used for or if it is used at all.
Code:
pchMessageStart[0] = 0xfc;
Line 1993:         pchMessageStart[1] = 0xc1;
Line 1994:         pchMessageStart[2] = 0xb7;
Line 1995:         pchMessageStart[3] = 0xdc;

it does look similar to what i had or even could be the same thing.
sr. member
Activity: 266
Merit: 250
i also found something about p2poolprefix. but i don't know how to chenge it to hex code the prefix is at

src\main.cpp  and it looks like this
 
Code:
pchMessageStart[0] = 0xfc;
Line 1993:         pchMessageStart[1] = 0xc1;
Line 1994:         pchMessageStart[2] = 0xb7;
Line 1995:         pchMessageStart[3] = 0xdc;

also this is "10519200" to half rewards. as i know

and may i ask something off topic that i hav problem and i can't find an obvius answer....I am trying to compile let's say worldcoin for example.. make -f makefile.unix USE_UPNP=- and i get this error on the code...

Code:
ain.cpp:17:53: fatal error: boost/random/uniform_int_distribution.hpp: No such file or directory
compilation terminated.
make: *** [obj/main.o] Error 1

if you know anything plz pm me. not to mess with the posts on this..  Grin
sr. member
Activity: 266
Merit: 250
i am at work also now.   Will be back in like 5 hours. Maybe less. Give post more things i found when i get back
member
Activity: 90
Merit: 10
according to your error its not in your help.py but your main.py

File "/root/p2pool/p2pool/main.py", line 446, in run
    net = networks.nets[net_name]

ok will make again the py's again and we talk in a few hours. can you tell the lines in help.py ? if that is possible ? not to read the hole code ?

Code:
SUBSIDY_FUNC=lambda height: 95*10000000 >> (height + 1)//10519200,

i also found that 95 are the coins
100000000  no idea what is this
>>(height + 1) again no idea
//10519200 is the number from main.cpp in nSubsidy

You got the same idea as me  Grin
As i understand this method:
95 = Block reward
10000000 =  Huh
>> (height + 1) = this returns the current block chain length
10519200 = either was total coins or when to half rewards i can not remember

Some tips below for you as well  Cheesy

When redoing your p2pool your only need to edit:
Code:
p2pool-main-folder\p2pool\networks.py - P2PNTWK
p2pool-main-folder\p2pool\bitcoin\networks.py - BCDNTWK
p2pool-main-folder\p2pool\bitcoin\helper.py - BCDHLP
networks.py for your coin seam to be sorted, just make sure your P2PNTWK ports are not the same as your BCDNTWK. BCDNTWK ports should be the ones used in your coin.conf.

the specific line in BCDHLP you need to edit is: (it could contain more coin names
Code:
if 'litecoin' in net.NAME or 'feathercoin' in net.NAME:

Change it to:
Code:
if 'litecoin' in net.NAME or 'feathercoin' in net.NAME or 'CoinName' in net.NAME:

Please note the coin name you put in here must also be what you use to call your coin in P2PNTWK.

This is found in P2PNTWK under "CoinName=math.Object("
Code:
PARENT=networks.nets['CoinName']

I hope that wasn't just a bunch of gibberish  Grin
I'll try do a more explained version later if you would like as I'll be heading off to work soon.
sr. member
Activity: 266
Merit: 250
ok will make again the py's again and we talk in a few hours. can you tell the lines in help.py ? if that is possible ? not to read the hole code ?

Code:
SUBSIDY_FUNC=lambda height: 95*10000000 >> (height + 1)//10519200,

i also found that 95 are the coins
100000000  no idea what is this
>>(height + 1) again no idea
//10519200 is the number from main.cpp in nSubsidy
member
Activity: 90
Merit: 10
hi guys.

after allot of seatch and all that stuff i changed the networks.py to both bolther. i also changed the main.py to agree with my worldcoin configuration. with help of this link above.

https://github.com/rbdrbd/p2pool/commit/596c7483b4d24b8e7063a68dfb1513a2120f2e52

also my settings are like this

Code:
nets = dict(
    worldcoin=math.Object(
        PARENT=networks.nets['worldcoin'],
        SHARE_PERIOD=30, # seconds
        CHAIN_LENGTH=24*60*60//30, # shares
        REAL_CHAIN_LENGTH=24*60*60//30, # shares
        TARGET_LOOKBEHIND=200, # shares
        SPREAD=3, # blocks
        IDENTIFIER='f982abe394923510'.decode('hex'),
        PREFIX='8208c1a53ef649b0'.decode('hex'),
        P2P_PORT=9767,
        MIN_TARGET=0,
        MAX_TARGET=2**256//2**20 - 1,
        PERSIST=False,
        WORKER_PORT=8336,
        BOOTSTRAP_ADDRS=''.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-alt',
        VERSION_CHECK=lambda v: v >= 60004,
    ),
    worldcoin_testnet=math.Object(
        PARENT=networks.nets['worldcoin_testnet'],
        SHARE_PERIOD=3, # seconds
        CHAIN_LENGTH=20*60//3, # shares
        REAL_CHAIN_LENGTH=20*60//3, # shares
        TARGET_LOOKBEHIND=200, # shares
        SPREAD=12, # blocks
        IDENTIFIER='f982abe394923510'.decode('hex'),
        PREFIX='8208c1a54ef649b0'.decode('hex'),
        P2P_PORT=19767,
        MIN_TARGET=0,
        MAX_TARGET=2**256//2**20 - 1,
        PERSIST=False,
        WORKER_PORT=18336,
        BOOTSTRAP_ADDRS=' '.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-alt',
        VERSION_CHECK=lambda v: v >= 60004,
    ),

and also this one at bitcoin folder.

Code:
    worldcoin=math.Object(
        P2P_PREFIX='aef904f3'.decode('hex'),
        P2P_PORT=7777,
        ADDRESS_VERSION=73,
        RPC_PORT=11082,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'worldcoinaddress' in (yield bitcoind.rpc_help()) and
            not (yield bitcoind.rpc_getinfo())['testnet']
        )),
        SUBSIDY_FUNC=lambda target: get_subsidy(6, 100, 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='NVC',
        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'),
        BLOCK_EXPLORER_URL_PREFIX='',
        ADDRESS_EXPLORER_URL_PREFIX='',
        SANE_TARGET_RANGE=(2**256//2**20//1000 - 1, 2**256//2**20 - 1),
    ),
    worldcoin_testnet=math.Object(
        P2P_PREFIX='abc3f0db'.decode('hex'),
        P2P_PORT=17777,
        ADDRESS_VERSION=111,
        RPC_PORT=11082,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'worldcoinadress' in (yield bitcoind.rpc_help()) and
            (yield bitcoind.rpc_getinfo())['testnet']
        )),
        SUBSIDY_FUNC=lambda target: get_subsidy(6, 100, 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='tNVC',
        CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Novacoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/NovaCoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.worldcoin'), 'worldcoin.conf'),
        BLOCK_EXPLORER_URL_PREFIX='',
        ADDRESS_EXPLORER_URL_PREFIX='',
        SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
    ),

now i am trying to run
Code:
python run_p2pool.py help
and i get that error

  File "run_p2pool.py", line 5, in
    main.run()
  File "/root/p2pool/p2pool/main.py", line 446, in run
    net = networks.nets[net_name]
KeyError: 'bitbar'

any ideas on that ?


With this one its regarding something to do with Bitbar?? possible it was around the area you edited in the main.py.

From what i have searched and tinkered with so far the only 3 files we need to touch are networks.py in p2pool folder and networks.py and helper.py in bitcoin folder.

napoleon maybe re-do your settings but dont edit the main.py just the 3 files i mentioned.
sr. member
Activity: 266
Merit: 250
hi guys.

after allot of seatch and all that stuff i changed the networks.py to both bolther. i also changed the main.py to agree with my worldcoin configuration. with help of this link above.

https://github.com/rbdrbd/p2pool/commit/596c7483b4d24b8e7063a68dfb1513a2120f2e52

also my settings are like this

Code:
nets = dict(
    worldcoin=math.Object(
        PARENT=networks.nets['worldcoin'],
        SHARE_PERIOD=30, # seconds
        CHAIN_LENGTH=24*60*60//30, # shares
        REAL_CHAIN_LENGTH=24*60*60//30, # shares
        TARGET_LOOKBEHIND=200, # shares
        SPREAD=3, # blocks
        IDENTIFIER='f982abe394923510'.decode('hex'),
        PREFIX='8208c1a53ef649b0'.decode('hex'),
        P2P_PORT=9767,
        MIN_TARGET=0,
        MAX_TARGET=2**256//2**20 - 1,
        PERSIST=False,
        WORKER_PORT=8336,
        BOOTSTRAP_ADDRS=''.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-alt',
        VERSION_CHECK=lambda v: v >= 60004,
    ),
    worldcoin_testnet=math.Object(
        PARENT=networks.nets['worldcoin_testnet'],
        SHARE_PERIOD=3, # seconds
        CHAIN_LENGTH=20*60//3, # shares
        REAL_CHAIN_LENGTH=20*60//3, # shares
        TARGET_LOOKBEHIND=200, # shares
        SPREAD=12, # blocks
        IDENTIFIER='f982abe394923510'.decode('hex'),
        PREFIX='8208c1a54ef649b0'.decode('hex'),
        P2P_PORT=19767,
        MIN_TARGET=0,
        MAX_TARGET=2**256//2**20 - 1,
        PERSIST=False,
        WORKER_PORT=18336,
        BOOTSTRAP_ADDRS=' '.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-alt',
        VERSION_CHECK=lambda v: v >= 60004,
    ),

and also this one at bitcoin folder.

Code:
    worldcoin=math.Object(
        P2P_PREFIX='aef904f3'.decode('hex'),
        P2P_PORT=7777,
        ADDRESS_VERSION=73,
        RPC_PORT=11082,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'worldcoinaddress' in (yield bitcoind.rpc_help()) and
            not (yield bitcoind.rpc_getinfo())['testnet']
        )),
        SUBSIDY_FUNC=lambda target: get_subsidy(6, 100, 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='NVC',
        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'),
        BLOCK_EXPLORER_URL_PREFIX='',
        ADDRESS_EXPLORER_URL_PREFIX='',
        SANE_TARGET_RANGE=(2**256//2**20//1000 - 1, 2**256//2**20 - 1),
    ),
    worldcoin_testnet=math.Object(
        P2P_PREFIX='abc3f0db'.decode('hex'),
        P2P_PORT=17777,
        ADDRESS_VERSION=111,
        RPC_PORT=11082,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'worldcoinadress' in (yield bitcoind.rpc_help()) and
            (yield bitcoind.rpc_getinfo())['testnet']
        )),
        SUBSIDY_FUNC=lambda target: get_subsidy(6, 100, 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='tNVC',
        CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Novacoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/NovaCoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.worldcoin'), 'worldcoin.conf'),
        BLOCK_EXPLORER_URL_PREFIX='',
        ADDRESS_EXPLORER_URL_PREFIX='',
        SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
    ),

now i am trying to run
Code:
python run_p2pool.py help
and i get that error

  File "run_p2pool.py", line 5, in
    main.run()
  File "/root/p2pool/p2pool/main.py", line 446, in run
    net = networks.nets[net_name]
KeyError: 'bitbar'

any ideas on that ?
sr. member
Activity: 266
Merit: 250
i am stucked to everything... i got so confused...... but anyways if there is anyone that can train me on that thing i give him like 500 WDC to show me the way
hero member
Activity: 1395
Merit: 505
Any insight into why block numbers would display inaccurately?

I just set up a pool for AmericanCoin and I think I got all the settings correct but block numbers being shown for recent blocks are not accurate
sr. member
Activity: 287
Merit: 250
I think I may have figured this out.  I had been bumping into the same problem (stalling at the P2P connection) on some coins but not others.  I finally realized I was wrong in an initial assumption...the P2P_PREFIX setting in bitcoin/networks.py is in fact a coin-specific setting -- which is logical, as the other settings in that file are coin-specific as well.   In fact, it looks like it is basically the "magic value" or "magic number" referred to in https://en.bitcoin.it/wiki/Protocol_specification, and after poking around in the code 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.

So, for example, I haven't ever installed Dragoncoin myself, but looking quickly at the relevant line in main.cpp:

Code:
unsigned char pchMessageStart[4] = { 0xfc, 0xd9, 0xb7, 0xdd };

Thus, for Dragoncoin, try setting

Code:
P2P_PREFIX='fcd9b7dd'.decode('hex'),

and let us know if that gets you past stalling at the P2P connection.

Hope this is helpful.
Pages:
Jump to: