Skip to content

Commit

Permalink
x4x update
Browse files Browse the repository at this point in the history
  • Loading branch information
FSOL-XDAG committed Jun 4, 2023
1 parent 0bc8734 commit b71c05c
Show file tree
Hide file tree
Showing 13 changed files with 69 additions and 47 deletions.
20 changes: 10 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
cmake_minimum_required(VERSION 3.1)
project(xmrig)
project(xmrig-4-xdag)

option(WITH_HWLOC "Enable hwloc support" ON)
option(WITH_CN_LITE "Enable CryptoNight-Lite algorithms family" ON)
option(WITH_CN_HEAVY "Enable CryptoNight-Heavy algorithms family" ON)
option(WITH_CN_PICO "Enable CryptoNight-Pico algorithm" ON)
option(WITH_CN_FEMTO "Enable CryptoNight-UPX2 algorithm" ON)
option(WITH_CN_LITE "Enable CryptoNight-Lite algorithms family" OFF)
option(WITH_CN_HEAVY "Enable CryptoNight-Heavy algorithms family" OFF)
option(WITH_CN_PICO "Enable CryptoNight-Pico algorithm" OFF)
option(WITH_CN_FEMTO "Enable CryptoNight-UPX2 algorithm" OFF)
option(WITH_RANDOMX "Enable RandomX algorithms family" ON)
option(WITH_ARGON2 "Enable Argon2 algorithms family" ON)
option(WITH_KAWPOW "Enable KawPow algorithms family" ON)
option(WITH_GHOSTRIDER "Enable GhostRider algorithm" ON)
option(WITH_ARGON2 "Enable Argon2 algorithms family" OFF)
option(WITH_KAWPOW "Enable KawPow algorithms family" OFF)
option(WITH_GHOSTRIDER "Enable GhostRider algorithm" OFF)
option(WITH_HTTP "Enable HTTP protocol support (client/server)" ON)
option(WITH_DEBUG_LOG "Enable debug log output" OFF)
option(WITH_TLS "Enable OpenSSL support" ON)
option(WITH_ASM "Enable ASM PoW implementations" ON)
option(WITH_MSR "Enable MSR mod & 1st-gen Ryzen fix" ON)
option(WITH_ENV_VARS "Enable environment variables support in config file" ON)
option(WITH_EMBEDDED_CONFIG "Enable internal embedded JSON config" OFF)
option(WITH_OPENCL "Enable OpenCL backend" ON)
option(WITH_OPENCL "Enable OpenCL backend" OFF)
set(WITH_OPENCL_VERSION 200 CACHE STRING "Target OpenCL version")
set_property(CACHE WITH_OPENCL_VERSION PROPERTY STRINGS 120 200 210 220)
option(WITH_CUDA "Enable CUDA backend" ON)
option(WITH_CUDA "Enable CUDA backend" OFF)
option(WITH_NVML "Enable NVML (NVIDIA Management Library) support (only if CUDA backend enabled)" ON)
option(WITH_ADL "Enable ADL (AMD Display Library) or sysfs support (only if OpenCL backend enabled)" ON)
option(WITH_STRICT_CACHE "Enable strict checks for OpenCL cache" ON)
Expand Down
63 changes: 37 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,49 @@
# XMRig
# XMRig-4-XDAG

[![Github All Releases](https://img.shields.io/github/downloads/xmrig/xmrig/total.svg)](https://github.com/xmrig/xmrig/releases)
[![GitHub release](https://img.shields.io/github/release/xmrig/xmrig/all.svg)](https://github.com/xmrig/xmrig/releases)
[![GitHub Release Date](https://img.shields.io/github/release-date/xmrig/xmrig.svg)](https://github.com/xmrig/xmrig/releases)
[![GitHub license](https://img.shields.io/github/license/xmrig/xmrig.svg)](https://github.com/xmrig/xmrig/blob/master/LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/xmrig/xmrig.svg)](https://github.com/xmrig/xmrig/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/xmrig/xmrig.svg)](https://github.com/xmrig/xmrig/network)
[![Github All Releases](https://img.shields.io/github/downloads/FSOL-XDAG/xmrig-4-xdag/total.svg)]()
[![GitHub release](https://img.shields.io/github/release/FSOL-XDAG/xmrig-4-xdag/all.svg)](https://github.com/FSOL-XDAG/xmrig-4-xdag/releases)
[![GitHub Release Date](https://img.shields.io/github/release-date/FSOL-XDAG/xmrig-4-xdag.svg)](https://github.com/FSOL-XDAG/xmrig-4-xdag/releases)
[![GitHub license](https://img.shields.io/github/license/FSOL-XDAG/xmrig-4-xdag.svg)](https://github.com/FSOL-XDAG/xmrig-4-xdag/blob/master/LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/FSOL-XDAG/xmrig-4-xdag.svg)](https://github.com/FSOL-XDAG/xmrig-4-xdag/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/FSOL-XDAG/xmrig-4-xdag.svg)](https://github.com/FSOL-XDAG/xmrig-4-xdag/network)

XMRig is a high performance, open source, cross platform RandomX, KawPow, CryptoNight and [GhostRider](https://github.com/xmrig/xmrig/tree/master/src/crypto/ghostrider#readme) unified CPU/GPU miner and [RandomX benchmark](https://xmrig.com/benchmark). Official binaries are available for Windows, Linux, macOS and FreeBSD.
![x4x_spash](https://user-images.githubusercontent.com/128682335/227436274-10a8321c-7b75-4f70-a304-e7ab34f74e16.png)

## Mining backends
- **CPU** (x64/ARMv7/ARMv8)
- **OpenCL** for AMD GPUs.
- **CUDA** for NVIDIA GPUs via external [CUDA plugin](https://github.com/xmrig/xmrig-cuda).
## Description

## Download
* **[Binary releases](https://github.com/xmrig/xmrig/releases)**
* **[Build from source](https://xmrig.com/docs/miner/build)**
**x4x** is a strict XMRIG's fork incorporating randomX algorithm variant for mining XDAG. It's based on the [Swordlet project](https://github.com/swordlet/xmrig/tree/xdag) using [XMRig 6.18.0](https://github.com/xmrig/xmrig/releases/tag/v6.18.0). It's specially designed to improve XDAG mining :

## Usage
The preferred way to configure the miner is the [JSON config file](https://xmrig.com/docs/miner/config) as it is more flexible and human friendly. The [command line interface](https://xmrig.com/docs/miner/command-line-options) does not cover all features, such as mining profiles for different algorithms. Important options can be changed during runtime without miner restart by editing the config file or executing [API](https://xmrig.com/docs/miner/api) calls.
* **algorithms other than RandomX have been removed** at compilation (_CryptoNight, Argon2, KawPow and GhostRider_),
* **_CUDA_ and _OpenCL_ support have been removed** at compilation too (_GPUs are useless to mine XDAG_).
* **the fees have been set to zero** for improving mining and to avoid disconnections to XDAG mining pools,

* **[Wizard](https://xmrig.com/wizard)** helps you create initial configuration for the miner.
* **[Workers](http://workers.xmrig.info)** helps manage your miners via HTTP API.
## Available on theses OS/platforms :
* Windows 10 x64 and upper.
* Linux Ubuntu 18.04 / 20.04 / 22.04 / 22.10
* Hive OS (Ubuntu 18.04)
* FreeBSD 13.1
* MacOS x64 darwin (10.5.x and upper)
* CentOS 8

## How to compile
Check Github [wiki pages](https://github.com/FSOL-XDAG/xmrig-4-xdag/wiki#how-to-build).

## Donations
* Default donation 1% (1 minute in 100 minutes) can be increased via option `donate-level` or disabled in source code.
* XMR: `48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD`
* If you appreciate this work, feel free to send me some XDAG as tips (remark : `x4x tips`).
* XDAG: `53r2nH7y81CePxqe73mpoZdEjs66j178K`

## Developers
## XMRig Developers
* **[xmrig](https://github.com/xmrig)**
* **[sech1](https://github.com/SChernykh)**

## Contacts
* support@xmrig.com
* [reddit](https://www.reddit.com/user/XMRig/)
* [twitter](https://twitter.com/xmrig_dev)
## x4x Developer
* **[FSOL-XDAG](https://github.com/FSOL-XDAG)**

## Usefull link
* [Medium](https://medium.com/@fsol)
* [Discord]([https://medium.com/@fsol](https://discord.gg/fHE4sJ7NKt))
* [Twitter](https://twitter.com/Chrix_Switch)
* [How to](https://1to.fr)

## Contact
* fsol@xdag.io
Binary file modified res/app.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion res/app.rc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ VS_VERSION_INFO VERSIONINFO
VALUE "FileDescription", APP_DESC
VALUE "FileVersion", APP_VERSION
VALUE "LegalCopyright", APP_COPYRIGHT
VALUE "OriginalFilename", "xmrig.exe"
VALUE "OriginalFilename", "xmrig-4-xdag.exe"
VALUE "ProductName", APP_NAME
VALUE "ProductVersion", APP_VERSION
END
Expand Down
1 change: 1 addition & 0 deletions src/backend/opencl/cl/cn/algorithm.cl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define ALGO_RX_SFX 0x72151273
#define ALGO_RX_KEVA 0x7214116b
#define ALGO_RX_GRAFT 0x72151267
#define ALGO_RX_XDAG 0x72151208
#define ALGO_AR2_CHUKWA 0x61130000
#define ALGO_AR2_CHUKWA_V2 0x61140000
#define ALGO_AR2_WRKZ 0x61120000
Expand Down
6 changes: 5 additions & 1 deletion src/base/crypto/Algorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const char *Algorithm::kRX_ARQ = "rx/arq";
const char *Algorithm::kRX_GRAFT = "rx/graft";
const char *Algorithm::kRX_SFX = "rx/sfx";
const char *Algorithm::kRX_KEVA = "rx/keva";
const char *Algorithm::kRX_XDAG = "rx/xdag";
#endif

#ifdef XMRIG_ALGO_ARGON2
Expand Down Expand Up @@ -148,6 +149,7 @@ static const std::map<uint32_t, const char *> kAlgorithmNames = {
ALGO_NAME(RX_GRAFT),
ALGO_NAME(RX_SFX),
ALGO_NAME(RX_KEVA),
ALGO_NAME(RX_XDAG),
# endif

# ifdef XMRIG_ALGO_ARGON2
Expand Down Expand Up @@ -263,6 +265,8 @@ static const std::map<const char *, Algorithm::Id, aliasCompare> kAlgorithmAlias
ALGO_ALIAS(RX_SFX, "randomsfx"),
ALGO_ALIAS_AUTO(RX_KEVA), ALGO_ALIAS(RX_KEVA, "randomx/keva"),
ALGO_ALIAS(RX_KEVA, "randomkeva"),
ALGO_ALIAS_AUTO(RX_XDAG), ALGO_ALIAS(RX_XDAG, "randomx/xdag"),
ALGO_ALIAS(RX_XDAG, "randomxdag"),
# endif

# ifdef XMRIG_ALGO_ARGON2
Expand Down Expand Up @@ -350,7 +354,7 @@ std::vector<xmrig::Algorithm> xmrig::Algorithm::all(const std::function<bool(con
CN_HEAVY_0, CN_HEAVY_TUBE, CN_HEAVY_XHV,
CN_PICO_0, CN_PICO_TLO,
CN_UPX2,
RX_0, RX_WOW, RX_ARQ, RX_GRAFT, RX_SFX, RX_KEVA,
RX_0, RX_WOW, RX_ARQ, RX_GRAFT, RX_SFX, RX_KEVA, RX_XDAG,
AR2_CHUKWA, AR2_CHUKWA_V2, AR2_WRKZ,
KAWPOW_RVN,
GHOSTRIDER_RTM
Expand Down
2 changes: 2 additions & 0 deletions src/base/crypto/Algorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class Algorithm
RX_GRAFT = 0x72151267, // "rx/graft" RandomGRAFT (Graft).
RX_SFX = 0x72151273, // "rx/sfx" RandomSFX (Safex Cash).
RX_KEVA = 0x7214116b, // "rx/keva" RandomKEVA (Keva).
RX_XDAG = 0x72151208, // "rx/xdag" RandomX (xdagger coin).
AR2_CHUKWA = 0x61130000, // "argon2/chukwa" Argon2id (Chukwa).
AR2_CHUKWA_V2 = 0x61140000, // "argon2/chukwav2" Argon2id (Chukwa v2).
AR2_WRKZ = 0x61120000, // "argon2/wrkz" Argon2id (WRKZ)
Expand Down Expand Up @@ -144,6 +145,7 @@ class Algorithm
static const char *kRX_GRAFT;
static const char *kRX_SFX;
static const char *kRX_KEVA;
static const char *kRX_XDAG;
# endif

# ifdef XMRIG_ALGO_ARGON2
Expand Down
1 change: 1 addition & 0 deletions src/base/crypto/Coin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ static const CoinInfo coinInfo[] = {
{ 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::RX_WOW, "WOW", "Wownero", 300, 100000000000, MAGENTA_BG_BOLD(WHITE_BOLD_S " wownero ") },
{ Algorithm::RX_XDAG, "XDAG", "Xdagger", 0, 0, BLUE_BG_BOLD( WHITE_BOLD_S " xdag ") },
};


Expand Down
1 change: 1 addition & 0 deletions src/base/crypto/Coin.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class Coin
KEVA,
RAVEN,
WOWNERO,
XDAG,
MAX
};

Expand Down
2 changes: 2 additions & 0 deletions src/base/net/stratum/Job.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ void xmrig::Job::setSigKey(const char *sig_key)
int32_t xmrig::Job::nonceOffset() const
{
auto f = algorithm().family();
auto i = algorithm().id();
if (f == Algorithm::KAWPOW) return 32;
if (f == Algorithm::GHOSTRIDER) return 76;
if (i == Algorithm::RX_XDAG) return 60;
return 39;
}

Expand Down
2 changes: 1 addition & 1 deletion src/crypto/rx/RxAlgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class RxAlgo

static inline Algorithm::Id id(Algorithm::Id algorithm)
{
if (algorithm == Algorithm::RX_SFX) {
if (algorithm == Algorithm::RX_SFX || algorithm == Algorithm::RX_XDAG) {
return Algorithm::RX_0;
}

Expand Down
4 changes: 2 additions & 2 deletions src/donate.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
* If you plan on changing donations to 0%, please consider making a one-off donation to my wallet:
* XMR: 48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD
*/
constexpr const int kDefaultDonateLevel = 1;
constexpr const int kMinimumDonateLevel = 1;
constexpr const int kDefaultDonateLevel = 0;
constexpr const int kMinimumDonateLevel = 0;


#endif // XMRIG_DONATE_H
12 changes: 6 additions & 6 deletions src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
#ifndef XMRIG_VERSION_H
#define XMRIG_VERSION_H

#define APP_ID "xmrig"
#define APP_NAME "XMRig"
#define APP_DESC "XMRig miner"
#define APP_ID "xmrig-4-xdag"
#define APP_NAME "XMRig-4-XDAG"
#define APP_DESC "XMRig-4-XDAG miner"
#define APP_VERSION "6.19.3"
#define APP_DOMAIN "xmrig.com"
#define APP_SITE "www.xmrig.com"
#define APP_COPYRIGHT "Copyright (C) 2016-2023 xmrig.com"
#define APP_DOMAIN "xdag.io"
#define APP_SITE "www.xdag.io"
#define APP_COPYRIGHT "Copyright (C) 2016-2023 xmrig.com / xdag.io"
#define APP_KIND "miner"

#define APP_VER_MAJOR 6
Expand Down

0 comments on commit b71c05c

Please sign in to comment.