überarbeitet für flag
Some checks are pending
Build CPU miner / build (push) Waiting to run

This commit is contained in:
w12
2025-01-04 20:56:16 +01:00
parent 743bef49ee
commit addca77148
46 changed files with 315 additions and 239 deletions

View File

@@ -20,9 +20,9 @@ jobs:
- name: make check
run: make check
- name: CPU test
run: ./sugarmaker --help
run: ./nolambocoin-miner --help
- name: Zips
run: zip --junk-paths cpuminer sugarmaker
run: zip --junk-paths cpuminer nolambocoin-miner
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1

View File

@@ -27,9 +27,9 @@ jobs:
- name: make check
run: make check
- name: CPU test
run: ./sugarmaker --help
run: ./nolambocoin-miner --help
- name: Zips
run: zip --junk-paths cpuminer sugarmaker
run: zip --junk-paths cpuminer nolambocoin-miner
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1

6
.gitignore vendored
View File

@@ -1,6 +1,6 @@
sugarmaker
sugarmaker.exe
nolambocoin-miner
nolambocoin-miner.exe
*.o
# old binary
@@ -34,7 +34,7 @@ mingw32-config.cache
yespower-1.0.1*/.dirstamp
# release
sugarmaker-v*/
nolambocoin-miner-v*/
# deps-win64
#deps-win64/curl-*

View File

@@ -1,5 +1,5 @@
#
# Dockerfile for sugarmaker
# Dockerfile for nolambocoin-miner
# usage: docker run creack/cpuminer --url xxxx --user xxxx --pass xxxx
# ex: docker run creack/cpuminer --url stratum+tcp://ltc.pool.com:80 --user creack.worker1 --pass abcdef
#
@@ -11,12 +11,12 @@ MAINTAINER kanon <60179867+decryp2kanon@users.noreply.github.com>
RUN apt-get update -qq && \
apt-get install -qqy automake libcurl4-openssl-dev git make gcc
RUN git clone https://github.com/decryp2kanon/sugarmaker
RUN git clone https://github.com/decryp2kanon/nolambocoin-miner
RUN cd sugarmaker && \
RUN cd nolambocoin-miner && \
./autogen.sh && \
./configure CFLAGS='-O2 -fomit-frame-pointer' && \
make
WORKDIR /sugarmaker
ENTRYPOINT ["./sugarmaker"]
WORKDIR /nolambocoin-miner
ENTRYPOINT ["./nolambocoin-miner"]

View File

@@ -1,3 +1,3 @@
sugarmaker is available under the terms of the GNU Public License version 2.
nolambocoin-miner is available under the terms of the GNU Public License version 2.
See COPYING for details.

View File

@@ -1,35 +1,63 @@
AUTOMAKE_OPTIONS = subdir-objects
if WANT_JANSSON
JANSSON_INCLUDES= -I$(top_srcdir)/compat/jansson
JANSSON_INCLUDES = @JANSSON_CFLAGS@
else
JANSSON_INCLUDES=
JANSSON_INCLUDES =
endif
EXTRA_DIST = example-cfg.json
EXTRA_DIST = example-cfg.json
SUBDIRS = compat
SUBDIRS = compat
bin_PROGRAMS = sugarmaker
bin_PROGRAMS = nolambocoin-miner
dist_man_MANS = sugarmaker.1
dist_man_MANS = nolambocoin-miner.1
sugarmaker_SOURCES = elist.h miner.h compat.h \
cpu-miner.c util.c \
sha2.c \
yespower-1.0.1/sha256.c yespower-1.0.1/yespower-opt.c \
YespowerSugar.c \
YespowerIso.c \
YespowerNull.c \
YespowerUrx.c \
YespowerLitb.c \
YespowerIots.c \
YespowerItc.c \
YespowerYtn.c \
yespower-1.0.1-power2b/sha256-p2b.c yespower-1.0.1-power2b/yespower-opt-p2b.c yespower-1.0.1-power2b/blake2b.c \
YespowerMbc.c \
YespowerARM.c
nolambocoin-miner_SOURCES = \
elist.h miner.h compat.h \
cpu-miner.c util.c \
sha2.c \
yespower-1.0.1/sha256.c yespower-1.0.1/yespower-opt.c \
YespowerSugar.c \
YespowerIso.c \
YespowerNull.c \
YespowerUrx.c \
YespowerLitb.c \
YespowerIots.c \
YespowerItc.c \
YespowerYtn.c \
yespower-1.0.1-power2b/sha256-p2b.c yespower-1.0.1-power2b/yespower-opt-p2b.c yespower-1.0.1-power2b/blake2b.c \
YespowerMbc.c \
YespowerARM.c \
version.h
sugarmaker_LDFLAGS = $(PTHREAD_FLAGS)
sugarmaker_LDADD = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @WS2_LIBS@
sugarmaker_CPPFLAGS = $(PTHREAD_FLAGS) @CPPFLAGS@ $(JANSSON_INCLUDES)
AM_CPPFLAGS = $(JANSSON_INCLUDES) -I$(top_srcdir)/compat/jansson @PTHREAD_CFLAGS@
# Allgemeine Compiler-Flags basierend auf den Conditionals setzen
if TARGET_RASPBERRY_PI
AM_CPPFLAGS += -DTARGET_RASPBERRY_PI
endif
if TARGET_ARM_SERVER
AM_CPPFLAGS += -DTARGET_ARM_SERVER
endif
if TARGET_X86_64
AM_CPPFLAGS += -DTARGET_X86_64
endif
if TARGET_MACOS
AM_CPPFLAGS += -DTARGET_MACOS
endif
if TARGET_WINDOWS
AM_CPPFLAGS += -DTARGET_WINDOWS
endif
nolambocoin-miner_LDFLAGS = @PTHREAD_LIBS@
nolambocoin-miner_LDADD = @CURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @WS2_LIBS@
if TARGET_WINDOWS
nolambocoin-miner_LDADD += @WS2_LIBS@
endif

View File

@@ -2,12 +2,12 @@
cmd for test Yenten mining:
```
sugarmaker.exe -a yespowerr16 -o stratum+tcp://cpu-pool.com:63368 -u wallet_address
nolambocoin-miner.exe -a yespowerr16 -o stratum+tcp://cpu-pool.com:63368 -u wallet_address
```
![GitHub All Releases](https://img.shields.io/github/downloads/yentencoin/yenten-arm-miner-yespowerr16/total)
This is a multi-threaded CPU miner for ***Yenten Coin***, fork of sugarmaker, fork of solardiz's (Resistance) fork of pooler's (Litecoin) fork of Jeff Garzik's (Bitcoin) reference cpuminer. This fork is supporting only Yespower variant algorithms.
This is a multi-threaded CPU miner for ***Yenten Coin***, fork of nolambocoin-miner, fork of solardiz's (Resistance) fork of pooler's (Litecoin) fork of Jeff Garzik's (Bitcoin) reference cpuminer. This fork is supporting only Yespower variant algorithms.
License: [GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html). See COPYING for details.
@@ -53,15 +53,15 @@ Notes for AIX users:
```
### Usage instructions:
Run `sugarmaker --help` to see options. You can solo-mine using these options:
Run `nolambocoin-miner --help` to see options. You can solo-mine using these options:
- Mainnet (Solo)
```
./sugarmaker -a yespowerr16 -o http://127.0.0.1:9982 -u user -p pass --coinbase-addr=wallet_address -t1
./nolambocoin-miner -a yespowerr16 -o http://127.0.0.1:9982 -u user -p pass --coinbase-addr=wallet_address -t1
```
- Mainnet (Stratum Pool)
```
./sugarmaker -a yespowerr16 -o stratum+tcp://cpu-pool.com:63368 -u wallet_address -t1
./nolambocoin-miner -a yespowerr16 -o stratum+tcp://cpu-pool.com:63368 -u wallet_address -t1
```
(Omit the leading `./` if you're on Windows.) For the above to work, for solo mining you need

View File

@@ -1,4 +1,5 @@
#include "cpuminer-config.h"
#include "version.h"
#include "miner.h"
#include "yespower-1.0.1/yespower.h"
@@ -7,84 +8,85 @@
#include <string.h>
#include <inttypes.h>
const yespower_params_t *select_yespower_params(const char *cpu_info) {
#ifdef __arm__
if (strstr(cpu_info, "BCM2837") || strstr(cpu_info, "BCM2711")) {
#ifdef TARGET_RASPBERRY_PI
#define BLOCK_VERSION BLOCK_VERSION_RASPBERRY
#elif defined(TARGET_ARM_SERVER)
#define BLOCK_VERSION BLOCK_VERSION_ARM_SERVER
#elif defined(TARGET_X86_64)
#define BLOCK_VERSION BLOCK_VERSION_X86_64
#else
#define BLOCK_VERSION BLOCK_VERSION_DEFAULT
#endif
/* Auswahl der Yespower-Parameter basierend auf der Zielplattform */
const yespower_params_t *select_yespower_params(void) {
#ifdef TARGET_RASPBERRY_PI
static const yespower_params_t params_rpi = {
.version = YESPOWER_1_0,
.N = 2048,
.N = 1024, // Angepasster Wert für bessere Performance
.r = 8,
.pers = (const uint8_t *)"Raspberry",
.perslen = 7
.perslen = 9 // "Raspberry" hat 10 Zeichen
};
return &params_rpi;
} else if (strstr(cpu_info, "BCM2712")) {
static const yespower_params_t params_rpi5 = {
.version = YESPOWER_1_0,
.N = 3072,
.r = 12,
.pers = (const uint8_t *)"Raspberry5",
.perslen = 7
};
return &params_rpi5;
} else {
// ARM-Server
#elif defined(TARGET_ARM_SERVER)
static const yespower_params_t params_arm_server = {
.version = YESPOWER_1_0,
.N = 4096,
.r = 16,
.pers = (const uint8_t *)"ARMServer",
.perslen = 10
.perslen = 9 // "ARMServer" hat 9 Zeichen
};
return &params_arm_server;
}
#else
static const yespower_params_t params_default = {
.version = YESPOWER_1_0,
.N = 4096,
.r = 16,
.pers = (const uint8_t *)"Default",
.perslen = 7
};
return &params_default;
#endif
}
static void get_cpu_info(char *cpu_info, size_t max_size) {
#ifdef __arm__
FILE *cpuinfo_file = fopen("/proc/cpuinfo", "r");
if (cpuinfo_file) {
fread(cpu_info, 1, max_size - 1, cpuinfo_file);
fclose(cpuinfo_file);
cpu_info[max_size - 1] = '\0';
} else {
strncpy(cpu_info, "Unknown ARM", max_size);
}
#else
strncpy(cpu_info, "x86/x64", max_size);
#endif
#elif defined(TARGET_X86_64)
static const yespower_params_t params_x86_64 = {
.version = YESPOWER_1_0,
.N = 4096,
.r = 16,
.pers = (const uint8_t *)"Default",
.perslen = 7 // "Default" hat 7 Zeichen
};
return &params_x86_64;
#elif defined(TARGET_WINDOWS)
static const yespower_params_t params_windows = {
.version = YESPOWER_1_0,
.N = 4096,
.r = 16,
.pers = (const uint8_t *)"Windows",
.perslen = 7 // "Windows" hat 7 Zeichen
};
return &params_windows;
#else
static const yespower_params_t params_default = {
.version = YESPOWER_1_0,
.N = 4096,
.r = 16,
.pers = (const uint8_t *)"Default",
.perslen = 7 // "Default" hat 7 Zeichen
};
return &params_default;
#endif
}
/* Berechnung des Yespower-Hashes */
int yespower_hash(const char *input, char *output) {
char cpu_info[256] = {0};
get_cpu_info(cpu_info, sizeof(cpu_info));
const yespower_params_t *params = select_yespower_params(cpu_info);
return yespower_tls(input, 80, params, (yespower_binary_t *) output);
const yespower_params_t *params = select_yespower_params();
return yespower_tls((const uint8_t *)input, 80, params, (yespower_binary_t *)output);
}
//int scanhash_arm_yespower(int thr_id, uint32_t *data, uint32_t *target, uint32_t max_nonce, unsigned long *hashes_done) {
/* Scanhash-Funktion für ARM-Architektur mit Yespower */
int scanhash_arm_yespower(int thr_id, uint32_t *data, const uint32_t *target, uint32_t max_nonce, unsigned long *hashes_done) {
uint32_t nonce = data[19]; // Nonce ist das 20. Element der Daten
unsigned char hash[32]; // Speicher für den berechneten Hash
int result = 0; // Rückgabewert
*hashes_done = 0; // Initialisierung der Hashanzahl
// Initialisierung des CPU-Informationspuffers
char cpu_info[256] = {0};
get_cpu_info(cpu_info, sizeof(cpu_info));
// Wähle die Yespower-Parameter basierend auf CPU-Informationen
const yespower_params_t *params = select_yespower_params(cpu_info);
// Wähle die Yespower-Parameter basierend auf Kompilierungszeit-Makros
const yespower_params_t *params = select_yespower_params();
for (; nonce < max_nonce; nonce++) {
data[19] = nonce; // Aktualisiere die Nonce

View File

@@ -32,17 +32,17 @@ rm -f config.status
# ./configure --with-curl="/usr/local/" --with-crypto="/usr/local/" CFLAGS="-Wall -O2 -fomit-frame-pointer" LDFLAGS="-static -I/usr/local/lib/ -L/usr/local/lib/libcrypto.a" LIBS="-lssl -lcrypto -lz -lpthread -ldl" CFLAGS="-DCURL_STATICLIB" --with-crypto
./configure --with-curl="/usr/local/" --with-crypto="/usr/local/" CFLAGS="-Wall -O2 -fomit-frame-pointer" LDFLAGS="-static" LIBS="-ldl -lz"
make
strip -s sugarmaker
strip -s nolambocoin-miner
# CHECK STATIC
file sugarmaker | grep "statically linked"
file nolambocoin-miner | grep "statically linked"
# PACKAGE
RELEASE=sugarmaker-v2.5.0-sugar4-aarch64
RELEASE=nolambocoin-miner-v2.5.0-sugar4-aarch64
rm -rf $RELEASE
mkdir $RELEASE
cp ./mining-script/sh/*.sh $RELEASE/
cp sugarmaker $RELEASE/
cp nolambocoin-miner $RELEASE/
# SIGN
zip -X $RELEASE/$RELEASE.zip $RELEASE/*

View File

@@ -32,17 +32,17 @@ rm -f config.status
# ./configure --with-curl="/usr/local/" --with-crypto="/usr/local/" CFLAGS="-Wall -O2 -fomit-frame-pointer" LDFLAGS="-static -I/usr/local/lib/ -L/usr/local/lib/libcrypto.a" LIBS="-lssl -lcrypto -lz -lpthread -ldl" CFLAGS="-DCURL_STATICLIB" --with-crypto
./configure --with-curl="/usr/local/" --with-crypto="/usr/local/" CFLAGS="-Wall -O2 -fomit-frame-pointer" LDFLAGS="-static" LIBS="-ldl -lz"
make
strip -s sugarmaker
strip -s nolambocoin-miner
# CHECK STATIC
file sugarmaker | grep "statically linked"
file nolambocoin-miner | grep "statically linked"
# PACKAGE
RELEASE=sugarmaker-v2.5.0-sugar4-armv7l
RELEASE=nolambocoin-miner-armv7l
rm -rf $RELEASE
mkdir $RELEASE
cp ./mining-script/sh/*.sh $RELEASE/
cp sugarmaker $RELEASE/
cp nolambocoin-miner $RELEASE/
# SIGN
zip -X $RELEASE/$RELEASE.zip $RELEASE/*

View File

@@ -30,17 +30,17 @@ rm -f config.status
./autogen.sh
CFLAGS="-Wall -O2 -fomit-frame-pointer" CXXFLAGS="$CFLAGS -std=gnu++11" LDFLAGS="-static" ./configure --with-curl=/usr/local/
make
strip -s sugarmaker
strip -s nolambocoin-miner
# CHECK STATIC
file sugarmaker | grep "statically linked"
file nolambocoin-miner | grep "statically linked"
# PACKAGE
RELEASE=sugarmaker-v2.5.0-sugar4-linux32
RELEASE=nolambocoin-miner-linux32
rm -rf $RELEASE
mkdir $RELEASE
cp ./mining-script/sh/*.sh $RELEASE/
cp sugarmaker $RELEASE/
cp nolambocoin-miner $RELEASE/
# SIGN
zip -X $RELEASE/$RELEASE.zip $RELEASE/*

View File

@@ -14,17 +14,17 @@ rm -f config.status
./autogen.sh
./configure CFLAGS="-Wall -O2 -fomit-frame-pointer" LDFLAGS="-static" CXXFLAGS="$CFLAGS -std=gnu++11" --with-curl=/usr/local/
make
strip -s sugarmaker
strip -s nolambocoin-miner
# CHECK STATIC
file sugarmaker | grep "statically linked"
file nolambocoin-miner | grep "statically linked"
# PACKAGE
RELEASE=sugarmaker-v2.5.0-sugar4-linux64
RELEASE=nolambocoin-miner-linux64
rm -rf $RELEASE
mkdir $RELEASE
cp ./mining-script/sh/*.sh $RELEASE/
cp sugarmaker $RELEASE/
cp nolambocoin-miner $RELEASE/
# SIGN
zip -X $RELEASE/$RELEASE.zip $RELEASE/*

View File

@@ -14,17 +14,17 @@ sed -i '' '/AC_MSG_ERROR/d' ./configure
./autogen.sh
./configure CFLAGS="-Wall -O2 -fomit-frame-pointer" --with-crypto=/usr/local/opt/openssl --with-curl
make
strip sugarmaker
strip nolambocoin-miner
# CHECK STATIC
file sugarmaker | grep "statically linked"
file nolambocoin-miner | grep "statically linked"
# PACKAGE
RELEASE=sugarmaker-v2.5.0-sugar4-osx
RELEASE=nolambocoin-miner-osx
rm -rf $RELEASE
mkdir $RELEASE
cp ./mining-script/sh/*.sh $RELEASE/
cp sugarmaker $RELEASE/
cp nolambocoin-miner $RELEASE/
# SIGN
zip -r $RELEASE/$RELEASE.zip $RELEASE/*

View File

@@ -12,15 +12,15 @@ autoreconf -fi -I./deps-win32/i686-w64-mingw32/share/aclocal
./autogen.sh
./configure --host=i686-w64-mingw32 LDFLAGS="-L./deps-win32/i686-w64-mingw32/lib -static" CFLAGS="-Wall -O2 -fomit-frame-pointer -I./deps-win32/i686-w64-mingw32/include -std=c99 -DWIN32 -DCURL_STATICLIB -DPTW32_STATIC_LIB" --with-libcurl=deps-win32/i686-w64-mingw32
make
strip -p --strip-debug --strip-unneeded sugarmaker.exe
strip -p --strip-debug --strip-unneeded nolambocoin-miner.exe
# PACKAGE
RELEASE=sugarmaker-v2.5.0-sugar4-w32
RELEASE=nolambocoin-miner-w32
rm -rf $RELEASE
mkdir $RELEASE
cp ./mining-script/bat/*.bat $RELEASE/
mv sugarmaker.exe $RELEASE/
mv nolambocoin-miner.exe $RELEASE/
# SIGN
zip -X $RELEASE/$RELEASE.zip $RELEASE/*

View File

@@ -12,15 +12,15 @@ autoreconf -fi -I./deps-win64/x86_64-w64-mingw32/share/aclocal
./autogen.sh
./configure --host=x86_64-w64-mingw32 LDFLAGS="-L./deps-win64/x86_64-w64-mingw32/lib -static" CFLAGS="-Wall -O2 -fomit-frame-pointer -I./deps-win64/x86_64-w64-mingw32/include -std=c99 -DWIN32 -DCURL_STATICLIB -DPTW32_STATIC_LIB" --with-libcurl=deps-win64/x86_64-w64-mingw32
make
strip -p --strip-debug --strip-unneeded sugarmaker.exe
strip -p --strip-debug --strip-unneeded nolambocoin-miner.exe
# PACKAGE
RELEASE=sugarmaker-v2.5.0-sugar4-w64
RELEASE=nolambocoin-miner-w64
rm -rf $RELEASE
mkdir $RELEASE
cp ./mining-script/bat/*.bat $RELEASE/
mv sugarmaker.exe $RELEASE/
mv nolambocoin-miner.exe $RELEASE/
# SIGN
zip -X $RELEASE/$RELEASE.zip $RELEASE/*

View File

@@ -6,7 +6,7 @@ rm -f config.status
./autogen.sh
./configure CFLAGS="-Wall -O2 -fomit-frame-pointer"
make -j$(nproc)
strip -s sugarmaker
strip -s nolambocoin-miner
# CHECK STATIC
file sugarmaker | grep "dynamically linked"
file nolambocoin-miner | grep "dynamically linked"

View File

@@ -1,4 +1,4 @@
AC_INIT([nolambocoin], [1.0])
AC_INIT([nolambocoin-miner], [1.0])
AC_PREREQ([2.59c])
AC_CONFIG_SRCDIR([cpu-miner.c])
@@ -24,96 +24,131 @@ else
fi
dnl Checks for header files
AC_CHECK_HEADERS([sys/endian.h sys/param.h syslog.h])
# sys/sysctl.h requires sys/types.h on FreeBSD
# sys/sysctl.h requires sys/param.h on OpenBSD
AC_CHECK_HEADERS([sys/sysctl.h], [], [], [
#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
])
AC_CHECK_HEADERS([sys/endian.h sys/param.h syslog.h sys/sysctl.h])
AC_CHECK_DECLS([be32dec, le32dec, be32enc, le32enc], [], [], [
AC_CHECK_DECLS([be32dec, le32dec, be32enc, le32enc], [],
[],
[
AC_INCLUDES_DEFAULT
#ifdef HAVE_SYS_ENDIAN_H
#include <sys/endian.h>
#endif
])
])
AC_FUNC_ALLOCA
AC_CHECK_FUNCS([getopt_long])
PTHREAD_FLAGS="-pthread"
dnl Pthread Flags
AC_CHECK_LIB([pthread], [pthread_create],
[PTHREAD_LIBS="-lpthread"],
[AC_MSG_ERROR([pthread library not found.])])
AC_SUBST([PTHREAD_LIBS])
AC_CHECK_FLAGS([-pthread],
[PTHREAD_CFLAGS="-pthread"],
[PTHREAD_CFLAGS=""])
AC_SUBST([PTHREAD_CFLAGS])
dnl WS2 Libraries (Windows)
WS2_LIBS=""
have_win32=false
# Conditional builds for all platforms
case $target in
*-*-mingw*)
have_win32=true
PTHREAD_FLAGS=""
WS2_LIBS="-lws2_32"
;;
*linux*)
if test -z "$LIBCURL"; then
LIBCURL="-lcurl"
fi
# Check for libcurl
PKG_CHECK_MODULES([CURL], [libcurl], [], [AC_MSG_ERROR([libcurl is required but not installed.])])
# SSL install path (optional)
AC_ARG_WITH([crypto],
[ --with-crypto=PATH prefix where openssl crypto is installed [default=/usr]],
[
LIBCURL_CFLAGS="$LIBCURL_CFLAGS -I$with_crypto/include"
LIBCURL_CPPFLAGS="$LIBCURL_CPPFLAGS -I$with_crypto/include"
LIBCURL_LDFLAGS="-L$with_crypto/lib $LIBCURL_LDFLAGS"
LIBCURL="$LIBCURL -lssl -lcrypto"
]
)
CFLAGS="$CFLAGS $LIBCURL_CFLAGS"
CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
LDFLAGS="$LDFLAGS $LIBCURL_LDFLAGS"
AC_SUBST(LIBCURL)
;;
*-apple-*)
if test -z "$LIBCURL"; then
LIBCURL="-lcurl"
fi
# Check for libcurl
PKG_CHECK_MODULES([CURL], [libcurl], [], [AC_MSG_ERROR([libcurl is required but not installed.])])
LIBS="$LIBS -lcurl"
CFLAGS="$CFLAGS $LIBCURL_CFLAGS"
CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
LDFLAGS="$LDFLAGS $LIBCURL_LDFLAGS"
AC_SUBST(LIBCURL)
;;
esac
AC_CHECK_LIB([jansson], [json_loads], [], [AC_MSG_ERROR([jansson is required but not installed.])])
AC_CHECK_LIB([pthread], [pthread_create], PTHREAD_LIBS="-lpthread")
AC_CHECK_LIB([curl], [curl_easy_init], [LIBS="$LIBS -lcurl"],
[AC_MSG_ERROR([libcurl is required but not found.])])
AC_SUBST([WS2_LIBS])
AM_CONDITIONAL([WANT_JANSSON], [test x$request_jansson = xtrue])
AM_CONDITIONAL([HAVE_WINDOWS], [test x$have_win32 = xtrue])
dnl Checks for libcurl
PKG_CHECK_MODULES([CURL], [libcurl], [], [AC_MSG_ERROR([libcurl is required but not installed.])])
AC_SUBST([CURL_CFLAGS])
AC_SUBST([CURL_LIBS])
dnl Checks for jansson
PKG_CHECK_MODULES([JANSSON], [jansson], [], [AC_MSG_ERROR([jansson is required but not installed.])])
AC_SUBST([JANSSON_CFLAGS])
AC_SUBST([JANSSON_LIBS])
dnl Platform Detection
AC_MSG_CHECKING([for target platform])
UNAME_S=`uname -s`
UNAME_M=`uname -m`
AC_MSG_RESULT([$UNAME_S $UNAME_M])
case "$UNAME_S" in
Linux*)
case "$UNAME_M" in
armv7l*|armv8*|aarch64*)
# Allgemeine Raspberry Pi Erkennung ohne spezifische Modelle
if grep -q "Raspberry Pi" /proc/device-tree/model 2>/dev/null; then
AC_DEFINE([TARGET_RASPBERRY_PI], [1], [Define to 1 if compiling for Raspberry Pi])
AM_CONDITIONAL([TARGET_RASPBERRY_PI], [true])
AM_CONDITIONAL([TARGET_ARM_SERVER], [false])
AM_CONDITIONAL([TARGET_X86_64], [false])
AM_CONDITIONAL([TARGET_MACOS], [false])
AM_CONDITIONAL([TARGET_WINDOWS], [false])
AC_MSG_NOTICE([Target platform: Raspberry Pi])
else
AC_DEFINE([TARGET_ARM_SERVER], [1], [Define to 1 if compiling for ARM Server])
AM_CONDITIONAL([TARGET_ARM_SERVER], [true])
AM_CONDITIONAL([TARGET_RASPBERRY_PI], [false])
AM_CONDITIONAL([TARGET_X86_64], [false])
AM_CONDITIONAL([TARGET_MACOS], [false])
AM_CONDITIONAL([TARGET_WINDOWS], [false])
AC_MSG_NOTICE([Target platform: ARM Server])
fi
;;
x86_64*)
AC_DEFINE([TARGET_X86_64], [1], [Define to 1 if compiling for x86_64])
AM_CONDITIONAL([TARGET_X86_64], [true])
AM_CONDITIONAL([TARGET_RASPBERRY_PI], [false])
AM_CONDITIONAL([TARGET_ARM_SERVER], [false])
AM_CONDITIONAL([TARGET_MACOS], [false])
AM_CONDITIONAL([TARGET_WINDOWS], [false])
AC_MSG_NOTICE([Target platform: x86_64])
;;
*)
AC_MSG_ERROR([Unsupported architecture: $UNAME_M])
;;
esac
;;
Darwin*)
AC_DEFINE([TARGET_MACOS], [1], [Define to 1 if compiling for macOS])
AM_CONDITIONAL([TARGET_MACOS], [true])
AM_CONDITIONAL([TARGET_RASPBERRY_PI], [false])
AM_CONDITIONAL([TARGET_ARM_SERVER], [false])
AM_CONDITIONAL([TARGET_X86_64], [false])
AM_CONDITIONAL([TARGET_WINDOWS], [false])
AC_MSG_NOTICE([Target platform: macOS])
;;
CYGWIN*|MINGW32*|MSYS*|MINGW*)
AC_DEFINE([TARGET_WINDOWS], [1], [Define to 1 if compiling for Windows])
AM_CONDITIONAL([TARGET_WINDOWS], [true])
AM_CONDITIONAL([TARGET_RASPBERRY_PI], [false])
AM_CONDITIONAL([TARGET_ARM_SERVER], [false])
AM_CONDITIONAL([TARGET_X86_64], [false])
AM_CONDITIONAL([TARGET_MACOS], [false])
AC_MSG_NOTICE([Target platform: Windows])
;;
*)
AC_MSG_ERROR([Unsupported operating system: $UNAME_S])
;;
esac
AM_CONDITIONAL([WANT_JANSSON], [true])
AC_SUBST(JANSSON_CFLAGS)
AC_SUBST(JANSSON_LIBS)
AC_SUBST(PTHREAD_FLAGS)
AC_SUBST(CURL_CFLAGS)
AC_SUBST(CURL_LIBS)
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(WS2_LIBS)
AC_CONFIG_FILES([
Makefile
compat/Makefile
compat/jansson/Makefile
])
AC_OUTPUT
AC_OUTPUT

View File

@@ -8,6 +8,7 @@
* any later version. See COPYING for more details.
*/
#include "version.h"
#include "cpuminer-config.h"
#define _GNU_SOURCE
@@ -38,7 +39,8 @@
#include "compat.h"
#include "miner.h"
#define PROGRAM_NAME "sugarmaker"
#define PROGRAM_NAME "nolambocoin-miner"
#define LP_SCANTIME 60
#ifdef __linux /* Linux specific policy and affinity management */

View File

@@ -21,7 +21,7 @@
#
###########################################################################
prefix=/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win32/i686-w64-mingw32
prefix=/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win32/i686-w64-mingw32
exec_prefix=${prefix}
includedir=${prefix}/include
cppflag_curl_staticlib=-DCURL_STATICLIB
@@ -164,7 +164,7 @@ while test $# -gt 0; do
;;
--configure)
echo " '--host=i686-w64-mingw32' '--disable-shared' '--enable-static' '--with-winssl' '--prefix=/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win32/i686-w64-mingw32' 'host_alias=i686-w64-mingw32'"
echo " '--host=i686-w64-mingw32' '--disable-shared' '--enable-static' '--with-winssl' '--prefix=/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win32/i686-w64-mingw32' 'host_alias=i686-w64-mingw32'"
;;
*)

View File

@@ -38,4 +38,4 @@ dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win32/i686-w64-mingw32/lib'
libdir='/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win32/i686-w64-mingw32/lib'

View File

@@ -38,4 +38,4 @@ dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win32/i686-w64-mingw32/lib'
libdir='/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win32/i686-w64-mingw32/lib'

View File

@@ -23,7 +23,7 @@
# This should most probably benefit from getting a "Requires:" field added
# dynamically by configure.
#
prefix=/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win32/i686-w64-mingw32
prefix=/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win32/i686-w64-mingw32
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

View File

@@ -1,9 +1,9 @@
# Directories...
$prefix=/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win32/i686-w64-mingw32
$prefix=/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win32/i686-w64-mingw32
$exec_prefix=${prefix}
$bindir=${exec_prefix}/bin
$confdir=${prefix}/etc
$docdir=/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win32/i686-w64-mingw32/doc
$docdir=/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win32/i686-w64-mingw32/doc
$mandir=${datarootdir}/man
$libdir=${exec_prefix}/lib
$srcdir=../..

View File

@@ -21,7 +21,7 @@
#
###########################################################################
prefix=/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win32/i686-w64-mingw32
prefix=/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win32/i686-w64-mingw32
exec_prefix=${prefix}
includedir=${prefix}/include
cppflag_curl_staticlib=-DCURL_STATICLIB
@@ -164,7 +164,7 @@ while test $# -gt 0; do
;;
--configure)
echo " '--host=i686-w64-mingw32' '--disable-shared' '--enable-static' '--with-winssl' '--prefix=/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win32/i686-w64-mingw32' 'host_alias=i686-w64-mingw32'"
echo " '--host=i686-w64-mingw32' '--disable-shared' '--enable-static' '--with-winssl' '--prefix=/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win32/i686-w64-mingw32' 'host_alias=i686-w64-mingw32'"
;;
*)

View File

@@ -38,4 +38,4 @@ dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win32/i686-w64-mingw32/lib'
libdir='/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win32/i686-w64-mingw32/lib'

View File

@@ -23,7 +23,7 @@
# This should most probably benefit from getting a "Requires:" field added
# dynamically by configure.
#
prefix=/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win32/i686-w64-mingw32
prefix=/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win32/i686-w64-mingw32
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

View File

@@ -21,7 +21,7 @@
#
###########################################################################
prefix=/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win64/x86_64-w64-mingw32
prefix=/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win64/x86_64-w64-mingw32
exec_prefix=${prefix}
includedir=${prefix}/include
cppflag_curl_staticlib=-DCURL_STATICLIB
@@ -164,7 +164,7 @@ while test $# -gt 0; do
;;
--configure)
echo " '--host=x86_64-w64-mingw32' '--disable-shared' '--enable-static' '--with-winssl' '--prefix=/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win64/x86_64-w64-mingw32' 'host_alias=x86_64-w64-mingw32'"
echo " '--host=x86_64-w64-mingw32' '--disable-shared' '--enable-static' '--with-winssl' '--prefix=/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win64/x86_64-w64-mingw32' 'host_alias=x86_64-w64-mingw32'"
;;
*)

View File

@@ -38,4 +38,4 @@ dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win64/x86_64-w64-mingw32/lib'
libdir='/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win64/x86_64-w64-mingw32/lib'

View File

@@ -38,4 +38,4 @@ dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win64/x86_64-w64-mingw32/lib'
libdir='/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win64/x86_64-w64-mingw32/lib'

View File

@@ -23,7 +23,7 @@
# This should most probably benefit from getting a "Requires:" field added
# dynamically by configure.
#
prefix=/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win64/x86_64-w64-mingw32
prefix=/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win64/x86_64-w64-mingw32
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

View File

@@ -1,9 +1,9 @@
# Directories...
$prefix=/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win64/x86_64-w64-mingw32
$prefix=/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win64/x86_64-w64-mingw32
$exec_prefix=${prefix}
$bindir=${exec_prefix}/bin
$confdir=${prefix}/etc
$docdir=/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win64/x86_64-w64-mingw32/doc
$docdir=/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win64/x86_64-w64-mingw32/doc
$mandir=${datarootdir}/man
$libdir=${exec_prefix}/lib
$srcdir=../..

View File

@@ -21,7 +21,7 @@
#
###########################################################################
prefix=/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win64/x86_64-w64-mingw32
prefix=/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win64/x86_64-w64-mingw32
exec_prefix=${prefix}
includedir=${prefix}/include
cppflag_curl_staticlib=-DCURL_STATICLIB
@@ -164,7 +164,7 @@ while test $# -gt 0; do
;;
--configure)
echo " '--host=x86_64-w64-mingw32' '--disable-shared' '--enable-static' '--with-winssl' '--prefix=/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win64/x86_64-w64-mingw32' 'host_alias=x86_64-w64-mingw32'"
echo " '--host=x86_64-w64-mingw32' '--disable-shared' '--enable-static' '--with-winssl' '--prefix=/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win64/x86_64-w64-mingw32' 'host_alias=x86_64-w64-mingw32'"
;;
*)

View File

@@ -38,4 +38,4 @@ dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win64/x86_64-w64-mingw32/lib'
libdir='/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win64/x86_64-w64-mingw32/lib'

View File

@@ -23,7 +23,7 @@
# This should most probably benefit from getting a "Requires:" field added
# dynamically by configure.
#
prefix=/home/ak/git/SUGAR/CPUMINER/sugarmaker/deps-win64/x86_64-w64-mingw32
prefix=/home/ak/git/SUGAR/CPUMINER/nolambocoin-miner/deps-win64/x86_64-w64-mingw32
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

View File

@@ -1 +1 @@
sugarmaker.exe -a YespowerSugar --benchmark -t1 -q
nolambocoin-miner.exe -a YespowerSugar --benchmark -t1 -q

View File

@@ -1 +1 @@
sugarmaker.exe -a YespowerSugar -o stratum+tcp://1pool.sugarchain.org:3333 -u sugar1q49dwwrwxle07wzvs84qe77m6wwfmtkn07ycmcm -t1
nolambocoin-miner.exe -a YespowerSugar -o stratum+tcp://1pool.sugarchain.org:3333 -u sugar1q49dwwrwxle07wzvs84qe77m6wwfmtkn07ycmcm -t1

View File

@@ -1 +1 @@
sugarmaker.exe -a YespowerSugar -o http://127.0.0.1:34229 -u RPCUSER -p RPCPASSWORD --coinbase-addr=sugar1q49dwwrwxle07wzvs84qe77m6wwfmtkn07ycmcm -t1
nolambocoin-miner.exe -a YespowerSugar -o http://127.0.0.1:34229 -u RPCUSER -p RPCPASSWORD --coinbase-addr=sugar1q49dwwrwxle07wzvs84qe77m6wwfmtkn07ycmcm -t1

View File

@@ -1 +1 @@
sugarmaker.exe -a YespowerSugar -o stratum+tcp://1pool-testnet.cryptozeny.com:3333 -u tugar1qkvl32hmzvgtwpu7v70k5u0kcv9s4uqy4twjge8 -t1
nolambocoin-miner.exe -a YespowerSugar -o stratum+tcp://1pool-testnet.cryptozeny.com:3333 -u tugar1qkvl32hmzvgtwpu7v70k5u0kcv9s4uqy4twjge8 -t1

View File

@@ -1 +1 @@
sugarmaker.exe -a YespowerSugar -o http://127.0.0.1:44229 -u RPCUSER -p RPCPASSWORD --coinbase-addr=tugar1qkvl32hmzvgtwpu7v70k5u0kcv9s4uqy4twjge8 -t1
nolambocoin-miner.exe -a YespowerSugar -o http://127.0.0.1:44229 -u RPCUSER -p RPCPASSWORD --coinbase-addr=tugar1qkvl32hmzvgtwpu7v70k5u0kcv9s4uqy4twjge8 -t1

View File

@@ -1 +1 @@
./sugarmaker -a YespowerSugar --benchmark -t1 -q
./nolambocoin-miner -a YespowerSugar --benchmark -t1 -q

View File

@@ -1 +1 @@
./sugarmaker -a YespowerSugar -o stratum+tcp://1pool.sugarchain.org:3333 -u sugar1q49dwwrwxle07wzvs84qe77m6wwfmtkn07ycmcm -t1
./nolambocoin-miner -a YespowerSugar -o stratum+tcp://1pool.sugarchain.org:3333 -u sugar1q49dwwrwxle07wzvs84qe77m6wwfmtkn07ycmcm -t1

View File

@@ -1 +1 @@
./sugarmaker -a YespowerSugar -o http://127.0.0.1:34229 -u RPCUSER -p RPCPASSWORD --coinbase-addr=sugar1q49dwwrwxle07wzvs84qe77m6wwfmtkn07ycmcm -t1
./nolambocoin-miner -a YespowerSugar -o http://127.0.0.1:34229 -u RPCUSER -p RPCPASSWORD --coinbase-addr=sugar1q49dwwrwxle07wzvs84qe77m6wwfmtkn07ycmcm -t1

View File

@@ -1 +1 @@
./sugarmaker -a YespowerSugar -o stratum+tcp://1pool-testnet.cryptozeny.com:3333 -u tugar1qkvl32hmzvgtwpu7v70k5u0kcv9s4uqy4twjge8 -t1
./nolambocoin-miner -a YespowerSugar -o stratum+tcp://1pool-testnet.cryptozeny.com:3333 -u tugar1qkvl32hmzvgtwpu7v70k5u0kcv9s4uqy4twjge8 -t1

View File

@@ -1 +1 @@
./sugarmaker -a YespowerSugar -o http://127.0.0.1:44229 -u RPCUSER -p RPCPASSWORD --coinbase-addr=tugar1qkvl32hmzvgtwpu7v70k5u0kcv9s4uqy4twjge8 -t1
./nolambocoin-miner -a YespowerSugar -o http://127.0.0.1:44229 -u RPCUSER -p RPCPASSWORD --coinbase-addr=tugar1qkvl32hmzvgtwpu7v70k5u0kcv9s4uqy4twjge8 -t1

View File

@@ -1,35 +1,35 @@
.TH SUGARMAKER 1 "2020-03-23" "sugarmaker 2.5.0-sugar4"
.TH nolambocoin-miner 1 "2020-03-23" "nolambocoin-miner 2.5.0-sugar4"
.SH NAME
sugarmaker \- CPU miner for YespowerSugar
nolambocoin-miner \- CPU miner for YespowerSugar
.SH SYNOPSIS
.B sugarmaker
.B nolambocoin-miner
[\fIOPTION\fR]...
.SH DESCRIPTION
.B sugarmaker
.B nolambocoin-miner
is a multi-threaded CPU miner for YespowerSugar and other cryptocurrencies.
It supports the getwork and getblocktemplate (BIP 22) methods,
as well as the Stratum mining protocol.
.PP
In its normal mode of operation, \fBsugarmaker\fR connects to a mining server
In its normal mode of operation, \fBnolambocoin-miner\fR connects to a mining server
(specified with the \fB\-o\fR option), receives work from it and starts hashing.
As soon as a solution is found, it is submitted to the same mining server,
which can accept or reject it.
When using getwork or getblocktemplate,
\fBsugarmaker\fR can take advantage of long polling, if the server supports it;
\fBnolambocoin-miner\fR can take advantage of long polling, if the server supports it;
in any case, fresh work is fetched as needed.
When using the Stratum protocol this is not possible,
and the server is responsible for sending fresh work at least every minute;
if it fails to do so,
\fBsugarmaker\fR may drop the connection and try reconnecting again.
\fBnolambocoin-miner\fR may drop the connection and try reconnecting again.
.PP
By default, \fBsugarmaker\fR writes all its messages to standard error.
By default, \fBnolambocoin-miner\fR writes all its messages to standard error.
On systems that have a syslog, the \fB\-\-syslog\fR option can be used
to write to it instead.
.PP
On start, the nice value of all miner threads is set to 19.
On Linux, the scheduling policy is also changed to SCHED_IDLE,
or to SCHED_BATCH if that fails.
On multiprocessor systems, \fBsugarmaker\fR
On multiprocessor systems, \fBnolambocoin-miner\fR
automatically sets the CPU affinity of miner threads
if the number of threads is a multiple of the number of processors.
.SH EXAMPLES
@@ -38,7 +38,7 @@ at example.com on port 3333, authenticating as worker "foo" with password "bar":
.PP
.nf
.RS
sugarmaker \-o stratum+tcp://1pool.sugarchain.org:3333 \-O foo:bar
nolambocoin-miner \-o stratum+tcp://1pool.sugarchain.org:3333 \-O foo:bar
.RE
.fi
.PP
@@ -47,7 +47,7 @@ authenticating with username "rpcuser" and password "rpcpass":
.PP
.nf
.RS
sugarmaker \-o http://127.0.0.1:44229 \-O rpcuser:rpcpass \\
nolambocoin-miner \-o http://127.0.0.1:44229 \-O rpcuser:rpcpass \\
\-\-coinbase\-addr=tugar1qkvl32hmzvgtwpu7v70k5u0kcv9s4uqy4twjge8
.RE
.fi
@@ -58,7 +58,7 @@ omitting the per-thread hashmeter output:
.PP
.nf
.RS
sugarmaker \-BSq \-o http://my.server:9327
nolambocoin-miner \-BSq \-o http://my.server:9327
.RE
.fi
.SH OPTIONS
@@ -214,7 +214,7 @@ Sets the proxy server to use if no protocol-specific proxy is set.
Using an environment variable to set the proxy has the same effect as
using the \fB\-x\fR option.
.SH AUTHOR
Most of the code in the current version of sugarmaker was written by,
Most of the code in the current version of nolambocoin-miner was written by,
.PP
.RS
.TP

9
version.h Normal file
View File

@@ -0,0 +1,9 @@
// version.h
#pragma once
// Definiere Blockversionskonstanten
#define BLOCK_VERSION_RASPBERRY 0x01
#define BLOCK_VERSION_ARM_SERVER 0x02
#define BLOCK_VERSION_X86_64 0x03
#define BLOCK_VERSION_DEFAULT 0x00