Bitcoin Forum
December 11, 2017, 11:28:06 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 [2] 3 4 5 6 7 8 9 10 »  All
  Print  
Author Topic: Finding p2pool networks.py values for new altcoins  (Read 37328 times)
schnebi
Sr. Member
****
Offline Offline

Activity: 392


View Profile
May 26, 2013, 04:59:57 PM
 #21

I think that was it for now! Testing pool now... but with my solo hash power I will never really know if it works Cheesy

I thought i got it running. I modifed the networks.py and i was able to create a pool for Goldcoin.... Now i tried to do the same for DragonCoin..... But Iam stuck at the point, where P2Pool says "Testing bitcoind P2P connection to 127.0.0.1:12579"

I don't understand, why it is not going on, because i unsed exactly the same settings than for Goldcoin. Just changed the Port for one Number....
FORTUNEJACK.COM[
                            
9 BTC WELCOME PACK FOR 1ST 5 DEPOSITS
FREE 1,000 mBTC daily for LuckyJack winners
[
          
]
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1512991686
Hero Member
*
Offline Offline

Posts: 1512991686

View Profile Personal Message (Offline)

Ignore
1512991686
Reply with quote  #2

1512991686
Report to moderator
1512991686
Hero Member
*
Offline Offline

Posts: 1512991686

View Profile Personal Message (Offline)

Ignore
1512991686
Reply with quote  #2

1512991686
Report to moderator
1512991686
Hero Member
*
Offline Offline

Posts: 1512991686

View Profile Personal Message (Offline)

Ignore
1512991686
Reply with quote  #2

1512991686
Report to moderator
schnebi
Sr. Member
****
Offline Offline

Activity: 392


View Profile
May 26, 2013, 05:17:23 PM
 #22

Maybee someone can have a look at that:

This are my networks.py:

Code:
dnccoin=math.Object(
        PARENT=networks.nets['dnccoin'],
        SHARE_PERIOD=60,
        CHAIN_LENGTH=24*60*60//10,
        REAL_CHAIN_LENGTH=24*60*60//10,
        TARGET_LOOKBEHIND=200,
        SPREAD=20,
        IDENTIFIER='e021a7b8c602421f'.decode('hex'),
        PREFIX='e267893ae6b8617b'.decode('hex'),
        P2P_PORT=48909,
        MIN_TARGET=0,
        MAX_TARGET=2**256//2**20 - 1,
        PERSIST=False,
        WORKER_PORT=8910,
        BOOTSTRAP_ADDRS=''.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-worldcoin',
        VERSION_CHECK=lambda v: True,
    ),

Code:
dnccoin=math.Object(
        P2P_PREFIX='fbc0b6db'.decode('hex'),
        P2P_PORT=48909,
        ADDRESS_VERSION=62,
        RPC_PORT=9996,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'DragonCoin address' in (yield bitcoind.rpc_help()) and
            not (yield bitcoind.rpc_getinfo())['testnet']
        )),
        SUBSIDY_FUNC=lambda height: 95*10000000 >> (height + 1)//10519200,
        POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
        BLOCK_PERIOD=60, # s targetspacing
        SYMBOL='DNC',
        CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'dragoncoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/dragoncoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.dragoncoin'), 'dragoncoin.conf'),
        BLOCK_EXPLORER_URL_PREFIX='http://d.evco.in/abe/block/',
        ADDRESS_EXPLORER_URL_PREFIX='http://d.evco.in/abe/address/',
        SANE_TARGET_RANGE=(2**256//100000000 - 1, 2**256//1000 - 1),
        DUMB_SCRYPT_DIFF=2**16,
    ),

This is my DragonCoin.conf

Code:
rpcuser=******
rpcpassword=*******
rpcallowip=*.*.*.*
rpcport=9996
port=12579
addnode=198.46.137.53
addnode=198.12.67.152
daemon=1
server=1

And this is what happens:



After that it's stuck at this screen... I really don't know, what to change....
spoid
Hero Member
*****
Offline Offline

Activity: 504


bearded, drunk, fat, naked


View Profile
May 26, 2013, 05:40:46 PM
 #23

yeah, that's exactly where it ends for me as well. Nice catch on the "DragonCoin address". How did you guess that there was a space there? I gave up on it at that point - dragoncoinaddress, dncaddress, DragonCoinaddress, DragonCoinAddress, smallchangeaddress... nothing seemed to work.

I wonder if those nodes are really running solo anyway. Since my phenixcoin pool is still somehow connected to the feathercoin p2p network and shows some pool data. When I connect my miners to my phenixcoin pool, they connect and mine just fine, but if I do a ./phenixcoin gethashespersec on the VPS it returns 0. So it is definitely not solo mining with my wallet ...? Sad

http://84.200.206.231:19324/static/

with great beard comes great liver. Reputation Thread: https://bitcointalk.org/index.php?topic=195803.0
schnebi
Sr. Member
****
Offline Offline

Activity: 392


View Profile
May 26, 2013, 08:15:27 PM
 #24

yeah, that's exactly where it ends for me as well. Nice catch on the "DragonCoin address". How did you guess that there was a space there? I gave up on it at that point - dragoncoinaddress, dncaddress, DragonCoinaddress, DragonCoinAddress, smallchangeaddress... nothing seemed to work.

I wonder if those nodes are really running solo anyway. Since my phenixcoin pool is still somehow connected to the feathercoin p2p network and shows some pool data. When I connect my miners to my phenixcoin pool, they connect and mine just fine, but if I do a ./phenixcoin gethashespersec on the VPS it returns 0. So it is definitely not solo mining with my wallet ...? Sad

http://84.200.206.231:19324/static/

Yeah.. that was a little bit tricky... I searched all the Source files of Litecoin for the Term "litecoinadress". And then i looked up the same File in DragonCoin and found the term "DragonCoin address"

I' also tried to do a luckycoin pool. The P2Pool is starting completely with this coin. But then it just sends Work with the difficulty "0" to the worker, so that the accepted shares are worth nothing.....
WOPR
Full Member
***
Offline Offline

Activity: 168


View Profile
May 28, 2013, 12:14:24 PM
 #25

Maybee someone can have a look at that:

This are my networks.py:

Code:
dnccoin=math.Object(
        PARENT=networks.nets['dnccoin'],
        SHARE_PERIOD=60,
        CHAIN_LENGTH=24*60*60//10,
        REAL_CHAIN_LENGTH=24*60*60//10,
        TARGET_LOOKBEHIND=200,
        SPREAD=20,
        IDENTIFIER='e021a7b8c602421f'.decode('hex'),
        PREFIX='e267893ae6b8617b'.decode('hex'),
        P2P_PORT=48909,
        MIN_TARGET=0,
        MAX_TARGET=2**256//2**20 - 1,
        PERSIST=False,
        WORKER_PORT=8910,
        BOOTSTRAP_ADDRS=''.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-worldcoin',
        VERSION_CHECK=lambda v: True,
    ),

Code:
dnccoin=math.Object(
        P2P_PREFIX='fbc0b6db'.decode('hex'),
        P2P_PORT=48909,
        ADDRESS_VERSION=62,
        RPC_PORT=9996,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'DragonCoin address' in (yield bitcoind.rpc_help()) and
            not (yield bitcoind.rpc_getinfo())['testnet']
        )),
        SUBSIDY_FUNC=lambda height: 95*10000000 >> (height + 1)//10519200,
        POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
        BLOCK_PERIOD=60, # s targetspacing
        SYMBOL='DNC',
        CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'dragoncoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/dragoncoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.dragoncoin'), 'dragoncoin.conf'),
        BLOCK_EXPLORER_URL_PREFIX='http://d.evco.in/abe/block/',
        ADDRESS_EXPLORER_URL_PREFIX='http://d.evco.in/abe/address/',
        SANE_TARGET_RANGE=(2**256//100000000 - 1, 2**256//1000 - 1),
        DUMB_SCRYPT_DIFF=2**16,
    ),

This is my DragonCoin.conf

Code:
rpcuser=******
rpcpassword=*******
rpcallowip=*.*.*.*
rpcport=9996
port=12579
addnode=198.46.137.53
addnode=198.12.67.152
daemon=1
server=1

And this is what happens:



After that it's stuck at this screen... I really don't know, what to change....

In bitcoin/networks.py, set:
P2P_PORT=12579
RPC_PORT=9996


BTC 1woprwQ1vqwLcjEtcB42WQ4Vf9x9yTJAj  LTC  LWoprkMfssBfQTnaQud1du3wPtTUosu7Ne PPC PWoprJqTqH8sWUjuJsS1SfoE2guFbiFFAj
ICN BWopr1Az73zt9NKarnWa37BRxZJ1ZvJK6c DOGE D5woprc7AbQvfb1b6EJDuzmCCtFA7LE5QK SXC S1woprYT96eY6v2KieiCRU9241Qha5UPqg

My pools:  ICN | DOGE | SXC
spoid
Hero Member
*****
Offline Offline

Activity: 504


bearded, drunk, fat, naked


View Profile
May 28, 2013, 04:31:48 PM
 #26

yeah, that's the same problem we all 3 are having. someone enlightened has to show up. XD

with great beard comes great liver. Reputation Thread: https://bitcointalk.org/index.php?topic=195803.0
Kyune
Sr. Member
****
Offline Offline

Activity: 287


View Profile
May 28, 2013, 09:49:41 PM
 #27

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.

BTC:  1K4VpdQXQhgmTmq68rbWhybvoRcyNHKyVP
fenican
Hero Member
*****
Offline Offline

Activity: 672


View Profile
May 29, 2013, 03:16:34 PM
 #28

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
napoleon2121
Sr. Member
****
Offline Offline

Activity: 266


View Profile
May 31, 2013, 01:43:44 PM
 #29

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
napoleon2121
Sr. Member
****
Offline Offline

Activity: 266


View Profile
May 31, 2013, 07:33:23 PM
 #30

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 <module>
    main.run()
  File "/root/p2pool/p2pool/main.py", line 446, in run
    net = networks.nets[net_name]
KeyError: 'bitbar'

any ideas on that ?
Lebrick
Member
**
Offline Offline

Activity: 90



View Profile
May 31, 2013, 08:04:23 PM
 #31

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 <module>
    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.

Trade Rep: https://bitcointalk.org/index.php?topic=210453.0 | Cryptsy Ref link: https://www.cryptsy.com/users/register?refid=541

BTC: 1NK92Y1gr3bJ4pxPARKrHmpi5qaSoFjBBE
napoleon2121
Sr. Member
****
Offline Offline

Activity: 266


View Profile
June 01, 2013, 06:15:37 AM
 #32

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
Lebrick
Member
**
Offline Offline

Activity: 90



View Profile
June 01, 2013, 06:44:32 AM
 #33

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.

Trade Rep: https://bitcointalk.org/index.php?topic=210453.0 | Cryptsy Ref link: https://www.cryptsy.com/users/register?refid=541

BTC: 1NK92Y1gr3bJ4pxPARKrHmpi5qaSoFjBBE
napoleon2121
Sr. Member
****
Offline Offline

Activity: 266


View Profile
June 01, 2013, 08:02:20 AM
 #34

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
napoleon2121
Sr. Member
****
Offline Offline

Activity: 266


View Profile
June 01, 2013, 12:06:36 PM
 #35

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
Lebrick
Member
**
Offline Offline

Activity: 90



View Profile
June 01, 2013, 05:53:51 PM
 #36

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.

Trade Rep: https://bitcointalk.org/index.php?topic=210453.0 | Cryptsy Ref link: https://www.cryptsy.com/users/register?refid=541

BTC: 1NK92Y1gr3bJ4pxPARKrHmpi5qaSoFjBBE
napoleon2121
Sr. Member
****
Offline Offline

Activity: 266


View Profile
June 01, 2013, 07:03:53 PM
 #37

let me check again...

any idea about the other mesage on the compile ?
napoleon2121
Sr. Member
****
Offline Offline

Activity: 266


View Profile
June 01, 2013, 08:22:03 PM
 #38

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
Lebrick
Member
**
Offline Offline

Activity: 90



View Profile
June 01, 2013, 08:32:45 PM
 #39

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

Trade Rep: https://bitcointalk.org/index.php?topic=210453.0 | Cryptsy Ref link: https://www.cryptsy.com/users/register?refid=541

BTC: 1NK92Y1gr3bJ4pxPARKrHmpi5qaSoFjBBE
napoleon2121
Sr. Member
****
Offline Offline

Activity: 266


View Profile
June 01, 2013, 11:40:46 PM
 #40

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
Pages: « 1 [2] 3 4 5 6 7 8 9 10 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!