Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Support Turtlecoin's Algorithm Change #1227

Closed
sumlnoether opened this issue Mar 27, 2018 · 20 comments
Closed

[Feature Request]: Support Turtlecoin's Algorithm Change #1227

sumlnoether opened this issue Mar 27, 2018 · 20 comments

Comments

@sumlnoether
Copy link

sumlnoether commented Mar 27, 2018

Introduction

Turtlecoin will be making an algorithm switch in response to the ASIC threat as detailed in this Medium post by @RocksteadyTC: https://medium.com/@turtlecoin/what-is-the-deal-with-asic-d22b86510c6 and an ongoing discussion here: https://github.com/turtlecoin/meta/issues/74.

This change is projected to happen mid-April.

We would like to request that Turtlecoin be added to the list of supported coins in xmr-stak's list.

Technical Details

Currently, Turtlecoin uses the standard Cryptonight (or Monerov6) as it's proof of work function.

It will be moving to Cryptonight-Lite Variant 1 (or the Aeonv1 algorithm) during the hard fork.

Block Major Versions

Block Major Version 1-3: Cryptonight
Block Major Version 4: Cryptonight-Lite Variant 1

Test Hashes

The following hashes are in the format:

32 bit hash <space> data

Cryptonight (Courtesy of Monero)

2f8e3df40bd11f9ac90c743ca8e32bb391da4fb98612aa3b6cdc639ee00b31f5 6465206f6d6e69627573206475626974616e64756d
722fa8ccd594d40e4a41f3822734304c8d5eff7e1b528408e2229da38ba553c4 6162756e64616e732063617574656c61206e6f6e206e6f636574
bbec2cacf69866a8e740380fe7b818fc78f8571221742d729d9d02d7f8989b87 63617665617420656d70746f72
b1257de4efc5ce28c6b40ceb1c6c8f812a64634eb3e81c5220bee9b2b76a6f05 6578206e6968696c6f206e6968696c20666974

Found here: https://github.com/sumlnoether/turtlecoin/blob/8ada1c291f7ae8f3c025c7e42a50be963adc1ce3/tests/Hash/tests-cn-v6.txt

Cryptonight-Lite Variant 1 (Courtesy of xmrig)

87c4e570653eb4c2b42b7a0d546559452dfab573b82ec52f152b7ff98e79446f 0100fb8e8ac805899323371bb790db19218afd8db8e3755d8b90f39b3d5506a9abce4fa912244500000000ee8146d49fa93ee724deb57d12cbc6c6f3b924d946127c7a97418f9348828f0f02
6d8cdc444e9bbbfd68fc43fcd4855b228c8a1bd91d9d00285bec02b7ca2d6741 0305a0dbd6bf05cf16e503f3a66f78007cbf34144332ecbfc22ed95c8700383b309ace1923a0964b00000008ba939a62724c0d7581fce5761e9d8a0e6a1c3f924fdd8493d1115649c05eb601

Found here: https://github.com/sumlnoether/turtlecoin/blob/8ada1c291f7ae8f3c025c7e42a50be963adc1ce3/tests/Hash/tests-cn-lite-v1.txt

Test Pool

The community (thank you, DiscoTim) has also set up a pool for our testnet at https://trtltest.mine2gether.com/.

It is currently on block major version 4 and thus accepts Cryptonight-Lite Variant 1 hashes.

It has been tested and verified to work with the Ubuntu 16.04 build of xmrig-2.5.2. A test command for xmrig is as follows:

./xmrig -a cryptonight-lite -o trtltest.mine2gether.com:9999 -u TESTjFSHwcKdWKcNEPpmUKfnghiXNCBUkKQ31b2hFx9vXm5PjaNASQxd9gVfPytQ1LFBGwgTgMhu15gdJRerviHF39PJApzbHW -p x --variant 1

Conclusions

Thank you for reading through this feature request.

References

Turtlecoin Algorithm Change PR: https://github.com/turtlecoin/turtlecoin/pull/119
Turtlecoin Pool Algorithm Change PR: https://github.com/turtlecoin/turtle-pool/pull/7
Turtlecoin node-multi-hashing https://github.com/turtlecoin/node8-multi-hashing
Turtlecoin node-cryptonote-util https://github.com/turtlecoin/node-cryptonote-util

@sumlnoether
Copy link
Author

Just to pre-empt the requirements check:

Website: https://turtlecoin.lol/

The hashrate hovers around a baseline of 6MH/s. (https://blocks.turtle.link/#)

@BigslimVdub
Copy link

As well since Turtlecoin is borrowing from the Aeon rebase of V1 Cryptonight-lite I believe that there should be a standard Cryptonight_liteV1 option under stak 3.1 as there is a high likelihood that other currency’s will switch or new ico will arrive with this protocol.

Thank you for your consideration @FireIceUK

@bobbieltd
Copy link

Awesome

@sumlnoether
Copy link
Author

Update: Turtlecoin has set the upgrade height to 350,000.

https://github.com/turtlecoin/turtlecoin/commit/9517d1e62a6e4195977bfde5b90b60b173155ce3.

That is approximately 15 April 2018.

@psychocrypt
Copy link
Collaborator

@sumlnoether Thanks for the good description. I will add this coin today night.

@sumlnoether
Copy link
Author

@psychocrypt Thank you!

@RocksteadyTC
Copy link

Thanks @psychocrypt @fireice-uk

@psychocrypt
Copy link
Collaborator

The test pool is providing blocks with the version 1 but not accept cryptonight shares.
Is there a pool available where the correct v4 blocks will be send?

@psychocrypt
Copy link
Collaborator

The time table has a little bit shifted. I will add turtlecoin in the next days. We plane to do a new release tomorrow (02.04) and we will avoid that we break the code in the last minutes. Turtle is changing the scratchpad size therefore we need to double check for everything. Also the test pool is pushing the wrong block version but accepts aeon-v7 shares (this should be solved to allow better testing)

@sumlnoether
Copy link
Author

@psychocrypt

Thanks for pointing it out. I'm looking into it right now.

@sumlnoether
Copy link
Author

@psychocrypt

After tracking the problem down, I found that it wasn't a pool problem at all. Our code from legacy bytecoin performs the hashing on something called a 'parent block' which is required to be major version 1.

https://github.com/turtlecoin/turtlecoin/blob/master/src/CryptoNoteCore/Core.cpp#L1043

Thus, that 0100 first two bytes has to be passed in the job blob to the miners. This means that it is impossible to distinguish between pre-fork and post-fork hashing blobs. The only way is to look at the entire block template which is only known to the pool.

Could we propose that instead of automatically switching the algorithms, Turtlecoin will simply have one algorithm under xmr-stak: Cryptonight-light variant 1?

We will direct our miners to use the 'monero' option before the fork and manually switch to 'turtlecoin' after.

Thank you so much,
Suml

@psychocrypt
Copy link
Collaborator

psychocrypt commented Apr 6, 2018 via email

@sumlnoether
Copy link
Author

@psychocrypt We're looking at doing that in the future but right now the hard fork is too close to achieve consensus.

@fireice-uk
Copy link
Owner

@sumlnoether Ok. We will do that. Bear in mind that this will mean your coin's hashrate will fall to nearly zero for 24 hrs or so.

If you need some help with bytecoin code feel free to get in touch =).

@sumlnoether
Copy link
Author

Thank you so much.

Our coin has already forked actually. The scheduled was pushed up by someone with a lot of hashrate.

We saw a dip to about 1/4 - 1/3rd the old hashrate but it's going at an average of 6-7 MH/s of CN Lite variant 1 and rising. Currently, most of the miners are using xmrig or their own hastily patched versions of xmr-stak.

@BKdilse
Copy link

BKdilse commented Apr 9, 2018

Has XMR-STAK been updated to support this yet, or is it a future thing?

@zpalmtree
Copy link
Contributor

Made a PR to add turtlecoin as a named option. #1469

@psychocrypt
Copy link
Collaborator

psychocrypt commented Apr 19, 2018 via email

@BKdilse
Copy link

BKdilse commented Apr 19, 2018

I can confirm that it works fine. Thanks for the 2.4.3 update.

@zpalmtree
Copy link
Contributor

Yep, it works perfectly now. Just thought it would be nice for our users to have it as an option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants