MoneroOcean / node-cryptoforknote-util

NodeJS wrappers for Cryptonode/Forknote coins
11 stars 83 forks source link

How to use this #6

Closed BKdilse closed 5 years ago

BKdilse commented 5 years ago

Hi,

Not an issue, but a question on how to use this on an existing single coin pool, based on Snipa22 repo. I have no idea what changes are required on the pool side, to enable merged mining.

Any advice would be appreciated for my very small pools :)

Alecient commented 5 years ago

You can find usage example in https://github.com/MoneroOcean/nodejs-pool repository. Looks like it should work for single coin pool as well.

BKdilse commented 5 years ago

Unless i'm missing it, the nodejs-pool repo does not contain any merged mining information. Please correct me if I'm mistaken. I am trying to work out what other changes I need on my pool, such as running a daemon for the merged coin, pool code changes, etc.

MoneroOcean commented 5 years ago

MO version of nodejs-pool has full merge mining support. In particular look for global.coinFuncs.constructMMChildBlockBlob and global.coinFuncs.constructMMParentBlockBlob functions in pool.js that construct block templates for merge mining. cnUtil.get_merged_mining_nonce_size() as well in xmr.js.

BKdilse commented 5 years ago

Thanks for that MO. I would switch to your repo, but I've customised my pools, and will have to go and capture all my charges, else it will break something.

So pool and xmr JS files are the only two files that contain the code? I'll have a look.

Do I also have to run the daemon on my pool for the child coin?

MoneroOcean commented 5 years ago

Yes, you need to run both daemons. There are some other changes in other modules as well, however they are not so critical (mostly to make sure stats are OK). However please be aware that MO pool implementation was designed that all payments are done in single coin (XMR in case of MO), so you have to somehow design how you are going to distribute second coin payments on your own. MO pool trading modules are not open source.