Giter Site home page Giter Site logo

Comments (17)

zone117x avatar zone117x commented on August 23, 2024

Yes, agreed.
I'm actually working on adding keccak algo right now.

from node-stratum-pool.

zone117x avatar zone117x commented on August 23, 2024

Actually it turns out maxcoin devs used their hash algorithm all over the place, not just for shares/blocks. Its not simply adding a keccak hashing algo. It will require lots of code restructuring to support maxcoins and their forks. Although there are some coins that use keccak the normal way. So we need two types: keccak and max.

from node-stratum-pool.

miningpoolhub avatar miningpoolhub commented on August 23, 2024

Oh, I didn't know that.
This project is well maintained, refactored, I really love it.

from node-stratum-pool.

zone117x avatar zone117x commented on August 23, 2024

I've spent an ungodly amount of effort and time trying to implement Maxcoin (and their clones; keccak, blake, shavite, etc) support. I've looked through the source code from maxcoin versions of python-stratum, cudaminer, cpuminer, and coin daemon. I was not able to figure out how to generate a valid block. I posted this issue to the maxcoin devs here: Max-Coin/maxcoin#40

It is up to them now if maxcoin will be supported. I have given up on this unless they help figure out how to implement their changes.

from node-stratum-pool.

miningpoolhub avatar miningpoolhub commented on August 23, 2024

Maybe Maxcoin testnet doesn't work well if they changed core hash logic from litecoin.

I think it would be better to test on real network. Wecoin is dead coin just another fork from Maxcoin and it only needs one gpu to mine block. So testing with wecoin real network would make similar environment. It connects to real peer, address type is different than testnet, real difficulty value is used.

As I am running wecoin pool, I found some bugs that didn't appear on other coins. It maybe specific to wecoin but as wecoin is another copy & paste coin from maxcoin, Maxcoin would have some potential bugs in it too.

I am not sure what's wrong but just happen to think this since you completed other major algorithms. The bug may not exist on NOMP, it may exist on coin daemon.
The only difference I see is that you are testing on testnet and others are not.

from node-stratum-pool.

zone117x avatar zone117x commented on August 23, 2024

I couldn't get wecoin to find any peers - but I have 365coin (another max clone) running on live network. The network diff is pretty high and I only have a 7000kh/s gfx card but I'm trying to see if it will create a valid block. If anyone is available with some hashing power to test that would be nice. As far as I can tell, NOMP should work with keccak algo, it doesn't work on testnet, but haven't been able to create a block on a live network.

from node-stratum-pool.

miningpoolhub avatar miningpoolhub commented on August 23, 2024

365coin is not easy to get block. It's net hash is too high for test.

Below are my wecoind current connected peers.
addnode=23.21.204.34:8558
addnode=143.248.122.149:8558
addnode=54.248.227.151:8558

Maybe helixcoin would be better.
It is also almost dead coin, but some seed servers are alive.

from node-stratum-pool.

zone117x avatar zone117x commented on August 23, 2024

It looks like it briefly is able to connect to one of those nodes then disconnects. Can you tell me the ip:port of your node that I can connect to?

from node-stratum-pool.

zone117x avatar zone117x commented on August 23, 2024

Also I switching to trying to mine a helixcoin block. Network diff is still too hard for my hardware though

from node-stratum-pool.

zone117x avatar zone117x commented on August 23, 2024

Bad news - I finally get a network diff block generated on Helixcoin mainnet. Invalid block. So its not just a broken testnet. Something is still wrong with generating keccak blocks.

from node-stratum-pool.

miningpoolhub avatar miningpoolhub commented on August 23, 2024

Sad news -
How about trying other algo like Heavycoin first. It would enlighten something not could not seen before.
I too will try to analyze some keccak related bugs next week.

from node-stratum-pool.

miningpoolhub avatar miningpoolhub commented on August 23, 2024

I tried current NOMP with helixcoin and wecoin today.
It finds blocks well!
(Sorry for late test. I was so busy these days)

Now I am outside and can't figure out more but it seems like it works anyway.

I want to test more and mornitor it since cgminer seemed to report that it found block frequently than actual. Well I am not sure, I will test it more later.

Helixcoin is good for testing since it has low net hashrate but have live peers which wecoin does not.
Now wecoin is really dead and I can't find any peers even I was running wecoin pool for weeks.

from node-stratum-pool.

zone117x avatar zone117x commented on August 23, 2024

Please confirm for sure that NOMP is submitting valid blocks for keccak coins. From what I can tell I implemented the required features for it to work but when I did testing it didn't work. Maybe I was testing wrong or something... It would be really awesome if you could test on maxcoin itself.
Let me know if its working for sure, that would be awesome.

from node-stratum-pool.

miningpoolhub avatar miningpoolhub commented on August 23, 2024

Yeah, I will test and run on Maxcoin too.
Actually Maxcoin net hash is not small, I can't test but I just need to switch whole pool at some point.

I will switch my maxcoin pool to NOMP after the false hash bug found on givecoin pool is fixed.
I am little bit afraid to switch now since it's real production service.

from node-stratum-pool.

miningpoolhub avatar miningpoolhub commented on August 23, 2024

I switched Maxcoin pool to NOMP and it works well. Yes! It found real blocks!!!
But there is a bug. I think this is the problem why zone117x couldn't notice the block finding.

I tested NOMP with helixcoin several times, and found that
https://github.com/zone117x/node-stratum-pool/blob/master/lib/jobManager.js#L189
blockHex value was right. This is why I could get the right block.
but https://github.com/zone117x/node-stratum-pool/blob/master/lib/jobManager.js#L190
blockHash value was wrong for maxcoin.

I traced NOMP and found that blockHex is inserted to daemon, blockHash is used for validating
if candidate hash is accepted or not.
So, I could find the block but got a log like this

We thought a block was found but it was rejected by the daemon, share data: {"job":"34","ip":"xxx.xxx.xxx.xxx","worker":"xxxxxx.xxxxxx","difficulty":1024,"shareDiff":14975306,"height":196461,"reward":4800000000,"networkDifficulty":"6741127","blockHash":"3a9b16ead7cd3362e66ec8ed25a45c5d7d0146d1193acbe02bf39d9007e3ec1b"}

As referencing python-stratum-mining, maxcoin needs different hashing(keccak) and nTime value as well.

For maxcoin :
block_hash_bin = sha3_256(''.join([ header_bin[i_4:i_4+4][::-1] for i in range(0, 20) ]) + str(int(ntime, 16))).hexdigest()

For other coins :
block_hash_bin = util.doublesha(''.join([ header_bin[i_4:i_4+4][::-1] for i in range(0, 20) ]))

This is not a big problem for me, but it would be better to get blockHash value fixed.

Actually I tried to implement right hashing code and concatenate nTime string, but I'm newbie with nodejs. I couldn't add keccak hashing to pure util.js since it's not available in "crypto" library.
Oh! no! I'm stuck here.

I am a bit afraid to call keccak native hash function directly, that it may harm beautiful NOMP structure.
I'm newbie with nodejs, so the best thing I can do is just leaving info what I found.

from node-stratum-pool.

zone117x avatar zone117x commented on August 23, 2024

Awesome, thanks for the debugging and research miningpoolhub. I'm very pleased to hear that it is indeed generating valid blocks.
To think.. all the time I wasted trying to fix something that I already got working simply because my validation detection code was wrong..

I will fix up the hash checking so that nomp is actually aware of the blocks being submitted successfully :)

Thanks again miningpoolhub.

from node-stratum-pool.

zone117x avatar zone117x commented on August 23, 2024

Keccak algo coins (besides some rare ones like copperlark and ecoin) all work. So maxcoin and its clones are good to go :)

from node-stratum-pool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.