-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Kindly add RandomL #2875
base: master
Are you sure you want to change the base?
Kindly add RandomL #2875
Conversation
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.
Will need at least these nitpicks repaired.
I have not tested this at all, compile or otherwise. But it looks about right otherwise (did not sanity check the constants, accepted them as truth...)
src/base/crypto/Algorithm.cpp
Outdated
@@ -152,7 +153,9 @@ static const std::map<uint32_t, const char *> kAlgorithmNames = { | |||
ALGO_NAME(RX_ARQ), | |||
ALGO_NAME(RX_GRAFT), | |||
ALGO_NAME(RX_SFX), | |||
ALGO_NAME(RX_LOZZ), |
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.
Should be at bottom like all other insertions (below KEVA)
src/base/crypto/Algorithm.cpp
Outdated
ALGO_NAME(RX_KEVA), | ||
|
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.
No extra whitespace line here
src/base/crypto/Algorithm.h
Outdated
@@ -78,6 +78,7 @@ class Algorithm | |||
RX_GRAFT = 0x72151267, // "rx/graft" RandomGRAFT (Graft). | |||
RX_SFX = 0x72151273, // "rx/sfx" RandomSFX (Safex Cash). | |||
RX_KEVA = 0x7214116b, // "rx/keva" RandomKEVA (Keva). | |||
RX_LOZZ = 0x7213f747, // "rx/lozz" RandomL (Lozzax). |
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.
Spacing alignment (extra space at RandomL
...)
src/base/crypto/Coin.cpp
Outdated
@@ -54,6 +54,7 @@ static const CoinInfo coinInfo[] = { | |||
{ Algorithm::RX_KEVA, "KVA", "Kevacoin", 0, 0, MAGENTA_BG_BOLD(WHITE_BOLD_S " keva ") }, | |||
{ Algorithm::KAWPOW_RVN, "RVN", "Ravencoin", 0, 0, BLUE_BG_BOLD( WHITE_BOLD_S " raven ") }, | |||
{ Algorithm::RX_WOW, "WOW", "Wownero", 300, 100000000000, MAGENTA_BG_BOLD(WHITE_BOLD_S " wownero ") }, | |||
{ Algorithm::RX_LOZZ, "LOZZ", "Lozzax", 120, 1000000000, MAGENTA_BG_BOLD(WHITE_BOLD_S " lozzax ") }, |
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.
Spacing alignment (all tag-tokens must be same length string, add one space after lozzax
...)
@@ -24,6 +24,7 @@ | |||
#define ALGO_RX_SFX 0x72151273 | |||
#define ALGO_RX_KEVA 0x7214116b | |||
#define ALGO_RX_GRAFT 0x72151267 | |||
#define ALGO_RX_LOZZ 0x7213f747 |
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.
Should be 0x7215126c
...
Because RANDOMX_SCRATCHPAD_L3
is 2097152
, thus Log2(2097152) = 21
which is 0x15
And RANDOMX_SCRATCHPAD_L2
is 262144
, thus Log2(262144) = 18
which is 0x12
And the ASCII hex byte for the first letter of the name (lowercase L
) is 0x6c
So 0x7215126c
The L3/L2 sizing bytes are used in some of the code and must be correct. Not even sure what it would do with 2^0xf7
sized L2, lol. Where did 0xf747
come from?
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.
Unless, 0x13
was intentional for a RANDOMX_SCRATCHPAD_L3
of 524288
, in which case it's incorrect over in the src/backend/opencl/cl/rx/randomx_constants_lozz.h
line 27
0xf7
still makes no sense either way because there aren't 2.261564243×10⁷⁴
bytes of L2 cache in total on the planet.
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.
Resolved #3c7017b
* I removed white space and the position of LOZZ * Thanks to Spudz who correct the value for lozz which is 0x7215126c
This is to add RandomL to the main branch of Xmrig
RandomL is a fork of RandomX for Lozzax blockchain
Check on RandomL on Lozzax pool: https://mine.lozzax.xyz/