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

To p2pool owner, prepare hard fork.

chaeplin

Well-known member
https://darkcointalk.org/threads/masternode-payments-attention-pool-operators.764/

Use script to switch dstorm's Masternode payment enabled p2pool-drk.
As p2pool owner account, https://gist.github.com/chaeplin/e6157be59d5f9a94d580

As root use https://gist.github.com/chaeplin/f8c658119fbbe6d024e5 to redirect port from 7903 to 8998

1) download dstorm's p2pool-drk
2) change scripts config.
3) add to cron ( one for p2pool owner account, one for root)

Use scripts at your own risk
(but tested at my system ;D)
 
Last edited by a moderator:
What does the root script do exactly? DO we need two different directories for the old and new p2pool-drk?

Oh nevermind, I ran the script and it simply changes when the fork time comes. Now, why can't we just switch now? Do we have to wait caz there's different ports?
 
Last edited by a moderator:
Can we just run dstorm's p2pool-drk? Would that work fine? These scripts are only for existing p2pools right for smooth transition?
 
Can we just run dstorm's p2pool-drk? Would that work fine? These scripts are only for existing p2pools right for smooth transition?
Yes, existing p2pools, one for hard fork, one for port redirect.

I can't sure dstorm's p2pool-drk is working with current Darkcoin network(payment not yet started)
 
Yes, existing p2pools, one for hard fork, one for port redirect.

I can't sure dstorm's p2pool-drk is working with current Darkcoin network(payment not yet started)
Just one more question, why are you redirecting from 7903 to 8998?

The source code for dstorm seems to have port 8999?

Sorry excuse my stupidness and btw, great tutorials and code you have been putting up, I learned a lot from it.
 
Just one more question, why are you redirecting from 7903 to 8998?

The source code for dstorm seems to have port 8999?

Sorry excuse my stupidness and btw, great tutorials and code you have been putting up, I learned a lot from it.


WORKER_PORT=8998 is right. 8999 is for p2pool peer connection.
 
I tried running dstorm's p2pool-drk, but in the p2pool log I get the following error:
Code:
2014-05-24 14:46:45.389649 > Bitcoin connection lost. Reason: Connection was closed cleanly.
In darkcoin's debug log I see this:
Code:
2014-05-24 11:46:45 accepted connection 127.0.0.1:55627
2014-05-24 11:46:45

PROCESSMESSAGE: INVALID MESSAGESTART

2014-05-24 11:46:45 disconnecting node 127.0.0.1:55627
Is this expected as the hard fork has not yet happened?
 
Good idea. Done. I have another error:
Code:
2014-05-24 15:47:19.697209 > Share check failed: 0000000a68d91e6fd7e73852c3e6180f8d5bb8ae4904c331f5844e4d09912bf2 -> 0000000099d97eaf8cb31f64d070b48bf8d3dc5a30f14c1e6eabfad2a1b6d02e
2014-05-24 15:47:19.698073 > Traceback (most recent call last):
2014-05-24 15:47:19.698651 >   File "/home/drk/p2pool-drk/p2pool/util/deferral.py", line 233, in it
2014-05-24 15:47:19.699274 >     res = gen.send(cur) # external code is run here
2014-05-24 15:47:19.700773 >   File "/home/drk/p2pool-drk/p2pool/util/deferral.py", line 284, in _worker
2014-05-24 15:47:19.701308 >     self.func(*self.args, **self.kwargs)
2014-05-24 15:47:19.701941 >   File "/home/drk/p2pool-drk/p2pool/node.py", line 311, in clean_tracker
2014-05-24 15:47:19.702753 >     best, desired, decorated_heads, bad_peer_addresses = self.tracker.think(self.get_height_rel_highest, self.bitcoind_work.value['previous_block'], self.bitcoind_work.value['bits'], self.known_txs_var.value)
2014-05-24 15:47:19.703445 >   File "/home/drk/p2pool-drk/p2pool/data.py", line 508, in think
2014-05-24 15:47:19.704024 >     if not self.attempt_verify(share):
2014-05-24 15:47:19.704794 > --- <exception caught here> ---
2014-05-24 15:47:19.705333 >   File "/home/drk/p2pool-drk/p2pool/data.py", line 452, in attempt_verify
2014-05-24 15:47:19.705905 >     share.check(self)
2014-05-24 15:47:19.706439 >   File "/home/drk/p2pool-drk/p2pool/data.py", line 342, in check
2014-05-24 15:47:19.706953 >     raise ValueError('''gentx doesn't match hash_link''')
2014-05-24 15:47:19.707575 > exceptions.ValueError: gentx doesn't match hash_link
2014-05-24 15:47:19.708824 2 tails:
2014-05-24 15:47:19.709737 09912bf2 (6, None)
2014-05-24 15:47:19.710333 xxxxxxxx (617, None)
2014-05-24 15:47:19.711456 1 heads. Top 10:
2014-05-24 15:47:19.712907     f7f7ed58 9a6b646b (82320111909L, -1, -1400935621.856796)
2014-05-24 15:47:19.713573 Punishing share for 'Block-stale detected! height(55e9461b4b0e84544392c5e8e2a3be1b7bd0693cc2076cf3ba82f1f8) < height(1968f02ef33aae18786974a44246f03f4e016b5d108a604d19989182d) or 1d021214 != 1d01d077'! Jumping from f7f7ed58 to 9a6b646b!
2014-05-24 15:47:19.714326 Desire 0 shares. Cutoff: 14.6 hours old diff>0.00
2014-05-24 15:47:19.717538 > Share check failed: 0000000a68d91e6fd7e73852c3e6180f8d5bb8ae4904c331f5844e4d09912bf2 -> 0000000099d97eaf8cb31f64d070b48bf8d3dc5a30f14c1e6eabfad2a1b6d02e
2014-05-24 15:47:19.718003 > Traceback (most recent call last):
2014-05-24 15:47:19.718253 >   File "/home/drk/p2pool-drk/p2pool/util/deferral.py", line 284, in _worker
2014-05-24 15:47:19.718588 >     self.func(*self.args, **self.kwargs)
2014-05-24 15:47:19.719022 >   File "/home/drk/p2pool-drk/p2pool/node.py", line 357, in clean_tracker
2014-05-24 15:47:19.719258 >     self.set_best_share()
2014-05-24 15:47:19.719452 >   File "/home/drk/p2pool-drk/p2pool/node.py", line 295, in set_best_share
2014-05-24 15:47:19.719719 >     best, desired, decorated_heads, bad_peer_addresses = self.tracker.think(self.get_height_rel_highest, self.bitcoind_work.value['previous_block'], self.bitcoind_work.value['bits'], self.known_txs_var.value)
2014-05-24 15:47:19.719974 >   File "/home/drk/p2pool-drk/p2pool/data.py", line 508, in think
2014-05-24 15:47:19.720206 >     if not self.attempt_verify(share):
2014-05-24 15:47:19.720547 > --- <exception caught here> ---
2014-05-24 15:47:19.720843 >   File "/home/drk/p2pool-drk/p2pool/data.py", line 452, in attempt_verify
2014-05-24 15:47:19.721077 >     share.check(self)
2014-05-24 15:47:19.721330 >   File "/home/drk/p2pool-drk/p2pool/data.py", line 342, in check
2014-05-24 15:47:19.721581 >     raise ValueError('''gentx doesn't match hash_link''')
2014-05-24 15:47:19.721814 > exceptions.ValueError: gentx doesn't match hash_link
This is in the testnet - both darkcoind and p2pool are set to use the testnet.
Can you help me with this? I want to be prepared for the hard fork.
 
Not at first, I deleted it later and restarted darkcoind and p2pool (actually I even recompiled p2pool). This was done before I posted here the error.
 
Oh, it seems there's a new error after deleting the data directory, because of the similar formatting I didn't (at first) notice it cites other python files:
Code:
2014-05-24 15:57:20.398198 > Unhandled Error
2014-05-24 15:57:20.398444 > Traceback (most recent call last):
2014-05-24 15:57:20.398596 >   File "/home/drk/p2pool-drk/p2pool/main.py", line 578, in run
2014-05-24 15:57:20.398777 >     reactor.run()
2014-05-24 15:57:20.398922 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1192, in run
2014-05-24 15:57:20.399066 >     self.mainLoop()
2014-05-24 15:57:20.399205 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1201, in mainLoop
2014-05-24 15:57:20.399355 >     self.runUntilCurrent()
2014-05-24 15:57:20.399494 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 824, in runUntilCurrent
2014-05-24 15:57:20.399635 >     call.func(*call.args, **call.kw)
2014-05-24 15:57:20.399789 > --- <exception caught here> ---
2014-05-24 15:57:20.399930 >   File "/home/drk/p2pool-drk/p2pool/bitcoin/stratum.py", line 38, in _send_work
2014-05-24 15:57:20.400069 >     x, got_response = self.wb.get_work(*self.wb.preprocess_request('' if self.username is None else self.username))
2014-05-24 15:57:20.400269 >   File "/home/drk/p2pool-drk/p2pool/bitcoin/worker_interface.py", line 129, in get_work
2014-05-24 15:57:20.400410 >     x, handler = self._inner.get_work(*args)
2014-05-24 15:57:20.400548 >   File "/home/drk/p2pool-drk/p2pool/work.py", line 296, in get_work
2014-05-24 15:57:20.400718 >     base_subsidy=self.node.net.PARENT.SUBSIDY_FUNC(self.current_work.value['bits'].bits, self.current_work.value['height']),
2014-05-24 15:57:20.400863 >   File "/home/drk/p2pool-drk/p2pool/bitcoin/networks.py", line 50, in <lambda>
2014-05-24 15:57:20.401002 >     SUBSIDY_FUNC=lambda nBits, height: __import__('darkcoin_subsidy').GetBlockBaseValue_testnet(nBits, height),
2014-05-24 15:57:20.401282 > exceptions.AttributeError: 'module' object has no attribute 'GetBlockBaseValue_testnet'
2014-05-24 15:57:20.403662 > Unhandled Error
2014-05-24 15:57:20.403916 > Traceback (most recent call last):
2014-05-24 15:57:20.404114 >   File "/home/drk/p2pool-drk/p2pool/main.py", line 578, in run
2014-05-24 15:57:20.404339 >     reactor.run()
2014-05-24 15:57:20.404528 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1192, in run
2014-05-24 15:57:20.404723 >     self.mainLoop()
2014-05-24 15:57:20.404993 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1201, in mainLoop
2014-05-24 15:57:20.405192 >     self.runUntilCurrent()
2014-05-24 15:57:20.405379 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 824, in runUntilCurrent
2014-05-24 15:57:20.405674 >     call.func(*call.args, **call.kw)
2014-05-24 15:57:20.405874 > --- <exception caught here> ---
2014-05-24 15:57:20.406069 >   File "/home/drk/p2pool-drk/p2pool/bitcoin/stratum.py", line 38, in _send_work
2014-05-24 15:57:20.406333 >     x, got_response = self.wb.get_work(*self.wb.preprocess_request('' if self.username is None else self.username))
2014-05-24 15:57:20.406539 >   File "/home/drk/p2pool-drk/p2pool/bitcoin/worker_interface.py", line 129, in get_work
2014-05-24 15:57:20.406755 >     x, handler = self._inner.get_work(*args)
2014-05-24 15:57:20.407017 >   File "/home/drk/p2pool-drk/p2pool/work.py", line 296, in get_work
2014-05-24 15:57:20.407215 >     base_subsidy=self.node.net.PARENT.SUBSIDY_FUNC(self.current_work.value['bits'].bits, self.current_work.value['height']),
2014-05-24 15:57:20.408103 >   File "/home/drk/p2pool-drk/p2pool/bitcoin/networks.py", line 50, in <lambda>
2014-05-24 15:57:20.408335 >     SUBSIDY_FUNC=lambda nBits, height: __import__('darkcoin_subsidy').GetBlockBaseValue_testnet(nBits, height),
2014-05-24 15:57:20.408540 > exceptions.AttributeError: 'module' object has no attribute 'GetBlockBaseValue_testnet'
 
After replacing the subsidy function, I was able to run dstorm's p2pool-drk. I am getting the following error message (even though I deleted the p2pool/data directory a few times already):
Code:
2014-05-24 17:13:06.163107 > Share check failed: 000000027eac1d0c14d3df953b2ed8373b3410db36a5986b7f98e7e75497e2c6 -> 000000032bc3de16c02cfd977de6e05af1fe46b42983556c716083e6253abab1
2014-05-24 17:13:06.163355 > Traceback (most recent call last):
2014-05-24 17:13:06.163573 >   File "/home/user/p2pool-drk/p2pool/util/deferral.py", line 284, in _worker
2014-05-24 17:13:06.163782 >     self.func(*self.args, **self.kwargs)
2014-05-24 17:13:06.164008 >   File "/home/user/p2pool-drk/p2pool/node.py", line 357, in clean_tracker
2014-05-24 17:13:06.164212 >     self.set_best_share()
2014-05-24 17:13:06.164432 >   File "/home/user/p2pool-drk/p2pool/node.py", line 295, in set_best_share
2014-05-24 17:13:06.164634 >     best, desired, decorated_heads, bad_peer_addresses = self.tracker.think(self.get_height_rel_highest, self.bitcoind_work.value['previous_block'], self.bitcoind_work.value['bits'], self.known_txs_var.value)
2014-05-24 17:13:06.164897 >   File "/home/user/p2pool-drk/p2pool/data.py", line 508, in think
2014-05-24 17:13:06.165101 >     if not self.attempt_verify(share):
2014-05-24 17:13:06.165320 > --- <exception caught here> ---
2014-05-24 17:13:06.165523 >   File "/home/user/p2pool-drk/p2pool/data.py", line 452, in attempt_verify
2014-05-24 17:13:06.165729 >     share.check(self)
2014-05-24 17:13:06.165955 >   File "/home/user/p2pool-drk/p2pool/data.py", line 342, in check
2014-05-24 17:13:06.166180 >     raise ValueError('''gentx doesn't match hash_link''')
2014-05-24 17:13:06.166542 > exceptions.ValueError: gentx doesn't match hash_link
2014-05-24 17:13:06.169121 > Share check failed: 000000027eac1d0c14d3df953b2ed8373b3410db36a5986b7f98e7e75497e2c6 -> 000000032bc3de16c02cfd977de6e05af1fe46b42983556c716083e6253abab1
2014-05-24 17:13:06.169378 > Traceback (most recent call last):
2014-05-24 17:13:06.169594 >   File "/home/user/p2pool-drk/p2pool/util/deferral.py", line 284, in _worker
2014-05-24 17:13:06.169804 >     self.func(*self.args, **self.kwargs)
2014-05-24 17:13:06.170043 >   File "/home/user/p2pool-drk/p2pool/node.py", line 357, in clean_tracker
2014-05-24 17:13:06.170263 >     self.set_best_share()
2014-05-24 17:13:06.170670 >   File "/home/user/p2pool-drk/p2pool/node.py", line 295, in set_best_share
2014-05-24 17:13:06.170890 >     best, desired, decorated_heads, bad_peer_addresses = self.tracker.think(self.get_height_rel_highest, self.bitcoind_work.value['previous_block'], self.bitcoind_work.value['bits'], self.known_txs_var.value)
2014-05-24 17:13:06.171114 >   File "/home/user/p2pool-drk/p2pool/data.py", line 508, in think
2014-05-24 17:13:06.171326 >     if not self.attempt_verify(share):
2014-05-24 17:13:06.171436 > --- <exception caught here> ---
2014-05-24 17:13:06.171627 >   File "/home/user/p2pool-drk/p2pool/data.py", line 452, in attempt_verify
2014-05-24 17:13:06.171875 >     share.check(self)
2014-05-24 17:13:06.172098 >   File "/home/user/p2pool-drk/p2pool/data.py", line 342, in check
2014-05-24 17:13:06.172319 >     raise ValueError('''gentx doesn't match hash_link''')
2014-05-24 17:13:06.172531 > exceptions.ValueError: gentx doesn't match hash_link
2014-05-24 17:13:07.019320 P2Pool: 618 shares in chain (63 verified/633 total) Peers: 1 (0 incoming)
2014-05-24 17:13:07.019665  Local: 38005H/s in last 55.2 seconds Local dead on arrival: ~0.0% (0-66%) Expected time to share: 2.9 minutes
2014-05-24 17:13:07.019831  Shares: 2 (0 orphan, 0 dead) Stale rate: ~0.0% (0-66%) Efficiency: ~104.6% (35-105%) Current payout: 0.0140 tDRK
2014-05-24 17:13:07.019963  Pool: 13166kH/s Stale rate: 4.4% Expected time to block: 3.0 minutes
2014-05-24 17:13:10.029527 P2Pool: 618 shares in chain (63 verified/633 total) Peers: 1 (0 incoming)
2014-05-24 17:13:10.030267  Local: 36042H/s in last 58.2 seconds Local dead on arrival: ~0.0% (0-66%) Expected time to share: 3.1 minutes
2014-05-24 17:13:10.030759  Shares: 2 (0 orphan, 0 dead) Stale rate: ~0.0% (0-66%) Efficiency: ~104.6% (35-105%) Current payout: 0.0140 tDRK
2014-05-24 17:13:10.031258  Pool: 13166kH/s Stale rate: 4.4% Expected time to block: 3.0 minutes
2014-05-24 17:13:10.961958 Handshake timed out, disconnecting from 92.222.7.210:18999
It seems the p2pool node is working no matter the error, or at least it's showing shares and local hashrate.
 
Are you re-cloning the repository or just pulling changes (if this is even possible given that it was originally cloned from Github not Atlassian). For some reason, I'm getting this error when I clone into a clean directory. I know dstorm mentioned something about xcoin_hash, but I'm not sure how (or if) this should be fixed:

Code:
...
2014-05-24 12:36:42.778211 > Failure: twisted.internet.error.ConnectionAborted: Connection was aborted locally, using.
2014-05-24 12:36:45.533127 > Unhandled error in Deferred:
2014-05-24 12:36:45.533638 > Unhandled Error
2014-05-24 12:36:45.533763 > Traceback (most recent call last):
2014-05-24 12:36:45.533859 > Failure: twisted.internet.defer.TimeoutError: in ReplyMatcher
2014-05-24 12:36:46.891916 Incoming connection to peer 107.170.185.248:49222 established. p2pool version: 1300 '99eae07'
2014-05-24 12:36:46.987585 P2Pool: 0 shares in chain (0 verified/0 total) Peers: 1 (1 incoming)
2014-05-24 12:36:46.987737  Local: 0H/s in last 0.0 seconds Local dead on arrival: ??? Expected time to share: ???
2014-05-24 12:36:46.996511 RECV sharereply d1332ae4acebba918d5f4747e276601a0ea6aaade135f9a4c538b27e2c5cb09400010dfd260102f622d4b48bac98ce10e911d4d5dea5c185ccf64a5922849e0c9e15f70100000033bc8053a985061d20009013aa2538825dff17165897632078d5c9cc71...
2014-05-24 12:36:46.997028 > Error handling message: (see RECV line)
2014-05-24 12:36:46.997278 > Traceback (most recent call last):
2014-05-24 12:36:46.997389 >   File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 221, in _dataReceived
2014-05-24 12:36:46.997486 >     rval = self.protocol.dataReceived(data)
2014-05-24 12:36:46.997588 >   File "/home/geadmin/p2pool-drk/p2pool/p2p.py", line 145, in new_dataReceived
2014-05-24 12:36:46.997679 >     old_dataReceived(data)
2014-05-24 12:36:46.997855 >   File "/home/geadmin/p2pool-drk/p2pool/util/p2protocol.py", line 27, in dataReceived
2014-05-24 12:36:46.997953 >     self.dataReceived2(data)
2014-05-24 12:36:46.998042 >   File "/home/geadmin/p2pool-drk/p2pool/util/datachunker.py", line 40, in _DataChunker
2014-05-24 12:36:46.998134 >     wants = receiver.send(buf.get(wants))
2014-05-24 12:36:46.998226 > --- <exception caught here> ---
2014-05-24 12:36:46.998317 >   File "/home/geadmin/p2pool-drk/p2pool/util/p2protocol.py", line 57, in dataReceiver
2014-05-24 12:36:46.998408 >     self.packetReceived(command, type_.unpack(payload, self.ignore_trailing_payload))
2014-05-24 12:36:46.998498 >   File "/home/geadmin/p2pool-drk/p2pool/p2p.py", line 91, in packetReceived
2014-05-24 12:36:46.998703 >     p2protocol.Protocol.packetReceived(self, command, payload2)
2014-05-24 12:36:46.998826 >   File "/home/geadmin/p2pool-drk/p2pool/util/p2protocol.py", line 71, in packetReceived
2014-05-24 12:36:46.998919 >     handler(**payload2)
2014-05-24 12:36:46.999010 >   File "/home/geadmin/p2pool-drk/p2pool/p2p.py", line 336, in handle_sharereply
2014-05-24 12:36:46.999103 >     res = [p2pool_data.load_share(share, self.node.net, self.addr) for share in shares if share['type'] >= p2pool_data.Share.VERSION]
2014-05-24 12:36:46.999198 >   File "/home/geadmin/p2pool-drk/p2pool/data.py", line 48, in load_share
2014-05-24 12:36:46.999360 >     return Share(net, peer_addr, Share.share_type.unpack(share['contents']))
2014-05-24 12:36:46.999435 >   File "/home/geadmin/p2pool-drk/p2pool/data.py", line 291, in __init__
2014-05-24 12:36:46.999477 >     self.pow_hash = net.PARENT.POW_FUNC(bitcoin_data.block_header_type.pack(self.header))
2014-05-24 12:36:46.999517 >   File "/home/geadmin/p2pool-drk/p2pool/bitcoin/networks.py", line 52, in <lambda>
2014-05-24 12:36:46.999556 >     POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('xcoin_hash').getPoWHash(data)),
2014-05-24 12:36:46.999596 > exceptions.ImportError: No module named xcoin_hash
2014-05-24 12:36:46.999898 Lost peer 107.170.185.248:49222 - Connection was aborted locally, using.
2014-05-24 12:36:47.000052 > in handle_share_hashes:
2014-05-24 12:36:47.000148 > Traceback (most recent call last):
2014-05-24 12:36:47.000196 > Failure: twisted.internet.error.ConnectionAborted: Connection was aborted locally, using.
Or is this something on testnet that is just not working right?
 
2014-05-24 12:36:46.999596 > exceptions.ImportError: No module named xcoin_hash

Did you install the python modules?
 
Back
Top