0

I have a simple question. Is there any documentation on how mining software works on Monero with nodejs? Or how should I connect with the blockchain and get some data to process it?

I've looked already on Google but I can't find anything solid.

Thanks in advance

JPP

1 Answer 1

1

...how mining software works on Monero with nodejs?

Mining "works" the same irrespective of the platform the pool/miner is built on.

Documentation of a nodejs based pool can be found at nodejs-pool.

13
  • So if I understand it correct I need to connect to the pool somehow in nodejs en then I get some work from the pool? But then my program needs to process the work right?
    – J_P
    Commented Oct 8, 2020 at 12:13
  • Get work from a pool or daemon, hash it repeatedly with the RandomX hashing algo until you get a hash which meets the required target, then submit.
    – jtgrassie
    Commented Oct 8, 2020 at 16:21
  • By required target you mean the hash is a valid hash which can be added to the blockchain? Thanks for all your help. This project will be open source so all developers can learn from it.
    – J_P
    Commented Oct 8, 2020 at 16:37
  • A hash is just a number. It must be smaller than another number, which is the inverse of a number miners call a target. Specifically, if hash * diff < 2^256-1 it meets the required network difficulty, or put in target terms, if 2^256-1 / hash >= diff_target it meets the requested difficulty target.
    – jtgrassie
    Commented Oct 9, 2020 at 5:14
  • Also, hashes are not added to the blockchain, blocks are, which include a nonce, that when others hash the block data with the nonce, the resulting hash must meet the network difficulty.
    – jtgrassie
    Commented Oct 9, 2020 at 5:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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