mirror of
https://github.com/xmrig/xmrig.git
synced 2026-04-29 09:02:34 -04:00
Compare commits
15 Commits
v6.21.1
...
5552e1f864
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5552e1f864 | ||
|
|
3beccae136 | ||
|
|
ef9bf2aa8c | ||
|
|
42f645fa3b | ||
|
|
1fb5be6c1d | ||
|
|
08c43b7e58 | ||
|
|
7b016fd9ce | ||
|
|
688d4f5ee1 | ||
|
|
64913e3163 | ||
|
|
48fa095e3e | ||
|
|
c9b9ef51ee | ||
|
|
dd782c7001 | ||
|
|
b49197f808 | ||
|
|
f9c4c57216 | ||
|
|
a5b8b85967 |
3
.github/ISSUE_TEMPLATE/bug_report.md
vendored
3
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -17,6 +17,9 @@ Steps to reproduce the behavior.
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Required data**
|
||||
- XMRig version
|
||||
- Either the exact link to a release you downloaded from https://github.com/xmrig/xmrig/releases
|
||||
- Or the exact command lines that you used to build XMRig
|
||||
- Miner log as text or screenshot
|
||||
- Config file or command line (without wallets)
|
||||
- OS: [e.g. Windows]
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
|
||||
# v2.8.0
|
||||
- **[#753](https://github.com/xmrig/xmrig/issues/753) Added new algorithm [CryptoNight variant 2](https://github.com/xmrig/xmrig/issues/753) for Monero fork, thanks [@SChernykh](https://github.com/SChernykh).**
|
||||
- Added global and per thread option `"asm"` and and command line equivalent.
|
||||
- Added global and per thread option `"asm"` and command line equivalent.
|
||||
- **[#758](https://github.com/xmrig/xmrig/issues/758) Added SSL/TLS support for secure connections to pools.**
|
||||
- Added per pool options `"tls"` and `"tls-fingerprint"` and command line equivalents.
|
||||
- [#767](https://github.com/xmrig/xmrig/issues/767) Added config autosave feature, same with GPU miners.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash -e
|
||||
#!/bin/sh -e
|
||||
|
||||
HWLOC_VERSION_MAJOR="2"
|
||||
HWLOC_VERSION_MINOR="9"
|
||||
HWLOC_VERSION_MINOR="10"
|
||||
HWLOC_VERSION_PATCH="0"
|
||||
|
||||
HWLOC_VERSION="${HWLOC_VERSION_MAJOR}.${HWLOC_VERSION_MINOR}.${HWLOC_VERSION_PATCH}"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash -e
|
||||
#!/bin/sh -e
|
||||
|
||||
HWLOC_VERSION="1.11.13"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash -e
|
||||
#!/bin/sh -e
|
||||
|
||||
LIBRESSL_VERSION="3.5.2"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash -e
|
||||
#!/bin/sh -e
|
||||
|
||||
OPENSSL_VERSION="1.1.1s"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#!/bin/sh -e
|
||||
|
||||
OPENSSL_VERSION="3.0.7"
|
||||
OPENSSL_VERSION="3.0.13"
|
||||
|
||||
mkdir -p deps
|
||||
mkdir -p deps/include
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#!/bin/sh -e
|
||||
|
||||
UV_VERSION="1.44.2"
|
||||
UV_VERSION="1.48.0"
|
||||
|
||||
mkdir -p deps
|
||||
mkdir -p deps/include
|
||||
@@ -8,10 +8,10 @@ mkdir -p deps/lib
|
||||
|
||||
mkdir -p build && cd build
|
||||
|
||||
wget https://github.com/libuv/libuv/archive/v${UV_VERSION}.tar.gz -O v${UV_VERSION}.tar.gz
|
||||
wget https://dist.libuv.org/dist/v${UV_VERSION}/libuv-v${UV_VERSION}.tar.gz -O v${UV_VERSION}.tar.gz
|
||||
tar -xzf v${UV_VERSION}.tar.gz
|
||||
|
||||
cd libuv-${UV_VERSION}
|
||||
cd libuv-v${UV_VERSION}
|
||||
sh autogen.sh
|
||||
./configure --disable-shared
|
||||
make -j$(nproc || sysctl -n hw.ncpu || sysctl -n hw.logicalcpu)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash -e
|
||||
#!/bin/sh -e
|
||||
|
||||
./build.uv.sh
|
||||
./build.hwloc.sh
|
||||
./build.openssl.sh
|
||||
./build.openssl3.sh
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash -e
|
||||
#!/bin/sh -e
|
||||
|
||||
# https://xmrig.com/docs/miner/hugepages#onegb-huge-pages
|
||||
|
||||
|
||||
2
src/3rdparty/epee/README.md
vendored
2
src/3rdparty/epee/README.md
vendored
@@ -1 +1 @@
|
||||
epee - is a small library of helpers, wrappers, tools and and so on, used to make my life easier.
|
||||
epee - is a small library of helpers, wrappers, tools and so on, used to make my life easier.
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
|
||||
#include <cassert>
|
||||
#include <uv.h>
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
@@ -40,6 +39,32 @@ static void fsWriteCallback(uv_fs_t *req)
|
||||
} // namespace xmrig
|
||||
|
||||
|
||||
xmrig::FileLogWriter::FileLogWriter()
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
xmrig::FileLogWriter::FileLogWriter(const char* fileName)
|
||||
{
|
||||
init();
|
||||
open(fileName);
|
||||
}
|
||||
|
||||
xmrig::FileLogWriter::~FileLogWriter()
|
||||
{
|
||||
uv_close(reinterpret_cast<uv_handle_t*>(&m_flushAsync), nullptr);
|
||||
|
||||
uv_mutex_destroy(&m_buffersLock);
|
||||
}
|
||||
|
||||
void xmrig::FileLogWriter::init()
|
||||
{
|
||||
uv_mutex_init(&m_buffersLock);
|
||||
|
||||
uv_async_init(uv_default_loop(), &m_flushAsync, on_flush);
|
||||
m_flushAsync.data = this;
|
||||
}
|
||||
|
||||
bool xmrig::FileLogWriter::open(const char *fileName)
|
||||
{
|
||||
assert(fileName != nullptr);
|
||||
@@ -77,11 +102,12 @@ bool xmrig::FileLogWriter::write(const char *data, size_t size)
|
||||
uv_buf_t buf = uv_buf_init(new char[size], size);
|
||||
memcpy(buf.base, data, size);
|
||||
|
||||
auto req = new uv_fs_t;
|
||||
req->data = buf.base;
|
||||
uv_mutex_lock(&m_buffersLock);
|
||||
|
||||
uv_fs_write(uv_default_loop(), req, m_file, &buf, 1, m_pos, fsWriteCallback);
|
||||
m_pos += size;
|
||||
m_buffers.emplace_back(buf);
|
||||
uv_async_send(&m_flushAsync);
|
||||
|
||||
uv_mutex_unlock(&m_buffersLock);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -89,18 +115,38 @@ bool xmrig::FileLogWriter::write(const char *data, size_t size)
|
||||
|
||||
bool xmrig::FileLogWriter::writeLine(const char *data, size_t size)
|
||||
{
|
||||
const uv_buf_t buf[2] = {
|
||||
uv_buf_init(new char[size], size),
|
||||
uv_buf_init(const_cast<char *>(m_endl), sizeof(m_endl) - 1)
|
||||
};
|
||||
if (!isOpen()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
memcpy(buf[0].base, data, size);
|
||||
constexpr size_t N = sizeof(m_endl) - 1;
|
||||
|
||||
auto req = new uv_fs_t;
|
||||
req->data = buf[0].base;
|
||||
uv_buf_t buf = uv_buf_init(new char[size + N], size + N);
|
||||
memcpy(buf.base, data, size);
|
||||
memcpy(buf.base + size, m_endl, N);
|
||||
|
||||
uv_fs_write(uv_default_loop(), req, m_file, buf, 2, m_pos, fsWriteCallback);
|
||||
m_pos += (buf[0].len + buf[1].len);
|
||||
uv_mutex_lock(&m_buffersLock);
|
||||
|
||||
m_buffers.emplace_back(buf);
|
||||
uv_async_send(&m_flushAsync);
|
||||
|
||||
uv_mutex_unlock(&m_buffersLock);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void xmrig::FileLogWriter::flush()
|
||||
{
|
||||
uv_mutex_lock(&m_buffersLock);
|
||||
|
||||
for (uv_buf_t buf : m_buffers) {
|
||||
uv_fs_t* req = new uv_fs_t;
|
||||
req->data = buf.base;
|
||||
|
||||
uv_fs_write(uv_default_loop(), req, m_file, &buf, 1, m_pos, fsWriteCallback);
|
||||
m_pos += buf.len;
|
||||
}
|
||||
m_buffers.clear();
|
||||
|
||||
uv_mutex_unlock(&m_buffersLock);
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
#include <uv.h>
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
@@ -30,8 +32,10 @@ namespace xmrig {
|
||||
class FileLogWriter
|
||||
{
|
||||
public:
|
||||
FileLogWriter() = default;
|
||||
FileLogWriter(const char *fileName) { open(fileName); }
|
||||
FileLogWriter();
|
||||
FileLogWriter(const char* fileName);
|
||||
|
||||
~FileLogWriter();
|
||||
|
||||
inline bool isOpen() const { return m_file >= 0; }
|
||||
inline int64_t pos() const { return m_pos; }
|
||||
@@ -49,6 +53,16 @@ private:
|
||||
|
||||
int m_file = -1;
|
||||
int64_t m_pos = 0;
|
||||
|
||||
uv_mutex_t m_buffersLock;
|
||||
std::vector<uv_buf_t> m_buffers;
|
||||
|
||||
uv_async_t m_flushAsync;
|
||||
|
||||
void init();
|
||||
|
||||
static void on_flush(uv_async_t* async) { reinterpret_cast<FileLogWriter*>(async->data)->flush(); }
|
||||
void flush();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* XMRig
|
||||
* Copyright (c) 2019 jtgrassie <https://github.com/jtgrassie>
|
||||
* Copyright (c) 2018-2023 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2023 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright (c) 2018-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2024 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -609,7 +609,7 @@ bool xmrig::Client::parseLogin(const rapidjson::Value &result, int *code)
|
||||
|
||||
parseExtensions(result);
|
||||
|
||||
const bool rc = parseJob(result["job"], code);
|
||||
const bool rc = parseJob(Json::getObject(result, "job"), code);
|
||||
m_jobs = 0;
|
||||
|
||||
return rc;
|
||||
@@ -844,7 +844,7 @@ void xmrig::Client::parseResponse(int64_t id, const rapidjson::Value &result, co
|
||||
m_listener->onLoginSuccess(this);
|
||||
|
||||
if (m_job.isValid()) {
|
||||
m_listener->onJobReceived(this, m_job, result["job"]);
|
||||
m_listener->onJobReceived(this, m_job, Json::getObject(result, "job"));
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
@@ -63,7 +63,7 @@ xmrig::DonateStrategy::DonateStrategy(Controller *controller, IStrategyListener
|
||||
keccak(reinterpret_cast<const uint8_t *>(user.data()), user.size(), hash);
|
||||
Cvt::toHex(m_userId, sizeof(m_userId), hash, 32);
|
||||
|
||||
# ifdef XMRIG_ALGO_KAWPOW
|
||||
# if defined XMRIG_ALGO_KAWPOW || defined XMRIG_ALGO_GHOSTRIDER
|
||||
constexpr Pool::Mode mode = Pool::MODE_AUTO_ETH;
|
||||
# else
|
||||
constexpr Pool::Mode mode = Pool::MODE_POOL;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define APP_ID "xmrig"
|
||||
#define APP_NAME "XMRig"
|
||||
#define APP_DESC "XMRig miner"
|
||||
#define APP_VERSION "6.21.1"
|
||||
#define APP_VERSION "6.21.2-dev"
|
||||
#define APP_DOMAIN "xmrig.com"
|
||||
#define APP_SITE "www.xmrig.com"
|
||||
#define APP_COPYRIGHT "Copyright (C) 2016-2024 xmrig.com"
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#define APP_VER_MAJOR 6
|
||||
#define APP_VER_MINOR 21
|
||||
#define APP_VER_PATCH 1
|
||||
#define APP_VER_PATCH 2
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# if (_MSC_VER >= 1930)
|
||||
|
||||
Reference in New Issue
Block a user