Comments (21)
OK. I never looked into this code, so it will take time for me to completely understand what is going on here and if fix is helpful. If not yet already done I recommend to submit same issue against main repo too.
from nodejs-pool.
Actually I do not think it is a problem here and moreover fix will lead to harmful effect. Fix rejects new block template if hash of previous block is the same as hash of previous block of active block template, right? This is not right, since monerod can provide updated valid block templates with the same previous block hash (for example if height is not changed and there are new transaction included into block template). This fix will merely allow the first block template to be used for each height and will reject their valid updates that can lead to lower block rewards (because less tx fees are included).
Hope it make sense. Feel free to point me if I'm wrong here.
from nodejs-pool.
Ok, I understood you. I did not know it could be that way.
There you can compare by blocktemplate_blob or maybe it's worth it just to put a temporary restriction, for example in 2 seconds.
from nodejs-pool.
from nodejs-pool.
@1rV1N-git : Snipa’s repo got same bug like yours before
See Snipa22#198
@MoneroOcean Did you merge the “Duplicate Job” fix from Snipa’s repo ?
from nodejs-pool.
Yeah, sure. It was merged on the same day: 6a08322
Also, as I understood from the picture from port number (3333) it is some generic nodejs-pool issue, not specific to MO repo (and it is different from Snipa22#198 since here it is xmrig who complains that he got the same job from pool again).
Like I said I'm not very fluent in this part of pool's code so need more time.
from nodejs-pool.
I got same error "Duplicate jobs" multiple time and Snipa did fix it, no more that errors after that fix. I've never see that errors again from that day.
@MoneroOcean You didn't merge "Fix for the 300 msec template bug identified by Mayday30."
https://github.com/MoneroOcean/nodejs-pool/blob/master/lib/pool.js#L174 doesn't reflect fix :
} else {
if (repeating !== true) {
setTimeout(templateUpdate, 300);
}
}
});
}
...........
from nodejs-pool.
This particular line/fix you mentioned is not related to duplicate jobs. It is fix for frequent block template updates and I decided to rework it after (that is why this line is different). I'm pretty sure in this particular case since actually I'm Mayday30;)
Also I'd like to reiterate that according to port number (we do not host 3333 port) this is not MO specific issue (not surprising since I never touched job generation code). Please correct me if I'm wrong.
from nodejs-pool.
I use snipa repo wtih Mayday30 fix in Almost all nodes c addition from your repo becase port 3333))
It is so strange becase the screenshot that i send it is pool node by your repo.
I added this code and I got in log "Same job".
You may add the code without return for debag the error.
In a couple of days I plan to change all node to your repo.
from nodejs-pool.
Update 1 : I did get error from newly migrated MO repo pool. I'll run test with moneroocean.stream now, update 2 in 20 minutes.
Update 2 : Test on MO pool, port 10001 is fine. No errors. I run last test on my pool with port 5555 and give results in Update 3.
Update 3 : Got error with port 5555. I come back to test one more time with moneroocean pool because in previours test, I did see "no active pools, stop mining" but not "duplicate job" so I thought because of my slow PC. One more test to check out. Result on MO pool will be in update 4.
Update 4 : moneroocean.stream works fine. I don’t get any “duplicate job”. I’ll try to test other Snipa pools again.
from nodejs-pool.
This error does not appear so often during normal operation. it always appears when the pool is restarted and when the block is found. the rest of the time one for 30-50 updates of the block template
from nodejs-pool.
That is very useful statistics and will help me to narrow down the problem area. But why do not you submit that against main Snipa's repo? I will try to investigate and fix that for course but I think he can do that much more easier (not sure if faster:).
from nodejs-pool.
(not sure if faster:) that is why )
from nodejs-pool.
Looks like I finally managed to get better picture what is going on here. You got the problem right and I was wrong in my first comment about the fact that block template can be updated over time when prev_hash is not changed. Looks like this situation can happen when thread BT update happens before rapid BT update from main thread. In this case newBlockTemplate(...) is called twice (first from worker thread and second from main thread during sendToWorkers({type: 'newBlockTemplate', data: rpcResponse});).
from nodejs-pool.
The fix will be very similar to what you suggested.
from nodejs-pool.
This should fix this:
from nodejs-pool.
Thanks. This fix concerns pool.js and xmr.js , if I want to apply the fix, what do I need to do ?
pm2 stop all
cd ~/nodejs-pool
git pull
pm2 start all
Is that process correct ?
from nodejs-pool.
For that fix you only need to restart pool module:
cd ~/nodejs-pool && git pull && pm2 restart pool
pm2 logs pool
Will do the trick.
from nodejs-pool.
xmr.js fixes are not necessary to fix this particular issue but it is related bug fixes.
from nodejs-pool.
Excellent Job!!. Thanks a lot
from nodejs-pool.
Thank you.
from nodejs-pool.
Related Issues (20)
- Pool module crash when miner trust is disabled HOT 1
- caddy.tar.gz needs update
- LOKI Block Found Checkmarks HOT 1
- Web Interface HOT 1
- Do you guys check your email?
- [Feature Request]: Merged Mining Altcoins with same algo HOT 2
- [Potential Issue] with RVN HOT 1
- Pool crash after 2 hours. HOT 1
- Cmake Release Failed HOT 3
- RVN config Last block header request for 8766 port failed HOT 1
- Login to account in monero-gui doesn't work - returns "Please check your login details"
- Webpage 404 HOT 3
- 502 Bad Gateway
- Deploy scrtipt failing on cmake. HOT 3
- getPortLastBlockHeader(9998): "JSON parse exception: "
- C
- Throttle to high diff proxy issue
- Pool maximum difficulty HOT 4
- possible coins to add on MoneroOcean
- Feature request: Show coin being mined next to worker in dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodejs-pool.