Skip to content

Added support for Yada (rx/yada algorithm)#2411

Merged
xmrig merged 4 commits into
xmrig:devfrom
pdxwebdev:feature/yadacoin
Aug 2, 2024
Merged

Added support for Yada (rx/yada algorithm)#2411
xmrig merged 4 commits into
xmrig:devfrom
pdxwebdev:feature/yadacoin

Conversation

@pdxwebdev

Copy link
Copy Markdown
Contributor

Hello, YadaCoin would like to be added to the master branch of xmrig.

@xmrig

xmrig commented May 27, 2021

Copy link
Copy Markdown
Owner

This is some kind of testnet? network hashrate is below 10 kH/s.
Thank you.

@pdxwebdev

pdxwebdev commented May 27, 2021

Copy link
Copy Markdown
Contributor Author

This is some kind of testnet? network hashrate is below 10 kH/s.
Thank you.

@xmrig
Looking at https://miningpoolstats.stream/yadacoin, I agree the hash rate reported should be higher for the number of miners. We'll look into that. Thanks.

However, for this PR, is there any additional information you need from us?

Test command:
./xmrig --donate-level 5 -o pool.yadacoin.io:3333 -u 1ArsFNcc5fU3cfSUiNJCu6LhT8CeZgtEcC -a rx/yada

Getting about 2.5 kH/s

@pdxwebdev

Copy link
Copy Markdown
Contributor Author

We fixed our hashrate reporting issue. Our network hashrate is now properly reported.

@ajstead

ajstead commented Jul 7, 2021

Copy link
Copy Markdown

I can add my vote for this - I'm currently mining Yada, network hash rate is good, and listed on SafeTrade/

@tybiboune

Copy link
Copy Markdown

Yadacoin is nothing like a "testnet"... the hashrate is fine and it's one of the VERY RARE projects with a REAL usecase that solves a REAL problem using a very SMART way. Definitely deserves being merged.

@username1565

Copy link
Copy Markdown

Wow, rx/yada in GPU's version of xmrig? I saw this only in XmrigCC, but it's for CPU: Bendr0id#343
and in SRBMiner-Multi: https://github.com/doktor83/SRBMiner-Multi/blob/9ce7a25bbe6883d7f660de6e012c9d4077a3088d/Readme#L44
but it's for AMD.

I see this pull-request have a some unresolved conflicts,
it would be nice to fix this, to make Nvidia GPU-miner with algo rx/yada (randomYADA).

@MrSMiTHex

Copy link
Copy Markdown

This is some kind of testnet? network hashrate is below 10 kH/s. Thank you.

Yadacoin uses rx/yada for about two years. Is supported by XmrigCC and SRB. What is needed to add its support to Xmrig?

@pdxwebdev

Copy link
Copy Markdown
Contributor Author

@xmrig Very simple merge. Already being used in another fork of xmrig. Think we can move forward?

@pdxwebdev

Copy link
Copy Markdown
Contributor Author

Screenshot from 2021-11-25 00-55-04

@username1565

Copy link
Copy Markdown

Wow! I see conflicts was been resolved, in this pull-request.
@pdxwebdev , is this working on CPU only, or with GPU's too?
I see OpenCL, and CUDA is disabled, on your screen, and only CPU sending the resolved shares.

@pdxwebdev

Copy link
Copy Markdown
Contributor Author

@username1565 I have implemented everything required for CUDA and OpenCL. I'll provide a screenshot when I'm able to test. If someone else is able to test either of those in the meantime, I would appreciate it.

@Spudz76

Spudz76 commented Nov 25, 2021

Copy link
Copy Markdown
Contributor

@pdxwebdev Please rebase on dev; Also run node ./scripts/generate_cl.js and commit the resulting regenerated header files.

@Spudz76

Spudz76 commented Nov 25, 2021

Copy link
Copy Markdown
Contributor

@pdxwebdev Consult my branch pdx-addRXYADA where I have already fixed everything that collided with dev (and improved / arranged some other bits).

@Spudz76

Spudz76 commented Nov 25, 2021

Copy link
Copy Markdown
Contributor

@pdxwebdev Also check over in my xmrig-cuda/pdx-addRXYADA where I wired up maybe-working other half of the CUDA support

UPDATE: seems to work I guess, difficulty far too high for ~335H/s to catch an accept as validation...

 * POOL #1      pool.yadacoin.io:3333 algo rx/yada
 * COMMANDS     hashrate, pause, resume, results, connection
 * HTTP API     0.0.0.0:10084 
 * CUDA         11.5/11.5/6.15.2-dev
 * NVML         11.495.44/495.44 press e for health report
 * CUDA GPU     #0 84:00.0 NVIDIA GeForce GTX 1060 6GB 1759/4004 MHz smx:10 arch:61 mem:5942/6078 MB
[2021-11-25 17:20:56.169]  net      use pool pool.yadacoin.io:3333  54.172.163.172
[2021-11-25 17:20:56.169]  net      new job from pool.yadacoin.io:3333 diff 69905 algo rx/yada height 247168
[2021-11-25 17:20:56.169]  cpu      use argon2 implementation SSSE3
[2021-11-25 17:20:56.169]  randomx  init datasets algo rx/yada (24 threads) seed 4181a493b397a733...
[2021-11-25 17:20:56.170]  randomx  #0 allocated 2080 MB huge pages   0% (1 ms)
[2021-11-25 17:20:56.170]  randomx  #1 allocated 2080 MB huge pages   0% (2 ms)
[2021-11-25 17:20:56.172]  randomx  #0 allocated  256 MB huge pages   0% +JIT (1 ms)
[2021-11-25 17:20:56.172]  randomx  -- allocated 4416 MB huge pages   0% 0/2208 (3 ms)
[2021-11-25 17:21:00.293]  randomx  #0 dataset ready (4121 ms)
[2021-11-25 17:21:02.473]  randomx  #1 dataset ready (2180 ms)
[2021-11-25 17:21:02.481]  nvidia   use profile  rx  (1 thread) scratchpad 2048 KB
|  # | GPU |  BUS ID | INTENSITY | THREADS | BLOCKS | BF |  BS | MEMORY | NAME
|  0 |   0 | 84:00.0 |       640 |      32 |     20 |  0 |   0 |   1280 | NVIDIA GeForce GTX 1060 6GB
[2021-11-25 17:21:03.067]  nvidia   READY threads 1/1 (586 ms)
[2021-11-25 17:21:05.896]  net      use pool pool.yadacoin.io:3333  54.172.163.172
[2021-11-25 17:21:05.896]  net      new job from pool.yadacoin.io:3333 diff 69905 algo rx/yada height 247169
[2021-11-25 17:21:17.490]  nvidia   #0 84:00.0  85W 65C 2050/4568 MHz fan0:0%
[2021-11-25 17:21:17.490]  miner    speed 10s/60s/15m 336.0 n/a n/a H/s max 336.0 H/s
[2021-11-25 17:21:32.505]  nvidia   #0 84:00.0  86W 65C 2050/4568 MHz fan0:0%
[2021-11-25 17:21:32.505]  miner    speed 10s/60s/15m 334.9 n/a n/a H/s max 336.0 H/s
[2021-11-25 17:21:47.517]  nvidia   #0 84:00.0  86W 64C 2050/4568 MHz fan0:0%
[2021-11-25 17:21:47.517]  miner    speed 10s/60s/15m 334.5 n/a n/a H/s max 336.0 H/s
[2021-11-25 17:22:02.533]  nvidia   #0 84:00.0  81W 63C 2050/4568 MHz fan0:0%
[2021-11-25 17:22:02.533]  miner    speed 10s/60s/15m 335.2 n/a n/a H/s max 336.0 H/s
[2021-11-25 17:22:17.548]  nvidia   #0 84:00.0  57W 63C 2050/4568 MHz fan0:0%
[2021-11-25 17:22:17.548]  miner    speed 10s/60s/15m 334.7 335.0 n/a H/s max 336.0 H/s
[2021-11-25 17:22:32.563]  nvidia   #0 84:00.0  61W 63C 2050/4568 MHz fan0:0%
[2021-11-25 17:22:32.563]  miner    speed 10s/60s/15m 334.2 334.8 n/a H/s max 336.0 H/s
[2021-11-25 17:22:47.580]  nvidia   #0 84:00.0  70W 63C 2050/4568 MHz fan0:0%
[2021-11-25 17:22:47.580]  miner    speed 10s/60s/15m 335.3 334.8 n/a H/s max 336.0 H/s
[2021-11-25 17:23:02.594]  nvidia   #0 84:00.0  85W 62C 2050/4568 MHz fan0:0%

@pdxwebdev

Copy link
Copy Markdown
Contributor Author

@Spudz76 Awesome! Thanks for doing that.

It may not be getting an accepted share because the RandomX Yada configuration modifications for CUDA / OpenCL.

Do these variables need to be set elsewhere?
ArgonSalt = "RandomXYadaCoin\x03";
SuperscalarLatency = 150;
ArgonIterations = 4;

@Spudz76

Spudz76 commented Nov 26, 2021

Copy link
Copy Markdown
Contributor

I set those in the CUDA plugin side, should be valid if I happened to find a share above the diff.

I didn't have CPU enabled the combination of the two should find something but doesn't exactly prove out the CUDA (accepts would likely be just from cpu)

If there were any pools with selectable diff or autodiff it would help. GPUs just won't crank much hash with rx/anything.

Testing the OpenCL next...

@Spudz76

Spudz76 commented Nov 26, 2021

Copy link
Copy Markdown
Contributor

OpenCL seems to work; although same as CUDA the diff is too high to catch a validation accept (or reject). Diff would need to be ~9150 to see something. 69905 is good for ~2330H/s

 * POOL #1      pool.yadacoin.io:3333 algo rx/yada
 * COMMANDS     hashrate, pause, resume, results, connection
 * HTTP API     0.0.0.0:10084 
 * ADL          press e for health report
 * OPENCL       #0 AMD Accelerated Parallel Processing/OpenCL 2.1 AMD-APP (3143.9)
 * OPENCL GPU   #0 01:00.0 AMD Radeon (TM) RX 480 Graphics (Ellesmere) 1303 MHz cu:36 mem:4088/4088 MB
[2021-11-25 20:51:08.361]  net      use pool pool.yadacoin.io:3333  54.172.163.172
[2021-11-25 20:51:08.361]  net      new job from pool.yadacoin.io:3333 diff 69905 algo rx/yada height 247235
[2021-11-25 20:51:08.361]  cpu      use argon2 implementation SSSE3
[2021-11-25 20:51:08.361]  randomx  init dataset algo rx/yada (1 threads) seed 4181a493b397a733...
[2021-11-25 20:51:08.362]  randomx  allocated 2336 MB (2080+256) huge pages 0% 0/1168 +JIT (0 ms)
[2021-11-25 20:51:47.567]  randomx  dataset ready (39205 ms)
[2021-11-25 20:51:47.567]  opencl   use profile  rx  (2 threads) scratchpad 2048 KB
|  # | GPU |  BUS ID | INTENSITY | WSIZE | MEMORY | NAME
|  0 |   0 | 01:00.0 |       448 |     8 |    896 | AMD Radeon (TM) RX 480 Graphics (Ellesmere)
|  1 |   0 | 01:00.0 |       448 |     8 |    896 | AMD Radeon (TM) RX 480 Graphics (Ellesmere)
[2021-11-25 20:51:47.789]  opencl   GPU #0 compiling...
[2021-11-25 20:52:04.339]  net      use pool pool.yadacoin.io:3333  54.172.163.172
[2021-11-25 20:52:04.339]  net      new job from pool.yadacoin.io:3333 diff 69905 algo rx/yada height 247235
[2021-11-25 20:52:04.717]  net      use pool pool.yadacoin.io:3333  54.172.163.172
[2021-11-25 20:52:04.717]  net      new job from pool.yadacoin.io:3333 diff 69905 algo rx/yada height 247236
[2021-11-25 20:52:11.100]  opencl   GPU #0 compilation completed (23311 ms)
[2021-11-25 20:52:11.122]  opencl   READY threads 2/2 (23554 ms)
[2021-11-25 20:52:51.824]  opencl   #0 01:00.0  41W 35C    0RPM 769/1750MHz
[2021-11-25 20:52:53.400]  miner    speed 10s/60s/15m 324.4 88.63 n/a H/s max 343.9 H/s
[2021-11-25 20:53:31.369]  net      use pool pool.yadacoin.io:3333  54.172.163.172
[2021-11-25 20:53:31.369]  net      new job from pool.yadacoin.io:3333 diff 69905 algo rx/yada height 247236
[2021-11-25 20:53:31.886]  net      use pool pool.yadacoin.io:3333  54.172.163.172
[2021-11-25 20:53:31.886]  net      new job from pool.yadacoin.io:3333 diff 69905 algo rx/yada height 247237
[2021-11-25 20:53:57.557]  opencl   #0 01:00.0  41W 40C    0RPM 751/1750MHz
[2021-11-25 20:53:59.072]  miner    speed 10s/60s/15m 325.4 320.0 n/a H/s max 348.2 H/s

@pdxwebdev

pdxwebdev commented Nov 26, 2021

Copy link
Copy Markdown
Contributor Author

@Spudz76 Let's make the following modification.
Job.cpp, line 115
- m_target = 0x0000F00000000000ULL + strtoull(target, nullptr, 16);
+ m_target = strtoull(target, nullptr, 16);

And then use this pool: 18.214.218.185:3333
You should see shares accepted.

@Spudz76

Spudz76 commented Nov 26, 2021

Copy link
Copy Markdown
Contributor

Yes that pool is nice diff, now I can see CUDA doesn't actually work yet (compute error always, when a result should occur)

@Spudz76

Spudz76 commented Nov 26, 2021

Copy link
Copy Markdown
Contributor

Same deal with OpenCL. hmmmm. CPU does work, still. Tried all with or without that m_target patch.

@pdxwebdev

Copy link
Copy Markdown
Contributor Author

@Spudz76 I can get it working if I drop the pool diff to 1.
Screenshot from 2021-11-26 17-22-15

What appears to be happening is:

CheckHash is immediately called after a hash is calculated
https://github.com/Spudz76/xmrig/blob/master/src/net/JobResults.cpp#L138

CheckHash compares the hash to the target. It sees that the hash is above the target so it logs a compute error.
https://github.com/Spudz76/xmrig/blob/master/src/net/JobResults.cpp#L105

Shouldn't it simply throw out the hash and keep trying to find a hash that is less than the target instead of logging an error?

@Spudz76

Spudz76 commented Nov 27, 2021

Copy link
Copy Markdown
Contributor

Interesting, and what I suspected.

The GPU backend thinks it found a result above target or it wouldn't have sent it up to be rechecked. But it wasn't actually above target. Or it was and the verification is incorrect... I get almost no compute errors when the diff is gigantic, because no results are found. I think the results are valid but the verification is wrong.

@pdxwebdev

pdxwebdev commented Nov 27, 2021

Copy link
Copy Markdown
Contributor Author

@Spudz76 I agree, and I also checked the hashes being received by the pool. They are valid.

@pdxwebdev pdxwebdev force-pushed the feature/yadacoin branch 4 times, most recently from 4a5960d to 2d40ded Compare December 3, 2021 05:30
@pdxwebdev

Copy link
Copy Markdown
Contributor Author

TLDR Antminer "ASICs" were used to mine XMR for 2 years and then dumped on users for a max price they could pay, because the alternative for Bitmain was to throw them away (they were becoming unprofitable).

This contradicts direct feedback from my mining community. They are actually telling me to dump RandomX and go with GR. Clearly, it is still a concern and influences their decision on where to allocate their hashrate.

However, that is immaterial. The point is that we have followed the documented instructions to modify the RX config for our project, and it would take little effort on your part to review and merge our code.

@pdxwebdev

Copy link
Copy Markdown
Contributor Author

The reason is simple, if a coin is too small (emission per day), but with a different algorithm, it will require extra resources each month (dev fee servers etc.), and dev fee from that emission will not cover it. So yes, while it's possible to add any coin under the sun, it will be a burden (net negative) to support.

Ok, so it's about money; that's fine. However, my main contention is that our emission would be substantially higher if we were added to this repo. We've had countless miners come and go because they would have to change 50+ rigs to accommodate a new XMRig fork.

If you want an upfront "listing fee," just name your price. I'm sure we could gather the funds to get this across the finish line.

@SChernykh

Copy link
Copy Markdown
Contributor

There's no listing fee, we don't do that.

@pdxwebdev

pdxwebdev commented Jul 31, 2024

Copy link
Copy Markdown
Contributor Author

There's no listing fee, we don't do that.

Ok, how about this.

Merge us and give us 6 months. In the meantime, we can supplement any fees related to the support of our coin should it fall short of the break-even point. If we cannot demonstrate any growth in that time period, simply remove us along with KevaCoin.

@xmrig

xmrig commented Jul 31, 2024

Copy link
Copy Markdown
Owner

@pdxwebdev We considered giving you a chance. Please update this PR or make a new one without changing src/version.h and CHANGELOG.md. Now, it conflicts with the dev branch.
Thank you.

@xmrig xmrig added the randomx label Jul 31, 2024
@xmrig xmrig added this to the v6 milestone Jul 31, 2024
@pdxwebdev pdxwebdev closed this Aug 1, 2024
@pdxwebdev pdxwebdev reopened this Aug 1, 2024
@pdxwebdev pdxwebdev closed this Aug 1, 2024
@pdxwebdev pdxwebdev reopened this Aug 1, 2024
@pdxwebdev

pdxwebdev commented Aug 1, 2024

Copy link
Copy Markdown
Contributor Author

@xmrig @SChernykh The changes are in, tested, and ready for your review.

@xmrig xmrig merged commit 92ffcd3 into xmrig:dev Aug 2, 2024
@xmrig

xmrig commented Aug 3, 2024

Copy link
Copy Markdown
Owner

@pdxwebdev The pool.yadacoin.io pool sends the target as -000000000000000000000000000000000000483a53b8e4b9, which is not expected, so the target parse failed.

@pdxwebdev

pdxwebdev commented Aug 4, 2024

Copy link
Copy Markdown
Contributor Author

@pdxwebdev The pool.yadacoin.io pool sends the target as -000000000000000000000000000000000000483a53b8e4b9, which is not expected, so the target parse failed.

No problem, we just released support for xmrig 6 a few minutes ago.

Please test pool.yadacoin.io again and the target will be correct.

Screen Shot 2024-08-03 at 8 34 24 PM

@Spudz76

Spudz76 commented Aug 4, 2024

Copy link
Copy Markdown
Contributor

@pdxwebdev Any chance of poking TradeOgre again, to list this?

@pdxwebdev

Copy link
Copy Markdown
Contributor Author

@pdxwebdev Any chance of poking TradeOgre again, to list this?

I'll submit a listing request.

@SChernykh

Copy link
Copy Markdown
Contributor

@pdxwebdev pool.yadacoin.io doesn't send "algo":"rx/yada" in new jobs, so XMRig disconnects (it can't parse target because it doesn't use rx/yada parsing code with this one):

[2024-08-07 00:32:49.287] [pool.yadacoin.io:3333] received (825 bytes): "{"jsonrpc": "2.0", "method": "job", "params": {"blob": "353137323239383335353030333962366261386233313461343561653035633538313165643964323265366665626232333465363664303365623733393836343130313865313233393736313435303134383464653365613764373833353731633430663137663338376536303938303436386231303934666336653030646666336431386261386236613035303030303030000000008891143030303030303038373636666536633639336663383030303030303030303030303030303030303030303030303030303030303030303030303030303030303032613830316262663864383238636431393166393561333266316333383830633933393331303961653437393363353066396537616230386339666630623832", "job_id": "eb860938-a014-42a3-b21f-ba958e1ec15a", "target": "0xa7c5ac471b47", "seed_hash": "4181a493b397a733b083639334bc32b407915b9a82b7917ac361816f0a1f5d4d", "height": 501484, "extra_nonce": "889114"}}"

@pdxwebdev

pdxwebdev commented Aug 7, 2024

Copy link
Copy Markdown
Contributor Author

@pdxwebdev pool.yadacoin.io doesn't send "algo":"rx/yada" in new jobs, so XMRig disconnects

@SChernykh , I just released a fix.

"algo": "rx/yada" is now sent with new jobs.

Screen Shot 2024-08-07 at 1 11 12 AM

@pdxwebdev

Copy link
Copy Markdown
Contributor Author

@Spudz76 we just got listed on TradeOgre!

@xmrig

xmrig commented Aug 11, 2024

Copy link
Copy Markdown
Owner

@pdxwebdev https://github.com/xmrig/xmrig/releases/tag/v6.22.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.