Compare commits

..
Author SHA1 Message Date
lza_menace 87d7609022 adding extra inputs for wownerod mining 2023-04-03 09:26:05 -07:00
dsc 7c4f99c85d update submodule, bump version 2023-03-24 23:28:53 +02:00
11 changed files with 66 additions and 14 deletions
+7 -4
View File
@@ -4,10 +4,10 @@ project(wowlet)
message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
set(THREADS_PREFER_PTHREAD_FLAG ON)
set(VERSION_MAJOR "3")
set(VERSION_MINOR "2")
set(VERSION_MAJOR "4")
set(VERSION_MINOR "0")
set(VERSION_REVISION "0")
set(VERSION "beta-6")
set(VERSION "beta-7")
option(FETCH_DEPS "Download dependencies if they are not found" ON)
option(OPENVR "Include OpenVR support")
@@ -25,7 +25,7 @@ include(FindCcache)
include(CheckIncludeFile)
include(CheckSymbolExists)
set(WOWNERO_HEAD "cf3bba3aee00d9d3e3f902f66f3710d820d3bdfb")
set(WOWNERO_HEAD "a21819cc22587e16af00e2c3d8f70156c11310a0")
set(BUILD_GUI_DEPS ON)
set(BUILD_64 ON CACHE BOOL "Build 64-bit binaries")
set(INSTALL_VENDORED_LIBUNBOUND ${STATIC})
@@ -116,6 +116,9 @@ message(STATUS "libsodium: libraries at ${SODIUM_LIBRARY}")
# HIDApi
set(HIDAPI_FOUND OFF)
# Unbound
find_package(Unbound REQUIRED)
# QrEncode
find_package(QREncode REQUIRED)
+20
View File
@@ -280,6 +280,26 @@ RUN wget https://www.openssl.org/source/openssl-1.1.1i.tar.gz && \
make -j$THREADS install_sw && \
rm -rf $(pwd)
RUN wget https://github.com/libexpat/libexpat/releases/download/R_2_4_8/expat-2.4.8.tar.bz2 && \
echo "a247a7f6bbb21cf2ca81ea4cbb916bfb9717ca523631675f99b3d4a5678dcd16 expat-2.4.8.tar.bz2" | sha256sum -c && \
tar -xf expat-2.4.8.tar.bz2 && \
rm expat-2.4.8.tar.bz2 && \
cd expat-2.4.8 && \
./configure --enable-static --disable-shared --prefix=/usr/local/expat/ && \
make -j$THREADS && \
make -j$THREADS install && \
rm -rf $(pwd)
RUN wget https://www.nlnetlabs.nl/downloads/unbound/unbound-1.16.2.tar.gz && \
echo "2e32f283820c24c51ca1dd8afecfdb747c7385a137abe865c99db4b257403581 unbound-1.16.2.tar.gz" | sha256sum -c && \
tar -xzf unbound-1.16.2.tar.gz && \
rm unbound-1.16.2.tar.gz && \
cd unbound-1.16.2 && \
./configure --disable-shared --enable-static --without-pyunbound --with-libexpat=/usr/local/expat/ --with-ssl=/usr/local/openssl/ --with-libevent=no --without-pythonmodule --disable-flto --with-pthreads --with-libunbound-only --with-pic && \
make -j$THREADS && \
make -j$THREADS install && \
rm -rf $(pwd)
RUN rm /usr/lib/x86_64-linux-gnu/libX11.a && \
rm /usr/lib/x86_64-linux-gnu/libXext.a && \
rm /usr/lib/x86_64-linux-gnu/libX11-xcb.a && \
+3 -3
View File
@@ -16,9 +16,9 @@ RUN apt update && \
RUN update-alternatives --set x86_64-w64-mingw32-g++ $(which x86_64-w64-mingw32-g++-posix) && \
update-alternatives --set x86_64-w64-mingw32-gcc $(which x86_64-w64-mingw32-gcc-posix)
RUN git clone -b v0.17.1.9 --depth 1 https://github.com/monero-project/monero && \
RUN git clone -b v0.18.2.0 --depth 1 https://github.com/monero-project/monero && \
cd monero && \
git reset --hard 8fef32e45c80aec41f25be9d1d8fb75adc883c64 && \
git reset --hard 99be9a044f3854f339548e2d99c539c18d7b1b01 && \
cp -a contrib/depends / && \
cd .. && \
rm -rf monero
@@ -186,4 +186,4 @@ RUN git clone https://git.wownero.com/wowlet/wownero-seed.git && \
rm -rf $(pwd)
RUN git config --global --add safe.directory /wowlet
RUN git config --global --add safe.directory /wowlet/wownero
RUN git config --global --add safe.directory /wowlet/wownero
+1
View File
@@ -246,6 +246,7 @@ target_link_libraries(wowlet PUBLIC
${OPENSSL_LIBRARIES}
${CMAKE_DL_LIBS}
${Iconv_LIBRARIES}
/usr/local/lib/libunbound.a
${EXTRA_LIBRARIES})
# Link Qt libraries
+1
View File
@@ -32,6 +32,7 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
{Config::walletPath,{QS("walletPath"), ""}},
{Config::xmrigPath,{QS("xmrigPath"), ""}},
{Config::wownerodPath, {QS("wownerodPath"), ""}},
{Config::extraArgs, {QS("extraArgs"), ""}},
{Config::nodes,{QS("nodes"), "{}"}},
{Config::websocketEnabled,{QS("websocketEnabled"), true}},
{Config::nodeSource,{QS("nodeSource"), 0}},
+1
View File
@@ -34,6 +34,7 @@ public:
walletPath,
xmrigPath,
wownerodPath,
extraArgs,
nodes,
websocketEnabled,
nodeSource,
+5 -2
View File
@@ -9,7 +9,7 @@
#include "utils/xmrig.h"
#include "mainwindow.h"
XmRig::XmRig(const QString &configDir, QObject *parent) :
XmRig::XmRig(const QString &configDir, QObject *parent, QString extraArgs) :
QObject(parent),
m_statusTimer(new QTimer(this))
{
@@ -38,7 +38,7 @@ void XmRig::stop() {
m_statusTimer->stop();
}
bool XmRig::start(const QString &path, int threads) {
bool XmRig::start(const QString &path, int threads, QString extraArgs) {
m_ctx = MainWindow::getContext();
auto state = m_process.state();
@@ -72,6 +72,9 @@ bool XmRig::start(const QString &path, int threads) {
arguments << "--start-mining" << m_ctx->currentWallet->address(0, 0);
arguments << "--spendkey" << privateSpendKey;
// additional arguments to wownerod a user can define
arguments << extraArgs;
QString cmd = QString("%1 %2").arg(path, arguments.join(" "));
cmd = cmd.replace(privateSpendKey, "[redacted]");
emit output(cmd.toUtf8());
+2 -2
View File
@@ -27,10 +27,10 @@ class XmRig : public QObject
Q_OBJECT
public:
explicit XmRig(const QString &configDir, QObject *parent = nullptr);
explicit XmRig(const QString &configDir, QObject *parent = nullptr, QString extraArgs = nullptr);
void prepare();
bool start(const QString &path, int threads);
bool start(const QString &path, int threads, QString extraArgs);
void stop();
DaemonMiningState daemonMiningState = DaemonMiningState::idle;
+6 -1
View File
@@ -63,6 +63,10 @@ XMRigWidget::XMRigWidget(AppContext *ctx, QWidget *parent) :
if(!path.isEmpty())
ui->lineEdit_path->setText(path);
auto extraArgs = config()->get(Config::extraArgs).toString();
if(!extraArgs.isEmpty())
ui->extraArgs->setText(extraArgs);
connect(ui->lineEdit_path, &QLineEdit::textChanged, [=] {
config()->set(Config::wownerodPath, ui->lineEdit_path->text().trimmed());
});
@@ -208,7 +212,8 @@ void XMRigWidget::onClearClicked() {
void XMRigWidget::onStartClicked() {
auto binPath = config()->get(Config::wownerodPath).toString();
if(!m_ctx->XMRig->start(binPath, m_threads)) return;
auto extraArgs = config()->get(Config::extraArgs).toString();
if(!m_ctx->XMRig->start(binPath, m_threads, extraArgs)) return;
ui->btn_start->setEnabled(false);
ui->btn_stop->setEnabled(true);
+19 -1
View File
@@ -227,13 +227,31 @@
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="extraArgs_label">
<property name="text">
<string>Extra Args</string>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLineEdit" name="extraArgs">
<property name="placeholderText">
<string></string>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_threads">
<property name="text">
<string>CPU threads</string>
</property>
</widget>
</item>
<item row="2" column="1">
<item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QSlider" name="threadSlider">
+1 -1
Submodule wownero updated: cf3bba3aee...a21819cc22