I was looking at http://cryptonotemining.org/ and it looks really easy to set up. I'm wondering what the ramifications would be if redis lost some data? I'm not too worried about total data loss. But I am curious what would happen if a primary redis server failed and a read-only replica that was 10 minutes out of sync took over. Or if a standalone redis crashed and the checkpoint data was a few minutes behind.


The Redis database constains all the memory of miners' work and balances, found blocks, etc. So losing it would be a bad thing, though not extra bad.

Assuming everything got wiped at once, it'd be functionally identical to starting a new pool from scratch, except you already have miners connected and mining.

This means mainly three things:

  • the work history for the current block will be wiped, and only work submitted between the wipeout time and the next block found will be used (same as what happens when a block is found and work history resets)
  • miners' current balances get lost.
  • info on who to pay for any blocks found that are not yet unlocked is lost

Now, if you have a recent backup, the first one's probably not a big deal (unless you find a block just after that event, where submitted shares don't have time to re-approximate miners' real hash rates), and the second one's a bit annoying, but these are small amounts, typically below 0.2 monero. The third one is pretty bad though, as miners lose (their part of) the entire block.

Now, if the wipeout is not total, then other things can happen. For instance, if the wallet paid something, but this is not recorded, it will be paid again. This time, it's an error to the miners' benefit.

| improve this answer | |
  • Thanks so much for the info! Followup questions. Is restoring the backup or using a fail-over that may be slightly out of sync what pool users would expect? If I were to set up a pool, I'd likely use a multiAZ redis elasticache instance at AWS. Any idea if pool operators generally keep extra monero in the pool wallet to cover the scenario where you may pay out the same block twice? – correcthorse Nov 27 '16 at 17:10
  • Having extra monero is a must, because you'll have to deal with locked change, etc. If you don't, you'll end up with a payout thread that doesn't pay out because the wallet won't. As for restoring a backup, it's better than nothing. Best to ensure your server has appropriate UPS etc if you want to avoid the case. – user36303 Nov 27 '16 at 17:17
  • Thanks again. I didn't even think of the locked change issue. Clearly, I have some more reading to do! – correcthorse Nov 27 '16 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.