mirror of
https://github.com/xmrig/xmrig.git
synced 2026-01-05 01:12:40 -05:00
Compare commits
2 Commits
v6.21.1
...
48a61327f4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48a61327f4 | ||
|
|
df031be628 |
@@ -1,8 +1,3 @@
|
|||||||
# v6.21.1
|
|
||||||
- [#3391](https://github.com/xmrig/xmrig/pull/3391) Added support for townforge (monero fork using randomx).
|
|
||||||
- [#3399](https://github.com/xmrig/xmrig/pull/3399) Fixed Zephyr mining (OpenCL).
|
|
||||||
- [#3420](https://github.com/xmrig/xmrig/pull/3420) Fixed segfault in HTTP API rebind.
|
|
||||||
|
|
||||||
# v6.21.0
|
# v6.21.0
|
||||||
- [#3302](https://github.com/xmrig/xmrig/pull/3302) [#3312](https://github.com/xmrig/xmrig/pull/3312) Enabled keepalive for Windows (>= Vista).
|
- [#3302](https://github.com/xmrig/xmrig/pull/3302) [#3312](https://github.com/xmrig/xmrig/pull/3312) Enabled keepalive for Windows (>= Vista).
|
||||||
- [#3320](https://github.com/xmrig/xmrig/pull/3320) Added "built for OS/architecture/bits" to "ABOUT".
|
- [#3320](https://github.com/xmrig/xmrig/pull/3320) Added "built for OS/architecture/bits" to "ABOUT".
|
||||||
|
|||||||
45
Dockerfile
Normal file
45
Dockerfile
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
# Build in disposable container so run-time container is small
|
||||||
|
FROM alpine:latest as build
|
||||||
|
|
||||||
|
# Build from master by default but allow build time specification
|
||||||
|
ARG ref=master
|
||||||
|
ENV my_ref=$ref
|
||||||
|
|
||||||
|
# Developers may wish to specify an alternate repository for source
|
||||||
|
ARG repo=https://github.com/xmrig/xmrig.git
|
||||||
|
ENV my_repo=$repo
|
||||||
|
|
||||||
|
RUN set -ex && \
|
||||||
|
# testing required for hwloc
|
||||||
|
echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories
|
||||||
|
|
||||||
|
RUN set -ex && \
|
||||||
|
apk --no-cache --update add \
|
||||||
|
coreutils file grep openssl tar binutils \
|
||||||
|
cmake g++ git linux-headers libpthread-stubs make hwloc-dev@testing \
|
||||||
|
libuv-dev openssl-dev
|
||||||
|
|
||||||
|
WORKDIR /usr/local/src
|
||||||
|
|
||||||
|
RUN set -ex && \
|
||||||
|
git clone $my_repo xmrig && \
|
||||||
|
cd xmrig && git checkout $my_ref && \
|
||||||
|
cmake -B build && \
|
||||||
|
cd build && \
|
||||||
|
make
|
||||||
|
|
||||||
|
# runtime container
|
||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
RUN set -ex && \
|
||||||
|
# testing required for hwloc
|
||||||
|
echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories
|
||||||
|
|
||||||
|
RUN set -ex && \
|
||||||
|
apk --no-cache --update add \
|
||||||
|
# required libraries packages
|
||||||
|
openssl libuv hwloc@testing
|
||||||
|
|
||||||
|
COPY --from=build /usr/local/src/xmrig/build/xmrig /bin/
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bin/xmrig"]
|
||||||
@@ -39,7 +39,6 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
|
|
||||||
namespace xmrig {
|
namespace xmrig {
|
||||||
@@ -81,8 +80,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);
|
||||||
|
|
||||||
@@ -93,11 +91,7 @@ xmrig::Api::Api(Base *base) :
|
|||||||
xmrig::Api::~Api()
|
xmrig::Api::~Api()
|
||||||
{
|
{
|
||||||
# ifdef XMRIG_FEATURE_HTTP
|
# ifdef XMRIG_FEATURE_HTTP
|
||||||
if (m_httpd) {
|
delete m_httpd;
|
||||||
m_httpd->stop();
|
|
||||||
delete m_httpd;
|
|
||||||
m_httpd = nullptr; // Ensure the pointer is set to nullptr after deletion
|
|
||||||
}
|
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,14 +109,8 @@ void xmrig::Api::start()
|
|||||||
genWorkerId(m_base->config()->apiWorkerId());
|
genWorkerId(m_base->config()->apiWorkerId());
|
||||||
|
|
||||||
# ifdef XMRIG_FEATURE_HTTP
|
# ifdef XMRIG_FEATURE_HTTP
|
||||||
if (!m_httpd) {
|
m_httpd = new Httpd(m_base);
|
||||||
m_httpd = new Httpd(m_base);
|
m_httpd->start();
|
||||||
if (!m_httpd->start()) {
|
|
||||||
std::cerr << "HTTP server failed to start." << std::endl;
|
|
||||||
delete m_httpd; // Properly handle failure to start
|
|
||||||
m_httpd = nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,9 +118,7 @@ void xmrig::Api::start()
|
|||||||
void xmrig::Api::stop()
|
void xmrig::Api::stop()
|
||||||
{
|
{
|
||||||
# ifdef XMRIG_FEATURE_HTTP
|
# ifdef XMRIG_FEATURE_HTTP
|
||||||
if (m_httpd) {
|
m_httpd->stop();
|
||||||
m_httpd->stop();
|
|
||||||
}
|
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,15 +126,13 @@ void xmrig::Api::stop()
|
|||||||
void xmrig::Api::tick()
|
void xmrig::Api::tick()
|
||||||
{
|
{
|
||||||
# ifdef XMRIG_FEATURE_HTTP
|
# ifdef XMRIG_FEATURE_HTTP
|
||||||
if (!m_httpd || !m_base->config()->http().isEnabled() || m_httpd->isBound()) {
|
if (m_httpd->isBound() || !m_base->config()->http().isEnabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (++m_ticks % 10 == 0) {
|
if (++m_ticks % 10 == 0) {
|
||||||
m_ticks = 0;
|
m_ticks = 0;
|
||||||
if (m_httpd) {
|
m_httpd->start();
|
||||||
m_httpd->start();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* XMRig
|
/* XMRig
|
||||||
* Copyright (c) 2018-2024 SChernykh <https://github.com/SChernykh>
|
* Copyright (c) 2018-2023 SChernykh <https://github.com/SChernykh>
|
||||||
* Copyright (c) 2016-2024 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
* Copyright (c) 2016-2023 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
|
||||||
@@ -22,10 +22,10 @@
|
|||||||
#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.1"
|
#define APP_VERSION "6.21.1-dev"
|
||||||
#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-2023 xmrig.com"
|
||||||
#define APP_KIND "miner"
|
#define APP_KIND "miner"
|
||||||
|
|
||||||
#define APP_VER_MAJOR 6
|
#define APP_VER_MAJOR 6
|
||||||
|
|||||||
Reference in New Issue
Block a user