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

xmrig-proxy: init at 2.5.2 #38669

Merged
merged 2 commits into from Apr 10, 2018
Merged

xmrig-proxy: init at 2.5.2 #38669

merged 2 commits into from Apr 10, 2018

Conversation

aij
Copy link
Contributor

@aij aij commented Apr 10, 2018

Motivation for this change

xmrig-proxy can proxy a bunch of crypnonight miners, reducing connection count and/or making them easier to manage.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@aij
Copy link
Contributor Author

aij commented Apr 10, 2018

buildInputs = [ libuv libmicrohttpd libuuid ];

postPatch = ''
substituteInPlace src/donate.h --replace "kDonateLevel = 2;" "kDonateLevel = ${toString donateLevel};"
Copy link
Member

Choose a reason for hiding this comment

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

What does this value mean? what means a level of 2 and what means zero?

Copy link
Member

Choose a reason for hiding this comment

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

Should be added as a comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's the default percentage of hashpower to donate to the xmrig developer. Comment added.

It is commented fairly well upstream: https://github.com/xmrig/xmrig-proxy/blob/694446bb72b1b31fba6d46f6d8ee13f2f08407c0/src/donate.h

I based this on 5d86c50, assuming the same reasoning applies here as well.

I have fewer than 256 workers, so this doesn't actually affect me, but I dislike pickpocket-style "donations" on principle.

@Mic92
Copy link
Member

Mic92 commented Apr 10, 2018

$ xmrig-proxy
unable to open /nix/store/w8rv7q5kcgv3cxrrbdm1xw27rs1zlycb-xmrig-proxy-2.5.2/bin/config.json: no such file or directory
No pool URL supplied. Exiting.

Should be maybe changed to just config.json since the nix store is readonly.

@Mic92
Copy link
Member

Mic92 commented Apr 10, 2018

This one could be replaced by "config.json".
https://github.com/xmrig/xmrig-proxy/blob/master/src/Platform.cpp#L32

@Mic92
Copy link
Member

Mic92 commented Apr 10, 2018

Are you sure you want to use this software?
xmrig/xmrig-proxy@8a7d564#diff-52cb419324e9c23a2e2c5a269e0e70fcL39
I hope it does not read untrusted stuff from the network.

@Mic92 Mic92 merged commit 7decb08 into NixOS:master Apr 10, 2018
@aij
Copy link
Contributor Author

aij commented Apr 11, 2018

@Mic92 I only tested with a configuration. It does seem weird for it to look for a config in bindir by default. Perhaps that makes more sense on Windows?

It does read from the network... 😟

@Mic92
Copy link
Member

Mic92 commented Apr 11, 2018

The rest of program does not look as scary as this part.

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

Successfully merging this pull request may close these issues.

None yet

3 participants