fireice-uk / xmr-stak

Free Monero RandomX Miner and unified CryptoNight miner
GNU General Public License v3.0
4.05k stars 1.79k forks source link

Monero v7 PoW - automatic switch #1171

Closed tevador closed 6 years ago

tevador commented 6 years ago

Is xmr-stak going to implement automatic switch of the PoW algorithm starting with block 1546000?

It would be easier if the switch could be done automatically without having to modify the config file manually (imagine the switch happens in the middle of the night).

The detection can be done automatically using on the "version" flag in the block template header received from the pool.

I suggest for example the following 3 options for the "currency" option in the config file:

monero - will use the old PoW until block 1546000, then switches to v7 monero-legacy - old cryptonight PoW (e.g. to mine ETN) aeon - cryptonight-lite (automatic switch can be added when aeon anounces the block height)

fireice-uk commented 6 years ago

We are moving away from user-selected hash algorithms altogether to facilitate that. Your options will be:

    { "aeon", cryptonight_lite },
    { "cryptonight", cryptonight },
    { "cryptonight_lite", cryptonight_lite },
    { "edollar", cryptonight },
    { "electroneum", cryptonight },
    { "graft", cryptonight },
    { "intense", cryptonight },
    { "karbo", cryptonight },
    { "monero2", cryptonight_monero },
    { "sumokoin", cryptonight }
jtgrassie commented 6 years ago

monero2

Why not just:

{ "monero", cryptonight_monero },

fireice-uk commented 6 years ago

Because that's a current choice for all of those coins.

plavirudar commented 6 years ago

I think the point is for there to be no need to update any configs at all, { "monero", cryptonight_monero }, should automatically upgrade to the v7 PoW once the block template is being issued by the pool. Reducing the work to be done is always better.

fireice-uk commented 6 years ago

This would break for everyone that is not mining Monero

plavirudar commented 6 years ago

I'm not sure if that's the case, since xmrig has apparently merged the new PoW so that it can handle both old and new versions depending on the block template. Is there anything (such as a specific issue with xmr-stak's codebase) that is preventing this automated switch from occurring?

psychocrypt commented 6 years ago

Xmr-stak is automaticly updating the algorithm as soon as the pool send blocks with version number 7.

monero2 is chosen as name for monero because old versions of xmr-stak used monero to activte cryptonight. To avoid that users using an old config and spamming pools with wrong shares we disallow for the next release the currency monero instead you need to select monero2

plavirudar commented 6 years ago

Sorry for being unclear, let me clarify:

In the new version, what is the current behaviour? Does monero2 allow mining on a Monero pool right now (March 20) pre-fork by checking the version number in the block template?

If it can mine on Monero pools now, then it's the same behaviour as xmrig once the config is changed correctly and does not need patching before and after the fork.

If it does not, is it possible to make monero2 mine on Monero pools now, and have it automatically detect the block template from a post-fork Monero pool so it can dynamically adjust to both algos?

psychocrypt commented 6 years ago

There is no need to change the config or to restart the miner after the hardfork the miner will automaticly switch over to the new pow. You can mine today with the next release the old monero pow(cryptonight) as soon as v7 is signaled by the pool the miner will switch the pow.

SmajeNz0 commented 6 years ago

Hello,

Will you implement the POW change for Aeon as well? Testnet should run the new POW on 24th.

https://github.com/aeonix/aeon-rebase/pull/4#issuecomment-374611047

Thank you

psychocrypt commented 6 years ago

is the block hight for the fork already defined? What are the changes in the pow?

SmajeNz0 commented 6 years ago

The testnet height for v7 fork is set to 44000 (24 March 2018).

Same as Monero V7. Do you need to speak to a dev? or tell me what you need to know, I ll gather it for you.

Excerpt from commit:

"Last but not least, the same POW change (variant 1) from Monero is applied to Aeon's CryptoNight-Lite. To ease the adoption (particularly for 3rd-party miners and pools), it's decided to bump the fork version from v1 to v7 at once (instead of v2 as usual).

The testnet height for v7 fork is set to 44000 (24 March 2018)."

itsits commented 6 years ago

Be careful. I think some coins are already using v7 with the old POW. Look at the cast thread in bitcointalk.

On Mar 20, 2018, at 10:15 AM, psychocrypt notifications@github.com wrote:

There is no need to change the config or to restart the miner after the hardfork the miner will automaticly switch over to the new pow. You can mine today with the next release the old monero pow(cryptonight) as soon as v7 is signaled by the pool the miner will switch the pow. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

neptune-klm commented 6 years ago

Will the new Stak release support mining of Turtle Coin?

SmajeNz0 commented 6 years ago

Not sure you saw my edited message. Just tell me what you need for informations to implement the POW change for Aeon. I'll be happy to help.

psychocrypt commented 6 years ago

A test pool for the new pow after the aeon fork would be nice. It looks like aeon is using the monero pow (thats good) but a test pool would be perfect.

SmajeNz0 commented 6 years ago

ArqTras from supportaeon.com could setup a test pool on testnet. I just talked with him today. Would it be ok for you?

psychocrypt commented 6 years ago

Is this pool already working with the new pow? What I also need is a testnet address which I can use to mine during the tests.

SmajeNz0 commented 6 years ago

They are working on implementing the new POW for the pool. I let you know when we can test.

psychocrypt commented 6 years ago

thx

Omar-Elrefaei commented 6 years ago

So that would mean that when I updated the miner (to the 4th version) I should change the config to monero2 so that it would switch to the new PoW automatically, right?

Sorry for the inconvenience :smiley:

ericvitale commented 6 years ago

I don't want to tell you how to do this, but wouldn't allowing someone to pick the actual algorithm that way you won't need to update as each other coin changes to the new algorithm?

I think I would just be able to pick "Monero" when another coin moves to the new algorithm I could just pick "Monero".

That said, do you know when the new code will be available?

JerichoJones commented 6 years ago

The code should be released today.

gdiShun commented 6 years ago

Apologies if this has been asked and answered before, especially if it's in this thread. Only skimmed through. But if I'm mining a coin not directly supported(Masari), after it changes PoW, would I just manually change from cryptonight to monero7?

Also, on the release page it says Sumokoin will "use 4MiB memory per hash." Is that Sumokoin only? Perhaps they're handling it a different way than Monero? If so, I'm assuming the Masari question depends on how they will handle it? Either way, will that 4MiB change effectively halve CPU mining performance or am I misinterpreting?

Thanks.

fireice-uk commented 6 years ago

But if I'm mining a coin not directly supported(Masari), after it changes PoW, would I just manually change from cryptonight to monero7?

It will depend on the coin -> if they are changing to Monero PoW sytstem then monero7 might work, depending on their versions.

Also, on the release page it says Sumokoin will "use 4MiB memory per hash." Is that Sumokoin only? Perhaps they're handling it a different way than Monero? Either way, will that 4MiB change effectively halve CPU mining performance or am I misinterpreting?

Yes, they are switching to cryptonight-heavy that tends to favour GPUs over CPUs (botnet and web miner deterrence)

lost-bro commented 6 years ago

Good day All. First, Great thanks to fireice-uk and crew for the super work on XMR-Stak. I am mining both ETN & Masari using using the V7 Stak version (latest)...... have the "currency" : "monero7". Is working great. We well see what happens when MSR changes over to new algo.

scryptkyddy commented 6 years ago

It would be great if a larger list of supported coins could be integrated into each build update....

IE. Graft, IPBC, Turtle, Aeon

This would also give devs more successful shares when switching to dev mode and back, rather than the dev miner trying to submit an XMR wallet Id to another Monero7 algo coin's pool and having it be rejected, and idling the miner.

Removing the option to select an algo manually makes sense in theory, but may cause miners to look elsewhere for a build that still supports it.

psychocrypt commented 6 years ago

we have already graft and aeon7. IPBC is coming. Never the less we expose since 2.4.3 the basic algorithms this mean that each cryptonight coin can be mined even if the coin is not listed explicitly.