Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NMC, HUC & CRW now incompatible with p2pool merge mining? #270

Closed
p3yot3 opened this issue Sep 3, 2015 · 5 comments

Comments

@p3yot3
Copy link

commented Sep 3, 2015

Hi forrestv, I PM'd you on BCT about this but got no reply, so thought better to do it here. I had this PM from domob regarding the problem:

"Hi!

I think that this is something that can and should be fixed on the P2Pool side (or, in general, the merge-mining script). I agree with F2Pool that the change makes sense since "target" would be inconsistent with other "target" values (e. g., "getblocktemplate"). It should be trivial to check for the presence of "_target" keys in the RPC result and use them.

Yours,
Daniel"

My p2pool startup errors for the coins were:

NMC startup error:

2015-08-26 14:33:28.003130 > Unhandled error in Deferred:
2015-08-26 14:33:28.003307 > Unhandled Error
2015-08-26 14:33:28.003358 > Traceback (most recent call last):
2015-08-26 14:33:28.003384 > Failure: twisted.internet.defer.TimeoutError: in ReplyMatcher
2015-08-26 14:33:28.047386 > Unhandled error in Deferred:
2015-08-26 14:33:28.048103 > Unhandled Error
2015-08-26 14:33:28.048193 > Traceback (most recent call last):
2015-08-26 14:33:28.048247 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 382, in callback
2015-08-26 14:33:28.048274 > self._startRunCallbacks(result)
2015-08-26 14:33:28.048308 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 490, in _startRunCallbacks
2015-08-26 14:33:28.048340 > self._runCallbacks()
2015-08-26 14:33:28.048366 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 577, in _runCallbacks
2015-08-26 14:33:28.048389 > current.result = callback(current.result, _args, *_kw)
2015-08-26 14:33:28.048411 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1155, in gotResult
2015-08-26 14:33:28.048433 > _inlineCallbacks(r, g, deferred)
2015-08-26 14:33:28.048455 > --- ---
2015-08-26 14:33:28.048487 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1099, in _inlineCallbacks
2015-08-26 14:33:28.048512 > result = g.send(result)
2015-08-26 14:33:28.048534 > File "/home/rig/p2pool/p2pool/work.py", line 83, in set_merged_work
2015-08-26 14:33:28.048561 > target='p2pool' if auxblock['target'] == 'p2pool' else pack.IntType(256).unpack(auxblock['target'].decode('hex')),
2015-08-26 14:33:28.048593 > exceptions.KeyError: 'target'

HUC startup error:

2015-08-26 14:55:35.929528 > Unhandled error in Deferred:
2015-08-26 14:55:35.930273 > Unhandled Error
2015-08-26 14:55:35.930368 > Traceback (most recent call last):
2015-08-26 14:55:35.930406 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 382, in callback
2015-08-26 14:55:35.930434 > self._startRunCallbacks(result)
2015-08-26 14:55:35.930459 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 490, in _startRunCallbacks
2015-08-26 14:55:35.930486 > self._runCallbacks()
2015-08-26 14:55:35.930518 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 577, in _runCallbacks
2015-08-26 14:55:35.930544 > current.result = callback(current.result, _args, *_kw)
2015-08-26 14:55:35.930569 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1155, in gotResult
2015-08-26 14:55:35.930594 > _inlineCallbacks(r, g, deferred)
2015-08-26 14:55:35.930618 > --- ---
2015-08-26 14:55:35.930643 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1099, in _inlineCallbacks
2015-08-26 14:55:35.930668 > result = g.send(result)
2015-08-26 14:55:35.930701 > File "/home/rig/p2pool/p2pool/work.py", line 83, in set_merged_work
2015-08-26 14:55:35.930726 > target='p2pool' if auxblock['target'] == 'p2pool' else pack.IntType(256).unpack(auxblock['target'].decode('hex')),
2015-08-26 14:55:35.930753 > exceptions.KeyError: 'target'
2015-08-26 14:55:42.678291 > Error while processing Event callbacks:
2015-08-26 14:55:42.678408 > Traceback (most recent call last):
2015-08-26 14:55:42.678442 > File "/home/rig/p2pool/p2pool/node.py", line 135, in download_shares
2015-08-26 14:55:42.678470 > self.handle_shares([(share, []) for share in shares], peer)
2015-08-26 14:55:42.678514 > File "/home/rig/p2pool/p2pool/node.py", line 48, in handle_shares
2015-08-26 14:55:42.678547 > self.node.set_best_share()
2015-08-26 14:55:42.678576 > File "/home/rig/p2pool/p2pool/node.py", line 297, in set_best_share
2015-08-26 14:55:42.678603 > self.best_share_var.set(best)
2015-08-26 14:55:42.678630 > File "/home/rig/p2pool/p2pool/util/variable.py", line 74, in set
2015-08-26 14:55:42.678657 > self.changed.happened(value)
2015-08-26 14:55:42.678683 > --- ---
2015-08-26 14:55:42.678709 > File "/home/rig/p2pool/p2pool/util/variable.py", line 42, in happened
2015-08-26 14:55:42.678735 > func(*event)
2015-08-26 14:55:42.678761 > File "/home/rig/p2pool/p2pool/node.py", line 96, in broadcast_share
2015-08-26 14:55:42.678789 > peer.sendShares([share for share in shares if share.peer_addr != peer.addr], self.node.tracker, self.node.known_txs_var.value, include_txs_with=[share_hash])
2015-08-26 14:55:42.678821 > File "/home/rig/p2pool/p2pool/p2p.py", line 317, in sendShares
2015-08-26 14:55:42.678859 > assert tx_hash in known_txs, 'tried to broadcast share without knowing all its new transactions'
2015-08-26 14:55:42.678888 > exceptions.AssertionError: tried to broadcast share without knowing all its new transactions

CRW startup error:

2015-08-26 15:02:14.389197 > Unhandled error in Deferred:
2015-08-26 15:02:14.389904 > Unhandled Error
2015-08-26 15:02:14.389996 > Traceback (most recent call last):
2015-08-26 15:02:14.390035 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 382, in callback
2015-08-26 15:02:14.390061 > self._startRunCallbacks(result)
2015-08-26 15:02:14.390085 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 490, in _startRunCallbacks
2015-08-26 15:02:14.390110 > self._runCallbacks()
2015-08-26 15:02:14.390133 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 577, in _runCallbacks
2015-08-26 15:02:14.390164 > current.result = callback(current.result, _args, *_kw)
2015-08-26 15:02:14.390187 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1155, in gotResult
2015-08-26 15:02:14.390210 > _inlineCallbacks(r, g, deferred)
2015-08-26 15:02:14.390233 > --- ---
2015-08-26 15:02:14.390256 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1099, in _inlineCallbacks
2015-08-26 15:02:14.390290 > result = g.send(result)
2015-08-26 15:02:14.390313 > File "/home/rig/p2pool/p2pool/work.py", line 83, in set_merged_work
2015-08-26 15:02:14.390337 > target='p2pool' if auxblock['target'] == 'p2pool' else pack.IntType(256).unpack(auxblock['target'].decode('hex')),
2015-08-26 15:02:14.390362 > exceptions.KeyError: 'target'

Once I made the changes suggested by domob above, I no longer got the errors & merge mining is working again. Is it possible to make the changes within p2pool so that merge miners no longer need to do the changes for each coin manually before compiling?

Cheers.

@p3yot3

This comment has been minimized.

Copy link
Author

commented Sep 3, 2015

EDIT: The changes I needed to make are inside of rpcmining.cpp - two instances of "_target" and replace with "target" and recompile.

@forrestv

This comment has been minimized.

Copy link
Member

commented Sep 9, 2015

I pushed a change to p2pool master that should fix this within P2Pool.
Please test. Thanks!

On Thu, Sep 3, 2015 at 9:12 AM, p3yot3 notifications@github.com wrote:

EDIT: The changes I needed to make are inside of rpcmining.cpp - two
instances of "_target" and replace with "target" and recompile.


Reply to this email directly or view it on GitHub
#270 (comment).

@p3yot3

This comment has been minimized.

Copy link
Author

commented Sep 9, 2015

Thanks forrestv - & you're welcome. I'll test & report when I get back later today.

@p3yot3

This comment has been minimized.

Copy link
Author

commented Sep 11, 2015

Update: Can confirm that the above startup errors are now gone & merge mining is working again with the std NMC, HUC & CRW compiles. Many thanks again forrestv.

@p3yot3

This comment has been minimized.

Copy link
Author

commented Nov 1, 2015

Update: I think there might still be a problem we overlooked - I'm unable to find anyone who has found an NMC block using the namecoin-core client. I've posted on the NMC forums asking for a dev to look into it, as several months of zero blocks found with p2pool merge mining using the core client seems extremely unlikely, although I'm sure that the problem is not with p2pool itself.

Edit: cancel this - core is working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.