GNU bug report logs - #54068
[PATCH] Add xmrig and p2pool

Previous Next

Package: guix-patches;

Reported by: Justin Veilleux <terramorpha <at> cock.li>

Date: Sat, 19 Feb 2022 23:14:01 UTC

Severity: normal

Tags: moreinfo, patch

Done: Guillaume Le Vaillant <glv <at> posteo.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54068 in the body.
You can then email your comments to 54068 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#54068; Package guix-patches. (Sat, 19 Feb 2022 23:14:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Justin Veilleux <terramorpha <at> cock.li>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 19 Feb 2022 23:14:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Justin Veilleux <terramorpha <at> cock.li>
To: guix-patches <at> gnu.org
Subject: [PATCH] Add xmrig and p2pool
Date: Sat, 19 Feb 2022 18:12:44 -0500
[Message part 1 (text/plain, inline)]
Here are two patches to add, respectively, the xmrig monero mining 
software and p2pool, a decentralized mining pool.

Cheers
[0002-gnu-Add-p2pool.patch (text/x-patch, attachment)]
[0001-gnu-Add-xmrig.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#54068; Package guix-patches. (Sun, 20 Feb 2022 10:15:02 GMT) Full text and rfc822 format available.

Message #8 received at 54068 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Justin Veilleux <terramorpha <at> cock.li>, 54068 <at> debbugs.gnu.org
Subject: Re: [bug#54068] [PATCH] Add xmrig and p2pool
Date: Sun, 20 Feb 2022 11:14:28 +0100
[Message part 1 (text/plain, inline)]
Justin Veilleux schreef op za 19-02-2022 om 18:12 [-0500]:
> +      #~(modify-phases %standard-phases
> +          (replace 'install
> +            ;; There is no 'install' target, we must install xmrig
> manually
> +            (lambda* (#:key outputs #:allow-other-keys)
> +              (use-modules (guix build utils))

'use-modules' currently only behaves well on the top-level, I recommend
moving it into #:modules (see e.g. glibc).

> +              (install-file "xmrig" (string-append (assoc-ref
> outputs "out") "/bin"))

This can be simplified a little by replacing (assoc-ref outputs "out")
--> #$output.

> +              #t)))))

Phases don't have to return #t anymore, this can be removed.

> +    (home-page "https://xmrig.com/")
> +    (synopsis "XMR miner")

I think ‘Monero miner’ would be more descriptive.

> +    (description
> +     "XMRig is a high performance, open source, cross platform
> +RandomX, KawPow, CryptoNight, AstroBWT and GhostRider unified
> CPU/GPU miner
> +and RandomX benchmark.")

This notes many positive qualities of XMRig, but ignores the negative
quantities.  Perhaps you could add something about high energy
consumption?  (See recent thread ‘Excessively energy-consuming software
considered malware?’ on guix-devel (not yet on lists.gnu.org
apparently).)

(I'm assuming here the situation is the same as for Bitcoin, but
I don't actually know if this is the case.)

> +    (license license:gpl3)))

Looking at
<https://github.com/xmrig/xmrig/blob/master/src/App_win.cpp>, it
appears to be gpl3+.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#54068; Package guix-patches. (Sun, 20 Feb 2022 10:18:02 GMT) Full text and rfc822 format available.

Message #11 received at 54068 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Justin Veilleux <terramorpha <at> cock.li>, 54068 <at> debbugs.gnu.org
Subject: Re: [bug#54068] [PATCH] Add xmrig and p2pool
Date: Sun, 20 Feb 2022 11:17:09 +0100
[Message part 1 (text/plain, inline)]
Justin Veilleux schreef op za 19-02-2022 om 18:12 [-0500]:
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri
> +        (git-reference
> +         (url "https://github.com/xmrig/xmrig")
> +         (commit (string-append "v" version))))
> +       (sha256 (base32
> "0mp7q14pfbdjvjai6nw6psqakr1hnzkkn4c51iw578866n2lmxw5"))))

I'm seeing some bundling in 'src/3rdparty'.  Also, bin/WinRing0
contains a binary.  Could things be unbundled and the binary be
removed?

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#54068; Package guix-patches. (Tue, 05 Apr 2022 14:06:02 GMT) Full text and rfc822 format available.

Message #14 received at 54068 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Justin Veilleux <terramorpha <at> cock.li>
Cc: 54068 <at> debbugs.gnu.org, Maxime Devos <maximedevos <at> telenet.be>
Subject: Re: bug#54068: [PATCH] Add xmrig and p2pool
Date: Tue, 05 Apr 2022 16:05:33 +0200
Hi Justin,

Did you have a chance to look at Maxime’s feedback?  It would be great
if you could address it and send updated patches.

  https://issues.guix.gnu.org/54068

TIA,
Ludo’.




Added tag(s) moreinfo. Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 05 Apr 2022 14:06:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#54068; Package guix-patches. (Tue, 05 Apr 2022 18:59:02 GMT) Full text and rfc822 format available.

Message #19 received at 54068 <at> debbugs.gnu.org (full text, mbox):

From: Justin Veilleux <terramorpha <at> cock.li>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 54068 <at> debbugs.gnu.org, Maxime Devos <maximedevos <at> telenet.be>
Subject: Re: bug#54068: [PATCH] Add xmrig and p2pool
Date: Tue, 5 Apr 2022 14:57:53 -0400
Hi.

Most issues Maxime raised I can solve easily. The bundling part, 
however, I am unfamiliar with.

Regarding the high consumption of energy, I think, having read thread, I 
think everyone would agree
that a warning in the description would be beneficial.

Finally, since I submitted the patch, I discovered that xmrig, in it's 
default state, will donate 1% of it's runtime to the developpers' pool. 
I don't know what is guix's policy on this matter, but I will assume we 
want it disabled.

I'm going to fix the issues raised and send an updated patch.

Cheers,
Justin.






Information forwarded to guix-patches <at> gnu.org:
bug#54068; Package guix-patches. (Wed, 06 Apr 2022 00:52:02 GMT) Full text and rfc822 format available.

Message #22 received at 54068 <at> debbugs.gnu.org (full text, mbox):

From: Justin Veilleux <terramorpha <at> cock.li>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 54068 <at> debbugs.gnu.org, Maxime Devos <maximedevos <at> telenet.be>
Subject: Re: bug#54068: [PATCH] Add xmrig and p2pool
Date: Tue, 5 Apr 2022 20:51:12 -0400
[Message part 1 (text/plain, inline)]
This is the updated patch for xmrig, but I still have to figure out how 
to package some of p2pool's c++ dependencies.

Cheers.

[0001-gnu-Add-xmrig.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#54068; Package guix-patches. (Wed, 06 Apr 2022 10:30:02 GMT) Full text and rfc822 format available.

Message #25 received at 54068 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Justin Veilleux <terramorpha <at> cock.li>, Ludovic
 Courtès <ludo <at> gnu.org>
Cc: 54068 <at> debbugs.gnu.org
Subject: Re: bug#54068: [PATCH] Add xmrig and p2pool
Date: Wed, 06 Apr 2022 12:29:47 +0200
[Message part 1 (text/plain, inline)]
Justin Veilleux schreef op di 05-04-2022 om 14:57 [-0400]:
> Finally, since I submitted the patch, I discovered that xmrig, in it's 
> default state, will donate 1% of it's runtime to the developpers' pool. 
> I don't know what is guix's policy on this matter, but I will assume we 
> want it disabled.

IMO, involuntary donations are not donations, but theft.  Or possibly
taxes, but the xmrig developers are not a state (and if they were, you
might not even be part of that state), so not that either.

Maybe as a warning (to people that might install xmrig on non-guix
systems or without a package manager) you could add something like

  Warning: upstream always confiscates a percentage of the results. 
  This anti-functionality has been neutralised in Guix, but possibly
  not in all other distributions.

and move 'disable-default-donation' to a snippet such that
"guix build --source xmrig" returns a ‘safe’ xmrig.

and maybe

  Warning: This software, because of it's nature, has high energy
  consumption, so by using it, you accelerate global warming. 
  Additionally, the energy expenses might be more than the
  cryptocurrency gained by mining.

Greetings
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#54068; Package guix-patches. (Wed, 06 Apr 2022 15:35:01 GMT) Full text and rfc822 format available.

Message #28 received at 54068 <at> debbugs.gnu.org (full text, mbox):

From: Justin Veilleux <terramorpha <at> cock.li>
To: Maxime Devos <maximedevos <at> telenet.be>, Ludovic Courtès
 <ludo <at> gnu.org>
Cc: 54068 <at> debbugs.gnu.org
Subject: Re: bug#54068: [PATCH] Add xmrig and p2pool
Date: Wed, 6 Apr 2022 11:33:59 -0400
[Message part 1 (text/plain, inline)]
Hi, I moved the neutralisation of donation to the source's snippet and 
updated the description to reflect the cost of using xmrig.


Cheers, Justin.
[0001-gnu-Add-xmrig.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#54068; Package guix-patches. (Wed, 06 Apr 2022 18:25:02 GMT) Full text and rfc822 format available.

Message #31 received at 54068 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Justin Veilleux <terramorpha <at> cock.li>, Ludovic
 Courtès <ludo <at> gnu.org>
Cc: 54068 <at> debbugs.gnu.org
Subject: Re: bug#54068: [PATCH] Add xmrig and p2pool
Date: Wed, 06 Apr 2022 20:24:47 +0200
[Message part 1 (text/plain, inline)]
Justin Veilleux schreef op wo 06-04-2022 om 11:33 [-0400]:
> +       (snippet
> +        (with-imported-modules '((guix build utils))
> +          #~(begin
> +              (use-modules (guix build utils))
> +              (substitute* "src/donate.h"
> +                (("constexpr const int kDefaultDonateLevel = 1;")
> +                 "constexpr const int kDefaultDonateLevel = 0;")
> +                (("constexpr const int kMinimumDonateLevel = 1;")
> +                 "constexpr const int kMinimumDonateLevel =
> 0;")))))))

This can be done a bit simpler:

(origin [...]
  (modules '((guix build utils)))
  (snippet #~(substitute* "src/donate.h" [...])))

not 100% sure if that works ...

Greetings,
Maxime.

p.s. Do you know any other distros packaging xmrig & p2pool?  Maybe
they can be informed as well ...
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#54068; Package guix-patches. (Wed, 06 Apr 2022 19:48:02 GMT) Full text and rfc822 format available.

Message #34 received at 54068 <at> debbugs.gnu.org (full text, mbox):

From: Justin Veilleux <terramorpha <at> cock.li>
To: Maxime Devos <maximedevos <at> telenet.be>, Ludovic Courtès
 <ludo <at> gnu.org>
Cc: 54068 <at> debbugs.gnu.org
Subject: Re: bug#54068: [PATCH] Add xmrig and p2pool
Date: Wed, 6 Apr 2022 15:46:54 -0400
[Message part 1 (text/plain, inline)]
You are right, this is simpler

Regarding the other distros and the automatic/minimum donation, I found 
that most major distributions*
patch out the minimum donation level(but keep the default of 1%) and few 
leave it unchanged.

*: https://repology.org/project/xmrig/versions
[0001-gnu-Add-xmrig.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#54068; Package guix-patches. (Wed, 06 Apr 2022 19:54:01 GMT) Full text and rfc822 format available.

Message #37 received at 54068 <at> debbugs.gnu.org (full text, mbox):

From: Justin Veilleux <terramorpha <at> cock.li>
To: Maxime Devos <maximedevos <at> telenet.be>, Ludovic Courtès
 <ludo <at> gnu.org>
Cc: 54068 <at> debbugs.gnu.org
Subject: Re: bug#54068: [PATCH] Add xmrig and p2pool
Date: Wed, 6 Apr 2022 15:53:37 -0400
Also, I forgot...

P2pool does not have this behaviour. In fact, xmrig and p2pool are only 
related insofar as one needs the former to use the latter.

I have not yet managed to extract the bundled dependencies of p2pool as 
explicit inputs. In particular, robin-hood-hashing is a c++ library 
which doesn't have a package structure and can't be `install`ed.


Cheers.





Reply sent to Guillaume Le Vaillant <glv <at> posteo.net>:
You have taken responsibility. (Fri, 12 Aug 2022 15:49:02 GMT) Full text and rfc822 format available.

Notification sent to Justin Veilleux <terramorpha <at> cock.li>:
bug acknowledged by developer. (Fri, 12 Aug 2022 15:49:02 GMT) Full text and rfc822 format available.

Message #42 received at 54068-done <at> debbugs.gnu.org (full text, mbox):

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Justin Veilleux <terramorpha <at> cock.li>
Cc: 54068-done <at> debbugs.gnu.org
Subject: Re: [bug#54068] [PATCH] Add xmrig and p2pool
Date: Fri, 12 Aug 2022 15:45:21 +0000
[Message part 1 (text/plain, inline)]
Hi Justin,

I rebased/modified/updated your patches, and pushed them as
ed4a3f17bf73d6a7e1d282924233498db79f7038 and
fc408acd61022d1db366bd1cec9ba1537773dfa1.
Thanks.
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 10 Sep 2022 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 227 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.