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

Integrate P2Pool #3829

Merged
merged 1 commit into from
Apr 20, 2022
Merged

Integrate P2Pool #3829

merged 1 commit into from
Apr 20, 2022

Conversation

devhyper
Copy link
Contributor

Integrates P2Pool and XMRig mining into the mining panel.
Allows for custom launch arguments and side-chain selection.
Closes #3714

@selsta
Copy link
Collaborator

selsta commented Jan 21, 2022

Just had a quick look, one thing I feel a bit uneasy with is that programs that downloads XMRig from GitHub get flagged extremely aggressively by anti viruses, as that's what most mining malware does. Feather wallet integrated XMRig and it ended up so bad that the whole website got blocked by Google Chrome, so I think they had to remove it again.

@veryscience
Copy link

Just had a quick look, one thing I feel a bit uneasy with is that programs that downloads XMRig from GitHub get flagged extremely aggressively by anti viruses, as that's what most mining malware does.

In that case, would having two wallets be a better option? So a lighter wallet without Mining and a heavy one with mining.

That way if someone wants to mine but is not technical they can still go out of their way to download the heavy wallet. Then on the website for the heavy wallet have a bunch of info about having to go around a lot of firewalls.

@BigmenPixel0
Copy link
Contributor

In that case, would having two wallets be a better option? So a lighter wallet without Mining and a heavy one with mining.

It seems to me that it would be more convenient to just download the miner separately :)

@janowitz
Copy link
Contributor

Just had a quick look, one thing I feel a bit uneasy with is that programs that downloads XMRig from GitHub get flagged extremely aggressively by anti viruses, as that's what most mining malware does.

Unfortunately we should indeed focus on delisting Monero related stuff from Anti-Virus blocklists, however just recently Norton added an Ethereum Miner which is being distributed to their clients so we are kind of a competition, not an easy task.

@devhyper
Nevertheless would it be possible to keep the current miner used in the GUI for solo-mining and only give an "advanced" option to download Xmrig separately to give users an option for "optimal" mining?

@erciccione
Copy link
Collaborator

Unfortunately we should indeed focus on delisting Monero related stuff from Anti-Virus blocklists, however just recently Norton added an Ethereum Miner which is being distributed to their clients so we are kind of a competition, not an easy task.

There were some efforts in past (#1747), but Antivirus companies are not really interested and most of the time won't even answer when you signal them a false detection. Now that they are factually distributing miners everything it's even harder.

Nevertheless would it be possible to keep the current miner used in the GUI for solo-mining and only give an "advanced" option to download Xmrig separately to give users an option for "optimal" mining?

There were talks in past about adding plugins to the GUI. Maybe that discussion can be revived? It would allow people to create any kind of plugin to plug into the GUI, including mining on p2pool. A plugin-based approach would allow any kind of features to be added to the gui on a opt-in base, like donating to CCS proposals and whatnot.

@devhyper
Copy link
Contributor Author

Nevertheless would it be possible to keep the current miner used in the GUI for solo-mining and only give an "advanced" option to download Xmrig separately to give users an option for "optimal" mining?

This is probably the best way forward.

@SChernykh
Copy link
Contributor

Good solution from a technical point of view - each program does what it does best and the GUI is just a GUI for all that. But as mentioned above, I'm not sure about consequences of using xmrig. You probably need to make sure first that xmrig and p2pool are downloaded in the folder that's added to antivirus exceptions. p2pool binaries also trigger some antiviruses because they have RandomX mining code.

@SChernykh
Copy link
Contributor

SChernykh commented Jan 21, 2022

Feather wallet integrated XMRig and it ended up so bad that the whole website got blocked by Google Chrome, so I think they had to remove it again.

@selsta @devhyper What if I add something like --start-mining command line to p2pool so it would mine itself? It has all required code for it already. It wouldn't be as fast as xmrig of course, but it will help avoid many potential problems with AV companies and Google Chrome.

@devhyper
Copy link
Contributor Author

What if I add something like --start-mining command line to p2pool so it would mine itself? It has all required code for it already. It wouldn't be as fast as xmrig of course, but it will help avoid many potential problems with AV companies and Google Chrome.

Interesting, that would work.

@rating89us
Copy link
Contributor

Monero GUI fails to start daemon in simple mode:

D "starting monerod C:/msys/home/User/xmrig/monero-gui/build/release/bin/monerod.exe"
D With command line arguments ("--zmq-pub", "tcp://127.0.0.1:18083", "--disable-dns-checkpoints", "--enable-dns-blocklist", "--enable-dns-blocklist", "--out-peers", "16", "--bootstrap-daemon-address", "auto", "--no-sync", "--check-updates", "disabled", "--non-interactive", "--max-concurrency", "6")
Failed to parse arguments: option '--enable-dns-blocklist' cannot be specified more than once

Copy link
Collaborator

@selsta selsta left a comment

Choose a reason for hiding this comment

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

Please drop QtNetwork* and use epee instead, see e.g. #2799

We had issues with QtNetwork, but I don't remember the details currently.

I assume the current code does not support macOS. I would explicitly disable this feature for all OS apart from Linux and Windows.

pages/settings/SettingsNode.qml Outdated Show resolved Hide resolved
@lfaoro
Copy link

lfaoro commented Jan 23, 2022

I compiled on macOS the latest commits and I cannot see the p2pool mining options anymore:
image

Last time I tried I used to see this:
Screen Shot 2022-01-22 at 3 01 36 AM

Noticed in last commit message: disable xmrig/p2pool on non-linux/non-windows platforms

May I ask why? Are you having issues w/ p2pool on macOS?

@SChernykh
Copy link
Contributor

SChernykh commented Jan 23, 2022

@devhyper I've added the mining support to p2pool in the latest p2pool code: https://github.com/SChernykh/p2pool/commits/master
You can try it. I need to do my own testing (not GUI related) before I can release v1.6.

--start-mining N Start built-in miner using N threads (any value between 1 and 64)

@selsta
Copy link
Collaborator

selsta commented Jan 23, 2022

@lfaoro macOS wasn't tested yet, it can be reenabled if it works


@SChernykh If we could just integrate p2pool with its own mining support that would be ideal. One less dependency and also less issues with anti viruses.

@SChernykh
Copy link
Contributor

If we could just integrate p2pool with its own mining support that would be ideal. One less dependency and also less issues with anti viruses.

Yes, the next p2pool release will have mining support.

@lfaoro
Copy link

lfaoro commented Jan 23, 2022

@selsta please have it re-enabled, I'll help with the testing.

@devhyper
Copy link
Contributor Author

@SChernykh --stratum-api does not appear to work with --start-mining. Whenever I start it with --start-mining, /local/stats does not exist, whereas without it is created. Is there any other way to get the hashrate?

@SChernykh
Copy link
Contributor

SChernykh commented Jan 24, 2022

@devhyper SChernykh/p2pool@1e4e4bd
Miner statistics will be stored in local/miner, example:

{"current_hashrate":1212,"total_hashes":79088,"time_running":71.170,"shares_found":2,"threads":4}

@devhyper devhyper changed the title Integrate P2Pool and XMRig Integrate P2Pool Jan 25, 2022
src/p2pool/P2PoolManager.cpp Outdated Show resolved Hide resolved
pages/Mining.qml Outdated Show resolved Hide resolved
pages/Mining.qml Outdated Show resolved Hide resolved
@selsta
Copy link
Collaborator

selsta commented Jan 25, 2022

Now that XMRig is removed I think it should be fine to add 0411826 again, what do you think? @devhyper

@devhyper
Copy link
Contributor Author

Now that XMRig is removed I think it should be fine to add 0411826 again, what do you think? @devhyper

The only problem would be if p2pool triggers AV:
SChernykh/p2pool#93
Not sure if downloading it would cause issues.

@SChernykh
Copy link
Contributor

Now that XMRig is removed I think it should be fine to add 0411826 again, what do you think? @devhyper

The only problem would be if p2pool triggers AV: SChernykh/p2pool#93 Not sure if downloading it would cause issues.

Well, it can't trigger AV worse than the official binaries already do:
https://www.virustotal.com/gui/file/a956d0c3ab77ebfc1d6229b77d68b739661b564d9a4115e5a549c3af146d6034
https://www.virustotal.com/gui/file/baa971820f65159246f2862497a693ad7c345faa7407d0c3bede53d8eaa1d40f

@selsta
Copy link
Collaborator

selsta commented Jan 25, 2022

Yes, I only worried about XMRig. p2pool should be detected on the same level as the GUI.

@devhyper
Copy link
Contributor Author

Well, it can't trigger AV worse than the official binaries already do:
https://www.virustotal.com/gui/file/a956d0c3ab77ebfc1d6229b77d68b739661b564d9a4115e5a549c3af146d6034
https://www.virustotal.com/gui/file/baa971820f65159246f2862497a693ad7c345faa7407d0c3bede53d8eaa1d40f

Yes, I only worried about XMRig. p2pool should be detected on the same level as the GUI.

It should be fine then.

@SChernykh
Copy link
Contributor

@devhyper I've released p2pool v1.6 with the embedded miner. You can now finalize this PR.

Copy link
Collaborator

@selsta selsta left a comment

Choose a reason for hiding this comment

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

Only thing remaining now is fixing Windows compilation, copied the log here:

2022-01-26T22:11:01.8059980Z                  from D:/a/monero-gui/monero-gui/src/p2pool/P2PoolManager.cpp:32:
2022-01-26T22:11:01.8319818Z D:/a/_temp/msys64/mingw64/include/boost/asio/detail/socket_types.hpp:24:4: error: #error WinSock.h has already been included
2022-01-26T22:11:01.9970297Z    24 | #  error WinSock.h has already been included
2022-01-26T22:11:02.0209258Z       |    ^~~~~
2022-01-26T22:11:02.1899751Z In file included from D:/a/_temp/msys64/mingw64/include/boost/asio/detail/socket_types.hpp:33,
2022-01-26T22:11:02.2149812Z                  from D:/a/_temp/msys64/mingw64/include/boost/asio/detail/win_tss_ptr.hpp:23,
2022-01-26T22:11:02.3809881Z                  from D:/a/_temp/msys64/mingw64/include/boost/asio/detail/tss_ptr.hpp:25,
2022-01-26T22:11:02.4059663Z                  from D:/a/_temp/msys64/mingw64/include/boost/asio/detail/call_stack.hpp:20,
2022-01-26T22:11:02.4136177Z                  from D:/a/_temp/msys64/mingw64/include/boost/asio/detail/thread_context.hpp:20,
2022-01-26T22:11:02.4137561Z                  from D:/a/_temp/msys64/mingw64/include/boost/asio/detail/recycling_allocator.hpp:20,
2022-01-26T22:11:02.4138566Z                  from D:/a/_temp/msys64/mingw64/include/boost/asio/detail/handler_alloc_helpers.hpp:21,
2022-01-26T22:11:02.4148181Z                  from D:/a/_temp/msys64/mingw64/include/boost/asio/detail/bind_handler.hpp:20,
2022-01-26T22:11:02.4458596Z                  from D:/a/_temp/msys64/mingw64/include/boost/asio/detail/wrapped_handler.hpp:18,
2022-01-26T22:11:02.4465722Z                  from D:/a/_temp/msys64/mingw64/include/boost/asio/io_context.hpp:24,
2022-01-26T22:11:02.4466724Z                  from D:/a/_temp/msys64/mingw64/include/boost/asio/io_service.hpp:18,
2022-01-26T22:11:02.4494411Z                  from D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_helper.h:37,
2022-01-26T22:11:02.4512337Z                  from D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/http_client.h:40,
2022-01-26T22:11:02.4989581Z                  from D:/a/monero-gui/monero-gui/src/p2pool/P2PoolManager.cpp:32:
2022-01-26T22:11:02.4991248Z D:/a/_temp/msys64/mingw64/x86_64-w64-mingw32/include/winsock2.h:15:2: warning: #warning Please include winsock2.h before windows.h [-Wcpp]
2022-01-26T22:11:02.5071189Z    15 | #warning Please include winsock2.h before windows.h
2022-01-26T22:11:02.5097388Z       |  ^~~~~~~
2022-01-26T22:11:02.5772434Z [ 97%] �[32mBuilding CXX object src/CMakeFiles/monero-wallet-gui.dir/qt/KeysFiles.cpp.obj�[0m
2022-01-26T22:11:06.7771753Z [ 97%] �[32mBuilding CXX object src/CMakeFiles/monero-wallet-gui.dir/qt/MoneroSettings.cpp.obj�[0m
2022-01-26T22:11:10.2402229Z In file included from D:/a/_temp/msys64/mingw64/x86_64-w64-mingw32/include/oleidl.h:7,
2022-01-26T22:11:10.2405339Z                  from D:/a/_temp/msys64/mingw64/x86_64-w64-mingw32/include/ole2.h:38,
2022-01-26T22:11:10.2459625Z                  from D:/a/_temp/msys64/mingw64/x86_64-w64-mingw32/include/wtypes.h:13,
2022-01-26T22:11:10.2482362Z                  from D:/a/_temp/msys64/mingw64/x86_64-w64-mingw32/include/winscard.h:10,
2022-01-26T22:11:10.2484464Z                  from D:/a/_temp/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:97,
2022-01-26T22:11:10.2491055Z                  from D:/a/monero-gui/monero-gui/monero/src/common/util.h:44,
2022-01-26T22:11:10.2503081Z                  from D:/a/monero-gui/monero-gui/src/p2pool/P2PoolManager.cpp:30:
2022-01-26T22:11:10.2512381Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:224:24: error: expected identifier before 'struct'
2022-01-26T22:11:10.2526107Z   224 |                 struct interface
2022-01-26T22:11:10.2527142Z       |                        ^~~~~~~~~
2022-01-26T22:11:10.2949921Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:226:34: error: expected class-name before 'struct'
2022-01-26T22:11:10.3968465Z   226 |                         virtual ~interface() {};
2022-01-26T22:11:10.3970083Z       |                                  ^~~~~~~~~
2022-01-26T22:11:10.3970912Z In file included from D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_helper.h:49,
2022-01-26T22:11:10.3971739Z                  from D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/http_client.h:40,
2022-01-26T22:11:10.3973052Z                  from D:/a/monero-gui/monero-gui/src/p2pool/P2PoolManager.cpp:32:
2022-01-26T22:11:10.3974324Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:228:59: error: expected identifier before '&' token
2022-01-26T22:11:10.3975422Z   228 |                         virtual bool equal(const interface&) const = 0;
2022-01-26T22:11:10.3976153Z       |                                                           ^
2022-01-26T22:11:10.3977492Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:229:58: error: expected identifier before '&' token
2022-01-26T22:11:10.3978319Z   229 |                         virtual bool less(const interface&) const = 0;
2022-01-26T22:11:10.3978998Z       |                                                          ^
2022-01-26T22:11:10.3979792Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:230:66: error: expected identifier before '&' token
2022-01-26T22:11:10.3980582Z   230 |                         virtual bool is_same_host(const interface&) const = 0;
2022-01-26T22:11:10.3981277Z       |                                                                  ^
2022-01-26T22:11:10.3982087Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:224:17: error: multiple types in one declaration
2022-01-26T22:11:10.3983077Z   224 |                 struct interface
2022-01-26T22:11:10.3983623Z       |                 ^~~~~~
2022-01-26T22:11:10.3984342Z In file included from D:/a/_temp/msys64/mingw64/x86_64-w64-mingw32/include/oleidl.h:7,
2022-01-26T22:11:10.3985121Z                  from D:/a/_temp/msys64/mingw64/x86_64-w64-mingw32/include/ole2.h:38,
2022-01-26T22:11:10.3986037Z                  from D:/a/_temp/msys64/mingw64/x86_64-w64-mingw32/include/wtypes.h:13,
2022-01-26T22:11:10.3986886Z                  from D:/a/_temp/msys64/mingw64/x86_64-w64-mingw32/include/winscard.h:10,
2022-01-26T22:11:10.3987704Z                  from D:/a/_temp/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:97,
2022-01-26T22:11:10.3988512Z                  from D:/a/monero-gui/monero-gui/monero/src/common/util.h:44,
2022-01-26T22:11:10.3989332Z                  from D:/a/monero-gui/monero-gui/src/p2pool/P2PoolManager.cpp:30:
2022-01-26T22:11:10.3990433Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:243:47: error: expected class-name before 'struct'
2022-01-26T22:11:10.3991147Z   243 |                 struct implementation final : interface
2022-01-26T22:11:10.3991773Z       |                                               ^~~~~~~~~
2022-01-26T22:11:10.3992592Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:243:47: error: expected '{' before 'struct'
2022-01-26T22:11:10.3993433Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:243:47: error: template class without a name
2022-01-26T22:11:10.3994402Z In file included from D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_helper.h:49,
2022-01-26T22:11:10.3995194Z                  from D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/http_client.h:40,
2022-01-26T22:11:10.3995785Z                  from D:/a/monero-gui/monero-gui/src/p2pool/P2PoolManager.cpp:32:
2022-01-26T22:11:10.3996742Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:243:17: error: multiple types in one declaration
2022-01-26T22:11:10.3997307Z   243 |                 struct implementation final : interface
2022-01-26T22:11:10.3997678Z       |                 ^~~~~~
2022-01-26T22:11:10.3998198Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:273:42: error: template argument 1 is invalid
2022-01-26T22:11:10.3998791Z   273 |                 std::shared_ptr<interface> self;
2022-01-26T22:11:10.3999213Z       |                                          ^
2022-01-26T22:11:10.3999640Z In file included from D:/a/_temp/msys64/mingw64/x86_64-w64-mingw32/include/oleidl.h:7,
2022-01-26T22:11:10.4000749Z                  from D:/a/_temp/msys64/mingw64/x86_64-w64-mingw32/include/ole2.h:38,
2022-01-26T22:11:10.4001670Z                  from D:/a/_temp/msys64/mingw64/x86_64-w64-mingw32/include/wtypes.h:13,
2022-01-26T22:11:10.4002752Z                  from D:/a/_temp/msys64/mingw64/x86_64-w64-mingw32/include/winscard.h:10,
2022-01-26T22:11:10.4003374Z                  from D:/a/_temp/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:97,
2022-01-26T22:11:10.4004038Z                  from D:/a/monero-gui/monero-gui/monero/src/common/util.h:44,
2022-01-26T22:11:10.4004674Z                  from D:/a/monero-gui/monero-gui/src/p2pool/P2PoolManager.cpp:30:
2022-01-26T22:11:10.4612516Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h: In member function 'Type& epee::net_utils::network_address::as_mutable() const':
2022-01-26T22:11:10.4616263Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:280:42: error: expected unqualified-id before 'struct'
2022-01-26T22:11:10.4619396Z   280 |                         network_address::interface* const self_ = self.get(); // avoid clang warning in typeid
2022-01-26T22:11:10.4934513Z       |                                          ^~~~~~~~~
2022-01-26T22:11:10.4948336Z In file included from D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_helper.h:49,
2022-01-26T22:11:10.4949503Z                  from D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/http_client.h:40,
2022-01-26T22:11:10.4960336Z                  from D:/a/monero-gui/monero-gui/src/p2pool/P2PoolManager.cpp:32:
2022-01-26T22:11:10.4979595Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:281:30: error: 'self_' was not declared in this scope; did you mean 'self'?
2022-01-26T22:11:10.4996182Z   281 |                         if (!self_ || typeid(implementation<Type_>) != typeid(*self_))
2022-01-26T22:11:10.5292949Z       |                              ^~~~~
2022-01-26T22:11:10.5294415Z       |                              self
2022-01-26T22:11:10.5300921Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:283:68: error: 'self_' was not declared in this scope; did you mean 'self'?
2022-01-26T22:11:10.5303844Z   283 |                         return static_cast<implementation<Type_>*>(self_)->value;
2022-01-26T22:11:10.5315822Z       |                                                                    ^~~~~
2022-01-26T22:11:10.5329861Z       |                                                                    self
2022-01-26T22:11:10.5332152Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h: In constructor 'epee::net_utils::network_address::network_address()':
2022-01-26T22:11:10.5334670Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:303:42: error: cannot convert 'std::nullptr_t' to 'int' in initialization
2022-01-26T22:11:10.5343480Z   303 |                 network_address() : self(nullptr) {}
2022-01-26T22:11:10.5346570Z       |                                          ^~~~~~~
2022-01-26T22:11:10.5353127Z       |                                          |
2022-01-26T22:11:10.5356057Z       |                                          std::nullptr_t
2022-01-26T22:11:10.5378748Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h: In member function 'std::string epee::net_utils::network_address::str() const':
2022-01-26T22:11:10.5391322Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:310:61: error: base operand of '->' is not a pointer
2022-01-26T22:11:10.5404938Z   310 |                 std::string str() const { return self ? self->str() : "<none>"; }
2022-01-26T22:11:10.5481371Z       |                                                             ^~
2022-01-26T22:11:10.5493087Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h: In member function 'std::string epee::net_utils::network_address::host_str() const':
2022-01-26T22:11:10.5509888Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:311:66: error: base operand of '->' is not a pointer
2022-01-26T22:11:10.5592035Z   311 |                 std::string host_str() const { return self ? self->host_str() : "<none>"; }
2022-01-26T22:11:10.5659484Z       |                                                                  ^~
2022-01-26T22:11:10.5663176Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h: In member function 'bool epee::net_utils::network_address::is_loopback() const':
2022-01-26T22:11:10.6178001Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:312:62: error: base operand of '->' is not a pointer
2022-01-26T22:11:10.6179023Z   312 |                 bool is_loopback() const { return self ? self->is_loopback() : false; }
2022-01-26T22:11:10.6179507Z       |                                                              ^~
2022-01-26T22:11:10.6180165Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h: In member function 'bool epee::net_utils::network_address::is_local() const':
2022-01-26T22:11:10.6180771Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:313:59: error: base operand of '->' is not a pointer
2022-01-26T22:11:10.6181300Z   313 |                 bool is_local() const { return self ? self->is_local() : false; }
2022-01-26T22:11:10.6181692Z       |                                                           ^~
2022-01-26T22:11:10.6182614Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h: In member function 'epee::net_utils::address_type epee::net_utils::network_address::get_type_id() const':
2022-01-26T22:11:10.6183413Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:314:70: error: base operand of '->' is not a pointer
2022-01-26T22:11:10.6184186Z   314 |                 address_type get_type_id() const { return self ? self->get_type_id() : address_type::invalid; }
2022-01-26T22:11:10.6184614Z       |                                                                      ^~
2022-01-26T22:11:10.6185142Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h: In member function 'epee::net_utils::zone epee::net_utils::network_address::get_zone() const':
2022-01-26T22:11:10.6186148Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:315:59: error: base operand of '->' is not a pointer
2022-01-26T22:11:10.6186815Z   315 |                 zone get_zone() const { return self ? self->get_zone() : zone::invalid; }
2022-01-26T22:11:10.6187178Z       |                                                           ^~
2022-01-26T22:11:10.6187658Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h: In member function 'bool epee::net_utils::network_address::is_blockable() const':
2022-01-26T22:11:10.6188190Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:316:63: error: base operand of '->' is not a pointer
2022-01-26T22:11:10.6188674Z   316 |                 bool is_blockable() const { return self ? self->is_blockable() : false; }
2022-01-26T22:11:10.6189038Z       |                                                               ^~
2022-01-26T22:11:10.6189725Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h: In member function 'uint16_t epee::net_utils::network_address::port() const':
2022-01-26T22:11:10.6190293Z D:/a/monero-gui/monero-gui/monero/contrib/epee/include/net/net_utils_base.h:317:64: error: base operand of '->' is not a pointer
2022-01-26T22:11:10.6190780Z   317 |                 std::uint16_t port() const { return self ? self->port() : 0; }
2022-01-26T22:11:10.6191322Z       |                                                                ^~
2022-01-26T22:11:10.6191757Z [ 97%] �[32mBuilding CXX object src/CMakeFiles/monero-wallet-gui.dir/qt/TailsOS.cpp.obj�[0m
2022-01-26T22:11:14.7704567Z make[3]: *** [src/CMakeFiles/monero-wallet-gui.dir/build.make:727: src/CMakeFiles/monero-wallet-gui.dir/p2pool/P2PoolManager.cpp.obj] Error 1
2022-01-26T22:11:14.7705321Z make[3]: *** Waiting for unfinished jobs....
2022-01-26T22:11:14.7706198Z [ 98%] �[32mBuilding CXX object src/CMakeFiles/monero-wallet-gui.dir/qt/downloader.cpp.obj�[0m
2022-01-26T22:11:47.1763005Z make[3]: Leaving directory '/d/a/monero-gui/monero-gui/build/release'
2022-01-26T22:11:47.1778647Z make[2]: *** [CMakeFiles/Makefile2:4458: src/CMakeFiles/monero-wallet-gui.dir/all] Error 2
2022-01-26T22:11:47.1779176Z make[2]: Leaving directory '/d/a/monero-gui/monero-gui/build/release'
2022-01-26T22:11:47.1798154Z make[1]: *** [Makefile:136: all] Error 2
2022-01-26T22:11:47.1800046Z make[1]: Leaving directory '/d/a/monero-gui/monero-gui/build/release'
2022-01-26T22:11:47.1845841Z make: *** [Makefile:70: release-win64] Error 2
2022-01-26T22:11:47.2429651Z ##[error]Process completed with exit code 2.
2022-01-26T22:11:47.3076855Z Cleaning up orphan processes

@devhyper
Copy link
Contributor Author

devhyper commented Mar 8, 2022

@selsta This should fix it, I will test later with a vm.

Edit: Just tested it on macOS, it works.

@selsta
Copy link
Collaborator

selsta commented Mar 9, 2022

Works great now :) Will try to go through the code one more time tomorrow and do some more testing but I think this is basically merge ready.

@iratekalypso
Copy link

I tested the Windows one myself this morning. Working great for me, really excited for this to get merged!

Copy link
Collaborator

@selsta selsta left a comment

Choose a reason for hiding this comment

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

I didn't find any issues, but one improvement for macOS:

Can you move p2pool.log, p2pool.cache, p2pool_peers.txt to the same location as the p2pool binary (monero-wallet-gui.app/Contents/MacOS/)? Otherwise it pollutes the /Application folder.

Also left some other minor comments.

Edit: Alternatively there is also logger.logFilePath for putting log files. Both would work.

pages/Mining.qml Outdated Show resolved Hide resolved
pages/Mining.qml Outdated Show resolved Hide resolved
pages/Mining.qml Outdated Show resolved Hide resolved
pages/Mining.qml Outdated Show resolved Hide resolved
@devhyper
Copy link
Contributor Author

Can you move p2pool.log, p2pool.cache, p2pool_peers.txt to the same location as the p2pool binary (monero-wallet-gui.app/Contents/MacOS/)? Otherwise it pollutes the /Application folder.

@selsta I'm not sure how to do this, p2pool doesn't have an option to specify the location for these files, and if I move them manually they end up being recreated.

@SChernykh
Copy link
Contributor

@devhyper I think you just need to specify working directory in QProcess::execute when you start p2pool.

@devhyper
Copy link
Contributor Author

devhyper commented Mar 23, 2022

@SChernykh That still doesn't seem to work, the files still go to the directory of the monero-gui-wallet.app file, rather than inside.

Edit: Nevermind, setWorkingDir wasn't being applied because I was using the overloaded function of startDetached, which doesn't respect setWorkingDir. Everything works now.

@devhyper
Copy link
Contributor Author

@SChernykh Thanks for the help!

@selsta All your suggestions have been added.

@selsta
Copy link
Collaborator

selsta commented Mar 23, 2022

@devhyper perfect, once you squash your commits I can approve it

Copy link
Collaborator

@selsta selsta left a comment

Choose a reason for hiding this comment

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

Thank you, great PR.

The only thing that I didn't test yet if macOS will complain about any permission issues once we codesign + notarize the app bundle, but we will see that with the next release. I assume it should work fine.

@nahuhh
Copy link

nahuhh commented Mar 26, 2022

Late to the party, and not sure if already a feature.

But, does this do any RAM checks?
I think its a good idea to check for 3-6gb RAM and default to --no-randomx, 6-8gb for --light-mode, >8gb for default to fast randomx.

With a setting dropdown in GUI for "RAM allocation" 256mb/XXX/2gb or "randomx modes (RAM)" none (256mb), light (XXX), fast (2gb). User can override here.

Ill admit that I havent tested due to lack of hardware to test on. Just adding my 2c

@SChernykh
Copy link
Contributor

@nahuhh No. --no-randomx can't mine at all, --light-mode is too slow for mining to make any sense.

@nahuhh
Copy link

nahuhh commented Mar 26, 2022

@nahuhh No. --no-randomx can't mine at all, --light-mode is too slow for mining to make any sense.

Ive never been able to run p2 in fast mode. But I also dont use the integrated miner.

But apologies, I had missed selsta's comment.

I personally don't want any code that interacts with XMRig

And

and if someone wants to use XMRig

and p2 in norx mode

they will figure it out themselves.

My concern for a RAM check? (Or a warning?), was choking up devices under 4gb when starting p2pool. (I had to use norx/light to get p2 to start / to not run out of ram on startup.. but my pc is likely 2010 era..)

@6uHt1G
Copy link

6uHt1G commented Mar 30, 2022

Is there a need for testers on MacOS? I have an Intel based MacBook Pro on Monterey 12.2 I would be interested in testing on.

@selsta
Copy link
Collaborator

selsta commented Mar 30, 2022

@6uHt1G I did test on macOS but more testing is always welcome.

@SChernykh
Copy link
Contributor

@devhyper P2Pool v1.9 released.

@devhyper
Copy link
Contributor Author

devhyper commented Apr 1, 2022

I somehow messed up a hash again, sorry.

Copy link
Collaborator

@selsta selsta left a comment

Choose a reason for hiding this comment

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

I checked the length of the hashes before approving but somehow overlooked it... thanks for fixing

@plowsof
Copy link
Contributor

plowsof commented May 28, 2023

There is currently a ~7xmr bounty to add some more detailed stats pages https://bounties.monero.social/posts/68/5-220m-statistical-mining-dashboard-for-p2pool-in-monero-gui-wallet (example image provided)

@SChernykh
Copy link
Contributor

SChernykh commented May 28, 2023

@devhyper Are you going to pickup the stats page bounty after you're done with i2p? Right now, the GUI only shows Mining with P2Pool, at XXX H/s status line which is clearly not enough. I could try to do this myself, but I have 0 experience with Qt.

@devhyper
Copy link
Contributor Author

@plowsof @SChernykh Yeah, I can do the stats page after i2p.

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.

Plans to integrate P2Pool at some point?