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

Kindly add RandomL #2875

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Kindly add RandomL #2875

wants to merge 4 commits into from

Conversation

gamerope
Copy link

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/

Copy link
Contributor

@Spudz76 Spudz76 left a 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...)

@@ -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),
Copy link
Contributor

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)

ALGO_NAME(RX_KEVA),

Copy link
Contributor

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

@@ -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).
Copy link
Contributor

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...)

@@ -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 ") },
Copy link
Contributor

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
Copy link
Contributor

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?

Copy link
Contributor

@Spudz76 Spudz76 Jan 19, 2022

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved #3c7017b

src/base/crypto/Algorithm.h Outdated Show resolved Hide resolved
* I removed white space and the position of LOZZ

* Thanks to Spudz who correct the value for lozz which is 0x7215126c
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

Successfully merging this pull request may close these issues.

None yet

2 participants