• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

P2Pool P2Pool repository and python modules

My p2pool is listed there ;-)
Everyone welcome in Germany on 81.7.3.236:7903 ;-)
(or dash.p2pool.1yz.de:7903)
 
UdjinM6, send me this DONATION_SCRIPT (XqPQ26xGigKkq4yCNmTfgkRPdt8FyB547J)
Code:
41047559d13c3f81b1fadbd8dd03e4b5a1c73b05e2b980e00d467aa9440b29c7de23664dde6428d75cafed22ae4f0d302e26c5c5a5dd4d3e1b796d7281bdc9430f35ac

It`s work. But we need to change IDENTIFIER and PREFIX.
I think it`s fix not crit. And we can wait some time.
And make big update in a few months.

So let`s choose a date. And tell this to all owners p2pool nodes.

If we dont delete old shares - we get
Code:
2015-04-19 22:28:28.040645 > exceptions.AssertionError:
2015-04-19 22:28:28.047152 > HARMLESS error while reading saved shares, continuing where left off:
2015-04-19 22:28:28.047386 > Traceback (most recent call last):
2015-04-19 22:28:28.047513 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 551, in _runCallbacks
2015-04-19 22:28:28.047618 >     current.result = callback(current.result, *args, **kw)
2015-04-19 22:28:28.047735 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1101, in gotResult
2015-04-19 22:28:28.047812 >     _inlineCallbacks(r, g, deferred)
2015-04-19 22:28:28.047907 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1045, in _inlineCallbacks
2015-04-19 22:28:28.047987 >     result = g.send(result)
2015-04-19 22:28:28.048059 >   File "/home/darkcoin/p2pool-dash/p2pool/main.py", line 112, in main
2015-04-19 22:28:28.048146 >     ss = p2pool_data.ShareStore(os.path.join(datadir_path, 'shares.'), net, share_cb, known_verified.add)
2015-04-19 22:28:28.048240 > --- <exception caught here> ---
2015-04-19 22:28:28.048330 >   File "/home/darkcoin/p2pool-dash/p2pool/data.py", line 679, in __init__
2015-04-19 22:28:28.048423 >     share = load_share(raw_share, self.net, None)
2015-04-19 22:28:28.048528 >   File "/home/darkcoin/p2pool-dash/p2pool/data.py", line 48, in load_share
2015-04-19 22:28:28.048626 >     return Share(net, peer_addr, Share.share_type.unpack(share['contents']))
2015-04-19 22:28:28.048690 >   File "/home/darkcoin/p2pool-dash/p2pool/data.py", line 281, in __init__
2015-04-19 22:28:28.048762 >     self.gentx_before_refhash,
2015-04-19 22:28:28.048841 >   File "/home/darkcoin/p2pool-dash/p2pool/data.py", line 30, in check_hash_link
2015-04-19 22:28:28.048904 >     assert len(hash_link['extra_data']) == max(0, extra_length - len(const_ending))
2015-04-19 22:28:28.048967 > exceptions.AssertionError:

If one node change DONATION_SCRIPT and other not change - we get this.
Code:
2015-04-20 16:57:47.609056 Peer 162.243.104.174:8999 misbehaving, will drop and ban. Reason: share PoW invalid
2015-04-20 16:57:47.609409 Bad peer banned: ('162.243.104.174', 8999)
2015-04-20 16:57:47.610032 Lost peer 162.243.104.174:8999 -
2015-04-20 16:57:47.610228     Connection was aborted locally, using
2015-04-20 16:57:47.610386     L{twisted.internet.interfaces.ITCPTransport.abortConnection}.
2015-04-20 16:57:47.610558
2015-04-20 16:57:47.610698     @since: 11.1
2015-04-20 16:57:47.610822     .
2015-04-20 16:57:47.611444 > in handle_share_hashes:
2015-04-20 16:57:47.611607 > Traceback (most recent call last):
2015-04-20 16:57:47.611724 > Failure: twisted.internet.error.ConnectionAborted:
2015-04-20 16:57:47.611836 >     Connection was aborted locally, using
2015-04-20 16:57:47.612025 >     L{twisted.internet.interfaces.ITCPTransport.abortConnection}.
2015-04-20 16:57:47.612160 >
2015-04-20 16:57:47.612263 >     @since: 11.1
2015-04-20 16:57:47.612367 >     .

If we use compress public key we get.
Code:
2015-04-20 17:18:40.505787 > Squelched JSON error:
2015-04-20 17:18:40.506095 > Traceback (most recent call last):
2015-04-20 17:18:40.506249 >   File "/usr/lib/python2.7/dist-packages/twisted/protocols/basic.py", line 455, in dataReceived
2015-04-20 17:18:40.506410 >     self.lineReceived(line)
2015-04-20 17:18:40.506549 >   File "/home/darkcoin/p2pool-dash/p2pool/util/jsonrpc.py", line 174, in lineReceived
2015-04-20 17:18:40.506707 >     _handle(line, self, response_handler=self._matcher.got_response).addCallback(lambda line2: self.sendLine(line2) if line2 is not None else None)
2015-04-20 17:18:40.506883 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1187, in unwindGenerator
2015-04-20 17:18:40.507102 >     return _inlineCallbacks(None, gen, Deferred())
2015-04-20 17:18:40.507288 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1045, in _inlineCallbacks
2015-04-20 17:18:40.507452 >     result = g.send(result)
2015-04-20 17:18:40.507597 > --- <exception caught here> ---
2015-04-20 17:18:40.507765 >   File "/home/darkcoin/p2pool-dash/p2pool/util/jsonrpc.py", line 95, in _handle
2015-04-20 17:18:40.507936 >     result = yield method_meth(*list(preargs) + list(params))
2015-04-20 17:18:40.508090 >   File "/home/darkcoin/p2pool-dash/p2pool/dash/stratum.py", line 75, in rpc_submit
2015-04-20 17:18:40.508236 >     return got_response(header, worker_name, coinb_nonce)
2015-04-20 17:18:40.508371 >   File "/home/darkcoin/p2pool-dash/p2pool/dash/worker_interface.py", line 136, in <lambda>
2015-04-20 17:18:40.508563 >     lambda header, user, coinbase_nonce: handler(header, user, pack.IntType(self._my_bits).pack(nonce) + coinbase_nonce),
2015-04-20 17:18:40.508823 >   File "/home/darkcoin/p2pool-dash/p2pool/work.py", line 400, in got_response
2015-04-20 17:18:40.509090 >     share = get_share(header, last_txout_nonce)
2015-04-20 17:18:40.509228 >   File "/home/darkcoin/p2pool-dash/p2pool/data.py", line 227, in get_share
2015-04-20 17:18:40.509386 >     merkle_link=dash_data.calculate_merkle_link([None] + other_transaction_hashes, 0),
2015-04-20 17:18:40.509528 >   File "/home/darkcoin/p2pool-dash/p2pool/data.py", line 259, in __init__
2015-04-20 17:18:40.509668 >     assert not self.hash_link['extra_data'], repr(self.hash_link['extra_data'])
2015-04-20 17:18:40.509806 > exceptions.AssertionError: '\xd5\x0f\x00\x00\x00\x00'
 
Last edited by a moderator:
https://github.com/dashpay/p2pool-dash/blob/master/p2pool/data.py#L185-L188
data.py => get debug, what script worker we get?
Code:
print dash_data.pubkey_hash_to_script2(share_data['pubkey_hash']).encode('hex')

Start mining
Code:
2015-04-21 10:05:56.910744 76a91475a8d2fa5628e73e19d0b6032fb841939ed091c388ac
2015-04-21 10:05:56.918241 76a91475a8d2fa5628e73e19d0b6032fb841939ed091c388ac

Code:
darkcoind decodescript '76a91475a8d2fa5628e73e19d0b6032fb841939ed091c388ac' (my address)
{
    "asm" : "OP_DUP OP_HASH160 75a8d2fa5628e73e19d0b6032fb841939ed091c3 OP_EQUALVERIFY OP_CHECKSIG",
    "reqSigs" : 1,
    "type" : "pubkeyhash",
    "addresses" : [
        "XmQy8oaqGcGQSajLBn8Hi3k5sNvjhCMBjT"
    ],
    "p2sh" : "7eM4cruSx1sqjjFN6Xr3YYpfbnxmXTYYge"
}

From this we can conclude that DONATION SCRIPT left in this form (uncompressed) => to do a mass update of all pools.

So we can use compress DONATION SCRIPT but need fix this error
Code:
2015-04-20 17:18:40.505787 > Squelched JSON error:
2015-04-20 17:18:40.506095 > Traceback (most recent call last):
2015-04-20 17:18:40.506249 >   File "/usr/lib/python2.7/dist-packages/twisted/protocols/basic.py", line 455, in dataReceived
2015-04-20 17:18:40.506410 >     self.lineReceived(line)
2015-04-20 17:18:40.506549 >   File "/home/darkcoin/p2pool-dash/p2pool/util/jsonrpc.py", line 174, in lineReceived
2015-04-20 17:18:40.506707 >     _handle(line, self, response_handler=self._matcher.got_response).addCallback(lambda line2: self.sendLine(line2) if line2 is not None else None)
2015-04-20 17:18:40.506883 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1187, in unwindGenerator
2015-04-20 17:18:40.507102 >     return _inlineCallbacks(None, gen, Deferred())
2015-04-20 17:18:40.507288 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1045, in _inlineCallbacks
2015-04-20 17:18:40.507452 >     result = g.send(result)
2015-04-20 17:18:40.507597 > --- <exception caught here> ---
2015-04-20 17:18:40.507765 >   File "/home/darkcoin/p2pool-dash/p2pool/util/jsonrpc.py", line 95, in _handle
2015-04-20 17:18:40.507936 >     result = yield method_meth(*list(preargs) + list(params))
2015-04-20 17:18:40.508090 >   File "/home/darkcoin/p2pool-dash/p2pool/dash/stratum.py", line 75, in rpc_submit
2015-04-20 17:18:40.508236 >     return got_response(header, worker_name, coinb_nonce)
2015-04-20 17:18:40.508371 >   File "/home/darkcoin/p2pool-dash/p2pool/dash/worker_interface.py", line 136, in <lambda>
2015-04-20 17:18:40.508563 >     lambda header, user, coinbase_nonce: handler(header, user, pack.IntType(self._my_bits).pack(nonce) + coinbase_nonce),
2015-04-20 17:18:40.508823 >   File "/home/darkcoin/p2pool-dash/p2pool/work.py", line 400, in got_response
2015-04-20 17:18:40.509090 >     share = get_share(header, last_txout_nonce)
2015-04-20 17:18:40.509228 >   File "/home/darkcoin/p2pool-dash/p2pool/data.py", line 227, in get_share
2015-04-20 17:18:40.509386 >     merkle_link=dash_data.calculate_merkle_link([None] + other_transaction_hashes, 0),
2015-04-20 17:18:40.509528 >   File "/home/darkcoin/p2pool-dash/p2pool/data.py", line 259, in __init__
2015-04-20 17:18:40.509668 >     assert not self.hash_link['extra_data'], repr(self.hash_link['extra_data'])
2015-04-20 17:18:40.509806 > exceptions.AssertionError: '\xd5\x0f\x00\x00\x00\x00'
 
Been away working on my P2Pool Scanner for node listing. I'm reading through some of the suggested changes and I'll give some feedback once I have the time to consume the ideas. But initially, I do like the idea of changing the donation script!
 
I'm not good at p2pool code but self.dashd_work.value['subsidy'] should already be equal to "coinbasevalue" from getblocktemplate rpc https://github.com/jakehaas/p2pool-...282bfe15d6174bce5ed/p2pool/dash/helper.py#L53 , there is no need to fix it additionally.

On a side note: all these chained if-else-s could be replaced with simple real_pay = self.dashd_work.value['subsidy'] - self.dashd_work.value['payee_amount'] imo i.e. whole function then could be just
Code:
def get_current_txouts(self):
    return p2pool_data.get_expected_payouts(self.tracker, self.best_share_var.value, self.dashd_work.value['bits'].target, self.dashd_work.value['subsidy'] - self.dashd_work.value['payee_amount'], self.net)
 
What is this error?

2015-06-07 22:40:06.635554 Unneeded inv type {'type': 'masternode_scanning_error', 'hash': 90805192354789457957462072667812379392211428527189776469362829610153770660639L}
2015-06-07 22:40:06.794988 Unneeded inv type {'type': 'masternode_scanning_error', 'hash': 71571720479170413060769226664331903072239628247966875327083713913519007433994L}
2015-06-07 22:40:06.949688 Unneeded inv type {'type': 'masternode_winner', 'hash': 1697502108201229469791917431198227250445931004066320553901622664517653995063L}
 
Back
Top