-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Support of CryptoNight v8 ReverseWaltz #2261
Conversation
…rsewaltz, reverse_waltz or graft)
xmrstak/jconf.cpp
Outdated
@@ -118,7 +119,8 @@ xmrstak::coin_selection coins[] = { | |||
{ "stellite", {POW(cryptonight_v8_half)}, {POW(cryptonight_monero_v8)}, nullptr }, | |||
{ "turtlecoin", {POW(cryptonight_turtle), 6u,POW(cryptonight_aeon)}, {POW(cryptonight_aeon)}, nullptr }, | |||
{ "plenteum", {POW(cryptonight_turtle)}, {POW(cryptonight_turtle)}, nullptr }, | |||
{ "zelerius", {POW(cryptonight_v8_zelerius), 7, POW(cryptonight_monero_v8)}, {POW(cryptonight_monero_v8)}, nullptr } | |||
{ "zelerius", {POW(cryptonight_v8_zelerius), 7, POW(cryptonight_monero_v8)}, {POW(cryptonight_monero_v8)}, nullptr }, | |||
{ "reverse_waltz", {POW(cryptonight_v8_reversewaltz)}, {POW(cryptonight_monero_v8)}, "mining.grftpool.com:3333" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please rename reverse_waltz
to cryptonight_v8_reversewaltz
and put it into alphabetic order. cryptonight_v8_reversewaltz
is the name yo asl oput in to README.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also remove the inactive pool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cryptonight_v8_reversewaltz
is already present, moved it into alphabetic order.- removed
reverse_waltz
. I added it as another alias, however, if I correctly understood, you add as additional aliases only coin names, so I removed it. - moved
cryptonight_v8_reversewaltz
in README.txt and pools.tpl into alphabetic order. Sorry, I didn't notice it before.
Thanks.
xmrstak/jconf.cpp
Outdated
{ "freehaven", {POW(cryptonight_superfast)}, {POW(cryptonight_monero_v8)}, nullptr }, | ||
{ "graft", {POW(cryptonight_monero_v8)}, {POW(cryptonight_monero_v8)}, nullptr }, | ||
{ "graft", {POW(cryptonight_v8_reversewaltz)}, {POW(cryptonight_monero_v8)}, "mining.grftpool.com:3333" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change to {POW(cryptonight_v8_reversewaltz), <forkblockversion>, POW(cryptonight_monero_v8)}, {POW(cryptonight_monero_v8)}
to allow to fork on a given block height. must be replaced with the block version where the coin is forking.
Please remove the pool sugestion or add an active pool. If you add an active pool please use not th elargest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- modified
"graft"
record as you asked; - added fork block version - 12;
- removed pool suggestion. It is active since we maintain it, but it isn't the most popular Graft mining pool and, unfortunately, it has a zero hash rate.
Thanks.
dc3bbfb
to
4bfc9d3
Compare
@@ -794,6 +795,17 @@ __kernel void JOIN(cn1,ALGO) (__global uint4 *Scratchpad, __global ulong *states | |||
} | |||
#endif | |||
|
|||
#if(ALGO == cryptonight_v8_reversewaltz) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One slight cleanup here:
#endif
#if(ALGO ==
would be better written as:
#elif(ALGO ==
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Thanks.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I think this code could be made simpler still if you did some #define
trickery on the declaration, like this:
// (earlier)
#if(ALGO == cryptonight_monero_v8)
# define CNV8_CHUNK1_INTO chunk1
# define CNV8_CHUNK3_INTO chunk3
#elif(ALGO == cryptonight_v8_reversewaltz)
# define CNV8_CHUNK1_INTO chunk3
# define CNV8_CHUNK3_INTO chunk1
#endif
Then you can ditch the second code block entirely and change the first to:
#if(ALGO == cryptonight_monero_v8 || ALGO == cryptonight_v8_reversewaltz)
{
ulong2 CNV8_CHUNK1_INTO = as_ulong2(SCRATCHPAD_CHUNK(1));
ulong2 chunk2 = as_ulong2(SCRATCHPAD_CHUNK(2));
ulong2 CNV8_CHUNK3_INTO = as_ulong2(SCRATCHPAD_CHUNK(3));
SCRATCHPAD_CHUNK(1) = as_uint4(chunk3 + ((ulong2 *)(b_x + 1))[0]);
SCRATCHPAD_CHUNK(2) = as_uint4(chunk1 + ((ulong2 *)b_x)[0]);
SCRATCHPAD_CHUNK(3) = as_uint4(chunk2 + ((ulong2 *)a)[0]);
}
#endif
and then... (continued in next comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but it can complicate reading of the code. Also, I wanted to minimize my changes, so I tried to leave original implementation as close to original as I could. However, if @psychocrypt and @fireice-uk agree with your proposal, I'll replace it using defines.
@@ -370,6 +370,22 @@ __global__ void cryptonight_core_gpu_phase2_double( | |||
myChunks[ idx1 ^ 6 + sub ] = chunk2 + ax0; | |||
} | |||
|
|||
if(ALGO == cryptonight_v8_reversewaltz) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else if
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Thanks.
Done.
cbd5a84
to
c9db128
Compare
Please provide the test pool address and a wallet address I can use for testing |
@psychocrypt |
https://testnet.graft.community is also up and running. |
@@ -30,6 +30,7 @@ R"===( | |||
#define cryptonight_superfast 12 | |||
#define cryptonight_gpu 13 | |||
#define cryptonight_conceal 14 | |||
#define cryptonight_v8_reversewaltz 15 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be 17, not 15, to agree with the value in xmrstak/backend/cryptonight.hpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. Fixed. Thanks, @jagerman.
chunk3 = chunk1; | ||
chunk1 = chunk_tmp; | ||
} | ||
#endif | ||
SCRATCHPAD_CHUNK(1) = as_uint4(chunk3 + ((ulong2 *)(b_x + 1))[0]); | ||
SCRATCHPAD_CHUNK(2) = as_uint4(chunk1 + ((ulong2 *)b_x)[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The swap above this is not nice: better to remove it and #ifdef
the assignment as:
#if(ALGO == cryptonight_v8_reversewaltz)
SCRATCHPAD_CHUNK(1) = as_uint4(chunk1 + ((ulong2 *)(b_x + 1))[0]);
SCRATCHPAD_CHUNK(2) = as_uint4(chunk3 + ((ulong2 *)b_x)[0]);
#else
SCRATCHPAD_CHUNK(1) = as_uint4(chunk3 + ((ulong2 *)(b_x + 1))[0]);
SCRATCHPAD_CHUNK(2) = as_uint4(chunk1 + ((ulong2 *)b_x)[0]);
#endif
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with you. Fixed. Thanks.
219b6ed
to
d10dafc
Compare
rebased version of fireice-uk#2261 Added support of CryptoNight v8 Reverse Waltz (named cryptonight_v8_reversewaltz here) - equal to CryptoNight v8 but with 3/4 iterations of CryptoNight v8 and with reversed shuffle operation We plan to use CryptoNight v8 Reverse Waltz as new PoW algorithm for Graft (graft-project/GraftNetwork#234).
thx for the pull request I rebased it in #2282 |
rebased version of fireice-uk#2261 Added support of CryptoNight v8 Reverse Waltz (named cryptonight_v8_reversewaltz here) - equal to CryptoNight v8 but with 3/4 iterations of CryptoNight v8 and with reversed shuffle operation We plan to use CryptoNight v8 Reverse Waltz as new PoW algorithm for Graft (graft-project/GraftNetwork#234).
rebased version of fireice-uk#2261 Added support of CryptoNight v8 Reverse Waltz (named cryptonight_v8_reversewaltz here) - equal to CryptoNight v8 but with 3/4 iterations of CryptoNight v8 and with reversed shuffle operation We plan to use CryptoNight v8 Reverse Waltz as new PoW algorithm for Graft (graft-project/GraftNetwork#234).
Added support of CryptoNight v8 Reverse Waltz (named cryptonight_v8_reversewaltz here) - equal to CryptoNight v8 but with 3/4 iterations of CryptoNight v8 and with reversed shuffle operation
We plan to use CryptoNight v8 Reverse Waltz as new PoW algorithm for Graft (graft-project/GraftNetwork#234).