sync with local changes
Some checks failed
C/C++ CI / build-alpine-static (map[arch:riscv64 branch:latest-stable flags:-ffunction-sections]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:x86_64 branch:latest-stable flags:-ffunction-sections]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-10 cpp:g++-10 flags: os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 flags: os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 flags: os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-13 cpp:g++-13 flags: os:ubuntu-24.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-14 cpp:g++-14 flags: os:ubuntu-24.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-9 cpp:g++-9 flags: os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (map[flags:-fuse-linker-plugin -ffunction-sections]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-22.04-arm]) (push) Has been cancelled
C/C++ CI / build-ubuntu-riscv64 (map[flags:-fuse-linker-plugin -ffunction-sections os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:clang cxx:clang++ flags:-fuse-ld=lld -Wno-unused-command-line-argument -Wno-nan-infinity-disabled -Wno-attributes]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:gcc cxx:g++ flags:-ffunction-sections -Wno-error=maybe-uninitialized -Wno-error=attributes -Wno-attributes]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2022 rx:OFF tls:OFF upnp:OFF vs:Visual Studio 17 2022 vspath:C:\Program Files\Microsoft Visual Studio\2022\Enterprise]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:aarch64 branch:latest-stable flags:-ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2022 rx:OFF tls:ON upnp:OFF vs:Visual Studio 17 2022 vspath:C:\Program Files\Microsoft Visual Studio\2022\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2022 rx:OFF tls:ON upnp:ON vs:Visual Studio 17 2022 vspath:C:\Program Files\Microsoft Visual Studio\2022\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2022 rx:ON tls:ON upnp:ON vs:Visual Studio 17 2022 vspath:C:\Program Files\Microsoft Visual Studio\2022\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:ON os:2022 rx:ON tls:ON upnp:ON vs:Visual Studio 17 2022 vspath:C:\Program Files\Microsoft Visual Studio\2022\Enterprise]) (push) Has been cancelled
C/C++ CI / build-macos (push) Has been cancelled
C/C++ CI / build-macos-aarch64 (push) Has been cancelled
C/C++ CI / build-freebsd (map[architecture:x86-64 host:ubuntu-latest name:freebsd version:13.3]) (push) Has been cancelled
C/C++ CI / build-openbsd (map[architecture:x86-64 host:ubuntu-latest name:openbsd version:7.4]) (push) Has been cancelled
clang-tidy / clang-tidy (push) Has been cancelled
Code coverage / coverage (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
source-snapshot / source-snapshot (push) Failing after 3s
CodeQL / Analyze (cpp) (push) Failing after 14m7s
cppcheck / cppcheck-ubuntu (push) Failing after 7m20s
Sync test / sync-test-ubuntu-tsan (push) Failing after 12m6s
Sync test / sync-test-ubuntu-msan (push) Failing after 17m56s
Sync test / sync-test-ubuntu-ubsan (push) Failing after 12m18s
Sync test / sync-test-ubuntu-asan (push) Failing after 12m9s
cppcheck / cppcheck-windows (push) Has been cancelled
Sync test / sync-test-macos (map[flags: os:macos-15-intel]) (push) Has been cancelled
Sync test / sync-test-macos (map[flags:-target arm64-apple-macos-11 os:macos-15]) (push) Has been cancelled
Sync test / sync-test-windows-debug-asan (push) Has been cancelled
Sync test / sync-test-windows-leaks (push) Has been cancelled

This commit is contained in:
t1amak
2025-12-06 18:34:35 +01:00
parent f3659848bb
commit 15fecd0e41
57 changed files with 11799 additions and 538 deletions

View File

@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.10)
project(p2pool)
include(cmake/standard.cmake)
enable_language(ASM)
message(STATUS "Build environment:
System processor: ${CMAKE_SYSTEM_PROCESSOR}
@@ -16,7 +17,7 @@ option(STATIC_LIBS "Link libuv and libzmq statically" OFF)
option(WITH_RANDOMX "Include the RandomX library in the build. If this is turned off, p2pool will rely on monerod for verifying RandomX hashes" ON)
option(WITH_LTO "Use link-time compiler optimization (if linking fails for you, run cmake with -DWITH_LTO=OFF)" ON)
option(WITH_UPNP "Include UPnP support. If this is turned off, p2pool will not be able to configure port forwarding on UPnP-enabled routers." ON)
option(WITH_GRPC "Include gRPC support. If this is turned off, p2pool will not be able to merge mine with Tari." ON)
option(WITH_GRPC "Include gRPC support (Tari merge mining). Turn off to drop Tari dependency." OFF)
option(WITH_TLS "Include TLS support. If this is turned off, p2pool will not support Stratum TLS connections, and lack many other security features. It's recommended to keep it ON!" ON)
option(WITH_INDEXED_HASHES "Save memory used for storing transaction hashes and public keys (a bit slower block verification - use it only if you compile for a very low memory system)" OFF)
@@ -112,6 +113,11 @@ set(HEADERS
src/json_rpc_request.h
src/keccak.h
src/log.h
src/salvium_carrot.h
src/transcript_fixed.h
src/int-util.h
src/blake2b.h
src/memwipe.h
src/mempool.h
src/merge_mining_client.h
src/merge_mining_client_json_rpc.h
@@ -123,6 +129,7 @@ set(HEADERS
src/pool_block.h
src/pool_block_parser.inl
src/pow_hash.h
src/carrot_crypto.h
src/side_chain.h
src/stratum_server.h
src/tcp_server.h
@@ -137,11 +144,28 @@ set(SOURCES
external/src/cryptonote/crypto-ops-data.c
external/src/cryptonote/crypto-ops.c
external/src/cryptonote/fcmp_pp_crypto.cpp
external/src/hardforks/hardforks.cpp
src/block_cache.cpp
external/mx25519/src/mx25519.c
external/mx25519/src/impl.c
external/mx25519/src/platform.c
external/mx25519/src/scalar.c
external/mx25519/src/cpu.c
external/mx25519/src/portable/scalarmult.c
)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "amd64")
list(APPEND SOURCES external/mx25519/src/amd64/scalarmult_gnu.S)
endif()
list(APPEND SOURCES
external/src/hardforks/hardforks.cpp
src/block_cache.cpp
src/block_template.cpp
src/console_commands.cpp
src/crypto.cpp
src/carrot_crypto.cpp
src/salvium_carrot.cpp
src/blake2b.c
src/memwipe.c
src/json_rpc_request.cpp
src/keccak.cpp
src/log.cpp
@@ -160,7 +184,7 @@ set(SOURCES
src/side_chain.cpp
src/stratum_server.cpp
src/tcp_server.cpp
src/util.cpp
src/util.cpp
src/wallet.cpp
src/zmq_reader.cpp
)
@@ -180,7 +204,7 @@ else()
set(SOURCES ${SOURCES} external/src/RandomX/src/cpu.cpp)
endif()
if (WITH_GRPC)
if (WITH_GRPC AND NOT P2POOL_UNIT_TESTS)
set(HEADERS ${HEADERS} src/merge_mining_client_tari.h)
set(SOURCES ${SOURCES} src/merge_mining_client_tari.cpp)
endif()
@@ -234,6 +258,10 @@ include_directories(src)
include_directories(external/src)
include_directories(external/src/crypto)
include_directories(external/src/cryptonote)
include_directories(external/mx25519/include)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "amd64")
include_directories(external/mx25519/src/amd64)
endif()
include_directories(${UV_INCLUDE_DIR})
include_directories(external/src/cppzmq)
include_directories(${ZMQ_INCLUDE_DIR})