Giter Club home page Giter Club logo

Comments (8)

MoneroOcean avatar MoneroOcean commented on September 14, 2024

So the problem is that it can remove shares that are still required for payment calculations, right?
Is it only a problem for PPS?

from nodejs-pool.

1rV1N-git avatar 1rV1N-git commented on September 14, 2024

yes
for pplns too

from nodejs-pool.

MoneroOcean avatar MoneroOcean commented on September 14, 2024

I actually also have reports that it can happen from hashvault pool operator as well, so I believe there must be something wrong with this or related code. Maybe not in the getOldestLockedBlock function but later. Will take a closer look.

from nodejs-pool.

MoneroOcean avatar MoneroOcean commented on September 14, 2024

Or maybe do you have debug info? You mentioned that the problem was detected by you in this line:

callback(null, body.height - Math.floor(global.config.payout.blocksRequired/2), Math.floor(body.difficulty * global.config.pplns.shareMulti * 5));

This is actually PPS case, right? And it really does not depend on oldestLockedBlock.height here, so can you please provide more observations if possible?

from nodejs-pool.

1rV1N-git avatar 1rV1N-git commented on September 14, 2024

Sorry i have
function(oldestLockedBlock, callback){
global.coinFuncs.getLastBlockHeader(function(err, body){
if (oldestLockedBlock === null){
if (global.config.pps.enable){
callback(null, body.height - Math.floor(global.config.payout.blocksRequired/2), Math.floor(body.difficulty * global.config.pplns.shareMulti * 5));
} else {
callback(null, body.height, Math.floor(body.difficulty * global.config.pplns.shareMulti * 5));
}
} else {
if (global.config.pps.enable && oldestLockedBlock.height > body.height - Math.floor(global.config.payout.blocksRequired/2)) {
callback(null, body.height - Math.floor(global.config.payout.blocksRequired/2), Math.floor(body.difficulty * global.config.pplns.shareMulti * 5));
} else {
callback(null, oldestLockedBlock.height, Math.floor(oldestLockedBlock.difficulty * global.config.pplns.shareMulti * 5));
}
}
});
},

I have pplns mode enabled
and there were a couple of times so that there were 15 blocks locked and it took the block in the middle and counted the buffer and the rest was removed and the pplns payment passed with 0%

from nodejs-pool.

MoneroOcean avatar MoneroOcean commented on September 14, 2024

Thanks! That's definitely helpful.

from nodejs-pool.

MoneroOcean avatar MoneroOcean commented on September 14, 2024

I put guards for that issue (it does not belong to performance critical path, so it is OK to have to extra check here) and some additional related fixes to avoid important share removal:

5ae1401

I already applied that to MoneroOcean pool. Nothing bad happened at least after the first share cleanup.

from nodejs-pool.

1rV1N-git avatar 1rV1N-git commented on September 14, 2024

Cool thanks. I try it.

from nodejs-pool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.