mirror of
https://github.com/xmrig/xmrig.git
synced 2026-06-27 05:26:33 -04:00
Compare commits
12 Commits
v6.21.2
...
e3f9b1b582
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e3f9b1b582 | ||
|
|
7897f10c48 | ||
|
|
da2fb331b3 | ||
|
|
57f3e9c3da | ||
|
|
1efe7e9562 | ||
|
|
caae7c64f0 | ||
|
|
9fbdcc0ef0 | ||
|
|
c7c26d97fe | ||
|
|
1f7e635b04 | ||
|
|
1c5786e3c5 | ||
|
|
44eb4f0038 | ||
|
|
062f3f6d2d |
@@ -1,3 +1,6 @@
|
|||||||
|
# v6.21.3
|
||||||
|
- [#3462](https://github.com/xmrig/xmrig/pull/3462) RandomX: correct memcpy size for JIT initialization.
|
||||||
|
|
||||||
# v6.21.2
|
# v6.21.2
|
||||||
- The dependencies of all prebuilt releases have been updated. Support for old Ubuntu releases has been dropped.
|
- The dependencies of all prebuilt releases have been updated. Support for old Ubuntu releases has been dropped.
|
||||||
- [#2800](https://github.com/xmrig/xmrig/issues/2800) Fixed donation with GhostRider algorithm for builds without KawPow algorithm.
|
- [#2800](https://github.com/xmrig/xmrig/issues/2800) Fixed donation with GhostRider algorithm for builds without KawPow algorithm.
|
||||||
|
|||||||
@@ -187,6 +187,13 @@ else()
|
|||||||
)
|
)
|
||||||
|
|
||||||
set(EXTRA_LIBS pthread rt dl)
|
set(EXTRA_LIBS pthread rt dl)
|
||||||
|
|
||||||
|
find_package(X11)
|
||||||
|
|
||||||
|
if(X11_FOUND)
|
||||||
|
include_directories(${X11_INCLUDE_DIR})
|
||||||
|
add_definitions(-DXMRIG_X11_FOUND)
|
||||||
|
endif()
|
||||||
elseif (XMRIG_OS_FREEBSD)
|
elseif (XMRIG_OS_FREEBSD)
|
||||||
set(EXTRA_LIBS kvm pthread)
|
set(EXTRA_LIBS kvm pthread)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* XMRig
|
/* XMRig
|
||||||
* Copyright (c) 2018-2023 SChernykh <https://github.com/SChernykh>
|
* Copyright (c) 2018-2024 SChernykh <https://github.com/SChernykh>
|
||||||
* Copyright (c) 2016-2023 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
* Copyright (c) 2016-2024 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -25,6 +25,8 @@
|
|||||||
#include "base/crypto/keccak.h"
|
#include "base/crypto/keccak.h"
|
||||||
#include "base/io/Env.h"
|
#include "base/io/Env.h"
|
||||||
#include "base/io/json/Json.h"
|
#include "base/io/json/Json.h"
|
||||||
|
#include "base/io/log/Log.h"
|
||||||
|
#include "base/io/log/Tags.h"
|
||||||
#include "base/kernel/Base.h"
|
#include "base/kernel/Base.h"
|
||||||
#include "base/tools/Chrono.h"
|
#include "base/tools/Chrono.h"
|
||||||
#include "base/tools/Cvt.h"
|
#include "base/tools/Cvt.h"
|
||||||
@@ -39,7 +41,6 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
|
|
||||||
namespace xmrig {
|
namespace xmrig {
|
||||||
@@ -81,8 +82,7 @@ static rapidjson::Value getResources(rapidjson::Document &doc)
|
|||||||
|
|
||||||
xmrig::Api::Api(Base *base) :
|
xmrig::Api::Api(Base *base) :
|
||||||
m_base(base),
|
m_base(base),
|
||||||
m_timestamp(Chrono::currentMSecsSinceEpoch()),
|
m_timestamp(Chrono::currentMSecsSinceEpoch())
|
||||||
m_httpd(nullptr)
|
|
||||||
{
|
{
|
||||||
base->addListener(this);
|
base->addListener(this);
|
||||||
|
|
||||||
@@ -118,7 +118,8 @@ void xmrig::Api::start()
|
|||||||
if (!m_httpd) {
|
if (!m_httpd) {
|
||||||
m_httpd = new Httpd(m_base);
|
m_httpd = new Httpd(m_base);
|
||||||
if (!m_httpd->start()) {
|
if (!m_httpd->start()) {
|
||||||
std::cerr << "HTTP server failed to start." << std::endl;
|
LOG_ERR("%s " RED_BOLD("HTTP API server failed to start."), Tags::network());
|
||||||
|
|
||||||
delete m_httpd; // Properly handle failure to start
|
delete m_httpd; // Properly handle failure to start
|
||||||
m_httpd = nullptr;
|
m_httpd = nullptr;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* XMRig
|
/* XMRig
|
||||||
* Copyright (c) 2018-2023 SChernykh <https://github.com/SChernykh>
|
* Copyright (c) 2018-2024 SChernykh <https://github.com/SChernykh>
|
||||||
* Copyright (c) 2016-2023 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
* Copyright (c) 2016-2024 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -38,7 +38,6 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
|
|
||||||
#include "base/kernel/Platform.h"
|
#include "base/kernel/Platform.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
@@ -172,8 +171,61 @@ bool xmrig::Platform::isOnBatteryPower()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(XMRIG_OS_LINUX) && defined(XMRIG_X11_FOUND)
|
||||||
|
|
||||||
|
#include <dlfcn.h>
|
||||||
|
#include <X11/extensions/scrnsaver.h>
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
void bind_symbol(T& var, void *library, const char* name) {
|
||||||
|
var = reinterpret_cast<T>(::dlsym(library, name));
|
||||||
|
}
|
||||||
|
|
||||||
uint64_t xmrig::Platform::idleTime()
|
uint64_t xmrig::Platform::idleTime()
|
||||||
{
|
{
|
||||||
|
// libX11
|
||||||
|
static Display* (*XOpenDisplay)(const char *name) = {};
|
||||||
|
|
||||||
|
// libXss
|
||||||
|
static XScreenSaverInfo* (*XScreenSaverAllocInfo)() = {};
|
||||||
|
static Status (*XScreenSaverQueryInfo)(Display *dpy, Drawable drawable,
|
||||||
|
XScreenSaverInfo *saver_info) = {};
|
||||||
|
|
||||||
|
static bool initialized = false;
|
||||||
|
static Display *dpy = {};
|
||||||
|
static XScreenSaverInfo *info = {};
|
||||||
|
|
||||||
|
if(!initialized) {
|
||||||
|
static void *libx11 = dlopen("/usr/lib/libX11.so", RTLD_LAZY);
|
||||||
|
static void *libxss = dlopen("/usr/lib/libXss.so", RTLD_LAZY);
|
||||||
|
|
||||||
|
if(!libxss || !libx11) {
|
||||||
|
initialized = true;
|
||||||
|
return std::numeric_limits<uint64_t>::max();
|
||||||
|
}
|
||||||
|
|
||||||
|
bind_symbol(XOpenDisplay, libx11, "XOpenDisplay");
|
||||||
|
bind_symbol(XScreenSaverAllocInfo, libxss, "XScreenSaverAllocInfo");
|
||||||
|
bind_symbol(XScreenSaverQueryInfo, libxss, "XScreenSaverQueryInfo");
|
||||||
|
|
||||||
|
dpy = XOpenDisplay(nullptr);
|
||||||
|
info = XScreenSaverAllocInfo();
|
||||||
|
|
||||||
|
initialized = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!dpy) {
|
||||||
|
return std::numeric_limits<uint64_t>::max();
|
||||||
|
}
|
||||||
|
|
||||||
|
XScreenSaverQueryInfo(dpy, DefaultRootWindow(dpy), info);
|
||||||
|
|
||||||
|
return info->idle;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
|
||||||
|
uint64_t xmrig::Platform::idleTime() {
|
||||||
return std::numeric_limits<uint64_t>::max();
|
return std::numeric_limits<uint64_t>::max();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -1078,6 +1078,6 @@ void JitCompilerA64::h_NOP(Instruction& instr, uint32_t& codePos)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
InstructionGeneratorA64 JitCompilerA64::engine[257] = {};
|
InstructionGeneratorA64 JitCompilerA64::engine[256] = {};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ namespace randomx {
|
|||||||
void enableWriting() const;
|
void enableWriting() const;
|
||||||
void enableExecution() const;
|
void enableExecution() const;
|
||||||
|
|
||||||
static InstructionGeneratorA64 engine[257];
|
static InstructionGeneratorA64 engine[256];
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const bool hugePages;
|
const bool hugePages;
|
||||||
|
|||||||
@@ -1443,6 +1443,6 @@ namespace randomx {
|
|||||||
emitByte(0x90, code, codePos);
|
emitByte(0x90, code, codePos);
|
||||||
}
|
}
|
||||||
|
|
||||||
alignas(64) InstructionGeneratorX86 JitCompilerX86::engine[257] = {};
|
alignas(64) InstructionGeneratorX86 JitCompilerX86::engine[256] = {};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ namespace randomx {
|
|||||||
void enableWriting() const;
|
void enableWriting() const;
|
||||||
void enableExecution() const;
|
void enableExecution() const;
|
||||||
|
|
||||||
alignas(64) static InstructionGeneratorX86 engine[257];
|
alignas(64) static InstructionGeneratorX86 engine[256];
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int registerUsage[RegistersCount] = {};
|
int registerUsage[RegistersCount] = {};
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ typedef void(randomx::JitCompilerX86::* InstructionGeneratorX86_2)(const randomx
|
|||||||
|
|
||||||
#define JIT_HANDLE(x, prev) do { \
|
#define JIT_HANDLE(x, prev) do { \
|
||||||
const InstructionGeneratorX86_2 p = &randomx::JitCompilerX86::h_##x; \
|
const InstructionGeneratorX86_2 p = &randomx::JitCompilerX86::h_##x; \
|
||||||
memcpy(randomx::JitCompilerX86::engine + k, &p, sizeof(p)); \
|
memcpy(randomx::JitCompilerX86::engine + k, &p, sizeof(randomx::JitCompilerX86::engine[k])); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#elif (XMRIG_ARM == 8)
|
#elif (XMRIG_ARM == 8)
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#define APP_ID "xmrig"
|
#define APP_ID "xmrig"
|
||||||
#define APP_NAME "XMRig"
|
#define APP_NAME "XMRig"
|
||||||
#define APP_DESC "XMRig miner"
|
#define APP_DESC "XMRig miner"
|
||||||
#define APP_VERSION "6.21.2"
|
#define APP_VERSION "6.21.3"
|
||||||
#define APP_DOMAIN "xmrig.com"
|
#define APP_DOMAIN "xmrig.com"
|
||||||
#define APP_SITE "www.xmrig.com"
|
#define APP_SITE "www.xmrig.com"
|
||||||
#define APP_COPYRIGHT "Copyright (C) 2016-2024 xmrig.com"
|
#define APP_COPYRIGHT "Copyright (C) 2016-2024 xmrig.com"
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#define APP_VER_MAJOR 6
|
#define APP_VER_MAJOR 6
|
||||||
#define APP_VER_MINOR 21
|
#define APP_VER_MINOR 21
|
||||||
#define APP_VER_PATCH 2
|
#define APP_VER_PATCH 3
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# if (_MSC_VER >= 1930)
|
# if (_MSC_VER >= 1930)
|
||||||
|
|||||||
Reference in New Issue
Block a user