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

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

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from

Conversation

pdxwebdev
Copy link

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

@xmrig
Copy link
Owner

xmrig commented May 27, 2021

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

@pdxwebdev
Copy link
Author

pdxwebdev commented May 27, 2021

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
Author

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

@ajstead
Copy link

ajstead commented Jul 7, 2021

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

@tybiboune
Copy link

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

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

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
Author

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

@pdxwebdev
Copy link
Author

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

@username1565
Copy link

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

Spudz76 commented Nov 25, 2021

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

@Spudz76
Copy link
Contributor

Spudz76 commented Nov 25, 2021

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

@Spudz76
Copy link
Contributor

Spudz76 commented Nov 25, 2021

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

Spudz76 commented Nov 26, 2021

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

Spudz76 commented Nov 26, 2021

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

pdxwebdev commented Nov 26, 2021

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

Spudz76 commented Nov 26, 2021

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

Spudz76 commented Nov 26, 2021

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

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

Spudz76 commented Nov 27, 2021

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

pdxwebdev commented Nov 27, 2021

@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
Author

@xmrig, @Spudz76 changes are now merged into this branch (thank you @Spudz76). I also executed node ./scripts/generate_cl.js and committed the resulting headers.

Is there anything else that needs to be done? Thanks!

@username1565
Copy link

username1565 commented Dec 3, 2021

@pdxwebdev , @xmrig , @ajstead , @tybiboune , @MrSMiTHex, @Spudz76
Hello, guys!
Somebody know how to setup rx/yada xmrig on HiveOS?
I just go into my account on https://the.hiveos.farm and try to create Flight Sheet for YadaCoin (YDA),
then select xmrig, but I do not see this algo, there:
image

Maybe need to add this version of miner, as custom-miner?
like in this guide: https://hiveos.farm/getting_started-start_custom_miner/
I did try to use .tar.gz archive here from latest release: https://github.com/xmrig/xmrig/releases/tag/v6.16.2
this one https://github.com/xmrig/xmrig/archive/refs/tags/v6.16.2.tar.gz
but this is not working, and this ask for some config-files, like this:
https://github.com/MoneroOcean/hiveos/tree/main/mo_xmrig

Maybe there is possible to create another branch with that HiveOS config-files, or something else.

@pdxwebdev pdxwebdev force-pushed the feature/yadacoin branch 4 times, most recently from 67f2e95 to 3f0c5a9 Compare December 10, 2021 21:47
@username1565
Copy link

Is there possible, according donate-level, to pay donations in YadaCoins, and do mining that donations, using algo rx/yada, just to do not let auto-switch the miner on another algo (when donate mining starting), and do not switch that algo, while overclock-settings applied for rx/yada? I saw earlier GPU driver-crashes, when donate mining starting with another algo, from target algo, when GPU is overclocked for this target algo.

@eiaeea
Copy link

eiaeea commented Dec 13, 2021

@xmrig, @Spudz76 "changes are now merged into this branch (thank you @Spudz76). I also executed node ./scripts/generate_cl.js and committed the resulting headers.

Is there anything else that needs to be done? Thanks!"

What more is needed to add rx/yada support to Xmrig??

@Aurok85
Copy link

Aurok85 commented Jan 2, 2022

Please add support for Yada to xmrig! I love xmrig and want to use your miner for every coin I choose to mine, it is THE miner for CPU mining.. period!

@pdxwebdev
Copy link
Author

pdxwebdev commented Feb 22, 2022

Hello @Spudz76 , @xmrig,

We did some great work to improve this PR before the holidays and I continue to keep this PR up-to-date with the dev branch.

What is still left outstanding to merge this PR?

@pdxwebdev
Copy link
Author

pdxwebdev commented Apr 26, 2022

Checking in again @xmrig.

At the time of writing this:

https://miningpoolstats.stream/yadacoin

It would be fantastic if we could get added to this repository or at least know the minimum metrics we need to hit.

Thanks, Matt

@pdxwebdev
Copy link
Author

Hello @Spudz76, @xmrig

I see you are referring most projects to implement their algo on 3rd party forks. This makes things for smaller project quite difficult to make their project minable on the various mining platforms that only track the xmrig main branch.

Without inclusion into the xmrig main branch, it is very limiting for our project.

Is there something we can do to be included in the xmrig main repo?

Thanks

@Spudz76
Copy link
Contributor

Spudz76 commented Oct 11, 2022

I approve the code obviously, it's been in my own dev tree for a long time now.

@pdxwebdev
Copy link
Author

I approve the code obviously, it's been in my own dev tree for a long time now.

Thank you @Spudz76 . I'm wondering who / what else is required for merge?

@Spudz76
Copy link
Contributor

Spudz76 commented Oct 19, 2022

Usually, @SChernykh comes through and refuses to merge at least.

@pdxwebdev
Copy link
Author

@SChernykh I'm willing to make an XMR donation if we can merge this PR. Let me know what you think is fair.

@Rakni1988
Copy link

Can you add rx/yada to xmrig, many things changed from last request :)

@pdxwebdev
Copy link
Author

pdxwebdev commented Nov 15, 2023

Howdy @xmrig @SChernykh @Spudz76

It sure would be swell of y'all to add our lil' ol' project to this here repo. 🤠

@pdxwebdev
Copy link
Author

In all seriousness @xmrig @SChernykh @Spudz76

We have one patent issued and one pending for our crypto innovations. Not being added to this main repo for xmrig is hindering our ability to reach a broader audience of miners on a variety of mining platforms.

If there is anything at all I can do to move this forward, I will do it and I'll have the support of several others from our community ready and willing to put in any amount of effort.

Please give us your sincere consideration.

@TomPelsz
Copy link

TomPelsz commented Jan 5, 2024

@xmrig @SChernykh @Spudz76
Yada coin community would like to have it on main branch of xmrig! This blockchain is gaining more and more traction and @pdxwebdev is super dedicated dev!

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