Botspot / pi-apps

Raspberry Pi App Store for Open Source Projects
GNU General Public License v3.0
2.02k stars 205 forks source link

Possible crypto mining app #1182

Closed GYKgamer closed 2 years ago

GYKgamer commented 2 years ago

I found this tutorial on youtube on day and thought it'd be useful. Now there are some steps he kind of exaggerates (I think) like installing a raspberry pi lite os (i guess its for better performance) tut is here: https://www.youtube.com/watch?v=hHtGN_JzoP8&t=0s

This isn't a gui app and only uses terminal

This app is not installable using sudo apt install

I'm guessing this won't be added as you won't mine much but it'd be a fun hobby and prices may go up.

GYKgamer commented 2 years ago

any reply?

Crilum commented 2 years ago

I think this is a cool app, I followed the tutorial and it worked just fine (NOTE: only for 64-bit), but the one problem I ran into is this: I could not find a Monero Wallet that could run on RPi Linux (exept for Feather, and I couldn't build it), but after some searching, I did find an online Wallet called wallet.mymonero.com, and if this app gets added, I think a note should be added that a Wallet is required, and if you need one you can access form a Raspberry Pi, try that one.

I'll make some scripts for this app, even if it doesn't get put on, cause I think I'll use it.

Crilum commented 2 years ago

Here it is:

XMRig.zip

I haven't tested it, because I can't use apt right now, but I think it should work just fine.

GYKgamer commented 2 years ago

Thanks very much for the help and for better instructions for xmrig also here's it in action image

Crilum commented 2 years ago

Just in case you didn't know, you can use the Import App button in Pi-Apps Settings to import this app with the link, and then you can just click install in Pi-Apps.

GYKgamer commented 2 years ago

Oh yea I forgot about it

GYKgamer commented 2 years ago

Ill try an add it later

GYKgamer commented 2 years ago

How do I import it?

GYKgamer commented 2 years ago

nvm

GYKgamer commented 2 years ago

Crilum, After using your code I did find many errors which I'm trying to fix

GYKgamer commented 2 years ago

This worked a few times for me but I will need you to double-check XMRig.zip

Crilum commented 2 years ago

@GYKgamer What errors did you find?

Crilum commented 2 years ago

Your zip doesn't work, can you upload a new one?

GYKgamer commented 2 years ago

XMRig.zip heres the zip file again also my errors are image

Crilum commented 2 years ago

Oh, yeah.. You need to import the app to Pi-Apps. All of those errors are because the install script uses Pi-Apps functions, which are sourced when running the install via Pi-Apps.

To import XMRig to Pi-Apps:

  1. Open Pi-Apps Settings and click on Import App.
  2. Copy and paste https://github.com/Botspot/pi-apps/files/7583102/XMRig.zip into the text box and click Next.
  3. A window should open telling you that XMRig has been imported.
  4. You can now find XMRig in Pi-Apps, and install it like any other app.
GYKgamer commented 2 years ago

I tried it but it never showed up

GYKgamer commented 2 years ago

Wait I might think why

GYKgamer commented 2 years ago

I think i dont have 64 bit installed

Crilum commented 2 years ago

Yeah, you have to be on a 64-bit OS, or at least have the arm_64bit=1 flag in your config.txt.

GYKgamer commented 2 years ago

anyways I got it working but on the last bit I get an error image

Crilum commented 2 years ago

I think I fixed that:

XMRig.zip

Crilum commented 2 years ago

You should just be able to run it like this anyway:

~/xmrig/build/xmrig [args and stuff]
GYKgamer commented 2 years ago

yep got it working

GYKgamer commented 2 years ago

image

Crilum commented 2 years ago

@Botspot What do you think about adding this app?

GYKgamer commented 2 years ago

looks like this might not get added

Crilum commented 2 years ago

Yeah, I don't think it would be super useful to most GUI users...

Botspot commented 2 years ago

Let's give this some priority. I just saw a thread on the raspberry pi forums and was surprised by how many people were interested in getting xmrig up and running on their raspberry pi computers. https://forums.raspberrypi.com/viewtopic.php?t=305983 This could probably be accomplished with a chroot. Does anyone want to take ownership of the project?

Crilum commented 2 years ago

Why do we need a chroot? It runs just fine on native RPiOS. Also, I'd be willing to take ownership, if @GYKgamer is ok with it.

Botspot commented 2 years ago

Why do we need a chroot? It runs just fine on native RPiOS. Also, I'd be willing to take ownership, if @GYKgamer is ok with it.

It does? I thought that xmrig could only run (well) on arm64. Even the tutorial I linked to uses raspbian-nspwan-64.

Crilum commented 2 years ago

oh, yeah.. That's right, it does only run on arm64. :man_facepalming:

GYKgamer commented 2 years ago

How do I give ownership? @Crilum

Crilum commented 2 years ago

@GYKgamer You don't have to do anything, I'll just be the person developing the scripts.. I'll credit you as coming up with the idea to add XMRig to Pi-Apps.

Crilum commented 2 years ago

@Botspot what do you think about using qemu to emulate arm64 for armhf? Well, it might be slower than using a chroot..

Botspot commented 2 years ago

@Botspot what do you think about using qemu to emulate arm64 for armhf?

I don't think QEMU could do that. (emulate 64-bit stuff on a "32-bit" CPU) As I see it, this app should:

Crilum commented 2 years ago

XMRig's official website https://xmrig.com isn't working right now, should I put the website or the github repo as the website?

Crilum commented 2 years ago

Well, I've got XMRig running on my 32 bit RPiOS, with the help of a chroot:

XMRig works ``` root@AwePi:/home/pi/xmrig/build# ./xmrig -o gulf.moneroocean.stream:10032 -u hidden -t 6 * ABOUT XMRig/6.16.2 gcc/10.2.1 * LIBS libuv/1.40.0 OpenSSL/1.1.1k hwloc/2.4.1 * HUGE PAGES supported * 1GB PAGES unavailable * CPU ARMv8 (0) 64-bit -AES L2:0.0 MB L3:0.0 MB 0C/2T NUMA:1 * MEMORY 1.4/3.7 GB (37%) * DONATE 1% * POOL #1 gulf.moneroocean.stream:10032 algo auto * COMMANDS hashrate, pause, resume, results, connection * OPENCL disabled * CUDA disabled [2022-01-14 17:38:40.009] net use pool gulf.moneroocean.stream:10032 18.210.126.40 [2022-01-14 17:38:40.018] net new job from gulf.moneroocean.stream:10032 diff 32000 algo rx/0 height 2537146 (1 tx) [2022-01-14 17:38:40.018] cpu use argon2 implementation default [2022-01-14 17:38:41.221] randomx init dataset algo rx/0 (2 threads) seed 839456829504f296... [2022-01-14 17:38:41.222] randomx allocated 2336 MB (2080+256) huge pages 0% 0/1168 +JIT (0 ms) [2022-01-14 17:39:04.045] net new job from gulf.moneroocean.stream:10032 diff 32000 algo rx/0 height 2537147 (6 tx) [2022-01-14 17:39:37.610] net new job from gulf.moneroocean.stream:10032 diff 32000 algo rx/0 height 2537148 (11 tx) [2022-01-14 17:39:53.223] randomx dataset ready (72001 ms) [2022-01-14 17:39:53.224] cpu use profile * (6 threads) scratchpad 2048 KB [2022-01-14 17:39:53.238] cpu READY threads 6/6 (6) huge pages 0% 0/6 memory 12288 KB (14 ms) [2022-01-14 17:40:53.479] miner speed 10s/60s/15m 45.94 n/a n/a H/s max 63.99 H/s [2022-01-14 17:41:57.540] net new job from gulf.moneroocean.stream:10032 diff 20097 algo rx/0 height 2537148 (11 tx) [2022-01-14 17:42:00.103] miner speed 10s/60s/15m 59.32 53.78 n/a H/s max 63.99 H/s [2022-01-14 17:42:51.138] net new job from gulf.moneroocean.stream:10032 diff 9607 algo rx/0 height 2537148 (11 tx) [2022-01-14 17:42:59.690] net new job from gulf.moneroocean.stream:10032 diff 9607 algo rx/0 height 2537149 (51 tx) [2022-01-14 17:43:00.359] miner speed 10s/60s/15m 66.45 53.42 n/a H/s max 69.58 H/s [2022-01-14 17:43:51.085] net new job from gulf.moneroocean.stream:10032 diff 3706 algo rx/0 height 2537149 (51 tx) [2022-01-14 17:44:00.507] miner speed 10s/60s/15m 61.24 67.48 n/a H/s max 73.50 H/s [2022-01-14 17:44:18.447] cpu accepted (1/0) diff 3706 (289 ms) [2022-01-14 17:44:37.226] net new job from gulf.moneroocean.stream:10032 diff 3706 algo rx/0 height 2537150 (14 tx) [2022-01-14 17:44:42.015] net new job from gulf.moneroocean.stream:10032 diff 3706 algo rx/0 height 2537151 (1 tx) [2022-01-14 17:44:50.944] net new job from gulf.moneroocean.stream:10032 diff 299 algo rx/0 height 2537151 (1 tx) [2022-01-14 17:45:00.672] miner speed 10s/60s/15m 57.72 61.53 n/a H/s max 73.50 H/s [2022-01-14 17:45:02.391] cpu accepted (2/0) diff 299 (466 ms) [2022-01-14 17:45:04.239] cpu accepted (3/0) diff 299 (461 ms) [2022-01-14 17:45:07.311] cpu accepted (4/0) diff 299 (299 ms) [2022-01-14 17:45:22.602] cpu accepted (5/0) diff 299 (298 ms) [2022-01-14 17:45:24.886] cpu accepted (6/0) diff 299 (303 ms) [2022-01-14 17:45:28.103] cpu accepted (7/0) diff 299 (470 ms) [2022-01-14 17:45:30.943] cpu accepted (8/0) diff 299 (296 ms) [2022-01-14 17:45:34.251] cpu accepted (9/0) diff 299 (311 ms) [2022-01-14 17:45:42.595] cpu accepted (10/0) diff 299 (306 ms) [2022-01-14 17:45:49.932] cpu accepted (11/0) diff 299 (292 ms) [2022-01-14 17:45:50.916] net new job from gulf.moneroocean.stream:10032 diff 466 algo rx/0 height 2537151 (1 tx) [2022-01-14 17:46:00.930] miner speed 10s/60s/15m 61.63 55.96 n/a H/s max 73.50 H/s [2022-01-14 17:46:09.158] cpu accepted (12/0) diff 466 (292 ms) [2022-01-14 17:46:09.516] cpu accepted (13/0) diff 466 (286 ms) [2022-01-14 17:46:10.919] cpu accepted (14/0) diff 466 (474 ms) [2022-01-14 17:46:23.195] cpu accepted (15/0) diff 466 (500 ms) [2022-01-14 17:46:25.893] cpu accepted (16/0) diff 466 (290 ms) [2022-01-14 17:46:25.955] cpu accepted (17/0) diff 466 (321 ms) ```

The script is almost finished, but there are a couple bugs I'm working out. I'll make a PR when I think it's (close to) done.

Here is the current app:
XMRig.zip

Botspot commented 2 years ago

Great work! Below, I've outlined a few ways in which the script can be improved.

In the if statement to check for the 64-bit kernel:

Other observations:

GYKgamer commented 2 years ago

@GYKgamer You don't have to do anything, I'll just be the person developing the scripts.. I'll credit you as coming up with the idea to add XMRig to Pi-Apps.

Then allowed 👍

Crilum commented 2 years ago

@Botspot @GYKgamer Check out #1379.

Botspot commented 2 years ago

Closing this issue because PR #1379 is open.