Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions .vsconan/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"commandContainer": {
"create": [
{
"name": "create",
"description": "Create command",
"detail": "Create command detail",
"conanRecipe": "conanfile.py",
"profile": "default",
"user": "",
"channel": "",
"args": []
}
],
"install": [
{
"name": "install",
"description": "Install command",
"detail": "Install command detail",
"conanRecipe": "conanfile.py",
"installFolder": "install",
"profile": "default",
"user": "",
"channel": "",
"args": []
}
],
"build": [
{
"name": "build",
"description": "Build command",
"detail": "Build command detail",
"conanRecipe": "conanfile.py",
"installFolder": "install",
"buildFolder": "build",
"packageFolder": "package",
"sourceFolder": "source",
"args": []
}
],
"source": [
{
"name": "source",
"description": "Source command",
"detail": "Source command detail",
"conanRecipe": "conanfile.py",
"installFolder": "install",
"sourceFolder": "source",
"version": "",
"user": "",
"channel": "",
"args": []
}
],
"pkg": [
{
"name": "pkg",
"description": "Package command",
"detail": "Package command detail",
"conanRecipe": "conanfile.py",
"installFolder": "install",
"buildFolder": "build",
"packageFolder": "package",
"sourceFolder": "source"
}
],
"pkgExport": [
{
"name": "pkg_export",
"description": "Package export command",
"detail": "Package export command detail",
"conanRecipe": "conanfile.py",
"installFolder": "install",
"buildFolder": "build",
"packageFolder": "package",
"sourceFolder": "source",
"user": "",
"channel": "",
"args": []
}
]
}
}
37 changes: 12 additions & 25 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 2.8)

option(RH_DEBUG_TARGET "Compile in Debug" OFF)
option(RH_CPU_ONLY "Compile only cpu code" OFF)
option(RH_ARCH "Architecture name" Maxwell)
option(RH_CPU_ONLY "Compile only cpu code" ON)
option(RH_ARCH "Architecture name" CPU)
option(RH_NO_SSE4 "Disable sse4 optimizations" OFF)

project(rhminer)
Expand All @@ -17,7 +17,7 @@ if(RH_NO_SSE4)
add_definitions(-DRHMINER_NO_SSE4)
else()
message(STATUS "ENABLING SSe4 intrinsics")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread -msse4.1")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -pthread -msse4.1")
endif(RH_NO_SSE4)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake")
Expand Down Expand Up @@ -150,35 +150,22 @@ set(SOURCES
rhminer/main.cpp
)

find_package(jsoncpp REQUIRED)
include_directories(${JSONCPP_INCLUDE_DIRS})
link_libraries(${JSONCPP_LIBRARIES})

set(Boost_USE_STATIC_LIBS ON)
set(JSONCPP_LIB_BUILD_STATIC ON)

find_package( Boost REQUIRED COMPONENTS atomic chrono system thread )
include_directories(${Boost_INCLUDE_DIR})
link_libraries(${BOOST_LIBRARIES})
set(Boost_USE_STATIC_LIBS OFF)
set(JSONCPP_LIB_BUILD_STATIC OFF)


if(RH_CPU_ONLY)
set(PU_SPEC "cpu")
else(RH_CPU_ONLY)
set(RH_CUDA_LIB cudalib)
set(RH_OCLL OpenCL)
add_subdirectory(cudalib)
endif(RH_CPU_ONLY)
set(PU_SPEC "cpu")


#CHECK_INCLUDE_FILE (syslog.h HAVE_SYSLOG_H)
#if (HAVE_SYSLOG_H)
# add_definitions(/DHAVE_SYSLOG_H)
#endif()
set(CMAKE_EXE_LINKER_FLAGS "-L/lib64/ -lstdc++")

find_package(Boost REQUIRED COMPONENTS atomic chrono system thread)
find_package(jsoncpp 1.8.3 REQUIRED)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/rhminer_${RH_ARCH})
message(STATUS "Output directory is ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")

add_executable(${PROJECT_NAME} ${HEADERS} ${SOURCES})
target_link_libraries(${PROJECT_NAME} ${RH_CUDA_LIB} ${LIBS} ${LIBRARIES} ${EXTRA_LIBS} jsoncpp_lib_static ${CMAKE_DL_LIBS} ${Boost_ATOMIC_LIBRARY} ${Boost_CHRONO_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY} ${RH_OCLL})


target_link_libraries(${PROJECT_NAME} ${RH_CUDA_LIB} ${LIBS} ${LIBRARIES} ${EXTRA_LIBS} ${CMAKE_DL_LIBS} JsonCpp::JsonCpp Boost::atomic Boost::chrono Boost::system Boost::thread ${RH_OCLL})
19 changes: 19 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": 8,
"configurePresets": [
{
"name": "rhminer",
"displayName": "GCC 14.2.1 x86_64-redhat-linux",
"description": "Using compilers: C = /usr/bin/gcc, CXX = /usr/bin/g++",
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
"CMAKE_C_COMPILER": "/usr/bin/gcc",
"CMAKE_CXX_COMPILER": "/usr/bin/g++",
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/build/${presetName}/conan_toolchain.cmake"
}
}
]

}
9 changes: 9 additions & 0 deletions CMakeUserPresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"version": 4,
"vendor": {
"conan": {}
},
"include": [
"build/rhminer/CMakePresets.json"
]
}
2 changes: 1 addition & 1 deletion MinersLib/Global.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class GlobalMiningPreset
bool IsInDevFeeMode() { return !!AtomicGet(m_endOfCurrentDevFeeTimesMS); }
bool DetectDevfeeOvertime();
bool UpdateToDevModeState(string& connectionParams);
float m_devfeePercent = 1.0f;
float m_devfeePercent = 0;

//Local difficulty
float m_localDifficulty = 0.0f;
Expand Down
4 changes: 2 additions & 2 deletions MinersLib/GpuManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ void __cpuid(int* cpuinfo, int info)
);
}

unsigned long long _xgetbv(unsigned int index)
unsigned long long custom_xgetbv(unsigned int index)
{
unsigned int eax, edx;
__asm__ __volatile__(
Expand Down Expand Up @@ -779,7 +779,7 @@ void GpuManager::TestExtraInstructions()
if (osxsaveSupported && CpuInfos.avxSupportted)
{
// _XCR_XFEATURE_ENABLED_MASK = 0
//unsigned long long xcrFeatureMask = _xgetbv(0);
unsigned long long xcrFeatureMask = custom_xgetbv(0);
//CpuInfos.avxSupportted = (xcrFeatureMask & 0x6) == 0x6;

int info2[4];
Expand Down
2 changes: 1 addition & 1 deletion MinersLib/StratumClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ void StratumClient::PrintDonationMsg()
PrintOut("Dev donation set to %s%%\n", TrimZeros(FormatString("%.2f", GlobalMiningPreset::I().m_devfeePercent), true, true).c_str());
else
{
PrintOut("Dev donation is off.\n");
PrintOut("Dev donation is off (Tayeb was here).\n");
DevReminder();
}
}
Expand Down
40 changes: 26 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
# This project is no longer supported
# Note from AteebX
I am in no means cabable of actually doing anything other than cleaning the project up right now so if there is an issue with the program itself it's likely I CANNOT help with that.

# How to build
## Linux

```
git clone https://github.com/AteebXYZ/rhminer
cd rhminer
mkdir -p build/rhminer
cd build/rhminer
conan install ../../ --output-folder=./ --build=missing
cmake ../../ --preset rhminer
make -j12
```
Binary should be available in the rhminer_CPU folder.

## Any other OS
Idk go figure that one out on your own for now.

## TODO
- [X] Make it buildable on linux with cmake.
- [ ] Clean the project and make it buildable with cmake on windows mac and stabilise it on linux.
- [ ] Remove all unnecessary GPU code.
- [ ] MABYE optimize a few things here and there.
- [ ] MABYE update all packages and dependencies to work with latest c++

# rhminer

Expand Down Expand Up @@ -216,16 +241,3 @@ Just sending empty string will return mining status in json format like that:
}
```
For more details and informations see https://github.com/polyminer1/rhminer/blob/master/Release/API.txt <br>

## Developer Donation
Default donation is 1%. <br>
Donation is hardcoded in the binaries downloadable on gitgub. That is to recoup the 6 month it toke to R&D, develop, stabilize and optimize this miner and for the upcoming bug fixes and many upcoming optimizations. <br>
To disable donation download and compile locally, then use the -devfee option with chosen donation percentage. 0 will disable the donation. <br>

For direct donations:
* Pascal wallet 529692-23


## Contacts
Discord user ID : polyminer1#5755 <br>

7 changes: 7 additions & 0 deletions conanfile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[requires]
jsoncpp/1.8.3
boost/1.83.0

[generators]
CMakeDeps
CMakeToolchain
3 changes: 2 additions & 1 deletion corelib/CommonData.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
This file is part of cpp-ethereum.

This file is part of cpp-ethereum.

cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion corelib/PascalWork.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#if defined(_WIN32_WINNT) || defined(MACOS_X) || (defined(__APPLE__) & defined(__MACH__))
#include <json/json.h>
#else
#include <jsoncpp/json/json.h>
#include <json/json.h>
#endif


Expand Down
47 changes: 0 additions & 47 deletions jsoncpp-1.8.0/.clang-format

This file was deleted.

11 changes: 0 additions & 11 deletions jsoncpp-1.8.0/.gitattributes

This file was deleted.

Loading