mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-24 13:32:46 -05:00
Compare commits
18 Commits
c2f0bdbd7d
...
36475b9989
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
36475b9989 | ||
|
|
862280f28c | ||
|
|
814e1de2a6 | ||
|
|
e7de104d88 | ||
|
|
3b5e04b1b7 | ||
|
|
2e77faa80c | ||
|
|
6e63a246bf | ||
|
|
09abc81255 | ||
|
|
fc698f7bcf | ||
|
|
cb2f8fd453 | ||
|
|
59c6c42ceb | ||
|
|
6c10cc5a4b | ||
|
|
d5a8f8a5ae | ||
|
|
d94d052e6c | ||
|
|
ae2b7e3348 | ||
|
|
7d7f30701f | ||
|
|
e80fc25789 | ||
|
|
548fbb9f71 |
@@ -1,3 +1,12 @@
|
|||||||
|
# v6.20.0
|
||||||
|
- Added new ARM CPU names.
|
||||||
|
- [#2394](https://github.com/xmrig/xmrig/pull/2394) Added new CMake options `ARM_V8` and `ARM_V7`.
|
||||||
|
- [#2830](https://github.com/xmrig/xmrig/pull/2830) Added API rebind polling.
|
||||||
|
- [#2927](https://github.com/xmrig/xmrig/pull/2927) Fixed compatibility with hwloc 1.11.x.
|
||||||
|
- [#3060](https://github.com/xmrig/xmrig/pull/3060) Added x86 to `README.md`.
|
||||||
|
- [#3236](https://github.com/xmrig/xmrig/pull/3236) Fixed: receive CUDA loader error on Linux too.
|
||||||
|
- [#3290](https://github.com/xmrig/xmrig/pull/3290) Added [Zephyr](https://www.zephyrprotocol.com/) coin support for solo mining.
|
||||||
|
|
||||||
# v6.19.3
|
# v6.19.3
|
||||||
- [#3245](https://github.com/xmrig/xmrig/issues/3245) Improved algorithm negotiation for donation rounds by sending extra information about current mining job.
|
- [#3245](https://github.com/xmrig/xmrig/issues/3245) Improved algorithm negotiation for donation rounds by sending extra information about current mining job.
|
||||||
- [#3254](https://github.com/xmrig/xmrig/pull/3254) Tweaked auto-tuning for Intel CPUs.
|
- [#3254](https://github.com/xmrig/xmrig/pull/3254) Tweaked auto-tuning for Intel CPUs.
|
||||||
|
|||||||
@@ -399,6 +399,9 @@ private:
|
|||||||
uv_loop_t* m_loop = nullptr;
|
uv_loop_t* m_loop = nullptr;
|
||||||
uv_thread_t m_loopThread = {};
|
uv_thread_t m_loopThread = {};
|
||||||
uv_async_t m_shutdownAsync = {};
|
uv_async_t m_shutdownAsync = {};
|
||||||
|
uv_async_t m_batonAsync = {};
|
||||||
|
|
||||||
|
std::vector<KawPowBaton> m_batons;
|
||||||
|
|
||||||
static void loop(void* data)
|
static void loop(void* data)
|
||||||
{
|
{
|
||||||
@@ -419,19 +422,37 @@ void KawPowBuilder::build_async(const IOclRunner& runner, uint64_t period, uint3
|
|||||||
if (!m_loop) {
|
if (!m_loop) {
|
||||||
m_loop = new uv_loop_t{};
|
m_loop = new uv_loop_t{};
|
||||||
uv_loop_init(m_loop);
|
uv_loop_init(m_loop);
|
||||||
uv_async_init(m_loop, &m_shutdownAsync, [](uv_async_t* handle) { uv_close(reinterpret_cast<uv_handle_t*>(handle), nullptr); });
|
|
||||||
|
uv_async_init(m_loop, &m_shutdownAsync, [](uv_async_t* handle)
|
||||||
|
{
|
||||||
|
KawPowBuilder* builder = reinterpret_cast<KawPowBuilder*>(handle->data);
|
||||||
|
uv_close(reinterpret_cast<uv_handle_t*>(&builder->m_shutdownAsync), nullptr);
|
||||||
|
uv_close(reinterpret_cast<uv_handle_t*>(&builder->m_batonAsync), nullptr);
|
||||||
|
});
|
||||||
|
|
||||||
|
uv_async_init(m_loop, &m_batonAsync, [](uv_async_t* handle)
|
||||||
|
{
|
||||||
|
std::vector<KawPowBaton> batons;
|
||||||
|
{
|
||||||
|
KawPowBuilder* b = reinterpret_cast<KawPowBuilder*>(handle->data);
|
||||||
|
|
||||||
|
std::lock_guard<std::mutex> lock(b->m_mutex);
|
||||||
|
batons = std::move(b->m_batons);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const KawPowBaton& baton : batons) {
|
||||||
|
builder.build(baton.runner, baton.period, baton.worksize);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
m_shutdownAsync.data = this;
|
||||||
|
m_batonAsync.data = this;
|
||||||
|
|
||||||
uv_thread_create(&m_loopThread, loop, this);
|
uv_thread_create(&m_loopThread, loop, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
KawPowBaton* baton = new KawPowBaton(runner, period, worksize);
|
m_batons.emplace_back(runner, period, worksize);
|
||||||
|
uv_async_send(&m_batonAsync);
|
||||||
uv_queue_work(m_loop, &baton->req,
|
|
||||||
[](uv_work_t* req) {
|
|
||||||
KawPowBaton* baton = static_cast<KawPowBaton*>(req->data);
|
|
||||||
builder.build(baton->runner, baton->period, baton->worksize);
|
|
||||||
},
|
|
||||||
[](uv_work_t* req, int) { delete static_cast<KawPowBaton*>(req->data); }
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* XMRig
|
/* XMRig
|
||||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
* Copyright (c) 2018-2023 SChernykh <https://github.com/SChernykh>
|
||||||
* Copyright (c) 2016-2021 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
|
||||||
@@ -123,6 +123,21 @@ void xmrig::Api::stop()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void xmrig::Api::tick()
|
||||||
|
{
|
||||||
|
# ifdef XMRIG_FEATURE_HTTP
|
||||||
|
if (m_httpd->isBound() || !m_base->config()->http().isEnabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (++m_ticks % 10 == 0) {
|
||||||
|
m_ticks = 0;
|
||||||
|
m_httpd->start();
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void xmrig::Api::onConfigChanged(Config *config, Config *previousConfig)
|
void xmrig::Api::onConfigChanged(Config *config, Config *previousConfig)
|
||||||
{
|
{
|
||||||
if (config->apiId() != previousConfig->apiId()) {
|
if (config->apiId() != previousConfig->apiId()) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* XMRig
|
/* XMRig
|
||||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
* Copyright (c) 2018-2023 SChernykh <https://github.com/SChernykh>
|
||||||
* Copyright (c) 2016-2021 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
|
||||||
@@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
|
|
||||||
#include "base/kernel/interfaces/IBaseListener.h"
|
#include "base/kernel/interfaces/IBaseListener.h"
|
||||||
@@ -44,7 +43,7 @@ class Api : public IBaseListener
|
|||||||
public:
|
public:
|
||||||
XMRIG_DISABLE_COPY_MOVE_DEFAULT(Api)
|
XMRIG_DISABLE_COPY_MOVE_DEFAULT(Api)
|
||||||
|
|
||||||
Api(Base *base);
|
explicit Api(Base *base);
|
||||||
~Api() override;
|
~Api() override;
|
||||||
|
|
||||||
inline const char *id() const { return m_id; }
|
inline const char *id() const { return m_id; }
|
||||||
@@ -54,6 +53,7 @@ public:
|
|||||||
void request(const HttpData &req);
|
void request(const HttpData &req);
|
||||||
void start();
|
void start();
|
||||||
void stop();
|
void stop();
|
||||||
|
void tick();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void onConfigChanged(Config *config, Config *previousConfig) override;
|
void onConfigChanged(Config *config, Config *previousConfig) override;
|
||||||
@@ -65,14 +65,15 @@ private:
|
|||||||
|
|
||||||
Base *m_base;
|
Base *m_base;
|
||||||
char m_id[32]{};
|
char m_id[32]{};
|
||||||
String m_workerId;
|
|
||||||
const uint64_t m_timestamp;
|
const uint64_t m_timestamp;
|
||||||
Httpd *m_httpd = nullptr;
|
Httpd *m_httpd = nullptr;
|
||||||
std::vector<IApiListener *> m_listeners;
|
std::vector<IApiListener *> m_listeners;
|
||||||
|
String m_workerId;
|
||||||
|
uint8_t m_ticks = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
} // namespace xmrig
|
} // namespace xmrig
|
||||||
|
|
||||||
|
|
||||||
#endif /* XMRIG_API_H */
|
#endif // XMRIG_API_H
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* XMRig
|
/* XMRig
|
||||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
* Copyright (c) 2018-2023 SChernykh <https://github.com/SChernykh>
|
||||||
* Copyright (c) 2016-2021 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,11 +22,6 @@
|
|||||||
|
|
||||||
#include "base/kernel/interfaces/IBaseListener.h"
|
#include "base/kernel/interfaces/IBaseListener.h"
|
||||||
#include "base/net/http/HttpListener.h"
|
#include "base/net/http/HttpListener.h"
|
||||||
#include "base/tools/Object.h"
|
|
||||||
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
|
|
||||||
namespace xmrig {
|
namespace xmrig {
|
||||||
@@ -43,9 +38,11 @@ class Httpd : public IBaseListener, public IHttpListener
|
|||||||
public:
|
public:
|
||||||
XMRIG_DISABLE_COPY_MOVE_DEFAULT(Httpd)
|
XMRIG_DISABLE_COPY_MOVE_DEFAULT(Httpd)
|
||||||
|
|
||||||
Httpd(Base *base);
|
explicit Httpd(Base *base);
|
||||||
~Httpd() override;
|
~Httpd() override;
|
||||||
|
|
||||||
|
inline bool isBound() const { return m_server != nullptr; }
|
||||||
|
|
||||||
bool start();
|
bool start();
|
||||||
void stop();
|
void stop();
|
||||||
|
|
||||||
@@ -69,7 +66,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
} /* namespace xmrig */
|
} // namespace xmrig
|
||||||
|
|
||||||
|
|
||||||
#endif /* XMRIG_HTTPD_H */
|
#endif // XMRIG_HTTPD_H
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ static const CoinInfo coinInfo[] = {
|
|||||||
{ Algorithm::RX_KEVA, "KVA", "Kevacoin", 0, 0, MAGENTA_BG_BOLD(WHITE_BOLD_S " keva ") },
|
{ Algorithm::RX_KEVA, "KVA", "Kevacoin", 0, 0, MAGENTA_BG_BOLD(WHITE_BOLD_S " keva ") },
|
||||||
{ Algorithm::KAWPOW_RVN, "RVN", "Ravencoin", 0, 0, BLUE_BG_BOLD( WHITE_BOLD_S " raven ") },
|
{ Algorithm::KAWPOW_RVN, "RVN", "Ravencoin", 0, 0, BLUE_BG_BOLD( WHITE_BOLD_S " raven ") },
|
||||||
{ Algorithm::RX_WOW, "WOW", "Wownero", 300, 100000000000, MAGENTA_BG_BOLD(WHITE_BOLD_S " wownero ") },
|
{ Algorithm::RX_WOW, "WOW", "Wownero", 300, 100000000000, MAGENTA_BG_BOLD(WHITE_BOLD_S " wownero ") },
|
||||||
|
{ Algorithm::RX_0, "ZEPH", "Zephyr", 120, 1000000000000, BLUE_BG_BOLD( WHITE_BOLD_S " zephyr ") },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ public:
|
|||||||
KEVA,
|
KEVA,
|
||||||
RAVEN,
|
RAVEN,
|
||||||
WOWNERO,
|
WOWNERO,
|
||||||
|
ZEPHYR,
|
||||||
MAX
|
MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -197,6 +197,11 @@ bool xmrig::BlockTemplate::parse(bool hashes)
|
|||||||
ar(m_vote);
|
ar(m_vote);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_coin == Coin::ZEPHYR) {
|
||||||
|
uint8_t pricing_record[24];
|
||||||
|
ar(pricing_record);
|
||||||
|
}
|
||||||
|
|
||||||
// Miner transaction begin
|
// Miner transaction begin
|
||||||
// Prefix begin
|
// Prefix begin
|
||||||
setOffset(MINER_TX_PREFIX_OFFSET, ar.index());
|
setOffset(MINER_TX_PREFIX_OFFSET, ar.index());
|
||||||
@@ -220,8 +225,8 @@ bool xmrig::BlockTemplate::parse(bool hashes)
|
|||||||
ar(m_height);
|
ar(m_height);
|
||||||
ar(m_numOutputs);
|
ar(m_numOutputs);
|
||||||
|
|
||||||
// must be 1 output
|
const uint64_t expected_outputs = (m_coin == Coin::ZEPHYR) ? 2 : 1;
|
||||||
if (m_numOutputs != 1) {
|
if (m_numOutputs != expected_outputs) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -237,7 +242,35 @@ bool xmrig::BlockTemplate::parse(bool hashes)
|
|||||||
|
|
||||||
ar(m_ephPublicKey, kKeySize);
|
ar(m_ephPublicKey, kKeySize);
|
||||||
|
|
||||||
if (m_outputType == 3) {
|
if (m_coin == Coin::ZEPHYR) {
|
||||||
|
if (m_outputType != 2) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint64_t asset_type_len;
|
||||||
|
ar(asset_type_len);
|
||||||
|
ar.skip(asset_type_len);
|
||||||
|
ar(m_viewTag);
|
||||||
|
|
||||||
|
uint64_t amount2;
|
||||||
|
ar(amount2);
|
||||||
|
|
||||||
|
uint8_t output_type2;
|
||||||
|
ar(output_type2);
|
||||||
|
if (output_type2 != 2) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Span key2;
|
||||||
|
ar(key2, kKeySize);
|
||||||
|
|
||||||
|
ar(asset_type_len);
|
||||||
|
ar.skip(asset_type_len);
|
||||||
|
|
||||||
|
uint8_t view_tag2;
|
||||||
|
ar(view_tag2);
|
||||||
|
}
|
||||||
|
else if (m_outputType == 3) {
|
||||||
ar(m_viewTag);
|
ar(m_viewTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -248,6 +281,8 @@ bool xmrig::BlockTemplate::parse(bool hashes)
|
|||||||
BlobReader<true> ar_extra(blob(TX_EXTRA_OFFSET), m_extraSize);
|
BlobReader<true> ar_extra(blob(TX_EXTRA_OFFSET), m_extraSize);
|
||||||
ar.skip(m_extraSize);
|
ar.skip(m_extraSize);
|
||||||
|
|
||||||
|
bool pubkey_offset_first = true;
|
||||||
|
|
||||||
while (ar_extra.index() < m_extraSize) {
|
while (ar_extra.index() < m_extraSize) {
|
||||||
uint64_t extra_tag = 0;
|
uint64_t extra_tag = 0;
|
||||||
uint64_t size = 0;
|
uint64_t size = 0;
|
||||||
@@ -256,7 +291,10 @@ bool xmrig::BlockTemplate::parse(bool hashes)
|
|||||||
|
|
||||||
switch (extra_tag) {
|
switch (extra_tag) {
|
||||||
case 0x01: // TX_EXTRA_TAG_PUBKEY
|
case 0x01: // TX_EXTRA_TAG_PUBKEY
|
||||||
setOffset(TX_PUBKEY_OFFSET, offset(TX_EXTRA_OFFSET) + ar_extra.index());
|
if (pubkey_offset_first) {
|
||||||
|
pubkey_offset_first = false;
|
||||||
|
setOffset(TX_PUBKEY_OFFSET, offset(TX_EXTRA_OFFSET) + ar_extra.index());
|
||||||
|
}
|
||||||
ar_extra.skip(kKeySize);
|
ar_extra.skip(kKeySize);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -277,6 +315,13 @@ bool xmrig::BlockTemplate::parse(bool hashes)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_coin == Coin::ZEPHYR) {
|
||||||
|
uint64_t pricing_record_height, amount_burnt, amount_minted;
|
||||||
|
ar(pricing_record_height);
|
||||||
|
ar(amount_burnt);
|
||||||
|
ar(amount_minted);
|
||||||
|
}
|
||||||
|
|
||||||
setOffset(MINER_TX_PREFIX_END_OFFSET, ar.index());
|
setOffset(MINER_TX_PREFIX_END_OFFSET, ar.index());
|
||||||
// Prefix end
|
// Prefix end
|
||||||
|
|
||||||
|
|||||||
@@ -308,6 +308,10 @@ void xmrig::Network::tick()
|
|||||||
if (m_donate) {
|
if (m_donate) {
|
||||||
m_donate->tick(now);
|
m_donate->tick(now);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ifdef XMRIG_FEATURE_API
|
||||||
|
m_controller->api()->tick();
|
||||||
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,15 +22,15 @@
|
|||||||
#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.19.4-dev"
|
#define APP_VERSION "6.20.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-2023 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
|
||||||
#define APP_VER_MINOR 19
|
#define APP_VER_MINOR 20
|
||||||
#define APP_VER_PATCH 4
|
#define APP_VER_PATCH 1
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# if (_MSC_VER >= 1930)
|
# if (_MSC_VER >= 1930)
|
||||||
|
|||||||
Reference in New Issue
Block a user