casp0or 75 Posted December 15, 2018 Hey, I managed to set up a working pool. I´m Testing right now. I announce the pool address later this day after testing is finished Regards 1 Quote Share this post Link to post Share on other sites
Dmitrii 3 Posted December 15, 2018 what miner you use? Quote Share this post Link to post Share on other sites
casp0or 75 Posted December 15, 2018 (edited) Hi, I found this one some hours ago. Was searching for a neoscrypt stratum miner --> https://github.com/technobyl/CryptoDredge/releases/ Seems to work fine Regards Tested with: win10 cuda -> 10.0 ubuntu 16.4 cuda -> 9.1 Edited December 15, 2018 by casp0or Quote Share this post Link to post Share on other sites
domob 138 Posted December 15, 2018 Great news! Did that work even though the presumable Stratum-incompatibility will only be fixed after the hard fork activation in a few days? Quote Share this post Link to post Share on other sites
casp0or 75 Posted December 15, 2018 Hey, yes I think so did not find a block until now but I think one or two hours more and I can confirm that it is working without the stratum fork Quote Share this post Link to post Share on other sites
casp0or 75 Posted December 16, 2018 Ok, now I´m finding blocks used "nsgminer-win64-0.9.4" The last issue is, that the pool or miner does not add the coinbase to the new block -.- have to build this myself tomorrow. If everything is set up tomorrow, I will announce the pool address. Regards Quote Share this post Link to post Share on other sites
domob 138 Posted December 16, 2018 15 hours ago, casp0or said: yes I think so did not find a block until now but I think one or two hours more and I can confirm that it is working without the stratum fork Interesting ... when I was talking to somer other miners, they said that the Stratum protocol needs to have some field for the "extra nonce" that it is allowed to change and that's not part of the mined PoW block header but the coinbase tx (for Bitcoin) or the "actual" block header (for Xaya). For Neoscrypt you don't really need an extra nonce, but the protocol still requires it - so how did you solve that? Or is my understanding just wrong, as I don't know much about Stratum or mining myself? Quote Share this post Link to post Share on other sites
casp0or 75 Posted December 16, 2018 2 hours ago, domob said: Interesting ... when I was talking to somer other miners, they said that the Stratum protocol needs to have some field for the "extra nonce" that it is allowed to change and that's not part of the mined PoW block header but the coinbase tx (for Bitcoin) or the "actual" block header (for Xaya). For Neoscrypt you don't really need an extra nonce, but the protocol still requires it - so how did you solve that? Or is my understanding just wrong, as I don't know much about Stratum or mining myself? yes, but this is only an extra nonce for the Merkle-Tree I read somewhere. The "getwork" method is not working and some miner software send strange requests... so I copied the stratum methods for connecting and send share and adjusted them for the requests the miner software sends. Quote Currently this check fails with {"code":-22,"message":"Block does not start with a coinbase "} Now I try to add it to the block on the server side rather than letting the miner software do their thing and then submit the block to the daemon to check if it is valid or not. Regards Quote Share this post Link to post Share on other sites
casp0or 75 Posted December 16, 2018 hmm, I discovered that the extraNonce in the header is used to calculate the coinbase ... Quote let extraNonce1Buffer = Buffer.from(extraNonce1, 'hex'); logger.silly("extraNonce1Buffer = %s", extraNonce1.toString("hex")); let extraNonce2Buffer = Buffer.from(extraNonce2, 'hex'); logger.silly("extraNonce2Buffer = %s", extraNonce2Buffer.toString("hex")); --> let coinbaseBuffer = job.serializeCoinbase(extraNonce1Buffer, extraNonce2Buffer); <-- logger.silly("coinbaseBuffer = %s", coinbaseBuffer.toString("hex")); let coinbaseHash = coinbaseHasher(coinbaseBuffer); logger.silly("coinbaseHash = %s", coinbaseHash.toString("hex")); Maybe I try to create the extraNonce myself or we really have to wait for the fork -.- But I will try to fix this Quote Share this post Link to post Share on other sites
domob 138 Posted December 16, 2018 1 hour ago, casp0or said: hmm, I discovered that the extraNonce in the header is used to calculate the coinbase ... Yeah, the way I understood the explanation originally is that the Stratum miner needs to be given a template of the "coinbase tx" plus an offset in it where it is allowed to adjust the extra nonce. In the case of Xaya, the "coinbase tx" is instead the actual Xaya block header, while the "fake block header" that the miner works on is part of the PoW data. That structure apparently works with Stratum, except that there needs to be a place for the "fake extra nonce" in the real Xaya block header - which is where the fork comes in, as it will allow using the "nonce" field in the block header for just that. But perhaps there is another way to do this - as I said, I've never really looked into the "hardcore mining stuff". Quote Share this post Link to post Share on other sites
casp0or 75 Posted December 16, 2018 48 minutes ago, domob said: But perhaps there is another way to do this - as I said, I've never really looked into the "hardcore mining stuff". I´m currently trying to save the extra nonce for each coin in the DB and apply it to the share/block right before I check against the daemon for a valid block/share. This way it's like the extraNonce is present in the header. But never worked with redis before (reading currently some tuts)... I hope this approach works right out of the box since there shouldn´t be any differences in the way the extraNonce is applied to the validity check Quote Share this post Link to post Share on other sites
casp0or 75 Posted December 16, 2018 Ok, I think I found the issue The submitted BlockHeader is not as described in your stats and the first bytes of PoW data indicates not the algo ... I don´t think a fork solves this issue because of the multi mining. I try to create a new blockheader validation tomorrow and if it is working, I create a merge request at the "stratum-pool" repository. not present: Quote The first byte of the PoW data indicates the mining algorithm The block header nBits field must be zero. The PoW data nBits field must match the expected difficulty for the selected algorithm, following the difficulty retargeting for that algorithm. The PoW must match the nBits difficulty target specified in the PoW data. Their hash according to the selected algorithm (Neoscrypt) satisfies the difficulty target. Bytes 37 to 68, where the Merkle root hash would be in a Bitcoin block header, contain exactly the hash of the Xaya block header. Regards Quote Share this post Link to post Share on other sites
domob 138 Posted December 17, 2018 Thanks for your work on this! Again, as I understood the discussion with other miners originally, you seem to be on a wrong path here. For Xaya Neoscrypt mining, there is a "fake block header" that has the actual PoW and commits to the real Xaya block header through the Merkle root field. So your Stratum miner would never even see the real Xaya block header (with the things you quoted above), it would only work on that fake header. The real Xaya block header would be seen by it like a coinbase transaction, which is also linked to the block header through the Merkle root field. And that's where the extra nonce comes in: For Bitcoin mining, the extra nonce is part of the coinbase transaction - so the Stratum protocol requires some field in that data (which for Xaya is the real Xaya block header) that the miner is allowed to change. And after the fork, it will be the nonce value. Then all should work. Quote Share this post Link to post Share on other sites
casp0or 75 Posted December 17, 2018 ok, I misunderstood this, then I have one last question can´t I use the "getwork" function? I saw that some mining software send a "getwork" POST request but the new pool software does not implement this or is this only for solo mining? (info from xaya specs) Quote Share this post Link to post Share on other sites
domob 138 Posted December 17, 2018 I think you can use "getwork". It will return you a work that corresponds exactly to this "fake block header" you need to solve. So as long as you get your pool miners to solve the work somehow (as an ordinary Bitcoin block header, basically, except of course with Neoscrypt), you can submit it afterwards. However, if you use "getwork", then I think you won't be able to get the real block header / pass it as coinbase transaction to the pool miners. I don't know enough about Stratum to tell whether or not that is a problem. I think the miners that I talked to previously planned to call "getblocktemplate" and build the block header as well as the PoW data and stuff themselves, so they have full control over it. As far as I know, that will at least after the fork work for sure. Quote Share this post Link to post Share on other sites
casp0or 75 Posted December 17, 2018 1 hour ago, domob said: I think the miners that I talked to previously planned to call "getblocktemplate" and build the block header as well as the PoW data and stuff themselves, so they have full control over it. As far as I know, that will at least after the fork work for sure. Ok this was my plan too don´t know much about stratum either but I created a pool for a friend with new frontend and dig now into the stratum protocol. Everything is written in a language I´m good at. So I think after some approaches I can get this to work. But I thought I can build the BlockHeader myself after your specs and submit it. Maybe I´m not deep enough into this to understand the whole process ... Do I really need the fork for this when I build it after your specs??? Ok ... Back to code ... Trying to understand it Regards Quote Share this post Link to post Share on other sites
domob 138 Posted December 18, 2018 17 hours ago, casp0or said: Everything is written in a language I´m good at. So I think after some approaches I can get this to work. But I thought I can build the BlockHeader myself after your specs and submit it. Maybe I´m not deep enough into this to understand the whole process ... Do I really need the fork for this when I build it after your specs??? Well - you can certainly build blocks yourself and submit them right now if you follow the specs. The only reason why you need the fork is because apparently the current restriction of "nonce for the actual header has to be zero" is in conflict with how the Stratum protocol works; but I may be wrong here. Quote Share this post Link to post Share on other sites
sorji 65 Posted December 21, 2018 is't the pool up and work? the pool address? thanks Quote Share this post Link to post Share on other sites
casp0or 75 Posted December 21, 2018 (edited) 16 minutes ago, sorji said: is't the pool up and work? the pool address? thanks no sry, I tried to mine a block at block height 400.030 but got "coinbase missing" error. I think it is because of the missing specs for algo etc So I have to build the blockheader myself today with getblocktemplate. If I managed to get this working, I post the pool address here. But I try to do this as fast as possible. Regards Edited December 21, 2018 by casp0or Quote Share this post Link to post Share on other sites
sorji 65 Posted December 21, 2018 Just now, casp0or said: no sry, I tried to mine a block at block height 400.030 but got "coinbase missing" error. I think it is because of the missing specs for algo etc So I have to build the blockheader myself today with getblocktemplate. If I managed to get this working, I post the pool address here. Regards Noted with thanks, cos i don't find any working pool after fork. Quote Share this post Link to post Share on other sites
casp0or 75 Posted December 21, 2018 8 minutes ago, sorji said: Noted with thanks, cos i don't find any working pool after fork. yes because it won´t work out of the box after the fork... I tested it Quote Share this post Link to post Share on other sites
Dmitrii 3 Posted December 21, 2018 (edited) Hi, please, give us pool adress? Edited December 21, 2018 by Dmitrii Quote Share this post Link to post Share on other sites
Konohime 2 Posted December 23, 2018 Thank you for the hard work you're giving @casp0or I hope you will success ! i'll keep my eyes on this topic, really interesting one 1 Quote Share this post Link to post Share on other sites
sorji 65 Posted December 25, 2018 (edited) @casp0or Have u get the pool mining sort? Edited December 25, 2018 by sorji Quote Share this post Link to post Share on other sites
casp0or 75 Posted December 25, 2018 (edited) 13 hours ago, sorji said: @casp0or Have u get the pool mining sort? No, sry but I try to fix this today. One or two bugs are still remaining But I´m in a good way and think that I get this working today or tomorrow Regards Edited December 25, 2018 by casp0or 2 Quote Share this post Link to post Share on other sites