Bitcoin Forum
October 17, 2017, 11:46:23 AM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   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 36904 times)
Cassey
Sr. Member
****
Offline Offline

Activity: 470

Better to have 100 friends than 100 rubles


View Profile
July 15, 2014, 06:14:46 PM
 #181

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

Cassey
1508240783
Hero Member
*
Offline Offline

Posts: 1508240783

View Profile Personal Message (Offline)

Ignore
1508240783
Reply with quote  #2

1508240783
Report to moderator
1508240783
Hero Member
*
Offline Offline

Posts: 1508240783

View Profile Personal Message (Offline)

Ignore
1508240783
Reply with quote  #2

1508240783
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
CartmanSPC
Legendary
*
Offline Offline

Activity: 1258



View Profile WWW
July 16, 2014, 11:24:09 PM
 #182

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://bitcointalk.org/index.php?topic=457574.0

Cassey
Sr. Member
****
Offline Offline

Activity: 470

Better to have 100 friends than 100 rubles


View Profile
July 17, 2014, 03:14:46 AM
 #183

Wow!  That sure would have saved me a few hours.  Looks like I still have a bit of cleanup to do.

Thanks!!!

Cassey
scratchy
Member
**
Offline Offline

Activity: 84


View Profile
October 18, 2014, 06:43:53 PM
 #184

Please help me out if you can : https://bitcointalk.org/index.php?topic=457574.msg9247565#msg9247565

Thank you !

- Administrator of MuPool.com -
MuPool.com a profesionell stable Multi Coin Pool (BTC,DRK,LTC,DOGE,PPC,FTC,TIT)
mannyg
Full Member
***
Offline Offline

Activity: 131


View Profile
October 26, 2014, 05:48:51 PM
 #185

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 > --- <exception caught here> ---
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!
lahlor
Member
**
Offline Offline

Activity: 98


View Profile WWW
June 21, 2015, 08:50:30 PM
 #186

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

Activity: 98


View Profile WWW
June 22, 2015, 12:57:42 PM
 #187

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
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!