Pages:
Author

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

member
Activity: 98
Merit: 10
Hi all,

just downloaded the current p2pool from git.
Cannot find any networks.py and it seems that something changed at all.
Do you have a new manual/how-to add new altcoins?

Cheers

Hi,

got an Error after running ./run_p2pool.py
Any ideas?

Traceback (most recent call last):
File "run_p2pool.py", line 3, in
from p2pool import main
File "/root/p2pool/p2pool/main.py", line 25, in
from . import networks, web, work
File "/root/p2pool/p2pool/networks/init.py", line 4, in
for module_loader, name, ispkg in pkgutil.iter_modules(path))
File "/root/p2pool/p2pool/networks/init.py", line 4, in
for module_loader, name, ispkg in pkgutil.iter_modules(path))
File "/root/p2pool/p2pool/networks/bitcoin.py", line 1, in
from p2pool.bitcoin import networks
File "/root/p2pool/p2pool/bitcoin/networks/init.py", line 4, in
for module_loader, name, ispkg in pkgutil.iter_modules(path))
File "/root/p2pool/p2pool/bitcoin/networks/init.py", line 4, in
for module_loader, name, ispkg in pkgutil.iter_modules(path))
File "/root/p2pool/p2pool/bitcoin/networks/magicoin.py", line 1, in
from p2pool.bitcoin import networks
ImportError: cannot import name networks

my two files are
import os
import platform

from twisted.internet import defer

from .. import data, helper
from p2pool.util import pack

P2P_PREFIX = ' f0b9b3d6 '.decode('hex')
P2P_PORT = 8233
ADDRESS_VERSION = 20
RPC_PORT = 8232
RPC_CHECK = defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
'magicoinaddress' in (yield bitcoind.rpc_help()) and
not (yield bitcoind.rpc_getinfo())['testnet']
))
SUBSIDY_FUNC = lambda height: 100100000000 >> (height + 1)//1051200
POW_FUNC = data.hash256
BLOCK_PERIOD = 1800 # s
SYMBOL = 'XMG'
CONF_FILE_FUNC = lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Magi') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Magi/') if platform.system() == 'Darwin' else os.path.expanduser('~/.magi'), 'magi.conf')
BLOCK_EXPLORER_URL_PREFIX = 'http://explorer.dot-bit.org/b/'
ADDRESS_EXPLORER_URL_PREFIX = 'http://explorer.dot-bit.org/a/'
TX_EXPLORER_URL_PREFIX = 'http://explorer.dot-bit.org/tx/'
SANE_TARGET_RANGE = (2256//232 - 1, 2256//2*32 - 1)
DUMB_SCRYPT_DIFF = 1
DUST_THRESHOLD = 0.2e8

from p2pool.bitcoin import networks

PARENT = networks.nets['magicoin']
SHARE_PERIOD = 45 # seconds
CHAIN_LENGTH = 246060//30 # shares
REAL_CHAIN_LENGTH = 246060//30 # shares
TARGET_LOOKBEHIND = 200 # shares
SPREAD = 10 # blocks
IDENTIFIER = ''.decode('hex')
PREFIX = ''.decode('hex')
P2P_PORT = 8233
MIN_TARGET = 0
MAX_TARGET = 2256//232 - 1
PERSIST = True
WORKER_PORT = 9322
BOOTSTRAP_ADDRS = ''.split(' ')
ANNOUNCE_CHANNEL = '#p2pool-alt'
VERSION_CHECK = lambda v: 80002 <= v
VERSION_WARNING = lambda v: 'Upgrade Terracoin to >= 0.8.0.4!' if v < 80004 else None
member
Activity: 98
Merit: 10
Hi all,

just downloaded the current p2pool from git.
Cannot find any networks.py and it seems that something changed at all.
Do you have a new manual/how-to add new altcoins?

Cheers
full member
Activity: 142
Merit: 101
I've managed to create network.py settings for OSC and TAK, but both give me errors relating to the SUBSIDY_FUNC.

This is what i get with both, cant find any answers to it:

Code:
2014-10-26 13:46:12.367000 > Unhandled Error
2014-10-26 13:46:12.373000 > Traceback (most recent call last):
2014-10-26 13:46:12.380000 >   File "C:\Users\Manny\Downloads\p2pool-rav-master\p2pool\main.py", line 595, in run
2014-10-26 13:46:12.387000 >     reactor.run()
2014-10-26 13:46:12.404000 >   File "C:\Python27\lib\site-packages\twisted\internet\base.py", line 1192, in run
2014-10-26 13:46:12.413000 >     self.mainLoop()
2014-10-26 13:46:12.423000 >   File "C:\Python27\lib\site-packages\twisted\internet\base.py", line 1201, in mainLoop
2014-10-26 13:46:12.430000 >     self.runUntilCurrent()
2014-10-26 13:46:12.436000 >   File "C:\Python27\lib\site-packages\twisted\internet\base.py", line 824, in runUntilCurrent
2014-10-26 13:46:12.464000 >     call.func(*call.args, **call.kw)
2014-10-26 13:46:12.470000 > --- ---
2014-10-26 13:46:12.478000 >   File "C:\Users\Manny\Downloads\p2pool-rav-master\p2pool\bitcoin\stratum.py", line 38, in _send_work
2014-10-26 13:46:12.486000 >     x, got_response = self.wb.get_work(*self.wb.preprocess_request('' if self.username is None else self.username))
2014-10-26 13:46:12.493000 >   File "C:\Users\Manny\Downloads\p2pool-rav-master\p2pool\bitcoin\worker_interface.py", line 129, in get_work
2014-10-26 13:46:12.501000 >     x, handler = self._inner.get_work(*args)
2014-10-26 13:46:12.514000 >   File "C:\Users\Manny\Downloads\p2pool-rav-master\p2pool\work.py", line 310, in get_work
2014-10-26 13:46:12.561000 >     base_subsidy=self.node.net.PARENT.SUBSIDY_FUNC(self.current_work.value['height']),
2014-10-26 13:46:12.567000 >   File "C:\Users\Manny\Downloads\p2pool-rav-master\p2pool\data.py", line 222, in generate_transaction
2014-10-26 13:46:12.575000 >     script='\x6a\x28' + cls.get_ref_hash(net, share_info, ref_merkle_link) + pack.IntType(64).pack(last_txout_nonce),
2014-10-26 13:46:12.584000 >   File "C:\Users\Manny\Downloads\p2pool-rav-master\p2pool\data.py", line 246, in get_ref_hash
2014-10-26 13:46:12.591000 >     share_info=share_info,
2014-10-26 13:46:12.601000 >   File "C:\Users\Manny\Downloads\p2pool-rav-master\p2pool\util\pack.py", line 74, in pack
2014-10-26 13:46:12.608000 >     data = self._pack(obj)
2014-10-26 13:46:12.615000 >   File "C:\Users\Manny\Downloads\p2pool-rav-master\p2pool\util\pack.py", line 52, in _pack
2014-10-26 13:46:12.691000 >     f = self.write(None, obj)
2014-10-26 13:46:12.700000 >   File "C:\Users\Manny\Downloads\p2pool-rav-master\p2pool\util\pack.py", line 301, in write
2014-10-26 13:46:12.707000 >     file = type_.write(file, item[key])
2014-10-26 13:46:12.712000 >   File "C:\Users\Manny\Downloads\p2pool-rav-master\p2pool\util\pack.py", line 327, in write
2014-10-26 13:46:12.718000 >     raise ValueError('incorrect length item!')
2014-10-26 13:46:12.728000 > exceptions.ValueError: incorrect length item!
member
Activity: 84
Merit: 10
Please help me out if you can : https://bitcointalksearch.org/topic/m.9247565

Thank you !
sr. member
Activity: 470
Merit: 250
Better to have 100 friends than 100 rubles
Wow!  That sure would have saved me a few hours.  Looks like I still have a bit of cleanup to do.

Thanks!!!
legendary
Activity: 1270
Merit: 1000
Cassey,

Couple recommendations. Set the author donation to 0 as the payout address is most likely not valid. Make sure you have a unique IDENTIFER and PREFIX. If you like I can generate some for you but directions on how to do it are in the p2pool settings post I made somewhere on this board. Do not leave them the same or you may end up working on a different chain...

Edit: Found the post https://bitcointalksearch.org/topic/p2pool-detailed-settings-for-altcoins-457574
sr. member
Activity: 470
Merit: 250
Better to have 100 friends than 100 rubles
Hi all...

I'm the dev for 1Credit and YACCoin.  Started fooling around with hosting p2pools for each last night and it was pretty straight forward.  Thought everything was fine when I left at 3am - pools were hashing, 99.5% credits were being paid out (0.5% to the author), etc.

Looking at the web interface, I would see a single user - me, which was as I expected.

Per my coin log, around 7am this morning, while I was soundly asleep, something changed.  Instead of receiving 99.5% of the coins, I started ONLY receiving the 0.5% associated with discovering a block. The rest was going to a valid, but totally unknown, coin address.  I checked the /users webpage and for this:

http://puu.sh/acBhT/aed46ecb76.png


Those all appear to be valid YACCoin addresses, although I don't see any of them hashing in the p2pool log.  I have also not publicly advertised the pool (until now) nor the connection port, so am surprised by this.

Any thoughts?

FYI:  ADDRESS_VERSION is set to 31, which is correct for my coin, and matches the leading digit in those in the link above.

Possibly related:  I failed to find definitions for IDENTIFER and PREFIX and left those the same as in the litecoin.py?  Should I have randomized those to avoid coin conflicts?

Unrelated:  Can someone tell me what PERSIST does?  I had to set it to False to get things hashing...

Thanks in advance!

Cassey
legendary
Activity: 964
Merit: 1000
hey cartmanspc or anyone else who may be able to help. there is a 200k fuelcoin bounty out to help with the p2pool for fuel. i currently have the sharechain bootsrapped and am the only node for p2pool. so i would like to get everything working properly before more people start hopping on.
https://bitcointalk.org/index.php?topic=673469.new#new
newbie
Activity: 20
Merit: 0
2014-05-25 14:57:11.421000 p2pool (version unknown 7032706f6f6c26d6173742)
2014-05-25 14:57:11.421000
2014-05-25 14:57:11.421000 Testing bitcoind RPC connection to 'http://127.0.0.1:
9555/' with username 'abc'...
2014-05-25 14:57:11.500000     ...success!
2014-05-25 14:57:11.500000     Current block hash: 21ef191b72def9e327ab89
04f3b08d955eec3e3d77a9f4693bd6
2014-05-25 14:57:11.500000     Current block height: 0
2014-05-25 14:57:11.500000
2014-05-25 14:57:11.500000 Testing bitcoind P2P connection to '127.0.0.1:19999'.
..
2014-05-25 14:57:16.515000     ...taking a while. Common reasons for this includ
e all of bitcoind's connection slots being used...
The above,I installing p2pool to a new coin, encounter this problem.How to set the parameters in networks.py.

Help me to see what is wrong.Thank you for help me.
full member
Activity: 176
Merit: 110
I followed a guide on here to mine solo with an S1, it works perfect for BTC but when trying to mine another sha coin (frc) it returns the following:

"Couldn't link returned work's merkle root with its handler. This should only happen if this process was recently restarted!"

what would cause it?

Anyone?
legendary
Activity: 1270
Merit: 1000
Thanks Doom4535. No need to send me anything...happy to help.
full member
Activity: 158
Merit: 100
@CartmanSPC and everybody else

I am happy to say I got the exechain to work.  I am not yet 100% sure why it wasn't working before, but am planning to dig into it.  I was first using the zen2pool version of p2pool and am now using donSchoe's version of it.  I started the chain on a fresh vm and then connected to it with my other systems and it worked without a hitch (first vm started with persistant set to false and then added the others with true (not sure if this matters, but that is what I did)).

The code I used

Code:
execoin2=math.Object(
        PARENT=networks.nets['execoin'],
        SHARE_PERIOD=22, # seconds
        CHAIN_LENGTH=24*60*60//10, # shares
        REAL_CHAIN_LENGTH=24*60*60//10, # shares
        TARGET_LOOKBEHIND=200, # shares
        SPREAD=55, # blocks
        IDENTIFIER='657865636fe89f61'.decode('hex'),
        PREFIX='656578656398ed71'.decode('hex'),
        P2P_PORT=25000,
        MIN_TARGET=4,
        MAX_TARGET=2**256//2**20 - 1,
        PERSIST=True,
        WORKER_PORT=9173,
        BOOTSTRAP_ADDRS='216.249.119.195 216.249.119.194 216.249.119.112'.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-exe2',
        VERSION_CHECK=lambda v: True,
    ),

I will report back later on how the results fair after I've had some more time to test it.  Your welcome to test it for your selves to see if the longer block time works better for your gpu's.  You can connect to any of my nodes (current bootstrap_addrs's) or make your own.

CartmanSPC, do you have an EXE address?

*edit: grammer
full member
Activity: 158
Merit: 100
How do you create new sharechain for a coin?

Change IDENTIFIER & PREFIX and delete the data directory. Although not necessary consider changing the P2P_PORT as well. Change persist to false(?).

Ok, I've changed the identifier to IDENTIFIER='657865636fe89f61'.decode('hex'), PREFIX='656578656398ed71'.decode('hex'), I've already changed the p2pool port (default is 9986).  I would like to have the share chain persist if possible.  Does it matter if I use a different announce channel or would it be beneficial if I used the default announce channel (#p2pool-exe)?  I also removed my execoin2 data directory, I am still getting code like this when I point a miner at one of the pools (if no miners are on the pool it looks fine, except that is doesn't display an entry for pool stats or shares)...

Quote
P2Pool: 0 shares in chain (0 verified/0 total) Peers: 1 (0 incoming)
2014-05-12 21:04:28.303093  Local: 0H/s in last 0.0 seconds Local dead on arrival: Huh Expected time to share: Huh
> Unhandled Error
> Traceback (most recent call last):
>   File "/opt/zen2pool2/zen2pool/p2pool/main.py", line 578, in run
>     reactor.run()
>   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1169, in run
>     self.mainLoop()
>   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1178, in mainLoop
>     self.runUntilCurrent()
>   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 800, in runUntilCurrent
>     call.func(*call.args, **call.kw)
> --- ---
>   File "/opt/zen2pool2/zen2pool/p2pool/bitcoin/stratum.py", line 38, in _send_work
>     x, got_response = self.wb.get_work(*self.wb.preprocess_request('' if self.username is None else self.username))
>   File "/opt/zen2pool2/zen2pool/p2pool/bitcoin/worker_interface.py", line 129, in get_work
>     x, handler = self._inner.get_work(*args)
>   File "/opt/zen2pool2/zen2pool/p2pool/work.py", line 207, in get_work
>     raise jsonrpc.Error_for_code(-12345)(u'p2pool is downloading shares')
> p2pool.util.jsonrpc.NarrowError: -12345 p2pool is downloading shares
> Error while calling merged getauxblock on http://127.0.0.1:26888/:
> Traceback (most recent call last):
> Failure: twisted.internet.error.ConnectionRefusedError: Connection was refused by other side: 111: Connection refused.

edit: well it used ?.?.? without periods instead of Huh

full member
Activity: 176
Merit: 110
I followed a guide on here to mine solo with an S1, it works perfect for BTC but when trying to mine another sha coin (frc) it returns the following:

"Couldn't link returned work's merkle root with its handler. This should only happen if this process was recently restarted!"

what would cause it?
legendary
Activity: 1270
Merit: 1000
How do you create new sharechain for a coin?

Change IDENTIFIER & PREFIX and delete the data directory. Although not necessary consider changing the P2P_PORT as well. Change persist to false(?).
full member
Activity: 158
Merit: 100
How do you create new sharechain for a coin?  I am trying to make a second chain for execoin (partially to learn how and partially to see if I can make it more friendly toward high intensity settings); however, from what I can tell, it is having issues because I don't have share chain (I am trying to run this inbetween two vm's) for either p2pool to connect to.  The code I am trying to use is:

Code:

execoin2=math.Object(
        PARENT=networks.nets['execoin'],
        SHARE_PERIOD=22, # seconds
        CHAIN_LENGTH=24*60*60//10, # shares
        REAL_CHAIN_LENGTH=24*60*60//10, # shares
        TARGET_LOOKBEHIND=200, # shares
        SPREAD=55, # blocks
        IDENTIFIER='657865636f696e65'.decode('hex'),
        PREFIX='65657865636f696e'.decode('hex'),
        P2P_PORT=25000,
        MIN_TARGET=4,
        MAX_TARGET=2**256//2**20 - 1,
        PERSIST=True,
        WORKER_PORT=9173,
        BOOTSTRAP_ADDRS='216.249.119.195'.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-exe2',
        VERSION_CHECK=lambda v: True,
    ),


What are your thoughts?
sr. member
Activity: 364
Merit: 250
SpainCoin.org

New: NewYorkCoin p2pool (this coin is going to relaunch soon!):
https://github.com/NewYorkCoin/p2pool-nyc
member
Activity: 101
Merit: 10
I'm getting this error when trying to start the DigitalCoin P2pool node:
Bitcoin version too old! Upgrade to v0.5 or newer!

Any ideas?
newbie
Activity: 1
Merit: 0
hi all i sow an error like my. help me please

i bild maxcoind, wait some tome for update wallet. then start p2pool.

2014-03-20 10:25:23.539717 p2pool (version 13.4-21-g890b935-dirty)
2014-03-20 10:25:23.540108
2014-03-20 10:25:23.540413 Testing bitcoind RPC connection to 'http://127.0.0.1:18108/' with username 'maxuser'...
2014-03-20 10:25:23.582045     ...success!
2014-03-20 10:25:23.582319     Current block hash: 31bfd6fb4d5b33c9db81da6424b78227ee75bf429747de3db154
2014-03-20 10:25:23.582499     Current block height: 118752
2014-03-20 10:25:23.582649
2014-03-20 10:25:23.582840 Testing bitcoind P2P connection to '127.0.0.1:18109'...
2014-03-20 10:25:28.583272     ...taking a while. Common reasons for this include all of bitcoind's connection slots being used...


my maxcoin.conf


server=1
rpcuser=maxuser
rpcpassword=maxpass
rpcport=18108
port=18109
addnode=maxcoin.cloudapp.net
addnode=maxcoinus.cloudapp.net
addnode=maxcoinasia.cloudapp.net
addnode=maxexplorer.cloudapp.net
addnode=144.76.238.140:8668
addnode=148.251.11.196:8668
addnode=162.251.118.42:8668
addnode=187.104.154.105:8668


my p2pool/networks.py
   maxcoin=math.Object(
        PARENT=networks.nets['maxcoin'],
        SHARE_PERIOD=10,
        NEW_SHARE_PERIOD=10, # seconds target spacing
        CHAIN_LENGTH=24*60*60//30,
        REAL_CHAIN_LENGTH=24*60*60//30,
        TARGET_LOOKBEHIND=200,
        SPREAD=15,
        NEW_SPREAD=15, # blocks
        IDENTIFIER='8c75636b79212121'.decode('hex'),
        PREFIX='8a60193ab8b9617f'.decode('hex'),
        P2P_PORT=8560,
        MIN_TARGET=0,
        MAX_TARGET=2**256//2**20 - 1,
        PERSIST=False,
        WORKER_PORT=9560,
        BOOTSTRAP_ADDRS='us-east1.cryptovein.com'.split(' '),
        ANNOUNCE_CHANNEL='#cryptovein',
        VERSION_CHECK=lambda v: True,
    ),


my p2pool/bitcoin/networks.py

    maxcoin=math.Object(
        P2P_PREFIX='f9bebbd2'.decode('hex'),
        P2P_PORT=8668,
        ADDRESS_VERSION=110,
        RPC_PORT=8108,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'maxcoinaddress' in (yield bitcoind.rpc_help()) and
            not (yield bitcoind.rpc_getinfo())['testnet']
        )),
        SUBSIDY_FUNC=lambda height: 96*100000000 >> (height + 1)//1036800,
        POW_FUNC=data.sha3,
        BLOCK_PERIOD=30,
        SYMBOL='MAX',
        CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'],$
        BLOCK_EXPLORER_URL_PREFIX='http://max.cryptoexplore.com/block/',
        TX_EXPLORER_URL_PREFIX='http://max.cryptoexplore.com/tx/',
        ADDRESS_EXPLORER_URL_PREFIX='http://max.cryptoexplore.com/address/',
        SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
        DUMB_SCRYPT_DIFF=1,
        DUST_THRESHOLD=0.001e8,
    ),


i try chenge ports in than conf files but it no result
can you help me? pls. my os is debian.
sr. member
Activity: 434
Merit: 250
You need to get the vertcoin p2pool code. Sorry I'm on mobile or I would post a link. Google will get you to the proper github fork for scrypt-n p2pool. Also, I'm pretty sure that fork already has settings for gpucoin. Good luck.

Yup, here it is

https://github.com/donSchoe/p2pool-n
Pages:
Jump to: