Bitcoin Forum

Alternate cryptocurrencies => Mining (Altcoins) => Topic started by: jonnybravo0311 on January 12, 2016, 02:03:18 PM



Title: NOMP and duplicate share submission
Post by: jonnybravo0311 on January 12, 2016, 02:03:18 PM
Hey everyone,

I run a NOMP/MPOS Bitcoin mining pool and have seen a number of issues related to duplicate share submission and the resolutions to address them.  Can somebody post a log snippet of what that would look like?

Also, to implement the fixes, is it just a matter of making the change in the appropriate JS files and restarting the stratum servers, or are there then some other steps that need to be taken?

Thanks in advance!


Title: Re: NOMP and duplicate share submission
Post by: smaxz on January 18, 2016, 03:29:13 AM
depending on the issue, once you fix the issue and re-run the crontab scripts.. it may fix everything or you may have to go into the sql db manually and fix the erroneous data.

be sure to back everything up before making your adjustments.

no logs for your viewing, sorry.


Title: Re: NOMP and duplicate share submission
Post by: jonnybravo0311 on January 20, 2016, 08:52:20 PM
I'm a bit confused by your reply... sorry for my misunderstanding here.

The issue is duplicate share submissions.  There are a few ways that have been posted on how to mitigate this behavior (for example, force the nonce to lower case):

Code:
_this.emit('submit',
            {
                name        : message.params[0],
                jobId       : message.params[1],
                extraNonce2 : message.params[2],
                nTime       : message.params[3].toLowerCase(),
                nonce       : message.params[4].toLowerCase()
            },

Are there any other known fixes to address duplicate shares in NOMP?

Once the appropriate code changes have been made, is there anything other than restarting the stratum server that needs to be done?  If so, what other steps need to be taken (not sure what crontab scripts you're referring to, please explain)?

Erroneous shares... if indeed it is the case that duplicate shares have been submitted, then writing SQL to clean them out of the shares tables isn't too hard to do.  In fact, if it were indeed discovered that a user had been successfully submitting duplicate shares, I'd simply wipe all of that user's shares from the database and ban the user from the pool.

Thanks again for the replies.


Title: Re: NOMP and duplicate share submission
Post by: smaxz on January 20, 2016, 11:43:48 PM
my duplicate share issues occurred while running stratum/mpos for various altcoin pools.

there were a few instances where i had to use sql queries to remove duplicate blocks from the db and manually force re-execution of the mpos crontab scripts.. this resolved and distributed the shares in question.

i was always using proportional payout though. and i cant say it was a vardiff issue at all.

have you tried working around the wrapper script run-crons.sh and directly executing the archive_cleanup.php, payouts etc.. one at a time?

admittedly its been a while since i've been at it, sorry i couldn't be of more assistance.