oliverw / miningcore

Miningcore is a high-performance Mining Pool Software for Linux and Windows.
https://store.miningcore.pro
MIT License
728 stars 666 forks source link

Equihash Masternode Support #617

Closed eketubol closed 3 years ago

eketubol commented 5 years ago

Note

Please use the following format to file an issue. Issues that fail to comply will delay our responses. Please remove this section when you submit the issue. Thank you for your cooperation.

Description

When adding an Equihash coin with Masternodes MiningCore cannot accept blocks. While investigating there is no support for Equihash Coins with Masternodes. Can I take the Masternode.cs and Payee.cs file from /miningcore/src/MiningCore/Blockchain/Bitcoin and place it under /miningcore/src/Miningcore/Blockchain/Equihash and would that then enable MiningCore to successfully handle blocks with masternode payments?

Steps to Reproduce

  1. Add coin with Masternode, for example ZelCash
  2. Mine enough to hit a block and find that it crashes MiningCore

Expected behavior

To be able to mine a block successfully.

Actual behavior

MiningCore crashes on block.

Reproduces how often

100%

Version

If you are using released version, please state your version. If you are using clone from dev branch, please state commit hash of your copy. Also, please include the OS name and version you're currently running.

Additional Information

Any additional information, log, configuration or data that might be necessary to reproduce the issue.

Konstantin35 commented 5 years ago

You can try https://github.com/coinfoundry/miningcore/blob/master/src/Miningcore/Blockchain/Bitcoin/BitcoinJob.cs#L114

oliverw commented 5 years ago

@eketubol Which coin are we talking about?

eketubol commented 5 years ago

Hi @oliverw there are two coins which I am interested in, ZelCash which is a very promising coin and has recently released masternodes and Vidulum which is a lesser known coin. ZelCash is Equihash 144 and Vidulum is Equihash 192. Both have masternodes now which require additional coding as currently every block I hit is rejected. Any help is greatly appreciated

calebcall commented 5 years ago

I believe at minimum you will need the equihash block template to support the masternode payee (look at getblocktemplate for those two coins and see how the masternode payment is being reported. Some report as payee, some as other things). I haven’t looked so equihash in miningcore May already have some of the MN stuff in it, or it may not.

oliverw commented 5 years ago

@eketubol @calebcall Masternodes and Payee are currently not implemented for the Equihash Coin Family. It shouldn't be too hard to port it over from the Bitcoin Family code. I haven't done it myself yet because I didn't see the need and also because the Blockheader and Coinbase assembly is a sensitive area where its quite easy to break things.

equ1miner commented 5 years ago

I will be committing an update to zero (zer) soon you may copy it.

oliverw commented 5 years ago

@equ1miner Care to elaborate?

equ1miner commented 5 years ago

@oliverw Will be similar to other coins. We plan to use a the required outputs in the blocktemplate later. Using the required payee array instead and disabling the founders reward + masternode_payee could be useful for future updates to zero. This looks similar to dash multi payee when skimming your work. I'd think it would be relatively easy for any coin to adapt similar changes to their custom versions or official pool.

https://github.com/zerocurrencycoin/Zero-MiningCore/commit/f35ee9f5f79c031f496763c634f5862713348ea4

https://github.com/equ1miner/miningcore is essentially the same

katarinapav commented 5 years ago

Hi, so @equ1miner have you solved the problem with masternode payments? I'm using zero fork, hash and shares are ok and when I mine vdl getting bad-cb-payee rejects and when I mine 144 algo I'm getting tx-overwinter-active rejects. Is there any possibilities to fix these problems? Thanks.

katarinapav commented 5 years ago

Hi @oliverw, any fix for zhash masternode payments and tx-overwinter-active rejects? Thanks.

katarinapav commented 5 years ago

Anyone to help with this issue? Don't have much experience but I can try. It would be nice that miningcore can support most algos out of the box. Thanks.

calebcall commented 5 years ago

Well, miningcore does support equihash, just not masternodes on equihash. Supporting most algos isn't really reasonable without having community contributions. Oliver is only one person and runs his own pool so as he has a need, things get added (which is totally fair). If the community has a need, they should be working on and contributing those back to the project.

katarinapav commented 5 years ago

Hi @calebcall, thanks for quick reply. Yeah I meant for masternodes payments on equihash. I understand your point. Maybe someone can jump in a near future and make that possible. Thanks again.

equ1miner commented 5 years ago

Hi, so @equ1miner have you solved the problem with masternode payments? I'm using zero fork, hash and shares are ok and when I mine vdl getting bad-cb-payee rejects and when I mine 144 algo I'm getting tx-overwinter-active rejects. Is there any possibilities to fix these problems? Thanks.

The active version has been released and both online and live on the zero mainnet community pool for some time further it is on the zero github. You may have have to modify based on VDL's daemon's response to "getblocktemplate" or other customization of VDL VDL is not ZERO but maybe you can more easily isolate the changes given a working example that you can test on zero. Good luck!

katarinapav commented 5 years ago

Thanks

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.