Bitcoin Forum
October 23, 2017, 07:08:44 PM *
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 36941 times)
sheinsha
Sr. Member
****
Offline Offline

Activity: 420


View Profile WWW
July 15, 2013, 06:44:56 AM
 #61

hi again ... ok i am trying to setup a fastcoin pool ....  here are my settings..
Code:
fastcoin=math.Object(
        PARENT=networks.nets['fastcoin'],
        SHARE_PERIOD=9,
        CHAIN_LENGTH=24*60*60//10,
        REAL_CHAIN_LENGTH=24*60*60//10,
        TARGET_LOOKBEHIND=200,
        SPREAD=150,
        IDENTIFIER=''.decode('hex'),
        PREFIX=''.decode('hex'),
        P2P_PORT=50010,
        MIN_TARGET=0,
        MAX_TARGET=2**256//2**20 - 1,
        PERSIST=False,
        WORKER_PORT=19328,
        BOOTSTRAP_ADDRS=''.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-alt',
        VERSION_CHECK=lambda v: True,
    ),

Code:
fastcoin=math.Object(
        P2P_PREFIX='fbc0b6db'.decode('hex'),
        P2P_PORT=9526,
        ADDRESS_VERSION=96,
        RPC_PORT=9527,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'fastcoinaddress' in (yield bitcoind.rpc_help()) and
            not (yield bitcoind.rpc_getinfo())['testnet']
        )),
        SUBSIDY_FUNC=lambda height: 32*100000000 >> (height + 1)//2592000,
        POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
        BLOCK_PERIOD=150,
        SYMBOL='FSC',
        CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Fastcoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/fastcoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.fastcoin'), 'fastcoin.conf'),
        BLOCK_EXPLORER_URL_PREFIX='',
        ADDRESS_EXPLORER_URL_PREFIX='',
        SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
        DUMB_SCRYPT_DIFF=2**16,
    ),

but i always get this error when i try to run on python

Code:
2013-06-14 19:12:36.783384 > Traceback (most recent call last):
2013-06-14 19:12:36.783529 >   File "run_p2pool.py", line 5, in <module>
2013-06-14 19:12:36.783662 >     main.run()
2013-06-14 19:12:36.783774 >   File "/root/p2pool-fsc/p2pool/main.py", line 576, in run
2013-06-14 19:12:36.783888 >     reactor.run()
2013-06-14 19:12:36.784061 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1169, in run
2013-06-14 19:12:36.784176 >     self.mainLoop()
2013-06-14 19:12:36.784290 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1178, in mainLoop
2013-06-14 19:12:36.784400 >     self.runUntilCurrent()
2013-06-14 19:12:36.784511 > --- <exception caught here> ---
2013-06-14 19:12:36.784659 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 800, in runUntilCurrent
2013-06-14 19:12:36.784777 >     call.func(*call.args, **call.kw)
2013-06-14 19:12:36.784892 >   File "/root/p2pool-fsc/p2pool/bitcoin/stratum.py", line 35, in _send_work
2013-06-14 19:12:36.785004 >     x, got_response = self.wb.get_work(*self.wb.preprocess_request('' if self.username is None else self.username))
2013-06-14 19:12:36.785113 >   File "/root/p2pool-fsc/p2pool/bitcoin/worker_interface.py", line 122, in get_work
2013-06-14 19:12:36.785223 >     x, handler = self._inner.get_work(*args)
2013-06-14 19:12:36.785333 >   File "/root/p2pool-fsc/p2pool/work.py", line 238, in get_work
2013-06-14 19:12:36.785443 >     base_subsidy=self.node.net.PARENT.SUBSIDY_FUNC(self.current_work.value['height']),
2013-06-14 19:12:36.785549 >   File "/root/p2pool-fsc/p2pool/data.py", line 197, in generate_transaction
2013-06-14 19:12:36.785660 >     script='\x24' + cls.get_ref_hash(net, share_info, ref_merkle_link) + pack.IntType(32).pack(last_txout_nonce),
2013-06-14 19:12:36.785772 >   File "/root/p2pool-fsc/p2pool/data.py", line 221, in get_ref_hash
2013-06-14 19:12:36.785881 >     share_info=share_info,
2013-06-14 19:12:36.785977 >   File "/root/p2pool-fsc/p2pool/util/pack.py", line 72, in pack
2013-06-14 19:12:36.786191 >     data = self._pack(obj)
2013-06-14 19:12:36.787330 >   File "/root/p2pool-fsc/p2pool/util/pack.py", line 52, in _pack
2013-06-14 19:12:36.787494 >     f = self.write(None, obj)
2013-06-14 19:12:36.787626 >   File "/root/p2pool-fsc/p2pool/util/pack.py", line 299, in write
2013-06-14 19:12:36.787757 >     file = type_.write(file, item[key])
2013-06-14 19:12:36.787869 >   File "/root/p2pool-fsc/p2pool/util/pack.py", line 325, in write
2013-06-14 19:12:36.787976 >     raise ValueError('incorrect length item!')
2013-06-14 19:12:36.788087 > exceptions.ValueError: incorrect length item!

i hav setted up the pass and username. on python running code. but i always get this one

any ideas ?

Hi napoleon, have you got it to work? Im having the same errors...
Thanks!

Minar.cc | DMD Diamond Coin Pool: dmd.minar.cc | CGB CryptogenicBullion Coin Pool: cgb.minar.cc | PHS Philosopherstone Coin Pool: phs.minar.cc | KDS Kudos Pool: kds.minar.cc | CRC CraftCoin Pool: crc.minar.cc | CIN Cinnamon Coin Pool: cin.minar.cc | PXL PXLCoin Pool: pxl.minar.cc | TAG TagCoin Pool: tag.minar.cc | BAC BaseCoin Pool: bac.minar.cc | STR Star Coin Pool: str.minar.cc | JPC Jupiter Coin Pool: jpc.minar.cc
1508785724
Hero Member
*
Offline Offline

Posts: 1508785724

View Profile Personal Message (Offline)

Ignore
1508785724
Reply with quote  #2

1508785724
Report to moderator
There are several different types of Bitcoin clients. Hybrid server-assisted clients like Electrum get a lot of their network information from centralized servers, but they also check the server's results using blockchain header data. This is perhaps somewhat more secure than either server-assisted clients or header-only clients.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
markm
Legendary
*
Offline Offline

Activity: 1988



View Profile WWW
July 15, 2013, 07:04:35 AM
 #62

A lot of coins lately do not work out the block reward by simply dividing an original reward by a number of blocks, or like in bitcoin halve if every four years, so i expect for example the coins that use hashes of previous blocks to "randomly' decide the block reward (superblocks, lucky blocks, golden blocks) the python function for determining the block reward would need to do that exact same pseudorandom number calculations to match correctly the rewards the coin actually gives out?

Has that led to the coins that have lucky blocks being less likely to have p2pool pools due to p2pool coders maybe not wanting to correctly figure out those "random" rewards in python?

or maybe even has it led to p2pool pools for such coins tending to not figure out rewards correctly?

-MarkM-

Browser-launched Crossfire client now online (select CrossCiv server for Galactic  Milieu)
Free website hosting with PHP, MySQL etc: http://hosting.knotwork.com/
PSL
Member
**
Offline Offline

Activity: 113


View Profile
July 15, 2013, 09:59:40 AM
 #63

It doesn't address your errors but I noticed that you use for Fastcoin symbol FSC; it should be FST from my point of view.

https://bitcointalk.org/index.php?topic=218852.0

SYMBOL='FST',

Block period is 12s, isn't it?

BLOCK_PERIOD=12,

Your subsidy is not correct, it is not critical...

SUBSIDY_FUNC=lambda height: 32*100000000 >> (height)//2592000,

And this is not correct and could be troublemaker:

IDENTIFIER=''.decode('hex'),
PREFIX=''.decode('hex'),
sheinsha
Sr. Member
****
Offline Offline

Activity: 420


View Profile WWW
July 16, 2013, 06:40:17 AM
 #64

A lot of coins lately do not work out the block reward by simply dividing an original reward by a number of blocks, or like in bitcoin halve if every four years, so i expect for example the coins that use hashes of previous blocks to "randomly' decide the block reward (superblocks, lucky blocks, golden blocks) the python function for determining the block reward would need to do that exact same pseudorandom number calculations to match correctly the rewards the coin actually gives out?

Has that led to the coins that have lucky blocks being less likely to have p2pool pools due to p2pool coders maybe not wanting to correctly figure out those "random" rewards in python?

or maybe even has it led to p2pool pools for such coins tending to not figure out rewards correctly?

-MarkM-

Exactly, i think coins with random blocks must have their SUBSIDY_FUNC with same algorithm that the coind uses. But i cannot calculate the random part with p2pool, because it wont be the same (obviously) as the value calculated by the function in coind. So i can set it to always the normal block subsidy, but thats not correct.
Anyone know how luckycoin p2pool addresses this?? Ive seen the code, and lambda function states a fixed amount..

Minar.cc | DMD Diamond Coin Pool: dmd.minar.cc | CGB CryptogenicBullion Coin Pool: cgb.minar.cc | PHS Philosopherstone Coin Pool: phs.minar.cc | KDS Kudos Pool: kds.minar.cc | CRC CraftCoin Pool: crc.minar.cc | CIN Cinnamon Coin Pool: cin.minar.cc | PXL PXLCoin Pool: pxl.minar.cc | TAG TagCoin Pool: tag.minar.cc | BAC BaseCoin Pool: bac.minar.cc | STR Star Coin Pool: str.minar.cc | JPC Jupiter Coin Pool: jpc.minar.cc
sheinsha
Sr. Member
****
Offline Offline

Activity: 420


View Profile WWW
July 17, 2013, 04:03:22 PM
 #65

hi again ... ok i am trying to setup a fastcoin pool ....  here are my settings..


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

Code:
fastcoin=math.Object(
        P2P_PREFIX='fbc0b6db'.decode('hex'),
        P2P_PORT=9526,
        ADDRESS_VERSION=96,
        RPC_PORT=9527,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'fastcoinaddress' in (yield bitcoind.rpc_help()) and
            not (yield bitcoind.rpc_getinfo())['testnet']
        )),
        SUBSIDY_FUNC=lambda height: 32*100000000 >> (height + 1)//2592000,
        POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
        BLOCK_PERIOD=150,
        SYMBOL='FSC',
        CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Fastcoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/fastcoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.fastcoin'), 'fastcoin.conf'),
        BLOCK_EXPLORER_URL_PREFIX='',
        ADDRESS_EXPLORER_URL_PREFIX='',
        SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
        DUMB_SCRYPT_DIFF=2**16,
    ),

but i always get this error when i try to run on python

Code:
2013-06-14 19:12:36.783384 > Traceback (most recent call last):
2013-06-14 19:12:36.783529 >   File "run_p2pool.py", line 5, in <module>
2013-06-14 19:12:36.783662 >     main.run()
2013-06-14 19:12:36.783774 >   File "/root/p2pool-fsc/p2pool/main.py", line 576, in run
2013-06-14 19:12:36.783888 >     reactor.run()
2013-06-14 19:12:36.784061 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1169, in run
2013-06-14 19:12:36.784176 >     self.mainLoop()
2013-06-14 19:12:36.784290 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1178, in mainLoop
2013-06-14 19:12:36.784400 >     self.runUntilCurrent()
2013-06-14 19:12:36.784511 > --- <exception caught here> ---
2013-06-14 19:12:36.784659 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 800, in runUntilCurrent
2013-06-14 19:12:36.784777 >     call.func(*call.args, **call.kw)
2013-06-14 19:12:36.784892 >   File "/root/p2pool-fsc/p2pool/bitcoin/stratum.py", line 35, in _send_work
2013-06-14 19:12:36.785004 >     x, got_response = self.wb.get_work(*self.wb.preprocess_request('' if self.username is None else self.username))
2013-06-14 19:12:36.785113 >   File "/root/p2pool-fsc/p2pool/bitcoin/worker_interface.py", line 122, in get_work
2013-06-14 19:12:36.785223 >     x, handler = self._inner.get_work(*args)
2013-06-14 19:12:36.785333 >   File "/root/p2pool-fsc/p2pool/work.py", line 238, in get_work
2013-06-14 19:12:36.785443 >     base_subsidy=self.node.net.PARENT.SUBSIDY_FUNC(self.current_work.value['height']),
2013-06-14 19:12:36.785549 >   File "/root/p2pool-fsc/p2pool/data.py", line 197, in generate_transaction
2013-06-14 19:12:36.785660 >     script='\x24' + cls.get_ref_hash(net, share_info, ref_merkle_link) + pack.IntType(32).pack(last_txout_nonce),
2013-06-14 19:12:36.785772 >   File "/root/p2pool-fsc/p2pool/data.py", line 221, in get_ref_hash
2013-06-14 19:12:36.785881 >     share_info=share_info,
2013-06-14 19:12:36.785977 >   File "/root/p2pool-fsc/p2pool/util/pack.py", line 72, in pack
2013-06-14 19:12:36.786191 >     data = self._pack(obj)
2013-06-14 19:12:36.787330 >   File "/root/p2pool-fsc/p2pool/util/pack.py", line 52, in _pack
2013-06-14 19:12:36.787494 >     f = self.write(None, obj)
2013-06-14 19:12:36.787626 >   File "/root/p2pool-fsc/p2pool/util/pack.py", line 299, in write
2013-06-14 19:12:36.787757 >     file = type_.write(file, item[key])
2013-06-14 19:12:36.787869 >   File "/root/p2pool-fsc/p2pool/util/pack.py", line 325, in write
2013-06-14 19:12:36.787976 >     raise ValueError('incorrect length item!')
2013-06-14 19:12:36.788087 > exceptions.ValueError: incorrect length item!

i hav setted up the pass and username. on python running code. but i always get this one

any ideas ?



It doesn't address your errors but I noticed that you use for Fastcoin symbol FSC; it should be FST from my point of view.

https://bitcointalk.org/index.php?topic=218852.0

SYMBOL='FST',

Block period is 12s, isn't it?

BLOCK_PERIOD=12,

Your subsidy is not correct, it is not critical...

SUBSIDY_FUNC=lambda height: 32*100000000 >> (height)//2592000,

And this is not correct and could be troublemaker:

IDENTIFIER=''.decode('hex'),
PREFIX=''.decode('hex'),


I was able to track down that error, and  made some progress setting the identifiers to something other than '', something like:
        IDENTIFIER='adc586a5dc685cad'.decode('hex'),
        PREFIX='ef39ae959feaf397'.decode('hex'),
These are random chars.. but now the error is gone, and the node seems to work fine. I dont know if this is the same issue you have and im pretty sure this identifiers will make this p2pool node unreachable to other nodes.. Im solo mining with this for my farm, so it wont bother to me. On another coin not fastcoin though..

Hope this helps !

Minar.cc | DMD Diamond Coin Pool: dmd.minar.cc | CGB CryptogenicBullion Coin Pool: cgb.minar.cc | PHS Philosopherstone Coin Pool: phs.minar.cc | KDS Kudos Pool: kds.minar.cc | CRC CraftCoin Pool: crc.minar.cc | CIN Cinnamon Coin Pool: cin.minar.cc | PXL PXLCoin Pool: pxl.minar.cc | TAG TagCoin Pool: tag.minar.cc | BAC BaseCoin Pool: bac.minar.cc | STR Star Coin Pool: str.minar.cc | JPC Jupiter Coin Pool: jpc.minar.cc
CartmanSPC
Legendary
*
Offline Offline

Activity: 1258



View Profile WWW
July 17, 2013, 09:59:23 PM
 #66

I forked P2Pool release 13.1 and added Digitalcoin, Worldcoin, and Craftcoin here:

https://github.com/CartmanSPC/p2pool

guugll
Full Member
***
Offline Offline

Activity: 190



View Profile WWW
August 21, 2013, 09:58:05 AM
 #67

thx Cartman - i use it for WDC and DGC and it works very well!  Wink

i have trouble with CosmosCoin setup for p2pool:

p2pool/networks.py
Code:
    CosmosCoin=math.Object(
        PARENT=networks.nets['CosmosCoin'],
        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='e037d5b8c6923510'.decode('hex'),
        PREFIX='7208c1a53ef649b0'.decode('hex'),
        P2P_PORT=19995,#p2pool p2p port
        MIN_TARGET=0,
        MAX_TARGET=2**256//2**20 - 1,
        PERSIST=False,
        WORKER_PORT=19996,#p2pool worker port
        BOOTSTRAP_ADDRS='198.211.17.160 173.254.207.107 118.250.247.107'.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-alt',
        VERSION_CHECK=lambda v: v >= 60004,
    ),

p2pool/bitcoin/networks.py
Code:
def get_subsidy(nCap, nMaxSubsidy, bnTarget):
#nSubsidy=3.5#add by ComosCoin-DEV
    return int(3.5 * 1000000)



nets = dict(
    CosmosCoin=math.Object(
        P2P_PREFIX='e4e8e9e5'.decode('hex'),
        P2P_PORT=19990,#add by ComosCoin-DEV
        ADDRESS_VERSION=27,#add by ComosCoin-DEV
        RPC_PORT=19991,#add by ComosCoin-DEV
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'CosmosCoinaddress' 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=60, # s 1 minute
        SYMBOL='CMC',
        CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'CosmosCoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/CosmosCoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.CosmosCoin'), 'CosmosCoin.conf'),
        BLOCK_EXPLORER_URL_PREFIX='http://cosmoscoin.com/block/',
        ADDRESS_EXPLORER_URL_PREFIX='http://cosmoscoin.com/address/',
        SANE_TARGET_RANGE=(2**256//2**20//1000 - 1, 2**256//2**20 - 1),
    ),

the

BLOCK_EXPLORER_URL_PREFIX='http://cosmoscoin.com/block/',
ADDRESS_EXPLORER_URL_PREFIX='http://cosmoscoin.com/address/',

this Block Explorer does not exist anymore and the new one does not provide Addresses and Blocks are in another format.
my p2pool runs on http://www.guugll.eu:10327/static/ but no payout - i am not p2pool pro/guru but i have the feeling none of the mined shares/blocks are submitted to the block chain - how could they and thus i get no payout - otherewise it would work like it did for Ahmed when the original Block Explorer was in place...

Please could any p2pool pro/guru correct me if i am wrong or help in case i am right... (we need the Block Explorer back)

minerapia
Full Member
***
Offline Offline

Activity: 168


View Profile
August 21, 2013, 10:09:07 AM
 #68

p2pool does not need a blockchain explorer for anything, its just used to create links to the p2pools webpage.
Cosmoscoin seems to have some sort of modified scrypt algo, so you need to customize the powhash fuction (make module for it) and prolly alter tx creation procedures, so its not so easy task (as modifiying network.py(s))

donations -> btc: 1M6yf45NskQxWXknkMTzQ8o6wShQcSY4EC
                   ltc: LeTpCd6cQL26Q1vjc9kJrTjjFMrPhrpv6j
guugll
Full Member
***
Offline Offline

Activity: 190



View Profile WWW
August 21, 2013, 10:49:42 AM
 #69

thx minerapia

this clarifies also the other errors i get and that was something related to tx message data not beeing handled well.

i am not able to do this mod so i will wait and learn...

CartmanSPC
Legendary
*
Offline Offline

Activity: 1258



View Profile WWW
August 21, 2013, 06:05:10 PM
 #70

I forked P2Pool release 13.1 and added Digitalcoin, Worldcoin, and Craftcoin here:

https://github.com/CartmanSPC/p2pool


Updated to 13.3 and added Casinocoin:

https://github.com/CartmanSPC/p2pool

napoleon2121
Sr. Member
****
Offline Offline

Activity: 266


View Profile
August 22, 2013, 10:28:16 PM
 #71

i hav lost my deticated for a month now couse of the costs. i will be back on the post in a few days Cheesy i will add some more coins to github when i come Cheesy also ty for the corrections on my scrypts Cheesy
guugll
Full Member
***
Offline Offline

Activity: 190



View Profile WWW
September 05, 2013, 09:40:03 AM
 #72

trying again PoS/PoW coin and again loosing...

using Baltazars p2pool: https://github.com/CryptoManiac/p2pool

the result looks like this: http://www.guugll.eu:15327/static/

if i mine with normal ORB address it does not look like its mining for me.
if i mine with hashed address then it look like its mining for me but i do not get anything(no payout).
after some time i get into error - to many open files on server and need to kill python(on server ubuntu 12.04).
i still not made any mods to the litecoin_scrypt but i tryed to make the newtork files again... (maybe this is the issue like in CMC case...above)

Code:
Orbitcoin=math.Object(
        PARENT=networks.nets['Orbitcoin'],
        SHARE_PERIOD=30,                                          # seconds - do i need to chenge it to 3 sec. according to the coin specs?
        CHAIN_LENGTH=24*60*60//30,                          # shares - i did not changed this
        REAL_CHAIN_LENGTH=24*60*60//30,                 # shares - i did not changed this
        TARGET_LOOKBEHIND=200,                              # shares - i did not changed this
        SPREAD=3,                                                   # blocks - i did not changed this
        IDENTIFIER='e037d5b8c6923510'.decode('hex'),  #i did not changed this
        PREFIX='7208c1a53ef649b0'.decode('hex'),        #i did not changed this
        P2P_PORT=25298,                                         #p2pool p2p port
        MIN_TARGET=0,                                           #i did not changed this
        MAX_TARGET=2**256//2**20 - 1,                 #i did not changed this
        PERSIST=False,                                          #add by guugll (solo node?)
        WORKER_PORT=25299,                              #add by guugll (some free port)
        BOOTSTRAP_ADDRS='109.157.228.106 69.85.86.195 184.155.117.207 '.split(' '), #add by guugll
        ANNOUNCE_CHANNEL='#p2pool-alt',
        VERSION_CHECK=lambda v: True,           #add by guugll (no version check)
    ),

and

Code:
def get_subsidy(nCap, nMaxSubsidy, bnTarget):
#nSubsidy=3.5
    return int(0.25 * 31000000)                                 #add by guugll -is this the block reward * max coins ?

nets = dict(
    Orbitcoin=math.Object(
        P2P_PREFIX='e4efdbfd'.decode('hex'),                        #add by guugll - its described in this thread
        P2P_PORT=15298,                                                 #add by guugll - coin port
        ADDRESS_VERSION=115,                                        #add by guugll - its described in this thread
        RPC_PORT=15299,                                                 #add by guugll - coin port
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'Orbitcoinaddress' in (yield bitcoind.rpc_help()) and
            not (yield bitcoind.rpc_getinfo())['testnet']
        )),
        SUBSIDY_FUNC=lambda target: get_subsidy(6, 100, target),                                                                 #i did not changed this
BLOCKHASH_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),    #i did not changed this
        POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),              #i did not changed this
        BLOCK_PERIOD=30,                                                                                                                       # s - i did not changed this
        SYMBOL='ORB',                                                                                                                             #add by guugll - coin symbol
        CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Orbitcoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Orbitcoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.Orbitcoin'), 'Orbitcoin.conf'),
        BLOCK_EXPLORER_URL_PREFIX='http://orb.blockexplorer.com/block/',                                                    #add by guugll - dummy
        ADDRESS_EXPLORER_URL_PREFIX='http://orb.blockexplorer.com/address/',                                            #add by guugll - dummy
        SANE_TARGET_RANGE=(2**256//2**20//1000 - 1, 2**256//2**20 - 1),                                              #i did not changed this
    ),

i used all info from this thread but still missing something, apart the posibility that the issues is in the litecoin_scrypt.
i am not able to compile new litecoin_scrypt :-(

guugll
Full Member
***
Offline Offline

Activity: 190



View Profile WWW
September 05, 2013, 08:01:01 PM
 #73

received some hint on other forum

SPREAD=60  # coin spec.
IDENTIFIER='4f72626974636f696e'.decode('hex'),   # this is new p2pool modification so i can set this - i just hope i made the right value
PREFIX='4f52424954'.decode('hex'),                         # this is new p2pool modification so i can set this - i just hope i made the right value
i had this idea in one of my test but i had the syntax wrong - thx to shakezula
SUBSIDY_FUNC=lambda height: .25*31000000 >> (height + 1)//1051200, 

guugll
Full Member
***
Offline Offline

Activity: 190



View Profile WWW
September 05, 2013, 08:33:40 PM
 #74

ok Subsidy still wrong

so we have now this:
 
File "/p2pool/p2pool/work.py", line 248, in get_work
2013-09-05 22:29:11.796862 >     subsidy = self.node.net.PARENT.SUBSIDY_FUNC(self.current_work.value['bits'].target)
2013-09-05 22:29:11.798394 >   File "/p2pool/p2pool/bitcoin/networks.py", line 84, in <lambda>
2013-09-05 22:29:11.799553 >     SUBSIDY_FUNC=lambda height: .25*31000000 >> (height + 1)//1051200,
2013-09-05 22:29:11.800727 > exceptions.TypeError: unsupported operand type(s) for >>: 'float' and 'long'
 
i am looking into this - had the same error before. but not sure how to fix it.

guugll
Full Member
***
Offline Offline

Activity: 190



View Profile WWW
September 05, 2013, 09:26:10 PM
 #75

so this is not working SUBSIDY_FUNC=lambda height: .25*31000000 >> (height + 1)//1051200,
reward is 0.25
total should be 31000000
the nSubsidy from coin source is 1051200

and we need to make it work with this:

def get_subsidy(nCap, nMaxSubsidy, bnTarget):
    bnLowerBound = 0.01
    bnUpperBound = bnSubsidyLimit = nMaxSubsidy
    bnTargetLimit = 0x00000fffff000000000000000000000000000000000000000000000000000000

    while bnLowerBound + 0.01 <= bnUpperBound:
        bnMidValue = (bnLowerBound + bnUpperBound) / 2
        if pow(bnMidValue, nCap) * bnTargetLimit > pow(bnSubsidyLimit, nCap) * bnTarget:
            bnUpperBound = bnMidValue
        else:
            bnLowerBound = bnMidValue

    nSubsidy = round(bnMidValue, 2)

    if nSubsidy > bnMidValue:
        nSubsidy = nSubsidy - 0.01

    return int(nSubsidy * 1000000)

using this:

SUBSIDY_FUNC=lambda target: get_subsidy(6, 100, target),

or i need a sleep?

minerapia
Full Member
***
Offline Offline

Activity: 168


View Profile
September 10, 2013, 10:17:21 PM
 #76

SUBSIDY_FUNC=lambda height: 0.25*1000000 >> (height + 1)//1051200,
                                  so its  'block reward' * 'satoshies' >> (height + 1)//'height where block halves'.
                                                  

you only need get_subsudy func is theres some special way how the blocks rewards is calculated.

donations -> btc: 1M6yf45NskQxWXknkMTzQ8o6wShQcSY4EC
                   ltc: LeTpCd6cQL26Q1vjc9kJrTjjFMrPhrpv6j
Meccup
Newbie
*
Offline Offline

Activity: 15

Meccup


View Profile
October 13, 2013, 06:50:24 AM
 #77

Does anyone find correct settings for FastCoin?

Share please  Wink
Northwave
Full Member
***
Offline Offline

Activity: 130


View Profile
October 30, 2013, 05:33:01 PM
 #78

Is someone interested in making a p2pool for grandcoin ?
I dont want to mine solo all time. p2pool.org isn't working, other pools are crap :/

I tried to make my own p2pool but my linux skills seems to be to low Wink

regards
Northwave
triggermage
Full Member
***
Offline Offline

Activity: 162


View Profile
November 01, 2013, 09:51:27 PM
 #79

Hey guys, extremely useful thread here, got p2pool-altcoins up and running only by reading it here, thanks!

I am facing one issue tho, the pool keep disconnecting from the wallet, from time to time it takes a good 3 minutes disconnected. Is it due to the cheap *** vps I am using or this is the simptom of something else?

This is what its spits on the terminal:

Code:
%) Current payout: 0.0000 NET
2013-11-01 21:50:22.944636  Pool: 4258kH/s Stale rate: 31.8% Expected time to block: 6.6 minutes
2013-11-01 21:50:23.473178 > Error getting work from bitcoind:
2013-11-01 21:50:23.473491 > Traceback (most recent call last):
2013-11-01 21:50:23.473651 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 545, in _runCallbacks
2013-11-01 21:50:23.473805 >     current.result = callback(current.result, *args, **kw)
2013-11-01 21:50:23.473957 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1095, in gotResult
2013-11-01 21:50:23.474107 >     _inlineCallbacks(r, g, deferred)
2013-11-01 21:50:23.474289 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1037, in _inlineCallbacks
2013-11-01 21:50:23.474463 >     result = result.throwExceptionIntoGenerator(g)
2013-11-01 21:50:23.474625 >   File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
2013-11-01 21:50:23.474774 >     return g.throw(self.type, self.value, self.tb)
2013-11-01 21:50:23.475016 > --- <exception caught here> ---
2013-11-01 21:50:23.475138 >   File "/home/netcoin/p2pool-altcoins/p2pool/util/deferral.py", line 41, in f
2013-11-01 21:50:23.475252 >     result = yield func(*args, **kwargs)
2013-11-01 21:50:23.475364 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1039, in _inlineCallbacks
2013-11-01 21:50:23.475506 >     result = g.send(result)
2013-11-01 21:50:23.475619 >   File "/home/netcoin/p2pool-altcoins/p2pool/bitcoin/helper.py", line 49, in getwork
2013-11-01 21:50:23.475733 >     transactions=map(bitcoin_data.tx_type.unpack, packed_transactions),
2013-11-01 21:50:23.475856 >   File "/home/netcoin/p2pool-altcoins/p2pool/util/pack.py", line 63, in unpack
2013-11-01 21:50:23.476021 >     obj = self._unpack(data)
2013-11-01 21:50:23.476136 >   File "/home/netcoin/p2pool-altcoins/p2pool/util/pack.py", line 47, in _unpack
2013-11-01 21:50:23.476250 >     raise LateEnd()
2013-11-01 21:50:23.476361 > p2pool.util.pack.LateEnd:
2013-11-01 21:50:24.895071 1 tails:

Thank you very much!
triggermage
Full Member
***
Offline Offline

Activity: 162


View Profile
November 03, 2013, 04:24:21 AM
 #80

Ok new error, looks like there's something wrong in the coin settings, its Netcoin (cryptomunity.pw).

Code:
2013-11-03 04:15:08.193449 > Error in DeferredResource handler:
2013-11-03 04:15:08.193679 > Traceback (most recent call last):
2013-11-03 04:15:08.193804 >   File "/home/netcoin/newpool/p2pool-altcoins/p2pool/util/deferred_resource.py", line 24, in render
2013-11-03 04:15:08.193925 >     defer.maybeDeferred(resource.Resource.render, self, request).addCallbacks(finish, finish_error)
2013-11-03 04:15:08.194044 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 134, in maybeDeferred
2013-11-03 04:15:08.194160 >     result = f(*args, **kw)
2013-11-03 04:15:08.194274 >   File "/usr/lib/python2.7/dist-packages/twisted/web/resource.py", line 216, in render
2013-11-03 04:15:08.194388 >     return m(request)
2013-11-03 04:15:08.194501 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1181, in unwindGenerator
2013-11-03 04:15:08.194617 >     return _inlineCallbacks(None, gen, Deferred())
2013-11-03 04:15:08.194730 > --- <exception caught here> ---
2013-11-03 04:15:08.194816 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1039, in _inlineCallbacks
2013-11-03 04:15:08.194900 >     result = g.send(result)
2013-11-03 04:15:08.194980 >   File "/home/netcoin/newpool/p2pool-altcoins/p2pool/web.py", line 196, in render_GET
2013-11-03 04:15:08.195064 >     res = yield self.func(*self.args)
2013-11-03 04:15:08.195145 >   File "/home/netcoin/newpool/p2pool-altcoins/p2pool/web.py", line 329, in <lambda>
2013-11-03 04:15:08.195259 >     new_root.putChild('best_share_hash', WebInterface(lambda: '%064x' % node.best_share_var.value))
2013-11-03 04:15:08.195375 > exceptions.TypeError: %x format: a number is required, not NoneType

My configs looks like this:
networks.py:

Code:
netcoin=math.Object(
        PARENT=networks.nets['netcoin'],
        SHARE_PERIOD=60, # seconds
        CHAIN_LENGTH=24*60*60//10, # shares
        REAL_CHAIN_LENGTH=24*60*60//10, # shares
        TARGET_LOOKBEHIND=100, # shares
        SPREAD=30, # blocks
        IDENTIFIER='aeaed5b8c6923410'.decode('hex'),
        PREFIX='aeaec1a53ef629b0'.decode('hex'),
        P2P_PORT=11315,
        MIN_TARGET=0,
        MAX_TARGET=2**256//2**32 - 1,
        PERSIST=False,
        WORKER_PORT=5432,
        BOOTSTRAP_ADDRS='forre.st vps.forre.st'.split(' '),
        ANNOUNCE_CHANNEL='#p2pool-alt',
        VERSION_CHECK=lambda v: True,
    ),

bitcoin/networks.py:

Code:
netcoin=math.Object(
        P2P_PREFIX='fdb6a5db'.decode('hex'),
        P2P_PORT=11310,
        ADDRESS_VERSION=112,
        RPC_PORT=11311,
        RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
            'netcoinaddress' in (yield bitcoind.rpc_help()) and
            not (yield bitcoind.rpc_getinfo())['testnet']
        )),
        SUBSIDY_FUNC=lambda height: 1024*320636160 >> (height + 1)//129600,
        POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
        BLOCK_PERIOD=60, # s
        SYMBOL='NET',
        CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'NetCoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/NetCoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.netcoin'), 'netcoin.conf'),
        BLOCK_EXPLORER_URL_PREFIX='http://frawgie.hopto.org/search?q=',
        ADDRESS_EXPLORER_URL_PREFIX='http://frawgie.hopto.org/search?q=',
SANE_TARGET_RANGE=(2**256//1000000000 - 1, 2**256//1000 - 1),
        DUMB_SCRYPT_DIFF=2**16,
    ),

And the line in helper.py:

Code:
if 'lite' in net.NAME or 'feather' in net.NAME or 'chn' in net.NAME or 'franko' in net.NAME or 'net' in net.NAME:

Everything looks good but when I test mining on it I don't receive the block rewards, I get some few coins into the default address but nothing on the miners address, seems like the pool is not getting proper work from the wallet, or not what it expected.

Also the web interface trows this error every time I try to reload (F5) the page:

Code:
2013-11-03 04:20:27.208840 > Error in DeferredResource handler:
2013-11-03 04:20:27.209111 > Traceback (most recent call last):
2013-11-03 04:20:27.209257 >   File "/home/netcoin/newpool/p2pool-altcoins/p2pool/util/deferred_resource.py", line 24, in render
2013-11-03 04:20:27.209402 >     defer.maybeDeferred(resource.Resource.render, self, request).addCallbacks(finish, finish_error)
2013-11-03 04:20:27.209545 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 134, in maybeDeferred
2013-11-03 04:20:27.209686 >     result = f(*args, **kw)
2013-11-03 04:20:27.209822 >   File "/usr/lib/python2.7/dist-packages/twisted/web/resource.py", line 216, in render
2013-11-03 04:20:27.209960 >     return m(request)
2013-11-03 04:20:27.210096 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1181, in unwindGenerator
2013-11-03 04:20:27.210235 >     return _inlineCallbacks(None, gen, Deferred())
2013-11-03 04:20:27.210452 > --- <exception caught here> ---
2013-11-03 04:20:27.210547 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1039, in _inlineCallbacks
2013-11-03 04:20:27.210636 >     result = g.send(result)
2013-11-03 04:20:27.210719 >   File "/home/netcoin/newpool/p2pool-altcoins/p2pool/web.py", line 196, in render_GET
2013-11-03 04:20:27.210804 >     res = yield self.func(*self.args)
2013-11-03 04:20:27.210888 >   File "/home/netcoin/newpool/p2pool-altcoins/p2pool/web.py", line 329, in <lambda>
2013-11-03 04:20:27.210974 >     new_root.putChild('best_share_hash', WebInterface(lambda: '%064x' % node.best_share_var.value))
2013-11-03 04:20:27.211058 > exceptions.TypeError: %x format: a number is required, not NoneType

This also is very odd:

Code:
2013-11-03 04:24:52.773275 New work for worker! Difficulty: 0.000096 Share difficulty: 1.000000 Total block value: 1024.000000 NET including 0 transactions

Could it be something with the block height or block calculation on the wallet?
Thanks!
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!