Any chance of Masari?
Blitss opened this issue · comments
Hello there,
I've been trying to make it work with Masari (cn/half). I modified the worker a bit but it seems to produce invalid shares no matter what I do:
const inonce = getRandomInt(0, 0xFFFFFFFF);
const hexnonce = int2hex(inonce);
const outerBlob = job['blob'].substring(0,78) + hexnonce + job['blob'].substring(86, job['blob']['length']);
try {
const hash = cn(outerBlob, 3, 2, 0);
const resultingTarget = hex2int(hash.substring(56, 64));
I have literally tried every variant with algo = 3. Any idea what should I use and will it work at all? In case of xmrig it's variant=9, blobType=6
.
I'm not so sure, but something is wrong here:
const { cryptonight } = require('cryptonight-hashing');
const blob = '0808dbfdb3e40554c4d42580a8a82cf52de57eeb59b770c76d1699f27d0bbf1fcd1f4faeedbe815a03cc23effe95d394143f414bbc4a824c62f8bdd3877b7abfd9dc1aebebf46f015fe675010000000000000000000000000000000000000000000000000000000000000000';
function test() {
console.log(cryptonight(Buffer.from(blob, 'hex'), 9).toString('hex'));
}
test();
> 51717f06ef9611cbd499f671cc8a5923a976f00cd3bb0c42c395c0fc80fddb23
Whilst miner sends 92d5d1797ba649bc501faf01aad6cb4c879d2fae8d6ebc4b3904a92422f08871
Masari already works. Look at the pool.json:
"masari.miner.rocks" : { "url" : "masari.miner.rocks", "port" : 5005, "emptypassword" : "", "algorithm" : "cn/half" },
you can add more masari pools if you like
@notgiven688 Thanks for the reply! I'm using a custom proxy, can you please point me into the right direction, what arguments (algo + variant) should I pass to cn
function in a worker thread?
should be 3,2
@notgiven688 I already tried this option and it doesn't work. Cryptronight-R works fine. I'll double check to see if I'm missing something.
UPDATE: Apparently, I do miss something. I ran your proxy and miner and it seems to produce a valid result.
Sorry to bother you