Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Experimental PPLNT support & MORE #132

Merged
merged 30 commits into from
May 11, 2017
Merged

Experimental PPLNT support & MORE #132

merged 30 commits into from
May 11, 2017

Conversation

hellcatz
Copy link
Collaborator

@hellcatz hellcatz commented May 4, 2017

PPLNT is experimental and we need testers to prove stability before merging the PR.

New Payment Mode Support

  • Experimental PPLNT support (see pool_config example updates to enable pplnt)
  • Default Mode is Proportional

Resolve issue #131
Major reduction in RPC calls to daemon, helps out with issue #130
Balance rounding improvements during payouts.
Improvements to confirmations tracking.
Improvements to operation id tracking.
Sort pools by name in JSON stats.
Integer sorting of block height in JSON stats.
Added balance change tracking to payments JSON stats.
Add coin market stats caching from CoinMarketCap.com
Added support for older node-watch versions along with newer.
Added share work tracking to payments JSON stats.

Force integer sorting of block height.
Track balanceChange in payments.
Add time share tracking for PPLNT
Improved rounding.
Track miner times by address not worker name
Experimental PPLNT support (console.logs need to be removed after experiments)
Major reduction in RPC calls to daemon.
Balance rounding improvements.
Improvements to confirmations tracking.
Improvements to operation id tracking.
Improved error handling.
Updates to comments in code...
@WaveringAna
Copy link
Contributor

Concept ACK but don't merge till we got tons of testing done :)

@ghostnegotiator
Copy link

Hello, would you like to hear a TCP joke?

Yes, I'd like to hear a TCP joke.

OK, I'll tell you a TCP joke.

OK, I'll hear a TCP joke.

Are you ready to hear a TCP joke?

Yes, I am ready to hear a TCP joke.

OK, I'm about to send the TCP joke. It will last 10 seconds, it has two characters, it does not have a setting, it ends with a punchline.

OK, I'm ready to hear the TCP joke that will last 10 seconds, has two characters, does not have a setting and will end with a punchline.

I'm sorry, your connection has timed out... ...Hello, would you like to hear a TCP joke?

@ghost
Copy link

ghost commented May 4, 2017

From: Bot.io (Main)


Received

Command cmd_BCtest from @aayanl received. Current queue size: 0

Live output at: http://aayanl.tech:9000/b0a1f6a84f7bd20/output.txt

@ghost
Copy link

ghost commented May 4, 2017

From: Bot.io (Main)


Success

Full output at http://aayanl.tech:9000/b0a1f6a84f7bd20/output.txt

Total script time: 1.58 mins

@WaveringAna
Copy link
Contributor

previous test had paymentprocessing disabled

totalShares += shares;
}

console.log('--REWARD DEBUG--------------');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small TODO, remove this when we're ready to merge

logger.error(logSystem, logComponent,
'Payments sent but could not update redis. ' + JSON.stringify(error)
+ ' Disabling payment processing to prevent possible double-payouts. The redis commands in '
+ coin + '_finalRedisCommands.txt must be ran manually');

fs.writeFile(coin + '_finalRedisCommands.txt', JSON.stringify(finalRedisCommands), function(err){
logger.error('Could not write finalRedisCommands.txt, you are fucked.');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never noticed this in the code haha

@WaveringAna
Copy link
Contributor

WaveringAna commented May 5, 2017

Live testnet pool up just to test this :) http://aayanl.tech:9002

Potential exception fix for issue #131
@hellcatz
Copy link
Collaborator Author

hellcatz commented May 5, 2017

Resolves: #131 bug in stats.html

BugFix: prevent `confirms` from being null
Added coin market stats caching from https://coinmarketcap.com/api/
Allow minConfShield and minConfPayout to be set via pool_config
Updated stats collection and operation id tracking to use their own fixed timeout intervals.
Added PPLNT time share tracking to master process for thread safety.
Removed time share tracking from shareProcessor due to threading issues.
Added time share tracking messaging to master process for PPLNT.
init.js Outdated
if (timeChangeSec < 600) {
// loyal miner keeps mining :)
redisCommands.push(['hincrbyfloat', msg.coin + ':shares:timesCurrent', workerAddress, timeChangeSec]);
logger.debug('PPLNT', msg.coin, 'Thread '+msg.thread, workerAddress+':{totalTimeSec:'+timeChangeTotal+', timeChangeSec:'+timeChangeSec+'}');
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment out this logger.debug() message before merging

Added support for older node-watch versions, prior to 0.5.0
@hellcatz hellcatz changed the title Experimental PPLNT support Experimental PPLNT support & MORE May 7, 2017
Added work share tracking in payments JSON data.
Remove workers with balanceChange of 0 from payments JSON data.
Commented out console.logs used for dev purposes.
Comment out extra logger.debug() used during dev.
@WaveringAna
Copy link
Contributor

/botio BCtest

@ghost
Copy link

ghost commented May 7, 2017

From: Bot.io (Main)


Received

Command cmd_BCtest from @aayanl received. Current queue size: 0

Live output at: http://aayanl.tech:9000/ddcfdc5d30ce6e9/output.txt

@ghost
Copy link

ghost commented May 7, 2017

From: Bot.io (Main)


Success

Full output at http://aayanl.tech:9000/ddcfdc5d30ce6e9/output.txt

Total script time: 2.33 mins

@sennevb
Copy link
Collaborator

sennevb commented May 7, 2017

we need this!! good job hellcatz

Add currentRoundTimes to stats.
Increase share submission window to 15 minutes for PPLNT.
Added worker joined and re-joined logger messages.
@WaveringAna
Copy link
Contributor

Glad to see we've made these changes with making a dent into stratum-pool 🙂😎

Copy link

@fittsy fittsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented this change and tested on elfpool.com. Works fine.

@WaveringAna
Copy link
Contributor

This PR should also dramatically decrease the amount of calls to zcashd. zcash/zcash#2333 Still hasn't been resolved so getting GBT calls that take forever to return can still happen

@WaveringAna
Copy link
Contributor

It'll be merged in tomorrow 👍

@fittsy
Copy link

fittsy commented May 11, 2017

Let me know how I can help in the future.

@WaveringAna WaveringAna merged commit e40f291 into z-classic:master May 11, 2017
@WaveringAna
Copy link
Contributor

Merged since its friday in half the world :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants